diff --git a/.devcontainer/Dockerfile b/.devcontainer/Dockerfile new file mode 100644 index 000000000..c21564491 --- /dev/null +++ b/.devcontainer/Dockerfile @@ -0,0 +1,25 @@ +FROM mcr.microsoft.com/devcontainers/cpp:1-debian-12 + +# [Optional] Uncomment this section to install additional packages. +RUN apt-get update && export DEBIAN_FRONTEND=noninteractive \ + && apt-get -y install --no-install-recommends \ + ca-certificates \ + g++ \ + git \ + libbluetooth-dev \ + libgpiod-dev \ + liborcania-dev \ + libssl-dev \ + libulfius-dev \ + libyaml-cpp-dev \ + pipx \ + pkg-config \ + python3 \ + python3-pip \ + python3-venv \ + python3-wheel \ + wget \ + zip \ + && apt-get clean && rm -rf /var/lib/apt/lists/* + +RUN pipx install platformio==6.1.15 \ No newline at end of file diff --git a/.devcontainer/devcontainer.json b/.devcontainer/devcontainer.json new file mode 100644 index 000000000..d83d052b0 --- /dev/null +++ b/.devcontainer/devcontainer.json @@ -0,0 +1,25 @@ +// For format details, see https://aka.ms/devcontainer.json. For config options, see the +// README at: https://github.com/devcontainers/templates/tree/main/src/cpp +{ + "name": "Meshtastic Firmware Dev", + "build": { + "dockerfile": "Dockerfile" + }, + "features": { + "ghcr.io/devcontainers/features/python:1": { + "installTools": true, + "version": "latest" + } + }, + "customizations": { + "vscode": { + "extensions": ["ms-vscode.cpptools", "platformio.platformio-ide"] + } + }, + + // Use 'forwardPorts' to make a list of ports inside the container available locally. + "forwardPorts": [4403], + + // Run commands to prepare the container for use + "postCreateCommand": ".devcontainer/setup.sh" +} diff --git a/.devcontainer/setup.sh b/.devcontainer/setup.sh new file mode 100755 index 000000000..0b2665f84 --- /dev/null +++ b/.devcontainer/setup.sh @@ -0,0 +1,3 @@ +#!/usr/bin/env sh + +git submodule update --init diff --git a/.github/ISSUE_TEMPLATE/Bug Report.yml b/.github/ISSUE_TEMPLATE/Bug Report.yml index 7fe42051c..f2d2f6507 100644 --- a/.github/ISSUE_TEMPLATE/Bug Report.yml +++ b/.github/ISSUE_TEMPLATE/Bug Report.yml @@ -49,9 +49,24 @@ body: - Heltec V3 - Heltec Wireless Paper - Heltec Wireless Tracker + - Heltec Mesh Node T114 + - Heltec Vision Master E213 + - Heltec Vision Master E290 + - Heltec Vision Master T190 + - Nano G1 + - Nano G1 Explorer + - Nano G2 Ultra - Raspberry Pi Pico (W) - Relay v1 - Relay v2 + - Seeed Wio Tracker 1110 + - Seeed Card Tracker T1000-E + - Station G1 + - Station G2 + - unPhone + - CanaryOne + - Chatter + - Linux Native - DIY - Other validations: diff --git a/.github/ISSUE_TEMPLATE/feature.yml b/.github/ISSUE_TEMPLATE/feature.yml index 2b6ffce0a..b50ccac26 100644 --- a/.github/ISSUE_TEMPLATE/feature.yml +++ b/.github/ISSUE_TEMPLATE/feature.yml @@ -16,6 +16,10 @@ body: options: - NRF52 - ESP32 + - RP2040 + - Linux Native + - Cross-Platform + - other validations: required: true - type: textarea diff --git a/.github/actions/build-variant/action.yml b/.github/actions/build-variant/action.yml new file mode 100644 index 000000000..80d2a56bb --- /dev/null +++ b/.github/actions/build-variant/action.yml @@ -0,0 +1,94 @@ +name: Setup Build Variant Composite Action +description: Variant build actions for Meshtastic Platform IO steps + +inputs: + board: + description: The board to build for + required: true + github_token: + description: GitHub token + required: true + build-script-path: + description: Path to the build script + required: true + remove-debug-flags: + description: A space separated list of files to remove debug flags from + required: false + default: "" + ota-firmware-source: + description: The OTA firmware file to pull + required: false + default: "" + ota-firmware-target: + description: The target path to store the OTA firmware file + required: false + default: "" + artifact-paths: + description: A newline separated list of paths to store as artifacts + required: false + default: "" + include-web-ui: + description: Include the web UI in the build + required: false + default: "false" + arch: + description: Processor arch name + required: true + default: "esp32" + +runs: + using: composite + steps: + - name: Build base + id: base + uses: ./.github/actions/setup-base + + - name: Pull web ui + if: inputs.include-web-ui == 'true' + uses: dsaltares/fetch-gh-release-asset@master + with: + repo: meshtastic/web + file: build.tar + target: build.tar + token: ${{ inputs.github_token }} + + - name: Unpack web ui + if: inputs.include-web-ui == 'true' + shell: bash + run: | + tar -xf build.tar -C data/static + rm build.tar + + - name: Remove debug flags for release + shell: bash + if: inputs.remove-debug-flags != '' + run: | + for INI_FILE in ${{ inputs.remove-debug-flags }}; do + sed -i '/DDEBUG_HEAP/d' ${INI_FILE} + done + + - name: Build ${{ inputs.board }} + shell: bash + run: ${{ inputs.build-script-path }} ${{ inputs.board }} + + - name: Pull OTA Firmware + if: inputs.ota-firmware-source != '' && inputs.ota-firmware-target != '' + uses: dsaltares/fetch-gh-release-asset@master + with: + repo: meshtastic/firmware-ota + file: ${{ inputs.ota-firmware-source }} + target: ${{ inputs.ota-firmware-target }} + token: ${{ inputs.github_token }} + + - name: Get release version string + shell: bash + run: echo "version=$(./bin/buildinfo.py long)" >> $GITHUB_OUTPUT + id: version + + - name: Store binaries as an artifact + uses: actions/upload-artifact@v4 + with: + name: firmware-${{ inputs.arch }}-${{ inputs.board }}-${{ steps.version.outputs.version }}.zip + overwrite: true + path: | + ${{ inputs.artifact-paths }} diff --git a/.github/actions/setup-base/action.yml b/.github/actions/setup-base/action.yml index 7b97e1753..c0f6c4e66 100644 --- a/.github/actions/setup-base/action.yml +++ b/.github/actions/setup-base/action.yml @@ -5,48 +5,43 @@ runs: using: "composite" steps: - name: Checkout code - uses: actions/checkout@v3 + uses: actions/checkout@v4 with: submodules: "recursive" ref: ${{github.event.pull_request.head.ref}} repository: ${{github.event.pull_request.head.repo.full_name}} - - name: Install cppcheck + - name: Uncomment build epoch shell: bash run: | - sudo apt-get install -y cppcheck + sed -i 's/#-DBUILD_EPOCH=$UNIX_TIME/-DBUILD_EPOCH=$UNIX_TIME/' platformio.ini - - name: Install libbluetooth + - name: Install dependencies shell: bash run: | - sudo apt-get install -y libbluetooth-dev - - name: Install libgpiod - shell: bash - run: | - sudo apt-get install -y libgpiod-dev - - name: Install libyaml-cpp - shell: bash - run: | - sudo apt-get install -y libyaml-cpp-dev + sudo apt-get -y update --fix-missing + sudo apt-get install -y cppcheck libbluetooth-dev libgpiod-dev libyaml-cpp-dev - name: Setup Python - uses: actions/setup-python@v4 + uses: actions/setup-python@v5 with: python-version: 3.x - - name: Cache python libs - uses: actions/cache@v3 - id: cache-pip # needed in if test - with: - path: ~/.cache/pip - key: ${{ runner.os }}-pip + # - name: Cache python libs + # uses: actions/cache@v4 + # id: cache-pip # needed in if test + # with: + # path: ~/.cache/pip + # key: ${{ runner.os }}-pip - name: Upgrade python tools shell: bash run: | python -m pip install --upgrade pip - pip install -U platformio adafruit-nrfutil - pip install -U meshtastic --pre + pip install -U --no-build-isolation --no-cache-dir "setuptools<72" + pip install -U platformio adafruit-nrfutil --no-build-isolation + pip install -U poetry --no-build-isolation + pip install -U meshtastic --pre --no-build-isolation - name: Upgrade platformio shell: bash diff --git a/.github/dependabot.yml b/.github/dependabot.yml new file mode 100644 index 000000000..616c16ce2 --- /dev/null +++ b/.github/dependabot.yml @@ -0,0 +1,26 @@ +version: 2 +updates: + - package-ecosystem: docker + directory: devcontainer + schedule: + interval: daily + time: "05:00" # trunk-ignore(yamllint/quoted-strings): required by dependabot syntax check + timezone: US/Pacific + - package-ecosystem: docker + directory: / + schedule: + interval: daily + time: "05:00" # trunk-ignore(yamllint/quoted-strings): required by dependabot syntax check + timezone: US/Pacific + - package-ecosystem: gitsubmodule + directory: / + schedule: + interval: daily + time: "05:00" # trunk-ignore(yamllint/quoted-strings): required by dependabot syntax check + timezone: US/Pacific + - package-ecosystem: github-actions + directory: /.github/workflows + schedule: + interval: daily + time: "05:00" # trunk-ignore(yamllint/quoted-strings): required by dependabot syntax check + timezone: US/Pacific diff --git a/.github/pull_request_template.md b/.github/pull_request_template.md index 512dea311..6ccb4a105 100644 --- a/.github/pull_request_template.md +++ b/.github/pull_request_template.md @@ -1,9 +1,9 @@ +### ❌ (Please delete all these tips and replace them with your text) ❌ + ## Thank you for sending in a pull request, here's some tips to get started! -(Please delete all these tips and replace with your text) - - Before starting on some new big chunk of code, it it is optional but highly recommended to open an issue first - 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 + 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 is appreciated." This will allow other devs to potentially save you time by not accidentially duplicating work etc... - Please do not check in files that don't have real changes - Please do not reformat lines that you didn't have to change the code on @@ -12,3 +12,4 @@ - If your PR fixes a bug, mention "fixes #bugnum" somewhere in your pull request description. - If your other co-developers have comments on your PR please tweak as needed. - Please also enable "Allow edits by maintainers". +- If your PR gets accepted you can request a "Contributor" role in the Meshtastic Discord diff --git a/.github/workflows/build_esp32.yml b/.github/workflows/build_esp32.yml index c9664152e..7d069e3db 100644 --- a/.github/workflows/build_esp32.yml +++ b/.github/workflows/build_esp32.yml @@ -11,51 +11,24 @@ jobs: build-esp32: runs-on: ubuntu-latest steps: - - uses: actions/checkout@v3 - - name: Build base - id: base - uses: ./.github/actions/setup-base - - - name: Pull web ui - uses: dsaltares/fetch-gh-release-asset@a40c8b4a0471f9ab81bdf73a010f74cc51476ad4 - with: - repo: meshtastic/web - file: build.tar - target: build.tar - token: ${{ secrets.GITHUB_TOKEN }} - - - name: Unpack web ui - run: | - tar -xf build.tar -C data/static - rm build.tar - - - name: Remove debug flags for release - if: ${{ github.event_name == 'workflow_dispatch' }} - run: | - sed -i '/DDEBUG_HEAP/d' ./arch/esp32/esp32.ini - sed -i '/DDEBUG_HEAP/d' ./arch/esp32/esp32s2.ini - sed -i '/DDEBUG_HEAP/d' ./arch/esp32/esp32s3.ini + - uses: actions/checkout@v4 - name: Build ESP32 - run: bin/build-esp32.sh ${{ inputs.board }} - - - name: Pull OTA Firmware - uses: dsaltares/fetch-gh-release-asset@a40c8b4a0471f9ab81bdf73a010f74cc51476ad4 + id: build + uses: ./.github/actions/build-variant with: - repo: meshtastic/firmware-ota - file: firmware.bin - target: release/bleota.bin - token: ${{ secrets.GITHUB_TOKEN }} - - - name: Get release version string - shell: bash - run: echo "version=$(./bin/buildinfo.py long)" >> $GITHUB_OUTPUT - id: version - - - name: Store binaries as an artifact - uses: actions/upload-artifact@v3 - with: - name: firmware-${{ inputs.board }}-${{ steps.version.outputs.version }}.zip - path: | + github_token: ${{ secrets.GITHUB_TOKEN }} + board: ${{ inputs.board }} + remove-debug-flags: >- + ./arch/esp32/esp32.ini + ./arch/esp32/esp32s2.ini + ./arch/esp32/esp32s3.ini + ./arch/esp32/esp32c3.ini + build-script-path: bin/build-esp32.sh + ota-firmware-source: firmware.bin + ota-firmware-target: release/bleota.bin + artifact-paths: | release/*.bin release/*.elf + include-web-ui: true + arch: esp32 diff --git a/.github/workflows/build_esp32_c3.yml b/.github/workflows/build_esp32_c3.yml new file mode 100644 index 000000000..5234dbe81 --- /dev/null +++ b/.github/workflows/build_esp32_c3.yml @@ -0,0 +1,35 @@ +name: Build ESP32-C3 + +on: + workflow_call: + inputs: + board: + required: true + type: string + +permissions: read-all + +jobs: + build-esp32-c3: + runs-on: ubuntu-latest + steps: + - uses: actions/checkout@v4 + + - name: Build ESP32-C3 + id: build + uses: ./.github/actions/build-variant + with: + github_token: ${{ secrets.GITHUB_TOKEN }} + board: ${{ inputs.board }} + remove-debug-flags: >- + ./arch/esp32/esp32.ini + ./arch/esp32/esp32s2.ini + ./arch/esp32/esp32s3.ini + ./arch/esp32/esp32c3.ini + build-script-path: bin/build-esp32.sh + ota-firmware-source: firmware-c3.bin + ota-firmware-target: release/bleota-c3.bin + artifact-paths: | + release/*.bin + release/*.elf + arch: esp32c3 diff --git a/.github/workflows/build_esp32_c6.yml b/.github/workflows/build_esp32_c6.yml new file mode 100644 index 000000000..66f2764a6 --- /dev/null +++ b/.github/workflows/build_esp32_c6.yml @@ -0,0 +1,36 @@ +name: Build ESP32-C6 + +on: + workflow_call: + inputs: + board: + required: true + type: string + +permissions: read-all + +jobs: + build-esp32-c6: + runs-on: ubuntu-latest + steps: + - uses: actions/checkout@v4 + + - name: Build ESP32-C6 + id: build + uses: ./.github/actions/build-variant + with: + github_token: ${{ secrets.GITHUB_TOKEN }} + board: ${{ inputs.board }} + remove-debug-flags: >- + ./arch/esp32/esp32.ini + ./arch/esp32/esp32s2.ini + ./arch/esp32/esp32s3.ini + ./arch/esp32/esp32c3.ini + ./arch/esp32/esp32c6.ini + build-script-path: bin/build-esp32.sh + ota-firmware-source: firmware-c3.bin + ota-firmware-target: release/bleota-c3.bin + artifact-paths: | + release/*.bin + release/*.elf + arch: esp32c6 diff --git a/.github/workflows/build_esp32_s3.yml b/.github/workflows/build_esp32_s3.yml index 9611dd5b8..554b37cef 100644 --- a/.github/workflows/build_esp32_s3.yml +++ b/.github/workflows/build_esp32_s3.yml @@ -11,49 +11,24 @@ jobs: build-esp32-s3: runs-on: ubuntu-latest steps: - - uses: actions/checkout@v3 - - name: Build base - id: base - uses: ./.github/actions/setup-base + - uses: actions/checkout@v4 - - name: Pull web ui - uses: dsaltares/fetch-gh-release-asset@a40c8b4a0471f9ab81bdf73a010f74cc51476ad4 + - name: Build ESP32-S3 + id: build + uses: ./.github/actions/build-variant with: - repo: meshtastic/web - file: build.tar - target: build.tar - token: ${{ secrets.GITHUB_TOKEN }} - - - name: Unpack web ui - run: | - tar -xf build.tar -C data/static - rm build.tar - - name: Remove debug flags for release - if: ${{ github.event_name == 'workflow_dispatch' }} - run: | - sed -i '/DDEBUG_HEAP/d' ./arch/esp32/esp32.ini - sed -i '/DDEBUG_HEAP/d' ./arch/esp32/esp32s2.ini - sed -i '/DDEBUG_HEAP/d' ./arch/esp32/esp32s3.ini - - name: Build ESP32 - run: bin/build-esp32.sh ${{ inputs.board }} - - - name: Pull OTA Firmware - uses: dsaltares/fetch-gh-release-asset@a40c8b4a0471f9ab81bdf73a010f74cc51476ad4 - with: - repo: meshtastic/firmware-ota - file: firmware-s3.bin - target: release/bleota-s3.bin - token: ${{ secrets.GITHUB_TOKEN }} - - - name: Get release version string - shell: bash - run: echo "version=$(./bin/buildinfo.py long)" >> $GITHUB_OUTPUT - id: version - - - name: Store binaries as an artifact - uses: actions/upload-artifact@v3 - with: - name: firmware-${{ inputs.board }}-${{ steps.version.outputs.version }}.zip - path: | + github_token: ${{ secrets.GITHUB_TOKEN }} + board: ${{ inputs.board }} + remove-debug-flags: >- + ./arch/esp32/esp32.ini + ./arch/esp32/esp32s2.ini + ./arch/esp32/esp32s3.ini + ./arch/esp32/esp32c3.ini + build-script-path: bin/build-esp32.sh + ota-firmware-source: firmware-s3.bin + ota-firmware-target: release/bleota-s3.bin + artifact-paths: | release/*.bin release/*.elf + include-web-ui: true + arch: esp32s3 diff --git a/.github/workflows/build_native.yml b/.github/workflows/build_native.yml new file mode 100644 index 000000000..1fb44a717 --- /dev/null +++ b/.github/workflows/build_native.yml @@ -0,0 +1,85 @@ +name: Build Native + +on: workflow_call + +permissions: + contents: write + packages: write + +jobs: + build-native: + runs-on: ubuntu-latest + steps: + - name: Install libs needed for native build + shell: bash + run: | + sudo apt-get update --fix-missing + sudo apt-get install -y libbluetooth-dev libgpiod-dev libyaml-cpp-dev openssl libssl-dev libulfius-dev liborcania-dev + + - name: Checkout code + uses: actions/checkout@v4 + with: + submodules: recursive + ref: ${{github.event.pull_request.head.ref}} + repository: ${{github.event.pull_request.head.repo.full_name}} + + - name: Upgrade python tools + shell: bash + run: | + python -m pip install --upgrade pip + pip install -U platformio adafruit-nrfutil + pip install -U meshtastic --pre + + - name: Upgrade platformio + shell: bash + run: | + pio upgrade + + - name: Build Native + run: bin/build-native.sh + + - name: Get release version string + run: echo "version=$(./bin/buildinfo.py long)" >> $GITHUB_OUTPUT + id: version + + - name: Store binaries as an artifact + uses: actions/upload-artifact@v4 + with: + name: firmware-native-${{ steps.version.outputs.version }}.zip + overwrite: true + path: | + release/meshtasticd_linux_x86_64 + bin/config-dist.yaml + + - name: Docker login + if: ${{ github.event_name != 'pull_request_target' && github.event_name != 'pull_request' }} + uses: docker/login-action@v3 + continue-on-error: true # FIXME: Failing docker login auth + with: + username: meshtastic + password: ${{ secrets.DOCKER_FIRMWARE_TOKEN }} + + - name: Docker setup + if: ${{ github.event_name != 'pull_request_target' && github.event_name != 'pull_request' }} + continue-on-error: true # FIXME: Failing docker login auth + uses: docker/setup-buildx-action@v3 + + - name: Docker build and push tagged versions + if: ${{ github.event_name == 'workflow_dispatch' }} + continue-on-error: true # FIXME: Failing docker login auth + uses: docker/build-push-action@v6 + with: + context: . + file: ./Dockerfile + push: true + tags: meshtastic/device-simulator:${{ steps.version.outputs.version }} + + - name: Docker build and push + if: ${{ github.ref == 'refs/heads/master' && github.event_name != 'pull_request_target' && github.event_name != 'pull_request' }} + continue-on-error: true # FIXME: Failing docker login auth + uses: docker/build-push-action@v6 + with: + context: . + file: ./Dockerfile + push: true + tags: meshtastic/device-simulator:latest diff --git a/.github/workflows/build_nrf52.yml b/.github/workflows/build_nrf52.yml index 33ee4d00c..ce26838f2 100644 --- a/.github/workflows/build_nrf52.yml +++ b/.github/workflows/build_nrf52.yml @@ -11,23 +11,18 @@ jobs: build-nrf52: runs-on: ubuntu-latest steps: - - uses: actions/checkout@v3 - - name: Build base - id: base - uses: ./.github/actions/setup-base + - uses: actions/checkout@v4 - name: Build NRF52 - run: bin/build-nrf52.sh ${{ inputs.board }} - - - name: Get release version string - run: echo "version=$(./bin/buildinfo.py long)" >> $GITHUB_OUTPUT - id: version - - - name: Store binaries as an artifact - uses: actions/upload-artifact@v3 + id: build + uses: ./.github/actions/build-variant with: - name: firmware-${{ inputs.board }}-${{ steps.version.outputs.version }}.zip - path: | + github_token: ${{ secrets.GITHUB_TOKEN }} + board: ${{ inputs.board }} + build-script-path: bin/build-nrf52.sh + artifact-paths: | + release/*.hex release/*.uf2 release/*.elf release/*.zip + arch: nrf52840 diff --git a/.github/workflows/build_raspbian.yml b/.github/workflows/build_raspbian.yml index 7a25892bc..1fd8fad30 100644 --- a/.github/workflows/build_raspbian.yml +++ b/.github/workflows/build_raspbian.yml @@ -10,8 +10,14 @@ jobs: build-raspbian: runs-on: [self-hosted, linux, ARM64] steps: + - name: Install libbluetooth + shell: bash + run: | + apt-get update -y --fix-missing + apt-get install -y libbluetooth-dev libgpiod-dev libyaml-cpp-dev openssl libssl-dev libulfius-dev liborcania-dev + - name: Checkout code - uses: actions/checkout@v3 + uses: actions/checkout@v4 with: submodules: recursive ref: ${{github.event.pull_request.head.ref}} @@ -37,9 +43,10 @@ jobs: id: version - name: Store binaries as an artifact - uses: actions/upload-artifact@v3 + uses: actions/upload-artifact@v4 with: name: firmware-raspbian-${{ steps.version.outputs.version }}.zip + overwrite: true path: | release/meshtasticd_linux_aarch64 bin/config-dist.yaml diff --git a/.github/workflows/build_raspbian_armv7l.yml b/.github/workflows/build_raspbian_armv7l.yml new file mode 100644 index 000000000..39b297d1b --- /dev/null +++ b/.github/workflows/build_raspbian_armv7l.yml @@ -0,0 +1,52 @@ +name: Build Raspbian Arm + +on: workflow_call + +permissions: + contents: write + packages: write + +jobs: + build-raspbian-armv7l: + runs-on: [self-hosted, linux, ARM] + steps: + - name: Install libbluetooth + shell: bash + run: | + apt-get update -y --fix-missing + apt-get install -y libbluetooth-dev libgpiod-dev libyaml-cpp-dev openssl libssl-dev libulfius-dev liborcania-dev + + - name: Checkout code + uses: actions/checkout@v4 + with: + submodules: recursive + ref: ${{github.event.pull_request.head.ref}} + repository: ${{github.event.pull_request.head.repo.full_name}} + + - name: Upgrade python tools + shell: bash + run: | + python -m pip install --upgrade pip + pip install -U platformio adafruit-nrfutil + pip install -U meshtastic --pre + + - name: Upgrade platformio + shell: bash + run: | + pio upgrade + + - name: Build Raspbian + run: bin/build-native.sh + + - name: Get release version string + run: echo "version=$(./bin/buildinfo.py long)" >> $GITHUB_OUTPUT + id: version + + - name: Store binaries as an artifact + uses: actions/upload-artifact@v4 + with: + name: firmware-raspbian-armv7l-${{ steps.version.outputs.version }}.zip + overwrite: true + path: | + release/meshtasticd_linux_armv7l + bin/config-dist.yaml diff --git a/.github/workflows/build_rpi2040.yml b/.github/workflows/build_rpi2040.yml index 76ca2c20e..492a1f010 100644 --- a/.github/workflows/build_rpi2040.yml +++ b/.github/workflows/build_rpi2040.yml @@ -11,22 +11,16 @@ jobs: build-rpi2040: runs-on: ubuntu-latest steps: - - uses: actions/checkout@v3 - - name: Build base - id: base - uses: ./.github/actions/setup-base + - uses: actions/checkout@v4 - name: Build Raspberry Pi 2040 - run: ./bin/build-rpi2040.sh ${{ inputs.board }} - - - name: Get release version string - run: echo "version=$(./bin/buildinfo.py long)" >> $GITHUB_OUTPUT - id: version - - - name: Store binaries as an artifact - uses: actions/upload-artifact@v3 + id: build + uses: ./.github/actions/build-variant with: - name: firmware-${{ inputs.board }}-${{ steps.version.outputs.version }}.zip - path: | + github_token: ${{ secrets.GITHUB_TOKEN }} + board: ${{ inputs.board }} + build-script-path: bin/build-rpi2040.sh + artifact-paths: | release/*.uf2 release/*.elf + arch: rp2040 diff --git a/.github/workflows/build_stm32.yml b/.github/workflows/build_stm32.yml new file mode 100644 index 000000000..b463bab71 --- /dev/null +++ b/.github/workflows/build_stm32.yml @@ -0,0 +1,27 @@ +name: Build STM32 + +on: + workflow_call: + inputs: + board: + required: true + type: string + +jobs: + build-stm32: + runs-on: ubuntu-latest + steps: + - uses: actions/checkout@v4 + + - name: Build STM32WL + id: build + uses: ./.github/actions/build-variant + with: + github_token: ${{ secrets.GITHUB_TOKEN }} + board: ${{ inputs.board }} + build-script-path: bin/build-stm32.sh + artifact-paths: | + release/*.hex + release/*.bin + release/*.elf + arch: stm32 diff --git a/.github/workflows/generate-userprefs.yml b/.github/workflows/generate-userprefs.yml new file mode 100644 index 000000000..10dd1ff7d --- /dev/null +++ b/.github/workflows/generate-userprefs.yml @@ -0,0 +1,35 @@ +name: Generate UsersPrefs JSON manifest + +on: + push: + paths: + - userPrefs.h + branches: + - master + +jobs: + generate-userprefs: + runs-on: ubuntu-latest + steps: + - name: Checkout code + uses: actions/checkout@v4 + + - name: Install Clang + run: sudo apt-get install -y clang + + - name: Install trunk + run: curl https://get.trunk.io -fsSL | bash + + - name: Generate userPrefs.jsom + run: python3 ./bin/build-userprefs-json.py + + - name: Trunk format json + run: trunk format userPrefs.json + + - name: Commit userPrefs.json + run: | + git config --global user.email "actions@github.com" + git config --global user.name "GitHub Actions" + git add userPrefs.json + git commit -m "Update userPrefs.json" + git push diff --git a/.github/workflows/main_matrix.yml b/.github/workflows/main_matrix.yml index 5c1cf4c21..555d4d092 100644 --- a/.github/workflows/main_matrix.yml +++ b/.github/workflows/main_matrix.yml @@ -1,14 +1,14 @@ name: CI -#concurrency: -# group: ${{ github.ref }} -# cancel-in-progress: ${{ github.ref != 'refs/heads/master' }} +concurrency: + group: ci-${{ github.head_ref || github.run_id }} + cancel-in-progress: true on: # # Triggers the workflow on push but only for the master branch push: branches: [master, develop] paths-ignore: - "**.md" - - "version.properties" + - version.properties # Note: This is different from "pull_request". Need to specify ref when doing checkouts. pull_request_target: @@ -20,197 +20,130 @@ on: workflow_dispatch: jobs: - check: + setup: strategy: fail-fast: false matrix: - include: - - board: rak11200 - - board: tlora-v2-1-1_6 - - board: tbeam - - board: heltec-v2_1 - - board: meshtastic-diy-v1 - - board: rak4631 - - board: t-echo - - board: station-g1 - - board: m5stack-coreink - - board: tbeam-s3-core - - board: tlora-t3s3-v1 - - board: t-watch-s3 - - board: t-deck - #- board: rak11310 - + arch: [esp32, esp32s3, esp32c3, esp32c6, nrf52840, rp2040, stm32, check] runs-on: ubuntu-latest steps: - - uses: actions/checkout@v3 + - id: checkout + uses: actions/checkout@v4 + name: Checkout base + - id: jsonStep + run: | + if [[ "${{ github.head_ref }}" == "" ]]; then + TARGETS=$(./bin/generate_ci_matrix.py ${{matrix.arch}}) + else + TARGETS=$(./bin/generate_ci_matrix.py ${{matrix.arch}} quick) + fi + echo "Name: ${{ github.ref_name }} Base: ${{ github.base_ref }} Head: ${{ github.head_ref }} Ref: ${{ github.ref }} Targets: $TARGETS" + echo "${{matrix.arch}}=$(jq -cn --argjson environments "$TARGETS" '{board: $environments}')" >> $GITHUB_OUTPUT + outputs: + esp32: ${{ steps.jsonStep.outputs.esp32 }} + esp32s3: ${{ steps.jsonStep.outputs.esp32s3 }} + esp32c3: ${{ steps.jsonStep.outputs.esp32c3 }} + esp32c6: ${{ steps.jsonStep.outputs.esp32c6 }} + nrf52840: ${{ steps.jsonStep.outputs.nrf52840 }} + rp2040: ${{ steps.jsonStep.outputs.rp2040 }} + stm32: ${{ steps.jsonStep.outputs.stm32 }} + check: ${{ steps.jsonStep.outputs.check }} + + check: + needs: setup + strategy: + fail-fast: false + matrix: ${{ fromJson(needs.setup.outputs.check) }} + + runs-on: ubuntu-latest + if: ${{ github.event_name != 'workflow_dispatch' }} + steps: + - uses: actions/checkout@v4 - name: Build base id: base uses: ./.github/actions/setup-base - - - name: Trunk Check - if: ${{ github.event_name != 'workflow_dispatch' }} - uses: trunk-io/trunk-action@782e83f803ca6e369f035d64c6ba2768174ba61b - - name: Check ${{ matrix.board }} run: bin/check-all.sh ${{ matrix.board }} build-esp32: + needs: setup strategy: fail-fast: false - matrix: - include: - - board: rak11200 - - board: tlora-v2 - - board: tlora-v1 - - board: tlora_v1_3 - - board: tlora-v2-1-1_6 - - board: tlora-v2-1-1_6-tcxo - - board: tlora-v2-1-1_8 - - board: tbeam - - board: heltec-ht62-esp32c3-sx1262 - - board: heltec-v2_0 - - board: heltec-v2_1 - - board: tbeam0_7 - - board: meshtastic-diy-v1 - - board: hydra - - board: meshtastic-dr-dev - - board: nano-g1 - - board: station-g1 - - board: m5stack-core - - board: m5stack-coreink - - board: nano-g1-explorer - - board: chatter2 + matrix: ${{ fromJson(needs.setup.outputs.esp32) }} uses: ./.github/workflows/build_esp32.yml with: board: ${{ matrix.board }} build-esp32-s3: + needs: setup strategy: fail-fast: false - matrix: - include: - - board: heltec-v3 - - board: heltec-wsl-v3 - - board: heltec-wireless-tracker - - board: heltec-wireless-tracker-V1-0 - - board: heltec-wireless-paper - - board: tbeam-s3-core - - board: tlora-t3s3-v1 - - board: t-watch-s3 - - board: t-deck - - board: picomputer-s3 + matrix: ${{ fromJson(needs.setup.outputs.esp32s3) }} uses: ./.github/workflows/build_esp32_s3.yml with: board: ${{ matrix.board }} - build-nrf52: + build-esp32-c3: + needs: setup strategy: fail-fast: false - matrix: - include: - - board: rak4631 - - board: rak4631_eink - - board: monteops_hw1 - - board: t-echo - - board: canaryone - - board: pca10059_diy_eink - - board: feather_diy - - board: nano-g2-ultra + matrix: ${{ fromJson(needs.setup.outputs.esp32c3) }} + uses: ./.github/workflows/build_esp32_c3.yml + with: + board: ${{ matrix.board }} + + build-esp32-c6: + needs: setup + strategy: + fail-fast: false + matrix: ${{ fromJson(needs.setup.outputs.esp32c6) }} + uses: ./.github/workflows/build_esp32_c6.yml + with: + board: ${{ matrix.board }} + + build-nrf52: + needs: setup + strategy: + fail-fast: false + matrix: ${{ fromJson(needs.setup.outputs.nrf52840) }} uses: ./.github/workflows/build_nrf52.yml with: board: ${{ matrix.board }} build-rpi2040: + needs: setup strategy: fail-fast: false - matrix: - include: - - board: pico - - board: picow - - board: rak11310 - - board: senselora_rp2040 - - board: rp2040-lora + matrix: ${{ fromJson(needs.setup.outputs.rp2040) }} uses: ./.github/workflows/build_rpi2040.yml with: board: ${{ matrix.board }} - build-raspbian: + build-stm32: + needs: setup strategy: fail-fast: false - max-parallel: 1 - uses: ./.github/workflows/build_raspbian.yml + matrix: ${{ fromJson(needs.setup.outputs.stm32) }} + uses: ./.github/workflows/build_stm32.yml + with: + board: ${{ matrix.board }} package-raspbian: uses: ./.github/workflows/package_raspbian.yml - build-native: - runs-on: ubuntu-latest - steps: - - uses: actions/checkout@v3 - - name: Build base - id: base - uses: ./.github/actions/setup-base + package-raspbian-armv7l: + uses: ./.github/workflows/package_raspbian_armv7l.yml - # We now run integration test before other build steps (to quickly see runtime failures) - #- name: Build for native - # run: platformio run -e native - #- name: Integration test - # run: | - #.pio/build/native/program - #& sleep 20 # 5 seconds was not enough - #echo "Simulator started, launching python test..." - #python3 -c 'from meshtastic.test import testSimulator; testSimulator()' - - - name: Build Native - run: bin/build-native.sh - - - name: Get release version string - run: echo "version=$(./bin/buildinfo.py long)" >> $GITHUB_OUTPUT - id: version - - - name: Store binaries as an artifact - uses: actions/upload-artifact@v3 - with: - name: firmware-native-${{ steps.version.outputs.version }}.zip - path: | - release/device-*.sh - release/device-*.bat - - - name: Docker login - if: ${{ github.event_name != 'pull_request_target' && github.event_name != 'pull_request' }} - uses: docker/login-action@v2 - with: - username: meshtastic - password: ${{ secrets.DOCKER_TOKEN }} - - - name: Docker setup - if: ${{ github.event_name != 'pull_request_target' && github.event_name != 'pull_request' }} - uses: docker/setup-buildx-action@v2 - - - name: Docker build and push tagged versions - if: ${{ github.event_name == 'workflow_dispatch' }} - uses: docker/build-push-action@v3 - with: - context: . - file: ./Dockerfile - push: true - tags: meshtastic/device-simulator:${{ steps.version.outputs.version }} - - - name: Docker build and push - if: ${{ github.ref == 'refs/heads/master' && github.event_name != 'pull_request_target' && github.event_name != 'pull_request' }} - uses: docker/build-push-action@v3 - with: - context: . - file: ./Dockerfile - push: true - tags: meshtastic/device-simulator:latest + # package-native: + # uses: ./.github/workflows/package_amd64.yml after-checks: runs-on: ubuntu-latest + if: ${{ github.event_name != 'workflow_dispatch' }} needs: [check] steps: - name: Checkout code - uses: actions/checkout@v3 + uses: actions/checkout@v4 with: ref: ${{github.event.pull_request.head.ref}} repository: ${{github.event.pull_request.head.repo.full_name}} @@ -219,27 +152,33 @@ jobs: permissions: contents: write pull-requests: write + strategy: + fail-fast: false + matrix: + arch: [esp32, esp32s3, esp32c3, esp32c6, nrf52840, rp2040, stm32] runs-on: ubuntu-latest needs: [ build-esp32, build-esp32-s3, + build-esp32-c3, + build-esp32-c6, build-nrf52, - build-raspbian, - build-native, build-rpi2040, - package-raspbian, + build-stm32, ] steps: - name: Checkout code - uses: actions/checkout@v3 + uses: actions/checkout@v4 with: ref: ${{github.event.pull_request.head.ref}} repository: ${{github.event.pull_request.head.repo.full_name}} - - uses: actions/download-artifact@v3 + - uses: actions/download-artifact@v4 with: path: ./ + pattern: firmware-${{matrix.arch}}-* + merge-multiple: true - name: Display structure of downloaded files run: ls -R @@ -249,25 +188,29 @@ jobs: id: version - name: Move files up - run: mv -b -t ./ ./*tbeam-2*/littlefs*.bin ./*tbeam-2*/bleota.bin ./*tbeam-s3*/bleota-s3.bin ./**/firmware*.bin ./*t-echo*/Meshtastic_nRF52_factory_erase_v2.uf2 ./**/firmware-*.uf2 ./**/firmware-*-ota.zip ./**/*.elf ./*native*/*device-*.sh ./*native*/*device-*.bat ./firmware-raspbian-*/release/meshtasticd_linux_aarch64 ./firmware-raspbian-*/bin/config-dist.yaml + run: mv -b -t ./ ./bin/device-*.sh ./bin/device-*.bat - name: Repackage in single firmware zip - uses: actions/upload-artifact@v3 + uses: actions/upload-artifact@v4 with: - name: firmware-${{ steps.version.outputs.version }} + name: firmware-${{matrix.arch}}-${{ steps.version.outputs.version }} + overwrite: true path: | - ./*.bin - ./*.uf2 + ./firmware-*.bin + ./firmware-*.uf2 + ./firmware-*.hex ./firmware-*-ota.zip ./device-*.sh ./device-*.bat - ./meshtasticd_linux_arm64 - ./config-dist.yaml - retention-days: 90 + ./littlefs-*.bin + ./bleota*bin + ./Meshtastic_nRF52_factory_erase*.uf2 + retention-days: 30 - - uses: actions/download-artifact@v3 + - uses: actions/download-artifact@v4 with: - name: firmware-${{ steps.version.outputs.version }} + name: firmware-${{matrix.arch}}-${{ steps.version.outputs.version }} + merge-multiple: true path: ./output # For diagnostics @@ -280,37 +223,40 @@ jobs: chmod +x ./output/device-update.sh - name: Zip firmware - run: zip -j -9 -r ./firmware-${{ steps.version.outputs.version }}.zip ./output + run: zip -j -9 -r ./firmware-${{matrix.arch}}-${{ steps.version.outputs.version }}.zip ./output - name: Repackage in single elfs zip - uses: actions/upload-artifact@v3 + uses: actions/upload-artifact@v4 with: - name: debug-elfs-${{ steps.version.outputs.version }}.zip + name: debug-elfs-${{matrix.arch}}-${{ steps.version.outputs.version }}.zip + overwrite: true path: ./*.elf retention-days: 30 - - name: Create request artifacts - continue-on-error: true # FIXME: Why are we getting 502, but things still work? - if: ${{ github.event_name == 'pull_request_target' || github.event_name == 'pull_request' }} - uses: gavv/pull-request-artifacts@v2.1.0 + - uses: scruplelesswizard/comment-artifact@main + if: ${{ github.event_name == 'pull_request' }} with: - commit: ${{ (github.event.pull_request_target || github.event.pull_request).head.sha }} - repo-token: ${{ secrets.GITHUB_TOKEN }} - artifacts-token: ${{ secrets.ARTIFACTS_TOKEN }} - artifacts-repo: meshtastic/artifacts - artifacts-branch: device - artifacts: ./firmware-${{ steps.version.outputs.version }}.zip + name: firmware-${{matrix.arch}}-${{ steps.version.outputs.version }} + description: "Download firmware-${{matrix.arch}}-${{ steps.version.outputs.version }}.zip. This artifact will be available for 90 days from creation" + github-token: ${{ secrets.GITHUB_TOKEN }} release-artifacts: runs-on: ubuntu-latest if: ${{ github.event_name == 'workflow_dispatch' }} - needs: [gather-artifacts, after-checks] + outputs: + upload_url: ${{ steps.create_release.outputs.upload_url }} + needs: [ + gather-artifacts, + package-raspbian, + package-raspbian-armv7l, + # package-native, + ] steps: - name: Checkout - uses: actions/checkout@v3 + uses: actions/checkout@v4 - name: Setup Python - uses: actions/setup-python@v4 + uses: actions/setup-python@v5 with: python-version: 3.x @@ -318,38 +264,6 @@ jobs: run: echo "version=$(./bin/buildinfo.py long)" >> $GITHUB_OUTPUT id: version - - uses: actions/download-artifact@v3 - with: - name: firmware-${{ steps.version.outputs.version }} - path: ./output - - - uses: actions/download-artifact@v3 - with: - name: artifact-deb - - - name: Display structure of downloaded files - run: ls -R - - - name: Device scripts permissions - run: | - chmod +x ./output/device-install.sh - chmod +x ./output/device-update.sh - - - name: Zip firmware - run: zip -j -9 -r ./firmware-${{ steps.version.outputs.version }}.zip ./output - - - uses: actions/download-artifact@v3 - with: - name: debug-elfs-${{ steps.version.outputs.version }}.zip - path: ./elfs - - - name: Zip Elfs - run: zip -j -9 -r ./debug-elfs-${{ steps.version.outputs.version }}.zip ./elfs - - # For diagnostics - - name: Show artifacts - run: ls -lR - - name: Create release uses: actions/create-release@v1 id: create_release @@ -363,14 +277,117 @@ jobs: env: GITHUB_TOKEN: ${{ github.token }} - - name: Add bins to release + - name: Download deb files + uses: actions/download-artifact@v4 + with: + pattern: meshtasticd_${{ steps.version.outputs.version }}_*.deb + merge-multiple: true + path: ./output + + # For diagnostics + - name: Display structure of downloaded files + run: ls -lR + + - name: Add raspbian aarch64 .deb uses: actions/upload-release-asset@v1 env: GITHUB_TOKEN: ${{ github.token }} with: upload_url: ${{ steps.create_release.outputs.upload_url }} - asset_path: ./firmware-${{ steps.version.outputs.version }}.zip - asset_name: firmware-${{ steps.version.outputs.version }}.zip + asset_path: ./output/meshtasticd_${{ steps.version.outputs.version }}_arm64.deb + asset_name: meshtasticd_${{ steps.version.outputs.version }}_arm64.deb + asset_content_type: application/vnd.debian.binary-package + + - name: Add raspbian armv7l .deb + uses: actions/upload-release-asset@v1 + env: + GITHUB_TOKEN: ${{ github.token }} + with: + upload_url: ${{ steps.create_release.outputs.upload_url }} + asset_path: ./output/meshtasticd_${{ steps.version.outputs.version }}_armhf.deb + asset_name: meshtasticd_${{ steps.version.outputs.version }}_armhf.deb + asset_content_type: application/vnd.debian.binary-package + + # - name: Add raspbian amd64 .deb + # uses: actions/upload-release-asset@v1 + # env: + # GITHUB_TOKEN: ${{ github.token }} + # with: + # upload_url: ${{ steps.create_release.outputs.upload_url }} + # asset_path: ./output/meshtasticd_${{ steps.version.outputs.version }}_amd64.deb + # asset_name: meshtasticd_${{ steps.version.outputs.version }}_amd64.deb + # asset_content_type: application/vnd.debian.binary-package + + - name: Bump version.properties + run: >- + bin/bump_version.py + + - name: Create version.properties pull request + uses: peter-evans/create-pull-request@v7 + with: + title: Bump version.properties + add-paths: | + version.properties + + release-firmware: + strategy: + fail-fast: false + matrix: + arch: [esp32, esp32s3, esp32c3, esp32c6, nrf52840, rp2040, stm32] + runs-on: ubuntu-latest + if: ${{ github.event_name == 'workflow_dispatch' }} + needs: [release-artifacts] + steps: + - name: Checkout + uses: actions/checkout@v4 + + - name: Setup Python + uses: actions/setup-python@v5 + with: + python-version: 3.x + + - name: Get release version string + run: echo "version=$(./bin/buildinfo.py long)" >> $GITHUB_OUTPUT + id: version + + - uses: actions/download-artifact@v4 + with: + pattern: firmware-${{matrix.arch}}-${{ steps.version.outputs.version }} + merge-multiple: true + path: ./output + + - name: Display structure of downloaded files + run: ls -lR + + - name: Device scripts permissions + run: | + chmod +x ./output/device-install.sh + chmod +x ./output/device-update.sh + + - name: Zip firmware + run: zip -j -9 -r ./firmware-${{matrix.arch}}-${{ steps.version.outputs.version }}.zip ./output + + - uses: actions/download-artifact@v4 + with: + name: debug-elfs-${{matrix.arch}}-${{ steps.version.outputs.version }}.zip + merge-multiple: true + path: ./elfs + + - name: Zip firmware + run: zip -j -9 -r ./debug-elfs-${{matrix.arch}}-${{ steps.version.outputs.version }}.zip ./elfs + + # For diagnostics + - name: Display structure of downloaded files + run: ls -lR + + - name: Add bins to release + uses: actions/upload-release-asset@v1 + env: + GITHUB_TOKEN: ${{ github.token }} + with: + upload_url: ${{needs.release-artifacts.outputs.upload_url}} + asset_path: ./firmware-${{matrix.arch}}-${{ steps.version.outputs.version }}.zip + asset_name: firmware-${{matrix.arch}}-${{ steps.version.outputs.version }}.zip asset_content_type: application/zip - name: Add debug elfs to release @@ -378,27 +395,7 @@ jobs: env: GITHUB_TOKEN: ${{ github.token }} with: - upload_url: ${{ steps.create_release.outputs.upload_url }} - asset_path: ./debug-elfs-${{ steps.version.outputs.version }}.zip - asset_name: debug-elfs-${{ steps.version.outputs.version }}.zip + upload_url: ${{needs.release-artifacts.outputs.upload_url}} + asset_path: ./debug-elfs-${{matrix.arch}}-${{ steps.version.outputs.version }}.zip + asset_name: debug-elfs-${{matrix.arch}}-${{ steps.version.outputs.version }}.zip asset_content_type: application/zip - - - name: Add raspbian .deb - uses: actions/upload-release-asset@v1 - env: - GITHUB_TOKEN: ${{ github.token }} - with: - upload_url: ${{ steps.create_release.outputs.upload_url }} - asset_path: ./meshtasticd_${{ steps.version.outputs.version }}_arm64.deb - asset_name: meshtasticd_${{ steps.version.outputs.version }}_arm64.deb - asset_content_type: application/vnd.debian.binary-package - - - name: Bump version.properties - run: >- - bin/bump_version.py - - - name: Create version.properties pull request - uses: peter-evans/create-pull-request@v3 - with: - add-paths: | - version.properties diff --git a/.github/workflows/nightly.yml b/.github/workflows/nightly.yml index da59bc0fd..e249823a7 100644 --- a/.github/workflows/nightly.yml +++ b/.github/workflows/nightly.yml @@ -11,7 +11,7 @@ jobs: steps: - name: Checkout - uses: actions/checkout@v3 + uses: actions/checkout@v4 - name: Trunk Check uses: trunk-io/trunk-action@782e83f803ca6e369f035d64c6ba2768174ba61b diff --git a/.github/workflows/package_amd64.yml b/.github/workflows/package_amd64.yml new file mode 100644 index 000000000..0b5093f24 --- /dev/null +++ b/.github/workflows/package_amd64.yml @@ -0,0 +1,78 @@ +name: Package Native + +on: + workflow_call: + workflow_dispatch: + +permissions: + contents: write + packages: write + +jobs: + build-native: + uses: ./.github/workflows/build_native.yml + + package-native: + runs-on: ubuntu-22.04 + needs: build-native + steps: + - name: Checkout code + uses: actions/checkout@v4 + with: + submodules: recursive + ref: ${{github.event.pull_request.head.ref}} + repository: ${{github.event.pull_request.head.repo.full_name}} + + - name: Pull web ui + uses: dsaltares/fetch-gh-release-asset@master + with: + repo: meshtastic/web + file: build.tar + target: build.tar + token: ${{ secrets.GITHUB_TOKEN }} + + - name: Get release version string + run: echo "version=$(./bin/buildinfo.py long)" >> $GITHUB_OUTPUT + id: version + + - name: Download artifacts + uses: actions/download-artifact@v4 + with: + name: firmware-native-${{ steps.version.outputs.version }}.zip + merge-multiple: true + + - name: Display structure of downloaded files + run: ls -R + + - name: build .debpkg + run: | + mkdir -p .debpkg/DEBIAN + mkdir -p .debpkg/usr/share/doc/meshtasticd/web + mkdir -p .debpkg/usr/sbin + mkdir -p .debpkg/etc/meshtasticd + mkdir -p .debpkg/usr/lib/systemd/system/ + tar -xf build.tar -C .debpkg/usr/share/doc/meshtasticd/web + gunzip .debpkg/usr/share/doc/meshtasticd/web/*.gz + cp release/meshtasticd_linux_x86_64 .debpkg/usr/sbin/meshtasticd + cp bin/config-dist.yaml .debpkg/etc/meshtasticd/config.yaml + chmod +x .debpkg/usr/sbin/meshtasticd + cp bin/meshtasticd.service .debpkg/usr/lib/systemd/system/meshtasticd.service + echo "/etc/meshtasticd/config.yaml" > .debpkg/DEBIAN/conffiles + chmod +x .debpkg/DEBIAN/conffiles + + - uses: jiro4989/build-deb-action@v3 + with: + package: meshtasticd + package_root: .debpkg + maintainer: Jonathan Bennett + version: ${{ steps.version.outputs.version }} # refs/tags/v*.*.* + arch: amd64 + depends: libyaml-cpp0.7, openssl, libulfius2.7 + desc: Native Linux Meshtastic binary. + + - uses: actions/upload-artifact@v4 + with: + name: meshtasticd_${{ steps.version.outputs.version }}_amd64.deb + overwrite: true + path: | + ./*.deb diff --git a/.github/workflows/package_raspbian.yml b/.github/workflows/package_raspbian.yml index 2f9a99e58..bcbda53e2 100644 --- a/.github/workflows/package_raspbian.yml +++ b/.github/workflows/package_raspbian.yml @@ -13,37 +13,52 @@ jobs: uses: ./.github/workflows/build_raspbian.yml package-raspbian: - runs-on: ubuntu-latest + runs-on: ubuntu-22.04 needs: build-raspbian steps: - name: Checkout code - uses: actions/checkout@v3 + uses: actions/checkout@v4 with: submodules: recursive ref: ${{github.event.pull_request.head.ref}} repository: ${{github.event.pull_request.head.repo.full_name}} + - name: Pull web ui + uses: dsaltares/fetch-gh-release-asset@master + with: + repo: meshtastic/web + file: build.tar + target: build.tar + token: ${{ secrets.GITHUB_TOKEN }} + - name: Get release version string run: echo "version=$(./bin/buildinfo.py long)" >> $GITHUB_OUTPUT id: version - name: Download artifacts - uses: actions/download-artifact@v3 + uses: actions/download-artifact@v4 with: name: firmware-raspbian-${{ steps.version.outputs.version }}.zip + merge-multiple: true - name: Display structure of downloaded files run: ls -R - name: build .debpkg run: | + mkdir -p .debpkg/DEBIAN + mkdir -p .debpkg/usr/share/doc/meshtasticd/web mkdir -p .debpkg/usr/sbin mkdir -p .debpkg/etc/meshtasticd mkdir -p .debpkg/usr/lib/systemd/system/ + tar -xf build.tar -C .debpkg/usr/share/doc/meshtasticd/web + gunzip .debpkg/usr/share/doc/meshtasticd/web/*.gz cp release/meshtasticd_linux_aarch64 .debpkg/usr/sbin/meshtasticd cp bin/config-dist.yaml .debpkg/etc/meshtasticd/config.yaml chmod +x .debpkg/usr/sbin/meshtasticd cp bin/meshtasticd.service .debpkg/usr/lib/systemd/system/meshtasticd.service + echo "/etc/meshtasticd/config.yaml" > .debpkg/DEBIAN/conffiles + chmod +x .debpkg/DEBIAN/conffiles - uses: jiro4989/build-deb-action@v3 with: @@ -52,11 +67,12 @@ jobs: maintainer: Jonathan Bennett version: ${{ steps.version.outputs.version }} # refs/tags/v*.*.* arch: arm64 - depends: libyaml-cpp0.7 + depends: libyaml-cpp0.7, openssl, libulfius2.7 desc: Native Linux Meshtastic binary. - - uses: actions/upload-artifact@v3 + - uses: actions/upload-artifact@v4 with: - name: artifact-deb + name: meshtasticd_${{ steps.version.outputs.version }}_arm64.deb + overwrite: true path: | ./*.deb diff --git a/.github/workflows/package_raspbian_armv7l.yml b/.github/workflows/package_raspbian_armv7l.yml new file mode 100644 index 000000000..1308fe925 --- /dev/null +++ b/.github/workflows/package_raspbian_armv7l.yml @@ -0,0 +1,78 @@ +name: Package Raspbian + +on: + workflow_call: + workflow_dispatch: + +permissions: + contents: write + packages: write + +jobs: + build-raspbian_armv7l: + uses: ./.github/workflows/build_raspbian_armv7l.yml + + package-raspbian_armv7l: + runs-on: ubuntu-22.04 + needs: build-raspbian_armv7l + steps: + - name: Checkout code + uses: actions/checkout@v4 + with: + submodules: recursive + ref: ${{github.event.pull_request.head.ref}} + repository: ${{github.event.pull_request.head.repo.full_name}} + + - name: Pull web ui + uses: dsaltares/fetch-gh-release-asset@master + with: + repo: meshtastic/web + file: build.tar + target: build.tar + token: ${{ secrets.GITHUB_TOKEN }} + + - name: Get release version string + run: echo "version=$(./bin/buildinfo.py long)" >> $GITHUB_OUTPUT + id: version + + - name: Download artifacts + uses: actions/download-artifact@v4 + with: + name: firmware-raspbian-armv7l-${{ steps.version.outputs.version }}.zip + merge-multiple: true + + - name: Display structure of downloaded files + run: ls -R + + - name: build .debpkg + run: | + mkdir -p .debpkg/DEBIAN + mkdir -p .debpkg/usr/share/doc/meshtasticd/web + mkdir -p .debpkg/usr/sbin + mkdir -p .debpkg/etc/meshtasticd + mkdir -p .debpkg/usr/lib/systemd/system/ + tar -xf build.tar -C .debpkg/usr/share/doc/meshtasticd/web + gunzip .debpkg/usr/share/doc/meshtasticd/web/*.gz + cp release/meshtasticd_linux_armv7l .debpkg/usr/sbin/meshtasticd + cp bin/config-dist.yaml .debpkg/etc/meshtasticd/config.yaml + chmod +x .debpkg/usr/sbin/meshtasticd + cp bin/meshtasticd.service .debpkg/usr/lib/systemd/system/meshtasticd.service + echo "/etc/meshtasticd/config.yaml" > .debpkg/DEBIAN/conffiles + chmod +x .debpkg/DEBIAN/conffiles + + - uses: jiro4989/build-deb-action@v3 + with: + package: meshtasticd + package_root: .debpkg + maintainer: Jonathan Bennett + version: ${{ steps.version.outputs.version }} # refs/tags/v*.*.* + arch: armhf + depends: libyaml-cpp0.7, openssl, libulfius2.7 + desc: Native Linux Meshtastic binary. + + - uses: actions/upload-artifact@v4 + with: + name: meshtasticd_${{ steps.version.outputs.version }}_armhf.deb + overwrite: true + path: | + ./*.deb diff --git a/.github/workflows/sec_sast_flawfinder.yml b/.github/workflows/sec_sast_flawfinder.yml index 2c7e751af..99cc72190 100644 --- a/.github/workflows/sec_sast_flawfinder.yml +++ b/.github/workflows/sec_sast_flawfinder.yml @@ -16,7 +16,7 @@ jobs: steps: # step 1 - name: clone application source code - uses: actions/checkout@v3 + uses: actions/checkout@v4 # step 2 - name: flawfinder_scan @@ -27,14 +27,15 @@ jobs: # step 3 - name: save report as pipeline artifact - uses: actions/upload-artifact@v3 + uses: actions/upload-artifact@v4 with: name: flawfinder_report.sarif + overwrite: true path: flawfinder_report.sarif # step 4 - name: publish code scanning alerts - uses: github/codeql-action/upload-sarif@v2 + uses: github/codeql-action/upload-sarif@v3 with: sarif_file: flawfinder_report.sarif category: flawfinder diff --git a/.github/workflows/sec_sast_semgrep_cron.yml b/.github/workflows/sec_sast_semgrep_cron.yml index cdd2c3c37..54bbbe6d2 100644 --- a/.github/workflows/sec_sast_semgrep_cron.yml +++ b/.github/workflows/sec_sast_semgrep_cron.yml @@ -12,12 +12,12 @@ jobs: semgrep-full: runs-on: ubuntu-latest container: - image: returntocorp/semgrep + image: semgrep/semgrep steps: # step 1 - name: clone application source code - uses: actions/checkout@v3 + uses: actions/checkout@v4 # step 2 - name: full scan @@ -29,14 +29,15 @@ jobs: # step 3 - name: save report as pipeline artifact - uses: actions/upload-artifact@v3 + uses: actions/upload-artifact@v4 with: name: report.sarif + overwrite: true path: report.sarif # step 4 - name: publish code scanning alerts - uses: github/codeql-action/upload-sarif@v2 + uses: github/codeql-action/upload-sarif@v3 with: sarif_file: report.sarif category: semgrep diff --git a/.github/workflows/sec_sast_semgrep_pull.yml b/.github/workflows/sec_sast_semgrep_pull.yml index 1697ffb1b..9013f1c74 100644 --- a/.github/workflows/sec_sast_semgrep_pull.yml +++ b/.github/workflows/sec_sast_semgrep_pull.yml @@ -4,14 +4,14 @@ on: pull_request jobs: semgrep-diff: - runs-on: ubuntu-latest + runs-on: ubuntu-22.04 container: - image: returntocorp/semgrep + image: semgrep/semgrep steps: # step 1 - name: clone application source code - uses: actions/checkout@v3 + uses: actions/checkout@v4 with: fetch-depth: 0 diff --git a/.github/workflows/tests.yml b/.github/workflows/tests.yml new file mode 100644 index 000000000..241598fd0 --- /dev/null +++ b/.github/workflows/tests.yml @@ -0,0 +1,106 @@ +name: End to end tests + +on: + schedule: + - cron: "0 0 * * *" # Run every day at midnight + workflow_dispatch: {} + +jobs: + test-simulator: + runs-on: ubuntu-latest + steps: + - name: Install libbluetooth + shell: bash + run: | + sudo apt-get update --fix-missing + sudo apt-get install -y libbluetooth-dev libgpiod-dev libyaml-cpp-dev openssl libssl-dev libulfius-dev liborcania-dev + + - name: Checkout code + uses: actions/checkout@v4 + with: + submodules: recursive + + - name: Upgrade python tools + shell: bash + run: | + python -m pip install --upgrade pip + pip install -U platformio adafruit-nrfutil + pip install -U meshtastic --pre + + - name: Upgrade platformio + shell: bash + run: | + pio upgrade + + - name: Build Native + run: bin/build-native.sh + + # We now run integration test before other build steps (to quickly see runtime failures) + - name: Build for native + run: platformio run -e native + + - name: Integration test + run: | + .pio/build/native/program & sleep 10 # 5 seconds was not enough + echo "Simulator started, launching python test..." + python3 -c 'from meshtastic.test import testSimulator; testSimulator()' + + - name: PlatformIO Tests + run: platformio test -e native --junit-output-path testreport.xml + + - name: Test Report + uses: dorny/test-reporter@v1.9.1 + if: success() || failure() # run this step even if previous step failed + with: + name: PlatformIO Tests + path: testreport.xml + reporter: java-junit + + hardware-tests: + runs-on: test-runner + steps: + - name: Checkout code + uses: actions/checkout@v4 + + # - uses: actions/setup-python@v5 + # with: + # python-version: '3.10' + + # pipx install "setuptools<72" + - name: Upgrade python tools + shell: bash + run: | + pipx install adafruit-nrfutil + pipx install poetry + pipx install meshtastic --pip-args=--pre + + - name: Install PlatformIO from script + shell: bash + run: | + curl -fsSL -o get-platformio.py https://raw.githubusercontent.com/platformio/platformio-core-installer/master/get-platformio.py + python3 get-platformio.py + + - name: Upgrade platformio + shell: bash + run: | + export PATH=$PATH:$HOME/.local/bin + pio upgrade + + - name: Setup Node + uses: actions/setup-node@v4 + with: + node-version: 18 + + - name: Setup pnpm + uses: pnpm/action-setup@v4 + with: + version: latest + + - name: Install dependencies, setup devices and run + shell: bash + run: | + git submodule update --init --recursive + cd meshtestic/ + pnpm install + pnpm run setup + pnpm run test diff --git a/.github/workflows/trunk-check.yml b/.github/workflows/trunk-check.yml index e35b91cb9..6ed905bc8 100644 --- a/.github/workflows/trunk-check.yml +++ b/.github/workflows/trunk-check.yml @@ -16,7 +16,7 @@ jobs: steps: - name: Checkout - uses: actions/checkout@v3 + uses: actions/checkout@v4 - name: Trunk Check uses: trunk-io/trunk-action@v1 diff --git a/.github/workflows/update_protobufs.yml b/.github/workflows/update_protobufs.yml index 6944d827e..f1c92b860 100644 --- a/.github/workflows/update_protobufs.yml +++ b/.github/workflows/update_protobufs.yml @@ -1,4 +1,4 @@ -name: "Update protobufs and regenerate classes" +name: Update protobufs and regenerate classes on: workflow_dispatch jobs: @@ -7,7 +7,7 @@ jobs: steps: - name: Checkout code - uses: actions/checkout@v3 + uses: actions/checkout@v4 with: submodules: true @@ -17,17 +17,18 @@ jobs: - name: Download nanopb run: | - wget https://jpa.kapsi.fi/nanopb/download/nanopb-0.4.7-linux-x86.tar.gz - tar xvzf nanopb-0.4.7-linux-x86.tar.gz - mv nanopb-0.4.7-linux-x86 nanopb-0.4.7 + wget https://jpa.kapsi.fi/nanopb/download/nanopb-0.4.9-linux-x86.tar.gz + tar xvzf nanopb-0.4.9-linux-x86.tar.gz + mv nanopb-0.4.9-linux-x86 nanopb-0.4.9 - name: Re-generate protocol buffers run: | ./bin/regen-protos.sh - name: Create pull request - uses: peter-evans/create-pull-request@v3 + uses: peter-evans/create-pull-request@v7 with: + title: Update protobufs and classes add-paths: | protobufs src/mesh diff --git a/.gitignore b/.gitignore index 89f8ee065..28f9a24cc 100644 --- a/.gitignore +++ b/.gitignore @@ -1,6 +1,4 @@ .pio -main/configuration.h -main/credentials.h # ignore vscode IDE settings files .vscode/* @@ -31,3 +29,5 @@ venv/ release/ .vscode/extensions.json /compile_commands.json +src/mesh/raspihttp/certificate.pem +src/mesh/raspihttp/private_key.pem diff --git a/.gitmodules b/.gitmodules index e6f376a0b..7c54ad513 100644 --- a/.gitmodules +++ b/.gitmodules @@ -1,3 +1,6 @@ [submodule "protobufs"] path = protobufs url = https://github.com/meshtastic/protobufs.git +[submodule "meshtestic"] + path = meshtestic + url = https://github.com/meshtastic/meshTestic diff --git a/.gitpod.yml b/.gitpod.yml new file mode 100644 index 000000000..0af235a3a --- /dev/null +++ b/.gitpod.yml @@ -0,0 +1,2 @@ +tasks: + - init: pip install platformio && pip install --upgrade pip diff --git a/.semgrepignore b/.semgrepignore index 10fcb5f75..b4267ad23 100644 --- a/.semgrepignore +++ b/.semgrepignore @@ -1,2 +1,2 @@ .github/workflows/main_matrix.yml -src/mesh/compression/unishox2.c +src/mesh/compression/unishox2.cpp diff --git a/.trunk/.gitignore b/.trunk/.gitignore index 1e2465290..15966d087 100644 --- a/.trunk/.gitignore +++ b/.trunk/.gitignore @@ -6,3 +6,4 @@ plugins user_trunk.yaml user.yaml +tmp diff --git a/.trunk/configs/.bandit b/.trunk/configs/.bandit new file mode 100644 index 000000000..d286ded89 --- /dev/null +++ b/.trunk/configs/.bandit @@ -0,0 +1,2 @@ +[bandit] +skips = B101 \ No newline at end of file diff --git a/.trunk/trunk.yaml b/.trunk/trunk.yaml index 81a35f8f1..ea4045a16 100644 --- a/.trunk/trunk.yaml +++ b/.trunk/trunk.yaml @@ -1,34 +1,40 @@ version: 0.1 cli: - version: 1.17.2 + version: 1.22.6 plugins: sources: - id: trunk - ref: v1.3.0 + ref: v1.6.3 uri: https://github.com/trunk-io/plugins lint: enabled: - - bandit@1.7.5 - - checkov@3.1.9 - - terrascan@1.18.5 - - trivy@0.47.0 + - trufflehog@3.82.6 + - yamllint@1.35.1 + - bandit@1.7.10 + - checkov@3.2.256 + - terrascan@1.19.1 + - trivy@0.55.2 #- trufflehog@3.63.2-rc0 - - taplo@0.8.1 - - ruff@0.1.6 - - isort@5.12.0 - - markdownlint@0.37.0 - - oxipng@9.0.0 - - svgo@3.0.5 - - actionlint@1.6.26 - - flake8@6.1.0 + - taplo@0.9.3 + - ruff@0.6.8 + - isort@5.13.2 + - markdownlint@0.42.0 + - oxipng@9.1.2 + - svgo@3.3.2 + - actionlint@1.7.3 + - flake8@7.1.1 - hadolint@2.12.0 - shfmt@3.6.0 - - shellcheck@0.9.0 - - black@23.9.1 + - shellcheck@0.10.0 + - black@24.8.0 - git-diff-check - - gitleaks@8.18.1 + - gitleaks@8.20.0 - clang-format@16.0.3 - - prettier@3.1.0 + - prettier@3.3.3 + ignore: + - linters: [ALL] + paths: + - bin/** runtimes: enabled: - python@3.10.8 diff --git a/.vscode/extensions.json b/.vscode/extensions.json index 783791f0b..080e70d08 100644 --- a/.vscode/extensions.json +++ b/.vscode/extensions.json @@ -2,8 +2,9 @@ // See http://go.microsoft.com/fwlink/?LinkId=827846 // for the documentation about the extensions.json format "recommendations": [ - "ms-vscode.cpptools", - "platformio.platformio-ide", - "trunk.io" + "platformio.platformio-ide" ], -} \ No newline at end of file + "unwantedRecommendations": [ + "ms-vscode.cpptools-extension-pack" + ] +} diff --git a/.vscode/settings.json b/.vscode/settings.json index 03922dc72..bf9b82111 100644 --- a/.vscode/settings.json +++ b/.vscode/settings.json @@ -1,5 +1,11 @@ { "editor.formatOnSave": true, "editor.defaultFormatter": "trunk.io", - "trunk.enableWindows": true + "trunk.enableWindows": true, + "files.insertFinalNewline": false, + "files.trimFinalNewlines": false, + "cmake.configureOnOpen": false, + "[cpp]": { + "editor.defaultFormatter": "trunk.io" + } } diff --git a/CONTRIBUTING.md b/CONTRIBUTING.md new file mode 100644 index 000000000..f579a7fe0 --- /dev/null +++ b/CONTRIBUTING.md @@ -0,0 +1,47 @@ +# Contributing to Meshtastic Firmware + +We'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. + +## Important First Steps + +Before you begin, please: + +1. **Read our documentation**: Our [official documentation](https://meshtastic.org/docs/) is a crucial resource. It contains essential information about the project. + +2. **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/). + +3. Read our [Code of Conduct](https://meshtastic.org/docs/legal/conduct/) + +4. Join our [Discord community](https://discord.com/invite/ktMAKGBnBs) to connect with developers and other contributors to get help. + +## Getting Help and Discussing Ideas + +We encourage open communication and discussion before diving into code changes: + +1. **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. + +2. **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. + +3. **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. + +## Making Contributions + +> [!IMPORTANT] +> 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. + +1. Fork the repository +2. Create a new branch for your feature or bug fix +3. Make your changes +4. Test your changes thoroughly +5. Create a pull request with a clear description, using the provided template, of your changes. Be sure to enable "Allow edits from maintainers". + +## Coding Standards + +To ensure consistent code formatting across the project: + +1. Install the [Trunk](https://marketplace.visualstudio.com/items?itemName=Trunk.io) extension for Visual Studio Code. +2. Before submitting your changes, run `trunk fmt` to automatically format your code according to our standards. + +Adhering to these formatting guidelines helps maintain code consistency and makes the review process smoother. + +Thank you for contributing to Meshtastic! diff --git a/Dockerfile b/Dockerfile index 21e42ad87..fc34fbd4c 100644 --- a/Dockerfile +++ b/Dockerfile @@ -1,4 +1,4 @@ -FROM debian:bullseye-slim AS builder +FROM debian:bookworm-slim AS builder ENV DEBIAN_FRONTEND=noninteractive ENV TZ=Etc/UTC @@ -7,35 +7,48 @@ ENV TZ=Etc/UTC # > At the moment, setting "LANG=C" on a Linux system *fundamentally breaks Python 3*, and that's not OK. ENV LANG C.UTF-8 -SHELL ["/bin/bash", "-o", "pipefail", "-c"] - # Install build deps USER root -RUN apt-get update && \ - apt-get -y install wget python3 g++ zip python3-venv git vim ca-certificates libgpiod-dev libyaml-cpp-dev libbluetooth-dev -# create a non-priveleged user & group +# trunk-ignore(terrascan/AC_DOCKER_0002): Known terrascan issue +# trunk-ignore(hadolint/DL3008): Use latest version of packages for buildchain +RUN apt-get update && apt-get install --no-install-recommends -y wget python3 python3-pip python3-wheel python3-venv g++ zip git \ + ca-certificates libgpiod-dev libyaml-cpp-dev libbluetooth-dev \ + libulfius-dev liborcania-dev libssl-dev pkg-config && \ + apt-get clean && rm -rf /var/lib/apt/lists/* && mkdir /tmp/firmware + +RUN groupadd -g 1000 mesh && useradd -ml -u 1000 -g 1000 mesh && chown mesh:mesh /tmp/firmware +USER mesh + +WORKDIR /tmp/firmware +RUN python3 -m venv /tmp/firmware +RUN bash -o pipefail -c "source bin/activate; pip3 install --no-cache-dir -U platformio==6.1.15" +# trunk-ignore(terrascan/AC_DOCKER_00024): We would actually like these files to be owned by mesh tyvm +COPY --chown=mesh:mesh . /tmp/firmware +RUN bash -o pipefail -c "source ./bin/activate && bash ./bin/build-native.sh" +RUN cp "/tmp/firmware/release/meshtasticd_linux_$(uname -m)" "/tmp/firmware/release/meshtasticd" + + +##### PRODUCTION BUILD ############# + +FROM debian:bookworm-slim +ENV DEBIAN_FRONTEND=noninteractive +ENV TZ=Etc/UTC + +# trunk-ignore(terrascan/AC_DOCKER_0002): Known terrascan issue +# trunk-ignore(hadolint/DL3008): Use latest version of packages for buildchain +RUN apt-get update && apt-get --no-install-recommends -y install libc-bin libc6 libgpiod2 libyaml-cpp0.7 libulfius2.7 liborcania2.3 libssl3 && \ + apt-get clean && rm -rf /var/lib/apt/lists/* + RUN groupadd -g 1000 mesh && useradd -ml -u 1000 -g 1000 mesh - USER mesh -RUN wget https://raw.githubusercontent.com/platformio/platformio-core-installer/master/get-platformio.py -qO /tmp/get-platformio.py && \ - chmod +x /tmp/get-platformio.py && \ - python3 /tmp/get-platformio.py && \ - git clone https://github.com/meshtastic/firmware --recurse-submodules /tmp/firmware && \ - cd /tmp/firmware && \ - chmod +x /tmp/firmware/bin/build-native.sh && \ - source ~/.platformio/penv/bin/activate && \ - ./bin/build-native.sh -FROM frolvlad/alpine-glibc:glibc-2.31 - -RUN apk --update add --no-cache g++ shadow && \ - groupadd -g 1000 mesh && useradd -ml -u 1000 -g 1000 mesh - -COPY --from=builder /tmp/firmware/release/meshtasticd_linux_x86_64 /home/mesh/ - -USER mesh WORKDIR /home/mesh -CMD sh -cx "./meshtasticd_linux_x86_64 --hwid '${HWID:-$RANDOM}'" +COPY --from=builder /tmp/firmware/release/meshtasticd /home/mesh/ -HEALTHCHECK NONE \ No newline at end of file +RUN mkdir data +VOLUME /home/mesh/data + +CMD [ "sh", "-cx", "./meshtasticd -d /home/mesh/data --hwid=${HWID:-$RANDOM}" ] + +HEALTHCHECK NONE diff --git a/SECURITY.md b/SECURITY.md new file mode 100644 index 000000000..fb4d9005a --- /dev/null +++ b/SECURITY.md @@ -0,0 +1,12 @@ +# Security Policy + +## Supported Versions + +| Firmware Version | Supported | +| ---------------- | ------------------ | +| 2.5.x | :white_check_mark: | +| <= 2.4.x | :x: | + +## Reporting a Vulnerability + +We 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. diff --git a/arch/esp32/esp32.ini b/arch/esp32/esp32.ini index bf84dd939..36d8b9542 100644 --- a/arch/esp32/esp32.ini +++ b/arch/esp32/esp32.ini @@ -1,10 +1,11 @@ ; Common settings for ESP targes, mixin with extends = esp32_base [esp32_base] extends = arduino_base -platform = platformio/espressif32@6.3.2 # This is a temporary fix to the S3-based devices bluetooth issues until we can determine what within ESP-IDF changed and can develop a suitable patch. +custom_esp32_kind = esp32 +platform = platformio/espressif32@6.9.0 build_src_filter = - ${arduino_base.build_src_filter} - - - - + ${arduino_base.build_src_filter} - - - - - upload_speed = 921600 debug_init_break = tbreak setup @@ -15,8 +16,10 @@ board_build.filesystem = littlefs # Remove -DMYNEWT_VAL_BLE_HS_LOG_LVL=LOG_LEVEL_CRITICAL for low level BLE logging. # See library directory for BLE logging possible values: .pio/libdeps/tbeam/NimBLE-Arduino/src/log_common/log_common.h # This overrides the BLE logging default of LOG_LEVEL_INFO (1) from: .pio/libdeps/tbeam/NimBLE-Arduino/src/esp_nimble_cfg.h +build_unflags = -fno-lto build_flags = ${arduino_base.build_flags} + -flto -Wall -Wextra -Isrc/platform/esp32 @@ -41,10 +44,11 @@ lib_deps = ${networking_base.lib_deps} ${environmental_base.lib_deps} https://github.com/meshtastic/esp32_https_server.git#23665b3adc080a311dcbb586ed5941b5f94d6ea2 - h2zero/NimBLE-Arduino@^1.4.1 + h2zero/NimBLE-Arduino@^1.4.2 https://github.com/dbSuS/libpax.git#7bcd3fcab75037505be9b122ab2b24cc5176b587 - https://github.com/lewisxhe/XPowersLib.git#84b7373faea3118b6c37954d52f98b8a337148d6 + lewisxhe/XPowersLib@^0.2.6 https://github.com/meshtastic/ESP32_Codec2.git#633326c78ac251c059ab3a8c430fcdf25b41672f + rweather/Crypto@^0.4.0 lib_ignore = segger_rtt diff --git a/arch/esp32/esp32c3.ini b/arch/esp32/esp32c3.ini index 619fdb28a..2ba3036d0 100644 --- a/arch/esp32/esp32c3.ini +++ b/arch/esp32/esp32c3.ini @@ -1,5 +1,6 @@ [esp32c3_base] extends = esp32_base +custom_esp32_kind = esp32c3 monitor_speed = 115200 monitor_filters = esp32_c3_exception_decoder diff --git a/arch/esp32/esp32c6.ini b/arch/esp32/esp32c6.ini new file mode 100644 index 000000000..53d7f92ec --- /dev/null +++ b/arch/esp32/esp32c6.ini @@ -0,0 +1,40 @@ +[esp32c6_base] +extends = esp32_base +platform = https://github.com/Jason2866/platform-espressif32.git#22faa566df8c789000f8136cd8d0aca49617af55 +build_flags = + ${arduino_base.build_flags} + -Wall + -Wextra + -Isrc/platform/esp32 + -std=c++11 + -DESP_OPENSSL_SUPPRESS_LEGACY_WARNING + -DSERIAL_BUFFER_SIZE=4096 + -DLIBPAX_ARDUINO + -DLIBPAX_WIFI + -DLIBPAX_BLE + -DMESHTASTIC_EXCLUDE_WEBSERVER + ;-DDEBUG_HEAP + ; TEMP + -DHAS_BLUETOOTH=0 + -DMESHTASTIC_EXCLUDE_PAXCOUNTER + -DMESHTASTIC_EXCLUDE_BLUETOOTH + +lib_deps = + ${arduino_base.lib_deps} + ${networking_base.lib_deps} + ${environmental_base.lib_deps} + lewisxhe/XPowersLib@^0.2.6 + https://github.com/meshtastic/ESP32_Codec2.git#633326c78ac251c059ab3a8c430fcdf25b41672f + rweather/Crypto@^0.4.0 + +build_src_filter = + ${esp32_base.build_src_filter} - + +monitor_speed = 460800 +monitor_filters = esp32_c3_exception_decoder + +lib_ignore = + NonBlockingRTTTL + NimBLE-Arduino + libpax + \ No newline at end of file diff --git a/arch/esp32/esp32s2.ini b/arch/esp32/esp32s2.ini index 3bde3465a..40fdc461a 100644 --- a/arch/esp32/esp32s2.ini +++ b/arch/esp32/esp32s2.ini @@ -1,16 +1,19 @@ [esp32s2_base] extends = esp32_base +custom_esp32_kind = esp32s2 build_src_filter = - ${esp32_base.build_src_filter} - + ${esp32_base.build_src_filter} - - - monitor_speed = 115200 build_flags = ${esp32_base.build_flags} -DHAS_BLUETOOTH=0 + -DMESHTASTIC_EXCLUDE_PAXCOUNTER + -DMESHTASTIC_EXCLUDE_BLUETOOTH lib_ignore = ${esp32_base.lib_ignore} NimBLE-Arduino - + libpax \ No newline at end of file diff --git a/arch/esp32/esp32s3.ini b/arch/esp32/esp32s3.ini index 6a1bdd3fd..1cd0e2033 100644 --- a/arch/esp32/esp32s3.ini +++ b/arch/esp32/esp32s3.ini @@ -1,5 +1,6 @@ [esp32s3_base] extends = esp32_base +custom_esp32_kind = esp32s3 monitor_speed = 115200 diff --git a/arch/nrf52/cpp_overrides/lfs_util.h b/arch/nrf52/cpp_overrides/lfs_util.h new file mode 100644 index 000000000..bf5a347b1 --- /dev/null +++ b/arch/nrf52/cpp_overrides/lfs_util.h @@ -0,0 +1,208 @@ +/* + * lfs utility functions + * + * Copyright (c) 2017, Arm Limited. All rights reserved. + * SPDX-License-Identifier: BSD-3-Clause + */ + +// MESHTASTIC/@geeksville note: This file is copied from the Adafruit nrf52 arduino lib. And we use a special -include in +// nrf52.ini to load it before EVERY file we do this hack because the default definitions for LFS_ASSERT are quite poor and we +// 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 +// 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 +// this is a copy from is almost exactly +// https://github.com/adafruit/Adafruit_nRF52_Arduino/blob/c25d93268a3b9c23e9a1ccfcaf9b208beca624ca/libraries/Adafruit_LittleFS/src/littlefs/lfs_util.h + +#ifndef LFS_UTIL_H +#define LFS_UTIL_H + +// Users can override lfs_util.h with their own configuration by defining +// LFS_CONFIG as a header file to include (-DLFS_CONFIG=lfs_config.h). +// +// If LFS_CONFIG is used, none of the default utils will be emitted and must be +// provided by the config file. To start I would suggest copying lfs_util.h and +// modifying as needed. +#ifdef LFS_CONFIG +#define LFS_STRINGIZE(x) LFS_STRINGIZE2(x) +#define LFS_STRINGIZE2(x) #x +#include LFS_STRINGIZE(LFS_CONFIG) +#else + +// System includes +#include +#include +#include + +#ifndef LFS_NO_MALLOC +#include +#endif +#ifndef LFS_NO_ASSERT +#include +#endif + +#if !defined(LFS_NO_DEBUG) || !defined(LFS_NO_WARN) || !defined(LFS_NO_ERROR) +#include +#endif + +#ifdef __cplusplus +extern "C" { +#endif + +// Macros, may be replaced by system specific wrappers. Arguments to these +// macros must not have side-effects as the macros can be removed for a smaller +// code footprint + +// Logging functions +#ifndef LFS_NO_DEBUG + +void logLegacy(const char *level, const char *fmt, ...); +#define LFS_DEBUG(fmt, ...) logLegacy("DEBUG", "lfs debug:%d: " fmt "\n", __LINE__, __VA_ARGS__) +#else +#define LFS_DEBUG(fmt, ...) +#endif + +#ifndef LFS_NO_WARN +#define LFS_WARN(fmt, ...) logLegacy("WARN", "lfs warn:%d: " fmt "\n", __LINE__, __VA_ARGS__) +#else +#define LFS_WARN(fmt, ...) +#endif + +#ifndef LFS_NO_ERROR +#define LFS_ERROR(fmt, ...) logLegacy("ERROR", "lfs error:%d: " fmt "\n", __LINE__, __VA_ARGS__) +#else +#define LFS_ERROR(fmt, ...) +#endif + +// Runtime assertions +#ifndef LFS_NO_ASSERT +#define LFS_ASSERT(test) assert(test) +#else +extern void lfs_assert(const char *reason); +#define LFS_ASSERT(test) \ + if (!(test)) \ + lfs_assert(#test) +#endif + +// Builtin functions, these may be replaced by more efficient +// toolchain-specific implementations. LFS_NO_INTRINSICS falls back to a more +// expensive basic C implementation for debugging purposes + +// Min/max functions for unsigned 32-bit numbers +static inline uint32_t lfs_max(uint32_t a, uint32_t b) +{ + return (a > b) ? a : b; +} + +static inline uint32_t lfs_min(uint32_t a, uint32_t b) +{ + return (a < b) ? a : b; +} + +// Find the next smallest power of 2 less than or equal to a +static inline uint32_t lfs_npw2(uint32_t a) +{ +#if !defined(LFS_NO_INTRINSICS) && (defined(__GNUC__) || defined(__CC_ARM)) + return 32 - __builtin_clz(a - 1); +#else + uint32_t r = 0; + uint32_t s; + a -= 1; + s = (a > 0xffff) << 4; + a >>= s; + r |= s; + s = (a > 0xff) << 3; + a >>= s; + r |= s; + s = (a > 0xf) << 2; + a >>= s; + r |= s; + s = (a > 0x3) << 1; + a >>= s; + r |= s; + return (r | (a >> 1)) + 1; +#endif +} + +// Count the number of trailing binary zeros in a +// lfs_ctz(0) may be undefined +static inline uint32_t lfs_ctz(uint32_t a) +{ +#if !defined(LFS_NO_INTRINSICS) && defined(__GNUC__) + return __builtin_ctz(a); +#else + return lfs_npw2((a & -a) + 1) - 1; +#endif +} + +// Count the number of binary ones in a +static inline uint32_t lfs_popc(uint32_t a) +{ +#if !defined(LFS_NO_INTRINSICS) && (defined(__GNUC__) || defined(__CC_ARM)) + return __builtin_popcount(a); +#else + a = a - ((a >> 1) & 0x55555555); + a = (a & 0x33333333) + ((a >> 2) & 0x33333333); + return (((a + (a >> 4)) & 0xf0f0f0f) * 0x1010101) >> 24; +#endif +} + +// Find the sequence comparison of a and b, this is the distance +// between a and b ignoring overflow +static inline int lfs_scmp(uint32_t a, uint32_t b) +{ + return (int)(unsigned)(a - b); +} + +// Convert from 32-bit little-endian to native order +static inline uint32_t lfs_fromle32(uint32_t a) +{ +#if !defined(LFS_NO_INTRINSICS) && ((defined(BYTE_ORDER) && BYTE_ORDER == ORDER_LITTLE_ENDIAN) || \ + (defined(__BYTE_ORDER) && __BYTE_ORDER == __ORDER_LITTLE_ENDIAN) || \ + (defined(__BYTE_ORDER__) && __BYTE_ORDER__ == __ORDER_LITTLE_ENDIAN__)) + return a; +#elif !defined(LFS_NO_INTRINSICS) && \ + ((defined(BYTE_ORDER) && BYTE_ORDER == ORDER_BIG_ENDIAN) || (defined(__BYTE_ORDER) && __BYTE_ORDER == __ORDER_BIG_ENDIAN) || \ + (defined(__BYTE_ORDER__) && __BYTE_ORDER__ == __ORDER_BIG_ENDIAN__)) + return __builtin_bswap32(a); +#else + return (((uint8_t *)&a)[0] << 0) | (((uint8_t *)&a)[1] << 8) | (((uint8_t *)&a)[2] << 16) | (((uint8_t *)&a)[3] << 24); +#endif +} + +// Convert to 32-bit little-endian from native order +static inline uint32_t lfs_tole32(uint32_t a) +{ + return lfs_fromle32(a); +} + +// Calculate CRC-32 with polynomial = 0x04c11db7 +void lfs_crc(uint32_t *crc, const void *buffer, size_t size); + +// Allocate memory, only used if buffers are not provided to littlefs +static inline void *lfs_malloc(size_t size) +{ +#ifndef LFS_NO_MALLOC + extern void *pvPortMalloc(size_t xWantedSize); + return pvPortMalloc(size); +#else + (void)size; + return NULL; +#endif +} + +// Deallocate memory, only used if buffers are not provided to littlefs +static inline void lfs_free(void *p) +{ +#ifndef LFS_NO_MALLOC + extern void vPortFree(void *pv); + vPortFree(p); +#else + (void)p; +#endif +} + +#ifdef __cplusplus +} /* extern "C" */ +#endif + +#endif +#endif \ No newline at end of file diff --git a/arch/nrf52/nrf52.ini b/arch/nrf52/nrf52.ini index 04ca89a54..04880d540 100644 --- a/arch/nrf52/nrf52.ini +++ b/arch/nrf52/nrf52.ini @@ -1,20 +1,26 @@ [nrf52_base] ; Instead of the standard nordicnrf52 platform, we use our fork which has our added variant files -platform = platformio/nordicnrf52@^10.1.0 +platform = platformio/nordicnrf52@^10.5.0 extends = arduino_base +platform_packages = + ; our custom Git version until they merge our PR + framework-arduinoadafruitnrf52 @ https://github.com/geeksville/Adafruit_nRF52_Arduino.git -build_type = debug ; I'm debugging with ICE a lot now -build_flags = +build_type = debug +build_flags = + -include arch/nrf52/cpp_overrides/lfs_util.h ${arduino_base.build_flags} -DSERIAL_BUFFER_SIZE=1024 -Wno-unused-variable -Isrc/platform/nrf52 + -DLFS_NO_ASSERT ; Disable LFS assertions , see https://github.com/meshtastic/firmware/pull/3818 build_src_filter = - ${arduino_base.build_src_filter} - - - - - - - - - + ${arduino_base.build_src_filter} - - - - - - - - - - lib_deps= ${arduino_base.lib_deps} + rweather/Crypto@^0.4.0 lib_ignore = BluetoothOTA \ No newline at end of file diff --git a/arch/nrf52/nrf52840.ini b/arch/nrf52/nrf52840.ini index cf08fd02e..a13a600f3 100644 --- a/arch/nrf52/nrf52840.ini +++ b/arch/nrf52/nrf52840.ini @@ -7,3 +7,72 @@ lib_deps = ${nrf52_base.lib_deps} ${environmental_base.lib_deps} https://github.com/Kongduino/Adafruit_nRFCrypto.git#e31a8825ea3300b163a0a3c1ddd5de34e10e1371 + +; Common NRF52 debugging settings follow. See the Meshtastic developer docs for how to connect SWD debugging probes to your board. + +; We want the initial breakpoint at setup() instead of main(). Also we want to enable semihosting at that point so instead of +debug_init_break = tbreak setup +; we just turn off the platformio tbreak and do it in .gdbinit (where we have more flexibility for scripting) +; also we use a permanent breakpoint so it gets reused each time we restart the debugging session? +; debug_init_break = tbreak main + +; Note: add "monitor arm semihosting_redirect tcp 4444 all" if you want the stdout from the device to go to that port number instead +; (for use by meshtastic command line) +; monitor arm semihosting disable +; monitor debug_level 3 +; +; 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 +; for stdio access. +; monitor arm semihosting_redirect tcp 5555 stdio + +; Also note: it is _impossible_ to do non blocking reads on the semihost console port (an oversight when ARM specified the semihost API). +; So we'll neve be able to general purpose bi-directional communication with the device over semihosting. +debug_extra_cmds = + echo Running .gdbinit script + ;monitor arm semihosting enable + ;monitor arm semihosting_fileio enable + ;monitor arm semihosting_redirect disable + commands 1 + ; echo Breakpoint at setup() has semihosting console, connect to it with "telnet localhost 5555" + ; set wantSemihost = 1 + set useSoftDevice = 0 + end + + ; Only reprogram the board if the code has changed +debug_load_mode = modified +;debug_load_mode = manual +; We default to the stlink adapter because it is very cheap and works well, though others (such as jlink) are also supported. +;debug_tool = jlink +debug_tool = stlink +debug_speed = 4000 +;debug_tool = custom +; debug_server = +; openocd +; -f +; /usr/local/share/openocd/scripts/interface/stlink.cfg +; -f +; /usr/local/share/openocd/scripts/target/nrf52.cfg +; $PLATFORMIO_CORE_DIR/packages/tool-openocd/openocd/scripts/interface/cmsis-dap.cfg + +; Allows programming and debug via the RAK NanoDAP as the default debugger tool for the RAK4631 (it is only $10!) +; programming time is about the same as the bootloader version. +; For information on this see the meshtastic developers documentation for "Development on the NRF52" +; We manually pass in the elf file so that pyocd can reverse engineer FreeRTOS data (running threads, etc...) +;debug_server = +; pyocd +; gdbserver +; -j +; ${platformio.workspace_dir}/.. +; -t +; nrf52840 +; --semihosting +; --elf +; ${platformio.build_dir}/${this.__env__}/firmware.elf + +; If you want to debug the semihosting support you can turn on extra logging in pyocd with +; -L +; pyocd.debug.semihost.trace=debug + +; The following is not needed because it automatically tries do this +;debug_server_ready_pattern = -.*GDB server started on port \d+.* +;debug_port = localhost:3333 \ No newline at end of file diff --git a/arch/portduino/portduino.ini b/arch/portduino/portduino.ini index 0dcc9afc2..8778c32a0 100644 --- a/arch/portduino/portduino.ini +++ b/arch/portduino/portduino.ini @@ -1,6 +1,6 @@ ; The Portduino based sim environment on top of any host OS, all hardware will be simulated [portduino_base] -platform = https://github.com/meshtastic/platform-native.git#a28dd5a9ccd5c48a9bede46037855ff83915d74b +platform = https://github.com/meshtastic/platform-native.git#6b3796d697481c8f6e3f4aa5c111bd9979f29e64 framework = arduino build_src_filter = @@ -9,9 +9,10 @@ build_src_filter = - - - - - + - - - + + - - - @@ -23,7 +24,7 @@ lib_deps = ${env.lib_deps} ${networking_base.lib_deps} rweather/Crypto@^0.4.0 - lovyan03/LovyanGFX@^1.1.12 + lovyan03/LovyanGFX@^1.1.16 build_flags = ${arduino_base.build_flags} @@ -33,4 +34,4 @@ build_flags = -DPORTDUINO_LINUX_HARDWARE -lbluetooth -lgpiod - -lyaml-cpp \ No newline at end of file + -lyaml-cpp diff --git a/arch/rp2xx0/rp2040.ini b/arch/rp2xx0/rp2040.ini new file mode 100644 index 000000000..c004a3bec --- /dev/null +++ b/arch/rp2xx0/rp2040.ini @@ -0,0 +1,25 @@ +; Common settings for rp2040 Processor based targets +[rp2040_base] +platform = https://github.com/maxgerhardt/platform-raspberrypi.git#v1.2.0-gcc12 +extends = arduino_base +platform_packages = framework-arduinopico@https://github.com/earlephilhower/arduino-pico.git#4.0.3 + +board_build.core = earlephilhower +board_build.filesystem_size = 0.5m +build_flags = + ${arduino_base.build_flags} -Wno-unused-variable -Wcast-align + -Isrc/platform/rp2xx0 + -Isrc/platform/rp2xx0/hardware_rosc/include + -Isrc/platform/rp2xx0/pico_sleep/include + -D__PLAT_RP2040__ +# -D _POSIX_THREADS +build_src_filter = + ${arduino_base.build_src_filter} - - - - - - - - - + +lib_ignore = + BluetoothOTA + +lib_deps = + ${arduino_base.lib_deps} + ${environmental_base.lib_deps} + rweather/Crypto \ No newline at end of file diff --git a/arch/rp2040/rp2040.ini b/arch/rp2xx0/rp2350.ini similarity index 75% rename from arch/rp2040/rp2040.ini rename to arch/rp2xx0/rp2350.ini index 48fe0dae6..96ed0cb21 100644 --- a/arch/rp2040/rp2040.ini +++ b/arch/rp2xx0/rp2350.ini @@ -1,18 +1,18 @@ ; Common settings for rp2040 Processor based targets -[rp2040_base] -platform = https://github.com/maxgerhardt/platform-raspberrypi.git#612de5399d68b359053f1307ed223d400aea975c +[rp2350_base] +platform = https://github.com/maxgerhardt/platform-raspberrypi.git#9e55f6db5c56b9867c69fe473f388beea4546672 extends = arduino_base -platform_packages = framework-arduinopico@https://github.com/earlephilhower/arduino-pico.git#3.6.2 +platform_packages = framework-arduinopico@https://github.com/earlephilhower/arduino-pico.git#a6ab6e1f95bc1428d667d55ea7173c0744acc03c ; 4.0.2+ board_build.core = earlephilhower board_build.filesystem_size = 0.5m build_flags = ${arduino_base.build_flags} -Wno-unused-variable - -Isrc/platform/rp2040 + -Isrc/platform/rp2xx0 -D__PLAT_RP2040__ # -D _POSIX_THREADS build_src_filter = - ${arduino_base.build_src_filter} - - - - - - - - + ${arduino_base.build_src_filter} - - - - - - - - - lib_ignore = BluetoothOTA diff --git a/arch/stm32/stm32.ini b/arch/stm32/stm32.ini new file mode 100644 index 000000000..715e8aa73 --- /dev/null +++ b/arch/stm32/stm32.ini @@ -0,0 +1,37 @@ +[stm32_base] +extends = arduino_base +platform = ststm32 +platform_packages = platformio/framework-arduinoststm32@https://github.com/stm32duino/Arduino_Core_STM32.git#ea74156acd823b6d14739f389e6cdc648f8ee36e + +build_type = release + +;board_build.flash_offset = 0x08000000 + +build_flags = + ${arduino_base.build_flags} + -flto + -Isrc/platform/stm32wl -g + -DMESHTASTIC_MINIMIZE_BUILD + -DMESHTASTIC_EXCLUDE_GPS + -DDEBUG_MUTE +; -DVECT_TAB_OFFSET=0x08000000 + -DconfigUSE_CMSIS_RTOS_V2=1 +; -DSPI_MODE_0=SPI_MODE0 + -fmerge-all-constants + -ffunction-sections + -fdata-sections + +build_src_filter = + ${arduino_base.build_src_filter} - - - - - - - - - - - - - - + +board_upload.offset_address = 0x08000000 +upload_protocol = stlink + +lib_deps = + ${env.lib_deps} + charlesbaynham/OSFS@^1.2.3 + https://github.com/caveman99/Crypto.git#f61ae26a53f7a2d0ba5511625b8bf8eff3a35d5e + +lib_ignore = + mathertel/OneButton@~2.6.1 + Wire \ No newline at end of file diff --git a/arch/stm32/stm32wl5e.ini b/arch/stm32/stm32wl5e.ini deleted file mode 100644 index 4483ff526..000000000 --- a/arch/stm32/stm32wl5e.ini +++ /dev/null @@ -1,28 +0,0 @@ -[stm32wl5e_base] -platform_packages = platformio/framework-arduinoststm32 @ https://github.com/stm32duino/Arduino_Core_STM32.git#6e3f9910d0122e82a6c3438507dfac3d2fd80a39 -platform = ststm32 -board = generic_wl5e -framework = arduino - -build_type = debug - -build_flags = - ${arduino_base.build_flags} - -Isrc/platform/stm32wl -g - -DconfigUSE_CMSIS_RTOS_V2=1 - -DVECT_TAB_OFFSET=0x08000000 - -build_src_filter = - ${arduino_base.build_src_filter} - - - - - - - - - - - - - - -board_upload.offset_address = 0x08000000 -upload_protocol = stlink - -lib_deps = - ${env.lib_deps} - https://github.com/kokke/tiny-AES-c.git#f06ac37fc31dfdaca2e0d9bec83f90d5663c319b - https://github.com/littlefs-project/littlefs.git#v2.5.1 - https://github.com/stm32duino/STM32FreeRTOS.git#10.3.1 - -lib_ignore = - mathertel/OneButton \ No newline at end of file diff --git a/bin/Meshtastic_nRF52_factory_erase_v2.uf2 b/bin/Meshtastic_nRF52_factory_erase_v2.uf2 deleted file mode 100644 index 8a83bc8ec..000000000 Binary files a/bin/Meshtastic_nRF52_factory_erase_v2.uf2 and /dev/null differ diff --git a/bin/Meshtastic_nRF52_factory_erase_v3_S140_6.1.0.uf2 b/bin/Meshtastic_nRF52_factory_erase_v3_S140_6.1.0.uf2 new file mode 100644 index 000000000..e44d9da2a Binary files /dev/null and b/bin/Meshtastic_nRF52_factory_erase_v3_S140_6.1.0.uf2 differ diff --git a/bin/Meshtastic_nRF52_factory_erase_v3_S140_7.3.0.uf2 b/bin/Meshtastic_nRF52_factory_erase_v3_S140_7.3.0.uf2 new file mode 100644 index 000000000..73537a735 Binary files /dev/null and b/bin/Meshtastic_nRF52_factory_erase_v3_S140_7.3.0.uf2 differ diff --git a/bin/build-esp32.sh b/bin/build-esp32.sh index f60331ed5..adb6ab12a 100755 --- a/bin/build-esp32.sh +++ b/bin/build-esp32.sh @@ -11,7 +11,7 @@ rm -f $OUTDIR/firmware* rm -r $OUTDIR/* || true # Important to pull latest version of libs into all device flavors, otherwise some devices might be stale -platformio pkg update +platformio pkg update -e $1 echo "Building for $1 with $PLATFORMIO_BUILD_FLAGS" rm -f .pio/build/$1/firmware.* diff --git a/bin/build-native.sh b/bin/build-native.sh index 7e9fcb632..e8ed61bcf 100755 --- a/bin/build-native.sh +++ b/bin/build-native.sh @@ -2,6 +2,17 @@ set -e +platformioFailed() { + [[ $VIRTUAL_ENV != "" ]] && exit 1 # don't hint at virtualenv if it's already in use + echo -e "\nThere were issues running platformio and you are not using a virtual environment." \ + "\nYou may try setting up virtualenv and downloading the latest platformio from pip:" \ + "\n\tvirtualenv venv" \ + "\n\tsource venv/bin/activate" \ + "\n\tpip install platformio" \ + "\n\t./bin/build-native.sh # retry building" + exit 1 +} + VERSION=$(bin/buildinfo.py long) SHORT_VERSION=$(bin/buildinfo.py short) @@ -13,8 +24,8 @@ mkdir -p $OUTDIR/ rm -r $OUTDIR/* || true # Important to pull latest version of libs into all device flavors, otherwise some devices might be stale -platformio pkg update -pio run --environment native -cp .pio/build/native/program "$OUTDIR/meshtasticd_linux_$(arch)" +platformio pkg update --environment native || platformioFailed +pio run --environment native || platformioFailed +cp .pio/build/native/program "$OUTDIR/meshtasticd_linux_$(uname -m)" cp bin/device-install.* $OUTDIR cp bin/device-update.* $OUTDIR diff --git a/bin/build-nrf52.sh b/bin/build-nrf52.sh index a9980f486..9d0b3dfdd 100755 --- a/bin/build-nrf52.sh +++ b/bin/build-nrf52.sh @@ -2,8 +2,8 @@ set -e -VERSION=`bin/buildinfo.py long` -SHORT_VERSION=`bin/buildinfo.py short` +VERSION=$(bin/buildinfo.py long) +SHORT_VERSION=$(bin/buildinfo.py short) OUTDIR=release/ @@ -11,7 +11,7 @@ rm -f $OUTDIR/firmware* rm -r $OUTDIR/* || true # Important to pull latest version of libs into all device flavors, otherwise some devices might be stale -platformio pkg update +platformio pkg update -e $1 echo "Building for $1 with $PLATFORMIO_BUILD_FLAGS" rm -f .pio/build/$1/firmware.* @@ -23,14 +23,31 @@ basename=firmware-$1-$VERSION pio run --environment $1 # -v SRCELF=.pio/build/$1/firmware.elf -DFUPKG=.pio/build/$1/firmware.zip cp $SRCELF $OUTDIR/$basename.elf + +echo "Generating NRF52 dfu file" +DFUPKG=.pio/build/$1/firmware.zip cp $DFUPKG $OUTDIR/$basename-ota.zip echo "Generating NRF52 uf2 file" SRCHEX=.pio/build/$1/firmware.hex -bin/uf2conv.py $SRCHEX -c -o $OUTDIR/$basename.uf2 -f 0xADA52840 -cp bin/device-install.* $OUTDIR -cp bin/device-update.* $OUTDIR -cp bin/*.uf2 $OUTDIR +# if WM1110 target, merge hex with softdevice 7.3.0 +if (echo $1 | grep -q "wio-sdk-wm1110"); then + echo "Merging with softdevice" + bin/mergehex -m bin/s140_nrf52_7.3.0_softdevice.hex $SRCHEX -o .pio/build/$1/$basename.hex + SRCHEX=.pio/build/$1/$basename.hex + bin/uf2conv.py $SRCHEX -c -o $OUTDIR/$basename.uf2 -f 0xADA52840 + cp $SRCHEX $OUTDIR + cp bin/*.uf2 $OUTDIR +else + bin/uf2conv.py $SRCHEX -c -o $OUTDIR/$basename.uf2 -f 0xADA52840 + cp bin/device-install.* $OUTDIR + cp bin/device-update.* $OUTDIR + cp bin/*.uf2 $OUTDIR +fi + +if (echo $1 | grep -q "rak4631"); then + echo "Copying hex file" + cp .pio/build/$1/firmware.hex $OUTDIR/$basename.hex +fi \ No newline at end of file diff --git a/bin/build-rpi2040.sh b/bin/build-rpi2040.sh index fe0725085..dad6a7e67 100755 --- a/bin/build-rpi2040.sh +++ b/bin/build-rpi2040.sh @@ -11,7 +11,7 @@ rm -f $OUTDIR/firmware* rm -r $OUTDIR/* || true # Important to pull latest version of libs into all device flavors, otherwise some devices might be stale -platformio pkg update +platformio pkg update -e $1 echo "Building for $1 with $PLATFORMIO_BUILD_FLAGS" rm -f .pio/build/$1/firmware.* diff --git a/bin/build-stm32.sh b/bin/build-stm32.sh new file mode 100755 index 000000000..76c5a75fb --- /dev/null +++ b/bin/build-stm32.sh @@ -0,0 +1,29 @@ +#!/usr/bin/env bash + +set -e + +VERSION=$(bin/buildinfo.py long) +SHORT_VERSION=$(bin/buildinfo.py short) + +OUTDIR=release/ + +rm -f $OUTDIR/firmware* +rm -r $OUTDIR/* || true + +# Important to pull latest version of libs into all device flavors, otherwise some devices might be stale +platformio pkg update -e $1 + +echo "Building for $1 with $PLATFORMIO_BUILD_FLAGS" +rm -f .pio/build/$1/firmware.* + +# The shell vars the build tool expects to find +export APP_VERSION=$VERSION + +basename=firmware-$1-$VERSION + +pio run --environment $1 # -v +SRCELF=.pio/build/$1/firmware.elf +cp $SRCELF $OUTDIR/$basename.elf + +SRCBIN=.pio/build/$1/firmware.bin +cp $SRCBIN $OUTDIR/$basename.bin diff --git a/bin/build-userprefs-json.py b/bin/build-userprefs-json.py new file mode 100644 index 000000000..58f460bcf --- /dev/null +++ b/bin/build-userprefs-json.py @@ -0,0 +1,48 @@ +import json +import subprocess +import re + +def get_macros_from_header(header_file): + # Run clang to preprocess the header file and capture the output + result = subprocess.run(['clang', '-E', '-dM', header_file], capture_output=True, text=True) + if result.returncode != 0: + raise RuntimeError(f"Clang preprocessing failed: {result.stderr}") + + # Extract macros from the output + macros = {} + macro_pattern = re.compile(r'#define\s+(\w+)\s+(.*)') + for line in result.stdout.splitlines(): + match = macro_pattern.match(line) + if match and 'USERPREFS_' in line and '_USERPREFS_' not in line: + macros[match.group(1)] = match.group(2) + + return macros + +def write_macros_to_json(macros, output_file): + with open(output_file, 'w') as f: + json.dump(macros, f, indent=4) + +def main(): + header_file = 'userPrefs.h' + output_file = 'userPrefs.json' + # Uncomment all macros in the header file + with open(header_file, 'r') as file: + lines = file.readlines() + + uncommented_lines = [] + for line in lines: + stripped_line = line.strip().replace('/*', '').replace('*/', '') + if stripped_line.startswith('//') and 'USERPREFS_' in stripped_line: + # Replace "//" + stripped_line = stripped_line.replace('//', '') + uncommented_lines.append(stripped_line + '\n') + + with open(header_file, 'w') as file: + for line in uncommented_lines: + file.write(line) + macros = get_macros_from_header(header_file) + write_macros_to_json(macros, output_file) + print(f"Macros have been written to {output_file}") + +if __name__ == "__main__": + main() \ No newline at end of file diff --git a/bin/buildinfo.py b/bin/buildinfo.py index 6b123c9cf..5aecad1bd 100755 --- a/bin/buildinfo.py +++ b/bin/buildinfo.py @@ -1,9 +1,8 @@ #!/usr/bin/env python3 -import configparser import sys + from readprops import readProps - -verObj = readProps('version.properties') +verObj = readProps("version.properties") propName = sys.argv[1] print(f"{verObj[propName]}") diff --git a/bin/config-dist.yaml b/bin/config-dist.yaml index b5b105e4c..3a470b7bb 100644 --- a/bin/config-dist.yaml +++ b/bin/config-dist.yaml @@ -1,5 +1,6 @@ ### Define your devices here using Broadcom pin numbering ### Uncomment the block that corresponds to your hardware +### Including the "Module:" line! --- Lora: # Module: sx1262 # Waveshare SX126X XXXM @@ -8,6 +9,7 @@ Lora: # IRQ: 16 # Busy: 20 # Reset: 18 +# SX126X_ANT_SW: 6 # Module: sx1262 # Waveshare SX1302 LISTEN ONLY AT THIS TIME! # CS: 7 @@ -37,11 +39,24 @@ Lora: # Busy: 20 # Reset: 18 +# Module: sx1268 # SX1268-based modules, tested with Ebyte E22 400M33S +# CS: 21 +# IRQ: 16 +# Busy: 20 +# Reset: 18 +# TXen: 6 +# RXen: 12 +# DIO3_TCXO_VOLTAGE: true + # DIO3_TCXO_VOLTAGE: true # the Waveshare Core1262 and others are known to need this setting # TXen: x # TX and RX enable pins # RXen: x +# ch341_quirk: true # Uncomment this to use the chunked SPI transfer that seems to fix the ch341 + +# spiSpeed: 2000000 + ### Set gpio chip to use in /dev/. Defaults to 0. ### Notably the Raspberry Pi 5 puts the GPIO header on gpiochip4 # gpiochip: 4 @@ -95,25 +110,48 @@ Display: # Panel: ILI9341 # CS: 8 # DC: 25 -# Backlight: 2 -# Width: 320 -# Height: 240 +# Width: 240 +# Height: 320 +# Rotate: true + +### You can also specify the spi device for the display to use +# spidev: spidev0.0 Touchscreen: -# Module: STMPE610 +### Note, at least for now, the touchscreen must have a CS pin defined, even if you let Linux manage the CS switching. + +# Module: STMPE610 # Option 1 for Adafruit PiTFT 2.8 # CS: 7 # IRQ: 24 -# Module: XPT2046 +# Module: FT5x06 # Option 2 for Adafruit PiTFT 2.8 +# IRQ: 24 +# I2CAddr: 0x38 + +# Module: XPT2046 # Waveshare 2.8inch # CS: 7 # IRQ: 17 -### Configure device for direct keyboard input +### You can also specify the spi device for the touchscreen to use +# spidev: spidev0.0 + Input: -# KeyboardDevice: /dev/input/event0 +### Configure device for direct keyboard input + +# KeyboardDevice: /dev/input/by-id/usb-_Raspberry_Pi_Internal_Keyboard-event-kbd ### Logging: LogLevel: info # debug, info, warn, error +# TraceFile: /var/log/meshtasticd.json +# AsciiLogs: true # default if not specified is !isatty() on stdout + +Webserver: +# Port: 443 # Port for Webserver & Webservices +# RootPath: /usr/share/doc/meshtasticd/web # Root Dir of WebServer + +General: + MaxNodes: 200 + MaxMessageQueue: 100 \ No newline at end of file diff --git a/bin/device-install.bat b/bin/device-install.bat index c7d8a10cf..6c880185e 100755 --- a/bin/device-install.bat +++ b/bin/device-install.bat @@ -31,9 +31,13 @@ IF EXIST %FILENAME% IF x%FILENAME:update=%==x%FILENAME% ( %PYTHON% -m esptool --baud 115200 erase_flash %PYTHON% -m esptool --baud 115200 write_flash 0x00 %FILENAME% - @REM Account for S3 board's different OTA partition - IF x%FILENAME:s3=%==x%FILENAME% IF x%FILENAME:v3=%==x%FILENAME% IF x%FILENAME:t-deck=%==x%FILENAME% IF x%FILENAME:wireless-paper=%==x%FILENAME% IF x%FILENAME:wireless-tracker=%==x%FILENAME% ( - %PYTHON% -m esptool --baud 115200 write_flash 0x260000 bleota.bin + @REM Account for S3 and C3 board's different OTA partition + IF x%FILENAME:s3=%==x%FILENAME% IF x%FILENAME:v3=%==x%FILENAME% IF x%FILENAME:t-deck=%==x%FILENAME% IF x%FILENAME:wireless-paper=%==x%FILENAME% IF x%FILENAME:wireless-tracker=%==x%FILENAME% IF x%FILENAME:station-g2=%==x%FILENAME% IF x%FILENAME:unphone=%==x%FILENAME% ( + IF x%FILENAME:esp32c3=%==x%FILENAME% ( + %PYTHON% -m esptool --baud 115200 write_flash 0x260000 bleota.bin + ) else ( + %PYTHON% -m esptool --baud 115200 write_flash 0x260000 bleota-c3.bin + ) ) else ( %PYTHON% -m esptool --baud 115200 write_flash 0x260000 bleota-s3.bin ) diff --git a/bin/device-install.sh b/bin/device-install.sh index 35d99286d..563a87af4 100755 --- a/bin/device-install.sh +++ b/bin/device-install.sh @@ -1,12 +1,12 @@ #!/bin/sh -PYTHON=${PYTHON:-$(which python3 python|head -n 1)} +PYTHON=${PYTHON:-$(which python3 python | head -n 1)} set -e # Usage info show_help() { -cat << EOF + cat <&2 - exit 1 - ;; - esac + case "${opt}" in + h) + show_help + exit 0 + ;; + p) + export ESPTOOL_PORT=${OPTARG} + ;; + P) + PYTHON=${OPTARG} + ;; + f) + FILENAME=${OPTARG} + ;; + *) + echo "Invalid flag." + show_help >&2 + exit 1 + ;; + esac done -shift "$((OPTIND-1))" +shift "$((OPTIND - 1))" [ -z "$FILENAME" -a -n "$1" ] && { - FILENAME=$1 - shift + FILENAME=$1 + shift } -if [ -f "${FILENAME}" ] && [ ! -z "${FILENAME##*"update"*}" ]; then +if [ -f "${FILENAME}" ] && [ -n "${FILENAME##*"update"*}" ]; then echo "Trying to flash ${FILENAME}, but first erasing and writing system information" - "$PYTHON" -m esptool erase_flash - "$PYTHON" -m esptool write_flash 0x00 ${FILENAME} + "$PYTHON" -m esptool erase_flash + "$PYTHON" -m esptool write_flash 0x00 ${FILENAME} # Account for S3 board's different OTA partition - if [ ! -z "${FILENAME##*"s3"*}" ] && [ ! -z "${FILENAME##*"-v3"*}" ] && [ ! -z "${FILENAME##*"t-deck"*}" ] && [ ! -z "${FILENAME##*"wireless-paper"*}" ] && [ ! -z "${FILENAME##*"wireless-tracker"*}" ]; then - "$PYTHON" -m esptool write_flash 0x260000 bleota.bin + if [ -n "${FILENAME##*"s3"*}" ] && [ -n "${FILENAME##*"-v3"*}" ] && [ -n "${FILENAME##*"t-deck"*}" ] && [ -n "${FILENAME##*"wireless-paper"*}" ] && [ -n "${FILENAME##*"wireless-tracker"*}" ] && [ -n "${FILENAME##*"station-g2"*}" ] && [ -n "${FILENAME##*"unphone"*}" ]; then + if [ -n "${FILENAME##*"esp32c3"*}" ]; then + "$PYTHON" -m esptool write_flash 0x260000 bleota.bin + else + "$PYTHON" -m esptool write_flash 0x260000 bleota-c3.bin + fi else - "$PYTHON" -m esptool write_flash 0x260000 bleota-s3.bin + "$PYTHON" -m esptool write_flash 0x260000 bleota-s3.bin fi - "$PYTHON" -m esptool write_flash 0x300000 littlefs-*.bin + "$PYTHON" -m esptool write_flash 0x300000 littlefs-*.bin else show_help diff --git a/bin/generate_ci_matrix.py b/bin/generate_ci_matrix.py index 2501e83c1..4d8759ecc 100755 --- a/bin/generate_ci_matrix.py +++ b/bin/generate_ci_matrix.py @@ -1,11 +1,12 @@ #!/usr/bin/env python -"""Generate the CI matrix""" +"""Generate the CI matrix.""" import configparser import json import os import sys +import random rootdir = "variants/" @@ -34,5 +35,12 @@ for subdir, dirs, files in os.walk(rootdir): outlist.append(section) else: outlist.append(section) - -print(json.dumps(outlist)) + if "board_check" in config[config[c].name]: + if (config[config[c].name]["board_check"] == "true") & ( + "check" in options + ): + outlist.append(section) +if ("quick" in options) & (len(outlist) > 3): + print(json.dumps(random.sample(outlist, 3))) +else: + print(json.dumps(outlist)) diff --git a/bin/generic/Meshtastic_6.1.0_bootloader-0.9.2_s140_6.1.1.hex b/bin/generic/Meshtastic_6.1.0_bootloader-0.9.2_s140_6.1.1.hex new file mode 100644 index 000000000..eebabf484 --- /dev/null +++ b/bin/generic/Meshtastic_6.1.0_bootloader-0.9.2_s140_6.1.1.hex @@ -0,0 +1,11744 @@ +:04000003F000B2CD8A +:020000040000FA +:1000000000040020810A000015070000610A0000BA +:100010001F07000029070000330700000000000050 +:10002000000000000000000000000000A50A000021 +:100030003D070000000000004707000051070000D6 +:100040005B070000650700006F07000079070000EC +:10005000830700008D07000097070000A10700003C +:10006000AB070000B5070000BF070000C90700008C +:10007000D3070000DD070000E7070000F1070000DC +:10008000FB070000050800000F0800001908000029 +:10009000230800002D080000370800004108000078 +:1000A0004B080000550800005F08000069080000C8 +:1000B000730800007D080000870800009108000018 +:1000C0009B080000A5080000AF080000B908000068 +:1000D000C3080000CD080000D7080000E1080000B8 +:1000E000EB080000F5080000FF0800000909000007 +:1000F000130900001D090000270900003109000054 +:100100003B0900001FB500F003F88DE80F001FBD8C +:1001100000F0ACBC40F6FC7108684FF01022401CA7 +:1001200008D00868401C09D00868401C04D0086842 +:1001300000F037BA9069F5E79069F9E7704770B554 +:100140000B46010B184400F6FF70040B4FF0805073 +:100150000022090303692403406943431D1B104621 +:1001600000F048FA29462046BDE8704000F042BA47 +:10017000F0B54FF6FF734FF4B4751A466E1E11E0DA +:10018000A94201D3344600E00C46091B30F8027B3B +:10019000641E3B441A44F9D19CB204EB134394B25D +:1001A00004EB12420029EBD198B200EB134002EBB2 +:1001B000124140EA0140F0BDF34992B00446D1E952 +:1001C0000001CDE91001FF224021684600F0F4FB58 +:1001D00094E80F008DE80F00684610A902E004C8FB +:1001E00041F8042D8842FAD110216846FFF7C0FF7C +:1001F0001090AA208DF8440000F099F9FFF78AFFCB +:1002000040F6FC7420684FF01025401C0FD0206889 +:1002100010226946803000F078F92068401C08D030 +:100220002068082210A900F070F900F061F9A869AF +:10023000EEE7A869F5E74FF080500369406940F6A2 +:10024000FC71434308684FF01022401C06D0086838 +:1002500000F58050834203D2092070479069F7E788 +:100260000868401C04D00868401C03D00020704778 +:100270009069F9E70420704770B504460068C34DE3 +:10028000072876D2DFE800F033041929631E250021 +:10029000D4E9026564682946304600F062F92A46CE +:1002A0002146304600F031F9AA002146304600F0E0 +:1002B00057FB002800D0032070BD00F009FC4FF46C +:1002C000805007E0201D00F040F90028F4D100F034 +:1002D000FFFB60682860002070BD241D94E80700C3 +:1002E000920000F03DFB0028F6D00E2070BDFFF715 +:1002F000A2FF0028FAD1D4E901034FF0805100EBAE +:10030000830208694D69684382420ED840F6F8704E +:1003100005684FF010226D1C09D0056805EB8305B8 +:100320000B6949694B439D4203D9092070BD55694A +:10033000F4E70168491C03D00068401C02D003E0C8 +:100340005069FAE70F2070BD2046FFF735FFFFF731 +:1003500072FF0028F7D1201D00F0F7F80028F2D135 +:1003600060680028F0D100F0E2F8FFF7D3FE00F05B +:10037000BFF8072070BD10B50C46182802D0012028 +:10038000086010BD2068FFF777FF206010BD41684E +:10039000054609B1012700E0002740F6F8742068FF +:1003A0004FF01026401C2BD02068AA68920000F065 +:1003B000D7FA38B3A86881002068401C27D020688D +:1003C000FFF7BDFED7B12068401C22D026684FF051 +:1003D0008050AC686D68016942695143A9420DD9EA +:1003E000016940694143A14208D92146304600F0E5 +:1003F000B8F822462946304600F087F800F078F831 +:100400007069D2E700F093F8FFF784FEF6E77069B1 +:10041000D6E77669DBE740F6FC7420684FF01026DB +:10042000401C23D02068401C0CD02068401C1FD0EA +:100430002568206805F18005401C1BD027683879A5 +:10044000AA2819D040F6F8700168491C42D001680A +:10045000491C45D00168491C3ED001680968491C07 +:100460003ED00168491C39D000683EE0B069DAE747 +:10047000B569DEE7B769E2E710212846FFF778FEA5 +:100480003968814222D12068401C05D0D4F8001080 +:1004900001F18002C03107E0B169F9E730B108CA63 +:1004A00051F8040D984201D1012000E000208A4259 +:1004B000F4D158B1286810B1042803D0FEE72846CB +:1004C000FFF765FF3149686808600EE0FFF722FE1C +:1004D00000F00EF87169BBE77169BFE7706904E06D +:1004E0004FF480500168491C01D000F0CBFAFEE7C0 +:1004F000BFF34F8F26480168264A01F4E06111439B +:100500000160BFF34F8F00BFFDE72DE9F0411746B3 +:100510000D460646002406E03046296800F054F8EF +:10052000641C2D1D361DBC42F6D3BDE8F08140F69B +:10053000FC700168491C04D0D0F800004FF48051D1 +:10054000FDE54FF010208069F8E74FF080510A690F +:10055000496900684A43824201D810207047002050 +:10056000704770B50C4605464FF4806608E0284693 +:1005700000F017F8B44205D3A4F5806405F5805562 +:10058000002CF4D170BD0000F40A0000000000202F +:100590000CED00E00400FA05144801680029FCD0C5 +:1005A0007047134A0221116010490B68002BFCD0E0 +:1005B0000F4B1B1D186008680028FCD0002010603D +:1005C00008680028FCD07047094B10B501221A605A +:1005D000064A1468002CFCD0016010680028FCD08A +:1005E0000020186010680028FCD010BD00E4014015 +:1005F00004E5014070B50C46054600F073F810B9EB +:1006000000F07EF828B121462846BDE8704000F091 +:1006100007B821462846BDE8704000F037B8000012 +:100620007FB5002200920192029203920A0B000B06 +:100630006946012302440AE0440900F01F0651F80C +:10064000245003FA06F6354341F82450401C8242F8 +:10065000F2D80D490868009A10430860081D016827 +:10066000019A1143016000F03DF800280AD00649C4 +:1006700010310868029A10430860091D0868039A3F +:10068000104308607FBD00000006004030B50F4CED +:10069000002200BF04EB0213D3F800582DB9D3F8A1 +:1006A000045815B9D3F808581DB1521C082AF1D3C3 +:1006B00030BD082AFCD204EB0212C2F80008C3F8CD +:1006C00004180220C3F8080830BD000000E0014013 +:1006D0004FF08050D0F83001082801D0002070473A +:1006E000012070474FF08050D0F83011062905D016 +:1006F000D0F83001401C01D0002070470120704725 +:100700004FF08050D0F830010A2801D00020704707 +:100710000120704708208F490968095808471020B0 +:100720008C4909680958084714208A4909680958FA +:100730000847182087490968095808473020854923 +:100740000968095808473820824909680958084744 +:100750003C20804909680958084740207D490968BC +:100760000958084744207B49096809580847482028 +:1007700078490968095808474C207649096809589A +:10078000084750207349096809580847542071499F +:1007900009680958084758206E49096809580847E8 +:1007A0005C206C4909680958084760206949096854 +:1007B00009580847642067490968095808476820AC +:1007C00064490968095808476C2062490968095852 +:1007D000084770205F4909680958084774205D4937 +:1007E00009680958084778205A490968095808478C +:1007F0007C205849096809580847802055490968EC +:10080000095808478420534909680958084788202F +:1008100050490968095808478C204E490968095809 +:10082000084790204B4909680958084794204949CE +:10083000096809580847982046490968095808472F +:100840009C204449096809580847A0204149096883 +:1008500009580847A4203F49096809580847A820B3 +:100860003C49096809580847AC203A4909680958C1 +:100870000847B0203749096809580847B420354966 +:10088000096809580847B8203249096809580847D3 +:10089000BC203049096809580847C0202D4909681B +:1008A00009580847C4202B49096809580847C82037 +:1008B0002849096809580847CC2026490968095879 +:1008C0000847D0202349096809580847D4202149FE +:1008D000096809580847D8201E4909680958084777 +:1008E000DC201C49096809580847E02019490968B3 +:1008F00009580847E4201749096809580847E820BB +:100900001449096809580847EC2012490968095830 +:100910000847F0200F49096809580847F4200D4995 +:10092000096809580847F8200A490968095808471A +:10093000FC2008490968095808475FF48070054998 +:10094000096809580847000003480449024A034B54 +:100950007047000000000020000B0000000B0000AA +:1009600040EA010310B59B070FD1042A0DD310C82C +:1009700008C9121F9C42F8D020BA19BA884201D97E +:10098000012010BD4FF0FF3010BD1AB1D30703D0C6 +:10099000521C07E0002010BD10F8013B11F8014B7C +:1009A0001B1B07D110F8013B11F8014B1B1B01D198 +:1009B000921EF1D1184610BD02F0FF0343EA032254 +:1009C00042EA024200F005B87047704770474FF0A6 +:1009D00000020429C0F0128010F0030C00F01B800C +:1009E000CCF1040CBCF1020F18BF00F8012BA8BF1A +:1009F00020F8022BA1EB0C0100F00DB85FEAC17CDE +:100A000024BF00F8012B00F8012B48BF00F8012B90 +:100A100070474FF0000200B51346944696462039C1 +:100A200022BFA0E80C50A0E80C50B1F12001BFF4A7 +:100A3000F7AF090728BFA0E80C5048BF0CC05DF80D +:100A400004EB890028BF40F8042B08BF704748BF5B +:100A500020F8022B11F0804F18BF00F8012B7047CF +:100A6000014B1B68DB6818470000002009480A4951 +:100A70007047FFF7FBFFFFF745FB00BD20BFFDE719 +:100A8000064B1847064A1060016881F308884068E1 +:100A900000470000000B0000000B000017040000DE +:100AA000000000201EF0040F0CBFEFF30881EFF3ED +:100AB0000981886902380078182803D100E0000015 +:100AC000074A1047074A12682C3212681047000084 +:100AD00000B5054B1B68054A9B58984700BD0000B0 +:100AE0007703000000000020F00A0000040000006E +:100AF000001000000000000000FFFFFF0090D00386 +:1010000080130020B157020069C00000175702008A +:1010100069C0000069C0000069C000000000000055 +:101020000000000000000000000000000D58020059 +:1010300069C000000000000069C0000069C0000035 +:10104000755802007B58020069C0000069C00000AA +:1010500069C0000069C0000069C0000069C00000EC +:101060008158020069C0000069C000008758020072 +:1010700069C000008D580200935802009958020080 +:1010800069C0000069C0000069C0000069C00000BC +:1010900069C0000069C0000069C0000069C00000AC +:1010A00069C000009F58020069C0000069C00000CC +:1010B00069C0000069C0000069C0000069C000008C +:1010C000A558020069C0000069C0000069C00000A6 +:1010D00069C0000069C0000069C0000069C000006C +:1010E00069C0000069C0000069C0000069C000005C +:1010F00069C0000069C0000069C0000069C000004C +:1011000069C0000069C0000000F002F824F03FFB55 +:101110000AA090E8000C82448344AAF10107DA4552 +:1011200001D124F034FBAFF2090EBAE80F0013F03E +:10113000010F18BFFB1A43F001031847584C020077 +:10114000784C02000A444FF0000C10F8013B13F0F9 +:10115000070408BF10F8014B1D1108BF10F8015B10 +:10116000641E05D010F8016B641E01F8016BF9D103 +:1011700013F0080F1EBF10F8014BAD1C0C1B09D15A +:101180006D1E58BF01F801CBFAD505E014F8016BCC +:1011900001F8016B6D1EF9D59142D6D3704700005E +:1011A0000023002400250026103A28BF78C1FBD870 +:1011B000520728BF30C148BF0B6070471FB500F011 +:1011C0003DF88DE80F001FBD1EF0040F0CBFEFF3BC +:1011D0000880EFF30980014A10470000ABBF000010 +:1011E000F0B44046494652465B460FB402A0013077 +:1011F00001B50648004700BF01BC86460FBC8046CB +:10120000894692469B46F0BC7047000009110000D9 +:101210008269034981614FF001001044704700006A +:101220002512000001B41EB400B514F0CBFE01B4C9 +:101230000198864601BC01B01EBD000024F0A4BA8E +:1012400070B51A4C054609202070A01C00F0D1F89A +:101250005920A08029462046BDE8704008F0CEB84D +:1012600008F0D7B870B50C461149097829B1A0F13A +:1012700060015E2908D3012013E0602804D06928AA +:1012800002D043F201000CE020CC0A4E94E80E009C +:1012900006EB8000A0F58050241FD0F8806E284611 +:1012A000B047206070BD012070470000080000209A +:1012B00018000020F05802003249884201D2012073 +:1012C00070470020704770B50446A0F500002E4E10 +:1012D000B0F1786F02D23444A4F500042948844266 +:1012E00001D2012500E0002500F043F848B125B9FE +:1012F000B44204D32548006808E0012070BD0020F6 +:1013000070BD002DF9D1B442F9D321488442F6D200 +:10131000F3E710B50446A0F50000B0F1786F03D2F2 +:1013200019480444A4F5000400F023F84FF080416C +:1013300030B11648006804E08C4204D2012003E07A +:1013400013488442F8D2002080F0010010BD10B58F +:1013500020B1FFF7DEFF08B1012010BD002010BD55 +:1013600010B520B1FFF7AFFF08B1012010BD00207C +:1013700010BD084808490068884201D10120704723 +:101380000020704700600200000000201C000020C8 +:101390000800002054000020BEBAFECA10B5044662 +:1013A0000021012000F03DF800210B2000F039F869 +:1013B0000421192000F035F804210D2000F031F847 +:1013C00004210E2000F02DF804210F2000F029F850 +:1013D0000421C84300F025F80621162000F021F86A +:1013E0000621152000F01DF82046FFF729FF0020F8 +:1013F00010BDB62101807047FFF732BF114870471A +:1014000010487047104A10B514680F4B0F4A083344 +:101410001A60FFF727FF0C48001D046010BD7047DD +:1014200070474907090E002804DB00F1E02080F82E +:101430000014704700F00F0000F1E02080F8141D48 +:101440007047000003F9004210050240010000014E +:10145000FE48002101604160018170472DE9F7439A +:10146000044692B091464068FFF771FF40B1606852 +:10147000FFF776FF20B9607800F00300022801D062 +:10148000012000E00020F14E30724846FFF71BFFBC +:1014900018B1102015B0BDE8F0834946012001F0D5 +:1014A0008EFE0028F6D101258DF842504FF4C05031 +:1014B000ADF84000002210A9284606F009FC0028DB +:1014C000E8D18DF842504FF428504FF00008ADF8A5 +:1014D000400047461C216846CDF81C8024F0EFF8F8 +:1014E0009DF81C0008AA20F00F00401C20F0F0001E +:1014F00010308DF81C0020788DF81D0061789DF863 +:101500001E0061F3420040F001008DF81E009DF8BE +:1015100000000AA940F002008DF800002089ADF813 +:101520003000ADF83270608907AFADF834000B972A +:10153000606810AC0E900A94684606F0BCF900286A +:10154000A8D1BDF8200030808DF8425042F601202D +:10155000ADF840009DF81E0008AA20F00600801C8F +:1015600020F001008DF81E000220ADF83000ADF82B +:10157000340013A80E900AA9684606F09CF90028CA +:1015800088D1BDF820007080311D484600F033F945 +:10159000002887D18DF8425042F6A620ADF84000D1 +:1015A0001C216846CDF81C8024F089F89DF81C00A9 +:1015B000ADF8345020F00F00401C20F0F000103047 +:1015C0008DF81C009DF81D0008AA20F0FF008DF882 +:1015D0001D009DF81E000AA920F0060040F0010041 +:1015E000801C8DF81E009DF800008DF8445040F0DE +:1015F00002008DF80000CDE90A4711A80E90ADF861 +:101600003050684606F057F9002899D1BDF82000FF +:10161000F08000203EE73EB504460820ADF800000B +:101620002046FFF750FE08B110203EBD21460120A4 +:1016300001F0C5FD0028F8D12088ADF804006088CD +:10164000ADF80600A088ADF80800E088ADF80A0003 +:101650007E4801AB6A468088002106F035FDBDF862 +:1016600000100829E1D003203EBD1FB5044600202C +:1016700002900820ADF80800CDF80CD02046FFF706 +:1016800022FE10B1102004B010BD704802AA81885B +:101690004FF6FF7006F05AFF0028F4D1BDF808108D +:1016A000082901D00320EEE7BDF800102180BDF825 +:1016B00002106180BDF80410A180BDF80610E18021 +:1016C000E1E701B582B00220ADF800005F4802AB4F +:1016D0006A464088002106F0F7FCBDF80010022998 +:1016E00000D003200EBD1CB5002100910221ADF8F1 +:1016F00000100190FFF70DFE08B110201CBD5348EB +:101700006A4641884FF6FF7006F020FFBDF80010D2 +:101710000229F3D003201CBDFEB54C4C06461546ED +:10172000207A0F46C00705D00846FFF7CCFD18B158 +:101730001020FEBD0F20FEBDF82D01D90C20FEBDEE +:101740003046FFF7C0FD18BB208801A905F0B8FDA1 +:101750000028F4D130788DF80500208801A906F022 +:1017600091FC0028EBD100909DF800009DF8051039 +:1017700040F002008DF80000090703D040F0080097 +:101780008DF800002088694606F019FC0028D6D1A3 +:10179000ADF8085020883B4602AA002106F094FCD0 +:1017A000BDF80810A942CAD00320FEBD7CB505468D +:1017B0000020009001900888ADF800000C462846F3 +:1017C0000195FFF7C4FD18B92046FFF7A2FD08B147 +:1017D00010207CBD15B1BDF8000050B11B486A4611 +:1017E00001884FF6FF7006F0B1FEBDF800102180B1 +:1017F0007CBD0C207CBD30B593B0044600200D4666 +:101800000090142101A823F05AFF1C2108A823F0FE +:1018100056FF9DF80000CDF808D020F00F00401CC6 +:1018200020F0F00010308DF800009DF8010020F04D +:10183000FF008DF801009DF8200040F002008DF8B7 +:10184000200001208DF8460002E000002002002068 +:1018500042F60420ADF8440011A801902088ADF8AC +:101860003C006088ADF83E00A088ADF84000E088FC +:10187000ADF842009DF8020006AA20F00600801C88 +:1018800020F001008DF802000820ADF80C00ADF842 +:1018900010000FA8059001A908A806F00CF8002870 +:1018A00003D1BDF818002880002013B030BD00001F +:1018B000F0B5007B059F1E4614460D46012800D05A +:1018C000FFDF0C2030803A203880002C08D0287AA6 +:1018D000032806D0287B012800D0FFDF1720608175 +:1018E000F0BDA889FBE72DE9F04786B0144691F8D2 +:1018F0000C900E9A0D46B9F1010F0BD01021007B10 +:101900002E8A8846052807D0062833D0FFDF06B088 +:10191000BDE8F0870221F2E7E8890C2100EB4000E6 +:1019200001EB4000188033201080002CEFD0E889B4 +:10193000608100271AE00096688808F1020301AA76 +:10194000696900F084FF06EB0800801C07EB470183 +:1019500086B204EB4102BDF8040090810DF106014E +:1019600040460E3212F0D3FD7F1CBFB26089B842F0 +:10197000E1D8CCE734201080E889B9F1010F11D00B +:10198000122148430E301880002CC0D0E8896081B5 +:101990004846B9F1010F00D00220207300270DF155 +:1019A000040A1FE00621ECE70096688808F10203AC +:1019B00001AA696900F04BFF06EB0800801C86B2A3 +:1019C000B9F1010F12D007EBC70004EB4000BDF8DE +:1019D0000410C18110220AF10201103023F0CEFD63 +:1019E0007F1CBFB26089B842DED890E707EB4701A1 +:1019F00004EB4102BDF80400D0810AF10201404627 +:101A0000103212F084FDEBE72DE9F0470E4688B066 +:101A100090F80CC096F80C80378AF5890C20109944 +:101A200002F10C044FF0000ABCF1030F08D0BCF126 +:101A3000040F3ED0BCF1070F7DD0FFDF08B067E791 +:101A400005EB850C00EB4C00188031200880002A43 +:101A5000F4D0A8F1060000F0FF09558125E0182117 +:101A600001A823F02CFE00977088434601AA7169F3 +:101A700000F0EDFEBDF804002080BDF80600E08017 +:101A8000BDF808002081A21C0DF10A01484612F0A1 +:101A90003EFDB9F1000F00D018B184F804A0A4F8FD +:101AA00002A007EB080087B20A346D1EADB2D6D291 +:101AB000C4E705EB850C00EB4C0018803220088051 +:101AC000002ABBD0A8F1050000F0FF09558137E0DE +:101AD00000977088434601AA716900F0B8FE9DF82E +:101AE0000600BDF80410E1802179420860F300018E +:101AF00062F34101820862F38201C20862F3C3010A +:101B0000020962F30411420962F34511820962F38A +:101B100086112171C0096071BDF80700208122463D +:101B20000DF10901484612F0F2FC18B184F802A048 +:101B3000A4F800A000E007E007EB080087B20A3431 +:101B40006D1EADB2C4D279E7A8F1020084B205FBE4 +:101B500008F000F10E0CA3F800C035230B80002A1A +:101B6000A6D055819481009783B270880E32716936 +:101B700000F06DFE62E72DE9F84F1E460A9D0C4607 +:101B800081462AB1607A00F58070D080E0891081AA +:101B900099F80C000C274FF000084FF00E0A0D28A2 +:101BA00073D2DFE800F09E070E1C28303846556AD5 +:101BB00073737300214648460095FFF779FEBDE830 +:101BC000F88F207B9146082802D0032800D0FFDF41 +:101BD000378030200AE000BFA9F80A80EFE7207BB9 +:101BE0009146042800D0FFDF378031202880B9F1EA +:101BF000000FF1D1E3E7207B9146042800D0FFDFFE +:101C000037803220F2E7207B9146022800D0FFDFA8 +:101C100037803320EAE7207B1746022800D0FFDF19 +:101C20003420A6F800A02880002FC8D0A7F80A808A +:101C3000C5E7207B1746042800D0FFDF3520A6F833 +:101C400000A02880002FBAD04046A7F80A8012E0F2 +:101C5000207B1746052802D0062800D0FFDF102081 +:101C6000308036202880002FA9D0E0897881A7F81D +:101C70000E80B9F80E00B881A1E7207B91460728B5 +:101C800000D0FFDF37803720B0E72AE04FF01200A6 +:101C900018804FF038001700288090D0E0897881B4 +:101CA000A7F80E80A7F8108099F80C000A2805D034 +:101CB0000B2809D00C280DD0FFDF80E7207B0A28F5 +:101CC00000D0FFDF01200AE0207B0B2800D0FFDFDF +:101CD000042004E0207B0C2800D0FFDF05203873AF +:101CE0006DE7FFDF6BE770B50C46054601F0ABFB17 +:101CF00020B10078222804D2082070BD43F20200EF +:101D000070BD0521284610F075FE206008B1002046 +:101D100070BD032070BD30B44880087820F00F00FB +:101D2000C01C20F0F000903001F8080B1DCA81E8BB +:101D30001D0030BC07F0E3BB2DE9FF4784B000274E +:101D40008246029707989046894612300AF0DCF9DD +:101D5000401D20F00306079828B907A95046FFF751 +:101D6000C2FF002854D1B9F1000F05D00798017BBC +:101D700019BB052504681BE098F80000092803D06A +:101D80000D2812D0FFDF46E0079903254868B0B35D +:101D9000497B42887143914239D98AB2B3B2011D5D +:101DA00010F09BFC0446078002E0079C04250834E1 +:101DB0000CB1208810B1032D29D02CE00798012107 +:101DC00012300AF0D3F9ADF80C00024602AB2946F6 +:101DD000504608F000FA070001D1A01C02900798B5 +:101DE0003A461230C8F80400A8F802A003A94046F9 +:101DF000029B0AF0C8F9D8B10A2817D200E006E021 +:101E0000DFE800F007091414100B0D14141213204E +:101E100014E6002012E6112010E608200EE643F238 +:101E200003000BE6072009E60D2007E6032005E680 +:101E3000BDF80C002346CDE900702A4650460799AC +:101E400000F015FD57B9032D08D10798B3B2417BB7 +:101E5000406871438AB2011D10F053FCB9F1000FC4 +:101E6000D7D0079981F80C90D3E72DE9FE4F914622 +:101E70001A881C468A468046FAB102AB494608F0E9 +:101E8000AAF9050019D04046A61C278810F0F6FED6 +:101E90003246072629463B46009610F004FB208870 +:101EA0002346CDE900504A465146404600F0DFFC4B +:101EB000002020800120BDE8FE8F0020FBE710B548 +:101EC00086B01C46AAB104238DF800301388ADF803 +:101ED00008305288ADF80A208A788DF80E200988DB +:101EE000ADF80C1000236A462146FFF725FF06B027 +:101EF00010BD1020FBE770B50D46052110F07AFDEE +:101F0000040000D1FFDF294604F11200BDE8704053 +:101F10000AF015B92DE9F8430D468046002607F072 +:101F2000EBFA04462878102878D2DFE800F0773BF7 +:101F30003453313112313131083131313131287975 +:101F4000001FC0B2022801D0102810D114BBFFDF3F +:101F500035E004B9FFDF0521404610F04BFD007B62 +:101F6000032806D004280BD0072828D0FFDF072637 +:101F700055E02879801FC0B2022820D050B1F6E782 +:101F80002879401FC0B2022819D0102817D0EEE7D8 +:101F900004B9FFDF13E004B9FFDF287901280ED16F +:101FA000172137E00521404610F024FD070000D13D +:101FB000FFDF07F1120140460AF09EF82CB12A46D5 +:101FC00021464046FFF7A7FE29E01321404602F0D4 +:101FD000F7FC24E004B9FFDF0521404610F00AFDBC +:101FE000060000D1FFDF694606F112000AF08EF804 +:101FF000060000D0FFDFA988172901D2172200E0D0 +:102000000A46BDF80000824202D9014602E005E01E +:102010001729C5D3404600F03AFCD0E7FFDF304631 +:10202000BDE8F883401D20F0030219B102FB01F066 +:10203000001D00E000201044704713B5009848B11F +:102040000024684610F0F3FA002C02D1F74A0099F8 +:1020500011601CBD01240020F4E72DE9F0470C4677 +:1020600015462421204623F02AFB05B9FFDFA87876 +:1020700060732888DFF8B4A3401D20F00301AF7817 +:102080008946DAF8000010F0F0FA060000D1FFDF10 +:102090004FF000082660A6F8008077B109FB07F131 +:1020A000091D0AD0DAF8000010F0DFFA060000D1AE +:1020B000FFDF6660C6F8008001E0C4F8048029886C +:1020C00004F11200BDE8F0470AF008B82DE9F04726 +:1020D000804601F112000D4681460AF015F8401DB8 +:1020E000D24F20F003026E7B14462968386810F046 +:1020F000E7FA3EB104FB06F2121D03D069683868A6 +:1021000010F0DEFA052010F01DFC0446052010F04A +:1021100021FC201A012802D1386810F09BFA4946A8 +:102120004046BDE8F04709F0EEBF70B50546052111 +:1021300010F060FC040000D1FFDF04F1120128461A +:10214000BDE8704009F0D8BF2DE9F04F91B04FF0D5 +:10215000000BADF834B0ADF804B047880C46054626 +:1021600092460521384610F045FC060000D1FFDFFD +:1021700024B1A780A4F806B0A4F808B029780922F1 +:102180000B20B2EB111F7DD12A7A04F11001382700 +:102190004FF00C084FF001090391102A73D2DFE8C9 +:1021A00002F072F2F1F07F08D2888D9F3DDBF3EEF2 +:1021B000B6B6307B022800D0FFDFA88908EBC0014B +:1021C000ADF804103021ADF83410002C25D060811A +:1021D000B5F80E9000271DE004EBC708317C88F8A5 +:1021E0000E10F189A8F80C10CDF80090688804232F +:1021F00004AA296900F02BFBBDF81010A8F81010F4 +:1022000009F10400BDF812107F1C1FFA80F9A8F82C +:102210001210BFB26089B842DED80DE1307B0228CF +:1022200000D0FFDFE98908EBC100ADF804003020E1 +:10223000ADF83400287B0A90001FC0B20F90002C2C +:10224000EBD06181B5F81090002725E0CDF8009023 +:102250006888696903AA0A9B00F0F9FA0A9804EBF6 +:10226000C70848441FFA80F908F10C0204A90F9826 +:1022700012F04DF918B188F80EB0A8F80CB0BDF8FE +:102280000C1001E0D4E0CFE0A8F81010BDF80E105B +:102290007F1CA8F81210BFB26089B842D6D8CBE034 +:1022A0000DA8009001AB224629463046FFF71BFBE4 +:1022B000C2E0307B082805D0FFDF03E0307B082830 +:1022C00000D0FFDFE8891030ADF804003620ADF80B +:1022D0003400002C3FD0A9896181F189A18127E0D8 +:1022E000307B092800D0FFDFA88900F10C01ADF890 +:1022F00004103721ADF83410002C2CD06081E8890F +:102300000090AB89688804F10C02296956E0E889DD +:102310003921103080B2ADF80400ADF83410002C33 +:1023200074D0A9896181287A0E280AD002212173EC +:10233000E989E181288A0090EB8968886969039AB4 +:102340003CE00121F3E70DA8009001AB22462946AD +:102350003046FFF759FB6FE0307B0A2800D0FFDFE3 +:102360001220ADF80400ADF834704CB3A989618136 +:10237000A4F810B0A4F80EB084F80C905CE020E053 +:1023800002E031E039E042E0307B0B2800D0FFDF93 +:10239000288AADF834701230ADF8040084B10421FD +:1023A0002173A9896181E989E181298A2182688A69 +:1023B00000902B8A688804F11202696900F047FADC +:1023C0003AE0307B0C2800D0FFDF1220ADF804008B +:1023D000ADF834703CB305212173A4F80AB0A4F819 +:1023E0000EB0A4F810B027E00DA8009001AB224673 +:1023F00029463046FFF75CFA1EE00DA8009001ABBD +:10240000224629463046FFF7B6FB15E034E03B2173 +:10241000ADF80400ADF8341074B3A4F80690A4F835 +:1024200008B084F80AB007E0FFDF05E010000020E4 +:10243000297A012917D0FFDFBDF80400AAF80000AF +:102440006CB1BDF834002080BDF804006080BDF898 +:102450003400392803D03C2801D086F80CB011B0E4 +:102460000020BDE8F08F3C21ADF80400ADF8341039 +:1024700014B1697AA172DFE7AAF80000EFE72DE94D +:10248000F84356880F46804615460521304610F021 +:10249000B1FA040000D1FFDF123400943B464146FC +:1024A00030466A6809F0A3FFBAE570B50D4605210C +:1024B00010F0A0FA040000D1FFDF294604F1120059 +:1024C000BDE8704009F02DBE70B50D46052110F035 +:1024D00091FA040000D1FFDF294604F11200BDE8A3 +:1024E000704009F04BBE70B50546052110F082FA28 +:1024F000040000D1FFDF04F1080321462846BDE8AF +:1025000070400422B1E470B50546052110F072FA5E +:10251000040000D1FFDF214628462368BDE8704053 +:102520000522A2E470B50646052110F063FA040006 +:1025300000D1FFDF04F1120009F0E6FD401D20F09C +:10254000030511E0011D008803224318214630468F +:10255000FFF78BFC00280BD0607BABB2684382B2E4 +:102560006068011D10F003F9606841880029E9D115 +:1025700070BD70B50E46054606F0BEFF040000D1E2 +:10258000FFDF0120207266726580207820F00F0046 +:10259000C01C20F0F00030302070BDE8704006F024 +:1025A000AEBF2DE9F0438BB00D461446814606A917 +:1025B000FFF799FB002814D14FF6FF7601274FF45F +:1025C00020588CB103208DF800001020ADF81000C9 +:1025D00007A8059007AA204604A911F0B7FF78B113 +:1025E00007200BB0BDE8F0830820ADF808508DF847 +:1025F0000E708DF80000ADF80A60ADF80C800CE0AC +:102600000698A17801742188C1818DF80E70ADF80B +:102610000850ADF80C80ADF80A606A4602214846C1 +:10262000069BFFF789FBDCE708B501228DF8022045 +:1026300042F60202ADF800200A4603236946FFF77E +:102640003EFC08BD08B501228DF8022042F60302C7 +:10265000ADF800200A4604236946FFF730FC08BDA8 +:1026600000B587B079B102228DF800200A88ADF854 +:1026700008204988ADF80A1000236A460521FFF7B3 +:102680005BFB07B000BD1020FBE709B1072316E490 +:102690000720704770B588B00D461446064606A957 +:1026A000FFF721FB00280ED17CB10620ADF80850C1 +:1026B0008DF80000ADF80A40069B6A460821DC81CF +:1026C0003046FFF739FB08B070BD05208DF80000DB +:1026D000ADF80850F0E700B587B059B107238DF881 +:1026E0000030ADF80820039100236A460921FFF766 +:1026F00023FBC6E71020C4E770B588B00C46064639 +:10270000002506A9FFF7EFFA0028DCD10698012181 +:10271000123009F02BFD9CB12178062921D2DFE887 +:1027200001F0200505160318801E80B2C01EE28845 +:1027300080B20AB1A3681BB1824203D90C20C2E760 +:102740001020C0E7042904D0A08850B901E0062079 +:10275000B9E7012913D0022905D004291CD0052985 +:102760002AD00720AFE709208DF800006088ADF877 +:102770000800E088ADF80A00A068039023E00A2072 +:102780008DF800006088ADF80800E088ADF80A0018 +:10279000A0680A25039016E00B208DF800006088E1 +:1027A000ADF80800A088ADF80A00E088ADF80C008C +:1027B000A0680B25049006E00C208DF800006078DE +:1027C0008DF808000C256A4629463046069BFFF71F +:1027D000B3FA78E700B587B00D228DF80020ADF888 +:1027E000081000236A461946FFF7A6FA49E700B524 +:1027F00087B071B102228DF800200A88ADF8082058 +:102800004988ADF80A1000236A460621FFF794FABA +:1028100037E7102035E770B586B0064601200D4633 +:10282000ADF808108DF80000014600236A463046D6 +:10283000FFF782FA040008D12946304605F05EFC15 +:102840000021304605F078FC204606B070BDF8B592 +:102850001C4615460E46069F10F0FEF92346FF1D46 +:10286000BCB231462A4600940FF0E9FDF8BD30B401 +:102870001146DDE902423CB1032903D0002330BCFC +:1028800008F034BB0123FAE71A8030BC704770B5FA +:102890000C460546FFF72FFB2146284605F03DFC78 +:1028A0002846BDE87040012105F046BC4FF0E0220B +:1028B0004FF400400021C2F88001BFF34F8FBFF3F7 +:1028C0006F8F1748016001601649900208607047D9 +:1028D000134900B500220A600A60124B4FF0607283 +:1028E0001A60002808BF00BD0F4A104BDFF840C037 +:1028F00001280CD002281CBFFFDF00BD03200860A8 +:102900001A604FF4000000BFCCF8000000BD0220A8 +:1029100008601A604FF04070F6E700B5FFDF00BDB9 +:1029200000F5004008F50140A002002014F5004029 +:1029300004F5014070B50B2000F0BDF9082000F04F +:10294000BAF900210B2000F0D4F90021082000F092 +:10295000D0F9F44C01256560A5600020C4F8400161 +:10296000C4F84401C4F848010B2000F0B5F9082070 +:1029700000F0B2F90B2000F091F9256070BD10B5A0 +:102980000B2000F098F9082000F095F9E5480121A6 +:1029900041608160E4490A68002AFCD10021C0F846 +:1029A0004011C0F84411C0F848110B2000F094F910 +:1029B000BDE81040082000F08FB910B50B2000F0E2 +:1029C0008BF9BDE81040082000F086B900B530B1A1 +:1029D000012806D0022806D0FFDF002000BDD34822 +:1029E00000BDD34800BDD248001D00BD70B5D1491F +:1029F0004FF000400860D04DC00BC5F80803CF4829 +:102A000000240460C5F840410820C43500F053F9A3 +:102A1000C5F83C41CA48047070BD08B5C14A0021E0 +:102A200028B1012811D002281CD0FFDF08BD4FF4C7 +:102A30008030C2F80803C2F84803BB483C3001604C +:102A4000C2F84011BDE80840D0E74FF40030C2F8AA +:102A50000803C2F84803B44840300160C2F844118A +:102A6000B3480CE04FF48020C2F80803C2F84803D2 +:102A7000AD4844300160C2F84811AD48001D0068FF +:102A8000009008BD70B516460D460446022800D9D0 +:102A9000FFDF0022A348012304F110018B4000EB6B +:102AA0008401C1F8405526B1C1F84021C0F8043373 +:102AB00003E0C0F80833C1F84021C0F8443370BDCA +:102AC0002DE9F0411D46144630B1012833D00228CB +:102AD00038D0FFDFBDE8F081891E002221F07F4160 +:102AE0001046FFF7CFFF012D23D00020944D924FC9 +:102AF000012668703E61914900203C39086002203F +:102B0000091D08608D490420303908608B483D3428 +:102B1000046008206C6000F0DFF83004C7F804039C +:102B2000082000F0BBF88349F007091F08602E70E9 +:102B3000D0E70120DAE7012B02D00022012005E0D6 +:102B40000122FBE7012B04D000220220BDE8F04166 +:102B500098E70122F9E774480068704770B500F003 +:102B6000D8F8704C0546D4F840010026012809D158 +:102B7000D4F80803C00305D54FF48030C4F8080327 +:102B8000C4F84061D4F8440101280CD1D4F80803FA +:102B9000800308D54FF40030C4F80803C4F844613A +:102BA000012012F0A9FCD4F8480101280CD1D4F876 +:102BB0000803400308D54FF48020C4F80803C4F884 +:102BC0004861022012F098FC5E48056070BD70B547 +:102BD00000F09FF85A4D0446287850B1FFF706FFE1 +:102BE000687818B10020687012F086FC55480460BF +:102BF00070BD0320F8E74FF0E0214FF40010C1F85A +:102C000000027047152000F067B84B4901200861A9 +:102C1000082000F061B848494FF47C10C1F808035F +:102C20000020024601EB8003C3F84025C3F8402191 +:102C3000401CC0B20628F5D37047410A43F609523A +:102C40005143C0F3080010FB02F000F5807001EB67 +:102C50005020704710B5430B48F2376463431B0C98 +:102C60005C020C60384C03FB0400384B4CF2F72438 +:102C700043435B0D13FB04F404EB402000F580702C +:102C80004012107008681844086010BD2C48406855 +:102C9000704729490120C1F800027047002809DB6C +:102CA00000F01F02012191404009800000F1E02066 +:102CB000C0F80011704700280DDB00F01F02012151 +:102CC00091404009800000F1E020C0F88011BFF37E +:102CD0004F8FBFF36F8F7047002809DB00F01F0292 +:102CE000012191404009800000F1E020C0F88012ED +:102CF00070474907090E002804DB00F1E02080F846 +:102D00000014704700F00F0000F1E02080F8141D5F +:102D100070470C48001F00680A4A0D49121D1160D7 +:102D20007047000000B0004004B500404081004002 +:102D300044B1004008F5014000800040408500405B +:102D40003400002014050240F7C2FFFF6F0C0100A1 +:102D5000010000010A4810B5046809490948083112 +:102D6000086012F05DFC0648001D046010BD0649B5 +:102D7000002008604FF0E0210220C1F88002704777 +:102D80001005024001000001FC1F004010B50D209D +:102D900000F077F8C4B26FF0040000F072F8C0B22F +:102DA000844200D0FFDF3E490120086010BD70B5AD +:102DB0000D2000F048F83B4C0020C4F8000101252C +:102DC000C4F804530D2000F04FF825604FF0E021C7 +:102DD0006014C1F8000170BD10B50D2000F033F88B +:102DE0003048012141600021C0F80011BDE81040C9 +:102DF0000D2000F039B82C4810B504682A492B483A +:102E0000083108602749D1F80001012804D0FFDF0C +:102E10002548001D046010BD2148001D00680022E7 +:102E2000C0B2C1F8002113F047F8F1E710B51D4812 +:102E3000D0F800110029FBD0FFF7DDFFBDE81040FE +:102E40000D2000F011B800280DDB00F01F02012159 +:102E500091404009800000F1E020C0F88011BFF3EC +:102E60004F8FBFF36F8F7047002809DB00F01F0200 +:102E7000012191404009800000F1E020C0F880125B +:102E80007047002804DB00F1E02090F8000405E022 +:102E900000F00F0000F1E02090F8140D4009704799 +:102EA00004D5004000D000401005024001000001A0 +:102EB0004FF0E0214FF00070C1F8800101F5C071C2 +:102EC000BFF34F8FBFF36F8FC1F80001384B8022E3 +:102ED00083F8002441F8800C704700B502460420B6 +:102EE000344903E001EBC0031B792BB1401EC0B293 +:102EF000F8D2FFDFFF2000BD41F8302001EBC00118 +:102F000000224A718A7101220A7100BD294A0021FA +:102F100002EBC0000171704710B50446042800D3CD +:102F2000FFDF244800EBC4042079012800D0FFDF34 +:102F30006079A179401CC0B2814200D060714FF02D +:102F4000E0214FF00070C1F8000210BD2DE9F04102 +:102F500019480568184919480831086014480426BA +:102F600090F80004134F4009154C042818D0FFDFD7 +:102F700016E0217807EBC1000279012A08D14279D5 +:102F800083799A4204D04279827157F831008047A0 +:102F90002078401CC0B22070042801D3002020708B +:102FA000761EF6B2E5D20448001D0560BDE8F0814A +:102FB00019E000E0D80500201005024001000001E2 +:102FC000500000200548064A0168914201D10021C5 +:102FD000016004490120086070470000540000208F +:102FE000BEBAFECA40E5014070B50C46054609F080 +:102FF0009BFB21462846BDE870400AF080BC704724 +:103000002CFFFFFFDBE5B15100600200B600FFFFBF +:103010008C00000069915B00935FFEEDA0843C731F +:10302000F87462145E06C0CB72F2136030B5F84DCE +:103030000446062CA9780ED2DFE804F0030E0E0E2B +:103040000509FFDF08E0022906D0FFDF04E00329BD +:1030500002D0FFDF00E0FFDFAC7030BD30B50446CA +:103060001038EB4D07280CD2DFE800F0040C060CFA +:103070000C0C0C00FFDF05E0287E112802D0FFDFDA +:1030800000E0FFDF2C7630BD2DE9F04111F0C8FBE8 +:10309000044612F0A1FD201AC5B206200FF052FC22 +:1030A000044606200FF056FC211AD94C207E122827 +:1030B00018D000200F1807200FF044FC0646072008 +:1030C0000FF048FC301A3918207E13280CD000204D +:1030D0000144A078042809D000200844281AC0B26E +:1030E000BDE8F0810120E5E70120F1E70120F4E7E8 +:1030F000C74810B590F825004108C54800F12600E2 +:1031000005D00DF018FBBDE8104006F00BB80DF02F +:10311000F3FAF8E730B50446A1F120000D460A287D +:103120004AD2DFE800F005070C1C2328353A3F445B +:10313000FFDF42E0207820283FD1FFDF3DE0B448A8 +:103140008178052939D0007E122836D020782428AD +:1031500033D0252831D023282FD0FFDF2DE0207851 +:1031600022282AD0232828D8FFDF26E0207822280A +:1031700023D0FFDF21E0207822281ED024281CD075 +:1031800026281AD0272818D0292816D0FFDF14E0C7 +:103190002078252811D0FFDF0FE0207825280CD0DB +:1031A000FFDF0AE02078252807D0FFDF05E0207840 +:1031B000282802D0FFDF00E0FFDF257030BD1FB5FB +:1031C00004466A46002001F03CFEB4B1BDF802207E +:1031D0004FF6FF700621824201D1ADF80210BDF812 +:1031E0000420824201D1ADF80410BDF808108142DC +:1031F00003D14FF44860ADF8080068460EF014F9AA +:1032000005F090FF04B010BD70B514460D4606469B +:10321000FEF759F858B90DB1A54201D90C2070BD7F +:10322000002408E056F82400FEF74DF808B11020FD +:1032300070BD641CE4B2AC42F4D3002070BD2DE933 +:10324000F04105461F4690460E4600240068FEF7F2 +:1032500087F830B9A98828680844401EFEF780F82E +:1032600008B110203CE728680028A88802D0B8429E +:1032700002D850E00028F5D0092031E72968085D20 +:10328000B8B1671CCA5D152A2ED03CDC152A3AD28B +:10329000DFE802F03912222228282A2A313139396E +:1032A00039393939393939392200085D30BB641C64 +:1032B000A4B2A242F9D833E00228DDD1A01C085CF8 +:1032C00088F80000072801D2400701D40A2007E748 +:1032D000307840F0010015E0C143C90707E001283C +:1032E00007D010E00620FBE60107A1F1805100297C +:1032F000F5D01846F4E63078810701D50B20EFE6CB +:1033000040F0020030702868005D384484B2A8881C +:10331000A04202D2B0E74FF4485382B2A242ADD8E5 +:103320000020DDE610B5027843F2022354080122A2 +:10333000022C12D003DC3CB1012C16D106E0032C88 +:1033400010D07F2C11D112E0002011E080790324ED +:10335000B4EB901F09D10A700BE08079B2EB901F9B +:1033600003D1F8E780798009F5D0184610BDFF2019 +:103370000870002010BD08B500208DF8000024481A +:1033800090F82E1049B190F82F0002280ED0032893 +:103390000ED0FFDF9DF8000008BD1D4869462530AE +:1033A00001F09EFD0028F5D0FFDFF3E7032000E0E9 +:1033B00001208DF80000EDE738B50C46054669465A +:1033C00001F08EFD00280DD19DF80010207861F3EA +:1033D0004700207055F8010FC4F80100A888A4F830 +:1033E0000500002038BD38B51378A8B1022813D0E5 +:1033F000FF281AD007A46D46246800944C7905EB89 +:103400009414247864F347031370032809D00FE061 +:10341000EC0100200302FF0123F0FE0313700228D9 +:10342000F3D1D8B240F0010005E043F0FE00107087 +:10343000107820F0010010700868C2F80100888838 +:10344000A2F8050038BD02210FF0D4BA38B50C46F9 +:103450000978222901D2082038BDADF800008DF886 +:10346000022068460DF0A9F905F05CFE050003D1C5 +:1034700021212046FFF74EFE284638BD1CB500200E +:103480008DF80000CDF80100ADF80500FB4890F87C +:103490002E00022801D0012000E000208DF8070056 +:1034A00068460DF0FAFA002800D0FFDF1CBD0022AC +:1034B0000A80437892B263F3451222F040020A80F8 +:1034C00000780C282BD2DFE800F02A06090E11162E +:1034D000191C1F220C2742F0110009E042F01D00C8 +:1034E00008800020704742F0110012E042F0100006 +:1034F00040F00200F4E742F01000F1E742F0010072 +:10350000EEE742F0010004E042F00200E8E742F09A +:10351000020040F00400E3E742F00400E0E7072087 +:1035200070472DE9FF478AB00025BDF82C60824620 +:103530001C4691468DF81C50700703D56068FDF756 +:10354000C2FE68B9CD4F4FF0010897F82E0058B170 +:1035500097F82F00022807D16068FDF701FF18B126 +:1035600010200EB0BDE8F087300702D5A089802872 +:103570003ED8700705D4B9F1000F02D097F82400A7 +:10358000A0B3E07DC0F300108DF81B00627D072022 +:10359000032162B3012A2DD0022AE2D0042AE0D10D +:1035A0008DF81710F00628D4A27D07202AB3012A2F +:1035B00023D0022A24D0042AD3D18DF8191000BFB9 +:1035C0008DF81590606810B307A9FFF7ABFE0028CF +:1035D000C7D19DF81C00FF2816D0606850F8011F65 +:1035E000CDF80F108088ADF8130014E000E001E082 +:1035F0000720B6E78DF81780D4E78DF81980DFE74C +:1036000002208DF81900DBE743F20220A9E7CDF88C +:103610000F50ADF81350E07B40B9207C30B9607C8E +:1036200020B9A07C10B9E07CC00601D0062098E744 +:103630008DF800A0BDF82C00ADF80200A068019044 +:10364000A068029004F10F0001F03EFC8DF80C0020 +:10365000FFF791FE8DF80D009DF81C008DF80E000F +:103660008DF816508DF81850E07D08A900F00F0075 +:103670008DF81A0068460EF015F805F053FD70E756 +:10368000F0B58FB000258DF830508DF814508DF8BE +:10369000345006468DF828500195029503950495FF +:1036A00019B10FC901AC84E80F00744CA07805284B +:1036B00001D004280CD101986168884200D120B95A +:1036C0000398E168884203D110B108200FB0F0BD23 +:1036D000207DC00601D51F2700E0FF273B460DAA2D +:1036E00005A903A8FFF7ABFD0028EFD1A08AC10709 +:1036F00002D0C00600D4EE273B460AAA0CA901A8B6 +:10370000FFF79DFD0028E1D19DF81400C00701D00E +:103710000A20DBE7A08A410708D4A17D31B19DF8DA +:103720002810890702D043F20120CFE79DF8281026 +:10373000C90709D0400707D4208818B144F2506166 +:10374000884201D90720C1E78DF818508DF819601B +:10375000BDF80800ADF81A000198079006A80DF012 +:10376000BBFF05F0DFFC0028B0D18DF820508DF8AC +:103770002160BDF81000ADF822000398099008A858 +:103780000DF0C9FF05F0CEFC00289FD101AD241D2E +:1037900095E80F0084E80F00002097E770B586B029 +:1037A0000D46040005D0FDF7DBFD20B1102006B06A +:1037B00070BD0820FBE72078C107A98802D0FF2947 +:1037C00002D303E01F2901D20920F0E7800763D468 +:1037D000FFF75AFC38B12178C1F3C100012804D0A9 +:1037E000032802D005E01320E1E7244890F82400E4 +:1037F000C8B1C8074FF001064FF0000502D08DF8A0 +:103800000F6001E08DF80F50FFF7B5FD8DF8000057 +:1038100020786946C0F3C1008DF8010060788DF80A +:103820000250C20801D00720C1E730B3C20701D05F +:103830008DF80260820705D59DF8022042F0020251 +:103840008DF80220400705D59DF8020040F00400E5 +:103850008DF80200002022780B18C2F38002DA7083 +:1038600001EB40026388D380401CA388C0B253811F +:103870000228F0D3207A78B905E001E0EC010020BD +:103880008DF80260E6E7607A30B9A07A20B9E07A74 +:1038900010B9207BC00601D0062088E704F108009B +:1038A00001F012FB8DF80E0068460DF0BFFA05F02E +:1038B00039FC002889D18DF810608DF81150E0880E +:1038C000ADF81200ADF8145004A80DF002FB05F09D +:1038D00029FC002888D12078C00701D0152000E0FD +:1038E0001320FFF7BBFB002061E72DE9FF47022013 +:1038F000FB4E8DF804000027708EADF80600B84628 +:1039000043F202094CE001A80EF0DBFF050006D0EF +:10391000708EA8B3A6F83280ADF806803EE0039C16 +:10392000A07F01072DD504F124000090A28EBDF8E0 +:103930000800214604F1360301F05FFC050005D0C4 +:103940004D452AD0112D3CD0FFDF3AE0A07F20F07A +:103950000801E07F420862F3C711A177810861F393 +:103960000000E07794F8210000F01F0084F82000A8 +:103970002078282826D129212046FFF7CBFB21E0FB +:1039800014E040070AD5BDF8080004F10E0101F06B +:10399000B1FA05000DD04D4510D100257F1CFFB2B6 +:1039A00002200EF0CFFF401CB842ACD8052D11D03C +:1039B00008E0A07F20F00400A07703E0112D00D0E4 +:1039C000FFDF0025BDF806007086052D04D02846CF +:1039D00004B0C7E5A6F832800020F9E770B50646C6 +:1039E000FFF731FD054605F087FD040000D1FFDF3C +:1039F0006680207820F00F00801C20F0F00020303E +:103A000020700320207295F83E006072BDE870407F +:103A100005F075BD2DE9F04786B0040000D1FFDF49 +:103A20002078AF4D20F00F00801C20F0F0007030A7 +:103A3000207060680178491F1B2933D2DFE801F04C +:103A4000FE32323255FD320EFDFD42FC323232780A +:103A5000FCFCFBFA3232FCFCF9F8FC00C68830466C +:103A6000FFF7F1FC0546304607F03EF9E0B160682B +:103A7000007A85F83E0021212846FFF74BFB3046AF +:103A8000FEF753FB304603F05BFE3146012012F097 +:103A9000D3FCA87F20F01000A877FFF726FF0028AE +:103AA00000D0FFDF06B05DE5207820F0F000203088 +:103AB00020700320207266806068007A607205F0D2 +:103AC0001EFDD8E7C5882846FFF7BDFC00B9FFDF1B +:103AD00060680079012800D0FFDF6068017A06B0D5 +:103AE0002846BDE8F04707F0DEBCC6883046FFF741 +:103AF000AAFC050000D1FFDF05F001FD606831463A +:103B00000089288160684089688160688089A8810F +:103B1000012012F091FC0020A875A87F00F003009E +:103B20000228BFD1FFF7E1FE0028BBD0FFDFB9E7D5 +:103B300000790228B6D000B1FFDF05F0E0FC66682E +:103B4000B6F806A0307A361D012806D0687E814678 +:103B500005F054FA070003D101E0E878F7E7FFDF4A +:103B60000022022150460EF03CFF040000D1FFDF8E +:103B700022212046FFF7CEFA3079012800D002201A +:103B8000A17F804668F30101A177308B2081708B83 +:103B90006081B08BA08184F822908DF80880B8688D +:103BA0000090F86801906A46032150460EF019FF14 +:103BB00000B9FFDFB888ADF81000B8788DF81200B2 +:103BC00004AA052150460EF00CFF00B9FFDFB888AB +:103BD000ADF80C00F8788DF80E0003AA04215046C9 +:103BE0000EF0FFFE00B9FFDF062106F1120001F022 +:103BF0009FF940B37079800700D5FFDF7179E07DD0 +:103C000061F34700E075D6F80600A0617089A083D3 +:103C1000062106F10C0001F08BF9F0B195F82500B2 +:103C20004108607861F347006070D5F8260006E02F +:103C30003EE036E06DE055E04AE02CE040E0C4F8BC +:103C40000200688D12E0E07D20F0FE00801CE0752F +:103C5000D6F81200A061F08AD9E7607820F0FE0063 +:103C6000801C6070F068C4F80200308AE080B8F10F +:103C7000010F04D0B8F1020F05D0FFDF12E70320D7 +:103C8000FFF7D4F90EE7287E122800D0FFDF1120BD +:103C9000FFF7E4F906E706B02046BDE8F04701F07B +:103CA00035BD05F02CFC15F8300F40F0020005E0A2 +:103CB00005F025FC15F8300F40F004002870F1E6FF +:103CC000287E132809D01528D8D11620FFF7C6F969 +:103CD00006B0BDE8F04705F012BC1420F6E700007E +:103CE000EC010020A978052909D00429C6D105F0E6 +:103CF00006FC022006B0BDE8F047FFF797B900794F +:103D00000028BBD0E87801F0C6F805F0F8FB0320E6 +:103D1000F0E7287E122802D1687E01F0BCF811205D +:103D2000D4E72DE9F047054600784FF00008000978 +:103D3000DFF8C0A891460C464646012875D00228F7 +:103D400074D007280AD00A2871D0FFDFA9F80060D4 +:103D500014B1A4F800806680002003E4696801279C +:103D600004F108000A784FF0020C4FF6FF73172A8F +:103D70007ED00EDC142A32D006DC052A68D0092A4F +:103D800010D0102A75D120E0152A73D0162AF9D147 +:103D9000F8E0183A082A6CD2DFE802F0F36B6B0AFD +:103DA000CAF2DFF1C8884FF01208102621468DE1D3 +:103DB0004FF01C080A26BCB38888A0806868807908 +:103DC00020726868C0796072C0E74FF01B08142643 +:103DD00054B30320207268688088A080B6E70A790F +:103DE0003C2AB3D00D1D4FF010082C26E4B1698891 +:103DF000A180298B6182298B2182698BA182A98B69 +:103E0000E1826B790246A91D1846FFF7ECFA297981 +:103E1000002001290CD084F80FC0FF212176E06139 +:103E200020626062A06291E70FE02EE151E18CE137 +:103E3000E77320760AF1040090E80E00DAF810002B +:103E4000C4E90930C4E9071280E7A9F8006083E7F4 +:103E50002C264FF01D08002CF7D00546A380887B48 +:103E60002A880F1D60F300022A80887B400802E048 +:103E70009DE007E1BEE060F341022A80887B800874 +:103E800060F382022A80887BB91CC00860F3C302F9 +:103E90002A80B87A0011401C60F3041202F07F00FF +:103EA00028807878AA1CFFF79EFA387D05F1090270 +:103EB00007F11501FFF797FA387B01F048F82874ED +:103EC000787B01F044F86874F87EA874787AE87416 +:103ED000387F2875B87B6875388AE882DAF81C0064 +:103EE000A861B87A524697F808A0C0F34111012999 +:103EF00004D0108C504503D2824609E0FFDF10E069 +:103F0000022903D0288820F0600009E0504504D140 +:103F1000288820F06000403002E0288840F06000EF +:103F20002880A4F824A0524607F11D01A86996E054 +:103F300011264FF02008002C87D0A380686804F178 +:103F40000A02007920726868007B607269688B1DC4 +:103F500048791946FFF747FAF8E60A264FF0210894 +:103F6000002CE9D08888A080686880792072686811 +:103F7000C07960729AF8301021F004019FE065E08A +:103F80004CE06FE00B264FF02208002CD4D0C888FC +:103F9000A0806868007920726868007A00F0D7FF16 +:103FA00060726868407A00F0D2FFA072CEE61C26EC +:103FB0004FF02608002CBFD0A3806868407960725B +:103FC0006868007AA0720AF1040090E80E00DAF83E +:103FD0001000C4E90530C4E90312686800793C2880 +:103FE00003D0432803D0FFDFB0E62772AEE684F8A3 +:103FF00008C0ABE610264FF02408002C9CD088881F +:10400000A0806868807920816868807A60816868AB +:104010000089A08168688089E08197E610264FF0CA +:104020002308002C88D08888A0806868C0882081F8 +:1040300068680089608168684089A08168688089B3 +:10404000E0819AF8301021F0020138E030264FF07C +:104050002508002C85D0A38069682822496821F0B2 +:104060008DFA73E614264FF01B08002C8ED0A38027 +:10407000686800790128BAD02772DAE90710C4E924 +:10408000031063E64A46214660E0287A012803D0FF +:10409000022817D0FFDF59E610264FF01F08002C2A +:1040A00089D06888A080A8892081E8896081288AD1 +:1040B000A081688AE0819AF8301021F001018AF825 +:1040C000301043E64FF012081026688800F01DFFFC +:1040D0003CE6287AC8B3012838D0022836D0032815 +:1040E00001D0FFDF32E609264FF01108002C85D001 +:1040F0006F883846FFF7A7F990F822A0A780687A62 +:104100002072042138460EF087FC052138460EF057 +:1041100083FC002138460EF07FFC012138460EF06A +:104120007BFC032138460EF077FC022138460EF066 +:1041300073FC062138460EF06FFC072138460EF05E +:104140006BFC504600F0A7FE00E6FFE72846BDE8FE +:10415000F04701F065BC70B5012803D0052800D0F8 +:10416000FFDF70BD8DB22846FFF76DF9040000D166 +:10417000FFDF20782128F4D005F0BEF980B1017866 +:1041800021F00F01891C21F0F00110310170022192 +:10419000017245800020A075BDE8704005F0AFB900 +:1041A00021462846BDE870401322FFF74FB92DE99C +:1041B000F04116460C00804600D1FFDF307820F039 +:1041C0000F00801C20F0F0001030307020780128A3 +:1041D00004D0022818D0FFDFBDE8F0814046FFF789 +:1041E00032F9050000D1FFDF0320A87505F087F93B +:1041F00094E80F00083686E80F00FE4810F8301FDC +:1042000041F001010170E7E74046FFF71CF90500A6 +:1042100000D1FFDFA1884FF6FF700027814202D155 +:10422000E288824203D0814201D1E08840B105F0AA +:1042300066F994E80F00083686E80F00AF75CBE703 +:10424000A87D0128C8D178230022414612F04AF8FF +:104250000220A875C0E738B505460C460846FDF7AC +:1042600032F818BB203D062D4AD2DFE805F0031BCB +:10427000373C42300021052012F0B4F808B111207B +:1042800038BDA01C0DF023F904F04CFF050038D117 +:10429000002208231146052012F024F8052830D00A +:1042A000FFDF2EE06068FDF752F808B1102038BD3E +:1042B000618820886A460DF0C5FB04F033FF0500D5 +:1042C0001FD16068E8B1BDF80010018019E0A07846 +:1042D00000F0010120880DF0E6FB0EE0206801F0FF +:1042E0004BFE05460DE0207800F001000CF0EDF9E2 +:1042F00003E0618820880DF020FB04F013FFF0E755 +:104300000725284638BD70B505460C460846FDF71A +:1043100000F808B1102070BD202D07D0212D0DD040 +:10432000222D0BD0252D09D0072070BD2088A11C7F +:104330000CF0A0FABDE8704004F0F4BE062070BD99 +:10434000AC482530704708B53421AA4821F0B7F9A8 +:104350000120FEF76BFE1120FEF780FEA54968469E +:10436000263105F05FF8A3489DF8002010F8251FBE +:1043700062F3470121F001010170002141724FF405 +:104380006171A0F8071002218172FEF7B1FE00B141 +:10439000FFDFFDF75DF801F084F908BD10B50C46AC +:1043A0004021204621F069F9A07F20F00300A0778A +:1043B000202020700020A07584F8230010BD7047D5 +:1043C0002DE9FC410746FCF77EFF10B11020BDE847 +:1043D000FC81884E06F12501D6F825000090B6F83C +:1043E0002950ADF8045096F82B408DF80640384619 +:1043F000FEF7E2FF0028EAD1FEF77AFE0028E6D0B9 +:10440000009946F8251FB580B471E0E710B5044661 +:10441000FCF77FFF08B1102010BD76487549224691 +:1044200090F8250026314008FEF7DDFF002010BD82 +:104430003EB504460D460846FCF76BFF08B1102058 +:104440003EBD14B143F204003EBD6A4880780528A1 +:1044500003D0042801D008203EBD694602A80AF016 +:10446000AEFA2A4669469DF80800FEF7BCFF002018 +:104470003EBDFEB50D4604004FF0000711D00822E6 +:10448000FEF7C2FE002811D1002608E054F82600ED +:104490006946FEF747FF002808D1761CF6B2AE4207 +:1044A000F4D30CF059F810B143F20320FEBD514E85 +:1044B00086F824700CB300271BE000BF54F82700D7 +:1044C00002A9FEF72FFF00B1FFDF9DF808008DF86D +:1044D000000054F8270050F8011FCDF80110808823 +:1044E000ADF8050068460CF05CF800B1FFDF7F1CFA +:1044F000FFB2AF42E2D386F824500020FEBD2DE982 +:10450000F0478AB01546894604001ED00F4608229F +:104510002946FEF779FE002811D1002613E000BFDE +:1045200054F826006946103000F0DAFC002806D165 +:104530003FB157F82600FCF7C6FE10B110200AB0B4 +:104540000BE4761CF6B2AE42EAD30026A5F10108D0 +:104550001CE000BF06F1010A0AF0FF0712E000BFED +:1045600054F82600017C4A0854F827100B7CB2EB63 +:10457000530F05D106221130113120F0D3FF58B16D +:104580007F1CFFB2AF42EBD30AF0FF064645E1DBEA +:104590004E4624B1012003E043F20520CFE700207E +:1045A0000CF024F810B90CF02DF810B143F20420EF +:1045B000C5E774B300270DF1170828E054F8270069 +:1045C0006946103000F08CFC00B1FFDF54F8270082 +:1045D000102250F8111FCDF801108088ADF80500A9 +:1045E00054F827100DF1070020F0C8FFAEB156F8BF +:1045F000271001E0EC0100201022404620F0BEFF11 +:1046000068460BF0B3FF00B1FFDF7F1CFFB2AF4283 +:10461000D4D3FEF733FF002091E7404601F0A0FC21 +:10462000EEE730B585B00446FCF74DFE18B960687A +:10463000FCF796FE10B1102005B030BD60884AF23C +:10464000B811884206D82078F84D28B1012806D044 +:10465000022804D00720EFE7FEF74AFD18E0607853 +:10466000022804D0032802D043F20220E4E785F8B0 +:104670002F00C1B200200090ADF8040002292CD018 +:10468000032927D0FFDF68460CF055F804F04AFDF7 +:104690000028D1D1606801F056FC207858B1012083 +:1046A0008DF800000DF1010001F05AFC68460DF094 +:1046B0005EFA00B1FFDF207885F82E00FEF7DEFEFF +:1046C000608860B1A88580B20BF088FF00B1FFDF81 +:1046D0000020B1E78DF80500D5E74020FAE74FF458 +:1046E0006170EFE710B50446FCF713FE20B960686F +:1046F00038B1FCF72CFE08B1102010BD606801F045 +:104700002FFCCA4830F82C1F6180C1786170807816 +:104710002070002010BD2DE9F84314468946064656 +:10472000FCF7F7FDA0B94846FCF71AFE80B9204611 +:10473000FCF716FE60B9BD4DA878012800D13CB148 +:104740003178FF2906D049B143F20400BDE8F8836F +:104750001020FBE7012801D00420F7E7CCB305289F +:1047600011D004280FD069462046FEF7A0FE00288D +:10477000ECD1217D49B1012909D0022909D00329B1 +:1047800009D00720E2E70820E0E7024604E0012222 +:1047900002E0022200E00322804623461746002062 +:1047A0000099FEF7BEFE0028D0D1A0892880A07B0A +:1047B000E875BDF80000A882AF75BDF800100907C4 +:1047C00001D5A18931B1A1892980C00704D0032076 +:1047D00003E006E08021F7E70220FEF727FC86F8D9 +:1047E00000804946BDE8F8430020FEF749BF7CB58C +:1047F0008E4C05460E46A078022803D0032801D02F +:1048000008207CBD15B143F204007CBD07200EF0EA +:10481000A1F810B9A078032806D0FEF735FC28B11E +:10482000A078032804D009E012207CBD13207CBDB1 +:10483000304600F013FB0028F9D1E670FEF79BFD2F +:1048400009F0FAFF01208DF800008DF801008DF8C5 +:1048500002502088ADF80400E07D8DF8060068461F +:104860000DF02EF804F05EFC0028E0D1A0780328BB +:1048700004D00420FEF7DAFB00207CBDE07800F0D5 +:10488000FDFA0520F6E71CB510B143F204001CBD8B +:10489000664CA078042803D0052801D008201CBD50 +:1048A00000208DF8000001218DF801108DF8020024 +:1048B00068460DF005F804F035FC0028EFD1A0782B +:1048C000052805D05FF00200FEF7B0FB00201CBDFC +:1048D000E07800F0E0FA0320F6E72DE9FC4180469D +:1048E0000E4603250846FCF73BFD002866D14046EE +:1048F000FEF7A9FD040004D02078222804D2082065 +:1049000065E543F2020062E5A07F00F003073EB1D7 +:10491000012F0CD000203146FEF751FC0500EFD1ED +:10492000012F06D0022F1AD0FFDF28464FE50120C5 +:10493000F1E7A07D3146022801D011B107E0112036 +:1049400045E56846FCF791FE0028D9D16946404606 +:1049500006F06CFD0500E8D10120A075E5E7A07D1B +:10496000032804D1314890F83000C00701D02EB39D +:104970000EE026B1A07F40071ED4002100E00121F7 +:10498000404606F073FD0500CFD1A075002ECCD0B7 +:104990003146404600F0AEFA05461128C5D1A07F49 +:1049A0004107C2D4316844F80E1F7168616040F05D +:1049B000040020740025B8E71125B6E7102006E5AD +:1049C00070B50C460546FEF73EFD010005D02246B7 +:1049D0002846BDE87040FEF739BD43F2020070BDC5 +:1049E00010B5012807D1114B9B78012B00D011B1D4 +:1049F00043F2040010BD0BF023FEBDE8104004F0AC +:104A000091BB012300F051BA00231A46194600F069 +:104A10004CBA70B506460C460846FCF754FC18B96B +:104A20002068FCF776FC18B1102070BDEC01002066 +:104A3000F84D2A7E112A04D0132A00D33EB1082053 +:104A4000F3E721463046FEF7A9FE60B1EDE7092005 +:104A5000132A0DD0142A0BD0A188FF29E5D31520E5 +:104A6000FEF7FCFA0020D4E90012C5E90712DCE7E2 +:104A7000A1881F29D9D31320F2E71CB5E548007E91 +:104A8000132801D208201CBD00208DF800006846C4 +:104A90000CF01FFA04F046FB0028F4D11120FEF7B9 +:104AA000DDFA00201CBD2DE9F04FDFF868A3814638 +:104AB00091B09AF818009B4615460C46132803D36C +:104AC000FFF7DBFF00281FD12046FCF7FCFBE8BB0B +:104AD0002846FCF7F8FBC8BB20784FF00107C00759 +:104AE0004FF0000102D08DF83A7001E08DF83A10D5 +:104AF00020788846C0F3C1008DF8000060788DF8FA +:104B00000910C10803D0072011B0BDE8F08FB0B381 +:104B1000C10701D08DF80970810705D59DF80910EE +:104B200041F002018DF80910400705D59DF80900F4 +:104B300040F004008DF809009DF80900810703D5B5 +:104B400040F001008DF80900002000E015E06E46FD +:104B500006EB400162884A81401CA288C0B20A82EA +:104B60000328F5D32078C0F3C100012825D00328FD +:104B700023D04846FCF7A7FB28B11020C4E7FFE785 +:104B80008DF80970D8E799F80000400808D001288E +:104B900009D0022807D0032805D043F20220B3E74A +:104BA0008DF8028001E08DF80270484650F8011F30 +:104BB000CDF803108088ADF80700FEF7DCFB8DF818 +:104BC00001000021424606EB41002B88C3826B881E +:104BD0008383AB884384EB880385491CC285C9B2B3 +:104BE00082860329EFD3E088ADF83C0068460CF0DC +:104BF000B5FA002887D19AF818005546112801D037 +:104C0000082081E706200DF0A5FE38B12078C0F31A +:104C1000C100012804D0032802D006E0122073E767 +:104C200095F8240000283FF46EAFFEF72DFA022815 +:104C300001D2132068E7584600F010F900289DD1F2 +:104C400085F819B068460CF0C9FB04F06BFA040053 +:104C500094D1687E00F012F91220FEF7FFF9204689 +:104C600052E770B56B4D287E122801D00820DCE693 +:104C70000CF0B7FB04F056FA040005D1687E00F092 +:104C80000AF91120FEF7EAF92046CEE670B506468D +:104C900015460C460846FCF73CFB18B92846FCF7BD +:104CA00038FB08B11020C0E62A46214630460CF0F9 +:104CB000A9FE04F037FA0028F5D121787F29F2D136 +:104CC0000520B2E67CB505460C460846FCF7FBFA23 +:104CD00008B110207CBD2846FEF7B5FB20B1007856 +:104CE000222804D208207CBD43F202007CBD494842 +:104CF00090F83000400701D511207CBD2078C00815 +:104D000002D16078C00801D007207CBDADF800500A +:104D100020788DF8020060788DF803000220ADF84D +:104D2000040068460BF0B6FF04F0FCF97CBD70B5DA +:104D300086B014460D460646FEF785FB28B100787E +:104D4000222805D2082006B06FE643F20200FAE7F7 +:104D50002846FCF705FB20B944B12046FCF7F7FADA +:104D600008B11020EFE700202060A080294890F8CB +:104D70003000800701D51120E5E703A930460BF08C +:104D8000CCFD10B104F0CEF9DDE7ADF80060BDF860 +:104D90001400ADF80200BDF81600ADF80400BDF82F +:104DA0001000BDF81210ADF80600ADF808107DB186 +:104DB000298809B1ADF80610698809B1ADF802106B +:104DC000A98809B1ADF80810E98809B1ADF8041057 +:104DD000DCB1BDF80610814201D9081A2080BDF867 +:104DE0000210BDF81400814201D9081A6080BDF894 +:104DF0000800BDF80410BDF816200144BDF81200EB +:104E00001044814201D9081AA08068460BF044FE84 +:104E1000B8E70000EC0100201CB554490968CDE951 +:104E2000001068460CF09CF904F07CF91CBD1CB520 +:104E300000200090019068460CF092F904F072F99D +:104E40001CBD10800888508048889080C8881081D8 +:104E50008888D080002050819081704710B504462A +:104E600004F0CCF830B1407830B1204604F0EBFBD0 +:104E7000002010BD052010BD122010BD10B504F09B +:104E8000BDF8040000D1FFDF607800B9FFDF607873 +:104E9000401E607010BD10B504F0B0F8040000D1E1 +:104EA000FFDF6078401C607010BD1CB5ADF80000DD +:104EB0008DF802308DF803108DF8042068460CF050 +:104EC00064FD04F02FF91CBD0CB529A2D2E9001233 +:104ED000CDE900120079694601EB501000780CBD55 +:104EE0000278520804D0012A02D043F2022070470F +:104EF000FEF718BA1FB56A46FFF7A3FF68460CF025 +:104F0000A3FA04F00FF904B010BD70B50C0006460A +:104F10000DD0FEF798FA050000D1FFDFA6802889A2 +:104F20002081288960816889A081A889E0817CE549 +:104F300010B500231A4603E0845C2343521CD2B20E +:104F40008A42F9D30BB1002010BD012010BD00B57D +:104F500040B1012805D0022803D0032804D0FFDF88 +:104F6000002000BDFF2000BD042000BD645A0200E7 +:104F7000070605040302010010B50446FCF7A3F977 +:104F800008B1102010BD2078C0F30210042807D803 +:104F90006078072804D3A178102901D8814201D272 +:104FA000072010BDE078410706D421794A0703D4D1 +:104FB000000701D4080701D5062010BD002010BD50 +:104FC00010B513785C08837F64F3C7138377137875 +:104FD0009C08C37F64F30003C3771078C309487843 +:104FE00063F34100487013781C090B7864F347138E +:104FF0000B701378DB0863F3000048705078487139 +:1050000010BD10B5C4780B7864F300030B70C4783E +:10501000640864F341030B70C478A40864F382034A +:105020000B70C478E40864F3C3030B700379117840 +:1050300063F30001117003795B0863F341011170A0 +:1050400003799B0863F3820111700079C00860F353 +:10505000C301117010BD70B514460D46064604F02C +:105060004BFA80B10178182221F00F01891C21F040 +:10507000F001A03100F8081B214620F0C4FABDE879 +:10508000704004F03CBA29463046BDE87040132217 +:10509000FEF7DCB92DE9F047064608A8894690E8F6 +:1050A00030041F4690461421284620F008FB0021BA +:1050B000CAF80010B8F1000F03D0B9F1000F03D106 +:1050C00014E03878C00711D02068FCF722F9C0BB83 +:1050D000B8F1000F07D12068123028602068143022 +:1050E00068602068A8602168CAF8001038788007D6 +:1050F00024D56068FCF72BF918BBB9F1000F21D05B +:10510000FFF71EF90168C6F868118188A6F86C11CE +:10511000807986F86E0101F0F8FCF94FEF60626863 +:1051200062B196F8680106F2691140081032FEF784 +:105130005AF910223946606820F020FA0020BDE8B4 +:10514000F08706E0606820B1E8606068C6F8640136 +:10515000F4E71020F3E730B5054608780C4620F058 +:105160000F00401C20F0F001103121700020607011 +:1051700095F8230030B104280FD0052811D0062857 +:1051800014D0FFDF20780121B1EB101F04D295F875 +:10519000200000F01F00607030BD21F0F0002030D2 +:1051A00002E021F0F00030302070EBE721F0F00059 +:1051B0004030F9E7F0B591B0022715460C46064697 +:1051C0003A46ADF80870092103AB05F004F80490E5 +:1051D000002810D004208DF804008DF80170E03410 +:1051E000099605948DF818500AA968460FF0F2F850 +:1051F00000B1FFDF012011B0F0BD10B588B00C4642 +:105200000A99ADF80000C3B11868CDF802005868DB +:10521000CDF80600ADF80A20102203A820F0AEF960 +:1052200068460CF081F903F07DFF002803D1A17FCF +:1052300041F01001A17708B010BD0020CDF80200A8 +:10524000E6E72DE9F84F0646808A0D4680B2824691 +:10525000FEF7F9F804463078DFF8A48200274FF013 +:105260000209A8F120080F2870D2DFE800F06FF2E1 +:105270003708387D8CC8F1F0EFF35FF3F300A07FBF +:1052800000F00300022809D05FF0000080F0010167 +:1052900050460DF0AFFB050003D101E00120F5E71A +:1052A000FFDF98F85C10C90702D0D8F860000BE067 +:1052B000032105F11D0010F0E0FDD5F81D00914916 +:1052C000B0FBF1F201FB1200C5F81D0070686867C1 +:1052D000B068A8672078252800D0FFDFCAE0A07F4B +:1052E00000F00300022809D05FF0000080F0010107 +:1052F00050460DF07FFB060003D101E00120F5E7E9 +:10530000FFDF3078810702D52178252904D040F0CD +:1053100001003070BDE8F88F85F80090307F28716B +:1053200006F11D002D36C5E90206F3E7A07F00F067 +:105330000300022808D0002080F0010150460DF043 +:1053400059FB040004D102E00120F5E7A7E1FFDFEB +:105350002078C10604D5072028703D346C60D9E759 +:1053600040F008002070D5E7E07F000700D5FFDFA0 +:10537000307CB28800F0010301B05046BDE8F04F28 +:10538000092105F0B3BD04B9FFDF716821B1102216 +:1053900004F1240020F0F2F828212046FDF7BAFE9F +:1053A000A07F00F0030002280ED104F124000023A6 +:1053B00000901A4621465046FFF71FFF112807D0DC +:1053C00029212046FDF7A6FE307A84F82000A1E7C7 +:1053D000A07F000700D5FFDF14F81E0F40F0080083 +:1053E0002070E782A761E761C109607861F341003D +:1053F000014660F382016170307AE0708AE7A07F35 +:1054000000F00300022809D05FF0000080F00101E5 +:1054100050460DF0EFFA040003D101E00120F5E75A +:10542000FFDF022104F1850010F027FD0420287021 +:1054300004F5B4706860B4F88500288230481038EC +:105440007C346C61C5E9028064E703E024E15BE041 +:105450002DE015E0A07F00F00300022807D0002017 +:1054600080F0010150460DF0C5FA18B901E00120A5 +:10547000F6E7FFDF324621465046BDE8F84FEAE541 +:1054800004B9FFDF20782128A1D93079012803D180 +:10549000E07F40F00800E077324621465046FFF7B3 +:1054A000DAFD2046BDE8F84F2321FDF733BE3279FF +:1054B000AA8005F108030921504604F08CFEE8603B +:1054C00010B10520287025E7A07F00F00300022816 +:1054D00008D0002080F0010150460DF08BFA040046 +:1054E00003D101E00120F5E7FFDF04F162010223AF +:1054F0001022081F0DF005F907703179417009E796 +:105500004C02002040420F00A07F00F00300022860 +:1055100008D0002080F0010150460DF06BFA050024 +:1055200003D101E00120F5E7FFDF95F8840000F0EA +:10553000030001287AD1A07F00F00307E07F10F07C +:10554000010602D0022F04D133E095F8A000C00775 +:105550002BD0D5F8601121B395F88320087C62F335 +:1055600087000874A17FCA09D5F8601162F3410071 +:105570000874D5F8601166F300000874AEB1D5F870 +:105580006001102204F1240188351FF0F7FF287E06 +:1055900040F001002876287820F0010005F88809FD +:1055A00000E016B1022F04D02DE095F88800C00766 +:1055B00027D0D5F85C1121B395F88320087C62F3DD +:1055C00087000874A17FCA09D5F85C1162F3410015 +:1055D0000874D5F85C1166F3000008748EB1D5F834 +:1055E0005C01102204F1240188351FF0C7FF2878E0 +:1055F00040F0010005F8180B287820F0010005F8AC +:10560000A009022F44D0002000EB400005EBC000B1 +:1056100090F88800800709D595F87C00D5F86421BA +:10562000400805F17D011032FDF7DDFE8DF8009098 +:1056300095F884006A4600F003008DF8010095F8A3 +:1056400088108DF8021095F8A0008DF8030021460F +:10565000504601F043FA2078252805D0212807D0AC +:10566000FFDF2078222803D922212046FDF752FDB2 +:10567000A07F00F0030002280CD0002080F0010180 +:1056800050460DF0C9F900283FF44FAEFFDF41E668 +:105690000120B9E70120F1E7706847703AE6FFDFC3 +:1056A00038E670B5FE4C002584F85C5025660EF097 +:1056B0005EFE04F11001204603F0DAFE84F830505B +:1056C00070BD70B50D46FDF7BEFE040000D1FFDFD2 +:1056D0004FF4B87128461FF0F2FF04F1240028614E +:1056E000A07F00F00300022808D0012105F1E000AE +:1056F0000EF03EFE002800D0FFDF70BD0221F5E76E +:105700000A46014602F1E0000EF052BE70B50546B1 +:10571000406886B001780A2906D00D2933D00E29B9 +:105720002FD0FFDF06B070BD86883046FDF78BFEB8 +:10573000040000D1FFDF20782128F3D028281BD1D6 +:10574000686802210E3001F0BEF9A8B1686808212E +:10575000801D01F0B8F978B104F1240130460CF055 +:10576000B1F803F0DFFC00B1FFDF06B02046BDE872 +:1057700070402921FDF7CEBC06B0BDE8704003F0B3 +:10578000BEBE012101726868C6883046FDF75BFE27 +:10579000040000D1FFDFA07F00F00301022902D145 +:1057A00020F01000A077207821280AD06868017ABC +:1057B00009B1007980B1A07F00F00300022862D017 +:1057C000FFDFA07F00F003000228ABD1FEF78DF8C9 +:1057D0000028A7D0FFDFA5E703F091FEA17F080610 +:1057E0002BD5E07FC00705D094F8200000F01F0003 +:1057F000102820D05FF0050084F8230020782928A5 +:105800001DD02428DDD13146042010F015FE2221C0 +:105810002046FDF77FFCA07F00F00300022830D077 +:105820005FF0000080F0010130460DF0F5F800282F +:10583000C7D0FFDFC5E70620DEE70420DCE701F084 +:105840000300022808D0002080F0010130460DF04E +:10585000D1F8050003D101E00120F5E7FFDF2521A4 +:105860002046FDF757FC03208DF80000694605F13E +:10587000E0000EF094FD0228A3D00028A1D0FFDFA5 +:105880009FE70120CEE703F03AFE9AE72DE9F043C7 +:1058900087B09946164688460746FDF7D4FD0400B2 +:1058A0004BD02078222848D3232846D0E07F000719 +:1058B00043D4A07F00F00300022809D05FF000006D +:1058C00080F0010138460DF095F8050002D00CE09B +:1058D0000120F5E7A07F00F00300022805D0012198 +:1058E000002238460DF07DF805466946284601F04D +:1058F0001CF9009800B9FFDF45B10098E03505615B +:105900002078222806D0242804D007E0009900201F +:10591000086103E025212046FDF7FCFB00980121EA +:1059200041704762868001A9C0E902890EF052FDEC +:10593000022802D0002800D0FFDF07B0BDE8F083C6 +:1059400070B586B00546FDF77EFD017822291ED987 +:10595000807F00F00300022808D0002080F00101C1 +:1059600028460DF047F804002FD101E00120F5E7AB +:10597000FFDF2AE0B4F85E0004F1620630440178EB +:10598000427829B121462846FFF714FCB0B9C9E690 +:10599000ADF804200921284602AB04F01CFC03905A +:1059A0000028F4D005208DF80000694604F1E000DD +:1059B0000EF0F5FC022801D000B1FFDF0223102217 +:1059C000314604F15E000CF0D2FEB4F8600000280D +:1059D000D0D1A7E610B586B00446FDF734FD0178B6 +:1059E00022291BD9807F00F00300022808D0002064 +:1059F00080F0010120460CF0FDFF040003D101E01E +:105A00000120F5E7FFDF06208DF80000694604F16C +:105A1000E0000EF0C4FC002800D0FFDF06B010BD8F +:105A20002DE9F05F05460C460027007890460109F5 +:105A30003E4604F1080BBA4602297DD0072902D060 +:105A40000A2909D146E0686801780A2905D00D299C +:105A500030D00E292ED0FFDFBBE114271C26002CEE +:105A60006BD08088A080FDF7EEFC5FEA000900D1D2 +:105A7000FFDF99F817005A46400809F11801FDF7B1 +:105A8000B2FC6868C0892082696851F8060FC4F8C2 +:105A900012004868C4F81600A07E20F0060001E05D +:105AA0002C02002040F00100A07699F81E0040F082 +:105AB00020014DE01A270A26002CD1D0C088A080F2 +:105AC000FDF7C1FC050000D1FFDF59462846FFF76E +:105AD00042FB7EE10CB1A88BA080287A0B287DD0F8 +:105AE00006DC01287BD0022808D0032804D135E049 +:105AF0000D2875D00E2874D0FFDF6AE11E27092615 +:105B0000002CADD0A088FDF79EFC5FEA000900D113 +:105B1000FFDF287B00F003000128207A1BD020F053 +:105B200001002072297B890861F341002072297BE2 +:105B3000C90861F3820001E041E1F2E02072297BB3 +:105B4000090961F3C300207299F81E0040F040017A +:105B500089F81E103DE140F00100E2E713270D2611 +:105B6000002CAAD0A088FDF76EFC8146807F00F053 +:105B70000300022808D0002080F00101A0880CF06A +:105B800039FF050003D101E00120F5E7FFDF99F8B7 +:105B90001E0000F00302022A50D0686F817801F0E5 +:105BA00003010129217A4BD021F001012172837870 +:105BB0009B0863F3410121728378DB0863F3820160 +:105BC000217283781B0963F3C3012172037863F3A5 +:105BD00006112172437863F3C71103E061E0A9E085 +:105BE00090E0A1E0217284F809A0C178A172022A94 +:105BF00029D00279E17A62F30001E1720279520858 +:105C000062F34101E1720279920862F38201E1726A +:105C10000279D20862F3C301E1724279217B62F317 +:105C2000000121734279520862F3410121734279E4 +:105C3000920862F382012173407928E0A86FADE7F2 +:105C400041F00101B2E74279E17A62F30001E172C9 +:105C50004279520862F34101E1724279920862F39B +:105C60008201E1724279D20862F3C301E1720279E2 +:105C7000217B62F3000121730279520862F3410132 +:105C800021730279920862F3820121730079C008BE +:105C900060F3C301217399F80000232831D926212C +:105CA00040E018271026E4B3A088FDF7CCFB83461C +:105CB000807F00F00300022809D0002080F001015D +:105CC000A0880CF097FE5FEA000903D101E00120F3 +:105CD000F4E7FFDFE868A06099F8000040F00401F5 +:105CE00089F8001099F80100800708D50120207379 +:105CF0009BF8000023286CD92721584651E084F8EE +:105D00000CA066E015270F265CB1A088FDF79BFB71 +:105D1000814606225946E86808F0CBFA0120A073B4 +:105D2000A0E041E048463CE016270926E4B3287B82 +:105D300020724EE0287B19270E26ACB3C4F808A0C9 +:105D4000A4F80CA0012807D0022805D0032805D00C +:105D5000042803D0FFDF0DE0207207E0697B0428F0 +:105D600001F00F0141F0800121721ED0607A20F015 +:105D700003006072A088FDF766FB054600782128C5 +:105D800027D0232800D0FFDFA87F00F003000228DF +:105D900013D0002080F00101A0880CF03DFE2221EC +:105DA0002846FDF7B7F914E004E0607A20F003001C +:105DB000401CDEE7A8F8006010E00120EAE70CB123 +:105DC0006888A080287A68B301280AD002284FD0BA +:105DD000FFDFA8F800600CB1278066800020BDE8D6 +:105DE000F09F15270F26002CE4D0A088FDF72BFB91 +:105DF000807F00F00300022808D0002080F001011D +:105E0000A0880CF0F7FD050003D101E00120F5E7C3 +:105E1000FFDFD5F81D000622594608F04AFA84F83B +:105E20000EA0D6E717270926002CC3D0A088FDF7BF +:105E30000AFB8146807F00F00300022808D0002082 +:105E400080F00101A0880CF0D5FD050003D101E030 +:105E50000120F5E7FFDF6878800701D5022000E028 +:105E60000120207299F800002328B2D9272159E790 +:105E700019270E26002C9DD0A088FDF7E4FA5FEAD2 +:105E8000000900D1FFDFC4F808A0A4F80CA084F832 +:105E900008A0A07A40F00300A07299F81E10C9096A +:105EA00061F38200A07299F81F2099F81E1012EA7F +:105EB000D11F05D099F8201001F01F0110292BD017 +:105EC00020F00800A07299F81F10607A61F3C300F7 +:105ED0006072697A01F003010129A2D140F0040047 +:105EE000607299F81E0000F003000228E87A16D0CC +:105EF000217B60F300012173AA7A607B62F30000CA +:105F00006073EA7A520862F341012173A97A490861 +:105F100061F3410060735CE740F00800D2E7617B09 +:105F200060F300016173AA7A207B62F300002073A2 +:105F3000EA7A520862F341016173A97A490861F370 +:105F40004100207345E710B5FE4C30B101461022E8 +:105F500004F120001FF012FB012084F8300010BD76 +:105F600010B5044600F0D1FDF64920461022BDE8E8 +:105F7000104020311FF002BB70B5F24D06004FF00B +:105F8000000413D0FBF79FF908B110240CE00621A0 +:105F9000304608F075F9411C05D028665FF0010015 +:105FA00085F85C0000E00724204670BD0020F7E77C +:105FB000007810F00F0204D0012A05D0022A0CD17B +:105FC00010E0000909D10AE00009012807D00228E1 +:105FD00005D0032803D0042801D00720704708709B +:105FE000002070470620704705282AD2DFE800F01D +:105FF00003070F171F00087820F0FF001EE0087845 +:1060000020F00F00401C20F0F000103016E008785F +:1060100020F00F00401C20F0F00020300EE0087847 +:1060200020F00F00401C20F0F000303006E008782F +:1060300020F00F00401C20F0F000403008700020DD +:106040007047072070472DE9F041804688B00D4623 +:1060500000270846FBF784F9A8B94046FDF7F3F995 +:10606000040003D02078222815D104E043F2020076 +:1060700008B0BDE8F08145B9A07F410603D500F026 +:106080000300022801D01020F2E7A07FC10601D44E +:10609000010702D50DB10820EAE7E17F090701D524 +:1060A0000D20E5E700F00300022805D125B12846C0 +:1060B000FEF762FF0700DBD1A07F00F0030002289B +:1060C00008D0002080F0010140460CF093FC06004F +:1060D00002D00FE00120F5E7A07F00F003000228C6 +:1060E0000ED0002080F00101002240460CF079FC27 +:1060F000060007D0A07F00F00300022804D009E0CA +:106100000120EFE70420B3E725B12A4631462046B7 +:10611000FEF756FF6946304600F007FD009800B9CB +:10612000FFDF0099022006F1E0024870C1F82480E8 +:106130004A6100220A81A27F02F00302022A1CD0D7 +:1061400001200871287800F00102087E62F3010046 +:1061500008762A78520862F3820008762A78920834 +:1061600062F3C30008762A78D20862F30410087636 +:1061700024212046FCF7CEFF33E035B30871301DF3 +:1061800088613078400908777078C0F3400048771C +:10619000287800F00102887F62F301008877A27FEF +:1061A000D20962F382008877E27F62F3C3008877C6 +:1061B000727862F304108877A878C87701F1210219 +:1061C00028462031FEF71DFF03E00320087105205B +:1061D000087625212046FCF79DFFA07F20F0400097 +:1061E000A07701A900980EF0F5F8022801D000B1BF +:1061F000FFDF38463CE72DE9FF4F534A0D4699B083 +:106200009A4607CA0AAB002783E807001998FDF7EA +:106210001AF9060006D03078262806D008201DB0CE +:10622000BDE8F08F43F20200F9E7B07F00F0030908 +:10623000B9F1020F0AD05DB91B98FEF79DFE002848 +:10624000EDD1B07F00F00300022801D11B9890BB74 +:10625000B07F00F00300022808D0002080F0010188 +:1062600019980CF0C7FB040003D101E00120F5E709 +:10627000FFDF852D28D007DCF5B1812D1ED0822DC2 +:106280001ED0832D08D11DE0862D1FD0882D1FD054 +:10629000892D1FD08A2D1FD00F2020710F281DD0CF +:1062A00003F02AF9E0B101208DF83C00201D109088 +:1062B0002079B8B15BE111E00020EEE70120ECE7C6 +:1062C0000220EAE70320E8E70520E6E70620E4E706 +:1062D0000820E2E70920E0E70A20DEE707209EE742 +:1062E00011209CE7B9F1020F03D0A56F03D1A06F75 +:1062F00002E0656FFAE7606F804632D04FF0010030 +:1063000001904FF002000090214630461B9AFEF7A4 +:1063100057FE1B98007800F00101A87861F3010096 +:10632000A870B17FC90961F38200A870F17F61F3A1 +:10633000C300A870617861F30410A8702078400948 +:10634000287003E02C0200206C5A02006078C0F331 +:10635000400068701B988078E87000206871287190 +:1063600003E00220019001200090A87898F8021024 +:10637000C0F3C000C1F3C00108405FEA000B2DD09C +:106380005046FAF7A0FF78BBDAF80C00FAF79BFF4B +:1063900050BBDAF81C00FAF796FF28BBDAF80C00BD +:1063A000A060DAF81C00E060607898F8012042EA0A +:1063B000500100BF61F34100607098F80210C0B254 +:1063C00000EA111161F3000060700020207700994D +:1063D00006F11700022908D0012107E0607898F83B +:1063E000012002EA5001E5E732E0002104EB8101DF +:1063F00048610199701C022901D0012100E00021AF +:1064000004EB81014861A87800F00300012857D10E +:1064100098F8020000F00300012851D1B9F1020FF1 +:1064200004D02A1D691D1B98FEF7EBFD287998F80A +:10643000041008408DF83400697998F8052011405F +:106440008DF8381008433BD05046FAF73CFF08B1AE +:106450001020E4E60AF110010491B9F1020F17D0FF +:106460000846002104F18C03CDE9000304F5AE7267 +:1064700002920DAB5A462046FEF70CFE0028E8D1EA +:10648000B9F1020F08D0504608D14FF0010107E0E2 +:1064900050464FF00101E5E70498F5E74FF00001A1 +:1064A00004F1A403CDE9000304F5B072029281F077 +:1064B00001010EAB5A462046FEF7ECFD0028C8D17C +:1064C0006078800734D4A87898F80210C0F3800070 +:1064D000C1F3800108432BD0297898F800000AAA5C +:1064E000B9F1020F06D032F811204300DA4002F071 +:1064F00003070AE032F810204B00DA4012F00307DD +:1065000005D0012F0BD0022F0BD0032F07D0BBF1EA +:10651000000F0DD0012906D0042904D008E002277D +:10652000F5E70127F3E7012801D0042800D104276B +:10653000B07F40F08000B077F17F6BF30001F1771E +:106540006078800706D50320A071BBF1000F0ED143 +:10655000002028E00220022F18D0012F18D0042F8D +:1065600029D00020A071B07F20F08000B0772521D5 +:106570003046FCF7CFFD0FA904F1E0000DF00FFF4E +:1065800010B1022800D0FFDF002048E6A071DFE74D +:10659000A0710D2104F120001FF091F8207840F047 +:1065A0000200207001208DF85C0017AA314619986E +:1065B00000F094FADBE70120A071D8E72DE9F04361 +:1065C00087B09046894604460025FCF73CFF06004C +:1065D00006D03078272806D0082007B0BDE8F08321 +:1065E00043F20200F9E7B07F00F00300022809D06F +:1065F0005FF0000080F0010120460CF0FBF9040080 +:1066000003D101E00120F5E7FFDFA7795FEA090088 +:1066100005D0012821D0B9F1020F26D110E0B8F140 +:10662000000F22D1012F05D0022F05D0032F05D056 +:10663000FFDF2DE00C252BE0012529E0022527E0D6 +:106640004046FAF740FEB0B9032F0ED11022414662 +:1066500004F11D001EF092FF1AE0012F02D0022F5C +:1066600003D104E0B8F1000F12D00720B5E740468F +:10667000FAF729FE08B11020AFE7102104F11D0040 +:106680001EF0FBFF0621404607F0FAFDC4F81D008E +:106690002078252140F0020020703046FCF73AFDBA +:1066A0002078C10713D020F00100207002208DF85F +:1066B000000004F11D0002908DF804506946C330BB +:1066C0000DF06DFE022803D010B1FFDF00E025774A +:1066D000002082E730B587B00D460446FCF7B3FED4 +:1066E000A0B1807F00F00300022812D05FF000000C +:1066F00080F0010120460CF07DF904000ED0284600 +:10670000FAF7E1FD38B1102007B030BD43F20200C6 +:10671000FAE70120ECE72078400701D40820F3E7EE +:10672000294604F13D00202205461EF027FF20786F +:1067300040F01000207001070FD520F008002070F5 +:1067400007208DF80000694604F1E00001950DF086 +:1067500026FE022801D000B1FFDF0020D4E770B58B +:106760000D460646FCF76FFE18B10178272921D1A6 +:1067700002E043F2020070BD807F00F003000228B7 +:1067800008D0002080F0010130460CF033F90400FD +:1067900003D101E00120F5E7FFDFA079022809D14C +:1067A0006078C00706D02A4621463046FEF702FD33 +:1067B00010B10FE0082070BDB4F860000E280BD2B5 +:1067C00004F1620102231022081F0BF09AFF01213D +:1067D00001704570002070BD112070BD70B5064677 +:1067E00014460D460846FAF76EFD18B92046FAF72A +:1067F00090FD08B1102070BDA6F57F40FF380ED087 +:106800003046FCF720FE38B1417822464B08811C07 +:106810001846FCF7E8FD07E043F2020070BD204691 +:10682000FDF7F4FD0028F9D11021E01D0FF025FB44 +:10683000E21D294604F1170000F087F9002070BD21 +:106840002DE9F04104468AB01546884600270846DF +:10685000FAF786FD18B92846FAF782FD10B1102024 +:106860000AB006E42046FCF7EEFD060003D03078BF +:1068700027281AD102E043F20200F1E7B07F00F0CE +:106880000300022808D0002080F0010120460CF00F +:10689000B1F8040003D101E00120F5E7FFDF207823 +:1068A000400702D56078800701D40820D8E7B07F80 +:1068B00000F00300022803D0A06F03D1A16F02E013 +:1068C000606FFAE7616F407800B19DB1487810B110 +:1068D000B8F1000F0ED0ADB1EA1D06A8E16800F0D6 +:1068E00034F9102206A905F117001EF01BFE18B19D +:1068F000042707E00720B3E71022E91D04F12D006B +:106900001EF03CFEB8F1000F06D0102208F107017E +:1069100004F11D001EF032FE2078252140F0020017 +:1069200020703046FCF7F6FB2078C10715D020F028 +:106930000100207002208DF8000004F11D0002907B +:10694000103003908DF804706946B3300DF027FDC8 +:10695000022803D010B1FFDF00E0277700207FE797 +:10696000F8B515460E460746FCF76DFD040004D049 +:106970002078222804D00820F8BD43F20200F8BD98 +:10698000A07F00F00300022802D043F20500F8BD0A +:106990003046FAF798FC18B92846FAF794FC08B183 +:1069A0001020F8BD00953288B31C21463846FEF70A +:1069B00024FC112815D00028F3D1297C4A08A17F96 +:1069C00062F3C711A177297CE27F61F30002E277CD +:1069D000297C890884F82010A17F21F04001A1774B +:1069E000F8BDA17F0907FBD4D6F80200C4F8360031 +:1069F000D6F80600C4F83A003088A086102229464E +:106A000004F124001EF0BAFD287C4108E07F61F308 +:106A10004100E077297C61F38200E077287C8008E0 +:106A200084F82100A07F40F00800A0770020D3E781 +:106A300070B50D4606460BB1072070BDFCF703FD8F +:106A4000040007D02078222802D3A07F800604D437 +:106A5000082070BD43F2020070BDADB1294630463A +:106A60000AF030FF02F05EFB297C4A08A17F62F346 +:106A7000C711A177297CE27F61F30002E277297CCC +:106A8000890884F8201004E030460AF03EFF02F046 +:106A900049FBA17F21F02001A17770BD70B50D46A3 +:106AA000FCF7D1FC040005D02846FAF732FC20B1EF +:106AB000102070BD43F2020070BD29462046FEF74B +:106AC0004AFB002070BD04E010F8012B0AB1002041 +:106AD0007047491E89B2F7D20120704770B515463C +:106AE000064602F009FD040000D1FFDF207820F007 +:106AF0000F00801C20F0F000203020706680286895 +:106B0000A060BDE8704002F0FABC10B5134C94F8D8 +:106B10003000002808D104F12001A1F110000DF08F +:106B200080FC012084F8300010BD10B190F8B9202D +:106B30002AB10A4890F8350018B1002003E0B830B7 +:106B400001E0064834300860704708B50023009320 +:106B500013460A460CF049F908BD00002C0200203B +:106B600018B18178012938D101E0102070470188DF +:106B700042F60112881A914231D018DC42F6010225 +:106B8000A1EB020091422AD00CDC41B3B1F5C05F09 +:106B900025D06FF4C050081821D0A0F57060FF38E0 +:106BA0001BD11CE001281AD002280AD117E0B0F549 +:106BB000807F14D008DC012811D002280FD00328D0 +:106BC0000DD0FF2809D10AE0B0F5817F07D0A0F5EC +:106BD0008070033803D0012801D0002070470F20B7 +:106BE00070470A281FD008DC0A2818D2DFE800F016 +:106BF000191B1F1F171F231D1F21102815D008DC6C +:106C00000B2812D00C2810D00D2816D00F2806D132 +:106C10000DE011280BD084280BD087280FD003203B +:106C200070470020704705207047072070470F20ED +:106C3000704704207047062070470C20704743F2CD +:106C40000200704738B50C46050041D06946FFF791 +:106C5000AFF9002819D19DF80010607861F30200A7 +:106C600060706946681CFFF7A3F900280DD19DF8F4 +:106C70000010607861F3C5006070A978C1F341012C +:106C8000012903D0022905D0072038BD217821F041 +:106C9000200102E0217841F020012170410704D059 +:106CA000A978C90861F386106070607810F0380F19 +:106CB00007D0A978090961F3C710607010F0380F88 +:106CC00002D16078400603D5207840F04000207063 +:106CD000002038BD70B50446002008801546606865 +:106CE000FFF7B0FF002816D12089A189884211D86A +:106CF00060688078C0070AD0B1F5007F0AD840F2FA +:106D00000120B1FBF0F200FB1210288007E0B1F582 +:106D1000FF7F01D90C2070BD01F2012129800020E4 +:106D200070BD10B50478137864F300031370047811 +:106D3000640864F3410313700478A40864F38203C5 +:106D400013700478E40864F3C3031370047824090F +:106D500064F3041313700478640964F34513137027 +:106D60000078800960F38613137031B10878C10789 +:106D700001D1800701D5012000E0002060F3C71396 +:106D8000137010BD4278530702D002F0070306E0EB +:106D900012F0380F02D0C2F3C20300E001234A7898 +:106DA00063F302024A70407810F0380F02D0C0F34B +:106DB000C20005E0430702D000F0070000E0012018 +:106DC00060F3C5024A7070472DE9F04F95B00D0091 +:106DD000824612D0122128461EF04FFC4FF6FF7B50 +:106DE00005AA0121584607F066F8002426463746D2 +:106DF0004FF420586FF4205973E0102015B0BDE80F +:106E0000F08F00BF9DF81E0001280AD1BDF81C10AC +:106E100041450BD011EB09000AD001280CD0022803 +:106E20000CD0042C0ED0052C0FD10DE0012400E075 +:106E30000224BDF81A6008E0032406E00424BDF82B +:106E40001A7002E0052400E00624BDF81A1051452E +:106E500047D12C74BEB34FF0000810AA4FF0070AB8 +:106E6000CDE90282CDE900A80DF13C091023CDF84F +:106E7000109042463146584607F0D0F808BBBDF89E +:106E80003C002A46C0B210A90DF041FBC8B9AE8142 +:106E9000CFB1CDE900A80DF1080C0AAE40468CE850 +:106EA0004102132300223946584607F0B7F840B98B +:106EB000BDF83C00F11CC01EC0B22A1D0DF027FB1E +:106EC00010B103209AE70AE0BDF82900E881062CFA +:106ED00005D19DF81E00A872BDF81C002881002075 +:106EE0008CE705A806F0F3FF00288BD0FFF779FEAA +:106EF00084E72DE9F0471C46DDE90978DDF82090AC +:106F000015460E00824600D1FFDF0CB1208818B173 +:106F1000D5B11120BDE8F087022D01D0012100E09C +:106F2000002106F1140005F0B5FEA8F800000246A5 +:106F30003B462946504603F04EF9C9F8000008B90F +:106F4000A41C3C600020E5E71320E3E7F0B41446FE +:106F5000DDE904528DB1002314B1022C09D101E006 +:106F6000012306E00D7CEE0703D025F00105012387 +:106F70000D742146F0BC03F0B9BF1A80F0BC704715 +:106F80002DE9FE4F91461A881C468A468046FAB182 +:106F900002AB494603F01FF9050019D04046A61C74 +:106FA00027880BF06BFE3246072629463B460096A3 +:106FB0000BF079FA20882346CDE900504A46514625 +:106FC0004046FFF7C3FF002020800120BDE8FE8F70 +:106FD0000020FBE72DE9F04786B082460EA89046D8 +:106FE00090E8B000894604AA05A903A88DE8070027 +:106FF0001E462A4621465046FFF77BFF039901B102 +:1070000001213970002818D1F94904F1140204ABA8 +:107010000860039805998DE80700424649465046A6 +:1070200006F0EFF9A8B1092811D2DFE800F0050851 +:107030000510100A0C0C0E00002006B06AE71120A3 +:10704000FBE70720F9E70820F7E70D20F5E7032025 +:10705000F3E7BDF810100398CDE9000133462A4646 +:1070600021465046FFF772FFE6E72DE9F04389B06D +:107070000D46DDE9108781461C461646142103A8FB +:107080001EF01DFB012002218DF810108DF80C0060 +:107090008DF81170ADF8146064B1A278D20709D0F0 +:1070A0008DF81600E088ADF81A00A088ADF8180039 +:1070B000A068079008A80095CDE90110424603A9F1 +:1070C00048466B68FFF786FF09B0BDE8F083F0B56E +:1070D0008BB000240646069407940727089405A859 +:1070E0000994019400970294CDE903400D461023C2 +:1070F0002246304606F092FF78B90AA806A9019404 +:1071000000970294CDE90310BDF8143000222946FF +:10711000304606F059FD002801D0FFF762FD0BB0A4 +:10712000F0BD06F0F9BB2DE9FC410C468046002677 +:1071300002F0E2F9054620780D287DD2DFE800F064 +:10714000BC0713B325BD49496383AF959B00A8488D +:10715000006820B1417841F010014170ADE0404637 +:1071600002F0FAF9A9E0042140460BF043FC0700C5 +:1071700000D1FFDF07F11401404605F01FFDA5BB5C +:1071800013214046FDF71CFC97E0042140460BF01C +:1071900031FC070000D1FFDFE088ADF800000020DF +:1071A000B8819DF80000010704D5C00602D5A0886B +:1071B000B88105E09DF8010040067ED5A088F881E1 +:1071C00005B9FFDF22462946404601F0BDFC0226F4 +:1071D00073E0E188ADF800109DF8011009060FD5A5 +:1071E000072803D006280AD00AE024E004214046FC +:1071F0000BF000FC060000D1FFDFA088F081022622 +:10720000CDB9FFDF17E0042140460BF0F3FB070088 +:1072100000D1FFDF07F1140006F0B5FB90F0010F7D +:1072200002D1E079000648D5387C022640F0020001 +:10723000387405B9FFDF00E03EE0224629464046AB +:1072400001F082FC39E0042140460BF0D3FB017CC5 +:10725000002D01F00206C1F340016171017C21F0B3 +:1072600002010174E7D1FFDFE5E702260121404674 +:1072700002F0A4F921E0042140460BF0BBFB0546D7 +:10728000606800902089ADF80400012269464046FC +:1072900002F0B5F9287C20F0020028740DE0002DE2 +:1072A000C9D1FFDFC7E7022600214046FBF70CF9F2 +:1072B000002DC0D1FFDFBEE7FFDF3046BDE8FC8117 +:1072C0003EB50C0009D001466B4601AA002006F02D +:1072D00027FF20B1FFF785FC3EBD10203EBD0020FA +:1072E0002080A0709DF8050002A900F00700FEF7BD +:1072F0007BFE50B99DF8080020709DF8050002A99A +:10730000C0F3C200FEF770FE08B103203EBD9DF839 +:10731000080060709DF80500C109A07861F30410B1 +:10732000A0709DF80510890961F3C300A0709DF855 +:107330000410890601D5022100E0012161F3420019 +:107340009DF8001061F30000A07000203EBD70B5F4 +:10735000144606460D4651EA040005D075B10846AC +:10736000F9F7F5FF78B901E0072070BD29463046EE +:1073700006F037FF10B1BDE8704032E454B120464A +:10738000F9F7E5FF08B1102070BD21463046BDE891 +:10739000704095E7002070BD2DE9FC5F0C469046DB +:1073A0000546002701780822007A3E46B2EB111FFD +:1073B0007ED104F10A0100910A31821E4FF0020AC7 +:1073C00004F1080B0191092A73D2DFE802F0ECDF27 +:1073D00005F427277AA9CD00688804210BF00AFB61 +:1073E000060000D1FFDFB08920B152270726C2E096 +:1073F0009002002051271026002C7DD06888A080A4 +:107400000120A071A88900220099FFF7A0FF0028A1 +:1074100073D1A8892081288AE081D1E0B5F8129043 +:10742000072824D1E87B000621D5512709F1140053 +:1074300086B2002CE1D0A88900220099FFF787FFCF +:1074400000285AD16888A08084F806A0A8892081E5 +:107450000120A073288A2082A4F81290A88A0090A4 +:1074600068884B46A969019A01F04BFBA8E05027B8 +:1074700009F1120086B2002C3ED0A889002259469C +:10748000FFF765FF002838D16888A080A889E080D0 +:10749000287A072813D002202073288AE081E87B0D +:1074A000C0096073A4F81090A88A0090688801E071 +:1074B00083E080E04B4604F11202A969D4E7012081 +:1074C000EAE7B5F81290512709F1140086B2002CB2 +:1074D00066D0688804210BF08DFA83466888A08006 +:1074E000A88900220099FFF732FF00286ED184F8A6 +:1074F00006A0A889208101E052E067E00420A07383 +:10750000288A2082A4F81290A88A009068884B46A6 +:10751000A969019A01F0F5FAA989ABF80E104FE0BC +:107520006888FBF790FF0746688804210BF062FA31 +:10753000064607B9FFDF06B9FFDF687BC00702D048 +:107540005127142601E0502712264CB36888A080EA +:10755000502F06D084F806A0287B594601F0E1FAA6 +:107560002EE0287BA11DF9E7FE49A88949898142BF +:1075700005D1542706269CB16888A08020E05327B7 +:107580000BE06888A080A889E08019E06888042161 +:107590000BF030FA00B9FFDF55270826002CF0D198 +:1075A000A8F8006011E056270726002CF8D068885C +:1075B000A080002013E0FFDF02E0012808D0FFDFF9 +:1075C000A8F800600CB1278066800020BDE8FC9F11 +:1075D00057270726002CE3D06888A080687AA0711E +:1075E000EEE7401D20F0030009B14143091D01EB06 +:1075F0004000704713B5DB4A00201071009848B175 +:10760000002468460BF013F8002C02D1D64A0099EA +:1076100011601CBD01240020F4E770B50D4606463C +:1076200086B014465C2128461EF049F804B9FFDFF5 +:10763000A0786874A2782188284601F09CFA00207E +:10764000A881E881228805F11401304605F09BFAF3 +:107650006A460121304606F02EFC19E09DF8030031 +:10766000000715D5BDF806103046FFF730FD9DF830 +:107670000300BDF8061040F010008DF80300BDF8BF +:107680000300ADF81400FF233046059A06F074FDA0 +:10769000684606F01CFC0028E0D006B070BD10B5AE +:1076A0000C4601F1140005F0A5FA0146627C204663 +:1076B000BDE8104001F094BA30B50446A94891B035 +:1076C0004FF6FF75C18905AA284606F0F4FB30E0A5 +:1076D0009DF81E00A0422AD001282AD1BDF81C0026 +:1076E000B0F5205F03D042F60101884221D100208D +:1076F00002AB0AAA0CA9019083E8070007200090BA +:10770000BDF81A1010230022284606F087FC38B96D +:10771000BDF828000BAAC0B20CA90CF0F8FE10B1FD +:10772000032011B030BD9DF82E00A04201D10020F1 +:10773000F7E705A806F0CBFB0028C9D00520F0E745 +:1077400070B5054604210BF055F9040000D1FFDFA8 +:1077500004F114010C46284605F030FA214628466B +:10776000BDE8704005F031BA70B58AB00C460646E7 +:10777000FBF769FE050014D02878222827D30CB126 +:10778000A08890B101208DF80C0003208DF8100026 +:1077900000208DF8110054B1A088ADF818002068C1 +:1077A00007E043F202000AB070BD0920FBE7ADF824 +:1077B00018000590042130460BF01CF9040000D19C +:1077C000FFDF04F1140005F02CFA000701D40820B3 +:1077D000E9E701F091FE60B108A802210094CDE92B +:1077E000011095F8232003A930466368FFF7F2FBE8 +:1077F000D9E71120D7E72DE9F04FB2F802A0834670 +:1078000089B0154689465046FBF71DFE0746042100 +:1078100050460BF0EFF80026044605964FF002089C +:107820000696ADF81C6007B9FFDF04B9FFDF4146DB +:10783000504603F0C6FE50B907AA06A905A88DE870 +:1078400007004246214650466368FFF752FB454811 +:1078500007AB0660DDE9051204F11400CDF80090D5 +:10786000CDE90320CDE9013197F823205946504650 +:107870006B6805F01FFA06000AD0022E04D0032E12 +:1078800014D0042E00D0FFDF09B03046BDE8F08FE1 +:10789000BDF81C000028F7D00599CDE9001042463C +:1078A000214650466368FFF751FBEDE7687840F0EA +:1078B00008006870E8E72DE9F04F99B004464FF0F2 +:1078C00000082848ADF81C80ADF82080ADF8248071 +:1078D000A0F80880ADF81480ADF81880ADF82C80C1 +:1078E000ADF82880007916460D464746012808D095 +:1078F000022806D0032804D0042802D0082019B09A +:10790000C4E72046F9F7DFFC80BB2846F9F7DBFC2B +:1079100060BB6068F9F724FD40BB606848B16089CE +:107920002189884202D8B1F5007F01D90C20E6E711 +:1079300080460EAA06A92846FFF7CCF90028DED11A +:1079400068688078C0F34100022808D19DF81900CA +:1079500010F0380F03D02869F9F7F9FC30B905A900 +:10796000206904E0900200201400002020E0FFF7CE +:1079700069F90028C3D1206948B1607880079DF873 +:10798000150000F0380001D5F0B300E0E0BB9DF831 +:10799000140080060ED59DF8150010F0380F03D0A6 +:1079A0006068F9F7D4FC18B96068F9F7D9FC08B138 +:1079B0001020A4E70AA96069FFF744F900289ED1C6 +:1079C000606940B19DF8290000F0070101293CD110 +:1079D00010F0380F39D00BA9A069FFF733F9002850 +:1079E0008DD19DF8280080062FD49DF82C008006AC +:1079F0002BD4A06950B19DF82D0000F0070101299A +:107A000023D110F0380F00E01FE01ED0E06818B15D +:107A10000078D0B11C2818D20FAA611C2046FFF7AD +:107A200080F90121384661F30F2082468DF852100B +:107A3000B94642F603000F46ADF850000DF13F0283 +:107A400018A928680CF082FD08B1072057E79DF8B7 +:107A5000600015A9CDF80090C01CCDE9019100F09F +:107A6000FF0B00230BF20122514614A806F066F921 +:107A7000F0BBBDF854000C90FD492A89286900929A +:107A8000CDE901016B89BDF838202868069906F018 +:107A900055F901007ED120784FF0020AC10601D4C9 +:107AA00080062BD5ADF80C90606950B90AA906A8DC +:107AB000FFF768F99DF8290020F00700401C8DF8B9 +:107AC00029009DF8280008A940F0C8008DF828007A +:107AD0008DF8527042F60210ADF8500003AACDF8AE +:107AE00000A0CDE90121002340F2032214A800E008 +:107AF0001EE00A9906F022F901004BD1DC484D4600 +:107B000008385B460089ADF83D000FA8CDE902902A +:107B1000CDF80490CDF810904FF007090022CDF871 +:107B20000090BDF854104FF6FF7006F04DF810B1FC +:107B3000FFF757F8E3E69DF83C00000625D52946F7 +:107B4000012060F30F218DF852704FF42450ADF8EE +:107B50005000ADF80C5062789DF80C00002362F3E1 +:107B600000008DF80C006278CDF800A0520862F396 +:107B700041008DF80C0003AACDE9012540F2032253 +:107B800014A806F0DBF8010004D1606888B320690E +:107B9000A8B900E086E005A906A8FFF7F3F8607829 +:107BA000800706D49DF8150020F038008DF81500E8 +:107BB00005E09DF8140040F040008DF814008DF8A9 +:107BC000527042F60110ADF85000208940F20121B8 +:107BD000B0FBF1F201FB1202606809ABCDF8008046 +:107BE000CDE90103002314A8059906F0A7F80100C8 +:107BF00058D12078C00729D0ADF80C50A06950B9F1 +:107C00000BA906A8FFF7BEF89DF82D0020F007008D +:107C1000401C8DF82D009DF82C008DF8527040F01E +:107C200040008DF82C0042F60310ADF8500007A973 +:107C300003AACDF800A0CDE90121002340F20322E0 +:107C400014A80B9906F07AF801002BD1E06868B30C +:107C50002946012060F30F218DF8527042F604107E +:107C6000ADF85000E068002302788DF85820407885 +:107C70008DF85900E06816AA4088ADF85A00E0680F +:107C800000798DF85C00E068C088ADF85D00CDF843 +:107C90000090CDE901254FF4027214A806F04EF8C9 +:107CA000010003D00C9800F0C7FF28E670480321BC +:107CB0000838017156B100893080BDF82400708009 +:107CC000BDF82000B080BDF81C00F080002016E652 +:107CD00070B501258AB016460B46012802D002284D +:107CE00016D104E08DF80E504FF4205003E08DF8CB +:107CF0000E5042F60100ADF80C005BB10024601C90 +:107D000060F30F2404AA08A918460CF01FFC18B150 +:107D1000072048E5102046E504A99DF82020544896 +:107D2000CDE90021801E02900023214603A802F223 +:107D3000012206F003F810B1FEF753FF33E54C487B +:107D400008380EB1C1883180057100202BE5F0B5EF +:107D500093B0074601268DF83E6041F60100ADF86C +:107D60003C0012AA0FA93046FFF7B2FF002848D105 +:107D70003F4C0025083CE7B31C2102A81DF09FFCE6 +:107D80009DF808008DF83E6040F020008DF8080056 +:107D900042F60520ADF83C000E959DF83A0011958D +:107DA00020F00600801C8DF83A009DF838006A46E5 +:107DB00020F0FF008DF838009DF8390009A920F067 +:107DC000FF008DF839000420ADF82C00ADF830002C +:107DD0000EA80A9011A80D900FA80990ADF82E508A +:107DE00002A8FFF768FD00280BD1BDF800006081F4 +:107DF00000E008E0BDF80400A081401CE08125718E +:107E0000002013B0F0BD6581A581BDF84800F4E7FE +:107E10002DE9F74F1649A0B00024083917940A79C4 +:107E2000A146012A04D0022A02D0082023B02DE561 +:107E3000CA88824201D00620F8E721988A46824209 +:107E400001D10720F2E701202146ADF848004FF6A6 +:107E5000FF788DF86E0042F6020B60F30F21ADF84B +:107E60004A80ADF86CB006918DF8724002E00000D7 +:107E7000980200201CA9ADF870401391ADF8508015 +:107E800012A806F048F800252E462F460DAB072213 +:107E900012A9404606F042F878B10A285DD195B3A0 +:107EA0008EB3ADF86450ADF866609DF85E008DF855 +:107EB000144019AC012864D06BE09DF83A001FB360 +:107EC000012859D1BDF8381059451FD118A809A962 +:107ED00001940294CDE9031007200090BDF83610FC +:107EE00010230022404606F099F8B0BBBDF86000B0 +:107EF000042801D006284AD1BDF8241021988142D7 +:107F00003AD10F2092E73AE0012835D1BDF8380088 +:107F1000B0F5205F03D042F6010188422CD1BAF8B7 +:107F20000600BDF83610884201D1012700E0002785 +:107F300005B19EB1219881421ED118A809AA0194C9 +:107F40000294CDE90320072000900D461023002263 +:107F5000404606F063F800B902E02DE04E460BE023 +:107F6000BDF86000022801D0102810D1C0B217AAB5 +:107F700009A90CF0CCFA50B9BDF8369086E7052077 +:107F800054E705A917A8221D0CF0E0FA08B1032058 +:107F90004CE79DF814000023001DC2B28DF8142098 +:107FA00022980092CDE901401BA8069905F0C6FE73 +:107FB00010B902228AF80420FEF713FE36E710B546 +:107FC0000B46401E88B084B205AA00211846FEF771 +:107FD000A8FE00200DF1080C06AA05A901908CE866 +:107FE0000700072000900123002221464FF6FF7072 +:107FF00005F0EAFD0446BDF81800012800D0FFDFB7 +:108000002046FEF7EEFD08B010BDF0B5F74F044670 +:1080100087B038790E46032804D0042802D00820FF +:1080200007B0F0BD04AA03A92046FEF753FE0500E1 +:10803000F6D160688078C0F3410002280AD19DF82B +:108040000D0010F0380F05D02069F9F780F908B15C +:108050001020E5E7208905AA21698DE807006389DA +:10806000BDF810202068039905F068FE10B1FEF7F6 +:10807000B8FDD5E716B1BDF8140030800420387182 +:108080002846CDE7F8B50C0006460CD001464FF661 +:10809000FF7500236A46284606F042F828B100BF63 +:1080A000FEF79FFDF8BD1020F8BD69462046FEF79B +:1080B000C9FD0028F8D1A078314600F00103284618 +:1080C000009A06F059F8EBE730B587B01446002265 +:1080D0000DF1080C05AD01928CE82C0007220092EE +:1080E0000A46014623884FF6FF7005F06DFDBDF886 +:1080F00014102180FEF775FD07B030BD70B50D4638 +:1081000004210AF077FC040000D1FFDF294604F1C6 +:108110001400BDE8704004F07DBD70B50D4604212B +:108120000AF068FC040000D1FFDF294604F11400C6 +:10813000BDE8704004F091BD70B50D4604210AF011 +:1081400059FC040000D1FFDF294604F11400BDE80A +:10815000704004F0A9BD70B5054604210AF04AFC40 +:10816000040000D1FFDF214628462368BDE87040A7 +:108170000122FEF705BF70B5064604210AF03AFC5D +:10818000040000D1FFDF04F1140004F033FD401DB2 +:1081900020F0030511E0011D00880022431821464C +:1081A0003046FEF7EDFE00280BD0607CABB2684392 +:1081B00082B2A068011D0AF0DAFAA068418800299D +:1081C000E9D170BD70B5054604210AF013FC040026 +:1081D00000D1FFDF214628466368BDE870400222D7 +:1081E000FEF7CEBE70B50E46054601F085F90400D7 +:1081F00000D1FFDF0120207266726580207820F0B8 +:108200000F00001D20F0F00040302070BDE87040ED +:1082100001F075B910B50446012900D0FFDF2046F2 +:10822000BDE810400121FAF74FB92DE9F04F97B0A2 +:108230004FF0000A0C008346ADF814A0D04619D0C8 +:10824000E06830B1A068A8B10188ADF81410A0F8BA +:1082500000A05846FBF7F7F8070043F2020961D087 +:10826000387822285CD3042158460AF0C3FB050065 +:1082700005D103E0102017B0BDE8F08FFFDF05F156 +:10828000140004F0B7FC401D20F00306A07801287C +:1082900003D0022801D00720EDE7218807AA58461D +:1082A00005F009FE30BB07A805F011FE10BB07A8BA +:1082B00005F00DFE48B99DF82600012805D1BDF84E +:1082C0002400A0F52451023902D04FF45050D2E7D7 +:1082D000E068B0B1CDE902A00720009005AACDF872 +:1082E00004A00492A2882188BDF81430584605F0F5 +:1082F0006BFC10B1FEF775FCBDE7A168BDF814007A +:1083000008809DF81F00C00602D543F20140B2E785 +:108310000B9838B1A1780078012905D080071AD4CC +:108320000820A8E74846A6E7C007F9D002208DF844 +:108330003C00A8684FF00009A0B1697C42887143F5 +:1083400091420FD98AB2B3B2011D0AF0C6F9804634 +:10835000A0F800A006E003208DF83C00D5F80080CE +:108360004FF001099DF8200010F0380F00D1FFDF19 +:108370009DF820001E49C0F3C200084497F823105E +:1083800010F8010C884201D90F2074E72088ADF85D +:10839000400014A90095CDE90191434607220FA999 +:1083A0005846FEF717FE002891D19DF8500050B9AD +:1083B000A078012807D1687CB3B2704382B2A86864 +:1083C000011D0AF09EF9002055E770B506461546D6 +:1083D0000C460846FEF7C4FB002805D12A46214674 +:1083E0003046BDE8704073E470BD11E59002002096 +:1083F000765A020070B51E4614460D0009D044B1ED +:10840000616831B138B1FC49C988814203D0072085 +:1084100070BD102070BD2068FEF7A2FB0028F9D1C6 +:10842000324621462846BDE87040FFF744BA70B591 +:1084300015460C0006D038B1EF490989814203D0B6 +:10844000072070BD102070BD2068FEF789FB002852 +:10845000F9D129462046BDE87040D6E570B50646FC +:1084600086B00D4614461046F8F753FFD0BB60683F +:10847000F8F776FFB0BBA6F57F40FF3803D0304653 +:10848000FAF7E1FF80B128466946FEF79DFC002817 +:108490000CD19DF810100F2008293DD2DFE801F023 +:1084A00008060606060A0A0843F2020006B070BD76 +:1084B0000320FBE79DF80210012908D1BDF8001048 +:1084C000B1F5C05FF2D06FF4C052D142EED09DF84A +:1084D000061001290DD1BDF80410A1F52851062977 +:1084E00007D200E029E0DFE801F0030304030303FF +:1084F000DCE79DF80A1001290FD1BDF80810B1F58D +:10850000245FD3D0A1F60211B1F50051CED00129DC +:10851000CCD0022901D1C9E7FFDF606878B9002318 +:1085200005AA2946304605F0FBFD10B1FEF759FBC0 +:10853000BCE79DF81400800601D41020B6E76188DE +:10854000224628466368FFF7BFFDAFE72DE9F043F9 +:10855000814687B0884614461046F8F7DAFE18B10F +:10856000102007B0BDE8F083002306AA4146484624 +:1085700005F0D6FD18B100BFFEF733FBF1E79DF81B +:108580001800C00602D543F20140EAE7002507279C +:1085900005A8019500970295CDE9035062884FF632 +:1085A000FF734146484605F039FD060013D1606867 +:1085B000F8F7AFFE60B960680195CDE90250009709 +:1085C0000495238862884146484605F027FD064603 +:1085D000BDF8140020803046CEE739B1864B0A88BA +:1085E0009B899A4202D843F2030070471DE610B5FA +:1085F00086B0814C0423ADF81430638943B1A4895B +:108600008C4201D2914205D943F2030006B010BD5D +:108610000620FBE7ADF81010002100910191ADF8A4 +:10862000003002218DF8021005A9029104A90391DE +:10863000ADF812206946FFF7F8FDE7E72DE9FC47A2 +:1086400081460D460846F8F73EFE88BB4846FAF7D5 +:10865000FAFE5FEA00080AD098F80000222829D321 +:10866000042148460AF0C6F9070005D103E043F2A9 +:108670000200BDE8FC87FFDF07F1140004F0D1FA27 +:1086800006462878012803D0022804D00720F0E706 +:10869000B0070FD502E016F01C0F0BD0A8792C1DE7 +:1086A000C00709D0E08838B1A068F8F70CFE18B10F +:1086B0001020DEE70820DCE721882A780720B1F5C2 +:1086C000847F35D01EDC40F20315A1F20313A942CA +:1086D00026D00EDCB1F5807FCBD003DCF9B10129C7 +:1086E00026D1C6E7A1F58073013BC2D0012B1FD173 +:1086F00013E0012BBDD0022B1AD0032BB9D0042BD1 +:1087000016D112E0A1F20912082A11D2DFE802F014 +:108710000B04041010101004ABE7022AA9D007E0E4 +:10872000012AA6D004E0320700E0F206002AA0DA0F +:10873000CDB200F0E1FE50B198F82300CDE900057C +:10874000FA89234639464846FEF78FFC91E7112007 +:108750008FE72DE9F04F8BB01F4615460C46834638 +:108760000026FAF770FE28B10078222805D20820EA +:108770000BB081E543F20200FAE7B80801D0072008 +:10878000F6E7032F00D100274FF6FF79CCB1022D79 +:1087900073D32046F8F7E4FD30B904EB0508A8F1DF +:1087A0000100F8F7DDFD08B11020E1E7AD1EAAB227 +:1087B0002146484605F08FFD38F8021C88425CD1FE +:1087C000ADB20D49B80702D58889401C00E00120F0 +:1087D0001FFA80F8F80701D08F8900E04F4605AAFC +:1087E0004146584605F067FB4FF0070A4FF0000975 +:1087F000DCB320460BE000009002002040881028E7 +:108800003BD8361D304486B2AE4236D2A01902881B +:108810004245F3D351E000BF9DF8170002074CD545 +:1088200094B304EB0608361DB8F80230B6B2102B2C +:1088300023D89A19AA4220D8B8F8002091421CD116 +:10884000C0061CD5CDE900A90DF1080C0AAAA11992 +:1088500048468CE80700B8F800100022584605F09A +:10886000B3F920B1FEF7BDF982E726E005E0B8F8DC +:108870000200BDF82810884201D00B2078E7B8F834 +:108880000200304486B207E0FFE7C00604D5584630 +:10889000FEF71DFC002888D19DF81700BDF81A10BE +:1088A00020F010008DF81700BDF81700ADF800009B +:1088B000FF235846009A05F05FFC05A805F007FB6A +:1088C00018B9BDF81A10B942A6D9042158460AF0C1 +:1088D00091F8040000D1FFDFA2895AB1CDE900A9C7 +:1088E0004D46002321465846FEF7BFFB0028BBD16A +:1088F000A5813DE700203BE72DE9FF4F8BB01E46E9 +:1089000017000D464FF0000412D0B00802D0072027 +:108910000FB0B1E4032E00D100265DB10846F8F790 +:1089200016FD28B93888691E0844F8F710FD08B10B +:108930001020EDE7C64AB00701D5D18900E001213A +:10894000F0074FF6FF7802D0D089401E00E0404685 +:1089500086B206AA0B9805F0AEFA4FF000094FF068 +:10896000070B0DF1140A38E09DF81B00000734D501 +:10897000CDF80490CDF800B0CDF80890CDE9039A79 +:10898000434600220B9805F049FB60BB05B3BDF8D8 +:1089900014103A8821442819091D8A4230D3BDF8A1 +:1089A0001E2020F8022BBDF8142020F8022BCDE960 +:1089B00000B9CDE90290CDF810A0BDF81E10BDF8A9 +:1089C000143000220B9805F029FB08B103209FE723 +:1089D000BDF814002044001D84B206A805F077FA03 +:1089E00020B10A2806D0FEF7FCF891E7BDF81E106A +:1089F000B142B9D934B17DB13888A11C884203D2C3 +:108A00000C2085E7052083E722462946404605F0ED +:108A100062FC014628190180A41C3C80002077E7F5 +:108A200010B50446F8F775FC08B1102010BD884851 +:108A3000C0892080002010BDF0B58BB00D460646E1 +:108A4000142103A81CF03BFE01208DF80C008DF8CA +:108A5000100000208DF81100ADF814503046FAF7E0 +:108A6000F2FC48B10078222812D30421304609F0E4 +:108A7000C1FF040005D103E043F202000BB0F0BDDA +:108A8000FFDF04F11400074604F0CBF8800601D4A0 +:108A90000820F3E7207C022140F00100207409A89F +:108AA0000094CDE90110072203A930466368FEF760 +:108AB00091FA20B1217C21F001012174DEE72946E1 +:108AC0003046F9F7F2FC08A9384604F099F800B1ED +:108AD000FFDFBDF82040172C01D2172000E0204610 +:108AE000A84201D92C4602E0172C00D217242146B7 +:108AF0003046FFF712FB21463046F9F7FCF900201B +:108B0000BCE7F8B51C4615460E46069F0AF0A4F8C9 +:108B10002346FF1DBCB231462A46009409F08FFC63 +:108B2000F8BD70B50C4605460E2120461CF0A5FD8B +:108B3000002020802DB1012D01D0FFDF70BD062067 +:108B400000E00520A07170BD10B54880087813467C +:108B500020F00F00001D20F0F00080300C4608705F +:108B60001422194604F108001CF04DFD00F0C7FC6A +:108B70003748046010BD2DE9F047DFF8D890491D53 +:108B8000064621F0030117460C46D9F8000009F00B +:108B90006CFD050000D1FFDF4FF000083560A5F83F +:108BA00000802146D9F8000009F05FFD050000D1E2 +:108BB000FFDF7560A5F800807FB104FB07F1091D98 +:108BC0000BD0D9F8000009F050FD040000D1FFDF00 +:108BD000B460C4F80080BDE8F087C6F80880FAE702 +:108BE0002DE9F0411746491D21F00302194D0646B3 +:108BF00001681446286809F063FD224671682868F8 +:108C000009F05EFD3FB104FB07F2121D03D0B1680D +:108C1000286809F055FD042009F094FE044604205C +:108C200009F098FE201A012804D12868BDE8F04117 +:108C300009F010BDBDE8F08110B50C4605F007F94C +:108C400000B1FFDF2046BDE81040FDF7CABF0000BD +:108C5000900200201400002038B50C468288817BE9 +:108C600019B14189914200D90A462280C188121D5A +:108C700090B26A4608F04FFFBDF80000032800D309 +:108C80000320C1B2208801F011F838BD38B50C4678 +:108C90008288817B19B10189914200D90A462280DC +:108CA000C188121D90B26A4608F035FFBDF8000079 +:108CB000022800D30220C1B2208800F0F7FF401C38 +:108CC000C0B238BD2DE9FE4F82468B46F9481446A6 +:108CD0000BF10302D0E90010CDE9011022F00302EC +:108CE00068464FF49071009209F0A1FCF24E002CFE +:108CF00002D1F24A00999160009901440091357FB8 +:108D000005F1010504D1E8B20BF09AFB00B1FFDFD9 +:108D1000009800EB0510C01C20F0030100915CB925 +:108D2000707AB27A1044C2B200200870308C80B2DF +:108D300004F015FF00B1FFDF0098316A084400908D +:108D40002146684600F075FF80460098C01C20F060 +:108D500003000090B37AF27A717A04B1002009F02E +:108D60005CFD0099084400902146684600F0A9FF88 +:108D7000D14800273D4690F801900CE0284600F0CD +:108D80003BFF064681788088F9F74CF971786D1CB5 +:108D900000FB0177EDB24D45F0D10098C01C20F0EA +:108DA0000300009004B100203946F9F746F9009914 +:108DB000002708440090C0483D4690F801900CE020 +:108DC000284600F019FF0646C1788088FEF709FCA6 +:108DD00071786D1C00FB0177EDB24D45F0D1009824 +:108DE000C01C20F00300009004B100203946FEF7BB +:108DF00001FC00994FF0000908440090AE484D4630 +:108E000047780EE0284600F0F7FE0646807B30B13A +:108E100006F1080001F019FF727800FB02996D1C41 +:108E2000EDB2BD42EED10098C01C20F003000090CE +:108E300004B10020494601F00CFF0099084400905D +:108E40002146684600F0AFFE0098C01D20F00700E4 +:108E50000090DAF80010814204D3A0EB0B01B1F5C9 +:108E6000803F04DB4FF00408CAF8000004E0CAF8B1 +:108E70000000B8F1000F02D04046BDE8FE8F34BBC1 +:108E80008F490020009A03F083F8FBF75CFA8A48C8 +:108E900001AA00211030F8F7E1FA00B1FFDF86489F +:108EA000407FFEF754FF00B1FFDF83484FF4F671B7 +:108EB00040301CF004FC80480421403080F8E91167 +:108EC00080F8EA11062180F8EB11032101710020DE +:108ED000D3E770B5784C06464034207804EB401553 +:108EE000E078083590B9A01990F8E80100280ED074 +:108EF000A0780F2800D3FFDF202128461CF0DFFBDD +:108F0000687866F3020068700120E070284670BD42 +:108F10002DE9F04105460C460027007805219046D2 +:108F20003E46B1EB101F00D0FFDF287A50B1012878 +:108F30000ED0FFDFA8F800600CB12780668000200B +:108F4000BDE8F0810127092674B16888A08008E097 +:108F50000227142644B16888A0802869E060A88AA6 +:108F60002082287B2072E5E7A8F80060E7E730B5AB +:108F7000514C012000212070617020726072032228 +:108F8000A272E07221732174052121831F21618364 +:108F900060744CA161610A2121776077474D4FF4DD +:108FA000B06020626868C11C21F00301814200D0DA +:108FB000FFDF6868606030BD30B5404C156863689D +:108FC00010339D4202D20420136030BD3A4B5D78CD +:108FD0005A6802EB0512107051700320D0801720E0 +:108FE00090800120D0709070002090735878401CC1 +:108FF0005870606810306060002030BD70B5064663 +:109000002D480024457807E0204600F0F5FD017862 +:10901000B14204D0641CE4B2AC42F5D1002070BD72 +:10902000F7B5074608780C4610B3FFF7E7FF05468B +:10903000A7F12006202F06D0052E19D2DFE806F072 +:109040000F2B2B151A0000F0E2FD0DB1697800E03E +:109050000021401AA17880B20844FF2808D8A078DF +:1090600030B1A088022831D202E0608817282DD2C2 +:109070000720FEBD207AE0B161881729F8D3A188C6 +:109080001729F5D3A1790029F2D0E1790029EFD091 +:10909000402804D9ECE7242F18D1207A48B1618800 +:1090A0004FF6FB70814202D8A18881420ED904207C +:1090B000FEBD0BE07C5A0200AC030020180000202B +:1090C000000000206E5246357800000065B9207817 +:1090D00002AA0121FFF770FF0028E9D12078FFF7ED +:1090E0008DFF050000D1FFDF052E18D2DFE806F066 +:1090F000030B0E081100A0786870A088E8800FE0CC +:109100006088A8800CE0A078A87009E0A078E870DA +:1091100006E054F8020FA8606068E86000E0FFDF36 +:109120000020C5E71A2835D00DDC132832D2DFE83D +:1091300000F01B31203131272723252D31312931F2 +:109140003131312F0F00302802D003DC1E2821D10D +:10915000072070473A3809281CD2DFE800F0151BB9 +:109160000F1B1B1B1B1B07000020704743F2040052 +:10917000704743F202007047042070470D2070478B +:109180000F20704708207047112070471320704748 +:10919000062070470320704710B5007800F00100EA +:1091A00008F0ABFCBDE81040BCE710B5007818B182 +:1091B000012801D0072010BD08F0EFFCBDE81040E9 +:1091C000B0E710B5007800F0010008F09FFCBDE8A2 +:1091D0001040A7E70EB5017801F001018DF80010ED +:1091E000417801F001018DF801100178C1F34001CF +:1091F0008DF802104178C1F340018DF80310017819 +:1092000089088DF80410417889088DF80510817857 +:109210008DF80610C1788DF8071000798DF80800D8 +:10922000684607F095FAFFF77DFF0EBD2DE9F84F70 +:10923000DFF8F883FE4C00264FF490771FE0012002 +:1092400000F082FD0120FFF744FE05463946D8F8BC +:10925000080009F00AFA686000B9FFDF686807F0E3 +:1092600006F9B0B12846FAF7D5FB284600F072FDA2 +:1092700028B93A466968D8F8080009F021FA94F943 +:10928000E9010428DBDA022009F05CFB074600252F +:10929000A5E03A466968D8F8080009F011FAF2E743 +:1092A000B8F802104046491C89B2A8F80210B94229 +:1092B00001D3002141800221B8F8020009F09AFB95 +:1092C000002864D0B8F80200694608F088FBFFF770 +:1092D00029FF00B1FFDF9DF8000078B1B8F8020067 +:1092E00009F0CCFC5FEA000900D1FFDF484608F036 +:1092F0003AFF18B1B8F8020002F052F9B8F80200CB +:1093000009F0AAFC5FEA000900D1FFDF484608F037 +:1093100022FFE0BB0321B8F8020009F06BFB5FEA13 +:10932000000B47D1FFDF45E0DBF8100010B10078FB +:10933000FF2849D0022000F007FD0220FFF7C9FDF9 +:109340008246484609F013F8CAF8040000B9FFDF66 +:10935000DAF8040009F0DBF8002100900170B8F899 +:1093600002105046AAF8021001F01CFE484609F00F +:10937000D0F800B9FFDF504600F0ECFC18B99AF8BD +:109380000100000704D50098CBF8100012E024E09B +:10939000DBF8100038B10178491C11F0FF010170B1 +:1093A00008D1FFDF06E000221146484600F0F9FB35 +:1093B00000B9FFDF94F9EA01022805DBB8F80200E2 +:1093C00001F0B5FD0028AFD194F9E901042804DBD0 +:1093D000484609F002F900B101266D1CEDB2BD420C +:1093E00004D294F9EA010228BFF65AAF002E7FF4A6 +:1093F00022AFBDE8F84F032000F0A6BC10B58B4C9F +:10940000E06008682061AFF2DB10F9F766FD60707C +:1094100010BD87480021403801708448017085499B +:109420004160704770B505464FF080500C46D0F84B +:10943000A410491C05D1D0F8A810C9430904090C8F +:109440000BD050F8A01F01F0010129704168216084 +:109450008068A080287830B970BD062120460CF0C5 +:109460000CFD01202870607940F0C000607170BD73 +:1094700070B54FF080540D46D4F88010491C0BD1C4 +:10948000D4F88410491C07D1D4F88810491C03D1A2 +:10949000D4F88C10491C0CD0D4F880100160D4F89A +:1094A00084104160D4F888108160D4F88C10C160B9 +:1094B00002E010210CF0E1FCD4F89000401C0BD12C +:1094C000D4F89400401C07D1D4F89800401C03D174 +:1094D000D4F89C00401C09D054F8900F28606068B4 +:1094E0006860A068A860E068E86070BD2846BDE8D4 +:1094F000704010210CF0C1BC4D480079E9E470B512 +:109500004B4CE07830B3207804EB4010407A00F008 +:109510000700204490F9E801002800DCFFDF2078F4 +:10952000002504EB4010407A00F00700011991F883 +:10953000E801401E81F8E8012078401CC0B220708C +:109540000F2800D12570A078401CA0700CF08CFB77 +:10955000E57070BDFFDF70BD3EB50546032109F023 +:1095600049FA0446284609F077FB054604B9FFDFAF +:10957000206918B10078FF2800D1FFDF01AA6946F1 +:10958000284600F00EFB60B9FFDF0AE0002202A9C6 +:10959000284600F006FB00B9FFDF9DF8080000B187 +:1095A000FFDF9DF80000411E8DF80010EED220690B +:1095B0000199884201D1002020613EBD70B5054669 +:1095C000A0F57F400C46FF3800D1FFDF012C01D011 +:1095D000FFDF70BDFFF790FF040000D1FFDF2078B0 +:1095E00020F00F00401D20F0F0005030207065800A +:1095F0000020207201202073BDE870407FE72DE934 +:10960000F04116460D460746FFF776FF040000D1ED +:10961000FFDF207820F00F00401D20F0F0005030D8 +:109620002070678001202072286805E01800002063 +:10963000EC030020F81300202061A888A082267384 +:10964000BDE8F0415BE77FB5FFF7D8FC040000D12F +:10965000FFDF02A92046FFF7FFFA054603A92046CF +:10966000FFF714FB8DF800508DF80100BDF80800DD +:10967000001DADF80200BDF80C00001DADF804009F +:10968000E088ADF80600684608F01FFA002800D010 +:10969000FFDF7FBD2DE9F05FF94E8146307810B1D4 +:1096A0000820BDE8F09F4846F7F733FE08B11020C8 +:1096B000F7E7F44C207808B9FFF759FCA17A607AF3 +:1096C0004D460844C4B200F0A2FAA04207D2201AC4 +:1096D000C1B22A460020FFF76FFC0028E1D1716873 +:1096E000E848C91C002721F003017160B3463E46DB +:1096F0003D46BA463C4690F801800AE0204600F01C +:109700007BFA4178807B0E4410FB0155641CE4B267 +:109710007F1C4445F2D1C6EBC601DA4E0AEB870046 +:1097200000EB8100F17A00EB850000EB8100DBF8B3 +:1097300004105C464518012229464846FFF7C2FA44 +:10974000070012D00020FFF759FC05000BD005F1EF +:109750001300616820F00300884200D0FFDF7078BA +:10976000401E7070656038469BE7002229464846D7 +:10977000FFF7A8FA00B1FFDFD9F8000060604FF6EC +:10978000FF7060800120207000208AE72DE9F04101 +:109790000446BB4817460E46007810B10820BDE8C5 +:1097A000F0810846F7F78FFD08B11020F7E7B54DB7 +:1097B000287808B9FFF7DBFB601E1E2807D8012CAC +:1097C00022D13078FE281FD828770020E7E7A4F1BF +:1097D00020001F2805D8E0B23A463146BDE8F041E6 +:1097E0001EE4A4F140001F2805D831462046BDE8FC +:1097F000F04100F0D7BAA4F1A0001F2804D800203F +:10980000A02C03D0A12C06D00720C8E7317801F0A6 +:1098100001016977C3E731680922F82901D38B0771 +:1098200001D01046BBE76B7C03F00303012B04D18E +:109830006B8BD7339CB28C42F3D82962AFE72DE90A +:10984000F04781460E460846F7F763FD48B948469B +:10985000F7F77DFD28B909F1030020F00301494520 +:1098600002D01020BDE8F08786484FF0000A403053 +:10987000817869B14178804600EB4114083437881B +:1098800032460021204600F073FA050004D027E09C +:10989000A6F800A00520E5E7B9F1000F24D0308834 +:1098A000B84201D90C251FE0607800F00705284672 +:1098B00000F04AFA08EB0507324697F8E8014946F6 +:1098C000401C87F8E801204607F5F47700F050FACD +:1098D00005463878401E3870032000F035FA2DB167 +:1098E0000C2D01D0A6F800A02846BBE76078644E96 +:1098F00000F00701012923D002290CD0032934D01C +:10990000FFDF98F801104046491CC9B288F80110E1 +:109910000F2935D036E0616821B1000702D4608894 +:10992000FFF71AFE98F8EA014746012802D170783D +:10993000F9F7F2FA97F9EA010428E2DBFFDFE0E742 +:10994000616821B14FF49072B06808F0B9FE98F8E0 +:10995000E9014746032802D17078F9F7DDFA97F953 +:10996000E9010428CDDBFFDFCBE7C00602D5608824 +:10997000FFF7F2FD98F9EB010628C2DBFFDFC0E735 +:1099800080F801A08178491E8170617801F007019B +:1099900001EB080090F8E811491C80F8E811A3E7F2 +:1099A00070B50D460446F7F78EFC18B92846F7F750 +:1099B000B0FC08B1102070BD29462046BDE87040BB +:1099C0000AF075BD70B505460AF094FDC4B228468C +:1099D000F7F7BDFC08B1102070BD35B128782C70A8 +:1099E00018B1A04201D0072070BD2046FDF764FEEB +:1099F000052805D10AF082FD012801D0002070BDA4 +:109A00000F2070BD70B5044615460E460846F7F7A0 +:109A10005AFC18B92846F7F77CFC08B1102070BD35 +:109A2000022C03D0102C01D0092070BD2A463146EB +:109A300020460AF06CFD0028F7D0052070BD70B5F7 +:109A400014460D460646F7F73EFC38B92846F7F7A8 +:109A500060FC18B92046F7F77AFC08B1102070BDF9 +:109A60002246294630460AF071FD0028F7D007202B +:109A700070BD3EB50446F7F74CFC28B110203EBD42 +:109A800018000020AC030020684606F0C8FDFFF770 +:109A900049FB0028F3D19DF806002070BDF80800AE +:109AA0006080BDF80A00A0800020E8E770B5054698 +:109AB0000C460846F7F74BFC20B93CB12068F7F795 +:109AC00028FC08B1102070BDA08828B12146284686 +:109AD000BDE87040FDF748BE092070BD70B5054671 +:109AE0000C460846F7F7EFFB30B9681E1E2814D85D +:109AF0002046F7F7E8FB08B1102070BD042D01D90E +:109B0000072070BD05B9FFDFF84800EB850050F86D +:109B1000041C2046BDE870400847A5F120001F281E +:109B200005D821462846BDE87040FAF794BBF02DD1 +:109B300008D0F12DE4D1207808F05CF8BDE8704041 +:109B4000FFF7F0BAA068F7F7BEFB0028D4D1204693 +:109B500008F028F8F2E770B504460D460846F7F716 +:109B6000D8FB30B9601E1E2811D82846F7F7ABFB8A +:109B700008B1102070BD012C05D0022C03D0032C9D +:109B800001D0042C01D1062070BD072070BDA4F1C6 +:109B900020001F28F9D829462046BDE87040FAF772 +:109BA000B2BB08F0A7BA38B50446D148007B00F034 +:109BB0000105D9B904F034FB0DB1226800E00022A0 +:109BC000CC484178C06806F018FCCA481030C0780C +:109BD0008DF8000010B1012802D004E0012000E05F +:109BE00000208DF80000684606F093FD002D02D09D +:109BF00020682830206038BD30B5BD4D04466878F7 +:109C0000A04200D8FFDF686800EB041030BD70B5DB +:109C1000B74800252C46467807E02046FFF7ECFFC2 +:109C20004078641C2844C5B2E4B2B442F5D1284659 +:109C300070BD2DE9F0410C4607464FF0000800F0DA +:109C4000DEF80646FF2801D94FF013083868C01C1B +:109C500020F003023A6054EA080421D1A448F3B288 +:109C6000072124300CF00EFB09E0072C10D2DFE8AE +:109C700004F0060408080A0406009F4804E09F4810 +:109C800002E09F4800E09F480CF01CFB054600E006 +:109C9000FFDFA54200D0FFDF641CE4B2072CE4D351 +:109CA000386800EB06103860404678E5021D5143E5 +:109CB000452900D245210844C01CB0FBF2F0C0B2D7 +:109CC00070472DE9FC5F064689484FF000088B4637 +:109CD0004746444690F8019022E02046FFF78CFF6B +:109CE000050000D1FFDF687869463844C7B22846CE +:109CF000FEF7B2FF824601A92846FEF7C7FF0346DA +:109D0000BDF804005246001D81B2BDF80000001DE0 +:109D100080B208F0EDFE6A78641C00FB0288E4B2B1 +:109D20004C45DAD13068C01C20F003003060BBF134 +:109D3000000F00D000204246394608F0E7FE3168A7 +:109D400008443060BDE8FC9F69494031087100203B +:109D5000C870704766494031CA782AB10A7801EB69 +:109D600042110831814201D0012070470020704724 +:109D70002DE9F04106460078154600F00F0400205A +:109D80001080601E0F46052800D3FFDF57482A4683 +:109D9000183800EB8400394650F8043C3046BDE8E2 +:109DA000F041184770B50C46402802D0412806D132 +:109DB00020E0A07861780D18E178814201D9072070 +:109DC00070BD2078012801D9132070BDFF2D08D85F +:109DD0000AF026FD06460BF0FFFE301A801EA84250 +:109DE00001DA122070BD4248216881602179017337 +:109DF000002070BDBDE87040084600F02BB82DE98A +:109E0000F047DFF8EC900026344699F8090099F8FD +:109E10000A2099F801700244D5B299F80B20104439 +:109E200000F0FF0808E02046FFF7E6FE817B40785F +:109E300011FB0066641CE4B2BC42F4D199F809102D +:109E400099F80A0029442944414400B101200844FA +:109E5000304407E538B50446407800F00300012897 +:109E600003D002280BD0072038BD606858B1F7F73F +:109E700077FAD0B96068F7F76AFA20B915E0606838 +:109E8000F7F721FA88B969462046FCF791F80028CF +:109E9000EAD1607800F00300022808D19DF80000A4 +:109EA00028B16068F7F753FA08B1102038BD61890E +:109EB000F8290DD8208988420AD8607800F003027A +:109EC0000B48012A06D1D731026A89B28A4201D2EF +:109ED000092038BD94E80E0000F1100585E80E0059 +:109EE0000AB900210183002038BD00009C5A0200FD +:109EF000AC03002018000020574100001FAD0000F7 +:109F0000E92F0000334201002DE9F04107461446D5 +:109F10008846084601F022FD064608EB88001C2210 +:109F2000796802EBC0000D18688C58B1414638467C +:109F300001F01CFD014678680078C200082305F195 +:109F400020000CE0E88CA8B14146384601F015FD30 +:109F50000146786808234078C20005F1240008F023 +:109F600006FC38B1062121726681D0E90010C4E9EF +:109F7000031009E0287809280BD00520207266819B +:109F80006868E060002028702046BDE8F04101F0DC +:109F9000DBBC072020726681F4E72DE9F04116460C +:109FA0000D460746406801EB85011C2202EBC1010A +:109FB0004418204601F003FD40B10021708865F38C +:109FC0000F2160F31F4106200CF036FA09202070A3 +:109FD000324629463846BDE8F04195E72DE9F04183 +:109FE0000E46074600241C21F07816E004EB84039B +:109FF000726801EBC303D25C6AB1FFF77DFA05001A +:10A0000000D1FFDF6F802A4621463046FFF7C5FFAB +:10A010000120BDE8F081641CE4B2A042E6D8002033 +:10A02000F7E770B5064600241C21C0780AE000BF9F +:10A0300004EB8403726801EBC303D5182A782AB1B4 +:10A04000641CE4B2A042F3D8402070BD2821284609 +:10A050001BF013FB706880892881204670BD70B5A5 +:10A06000034600201C25DC780DE000BF00EB8006D5 +:10A070005A6805EBC6063244167816B1128A8A422F +:10A0800004D0401CC0B28442F0D8402070BDF0B56E +:10A09000044600201C26E5780EE000BF00EB800798 +:10A0A000636806EBC7073B441F788F4202D15B7899 +:10A0B000934204D0401CC0B28542EFD84020F0BD8E +:10A0C0000078032801D000207047012070470078F5 +:10A0D000022801D00020704701207047007807282F +:10A0E00001D000207047012070472DE9F04106465D +:10A0F00088461078F1781546884200D3FFDF2C7827 +:10A100001C27641CF078E4B2A04201D8201AC4B223 +:10A1100004EB8401706807EBC1010844017821B1A8 +:10A120004146884708B12C7073E72878A042E8D1EF +:10A13000402028706DE770B514460B880122A240BC +:10A14000134207D113430B8001230A22011D08F09B +:10A15000D8FA047070BD2DE9FF4F81B00878DDE9B1 +:10A160000E7B9A4691460E4640072CD4019808F083 +:10A1700085FD040000D1FFDF07F1040820461FFA27 +:10A1800088F107F0C4FE050000D1FFDF2046294614 +:10A190006A4608F00EF90098A0F80370A0F805A030 +:10A1A000284608F0B4F9017869F306016BF3C7118A +:10A1B000017020461FFA88F107F0ECFE00B9FFDFBE +:10A1C000019806F08CF806EB0900017F491C017725 +:10A1D00005B0BDE8F08F2DE9F84F0E469A4691463E +:10A1E0000746032108F006FC0446008DDFF8B88519 +:10A1F000002518B198F80000B0421ED1384608F08A +:10A200003DFD070000D1FFDF09F10401384689B2A6 +:10A2100007F07DFE050010D0384629466A4608F052 +:10A22000C8F8009800210A460180817006F010F9F4 +:10A230000098C01DCAF8000021E098F80000B04264 +:10A2400016D104F1260734F8341F012000FA06F96C +:10A2500011EA090F00D0FFDF2088012340EA09003E +:10A2600020800A22391D384608F066FA067006E09A +:10A27000324604F1340104F12600FFF75CFF0A21A5 +:10A2800088F800102846BDE8F88FFEB515460C4644 +:10A29000064602AB0C220621FFF79DFF002827D0BF +:10A2A0000299607812220A70801C487008224A8045 +:10A2B000A07002982988052381806988C180A988B7 +:10A2C0000181E988418100250C20CDE900050622A5 +:10A2D00021463046FFF73FFF2946002266F31F4123 +:10A2E000F02310460BF0FEFF6078801C60700120A8 +:10A2F000FEBDFEB514460D460622064602AB1146CB +:10A30000FFF769FF002812D0029B1320002118706C +:10A31000A8785870022058809C800620CDE9000162 +:10A320000246052329463046FFF715FF0120FEBDF2 +:10A330002DE9FE430C46804644E002AB0E22072185 +:10A340004046FFF748FF002841D060681C2267782C +:10A350008678BF1C06EB860102EBC1014518029806 +:10A360001421017047700A214180698A0181E98ABC +:10A370004181A9888180A9898181304601F0EEFA66 +:10A38000029905230722C8806F70042028700025D9 +:10A390000E20CDE9000521464046FFF7DCFE2946A8 +:10A3A00066F30F2168F31F41F023002206200BF013 +:10A3B00099FF6078FD49801C607062682046921C9D +:10A3C000FFF793FE606880784028B6D10120BDE891 +:10A3D000FE83FEB50D46064638E002AB0E2207218D +:10A3E0003046FFF7F8FE002835D068681C23C17896 +:10A3F00001EB810203EBC20284180298152202705D +:10A40000627842700A224280A2894281A2888281B7 +:10A41000084601F0A3FA014602988180618AC18052 +:10A42000E18A0181A088B8B10020207000210E20AF +:10A43000CDE900010523072229463046FFF78BFEB0 +:10A440006A68DB492846D21CFFF74FFE6868C0786F +:10A450004028C2D10120FEBD0620E6E72DE9FE43DB +:10A460000C46814644E0204601F093FAD0B302AB9B +:10A47000082207214846FFF7AEFE0028A7D06068F3 +:10A480001C2265780679AD1C06EB860102EBC10142 +:10A4900047180298B7F81080062101704570042112 +:10A4A0004180304601F05AFA0146029805230722FE +:10A4B000C180A0F804807D70082038700025CDE9A7 +:10A4C000000521464846FFF746FE294666F30F2160 +:10A4D00069F31F41F023002206200BF003FF607890 +:10A4E000801C60706268B3492046121DFFF7FDFDB5 +:10A4F000606801794029B6D1012068E72DE9F34F62 +:10A5000083B00E4680E0304601F043FA002875D053 +:10A5100071681C2091F8068008EB880200EBC200ED +:10A520000C184146304601F028FA0146A078C300D5 +:10A5300070684078C20004F1240008F034F907463E +:10A540008088E18B401A80B2002581B3AA46218B16 +:10A55000814200D808468146024602AB0721039893 +:10A56000FFF739FE010028D0BAF1000F03D0029A9C +:10A57000B888022510808B46E28B3968A9EB05006C +:10A580001FFA80FA0A440398009208F077FBED1D49 +:10A59000009A59465346009507F085FFE08B5044DA +:10A5A00080B2E083B988884209D1012508E0FFE73D +:10A5B000801C4FF0010A80B2C9E7002008E60025A0 +:10A5C000CDE90095238A072231460398FFF7C3FDA2 +:10A5D000E089401EE0818DB1A078401CA0707068B9 +:10A5E000F178427811FB02F1CAB2816901230E3081 +:10A5F00008F087F880F800800020E08372686E49D8 +:10A600003046921DFFF771FD7068817940297FF413 +:10A610007AAF0120DCE570B5064648680D46144661 +:10A620008179402910D104EB84011C2202EBC10185 +:10A63000084401F0E5F9002806D0686829468471CD +:10A640003046BDE8704059E770BDFEB50C46074680 +:10A65000002645E0204601F09CF9D8B360681C2232 +:10A66000417901EB810102EBC1014518688900B90C +:10A67000FFDF02AB082207213846FFF7ACFD0028B8 +:10A6800033D00299607816220A70801C487004202A +:10A6900048806068407901F061F90146029805231D +:10A6A000072281806989C1800820CDE90006214602 +:10A6B0003846FFF750FD6078801C6070A889698972 +:10A6C0000844B0F5803F00D3FFDFA88969890844BA +:10A6D000A8816E81626839492046521DFFF705FD49 +:10A6E000606841794029B5D10120FEBD30B5438C69 +:10A6F000458BC3F3C704002345B1838B641EED1A59 +:10A70000C38A6D1E1D4495FBF3F3E4B22CB100899E +:10A7100018B1A04200D8204603444FF6FF70834290 +:10A7200000D3034613800C7030BD2DE9FC41074671 +:10A7300016460D46486802EB86011C2202EBC10159 +:10A7400044186A4601A92046FFF7D0FFA089618915 +:10A7500001448AB2BDF80010914212D0081A00D507 +:10A76000002060816868407940280AD1204601F0C5 +:10A770003DF9002805D06868294646713846FFF73C +:10A7800064FFBDE8FC812DE9FE4F894680461546F1 +:10A790005088032108F02EF98346B8F802004028BB +:10A7A0000ED240200DE000002C000020C1A00000CF +:10A7B000CFA00000DDA0000001BA0000EDB900004C +:10A7C000403880B282460146584601F0E2F800283F +:10A7D0007ED00AEB8A001C22DBF8041002EBC000DA +:10A7E0000C18204601F0EBF8002877D1B8F80000EB +:10A7F000E18A88423CD8A189D1B348456ED1002670 +:10A800005146584601F0B2F8218C0F18608B48B9B8 +:10A81000B9F1020F62D3B8F804006083618A8842FC +:10A8200026D80226A9EB06001FFA80F9B888A28B69 +:10A83000801A002814DD4946814500DA084683B2B3 +:10A8400068886968029139680A44CDE9003208F0E5 +:10A8500003FADDE90121F61D009B009607F0EFFDEC +:10A86000A18B01EB090080B2A083618B884207D9DC +:10A87000688803B052465946BDE8F04F01F0DDB894 +:10A880001FD14FF009002872B8F802006881D7E99B +:10A890000001C5E90401608BA881284601F054F845 +:10A8A0005146584601F062F80146DBF804000823DF +:10A8B0000078C20004F1200007F059FF0020A083B7 +:10A8C0006083A0890AF0FF02401EA081688800E032 +:10A8D00004E003B05946BDE8F04F26E7BDE8FE8F1F +:10A8E0002DE9F041064615460F461C461846F6F778 +:10A8F000EAFC18B92068F6F70CFD08B1102013E443 +:10A900007168688C0978B0EBC10F01D313200BE498 +:10A910003946304601F02AF801467068082300786D +:10A92000C20005F1200007F0ECFED4E90012C0E9F6 +:10A9300000120020E3E710B50446032108F05AF89E +:10A940000146007800F00300022805D02046BDE84B +:10A95000104001F1140298E48A8A2046BDE81040B4 +:10A96000C7E470B50446032108F044F805460146E3 +:10A970002046FFF773FD002816D029462046FFF732 +:10A9800064FE002810D029462046FFF722FD00284B +:10A990000AD029462046FFF7CBFC002804D02946E0 +:10A9A0002046BDE87040A9E570BD2DE9F0410C4698 +:10A9B00080461EE0E178427811FB02F1CAB281695B +:10A9C00001230E3007F0D3FE077860681C22C1799E +:10A9D000491EC17107EB8701606802EBC10146188F +:10A9E0003946204600F0D5FF18B1304600F0E0FFB0 +:10A9F00020B16068C1790029DCD180E7FEF77CFDD9 +:10AA0000050000D1FFDF0A202872384600F0A6FFBB +:10AA100068813946204600F0B0FF0146606808238F +:10AA20004078C20006F1240007F0A1FED0E9001032 +:10AA3000C5E90310A5F80280284600F085FFB0782C +:10AA400000B9FFDFB078401EB07058E770B50C4613 +:10AA50000546032107F0CEFF01464068C279224433 +:10AA6000C2712846BDE870409FE72DE9FE4F82463F +:10AA7000507814460F464FF0000800284FD00128A8 +:10AA800007D0022822D0FFDF2068B8606068F86035 +:10AA900024E702AB0E2208215046FFF79CFB00285A +:10AAA000F2D00298152105230170217841700A2106 +:10AAB0004180C0F80480C0F80880A0F80C8062884B +:10AAC00082810E20CDE90008082221E0A6783046D8 +:10AAD00000F044FF054606EB86012C22786802EB65 +:10AAE000C1010822465A02AB11465046FFF773FBDC +:10AAF0000028C9D0029807210170217841700421F3 +:10AB0000418008218580C680CDE9001805230A46CA +:10AB100039465046FFF71FFB87F80880DEE6A67827 +:10AB2000022516B1022E13D0FFDF2A1D914602AB7B +:10AB300008215046FFF74FFB0028A5D002980121BD +:10AB4000022E0170217841704580868002D005E098 +:10AB50000625EAE7A188C180E1880181CDE9009856 +:10AB60000523082239465046D4E710B50446032190 +:10AB700007F040FF014600F108022046BDE8104002 +:10AB800073E72DE9F05F0C4601281DD0957992F806 +:10AB90000480567905EB85011F2202EBC10121F0EB +:10ABA000030B08EB060111FB05F14FF6FF7202EAF9 +:10ABB000C10909F1030115FB0611F94F21F0031A30 +:10ABC00040B101283DD124E06168E57891F800802A +:10ABD0004E78DFE75946786807F047FD606000B9B6 +:10ABE000FFDF594660681AF06AFDE57051467868E3 +:10ABF00007F03BFD6168486100B9FFDF60684269AA +:10AC000002EB09018161606880F80080606846702D +:10AC100017E0606852464169786807F051FD5A466E +:10AC20006168786807F04CFD032007F08BFE04464E +:10AC3000032007F08FFE201A012802D1786807F060 +:10AC400009FD0BEB0A00BDE8F09F0246002102203F +:10AC500097E773B5D24D0A202870009848B10024B8 +:10AC60004FEA0D0007F0E3FC002C01D10099696068 +:10AC70007CBD01240020F5E770B50C46154638214F +:10AC800020461AF01CFD012666700A2104F11C0002 +:10AC90001AF015FD05B9FFDF297A207861F301006C +:10ACA0002070A879002817D02A4621460020FFF7F7 +:10ACB00068FF6168402088706168C87061680871C9 +:10ACC0006168487161688871616828880881616875 +:10ACD000688848816068868170BDC878002802D085 +:10ACE000002201204DE7704770B50546002165F34D +:10ACF0001F4100200BF0A0FB0321284607F07AFE3D +:10AD0000040000D1FFDF21462846FFF767F900283D +:10AD100004D0207840F010002070012070BD2DE993 +:10AD2000FF4180460E460F0CFEF7E6FB050007D0FC +:10AD30006F800321384607F05DFE040008D106E06D +:10AD400004B03846BDE8F0411321F9F739BEFFDF02 +:10AD50005FEA080005D0B8F1060F18D0FFDFBDE8A4 +:10AD6000FF8120782A4620F0080020700020ADF8EE +:10AD7000020002208DF800004FF6FF70ADF80400CD +:10AD8000ADF8060069463846F9F711FAE7E7C6F369 +:10AD9000072101EB81021C23606803EBC202805C87 +:10ADA000042803D008280AD0FFDFD8E7012000904C +:10ADB0004FF440432A46204600F008FECFE704B097 +:10ADC0002A462046BDE8F041FFF7E7B82DE9F05FDD +:10ADD0000027B0F80A9090460C4605463E46B9F169 +:10ADE000400F01D2402001E0A9F140001FFA80FA93 +:10ADF000287AC01E08286BD2DFE800F00D04192065 +:10AE000058363C4772271026002C6CD0D5E9030138 +:10AE1000C4E902015CE070271226002C63D00A22EC +:10AE200005F10C0104F108001AF0EDFB50E0712768 +:10AE30000C26002C57D0E868A06049E07427102643 +:10AE40009CB3D5E90301C4E902016888032107F036 +:10AE5000D1FD8346FEF750FB02466888508051467C +:10AE60005846FFF751F833E075270A26ECB1A88958 +:10AE700020812DE076271426BCB105F10C0004F1E9 +:10AE8000080307C883E8070022E07727102664B18B +:10AE9000D5E90301C4E902016888032107F0AAFD8E +:10AEA00001466888FFF781FD12E01CE07327082641 +:10AEB000CCB16888032107F09DFD01460078C006EB +:10AEC00006D56888FFF78AF810B96888F8F786FD14 +:10AED000A8F800602CB12780A4F8069066806888E6 +:10AEE000A0800020AFE6A8F80060FAE72DE9FC4159 +:10AEF0000C461E4617468046032107F07BFD05469B +:10AF00000A2C0AD2DFE804F0050505050505090944 +:10AF10000907042303E0062301E0FFDF0023CDE956 +:10AF20000076224629464046FFF715F929E438B550 +:10AF30000546A0F57F40FF3830D0284607F08CFE4C +:10AF4000040000D1FFDF204607F011FA002815D0D9 +:10AF500001466A46204607F02CFA00980321B0F813 +:10AF60000540284607F046FD0546052C03D0402C39 +:10AF700005D2402404E0007A80B1002038BD403C76 +:10AF8000A4B2214600F005FD40B1686804EB8401DD +:10AF90003E2202EBC101405A0028EFD0012038BD0B +:10AFA0002C0000202DE9F04F054689B0408807F0BD +:10AFB00053FE040000D1FFDF06AA2046696800F0B6 +:10AFC000C1FC069C001F34F8031F21806388638046 +:10AFD000228881B28A4205D1042B0AD0052B1DD0CC +:10AFE000062B15D02A462046FFF7CDFB09B0BDE859 +:10AFF000F08F1646241D2A4621463046F7F73FFAC1 +:10B000000828F3D12A4621463046FCF7F4FBEDE749 +:10B010006888211D6B68FAF739FCE7E717466888EE +:10B02000032107F0E7FC4FF000088DF80480064686 +:10B03000ADF80680042FD9D36279002AD6D02079C2 +:10B040004FF6FF794FF01C0A13282CD008DC01289A +:10B0500078D0062847D0072875D0122874D106E08A +:10B06000142872D0152871D016286DD1ACE10C2FA0 +:10B070006AD1307800F00301022965D140F0080060 +:10B0800030706079B07001208DF804002089ADF82F +:10B0900008006089ADF80A00A089ADF80C00E089CD +:10B0A000ADF80E0019E0B07890429FD130780107DA +:10B0B0009CD5062F9AD120F0080030706888414650 +:10B0C00060F31F4100200BF0B7F902208DF8040057 +:10B0D000ADF808902089ADF80A0068882A4601A9D1 +:10B0E000F9F765F882E7082F80D12789B4F80A902C +:10B0F000402F01D2402001E0A7F1400080B28046FD +:10B100000146304600F045FC08B3716808EB880042 +:10B110002C2202EBC000095A4945E3D1FE4807AA98 +:10B12000D0E90210CDE9071060798DF81C0008F015 +:10B13000FF048DF81E4068883146FFF796FC2A46CA +:10B14000214639E0B6E014E03CE039E0E6E0F248C0 +:10B15000D0E90010CDE907106079ADF820708DF8C6 +:10B160001C00ADF82290688807AA3146FFF77DFCE5 +:10B170003CE7082FB6D16089B4F80880402801D296 +:10B18000402000E0403887B23946304600F001FCEC +:10B190000028A7D007EB870271680AEBC2000844B9 +:10B1A000028A42459ED1017808299BD14078617975 +:10B1B000884297D1F9B22A463046FEF7EEFE15E7EF +:10B1C0000E2F07D0CDF81C80CDF8208060798DF847 +:10B1D0001C00C8E76189E7898B46B4F80C903046BB +:10B1E000FEF73DFFABF14001402901D309204AE0C1 +:10B1F000B9F1170F01D3172F01D20B2043E04028DC +:10B200000ED000EB800271680AEBC200084401789E +:10B21000012903D1407861798842A9D00A2032E01F +:10B220003046FEF7FEFE014640282BD001EB81039D +:10B2300072680AEBC30002EB0008012288F80020C4 +:10B24000627988F80120706822894089B84200D963 +:10B250003846248A03232B72AA82EF812882A5F81C +:10B260000C906C82084600F079FB6881A8F8149075 +:10B27000A8F81870A8F80E40A8F810B0284600F0FA +:10B2800063FBB3E6042005212972A5F80A80E88152 +:10B2900001212973A049D1E90421CDE90721617970 +:10B2A0008DF81C10ADF81E00688807AA3146FFF71C +:10B2B000DCFBE3E7062FE4D3B078904215D1307879 +:10B2C000010712D520F0080030706888414660F30D +:10B2D0001F4100200BF0B0F802208DF804002089F7 +:10B2E000ADF80800ADF80A90F7E604213046FEF705 +:10B2F000CEFE04464028C4D00220830300902A4694 +:10B300002146304600F062FB4146688864F30F2115 +:10B3100060F31F4106200BF08FF867E60E2FB0D1C7 +:10B3200004213046FEF7B3FE81464028A9D04146AD +:10B33000688869F30F2160F31F4106200BF07CF849 +:10B34000208A0790E08900907068A7894089B842F8 +:10B3500000D938468346B4F80A80208905904846CB +:10B3600000F0FCFA6881079840B10220079B00902A +:10B370002A464946304600F029FB37E6B8F1170F58 +:10B380001ED3172F1CD30420287200986882EF81E7 +:10B39000A5F810B0A5F80C8009EB89020AEBC200F1 +:10B3A0007168009A0C180598A4F81480A4F818B0D5 +:10B3B000E2812082284600F0C7FA0620207015E6B8 +:10B3C00001200B230090D3E7082FA6D12189304616 +:10B3D000FEF745FE074640289FD007EB87027168BD +:10B3E0000AEBC2000844804600F0E9FA002894D134 +:10B3F0006489B8F80E002044B0F5803F05D3688812 +:10B400003A46314600F019FBF0E5002C85D0A8F84B +:10B410000E0068883A463146FFF7FDF8082028728A +:10B42000384600F09BFA6881AC8127E770B50D467D +:10B430000646032107F0DEFA040004D02078000756 +:10B4400004D5112070BD43F2020070BD2A4621468A +:10B450003046FEF71AFF18B9286860616868A06175 +:10B46000207840F008002070002070BD70B50D46B7 +:10B470000646032107F0BEFA040004D02078000736 +:10B4800004D4082070BD43F2020070BD2A46214654 +:10B490003046FEF72EFF00B9A582207820F0080084 +:10B4A0002070002070BD2DE9F04F0E4691B080460F +:10B4B000032107F09FFA0446404607F0DFFB0746EA +:10B4C0000020079008900990ADF830000A90029093 +:10B4D0000390049004B9FFDF0DF108091FBBFFDFE3 +:10B4E00021E038460BA9002206F004FE9DF82C004E +:10B4F00000F07F050A2D00D3FFDF6019017F491E90 +:10B5000001779DF82C0000060DD52A460CA907A846 +:10B51000FEF711FE02E00000AC5A020019F8051017 +:10B52000491C09F80510761EF6B2DAD204F134008F +:10B53000FA4D04F1260BDFF8E8A304F12A07069080 +:10B5400010E05846069900F06AFA064628700A2864 +:10B5500000D3FFDF5AF8261040468847E08CC05DD4 +:10B56000B04202D0208D0028EBD10A202870EC4D8B +:10B570004E4628350EE00CA907A800F050FA044604 +:10B58000375D55F8240000B9FFDF55F8242039460F +:10B5900040469047BDF81E000028ECD111B026E5CA +:10B5A00010B5032107F026FA040000D1FFDF0A21BD +:10B5B00004F11C001AF083F8207840F00400207099 +:10B5C00010BD10B50C46032107F014FA2044007F8B +:10B5D000002800D0012010BD2DE9F84F89461546FE +:10B5E0008246032107F006FA070004D02846F5F743 +:10B5F0006AFE40B903E043F20200BDE8F88F484616 +:10B60000F5F787FE08B11020F7E7786828B1698858 +:10B610000089814201D90920EFE7B9F800001C2414 +:10B6200018B1402809D2402008E03846FEF7F9FC5E +:10B630008046402819D11320DFE7403880B2804689 +:10B640000146384600F0A5F948B108EB8800796852 +:10B6500004EBC000085C012803D00820CDE70520DA +:10B66000CBE7FDF749FF06000BD008EB88007968AF +:10B6700004EBC0000C18B9F8000020B1E88910B143 +:10B6800013E01120B9E72888172802D36888172803 +:10B6900001D20720B1E7686838B12B1D2246414628 +:10B6A0003846FFF71DF90028A7D104F10C026946BE +:10B6B0002046FFF71BF8288860826888E082B9F886 +:10B6C000000030B102202070E889A080E889A0B194 +:10B6D0002BE003202070A889A08078688178402919 +:10B6E00005D180F8028039465046FEF721FE4046DB +:10B6F00000F034F9A9F8000021E07868218B408936 +:10B70000884200D908462083A6F802A0042030729F +:10B71000B9F800007081E0897082F181208B30825D +:10B72000A08AB081304600F00FF97868C1784029CE +:10B7300005D180F8038039465046FEF74AFE0020C6 +:10B740005BE770B50D460646032107F053F9040088 +:10B7500003D0402D04D2402503E043F2020070BD27 +:10B76000403DADB2294600F014F958B105EB850112 +:10B770001C22606802EBC101084400F020F918B1F6 +:10B78000082070BD052070BD2A462146304600F0D5 +:10B7900054F9002070BD2DE9F0410D461646804653 +:10B7A000032107F027F90446402D01D2402500E08F +:10B7B000403DADB28CB1294600F0EBF880B105EB0D +:10B7C00085011C22606802EBC1014718384600F071 +:10B7D000F6F838B10820BDE8F08143F20200FAE73C +:10B7E0000520F8E733463A4629462046FFF778F821 +:10B7F0000028F0D1EAB221464046FEF796FF00202D +:10B80000E9E72DE9F0410D4616468046032107F091 +:10B81000F1F80446402D01D2402500E0403DAFB292 +:10B8200024B13046F5F74FFD38B902E043F202008B +:10B83000D1E73068F5F747FD08B11020CBE739466E +:10B84000204600F0A6F860B107EB87011C22606873 +:10B8500002EBC1014518284600F0B1F818B10820E4 +:10B86000B9E70520B7E7B088A98A884201D90C203A +:10B87000B1E76168E88C4978B0EBC10F01D31320C0 +:10B88000A9E73946204600F078F8014660680823A9 +:10B890004078C20005F1240006F033FFD6E900121B +:10B8A000C0E90012FAB221464046FEF7B4FE00207D +:10B8B00091E72DE9F0470D461F469046814603214A +:10B8C00007F098F80446402D01D2402001E0A5F190 +:10B8D000400086B23CB14DB13846F5F738FD50B165 +:10B8E0001020BDE8F08743F20200FAE76068C8B1B3 +:10B8F000A0F80C8024E03146204600F04AF888B1D8 +:10B9000006EB86011C22606802EBC101451828463F +:10B9100000F055F840B10820E3E700002C000020BB +:10B92000C45A02000520DCE7A5F80880F2B22146DF +:10B930004846FEF7FAFE1FB1A88969890844388095 +:10B940000020CEE706F035BD017821F00F01491C3B +:10B9500021F0F00110310170FDF7D1BD10B50446A2 +:10B96000402800D9FFDF4034A0B210BD40684269D2 +:10B970000078484302EBC0007047C2784068037803 +:10B9800012FB03F24378406901FB032100EBC10085 +:10B990007047C2788A4209D9406801EB81011C22B4 +:10B9A00002EBC101405C08B10120704700207047E4 +:10B9B0000078062801D901207047002070470078E0 +:10B9C000062801D00120704700207047F0B401EB39 +:10B9D00081061C27446807EBC6063444049D0526EF +:10B9E0002670E3802571F0BCFEF78EBA10B5418950 +:10B9F00011B1FFF7DDFF08B1002010BD012010BD1F +:10BA000010B5C18C8278B1EBC20F04D9C18911B1D4 +:10BA1000FFF7CEFF08B1002010BD012010BD10B50A +:10BA20000C4601230A22011D06F0A1FE00782188A0 +:10BA3000012282409143218010BDF0B402EB8205C7 +:10BA40001C264C6806EBC505072363554B681C791B +:10BA5000402C03D11A71F0BCFEF700BDF0BC70475A +:10BA600010B5EFF3108000F0010472B6F948417888 +:10BA7000491C41704078012801D10AF01DF9002CC1 +:10BA800000D162B610BD70B5F24CA07848B901255E +:10BA9000A570FFF7E5FF0AF020F920B100200AF0B9 +:10BAA000EAF8002070BD4FF08040E570C0F8045304 +:10BAB000F7E770B5EFF3108000F0010572B6E54CC2 +:10BAC000607800B9FFDF6078401E6070607808B968 +:10BAD0000AF0F6F8002D00D162B670BDDD4810B551 +:10BAE000817821B10021C1708170FFF7E2FF002051 +:10BAF00010BD10B504460AF0F0F8D6498978084020 +:10BB000000D001202060002010BD10B5FFF7A8FF75 +:10BB10000AF0E3F802220123CE49540728B1CE48A7 +:10BB2000026023610320087202E00A72C4F8043341 +:10BB30000020887110BD2DE9F05FDFF8189342787E +:10BB4000817889F80420002689F80510074689F8CD +:10BB500006600078DFF804B3354620B1012811D023 +:10BB6000022811D0FFDF0AF0CAF84FF0804498B1E4 +:10BB70000AF0CCF8B0420FD130460AF0CBF80028DA +:10BB8000FAD041E00126EEE7FFF76AFF5846016868 +:10BB9000C907FCD00226E6E70120E060C4F80451A2 +:10BBA000AF490E600107D1F84412AD4AC1F34231EA +:10BBB00024321160AA49343108604FF0020AC4F8F7 +:10BBC00004A3A060A7480168C94341F3001101F133 +:10BBD0000108016841F01001016000E020BFD4F8C5 +:10BBE00004010028FAD030460AF094F80028FAD070 +:10BBF000B8F1000F04D19B48016821F010010160E9 +:10BC0000C4F808A3C4F8045199F805004E4688B159 +:10BC1000387878B90AF061F880460AF0F5F90146FB +:10BC20006FF00042B8F1000F02D0C6E9032101E035 +:10BC3000C6E90312DBF80000C00701D00AF049F89A +:10BC4000387810B13572BDE8F09F4FF01808C4F88D +:10BC50000883C4F82C510127C4F81870D4F82C01BB +:10BC60000028FBD0C4F80C51C4F810517948C01D0D +:10BC70000AF062F83570FFF748FF6761784930795C +:10BC800020310860C4F80483DDE770B5050000D1F9 +:10BC9000FFDF4FF080424FF0FF30C2F80803002171 +:10BCA000C2F80011C2F80411C2F80C11C2F8101148 +:10BCB000684C61700AF01DF810B10120A07060702E +:10BCC00066480068C00701D00AF003F82846BDE8BE +:10BCD000704030E75F48007A002800D001207047AC +:10BCE0002DE9FF5F6048D0F800805F4A5F49083265 +:10BCF00011608406D4F8080100B10120D4F82411A1 +:10BD000001B101218A46D4F81C1101B101218946F3 +:10BD1000D4F8201109B1012700E00027D4F8001160 +:10BD200001B101218B46D4F8041101B10121039125 +:10BD3000D4F80C1101B101210291D4F8101101B114 +:10BD40000121444D019129780026009120B1C4F8C9 +:10BD50000861012009F08FFFBAF1000F04D0C4F888 +:10BD60002461092009F087FFB9F1000F04D0C4F85D +:10BD70001C610A2009F07FFF27B1C4F820610B2065 +:10BD800009F079FF3348C01D09F0DEFF00B1FFDF85 +:10BD9000DFF8C4900127BBF1000F10D0C4F808737E +:10BDA000E87818B1EE70002009F065FF287A0228C3 +:10BDB00005D1032028720221C9F8001027610398D9 +:10BDC00008B1C4F80461029850B1C4F80C61287A33 +:10BDD000032800D0FFDFC9F800602F72FFF769FE6B +:10BDE000019838B1C4F81061287A012801D100F017 +:10BDF0005DF86761009838B12E70287A012801D16A +:10BE0000FFF783FEFFF755FE1248C01D09F0B2FF91 +:10BE10001549091DC1F80080BDE8FF9F0D4810B508 +:10BE2000C01D09F091FF0B4940B1012008704FF08F +:10BE3000E021C1F80002BDE8104011E6087A0128AF +:10BE400001D1FFF762FE0348BDE81040C01D09F0B4 +:10BE500091BF00003C000020340C00400C04004066 +:10BE60001805004010ED00E010050240010000013F +:10BE700070B5224CA07808B909F022FF012085078F +:10BE8000A861207A002603280AD100BFD5F80C014A +:10BE900020B9002009F03EFF0028F7D1C5F80C6159 +:10BEA00026724FF0FF30C5F8080370BD70B5134C13 +:10BEB0006079F0B1012803D0A179401E814218DADF +:10BEC00009F00BFF05460AF09FF86179012902D9B4 +:10BED000A179491CA1710DB1216900E0E168411A05 +:10BEE000022902DA11F1020F06DC0DB1206100E037 +:10BEF000E060BDE8704008E670BD00003C00002036 +:10BF000010B5202000F07FF8202000F08DF84D497A +:10BF1000202081F80004F5F771FA4B4908604B487E +:10BF2000D0F8041341F00101C0F80413D0F8041351 +:10BF300041F08071C0F80413424901201C39C1F856 +:10BF4000000110BD10B5202000F05DF83E48002132 +:10BF5000C8380160001D01603D4A481E10603B4A20 +:10BF6000C2F80803384B1960C2F80001C2F860013A +:10BF700038490860BDE81040202000F055B8344929 +:10BF80003548091F086070473149334808607047D9 +:10BF90002D48C8380160001D521E026070472C49B0 +:10BFA00001200860BFF34F8F70472DE9F041284909 +:10BFB000D0F8188028480860244CD4F800010025E7 +:10BFC000244E6F1E28B14046F5F776F940B900219E +:10BFD00011E0D4F8600198B14046F5F76DF948B129 +:10BFE000C4F80051C4F860513760BDE8F04120202A +:10BFF00000F01AB831684046BDE8F04119F08ABB3C +:10C00000FFDFBDE8F08100280DDB00F01F020121F9 +:10C0100091404009800000F1E020C0F88011BFF39A +:10C020004F8FBFF36F8F7047002809DB00F01F02AE +:10C03000012191404009800000F1E020C0F8801209 +:10C040007047000020E000E0C80602400000024007 +:10C050001805024000040240010000010F4A126866 +:10C060000D498A420CD118470C4A12680A4B9A4271 +:10C0700006D101B509F09AFFFFF781FFBDE8014045 +:10C08000074909680958084706480749054A064B01 +:10C090007047000000000000BEBAFECA5400002035 +:10C0A000040000208013002080130020F8B51D46F6 +:10C0B000DDE906470E000AD006F0E0FD2346FF1D2D +:10C0C000BCB231462A46009406F0EDF9F8BDD0190D +:10C0D0002246194619F052FA2046F8BD70B50D46B1 +:10C0E0000446102119F0C9FA258117206081A07B30 +:10C0F00040F00A00A07370BD4FF6FF720A8001463F +:10C1000002200AF099B9704700897047827BD307F3 +:10C1100001D1920703D48089088000207047052050 +:10C120007047827B920700D58181704701460020CD +:10C13000098841F6FE52114200D00120704700B537 +:10C140000346807BC00701D0052000BD59811846F9 +:10C15000FFF7ECFFC00703D0987B40F00400987312 +:10C16000987B40F001009873002000BD827B52074D +:10C1700000D509B14089704717207047827B61F371 +:10C18000C302827370472DE9FC5F0E4604460178B6 +:10C190009646012000FA01F14DF6FF5201EA02092C +:10C1A00062684FF6FF7B1188594502D10920BDE82E +:10C1B000FC9FB9F1000F05D041F6FE55294201D090 +:10C1C0000120F4E741EA090111801D0014D0002389 +:10C1D0002B7094F800C0052103221F464FF0020A7D +:10C1E000BCF10E0F76D2DFE80CF0F909252F476479 +:10C1F0006B77479193B4D1D80420D8E76168208940 +:10C200008B7B9B0767D517284AD30B89834247D37B +:10C210008989172901D3814242D185F800A0A5F868 +:10C2200001003280616888816068817B21F00201B1 +:10C230008173C6E0042028702089A5F80100608978 +:10C24000A5F803003180BCE0208A3188C01D1FFAA8 +:10C2500080F8414524D3062028702089A5F80100E4 +:10C260006089A5F80300A089A5F805000721208AA8 +:10C27000CDE90001636941E00CF0FF00082810D00F +:10C28000082028702089A5F801006089A5F803001E +:10C2900031806A1D694604F10C0008F057F910B1AD +:10C2A0005EE01020EDE730889DF8001008443080F3 +:10C2B00087E00A2028702089A5F80100328044E038 +:10C2C0000C2028702089A5F801006089A5F80300DA +:10C2D00031803AE082E064E02189338800EB41025A +:10C2E0001FFA82F843453BD3B8F1050F38D30E222D +:10C2F0002A700BEA4101CDE90010E36860882A4604 +:10C300007146FFF7D3FEA6F800805AE0402028705F +:10C3100060893188C01C1FFA80F8414520D32878F5 +:10C32000714620F03F00123028702089A5F80100E6 +:10C330006089CDE9000260882A46E368FFF7B6FE0F +:10C34000A6F80080287840063BD461682089888060 +:10C3500037E0A0893288401D1FFA80F8424501D29B +:10C3600004273DE0162028702089A5F80100608987 +:10C37000A5F80300A089CDE9000160882A4671462E +:10C380002369FFF793FEA6F80080DEE718202870E7 +:10C39000207A6870A6F800A013E061680A88920409 +:10C3A00001D405271CE0C9882289914201D00627C3 +:10C3B00016E01E21297030806068018821F4005148 +:10C3C0000180B9F1000F0BD0618878230022022090 +:10C3D00009F088FF61682078887006E033800327C1 +:10C3E0006068018821EA090101803846DFE62DE90D +:10C3F000FF4F85B01746129C0D001E461CD03078AA +:10C40000C10703D000F03F00192801D9012100E045 +:10C4100000212046FFF7AAFEA8420DD32088A0F5F0 +:10C420007F41FF3908D03078410601D4000605D598 +:10C43000082009B0BDE8F08F0720FAE700208DF84A +:10C4400000008DF8010030786B1E00F03F0C0121D8 +:10C45000A81E4FF0050A4FF002094FF0030B9AB2E5 +:10C46000BCF1200F75D2DFE80CF08B10745E74689D +:10C47000748C749C74B674BB74C974D574E274748F +:10C4800074F274F074EF74EE748B052D78D18DF81E +:10C490000090A0788DF804007088ADF8060030791F +:10C4A0008DF80100707800F03F000C2829D00ADCDC +:10C4B000A0F10200092863D2DFE800F012621562E1 +:10C4C0001A621D622000122824D004DC0E281BD022 +:10C4D0001028DBD11BE016281FD01828D6D11FE06A +:10C4E0002078800701E020784007002848DAEFE054 +:10C4F00020780007F9E72078C006F6E72078800664 +:10C50000F3E720784006F0E720780006EDE7208882 +:10C51000C005EAE720884005E7E720880005E4E752 +:10C520002088C004E1E72078800729D5032D27D192 +:10C530008DF800B0B6F8010082E0217849071FD5D8 +:10C54000062D1DD381B27078012803D0022817D19F +:10C5500002E0CAE0022000E0102004228DF8002052 +:10C5600072788DF80420801CB1FBF0F2ADF8062043 +:10C5700092B242438A4203D10397ADF80890A7E0F4 +:10C580007AE02078000777D598B282088DF800A06D +:10C59000ADF80420B0EB820F6ED10297ADF8061013 +:10C5A00096E02178C90667D5022D65D381B20620B1 +:10C5B0008DF80000707802285ED300BFB1FBF0F266 +:10C5C0008DF80400ADF8062092B242438A4253D15E +:10C5D000ADF808907BE0207880064DD5072003E079 +:10C5E000207840067FD508208DF80000A088ADF89F +:10C5F0000400ADF80620ADF8081068E020780006C9 +:10C6000071D50920ADF804208DF80000ADF80610B2 +:10C6100002975DE02188C90565D5022D63D381B2FB +:10C620000A208DF80000707804285CD3C6E72088C3 +:10C63000400558D5012D56D10B208DF80000A0885B +:10C64000ADF8040044E021E026E016E0FFE7208892 +:10C65000000548D5052D46D30C208DF80000A08894 +:10C66000ADF80400B6F803006D1FADF80850ADF842 +:10C670000600ADF80AA02AE035E02088C00432D5D3 +:10C68000012D30D10D208DF8000021E0208880049C +:10C6900029D4B6F80100E080A07B000723D5032D44 +:10C6A00021D3307800F03F001B2818D00F208DF8E0 +:10C6B0000000208840F40050A4F80000B6F8010003 +:10C6C000ADF80400ED1EADF80650ADF808B00397C4 +:10C6D00069460598F5F71EFC050008D016E00E2007 +:10C6E0008DF80000EAE7072510E008250EE0307815 +:10C6F00000F03F001B2809D01D2807D00220059913 +:10C7000009F09AFE208800F400502080A07B4007AA +:10C7100008D52046FFF70AFDC00703D1A07B20F013 +:10C720000400A073284684E61FB5022806D1012024 +:10C730008DF8000088B26946F5F7ECFB1FBD0000DC +:10C74000F8B51D46DDE906470E000AD006F096FA58 +:10C750002346FF1DBCB231462A46009405F0A3FED5 +:10C76000F8BDD0192246194618F008FF2046F8BD3A +:10C770002DE9FF4F8DB09B46DDE91B57DDF87CA00E +:10C780000C46082B05D0E06901F002F950B11020E9 +:10C79000D2E02888092140F0100028808AF8001093 +:10C7A000022617E0E16901208871E2694FF4205107 +:10C7B0009180E1698872E06942F601010181E069D6 +:10C7C000002181732888112140F0200028808AF8F8 +:10C7D0000010042638780A900A2038704FF00209B9 +:10C7E00004F118004D460C9001F095FBB04681E035 +:10C7F000BBF1100F0ED1022D0CD0A9EB0800801C4C +:10C8000080B20221CDE9001005AB52461E990D9869 +:10C81000FFF796FFBDF816101A98814203D9F74822 +:10C8200000790F9004E003D10A9808B138702FE026 +:10C830004FF00201CDE900190DF1160352461E9981 +:10C840000D98FFF77DFF1D980088401B801B83B269 +:10C85000C6F1FF00984200D203461E990BA8D9B139 +:10C860005FF00002DDF878C0CDE9032009EB060196 +:10C8700089B2CDE901C10F980090BDF816100022D1 +:10C880000D9801F0CBFB387070B1C0B2832807D08F +:10C89000BDF8160020833AE00AEB09018A19E1E7A6 +:10C8A000022011B0BDE8F08FBDF82C00811901F015 +:10C8B000FF08022D0DD09AF80120424506D1BDF89F +:10C8C0002010814207D0B8F1FF0F04D09AF8018000 +:10C8D0001FE08AF80180C94800680178052902D163 +:10C8E000BDF81610818009EB08001FFA80F905EBEE +:10C8F000080085B2DDE90C1005AB0F9A01F00EFBC4 +:10C9000028B91D980088411B4145BFF671AF022D23 +:10C9100013D0BBF1100F0CD1A9EB0800801C81B221 +:10C920000220CDE9000105AB52461E990D98FFF794 +:10C9300007FF1D980580002038700020B1E72DE921 +:10C94000F8439C46089E13460027B26B9AB3491FD2 +:10C950008CB2F18FA1F57F45FF3D05D05518AD880C +:10C960002944891D8DB200E000252919B6F83C80C4 +:10C970000831414520D82A44BCF8011022F8021B96 +:10C98000BCF8031022F8021B984622F8024B91468D +:10C9900006F062F94FF00C0C41464A462346CDF8AA +:10C9A00000C005F04CFDF587B16B00202944A41DA3 +:10C9B0002144088003E001E0092700E0832738468E +:10C9C000BDE8F88310B50B88848F9C420CD9846B2A +:10C9D000E018048844B1848824F40044A41D23444E +:10C9E0000B801060002010BD0A2010BD2DE9F0471B +:10C9F0008AB00025904689468246ADF81850072730 +:10CA00004BE0059806888088000446D4A8F80060AA +:10CA100007A8019500970295CDE903504FF40073E4 +:10CA200000223146504601F0F9FA04003CD1BDF82D +:10CA30001800ADF82000059804888188B44216D10A +:10CA40000A0414D401950295039521F4004100973E +:10CA5000049541F4804342882146504601F0B4F8E1 +:10CA600004000BD10598818841F40041818005AA1A +:10CA700008A94846FFF7A6FF0400DCD000970598F8 +:10CA800002950195039504950188BDF81C3000229C +:10CA9000504601F099F80A2C06D105AA06A9484685 +:10CAA000FFF790FF0400ACD0ADF8185004E00598F3 +:10CAB000818821F40041818005AA06A94846FFF734 +:10CAC00081FF0028F3D00A2C03D020460AB0BDE82D +:10CAD000F0870020FAE710B50C46896B86B051B19B +:10CAE0000C218DF80010A18FADF80810A16B0191F9 +:10CAF0006946FAF718FB00204FF6FF71A063E18743 +:10CB0000A08706B010BD2DE9F0410D460746896BA0 +:10CB10000020069E1446002911D0012B0FD1324669 +:10CB200029463846FFF762FF002808D1002C06D0BE +:10CB3000324629463846BDE8F04100F038BFBDE82E +:10CB4000F0812DE9FC411446DDE9087C0E46DDE963 +:10CB50000A15521DBCF800E092B2964502D2072099 +:10CB6000BDE8FC81ACF8002017222A70A5F801600E +:10CB7000A5F803300522CDE900423B462A46FFF7DF +:10CB8000DFFD0020ECE770B50C4615464821204635 +:10CB900018F095FD04F1080044F81C0F00204FF632 +:10CBA000FF71E06161842084A5841720E08494F8FB +:10CBB0002A0040F00A0084F82A0070BD4FF6FF7288 +:10CBC0000A800146032009F037BC30B585B00C4619 +:10CBD0000546FFF780FFA18E284629B101218DF877 +:10CBE00000106946FAF79FFA0020E0622063606354 +:10CBF00005B030BDB0F8400070470000580000207C +:10CC000090F84620920703D4408808800020F3E77C +:10CC10000620F1E790F846209207EDD5A0F84410E1 +:10CC2000EAE70146002009880A0700D5012011F033 +:10CC3000F00F01D040F00200CA0501D540F0040019 +:10CC40008A0501D540F008004A0501D540F01000E2 +:10CC50000905D1D540F02000CEE700B5034690F895 +:10CC60004600C00701D0062000BDA3F842101846B8 +:10CC7000FFF7D7FF10F03E0F05D093F8460040F0C5 +:10CC8000040083F8460013F8460F40F001001870C6 +:10CC9000002000BD90F84620520700D511B1B0F831 +:10CCA0004200A9E71720A7E710F8462F61F3C30257 +:10CCB0000270A1E72DE9FF4F9BB00E00DDE92B3498 +:10CCC000DDE92978289D24D02878C10703D000F019 +:10CCD0003F00192801D9012100E000212046FFF77B +:10CCE000D9FFB04215D32878410600F03F010CD49B +:10CCF0001E290CD0218811F47F6F0AD13A8842B1E5 +:10CD0000A1F57F42FF3A04D001E0122901D10006CB +:10CD100002D504201FB0C5E5F9491D984FF0000A5F +:10CD200008718DF818A08DF83CA00FAA0A60ADF824 +:10CD30001CA0ADF850A02978994601F03F02701F61 +:10CD40005B1C04F1180C4FF0060E4FF0040BCDF8ED +:10CD500058C01F2A7ED2DFE802F07D7D107D267D3F +:10CD6000AC7DF47DF37DF27DF17DF47DF07D7D7D04 +:10CD7000EF7DEE7D7D7D7D7DED0094F84610B5F86C +:10CD80000100890701D5032E02D08DF818B022E3E7 +:10CD90004FF40061ADF85010608003218DF83C1015 +:10CDA000ADF84000D8E2052EEFD1B5F801002083A0 +:10CDB000ADF81C00B5F80310618308B1884201D9B1 +:10CDC00001207FE10020A07220814FF6FF702084B7 +:10CDD000169801F0A0F8052089F8000002200290C2 +:10CDE00083460AAB1D9A16991B9801F097F890BBE1 +:10CDF0009DF82E00012804D0022089F8010010209F +:10CE000003E0012089F8010002200590002203A917 +:10CE10000BA807F09BFBE8BB9DF80C00059981422D +:10CE20003DD13A88801CA2EB0B01814237DB02998D +:10CE30000220CDE900010DF12A034A4641461B9824 +:10CE4000FFF77EFC02980BF1020B801C80B217AA40 +:10CE500003A901E0A0E228E002900BA807F076FB0E +:10CE600002999DF80C00CDE9000117AB4A464146F6 +:10CE70001B98FFF765FC9DF80C100AAB0BEB01004B +:10CE80001FFA80FB02981D9A084480B202901699FE +:10CE90001B9800E003E001F041F80028B6D0BBF198 +:10CEA000020F02D0A7F800B053E20A208DF8180054 +:10CEB0004FE200210391072EFFF467AFB5F80100A0 +:10CEC0002083ADF81C00B5F80320628300283FF4EE +:10CED00077AF90423FF674AF0120A072B5F805001D +:10CEE00020810020A073E06900F052FD78B9E1696B +:10CEF00001208871E2694FF420519180E1698872C4 +:10CF0000E06942F601010181E06900218173F01FAF +:10CF100020841E98606207206084169800F0FBFF52 +:10CF2000072089F800000120049002900020ADF84D +:10CF30002A0028E01DE2A3E13AE1EAE016E2AEE0D1 +:10CF400086E049E00298012814D0E0698079012840 +:10CF500003D1BDF82800ADF80E00049803ABCDE96D +:10CF600000B04A4641461B98FFF7EAFB0498001DB3 +:10CF700080B20490BDF82A00ADF80C00ADF80E00A8 +:10CF8000059880B202900AAB1D9A16991B9800F082 +:10CF9000C5FF28B902983988001D05908142D1D279 +:10CFA0000298012881D0E0698079012805D0BDF878 +:10CFB0002810A1F57F40FF3803D1BDF82800ADF857 +:10CFC0000E00049803ABCDE900B04A4641461B98D9 +:10CFD000FFF7B6FB0298BBE1072E02D0152E7FF4B7 +:10CFE000D4AEB5F801102183ADF81C10B5F80320BC +:10CFF000628300293FF4E4AE91423FF6E1AE0121A5 +:10D00000A1724FF0000BA4F808B084F80EB0052E02 +:10D0100007D0C0B2691DE26907F079FA00287FF4F1 +:10D0200044AF4FF6FF70208401A906AA14A8CDF8DA +:10D0300000B081E885032878214600F03F031D9A5F +:10D040001B98FFF795FB8246208BADF81C0080E112 +:10D050000120032EC3D14021ADF85010B5F80110C6 +:10D060002183ADF81C100AAAB8F1000F00D00023EC +:10D07000CDE9020304921D98CDF804800090388811 +:10D080000022401E83B21B9800F0C8FF8DF81800E4 +:10D0900090BB0B2089F80000BDF8280037E04FF066 +:10D0A000010C052E9BD18020ADF85000B5F8011081 +:10D0B0002183B5F803002084ADF81C10B0F5007F83 +:10D0C00003D907208DF8180085E140F47C422284C2 +:10D0D0000CA8B8F1000F00D00023CDE90330CDE952 +:10D0E000018C1D9800903888401E83B21B9800F078 +:10D0F00095FF8DF8180028B18328A8D10220BDE043 +:10D10000580000200D2189F80010BDF83000401CA7 +:10D110001EE1032E04D248067FF537AE002017E14A +:10D12000B5F80110ADF81C102878400602D58DF82E +:10D130003CE002E007208DF83C004FF0000803209F +:10D14000CDE902081E9BCDF810801D980193A6F131 +:10D15000030B00901FFA8BF342461B9800F034FD3E +:10D160008DF818008DF83C80297849060DD5208867 +:10D17000C00506D5208BBDF81C10884201D1C4F82B +:10D18000248040468DF81880E2E0832801D14FF0DA +:10D19000020A4FF48070ADF85000BDF81C002083E7 +:10D1A000A4F820B01E986062032060841321CCE0B4 +:10D1B000052EFFF4EAADB5F80110ADF81C10A28FF2 +:10D1C00062B3A2F57F43FE3B28D008228DF83C20B5 +:10D1D0004FF0000B0523CDE9023BDDF878C0CDF818 +:10D1E00010B01D9A80B2CDF804C040F40043009204 +:10D1F000B5F803201B9800F0E7FC8DF83CB04FF425 +:10D2000000718DF81800ADF85010832810D0F8B1D7 +:10D21000A18FA1F57F40FE3807D0DCE00B228DF80E +:10D220003C204FF6FE72A287D2E7A4F83CB0D2E0D1 +:10D2300000942B4631461E9A1B98FFF780FB8DF811 +:10D24000180008B183284BD1BDF81C00208355E796 +:10D2500000942B4631461E9A1B98FFF770FB8DF801 +:10D260001800E8BBE18FA06B0844811D8DE88203A4 +:10D270004388828801881B98FFF763FC824668E038 +:10D2800095F80180022E70D15FEA080002D0B8F153 +:10D29000010F6AD109208DF83C0007A800908DF895 +:10D2A00040804346002221461B98FFF72CFC8DF856 +:10D2B00042004FF0000B8DF843B050B9B8F1010FA8 +:10D2C00012D0B8F1000F04D1A18FA1F57F40FF3833 +:10D2D0000AD0A08F40B18DF83CB04FF4806000E0E0 +:10D2E00037E0ADF850000DE00FA91B98F9F71BFFD0 +:10D2F00082468DF83CB04FF48060ADF85000BAF132 +:10D30000020F06D0FC480068C07928B18DF81800DB +:10D3100027E0A4F8188044E0BAF1000F03D0812080 +:10D320008DF818003DE007A80090434601222146F1 +:10D330001B98FFF7E8FB8DF8180021461B98FFF7B4 +:10D34000CAFB9DF8180020B9192189F800100120A6 +:10D3500038809DF83C0020B10FA91B98F9F7E3FE37 +:10D360008246BAF1000F33D01BE018E08DF818E0C8 +:10D3700031E02078000712D5012E10D10A208DF857 +:10D380003C00E088ADF8400003201B9909F054F8F8 +:10D390000820ADF85000C1E648067FF5F6AC4FF026 +:10D3A000040A2088BDF8501008432080BDF85000C2 +:10D3B00080050BD5A18FA1F57F40FE3806D11E98C0 +:10D3C000E06228982063A6864FF0030A5046A1E445 +:10D3D0009DF8180078B1012089F80000297889F8B3 +:10D3E0000110BDF81C10A9F802109DF8181089F85A +:10D3F0000410052038802088BDF850108843208014 +:10D40000E4E72DE9FF4F8846087895B00121814077 +:10D410004FF20900249C0140ADF820102088DDF86F +:10D420008890A0F57F424FF0000AFF3A06D039B14C +:10D43000000705D5012019B0BDE8F08F0820FAE7F4 +:10D44000239E4FF0000B0EA886F800B018995D4699 +:10D450000988ADF83410A8498DF81CB0179A0A71E4 +:10D460008DF838B0086098F8000001283BD00228F9 +:10D4700009D003286FD1307820F03F001D30307084 +:10D48000B8F80400E08098F800100320022904D1C5 +:10D49000317821F03F011B31317094F846100907B3 +:10D4A00059D505ABB9F1000F13D0002102AA82E8CB +:10D4B0000B000720CDE90009BDF83400B8F80410CE +:10D4C000C01E83B20022159800F0A8FD0028D1D11B +:10D4D00001E0F11CEAE7B8F80400A6F80100BDF885 +:10D4E0001400C01C04E198F805108DF81C1098F881 +:10D4F0000400012806D04FF4007A02282CD003281B +:10D50000B8D16CE12188B8F8080011F40061ADF8D9 +:10D51000201020D017281CD3B4F84010814218D313 +:10D52000B4F84410172901D3814212D1317821F087 +:10D530003F01C91C3170A6F801000321ADF8341079 +:10D54000A4F8440094F8460020F0020084F8460055 +:10D5500065E105257EE177E1208808F1080700F400 +:10D56000FE60ADF8200010F0F00F1BD010F0C00FDF +:10D5700003D03888228B9042EBD199B9B878C00794 +:10D5800010D0B9680720CDE902B1CDF804B0009001 +:10D59000CDF810B0FB88BA883988159800F014FBD4 +:10D5A0000028D6D12398BDF82010401C80294ED0E9 +:10D5B00006DC10290DD020290BD0402987D124E08A +:10D5C000B1F5807F6ED051457ED0B1F5806F97D197 +:10D5D000DEE0C80601D5082000E0102082460DA933 +:10D5E00007AA0520CDE902218DF83800ADF83CB03E +:10D5F000CDE9049608A93888CDE9000153460722F1 +:10D6000021461598FFF7B4F8A8E09DF81C200121E9 +:10D610004FF00A0A002A9BD105ABB9F1000F00D0E8 +:10D620000020CDE902100720CDE90009BDF8340043 +:10D630000493401E83B2218B0022159800F0EEFC6B +:10D640008DF81C000B203070BDF8140020E09DF810 +:10D650001C2001214FF00C0A002A22D113ABB9F192 +:10D66000000F00D00020CDE902100720CDE900090D +:10D670000493BDF83400228C401E83B2218B159890 +:10D6800000F0CCFC8DF81C000D203070BDF84C0073 +:10D69000401CADF8340005208DF83800208BADF823 +:10D6A0003C00BCE03888218B88427FF452AF9DF863 +:10D6B0001C004FF0120A00281CD1606AA8B1B8788B +:10D6C000C0073FF446AF00E018E0BA680720CDE994 +:10D6D00002B2CDF804B00090CDF810B0FB88BA8843 +:10D6E000159800F071FA8DF81C001320307001209D +:10D6F000ADF8340093E00000580000203988208BFA +:10D700008142D2D19DF81C004FF0160A0028A06B70 +:10D7100008D0E0B34FF6FF7000215F46ADF808B0C7 +:10D72000019027E068B1B978C907BED1E18F0DAB90 +:10D730000844821D03968DE80C0243888288018884 +:10D7400009E0B878C007BCD0BA680DAB03968DE885 +:10D750000C02BB88FA881598FFF7F3F905005ED034 +:10D76000072D72D076E0019005AA02A92046FFF7A6 +:10D7700029F90146E28FBDF80800824201D0002954 +:10D78000F1D0E08FA16B084407800198E08746E064 +:10D790009DF81C004FF0180A40B1208BC8B13888A2 +:10D7A000208321461598FFF796F938E004F1180018 +:10D7B0000090237E012221461598FFF7A4F98DF8E9 +:10D7C0001C000028EDD1192030700120ADF8340084 +:10D7D000E7E7052521461598FFF77DF93AE020880F +:10D7E00000F40070ADF8200050452DD1A08FA0F5B9 +:10D7F0007F41FE3901D006252CE0D8F808004FF013 +:10D80000160A48B1A063B8F80C10A1874FF6FF7153 +:10D81000E187A0F800B002E04FF6FF70A087BDF8E6 +:10D82000200030F47F611AD078230022032015995C +:10D8300008F058FD98F8000020712088BDF82010ED +:10D84000084320800EE000E007252088BDF8201066 +:10D8500088432080208810F47F6F1CD03AE0218814 +:10D86000814321809DF8380020B10EA91598F9F761 +:10D870005AFC05469DF81C000028EBD086F801A054 +:10D8800001203070208B70809DF81C0030710520C5 +:10D89000ADF83400DEE7A18EE1B118980DAB008839 +:10D8A000ADF834002398CDE90304CDE90139206BAC +:10D8B0000090E36A179A1598FFF7FCF905460120D6 +:10D8C0008DF838000EA91598F9F72DFC00B1054622 +:10D8D000A4F834B094F8460040070AD52046FFF774 +:10D8E000A0F910F03E0F04D114F8460F20F0040008 +:10D8F00020701898BDF83410018028469BE500B5CB +:10D9000085B0032806D102208DF8000088B2694650 +:10D91000F9F709FC05B000BD10B5384C0B7822684A +:10D92000012B02D0022B2AD111E013780BB1052B69 +:10D9300001D10423137023688A889A802268CB88D7 +:10D94000D38022680B891381498951810DE08B882E +:10D9500093802268CB88D38022680B8913814B89FE +:10D9600053818B899381096911612168F9F7DBFB88 +:10D97000226800210228117003D0002800D08120E5 +:10D9800010BD832010BD806B002800D0012070479F +:10D990008178012909D10088B0F5205F03D042F6D3 +:10D9A0000101884201D10020704707207047F0B57F +:10D9B00087B0002415460E460746ADF8184011E022 +:10D9C00005980088288005980194811DCDE90241C1 +:10D9D000072104940091838842880188384600F02A +:10D9E000F3F830B905AA06A93046FEF7EBFF002888 +:10D9F000E6D00A2800D1002007B0F0BD5800002072 +:10DA000010B58B7883B102789A4205D10B885BB14F +:10DA100002E08B79091D4BB18B789A42F9D1B0F8AD +:10DA200001300C88A342F4D1002010BD812010BD2C +:10DA3000072826D012B1012A27D103E0497801F046 +:10DA4000070102E04978C1F3C20105291DD2DFE8D0 +:10DA500001F00318080C12000AB1032070470220DD +:10DA6000704704280DD250B10DE0052809D2801E60 +:10DA7000022808D303E0062803D0032803D005209A +:10DA80007047002070470F20704781207047C0B258 +:10DA900082060BD4000607D5FE48807A4143C01D9C +:10DAA00001EBD00080B270470846704700207047F5 +:10DAB00070B513880B800B781C0625D5F54CA47A1D +:10DAC000844204D843F010000870002070BD9568AF +:10DAD00000F0070605EBD0052D78F54065F304133B +:10DAE0000B701378D17803F0030341EA032140F26D +:10DAF0000123B1FBF3F503FB15119268E41D00FB54 +:10DB0000012000EBD40070BD906870BD37B514469D +:10DB1000BDF8041011809DF804100A061ED5C1F34B +:10DB20000013DC49A568897A814208D8FE2811D102 +:10DB3000C91DC9085A42284617F097FD0AE005EBAF +:10DB4000D00100F00702012508789540A8439340D2 +:10DB500018430870207820F0100020703EBD2DE999 +:10DB6000F0410746C81C0E4620F00300B04202D028 +:10DB70008620BDE8F081C74D002034462E60AF807E +:10DB80002881AA72E8801AE0E988491CE9808106A8 +:10DB900014D4E17800F0030041EA002040F20121B2 +:10DBA000B0FBF1F201FB12012068FFF770FF298939 +:10DBB000084480B22881381A3044A0600C342078A0 +:10DBC0004107E1D40020D4E72DE9FF4F89B0164684 +:10DBD000DDE9168A0F46994623F44045084600F0D1 +:10DBE0000DFB04000FD0099804F0CAFE02902078C3 +:10DBF00000060AD5A748817A0298814205D8872075 +:10DC00000DB0BDE8F08F0120FAE7224601A9029885 +:10DC1000FFF74EFF834600208DF80C004046B8F118 +:10DC2000070F1AD001222146FFF702FF0028E7D193 +:10DC30002078400611D502208DF80C00ADF8107048 +:10DC4000BDF80400ADF81200ADF814601898ADF8F6 +:10DC50001650CDF81CA0ADF818005FEA094004D5B5 +:10DC600000252E46A84601270CE02178E07801F037 +:10DC7000030140EA012040F20121B0FBF1F28046AD +:10DC800001FB12875FEA494009D5B84507D1A17861 +:10DC9000207901F0030140EA0120B04201D3BE42E5 +:10DCA00001D90720ACE7A8191FFA80F9B94501D9B5 +:10DCB0000D20A5E79DF80C0028B103A90998F9F7F4 +:10DCC00030FA00289CD1B84507D1A0784FEA192135 +:10DCD00061F30100A07084F804901A9800B10580E7 +:10DCE000199850EA0A0027D0199830B10BEB0600BA +:10DCF0002A46199917F042FC0EE00BEB060857462E +:10DD0000189E099804F0A8FF2B46F61DB5B23946B7 +:10DD10004246009504F093FB224601A90298FFF7C2 +:10DD2000C7FE9DF80400224620F010008DF8040084 +:10DD3000DDE90110FFF7EAFE002061E72DE9FF4F62 +:10DD4000DFF8509182461746B9F80610D9F800005E +:10DD500001EB410100EB810440F20120B2FBF0F144 +:10DD600085B000FB11764D46DDF84C8031460698B3 +:10DD7000FFF78DFE29682A898B46611A0C31014410 +:10DD80001144AB8889B28B4202D8842009B038E7AD +:10DD90000699CDB2290603D5A90601D50620F5E7D7 +:10DDA000B9F806C00CF1010C1FFA8CFCA9F806C0EA +:10DDB000149909B1A1F800C0A90602D5C4F80880D9 +:10DDC00007E0104480B2A9F80800191A01EB0B0013 +:10DDD000A0602246FE200699FFF798FEE7702671A4 +:10DDE0002078390A61F30100320AA17840F004007A +:10DDF00062F30101A17020709AF802006071BAF814 +:10DE00000000E08000262673280602D599F80A70E3 +:10DE100000E00127A80601D54FF000084D46002478 +:10DE20004FF007090FE0CDE902680196CDF80090A8 +:10DE30000496E9882046129B089AFFF7C5FE002841 +:10DE4000A4D1641CE4B2BC42EDD300209EE72DE9CE +:10DE5000F047804600F0D2F9070005D0002644467E +:10DE60000C4D40F2012919E00120BDE8F087204661 +:10DE700000F0C4F90278C17802F0030241EA0222FC +:10DE8000B2FBF9F309FB13210068FFF700FE3044F1 +:10DE900086B201E0F8050020641CA4B2E988601E87 +:10DEA0008142E4DCA8F10100E8802889801B2881F8 +:10DEB00000203870D9E710B5144631B1491E2180D1 +:10DEC00004F05EFDA070002010BD012010BD10B553 +:10DED000D24904460088CA88904201D30A2010BD66 +:10DEE000096800EB400001EB80025079A072D088F5 +:10DEF00020819178107901F0030140EA0120A0818E +:10DF0000A078E11CFFF7D4FD20612088401C208010 +:10DF1000E080002010BD0121018270472DE9FF4FF4 +:10DF200085B04FF6FF788246A3F8008048681F4608 +:10DF30000D4680788DF8060048680088ADF804002A +:10DF400000208DF80A00088A0C88A04200D30446FD +:10DF50002C8241E0288A401C2882701D6968FFF7E6 +:10DF60004FFDB8BB3988414501D1601E38806888B3 +:10DF7000A04236D3B178307901F0030140EA01299B +:10DF800001A9701DFFF73CFD20BB298941452CD01C +:10DF9000002231460798FFF74BFDD8B9298949453A +:10DFA00018D1E9680391B5F80AC0D6F808B0504610 +:10DFB000CDF800C004F050FEDDF800C05A460CF168 +:10DFC000070C1FFA8CFC4B460399CDF800C004F0F7 +:10DFD00000FA50B1641CA4B2204600F00FF906000C +:10DFE000B8D1641E2C820A20D0E67C807079B8718A +:10DFF000F088B8803178F07801F0030140EA012020 +:10E000007881A7F80C90504604F0BAFC324607F12C +:10E010000801FFF74DFD38610020B7E62DE9FF4FFD +:10E0200087B081461C469246DDF860B0DDF854802A +:10E03000089800F0E3F805000CD0484604F0A0FC76 +:10E040002978090608D57549897A814204D887203C +:10E050000BB0D6E50120FBE7CAF309062A4601A961 +:10E06000FFF726FD0746149807281CD000222946F2 +:10E07000FFF7DEFC0028EBD12878400613D50120FD +:10E080008DF808000898ADF80C00BDF80400ADF854 +:10E090000E00ADF81060ADF8124002A94846F9F73D +:10E0A00040F80028D4D12978E87801F0030140EA4B +:10E0B0000121AA78287902F0030240EA022056459D +:10E0C00007D0B1F5007F04D9611E814201DD0B202C +:10E0D000BEE7864201D90720BAE7801B85B2A54278 +:10E0E00000D92546BBF1000F01D0ABF800501798BE +:10E0F00018B1B9192A4617F041FAB8F1000F0DD03E +:10E100003E4448464446169F04F0B8FD2146FF1D94 +:10E11000BCB232462B46009404F0C5F9002097E7C4 +:10E120002DE9F04107461D461646084600F066F800 +:10E1300004000BD0384604F023FC2178090607D5EB +:10E140003649897A814203D8872012E5012010E5FB +:10E1500022463146FFF7ACFC65B12178E07801F04A +:10E16000030140EA0120B0F5007F01D8012000E062 +:10E17000002028700020FCE42DE9F04107461D46F0 +:10E180001646084600F03AF804000BD0384604F072 +:10E19000F7FB2178090607D52049897A814203D8FF +:10E1A0008720E6E40120E4E422463146FFF7AEFC96 +:10E1B000FF2D14D02178E07801F0030240EA02201C +:10E1C00040F20122B0FBF2F302FB130015B900F29A +:10E1D000012080B2E070000A60F30101217000208C +:10E1E000C7E410B50C4600F009F828B1C1882180B9 +:10E1F0004079A070002010BD012010BD0749CA88D9 +:10E20000824209D340B1096800EB40006FF00B0275 +:10E2100002EB80000844704700207047F80500209A +:10E2200010B508F0EFFAF4F741FB08F051F9BDE83A +:10E23000104008F019BA302834BF01200020704780 +:10E24000202834BF4FF0A0420C4A012300F01F00E9 +:10E2500003FA00F0002914BFC2F80C05C2F8080543 +:10E260007047202834BF4FF0A041044900F01F0040 +:10E27000012202FA00F0C1F81805704700030050AF +:10E2800070B50346002002466FF02F050EE09C5C3F +:10E29000A4F130060A2E02D34FF0FF3070BD00EB20 +:10E2A000800005EB4000521C2044D2B28A42EED3DB +:10E2B00070BD30B50A230BE0B0FBF3F403FB14048C +:10E2C000B0FBF3F08D183034521E05F8014CD2B279 +:10E2D000002AF1D130BD30B500234FF6FF7510E0B4 +:10E2E000040A44EA002084B2C85C6040C0F303140E +:10E2F000604005EA00344440E0B25B1C84EA401010 +:10E300009BB29342ECD330BD2DE9F041FA4B00268D +:10E31000012793F860501C7893F864C0B8B183F873 +:10E320008D40A3F88E1083F88C2083F88A70BCF19E +:10E33000000F0CBF83F8906083F89050EF4880681E +:10E34000008804F089FCBDE8F04104F01FB94FF6E5 +:10E35000FF7083F88D40A3F88E0083F88C2083F83B +:10E360008A70BCF1000F14BF83F8905083F890605E +:10E37000BDE8F08170B5E14E0446306890F8981021 +:10E380000025012919D090F89210012924D090F885 +:10E39000681001292AD090F88A1001291CBF00209A +:10E3A00070BD657017212170D0F88C106160B0F8D5 +:10E3B0009010218180F88A5016E065701C21217030 +:10E3C000D0F899106160D0F89D10A16090F8A1106C +:10E3D000217380F8985007E0657007212170D0F80C +:10E3E0009410616080F89250012070BD6570142116 +:10E3F000217000F16A012022201D17F0BFF80121D1 +:10E400002172306880F86850BB48B0F86C20A0F8E2 +:10E410009420B268537B80F8963080F89210108870 +:10E4200004F01AFC04F0C1F8DEE7B448006890F884 +:10E430006810002914BFB0F86C004FF6FF707047E9 +:10E4400070B5AE4C06462068002808BFFFDF0025E7 +:10E45000206845706660002808BFFFDF20684178AB +:10E4600000291CBFFFDF70BDA42117F028F9206828 +:10E47000FF2101707F2180F836101321418428216B +:10E4800080F86510012180F8581080F85D5008F080 +:10E4900082FEBDE8704008F048B8984909680978DC +:10E4A00081420CBF0120002070479448006890F81A +:10E4B0002200C0F3400070479048006890F82200A6 +:10E4C00000F0010070478D48006890F82200C0F30A +:10E4D000001070472DE9F04388480024016891F846 +:10E4E0002400B1F822C0C0F38002C0F340031A44F4 +:10E4F00000F001000244CCF3001060B3BCF1130F34 +:10E5000021D00BDCBCF1100F02BF7D4830F81200A7 +:10E51000BDE8F083BCF1120F15D008E0BCF1150F77 +:10E5200009D0BCF11D0F04BF7648BDE8F083FFDFC2 +:10E530002046BDE8F0837449002031F8121012FB28 +:10E540000010BDE8F0837149002031F8121012FB71 +:10E550000010BDE8F08391F85A3091F85B002E2648 +:10E560004FF47A774FF014084FF04009022B04BFA4 +:10E570004AF2D745B5FBF7F510D0012B04BF4AF29C +:10E580002F75B5FBF7F510D04AF62315B5FBF7F557 +:10E59000082B08BF4E4613D0042B18D02646082B54 +:10E5A0000ED0042B13D0022B49D004F12806042BE3 +:10E5B0000FD0082B1CBF4FF01908082304D00AE025 +:10E5C0004FF0140806F5A8764FF0400303E006F577 +:10E5D000A8764FF0100318FB036313FB0253C2EB42 +:10E5E00002124B4D02EB820205EB82021A441CF030 +:10E5F000010F4FF4C8734FF4BF7504BFCCF340064E +:10E60000002E77D0CCF3400602F5A572EEB10828B3 +:10E6100004BF1E4640270CD0042804BF2E461027F6 +:10E6200007D0022807BF04F11806042704F12806C2 +:10E63000082707EB870808EB87173E441BE004F127 +:10E6400018064FF019080423C5E7082804BF1E4622 +:10E6500040270CD0042804BF2E46102707D00228DC +:10E6600007BF04F11806042704F12806082707EB62 +:10E67000871706EB8706324402F19C0691F8652065 +:10E6800010F00C0F08BF00223244082804BF1E46B9 +:10E6900040270CD0042804BF2E46102707D002289C +:10E6A00007BF04F11806042704F128060827C7EB62 +:10E6B000C70707EB470706EB4706324498321CF0C2 +:10E6C000010F27D0082808BF40200CD0042804BF21 +:10E6D0002B46102007D0022807BF04F1180304209E +:10E6E00004F12803082000EB400101EB001018445E +:10E6F00002444AE04DE000000406002060000020D3 +:10E70000285B02008E891300305B0200205B020050 +:10E71000D4FEFFFF082804BF9C4640260CD00428E6 +:10E7200004BFAC46102607D0022807BF04F1180C1E +:10E73000042604F1280C082606EB8616898F0CEBBC +:10E74000860C6244EB2920D944F2552C0B3101FB95 +:10E750000CF1890D082807D0042802D0022805D022 +:10E7600008E02B46102008E0402006E004F11803E2 +:10E77000042002E004F12803082000EB801003EBE2 +:10E78000800000F5A57001FB002202F26510BDE8D3 +:10E79000F08302F5A572082804BF9C4640260CD0E1 +:10E7A000042804BFAC46102607D0022807BF04F196 +:10E7B000180C042604F1280C082606EB8616B1F87E +:10E7C00044100CEB860C6244EB29DED944F2552C44 +:10E7D0000B3101FB0CF1890D0828C5D00428C0D0ED +:10E7E0000228C7D1C2E7FE4840F271210068806A62 +:10E7F00048437047FA48006890F83500002818BF71 +:10E800000120704710B5F74C207B022818BF032861 +:10E8100008D1207D04F115010DF0A1FC08281CBFD2 +:10E82000012010BD207B002816BF022800200120F7 +:10E83000BDE8104009F0C0B9EA4908737047E849DB +:10E84000096881F8300070472DE9F047E44C2168F1 +:10E85000087B002816BF022800200120487301F120 +:10E860000E0109F093F92168087B022816BF0328DE +:10E870000122002281F82F204FF0080081F82D009E +:10E88000487B01F10E034FF001064FF0000701280D +:10E8900004BF5B7913F0C00F0AD001F10E03012809 +:10E8A00004D1587900F0C000402801D0002000E0D9 +:10E8B000012081F82E00002A04BF91F8220010F0F8 +:10E8C000040F07D0087D01F115010DF048FC216807 +:10E8D00081F82D002068476006F0CEF92168C14D0F +:10E8E0004FF00009886095F82D000DF054FC80462B +:10E8F00095F82F00002818BFB8F1000F04D095F844 +:10E900002D000DF00FFA68B195F8300000281CBFFB +:10E9100095F82E0000281DD0697B05F10E00012915 +:10E920000ED012E06E734A4605F10E01404609F022 +:10E9300082F995F82D1005F10E000DF023FD09E088 +:10E94000407900F0C000402831D0394605F10E0072 +:10E9500009F0A8F92068C77690F8220010F0040F9B +:10E9600008BFBDE8F087002795F82D000DF08EFA5E +:10E97000050008BFBDE8F08710210EF04CFA002812 +:10E9800018BFBDE8F08720683A4600F11C01C67642 +:10E99000284609F050F9206800F11C0160680EF06B +:10E9A00093FE6068BDE8F04701210EF0A8BE0DF0AF +:10E9B00026FD4A4605F10E0109F03DF9CAE7884AED +:10E9C0001268137B0370D2F80E000860508A8880AA +:10E9D000704778B583490446814D407B08732A68A7 +:10E9E000207810706088ADF8000080B200F001015E +:10E9F000C0F3400341EA4301C0F3800341EA8301CD +:10EA0000C0F3C00341EAC301C0F3001341EA03119C +:10EA1000C0F3401341EA4311C0F3801041EA801073 +:10EA20005084E07D012808BF012607D0022808BFD6 +:10EA3000022603D0032814BFFFDF0826286880F8C9 +:10EA40005A60607E012808BF012607D0022808BF4F +:10EA5000022603D0032814BFFFDF0826286880F8A9 +:10EA60005B60217B80F82410418C1D290CBF0021A4 +:10EA700061688162617D80F83510A17B002916BF35 +:10EA80000229002101210175D4F80F10C0F81510DA +:10EA9000B4F81310A0F81910A17EB0F8662061F345 +:10EAA0000302A0F86620E17E012918BF002180F84A +:10EAB0003410002078BD4A480068408CC0F3001133 +:10EAC00031B1C0F38000002804BF1F20704702E06E +:10EAD000C0F3400109B10020704710F0010F14BFCE +:10EAE000EE20FF2070473E480068408CC0F30011C4 +:10EAF00019B1C0F3800028B102E0C0F3400008B1B2 +:10EB000000207047012070473549002209680A66D5 +:10EB10004B8C1D2B0CBF81F8642081F8640070477A +:10EB200000232F4A126882F859309164A2F84C00F1 +:10EB3000012082F859007047294A0023126882F8A0 +:10EB40005830A2F854000120116582F8580070472F +:10EB50002349096881F85D0070472148006890F9F1 +:10EB60005D0070471E48006890F82200C0F3401016 +:10EB700070471B48006890F82200C0F3C00070473F +:10EB8000012070471648006890F85B00704770B528 +:10EB900008F0EBFA08F0CAFA08F0A2F908F020FA37 +:10EBA0000F4C2068016E491C016690F83300002567 +:10EBB00030B108F0F0FA07F0B8FC206880F8335064 +:10EBC0002068457090F8371021B1BDE870400420EE +:10EBD00009F0D7BC90F8641001B3006E814203E0E5 +:10EBE000600000200406002018D8042009F0C9FCA9 +:10EBF000206890F8220010F0010F07D0A06843228F +:10EC00000188BDE870400120FFF77EBBBDE8704081 +:10EC100043224FF6FF710020FFF776BBBDE870403E +:10EC2000002009F0AEBC2DE9F04782B00F468146C6 +:10EC3000FE4E4FF000083068458C15F0030F10D0E1 +:10EC400015F0010F05F0020005D0002808BF4FF0B5 +:10EC5000010806D004E0002818BF4FF0020800D1D8 +:10EC6000FFDF4FF0000A544615F0010F05F00200D7 +:10EC70000DD080B915F0040F0DD04AF00800002F18 +:10EC80001CBF40F0010040F0020440D08FE010B102 +:10EC900015F0040F0DD015F0070F10D015F0010F6F +:10ECA00005F0020036D0002808BF15F0040F27D069 +:10ECB0003DE0002F18BF4AF0090478D134E02FB1AD +:10ECC0004AF0080415F0200F14D070E0316805F008 +:10ECD0002002B1F84400104308BF4AF0010466D096 +:10ECE0004AF0180415F0200F61D191F85A10082944 +:10ECF00059D155E0316891F85A10082950D152E0A5 +:10ED00004AF00800002F18BF40F001044FD140F036 +:10ED100010044CE0002818BF15F0040F07D0002F96 +:10ED200018BF4AF00B0442D14AF018043FE015F036 +:10ED3000030F3BD115F0040F38D077B131684AF09A +:10ED4000080091F85A1008290CBF40F0020420F086 +:10ED5000020415F0200F21D029E0316805F02002CF +:10ED6000B1F84400104308BF4AF003041FD04AF032 +:10ED7000180015F0200F08D091F85A10082914BF78 +:10ED800040F0020420F0020411E091F85A20082A11 +:10ED900014BF40F0010020F00100EDE7082902D087 +:10EDA00024F0010403E044F0010400E0FFDF15F06B +:10EDB000400F1BD0C7B93168B1F84400002804BF28 +:10EDC000488C10F0010F0BD110F0020F08BF10F0AB +:10EDD000200F05D115F0010F08BF15F0020F03D069 +:10EDE00091F85A00082801D044F040047068A0F857 +:10EDF00000A0017821F02001017007210EF030FC05 +:10EE0000414670680EF023FE214670680EF02BFE1E +:10EE100014F0010F0AD006230022854970680EF015 +:10EE2000FCFD3068417B70680EF05CFC14F0020F52 +:10EE300018D0D6E90010B9F1000F4FF006034FF0DB +:10EE4000010207D01C310EF0E8FD012170680EF0C0 +:10EE500056FC07E015310EF0E0FD3068017D70686A +:10EE60000EF04DFC14F0040F18BFFFDF14F0080F74 +:10EE700017D0CDF800A03068BDF800100223B0F81C +:10EE80006600020962F30B01ADF800109DF8011055 +:10EE9000032260F307118DF80110694670680EF0C7 +:10EEA000BCFD012F61D13068B0F84410E9B390F88F +:10EEB0002200C0F34000C0BB70680EF0C4FD401CCF +:10EEC000C7B23068B0F84420B0F85610551AC7F1F0 +:10EED000FF018D42A8BF0D46AA423AD990F8220000 +:10EEE00010F0010F35D144F01004214670680EF087 +:10EEF000BAFDF81CC0B2ED1E284482B23068B0F8EA +:10EF00006610036E090951FA83F190F85C30494F9D +:10EF10001944BC460023E1FB07C31B096FF0240C16 +:10EF200003FB0C1180F85C1000E01EE090F85B0021 +:10EF3000012101F037F80090BDF800009DF80210A3 +:10EF4000032340EA01400190042201A970680EF0F9 +:10EF500064FD3068AAB2016C70680EF0B2FD3068D2 +:10EF6000B0F856102944A0F8561014F0400F06D0FF +:10EF7000D6E90010012306225D310EF04EFD14F09B +:10EF8000200F18BFFFDF0020002818BFFFDF02B0EE +:10EF9000BDE8F0872DE9F843244C2068002808BF1D +:10EFA000FFDF2068417839BB0178FF2924D0002693 +:10EFB00080F83160A0F85660867080F8376030467F +:10EFC00008F022F807F0E2FC206890F95D0007F0F5 +:10EFD00082FD194807F085FD184807F0FBFF6068BF +:10EFE00008F015F8206890F8240010F0010F06D002 +:10EFF000252007F07EFD09E00C20BDE8F88310F025 +:10F00000020F18BF262075D007F073FD206890F816 +:10F010005A10252007F078FC206880F82C6007F053 +:10F02000EDFF206890F85A10002009E060000020F1 +:10F030001206002053E4B36E1C5B0200195B020051 +:10F0400007F04BFE0F21052007F019FD206890F80E +:10F050002E10002901BF90F82F10002990F82200EF +:10F0600010F0040F75D005F007FE0546206829460C +:10F07000806806F01AFBDFF83084074690FBF8F052 +:10F0800008FB10704142284605F0F7FA21688860B5 +:10F0900097FBF8F04A68104448600DF05DF80146AF +:10F0A0002068426891426FD8C0E90165FF4D4FF07A +:10F0B000010895F82D000DF06EF8814695F82F00A7 +:10F0C0000127002818BFB9F1000F04D095F82D00D2 +:10F0D0000CF028FEA8B195F8300000281CBF95F868 +:10F0E0002E00002825D0697B05F10E00012916D0DD +:10F0F0001AE0FFE710F0040F14BF2720FFDF83D1D1 +:10F1000084E73A466F7305F10E01484608F093FD17 +:10F1100095F82D1005F10E000DF034F909E0407955 +:10F1200000F0C000402815D0414605F10E0008F05F +:10F13000B9FD206890F8220010F0040F24D095F853 +:10F140002D000CF0A3FE05001ED010210DF063FE73 +:10F1500040B119E00DF053F93A4605F10E0108F0FF +:10F160006AFDE6E720683A4600F11C01C7762846AA +:10F1700008F061FD206800F11C0160680EF0A4FA3F +:10F18000012160680EF0BBFA2068417B0E3007F069 +:10F190005AFC206890F8581059B3B0F85410A0F8F1 +:10F1A0004410016D016490F82210C1F30011E9B917 +:10F1B000B0F8660002210509ADF80050684606F077 +:10F1C0003DFE28B1BDF80000C0F30B00A84204D1F9 +:10F1D000BDF80000401CADF800002168BDF800003B +:10F1E000B1F8662060F30F12A1F86620206880F85D +:10F1F0005860206890F8591031B1B0F84C108187F0 +:10F20000816C816380F85960B0F86610026E09095C +:10F2100051FA82F190F85C20DFF894C21144634601 +:10F220000022E1FB0C3212096FF0240302FB0311F0 +:10F2300080F85C100DF013F8032160680DF092F86F +:10F24000216881F833000020BDE8F883994988607F +:10F2500070472DE9F043974C83B0226892F8313023 +:10F260003BB1508C1D2808BFFFDF03B0BDE8F04361 +:10F270008DE401260027F1B1054692F85C0007F005 +:10F2800038FC206890F85B10FF2007F03DFB2068F9 +:10F290004FF4A57190F85B20002007F0E4FD206892 +:10F2A00090F8221011F0030F00F02E81002D00F0D5 +:10F2B000258100F029B992F822108046D07EC1F352 +:10F2C0000011002956D0054660680780017821F0BA +:10F2D00020010170518C132937D01FDC102908BF81 +:10F2E000022144D0122908BF062140D0FFDF6F4D14 +:10F2F000606805F10E010EF0D9F9697B60680EF0C7 +:10F30000F1F92068418C1D2918BF152965D0B0F886 +:10F310004420016C60680EF0FEF95EE0152918BF0C +:10F320001D29E3D14FF001010EF09AF960680178D0 +:10F3300041F020010170216885B11C310EF0C4F943 +:10F34000012160680EF0DBF9D1E700210EF088F9A9 +:10F350006068017841F020010170C8E715310EF0B6 +:10F36000B3F92068017D60680EF0C9F9BFE70EF0BF +:10F3700077F9BCE70021FFF756FC6068C17811F00F +:10F380003F0F2AD0017911F0100F26D00EF066F948 +:10F390002368024693F82410C1F38000C1F3400CA7 +:10F3A000604401F0010100EB010C93F82C10C1F353 +:10F3B0008000C1F34005284401F001010844ACEB92 +:10F3C0000000C1B293F85A0000F0ECFD0090032356 +:10F3D0000422694660680EF020FB2068002590F842 +:10F3E000241090F82C0021EA000212F0010F18BF3F +:10F3F00001250ED111F0020F04D010F0020F08BF4A +:10F40000022506D011F0040F03D010F0040F08BF3E +:10F410000425B8F1000F2BD0012D1BD0022D08BF01 +:10F4200026201BD0042D14BFFFDF272016D0206814 +:10F4300090F85A10252007F067FA206890F82210FB +:10F44000C1F3001169B101224FF49671002007F059 +:10F450000AFD0DE0252007F04CFBE8E707F049FB2B +:10F46000E5E790F85A204FF49671002007F0FBFC76 +:10F47000206890F82C10294380F82C1090F8242054 +:10F4800032EA01011DD04670418C13292CD027DCB3 +:10F49000102904BF03B0BDE8F083122924D000BFB7 +:10F4A000C1F30010002807E040420F0004060020CE +:10F4B00053E4B36E6000002018BFFFDF03B0BDE867 +:10F4C000F083418C1D2908BF80F82C70DBD0C1F37C +:10F4D0000011002914BF80F8316080F83170D2E744 +:10F4E000152918BF1D29DBD190F85A2003B04FF021 +:10F4F0000101BDE8F043084607F092BE90F85B209A +:10F500000121084607F08CFE2168002DC87E7CD0C2 +:10F510004A8C3D46C2F34000002808BF47F008056A +:10F5200012F0400F18BF45F04005002819BFD1F870 +:10F530003890B1F83C80D1F84090B1F844806068D0 +:10F54000072107800EF08CF8002160680EF07FFA2A +:10F55000294660680EF087FA15F0080F15D020686C +:10F56000BDF800100223B0F86600020962F30B0137 +:10F57000ADF800109DF80110032260F307118DF81B +:10F580000110694660680EF048FA60680EF024F9D0 +:10F590002168C0F1FE00B1F85620A8EB02018142BB +:10F5A000A8BF0146CFB2D019404542D245F0100164 +:10F5B00060680EF058FA60680EF00EF92168C0F12C +:10F5C000FE00B1F85610A8EB01018142A8BF014628 +:10F5D000CFB260680EF037FA3844421C2068B0F8A9 +:10F5E0006610036E090951FA83F190F85C30FF4D03 +:10F5F0001944AC460023E1FB05C31B096FF0240C42 +:10F6000003FB0C1180F85C1000E038E090F85B0020 +:10F61000012100F0C7FC0090BDF800009DF8021029 +:10F62000032340EA01400190042201A960680EF022 +:10F63000F4F9216891F8220010F0400F05D0012361 +:10F6400006225D3160680EF0E8F920683A46B0F8AD +:10F65000560000EB090160680EF033FA2068B0F83C +:10F6600056103944A0F8561008F0C1F9002818BF08 +:10F67000FFDF20684670867003B0BDE8F08301218B +:10F68000FFF7D1FAF0E7DA4810B50068417841B9E0 +:10F690000078FF2805D000210846FFF7DAFD00209A +:10F6A00010BD07F062FD07F041FD07F019FC07F0FF +:10F6B00097FC0C2010BD10B5CD4C206890F82200AE +:10F6C00010F0010F1CBFA06801884FF03C0212BF70 +:10F6D00001204FF6FF710020FEF716FE2168012081 +:10F6E00081F8370010BDC249096881F832007047BF +:10F6F0002DE9F041002508F010FF002800F00581F9 +:10F70000BB4C2068417801270026012906D0022938 +:10F7100001D003297ED0FFDFBDE8F0818178022689 +:10F720000029418C46D0C1F34002002A08BF11F0E5 +:10F73000010F70D090F85B204FF001014FF00000F6 +:10F7400007F06EFD216891F82200C0F34000002808 +:10F7500014BF0C20222091F85B1007F0D5F8206828 +:10F76000467090F8330058B106F0CBFE206890F850 +:10F770005B0010F00C0F0CBF4020452007F001FD8E +:10F78000206890F83400002818BF07F019FD2168A0 +:10F7900091F85B0091F8651010F00C0F08BF002184 +:10F7A000962007F055FC08F019F9002818BFFFDF74 +:10F7B000BDE8F081C1F3001282B110293FD090F86A +:10F7C000330020B106F09DFE402007F0DAFC2068EF +:10F7D00090F8221011F0040F36D043E090F8242066 +:10F7E00090F82C309A422AD1B0F84400002808BF83 +:10F7F00011F0010F05D111F0020F08BF11F0200F19 +:10F800007ED04FF001014FF00000FFF722FD20688D +:10F81000418C01E040E034E011F0010F04BFC1F37E +:10F820004001002907D1B0F85610B0F844209142A9 +:10F8300018BFBDE8F08180F83170BDE8F081BDE807 +:10F84000F0410021012004E590F83510012914BF92 +:10F850000329102545F00E0190F85A204FF00000C2 +:10F8600007F0DEFC206890F83400002818BF07F08D +:10F87000A7FC0021962007F0EBFB20684670BDE84E +:10F88000F081B0F85610B0F8440081423DD0BDE898 +:10F89000F04101210846DCE48178D9B1418C11F0B6 +:10F8A000010F1CD080F8687090F86A20B0F86C10D6 +:10F8B0000120FEF729FD2068467007F056FC07F08E +:10F8C00035FC07F00DFB07F08BFBBDE8F041032092 +:10F8D00008F057BE8178BDE8F0410120B9E411F08D +:10F8E000020F04BFFFDFBDE8F081B0F85610808F33 +:10F8F00081420AD001210846FFF7ABFC032000E05B +:10F9000003E021684870BDE8F081BDE8F041FFF7F1 +:10F910003EB9FFF73CB910B5354C206890F834106B +:10F9200049B1363007F05BFC18B921687F2081F8B7 +:10F93000360007F03BFC206890F8330018B107F060 +:10F940002AFC06F0F2FD08F0E8FDA8B1206890F866 +:10F950002210C1F3001179B14078022818BFFFDFEF +:10F9600000210120FFF775FC2068417800291EBFA7 +:10F9700040780128FFDF10BDBDE81040FFF707B950 +:10F980002DE9F0471A4C0F4680462168B8F1030F65 +:10F99000488C08BFC0F3400508D000F0010591F87D +:10F9A0003200002818BF4FF0010901D14FF00009C3 +:10F9B00007F093F80646B8F1030F0CBF4FF00208AA +:10F9C0004FF0010835EA090008BFBDE8F08720685C +:10F9D00090F8330090B10CF025FC38700146FF28F8 +:10F9E0000CD06068C01C0CF0F6FB03E053E4B36E6F +:10F9F0006000002038780CF022FC06436068017833 +:10FA0000C1F3801221680B7D9A4208D10622C01CE6 +:10FA1000153115F087FD002808BF012000D0002017 +:10FA20003978FF2906D0C8B9206890F82D0088429F +:10FA300016D113E0A0B1616811F8030BC0F3801078 +:10FA40000CF08DFB05460CF0EDFC38B128460CF0AF +:10FA50001DFA18B110210DF0DEF908B1012000E007 +:10FA60000020216891F8221011F0040F01D0F0B1AC +:10FA70001AE0CEB9FE4890F83500002818BF40457E +:10FA800015D1616811F8030BC0F380100CF067FB0F +:10FA900004460CF0C7FC38B120460CF0F7F918B159 +:10FAA00010210DF0B8F910B10120BDE8F087002059 +:10FAB000BDE8F0872DE9F04FEE4D074683B028688A +:10FAC00000264078022818BFFFDF28684FF07F0922 +:10FAD00090F8341049B1363007F081FB002804BF9C +:10FAE000286880F8369007F061FB68680DF0DAFD51 +:10FAF0000446002F00F0048268680DF05EFF0028C5 +:10FB000000F0FE8106F0B7FF002800F0F981FF2029 +:10FB1000DFF864B3DFF8588300274FF0010A062CA2 +:10FB200080F00082DFE804F0EFEFEF03EFF78DF8ED +:10FB3000000069460320FFF723FF002800F0E4805F +:10FB4000296891F8340010B191F89800D0B1286874 +:10FB5000817801294CD06868042107800DF080FD70 +:10FB600008F10E0168680DF0A1FD98F80D106868A5 +:10FB70000DF0B8FD2868828F816B68680DF0EFFD8D +:10FB800000F04DB99DF8000081F898A00A7881F83E +:10FB90009920FF280FD001F19B029A310CF004FB51 +:10FBA000002808BFFFDF286890F89A1041F0020192 +:10FBB00080F89A100DE068680278C2F3801281F82C +:10FBC0009A20D0F80320C1F89B20B0F80700A1F8D4 +:10FBD0009F00286800F1A10490F836007F2808BF34 +:10FBE000FFDF286890F83610217080F83690AEE775 +:10FBF00090F822009BF80490C0F38014686864F3C6 +:10FC00008619072107800DF02BFD002168680DF093 +:10FC10001EFF494668680DF026FF0623002208F102 +:10FC20000E0168680DF0F9FE2868417B68680DF0E8 +:10FC300059FD68680DF0D0FD29688A8FC0F1FE017A +:10FC40008A42B8BF1146CFB2BA423DD9F81EC7B2F8 +:10FC500049F0100A514668680DF005FF68680DF01C +:10FC6000F2FE3844431C2868B0F86610026E090999 +:10FC700051FA82F190F85C20DFF800920A44C846FD +:10FC80004FF0000CE2FB098C4FEA1C116FF0240CC2 +:10FC900001FB0C2180F85C1090F85B001A460121F2 +:10FCA00000F080F90190BDF804009DF806100323D0 +:10FCB00040EA01400290042202A968680DF0ADFEFE +:10FCC000514668680DF0CFFE34B1D5E9001001232C +:10FCD00006225D310DF0A1FE28683A46816B686806 +:10FCE0000DF0EFFE2868A0F85670818F8F420CBF90 +:10FCF0000121002180F8311007F079FE002818BF9B +:10FD0000FFDF8CE007E00DE128688078002840F0F4 +:10FD1000F98000F0F5B88DF8000068680178C1F34B +:10FD20008019D0F803100191B0F80700ADF8080071 +:10FD300069460520FFF724FE0028286873D08178E3 +:10FD4000002972D090F85BA0D5E90104D0F80F101B +:10FD5000C4F80E10B0F813106182417D2175817DC9 +:10FD60006175B0F81710E182B0F819106180B0F831 +:10FD70001B10A180B0F81D10E18000F11F0104F1FB +:10FD8000080015F0B0FD686890F8241001F01F011C +:10FD9000217690F82400400984F8740184F854A076 +:10FDA00084F855A0286890F8651084F8561090F8EB +:10FDB0005D0084F857009DF80010A86800F05BF91A +:10FDC000022008F0DEFB6868DBF800400DF1040A51 +:10FDD000078008210DF044FC002168680DF037FE13 +:10FDE000214668680DF03FFE0623002208F10E014F +:10FDF00068680DF012FE2868417B68680DF072FC9F +:10FE0000494668680DF07BFC06230122514668686C +:10FE10000DF003FE07F0EBFD002818BFFFDF032005 +:10FE20002968487070E066E0FFE76868AC684FF0EA +:10FE300001080278617BC2F3401211406173D0F86F +:10FE40000F10C4F80E10B0F813106182417D2175B7 +:10FE5000817D6175B0F81710E182B0F819106180EA +:10FE6000B0F81B10A180B0F81D10E18008E0000080 +:10FE70000406002060000020145B020053E4B36E0F +:10FE800000F11F0104F1080015F02DFD686890F8DD +:10FE9000241001F01F01217690F82400400984F815 +:10FEA000740184F8548084F85580286890F86510AF +:10FEB00084F8561090F85D0084F857009DF8001003 +:10FEC000A86800F0D8F8286880F868A090F86A2040 +:10FED000B0F86C100120FEF717FA2868477007F099 +:10FEE00044F907F023F906F0FBFF07F079F8012049 +:10FEF00008F047FB08E090F82200C0F3001008B1BA +:10FF0000012601E0FEF743FE286890F8330018B19F +:10FF100007F041F906F009FB66B100210120FFF767 +:10FF200098F910E0286890F82200C0F3001000282B +:10FF3000E8D0E5E728688178012904D190F85B10C2 +:10FF4000FF2006F0E1FC28684178002919BF4178BC +:10FF5000012903B0BDE8F08F4078032818BFFFDF08 +:10FF600003B0BDE8F08F70B57E4C06460D462068A4 +:10FF7000807858B106F07EFC21680346304691F83F +:10FF80005B202946BDE8704009F0C6B806F072FC57 +:10FF900021680346304691F85A202946BDE8704052 +:10FFA00009F0BAB878B50C4600210091082804BFC2 +:10FFB0004FF4C87040210DD0042804BF4FF4BF7027 +:10FFC000102107D0022807BF01F11800042101F118 +:10FFD00028000821521D02FB010562489DF800100F +:10FFE000006890F85C2062F3050141F040068DF84E +:10FFF000006090F85B00012828D002282DD0082846 +:020000040001F9 +:1000000018BFFFDF2FD000BF26F080008DF8000062 +:10001000C4EB041000EB80001E2101EB800005FB07 +:1000200004045148844228BFFFDF5048A0FB04105D +:10003000BDF80110000960F30C01ADF80110BDF826 +:1000400000009DF8021040EA014078BD9DF80200D2 +:1000500020F0E0008DF80200D6E79DF8020020F0C5 +:10006000E000203004E09DF8020020F0E000403085 +:100070008DF80200C8E72DE9F0413A4D04460E46DE +:10008000286890F86800002818BFFFDF002728685C +:1000900080F86A702188A0F86C106188A0F882103E +:1000A000A188A0F88410E188A0F8861094F8741153 +:1000B00080F8881090F82F1049B1427B00F10E01B2 +:1000C000012A04D1497901F0C001402934D090F8C7 +:1000D000301041B1427B00F10E01012A04BF497981 +:1000E00011F0C00F28D000F1760015F0F3FB68681E +:1000F000FF2E0178C1F380116176D0F80310C4F8A7 +:100100001A10B0F80700E08328681DD0C167E18BA2 +:10011000A0F8801000F17002511E30460CF044F837 +:10012000002808BFFFDF286890F86F1041F0020137 +:1001300080F86F10BDE8F081D0F80E10C0F876108E +:10014000418AA0F87A10D2E7C767A0F88070617E74 +:1001500080F86F10D4F81A100167E18BA0F87410C2 +:10016000BDE8F08160000020C4BF03008988888852 +:100170000178406829B190F8141190F8730038B9EB +:1001800001E001F0CDBD19B1042901D00120704773 +:100190000020704770B50C460546062102F02AFC87 +:1001A000606008B1002006E00721284602F022FC2A +:1001B000606018B101202070002070BD022070BD69 +:1001C0002DE9FC470C4606466946FFF7E3FF002889 +:1001D0007DD19DF8000050B1FEF727F9B0427CD0E8 +:1001E000214630460AF088F9002873D12DE00DF041 +:1001F000E7FEB04271D02146304613F027FB0028BD +:1002000068D1019D95F8D80022E0012000E000208F +:10021000804695F837004FF0010A4FF00009F0B121 +:1002200095F8380080071AD584F8019084F800A06A +:1002300084F80490E68095F839102172698F618105 +:10024000A98FA18185F8379044E0019D95F81401AC +:1002500058350028DBD1E87E0028D8D0D5E73046D5 +:1002600002F00CFD070000D1FFDF384601F01CFF53 +:1002700040B184F801900F212170E680208184F83C +:1002800004A027E0304602F0E7FC070000D1FFDFC2 +:10029000B8F1000F21D0384601F05DFFB8B19DF8EC +:1002A000000038B90198D0F800014188B14201D16D +:1002B00080F80090304607F0E8FB84F801900C21AC +:1002C000217084F80490E680297F217200E004E028 +:1002D00085F81B900120BDE8FC870020FBE71CB5DA +:1002E0006946FFF757FF00B1FFDF684601F024FDC4 +:1002F000FB4900208968A1F8DA001CBD2DE9FC410A +:1003000004460E46062002F01DFB0546072002F0BB +:1003100019FB2844C7B20025A8463E4417E02088B0 +:10032000401C80B22080B04202D34046A4F8008036 +:1003300080B2B84204D3B04202D20020BDE8FC81B2 +:100340006946FFF727FF0028F8D06D1CEDB2AE42DA +:10035000E5D84FF6FF7020801220EFE738B54FF652 +:10036000FF70ADF800000DE00621BDF8000002F0BE +:1003700053FB04460721BDF8000002F04DFB0CB111 +:1003800000B1FFDF00216846FFF7B8FF0028EBD07F +:1003900038BD70B507F0E6FB0BF0CDFCD14C4FF645 +:1003A000FF7600256683A683CFA0257001680079BB +:1003B000A4F14002657042F8421FA11C1071601C3C +:1003C00013F065FB25721B2060814FF4A471A1819D +:1003D000E08121820321A1740422E274A082E082E0 +:1003E000A4F13E00218305704680BD480C300570A5 +:1003F000A4F110000570468070BD70B5B84C16466B +:100400000D466060217007F027FBFFF7A7FFFFF79D +:10041000C0FF207810F0CDFFB5480EF07CFA2178AF +:10042000606813F0D9FA20780AF0D4FE284608F064 +:1004300010FCAF48FEF704F8217860680AF042F932 +:100440003146207813F0DAFDBDE870400BF073BC44 +:1004500010B501240AB1002010BD21B1012903D03B +:100460000024204610BD02210DF068FBF9E72DE9BC +:10047000F047040000D1FFDF9A4802211C3081467A +:10048000FFF73CFF00B1FFDF964D0620B5F81C805A +:1004900002F058FA0646072002F054FA3044C6B279 +:1004A000701CC7B2A88BB04228D120460DF0FEFCCC +:1004B000B0B1207818283FD1207901283CD1E088BC +:1004C000062102F097FA040000D1FFDF208807F030 +:1004D000DCFA2088062102F09FFA40B3FFDF2BE010 +:1004E000287860B300266670142020702021201D1B +:1004F00015F0E5F8022020712E701DE0B84217D1EA +:100500002046FDF737FFD0B12078172814D1207985 +:1005100068B1E088072102F06DFA40B1008807F069 +:10052000B4FAE088072102F077FA00B1FFDF03E0B8 +:100530002146FFF745FE10B10120BDE8F0870221FA +:100540004846FFF7DBFE10B9A98B4145AAD12046EA +:10055000BDE8F04713F098BD10B501F089FB08B174 +:100560000C2010BD0BF03AFC002010BD10B5044665 +:10057000007818B1012801D0122010BD01F089FBCC +:1005800020B10BF0DBFD08B10C2010BD207801F08C +:1005900036FBE21D04F11703611CBDE810400BF0AF +:1005A000C2BC10B5044601F063FB08B10C2010BDBD +:1005B000207828B1012803D0FF280BD0122010BDCD +:1005C00001F01DFB611C0BF0C9FB08B1002010BD40 +:1005D000072010BD01200BF0FBFBF7E710B50BF077 +:1005E000B0FD08B1002010BD302010BD10B504468C +:1005F00001F04FFB08B10C2010BD20460BF09BFD15 +:10060000002010BD10B501F044FB20B10BF096FDA9 +:1006100008B10C2010BD0BF0EBFC002010BDFF2139 +:1006200081704FF6FF7181802D4949680A78827187 +:100630008A880281498841810121417000207047E8 +:100640007CB50025022A19D015DC12F10C0F15D04B +:1006500009DC12F1280F11D012F1140F0ED012F193 +:10066000100F11D10AE012F1080F07D012F1040F98 +:1006700004D04AB902E0D31E052B05D8012806D0C4 +:10068000022808D003280AD0122528467CBD10462F +:10069000FEF75EFAF9E710460EF0E8F8F5E70846CF +:1006A00014466946FFF776FD08B10225EDE79DF88F +:1006B00000000198002580F85740E6E710B5134682 +:1006C00001220CF0E5FB002010BD10B5044611F02E +:1006D00070FC05280ED0204610F05AFE002010BDF8 +:1006E0006C000020E8070020FFFFFFFF1F00000054 +:1006F000A80600200C20F2E710B5044601F0C9FA64 +:1007000008B10C20EBE72146002007F02CFA00206E +:10071000E5E710B5044610F0C9FE50B108F02AFD17 +:1007200038B1207808F0BBFA20780EF0DBFB00200F +:10073000D5E70C20D3E710B5044601F0AAFA08B1BA +:100740000C20CCE72146012007F00DFA0020C6E777 +:1007500038B504464FF6FF70ADF80000A079E17996 +:10076000884216D02079FDF766FD90B16079FDF7DB +:1007700062FD70B10022A079114614F0B3F840B9BF +:100780000022E079114614F0ADF810B9207A07285C +:1007900001D9122038BD08F0FAFC60B911F009FC4B +:1007A00048B900216846FFF7A9FD20B1204606F0B0 +:1007B00086F8002038BD0C2038BD2DE9FC41817839 +:1007C00005461A2925D00EDC16292DD2DFE801F0C6 +:1007D0002C2C2C2C2C212C2C2C2C2C2C2C2C2C2C64 +:1007E0002C2C2C2121212A291ED00BDCA1F11E0149 +:1007F0000C2919D2DFE801F0181818181818181861 +:100800001818180D3A3904290ED2DFE801F00D024C +:100810000D022888B0F5706F06D201276946FFF7F0 +:10082000B9FC18B1022089E5122087E59DF8000087 +:1008300001F0ECF9019C08B1FC3401E004F5BC7452 +:100840009DF8000001F0E2F9019E08B1FD3601E0DB +:1008500006F279166846FFF78BFC08B1207808B1DC +:100860000C206BE52770A8783070684601F064FAB8 +:10087000002063E57CB50D466946FFF78BFC00263A +:1008800018B12E602E7102207CBD9DF8000001F091 +:10089000BDF9019C9DF80000583401F0B7F90198AA +:1008A00084F8406081682960017B297194F84010C8 +:1008B0000029F5D100207CBD70B5044691F85500A3 +:1008C00091F856300D4610F00C0F00D1002321890D +:1008D000A0880CF0A1FC696A81421DD2401A401C1C +:1008E000A1884008091A8AB2A2802189081A2081A9 +:1008F000668895F8541010460CF035FC864200D2FC +:1009000030466080E68895F8551020890CF02BFC65 +:10091000864200D23046E08070BDF0B585B00D460D +:10092000064603A9FFF736FC00282DD19DF80C00E0 +:1009300060B300220499FB20B1F84A30FB2B00D3AE +:100940000346B1F84C40FB20FB2C00D30446DFF8F3 +:100950003CCC9CE8811000900197CDF808C0ADF820 +:100960000230ADF806406846FFF7A6FF6E80BDF87E +:100970000400E880BDF808006881BDF80200A88086 +:10098000BDF806002881002005B0F0BD0122D1E7A6 +:100990002DE9F04186B0044600886946FFF7FAFB6E +:1009A000002876D12189E08801F0D5F9002870D19E +:1009B000A188608801F0CFF900286AD12189E088F8 +:1009C00001F0D7F9002864D1A188608801F0D1F93D +:1009D00007005ED1208802A9FFF79FFF00B1FFDF6B +:1009E000BDF8101062880920914252D3BDF80C1056 +:1009F000E28891424DD3BDF81210BDF80E20238934 +:100A00001144A2881A44914243D39DF80010019DDD +:100A10004FF00008012640F6480041B185F8A36177 +:100A2000019991F8E61105F5D17541B91AE085F8FB +:100A30000D61019991F8301105F5867509B13A27D4 +:100A400024E0E18869806188E9802189814200D3BE +:100A50000146A980A188814200D20846288101224E +:100A600001990FE0E18869806188E98021898142EC +:100A700000D30146A980A188814200D2084628817E +:100A8000019900222846FFF717FF2E7085F8018094 +:100A9000384606B0BDE8F0817AE710B5044601F0AB +:100AA000F8F820B10BF04AFB08B10C2017E62078CB +:100AB00001F0A5F8E279611C0BF0C1FC08B100203F +:100AC0000DE602200BE610B503780446002B4068C3 +:100AD00013460A46014609D05FF001000CF0A5FB61 +:100AE0006168496A884203D90120F8E50020F5E7EA +:100AF0000020F4E52DE9F04117468A781E4680462D +:100B000042B11546C87838B10446690706D52AB1FE +:100B1000012104E00725F5E70724F6E70021620735 +:100B200002D508B1012000E00020014206D00122D8 +:100B300011464046FFF7C7FF98B93BE051B100228C +:100B400001214046FFF7BFFF58B9600732D50122A7 +:100B500011461FE058B1012200214046FFF7B3FFC4 +:100B600008B1092096E7680724D5012206E0680746 +:100B70004FEA44700AD5002813DB002201214046C9 +:100B8000FFF7A1FFB0B125F0040513E0002811DA4A +:100B9000012200214046FFF796FF58B124F00404DB +:100BA00008E0012211464046FFF78DFF10B125F005 +:100BB0000405F3E73D70347000206BE710B586B094 +:100BC0000446008803A9FFF7E5FA002806D1A088AB +:100BD00030B1012804D0022802D0122006B07EE5F0 +:100BE0006B4602AA214603A8FFF784FF0028F5D12F +:100BF0009DF80C3000220121002B049B06D083F8C5 +:100C0000AD11049B93F8FA316BBB24E083F8171104 +:100C1000049B93F83C313BB9049B93F816311BB904 +:100C2000049B93F87D300BB13A2010E0049B83F8CD +:100C30001611049B9DF8081083F81811049B9DF869 +:100C4000001083F81911049BA188A3F81A110499C4 +:100C500081F81721C2E7049B93F8AC311BB9049BC0 +:100C600093F87D300BB13A2010E0049B83F8AC116F +:100C7000049B9DF8081083F8AE11049B9DF80010AA +:100C800083F8AF11049BA188A3F8B011049981F8EF +:100C9000AD21A3E710B504460020A17801B90120D9 +:100CA000E2780AB940F0020001F06CF8002803D1A4 +:100CB0002046BDE8104081E711E570B51C460D46A1 +:100CC00018B1012801D0122070BD1946104601F05C +:100CD00069F830B12146284601F06EF808B10020CD +:100CE00070BD302070BD70B5044600780E460128F6 +:100CF00004D018B1022801D0032841D1607828B16E +:100D0000012803D0022801D0032839D1E07B10B993 +:100D1000A078012834D1A07830F0050130D110F04E +:100D2000050F2DD06289E188E0783346FFF7C5FFD3 +:100D3000002826D1A07805281ED16589A28921899D +:100D400020793346FFF7B9FF00281AD15FF0010080 +:100D500004EB40014A8915442218D37892789342D3 +:100D60000ED1CA8889888A420AD1401CC0B20228A2 +:100D7000EED3E088A84203D3A07B08B1072801D9AD +:100D8000122070BD002070BD10B586B0044600F082 +:100D900062FF08B10C2021E7022104F10A0001F0F2 +:100DA0001EF8A0788DF80800A0788DF80000607813 +:100DB0008DF8040020788DF80300A07B8DF80500E5 +:100DC000E07B00B101208DF80600A078C10717D0A4 +:100DD000E07800F0FBFF8DF80100E088ADF80A0034 +:100DE0006089ADF80C00A078400716D5207900F096 +:100DF000EDFF8DF802002089ADF80E00A0890AE011 +:100E000040070AD5E07800F0E1FF8DF80200E088A5 +:100E1000ADF80E006089ADF8100002A810F052FB8A +:100E20000028B8D168460EF062F8D7E610B504463F +:100E30000121FFF758FF002803D12046BDE81040EC +:100E4000A2E74CE40278012A01D0BAB118E0427856 +:100E50003AB1012A05D0022A12D189B1818879B12B +:100E600000E059B1418849B1808838B101EB810176 +:100E7000490000EB8000B1EB002F01D20020704749 +:100E80001220704770B5044600780D46012809D03D +:100E900011F08FF8052803D010F025FA002800D0B3 +:100EA0000C2070BD0DF0F0FE88B10DF002FF0DF0CA +:100EB000FBFF0028F5D125B160780DF08CFF0028EC +:100EC000EFD1A1886088BDE8704010F021BB1220EE +:100ED00070BD10B504460121FFF7B4FF002804D10E +:100EE0002046BDE810400121CCE704E42DE9F0479D +:100EF0000746B0F84C50FB2092460E46FB2D00D31F +:100F00000546DFF88C86B8F80A00A84200D20546EC +:100F100097F85510284600F08DFEB8F80C10814265 +:100F200000D208468146B7F84A40FB20FB2C00D38C +:100F30000446B8F80E00A04200D2044697F85410B8 +:100F4000204600F077FEB8F81010814200D2084623 +:100F50004FF4A4721B2C01D0904203D11B2D25D03D +:100F6000914523D0F580A6F808907480B080524651 +:100F700039463046FFF7A0FC01203070F0881B385E +:100F8000E02800D9FFDF70881B38E02800D9FFDF98 +:100F9000308940F64814A0F5A470A04200D9FFDFC4 +:100FA000B088A0F5A470A04200D9FFDFBDE8F087AB +:100FB000F0B5871FDDE9056540F67B44A74213D2F3 +:100FC0008F1FA74210D288420ED8B2F5FA7F0BD2FB +:100FD000A3F10A00241FA04206D2521C4A43B2EBDE +:100FE000830F01DAAE4201D90020F0BD0120F0BD2F +:100FF0002DE9FC47477A8946044617F0050F7DD056 +:10100000F8087BD194F83A0008B9012F76D1002571 +:10101000A8462E46F90789F0010A19D0208A5146C0 +:1010200000F0C0FEF0B36089514600F0C5FEC8B3C1 +:10103000208A6189884261D8A18EE08DCDE90001C6 +:10104000238D628CA18BE08AFFF7B2FF50B301259C +:10105000B8070ED504EB4500828EC18DCDE9001294 +:10106000038D428C818BC08AFFF7A2FFD0B1A846C6 +:101070006D1C78071ED504EB45065146308A00F0FA +:1010800091FE78B17089514600F096FE50B1308AD9 +:10109000718988425ED8B18EF08DCDE90001338D23 +:1010A000728C00E00AE0B18BF08AFFF781FF28B173 +:1010B0002E466D1CB9F1000F03D030E03020BDE8A2 +:1010C000FC87F80707D0780705D504EB460160894F +:1010D000498988423ED1228A01211BE0414503D043 +:1010E00004EB4100008A024404EB4100C38A868A73 +:1010F000B3422FD1838B468BB34200E02AE029D143 +:10110000438C068CB34225D1038DC08C834221D100 +:10111000491CC9B2A942E1D3608990421AD3207810 +:1011200010B1012816D10DE0A078B9F1000F07D059 +:1011300040B1012806D0022804D003280AD101E0DA +:101140000028EED1607838B1012805D0022803D0FC +:10115000032801D01220B2E70020B0E7002147E7C2 +:101160000178C90702D0406812F061BF12F02EBFAB +:101170002DE9F04788B00D46AFF69422D2E90092EF +:10118000014690462846FFF733FF06000CD100F0D9 +:1011900062FD40B9FE4F387828B90CF011FFA0F578 +:1011A0007F41FF3902D00C2008B0FFE6032105F192 +:1011B000100000F014FEF64801AA3E380190F548F0 +:1011C0000290F34806211038039007A801F0E0FBD5 +:1011D000040035D003210BF0BBFBB98AA4F84A10F8 +:1011E000FA8AA4F84C20FB7C0093BA46BB7C20888A +:1011F00001F0BBFC00B1FFDF208806F045FC218830 +:1012000004F10E0000F04FFDE3A004F112070068A6 +:1012100000900321684604F007FE002069460A5C3E +:101220003A54401CC0B20328F9D3A88B6080688C64 +:10123000A080288DE080687A410703D508270AE05E +:101240000920B1E7C10701D0012704E0800701D5DB +:10125000022700E000273A46BAF81800114610F0BD +:10126000EBF90146A062204610F0F4F917F00C0FDC +:1012700009D001231A46214600200BF0D6FF616AEF +:10128000884200D90926002784F85E7084F85F70D0 +:10129000A87800F0B4FC6076D5F80300C4F81A0012 +:1012A000B5F80700E083C4F8089084F80C800120AA +:1012B00084F80801024604F586712046FFF716FE01 +:1012C0008DF800700121684604F0AEFD9DF8000025 +:1012D00000F00701C0F3C1021144C0F340100844FC +:1012E0008DF80000401D2076092801D208302076B4 +:1012F000002120460BF02CFB68780DF0D0FCEEBBF3 +:10130000A9782878EA1C0DF092FC48B10DF0D1FCC8 +:10131000A9782878EA1C0DF038FD060002D052E0CA +:10132000122650E0687A00F005010020CA0700D0BC +:1013300001208A0701D540F00200490701D540F09D +:1013400008000DF05DFC06003DD1214603200DF0A4 +:1013500046FD060037D10DF04CFD060033D1697A09 +:1013600001F005018DF81010697AC90708D0688965 +:10137000ADF81200288AADF8140000E023E0012047 +:10138000697A8A0700D5401C490707D505EB40005C +:101390004189ADF81610008AADF8180004A810F0C5 +:1013A00091F8064695F83A0000B101200DF03AFC9C +:1013B0004EB90DF079FD060005D1A98F204610F039 +:1013C00023F8060008D0208806F05FFB208806215D +:1013D00001F022FB00B1FFDF3046E5E601460020C8 +:1013E000C6E638B56A48007878B910F0E2FD0528FD +:1013F00005D00CF0E5FDA0F57F41FF3905D068462A +:1014000010F0C9F8040002D00CE00C2038BD0098A0 +:10141000008806F03AFB00980621008801F0FCFAEB +:1014200000B1FFDF204638BD1CB582894189CDE976 +:1014300000120389C28881884088FFF7B9FD08B18E +:1014400000201CBD30201CBD70B50546FFF7ECFF29 +:1014500000280ED12888062101F0CCFA040007D01C +:1014600000F05EFC20B1D4F80001017831B901E050 +:10147000022070BDD4F84C11097809B13A2070BD32 +:1014800005218171D4F8001100200881D4F80011E1 +:10149000A8884881D4F80011E8888881D4F8001120 +:1014A0002889C881D4F80001028941898A4204D878 +:1014B0008279082A01D88A4201D3122070BD298876 +:1014C0004180D4F8001102200870002070BD3EB5A4 +:1014D00004460BF06FFCB0B12D480125A0F140028D +:1014E0004570236842F8423F23790021137141700F +:1014F0006946062001F007FA00B1FFDF684601F0F7 +:10150000E0F910B10EE012203EBDBDF80440029893 +:1015100080F80851684601F0D4F918B9BDF8040004 +:10152000A042F4D100203EBD70B5054600880621DA +:1015300001F060FA040007D000F0F2FB20B1D4F80B +:101540000011087830B901E0022070BDD4F84C01D8 +:10155000007808B13A2070BD9620005D10F0010FB0 +:1015600024D0D5F802004860D5F806008860D4F889 +:101570000001698910228181D4F8000105F10C0174 +:101580000E3004F5807413F0F9FF07E0385B0200B9 +:10159000E807002078000020112233002168032092 +:1015A0000870216828884880002070BD0C2070BD1C +:1015B00038B504460078EF284DD86088ADF80000B3 +:1015C000009800F01DFC88B36188080708D4D4E9AE +:1015D000012082423FD8202A3DD3B0F5804F3AD82F +:1015E000207B18B3072836D8607B28B1012803D0A8 +:1015F000022801D003282ED14A0703D4022801D0A3 +:10160000032805D1A07B08B1012824D1480707D4BD +:10161000607D28B1012803D0022801D003281AD107 +:10162000C806E07D03D5012815D110E013E001289C +:1016300001D003280FD1C80609D4607E012803D049 +:10164000022801D0032806D1A07E0F2803D8E07E0F +:1016500018B1012801D0122038BD002038BDF8B5DE +:1016600014460D46064607F092FD08B10C20F8BD61 +:101670003046FFF79DFF0028F9D1FDF76EFA28707C +:10168000B07554B9FF208DF8000069460020FDF7C1 +:1016900053FA69460020FDF743FA3046BDE8F840AA +:1016A000FDF797B90022DAE770B50C46054612B18E +:1016B0001F2907D80CE0FF2C04D8FCF704FF18B151 +:1016C0001F2C01D9122070BD2846FCF7E6FE08B198 +:1016D000002070BD422070BD10B50446408810B196 +:1016E000FDF701FA78B12078618800F00102607896 +:1016F000FFF7DAFF002805D1FDF7DDF962888242A5 +:1017000003D9072010BD122010BD10466168FDF7F7 +:1017100013FA002010BD10B50446408810B1FCF744 +:10172000C4FE70B12078618800F001026078FFF794 +:10173000BBFF002804D160886168FDF7F1F9002043 +:1017400010BD122010BD7CB504464078422501280A +:1017500008D8A078FCF7A1FE20B120781225012836 +:1017600002D090B128467CBDFDF703FA20B1A088D5 +:101770000028F7D08028F5D8FDF702FA60B160782C +:101780000028EFD02078012808D006F09DFA044602 +:1017900007F0BCF900287DD00C207CBDFDF732F8A5 +:1017A00010B9FDF7DFF990B307F0F1FC0028F3D191 +:1017B000FCF73BFEA0F57F41FF39EDD1FDF744F882 +:1017C000A68842F210704643A079FDF79DF9FCF718 +:1017D00073FEF8B10022072101A801F0D9F8040036 +:1017E00043D0FA480321846020460AF0B6FF204621 +:1017F000FDF72CFDF64DA88AA4F84A00E88AA4F863 +:101800004C00FCF760FE60B1288B01210DE0FFE782 +:1018100012207CBD3146002007F044FAD8B3FFDF28 +:101820004CE0FDF7AFF90146288B07F0F0FA0146CE +:10183000A0620022204606F04AFAFCF744FEB0B946 +:10184000FDF7A0F910F00C0F11D001231A46214624 +:1018500018460BF0EAFC616A884208D90721BDF8F6 +:10186000040001F0D9F800B1FFDF09207CBDE87C5D +:101870000090AB7CEA8AA98A208801F076F900B151 +:10188000FFDF208806F000F93146204607F00AFA0B +:1018900018B101E008E011E0FFDF002204F5D1718A +:1018A0002046FFF723FB09E044B1208806F0EDF85D +:1018B0002088072101F0B0F800B1FFDF00207CBDD7 +:1018C000002140E770B50D46072101F093F80400B0 +:1018D00003D094F87B0110B10AE0022070BD94F8A7 +:1018E0006500142801D0152802D194F8C80108B168 +:1018F0000C2070BD1022294604F5BE7013F03EFE88 +:10190000012084F87B01002070BD10B5072101F093 +:1019100071F818B190F87B1111B107E0022010BDE9 +:1019200090F86510142903D0152901D00C2010BDA2 +:10193000022180F87B11002010BD2DE9FC410C46EE +:101940004BF68032122194421DD8E4B16946FEF76D +:1019500021FC002815D19DF8000000F057F9019EE8 +:101960009DF80000583600F051F9019DAD1C2F88FC +:101970002246394630460AF0E6FE2888B842F6D1BB +:101980000020BDE8FC810846FBE77CB504460088E2 +:101990006946FEF7FFFB002810D19DF8000000F01B +:1019A00035F9019D9DF80000583500F02FF9019898 +:1019B000A27890F82C10914201D10C207CBD7F219F +:1019C0002972A9720021E972E17880F82D1021793D +:1019D00080F82E10A17880F82C1000207CBD1CB55A +:1019E0000C466946FEF7D6FB00280AD19DF8000098 +:1019F00000F00CF9019890F8730000B101202070FC +:101A000000201CBD7CB50D4614466946FEF7C2FB9E +:101A1000002809D19DF8000000F0F8F8019890F82E +:101A20002C00012801D00C207CBD9DF8000000F0A6 +:101A3000EDF8019890F86010297090F8610020701E +:101A400000207CBD70B50D461646072100F0D2FF80 +:101A500018B381880124C388428804EB4104AC4256 +:101A600017D842F210746343A4106243B3FBF2F23E +:101A7000521E94B24FF4FA72944200D91446A54211 +:101A800000D22C46491C641CB4FBF1F24A43521E9E +:101A900091B290F8B4211AB901E0022070BD01841E +:101AA0003180002070BD10B50C46072100F0A2FF68 +:101AB00048B180F8E74024B190F8E51009B107F08B +:101AC000BCF9002010BD022010BD017899B1417809 +:101AD00089B141881B290ED381881B290BD3C1886A +:101AE000022908D33A490268403941F8522F406828 +:101AF0004860002070471220704710B504460FF070 +:101B000097FD204607F052F9002010BD10B507F0F0 +:101B100050F9002010BD2DE9F04115460F4606464C +:101B20000122114638460FF087FD04460121384650 +:101B300007F06DF9844200D2044601213046653C2D +:101B400000F069F806460121002000F064F83044F6 +:101B500001219630844206D900F19601201AB0FB8B +:101B6000F1F0401C81B229800020BDE8F08110B561 +:101B7000044600F08EF808B10C2010BD601C0AF07D +:101B800039FC207800F00100FCF759FE207800F0C5 +:101B900001000DF089F8002010BD10B507F003F921 +:101BA000002010BD10B50446072000F0BDFE08B1AE +:101BB0000C2010BD2078C00716D000226078114696 +:101BC00012F090FE30B1122010BD00006C00002019 +:101BD000E8070020A06809F0D4F86078D4F8041071 +:101BE00009F0D8F80020EFE7002009F0CAF800213A +:101BF0000846F5E710B505F02BFB0020E4E718B127 +:101C0000022801D0012070470020704708B1002051 +:101C100070470120704710B5012904D0022905D072 +:101C2000FFDF2046D0E7C000503001E080002C30BC +:101C300084B2F6E711F00C0F04D04FF4747101EB8D +:101C4000801006E0022902D0C000703001E0800060 +:101C50003C3080B2704710B510F0ABF9042805D0C5 +:101C600010F0A7F9052801D00020ADE70120ABE76F +:101C700010B5FFF7F0FF10B10DF0DAF828B907F052 +:101C800086FA20B1FCF7B6FD08B101209CE70020E0 +:101C90009AE710B5FFF7DFFF18B907F078FA0028C8 +:101CA00092D0012090E72DE9FE4300250F468046A3 +:101CB0000A260421404604F0E0F840460BF01BF8E9 +:101CC000062000F03FFE044615E06946062000F0BD +:101CD0001AFE0AE0BDF80400B84206D002980422B9 +:101CE00041460E3013F01EFC50B1684600F0E9FD8D +:101CF0000500EFD0641E002C06DD002DE5D005E0C8 +:101D000040460BF001F8F5E705B9FFDFD8F8000011 +:101D10000BF015F8761E01D00028CAD0BDE8FE836E +:101D200090F8D81090F8730020B919B1042901D0A7 +:101D30000120704700207047017800290AD04168CF +:101D400091F8E520002A05D0002281F8E5204068BE +:101D500007F073B870471B38E12806D2B1F5A47FAD +:101D600003D344F29020814201D912207047002011 +:101D70007047FB2802D8B1F5296F01D911207047AF +:101D80000020704770B514460546012200F05CF84B +:101D9000002806D121462846BDE87040002200F008 +:101DA00053B870BD042803D321B9B0F5804F01D9D1 +:101DB0000020704701207047042803D321B9B0F5F3 +:101DC000804F01D90020704701207047012802D0C0 +:101DD00018B100207047022070470120704710B5ED +:101DE00000224FF4C84408E030F81230A34200D972 +:101DF000234620F81230521CD2B28A42F4D3E3E6D2 +:101E000080B2C1060BD401071CD481064FEAC07111 +:101E100001D5B9B900E099B1800713D410E04106AB +:101E200010D481060ED4C1074FEA807104D0002976 +:101E300002DB400704D405E0010703D4400701D4C6 +:101E400001207047002070470AB1012200E0022201 +:101E5000024202D1C80802D109B100207047112006 +:101E60007047000030B5058825F4004421448CB249 +:101E70004FF4004194420AD2121B92B21B339A4291 +:101E800001D2A94307E005F40041214303E0A21A6F +:101E900092B2A9431143018030BD08440830504339 +:101EA0004A31084480B2704770B51D4616460B464D +:101EB000044629463046049AFFF7EFFF0646B34230 +:101EC00000D2FFDF2821204613F0F9FB4FF6FF7008 +:101ED000A082283EB0B265776080B0F5004F00D98F +:101EE000FFDF618805F13C00814200D2FFDF60889E +:101EF0000835401B343880B220801B2800D21B20BC +:101F000020800020A07770BD8161886170472DE935 +:101F1000F05F0D46C188044600F12809008921F4CC +:101F2000004620F4004800F062FB10B10020BDE83C +:101F3000F09F4FF0000A4FF0010BB0450CD9617FC4 +:101F4000A8EB0600401A0838854219DC09EB0600A8 +:101F50000021058041801AE06088617F801B471A5C +:101F6000083F0DD41B2F00DAFFDFBD4201DC2946FC +:101F700000E0B9B2681A0204120C04D0424502DD36 +:101F800084F817A0D2E709EB06000180428084F8AC +:101F900017B0CCE770B5044600F12802C088E37D95 +:101FA00020F400402BB110440288438813448B4234 +:101FB00001D2002070BD00258A4202D301804580F5 +:101FC00008E0891A0904090C418003D0A01D00F023 +:101FD0001EFB08E0637F00880833184481B26288E2 +:101FE000A01DFFF73FFFE575012070BD70B50346EA +:101FF00000F12804C588808820F400462644A842C1 +:1020000002D10020188270BD98893588A84206D375 +:10201000401B75882D1A2044ADB2C01E05E02C1A55 +:10202000A5B25C7F20443044401D0C88AC4200D9EE +:102030000D809C8924B1002414700988198270BD18 +:102040000124F9E770B5044600F12801808820F4E6 +:1020500000404518208A002825D0A189084480B274 +:10206000A08129886A881144814200D2FFDF288834 +:10207000698800260844A189884212D1A069807F1E +:102080002871698819B1201D00F0C1FA08E0637F4A +:1020900028880833184481B26288201DFFF7E2FEC9 +:1020A000A6812682012070BD2DE9F04141898788F3 +:1020B0000026044600F12805B94218D004F10A08A8 +:1020C00021F400402844418819B1404600F09FFAAD +:1020D00008E0637F00880833184481B26288404674 +:1020E000FFF7C0FE761C6189B6B2B942E8D130462E +:1020F000BDE8F0812DE9F04104460B4627892830E0 +:10210000A68827F40041B4F80A8001440D46B7427E +:1021100001D10020ECE70AB1481D106023B1627FB5 +:10212000691D184613F02AFA2E88698804F1080000 +:1021300021B18A1996B200F06AFA06E0637F6288DC +:102140000833991989B2FFF78DFE474501D12089DF +:1021500060813046CCE78188C088814201D101206E +:1021600070470020704701898088814201D1012099 +:1021700070470020704770B58588C38800F1280437 +:1021800025F4004223F4004114449D421AD083896F +:10219000058A5E1925886388EC18A64214D313B10A +:1021A0008B4211D30EE0437F08325C1922444088F1 +:1021B00092B2801A80B22333984201D211B103E067 +:1021C0008A4201D1002070BD012070BD2DE9F04789 +:1021D0008846C1880446008921F4004604F1280796 +:1021E00020F4004507EB060900F001FA002178BB56 +:1021F000B54204D9627FA81B801A002503E06088DD +:10220000627F801B801A083823D4E28962B1B9F852 +:102210000020B9F802303BB1E81A2177404518DBBD +:10222000E0893844801A09E0801A217740450ADBAA +:10223000607FE1890830304439440844C01EA4F866 +:102240001280BDE8F087454503DB01202077E7E7F2 +:10225000FFE761820020F4E72DE9F74F044600F123 +:102260002805C088884620F4004A608A05EB0A06E3 +:1022700008B1404502D20020BDE8FE8FE08978B168 +:102280003788B6F8029007EB0901884200D0FFDFDB +:10229000207F4FF0000B50EA090106D088B33BE0E5 +:1022A0000027A07FB9463071F2E7E18959B1607F1C +:1022B0002944083050440844B4F81F1020F8031D86 +:1022C00094F821108170E28907EB080002EB080105 +:1022D000E1813080A6F802B002985F4650B1637F7A +:1022E00030880833184481B26288A01DFFF7BAFD18 +:1022F000E78121E0607FE1890830504429440844A7 +:102300002DE0FFE7E089B4F81F102844C01B20F837 +:10231000031D94F82110817009EB0800E28981B255 +:1023200002EB0800E081378071800298A0B1A01D07 +:1023300000F06DF9A4F80EB0A07F401CA077A07D3E +:1023400008B1E088A08284F816B000BFA4F812B0EB +:1023500084F817B001208FE7E0892844C01B30F8CB +:10236000031DA4F81F10807884F82100EEE710B553 +:10237000818800F1280321F400442344848AC28820 +:10238000A14212D0914210D0818971B9826972B193 +:102390001046FFF7E8FE50B91089283220F40040BB +:1023A000104419790079884201D1002010BD1846E7 +:1023B00010BD00F12803407F08300844C01E1060A3 +:1023C000088808B9DB1E136008884988084480B271 +:1023D00070472DE9F04100F12806407F1C46083087 +:1023E0009046431808884D88069ADB1EA0B1C01C91 +:1023F00080B2904214D9801AA04200DB204687B2F6 +:1024000098183A46414613F08DF8002816D1E01B83 +:1024100084B2B844002005E0ED1CADB2F61EE8E73A +:10242000101A80B20119A94206D83044224641460A +:10243000BDE8F04113F076B84FF0FF3058E62DE9D3 +:10244000F04100F12804407F1E46083090464318B2 +:10245000002508884F88069ADB1E90B1C01C80B208 +:10246000904212D9801AB04200DB304685B29918EA +:102470002A46404613F082F8701B86B2A84400201A +:1024800005E0FF1CBFB2E41EEAE7101A80B2811912 +:10249000B94206D821183246404613F06FF8A81901 +:1024A00085B2284624E62DE9F04100F12804407F5A +:1024B0001E46083090464318002508884F88069A23 +:1024C000DB1E90B1C01C80B2904212D9801AB0427B +:1024D00000DB304685B298182A46414613F04EF884 +:1024E000701B86B2A844002005E0FF1CBFB2E41EAA +:1024F000EAE7101A80B28119B94206D82044324660 +:10250000414613F03BF8A81985B22846F0E5401D76 +:10251000704710B5044600F12801C288808820F475 +:1025200000431944904206D0A28922B9228A12B9E6 +:10253000A28A904201D1002010BD0888498831B19B +:10254000201D00F064F800202082012010BD637F70 +:1025500062880833184481B2201DFFF783FCF2E73C +:102560000021C18101774182C1758175704703885F +:102570001380C28942B1C28822F4004300F12802CC +:102580001A440A60C08970470020704710B504469D +:10259000808AA0F57F41FF3900D0FFDFE088A0826C +:1025A000E08900B10120A07510BD4FF6FF71818256 +:1025B00000218175704710B50446808AA0F57F41DF +:1025C000FF3900D1FFDFA07D28B9A088A18A884209 +:1025D00001D1002010BD012010BD8188828A914266 +:1025E00001D1807D08B1002070470120704720F4A0 +:1025F000004221F400439A4207D100F4004001F464 +:102600000041884201D0012070470020704730B55A +:10261000044600880D4620F40040A84200D2FFDFA7 +:1026200021884FF4004088432843208030BD70B596 +:102630000C00054609D0082C00D2FFDF1DB1A1B265 +:10264000286800F044F8201D70BD0DB100202860FE +:10265000002070BD0021026803E0938812681944CD +:1026600089B2002AF9D100F032B870B500260D46C3 +:102670000446082900D2FFDF206808B91EE004469E +:1026800020688188A94202D001680029F7D1818899 +:102690000646A94201D100680DE005F1080293B297 +:1026A0000022994209D32844491B02608180216895 +:1026B000096821600160206000E00026304670BD9E +:1026C00000230B608A8002680A6001607047002363 +:1026D0004360021D018102607047F0B50F4601881A +:1026E000408815460C181E46AC4200D3641B30448B +:1026F000A84200D9FFDFA019A84200D9FFDF38198E +:10270000F0BD2DE9F041884606460188408815460F +:102710000C181F46AC4200D3641B3844A84200D9B1 +:10272000FFDFE019A84200D9FFDF708838447080CD +:1027300008EB0400BDE8F0812DE9F0410546008872 +:102740001E461746841B8846BC4200D33C442C805E +:1027500068883044B84200D9FFDFA019B84200D9D8 +:10276000FFDF68883044688008EB0400E2E72DE969 +:10277000F04106881D460446701980B21746884607 +:102780002080B84201D3C01B20806088A84200D2BC +:10279000FFDF7019B84200D9FFDF6088401B6080FE +:1027A00008EB0600C6E730B50D460188CC18944208 +:1027B00000D3A41A4088984200D8FFDF281930BD02 +:1027C0002DE9F041C84D04469046A8780E46A04237 +:1027D00000D8FFDF05EB8607B86A50F8240000B187 +:1027E000FFDFB868002816D0304600F044F90146F3 +:1027F000B868FFF73AFF05000CD0B86A082E40F819 +:10280000245000D3FFDFB9484246294650F826300D +:10281000204698472846BDE8F0812DE9F8431E463A +:102820008C1991460F460546FF2C00D9FFDFB145B4 +:1028300000D9FFDFE4B200954DB300208046E81CCC +:1028400020F00300A84200D0FFDF4946DFF898924D +:10285000684689F8001089F8017089F8024089F803 +:10286000034089F8044089F8054089F8066089F832 +:102870000770414600F008F9002142460F464B46DA +:102880000098C01C20F00300009012B10EE001205F +:10289000D4E703EB8106B062002005E0D6F828C03B +:1028A0004CF82070401CC0B2A042F7D30098491CDD +:1028B00000EB8400C9B200900829E1D3401BBDE8B9 +:1028C000F88310B50446EEF724FD08B1102010BDC2 +:1028D0002078854A618802EB800092780EE0836A56 +:1028E00053F8213043B14A1C6280A180806A50F8BD +:1028F0002100A060002010BD491C89B28A42EED898 +:102900006180052010BD70B505460C460846EEF7FF +:1029100000FD08B1102070BD082D01D3072070BD47 +:1029200025700020608070BD0EB56946FFF7EBFF93 +:1029300000B1FFDF6846FFF7C4FF08B100200EBDFD +:1029400001200EBD10B50446082800D3FFDF6648FD +:10295000005D10BD3EB5054600246946FFF7D3FF74 +:1029600018B1FFDF01E0641CE4B26846FFF7A9FF7D +:102970000028F8D02846FFF7E5FF001BC0B23EBD97 +:1029800059498978814201D9C0B27047FF20704708 +:102990002DE9F041544B062903D007291CD19D791C +:1029A00000E0002500244FF6FF7603EB810713F8C3 +:1029B00001C00AE06319D7F828E09BB25EF823E073 +:1029C000BEF1000F04D0641CA4B2A445F2D8334673 +:1029D00003801846B34201D100201CE7BDE8F04156 +:1029E000EEE6A0F57F43FF3B01D0082901D300208C +:1029F0007047E5E6A0F57F42FF3A0BD0082909D2DF +:102A0000394A9378834205D902EB8101896A51F8EA +:102A100020007047002070472DE9F04104460D4624 +:102A2000A4F57F4143F20200FF3902D0082D01D303 +:102A30000720F0E62C494FF000088A78A242F8D926 +:102A400001EB8506B26A52F82470002FF1D02748B6 +:102A50003946203050F8252020469047B16A284654 +:102A600041F8248000F007F802463946B068FFF7C5 +:102A700027FE0020CFE61D49403131F810004FF607 +:102A8000FC71C01C084070472DE9F843164E88467B +:102A9000054600242868C01C20F00300286020465A +:102AA000FFF7E9FF315D4843B8F1000F01D0002284 +:102AB00000E02A680146009232B100274FEA0D007B +:102AC000FFF7B5FD1FB106E001270020F8E706EB90 +:102AD0008401009A8A602968641C0844E4B2286072 +:102AE000082CD7D3EBE6000008080020445B020066 +:102AF00070B50E461D46114600F0D4F8044629462E +:102B0000304600F0D8F82044001D70BD2DE9F0419A +:102B100090460D4604004FF0000610D00027E01C40 +:102B200020F00300A04200D0FFDFDDB141460020CD +:102B3000FFF77DFD0C3000EB850617B112E0012791 +:102B4000EDE7614F04F10C00A9003C602572606064 +:102B500000EB85002060606812F0B1FD41463868E6 +:102B6000FFF765FD3046BDE8F0812DE9FF4F564C7B +:102B7000804681B020689A46934600B9FFDF2068FE +:102B8000027A424503D9416851F8280020B143F246 +:102B9000020005B0BDE8F08F5146029800F082F8BF +:102BA00086B258460E9900F086F885B27019001D5D +:102BB00087B22068A14639460068FFF756FD040039 +:102BC0001FD0678025802946201D0E9D07465A4646 +:102BD00001230095FFF768F9208831463844012326 +:102BE000029ACDF800A0FFF75FF92088C119384696 +:102BF000FFF78AF9D9F800004168002041F8284021 +:102C0000C7E70420C5E770B52F4C0546206800B91A +:102C1000FFDF2068017AA9420ED9426852F82510D8 +:102C200051B1002342F825304A880068FFF748FD7B +:102C3000216800200A7A08E043F2020070BD4B6868 +:102C400053F8203033B9401CC0B28242F7D808682C +:102C5000FFF700FD002070BD70B51B4E0546002437 +:102C6000306800B9FFDF3068017AA94204D94068B2 +:102C700050F8250000B1041D204670BD70B5124EFD +:102C800005460024306800B9FFDF3068017AA942A8 +:102C900006D9406850F8251011B131F8040B4418DA +:102CA000204670BD10B50A460121FFF7F6F8C01C9A +:102CB00020F0030010BD10B50A460121FFF7EDF822 +:102CC000C01C20F0030010BD8000002070B5044639 +:102CD000C2F11005281912F051FC15F0FF0108D0BF +:102CE000491EC9B2802060542046BDE8704012F0F1 +:102CF000C4BC70BD30B505E05B1EDBB2CC5CD55CFE +:102D00006C40C454002BF7D130BD10B5002409E04D +:102D10000B78521E44EA430300F8013B11F8013BD3 +:102D2000D2B2DC09002AF3D110BD2DE9F04389B0FD +:102D30001E46DDE9107990460D00044622D0024679 +:102D40000846F949FDF7BAFC102221463846FFF73C +:102D5000DCFFE07B000606D5F34A3946102310322B +:102D60000846FFF7C7FF102239464846FFF7CDFF58 +:102D7000F87B000606D5EC4A494610231032084677 +:102D8000FFF7B8FF1021204612F077FC0DE0103E4F +:102D9000B6B208EB0601102322466846FFF7AAFFE9 +:102DA000224628466946FDF789FC102EEFD818D038 +:102DB000F2B241466846FFF789FF10234A4669464A +:102DC00004A8FFF797FF1023224604A96846FFF7DF +:102DD00091FF224628466946FDF770FC09B0BDE820 +:102DE000F08310233A464146EAE770B59CB01E4690 +:102DF0000546134620980C468DF8080020221946F7 +:102E00000DF1090012F0BAFB202221460DF1290034 +:102E100012F0B4FB17A913A8CDE90001412302AABF +:102E200031462846FFF781FF1CB070BD2DE9FF4FEA +:102E30009FB014AEDDE92D5410AFBB49CDE900764B +:102E4000202320311AA8FFF770FF4FF000088DF8FB +:102E500008804FF001098DF8099054F8010FCDF862 +:102E60000A00A088ADF80E0014F8010C1022C0F37F +:102E700040008DF8100055F8010FCDF81100A8881A +:102E8000ADF8150015F8010C2C99C0F340008DF831 +:102E9000170006A8824612F071FB0AA8834610228A +:102EA000229912F06BFBA0483523083802AA40682B +:102EB0008DF83C80CDE900760E901AA91F98FFF797 +:102EC00034FF8DF808808DF809902068CDF80A004D +:102ED000A088ADF80E0014F8010C1022C0F34000D9 +:102EE0008DF810002868CDF81100A888ADF81500FD +:102EF00015F8010C2C99C0F340008DF817005046CE +:102F000012F03CFB58461022229912F037FB8648FB +:102F10003523083802AA40688DF83C90CDE9007648 +:102F20000E901AA92098FFF700FF23B0BDE8F08F9C +:102F3000F0B59BB00C460546DDE922101E4617464B +:102F4000DDE92032D0F801C0CDF808C0B0F805C0E6 +:102F5000ADF80CC00078C0F340008DF80E00D1F839 +:102F60000100CDF80F00B1F80500ADF813000878A6 +:102F70001946C0F340008DF815001088ADF8160012 +:102F800090788DF818000DF11900102212F0F6FA61 +:102F90000DF129001022314612F0F0FA0DF139003E +:102FA0001022394612F0EAFA17A913A8CDE9000158 +:102FB000412302AA21462846FFF7B7FE1BB0F0BD09 +:102FC000F0B5A3B017460D4604461E46102202A8CF +:102FD000289912F0D3FA06A82022394612F0CEFA28 +:102FE0000EA82022294612F0C9FA1EA91AA8CDE976 +:102FF0000001502302AA314616A8FFF796FE169844 +:10300000206023B0F0BDF0B589B00446DDE90E07BD +:103010000D463978109EC1F340018DF800103178CB +:103020009446C1F340018DF801101968CDF80210E3 +:103030009988ADF8061099798DF808100168CDF8D7 +:1030400009108188ADF80D1080798DF80F001023DC +:103050006A46614604A8FFF74DFE2246284604A9A9 +:10306000FDF72CFBD6F801000090B6F80500ADF88E +:103070000400D7F80100CDF80600B7F80500ADF858 +:103080000A000020039010236A46214604A8FFF797 +:1030900031FE2246284604A9FDF710FB09B0F0BD19 +:1030A0001FB51C6800945B68019313680293526813 +:1030B0000392024608466946FDF700FB1FBD10B5A6 +:1030C00088B004461068049050680590002006906F +:1030D000079008466A4604A9FDF7F0FABDF800001B +:1030E000208008B010BD1FB51288ADF800201A88E6 +:1030F000ADF8022000220192029203920246084695 +:103100006946FDF7DBFA1FBD7FB5074B1446054640 +:10311000083B9A1C6846FFF7E6FF224669462846A8 +:10312000FFF7CDFF7FBD00009C5B020070B5044639 +:1031300000780E46012813D0052802D0092813D1A3 +:103140000EE0A06861690578042003F075F9052D8B +:103150000AD0782300220420616903F0C3F803E059 +:103160000420616903F068F931462046BDE87040EB +:1031700001F084B810B500F12D03C2799C78411D8F +:10318000144064F30102C271D2070DD04A795C7910 +:1031900022404A710A791B791A400A718278C978EB +:1031A0008A4200D9817010BD00224A71F5E741784A +:1031B000012900D00C21017070472DE9F04F93B028 +:1031C0004FF0000B0C690D468DF820B009780126F0 +:1031D0000C2017464FF00D084FF0110A4FF0080968 +:1031E0001B2975D2DFE811F01B00C20205031D0385 +:1031F0005C036F03A103B603F70318046004920491 +:103200009F04EB042905330551055C05ED053006E7 +:10321000330662067E06F8061C07E506EA0614B1C8 +:1032200020781D282AD0D5F808805FEA08004FD002 +:1032300001208DF82000686A02220D908DF824206C +:103240000A208DF82500A8690A90A8880028EED0E9 +:1032500098F8001091B10F2910D27DD2DFE801F06B +:103260007C1349DEFCFBFAF9F8F738089CF6F50008 +:1032700002282DD124B120780C2801D00026EEE3BD +:103280008DF82020CAE10420696A03F0D5F8A888E7 +:103290000728EED1204600F0ECFF022809D0204696 +:1032A00000F0E7FF032807D9204600F0E2FF0728D7 +:1032B00002D20120207004E0002CB8D02078012830 +:1032C000D7D198F80400C11F0A2902D30A2061E06F +:1032D000C3E1A070D8F80010E162B8F804102186AC +:1032E00098F8060084F8320001202870032020702E +:1032F00044E00728BDD1002C99D020780D28B8D102 +:1033000098F8031094F82F20C1F3C000C2F3C00254 +:10331000104201D0062000E00720890707D198F865 +:1033200005100142D2D198F806100142CED194F88E +:10333000312098F8051020EA02021142C6D194F813 +:10334000322098F8061090430142BFD198F804004B +:10335000C11F0A29BAD200E006E2617D81427CD811 +:10336000D8F800106160B8F80410218198F80600C0 +:10337000A072012028700E20207003208DF82000FC +:10338000686A0D9004F12D000990601D0A900F30BD +:103390000B9021E12875FDE3412891D1204600F0F2 +:1033A00068FF042802D1E078C00704D1204600F06D +:1033B00060FF0F2884D1A88CD5F80C8080B24FF024 +:1033C000400BE669FFF748FC324641465B464E46F5 +:1033D000CDF80090FFF733F80B208DF82000686AD5 +:1033E0000D90E0690990002108A8FFF79FFE207862 +:1033F000042806D0A07D58B1012809D003280AD09E +:1034000048E305202070032028708DF82060CCE16F +:1034100084F800A032E712202070E8E11128BCD126 +:10342000204600F026FF042802D1E078C00719D01A +:10343000204600F01EFF062805D1E078C00711D114 +:10344000A07D02280ED0204608E0CBE084E070E1A9 +:103450004FE122E102E1E8E019E0AEE100F009FF0E +:1034600011289AD1102208F1010104F13C0012F058 +:1034700085F8607801286ED012202070E078C007AF +:1034800060D0A07D0028C8D00128C6D05AE01128FD +:1034900090D1204600F0EDFE082804D0204600F030 +:1034A000E8FE132886D104F16C00102208F1010116 +:1034B000064612F063F8207808280DD014202070FA +:1034C000E178C8070DD0A07D02280AD06278022AD0 +:1034D00004D00328A1D035E00920F0E708B1012885 +:1034E00037D1C80713D0A07D02281DD0002000903E +:1034F000D4E9062133460EA8FFF777FC10220EA967 +:1035000004F13C0012F00EF8C8B1042042E7D4E9FF +:103510000912201D8DE8070004F12C0332460EA885 +:10352000616BFFF770FDE9E7606BC1F34401491E71 +:103530000068C84000F0010040F08000D7E7207824 +:10354000092806D185F800908DF8209032E3287084 +:10355000EBE30920FBE79CE1112899D1204600F01C +:1035600088FE0A2802D1E078C00704D1204600F086 +:1035700080FE15288CD104F13C00102208F10101D5 +:10358000064611F0FBFF20780A2816D0162020707E +:10359000D4E90932606B611D8DE80F0004F15C0312 +:1035A00004F16C0247310EA8FFF7C2FC10220EA9ED +:1035B000304611F0B7FF18B1F6E20B20207071E22F +:1035C0002046FFF7D7FDA078216A0A18C0F1100144 +:1035D000104612F052F823E3394608A8FFF7A6FD7B +:1035E00006463BE20228B8D1204600F042FE0428FD +:1035F00004D3204600F03DFE082809D3204600F001 +:1036000038FE0E2829D3204600F033FE122824D29B +:10361000A07D0228A1D10E208DF82000686A0D90AF +:1036200098F801008DF82400F0E3022895D1204697 +:1036300000F01FFE002810D0204600F01AFE0128DE +:10364000F9D0204600F015FE0C28F4D004208DF8A7 +:10365000240098F801008DF825005EE21128FCD1C5 +:10366000002CFAD020781728F7D16178606A0229F7 +:1036700011D0002101EB4101182606EBC1011022F7 +:10368000405808F1010111F079FF0420696A00F047 +:10369000E3FD2670F2E50121ECE70B28DDD1002CDB +:1036A000DBD020781828D8D16078616A02281CD035 +:1036B0005FF0000000EB4002102000EBC200095850 +:1036C000B8F8010008806078616A02280FD00020F5 +:1036D00000EB4002142000EBC2000958404650F8AD +:1036E000032F0A604068486039E00120E2E70120CA +:1036F000EEE71128B1D1002CAFD020781928ACD139 +:103700006178606A022912D05FF0000101EB41018B +:103710001C2202EBC1011022405808F1010111F0F6 +:103720002DFF0420696A00F097FD1A20B6E0012100 +:10373000ECE7082891D1002C8FD020781A288CD162 +:10374000606A98F80120017862F347010170616AAC +:10375000D8F8022041F8012FB8F80600888004202C +:10376000696A00F079FD8EE2072013E638780128B7 +:1037700094D1182204F11400796811F044FFE07923 +:10378000C10894F82F0001EAD001E07861F300004D +:10379000E070217D002974D12178032909D0C00768 +:1037A00025D0032028708DF82090686A0D90412064 +:1037B00004E3607DA178884201D90620EAE502266B +:1037C0002671E179204621F0E001E171617A21F072 +:1037D000F0016172A17A21F0F001A172FFF7CAFC39 +:1037E0002E708DF82090686A0D900720E6E2042084 +:1037F000ADE6387805289DD18DF82000686A0D90D7 +:10380000B8680A900720ADF824000A988DF830B007 +:103810006168016021898180A17A81710420207012 +:10382000F4E23978052985D18DF82010696A0D9167 +:10383000391D09AE0EC986E80E004121ADF82410ED +:103840008DF830B01070A88CD7F80C8080B240266C +:10385000A769FFF713FA41463A463346C846CDF802 +:103860000090FEF720FE002108A8FFF75FFCE0783B +:1038700020F03E00801CE0702078052802D00F2048 +:103880000CE049E1A07D20B1012802D0032802D03C +:1038900002E10720C0E584F80080EFE42070EDE449 +:1038A000102104F15C0002F0E8FA606BB0BBA07D6F +:1038B00018B1012801D00520FDE006202870F74846 +:1038C0006063A063BEE23878022894D1387908B1E9 +:1038D0002875B3E3A07D022802D0032805D022E09A +:1038E000B8680028F5D060631CE06078012806D035 +:1038F000A07994F82E10012805D0E84806E0A179B7 +:1039000094F82E00F7E7B8680028E2D06063E0780A +:10391000C00701D0012902D0E04803E003E0F868C5 +:103920000028D6D0A063062011E68DF82090696AA1 +:103930000D91E1784846C90709D06178022903D181 +:10394000A17D29B1012903D0A17D032900D0072041 +:10395000287031E138780528BBD1207807281ED09F +:1039600084F800A005208DF82000686A0D90B868E2 +:103970000A90ADF824A08DF830B003210170E178F1 +:10398000CA070FD0A27D022A1AD000210091D4E9E3 +:10399000061204F15C03401CFFF727FA67E384F882 +:1039A0000090DFE7D4E90923211D8DE80E0004F122 +:1039B0002C0304F15C02401C616BFFF724FB56E30F +:1039C000626BC1F34401491E1268CA4002F0010152 +:1039D00041F08001DAE738780528BDD18DF8200064 +:1039E000686A0D90B8680A90ADF824A08DF830B0E0 +:1039F000042100F8011B102204F15C0111F0BEFD4E +:103A0000002108A8FFF792FB2078092801D0132095 +:103A100044E70A2020709CE5E078C10742D0A17DF0 +:103A2000012902D0022927D038E0617808A80129AD +:103A300016D004F16C010091D4E9061204F15C0384 +:103A4000001DFFF7BDFA0A20287003268DF820809C +:103A5000686A0D90002108A8FFF768FBDDE2C3E269 +:103A600004F15C010091D4E9062104F16C03001D0E +:103A7000FFF7A6FA0026E9E7C0F3440114290DD2A6 +:103A80004FF0006101EBB0104FEAB060E070607879 +:103A9000012801D01020BFE40620FFE6607801284D +:103AA0003FF4B8AC0A2052E5E178C90708D0A17DFF +:103AB000012903D10B20287004202FE028702DE06D +:103AC0000E2028706078616B012817D004F15C0328 +:103AD00004F16C020EA8FFF7E3FA2046FFF74AFB59 +:103AE000A0780EAEC0F11001304411F0C6FD0620E2 +:103AF0008DF82000686A09960D909AE004F16C0335 +:103B000004F15C020EA8FFF7CBFAE9E73978022945 +:103B100003D139790029D1D029758FE28DF82000A1 +:103B2000686A0D9058E538780728F6D1D4E909215C +:103B30006078012809D000BF04F16C00CDE90002D3 +:103B4000029105D104F16C0304E004F15C00F5E797 +:103B500004F15C0304F14C007A680646216AFFF721 +:103B600065F96078012821D1A078216A0A18C0F18E +:103B70001001104611F081FDD4E90923606B04F1B6 +:103B80002D018DE80F0004F15C0304F16C02314655 +:103B90000EA800E054E2FFF7CBF910220EA904F1C1 +:103BA0003C0011F0BFFC08B10B20AFE485F80080A9 +:103BB0008DF82090686A0D908DF824A00CE5387877 +:103BC0000528AAD18DF82000686A0D90B8680A907F +:103BD000ADF824A08DF830B080F80080617801291C +:103BE0001AD0D4E9093204F12D01A66B0392009694 +:103BF000CDE9011304F16C0304F15C0204F14C0102 +:103C0000401CFFF795F9002108A8FFF78FFA6078AC +:103C1000012805D0152041E6D4E90923611DE4E718 +:103C20000E20287006208DF82000686ACDF824B098 +:103C30000D90A0788DF82800CEE438780328C0D104 +:103C4000E079C00770D00F202870072066E7387829 +:103C500004286BD11422391D04F1140011F0D3FC97 +:103C6000616A208CA1F80900616AA078C871E179C5 +:103C7000626A01F003011172616A627A0A73616A11 +:103C8000A07A81F82400162061E485F800A08DF860 +:103C90002090696A50460D9190E000009C5B020004 +:103CA0003878052842D1B868A8616178606A02292D +:103CB00001D0012100E0002101EB4101142606EBB7 +:103CC000C1014058082102F0D8F86178606A0229E1 +:103CD00001D0012100E0002101EB410106EBC1010F +:103CE000425802A8E169FFF70FFA6078626A022879 +:103CF00001D0012000E0002000EB4001102000EB8B +:103D0000C1000223105802A90932FEF7F3FF626ACC +:103D1000FD4B0EA80932A169FFF7E5F96178606AE9 +:103D2000022904D0012103E042E18BE0BDE0002143 +:103D300001EB4101182606EBC101A27840580EA9FB +:103D400011F01CFC6178606A022901D0012100E0B9 +:103D5000002101EB410106EBC1014058A178084464 +:103D6000C1F1100111F089FC05208DF82000686A6E +:103D70000D90A8690A90ADF824A08DF830B0062106 +:103D800001706278616A022A01D0012200E00022FB +:103D900002EB420206EBC202401C8958102211F0CD +:103DA000EDFB002108A8FFF7C1F91220C5F818B0F3 +:103DB00028708DF82090686A0D900B208DF82400F3 +:103DC0000AE43878052870D18DF82000686A0D90D3 +:103DD000B8680A900B20ADF824000A9807210170FA +:103DE0006178626A022901D0012100E0002101EB23 +:103DF0004103102101EBC30151580988A0F80110BB +:103E00006178626A022902D0012101E02FE10021DC +:103E100001EB4103142101EBC30151580A6840F83A +:103E2000032F4968416059E01920287001208DF85E +:103E3000300077E6162028708DF830B0002108A8F1 +:103E4000FFF774F9032617E114202870B0E63878DC +:103E500005282AD18DF82000686A0D90B8680A906C +:103E6000ADF824A08DF830B080F800906278616AD7 +:103E70004E46022A01D0012200E0002202EB42025B +:103E80001C2303EBC202401C8958102211F076FB60 +:103E9000002108A8FFF74AF9152028708DF8206046 +:103EA000686A0D908DF824603CE680E0387805283B +:103EB0007DD18DF82000686A0D90B8680A90ADF841 +:103EC000249009210170616909784908417061698C +:103ED00051F8012FC0F802208988C18020781C2861 +:103EE000A8D1A1E7E078C00702D04FF0060C01E0AE +:103EF0004FF0070C607802280AD000BF4FF0000096 +:103F000000EB040101F1090105D04FF0010004E0CC +:103F10004FF00100F4E74FF000000B78204413EA63 +:103F20000C030B7010F8092F02EA0C02027004D186 +:103F30004FF01B0C84F800C0D2B394F801C0BCF160 +:103F4000010F00D09BB990F800C0E0465FEACC7C3E +:103F500004D028F001060670102606E05FEA887C8F +:103F600005D528F00206067013262E70032694F855 +:103F700001C0BCF1020F00D092B991F800C05FEA15 +:103F8000CC7804D02CF001060E70172106E05FEA11 +:103F90008C7805D52CF002060E70192121700026B0 +:103FA0000078D0BBCAB3C3BB1C20207035E012E040 +:103FB00002E03878062841D11A2019E42078012837 +:103FC0003CD00C283AD02046FFF7F1F809208DF8B4 +:103FD0002000686A0D9031E03878052805D0062069 +:103FE000387003261820287046E005218DF820102F +:103FF000686A0D90B8680A900220ADF8240001208C +:104000008DF830000A980170297D4170394608A862 +:10401000FFF78CF8064618202870012E0ED02BE0F2 +:1040200001208DF82000686A0D9003208DF824008F +:10403000287D8DF8250085F814B012E0287D80B128 +:104040001D202070172028708DF82090686A0D9030 +:1040500002208DF82400394608A8FFF767F80646C5 +:104060000AE00CB1FE2020709DF8200020B1002154 +:1040700008A8FFF75BF810E413B03046BDE8F08FF6 +:104080002DE9F04387B00C464E6900218DF80410ED +:1040900001202578034602274FF007094FF0050C51 +:1040A00085B1012D53D0022D39D1FE2030708DF80D +:1040B0000030606A059003208DF80400207E8DF8A2 +:1040C000050063E02179012925D002292DD003299B +:1040D00028D0042923D1B17D022920D131780D1FA8 +:1040E000042D04D30A3D032D01D31D2917D12189A5 +:1040F000022914D38DF80470237020899DF80410D0 +:1041000088421BD2082001E0945B02008DF8000079 +:10411000606A059057E070780128EBD0052007B061 +:10412000BDE8F0831D203070E4E771780229F5D1F5 +:1041300031780C29F3D18DF80490DDE7083402F8CA +:1041400004CB94E80B0082E80B000320E7E7157826 +:10415000052DE4D18DF800C0656A05959568029536 +:104160008DF8101094F80480B8F1010F13D0B8F155 +:10417000020F2DD0B8F1030F1CD0B8F1040FCED12F +:10418000ADF804700E202870207E6870002168460B +:10419000FEF7CCFF0CE0ADF804700B202870207EF9 +:1041A000002100F01F0068706846FEF7BFFF3770FF +:1041B0000020B4E7ADF804708DF8103085F800C029 +:1041C000207E6870277011466846FEF7AFFFA6E7AD +:1041D000ADF804902B70207F6870607F00F00100C4 +:1041E000A870A07F00F01F00E870E27F2A71C0076E +:1041F0001CD094F8200000F00700687194F82100AA +:1042000000F00700A87100216846FEF78FFF2868BC +:10421000F062A8883086A87986F83200A0694078D4 +:1042200070752879B0700D203070C1E7A97169717F +:10423000E9E700B587B004280CD101208DF8000013 +:104240008DF80400002005918DF8050001466846B0 +:10425000FEF76CFF07B000BD70B50C46054602F0D6 +:10426000EBF821462846BDE870407823002202F092 +:1042700039B808B1007870470C20704770B50C0051 +:1042800005784FF000010CD021702146F0F7D9FFDE +:1042900069482178405D884201D1032070BD022029 +:1042A00070BDF0F7CEFF002070BD0279012A05D065 +:1042B00000220A704B78012B02D003E004207047E3 +:1042C0000A758A6102799300521C0271C150032061 +:1042D0007047F0B587B00F4605460124287905EBF5 +:1042E000800050F8046C7078411E02290AD25249AD +:1042F0003A46083901EB8000314650F8043C284624 +:10430000984704460CB1012C11D12879401E10F0B9 +:10431000FF00287101D00324E0E70A208DF8000097 +:10432000706A0590002101966846FFF7A7FF032CED +:10433000D4D007B02046F0BD70B515460A460446F5 +:1043400029461046FFF7C5FF064674B12078FE28BF +:104350000BD1207C30B100202870294604F10C00DC +:10436000FFF7B7FF2046FEF722FF304670BD7047CB +:1043700070B50E4604467C2111F0A1F90225012EEC +:1043800003D0022E04D0052070BD0120607000E033 +:1043900065702046FEF70BFFA575002070BD28B1A3 +:1043A000027C1AB10A4600F10C01C5E701207047F2 +:1043B00010B5044686B0042002F03EF82078FE28AE +:1043C00006D000208DF8000069462046FFF7E7FF81 +:1043D00006B010BD7CB50E4600218DF80410417862 +:1043E000012903D0022903D0002405E0046900E07C +:1043F00044690CB1217C89B16D4601462846FFF71E +:1044000054FF032809D1324629462046FFF794FF7E +:104410009DF80410002900D004207CBD04F10C0597 +:10442000EBE730B40C460146034A204630BC034B50 +:104430000C3AFEF758BE0000D85B0200945B020005 +:1044400070B50D46040011D085B12101284611F048 +:1044500014F910225449284611F090F852480121CD +:104460000838018044804560002070BD012070BD87 +:1044700070B54D4E00240546083E10E07068AA7BDA +:1044800000EB0410817B914208D1C17BEA7B914211 +:1044900004D10C22294611F045F830B1641C308853 +:1044A0008442EBDB4FF0FF3070BD204670BD70B52D +:1044B0000D46060006D02DB1FFF7DAFF002803DB1A +:1044C000401C14E0102070BD374C083C20886288E6 +:1044D000411C914201D9042070BD6168102201EB9A +:1044E0000010314611F04AF82088401C20802870C6 +:1044F000002070BD2C480838008870472A490839C8 +:104500000888012802D0401E08800020704770B53E +:1045100014460D0018D0BCB10021A170022802D0B1 +:10452000102811D105E0288870B10121A1701080F8 +:1045300008E02846FFF79CFF002805DB401CA07020 +:10454000A8892080002070BD012070BD70B505468F +:1045500014460E000BD000203070A878012808D037 +:1045600005D91149A1F108010A8890420AD9012010 +:1045700070BD24B1287820702888000A507002206D +:1045800008700FE064B14968102201EB0011204669 +:10459000103910F0F3FF287820732888000A607320 +:1045A00010203070002070BD8C0000202DE9F041FB +:1045B00090460C4607460025FE48072F00EB88165C +:1045C00007D2DFE807F00707070704040400012506 +:1045D00000E0FFDF06F81470002D13D0F54880309E +:1045E00000EB880191F82700202803D006EB40005B +:1045F000447001E081F8264006EB44022020507010 +:1046000081F82740BDE8F081F0B51F4614460E46FC +:104610000546202A00D1FFDFE649E648803100EB5D +:10462000871C0CEB440001EB8702202E07D00CEB1B +:10463000460140784B784870184620210AE092F8ED +:104640002530407882F82500F6E701460CEB410062 +:1046500005704078A142F8D192F82740202C03D071 +:104660000CEB4404637001E082F826300CEB41044B +:104670002023637082F82710F0BD30B50D46CE4B75 +:1046800044190022181A72EB020100D2FFDFCB4856 +:10469000854200DDFFDFC9484042854200DAFFDF86 +:1046A000C548401C844207DA002C01DB204630BD9F +:1046B000C148401C201830BDBF48C043FAE710B5C0 +:1046C00004460168407ABE4A52F82020114450B195 +:1046D0000220084420F07F40EEF7AFFA94F908106A +:1046E000BDE81040C9E70420F3E72DE9F047B14EDB +:1046F000803696F82D50DFF8BC9206EB850090F8D6 +:10470000264034E009EB85174FF0070817F814002E +:10471000012806D004282ED005282ED0062800D047 +:10472000FFDF01F00AF9014607EB4400427806EB8F +:10473000850080F8262090F82720A24202D120226E +:1047400080F82720084601F003F92A462146012077 +:10475000FFF72CFF9B48414600EB041002682046FF +:10476000904796F82D5006EB850090F82640202CB7 +:10477000C8D1BDE8F087022000E003208046D0E7E2 +:1047800010B58C4C2021803484F8251084F8261034 +:1047900084F82710002084F8280084F82D0084F87D +:1047A0002E10411EA16044F8100B20746074207319 +:1047B0006073A0738449E077207508704870002109 +:1047C0007C4A103C02F81100491CC9B22029F9D3D7 +:1047D0000120EEF722F90020EEF71FF9012084F8FE +:1047E0002200EEF765FB7948EEF777FB764CA41EC6 +:1047F00020707748EEF771FB6070BDE81040EEF76F +:1048000099B810B5EEF7BBF86F4CA41E2078EEF700 +:104810007DFB6078EEF77AFBBDE8104001F0C5B88B +:10482000202070472DE9F34F624C0025803404EBC3 +:10483000810A89B09AF82500202821D0691E0291AA +:104840006049009501EB0017391D03AB07C983E8E8 +:104850000700A18BADF81C10A07F8DF81E009DF8FD +:104860001500A046C8B10226554951F820400399C9 +:10487000A219114421F07F41019184B102210FE07E +:104880000120EEF7CAF80020EEF7C7F8EEF795F82A +:1048900001F08BF884F82F50A7E00426E4E700210C +:1048A0008DF81810022801D0012820D10398011991 +:1048B0000998081A801C9DF81C1020F07F4001B157 +:1048C0000221353181420BD203208DF81500039867 +:1048D000C4F13201401A20F07F40322403900CE0F2 +:1048E00098F8240018B901F0F8F900284DD0322CBE +:1048F00003D214B101F04DF801E001F056F8324A4C +:10490000107820B393465278039B121B00219DF828 +:104910001840994601281BD0032819D05FF00000E9 +:104920008DF81E00002A04DD981A039001208DF8EE +:1049300018009DF81C0000B102210398254A20F0C0 +:104940007F40039003AB099801F03BF810B110E0F1 +:104950000120E5E79DF81D0018B99BF80000032829 +:1049600012D08DF81C50CDF80C908DF818408DF8B1 +:104970001E509DF8180058B1039801238119002298 +:104980001846EEF79DF806E000200BB0BDE8F08F6A +:104990000120EEF742F897F90C200123002001993D +:1049A000EEF78EF8F87BC00701D0EEF772F901211F +:1049B00012E00000500A0020FF7F841E0020A107A3 +:1049C000E85B0200500800209E0000209361010077 +:1049D000EB460100FFFF3F0088F82F108AF82850AF +:1049E00020226946F74810F00EFE0120CDE72DE9A0 +:1049F000F05FDFF8D083064608EB860090F825507C +:104A0000202D1FD0A8F180002C4600EB8617A0F5C2 +:104A10000079DFF8B4B305E0A24607EB4A0044781A +:104A2000202C0AD0EEF797F809EB04135A4601211F +:104A30001B1D00F0C6FF0028EED0AC4202D033466A +:104A400052461EE0E14808B1AFF30080EEF783F86C +:104A500098F82F206AB1D8F80C20411C891A090255 +:104A6000CA1701EB12610912002902DD0020BDE81E +:104A7000F09F3146FFF7D6FE08B10120F7E7334635 +:104A80002A4620210420FFF7BFFDEFE72DE9F04182 +:104A9000CC4C2569EEF75FF8401B0002C11700EB14 +:104AA0001160001200D4FFDF94F8220000B1FFDF94 +:104AB000012784F8227094F82E00202800D1FFDF0F +:104AC00094F82E60202084F82E00002584F82F50C2 +:104AD00084F8205084F82150BD48256000780228D1 +:104AE00033D0032831D000202077A068401C05D0A7 +:104AF0004FF0FF30A0600120EDF78FFF0020EDF7B1 +:104B00008CFFEEF788F8EEF780F8EDF756FF0FF020 +:104B100085FFB048056005604FF0E0214FF400408C +:104B2000B846C1F88002EEF722F994F82D703846A5 +:104B3000FFF75DFF0028FAD0A248803800EB87100D +:104B400010F81600022802D006E00120CCE73A4611 +:104B500031460620FFF72AFD84F8238004EB870006 +:104B600090F82600202804D09948801E4078EEF75F +:104B7000D3F9207F002803D0EEF73DF8257765773D +:104B800040E5904910B591F82D200024803901EBC3 +:104B9000821100BF11F814302BB1641CE4B2202C38 +:104BA000F8D3202010BD8C4901EB041108600020CF +:104BB000C87321460120FFF7F9FC204610BD10B54F +:104BC000012801D0032800D171B37E4A92F82D301C +:104BD0007C4C0022803C04EB831300BF13F812408E +:104BE0000CB1082010BD521CD2B2202AF6D3784A4C +:104BF00048B1022807D0072916D2DFE801F01506D0 +:104C0000080A0C0E100000210AE01B2108E03A21DE +:104C100006E0582104E0772102E0962100E0B5216A +:104C200051701070002010BD072010BD684810B5ED +:104C30004078EEF702F880B210BD10B5202811D2EE +:104C4000604991F82D30A1F1800202EB831414F831 +:104C500010303BB191F82D3002EB831212F8102086 +:104C6000012A01D0002010BD91F82D20014600201E +:104C7000FFF79CFC012010BD10B5EDF76CFFBDE8FF +:104C80001040EDF7DABF2DE9F0410E464D4F0178A7 +:104C90002025803F0C4607EB831303E0254603EBFA +:104CA00045046478944202D0202CF7D108E0202CEF +:104CB00006D0A14206D103EB41014978017007E01B +:104CC00000209FE403EB440003EB4501407848706B +:104CD000424F7EB127B1002140F2DD30AFF30080BA +:104CE0003078A04206D127B100214FF47870AFF39D +:104CF0000080357027B1002140F2E530AFF300802D +:104D000001207FE410B542680B689A1A1202D4178A +:104D100002EB1462121216D4497A91B1427A82B926 +:104D20002F4A006852F82110126819441044001DDF +:104D3000891C081A0002C11700EB1160001232280A +:104D400001DB012010BD002010BD2DE9F047814698 +:104D50001C48214E00EB8100984690F82540202009 +:104D6000107006F50070154600EB81170BE000BFD0 +:104D700006EB04104946001DFFF7C4FF28B107EBFE +:104D800044002C704478202CF2D1297888F8001047 +:104D900013E000BF06EB0415291D4846FFF7B2FFDC +:104DA00068B988F80040A97B99F80A00814201D8C7 +:104DB0000020DEE407EB44004478202CEAD10120F7 +:104DC000D7E40000D00A0020FFFF3F0000000000F1 +:104DD0009E00002000F50040500800200000000068 +:104DE000E85B02002DE9FC410E4607460024FE4D1B +:104DF00009E000BF9DF8000005EB0010816838460F +:104E000000F0F3FD01246B4601AA31463846FFF756 +:104E10009CFF0028EED02046BDE8FC8170B504461A +:104E2000F2480125A54300EB841100EB85104022D8 +:104E300010F0A4FBEE4E26B1002140F25F40AFF32C +:104E40000080EA48803000EB850100EB8400D0F858 +:104E50002500C1F8250026B1002140F26340AFF3E0 +:104E60000080284670BD2DE9FC418446DF48154688 +:104E7000089C00EB85170E4617F81400012803D094 +:104E8000022801D00020C7E70B46DA4A012160461C +:104E900000F097FDA8B101AB6A4629463046FFF7FE +:104EA00054FF70B1D1489DF804209DF80010803067 +:104EB00000EB85068A4208D02B460520FFF7A4FBAD +:104EC0000BE02A462146042014E0202903D007EBFA +:104ED0004100407801E096F8250007EB4401487056 +:104EE0009DF80000202809D007EB400044702A46B6 +:104EF00021460320FFF75AFB01208DE706F8254FD6 +:104F00000120F070F3E7B84901EB0010001DFFF736 +:104F1000D6BB7CB51D46134604460E4600F108027A +:104F200021461846EDF796FE94F908000F2804DD97 +:104F30001F3820722068401C206096B10220AE49C4 +:104F400051F82610461820686946801B20F07F40E3 +:104F5000206094F908002844C01C1F2803DA0120AF +:104F600009E00420EBE701AAEDF774FE9DF80400C8 +:104F700010B10098401C009000992068314408440A +:104F8000C01C20F07F4060607CBD2DE9FE430C46D4 +:104F900006460978607990722079984615465072D5 +:104FA00041B19248803090F82E1020290AD0006933 +:104FB000401D0BE0D4E90223217903B02846BDE867 +:104FC000F043A6E78D484178701D084420F07F47E4 +:104FD000217900222846A368FFF79BFF394628461F +:104FE00000F003FDD4E9023221796846FFF791FF12 +:104FF00041462846019CFFF7F5FE2B46224600213C +:10500000304600F0DEFC002803D13146284600F08F +:10501000ECFCBDE8FE832DE9FE4F814600F0A1FCCB +:1050200030B1002799F8000020B10020BDE8FE8FC4 +:105030000127F7E76D4D6E4C4FF0000A803524B123 +:10504000002140F2D640AFF3008095F82D8085F81E +:1050500023A0002624B1002140F2DB40AFF3008002 +:105060001FB94046FFF7DAFE804624B1002140F226 +:10507000E340AFF30080EDF76EFD43466A464946D4 +:10508000FFF783FF24B1002140F2E940AFF3008035 +:1050900095F82E0020280CD029690098401A0002AB +:1050A000C21700EB1260001203D5684600F09DFCA9 +:1050B000012624B1002140F2F340AFF3008095F8BF +:1050C00023000028BBD124B1002140F2F940AFF306 +:1050D0000080EDF740FD6B46464A002100F071FC70 +:1050E0000028A3D027B941466846FFF77BFE064358 +:1050F00026B16846FFF7E3FAC9F8080024B1002199 +:1051000040F20C50AFF3008001208FE72DE9F04F03 +:1051100089B08B46824600F024FC344C803428B39E +:105120009BF80000002710B1012800D0FFDF304DB0 +:1051300025B1002140F28250AFF300802A490120BE +:1051400001EB0A18A94607905FEA090604D000217E +:1051500040F28A50AFF30080079800F0F9FB94F812 +:105160002D50002084F8230067B119E094F82E0038 +:105170000127202800D1FFDF9BF800000028D6D0AF +:10518000FFDFD4E72846FFF749FE054626B1002198 +:1051900040F29450AFF3008094F823000028D3D15C +:1051A00026B1002140F29E50AFF30080EDF7D3FC12 +:1051B0002B4602AA59460790FFF7E7FE98F80F0022 +:1051C0005FEA060900F001008DF8130004D0002109 +:1051D0004FF4B560AFF300803B462A4602A9CDF8F4 +:1051E00000A007980CE0000050080020500A0020A2 +:1051F00000000000FFFF3F00E85B02009E0000206F +:10520000FFF731FE064604EB850090F82800009079 +:10521000B9F1000F04D0002140F2AF50AFF300808D +:1052200000F08BFB0790B9F1000F04D0002140F291 +:10523000B550AFF3008094F82300002884D1B9F171 +:10524000000F04D0002140F2BD50AFF300800DF1FB +:10525000080C9CE80E00C8E90112C8F80C304EB3E7 +:105260005FEA090604D0002140F2CA50AFF3008083 +:105270000098B84312D094F82E0020280ED126B101 +:10528000002140F2CF50AFF300802846FFF7AFFB7C +:1052900020B99BF80000D8B3012849D0B9F1000F1C +:1052A00004D0002140F2EC50AFF30080284600F01B +:1052B0003DFB01265FEA090504D0002140F2F550CC +:1052C000AFF30080079800F043FB25B1002140F2C6 +:1052D000F950AFF300808EB194F82D0004EB8000FC +:1052E00090F82600202809D025B100214FF4C06095 +:1052F000AFF30080F9484078EDF70EFE25B10021AC +:1053000040F20560AFF3008009B03046BDE8F08F91 +:10531000FFE7B9F1000F04D0002140F2D750AFF3FE +:10532000008094F82D2051460420FFF73FF9C0E794 +:10533000002E3FF409AF002140F2E250AFF30080AD +:1053400002E72DE9F84FE64D814695F82D004FF024 +:105350000008E44C4FF0010B474624B1002140F215 +:105360001360AFF30080584600F0F2FA85F823701E +:1053700024B100214FF4C360AFF3008095F82D00F5 +:10538000FFF74CFD064695F8230028B1002CE4D029 +:10539000002140F21E604BE024B1002140F2226067 +:1053A000AFF30080CE48803800EB861111F8190069 +:1053B000032856D1334605EB830A4A469AF825005E +:1053C000904201D1012000E0002000900AF1250068 +:1053D0000021FFF758FC01460098014203D001224A +:1053E0008AF82820AF77E1B324B1002140F227608A +:1053F000AFF30080324649460120FFF7D7F89AF80C +:1054000028A024B1002140F23260AFF3008000F008 +:1054100094FA834624B1002140F23760AFF3008054 +:1054200095F8230038B1002C97D0002140F23B6062 +:10543000AFF3008091E7BAF1000F07D095F82E0086 +:10544000202803D13046FFF7D2FAE0B124B1002181 +:1054500040F24F60AFF30080304600F067FA4FF043 +:10546000010824B100214FF4CB60AFF3008058460F +:1054700000F06EFA24B1002140F25C60AFF30080CE +:105480004046BDE8F88F002CF1D0002140F24A6080 +:10549000AFF30080E6E70020EDF798BA0120EDF7C2 +:1054A00095BA8E48007870472DE9F0418C4C94F8FD +:1054B0002E0020281FD194F82D6004EB860797F862 +:1054C0002550202D00D1FFDF8549803901EB861062 +:1054D00000EB4500407807F8250F0120F87084F8AC +:1054E0002300294684F82E50324602202234FFF74A +:1054F0005DF80020207004E42DE9F0417A4E784CEC +:10550000012538B1012821D0022879D003287DD087 +:10551000FFDFF0E700F03DFAFFF7C6FF207E00B1A5 +:10552000FFDF84F821500020EDF777FAA168481CCE +:1055300004D0012300221846EDF7C2FA14F82E0F0A +:10554000217806EB01110A68012154E0FFF7ACFF56 +:105550000120EDF762FA94F8210050B1A068401CD8 +:1055600007D014F82E0F217806EB01110A680621E6 +:1055700041E0207EDFF86481002708F1020801285D +:1055800003D002281ED0FFDFB5E7A777EDF733FB86 +:1055900098F80000032801D165772577607D53498D +:1055A00051F8200094F8201051B948B161680123E6 +:1055B000091A00221846EDF783FA022020769AE7AE +:1055C000277698E784F8205000F0E3F9A07F50B1E7 +:1055D00098F8010061680123091A00221846EDF7C6 +:1055E0006FFA257600E0277614F82E0F217806EB67 +:1055F00001110A680021BDE8F041104700E005E014 +:1056000036480078BDE8F041EDF786BCFFF74CFF67 +:1056100014F82E0F217806EB01110A680521EAE73C +:1056200010B52F4C94F82E00202800D1FFDF14F87D +:105630002E0F21782C4A02EB01110A68BDE81040B8 +:10564000042110477CB5264C054694F82E002028EE +:1056500000D1FFDFA068401C00D0FFDF94F82E00CF +:10566000214901AA01EB0010694690F90C00284479 +:10567000EDF7F0FA9DF904000F2801DD012000E0AC +:105680000020009908446168084420F07F41A1602F +:1056900094F82100002807D002B00123BDE8704033 +:1056A00000221846EDF70CBA7CBD30B5104A0B1A33 +:1056B000541CB3EB940F1FD3451AB5EB940F1BD3B7 +:1056C000934203D9101A43185B1C15E0954211D977 +:1056D000511A0844401C43420EE000009C00002088 +:1056E000D00A00200000000050080020E85B020003 +:1056F000FF7F841EFFDF0023184630BD01230022F8 +:1057000001460220EDF7DCB90220EDF786B9EDF78E +:1057100022BA2DE9FC47BA4C054694F82E00202801 +:1057200000D1FFDF642D58D3B64A0021521B71EB24 +:10573000010052D394F82E20A0462046DFF8C892EC +:1057400090F82D7009EB0214D8F8000001AA284443 +:105750006946EDF77FFA9DF90400002802DD009804 +:10576000401C0090A068009962684618B21A22F0A6 +:105770007F42B2F5800F30D208EB8702444692F8A0 +:105780002520202A0AD009EB02125268101A0002C2 +:10579000C21700EB1260001288421EDBA068401C9A +:1057A00010D0EDF7D8F9A168081A0002C11700EB74 +:1057B00011600012022810DD0120EDF72EF94FF0E4 +:1057C000FF30A06020682844206026F07F402061E0 +:1057D000012084F82300BDE8FC870020FBE72DE9C9 +:1057E000F047874C074694F82D00A4F1800606EB9D +:1057F000801010F8170000B9FFDF94F82D50A04674 +:10580000824C24B100214FF40760AFF3008040F6D2 +:105810007C0940F6850A06EB851600BF16F81700CE +:10582000012818D0042810D005280ED006280CD046 +:105830001CB100214846AFF3008020BF002CEDD002 +:1058400000215046AFF30080E8E72A4639460120A0 +:10585000FEF7ACFEF2E74FF0010A4FF000094546B3 +:1058600024B1002140F68C00AFF30080504600F0D8 +:105870006FF885F8239024B1002140F69100AFF332 +:10588000008095F82D00FFF7C9FA064695F8230029 +:1058900028B1002CE4D0002140F697001FE024B18D +:1058A000002140F69B00AFF3008005EB860000F17D +:1058B000270133463A462630FFF7E5F924B10021A7 +:1058C00040F69F00AFF3008000F037F8824695F86D +:1058D000230038B1002CC3D0002140F6A500AFF35F +:1058E0000080BDE785F82D60012085F82300504633 +:1058F00000F02EF8002C04D0002140F6B200AFF3E7 +:105900000080BDE8F08730B504463D480D4690F86C +:105910002D003B49803901EB801010F8140000B9CC +:10592000FFDF394800EB0410C57330BD344981F8FE +:105930002D00012081F82300704710B5344808B1CC +:10594000AFF30080EFF3108000F0010072B610BDDD +:1059500010B5002804D12F4808B1AFF3008062B61B +:1059600010BD2D480068C005C00D10D0103840B2E1 +:10597000002804DB00F1E02090F8000405E000F0CE +:105980000F0000F1E02090F8140D40097047082046 +:10599000704710B51A4C94F82400002804D1F6F78B +:1059A0005FF8012084F8240010BD10B5144C94F861 +:1059B0002400002804D0F6F77CF8002084F82400A6 +:1059C00010BD10B51C685B68241A181A24F07F44B7 +:1059D00020F07F40A14206D8B4F5800F03D2904258 +:1059E00001D8012010BD002010BDD0E90032D21A2C +:1059F00021F07F43114421F07F41C0E9003170471D +:105A0000D00A0020FF1FA10750080020000000005E +:105A1000000000000000000004ED00E02DE9F0416E +:105A2000044680074FF000054FF001060CD56B4887 +:105A3000056006600EF01BFE20B16948016841F464 +:105A40008061016024F00204E0044FF0FF3705D5C7 +:105A500064484660C0F8087324F48054600003D59D +:105A60006148056024F08044E0050FD55F48C0F828 +:105A70000052C0F808735E490D60091D0D605C4A54 +:105A800004210C321160066124F48074A00409D54D +:105A900058484660C0F80052C0F808735648056080 +:105AA00024F40054C4F38030C4F3C031884200D0E1 +:105AB000FFDF14F4404F14D050484660C0F808731C +:105AC0004F488660C0F80052C0F808734D490D6019 +:105AD0000A1D16608660C0F808730D60166024F415 +:105AE000404420050AD5484846608660C0F80873DF +:105AF000C0F848734548056024F400640EF068FF60 +:105B00004348044200D0FFDFBDE8F081F0B5002239 +:105B1000202501234FEA020420FA02F1C9072DD003 +:105B200051B2002910DB00BF4FEA51174FEA870737 +:105B300001F01F0607F1E02703FA06F6C7F88061B7 +:105B4000BFF34F8FBFF36F8F0CDB00BF4FEA5117CE +:105B50004FEA870701F01F0607F1E02703FA06F670 +:105B6000C7F8806204DB01F1E02181F8004405E020 +:105B700001F00F0101F1E02181F8144D02F1010261 +:105B8000AA42C9D3F0BD10B5224C20600846F6F7F2 +:105B90007CF82068FFF742FF2068FFF7B7FF0EF0A0 +:105BA000FDFA00F01AF90EF013FF0EF056FEEDF7B5 +:105BB0007FF9BDE810400EF0A1BB10B5154C206870 +:105BC000FFF72CFF2068FFF7A1FF0EF001FFF6F7AB +:105BD0004FF90020206010BD0A207047FC1F0040D4 +:105BE0003C17004000C0004004E501400080004038 +:105BF0000485004000D0004004D5004000E0004093 +:105C000000F0004000F5004000B0004008B5004042 +:105C1000FEFF0FFDA000002070B526490A680AB3F8 +:105C20000022154601244B685B1C4B600C2B00D3F3 +:105C30004D600E7904FA06F30E681E420FD0EFF3A2 +:105C4000108212F0010272B600D001220C689C434F +:105C50000C6002B962B649680160002070BD521C38 +:105C60000C2AE0D3052070BD4FF0E0214FF48000F6 +:105C7000C1F800027047EFF3108111F0010F72B606 +:105C80004FF0010202FA00F20A48036842EA0302F6 +:105C9000026000D162B6E7E706480021016041607A +:105CA00070470121814003480068084000D001206E +:105CB00070470000A40000200120810708607047A1 +:105CC0000121880741600021C0F8001118480170C7 +:105CD000704717490120087070474FF08040D0F896 +:105CE0000001012803D012480078002800D00120CC +:105CF000704710480068C00700D0012070470D4869 +:105D00000C300068C00700D00120704709481430EB +:105D100000687047074910310A68D20306D5096840 +:105D200001F00301814201D101207047002070473A +:105D3000AC000020080400400021017008467047B4 +:105D40000146002008707047EFF3108101F0010157 +:105D500072B60278012A01D0012200E0002201235C +:105D6000037001B962B60AB1002070474FF40050C9 +:105D70007047E9E7EFF3108111F0010F72B64FF0B1 +:105D80000002027000D162B600207047F2E7000006 +:105D90002DE9F04115460E460446002700F0E7F8CD +:105DA000A84215D3002341200FE000BF94F8422001 +:105DB000A25CF25494F84210491CB1FBF0F200FBD3 +:105DC00012115B1C84F84210DBB2AB42EED3012708 +:105DD00000F0D9F83846BDE8F081704910B5802050 +:105DE00081F800046E49002081F8420081F84100EA +:105DF000433181F8420081F84100433181F842008B +:105E000081F841006748FFF797FF6648401CFFF79D +:105E100093FFECF7BBFFBDE8104000F0B4B84020A2 +:105E200070475F4800F0A3B80A4601465C48AFE7F8 +:105E3000402070475A48433000F099B80A4601465E +:105E400057484330A4E7402101700020704710B547 +:105E500004465348863000F08AF82070002010BDB8 +:105E60000A4601464E4810B58630FFF791FF08B14B +:105E7000002010BD42F2070010BD70B50C4605466B +:105E8000412900D9FFDF48480068103840B200F0CF +:105E900050F8C6B20D2000F04CF8C0B2864203D2D2 +:105EA000FFDF01E0ECF7C2FF224629463C48FFF73E +:105EB0006FFF0028F6D070BD2DE9F041394F002565 +:105EC00006463F1D57F82540204600F041F810B324 +:105ED0006D1CEDB2032DF5D33148433000F038F896 +:105EE000002825D02E4800F033F8002820D02C4878 +:105EF000863000F02DF800281AD0ECF76DFF294805 +:105F0000FFF722FFB0F5005F00D0FFDFBDE8F041F2 +:105F10002448FFF72FBF94F841004121265414F87C +:105F2000410F401CB0FBF1F201FB12002070D3E7DF +:105F300051E7002804DB00F1E02090F8000405E0C0 +:105F400000F00F0000F1E02090F8140D40097047B8 +:105F500010F8411F4122491CB1FBF2F302FB13115F +:105F60004078814201D1012070470020704710F82D +:105F7000411F4078814201D3081A02E0C0F141007C +:105F80000844C0B2704710B50648FFF7DDFE002890 +:105F900003D1BDE81040ECF70ABF10BD0DE000E0F2 +:105FA000000B0020B000002004ED00E070B5154D9E +:105FB0002878401CC4B26878844202D0F5F7EFFF1D +:105FC0002C7070BD2DE9F0410E4C4FF0E02600BF63 +:105FD000F5F7DAFF20BF40BF20BF677820786070F8 +:105FE000D6F80052EBF70CFA854305D1D6F8040237 +:105FF00010B92078B842EBD0F5F7C1FF0020BDE81A +:10600000F0810000C00000202DE9F04101252803A7 +:106010004FF0E0210026C1F88001BFF34F8FBFF39E +:106020006F8F1F4CC4F800610C2000F02CF81D4845 +:1060300001680268C94341F3001142F01002026096 +:10604000C4F804532560491C00E020BFD4F80021A7 +:10605000002AFAD019B9016821F010010160124834 +:1060600007686560C4F80853C4F800610C2000F0AC +:106070000AF83846BDE8F08110B50446FFF7C4FFC2 +:106080002060002010BD002809DB00F01F02012164 +:1060900091404009800000F1E020C0F88012704774 +:1060A00000C0004010ED00E008C500402DE9F047B9 +:1060B000FF4C0646FF21A06800EB06121170217804 +:1060C000FF2910D04FF0080909EB011109EB061761 +:1060D0004158C05900F0F4F9002807DDA168207884 +:1060E00001EB061108702670BDE8F08794F8008077 +:1060F00045460DE0A06809EB05114158C05900F074 +:10610000DFF9002806DCA068A84600EB0810057837 +:10611000FF2DEFD1A06800EB061100EB08100D7009 +:106120000670E1E7F0B5E24B0446002001259A68CD +:106130000C269B780CE000BF05EB0017D75DA7424B +:1061400004D106EB0017D7598F4204D0401CC0B2CF +:106150008342F1D8FF20F0BD70B5FFF7D8FAD44CD8 +:1061600008252278A16805EB0212895800F0A8F9E9 +:10617000012808DD2178A06805EB01114058BDE831 +:106180007040FFF7BBBAFFF78CF9BDE87040ECF741 +:10619000C3BE2DE9F041C64C2578FFF7B8FAFF2DB4 +:1061A0006ED04FF00808A26808EB0516915900F070 +:1061B00087F90228A06801DD80595DE000EB051138 +:1061C00009782170022101EB0511425C5AB1521E7F +:1061D0004254815901F5800121F07F4181512846C7 +:1061E000FFF764FF34E00423012203EB051302EB05 +:1061F000051250F803C0875CBCF1000F10D0BCF54D +:10620000007F10D9CCF3080250F806C00CEB423CDA +:106210002CF07F4C40F806C0C3589A1A520A09E085 +:10622000FF2181540AE0825902EB4C3222F07F4276 +:106230008251002242542846FFF738FF0C21A06803 +:1062400001EB05114158E06850F827203846904787 +:106250002078FF2814D0FFF75AFA2278A16808EBBB +:1062600002124546895800F02BF9012893DD217868 +:10627000A06805EB01114058BDE8F041FFF73EBAB8 +:10628000BDE8F081F0B51D4614460E460746FF2BCB +:1062900000D3FFDFA00700D0FFDF8548FF210022E9 +:1062A000C0E90247C57006710170427082701046E5 +:1062B000012204E002EB0013401CE154C0B2A842EA +:1062C000F8D3F0BD70B57A4C0646657820798542E2 +:1062D00000D3FFDFE06840F825606078401C607004 +:1062E000284670BD2DE9FF5F1D468B460746FF24FB +:1062F000FFF70DFADFF8B891064699F80100B842A9 +:1063000000D8FFDF00214FF001084FF00C0A99F888 +:106310000220D9F808000EE008EB0113C35CFF2B44 +:106320000ED0BB4205D10AEB011350F803C0DC4587 +:106330000CD0491CC9B28A42EED8FF2C02D00DE025 +:106340000C46F6E799F803108A4203D1FF2004B007 +:10635000BDE8F09F1446521C89F8022008EB041196 +:106360000AEB0412475440F802B00421029B0022B9 +:10637000012B01EB04110CD040F801204FF4007800 +:1063800008234FF0020C454513D9E905C90D02D089 +:1063900002E04550F2E7414606EB413203EB0413BD +:1063A00022F07F42C250691A0CEB0412490A815450 +:1063B0000BE005B9012506EB453103EB041321F091 +:1063C0007F41C1500CEB0411425499F80050204613 +:1063D000FFF76CFE99F80000A84201D0FFF7BCFE61 +:1063E0003846B4E770B50C460546FFF790F9064607 +:1063F00021462846FFF796FE0446FF281AD02C4D6A +:10640000082101EB0411A8684158304600F058F803 +:1064100000F58050C11700EBD14040130221AA685B +:1064200001EB0411515C09B100EB4120002800DCB4 +:10643000012070BD002070BD2DE9F04788468146DF +:10644000FFF770FE0746FF281BD0194D2E78A8686D +:106450003146344605E0BC4206D0264600EB061223 +:106460001478FF2CF7D10CE0FF2C0AD0A6420CD1F7 +:1064700000EB011000782870FF2804D0FFF76CFEB5 +:1064800003E0002030E6FFF73FF941464846FFF7BA +:10649000A9FF0123A968024603EB0413FF20C85497 +:1064A000A878401EB84200D1A87001EB041001E0AA +:1064B000CC0B002001EB061100780870104613E6A3 +:1064C000081A0002C11700EB1160001270470000AB +:1064D0005E4800210170417010218170704770B5D5 +:1064E000054616460C460220ECF7F2F95749012002 +:1064F00008705749F01E086056480560001F046088 +:1065000070BD10B50220ECF7E3F950490120087086 +:1065100051480021C0F80011C0F80411C0F808115A +:106520004E494FF40000086010BD48480178D9B1C9 +:106530004B4A4FF4000111604749D1F80031002265 +:10654000002B1CBFD1F80431002B02D0D1F8081168 +:1065500019B142704FF0100104E04FF00101417099 +:1065600040490968817002704FF00000ECF7B0B943 +:1065700010B50220ECF7ACF934480122002102707A +:106580003548C0F80011C0F80411C0F808110260C5 +:1065900010BD2E480178002904BF407870472E486E +:1065A000D0F80011002904BF02207047D0F8001174 +:1065B00000291CBFD0F80411002905D0D0F808012B +:1065C000002804BF01207047002070471F4800B515 +:1065D0000278214B4078C821491EC9B282B1D3F854 +:1065E00000C1BCF1000F10D0D3F8000100281CBF7F +:1065F000D3F8040100280BD0D3F8080150B107E00C +:10660000022802D0012805D002E00029E4D1FFDFF2 +:10661000002000BD012000BD0C480178002904BF06 +:10662000807870470C48D0F8001100291CBFD0F8C2 +:106630000411002902D0D0F8080110B14FF0100069 +:10664000704708480068C0B270470000C2000020D0 +:1066500010F5004008F5004000F0004004F501404E +:1066600008F5014000F400405648002101704170D7 +:10667000704770B5064614460D460120ECF728F920 +:1066800051480660001D0460001D05604F49002050 +:10669000C1F850014E49032008604F494D48086039 +:1066A000091D4E48086070BD2DE9F041054645487A +:1066B0000C46012606704A4945EA024040F08070C7 +:1066C00008600DF0AAFF002804BF464804600027B8 +:1066D000454CC4F80471464944480860002D02BF87 +:1066E000C4F800622660BDE8F081012D18BFFFDF0D +:1066F000C4F80072266040493E480860BDE8F08159 +:106700003048017871B13A4A384911603649D1F8B8 +:1067100004210021002A08BF417002D0374A1268C4 +:10672000427001700020ECF7D3B8264801780029A8 +:1067300004BF407870472C48D0F80401002808BFF7 +:1067400070472E480068C0B27047002808BF7047E5 +:1067500030B51C480078002808BFFFDF2248D0F879 +:106760000411002918BF30BD0224C0F80443DFF82B +:1067700090C0DCF80010C1F30015DCF8001041F007 +:106780001001CCF80010D0F80411002904BF4FF418 +:1067900000414FF0E02206D1C2F8801220BFD0F8AD +:1067A0000431002BF8D02DB9DCF8001021F01001D5 +:1067B000CCF80010C0F8084330BD0B4901208860B8 +:1067C00070470000C500002008F5004000100040A0 +:1067D0001CF500405011004098F501400CF00040BD +:1067E00004F5004018F5004000F0004000000203EE +:1067F00008F501400000020204F5014000F40040E9 +:1068000010ED00E010B5FE48002401214470047032 +:1068100044728472C17280F82540C462846380F837 +:106820003C4080F83D40FF2180F83E105F2180F819 +:106830003F1018300FF052F8F249601E0860091D31 +:106840000860091D0C60091D0860091D0C60091D08 +:106850000860091D0860091D0860091D0860091D00 +:106860000860091D0860091D0860091D0860091DF0 +:10687000086010BDE448016801F00F01032904BF5E +:1068800001207047016801F00F01042904BF0220B4 +:106890007047016801F00F01052904D0006800F07D +:1068A0000F00062807D1D948006810F0060F0CBF6A +:1068B00008200420704700B5FFDF012000BD10B59F +:1068C000CF4C0168A1614168E161007A84F8200041 +:1068D000207E48B1207FF7F7C4FCA07E011C18BFC2 +:1068E0000121207FF7F7ACFC607E002808BF10BDB7 +:1068F000607FF7F7B6FCE07E011C18BF0121607FC6 +:10690000BDE81040F7F79CBC30B5002405460129CE +:106910000AD0022908BF4FF0807405D0042916BFA1 +:1069200008294FF0C744FFDF44F4847040F480101E +:10693000B749086045F4403001F1040140F00070AF +:10694000086030BD30B50024054601290AD002296F +:1069500008BF4FF0807405D0042916BF08294FF0F6 +:10696000C744FFDF44F4847040F48010A8490860F5 +:1069700045F4403001F1040140F000700860A54882 +:10698000D0F80001002818BFFFDF30BD2DE9F0412D +:1069900002274FF0E02801250024C8F88071BFF3DA +:1069A0004F8FBFF36F8F9C48046005600DF05FFE52 +:1069B0009A4E18B1306840F4806030600DF02DFEC2 +:1069C00038B1306820F0770040F0880040F0004097 +:1069D00030609449924808604FF01020806CB0F10C +:1069E000FF3F04D090490A6860F317420A608F495C +:1069F00040F25B600860091F40F203100860081F46 +:106A00000560814903200860894805608A4A8949F0 +:106A100011608B4A89491160121F8A49116001680F +:106A200021F440710160016841F480710160C8F88F +:106A3000807278491020C1F80403714880F8314011 +:106A4000C462BDE8F0816E4A0368C2F802308088F3 +:106A5000D080117270476A4B10B51A7A8A4208D1F9 +:106A600001460622981C0EF05DFD002804BF01209F +:106A700010BD002010BD624890F825007047604AA4 +:106A8000517010707047F0B50546800000F18040ED +:106A900000F580508B88C0F820360B78D1F80110B3 +:106AA00043EA0121C0F8001605F10800012707FAA2 +:106AB00000F6654C002A04BF2068B04304D0012AC8 +:106AC00018BFFFDF206830432060206807FA05F117 +:106AD00008432060F0BD0EF0D1B8494890F832006C +:106AE00070475A4AC178116000685949000208602D +:106AF0007047252808BF02210ED0262808BF1A217A +:106B00000AD0272808BF502106D00A2894BF0422A3 +:106B1000062202EB4001C9B24E4A11604E4908609C +:106B2000704737498A7A012A49D0022A18BF70472C +:106B30004B7E002B08BF7047012A44D0CB7E4A7F92 +:106B400013F1000C18BF4FF0010C24231844434BE1 +:106B50001860434B0020C3F84C0110028CF0010276 +:106B600040EA025040F0031291F82000830003F144 +:106B7000804303F5C043C3F810253A4A8B7F02EBEC +:106B80008000DA0002F1804202F5F832C2F8140502 +:106B9000DFF8D4C0C2F810C5C97FCA0002F1804234 +:106BA00002F5F832C2F814052648C2F81005012093 +:106BB00000FA03F288402D491043086070470B7EAD +:106BC000002BB9D170478B7E0A7F002B14BF4FF08A +:106BD000010C4FF0000C1123B8E72DE9F0410D4EE8 +:106BE000804603200D46C6F8000220492048086070 +:106BF00028460EF082F80124014FB8F1000F39E069 +:106C0000DC0B0020000E0040101500401414004062 +:106C10001415004000100040FC1F00403C170040CD +:106C20002C000089781700408C1500403815004072 +:106C30005016004000000E0408F50140408000405E +:106C4000A4F50140101100404016004024150040FA +:106C50001C15004008150040541500404C850040AC +:106C600000800040006000404C81004004F501407D +:106C70000000040404BFBC72346026D0B8F1010FD8 +:106C800023D1FE48006860B915F00C0F09D0C6F892 +:106C90000443012000F0B4FEF463346487F83C4000 +:106CA00002E0002000F0ACFE28460EF00EF90220B3 +:106CB000B8720DF0CAFC38B90DF0D9FC20B9F04813 +:106CC000016841F4C02101607460EE48C464EE487C +:106CD00000682946BDE8F04123E72DE9F047EB4E77 +:106CE000814603200D46C6F80002DFF8A883E84875 +:106CF000C8F8000008460EF000F828460EF0E5F847 +:106D00000124E54FB9F1000F03D0B9F1010F0AD00A +:106D100026E0BC72B86B40F48010B8634FF480106A +:106D2000C8F800001CE00220B872B86B40F40010F4 +:106D3000B8634FF40010C8F80000D048006860B98C +:106D400015F00C0F09D0C6F80443012000F058FEDE +:106D5000F463346487F83C4002E0002000F050FE09 +:106D6000EBF794FF2946BDE8F047DAE62DE9F84F46 +:106D7000C64C8246032088461746C4F80002DFF856 +:106D80001493C348C9F8000010460DF0B6FFDFF8B1 +:106D90000CB3C14E0125BAF1000F04BFCBF800407F +:106DA000B57204D0BAF1010F18BFFFDF2FD0BC4875 +:106DB000C0F80080BC49BB480860B06B40F40020BC +:106DC000B063D4F800321021C4F808130020C4F8CE +:106DD0000002DFF8D8C28A03CCF80020C4F8000112 +:106DE000C4F80C01C4F81001C4F80401C4F814017B +:106DF000C4F81801AE4800680090C4F80032C9F821 +:106E00000020C4F80413BAF1010F09D01BE0384682 +:106E10000EF05BF8A748CBF800000220B072C6E77E +:106E20009648006860B917F00C0F09D0C4F80453F5 +:106E3000012000F0E5FDE563256486F83C5002E0A2 +:106E4000002000F0DDFD4FF40020C9F800008D485F +:106E5000C5648D480068404528BFFFDF394640467D +:106E6000BDE8F84F5DE62DE9F0418B4C0646002564 +:106E700094F8310017468846002808BFFFDF16B196 +:106E8000012E16D021E094F83100012808D094F8A2 +:106E90003020394640460DF045FFE16A451814E0C0 +:106EA00094F830103A4640460DF07AFFE16A4518F2 +:106EB0000BE094F8310094F8301001283A4640462F +:106EC00009D00DF095FFE16A45183A46294630464B +:106ED000BDE8F0414AE70DF045FFE16A4518F4E7E7 +:106EE0002DE9F84F694CD4F8000220F00B09D4F8D2 +:106EF00004034FF0100AC0F30018C4F808A30026DA +:106F0000C4F8006269486C490160634D0127A97AA1 +:106F1000012902D0022903D015E0297E11B912E01F +:106F2000697E81B1A97FEA7F07FA01F107FA02F2CF +:106F30001143016095F82000800000F1804000F5C9 +:106F4000C040C0F81065FF208DF80000C4F8106143 +:106F5000276104E09DF80000401E8DF800009DF8B8 +:106F6000000018B1D4F810010028F3D09DF80000FB +:106F7000002808BFFFDFC4F81061002000F040FDCA +:106F80006E72AE72EF72C4F80092B8F1000F18BFC3 +:106F9000C4F804A3BDE8F88FFF2008B58DF8000001 +:106FA0003A480021C0F810110121016105E000BF3D +:106FB0009DF80010491E8DF800109DF8001019B1C1 +:106FC000D0F810110029F3D09DF80000002808BF68 +:106FD000FFDF08BD0068394920F07F400860704736 +:106FE0004FF0E0200221C0F8801100F5C070BFF31F +:106FF0004F8FBFF36F8FC0F8001170474FF0E02143 +:107000000220C1F8000170472D49087070472D49D2 +:107010000860704770B50546EBF738FE1E4C2844F3 +:10702000E16A884298BFFFDF01202074EBF72EFE53 +:10703000144A284400216061C2F8441122490860C2 +:10704000A06B144940F48000A063D001086070BDBB +:1070500070B5114C05461D4A0220207410680E467A +:1070600000F00F00032808BF01223ED0106800F096 +:107070000F00042808BF022237D029E088170040FB +:1070800068150040008000404C8500400010004022 +:107090000000040404F50140DC0B0020ACF50140C5 +:1070A0004885004048810040A8F5014008F50140AE +:1070B000181100400410004000000E043C15004070 +:1070C000C700002004150040448500401015004012 +:1070D000106800F00F0005281BD0106800F00F00AA +:1070E00006281CBFFFDF012213D094F8310094F86A +:1070F0003010012815D028460DF0C1FEFF4960610F +:107100000020C1F844016169E06A0844FC49086054 +:1071100070BDFC48006810F0060F0CBF0822042266 +:10712000E3E7334628460DF078FEE7E7F6494FF4EB +:1071300080000860F548816B21F4800181630021A3 +:1071400001747047C20002F1804202F5F832F04B40 +:10715000C2F81035C2F8141501218140ED480160D4 +:10716000EA48826B114381637047E4480121416022 +:10717000C1600021C0F84411E1480160E348C162E8 +:107180007047E5490860E548D0F8001241F0400139 +:10719000C0F800127047E148D0F8001221F0400119 +:1071A000C0F80012DC49002008607047DB48D0F8C6 +:1071B000001221F01001C0F8001201218161704716 +:1071C000D249FF2081F83E00D4480021C0F81C11AC +:1071D000D0F8001241F01001C0F800127047CF49FA +:1071E00081B0D1F81C21012A0DD0C84991F83E1078 +:1071F000FF290DBF00204942017001B008BF704750 +:10720000012001B07047C64A126802F07F02524264 +:1072100002700020C1F81C01C24800680090EFE72E +:10722000F0B517460C00064608BFFFDFB74D14F057 +:10723000010F2F731CBF012CFFDF002E0CBF01209C +:1072400002206872EC7201281CBF0228FFDFF0BD2B +:10725000AE4981F83F0070472DE9F84FDFF8C8A22A +:107260009AF80000042828BFFFDFA84CDFF89882B6 +:10727000AA4D94F83C0000260127E0B1D5F804019E +:1072800010F1000918BF4FF00109D5F810010028CE +:1072900018BF012050EA09014FF4002B17D08021BC +:1072A000C5F80813C8F800B084F83C6090F0010FEE +:1072B00018BFBDE8F88FDFF84492D9F84C010028D8 +:1072C0007ED0A07A01287CD002287BD0AEE0D5F811 +:1072D0000001DFF84CA230B3C5F800616F61FF20F8 +:1072E000009002E0401E009005D0D5F81C01002857 +:1072F0000098F7D000B9FFDFDAF8000000F07F0A4D +:1073000094F83F0050453CBF002000F079FB84F822 +:107310003EA0C5F81C61C5F808738248006800905B +:107320002F64AF6302E0B9F1000F03D0B9F1000F91 +:107330002BD05DE0DAF8000000F07F0084F83E001A +:10734000C5F81C6194F83D1049B194F83F10814292 +:1073500018D2002000F054FB2F64AF6312E0734991 +:10736000096894F83F308AB2090C984203D30F2A77 +:1073700006D9022904D2012000F042FB2F6401E06B +:107380002F64AF636748006800908022C5F804232B +:107390005A48876466490B68A1F1040CDCF800C008 +:1073A00043F698273B44634519D20A6842F21073AA +:1073B0001A440A60C0F848615F495E48086002E00C +:1073C00034E01CE01EE0091F5C4808605148C0F82A +:1073D00000B0A06B40F40020A063BDE8F88F0E6001 +:1073E000C0F84861C5F80823C8F800B0C0F8486183 +:1073F0008020C5F80803C8F800B0BDE8F88F207EEB +:1074000010B913E0607E88B1A07FE17F07FA00F039 +:1074100007FA01F10843C8F8000094F82000800042 +:1074200000F1804000F5C040C0F810653648A16BFF +:107430000160A663217C002019B1D9F8441101290B +:1074400000D00021A27A012A56D0022A55D000BFCE +:10745000D5F8101101290CBF1021002141EA0008C4 +:107460003748016811F0FF0F03D0D5F81411012936 +:1074700000D0002184F83210006810F0FF0F03D014 +:10748000D5F81801012800D0002084F833002D48D9 +:10749000006884F83400FFF77CF8012818BF00204A +:1074A00084F83500C5F80061C5F80C61C5F81061B5 +:1074B000C5F80461C5F81461C5F818612248006870 +:1074C00000900E48C0F8446120480068DFF8309012 +:1074D0000090D9F80000A062A9F104000068E06201 +:1074E0001B48016801F00F01032908BF012042D0A9 +:1074F000016801F00F012DE045E04BE00080004005 +:10750000448500401414004008F50140DC0B0020C5 +:107510000411004004F501406015004000100040D7 +:10752000481500401C110040C700002074150040A1 +:107530004885004014100040ACF5014048810040EF +:1075400040160040101400401811004044810040D3 +:1075500010150040042908BF02200CD0016801F07A +:107560000F01052925D0006800F00F0006281CBF78 +:10757000FFDF01201DD084F83000A07A84F83100AC +:1075800002282BD11DE0D5F80C01012814BF0020E2 +:1075900008205DE7D5F80C01012814BF0020022067 +:1075A000F64A1268012A14BF04220022104308433D +:1075B0004EE7F348006810F0060F0CBF08200420C7 +:1075C000D9E7607850B1EF49096809780840217817 +:1075D00031EA000008BF84F8247001D084F82460E8 +:1075E00018F0020F0AD0EBF751FBA16AE64A081A1D +:1075F0009AF80010490852F82110884718F0010F36 +:1076000018BF4FF0000B11D0EBF740FBE16A9AF87E +:107610000020081ADD4951F822205946904700BF42 +:107620009AF8000010F0010F2FD10CE018F0020FB3 +:1076300018BF4FF0010BE7D118F0080F18BF4FF03B +:10764000020BE1D1ECE7DFF83CB3DBF80000007897 +:1076500000F00F00072828BF84F8256015D2DBF85A +:107660000000062200F10901A01C0DF05BFF40B9EB +:10767000207ADBF800100978B0EBD11F08BF012099 +:1076800001D04FF0000084F82500E17A4FF00000AF +:1076900011F0020F1CBF18F0020F18F0040F19D1DF +:1076A00011F0100F1CBF94F83320002A02D094F878 +:1076B00035207AB111F0080F1CBF94F82420002A5D +:1076C00008D111F0040F02D094F8251011B118F070 +:1076D000010F01D04FF00100617A19B168B1FFF7D5 +:1076E000FFFB10E0AB48AA490160D5F8000220F08A +:1076F0000300C5F80002E77205E001290DD0022958 +:1077000018BFFFDF10D018F0010F17D0A2489AF869 +:10771000001050F82100804756E06672E772A772A9 +:107720009621227B002006E06672E7720220A0729A +:10773000227B96210120FFF796FBE4E718F0020F69 +:107740002DD018F0040F21D10CF07FFFF0B90CF010 +:107750008EFFD8B991480168001F0068C0F3006C23 +:10776000C0F3425500F00F03C0F30312C0F303202F +:10777000BCF1000F0AD0002B1CBF002A002805D145 +:10778000002918BF032D38BF48F0040827EA9800E5 +:1077900083499AF8002051F82210884714E018F025 +:1077A000080F06D07F489AF8001050F82100804753 +:1077B0000AE018F0100F08BFFFDF05D07A489AF8EA +:1077C000001050F821008047A07A022818BFBDE8B9 +:1077D000F88F207C002808BFBDE8F88F7349C1F8F6 +:1077E0004461022814D0012818BFFFDFE16A6069F4 +:1077F000884298BFFFDF6069C9F80000A06B4FF4B2 +:10780000800140F48000A06369480160BDE8F88F02 +:107810006169E06A0844EFE738B5664D0024002846 +:1078200018BFC5F800426448006864498A7A012A92 +:1078300002D0022A03D018E00A7E12B915E04A7E6F +:107840009AB18B7F012291F81FC002FA03F302FA6A +:107850000CF21A434F4B1A6091F82010890001F185 +:10786000804101F5C041C1F810450121FFF759F9E8 +:10787000C5F80041C5F80C41C5F81041C5F80441F0 +:10788000C5F81441C5F818414D480068009038BD4E +:10789000012804BF28207047022804BF1820704721 +:1078A000042812BF08284FF4A870704700B5FFDF06 +:1078B000282000BD012804BF41F6A47070470228AB +:1078C00004BF41F288307047042804BF46F2180014 +:1078D0007047082804BF47F2A030704700B5FFDFAB +:1078E00041F6A47000BD10B502280DD0012804BFD8 +:1078F00042F6CE3010BD042817BF082843F6A44036 +:10790000FFDF41F66A0010BD0CF07AFE30B90CF0D2 +:1079100084FE002808BF41F6583001D041F264309F +:1079200041F29A01084410BD012812BF022800202C +:107930007047042812BF08284FF4C870704700B57C +:10794000FFDF002000BD1B490820C1F800021149DB +:107950000F4808601C491B480860091D1B48086047 +:107960001C491B480860091D1B48086010494FF45A +:10797000602008601149022088727047001400409E +:107980001414004004150040005C0200485C020032 +:107990000000040408F50140085C02005414004093 +:1079A000185C0200285C0200385C02000080004085 +:1079B00004F501400010004040850040DC0B002031 +:1079C000181100400011004098F5014014100040CB +:1079D0001C110040A8F50140101000401948016832 +:1079E00003291BBF006802280120002070471548AA +:1079F00001680B291BBF00680A280120002070477E +:107A000011490968C9B9114A1149136870B123F0C5 +:107A1000820343F07D0343F0004313600A6822F0C1 +:107A2000100242F0600242F0004205E023F0004301 +:107A300013600A6822F000420A60064981F83D009E +:107A40007047000050150040881700403C17004068 +:107A50007C170040DC0B002010B53F4822210DF0C0 +:107A60000CFE3D480024017821F010010170012135 +:107A700006F064F839494FF6FF7081F82240888497 +:107A800037490880488010BD704734498A8C82424B +:107A900018BF7047002081F822004FF6FF708884DD +:107AA00070472D49016070472D49088070472B4968 +:107AB0008A8CA2F57F43FF3B03D00021016008467A +:107AC000704791F822202549012A1ABF0160012040 +:107AD00000207047214901F1220091F82220012A5B +:107AE00004BF00207047012202701D48008888846E +:107AF000104670471A49488070471849184B8A8CBD +:107B00005B889A4206D191F82220002A1EBF0160AC +:107B100001207047002070471048114A818C52881C +:107B2000914209D14FF6FF71818410F8221F19B1DB +:107B30000021017001207047002070470748084A63 +:107B4000818C5288914205D190F8220000281CBFF8 +:107B50000020704701207047420C00201C0C0020C0 +:107B6000C80000207047574A012340B1012818BFC0 +:107B700070471370086890608888908170475370D0 +:107B80000868C2F802008888D08070474D4A10B15A +:107B9000012807D00EE0507860B1D2F802000860EA +:107BA000D08804E0107828B19068086090898880B7 +:107BB0000120704700207047424910B1012803D0CE +:107BC00006E0487810B903E0087808B10120704752 +:107BD0000020704730B58DB00C4605460D2104A835 +:107BE0000DF06DFDE0788DF81F0020798DF81E00F6 +:107BF00060798DF81D002868009068680190A86879 +:107C00000290E868039068460CF062FB20789DF8CB +:107C10002F1088420CD160789DF82E10884207D131 +:107C2000A0789DF82D10884202BF01200DB030BD14 +:107C300000200DB030BD30B50C4605468DB04FF07C +:107C4000030104F1030012B1FEF7F8F801E0FEF7BA +:107C500014F960790D2120F0C00040F040006071FF +:107C600004A80DF02CFDE0788DF81F0020798DF828 +:107C70001E0060798DF81D002868009068680190EA +:107C8000A8680290E868039068460CF021FB9DF814 +:107C90002F0020709DF82E0060709DF82D00A070C0 +:107CA0000DB030BD10B5002904464FF0060102D0DA +:107CB000FEF7C4F801E0FEF7E0F8607920F0C000BC +:107CC000607110BDCC000020FE48406870472DE96F +:107CD000F0410F46064601461446012005F0F8FA29 +:107CE000054696F85500FFF7E5FD4AF2B121084434 +:107CF0004FF47A71B0FBF1F0718840F27122514378 +:107D0000C0EB4100001BA0F2653403F03DF80028F1 +:107D100018BF1E3CAF4234BF28463846A04203D2AB +:107D2000AF422CBF3C462C467462BDE8F0812DE981 +:107D3000FF4F95B0044690F8550089461190DDE953 +:107D4000171008431390E048002605780C2D28BF33 +:107D5000FFDFDE4F37F8158094F874510C2D28BFE3 +:107D6000FFDFDA4830F8150040441FFA80F894F835 +:107D700065000D280CBF012000200C9017980028EA +:107D800004BF94F8140103282BD10C9848B3B4F81D +:107D90009601484525D1D4F81C01C4F80801608833 +:107DA00040F2E2414843C4F80C01B4F86201B4F86F +:107DB000EE100844C4F81001204602F0EFFFB4F8BA +:107DC0009A01E08294F898016075B4F89C01608093 +:107DD000B4F89E01A080B4F8A001E080022084F8ED +:107DE0001401D4F86C011090D4F868010F90B4F825 +:107DF000EE70B4F86001D4F85C110891179921B1C4 +:107E000094F8281151B100F0DDB804F1E8010391B4 +:107E100074310D9104F5A475091D07E004F59E71F8 +:107E20000391091D0D9104F59675091D0E91B4F885 +:107E30005810A9EB0000A9EB01010FFA80FA0FFA24 +:107E400081FBBAF1000F05DAD4F85801089001203F +:107E5000DA461390002002909B480079E8B3F3F7CC +:107E600039FFD0B3B4F80001022836D394F81401D6 +:107E7000022832D094F82B0178BB94F87481B8F1C1 +:107E80000C0F28BFFFDF914830F8180000F5C860DC +:107E90001FFA80F894F8140101287DD0618840F21F +:107EA000E24041430020B8F1000F05D0884808FBAC +:107EB00001F1B1FBF0F0401C07EB0B01A1EB0A0252 +:107EC000D4F81C1180B2431A029902FB03110291EB +:107ED000C4F81C01012084F82B0194F81401002837 +:107EE00074D0012800F04682022800F09481032813 +:107EF00018BFFFDF00F078820298311A0898FCF76B +:107F0000BCFB0D99012640F2712208600E98A0F882 +:107F10000090002028702E710D980068A86061887C +:107F2000D4F81C015143C0EB41006749A0F2353041 +:107F30000862C969814287BF03990860039801609C +:107F40000398616A0068084400F2A510E86002F036 +:107F50001BFF10B1E8681E30E8606E71B4F8D800FD +:107F6000A0EB090000B20028C4BF032068710C9880 +:107F70000028189800F09A82D8B100BFB4F8001118 +:107F800000290CBF0020B4F80201A4F8020194F803 +:107F90000421401C504300E019E0884209D268796E +:107FA000401E002805DD6E71B4F80201401CA4F8E3 +:107FB00002011798002800F0A18294F828010028F7 +:107FC00000F0988219B00220BDE8F08F65E094F8C7 +:107FD0006800032857D03B4894F8551090F83000BB +:107FE00005F023FBE18A40F27122514300EB41018D +:107FF0000020D4F80C21B8F1000F06D0344808FB5B +:1080000002F2B2FBF0F000F10100D4F80831D4F82C +:108010001021A0EB030C029BC4F8080102FB0C33F7 +:108020004FF0000007D000BF294808FB01F1B1FB69 +:10803000F0F000F10100D4F81811C4F81801A0EB19 +:1080400001011944608840F2E24300FB03F34FF062 +:10805000000006D01E4808FB03F3B3FBF0F000F16C +:10806000010007EB0B03A3EB0A03A3EB0202D4F816 +:108070001C31A2F10102A0EB030302FB03110291E8 +:10808000C4F81C0126E7E18A40F27122D4F80C0101 +:1080900001FB02F100EB4101AAE70F98002808BF9D +:1080A000FFDF94F85510074890F8300005F0BDFA4E +:1080B0000790E18A40F271204143079800EB4101AB +:1080C000002007E0640C0020DC000020585C020067 +:1080D00040420F00B8F1000F07D000BFFF4808FB77 +:1080E00001F1B1FBF0F000F10100C4F81801618862 +:1080F00040F2E24001FB00F14FF0000006D0F748EB +:1081000008FB01F1B1FBF0F000F10100C4F81C0123 +:1081100086B221464FF00100D4F828A005F0D8F827 +:10812000074694F85500FFF7C5FB4AF2B12B5844B7 +:108130004FF47A78B0FBF8F0618840F27122514335 +:10814000C0EB4100801BA0F2653602F01DFE002846 +:1081500018BF1E3EBA4534BF38465046B04203D21F +:10816000BA452CBF56463E46666294F85500FFF766 +:10817000DBFB00F2E140B0FBF8F10F980E1894F829 +:108180005500FFF7D1FB074694F85500FFF792FB27 +:1081900038444AF2AB310844B0FBF8F1E28A40F2CD +:1081A000712042430798D4F8187100EB4200401A3E +:1081B000C01B3044A0F12006617D40F2E24011FB7B +:1081C00000FA94F85500009010F00C0F0ABF0098C8 +:1081D0004EF62830FFF76EFB5844B0FBF8F000EB8A +:1081E000470000EB0A070098FFF752FB384400F104 +:1081F0006201BB48C16194F85500FFF795FB00F29E +:10820000E140B0FBF8F10F980844301AB0F53D7F1B +:1082100098BFFFDF70E6E18A40F27122D4F80C01CA +:10822000514300EB41010020B8F1000F07D000BF1F +:10823000AA4808FB01F1B1FBF0F000F10100C4F81D +:108240001801608840F2E24100FB01F14FF00000AC +:1082500006D0A24808FB01F1B1FBF0F000F10100EB +:10826000C4F81C0186B221464FF00100D4F828A0C2 +:1082700005F02EF8804694F85500FFF71BFB4AF2F4 +:10828000B12B00EB0B014FF47A70B1FBF0F0618879 +:1082900040F271225143C0EB4100801BA0F26536D1 +:1082A00002F072FD002818BF1E3EC24534BF404692 +:1082B0005046B04203D2C2452CBF5646464666627F +:1082C0000FBB1898F8B194F855603046FFF7F2FAF2 +:1082D00000EB0B014FF47A70B1FBF0F0D4F81811F9 +:1082E000E38A084440F27122D4F80C115A4301EB9E +:1082F00042010F1A3046FFF7CBFA1099081A38449A +:10830000A0F120060AE0E18A40F27122D4F80C01C3 +:10831000514300EB4100D4F81811461AD4F810214B +:10832000D4F80811D4F8180101FB020A607D40F26C +:10833000E24110FB01F894F8557017F00C0F0ABFDA +:1083400038464EF62830FFF7B5FA00EB0B014FF434 +:108350007A70B1FBF0F000EB4A0080443846FFF73A +:1083600097FA404400F160015D48C161012084F842 +:108370001401C1E5618840F271225143D4F81C0117 +:10838000D4F81021C0EB410101FB0AF607EB0B0109 +:10839000891AD4F808C1D4F81831491E0CFB0232EE +:1083A00001FB002A607D40F2E24110FB01F894F8E5 +:1083B000557017F00C0F0ABF38464EF62830FFF7FD +:1083C00079FA4AF2B12101444FF47A70B1FBF0F02E +:1083D00000EB4A0080443846FFF75AFA404400F167 +:1083E00060013F48C16187E5628840F27121D4F89D +:1083F0001C015143C0EB410000FB0AF694F86400F5 +:1084000024281CBF94F8650024280BD1B4F89601E9 +:10841000A9EB000000B2002804DB94F899010028C1 +:1084200018BF1190139800B3FFB9109800281ABF15 +:108430000F980028FFDF94F8550010F00C0F14BFC0 +:108440004EF62830FFF736FA4AF2B12101444FF4D4 +:108450007A70B1FBF0F0361A94F85500FFF718FA6D +:108460001099081A3044A0F12006D4F81C1107EB2B +:108470000B0000FB01F7119810F00C0F0ABF1198C8 +:108480004EF62830FFF716FA4AF2B12101444FF4B4 +:108490007A70B1FBF0F000EB47071198FFF7F8F99D +:1084A000384400F160010E48C16125E500287FF4E1 +:1084B00065AD94F8140100283FF47BAD618840F26B +:1084C0007122D4F81C015143C0EB4101284604F04D +:1084D000CFFD0004000C3FF46CAD03E040420F0000 +:1084E000DC0000202299002918BF0880012019B063 +:1084F000BDE8F08F94F86401FCF723FF94F8640161 +:108500002946FCF703FE20B1179880F0010084F89B +:10851000290119B00020BDE8F08F70B5FE4C607ADB +:1085200000281CBF002070BD94F8340038B1A16B46 +:10853000606A884203D9F7F7BEF8002070BDA06AD0 +:10854000E8B1F6F750F90546F5F7C4FF284442F2C2 +:1085500010714618FCF790FB05462946E06AFDF7C6 +:10856000A4F8E562A16A8219914224BF081AA062A8 +:1085700005D20120A062F7F79EF8002070BD01200F +:1085800070BDF8B5E44C02460025E44E6168606AAF +:10859000052A4ED2DFE802F003353A3D4400A07AC6 +:1085A000002760B101216846FDF748FC9DF80000F6 +:1085B00042F210710002B0FBF1F201FB1207F6F774 +:1085C00012F9C119A069FCF758F8A06125740320BD +:1085D00060757079002814BF012003202075607A2F +:1085E00038B9207B04F11001FCF790FD002808BF8A +:1085F000FFDF2584FCF74AFAB079BDE8F840EAF7D6 +:108600008BBCBDE8F840002100F0C7BDC1F868018F +:10861000F8BDD1F86801BDE8F840012100F0BDBD0A +:1086200084F83450FCF732FAB079BDE8F840EAF744 +:1086300073BCFFDFF8BD2DE9F04FDFF8DC820446A4 +:1086400083B098F800008B4601270025B34E4FF009 +:108650000209032804BF98F80C00A04240F0E7800C +:10866000D8F80400B06198F80000032818BFFFDFB5 +:108670000324BBF1080F80F0D680DFE80BF0040F75 +:1086800031312CD4D4CBC8F82450F6F783FC002821 +:1086900018BFFFDFB47003B0BDE8F08FF5F71AFF25 +:1086A0000446D8F81C00A04228BFC8F81C4005D2D8 +:1086B000201AFDF72EF8C8F81C4038B1F6F7E3FF92 +:1086C000002818BFFFDF03B0BDE8F08F03B0002023 +:1086D000BDE8F04F55E703B0BDE8F04FFEF7BCBD75 +:1086E00070794FF0010A002814BF0120032088F898 +:1086F000140088F8105098F8340042F2107B68B1EA +:108700004FF47A71D8F81800FBF7B7FFC8F81800D3 +:10871000002108F1100004F0ABFC1CE001216846C8 +:10872000FDF782FB9DF800000002B0FBFBF10BFBA4 +:10873000110AF6F758F800EB0A018A46D8F8180033 +:10874000FBF79BFFC8F81800514608F1100004F031 +:108750008FFC00F1010AB8F82000411C0A293CBF37 +:108760005044A8F82000D8F8040038B1B8F8200028 +:10877000401C0A2828BF88F8159001D288F81540B7 +:1087800098F8090070BB98F8340040B1D8F8381058 +:10879000D8F82400884202D9F6F78DFF22E0D8F8F5 +:1087A000280058B3F6F71FF80446F5F793FE204467 +:1087B00000EB0B09FCF760FA04462146D8F82C00C0 +:1087C000FCF773FFC8F82C40D8F8281000EB09021A +:1087D000914224BF081AC8F828000FD2C8F82870A0 +:1087E000F6F769FF98F80C00FCF727FA88F80050B4 +:1087F000B07903B0BDE8F04FEAF78EBB98F80C00F3 +:1088000008F11001FCF782FC002808BFFFDF03B06D +:10881000BDE8F08F98F80C00FCF70FFA88F80050CC +:1088200003B0BDE8F08FFFDF03B0BDE8F08F202C70 +:1088300028BFFFDFDFF8E880072138F81400FAF7D7 +:10884000D9F85FEA000A08BFFFDF202C28BFFFDF4E +:1088500038F81400BAF80010884218BFFFDF5446F9 +:10886000C6F818A04FF0200ABBF1080F80F04A812B +:10887000DFE80BF0049FA9A9A2F4F3F2C4F8685151 +:108880003581C4F86C5194F8290138B9FCF7F4F932 +:10889000D4F83411FCF709FF00281BDCB4F82611CA +:1088A000B4F85800814206D1B4F8DC10081AA4F8D4 +:1088B000DE00204605E0081AA4F8DE00B4F8261110 +:1088C0002046A4F85810D4F85011C4F83411C0F858 +:1088D00058111DE0B4F82411B4F85800081AA4F88F +:1088E000DE00B4F824112046A4F85810D4F834114E +:1088F000C4F85011C4F85811D4F83C11C4F8E81069 +:10890000D4F84011C4F85C11B4F84411A4F8601113 +:1089100002F020F906E00000640C0020DC000020DA +:10892000A00C0020FCF782F9804694F85500FEF771 +:10893000C1FF4AF2B12108444FF47A71B0FBF1F063 +:10894000D4F81C1140F27122084461885143C0EBF5 +:108950004100A0F1300AB8F1B70F98BF4FF0B70847 +:108960002146012004F0B4FC4044AAEB0000A0F230 +:108970001A38A2462146012004F0AAFC00F19C010D +:10898000DAF82400884288BF451AC6F810804545A9 +:1089900028BF4546F560D4F85401A0F2A5107061D7 +:1089A000FCF750FE84F8287186F8029003B0BDE809 +:1089B000F08F02F0E4F901E0FEF74EFC84F8287134 +:1089C00003B0BDE8F08FFCF757F9D4F85821014601 +:1089D0001046FCF76AFE48B1628840F27123D4F871 +:1089E0001C115A43C1EB4201B0FBF1F094F8651041 +:1089F0000D290FD0B4F85820B4F826111318994255 +:108A0000AEBF481C401C1044A4F8260194F82A016B +:108A100078B905E0B4F82601401CA4F8260108E066 +:108A2000B4F82601B4F8DC10884204BF401CA4F856 +:108A30002601B4F862010DF1040B401CA4F8620198 +:108A4000B4F88000B4F87E10401AB4F85810401EF4 +:108A500008441FFA80F912E046E03EE052E00023AD +:108A60001A462046CDF800B0FFF761F9002804BF90 +:108A700003B0BDE8F08F012818BFFFDF25D0B4F8A0 +:108A80002611A9EB010000B20028E8DA082084F8DA +:108A9000740084F87370204601F01EFE84F81451AF +:108AA00094F864514FF6FF77202D00D3FFDF28F8AC +:108AB000157094F86401FCF7C0F884F864A1B079EB +:108AC00003B0BDE8F04FEAF727BAB4F82601BDF8C5 +:108AD00004100844A4F82601D1E7FEF75DFA03B0BC +:108AE000BDE8F04FFEF7B8BB94F81401042818BF96 +:108AF000FFDF84F8145194F864514FF6FF77202D6E +:108B0000D5D3D3E7FFDF03B0BDE8F08F10B5FA4C43 +:108B1000207850B101206072F6F7E5FD2078032837 +:108B200005D0207A002808BF10BD0C2010BD207B86 +:108B3000FCF707FC207BFCF752FE207BFCF77DF85E +:108B4000002808BFFFDF0020207010BD2DE9F04F86 +:108B5000E94F83B0387801244FF0000840B17C72AF +:108B60000120F6F7C0FD3878032818BF387A0DD0F9 +:108B7000DFF8889389F8034069460720F9F7C3FEB8 +:108B8000002818BFFFDF4FF6FF7440E0387BFCF78A +:108B9000D8FB387BFCF723FE387BFCF74EF8002827 +:108BA00008BFFFDF87F80080E2E7029800281CBFBB +:108BB00090F8141100292AD00088A0421CBFDFF8C9 +:108BC00040A34FF0200B3AD00721F9F713FF040020 +:108BD00008BFFFDF94F86401FCF701FE84F81481FC +:108BE00094F864514FF6FF76202D28BFFFDF2AF856 +:108BF000156094F86401FCF720F884F864B16946C4 +:108C00000720F9F780FE002818BFFFDF12E0684652 +:108C1000F9F757FE0028C8D011E0029800281CBFC1 +:108C200090F81411002905D00088A0F57F41FF3984 +:108C3000CAD104E06846F9F744FE0028EDD089F86F +:108C4000038087F8348087F80B8003B00020BDE8EC +:108C5000F08F70B50446AB4890F80004AA4D400967 +:108C600095F800144909884218BFFFDF95F8140DE4 +:108C70004009A64991F800144909884218BFFFDF4E +:108C80009E49002001228C7188700A7048700A7118 +:108C9000C870487198490870BDE8704056E7974918 +:108CA000087070472DE9F843934C064688462078B3 +:108CB000002867D19648FBF764FF2073202861D015 +:108CC000032766602770002565722572AEB1012109 +:108CD00006F58270FDF7D1F80620F9F733FE8146DC +:108CE0000720F9F72FFE96F804114844B1FBF0F283 +:108CF00000FB1210401C86F80401FBF797FF40F2BE +:108D0000F651884238BF40F2F65000F59F7086B2A7 +:108D1000F5F7E0FBE061F5F766FD4FF0010900288B +:108D200033D084F80A90FBF7A7FF814601216846FB +:108D3000FDF77AF89DF8000042F210710002B0FBD6 +:108D4000F1F201FB120081194846FBF796FCA06185 +:108D5000C4E90A8969484079002814BF012003202A +:108D6000207567752574207B04F11001FCF7CEF99E +:108D7000002808BFFFDF25840020F6F7B4FC0020A0 +:108D8000BDE8F8830C20BDE8F883FBF775FF31469A +:108D9000FBF773FCA061A57284F83490A8F28B50A5 +:108DA000A562A063D6E7554948717047534948709A +:108DB00070475249087170472DE9F0414F4C064603 +:108DC0002089401C2081D4E903516078D6F868716D +:108DD00020B13A46284604F076F90546E068854217 +:108DE00005D06169281A08446061FCF72BFCE56036 +:108DF000AF4209D896F81401012805D0E078002880 +:108E000004BF0120BDE8F0810020BDE8F08110B56D +:108E100004460846FEF74EFD4AF2B12108444FF4DD +:108E20007A71B0FBF1F040F2E241614300F235307B +:108E300081428CBF081A002010BD70B5044682B074 +:108E4000002084F8280194F8E600002807BF94F871 +:108E50001401032802B070BDFBF70EFFD4F85821AF +:108E600001461046FCF721FC0028DCBF02B070BDB3 +:108E7000628840F27123D4F81C115A43C1EB4201BD +:108E8000B0FBF1F0B4F85810401C0844A4F82401D9 +:108E9000B4F8DC00B4F82421801A00B20028DCBF4A +:108EA00002B070BD012084F82A01B4F88000B4F843 +:108EB0007E2001AE801A401E084485B212E0009662 +:108EC000B4F82411002301222046FEF730FF0028C9 +:108ED00004BF02B070BD01281CD0022812BFFFDF02 +:108EE00002B070BDB4F82401281A00B20028BCBF3B +:108EF00002B070BDE3E70000640C0020DC0000203D +:108F0000A00C002001E000E00BE000E019E000E030 +:108F100037860100B4F82401BDF804100844A4F811 +:108F20002401DFE7F8B50422002506295BD2DFE83B +:108F300001F007260319192A044680F8142107E0D6 +:108F40000446BD48C078002818BF84F814210AD010 +:108F5000FBF79CFDA4F86251B4F85800A4F8260170 +:108F600084F82A51F8BD0095B4F8DC1001230022E2 +:108F70002046FEF7DCFE002818BFFFDFE8E70321EC +:108F800080F81411F8BD0646876AB0F81C01314616 +:108F900085B2012004F09CF9044696F85500FEF7CE +:108FA00089FC4AF2B12108444FF47A71B0FBF1F028 +:108FB000718840F271225143C0EB4100401BA0F286 +:108FC000653501F0E1FE002818BF1E3DA74234BF01 +:108FD00020463846A84228BF2C4602D2A74228BFC6 +:108FE0003C467462F8BDFFDFF8BD2DE9F05F924E9C +:108FF000B178022906BF31890029BDE8F09FB46924 +:10900000C4F86C0194F85500FEF742FCD4F86C11DA +:10901000081AF1680144F160316908443061B469AB +:1090200094F82B01002808BFBDE8F09F94F81401C4 +:10903000032818BFBDE8F09F94F8555036780C2EE1 +:1090400028BFFFDF7D4F37F8168094F874610C2E2F +:1090500028BFFFDF37F81600404494F8748186B2C9 +:10906000B8F10C0F28BFFFDF37F8180000F5C86013 +:109070001FFA80F82846FEF70BFCD4F86C114FF06D +:10908000000A0F1A15F00C0F0ABF28464EF62830BA +:10909000FEF710FC4FF47A7900F2E730B0FBF9F0FC +:1090A0003F1A2846FEF7F4FBD4F8E81015F00C0F31 +:1090B000A1EB000B0ABF28464EF62830FEF7FAFB5C +:1090C0004AF2B1210844B0FBF9F0ABEB0000A0F18B +:1090D00060017143B1FBF8F1292202EB50006031CD +:1090E000A0EB510200EB5100BA4201D8B84201D8BE +:1090F000F2F794FE608840F2E241414300202EB135 +:1091000006FB01F04E49B0FBF1F0401CC4F81C0115 +:1091100084F82BA1BDE8F09F70B50546464890F84D +:1091200002C0BCF1020F07BF806900F5B474454866 +:1091300000F12404002904BF256070BD4FF47A7645 +:1091400001290DD002291CBFFFDF70BD1046FEF7BC +:10915000CAFB00F2E140B0FBF6F0281A206070BDB7 +:109160001846FEF7E1FB00F2E140B0FBF6F0281AEA +:10917000206070BD3348007800281CBF0020704775 +:1091800010B50720F9F7D0FB80F0010010BD2D4885 +:109190000078002818BF012070472DE9F843294CBA +:1091A0000025814684F83450D4F8188084F83010B3 +:1091B000E5722570012727722946606803F0CDFA11 +:1091C0006168C1F85881267B81F86461C1F86891B3 +:1091D000C1F85C81B1F80080202E28BFFFDF1A485B +:1091E00020F81680646884F814510023A4F86051B4 +:1091F0001A46194620460095FEF799FD002818BF2B +:10920000FFDFC4F81051C4F8085184F81471A4F8B1 +:109210002651A4F8245184F82A51B4F85800401E6D +:10922000A4F85800A4F86251FBF730FC024880799A +:10923000BDE8F843E9F770BEDC000020585C02008E +:1092400040420F00640C0020A00C0020012804D034 +:10925000022805D0032808D105E0012907D004E041 +:10926000022904D001E0042901D000207047012028 +:1092700070472DE9F0410E46044604F07CFD05469A +:10928000204604F07CFD044604F097F8FE4F0100F0 +:1092900015D0386990F854208A4210D090F8AC313B +:1092A0001BB190F8AE3123421FD02EB990F8513047 +:1092B000234201D18A4218D890F8AC01A8B12846BF +:1092C00004F07BF870B1396991F85520824209D0D9 +:1092D00091F8AC0118B191F8AF01284205D091F88E +:1092E000AC0110B10120BDE8F0810020FBE730B5F2 +:1092F000E54C85B0E06900285DD0142168460CF08B +:10930000DEF9206990F85500FEF7D4FA4FF47A712F +:1093100000F5FA70B0FBF1F5206990F85500FEF702 +:10932000B7FA2844ADF8060020690188ADF80010AE +:10933000B0F85810ADF804104188ADF8021090F85C +:109340008E0130B1A069C11C039104F0F5FB8DF8CA +:109350001000206990F88D018DF80800E1696846D9 +:1093600088472069002180F88E1180F88D110399BB +:10937000002920D090F88C1100291CD190F864109D +:10938000272918D09DF81010039A002913D01378BC +:109390000124FF2B11D0072B0DD102290BD15178BD +:1093A000FF2908D180F88C410399C0F890119DF8ED +:1093B000101080F88F1105B030BD1B29F2D9FAE7E3 +:1093C00070B5B14C206990F865001B2800D0FFDF14 +:1093D0002069002580F88D5090F8C00100B1FFDFB2 +:1093E000206990F88E1041B180F88E500188A0F865 +:1093F000C41180F8C2510E2108E00188A0F8C41100 +:1094000080F8C251012180F8C6110D2180F8C011E9 +:109410000088F9F721FCF9F7B9F82079E9F77CFD24 +:10942000206980F8655070BD70B5974CA0798007B1 +:109430002CD5A078002829D162692046D37801690B +:109440000D2B01F158005FD00DDCA3F102034FF0AA +:1094500001050B2B19D2DFE803F01A1844506127DD +:10946000182C183A6400152B6FD008DC112B4BD048 +:10947000122B5AD0132B62D0142B06D166E0162B78 +:1094800071D0172B70D0FF2B6FD0FFDF70BD91F81C +:1094900067200123194603F081FD0028F6D12169D8 +:1094A000082081F8670070BD1079BDE8704001F0B8 +:1094B00008BD91F86600C00700D1FFDF01F0C0FCD5 +:1094C000206910F8661F21F00101017070BD91F84C +:1094D0006500102800D0FFDF2069112180F88D5031 +:1094E00008E091F86500142800D0FFDF20691521FD +:1094F00080F88D5080F8651070BD91F865001528D2 +:1095000000D0FFDF172005E091F86500152800D096 +:10951000FFDF1920216981F8650070BDBDE870404A +:109520004EE7BDE8704001F0A0BC91F86420012333 +:10953000002103F033FD00B9FFDF0E200FE011F82A +:10954000660F20F0040008701DE00FE091F8642021 +:109550000123002103F022FD00B9FFDF1C20216957 +:1095600081F8640070BD12E01BE022E091F8660013 +:10957000C0F30110012800D0FFDF206910F8661F3A +:1095800021F010010170BDE8704001F059BC91F864 +:1095900064200123002103F001FD00B9FFDF1F203B +:1095A000DDE791F86500212801D000B1FFDF22201E +:1095B000B0E7BDE8704001F04FBC3348016991F855 +:1095C0006620130702D501218170704742F008021E +:1095D00081F866208069C07881F8C90001F027BC55 +:1095E00010B5294C21690A88A1F8042281F80202E9 +:1095F00091F8540001F009FC216981F8060291F804 +:10960000550001F002FC216981F80702012081F870 +:109610000002002081F8AC012079BDE81040E9F794 +:109620007BBCF0B4184C206900F5DA730188198509 +:10963000018E5985818E9985018FB0F84420914221 +:1096400000D31146D985828FB0F846108A4200D2E5 +:109650001146198690F855204FF0010512F00C0FB5 +:109660004FF4296203D0914200D81146198690F830 +:10967000540010F00C0F04D0988D904200D902468F +:109680009A8583F8265001E0000100202079F0BC83 +:10969000E9F742BC10B5F84C01230921206990F884 +:1096A0006420583003F07AFC38B12169002001F8B9 +:1096B0007C0F087301F8180C10BD0120A07010BDBC +:1096C00070B5ED4D012329462869896990F8642019 +:1096D00009790E2A01D1122903D000241C2A03D0B3 +:1096E00004E0BDE87040D5E7142902D0202A08D054 +:1096F00009E080F8644080F88840BDE8704001F0DF +:1097000003BC162906D0262A01D1162902D0172912 +:1097100009D00CE000F8644F80F8244040782128FC +:109720000CD01A2017E090F86520222A07D0EA69A9 +:10973000002A03D0FF2901D180F88E3112E780F88A +:10974000654001F07DFB286980F87D4090F8AC0110 +:109750000028F3D00020BDE8704041E72DE9F84330 +:10976000C54C206990F86410202909D05FF00007EB +:1097700090F86510222905D07FB300F1640503E05D +:109780000127F5E700F1650510F8961F41F0040187 +:109790000170A06904F0FBFA4FF00108002608B33D +:1097A0003946A069FFF765FDE0B16A46A169206905 +:1097B00003F012FE90B3A06904F0E7FA2169A1F862 +:1097C0009601B1F8581001F014FB40B3206928212C +:1097D00080F8741080F8738058E0FFE70220A070D2 +:1097E000BDE8F883206990F8AC0110B11E20FFF7A6 +:1097F000F7FEAFB1A0692169C07881F8CA0008FA04 +:1098000000F1C1F3006000B9FFDF20690A2180F890 +:10981000641090F8880040B9FFDF06E009E02AE014 +:109820002E7001F00DFBFFF7C8FE206980F87D6007 +:10983000D6E7226992F8AC0170B1B2F8583092F8CC +:109840005410B2F8B00102F5CB7203F0B7FE68B164 +:109850002169252081F86400206900F1650180F804 +:109860007D608D4212D180F865600FE00020FFF727 +:10987000B7FE2E70F0E720699DF8001080F898116F +:109880009DF8011080F8991124202870206900F1BA +:1098900065018D4203D1BDE8F84301F0D1BA80F8EB +:1098A00088609DE770B5744C01230B21206990F806 +:1098B0006520583003F072FB202650BB206901233D +:1098C000002190F86520583003F068FB0125F0B1C5 +:1098D000206990F8640024281BD0A06904F035FAB0 +:1098E000C8B1206990F8961041F0040180F89610F4 +:1098F000A1694A7902F0070280F85120097901F044 +:10990000070180F8501090F8AD311BBB06E0A57040 +:1099100028E6A67026E6BDE870404EE690F8AC3129 +:10992000C3B900F154035E788E4205D11978914293 +:1099300002D180F87D500DE000F5FD710D700288B8 +:109940004A8090F850200A7190F8510048712079AF +:10995000E9F7E2FA2169212081F86500BDE870404D +:1099600001F065BA70B54448006990F84E20448E05 +:10997000C38E418FB0F84050022A23D0A94200D3B1 +:1099800029460186C18FB0F84220914200D311468A +:109990008186018FB0F84420914200D31146418660 +:1099A000818FB0F84620914200D31146C186418E86 +:1099B000A14200D90C464486C18E994200D90B467B +:1099C000C386CFE5028E914200D31146C68F828EA8 +:1099D000964200D23246A94200D329460186B0F809 +:1099E00042108A4200D30A468286002180F84E1037 +:1099F000CFE770B5204C206990F8660010F0300F6A +:109A000004D0A07840F00100A070ABE5A06904F09C +:109A100081F948B32569A06904F078F92887256998 +:109A2000A06904F06FF968872569A06904F070F9EE +:109A3000A8872569A06904F067F9E887A0794FF045 +:109A40000102800703D56069C07814280FD020690F +:109A500090F864101C290AD090F84E10012910D0FB +:109A600090F8A31169B909E0BDE87040A5E5206947 +:109A700080F84E2005E000000001002090F8A211BF +:109A800031B1206910F8661F41F01001017016E035 +:109A900090F8661041F0200180F8661000F5DA7148 +:109AA00003888B86038FCB86438F0B87838F4B87EF +:109AB000C08F888781F832202079E9F72DFABDE838 +:109AC000704001F0B4B970B5FE4C206990F8661092 +:109AD000890707D590F8642001230821583003F046 +:109AE0005DFAE8B1206990F89000800712D4A0696F +:109AF00004F0ECF8216981F89100A06930F8052F95 +:109B0000A1F892204088A1F8940011F8900F40F03D +:109B100002000870206990F89010C90703D00FE088 +:109B20000120A0701EE590F86600800700D5FFDFD9 +:109B3000206910F8661F41F00201017001F077F909 +:109B40002069002590F86410062906D180F8645039 +:109B500080F888502079E9F7DFF9206990F89411AE +:109B60000429DFD180F894512079E9F7D5F92069EB +:109B700090F864100029D5D180F88850F2E470B5CF +:109B8000D04C01230021206990F86520583003F063 +:109B900005FA012578B9206990F86520122A0AD0C3 +:109BA00001230521583003F0F9F910B10820A07005 +:109BB000D8E4A570D6E4206990F88E0008B901F0C9 +:109BC00036F92169A069F03104F061F82169A069D2 +:109BD000C03104F067F8206990F8C80100B1FFDFD8 +:109BE00021690888A1F8CA0101F5E671A06904F0AD +:109BF0003CF82169A06901F5EA7104F03EF820699A +:109C000080F8C851142180F865102079BDE87040B3 +:109C1000E9F782B970B5AB4C01230021206990F8B7 +:109C20006520583003F0BAF90125A8B1A06903F006 +:109C3000E8FF98B1A0692169B0F80D00A1F896017C +:109C4000B1F8581001F0D5F858B12069282180F8F2 +:109C5000741080F8735085E4A57083E4BDE870400B +:109C6000ABE4A0692169027981F89821B0F8052058 +:109C7000A1F89A2103F0B8FF2169A1F89C01A0691D +:109C800003F0B5FF2169A1F89E01A06903F0B6FFBA +:109C90002169A1F8A0010D2081F8650062E47CB57E +:109CA000884CA079C00738D0A06901230521C57868 +:109CB000206990F86520583003F070F968B1AD1E46 +:109CC0000A2D06D2DFE805F0090905050909050591 +:109CD0000909A07840F00800A070A07800281CD1E5 +:109CE000A06903F057FF00287AD0A0690226C57842 +:109CF0001DB1012D01D0162D18D1206990F86400F6 +:109D000003F034F990B1206990F864101F290DD048 +:109D1000202903D0162D16D0A6707CBD262180F8F0 +:109D20006410162D02D02A20FFF75AFC0C2D58D0B3 +:109D30000CDC0C2D54D2DFE805F033301D44A7A70E +:109D4000479E57A736392020A0707CBD0120152DD5 +:109D500075D008DC112D73D0122D69D0132D64D06D +:109D6000142D3DD178E0162D7CD0182D7DD0FF2DFF +:109D700036D183E020690123194690F867205830D6 +:109D800003F00CF9F8B9A06903F068FF216981F8C4 +:109D90007A01072081F8670078E001F03CF975E06E +:109DA000FFF738FF72E001F016F96FE0206990F8D4 +:109DB0006510112901D0A67068E0122180F86510A5 +:109DC00064E0FFF7DCFE61E0206990F86500172889 +:109DD000F1D101F035F821691B2081F8650055E0CB +:109DE00052E0FFF770FE51E0206990F86600C0076E +:109DF00003D0A07840F001001FE06946A06903F09D +:109E00006CFF9DF8000000F02501206900F8961F06 +:109E10009DF8011001F04901417001F008F8206936 +:109E200010F8661F41F0010114E0FFF733FC2DE04C +:109E3000216991F86610490705D5A07026E00EE06B +:109E400016E00FE011E000F0F2FF206910F8661F45 +:109E500041F00401017019E0FFF7CBFD16E001F0BD +:109E600087F813E0FFF71EFD10E0FFF777FC0DE029 +:109E700001F05DF80AE0FFF723FC07E0E16919B1A2 +:109E8000216981F88E0101E0FFF797FB2069F0E975 +:109E90002A12491C42F10002C0E900127CBD70B5D3 +:109EA000084CA07900074DD5A07800284AD1206938 +:109EB00090F8CC00FE2800D1FFDF2069FE2180F859 +:109EC000CC1001E00001002090F865100025192950 +:109ED00006D180F88D5000F0B3FF206980F86550FE +:109EE000206990F864101F2902D0272921D119E098 +:109EF00090F8650003F03AF878B120692621012333 +:109F000080F8641090F865200B21583003F046F873 +:109F100078B92A20FFF764FB0BE02169202081F843 +:109F2000640006E0012180F88D1180F8645080F80B +:109F30008850206990F86710082903D10221217008 +:109F400080F8CC10E4E4F949096991F898210AB93C +:109F500091F8542081F8542091F899210AB991F888 +:109F6000552081F85520002802D00020FFF738BB8B +:109F7000704770B5ED4C06460D46206990F8CC0050 +:109F8000FE2800D0FFDF2269002082F8CC6015B1E6 +:109F9000A2F88A00BCE422F8840F01201071B7E413 +:109FA00070B5E24C01230021206990F864205830FC +:109FB00002F0F4FF00287AD0206990F8A21111B1C4 +:109FC00090F8A31139B190F8AC1100296ED090F837 +:109FD000AD1111B36AE090F8651024291BD090F8F8 +:109FE0006410242917D0002300F5CC7200F5D1713C +:109FF00003F084F82169002081F8A20101461420B1 +:10A00000FFF7B7FF206930F8421FA0F88C10818855 +:10A01000A0F88E1050E00123E6E790F865200123B8 +:10A020000B21583002F0BAFF68BB206990F8540049 +:10A0300000F0EBFE0646206990F8550000F0E5FEC2 +:10A040000546206990F8AE113046FFF7FFF8D8B109 +:10A05000206990F8AF112846FFF7F8F8A0B12269FF +:10A06000B2F8583092F85410B2F8B00102F5CB7241 +:10A0700003F0A4FA20B12169252081F864001BE0D7 +:10A080000020FFF7ADFA11E020690123032190F8C9 +:10A090006520583002F082FF40B920690123022177 +:10A0A00090F86520583002F079FF08B100202FE4C5 +:10A0B00000211620FFF75DFF012029E410B5E8BB61 +:10A0C0009A4C206990F86610CA0702D00121092035 +:10A0D00052E08A070AD501210C20FFF74AFF2069C8 +:10A0E00010F8901F41F00101017047E04A0702D5C6 +:10A0F0000121132040E00A0705D510F8C91F41715E +:10A100000121072038E011F0300F3BD090F8A31167 +:10A11000A1B990F8A211E1B190F8651024292FD0CF +:10A1200090F8641024292BD05FF0000300F5CC7266 +:10A1300000F5D17102F0E2FF206900E022E010F8A2 +:10A14000661F21F0200141F010010170002180F80C +:10A150003C11206990F86600C00613D5FFF702FC99 +:10A1600000F0D2FE206930F8421FA0F88C108188E0 +:10A17000A0F88E1001211520FFF7FBFE012010BD75 +:10A180000123D3E7002010BD70B5684C206990F81A +:10A19000CC10FE2978D1A178002975D190F86720DC +:10A1A00001231946583002F0F9FE00286CD12069CD +:10A1B00090F8781149B10021A0F8821090F8791137 +:10A1C00080F8CE10002102205BE090F8652001238A +:10A1D0000421583002F0E2FE0546FFF76FFF002829 +:10A1E00052D1284600F07BFF00284DD12069012381 +:10A1F000002190F86420583002F0D0FE78B1206938 +:10A200000123042190F86520583002F0C7FE30B9D0 +:10A21000206990F87C0010B10021122031E0206903 +:10A2200090F864200A2A0DD0002D2DD101230021A1 +:10A23000583002F0B3FE78B1206990F894110429E7 +:10A240000AD105E010F8CA1F01710021072018E0AB +:10A2500090F89000800718D0FFF7A2FE002813D1D5 +:10A2600020690123002190F86420583002F096FE06 +:10A27000002809D0206990F88C01002804D0002122 +:10A28000FF20BDE8704074E609E000210C20FFF7D4 +:10A2900070FE206910F8901F41F00101017041E447 +:10A2A0003EB505466846FDF702FC00B9FFDF2221F6 +:10A2B00000980BF0E2F90321009803F053FC00989A +:10A2C000017821F010010170294603F070FC174C51 +:10A2D0000D2D43D00BDCA5F102050B2D19D2DFE8C3 +:10A2E00005F01F184A19191F185518192700152DA0 +:10A2F0005DD008DC112D28D0122D0BD0132D09D0E4 +:10A30000142D06D153E0162D2CD0172D68D0FF2D1B +:10A3100072D0FFDFFDF7DEFB002800D1FFDF3EBD7E +:10A320002169009891F8CE101AE000000001002089 +:10A33000E26800981178017191884171090A817170 +:10A340005188C171090A0172E4E70321009803F002 +:10A3500038FD0621009803F038FDDBE70098062160 +:10A360000171D7E70098216991F8AE21027191F847 +:10A37000AF114171CEE721690098F83103F096FCE6 +:10A3800021690098C43103F09BFCC3E7F849D1E987 +:10A390000001CDE90101206901A990F8960000F0C3 +:10A3A00025008DF80400009803F0C5FCB2E7206991 +:10A3B000B0F84410009803F095FC2069B0F8D01074 +:10A3C000009803F093FC2069B0F84010009803F067 +:10A3D00091FC2069B0F8CE10009803F08FFC99E74B +:10A3E000216991F8AC0100280098BDD111F8542FD3 +:10A3F00002714978BDE7FFE7206990F88F21D0F816 +:10A400009011009803F0E1FB84E7DA4810B5006989 +:10A4100090F86A1041B990F8652001230621583060 +:10A4200002F0BCFD002800D0012010BD70B5D14D58 +:10A43000286990F8681039B1012905D0022906D0A1 +:10A44000032904D0FFDF06E4B0F8DC1037E090F811 +:10A450006710082936D0B0F87E10B0F880200024AC +:10A460008B1C9A4206D3511A891E0C04240C01D06D +:10A47000641EA4B290F87C1039B190F864200123D6 +:10A480000921583002F08AFD40B3FFF7BEFF78B1D2 +:10A4900029690020B1F87820B1F876108B1C9A4217 +:10A4A00003D3501A801E00D0401EA04200D284B2B6 +:10A4B0000CB1641EA4B22869B0F8DC102144A0F8E5 +:10A4C000D8103FE5B0F87E100329BDD330F8581FEF +:10A4D000028D1144491CA0F8801033E50024EAE7FE +:10A4E00070B50C4605464FF4027120460BF0E7F8B4 +:10A4F000258027E5F8F787BB2DE9F0410D46074693 +:10A500000721F8F777FA041E3CD094F8B40100262E +:10A51000A8B16E70092028700BE0268484F8B4611D +:10A52000D4F8B6016860D4F8BA01A860B4F8BE01E6 +:10A53000A88194F8B4010028EFD12E71BAE094F804 +:10A54000C00190B394F8C0010D2813D00E2801D09B +:10A55000FFDFAFE02088F8F77FFB0746F8F72BF81E +:10A5600078B96E700E20287094F8C2012871208886 +:10A57000E88014E02088F8F76FFB0746F8F71BF82F +:10A5800010B10020BDE8F0816E700D20287094F8A5 +:10A59000C20128712088E88094F8C601287284F8E6 +:10A5A000C0613846F8F701F884E0FFE794F8F80155 +:10A5B00030B16E701020287084F8F861AF8079E0B7 +:10A5C00094F8C80190B16E700A2028702088A88085 +:10A5D000D4F8CC11C5F80610D4F8D011C5F80A107B +:10A5E000B4F8D401E88184F8C86163E094F8D60136 +:10A5F00040B16E701A202870B4F8D801A88084F891 +:10A60000D66157E094F8F20170B16E701B2028708B +:10A6100005E000BF84F8F261D4F8F401686094F8B2 +:10A62000F2010028F6D145E094F8DA0190B16E709D +:10A630001520287004F5EE7707E000BF84F8DA6192 +:10A640000A223946281D0AF0DEFF94F8DA010028B4 +:10A65000F4D12FE094F8E60158B16E701D202870F7 +:10A6600084F8E6610A2204F5F471281D0AF0CBFF94 +:10A6700020E094F8FA0138B11E20287084F8FA61BD +:10A68000D4F8FC01686015E094F8000200283FF45B +:10A6900079AF6E701620287008E000BF84F8006261 +:10A6A000D4F802026860B4F80602288194F8000227 +:10A6B0000028F3D1012065E72E480021C161016225 +:10A6C0000846704730B52B4D0C46E860FFF7F4FFA5 +:10A6D00000B1FFDF2C7130BD002180F8641080F8DC +:10A6E000651080F8681090F8E61009B1022100E0CA +:10A6F0000321FEF717BC2DE9F0411E4C05462069E9 +:10A7000009B1002104E0B0F8EE10B0F8DE201144E9 +:10A71000A0F8EE1090F8781139B990F8672001236D +:10A720001946583002F03AFC30B1206930F8821FE7 +:10A73000B0F85C2011440180206990F8883033B172 +:10A74000B0F88410B0F8DE201144A0F8841090F91D +:10A750008C70002F06DDB0F88A10B0F8DE201144AE +:10A76000A0F88A1001213D2635B180F8746017E009 +:10A77000705C0200000100202278022A0AD0012A1F +:10A7800011D0A2782AB380F8731012F0140F0DD0F4 +:10A790001E2113E090F8CE20062A3CD016223AE083 +:10A7A00080F8731044E090F87A2134E0110702D564 +:10A7B00080F874603CE0910603D5232180F8741082 +:10A7C00036E0900700D1FFDF21692A2081F874006C +:10A7D0002AE02BB1B0F88420B0F886309A4210D22B +:10A7E000002F05DDB0F88A20B0F886309A4208D2F2 +:10A7F000B0F88230B0F88020934204D390F87831DA +:10A800000BB1222207E090F868303BB1B0F87E30FF +:10A81000934209D3082280F87420C1E7B0F87E2063 +:10A82000062A01D33E22F6E7206990F8731019B189 +:10A830002069BDE8F0414FE7BDE8F0410021FEF797 +:10A8400071BB2DE9F047FA4C81460D46206900881E +:10A85000F8F714FA060000D1FFDFA0782843A070B3 +:10A86000A0794FF000058006206904D5A0F87E503D +:10A8700080F8EC5003E030F87E1F491C0180FFF7A0 +:10A88000C4FD012740B3E088000506D5206990F893 +:10A890006A1011B1A0F876501EE02069B0F8761069 +:10A8A000491C89B2A0F87610B0F878208A4201D30A +:10A8B000531A00E00023B4F808C00CF1050C6345FE +:10A8C00001D880F87C70914206D3A0F8765080F8C9 +:10A8D000F8712079E8F720FBA0794FF0020810F01A +:10A8E000600F0ED0206990F8681011B1032908D1CB +:10A8F00002E080F8687001E080F868800121FEF7CE +:10A9000011FB206990F86810012904D1E188C9057C +:10A9100001D580F86880B9F1000F71D1E18889050F +:10A9200002D5A0F8005104E0B0F80011491CA0F8CD +:10A93000001100F09BFBFEF7DAFCFFF725FC00F0AE +:10A9400057FF0028206902D0A0F8E05003E030F85B +:10A95000E01F491C018000F04EFF38B1216991F8D9 +:10A96000EC00022807D8401C81F8EC00206990F820 +:10A97000EC00022804D9206920F8E05F45800573C7 +:10A9800020690123002190F86520583002F006FB71 +:10A9900020B9206990F865000C2859D1206901235D +:10A9A000002190F86420583002F0F8FA48B320698A +:10A9B0000123002190F86720583002F0EFFA00B32D +:10A9C000206990F86810022942D190F8EC00C0B9D3 +:10A9D0003046F7F7C0FBA0B1216991F8CC00FE2802 +:10A9E00036D1B1F8DA00012832D981F8E570B1F832 +:10A9F0008000B1F87E20831E9A4203DB012004E030 +:10AA000032E025E0801A401E80B2B1F8E0202389B0 +:10AA10009A4201D3012202E09A1A521C92B2904249 +:10AA200000D91046012801D181F8E55091F8702134 +:10AA300092B1B1F8E220B1F872118A4201D301213A +:10AA400002E0891A491C89B2884205D9084603E008 +:10AA50002169012081F8E5502169B1F8582010449E +:10AA6000A1F8DC00FFF7E2FCE088C0F34021484693 +:10AA7000FFF741FE206980F8E650BDE8F047FDF79A +:10AA80004BB86B4902468878CB78184312D10846F8 +:10AA9000006942B18979090703D590F86700082851 +:10AAA00008D001207047B0F84810028E914201D8BA +:10AAB000FEF782B90020704770B55D4C05460E4622 +:10AAC000E0882843E080A80703D5E80700D0FFDF2F +:10AAD0006661EA074FF000014FF001001AD0A6614D +:10AAE000F278062A02D00B2A14D10AE0226992F8E1 +:10AAF0006530172B0ED10023E2E9283302F8370C1A +:10AB000008E0226992F86530112B03D182F86910B0 +:10AB100082F88E00AA0718D56269D278052A02D079 +:10AB20000B2A12D10AE0216991F86520152A0CD16F +:10AB30000022E1E92A2201F83E0C06E0206990F8A3 +:10AB40006520102A01D180F86A10280601D5082056 +:10AB5000E07078E42DE9F84F354C00254FF00108FE +:10AB6000E580A570E5704146257061F3070220611C +:10AB70009246814680F8E6800088F8F77FF8070063 +:10AB800000D1FFDF20690088FCF78EFF2069008874 +:10AB9000FCF7B0FF2069B0F8DA1071B190F8CC1072 +:10ABA000FE290FD190F8781191B190F86720012318 +:10ABB0001946583002F0F2F980B1206990F8CC00C3 +:10ABC000FE2805D0206990F8CC0000BFFFF768FB95 +:10ABD000206990F8E71089B1258118E02069A0F874 +:10ABE000825090F8791180F8CE1000210220FFF7F2 +:10ABF000C0F9206980F8E5500220E7E790F8B41129 +:10AC000019B9018C8288914200D881882181B0F8DD +:10AC1000DE10491E8EB2B0F8E0103144A0F8E0100A +:10AC200090F8E41031B1A0F8E25080F8E45006E06A +:10AC300000010020B0F8E2103144A0F8E21030F832 +:10AC40007E1F31440180FFF7E0FB20B1206930F81E +:10AC5000761F314401802069B0F8DA10012902D84A +:10AC6000491CA0F8DA100EB180F8EC5090F8E5100D +:10AC7000A1B1B0F8E000218988420FD23846F7F739 +:10AC80006AFA58B1206990F8701139B1B0F8E21041 +:10AC9000B0F87201814201D300F0B0FD206980F864 +:10ACA000E55090F865100B2901D00C2916D1B0F8A9 +:10ACB0005820B0F89631D21A12B2002A0EDBD0F822 +:10ACC0009811816090F89C110173022101F045FDFB +:10ACD000206980F8655080F8988026E0242910D1FA +:10ACE000B0F85810B0F89621891A09B2002908DB8B +:10ACF00090F8AC01FFF727F9206900F8655F057649 +:10AD000013E090F86410242901D025290DD1B0F862 +:10AD10005810B0F89601081A00B2002805DB01208F +:10AD2000FFF711F9206980F8645020690146B0F8F6 +:10AD3000DE20583001F0E9FE206990F8701109B169 +:10AD4000A0F8E250F9480090F94BFA4A49465046BB +:10AD500000F0AEFC216A11B16078FCF7F3F92069CC +:10AD60000123052190F86520583002F017F90028DA +:10AD700003D0BDE8F84F00F036BABDE8F88F00F018 +:10AD80001DBDED49C8617047EB48C069002800D07F +:10AD900001207047E84A50701162704710B50446B0 +:10ADA000B0F89C214388B0F89E11B0F8A0019A42F7 +:10ADB00005D1A388994202D1E38898420FD0238815 +:10ADC000A4F8B831A4F8BA21A4F8BC11A4F8BE01C3 +:10ADD000012084F8B401D8480079E8F79DF80121F2 +:10ADE000204601F0BAFC002004F8650F0320E07053 +:10ADF00010BD401A00B247F6FE71884201DC0028FF +:10AE000001DC012070470020704710B5012808D0F0 +:10AE1000022808D0042808D0082806D0FFDF2046E2 +:10AE200010BD0124FBE70224F9E70324F7E7C24839 +:10AE30000021006920F88A1F8178491C81707047C1 +:10AE4000BD4800B5016911F88C0F401E40B2087072 +:10AE5000002800DAFFDF00BDB7482721006980F82D +:10AE60006410002180F88C11704710B5B24C206935 +:10AE700090F89411042916D190F864200123002140 +:10AE8000583002F08BF800B9FFDF206990F890107D +:10AE9000890703D4062180F8641004E0002180F8BB +:10AEA000881080F89411206990F86600800707D513 +:10AEB000FFF7C6FF206910F8661F21F0020101703C +:10AEC00010BD9D4910B5096991F864200A2A09D17D +:10AED00091F8CA20824205D1002081F8640081F8EF +:10AEE000880010BD91F86620130706D522F00800EF +:10AEF00081F86600BDE81040A2E7FF2801D0FFDF1F +:10AF000010BDBDE81040A7E710B58B4C05212069A6 +:10AF1000FEF708F8206990F84E10012903D0BDE82B +:10AF20001040FEF77EBB022180F84E1010BD10B518 +:10AF3000814C206910F8961F41F004010170A0694E +:10AF400002F041FF162806D1206990F864002028FD +:10AF500002D0262805D010BDA06902F038FFFEF708 +:10AF60003FFB2169002081F8640081F8880010BD52 +:10AF700070B5714C01230A21206990F86420583083 +:10AF800002F00CF810B3A06902F0C4FEA8B1256964 +:10AF9000A06902F0BBFE28872569A06902F0B2FE15 +:10AFA00068872569A06902F0B3FEA8872569A069B2 +:10AFB00002F0AAFEE887FEF7D5FC2169002081F89F +:10AFC000880081F86400BDE870409DE7A07840F0FB +:10AFD0000100A070BDE510B5574C01230021206988 +:10AFE00090F86520583001F0D9FF30B1FFF71FFF0E +:10AFF0002169102081F8650010BD20690123052119 +:10B0000090F86520583001F0C9FF08B1082000E031 +:10B010000120A07010BD70B5474C012300212069AC +:10B0200090F86520583001F0B9FF012588B1A0697A +:10B0300002F011FE2169A1F89601B1F85810FFF74E +:10B04000D8FE40B12069282180F8741080F8735030 +:10B050007FE5A5707DE52169A06901F5CC7102F05D +:10B06000F5FD21690B2081F8650072E510B5FEF74A +:10B0700016FFFEF714FE304CA079400708D5A078E3 +:10B0800030B9206990F86700072801D101202070AD +:10B09000FEF7CAF9A079C00609D5A07838B92069A9 +:10B0A00090F865100B2902D10C2180F86510E0782A +:10B0B00000070ED520690123052190F8652058303E +:10B0C00001F06CFF30B10820A0702169002081F8E8 +:10B0D000C00110BDBDE81040002000F093BB10B5CA +:10B0E000154C216991F86520F8B1102A06D0142A70 +:10B0F00007D0152A22D01B2A34D122E001210B20AF +:10B1000021E0FAF797FE0C281FD320690821F830B8 +:10B11000FAF794FE28B120690421C430FAF78EFEB4 +:10B1200000B9FFDF012104200DE010E043A8010079 +:10B1300083AA0100B9AA01000001002000F017F85D +:10B1400003E001210620FEF714FF012010BD212A93 +:10B1500008D191F87D0038B991F8AC0110B191F89F +:10B16000AD0108B1002010BD01211720EBE770B53B +:10B17000174C0025206990F87B1101290AD002297B +:10B1800025D190F88E10A9B1062180F8CE100121AA +:10B19000022017E090F8C011002918D100F1B00387 +:10B1A00000F1F001002200F5BE7001F071FE0121F6 +:10B1B000052007E090F89600400701D5112000E037 +:10B1C0000D200121FEF7D5FE206980F87B51C0E4F7 +:10B1D0000001002030B5FA4C05462078002818BF41 +:10B1E000FFDF257230BDF6490120C87170472DE997 +:10B1F000F14FF44E30464068044600F1580990F88B +:10B20000551001F0D2FF94F85510658E80B20829D0 +:10B210006CD001F0A8FF854238BF284600F0FF0837 +:10B22000DFF89CA3E848CAF824007768384697F806 +:10B230006AB07D8E97F8551001F0B7FF97F855105A +:10B2400080B2082956D001F08EFF854238BF2846CB +:10B25000BBF1000F1CBF001D80B2C0B297F85510A3 +:10B26000FBF770FB99F81200002847D009F158014C +:10B27000D54891E80E1000F5027585E80E10D9F852 +:10B280006810C0F82112D9F86C10C0F8251200F52A +:10B290008170FBF7BCFE307800280CBF0120002035 +:10B2A00080F00101C9480176D9E91412C0E90412FD +:10B2B000A0F58372DAF82410FBF7DBF994F8550057 +:10B2C000012808BF00220CD0022808BF012208D0A4 +:10B2D000042808BF032204D008281ABFFFDF002279 +:10B2E000022241460120FBF7DFF90DE0042101F0C5 +:10B2F0003AFF90E7042101F036FFA6E7DAF82400D0 +:10B30000FBF785FEFBF7FCF9009850B994F855005F +:10B3100094F8561010F00C0F08BF00219620FBF790 +:10B3200097FE94F8542001210020FBF779FF94F850 +:10B330002C00012808BFFBF743FF02208AF8000019 +:10B34000FCF74CFB002818BFFFDFBDE8F88F2DE9A4 +:10B35000F04FDFF870A28BB050469AF80020416899 +:10B360001438049091F85D0001F158050C464FF037 +:10B3700008080127AAF13406A0B3012800F00681CD +:10B38000022800F00781032818BFFFDF00F01081BA +:10B39000306A0423017821F008010170AA7908EAD3 +:10B3A000C202114321F004010170EA7903EA82022A +:10B3B000114321F01001017095F80590F06AF6F73D +:10B3C000DAFE8046FCF7BAFBB9F1020F00F000810B +:10B3D000B9F1010F00F00081B9F1030F00F0008115 +:10B3E00000F003B9FFE72B7B4FF002094FF0000B91 +:10B3F000242B1CBF95F80DC0BCF1240F07D01F2BC8 +:10B4000018BF202B2AD0BCF1220F4DD077E091F845 +:10B41000540092B191F89811002974D0082818BFEF +:10B42000042869D0082918BF042965D0012818BF4D +:10B43000012953D04FF0020065E091F8FA1000297D +:10B4400061D0082818BF042856D0082918BF04293D +:10B4500052D0012818BF012940D0EBE7BCF1220FE0 +:10B4600022D0002A4BD091F8540091F8AE1111F07F +:10B47000040F18BF41460CD0082818BF04283BD041 +:10B48000082918BF042937D0012818BF012925D061 +:10B49000D0E711F0010F18BF3946EDD111F0020FBE +:10B4A00018BF4946E8D12EE04AB391F8540091F80C +:10B4B000AE2191F8511002EA010111F0040F18BFFA +:10B4C00041460ED0082818BF042815D0082918BFF7 +:10B4D000042911D0012818BF0129ABD14FF0010078 +:10B4E00011E011F0010F18BF3946EBD111F0020F36 +:10B4F00018BF4946E6D106E04FF0080003E091F896 +:10B5000054000428F8D001460290204601F058FE6D +:10B5100080B2029901F027FE218E814238BF084691 +:10B52000ADF80C00A4F848000498FCF7E6FA60B106 +:10B53000B289316A42F48062B28172694FF48060EC +:10B54000904703206871EF7022E709AA03A9F06A07 +:10B55000F6F74CFD306210B195F8351021B1049822 +:10B56000FCF79FFA6F7113E79DF8241031B9A0F82A +:10B5700000B080F802B0012102F0F4FABDF80C101E +:10B58000306A02F026FC85F8059001E70498FCF784 +:10B5900088FAFDE6B4F84800ADF8080009AA02A947 +:10B5A000F06AF6F723FD3062002808BFFFDFEFE600 +:10B5B0000498FCF7A2FA002808BFFFDFE8E60000C5 +:10B5C0002401002058010020E00C0020E80E00209B +:10B5D00030EA080009D106E030EA080005D102E0AF +:10B5E000B8F1000F01D0012100E00021306A02789B +:10B5F00042EA01110170697C00291CBF69790129A7 +:10B600003DD005F15801FD4891E80E1000F5027893 +:10B6100088E80E10A96EC0F82112E96EC0F8251254 +:10B6200000F58170FBF7F3FC9AF8000000280CBFCE +:10B6300001200020F2490876D5E91202C1E904028E +:10B64000A1F5837101F58370326AFBF712F894F863 +:10B650005400012808BF00220CD0022808BF012294 +:10B6600008D0042808BF032204D008281ABFFFDF2F +:10B6700000220222FB210020FBF716F803E0FBF773 +:10B68000C6FCFBF73DF8012194F855200846FBF76E +:10B69000C7FD3771306A018831828078B0743770A5 +:10B6A000FCF7A5F9002818BFFFDF0BB0BDE8F08F4D +:10B6B0002DE9F047D34C8146DDF8208020781E46E6 +:10B6C00017460D4628B9002F1CBF002EB8F1000FF9 +:10B6D00000D1FFDFC4F81C80C4E90D95C4E90576EC +:10B6E0004FF00000E071A071E070A07020716071F7 +:10B6F000C54EA081E081307805F158072888F7F71A +:10B70000BDFAE0622888F7F7A7FA2063FBF73EF955 +:10B7100095F95700FBF7DFF905F11200FBF75AFC2A +:10B7200005F10E00FBF7DDF9307800280CBF03208F +:10B730000120FBF769FCB87EFBF7DBF9FBF75EFC49 +:10B740003078002804BFFF2095F8544019D0BF7C02 +:10B750006C8E95F85510284601F027FD95F8551088 +:10B7600080B208291FD001F0FEFC014620468C4221 +:10B7700028BF0846002F1CBF001D80B2C0B295F83C +:10B7800055402146FBF7DEF83078214680B1012094 +:10B79000FBF7A3FA7068D0F8E800FBF73BFCBDE8C4 +:10B7A000F047012023E5042101F0DDFC0146DDE73F +:10B7B0000020FBF792FABDE8F047C8E5924800B5D3 +:10B7C00001783438007819B1022818BFFFDF00BDB6 +:10B7D000012818BFFFDF00BD8A4810B50078022895 +:10B7E00018BFFFDFBDE8104000F034BA00F032BAF5 +:10B7F0008448007970478348C078704781490120A8 +:10B80000487170472DE9F04706007F487D4D40683C +:10B8100000F15804686A90F8019018BF012E03D116 +:10B82000296B09F069FB6870687800274FF0010800 +:10B83000A0B101283CD0022860D003281CBFFFDF44 +:10B84000BDE8F087012E08BFBDE8F087286BF6F74A +:10B8500087FE287ABDE8F047E7F75EBB012E14D0DB +:10B86000A86A002808BFFFDF6889C21CD5E9091053 +:10B8700009F084FEA86A686201224946286BF6F73F +:10B88000EBFC022E08BFBDE8F087D4E91401401C90 +:10B8900041F10001C4E91401E079012801D1E77107 +:10B8A00001E084F80780287ABDE8F047E7F734BB69 +:10B8B000012E14D0A86A002808BFFFDF6889C21CC7 +:10B8C000D5E9091009F05AFEA86A686200224946C3 +:10B8D000286BF6F7C1FC022E08BFBDE8F087D4E95B +:10B8E0001410491C40F10000C4E91410E07901284B +:10B8F0000CBFE77184F80780BDE8F087012E06D001 +:10B90000286BF6F72DFE022E08BFBDE8F087D4E9BC +:10B910001410491C40F10000C4E91410E07901281A +:10B92000BFD1BCE770B5384E3046A6F1340440684C +:10B9300000F158052078012818BFFFDFA87868B10A +:10B940000021A970A289042042F00402A281626948 +:10B950009047307800281CBF01202871216A0322FB +:10B96000087832EA000009D1A28912F4806F05D06C +:10B9700042F00202A2816269022090470121002068 +:10B9800000F087F918B1BDE8704000F063B9BDE878 +:10B99000704000202BE42DE9F14F1B4E002730466C +:10B9A000A6F134054068317800F1580A2878B84685 +:10B9B000022818BFFFDFE88940F40070E881716851 +:10B9C0003078FF2091F85410FAF7BCFF0098002857 +:10B9D0009AF8120000F00681FAF7B7FEFAF7A5FE12 +:10B9E0004FF00109E0B99AF81200C8B1686A4178CD +:10B9F000B1B10078C0F3C00008E00000E00C002006 +:10BA0000E80E002024010020580100209AF80710B9 +:10BA1000884205D185F80290BDE8F84F00F01AB9C8 +:10BA2000686A41786981002908BFAF6203D0286B3A +:10BA3000F6F7CCFBA862E88940F02000E881EF70BF +:10BA40003078706800F15804834690F82C00012883 +:10BA50001AD1FBF7ABFB2146584601F05AFA98B1D0 +:10BA60003078002870680CBF00F58E7000F5F97012 +:10BA7000BBF800104180217A0171617A417180F830 +:10BA80000090287AE7F748FA686A9AF80610007872 +:10BA9000C0F3800088423BD03078706800F15804D1 +:10BAA00090F85D0000282FD002284BD067713078C5 +:10BAB00000281CBF2079002809D02771AA8939469F +:10BAC00042F01002AA816A694FF010009047E078B6 +:10BAD000A0B1E770FCF720F8002808BFFFDF0820BE +:10BAE000AA89002142F00802AA816A699047D4E934 +:10BAF0001202411C42F10000C4E91210A079012891 +:10BB00000CBFA77184F80690E88940F48070E88142 +:10BB1000696A9AF807300878C0F3C0029A424ED199 +:10BB20003278726800F0030002F15804012818BF4F +:10BB300002282DD003281CBFA87940F0040012D0A1 +:10BB4000A8713CE0E86AF6F77DFA002808BFFFDF3D +:10BB5000D4E91202411C42F10000C4E91210287A13 +:10BB6000E7F7DAF9A2E784F80290EA89484642F456 +:10BB70000062EA81AA8942F00102AA816A699047BB +:10BB8000E079012801D1E77119E084F8079016E007 +:10BB9000487818B3E98941F40061E981A96A71B173 +:10BBA000FB2884BFA87940F01000C9D8E8790028A4 +:10BBB00008BFC84603D080206A6900219047012051 +:10BBC000009900F066F8B0B1B8F1000F1CBF00207A +:10BBD000FFF718FEBDE8F84F00F03CB8E079012807 +:10BBE000D3D1D0E7002818BFFAF7E7FDE88940F085 +:10BBF0004000E881E3E7B8F1000F1CBF0120FFF728 +:10BC000001FEFFF7A4FBB8F1000F08BFBDE8F88FF5 +:10BC10000220BDE8F84FF5E570B50D4606463D48F3 +:10BC20003C4900784C6850B1FAF724FE034694F87A +:10BC3000542029463046BDE87040FDF76DBAFAF74A +:10BC400019FE034694F8542029463046BDE870405A +:10BC500006F091B92F4910B54C68FBF786FAFBF74F +:10BC600065FAFBF73DF9FBF7BBF9FAF749FD94F8E4 +:10BC70002C00012808BFFBF799FA274C00216269C4 +:10BC8000E0899047E269A179A07890470020207070 +:10BC900010BD70B5204C0546002908BF012D06D106 +:10BCA000E07800F10100C0B2E07001282ED8A1694F +:10BCB00028468847002829D06179184839B1012DD4 +:10BCC00001BF41780029017811F0100F1ED0A17931 +:10BCD000E1B910490978002908BF012D01D091B1BF +:10BCE0008DB90F49097811F0100F04BF007810F0DA +:10BCF000100F0BD0A08948B9A06A20B9608910B193 +:10BD000011F0100F02D04FF0000070BD4FF0010095 +:10BD100070BD00005801002024010020E00C00202C +:10BD200034010020FE498A78824286BF084490F898 +:10BD300043010020704710B540F2D311F84809F0D4 +:10BD40009CFCFF220821F74809F08FFCF6480021EF +:10BD5000417081704FF46171818010BD2DE9F04117 +:10BD60000E46054600F0ADFBED4C102816D004EB56 +:10BD7000C00191F85A0110F0010F1CBF0120BDE86D +:10BD8000F081607808283CBF012081F85A011CD25C +:10BD90006078401C60700120BDE8F0816078082860 +:10BDA00013D222780127501C207004EBC20830689F +:10BDB000C8F85401B088A8F85801102A28BFFFDF3E +:10BDC00088F8535188F85A71E2E70020BDE8F08105 +:10BDD000D54988707047D4488078704770B4D0488F +:10BDE00000250178491E4BB2002B46DB00EBC30156 +:10BDF00091F85A1111F0010F3BD04278D9B2521E7E +:10BE0000427000EBC10282F85A5190F802C0002241 +:10BE1000BCF1000F0BD9841894F803618E4202D153 +:10BE2000102A26D103E0521CD2B29445F3D80278EE +:10BE3000521ED2B202708A421BD000EBC20200EB4B +:10BE4000C10CD2F85341CCF85341D2F85721CCF869 +:10BE50005721847890F800C00022002C09D9861858 +:10BE600096F8036166450CD1102A1CBF024482F883 +:10BE70000311591E4BB2002BB8DAAB48857070BC69 +:10BE80007047521CD2B29442E9D8F2E7A4498A78AA +:10BE9000824286BF01EB0010C01C002070472DE9D4 +:10BEA000F04101261F4690463446002500F009FB6C +:10BEB00010282AD09A494FF0000C01EBC00292F8EA +:10BEC0005A2102F001058A78002A1ED901EB0C03E1 +:10BED00093F8033183421FD1BCF1100F15D0002F0E +:10BEE00018BF87F800C0887860450ED901EB0C10A8 +:10BEF00010F1030F09D001EB0C0090F84B4190F8C2 +:10BF00003B0101280CBF0126002648EA050046EA4D +:10BF100004010840BDE8F0810CF1010303F0FF0CBF +:10BF20006245D3D8F1E72DE9F05F1F4690460E46F3 +:10BF3000814600F0C6FA7A4D044610283CD00146EE +:10BF4000AB780020002B0ED92A1892F803218A42E0 +:10BF500005D110281CBF1220BDE8F09F03E0401C53 +:10BF6000C0B28342F0D8082B3FD2102C27D0AE7835 +:10BF70001022701CA87005EB061909F10300414658 +:10BF800000F06CFF09F183001022394600F066FFD3 +:10BF90001021384600F03FFF3544102185F8430159 +:10BFA000404600F038FF85F84B0185F8034100203A +:10BFB00085F83B01BDE8F09FAB78082B15D22C78B3 +:10BFC000CA46601C287005EBC4093068C9F85401E2 +:10BFD000B0884FF0000BA9F85801102C28BFFFDFE4 +:10BFE00089F853A189F85AB1C1E70720BDE8F09F4D +:10BFF00070B44B488178491E4BB2002BBCBF70BC5B +:10C00000704700BF817803F0FF0C491ECAB28270EE +:10C0100050FA83F191F8031194453ED000EB0215DC +:10C0200000EB0C14D5F80360C4F80360D5F8076082 +:10C03000C4F80760D5F80B60C4F80B60D5F80F6042 +:10C04000C4F80F60D5F88360C4F88360D5F88760C2 +:10C05000C4F88760D5F88B60C4F88B60D5F88F5032 +:10C06000C4F88F50851800EB0C0402EB420295F8DF +:10C0700003610CEB4C0C00EB420284F8036100EB13 +:10C080004C0CD2F80B61CCF80B61B2F80F21ACF874 +:10C090000F2195F83B2184F83B2100EBC10292F877 +:10C0A0005A2112F0010F33D190F802C00022BCF1E6 +:10C0B000000F0BD9841894F803518D4202D1102A35 +:10C0C00026D103E0521CD2B29445F3D80278521E16 +:10C0D000D2B202708A421BD000EBC20200EBC10C4C +:10C0E000D2F85341CCF85341D2F85721CCF857211C +:10C0F000847890F800C00022002C09D9851895F8A2 +:10C100000351654512D1102A1CBF024482F8031165 +:10C11000591E4BB2002BBFF675AF70BC70470000C4 +:10C12000100F00206C01002060010020521CD2B2D0 +:10C130009442E3D8ECE7FE4948707047FC484078E9 +:10C14000704738B14AF2B811884203D8F84988805C +:10C150000120704700207047F5488088704710B56F +:10C1600000F0AFF9102814D0F24A0146002092F8EE +:10C1700002C0BCF1000F0CD9131893F803318B42A5 +:10C1800003D1102818BF10BD03E0401CC0B2844585 +:10C19000F2D8082010BDE7498A78824286BF01EBB9 +:10C1A0000010833000207047E24B93F802C08445B2 +:10C1B0009CBF00207047184490F8030103EBC000B7 +:10C1C00090F853310B70D0F854111160B0F8580149 +:10C1D000908001207047D74A114491F80321D44937 +:10C1E0000A700268C1F8062080884881704770B5DF +:10C1F00016460C460546FAF7CEFFFAF796F9CC48F4 +:10C20000407868B1CB48817851B12A19002E0CBF13 +:10C210008330C01CFAF763F9FAF7AAF9012070BD60 +:10C22000002070BD10B5FAF7D1F9002804BFFF2037 +:10C2300010BDBDE81040FAF7EFB9FAF7C7B9BD492C +:10C240008A7882429CBF00207047084490F803011E +:10C2500001EBC00090F85A0100F0010070472DE991 +:10C26000F047B44E00273D46307800288CBFDFF8F9 +:10C27000C882BDE8F0870024B078002808D93119B9 +:10C2800091F80321AA4204D0611CCCB2A042F6D896 +:10C290001024A04286BF06EB0410C01C002006EB51 +:10C2A000C50999F85A1111F0010F16D050B1102C90 +:10C2B00004D0311991F83B11012903D0102100F06D +:10C2C000AAFD50B108F8074038467B1C99F8532165 +:10C2D00009F5AA71DFB2FAF7D6FB681CC5B230784F +:10C2E000A842C8D8BDE8F0872DE9F041914C00265E +:10C2F0003546A07800288CBF8F4FBDE8F0816119CA +:10C30000C0B291F80381A84286BF04EB0510C01C9F +:10C31000002091F83B11012903D0102100F07BFD92 +:10C3200058B104EBC800BD5590F8532100F5AA712F +:10C330003046731CDEB2FAF7A6FB681CC5B2A078C3 +:10C34000A842DCD8BDE8F08101447A4810B500EB82 +:10C3500002100A4601218330FAF7C1F8BDE8104007 +:10C36000FAF706B90A46724910B5497841B1714BDE +:10C37000997829B10244D81CFAF7B1F8012010BD10 +:10C38000002010BD6B4A01EB410102EB4101026844 +:10C39000C1F80B218088A1F80F0170472DE9F04109 +:10C3A000644D07460024A878002898BFBDE8F081B6 +:10C3B000C0B2A04217D905EB041010F1830612D0C9 +:10C3C0001021304600F027FD68B904EB440005EB6E +:10C3D000400808F20B113A463046FBF72CFCB8F83F +:10C3E0000F01A8F80F01601CC4B2A878A042DFD8E2 +:10C3F000BDE8F08101461022504800F02FBD4F48A3 +:10C4000070474C498A78824203D90A1892F843212E +:10C410000AB10020704700EB400001EB400000F241 +:10C420000B10704743498A78824206D9084490F835 +:10C430003B01002804BF01207047002070472DE910 +:10C44000F0410E46074615460621304600F0E3FC53 +:10C45000384C98B1A17871B104F59D7011F0010FBD +:10C4600018BF00F8015FA178490804D0457000F8B2 +:10C47000025F491EFAD10120BDE8F08138463146FD +:10C4800000F01FF8102819D0A3780021002B15D92F +:10C49000621892F8032182420BD1102918BF082993 +:10C4A0000CD004EB010080F83B514FF00100BDE8D7 +:10C4B000F08101F10101C9B28B42E9D80020BDE849 +:10C4C000F0812DE9F0411B4D0646002428780F46E7 +:10C4D000002811D905EBC40090F85311B14206D1E0 +:10C4E0000622394600F5AA7009F01CF838B1601C24 +:10C4F000C4B22878A042EDD81020BDE8F0812046D3 +:10C50000BDE8F0810B4910B44A7801EBC003521E1C +:10C510004A70002283F85A2191F802C0BCF1000F42 +:10C5200016D98B1893F8034184420DD1102A07E0E5 +:10C5300060010020100F00206C010020E31000209B +:10C540001CBF10BC704703E0521CD2B29445E8D81F +:10C550000A78521ED2B20A7082421BD001EBC2028C +:10C5600001EBC003D2F853C1C3F853C1D2F857212D +:10C57000C3F857218C7891F800C00022002C09D90B +:10C580008B1893F80331634506D1102A1CBF114460 +:10C5900081F8030110BC7047521CD2B29442EFD80C +:10C5A00010BC704770B449490D188A78521ED3B236 +:10C5B0008B7095F8032198423DD001EB001401EBFC +:10C5C000031C00EB4000DCF80360C4F80360DCF8F7 +:10C5D0000760C4F80760DCF80B60C4F80B60DCF897 +:10C5E0000F60C4F80F60DCF88360C4F88360DCF887 +:10C5F0008760C4F88760DCF88B60C4F88B60DCF877 +:10C600008FC0C4F88FC001EB030C03EB43039CF80D +:10C61000034101EB430385F8034101EB4000D3F8EC +:10C620000B41C0F80B41B3F80F31A0F80F319CF863 +:10C630003B0185F83B0101EBC20090F85A0110F074 +:10C64000010F1CBF70BC704700208C78002C0DD9E6 +:10C650000B1893F803C1944504D110281CBF70BC7B +:10C66000704703E0401CC0B28442F1D80878401EF5 +:10C67000C0B20870904204BF70BC704701EBC203A7 +:10C6800001EBC000D0F853C1C3F853C1D0F8570133 +:10C69000C3F857018C780B780020002C9CBF70BC2D +:10C6A000704700BF01EB000C9CF803C19C4506D10C +:10C6B00010281CBF084480F8032170BC7047401C40 +:10C6C000C0B28442EED870BC70470000100F00204A +:10C6D00010B50A7B02F01F020A73002202768B1843 +:10C6E00093F808C00CF001034FEA5C0C0CF0010455 +:10C6F00023444FEA5C0C0CF0010423444FEA5C0C29 +:10C700000CF001041C444FEA5C0303F0010CA44448 +:10C710005B0803F00104A4445B0803F00104A44493 +:10C720000CEB530300EB020C521C8CF8133090F806 +:10C7300018C0D2B263440376052AD0D3D8B22528D4 +:10C7400088BFFFDF10BD0023C383428401EBC20218 +:10C75000521EB2FBF1F10184704770B5002504460A +:10C7600003290DD04FF4FA4200297FD001297CD053 +:10C77000022918BF70BD0146BDE870405830A7E7D8 +:10C7800004F158068021304608F099FFB571F57123 +:10C7900035737573F573357475717576B5762120BB +:10C7A00086F83E00492086F83F00FE2086F8740097 +:10C7B00084F82C502584012084F8540084F8550016 +:10C7C000282184F856101B21218761874FF4A4711A +:10C7D000E187A1871B21218661864FF4A471E18640 +:10C7E000A1861B21A4F84010A4F844104FF4A471B2 +:10C7F000A4F84610A4F842101B21A4F84A10A4F88B +:10C800004C10A4F8481060734FF448606080A4F89E +:10C81000D850A4F8DA50A4F8DC50A4F8DE50A4F8FC +:10C82000E050A4F8E25084F8E55084F8E750A4F80A +:10C83000EE5084F8EC50A4F80051A4F8025184F8AA +:10C84000A25184F8A35184F8AC5184F8AD5184F816 +:10C85000705184F8785184F87B5184F89451C4F86D +:10C860008C51C4F8905170BD00E041E0A4F8EE5046 +:10C8700084F8E6506088FE490144B1FBF0F1A4F869 +:10C8800078104BF68031A4F87A10E388A4F87E5033 +:10C89000B4F882C0DB000CFB00FCB3FBF0F39CFBA4 +:10C8A000F0FC5B1CA4F882C09BB203FB00FC04F10B +:10C8B0005801A4F88030BCF5C84FC4BF5B1E0B857F +:10C8C000B2FBF0F2521CCA8500F5802202F5EE326E +:10C8D000531EB3FBF0F20A84CB8B03FB00F2B2FBD6 +:10C8E000F0F0C883214604F15800BDE87040EFE63F +:10C8F000B4F89C11B4F8A031B4F802C004F15800A7 +:10C90000A4F87E50B4F88240DB0004FB0CF4B3FBC7 +:10C91000F1F394FBF1F45B1C44859BB203FB01F43F +:10C920000385B4F5C84FC4BF5B1E0385B2FBF1F2AB +:10C93000521CC285428C01EBC202521EB2FBF1F2C4 +:10C940000284C28B02FB0CF2B2FBF1F1C18370BD19 +:10C9500070B50025044603290DD04FF4FA42002992 +:10C9600063D001297ED0022918BF70BD0146BDE801 +:10C9700070405830ACE604F158068021304608F08B +:10C980009EFEB571F57135737573F57335747571F8 +:10C990007576B576212086F83E00492086F83F005E +:10C9A000FE2086F8740084F82C502584012084F839 +:10C9B000540084F85500282184F856101B21218743 +:10C9C00061874FF4A471E187A1871B2121866186CD +:10C9D0004FF4A471E186A1861B21A4F84010A4F8AD +:10C9E00044104FF4A471A4F84610A4F842101B217F +:10C9F000A4F84A10A4F84C10A4F848106073A4F8E6 +:10CA0000E050202084F8E20084F8D850C4F8DC50CC +:10CA100084F80C5184F80D5184F8165184F817519C +:10CA200084F8FC5084F8085170BD60889049014436 +:10CA3000B1FBF0F1A4F878104BF68031A4F87A102D +:10CA4000E388A4F87E50B4F882C0DB000CFB00FC45 +:10CA50009CFBF0FCB3FBF0F304F15801A4F882C096 +:10CA60005B1C00E021E09BB203FB00FCA4F88030DB +:10CA7000BCF5C84FC4BF5B1E0B85B2FBF0F2521C65 +:10CA8000CA8500F5802202F5EE32531EB3FBF0F2A8 +:10CA90000A84CB8B03FB00F2B2FBF0F0C883214683 +:10CAA00004F15800BDE8704012E6D4F80031B4F843 +:10CAB00002C004F158005989DB89A4F87E50B4F80B +:10CAC0008240DB0004FB0CF4B3FBF1F394FBF1F4C4 +:10CAD0005B1C44859BB203FB01F40385B4F5C84F8E +:10CAE000C4BF5B1E0385B2FBF1F2521CC285428CAF +:10CAF00001EBC202521EB2FBF1F20284C28B02FBB6 +:10CB00000CF2B2FBF1F1C18370BD2DE9F003047E9C +:10CB10000CB1252C03D9BDE8F00312207047002A80 +:10CB200002BF0020BDE8F003704791F80DC01F263A +:10CB30000123504D4FF00008BCF1000F74D0BCF140 +:10CB4000010F1EBF1F20BDE8F0037047B0F800C002 +:10CB50000A7C8F7B91F80F907A404F7C87EA090717 +:10CB600042EA072282EA0C0C5FF000070CF0FF0992 +:10CB70004FEA1C2C99FAA9F99CFAACFC4FEA196906 +:10CB80004FEA1C6C49EA0C2C0CEB0C1C7F1C9444E7 +:10CB9000FFB21FFA8CFC032FE8D38CEA020C354F4E +:10CBA0000022ECFB057212096FF0240502FB05C29E +:10CBB000D2B201EBD207427602F007053F7A03FAC0 +:10CBC00005F52F4218BF82767ED104FB0CF2120CC1 +:10CBD000521CD2B25FF0000400EB040C9CF813C0AE +:10CBE00094453CBFA2EB0C02D2B212D30D194FF008 +:10CBF000000C2D7A03FA0CF73D421CBF521ED2B234 +:10CC0000002A71D00CF1010C0CF0FF0CBCF1080FE4 +:10CC1000F0D304F1010C0CF0FF04052CDCD33046FA +:10CC2000BDE8F0037047FFE790F819C00C7E474657 +:10CC300004FB02C20F4C4FF0000CE2FB054C4FEA24 +:10CC40001C1C6FF024040CFB0422D2B201EBD204B2 +:10CC5000427602F0070C247A03FA0CFC14EA0C0F5B +:10CC60001FBF82764046BDE8F003704704E0000035 +:10CC7000FFDB050053E4B36E90F818C0B2FBFCF480 +:10CC80000CFB1422521CD2B25FF0000400EB040C27 +:10CC90009CF813C094453CBFA2EB0C02D2B212D355 +:10CCA0000D194FF0000C2D7A03FA0CF815EA080F55 +:10CCB0001CBF521ED2B27AB10CF1010C0CF0FF0C69 +:10CCC000BCF1080FF0D300E011E004F1010C0CF00E +:10CCD000FF04052CDAD3A2E70CEBC40181763846B9 +:10CCE000BDE8F0037047FFE70CEBC40181764046D6 +:10CCF000BDE8F0037047FD4A016812681140FC4A24 +:10CD0000126811430160704730B4FA49F74B0024B0 +:10CD10004FF0010C0A78521CD2B20A70202A08BFC8 +:10CD20000C700D781A680CFA05F52A42F2D00978D1 +:10CD300002680CFA01F15140016030BC704770B4D8 +:10CD40006FF01F02010C02EA90251F23A1F5AA40F3 +:10CD500054381CBFA1F5AA40B0F1550009D0A1F587 +:10CD60002850AA381EBFA1F52A40B0F1AA00012020 +:10CD700000D100204FF0000C624664468CEA0106A8 +:10CD8000F6431643B6F1FF3F11D005F001064FEA16 +:10CD90005C0C4CEAC63C03F0010652086D085B08C7 +:10CDA000641C42EAC632162CE8D370BC704770BCD3 +:10CDB00000207047017931F01F0113BF00200022CD +:10CDC0001146704710B4435C491C03F0010C5B082A +:10CDD00003F00104A4445B0803F00104A4445B08CD +:10CDE00003F00104A4445B0803F00104A4445B08BD +:10CDF00003F001045B08A44403F00104A4440CEB19 +:10CE000053031A44D2B20529DDDB012A8CBF01206D +:10CE1000002010BC704730B40022A1F1010CBCF11D +:10CE2000000F11DD431E11F0010F08BF13F8012F91 +:10CE30005C785FEA6C0C07D013F8025F22435C78E1 +:10CE40002A43BCF1010CF7D1491E5CBF405C024390 +:10CE5000002A0CBF0120002030BC7047002A08BF08 +:10CE600070471144401E12F0010F03D011F8013D2C +:10CE700000F8013F520808BF704700BF11F8013C9D +:10CE8000437011F8023D00F8023F521EF6D1704780 +:10CE900070B58CB000F110041D4616460DF1FF3C34 +:10CEA0005FF0080014F8012C8CF8012014F8022D12 +:10CEB0000CF8022F401EF5D101F1100C6C460DF15B +:10CEC0000F0108201CF8012C4A701CF8022D01F8F3 +:10CED000022F401EF6D1204607F0FAF97EB16A1EF5 +:10CEE00004F130005FF0080110F8013C537010F8B5 +:10CEF000023D02F8023F491EF6D10CB070BD089801 +:10CF00002860099868600A98A8600B98E8600CB0DF +:10CF100070BD38B505460C466846FAF760F900283A +:10CF200008BF38BD9DF900202272A07E607294F97E +:10CF30000A100020511A48BF494295F82D308B4203 +:10CF4000C8BF38BDFF2B08BF38BDE17A491CC9B244 +:10CF5000E17295F82E30994203D8A17A7F2918BF43 +:10CF600038BDA2720020E072012038BD0C2818BF25 +:10CF70000B2810D00D2818BF1F280CD0202818BF50 +:10CF8000212808D0222818BF232804D024281EBF17 +:10CF90002628002070474FF0010070470C2963D20B +:10CFA000DFE801F006090E13161B323C415C484EC7 +:10CFB000002A5BD058E0072A18BF082A56D053E051 +:10CFC0000C2A18BF0B2A51D04EE00D2A4ED04BE050 +:10CFD000A2F10F000C2849D946E023B1A2F11000BC +:10CFE0000B2843D940E0122A18BF112A3ED090F8EE +:10CFF000360020B1122A37D31A2A37D934E0162A3C +:10D0000032D31A2A32D92FE0A2F10F0103292DD9E8 +:10D0100090F8360008B31B2A28D925E0002B08BF5A +:10D02000042A21D122E013B1062A1FD01CE0012AD4 +:10D030001AD11BE01C2A1CBF1D2A1E2A16D013E081 +:10D040001F2A18BF202A11D0212A18BF222A0DD04A +:10D05000232A1CBF242A262A08D005E013B10E2A51 +:10D0600004D001E0052A01D000207047012070475C +:10D070002DE9F0410D4604468668F7F7CCFF58B914 +:10D08000F7F7FAFD40F23471F7F7F7FAA06020469F +:10D09000F7F7C1FF0028F3D095B13046A168F8F743 +:10D0A00004FB00280CDD2844401EB0FBF5F707FB0D +:10D0B00005F13046F7F7E1FAA0603846BDE8F081A7 +:10D0C0000020BDE8F08170B50446904228BF70BDD5 +:10D0D000101B642810D325188D4205D8F8F719FBCA +:10D0E00000281CBF284670BD204670BD785C020039 +:10D0F0007C5C0200740100206420ECE710B4B1F8FD +:10D1000002C0A0F840C0B1F806C0A0F844C0B1F811 +:10D1100004C090F85440098914F00C0F15D000BFDA +:10D12000BCF5296F98BF4FF4296C90F8554014F066 +:10D130000C0F11D0B1F5296F98BF4FF42961A0F8F9 +:10D1400042C0A0F8461010BC7047002B1CBF1478DA +:10D1500014F00C0FE4D1E8E7002B1CBF527812F05A +:10D160000C0FE7D1EBE711F00C0F13D001F0040125 +:10D1700000290DBF4022102296214FF4167101F5AF +:10D18000BC71A0EB010388428CBF93FBF2F000203E +:10D1900080B27047022919BF6FF00D0101EBD0007A +:10D1A0006FF00E0101EB9000F2E7C08E11F00C0F52 +:10D1B00008BF7047B0F5296F38BF4FF4296070473A +:10D1C0000246808E11F00C0F08BF704792F8553060 +:10D1D000D18E13F00C0F04D0B1F5296F38BF4FF486 +:10D1E0002961538840F2E24C03FB0CF3528E4FF45A +:10D1F000747C0CEB821C8C459CBF910101F5747111 +:10D20000591AA1F59671884228BF0846B0F5296FD2 +:10D2100038BF4FF429607047084418449830002AFA +:10D2200014BF0421002108447047F0B4002A14BF41 +:10D2300008220122002B14BF0824012412F00C0F35 +:10D240008B8ECA8E25D091F85550944615F00C0F50 +:10D2500004D0BCF5296F38BF4FF4296C4D8840F2DB +:10D26000E2466E434D8E4FF4747707EB85176745A2 +:10D270009CBF4FEA851C0CF5747CA6EB0C0CACF53E +:10D28000967C634528BF6346B3F5296F38BF4FF4DA +:10D29000296314F00C0F04D0B2F5296F38BF4FF496 +:10D2A00029621FFA83FC00280CBF0123002391F898 +:10D2B000560014F00C0F08BF00200CEB02010844CC +:10D2C0009830002B14BF042100210844F0BC7047A3 +:10D2D0002DE9F00391F854200B8E12F00C0F4FF44F +:10D2E00074771CBF07EB83139CB255D012F00C0F60 +:10D2F0008B8ECA8E4D8E91F855C021D016461CF0EB +:10D300000C0F04D0B6F5296F38BF4FF42966B1F879 +:10D31000028040F2E24908FB09F807EB8519B145A4 +:10D3200002D8AE0106F57476A8EB0606A6F5967649 +:10D33000B34228BF3346B3F5296F38BF4FF4296392 +:10D34000A34228BF23469CB21CF00C0F1CBF07EB66 +:10D3500085139BB228D000BF1CF00C0F04D0B2F58F +:10D36000296F38BF4FF429629A4228BF1A46002815 +:10D370000CBF0123002391F856001CF00C0F08BFCE +:10D380000020A11808449830002B14BF042100216C +:10D390000844BDE8F0037047022A07BF9B003C33F6 +:10D3A000DB0070339CB2A1E7BCF1020F07BFAB00FA +:10D3B0003C33EB0070339BB2CEE710F0010F1CBF83 +:10D3C0000120704710F0020F1CBF0220704710F0C0 +:10D3D000040018BF082070472DE9F047044617469F +:10D3E00089464FF00108084600F0C5FC054648464E +:10D3F00000F0C5FC10F0010F18BF012625D000BFBA +:10D4000015F0010F18BF01232AD000BF56EA03010F +:10D4100008BF4FF0000810F0070F08BF002615F0F6 +:10D42000070F08BF002394F85400B0420CBF00203F +:10D430003046387094F85510994208BF00237B702D +:10D44000002808BF002B25D115E010F0020F18BFEF +:10D450000226D5D110F0040F14BF08260026CFE70E +:10D4600015F0020F18BF0223D0D115F0040F14BF1E +:10D4700008230023CAE7484600F087FCB4F8581098 +:10D48000401A00B247F6FE71884201DC002801DC38 +:10D490004FF0000816B1082E0CD018E094F8540094 +:10D4A000012818BF022812D004281EBF0828FFDF59 +:10D4B000032D0CD194F8AC0148B1B4F8B0010128A7 +:10D4C00094F8540006D0082801D00820387040464F +:10D4D000BDE8F087042818BF0420F7D1F5E701283C +:10D4E00014BF0228704710F00C0018BF04207047CA +:10D4F00038B4CBB2C1F3072CC1B2C0F30724012B5F +:10D5000007D0022B09D0042B08BFBCF1040F2DD08B +:10D5100006E0BCF1010F03D128E0BCF1020F25D0D9 +:10D52000012906D0022907D0042908BF042C1DD0E8 +:10D5300004E0012C02D119E0022C17D001EA0C0101 +:10D5400061F3070204EA030161F30F22D1B211F083 +:10D55000020F18BF022310D0C2F307218DF800304C +:10D5600011F0020F18BF02211BD111E0214003EA84 +:10D570000C03194061F30702E6E711F0010F18BF31 +:10D580000123E9D111F0040F14BF08230023E3E7BE +:10D5900011F0010F18BF012103D111F0040118BFD0 +:10D5A00008218DF80110082B01BF000C0128042070 +:10D5B0008DF80000BDF8000038BC70474FF0000C3B +:10D5C000082902D0042909D011E001280FD1042034 +:10D5D000907082F803C0138001207047012806D0A4 +:10D5E0000820907082F803C013800120704700204B +:10D5F0007047162A10D12A220C2818BF0D280FD0E8 +:10D600004FF0230C1F280DD031B10878012818BF26 +:10D61000002805D0162805D000207047012070474B +:10D620001A70FBE783F800C0F8E7012908D0022947 +:10D630000BD0042912BF082940F6A660704707E006 +:10D64000002804BF40F2E240704740F6C410704723 +:10D6500000B5FFDF40F2E24000BD000040787047B7 +:10D6600030B50546007801F00F0220F00F0010439E +:10D670002870092912D2DFE801F00507050705091E +:10D68000050B0F0006240BE00C2409E0222407E020 +:10D6900001240020E87003E00E2401E00024FFDFF5 +:10D6A0006C7030BD007800F00F0070470A68C0F859 +:10D6B00003208988A0F807107047D0F803200A607B +:10D6C000B0F80700888070470A68C0F80920898888 +:10D6D000A0F80D107047D0F809200A60B0F80D00CE +:10D6E000888070470278402322F0400203EA8111CB +:10D6F0001143017070470078C0F3801070470278C2 +:10D70000802322F0800203EAC111114301707047A7 +:10D710000078C009704770B514460E4605461F2AAA +:10D7200088BFFFDF2246314605F1090007F026FFDA +:10D73000A01D687070BD70B544780E460546062C75 +:10D7400038BFFFDFA01F84B21F2C88BF1F242246D2 +:10D7500005F10901304607F011FF204670BD70B594 +:10D7600014460E4605461F2A88BFFFDF2246314673 +:10D7700005F1090007F002FFA01D687070BD09687F +:10D78000C0F80F1070470A88A0F8132089784175F7 +:10D79000704790F8242001F01F0122F01F0211436E +:10D7A00080F824107047072988BF072190F82420AB +:10D7B000E02322F0E00203EA4111114380F8241033 +:10D7C00070471F3008F08FB810B5044600F009FB11 +:10D7D000002818BF204410BDC17811F03F0F1BBFB7 +:10D7E000027912F0010F0022012211F03F0F1BBF3E +:10D7F000037913F0020F002301231A4402EB4202C3 +:10D80000530011F03F0F1BBF027912F0080F0022E6 +:10D81000012203EB420311F03F0F1BBF027912F00C +:10D82000040F00220122134411F03F0F1BBF0279A5 +:10D8300012F0200F0022012202EBC20203EB42038E +:10D8400011F03F0F1BBF027912F0100F00220122CE +:10D8500002EB42021A4411F03F0F1BBF007910F097 +:10D86000400F00200120104410F0FF0014BF0121E0 +:10D8700000210844C0B2704770B50278417802F0C8 +:10D880000F02082A4DD2DFE802F004080B4C4C4C82 +:10D890000F14881F1F280AD943E00C2907D040E045 +:10D8A000881F1F2803D93CE0881F1F2839D8012072 +:10D8B00070BD4A1EFE2A34D88446C07800258209ED +:10D8C000032A09D000F03F04601C884204D8604657 +:10D8D000FFF782FFA04201D9284670BD9CF80300E3 +:10D8E0004FF0010610F03F0F1EBF1CF1040000783E +:10D8F00010F0100F13D064460421604600F071FA56 +:10D90000002818BF14EB0000E6D0017801F03F01B9 +:10D910002529E1D280780221B1EB501FDCD33046BB +:10D9200070BD002070BD70B50178012501F00F01B8 +:10D93000002404290AD007290DD008291CBF002083 +:10D9400070BD40780E2836D0204670BD4078801FCC +:10D950001F2830D9F8E7844640789CF803108A09DC +:10D96000032AF1D001F03F06711C8142ECD86046D9 +:10D97000FFF732FFB042E7D89CF8030010F03F0FEA +:10D980001EBF1CF10400007810F0100F13D0664683 +:10D990000421604600F025FA002818BF16EB0000AD +:10D9A000D2D0017801F03F012529CDD28078022123 +:10D9B000B1EB501FC8D3284670BD10B4017801F0F8 +:10D9C0000F01032920D0052921D14478B0F819107E +:10D9D000B0F81BC0B0F81730827D222C17D1062971 +:10D9E00015D3B1F5486F98BFBCF5FA7F0FD272B16D +:10D9F000082A98BF8A420AD28B429CBFB0F81D0009 +:10DA0000B0F5486F03D805E040780C2802D010BC70 +:10DA10000020704710BC012070472DE9F0411F46DF +:10DA200014460D00064608BFFFDF2146304600F0D1 +:10DA3000D8F9040008BFFFDF30193A462946BDE88F +:10DA4000F04107F09BBDC07800F03F007047C02256 +:10DA500002EA8111C27802F03F021143C17070479F +:10DA6000C07880097047C9B201F00102C1F34003D8 +:10DA70001A4402EB4202C1F3800303EB4202C1F3FA +:10DA8000C00302EB4302C1F3001303EB43031A4448 +:10DA9000C1F3401303EBC30302EB4302C1F3801352 +:10DAA0001A4412F0FF0202D0521CD2B20171C378A4 +:10DAB00002F03F0103F0C0031943C170511C4170D3 +:10DAC00070472DE9F0410546C078164600F03F0446 +:10DAD0001019401C0F46FF2888BFFFDF2819324667 +:10DAE0003946001D07F04AFDA019401C6870BDE8CA +:10DAF000F081C178407801F03F01401A401E80B2A9 +:10DB0000704710B590F803C00B460CF03F01447805 +:10DB10000CF03F0CA4EB0C0CACF1010C1FFA8CF4D4 +:10DB2000944288BF14462BB10844011D2246184672 +:10DB300007F024FD204610BD4078704700B50278FC +:10DB400001F0030322F003021A430270012914BFFB +:10DB50000229002104D0032916BFFFDF012100BDE7 +:10DB6000417000BD00B5027801F0030322F003020A +:10DB70001A430270012914BF0229002104D003298D +:10DB800016BFFFDF012100BD417000BD007800F02D +:10DB900003007047417841B1C078192803D2C04AC8 +:10DBA000105C884201D1012070470020704730B5D9 +:10DBB00001240546C17019293CBFB948445C02D311 +:10DBC000FF2918BFFFDF6C7030BD70B515460E46DB +:10DBD00004461B2A88BFFFDF65702A463146E01CD9 +:10DBE000BDE8704007F0CABCB0F807007047B0F855 +:10DBF00009007047C172090A01737047B0F80B0041 +:10DC0000704730B4B0F80720B0F809C0B0F805305C +:10DC10000179941F40F67A45AC4298BFBCF5FA7F73 +:10DC20000ED269B1082998BF914209D293429FBF91 +:10DC3000B0F80B00B0F5486F012030BC98BF7047BA +:10DC4000002030BC7047001D07F04DBE021D084685 +:10DC5000114607F048BEB0F80900704700797047D8 +:10DC60000A68426049688160704742680A6080685B +:10DC700048607047098881817047808908807047B3 +:10DC80000A68C0F80E204968C0F812107047D0F832 +:10DC90000E200A60D0F81200486070470968C0F88A +:10DCA00016107047D0F81600086070470A68426086 +:10DCB00049688160704742680A60806848607047C0 +:10DCC0000968C1607047C068086070470079704794 +:10DCD0000A68426049688160704742680A608068EB +:10DCE000486070470171090A417170478171090AE2 +:10DCF000C17170470172090A417270478172090A45 +:10DD0000C172704780887047C0887047008970472B +:10DD10004089704701891B2924BF4189B1F5A47F3F +:10DD200007D381881B2921BFC088B0F5A47F0120BB +:10DD30007047002070470A684260496881607047F8 +:10DD400042680A60806848607047017911F0070FE7 +:10DD50001BBF407910F0070F0020012070470179A8 +:10DD600011F0070F1BBF407910F0070F00200120B2 +:10DD70007047017170470079704741717047407971 +:10DD800070478171090AC1717047C088704745A208 +:10DD900082B0D2E90012CDE900120179407901F098 +:10DDA000070269461DF80220012A07D800F0070083 +:10DDB000085C01289EBF012002B07047002002B01D +:10DDC0007047017170470079704741717047407921 +:10DDD000704730B50C460546FB2988BFFFDF6C70E5 +:10DDE00030BDC378024613F03F0008BF70470520DE +:10DDF000127903F03F0312F0010F36D0002914BF4F +:10DE00000B20704712F0020F32D0012914BF801D81 +:10DE1000704700BF12F0040F2DD0022914BF401C20 +:10DE2000704700BF12F0080F28D0032914BF801CD0 +:10DE3000704700BF12F0100F23D0042914BFC01C7C +:10DE4000704700BF12F0200F1ED005291ABF1230F4 +:10DE5000C0B2704712F0400F19D006291ABF401CFB +:10DE6000C0B27047072918D114E00029CAD114E0C4 +:10DE70000129CFD111E00229D4D10EE00329D9D153 +:10DE80000BE00429DED108E00529E3D105E00629ED +:10DE9000E8D102E0834288BF70470020704700004D +:10DEA000805C020000010102010202032DE9F04141 +:10DEB000FC4E0446736893F828000127002528B11A +:10DEC00093F8A001D8B993F84801C0B193F848017C +:10DED00098B383F8A071D3F84C113C2269B36570F4 +:10DEE000201D07F04BFB052020702771706890F80B +:10DEF000A011002918BF80F8485107D034E083F8FA +:10DF0000A05103F12A014FF48E72E7E71D212A3058 +:10DF100007F0B3FB70687F2180F84510FF2180F87F +:10DF2000381080F82B1080F83E10818E21F06001AF +:10DF30002031818680F8285016E0FFE793F8220010 +:10DF4000012814D0187801281BD093F8500101281B +:10DF50001CBF0020BDE8F081657018202070D3F848 +:10DF60005201606083F850510120BDE8F081657076 +:10DF700007202070586A606083F822500120BDE8B5 +:10DF8000F0816570142020702022991C201D07F05C +:10DF9000F5FA257271680D7081F85051C248828877 +:10DFA0008284D0F86421527B80F8262080F8227089 +:10DFB000D1F864010088F4F74FFEF4F7F6FAD3E7DE +:10DFC000B84840680178002914BF80884FF6FF7078 +:10DFD000704770B5B34C0546606890F874112046E0 +:10DFE0000629806803D0FFF73BFDB8B127E0FFF7B3 +:10DFF00037FD10BBA068FFF733FD00BB606890F8E9 +:10E00000A40110F00C0F1AD0A068C17811F03F0FD6 +:10E010001CBF007910F0100F11D00EE0616891F86C +:10E020007401082809D025B191F83E00FF2806D0D8 +:10E0300003E091F82B00FF2801D0012070BD0020E3 +:10E0400070BDF8B5974C07460E46606890F82810EA +:10E05000002906BF90F848110029F8BD00F13305EA +:10E0600020787F2808BFFFDF207828707F2020706D +:10E07000606890F89A1100F5D470085C012808BF18 +:10E08000012508D0022808BF022504D0042816BFA5 +:10E0900008280325FFDF606880F8365090F8971154 +:10E0A00080F8461090F87411072911D190F8A40156 +:10E0B000012808BF012508D0022808BF022504D086 +:10E0C000042816BF08280325FFDF606880F8375052 +:10E0D000606890F874014FF00005062804D1A0682C +:10E0E000FFF7BEFC00283CD0606890F87411082946 +:10E0F00004BF90F8A10102280ED04FF00301A068E0 +:10E10000FFF762FB40B141780A09616881F8382065 +:10E110000088C0F30B0048870095A068FFF7C2FA9B +:10E120006168BDF8005091F83420520962F3461539 +:10E13000ADF80050072818BFFFDF1CD0BDF8000065 +:10E1400000906068BDF8001081860421A068FFF788 +:10E150003BFB00287DD0B0F80100C004C00C79D092 +:10E16000B0E0A068C17811F03F0F1CBF007910F03B +:10E17000100FB9D1D0E791F87401062816D00728FE +:10E1800036D0082873D00A2818BFFFDFD6D145F053 +:10E190000A00ADF8000091F83E10FF2914BF0121DC +:10E1A000002161F38200ADF80000C7E7A068FFF727 +:10E1B00057FC58B1012808BF45F0010046D002289D +:10E1C00014BFFFDF45F0020040D0B7E7A068C17878 +:10E1D00011F03F0F1CBF007910F0020FAED00120EC +:10E1E000FFF7F7FE002808BF45F004002ED0A5E792 +:10E1F000A068FFF735FCB0B1012804BF45F001006D +:10E20000ADF800000FD0022898D145F00200ADF81B +:10E210000000A168CA7812F03F0F1CBF097911F005 +:10E22000020F21D118E0A068C17811F03F0F1CBF88 +:10E23000007910F0020F05D1606890F83E00FF28C9 +:10E240003FF47CAFBDF8000040F00400ADF80000E2 +:10E2500074E72BE02FE00AE0616891F83E10FF2997 +:10E2600008BF20F00400F1D040F00400EEE791F880 +:10E270003E00FF281CBF45F00400ADF8000091F8F7 +:10E28000A1010228BDF800000CBF40F0080020F0FA +:10E290000800ADF800000CBF40F0020020F00200C2 +:10E2A000D4E7000078010020F41000206068818E1F +:10E2B00021F0600105E06068818E21F0600101F1CC +:10E2C00040018186606890F8741106290DD190F89C +:10E2D000A40110F00C0F08D0A068C17811F03F0F16 +:10E2E0001CBF007910F0100F10D1A068C17811F098 +:10E2F0003F0F0BD0017911F0400F07D04FF006010E +:10E30000FFF762FA6168007881F84500606890F86C +:10E310007401062804D00020FFF75BFE18BB04E060 +:10E32000022F18BF012FF6D1F8BDA068C17811F0F7 +:10E330003F0F33D0017911F0010F2FD0616801F147 +:10E340002C0791F8783101F12B05FF2B0CD03A46C0 +:10E3500029461846FDF728FF002808BFFFDF287868 +:10E3600040F00200287019E0FFF7C5F92870A06896 +:10E37000FFF798F9072804D23946A068FFF79DF9FE +:10E380000CE0A068FFF78EF9072807D10021A068EC +:10E39000FFF71AFA016839608088B8800120FFF71A +:10E3A00018FE80BBA068C17811F03F0F2BD0017917 +:10E3B00011F0020F27D0616801F13F0591F8762135 +:10E3C0006F1E1AB1022E18BF032E08D0FFF76AF98C +:10E3D00007280AD22946A068FFF77DF912E0D1F894 +:10E3E0005A012860B1F85E010BE0A068FFF75AF906 +:10E3F000072807D10121A068FFF7E6F90168296025 +:10E400008088A8803E70606890F87401062808BF74 +:10E41000F8BD072818BF082802D00A2806D0F8BD82 +:10E42000A068FFF71DFB022808BFF8BD606800F177 +:10E430004705A068FFF75DFB626892F83230C3F1D0 +:10E44000FF01884228BF084605D9918E21F060015E +:10E4500001F140019186C2B203EB0501A068FFF70C +:10E4600050FB616891F83220104481F83200F8BD09 +:10E470002DE9F047FB4D06466C6894F8280000280B +:10E4800018BFBDE8F0871D212A34204607F0F5F8B3 +:10E4900001272770A868FFF705F920B3012827D0C6 +:10E4A00002282AD0062818BFFFDF2BD004F11D0157 +:10E4B000A868FFF740F92072686804F1020904F1C6 +:10E4C000010890F87801FF2821D04A464146FDF71F +:10E4D0006BFE002808BFFFDF98F8000040F0020044 +:10E4E00088F8000031E0608940F013006081DDE7CA +:10E4F000608940F015006081DEE7608940F010001F +:10E500006081D3E7608940F012006081CEE7A8689F +:10E51000FFF7F1F888F80000A868FFF7C3F80728AC +:10E5200004D24946A868FFF7C8F80EE0A868FFF7CC +:10E53000B9F8072809D10021A868FFF745F9016853 +:10E54000C9F800108088A9F80400287804F10908A7 +:10E550007F2808BFFFDF287888F800004FF07F0988 +:10E5600085F80090277300206073FF20A073A17AC4 +:10E5700011F0040F08BF20752DD0686804F115084C +:10E5800004F1140A90F8761119B1022E18BF032E67 +:10E5900009D0A868FFF786F807280BD24146A8687B +:10E5A000FFF799F815E0D0F85A11C8F80010B0F844 +:10E5B0005E010CE0A868FFF775F8072809D1012172 +:10E5C000A868FFF701F90168C8F800108088A8F86A +:10E5D00004008AF8006084F81B90686890F897112E +:10E5E000217780F82870BDE8F047062003F077BC5B +:10E5F0002DE9F0419B4C606890F82810FF2500271A +:10E60000A1B91D212A3007F038F860687F2180F811 +:10E61000451080F8385080F82B5080F83E50818E9D +:10E6200021F060012031818680F82870606800F553 +:10E63000D47290F89A11895C80F8A411002003F03C +:10E640005EF818B3F8F7DAFC6068874990F879014A +:10E650000E5C3046F8F74DFA606880F8976190F8E4 +:10E66000A41111F00C0F0CBF25200F20F8F74CF966 +:10E67000606890F8A4110120F8F7AFFA606890F88C +:10E680006811032918BF022910D103E0BDE8F04149 +:10E6900001F040B990F89A1100F5D470085C012897 +:10E6A00004D1012211460020F8F7BAFDF8F788FDE1 +:10E6B000606890F8A461012E07BF4FF001080321A4 +:10E6C0004FF000080521A068FDF74CFE616881F855 +:10E6D000760150B1B8F1000F18BF402623D000BF1B +:10E6E000F7F70FFF3046F8F74CFD6068D0F87C0173 +:10E6F000F8F790FC606890F87811FF291CBF00F2D1 +:10E700009110FDF768FD6068062180F8775180F868 +:10E71000785180F8867180F8857180F8A17180F851 +:10E720007411BDE8F08116F00C0F14BF5526502669 +:10E73000D6E770B54B4C0646606800F5BA752046C2 +:10E74000806841B1D0F80510C5F81D10B0F8090077 +:10E75000A5F8210003E005F11D01FEF7AEFFA0685A +:10E76000FEF7C9FF85F82400A0680021032E018070 +:10E7700002D0052E04D046E00321FEF771FF42E0EF +:10E780000521FEF76DFF6068D0F8640100F10E010D +:10E79000A068FEF7F4FF6068D0F8640100F1120190 +:10E7A000A068FEF7F0FFD4E90110D1F86421527D92 +:10E7B0008275D1F86421D28AC275120A0276D1F824 +:10E7C000642152884276120A8276D1F864219288B6 +:10E7D000C276120A0277D1F86421D2884277120AEF +:10E7E0008277D1F864110831FEF7EBFF6068D0F84A +:10E7F0006401017EA068FEF7CCFF606890F8AA1162 +:10E80000A068FEF7D0FF05F11D01A068FEF75CFFD0 +:10E8100095F82410A068FEF772FF606800F5AD75EA +:10E8200090F8596190F8751191B190F86811032929 +:10E8300006D190F86111002918BF90F87A0101D132 +:10E8400090F87701FDF7DDFD00281CBF0126054685 +:10E850002946A068FEF72AFF3146A068BDE870404F +:10E86000FEF740BF780100209C5C0200FD4949682A +:10E8700081F87301704770B5FA4D686890F87411AB +:10E8800002291FBF90F8741101290C2070BD00F1FE +:10E8900066014FF00004C0F84C1180F848414FF079 +:10E8A0001D0100F12A0006F0E8FE68687F2180F86B +:10E8B0004510FF2180F8381080F82B1080F83E10AA +:10E8C000818E21F060012031818680F8284004701B +:10E8D00080F8224080F85041012680F8A06190F82D +:10E8E000760130B1F8F757FCF7F71FFE686880F83B +:10E8F00076416868072180F8724180F8616180F88C +:10E90000684180F8794180F8734180F8A14180F82E +:10E910006011002070BDD34910B58860486800219F +:10E92000A0F8A51180F8A711012180F87411FFF754 +:10E93000A2FF002818BFFFDF10BD2DE9F041C94D2F +:10E940000446686890F87401012818BF022804D0B2 +:10E9500003281CBF0C20BDE8F081607A022823D078 +:10E96000F8F714F80220F8F74FFB686890F9730184 +:10E97000F8F7B1F8A868F8F74AFBBB48F8F72AFBA4 +:10E98000BA48F8F7AEF8686890F8591100F5AD701C +:10E99000F8F759F80F210720F8F771F8686890F830 +:10E9A0006101F0B1FDF7A0FC6868217A00F5D4722E +:10E9B00080F89A11217A895C80F8A4116168C0F806 +:10E9C0007C112168C0F88011627A6AB1012A23D0D3 +:10E9D0000524022A08BF80F8744175D0032A7FD02D +:10E9E00087E0FDF73CFCDFE7A14C90F860C1002117 +:10E9F00090F87921521CA4FB02635B08A3EB83030C +:10EA00001A4480F879212CFA02F212F0010F03D196 +:10EA1000491CC9B20329EBD3002680F8A16190F804 +:10EA20007111002904BF90F87501002848D0F6F74D +:10EA300023F9044668682146D0F86C01F6F735FEE4 +:10EA4000DFF83082074690FBF8F008FB1070414277 +:10EA50002046F5F712FE6968C1F86C0197FBF8F0E3 +:10EA6000D1F89C211044C1F89C01FDF775FB6A6840 +:10EA7000D2F89C11884223D8C2F89C61C2F86C413C +:10EA800092F8750100281CBF0120FDF787FC0121C9 +:10EA9000686890F87221002A1CBF90F87121002A42 +:10EAA0000ED090F8592100F5AD73012A04D15A799E +:10EAB00002F0C002402A09D000F5AD70F9F7F2F873 +:10EAC0006968042081F8740113E009E00124FDF76E +:10EAD00096FC6968224601F5AD71F9F7ACF8EFE7ED +:10EAE000002918BFFFDF012000F066FF686880F88A +:10EAF00074410020BDE8F08170B55A4C606890F810 +:10EB00007411042932D005291CBF0C2070BD90F867 +:10EB1000A1110026002900F2A51190F8A7114FEAD3 +:10EB2000511126D0002908BF012507D0012908BFAF +:10EB3000022503D0022914BF00250825D0F8800142 +:10EB400000281CBF002000F037FF6068D0F87C016F +:10EB5000F8F760FA606890F8681102293DD003293F +:10EB600004BF90F8900101283BD03FE0FFF740FD43 +:10EB700044E0002908BF012507D0012908BF02256C +:10EB800003D0022914BF00250825D0F880010028F1 +:10EB90001CBF002000F010FF6068D0F87C01F8F77F +:10EBA00039FA606890F86811022906D0032904BF79 +:10EBB00090F89001012804D008E090F89001022814 +:10EBC00004D12A4601210020F8F72AFB60680721BA +:10EBD00080F8A45180F885610EE090F89001022839 +:10EBE00004D12A4601210020F8F71AFB60680821A9 +:10EBF00080F8A45180F8856180F87411002070BD00 +:10EC00001849002210F0010F496802D0012281F852 +:10EC1000A82110F0080F03D01144082081F8A801A2 +:10EC2000002070470F49496881F87001704710B59E +:10EC30000C4C636893F85831022B14BF032B002847 +:10EC40000BD100291ABF0229012000201146FDF72F +:10EC500086FA08281CBF012010BD606890F8580192 +:10EC6000002809E078010020995C02009F5C020006 +:10EC7000ABAAAAAA40420F0016BF0228002001201A +:10EC8000BDE81040F8F798BFFE48406890F858017A +:10EC9000002816BF022800200120F8F78DBFF9498F +:10ECA000496881F858017047F649496881F872014E +:10ECB000704770B5F34C616891F85801002816BF91 +:10ECC00002280020012081F8590101F5AD71F8F703 +:10ECD0005DFF606890F85811022916BF03290121D1 +:10ECE000002180F8751190F8592100F5AD734FF0AF +:10ECF0000005012A04BF5B7913F0C00F0AD000F5AC +:10ED0000AD73012A04D15A7902F0C002402A01D021 +:10ED1000002200E0012280F87121002A04BF0029AE +:10ED200070BDC0F89C51F5F7A7FF6168C1F86C0190 +:10ED300091F8750100281CBF0020FDF72FFB00266D +:10ED4000606890F8721100291ABF90F871110029BB +:10ED500070BD90F8592100F5AD71012A04D14979AF +:10ED600001F0C001402906D02946BDE8704000F5F9 +:10ED7000AD70F8F797BFFDF742FB61683246BDE81A +:10ED8000704001F5AD71F8F756BF70B5BD4D0C463A +:10ED900000280CBF01230023696881F8613181F8E4 +:10EDA0006A014FF0080081F87A010CD1002C1ABFDB +:10EDB000022C012000201146FDF7D1F969680828CE +:10EDC00081F87A0101D0002070BD022C14BF032C01 +:10EDD0001220F8D170BD002818BF112070470328F9 +:10EDE000A84A526808BFC2F8641182F8680100207E +:10EDF000704710B5A34C606890F8681103291CBFD8 +:10EE0000002180F8841101D0002010BD0123D0F82A +:10EE100064111A460020FEF708FA6168D1F86421EF +:10EE2000526A904294BF0120002081F88401EBE7F0 +:10EE30009448416891F86801032804D0012818BF5C +:10EE4000022807D004E091F86A01012808BF704742 +:10EE50000020704791F86901012814BF03280120A0 +:10EE6000F6D1704770B5F8F780F9F8F75FF9F8F761 +:10EE700037F8F8F7B5F8834C0025606890F876010C +:10EE800030B1F8F788F9F7F750FB606880F87651F1 +:10EE900060680121A0F8A55180F8A75180F874118D +:10EEA00080F85051002070BD764810B5406800F5DC +:10EEB000C47006F0A8F8002010BD72480121406817 +:10EEC00090F86821032A03BF80F85211D0F864211A +:10EED0001288002218BF80F85221A0F8542180F82F +:10EEE000501170476749496881F8AA017047017855 +:10EEF000002311F0010F634949680AD04278032AC0 +:10EF000008BFC1F8643181F86821012281F8A82185 +:10EF10001346027812F0040F0CD082784FF0000CE8 +:10EF2000032A08BFC1F864C181F868210B44082294 +:10EF300083F8A821C27881F858210279002A16BFE7 +:10EF4000022A0123002381F8613181F86921427985 +:10EF500081F86021807981F870014FF000007047DE +:10EF60004848406800F5D27070472DE9F041454CA3 +:10EF700005460E46606890F87401032818BFFFDF4D +:10EF8000022D1EBF032DFFDFBDE8F0814FF000070B +:10EF90004FF00105AEB1606890F8371089B1818EED +:10EFA00021F0600101F14001818690F8282042B9EA +:10EFB00080F8285011F0080F14BF0720062002F037 +:10EFC0008EFF6068A0F8A57180F8A77180F8745171 +:10EFD000BDE8F08100F09EBC2DE9F047294C0646C3 +:10EFE000894660684FF00108072E90F8617138BFBC +:10EFF000032533D3082E4FF0000088BFBDE8F0870B +:10F00000FEF7E7FF002878D1A068C17811F03F0F24 +:10F0100012D0027912F0010F0ED061684FF0050591 +:10F0200091F87621002A18BFB9F1000F16D091F897 +:10F03000A411012909D011E011F03F0F1ABF007986 +:10F0400010F0100F002F58D151E04FF001024FF097 +:10F050000501FDF7CCF8616881F87601A1680878B0 +:10F060002944C0F3801030B1487900F0C000402836 +:10F0700008BF012000D00020616891F876110029B6 +:10F0800002E000007801002018BF002807D0FDF73B +:10F09000C9F80146606880F8771180F8858160685A +:10F0A00090F87711FF292BD080F878110846FDF7EA +:10F0B000C6F840EA0705606890F87721FF2A18BF74 +:10F0C000002D10D0072E0ED3A068C17811F03F0F8D +:10F0D00009D0017911F0020F05D00B21FDF734F9A9 +:10F0E000606880F886812846BDE8F08705E0FCF777 +:10F0F00072FE002808BFBDE8F0870120BDE8F08758 +:10F10000A36890F8612159191B78C3F3801C00F2A1 +:10F1100077136046FCF7C3FE0546CCE72DE9F041C6 +:10F12000FE4C84B0A068FEF79BFC0126002550B180 +:10F13000022501287ED002287DD0F7F7D1FE04B049 +:10F140000620BDE8F081F7F7CBFE606890F8680113 +:10F15000032800F0C480A068C17811F03F0F05D0EB +:10F16000027912F0100F18BF012600D10026002EE0 +:10F1700014BF0822012211F03F0F43D0007932EA78 +:10F1800000013FD110F0020F06D00120FEF721FF51 +:10F19000002808BF012000D000208DF800508DF815 +:10F1A00004508DF80850FF27D0B102AA694601A883 +:10F1B00000F051FC606890F859719DF8000000283B +:10F1C00018BF47F002070BD1A068FEF7A1FA8046EE +:10F1D0000121A068FEF7F8FA4146F7F73CFC90B130 +:10F1E00066B1012000F0B9FB002878D03946002034 +:10F1F000FEF727FF606880F890516CE039460020E8 +:10F2000000F06CFB6BE0606890F86901032818BFA0 +:10F21000022864D19DF80400002860D09DF8000009 +:10F2200000285CD17EB1012000F097FB002856D069 +:10F23000FE2101E00CE032E00020FEF702FF6068F2 +:10F2400080F8905147E0FE21002000F047FB46E0A7 +:10F25000F7F746FEA0681821C27812F03F0F3ED0A3 +:10F26000027991433BD10421FEF7AEFA616891F82F +:10F270006821032A01BF8078B5EB501F91F8840103 +:10F2800000282CD04FF0010000F067FB38B3FF21BD +:10F290000120FEF7D6FE606880F890611BE0F7F76A +:10F2A0001FFE606890F86801032818D0A068182134 +:10F2B000C27812F03F0F12D0007931EA00000ED16F +:10F2C000012000F04AFB50B1FF210220FEF7B9FEF9 +:10F2D000606880F8905104B00320BDE8F08104B06C +:10F2E0000620BDE8F081F0B58C4C074683B060681D +:10F2F0006D460078002818BFFFDF002661688E7019 +:10F30000D1F8640102888A8042884A8382888A838D +:10F31000C088C88381F8206047B10121A068FEF74A +:10F3200053FA0546A0680078C10907E06946A0685D +:10F33000FEF7C3F9A0680078C0F380116068012768 +:10F3400090F87521002A18BF002904D06A7902F0CC +:10F35000C002402A26D090F87221002A18BF002946 +:10F3600003D0697911F0C00F1CD000F10E0006F037 +:10F37000B1FA616891F87801FF2819D001F108020B +:10F38000C91DFCF711FF002808BFFFDF6068C179C5 +:10F3900041F00201C171D0F891114161B0F89511AD +:10F3A000018310E02968C0F80E10A9884182E0E7C7 +:10F3B000D1F86401427ECA71D0F81A208A60C08BED +:10F3C00088814E610E8360680770D0F8642190F8E0 +:10F3D000731182F85710D0F864010088F3F73CFCF1 +:10F3E000F3F7D4F803B0F0BD2DE9F0414B4C0546DE +:10F3F00001276068002690F86811012918BF0229CA +:10F4000002D0032918BFFFDF55B1A068FEF734FA18 +:10F4100018B9A068FEF787FA10B100F0C6FB2DE01E +:10F42000606890F874017F25801F062828BFBDE81A +:10F43000F081DFE800F003191930443E3748F7F750 +:10F44000CEFE002808BF2570F7F7B0FE606890F880 +:10F45000760130B1F7F79FFEF7F767F8606880F83C +:10F460007661F7F73DFD20E02C48F7F7B8FE00285D +:10F4700008BF2570F7F79AFE00F07DFB102880F09A +:10F480004481DFE800F036B9C2C6F7F712CFF6F7CD +:10F49000F7F7249F386C2148F7F7A1FE002808BF32 +:10F4A0002570F7F783FEF7F71BFDBDE8F041FFF786 +:10F4B0009FB81A48F7F793FE30B9257004E0174853 +:10F4C000F7F78DFE0028F8D0F7F770FE9DE00320D7 +:10F4D00002F015F9002874D000210320FFF729F964 +:10F4E000012211461046F7F79BFE61680C2081F857 +:10F4F0007401BDE8F081606800F5BA75042002F07F +:10F50000FEF800285DD00E202870012002F0E7FCF4 +:10F51000A06861680078C0F3401001E07801002025 +:10F5200081F8990100210520FFF703F9F749A06848 +:10F530004FF0200CD1F864210378527B23F0200394 +:10F540000CEA42121A430270D1F8640195F8253092 +:10F55000427B1A4042732820D1F864112DE0062026 +:10F5600002F0CDF8002850D0E84D0F2085F8740146 +:10F57000022002F0B4FC6068012190F8A421084642 +:10F58000F7F74EFEA06861680078C0F3401081F87C +:10F59000990101210520FFF7CCF8D5F864014773E4 +:10F5A000A068017821F020010170F8F720FA002806 +:10F5B00018BFFFDF2820D5F8641181F85600BDE898 +:10F5C000F08122E0052002F09AF8F0B10121032039 +:10F5D000FFF7AFF8F8F70BFA002818BFFFDF6068F5 +:10F5E000012190F8A4210846F7F71AFE61680D2062 +:10F5F00081F87401BDE8F0816068A0F8A56180F829 +:10F60000A76180F87471BDE8F081BDE8F04100F0B9 +:10F6100081B96168032081F87401BDE8F0410820D8 +:10F6200002F05DBC606890F8A711490908BF012588 +:10F6300007D0012908BF022503D0022914BF0025E5 +:10F640000825D0F8800100281CBF002000F0B4F984 +:10F650006068D0F87C01F7F7DDFC606890F868110D +:10F66000022908D0032904BF90F89001012806D090 +:10F670000AE010E049E090F89001022804D12A46FF +:10F6800001210020F7F7CCFD6068072180F8A45124 +:10F6900080F8856135E0606890F8A711490908BFD6 +:10F6A000012507D0012908BF022503D0022914BF74 +:10F6B00000250825D0F8800100281CBF002000F09C +:10F6C0007BF96068D0F87C01F7F7A4FC606890F8DB +:10F6D0006811022906D0032904BF90F8900101287F +:10F6E00004D008E090F89001022804D12A460121B4 +:10F6F0000020F7F795FD6068082180F8A45180F894 +:10F70000856180F87411BDE8F081FFDFBDE8F0810C +:10F7100070B57F4C606890F8743100210C2B38D0A4 +:10F7200001220D2B40D00E2B55D00F2B1CBFFFDF1D +:10F7300070BD042002F0D3FB606890F8A4110E2085 +:10F74000F7F7E2F8606890F8A40110F00C0F14BF0E +:10F75000282100219620F7F77BFCF7F731FD606840 +:10F76000052190F8A451A068FCF7FCFD616881F8C0 +:10F77000760148B115F00C0F0CBF50255525F6F752 +:10F78000C0FE2846F7F7FDFC61680B2081F8740184 +:10F7900070BDF7F715FD00219620F7F759FC616859 +:10F7A000092081F8740170BD90F8A411FF20F7F7CB +:10F7B000ABF8606890F8A40110F00C0F14BF28217A +:10F7C00000219620F7F744FCF7F7FAFC61680A205D +:10F7D00081F8740170BDA0F8A51180F8A71180F818 +:10F7E00074210020FFF77FFDBDE87040032002F088 +:10F7F00076BB70B5464C606890F874117F25891F00 +:10F80000062928BF70BDDFE801F017321D033D1146 +:10F810003F48F7F7E4FC002808BF2570F7F7C6FC5F +:10F82000F7F75EFBBDE87040FEF7E2BE3848F7F739 +:10F83000D6FC60BB25702AE03548F7F7D0FCD8B974 +:10F84000257019E090F8371089B1818E012221F0DE +:10F8500060014031818690F8283043B980F8282033 +:10F8600011F0080F14BF0720062002F038FB2848CB +:10F87000F7F7B5FC0028E3D0F7F798FCBDE8704037 +:10F8800000F048B82248F7F7AAFC0028D2D0F7F7D2 +:10F890008DFC6068002100F5C47005F065FBBDE8D3 +:10F8A000704000F037B870B5194C06460D46012976 +:10F8B00008D0606890F8A4213046BDE87040134637 +:10F8C00002F059BBF6F7D6FF61680346304691F85F +:10F8D000A4212946BDE8704002F04DBB10B5FEF7EB +:10F8E000B0FB0B48406890F82810002918BF10BDE5 +:10F8F000012280F8282090F8340010F0080F14BF7F +:10F9000007200620BDE8104002F0E9BAF4100020FC +:10F910007801002070B5F7F728FCF7F707FCF7F738 +:10F92000DFFAF7F75DFBFE4C0025606890F8760182 +:10F9300030B1F7F730FCF6F7F8FD606880F87651E3 +:10F940006068022180F87411A0F8A55180F8A751D1 +:10F95000BDE87040002002F0C2BA70B5F04D064616 +:10F960000421A868FDF730FF0446686890F8280075 +:10F97000A0B901F0A7FE217811F0800F14BF4FF459 +:10F9800096711E21B4F80120C2F30C0212FB01F1A2 +:10F990000A1AB2F5877F28BF814201D2002070BDCC +:10F9A00068682188A0F8A511A17880F8A7113046D1 +:10F9B000BDE8704001F0A3BE2DE9F041D84C0746E8 +:10F9C000606800F2A51690F8A701400908BF01255C +:10F9D00007D0012808BF022503D0022814BF002544 +:10F9E0000825F7F70BFB307800F03F063046F7F7B5 +:10F9F00080F8606880F8976190F8900102280CBF49 +:10FA00004020FF202946F6F77FFF27B12946012035 +:10FA1000F7F763F906E060682A46D0F88011012004 +:10FA2000F7F7A4F9F7F7CCFB0521A068FCF79AFCDF +:10FA30006168002881F8760108BFBDE8F08115F003 +:10FA40000C0F0CBF50245524F6F75BFD2046BDE893 +:10FA5000F041F7F796BB2DE9F74FB14C00259146E1 +:10FA600060688A4690F8750100280CBF4FF00108C5 +:10FA70004FF00008A0680178CE090121FDF7A4FE2F +:10FA800036B1407900F0C000402808BF012600D000 +:10FA90000026606890F87611002963D090F868110C +:10FAA0004FF0000B03291ED190F86111002918BFF7 +:10FAB00090F87A7117D0FF2F18BF082F22D0384640 +:10FAC000FCF730F9002818BF4FF00108002E49D08C +:10FAD000606890F88601D0B1FCF7AFFB054660681E +:10FAE00080F886B13EE0A168CA7812F03F0F19BFD6 +:10FAF000097911F0010F90F82B10FF2918BF90F829 +:10FB00007771D8D176B390F8850170B12AE0384684 +:10FB1000FCF741FB05460121A068FDF755FE0146B3 +:10FB20002846F8F757F805461CE0A068C17811F0A0 +:10FB30003F0F05D0017911F0010F18BF0B2101D142 +:10FB40004FF005014FF00002FCF751FB616881F8AE +:10FB5000760138B1FCF766FBFF2803D06168012508 +:10FB600081F877018AF800500098067089F80080C3 +:10FB700003B0BDE8F08F6A4810B5406890F83710C0 +:10FB800089B1818E012221F060014031818690F897 +:10FB9000283043B980F8282011F0080F14BF07203F +:10FBA000062002F09CF9022010BD2DE9F04F5C4DBB +:10FBB00083B00024686890F874017F27801F264670 +:10FBC0004FF00108062880F04082DFE800F00308CB +:10FBD0000893FEFD00F01EFC044600F037BA5048C2 +:10FBE000F7F7FDFA002808BF2F70F7F7DFFAA868CB +:10FBF000FDF758FD044607286AD1A868FDF730FFD5 +:10FC0000696891F89021824262D191F874010628C6 +:10FC100004D1A868FDF724FF002836D0686890F862 +:10FC20007411082904BF90F8A101022813D04FF0E5 +:10FC30000301A868FDF7C8FD002849D0696843782A +:10FC400091F83820B2EB131F42D10088498FC0F3DE +:10FC50000B0088423CD100212046FFF7BDF9B0B32C +:10FC60008DF800608DF804608DF80860A868FF24A6 +:10FC7000C17811F03F0F1CBF007910F0020F1CD0AB +:10FC80000120FEF7A6F950B117E0A868C17811F07D +:10FC90003F0F1CBF007910F0100FBFD1DBE702AAA5 +:10FCA000694601A8FFF7D7FE686890F859419DF8AA +:10FCB0000000002818BF44F0020423469DF80820E5 +:10FCC0009DF804109DF8000000F012FA02E0FFE732 +:10FCD000FFF751FF0446686890F87601002800F0AD +:10FCE000B581F7F758FAF6F720FC686880F8766176 +:10FCF00000F0ACB9A868FDF7D5FC8146A968686832 +:10FD0000CA7890F891319A4224D10A7990F89231C8 +:10FD10009A421FD14A7990F893319A421AD101E060 +:10FD2000780100208A7990F894319A4212D1CA79E8 +:10FD300090F895319A420DD10A7A90F896319A420C +:10FD400008D1097890F89801C1F38011814208BF69 +:10FD5000012400D00024F7F7C3F8FB48F7F73FFA77 +:10FD6000002808BF2F70F7F721FAB9F1040F76D1F8 +:10FD7000002C74D0686890F8481100296FD190F871 +:10FD8000281021B190F8341011F0100F67D0D0F87E +:10FD90004C411D21204605F070FC84F80080686805 +:10FDA00004F1020A04F1010990F87801FF2810D04B +:10FDB00052464946FCF7F8F9002808BFFFDF99F8DA +:10FDC000000040F0020001E04CE0FFE089F8000094 +:10FDD0001DE0A868FDF78FFC89F80000A868FDF712 +:10FDE00061FC072804D25146A868FDF766FC0EE0C6 +:10FDF000A868FDF757FC072809D10021A868FDF77E +:10FE0000E3FC0168CAF800108088AAF8040004F135 +:10FE10001D01A868FDF78FFC2072287804F10909FC +:10FE20007F2808BFFFDF287889F800002F706868F6 +:10FE3000618990F8A12162F3000141F01A0161810A +:10FE400084F80C806673FF21A1732175E77690F822 +:10FE50009711217780F84881072002F040F80624A6 +:10FE600000F0F4B84FF00208B748F7F7B8F90028E7 +:10FE700008BF2F70F7F79AF9A868FDF713FC04463E +:10FE8000A868FDF7EDFD082C08BF00287ED1A86802 +:10FE90004FF00301C27812F03F0F77D0007931EABA +:10FEA000000073D1686800F5BA7790F86101002806 +:10FEB00014BFBE79FE784FF00009B87878B1FCF72E +:10FEC000B1F90446FF280AD00146A868401DFCF796 +:10FED00082F9B4420CBF4FF001094FF00009002134 +:10FEE000A868FDF771FC062207F11D0105F01AFB59 +:10FEF00040B9A868FDF7FFFB97F82410884208BFB7 +:10FF0000012000D0002059EA00095DD0686800F5A2 +:10FF1000AD7490F859A1787838B13046FCF771FA91 +:10FF200000281CBF04464FF0010A0027A86801788A +:10FF30004FEAD11B0121FDF747FCBBF1000F07D0B1 +:10FF4000407900F0C000402808BF4FF0010B01D0FD +:10FF50004FF0000B0121A868FDF736FC0622214670 +:10FF600005F0E0FA30B9A868FDF7D2FB504508BFAC +:10FF7000012401D04FF000043BEA040018BFFF2E1B +:10FF80000FD03046FCF707F9060000E01CE008D06F +:10FF90000121A868FDF718FC01463046F7F71AFE64 +:10FFA000074644EA070019EA000F0DD068680121EE +:10FFB00000F5C47004F0D8FF4FF001084046FFF789 +:10FFC00092F9052001F08BFF44463FE002245E4891 +:10FFD000F7F705F9002808BF2F70F7F7E7F8A868CA +:10FFE000FDF760FB0646A868FDF73AFD072E08BF3F +:10FFF00000282BD1A8684FF00101C27812F03F0F02 +:020000040002F8 +:1000000024D00279914321D1696801F5BA760021A3 +:10001000FDF7DAFB062206F11D0105F083FAA8B907 +:10002000A868FDF768FB96F8241088420ED168682E +:10003000012100F5C47004F097FFFF21022000F0B9 +:1000400009F8002818BF032400E0FFDF03B02046B2 +:10005000BDE8F08F2DE9F0413B4C02460025606879 +:1000600090F8A1310BB3A0684FF000064FF00107E4 +:10007000C37813F03F0F1CBF007910F0100F1BD096 +:100080000020FDF7DEFF606890F83400C0F34110F7 +:1000900002281BD00220FFF760FC88B160680125B0 +:1000A00080F89061F6F71CFF1FE0002A14BF0223BE +:1000B000012380F8A131D6E71046FDF7C2FF05E025 +:1000C0006068818E21F0600140318186606890F81F +:1000D000281051B980F8287090F8340010F0080FFB +:1000E00014BF0720062001F0FAFE2846BDE8F08183 +:1000F0002DE9F047144C05461F4690460E46A06871 +:10010000FDF7AEFC002800F0D180012805D00228C0 +:1001100000F00E81BDE8F0472DE5A0680921C27806 +:1001200012F03F0F00F042810279914340F03E818E +:10013000616891F86811032908D012F0020F08BF16 +:10014000FF211BD075B118E0780100200021FDF7D8 +:100150003BFB61680622D1F864111A3105F0E2F91F +:1001600050BB1EE0FDF7D4FA05460121A068FDF75B +:100170002BFB2946F6F76FFC18B13946012000F039 +:1001800039B9606890F86901032818BF022840F067 +:100190000D81002E1CBFFE21012040F02B8100F0BC +:1001A00005B9A068FDF7A7FA6168D1F86411497E26 +:1001B000884208BF012600D00026A068C17811F04F +:1001C0003F0F05D0017911F0020F01D05DB338E087 +:1001D000616891F86A21012A01D0A6B119E0C6B977 +:1001E0000021FDF7F1FA61680268D1F86411C1F8E5 +:1001F0001A208088C883A068FDF77DFA6168D1F86D +:100200006411487605E091F8770191F87A118842F7 +:100210004BD1606800F5C47004F0EAFE002844D0B9 +:100220000F20BDE8F087B8F1000F0CD0FDF770FA91 +:1002300005460121A068FDF7C7FA2946F6F70BFC31 +:1002400008B1012200E00022616891F86A010128EA +:1002500007D040B92EB991F8773191F87A118B42D5 +:1002600001D1012100E000210A421ED0012808BF6F +:10027000002E13D14FF00001A068FDF7A5FA6168C8 +:100280000268D1F86411C1F81A208088C883A06878 +:10029000FDF731FA6168D1F864114876606800F5BD +:1002A000C47004F0A5FE0028BAD17FE06068A846BB +:1002B0004FF0020990F8680103282AD0A068C1789D +:1002C00011F03F0F1BBF007910F0020F002001203A +:1002D0004FF0FF05A8B14FF00100FDF77AFE0028AE +:1002E00004BF3D46B8F1000F0BD1A068FDF710FA2E +:1002F00007460121A068FDF767FA3946F6F7ABFB20 +:1003000050B129460020FFF7A5FE002818BF4FF086 +:1003100003094846BDE8F087606890F86901032842 +:1003200018BF0228F5D1002E18BFFE25E9D1F0E74D +:10033000626892F86831032B38D0A0684FF0090C3E +:10034000C17811F03F0F31D001793CEA010C2DD179 +:10035000022B01F0020105D0002908BFFF2147D080 +:10036000CDB344E009B135B113E002F5C47004F037 +:100370003FFEA0B91AE0B8F1000F1AD0FDF7C8F996 +:1003800005460121A068FDF71FFA2946F6F763FB31 +:1003900078B1606800F5C47004F02AFE30B13946C7 +:1003A0000220FDF74EFE0D20BDE8F0870220BDE8DB +:1003B000F087606890F86901032818BF0228F5D11A +:1003C000002EF3D04FF0FE014FF00200FFF786FA47 +:1003D0000220BDE8F087FFE7FDF79AF90546012105 +:1003E000A068FDF7F1F92946F6F735FB28B1394643 +:1003F0005FF00200FFF772FAD8E7606890F86901D1 +:10040000032818BF0228D1D1002E1CBFFE210220D4 +:10041000F0D1CBE72DE9F84F0027D048F6F7DFFE03 +:10042000CE4C002804BF7F202070F6F7BFFEA068E6 +:10043000FDF738F980460121FEF7CEFD61684FF0E7 +:10044000000B91F8A421012A13D0042A1CBF082A0A +:10045000FFDF00F07781606890F8760130B1F6F741 +:100460009AFEF6F762F8606880F876B13846BDE823 +:10047000F88F0125BA4EB8F1080F19D2DFE808F05D +:1004800024860418181811FD0546F6F729FD002DDD +:100490007AD0606890F86801012818BF022858D007 +:1004A00072E028B191F86801022805D0012850D0E7 +:1004B000F6F716FD0627CEE7FF20FDF7D9FF6068A7 +:1004C0000C2780F8A1B1C6E70027002800F02081A2 +:1004D00091F86801022834D001283AD00328BAD113 +:1004E000A068D1F86421C37892F81AC0634521D17D +:1004F000037992F81BC063451CD1437992F81CC064 +:10050000634517D1837992F81DC0634512D1C37931 +:1005100092F81EC063450DD1037A92F81FC063455F +:1005200008D1037892F819C0C3F38013634508BF5C +:10053000012300D0002391F86A1101290DD0D3B115 +:10054000E4E0FF20FDF794FF60680C2780F8A151DC +:1005500081E7FF20FDF78CFF16E0002B71D102F13F +:100560001A01FDF7AAF8A068FDF7C5F86168D1F88F +:1005700064114876CAE096F87A0108287CD096F88B +:10058000771181425DD0C3E0062764E7054691F804 +:10059000750100280CBF4FF001094FF0000900273A +:1005A000A06810F8092BD20907D0407900F0C000EC +:1005B000402808BF4FF0010A01D04FF0000A91F81F +:1005C0006801032806D191F86101002818BF91F84D +:1005D0007A0101D191F877010090FBF7DCFD5FEA29 +:1005E00000082AD00098FBF79DFB002818BF4FF0A9 +:1005F0000109BAF1000F20D0A06800F109014046BE +:10060000F7F7E8FA0700606890F8598118BF48F0DA +:100610000208606890F86811032913D0F6F760FCAF +:10062000002DB1D0F6F727FA00280CBF002F404666 +:1006300072D000BFFDF71CFFA6E7606890F85981F3 +:10064000E7E763E0A168D0F86401CA78837E9A4244 +:100650001FD10A79C37E9A421BD14A79037F9A42FD +:1006600017D18A79437F9A4213D1CA79837F9A42FC +:100670000FD10A7AC37F01E04AE05BE09A4208D1D9 +:100680000978407EC1F38011814208BF4FF0010814 +:1006900001D04FF0000896F87701082806D096F8A8 +:1006A0007A11884208BF4FF0010A01D04FF0000ACA +:1006B0002FB9B9F1000F04D0F6F7DDF908B1012028 +:1006C00000E000204DB196F86A11012903D021B94C +:1006D00058EA0A0101D0012100E00021084217D0A8 +:1006E000606890F86A11012908BFB8F1000F0DD1B8 +:1006F000D0F8640100F11A01A068FCF7DEFFA068E1 +:10070000FCF7F9FF6168D1F8641148760E27A2E67C +:10071000F6F7E6FB38E7FFE7606890F86901032821 +:1007200018BF02287FF430AFBAF1000F18BFFE20C7 +:1007300080D129E791F87011002918BF00283FF4F3 +:10074000B7AE06E0B8F1070F7FF4B2AE00283FF471 +:10075000AFAEFEF7E3FC07467DE60000780100201F +:10076000F4100020D0F8E81049B1D0E93B231A4436 +:100770008B691A448A61D0E93912D16003E0F74AE3 +:10078000D0F8E4101162D0E9391009B1086170475E +:100790000028FCD00021816170472DE9FF4F0646FB +:1007A0000C46488883B040F2E24148430190E08A19 +:1007B000002500FB01FA94F8640090460D2822D031 +:1007C0000C2820D024281ED094F8650024281AD0A4 +:1007D00000208346069818B10121204603F000F955 +:1007E00094F8541094F85500009094F8D8200F46CF +:1007F0004FF47A794AB1012A61D0022A44D0032AFF +:100800005DD0FFDFB5E00120E3E7B8F1000F00D1D4 +:10081000FFDFD24814F8541F243090F83800FCF75A +:1008200004FF01902078F7F75EF84D4600F2E730BC +:10083000B0FBF5F1DFF82493D9F80C0001EB0008C8 +:100840002078F7F750F8014614F85409022816D01A +:10085000012816D040F6340008444AF2EF0108445B +:10086000B0FBF5F10198D9F81C20411A514402EB74 +:1008700008000D18012084F8D8002D1D78E02846C6 +:10088000EAE74FF4C860E7E7DFF8D092A8F101008B +:10089000D9F80810014300D1FFDFB148B8F1000FCB +:1008A000016801EB0A0506D0D9F8080000F22330F0 +:1008B000A84200D9FFDF032084F8D80058E094F85C +:1008C0006420019D242A05D094F86530242B01D0A2 +:1008D000252A3AD1B4F85820B4F8F830D21A521C6C +:1008E00012B2002A31DB94F8FA2072B3174694F85A +:1008F000FB2002B110460090022916D0012916D023 +:1009000040F6340049F608528118022F12D0012F08 +:1009100012D040F634001044814210D9081A00F574 +:10092000FA70B0FBF9F005440FE04846EAE74FF4EF +:10093000C860E7E74846EEE74FF4C860EBE7401AC7 +:1009400000F5FA70B0FBF9F02D1AB8F1000F0FD0D6 +:10095000DFF80882D8F8080018B9B8F8020000B12A +:10096000FFDFD8F8080000F22330A84200D9FFDFEB +:1009700005B9FFDF2946D4F8DC00F3F77EFEC4F8A2 +:10098000DC00B060002030704FF0010886F8048071 +:10099000204603F080F8ABF10101084202D186F84D +:1009A000058005E094F8D80001282FD0032070714D +:1009B000606A3946009A01F026FBF060069830EA3A +:1009C0000B0020D029463046FCF752FB87B2204668 +:1009D00003F061F8B8420FD8074686F8058005FB9A +:1009E00007F1D4F8DC00F3F748FEB0602946304642 +:1009F000FCF73EFB384487B23946204602F0F0FF50 +:100A0000B068C4F8DC0007B0BDE8F08F0220CEE784 +:100A10002DE9F04106460C46012001F0D6FAC5B298 +:100A20000B2001F0D2FAC0B2854200D0FFDF0025D2 +:100A3000082C7DD2DFE804F00461696965C98E96EF +:100A4000304601F0D6FA0621F1F7D4FF040000D1B8 +:100A5000FFDF304601F0CDFA2188884200D0FFDF69 +:100A600094F8D80000B9FFDF204602F060FE3B4E4C +:100A700021460020B5607580F561FCF729FC00F186 +:100A80009807606AB84217D994F85500F6F712FF34 +:100A9000014694F854004FF47A72022828D00128B5 +:100AA00028D040F6340008444AF247310844B0FBED +:100AB000F2F1606A0844C51B214600203561FCF74D +:100AC00007FC618840F2E24251439830081AA0F2D4 +:100AD0002330706194F8552094F85410606A01F046 +:100AE00092FAA0F29310B061BDE8F041F4F7AABD0C +:100AF0001046D8E74FF4C860D5E7BDE8F04102F0F2 +:100B000080BEBDE8F041F6F7A7BB6FF0040001F02E +:100B10005CFAC4B2192001F058FAC0B2844200D085 +:100B2000FFDF304601F065FA0621F1F763FF00E0D0 +:100B30004BE0040000D1FFDF304601F05AFA218873 +:100B4000884200D0FFDF2046BDE8F04101220021AD +:100B500001F076BAF6F720FAD3E70000A0120020E1 +:100B600088010020304601F044FA0621F1F742FFE7 +:100B7000040000D1FFDF304601F03BFA21888842B3 +:100B800000D0FFDF94F8D800042800D0FFDF84F8FD +:100B9000D85094F8E2504FF6FF76202D00D3FFDFB7 +:100BA000FB4820F8156094F8E200F4F746F800B925 +:100BB000FFDF202084F8E2002046FFF7D3FDF54850 +:100BC0000078BDE8F041E2F7A7B9FFDFBDE8F081AA +:100BD00070B5EF4C0025483C84F82C50E07868B1A3 +:100BE000E570FEF76AF92078042803D0A06AFFF7C1 +:100BF000B9FDA562E7480078E2F78EF9BDE87040DC +:100C000001F02FBA70B5E24C0146483C206AF4F777 +:100C10004CFD6568A27890FBF5F172B140F271224B +:100C2000B5FBF2F292B2E36B01FB02F6B34202D9DA +:100C300001FB123200E00022E2634D43002800DA9B +:100C4000FFDF2946206AF3F718FD206270BD2DE909 +:100C5000F05FFEF785F98246CD486C3800F1240834 +:100C600081684646D8F81C00F3F707FD0146306A54 +:100C7000F4F71BFD4FF00009074686F839903C4613 +:100C80004FF423754E461CE00AEB06000079F6F798 +:100C900011FE4AF2B12101444FF47A70B1FBF0F138 +:100CA00008EB86024046926811448C4207D3641ACE +:100CB00090F83910A4F52374491C88F83910761C73 +:100CC000F6B298F83A00B042DED8002C0FDD98F862 +:100CD0003910404608EB81018968A14207D241687A +:100CE000C91BA94200D90D466C4288F8399098F882 +:100CF0003960C3460AEB060898F80400F6F7DAFDF7 +:100D000001464AF2B12001444FF47A7AB1FBFAF27B +:100D100098F80410082909D0042909D000201318D4 +:100D200004290AD0082908D0252007E0082000E07F +:100D3000022000EB40002830F1E70F20401D4FF467 +:100D4000A872082913D0042914D0022915D04FF015 +:100D5000080C282210FB0C20184462190BEB8603A8 +:100D600002449868D84682420BD8791925E04FF0A2 +:100D7000400CEFE74FF0100CECE74FF0040C18229A +:100D8000E8E798F8392098F83A604046B24210D225 +:100D9000521C88F839203C1B986862198418084650 +:100DA000F6F788FD4AF2B1210144B1FBFAF00119CE +:100DB00003E080F83990D8F80410D8F82000BDE896 +:100DC000F05FF3F75ABC2DE9FE4F14460546FEF7D7 +:100DD000C7F8DFF8BCB10290ABF1480B58469BF85E +:100DE00039604FF0000A0BEB86018968CBF84010A0 +:100DF000ECB3044600780027042827D0052840D00B +:100E0000FFDFA0463946A069F3F737FC0746F3F742 +:100E100033FF81463946D8F80440F4F746FC401EBB +:100E200090FBF4F0C14361433846F3F726FC0146DA +:100E3000C8F820004846F4F738FC002800DDFFDF42 +:100E4000012088F8140088F813008FE0D4F8189077 +:100E5000D4F8048001F06FF9070010D0387800B999 +:100E6000FFDF796978684A460844414600E00EE0B1 +:100E700001F049F907464045C3D9FFDFC1E75746AE +:100E8000BFE7A06A01F0FAF840F6B837B9E7016A9F +:100E90000BEB46000191C08D08B35C46DBF81800EF +:100EA000FFF7B0FE6168206AF3F7E7FB074684F8B6 +:100EB00039A0019CD8462046DBF81810F4F7F5FB62 +:100EC000814639462046F4F7F0FBD8F80420B9FBF8 +:100ED000F2F3B0FBF2F0834243D0012142E0F3F79A +:100EE000CBFEFFF78FFEFFF7B2FE9BF83910DBF861 +:100EF00004900BEB81010746896800913946DBF8C5 +:100F00002000F4F7D2FB00248046484504DB98FB20 +:100F1000F9F404FB09F41BE0002059469BF8392042 +:100F200008E000BF01EB800304F523749B68401CBC +:100F30001C44C0B28242F5D852B10120F6F7BAFC87 +:100F40004AF2B12101444FF47A70B1FBF0F004444D +:100F50000099A8EB04000C1A00D5FFDFCBF8404045 +:100F6000A7E7002188F8141088F813A09BF8020066 +:100F70005C46B8B13946206AF4F797FB0146E26B4C +:100F800040F2712042438A4206D2C4F840A009E0F0 +:100F90000C13002084010020206C511A884200D3D9 +:100FA00008462064AF6085F800A001202871029FE8 +:100FB00094F839003F1DC05DF6F77CFC4AF23B51C6 +:100FC00001444FF47A70B1FBF0F0216CFB3008441F +:100FD000E8602078042808D194F8390004EB400038 +:100FE000C08D0A2801D2032000E00220687104EBC2 +:100FF0004600C08DC0B128466168FCF739F882B25E +:101000000020761C0CE000BF04EB4003B042D98DF9 +:10101000114489B2D98501D3491CD985401CC0B27D +:1010200094F83A108142EFD2A868A061E06194F888 +:10103000390004EB4000C18D491CC18594F839008A +:10104000C05D082803D0042803D000210BE008214C +:1010500000E0022101EB410128314FF4A872082879 +:1010600004D0042802D0022807D028220A440428E9 +:1010700005D0082803D0252102E01822F6E70F2129 +:10108000491D08280CD004280CD002280CD00820B8 +:1010900011FB0020216C884208D20120BDE8FE8FA0 +:1010A0004020F5E71020F3E70420F1E70020F5E702 +:1010B00070B5FB4C061D14F8392F905DF6F7FAFB5E +:1010C0004FF47A7100F2E730B0FBF1F0D4F807107A +:1010D00045182078805DF6F7DBFB2178895D0829CB +:1010E00003D0042903D000220BE0082200E00222F2 +:1010F00002EB420228324FF4A873082904D00429D5 +:1011000002D0022907D028231344042905D0082936 +:1011100003D0252202E01823F6E70F22521D0829EA +:101120000AD004290AD002290AD0082112FB013171 +:10113000081A281A293070BD4021F7E71021F5E779 +:101140000421F3E7FEB504460F46012000F03DFF01 +:10115000C5B20B2000F039FFC0B2854200D0FFDFDE +:1011600001260025CE48082F50D2DFE807F00430D2 +:101170004747434F4F4C0446467406744078002856 +:1011800019D1FDF7EDFE009594F839108DF808108F +:101190004188C90410D0606C019003208DF80900CB +:1011A000BF4824388560C56125746846FDF7C5FBD6 +:1011B000002800D0FFDFFEBDFFF77AFF0190207D01 +:1011C00010B18DF80950EBE78DF80960E8E70446A7 +:1011D000407840B1207C08B9FDF744FE6574BDE855 +:1011E000FE40F3F753BCA674FDF786FC0028E2D05E +:1011F000FFDFFEBDBDE8FE40F6F72EB82046BDE895 +:10120000FE4000F0A1BFBDE8FE40E1E4FFDFFEBD0F +:10121000A34950B101228A704A6840F27123B2FB9F +:10122000F3F202EB0010C86370470020887070472B +:101230002DE9F05F894640F27121994E484300251F +:101240000446706090462F46D0074AF2B12A4FF408 +:101250007A7B0FD0B9F800004843B0600120F6F760 +:1012600029FB00EB0A01B1FBFBF0241AB76801254A +:10127000A4F523745FEA087016D539F8151040F20A +:101280007120414306EB85080820C8F80810F6F7DE +:1012900011FB00EB0A01B1FBFBF0241AD8F808009F +:1012A000A4F5237407446D1CA7421AD9002D18D049 +:1012B000391BB1FBF5F0B268101AB1FBF5F205FB72 +:1012C0001212801AB060012009E000BFB1FBF5F3F3 +:1012D00006EB80029468E31A401CC0B29360A842F7 +:1012E000F4D3BDE8F09F2DE9F0416D4C0026207845 +:1012F000042804D02078052801D00C2066E40120C1 +:101300006070607C002538B1EFF3108010F0010FA1 +:1013100072B610D001270FE0FDF722FE074694F8C1 +:101320002400F4F70EF87888C00411D000210320BF +:10133000FDF71BFE0CE00027607C38B1A07C28B1D3 +:10134000FDF790FD6574A574F3F7A0FB07B962B6CD +:1013500094F82400F4F743FA94F82C0030B184F8A0 +:101360002C502078052800D0FFDF0C26657000F097 +:1013700078FE30462AE44A4810B5007808B1FFF7F5 +:10138000B2FF00F011FF464900202439086210BD69 +:1013900010B5444C58B1012807D0FFDFA06841F6D2 +:1013A0006A01884200D3FFDF10BD40F6C410A06080 +:1013B000F4E73C4908B508703949002008704870C6 +:1013C00081F82C00C87008744874887420228862E0 +:1013D00081F82420243948704FF6FF7211F16C0116 +:1013E00021F81020401CC0B22028F9D30020FFF7BC +:1013F000CFFFFFF7C0FF1020ADF8000001226946C3 +:101400000420FFF715FF08BD7FB5254C05460E46A5 +:10141000207810B10C2004B070BD95F8552095F8D7 +:101420005410686A00F002FFC5F8EC00A56295F858 +:10143000D80000B1FFDF1A4900202439C861052116 +:101440002170607084F82C00014604E004EB410236 +:10145000491CD085C9B294F83A208A42F6D284F861 +:1014600039003046FFF7D4FE0F48F3F78AFB84F8C3 +:101470002400202800D1FFDFF3F7FEFBA06194F8E1 +:10148000241001226846FFF79EFC00B9FFDF94F8A4 +:1014900024006946F3F73AFE00B9FFDF0020BAE7FF +:1014A000C41200208401002045110200F84810B544 +:1014B000007808B1002010BD0620F1F735FA80F061 +:1014C000010010BDF8B5F24D0446287800B1FFDFE9 +:1014D0000020009023780246DE0701466B4605D0C7 +:1014E0006088A188ADF800100122114626787607A1 +:1014F00006D5E088248923F8114042F00802491CEF +:10150000491E85F83A101946FFF792FE0020F8BDF3 +:101510001FB511B1112004B010BDDD4C217809B107 +:101520000C20F8E70022627004212170114604E0CB +:1015300004EB4103491CDA85C9B294F83A308B4276 +:10154000F6D284F83920FFF763FED248F3F719FB8F +:1015500084F82400202800D1FFDF00F0ECFD10B15A +:10156000F3F78AFB05E0F3F787FB40F6B831F3F7B2 +:1015700084F8A06194F8241001226846FFF723FC48 +:1015800000B9FFDF94F824006946F3F7BFFD00B906 +:10159000FFDF0020BFE770B5BD4CA16A0160FFF717 +:1015A000A2FE050002D1A06AFFF7DCF80020A062CD +:1015B000284670BD7FB5B64C2178052901D00C2096 +:1015C00029E7B3492439C860A06A00B9FFDFA06ADF +:1015D00090F8D80000B1FFDFA06A90F8E200202860 +:1015E00000D0FFDFAC48F3F7CCFAA16A054620280B +:1015F00081F8E2000E8800D3FFDFA548483020F8CC +:101600001560A06A90F8E200202800D1FFDF0023D7 +:1016100001226846A16AFFF7C0F8A06A694690F8FF +:10162000E200F3F773FD00B9FFDF0020A062F2E6ED +:10163000974924394870704710B540F2E24300FBE7 +:1016400003F4002000F0F2FD844201D9201A10BDFD +:10165000002010BD70B50D46064601460020FBF780 +:1016600037FE044696F85500F6F724F9014696F839 +:1016700054004FF47A72022815D0012815D040F694 +:10168000340008444AF247310844B0FBF2F1708854 +:1016900040F271225043C1EB4000A0F22330A5423A +:1016A00006D2214605E01046EBE74FF4C860E8E7B4 +:1016B0002946814204D2A54201D2204600E02846B4 +:1016C000706270BD70B5F5F7D5F80446F6F7E0F82E +:1016D00001466F48243882684068101A0E18204668 +:1016E00000F06AFC05462046F6F7E4F8281A4FF4A5 +:1016F0007A7100F2E730B0FBF1F0304470BD70B5A4 +:101700000546FDF72DFC6249007824398C68983431 +:10171000072D30D2DFE805F0043434252C343400B2 +:1017200014214FF4A873042810D00822082809D0E7 +:101730002A2102280FD011FB024000222823D118B1 +:10174000441819E0402211FB0240F8E7102211FB77 +:1017500002402E22F3E7042211FB0240002218234C +:10176000EDE7282100F040FC044404F5317403E067 +:1017700004F5B07400E0FFDF4548006CA04201D9D9 +:10178000012070BD002070BD70B5414C243C6078D4 +:1017900070B1D4E904512846A268FBF794FC20619B +:1017A000A84205D0A169401B0844A061F3F74AFF95 +:1017B0002169A068884201D8207808B1002070BD56 +:1017C000012070BD2DE9F04F054685B016460F4645 +:1017D0001C461846F6F75CF805EB4701471820460B +:1017E00000F0EAFB4AF2C5714FF47A7908444D469D +:1017F000B0FBF5F0384400F16008254824388068D3 +:10180000304404902046F6F743F8A8EB0007204642 +:1018100000F0D2FB06462046F6F74CF8301AB0FB33 +:10182000F5F03A1A182128254FF4C8764FF4BF77FF +:101830004FF0020B082C34D0042C2FD00020022CA7 +:1018400032D0082310F1280003EB830C0CEB831338 +:10185000184402444FF0000A082C2DD0042C26D046 +:101860000020022C2DD0082100F5B07001EB0111F1 +:101870002944884232D2082C2AD0042C25D00020BA +:10188000022C28D00821283001EB011134E000009F +:10189000C412002045110200110A0200384610232C +:1018A000D2E730464023CFE704231830CCE73D464B +:1018B00040F2EE301021D9E735464FF43560402133 +:1018C000D4E70D460421B430D0E738461021DBE7D9 +:1018D00030464021D8E704211830D5E7082C4FD0F6 +:1018E000042C4AD00020022C4DD0082110F12800F1 +:1018F000C1EBC10303EB4111084415182821204610 +:1019000000F072FB05EB4000082C42D0042C3DD0C7 +:101910000026022C3FD0082116F1280601EB811188 +:1019200006EB810146180120FC4D8DF804008DF86E +:1019300000A08DF805B0E86906F227260499F2F7B1 +:101940009CFECDE902062046F5F7B4FF4AF23B5172 +:101950000144B1FBF9F0301AFB3828640298C5F84D +:101960004480E86195F824006946F3F7CFFB00282E +:1019700000D1FFDF05B0BDE8F08F38461021B7E792 +:1019800030464021B4E704211830B1E73E4610212B +:10199000C4E74021C2E704211836BFE72DE9FE4F16 +:1019A00004461D46174688464FF0010A1846F5F7CB +:1019B0006FFFDA4E0146243EB068021907EB48007B +:1019C00010440F18284600F0F7FA4FF47A7B00F61F +:1019D000FB01D846B1FBF8F0384400F12009284655 +:1019E000F5F756FFB1680246A9EB0100001B861A05 +:1019F000284600F0E1FA07462846F5F75BFF381A5B +:101A0000B0FBF8F0311A182628234FF4C8774FF4AA +:101A1000BF78082D2CD0042D27D00020022D2AD0ED +:101A20000822283002EB820C0CEB82121044014495 +:101A3000082D28D0042D21D00020022D28D01E46AC +:101A4000082200F5B07000BF02EB0212324490424F +:101A50002AD2082D22D0042D1DD00020022D20D006 +:101A60000822283002EB02122CE040461022D9E76F +:101A700038464022D6E704221830D3E7464640F2E3 +:101A8000EE301022E0E73E464FF435604022DBE7BF +:101A90000422B430D8E740461022E3E7384640221B +:101AA000E0E704221830DDE7082D4DD0042D48D0A2 +:101AB0000020022D4BD0082210F12800C2EBC203F7 +:101AC00003EB421210440E182821284600F08CFA2D +:101AD00006EB4000082D40D0042D3BD00027022DFE +:101AE0003DD0082117F1280701EB811107EB810197 +:101AF000451805F596750C98F5F7DCFE4AF23B5152 +:101B00000144B1FBFBF0854EFB30A6F12407316C9C +:101B100004F1FB020844B9684B191A44824228D9DF +:101B2000621911440D1AFB35E1F7B0F8B9680844A1 +:101B300061190844B0F1807F36D2642D12D264203E +:101B400011E040461022B9E738464022B6E70422A9 +:101B50001830B3E747461021C6E74021C4E7042107 +:101B60001837C1E72846F3F7D4FDE8B1306C2844B4 +:101B70003064E1F78BF8B968293821440844CDE98D +:101B8000000996F839008DF8080002208DF8090048 +:101B90006846FCF7D2FE00B1FFDFFCF7ADFF00B1F5 +:101BA000FFDF5046BDE8FE8F4FF0000AF9E71FB592 +:101BB00000F042FB594C607880B994F82410002260 +:101BC0006846FFF700F938B194F824006946F3F746 +:101BD0009DFA18B9FFDF01E00120E070F2F756FF2F +:101BE00000206074A0741FBD2DE9F84FFDF7B8F90F +:101BF0000646451CC07840090CD001280CD00228AC +:101C00000CD000202978824608064FF4967407D439 +:101C10001E2006E00120F5E70220F3E70820F1E7A7 +:101C20002046B5F80120C2F30C0212FB00F7C809E8 +:101C300001D010B103E01E2401E0FFDF0024FFF714 +:101C400041FDA7EB00092878B77909EB0408C0F338 +:101C5000801010B120B1322504E04FF4FA7501E094 +:101C6000FFDF00250C2F00D3FFDF2D482D4A30F871 +:101C70001700291801FB0821501CB1FBF0F5F4F7FF +:101C8000F9FDF5F717FE4FF47A7100F27160B0FBC1 +:101C9000F1F1A9EB0100471BA7F15900103FB0F586 +:101CA000237F11D31D4E717829B902465346294628 +:101CB0002046FFF787FD00F0BFFAF2F7E7FE0020AD +:101CC0007074B074BDE8F88F3078009053462246A7 +:101CD00029463846FFF762FE0028F3D10121022091 +:101CE000FDF743F9BDE8F84F61E710B50446012957 +:101CF00003D10A482438007830B1042084F8D80091 +:101D0000BDE81040F2F7C2BE00220121204600F0DB +:101D100097F934F8580F401C2080F1E7C4120020D6 +:101D2000A45C02003F420F002DE9F0410746FDF799 +:101D300017F9050000D1FFDF29783846FBF775FC5D +:101D4000F84C0146A4F12406E069B268024467B386 +:101D50002878082803D0042803D000270BE00823A4 +:101D600000E0022303EB430728374FF4A873082849 +:101D700004D0042802D002280FD028233B4408288E +:101D80000DD004280DD002280DD00820C0EBC007CC +:101D900007EB40101844983009E01823EEE7402084 +:101DA000F4E71020F2E70420F0E74FF4FC70104451 +:101DB000471828783F1DF5F77DFD024628784FF437 +:101DC0007A7102281DD001281DD040F6340010443D +:101DD0004AF2EF021044B0FBF1F03A1AA06A40F266 +:101DE000E241B0464788D8304F43316A81420DD036 +:101DF0003946606B00F087F90646B84207D9FFDF25 +:101E000005E00846E3E74FF4C860E0E70026C6486F +:101E10008068864207D2A16A40F271224888424314 +:101E200006EB420604E040F2E240B6FBF0F0A16AA5 +:101E3000C882A06A297880F85410297880F8551053 +:101E400005214175C08A6FF41C71484306EB4000C0 +:101E500040F63541C8F81C00B0EB410F00D3FFDF5E +:101E6000BDE8F08110B5052937D2DFE801F005099A +:101E7000030D3100002100E00121BDE8104034E7EE +:101E8000032180F8D81010BD0446408840F2E2419A +:101E90004843A549091D0860D4F800010089E08283 +:101EA000D4F8000180796075D4F800014089608021 +:101EB000D4F800018089A080D4F80001C089E080B6 +:101EC0002046A16AFFF7C6FB022084F8D80010BDA7 +:101ED000816ABDE81040FFF7BDBBFFDF10BD70B5E4 +:101EE000904C243C0928A1683FD2DFE800F0050BA4 +:101EF0000B15131538380800BDE8704057E6BDE8EB +:101F0000704071E6022803D00020BDE870400BE766 +:101F10000120FAE7E16070BD032802D005281CD03B +:101F200000E0E1605FF0000600F086F97D4D0120E1 +:101F300085F82C0085F83860A86AE9690026C0F8A1 +:101F4000DC1080F8D860E068FFF734FB00B1FFDFF9 +:101F5000F2F79CFD6E74AE7470BD0126E4E7724822 +:101F60000078BDE87040E0F7D7BFFFDF70BD6D4976 +:101F700024394860704770B56A4D0446243DB1B1BC +:101F80004FF47A76012903D0022905D0FFDF70BD16 +:101F90001846F5F7C9FC05E06888401C68801046C3 +:101FA000F5F7A1FC00F2E730B0FBF6F0201AA860CC +:101FB00070BD5C4800787047082803D0042801D021 +:101FC000F5F778BC4EF628307047002804DB00F1A6 +:101FD000E02090F8000405E000F00F0000F1E020A0 +:101FE00090F8140D4009704710F00C0000D008461E +:101FF000704710B50446202800D3FFDF4948483019 +:1020000030F8140010BD70B505460C461046F5F7C3 +:1020100051FC4FF47A71022C0DD0012C0DD040F6FA +:10202000340210444AF247321044B0FBF1F0284425 +:1020300000F2931070BD0A46F3E74FF4C862F0E770 +:102040001FB513460A46044601466846FEF7A5FB3F +:1020500094F8E2006946F3F759F8002800D1FFDF51 +:102060001FBD70B52F4C0025257094F82400F2F7A1 +:10207000E4FD00B9FFDF84F8245070BD2DE9F04184 +:10208000050000D1FFDF274A0024243AD5F8EC6090 +:102090002046631E116A08E08869B04203D3984263 +:1020A00001D203460C460846C9680029F4D104B998 +:1020B00004460021C5F8E840D835C4B1E068E560C1 +:1020C000E86000B105612E698846A96156B1B06922 +:1020D00030B16F69B84200D2FFDFB069C01BA861A0 +:1020E000C6F818800F4D5CB1207820B902E0E96095 +:1020F0001562E8E7FFDF6169606808446863AFE67E +:10210000C5F83480ACE610B50C4601461046F3F72E +:10211000CCFA00280ADA211A491EB1FBF4F101FBBE +:10212000040010BDC41200208401002090FBF4F1D3 +:1021300001FB1400F5E74648016A002001E008466B +:10214000C9680029FBD170477FB504466FF00400D1 +:10215000FFF73BFFC5B21920FFF737FFC0B285423A +:1021600000D0FFDFFCF7FCFE4088C00407D001214F +:102170000320FCF7FAFE37480078E0F7CDFE002296 +:1021800021466846FEF71FFE38B169462046F2F741 +:10219000BDFF002800D1FFDF7FBD2D490120243184 +:1021A000C870FEF715FD7FBD2DE9FE43284D0120C7 +:1021B000287000264FF6FF7420E00621F0F71AFC85 +:1021C000070000D1FFDF97F8E200D837F3F707FBED +:1021D00007F80A6BA14617F8E289B8F1200F00D37F +:1021E000FFDF1B4A6C3222F8189097F8E200F2F7F2 +:1021F00024FD00B9FFDF202087F8E20069460620B1 +:10220000F0F781FB50B1FFDF08E0029830B190F8A1 +:10221000D81019B10088A042CFD104E06846F0F789 +:1022200050FB0028F1D02E70BDE8FE8310B5FFF7FB +:10223000EAFE00F5C87074E705480021243090F8E4 +:10224000392000EB4200C18502480078E0F764BE07 +:10225000A012002084010020012804D0022805D00B +:10226000032808D105E0012907D004E0022904D0A1 +:1022700001E0042901D00020704701207047FE488A +:10228000806890F8881029B1B0F88410B0F88620E2 +:10229000914215D290F88C1029B1B0F88A10B0F89C +:1022A000862091420CD2B0F88220B0F880108A4289 +:1022B00006D290F86820B0F87E001AB1884203D3A5 +:1022C000012070470628FBD2002070472DE9F0411D +:1022D000E94D0746A86800F1580490F8FC0030B9B1 +:1022E000E27B002301212046FAF758FE10B1608DF1 +:1022F000401C608501263D21AFB92878022808D00E +:1023000001280AD06878C8B110F0140F09D01E2037 +:1023100039E0162037E0E6763EE0A86890F8FE0047 +:1023200031E0020701D52177F5E7810701D02A20A6 +:1023300029E0800600D4FFDF232024E094F8300059 +:1023400028B1A08D411CA185E18D884213D294F85B +:10235000340028B1608E411C6186E18D88420AD22A +:10236000618D208D814203D3AA6892F8FC2012B9B6 +:10237000E28D914201D3222005E0217C29B1E18C3C +:10238000814207D308202077C5E7E08C062801D3D7 +:102390003E20F8E7E07EB0B1002020736073207427 +:1023A0000221A868FFF75EFDA86890F8CC1001290B +:1023B00004D1D0F804110878401E0870E878BDE810 +:1023C000F041E0F7A9BDA868BDE8F0410021FFF7A2 +:1023D00049BDA9490C28896881F8CC0014D013287C +:1023E00012D0182810D0002211280ED007280BD0A8 +:1023F00015280AD0012807D0002805D0022803D0CC +:1024000021F8842F012008717047A1F88A207047B5 +:1024100010B5994CA1680A88A1F8462181F84401B9 +:1024200091F8540001F073FBA16881F8480191F81C +:10243000550001F06CFBA16881F84901012081F889 +:102440004201002081F81601E078BDE81040E0F775 +:1024500063BD70B5884C00231946A06890F86420CD +:102460005830FAF79BFD00283DD0A06890F808117D +:102470000025C9B3A1690978B1BB90F86500FAF7E6 +:1024800075FD88BBA168B1F858000A282DD905222E +:102490000831E06903F046F810B3A068D0F80411E1 +:1024A000087858B10522491CE06903F03BF8002880 +:1024B00019D1A068D0F80401007840B9A068E1699A +:1024C000D0F804010A68C0F8012009794171A068B8 +:1024D000D0F804110878401C08700120FFF779FF3C +:1024E000A06880F8085170BDFFE7A06890F80C1153 +:1024F00011B190F80D11B9B390F816110029F2D06E +:1025000090F817110029EED190F86500FAF72EFD2A +:102510000028E8D1A06890F8540001F0F8FA0646C7 +:10252000A06890F8550001F0F2FA0546A06890F80E +:1025300018113046FFF790FE90B3A06890F819117B +:102540002846FFF789FE58B3A268B2F8583092F8CF +:102550005410B2F81A01F832FBF730F818B3A1683A +:10256000252081F86400BEE7FFE790F86510242974 +:1025700017D090F86410242913D0002300F1FA0238 +:1025800000F58671FAF7BAFDA06880F80C5130F8B2 +:10259000421FA0F88C108188A0F88E10142007E04C +:1025A00005E00123EAE7BDE87040002030E716208F +:1025B000BDE870400DE710B5F3F73CFC0C2813D3D1 +:1025C0002D4C0821A068D0F800011E30F3F736FC2E +:1025D00028B1A0680421C030F3F730FC00B9FFDF58 +:1025E000BDE810400320F4E610BD10B5224CA068F1 +:1025F000D0F800110A78002A1FD049880288914239 +:102600001BD190F86420002319465830FAF7C6FC15 +:10261000002812D0A068D0F800110978022907D04C +:1026200003290BD0042917D0052906D108200DE075 +:1026300090F86500FAF79AFC40B110BD90F8691067 +:1026400039B190F86A0000B9FFDF0A20BDE81040F8 +:10265000BFE6BDE81040AEE790F890008007ECD1EF +:102660000C20FFF7B6FEA068002120F8841F01218E +:102670000171017B02E000009001002041F00101A6 +:10268000017310BD70B5FE4CA268556DFAF730FFAE +:10269000EBB2C1B200228B4203D0A36883F8FA10D8 +:1026A00002E0A16881F8FA20C5F30721C0F30720F2 +:1026B000814203D0A16881F8FB0014E7A06880F88C +:1026C000FB2010E770B5EE48806890F84E20448EED +:1026D000C38E418FB0F84050022A23D0A94200D3C4 +:1026E00029460186C18FB0F84220914200D311469D +:1026F0008186018FB0F84420914200D31146418673 +:10270000818FB0F84620914200D31146C186418E98 +:10271000A14200D90C464486C18E994200D90B468D +:10272000C386E0E6028E914200D31146C68F828EA8 +:10273000964200D23246A94200D329460186B0F81B +:1027400042108A4200D30A468286002180F84E1049 +:10275000CFE770B5CA4CA06890F8CC10FE2955D1CF +:102760006178002952D190F8672000230121583068 +:10277000FAF714FC002849D1A06890F8FC1009B1C0 +:10278000022037E090F86420002319465830FAF709 +:1027900005FC28B1A06890F87C0008B1122029E05F +:1027A000A068002590F86420122A1DD004DC032ABA +:1027B00023D0112A04D119E0182A1AD0232A26D0AE +:1027C000002304215830FAF7E9FB00281ED1A06845 +:1027D00090F86510192970D020DC01292AD002292F +:1027E00035D0032932D120E00B2003E0BDE8704052 +:1027F000E1E60620BDE87040EBE510F8CA1F017164 +:102800000720FFF7E6FDA06880F864506BE618200B +:10281000FFF7DFFDA068A0F8845064E61D2918D0FA +:102820001E2916D0212964D148E010F8C91F417132 +:1028300007206EE00C20FFF7CCFDA06820F88A5F2F +:10284000817941F00101817100F8255C51E013208C +:102850002AE090F80D217ABB90F80C21AAB1242926 +:1028600011D090F8641024290DD0002300F1FA0251 +:1028700000F58671FAF742FCA0681E2180F8651009 +:1028800080F80C5103E00123F0E71E2931D1FFF756 +:1028900019FF01F04EF9A06830F8421FA0F88C1023 +:1028A0008188A0F88E101520FFF793FDA068A0F88E +:1028B0008A5000BF80F865501BE029E090F87D1039 +:1028C00049B100F8FA5F45701820FFF782FDA06853 +:1028D000A0F88A500DE090F8171151B990F8161130 +:1028E00039B1016DD0F81801FFF7CCFE1820FFF7C1 +:1028F00070FDA06890F8CC00FE2887D1FFF775FE28 +:10290000A06890F8CC00FE2887D1BDE87040A0E513 +:102910001120FFF75EFDA068CCE7594A01299268B3 +:1029200019D0002302290FD003291ED010B301288B +:102930002BD0032807D192F86400132803D016285F +:1029400001D0182804D1704792F8CC000028FAD0A2 +:10295000D2F8000117E092F8CC000128F3D0D2F8A9 +:1029600004110878401E0870704792F8CC000328C4 +:10297000EED17047D2F80001B2F858108288891A57 +:1029800009B20029F5DB03707047B2F85800B2F8BD +:102990000A11401A00B20028F6DBD2F804010178CF +:1029A000491E0170704770B5044690F86400002518 +:1029B0000C2810D00D282ED1D4F80011B4F85800EE +:1029C0008988401C884226D1D4F84C012C4E0178CD +:1029D00011B3FFDF42E0B4F85800B4F80A11401C0C +:1029E000884218D1D4F80401D0F80110A1604079D0 +:1029F000207302212046F9F7ABFFD4F804010078D8 +:102A000000B9FFDF0121FE20FFF787FF84F8645043 +:102A1000012084F8980066E52188C180D4F800017F +:102A2000D4F84C1140890881D4F80001D4F84C1135 +:102A300080894881D4F80001D4F84C11C08988817C +:102A4000D4F84C010571D4F84C1109200870D4F861 +:102A50004C1120884880F078E0F75EFA012120468A +:102A6000F9F776FF03212046FFF7FCF9B068D0F8AC +:102A700000010078022800D0FFDF0221FE2001E0E3 +:102A800090010020FFF749FF84F864502BE52DE901 +:102A9000F041002603270125FE4CD4F808C088B178 +:102AA0002069C0788CF8CA0005FA00F0C0F3C05065 +:102AB00000B9FFDFA06800F8647F068480F8245026 +:102AC000BDE8F08100239CF8652019460CF1580000 +:102AD000FAF764FA70B160780028F1D12069C17802 +:102AE000A06880F8C91080F86570A0F88A6080F846 +:102AF0008C50E5E76570E3E7F0B5E64C002385B060 +:102B0000A068194690F865205830FAF747FA012571 +:102B100080B1A06890F8640023280ED024280CD03F +:102B20006846F4F7EAFF68B1009801A9C0788DF80B +:102B3000040008E0657005B0F0BD607840F020004A +:102B40006070F8E70021A06803AB162290F86400DB +:102B5000FAF74FFD002670B1A0689DF80C201621F1 +:102B600000F8F42F4170192100F88F1C00F8685C00 +:102B700020F86A6CDFE72069FBF7E7F878B1216994 +:102B8000087900F00702A06880F85020497901F028 +:102B9000070180F8511090F817310BBB03E00020BB +:102BA000FFF775FFC7E790F81631CBB900F1540372 +:102BB0005F78974205D11A788A4202D180F87D5019 +:102BC0000EE000F59F71028821F8022990F850204C +:102BD0000A7190F8510048710D70E078E0F79CF9A7 +:102BE000A068212180F8651080F88C50A0F88A60D8 +:102BF000A1E770B5A74C00231946A06890F865209E +:102C00005830FAF7CBF928B32069FBF783F830B3D3 +:102C1000A5682069FBF77AF82887A5682069FBF783 +:102C200071F86887A5682069FBF772F8A887A5681E +:102C30002069FBF769F8E887A068012590F864101F +:102C40001C2910D090F84E10012912D090F80D11C7 +:102C500079B90BE0607840F00100607043E4BDE8B2 +:102C60007040002013E780F84E5002E090F80C11FD +:102C700019B11E2180F8651012E01D2180F8651041 +:102C800000F58E710288CA82028F0A83428F4A83BE +:102C9000828F8A83C08FC8830D75E078E0F73CF996 +:102CA000A068002120F88A1F85701CE410B5794CBB +:102CB00000230921A06890F864205830FAF76EF9D3 +:102CC00048B16078002805D1A16801F87C0F08732D +:102CD00001F8180C10BD0120607010BD7CB56D4C62 +:102CE00000230721A06890F864205830FAF756F9BD +:102CF00038B36078002826D169462069FBF720F8B0 +:102D00009DF80000002500F02501A06880F89610CD +:102D10009DF8011001F0490180F8971080F8885063 +:102D2000D0F8001100884988814200D0FFDFA068F8 +:102D3000D0F800110D70D0F84C110A7822B1FFDFE5 +:102D400016E0012060707CBD30F8D02BCA80C16FC6 +:102D50000D71C16F009A8A60019ACA60C26F082122 +:102D6000117030F8D01CC06F4180E078E0F7D4F8E3 +:102D7000A06880F864507CBD70B5464C00231946AD +:102D8000A06890F865205830FAF708F9012540B995 +:102D9000A0680023082190F864205830FAF7FEF864 +:102DA00010B36078002820D1A06890F890008007C8 +:102DB00012D42069FAF78AFFA16881F8910020698E +:102DC00030F8052FA1F892204088A1F8940011F85E +:102DD000900F40F002000870A0684FF0000690F8D5 +:102DE0009010C90702D011E0657066E490F8652084 +:102DF000002319465830FAF7D1F800B9FFDFA06870 +:102E000080F8655080F88C50A0F88A60A06890F82F +:102E10006410012906D180F8646080F88860E07849 +:102E2000E0F77AF8A168D1F80001098842888A425F +:102E3000DBD101780429D8D10670E078E0F76CF88E +:102E4000A06890F864100029CFD180F8886034E43D +:102E500070B5104DA86890F864101A2902D00220AD +:102E600068702AE469780029FBD1002480F88D403D +:102E700080F88840D0F8001100884988814200D04D +:102E8000FFDFA868D0F800110C70D0F84C110A7858 +:102E900022B101E090010020FFDF25E090F88E20B4 +:102EA00072B180F88E400288CA80D0F84C110C7143 +:102EB000D0F84C210E2111700188D0F84C010DE0A2 +:102EC00030F8D02BCA80C16F0C71C26F0121117212 +:102ED000C26F0D21117030F8D01CC06F418000F01E +:102EE000A2FEE878E0F718F8A86880F8644018E4D3 +:102EF00070B5FA4CA16891F86420162A01D0132A03 +:102F000002D191F88E2012B10220607009E462783B +:102F1000002AFBD181F8C800002581F88D5081F886 +:102F20008850D1F8000109884088884200D0FFDF2E +:102F3000A068D0F800010078032800D0FFDF03214B +:102F4000FE20FFF7EAFCA068D0F84C110A780AB11D +:102F5000FFDF14E030F8C82BCA8010F8081BC26FDE +:102F60001171C16F0D72C26F0D21117030F8D01C3C +:102F7000C06F418000F057FEE078DFF7CDFFA0681A +:102F800080F8645042E470B5D44C09210023A06855 +:102F900090F864205830FAF701F8002518B120693C +:102FA000007912281ED0A0680A21002390F864201E +:102FB0005830F9F7F3FF18B120690079142814D0BC +:102FC0002069007916281AD1A06890F864101F298A +:102FD00015D180F8645080F88850BDE870401A2000 +:102FE000FFF716BABDE8704060E6A06800F8645FBD +:102FF000058480F82450BDE8704000F09ABD05E4D7 +:1030000070B5B64C2079C00773D020690023052124 +:10301000C578A06890F864205830F9F7BFFF98B1E0 +:10302000062D11D006DC022D0ED0042D0CD0052D5E +:1030300006D109E00B2D07D00D2D05D0112D03D0A1 +:10304000607840F0080060706078002851D12069F5 +:10305000FAF7A0FD00287ED0206900250226C1785D +:10306000891E162977D2DFE801F00B763437472224 +:10307000764D76254A457676763A53506A6D70736A +:10308000A0680023012190F867205830F9F786FFE7 +:1030900008BB2069FAF7E2FDA16881F8FE0007206D +:1030A00081F8670081F88C5081F8885056E0FFF76E +:1030B0006AFF53E0A06890F864100F2901D0667091 +:1030C0004CE0617839B980F86950122180F86410B9 +:1030D00044E000F0D3FD41E000F0AFFD3EE0FAF740 +:1030E00072FE03283AD12069FAF771FEFFF700FF5C +:1030F00034E03BE00079F9E7FFF7AAFE2EE0FFF7A6 +:103100003BFE2BE0FFF7EAFD28E0FFF7CFFD25E0CF +:10311000A0680023194690F865205830F9F73EFF63 +:10312000012110B16078C8B901E0617016E0A068B3 +:1031300020F88A5F817000F8256C0FE00BE0FFF744 +:1031400058FD0BE000F03CFD08E0FFF7D5FC05E082 +:1031500000F002FD02E00020FFF799FCA268F2E90E +:103160002A01401C41F10001C2E9000153E42DE9AC +:10317000F0415A4C2079800741D5607800283ED133 +:10318000E06801270026C17820461929856805F1E5 +:1031900058006FD2DFE801F04B3E0D6FC1C1801CBB +:1031A00034C1556287C1C1C1C1BE8B9598A4B0C15D +:1031B000BA0095F8672000230121F9F7EFFE0028F7 +:1031C0001DD1A068082180F8671080F8886090E021 +:1031D000002395F865201946F9F7E0FE10B1A068C4 +:1031E00080F88C60A0680023194690F8642058305D +:1031F000F9F7D4FE002802D0A06880F888605FE468 +:10320000002395F864201946F9F7C8FE00B9FFDFDE +:10321000042008E0002395F864201946F9F7BEFE63 +:1032200000B9FFDF0C20A16881F8640048E40023A6 +:1032300095F864201946F9F7B1FE00B9FFDF0D20BB +:10324000F1E7002395F864201946F9F7A7FE00B9C5 +:10325000FFDFA0680F2180F88D7008E095F864000A +:10326000122800D0FFDFA068112180F88E7080F84E +:10327000641025E451E0002395F864201946F9F71D +:103280008DFE20B9A06890F88E0000B9FFDFA0681D +:10329000132180F88D70EAE795F86400182800D0B3 +:1032A000FFDF1A20BFE7BDE8F04100F066BD002354 +:1032B00095F864201946F9F771FE00B9FFDF052083 +:1032C000B1E785F88C6014E4002395F86420194672 +:1032D000F9F764FE00B9FFDF1C20A4E7900100208D +:1032E000002395F865201946F9F758FE00B9FFDF6D +:1032F000A06880F88C6082E7002395F86420194666 +:10330000F9F74CFE00B9FFDF1F208CE7BDE8F04164 +:1033100000F0FBBC85F86560D3E7FFDF6FE710B511 +:10332000F74C6078002837D1207940070FD5A06886 +:1033300090F86400032800D1FFDFA06890F86710C0 +:10334000072904D101212170002180F86710FFF7BF +:103350000EFF00F0B8FCFFF753FEA078000716D56B +:10336000A0680023052190F864205830F9F716FE74 +:1033700050B108206070A068D0F84C1108780D2872 +:1033800000D10020087002E00020F8F73BFAA068A6 +:10339000BDE81040FFF707BB10BD2DE9F041D84C48 +:1033A00007464FF000056078084360702079810679 +:1033B0002046806802D5A0F87E5004E0B0F87E1068 +:1033C000491CA0F87E1000F01AFD0126F8B1A08873 +:1033D000000506D5A06890F86A1011B1A0F87650E3 +:1033E00015E0A068B0F87610491CA0F8761000F03F +:1033F000F5FCA068B0F87610B0F87820914206D3BA +:10340000A0F8765080F82261E078DFF785FD20791A +:1034100010F0600F08D0A06890F8681021B980F80B +:1034200068600121FEF71EFD1FB9FFF778FFFFF767 +:1034300090F93846FEF74AFFBDE8F041F4F76CBB5F +:10344000AF4A51789378194313D1114601288968FE +:1034500008D01079400703D591F86700072808D0F5 +:1034600001207047B1F84800098E884201D8FEF764 +:103470008BB900207047A249C2788968012A06D01A +:103480005AB1182A08D1B1F8F810FAF77ABCB1F895 +:103490000A114172090A81727047D1F800118988B6 +:1034A0004173090A8173704770B5954C05460E4605 +:1034B000A0882843A080A80703D5E80700D0FFDF35 +:1034C000E660E80700D02661A80719D5F07806283D +:1034D00002D00B2814D10BE0A06890F864101829D2 +:1034E0000ED10021E0E92A11012100F83E1C07E07D +:1034F000A06890F86410122902D1002180F86A10A7 +:10350000280601D50820A07068050AD5A068828821 +:10351000B0F85810304600F081FC3046BDE87040ED +:10352000A9E762E43EB505466846F4F7C0FA00B97B +:10353000FFDF2221009802F0A0F803210098FAF79B +:1035400011FB0098017821F0100101702946FAF76B +:103550002EFB6B4C192D71D2DFE805F020180D3EC3 +:10356000C8C8C91266C8C9C959C8C8C8C8BBC9C96A +:1035700071718AC89300A168009891F8FD1003E06A +:10358000A168009891F8CE100171B0E0A068D0F861 +:1035900004110098491CFAF756FBA8E0A1680098AE +:1035A000D1F8002192790271D1F80021128942717B +:1035B000120A8271D1F800215289C271120A027274 +:1035C000D1F8002192894272120A8272D1F8001158 +:1035D000C989FAF70FFB8AE0A068D0F800110098BB +:1035E000091DFAF73DFBA068D0F8001100980C31D6 +:1035F000FAF740FBA068D0F8001100981E31FAF7E6 +:103600003FFBA1680098C031FAF748FB6FE06269A0 +:1036100000981178017191884171090A817151886E +:10362000C171090A017262E03649D1E90001CDE9B0 +:10363000010101A90098FAF74BFB58E056E0A06899 +:10364000B0F840100098FAF755FBA068B0F8CE101B +:103650000098FAF753FBA068B0F844100098FAF706 +:1036600041FBA068B0F8D0100098FAF73FFB3EE0AD +:10367000A268009892F81811017192F8191141711D +:1036800035E0A06890F8FB00F9F729FF01460098A3 +:10369000FAF773FBA06890F8FA0000F033FA70B103 +:1036A000A06890F8540000F02DFA40B1A06890F89E +:1036B000FA1090F85400814201D0002002E0A06886 +:1036C00090F8FA00F9F70BFF01460098FAF751FB62 +:1036D0000DE0A06890F8F5100098FAF772FBA0686A +:1036E00090F8F4100098FAF770FB00E0FFDFF4F7B1 +:1036F000F1F900B9FFDF0098FFF7BDFE3EBD000005 +:1037000090010020BC5C0200F948806890F8FA1033 +:1037100009B990F8541080F8541090F8FB1009B9CA +:1037200090F8551080F855100020FEF771BEF8B5DE +:10373000EF4E00250446B060B5807570B5703570E9 +:103740000088F4F7B1F9B0680088F4F7D3F9B4F859 +:10375000E000B168401C82B201F15800F9F7D5F9D8 +:1037600000B1FFDF94F86500242809D1B4F858109F +:10377000B4F8F800081A00B2002801DB707830B104 +:1037800094F8640024280AD0252808D015E0FFF713 +:10379000BBFF84F86550B16881F87D500DE0B4F846 +:1037A0005810B4F8F800081A00B2002805DB707849 +:1037B00018B9FFF7A9FF84F86450A4F8E050FEF7A9 +:1037C0005EFD00281CD1B06890F8CC00FE2801D026 +:1037D000FFF7A8FEC7480090C74BC84A21462846B5 +:1037E000F7F766FFB0680023052190F86420583091 +:1037F000F9F7D4FB002803D0BDE8F840F7F7F3BC95 +:10380000F8BD10B5FEF73BFD20B10020BDE810402B +:103810000146C2E5BDE81040F7F7D0BF70B50C46D1 +:10382000064615464FF4A871204601F048FF268051 +:1038300005B9FFDF2868C4F800016868C4F804010E +:10384000A868C4F84C0191E4EFF7DDB92DE9F04127 +:103850000D4607460621EFF7CDF8041E3DD0D4F8FB +:103860004C110026087858B14A8821888A4207D12D +:1038700009280FD00E2819D00D2826D008283ED0B0 +:1038800094F82201D0B36E701020287084F8226161 +:10389000AF809FE06E7009202870D4F84C01416819 +:1038A00069608168A9608089A88133E00846EFF7E4 +:1038B000D3F90746EEF77FFE70B96E700E202870C0 +:1038C000D4F84C014068686011E00846EFF7C4F98D +:1038D0000746EEF770FE08B1002090E46E700D20F0 +:1038E0002870D4F84C014168696000892881D4F8B7 +:1038F0004C0106703846EEF758FE6BE00EE06E7035 +:1039000008202870D4F84C01416869608168A9607A +:10391000C068E860D4F84C0106705BE094F82401BC +:10392000A0B16E70152028700BE000BF84F82461F0 +:10393000D4F826016860D4F82A01A860B4F82E01F2 +:10394000A88194F824010028F0D143E094F83001D4 +:1039500070B16E701D20287084F83061D4F8320187 +:103960006860D4F83601A860B4F83A01A88131E063 +:1039700094F83C0140B16E701E20287084F83C61C0 +:10398000D4F83E01686025E094F81C0170B16E70B7 +:103990001B20287005E000BF84F81C61D4F81E01CC +:1039A000686094F81C010028F6D113E094F84201F5 +:1039B000002892D06E701620287007E084F84261CB +:1039C000D4F844016860B4F84801288194F84201B1 +:1039D0000028F3D1012012E4454A5061D1707047AC +:1039E00070B50D4604464EE0B4F8E000401CA4F863 +:1039F000E000B4F87E00401CA4F87E00204600F0F1 +:103A0000FEF9B8B1B4F87600401CA4F87600204660 +:103A100000F0E4F9B4F87600B4F87810884209D3DD +:103A20000020A4F87600012084F822013048C078F4 +:103A3000DFF772FA94F8880020B1B4F88400401CD3 +:103A4000A4F8840094F88C0020B1B4F88A00401CDB +:103A5000A4F88A0094F8FC0040B994F86720002389 +:103A6000012104F15800F9F799FA20B1B4F8820065 +:103A7000401CA4F882002046FEF795FFB4F85800D9 +:103A8000401CA4F858006D1EADB2ADD249E5184AED +:103A9000C2E90601704770B50446B0F87E0094F89C +:103AA0006810D1B1B4F880100D1A2D1F94F87C0065 +:103AB00040B194F864200023092104F15800F9F77B +:103AC0006DFA70B1B4F87660204600F098F938B11C +:103AD000B4F87800801B001F03E0C0F10205E5E7A1 +:103AE0002846A84200DA0546002D09DC002018E52A +:103AF000900100209B33020041340200A9340200EF +:103B0000A8B20EE510F00C0000D00120704710B5EF +:103B1000012808D0022808D0042808D0082806D098 +:103B2000FFDF204610BD0124FBE70224F9E7032450 +:103B3000F7E710B5EF4C0421A068FEF793F9A068F1 +:103B400090F84E10012903D0BDE8104000F098B95C +:103B5000022180F84E1010BD70B5E64CA06890F8B8 +:103B600064001F2804D0607840F001006070D8E441 +:103B70002069FAF7F4F8D8B1206901220179407977 +:103B800001F0070161F30705294600F0070060F323 +:103B90000F21A06880F888200022A0F8842023222A +:103BA00000F8642FD0F8B400BDE87040FEF76ABD9D +:103BB0000120FEF76CFFBDE870401E20FEF728BC18 +:103BC00070B5CC4C00230A21A06890F864205830CE +:103BD000F9F7E4F910B32069FAF79CF8A8B1A568E1 +:103BE0002069FAF793F82887A5682069FAF78AF818 +:103BF0006887A5682069FAF78BF8A887A568206907 +:103C0000FAF782F8E887FEF75DFDA168002081F8E9 +:103C1000880081F86400BDE870408AE7607840F071 +:103C2000010060707DE4B34810B580680088EFF74C +:103C300013F8BDE81040EEF7A9BC10B5AD4CA36871 +:103C400093F86400162802D00220607010BD6078DE +:103C50000028FBD1D3F80001002200F11E010E3034 +:103C6000B033F9F715F9A0680021C0E92811012146 +:103C700080F86910182180F8641010BD10B59D4CB3 +:103C8000A06890F86410132902D00220607010BD63 +:103C900061780029FBD1D0F8001100884988814261 +:103CA00000D0FFDFA068D0F8001120692631FAF7B4 +:103CB00002F8A1682069C431FAF705F8A168162056 +:103CC00081F8640010BD10B58A4C207900071BD51F +:103CD0006078002818D1A068002190F8CC00FEF789 +:103CE0001CFEA06890F8CC00FE2800D1FFDFA06881 +:103CF000FE2180F8CC1090F86710082904D1022129 +:103D00002170002180F8671010BD70B5794D242115 +:103D10000024A86890F86520212A05D090F8642036 +:103D2000232A18D0FFDF8EE590F8FA2012B990F818 +:103D3000FB202AB180F86510A86880F88C4082E5E5 +:103D400000F8654F047690F8B1000028F4D0002008 +:103D5000FEF75EFBF0E790F8FA2012B990F8FB202E +:103D60002AB180F86410A86880F888406BE580F874 +:103D700064400020FEF74CFBF5E770B55D4C002574 +:103D8000A068D0F8001103884A889A4218D10978AF +:103D9000042915D190F86420002319465830F9F70A +:103DA000FDF800B9FFDFA06890F89010890703D4F0 +:103DB000012180F8641003E000F8885F806F0570CF +:103DC000A0680023194690F865205830F9F7E6F806 +:103DD000002802D0A06880F88C5034E5B0F8782034 +:103DE000B0F876108A4201D3511A00E0002182888F +:103DF000521D8A4202D3012180F87C10704710B511 +:103E000090F86A1041B990F86420002306215830D8 +:103E1000F9F7C4F8002800D0012010BD70B5114496 +:103E2000344D891D8CB2C078A968012806D040B1F4 +:103E3000182805D191F8FA0038B109E0A1F80A4133 +:103E400001E5D1F800018480FDE491F8FB1091B107 +:103E5000FFF758FE80B1A86890F85400FFF752FEB3 +:103E600050B1A86890F8FA1090F85420914203D00D +:103E700090F8FB0000B90024A868A0F8F840E2E43C +:103E80002DE9F0411B4DA86800F58E740188618111 +:103E9000018EA181818EE181018FB0F84420914291 +:103EA00000D311462182828FB0F846108A4200D298 +:103EB0001146618290F85500FFF724FE4FF4296700 +:103EC00028B1608A3E46B84200D906466682A86894 +:103ED00090F85400FFF716FE20B1E089B84200D9EF +:103EE0000746E78101202072E878BDE8F041DFF75E +:103EF00013B800009001002070B58D4C0829207A7D +:103F000062D2DFE801F0041959592561615978B18D +:103F1000F2F73CFD01210846F2F7DFFEF3F713FD4F +:103F20000020A072F2F7E5FDBDE87040F3F766B837 +:103F3000BDE87040F0F7AABDD4E90001F0F79DFBA1 +:103F40002060A07A401CC0B2A07228281CD370BD8B +:103F5000A07A0025401EC6B2E0683044F3F73FF96E +:103F600010B9E1687F208855A07A272828BF01254D +:103F70002846F3F751FCA07A282809D2401CC0B289 +:103F8000A072282828BF70BDBDE87040F2F7B1BD0F +:103F9000207A00281CBF012000F085F8F2F7A0FF6E +:103FA000F3F71EF80120E07262480078DEF7B4FFF4 +:103FB000BDE87040F0F76ABD002808BF70BD002062 +:103FC000BDE8704000F06FB8FFDF70BD10B5584C11 +:103FD000207A002804BF0C2010BD00202072E0725F +:103FE000607AF1F7AEF9607AF1F7F9FB607AF0F7F1 +:103FF00024FE00280CBF1F20002010BD002270B539 +:104000004B4C06460D46207A68B12272E272607A05 +:10401000F1F797F9607AF1F7E2FB607AF0F70DFEBD +:10402000002808BFFFDF4348E560067070BD70B52B +:10403000050007D0A5F5E8503F494C3881429CBFA8 +:10404000122070BD3A4CE068002804BF092070BD02 +:10405000207A00281CBF0C2070BD3848F0F791FD75 +:104060006072202804BF1F2070BDF0F705FE20609D +:10407000002D1CBF284420600120656020720020B4 +:1040800000F011F8002070BD2949CA7A002A04BF47 +:10409000002070471F22027000224270CB684360EC +:1040A000CA72012070472DE9F04184B00746F0F74D +:1040B000E3FD1F4D8046414668682C6800EB800098 +:1040C00046002046F1F7F1FAB04206DB6868811B32 +:1040D0004046F0F7D2FA0446286040F23476214692 +:1040E0004046F1F7E2FAB04204DA31464046F0F7D2 +:1040F000C4FA044600208DF800004FF4DD60039000 +:1041000004208DF80500002F14BF012003208DF836 +:10411000040068460294F0F77EFF687A6946F0F77B +:10412000F5FF002808BFFFDF04B0BDE8F081000004 +:104130004C130020B0010020B5EB3C00F93E02001A +:104140002DE9F0410C4612490D68114A1149083217 +:104150001160A0F12001312901D301200CE0412898 +:1041600010D040CC0C4F94E80E0007EB8000241FC9 +:1041700050F8807C3046B84720600548001D056037 +:10418000BDE8F0812046DDF743F8F5E706207047EB +:104190001005024001000001C45C020010B5534844 +:1041A000F1F7CAFD00B1FFDF5048401CF1F7C4FD34 +:1041B000002800D0FFDF10BD2DE9F14F4C4ED6F89E +:1041C00000B001274948F1F7BFFDDFF8208128B989 +:1041D0005FF0000708F10100F1F7CCFD454C002528 +:1041E0004FF0030901206060C4F80051C4F8045185 +:1041F000009931602060DFF800A118E0DAF80000D3 +:10420000C00614D50E2000F064F8EFF3108010F013 +:10421000010072B600D00120C4F80493D4F8001154 +:1042200019B9D4F8041101B920BF00B962B6D4F8A5 +:10423000000118B9D4F804010028DFD0D4F8040133 +:104240000028CFD137B1C6F800B008F10100F1F76E +:104250007BFD11E008F10100F1F776FD0028B9D1EE +:10426000C4F80893C4F80451C4F800510E2000F0BB +:1042700030F81E48F1F77EFD0020BDE8F88F2DE9EB +:10428000F0438DB00D46064600240DF110090DF1E6 +:10429000200817E004EB4407102255F82710684661 +:1042A00001F06CF905EB870710224846796801F0A8 +:1042B00065F96846FFF780FF10224146B86801F0B3 +:1042C0005DF9641CB442E5DB0DB00020BDE8F0836D +:1042D00072E7002809DB00F01F020121914040092C +:1042E000800000F1E020C0F880127047B10100208A +:1042F00004E5004000E0004010ED00E0B14900207E +:104300000870704770B5B04D01232B60AF4B1C682F +:10431000002CFCD0002407E00E6806601E68002E0A +:10432000FCD0001D091D641C9442F5D300202860B8 +:1043300018680028FCD070BD70B5A24E0446A44D8C +:104340003078022800D0FFDFAC4200D3FFDF716974 +:10435000A048012903D847F23052944201DD0322DC +:104360004271491C7161291BC1609A497078F0F74C +:10437000CDFE002800D1FFDF70BD70B5914C0D4619 +:104380006178884200D0FFDF914E082D4BD2DFE8E4 +:1043900005F04A041E2D4A4A4A382078022800D0E7 +:1043A000FFDF03202070A078012801D020B108E0B1 +:1043B000A06800F039FE04E004F1080007C8FFF728 +:1043C000A1FF05202070BDE87040F0F75FBBF0F75B +:1043D00053FC01466068F1F768F9B04202D26169A6 +:1043E00002290BD30320F1F746FC12E0F0F744FC5E +:1043F00001466068F1F759F9B042F3D2BDE8704068 +:104400009AE7207802280AD0052806D0FFDF04208A +:104410002070BDE8704000F0CAB8022000E0032020 +:10442000F1F729FCF3E7FFDF70BD70B50546F0F743 +:1044300023FC644C60602078012800D0FFDF6549D0 +:10444000012008700020087104208D6048716048C8 +:10445000C860022020706078F0F758FE002800D174 +:10446000FFDF70BD10B5574C207838B90220F1F746 +:1044700018FC18B90320F1F714FC08B1112010BD85 +:104480005548F0F77EFB6070202804D00120207092 +:104490000020606110BD032010BD2DE9F0471446D7 +:1044A000054600EB84000E46A0F1040800F0CFFDA5 +:1044B00007464FF0805001694F4306EB8401091F06 +:1044C000B14201D2012100E0002189461CB10069FE +:1044D000B4EB900F02D90920BDE8F0872846DCF73D +:1044E000EBFE90B9A84510D3BD4205D2B84503D222 +:1044F00045EA0600800701D01020EDE73046DCF7E2 +:10450000DBFE10B9B9F1000F01D00F20E4E733480A +:1045100033490068884205D0224631462846FFF7D5 +:10452000F1FE14E0FFF79EFF0028D5D125480021B9 +:104530008560C0E90364817000F06FF810B14FF43A +:10454000A97000E0292060431830FFF76EFF0020BB +:10455000C2E770B505464FF0805004696C432046B1 +:10456000DCF7AAFE08B10F2070BD00F070FDA84274 +:1045700001D8102070BD194819490068884203D03D +:10458000204600F051FD10E0FFF76CFF0028F1D14C +:104590000C4801218460817000F03FF808B1114897 +:1045A00000E011481830FFF740FF002070BD10B543 +:1045B000044C6078F0F741FB00B9FFDF0020207069 +:1045C00010BD0000B401002004E5014000E40140FA +:1045D000105C0C005C1300207B43020054000020A0 +:1045E000BEBAFECA645E0100084C01004FF0805064 +:1045F000D0F830010A2801D0002070470120704710 +:1046000000B5FFF7F3FF20B14FF08050D0F8340130 +:1046100008B1002000BD012000BD4FF08050D0F84F +:104620003011062905D0D0F83001401C01D00020FF +:104630007047012070474FF08050D0F830010828B3 +:1046400001D0002070470120704700B5FFF7E5FF5B +:1046500048B14FF08050D0F83411062905D3D0F876 +:104660003401401C01D0002000BD012000BD00B578 +:10467000FFF7D3FF58B14FF08050D0F8341106291E +:1046800005D3D0F83401401C01D0012000BD00202A +:1046900000BD00007B49096801600020704779492E +:1046A00008600020704701218A0720B1012804D04A +:1046B00042F204007047916700E0D1670020704724 +:1046C00071490120086042F20600704708B50423D2 +:1046D0006D4A1907103230B1C1F80433106840F048 +:1046E000010010600BE0106820F001001060C1F8BC +:1046F00008330020C1F808016448006800900020D9 +:1047000008BD011F0B2909D85F4910310A6822F042 +:104710001E0242EA400008600020704742F2050095 +:1047200070470F2809D8584910310A6822F470627E +:1047300042EA002008600020704742F205007047FE +:10474000000100F18040C0F804190020704700010A +:1047500000F18040C0F8081900207047000100F106 +:104760008040D0F80009086000207047012801D976 +:1047700007207047464A52F8200002680A43026048 +:1047800000207047012801D907207047404A52F89D +:10479000200002688A43026000207047012801D986 +:1047A000072070473A4A52F820000068086000204D +:1047B0007047020037494FF0000003D0012A01D0B2 +:1047C000072070470A607047020033494FF000002D +:1047D00003D0012A01D0072070470A60704708B54E +:1047E0004FF40072510510B1C1F8042308E0C1F87C +:1047F00008230020C1F8240124481C3000680090E0 +:10480000002008BD08B58022D10510B1C1F80423ED +:1048100008E0C1F808230020C1F81C011B4814302F +:1048200000680090002008BD08B54FF48072910523 +:1048300010B1C1F8042308E0C1F808230020C1F832 +:1048400020011248183000680090002008BD0D4972 +:10485000383109680160002070474FF08041002026 +:10486000C1F80801C1F82401C1F81C01C1F82001F8 +:104870004FF0E020802180F800140121C0F80011E1 +:10488000704700000004004000050040080100409F +:10489000885D020078050040800500406249634B56 +:1048A0000A6863499A42096801D1C1F310010160A5 +:1048B000002070475C495D4B0A685D49091D9A42BA +:1048C00001D1C0F310000860002070475649574BD3 +:1048D0000A68574908319A4201D1C0F310000860B4 +:1048E0000020704730B5504B504D1C6842F2080311 +:1048F000AC4202D0142802D203E0112801D318469A +:1049000030BDC3004B481844C0F81015C0F814253A +:10491000002030BD4449454B0A6842F209019A42E1 +:1049200002D0062802D203E0042801D308467047CB +:10493000404A012142F83010002070473A493B4B71 +:104940000A6842F209019A4202D0062802D203E024 +:10495000042801D308467047364A012102EBC00003 +:1049600041600020704770B52F4A304E314C1568B9 +:1049700042F2090304EB8002B54204D0062804D2B7 +:10498000C2F8001807E0042801D3184670BDC1F32F +:104990001000C2F80008002070BD70B5224A234EF6 +:1049A000244C156842F2090304EB8002B54204D09E +:1049B000062804D2D2F8000807E0042801D31846DC +:1049C00070BDD2F80008C0F310000860002070BD70 +:1049D000174910B50831184808601120154A002100 +:1049E00002EBC003C3F81015C3F81415401C1428BB +:1049F000F6D3002006E0042804D302EB8003C3F8BA +:104A0000001807E002EB8003D3F80048C4F3100459 +:104A1000C3F80048401C0628EDD310BD04490648E1 +:104A2000083108607047000054000020BEBAFECA7A +:104A300000F5014000F001400000FEFF834B1B68C1 +:104A400003B19847BFF34F8F81480168814A01F451 +:104A5000E06111430160BFF34F8F00BFFDE710B568 +:104A6000EFF3108010F0010F72B601D0012400E0C6 +:104A7000002400F0E1F850B1DCF7BEFCEFF7C1FE16 +:104A8000F1F79BF8E7F75EFA73490020086004B974 +:104A900062B6002010BD2DE9F0410C460546EFF34B +:104AA000108010F0010F72B601D0012600E0002640 +:104AB00000F0C2F820B106B962B60820BDE8F08166 +:104AC000DCF78EFBDCF79CFC024600200123470943 +:104AD000BF0007F1E02700F01F01D7F80071CF40B9 +:104AE000F9071BD0202803D222FA00F1C90727D1E9 +:104AF00041B2002904DB01F1E02191F8001405E046 +:104B000001F00F0101F1E02191F8141D4909082974 +:104B100016D203FA01F717F0EC0F11D0401C6428ED +:104B2000D5D3E7F7EDF94D4A4D490020E7F730FAC4 +:104B300049494C4808602046DCF7C5FB60B904E0F1 +:104B400006B962B641F20100B8E7404804602DB1F1 +:104B50002846DCF705FC18B110242CE0424D19E082 +:104B60002878022802D94FF4805424E00724002832 +:104B7000687801D0F8B908E0E8B120281BD8A878F7 +:104B8000212818D8012816D001E0A87898B9E8782B +:104B90000B2810D83549802081F8140DDCF730FC43 +:104BA0002946F0F7F0FFEFF7EBFD00F083FA284617 +:104BB000DCF7F4FB044606B962B61CB1FFF74FFF01 +:104BC00020467BE7002079E710B5044600F034F872 +:104BD00000B101202070002010BD25490860002090 +:104BE000704770B50C4623490D682249224E0831A2 +:104BF0000E60102807D011280CD012280FD01328CF +:104C000011D0012013E0D4E90001FFF744FF35463D +:104C100020600DE0FFF723FF0025206008E02068FA +:104C2000FFF7D2FF03E012492068086000202060EF +:104C30001048001D056070BD07480A490068884299 +:104C400001D101207047002070470000CC010020F6 +:104C50000CED00E00400FA0554000020F8130020D9 +:104C600000000020BEBAFECA905D02000BE000E02A +:104C700004000020100502400100000100B59B491E +:104C800002282ED021DC10F10C0F08BFF42028D010 +:104C90000FDC10F1280F08BFD82022D010F1140F1C +:104CA00008BFEC201DD010F1100F08BFF02018D065 +:104CB00021E010F1080F08BFF82012D010F1040F06 +:104CC0000CBFFC2000280CD015E0A0F10300062842 +:104CD00011D2DFE800F00E0C0A080503082000E0FE +:104CE0000720086000BD0620FBE70520F9E7042047 +:104CF000F7E70320F5E7FFDF00BD00B57C49012899 +:104D000008BF03200CD0022808BF042008D00428C4 +:104D100008BF062004D0082816BFFFDF052000BD0D +:104D2000086000BD70B505460C4616461046F2F701 +:104D3000C1FD022C08BF4FF47A7105D0012C0CBFC5 +:104D40004FF4C86140F6340144183046F2F7ECFDE8 +:104D5000204449F6797108444FF47A71B0FBF1F0C0 +:104D6000281A70BD70B505460C460846F2F7BBFD23 +:104D7000022C08BF40F24C4105D0012C0CBF40F67C +:104D800034014FF4AF5149F6CA62511A08444FF446 +:104D90007A7100F2E140B0FBF1F0281A801E70BD7C +:104DA00070B5064615460C460846F2F79CFD022DE6 +:104DB00008BF4FF47A7105D0012D0CBF4FF4C861C4 +:104DC00040F63401022C08BF40F24C4205D0012CC1 +:104DD0000CBF40F634024FF4AF52891A084449F62A +:104DE000FC6108444FF47A71B0FBF1F0301A70BDE9 +:104DF00070B504460E460846F2F75CFD054630469F +:104E0000F2F792FD28444AF2AB3108444FF47A712C +:104E1000B0FBF1F0201A801E70BD2DE9F04107466D +:104E20001E460D4614461046082A16BF04284EF6A4 +:104E30002830F2F73FFD07EB4701C1EBC71100EB4C +:104E4000C100022D08BF40F24C4105D0012D0CBF1E +:104E500040F634014FF4AF5147182846F2F743FDAE +:104E6000381A4FF47A7100F6B730B0FBF1F52046EE +:104E7000F2F70EFD28443044401DBDE8F08170B5C6 +:104E8000054614460E460846F2F714FD05EB4502AA +:104E9000C2EBC512C0EBC2053046F2F745FD2D1A34 +:104EA0002046082C16BF04284EF62830F2F702FDE3 +:104EB00028444FF47A7100F6B730B0FBF1F5204684 +:104EC000F2F7E6FC2844401D70BD0A49082818BFC7 +:104ED0000428086803BF20F46C5040F4444040F0BC +:104EE000004020F000400860704700000C150040B2 +:104EF00010150040401700402DE9FE430C46804647 +:104F0000F8F744FE074698F80160204601A96A4672 +:104F1000EDF72DFB05000DD0012F02D00320BDE8D9 +:104F2000FE83204602AA0199EDF743FA0298B0F8F1 +:104F300003000AE0022F14D1042E12D3B8F80300A4 +:104F4000BDF80020011D914204D8001D80B2A919AE +:104F5000814202D14FF00000E1E702D24FF00100A0 +:104F6000DDE74FF00200DAE7C2790D2341B342BB1F +:104F70008188012904D94908818004BF01228280E7 +:104F80000168012918BF002930D001686FEA0101CA +:104F9000C1EBC10202EB011281796FEA010101EB61 +:104FA0008103C3EB811111444FEA91420160818872 +:104FB000B2FBF1F301FB132181714FF0010102E01B +:104FC0001AB14FF00001C17170478188FF2908D2E2 +:104FD0004FF6FF7202EA41018180FF2984BFFF2260 +:104FE00082800168012918BF0029CED10360CCE777 +:104FF000817931B1491E11F0FF0181711CBF002080 +:1050000070470120704710B50121C1718171818005 +:1050100004460421F0F712FF002818BF10BD2068D5 +:10502000401C206010BD00000B4A022111600B499A +:105030000B68002BFCD0084B1B1D1860086800286B +:10504000FCD00020106008680028FCD070474FF0AA +:10505000805040697047000004E5014000E40140D1 +:1050600002000B464FF00000014620D0012A04D078 +:10507000022A04D0032A0DD103E0012002E002201D +:1050800015E00320072B05D2DFE803F00406080A29 +:105090000C0E100007207047012108E0022106E0F5 +:1050A000032104E0042102E0052100E00621EFF7DE +:1050B00086BD0000F9480521817000210170417012 +:1050C0007047F7490A78012A05D0CA681044C860B9 +:1050D0004038F0F7B7BA8A6810448860F8E70028CB +:1050E00019D00378EF49F04A13B1012B0ED011E02B +:1050F0000379012B00D06BB943790BB1012B09D196 +:105100008368643B8B4205D2C0680EE00379012BB3 +:1051100002D00BB10020704743790BB1012BF9D1BC +:10512000C368643B8B42F5D280689042F2D801207C +:105130007047DB4910B501220A700279A2B1002242 +:105140000A71427992B104224A718268D34C523278 +:105150008A60C0681434C8606060EFF78DFDCF4985 +:1051600020600220887010BD0322E9E70322EBE7EC +:1051700070B5CB4D044600202870207988B10020FE +:105180002871607978B10420C44E6871A168F06814 +:10519000EFF773FAA860E0685230E8600320B0705F +:1051A00070BD0120ECE70320EEE72DE9F041054654 +:1051B0000226F0F773F9006800B1FFDFB74C012752 +:1051C0003DB12878B0B1012805D0022810D00328BD +:1051D00013D027710CE06868C82807D3F0F799FA54 +:1051E00020B16868FFF76DFF012603E0002601E0AB +:1051F00000F05EF93046BDE8F08120780028F7D154 +:105200006868FFF76CFF0028E3D06868017879B11F +:10521000A078042800D0FFDF01216868FFF7A8FF0D +:105220009F49E078EFF772FF0028E1D1FFDFDFE769 +:10523000FFF77FFF6770DBE72DE9F047974C884663 +:10524000E178884200D0FFDFDFF850920025012787 +:10525000934E09F11409B8F1080F75D2DFE808F090 +:10526000040C28527A808D95A078032802D0022859 +:1052700000D0FFDFBDE8F087A078032802D0022825 +:1052800000D0FFDF0420A07025712078002878D19D +:10529000FFF717FF3078012806D0B068E06000F013 +:1052A00027F92061002060E0E078EFF72CFEF5E7B9 +:1052B000A078032802D0022800D0FFDF2078002841 +:1052C0006DD1A078032816D0EFF7D6FC01464F46E3 +:1052D000D9F80000F0F7E9F900280EDB796881427F +:1052E0000BDB081AF0606E49E078EFF70FFF00283B +:1052F000C0D1FFDFBEE7042028E00420F0F7BBFCAC +:10530000A570B7E7A078032802D0022800D0FFDFFD +:10531000207888BBA078032817D0EFF7ADFC0146B2 +:105320004F46D9F80000F0F7C0F90028E5DB7968AE +:105330008142E2DB081AF0605949E078EFF7E6FEB7 +:10534000002897D1FFDF95E740E00520F0F793FCB8 +:10535000A7708FE7A078042800D0FFDF022004E0C8 +:10536000A078042800D0FFDF0120A1688847FFF75C +:105370001CFF054630E004E011E0A078042800D0CE +:10538000FFDFBDE8F04700F093B8A078042804D010 +:10539000617809B1022800D0FFDF207818B1BDE89C +:1053A000F04700F08EB8207920B10620F0F763FCBA +:1053B0002571CDE7607838B13949E078EFF7A6FE7E +:1053C00000B9FFDF657055E70720BFE7FFDF51E752 +:1053D0003DB1012D03D0FFDF022DF9D14AE70420B2 +:1053E000C3E70320C1E770B5050004D02B4CA078BB +:1053F000052806D101E0102070BD0820F0F751FC0F +:1054000008B1112070BD2948EFF7BBFBE0702028E0 +:1054100006D00121F0F777FA0020A560A07070BDDA +:10542000032070BD1D4810B5017809B1112010BDD1 +:105430008178052906D0012906D029B10121017002 +:10544000002010BD0F2010BD00F03BF8F8E770B54C +:10545000124C0546A07808B1012809D155B128465B +:10546000FFF73DFE40B1287840B1A078012809D06F +:105470000F2070BD102070BD072070BD2846FFF7BB +:1054800058FE03E000212846FFF772FE0449E07849 +:10549000EFF73CFE00B9FFDF002070BDD001002017 +:1054A0006C1300203D860100FF1FA1073952020046 +:1054B0000A4810B5006900F013F8BDE81040EFF796 +:1054C000E5BA064810B5C078EFF7B7FB00B9FFDFC3 +:1054D0000820F0F7D0FBBDE81040EBE5D00100203C +:1054E0000C490A6848F202139A4302430A60704763 +:1054F000084A116848F2021301EA03009943116057 +:1055000070470246044B10201344FC2B01D8116055 +:1055100000207047C80602400018FEBF7047704761 +:105520007047704740EA010310B59B070FD1042A6A +:105530000DD310C808C9121F9C42F8D020BA19BA5E +:10554000884201D9012010BD4FF0FF3010BD1AB1C3 +:10555000D30703D0521C07E0002010BD10F8013B18 +:1055600011F8014B1B1B07D110F8013B11F8014B3F +:105570001B1B01D1921EF1D1184610BD032A40F227 +:10558000308010F0030C00F0158011F8013BBCF1E5 +:10559000020F624498BF11F801CB00F8013B38BFFD +:1055A00011F8013BA2F1040298BF00F801CB38BF0B +:1055B00000F8013B11F0030300F02580083AC0F029 +:1055C000088051F8043B083A51F804CBA0E80810D1 +:1055D000F5E7121D5CBF51F8043B40F8043BAFF304 +:1055E0000080D20724BF11F8013B11F801CB48BF5E +:1055F00011F8012B24BF00F8013B00F801CB48BF94 +:1056000000F8012B704710B5203AC0F00B80B1E8CC +:105610001850203AA0E81850B1E81850A0E81850E7 +:10562000BFF4F5AF5FEA027C24BFB1E81850A0E8F0 +:10563000185044BF18C918C0BDE810405FEA827C0A +:1056400024BF51F8043B40F8043B08BF7047D20721 +:1056500028BF31F8023B48BF11F8012B28BF20F8C2 +:10566000023B48BF00F8012B704702F0FF0343EAFA +:10567000032242EA024200F002B84FF0000204297D +:10568000C0F0128010F0030C00F01B80CCF1040C71 +:10569000BCF1020F18BF00F8012BA8BF20F8022BA5 +:1056A000A1EB0C0100F00DB85FEAC17C24BF00F84B +:1056B000012B00F8012B48BF00F8012B70474FF079 +:1056C000000200B5134694469646203922BFA0E852 +:1056D0000C50A0E80C50B1F12001BFF4F7AF09075E +:1056E00028BFA0E80C5048BF0CC05DF804EB89004F +:1056F00028BF40F8042B08BF704748BF20F8022B92 +:1057000011F0804F18BF00F8012B704770477047A9 +:1057100070477047FEDF18490978F9B904207146CF +:1057200008421BD10699154A914217DC06990229B5 +:1057300014DB02394878DF2810D10878FE2807D01A +:10574000FF280BD14FF001004FF000020C4B18471F +:1057500041F201000099019A094B1847094B002BAF +:1057600002D01B68DB6818474FF0FF3071464FF0DE +:105770000002034B1847000028ED00E00060020023 +:105780003D4A020004000020174818497047FFF7FF +:10579000FBFFDBF713FD00BD154816490968884279 +:1057A00003D1154A13605B68184700BD20BFFDE7B1 +:1057B0000F4810490968884210D1104B18684FF003 +:1057C000FF318842F2D080F308884FF020218842D0 +:1057D00004DD0B48026803210A4302600948804740 +:1057E00009488047FFDF000080130020801300205D +:1057F00000100000000000200400002000600200F3 +:1058000014090040C52F000099570200042071467A +:10581000084202D0EFF3098101E0EFF308818869C3 +:1058200002380078102813DB20280FDB2C280BDB34 +:105830000A4A12680A4B9A4203D1602804DB094ADB +:105840001047022008607047074A1047074A104770 +:10585000074A12682C3212681047000054000020DA +:10586000BEBAFECA0514000041410200E34B02002B +:10587000040000200D4B0E4908470E4B0C49084709 +:105880000D4B0B4908470D4B094908470C4B08497C +:1058900008470C4B064908470B4B054908470B4B7B +:1058A000034908470A4B024908470000E1BC0000D1 +:1058B0005DC00000552D0000CF2B00005D2B0000C7 +:1058C000F72D0000211400001B2900004D2F0000BF +:1058D000C911000000210160818070470021016032 +:1058E0004160017270470A6802600B79037170476A +:1058F000959600003F980000A1990000059A0000CD +:105900003F9A0000739A0000AD9A0000DD9A0000F3 +:10591000579B00008D970000C5990000A71200005A +:10592000C14300000D44000073440000FF44000028 +:1059300023460000E546000017470000EF4700003F +:1059400087480000DB480000C1490000E149000031 +:10595000C3160000E7160000171600006B160000C3 +:1059600019170000AD17000047600000F761000044 +:10597000BD650000D56600005F670000DD670000C0 +:105980004168000061690000316A00009D6A000002 +:10599000034A0000094A0000134A00007B4A000045 +:1059A000A74A0000634C00008D4C0000C54C00006D +:1059B0002F4D0000194E00002F4E00003144000012 +:1059C000A7120000A7120000A7120000A7120000F3 +:1059D000A7120000A7120000A7120000A3250000D4 +:1059E000292600004526000061260000EF27000060 +:1059F0008B26000095260000D7260000F92600001F +:105A0000D527000017280000A7120000A7120000E9 +:105A1000CB830000EB830000F58300002F8400009F +:105A20005D8400004D850000DB850000EF850000EF +:105A30003D86000053870000F9880000218A00009D +:105A40004F730000398A0000A7120000A71200005F +:105A5000D9B5000043B7000097B7000003B80000B5 +:105A6000B3B80000010000000000000010011001A8 +:105A70003A0200001A02000405060000FFFFFFFFC3 +:105A80000000FFFFCDAD0000233D000049210000D4 +:105A900099730000118F000000000000D5910000F4 +:105AA00099910000C3910000AB910000000002003A +:105AB00000000000000200000000000000010000E3 +:105AC000000000007781000057810000C5810000C0 +:105AD00025250000E72400000725000037A9000065 +:105AE00063A900006BAB000041590000E581000094 +:105AF0000000000015820000732500000000000077 +:105B000000000000000000004DAA0000000000009E +:105B1000D55900000300000001555555D6BE898EA9 +:105B200000006306630C631200000703AB054F0817 +:105B3000000053044308330C00000000900A0000EA +:105B4000900A0000C3560000C35600009D430000A9 +:105B500079AC00001B7600005B2000001D380200BD +:105B6000E1A401000157000001570000BF430000FD +:105B7000DBAC00009F760000CD2000004938020019 +:105B8000F5A4010070017001400038005C002400A1 +:105B90005001080200000300656C74620000000000 +:105BA000000000000000000000000000870000006E +:105BB000000000000000000000000000BE83605AEA +:105BC000DB0B376038A5F5AA9183886C01000000D3 +:105BD000BB31010081400100000000010206030406 +:105BE00005000000070000000000000006000000A3 +:105BF0000A0000003200000073000000B400000042 +:105C0000EB8F01006F1F020017F90000D9B70100E8 +:105C1000F3F70100D9B70100B5FA000097B9010008 +:105C2000E9F3010097B90100F1F6000025B9010080 +:105C300011F7010025B9010013F90000EDB70100CB +:105C4000D5EF0100EDB7010067FF000019BC0100AE +:105C5000A7F8010019BC0100F401FA0096006400E5 +:105C60004B0032001E0014000A0005000200010073 +:105C70000049000000000000AAAED7AB154120107B +:105C80000C0802170D010102090901010602091899 +:105C9000180301010909030305555555252627D683 +:105CA000BE898E00F401FA00960064004B003200B9 +:105CB0001E0014000A000500020001002549000032 +:105CC000000000009D480200B5480200CD480200D7 +:105CD000E5480200154902003D49020067490200FB +:105CE0009B490200534502009B4402008D41020083 +:105CF00003550200395D0100495D0100755D010039 +:105D0000475E01004F5E0100615E0100A746020090 +:105D1000C1460200954602009F460200CD460200A1 +:105D20000347020023470200414702004F47020099 +:105D30005D4702006D470200854702009D47020053 +:105D4000B3470200C94702000000000087BA000004 +:105D5000DDBA0000F3BA000061500200B941020050 +:105D60007F420200E7530200255402004F54020014 +:105D7000195C010079600100DF470200054802005C +:105D8000294802004F4802001C0500402005004041 +:105D900000100200B45D020008000020E4010000D1 +:105DA00044110000E85D0200EC01002094110000A5 +:105DB000A0110000011413F8130240200B20040668 +:105DC000441A0102228C2720FB349B5F8012800240 +:105DD0001E101B430B5419042A8608019F0916CB79 +:085DE000327F0B6CF410C000CF +:02000004000FEB +:1040000000000420CDB20F00F5B20F00F7B20F0090 +:10401000F9B20F00FBB20F00FDB20F00000000006C +:10402000000000000000000000000000C1450F007B +:1040300001B30F000000000003B30F00214D0F007B +:10404000354E0F0007B30F0007B30F0007B30F0083 +:1040500007B30F0007B30F0007B30F0007B30F003C +:1040600007B30F0007B30F0007B30F0007B30F002C +:1040700007B30F0007B30F0007B30F0007B30F001C +:1040800007B30F0085720F0007B30F0007B30F00CF +:1040900041730F0007B30F00814B0F0007B30F00F0 +:1040A00007B30F0007B30F0007B30F0007B30F00EC +:1040B00007B30F0007B30F0000000000000000006E +:1040C00007B30F0007B30F0007B30F0007B30F00CC +:1040D00007B30F0007B30F0007B30F0005850F00EC +:1040E00007B30F0007B30F0007B30F000000000075 +:1040F0000000000007B30F000000000007B30F002E +:1041000000000000000000000000000000000000AF +:10411000000000000000000000000000000000009F +:10412000000000000000000000000000000000008F +:10413000000000000000000000000000000000007F +:10414000000000000000000000000000000000006F +:10415000000000000000000000000000000000005F +:10416000000000000000000000000000000000004F +:10417000000000000000000000000000000000003F +:10418000000000000000000000000000000000002F +:10419000000000000000000000000000000000001F +:1041A000000000000000000000000000000000000F +:1041B00000000000000000000000000000000000FF +:1041C00000000000000000000000000000000000EF +:1041D00000000000000000000000000000000000DF +:1041E00000000000000000000000000000000000CF +:1041F00000000000000000000000000000000000BF +:104200000348044B834202D0034B03B11847704765 +:10421000C8860020C8860020000000000548064926 +:104220000B1AD90F01EBA301491002D0034B03B1C4 +:1042300018477047C8860020C8860020000000008C +:1042400010B5064C237843B9FFF7DAFF044B13B1DE +:104250000448AFF300800123237010BDC8860020FE +:10426000000000005CBD0F0008B5044B1BB1044901 +:104270000448AFF30080BDE80840CFE7000000002D +:10428000CC8600205CBD0F00A3F5803A704700BFCC +:10429000154B002B08BF114B9D46FFF7F5FF002182 +:1042A0008B460F461148124A121A00F075F80C4B53 +:1042B000002B00D098470B4B002B00D098470020D4 +:1042C000002104000D000B4800F016F800F040F843 +:1042D0002000290000F074FA00F014F80000080033 +:1042E000000000000000000000000420C88600203C +:1042F000A4CE002025430F00002301461A4618468D +:1043000000F09CB808B50021044600F0CBF8044B3F +:104310001868C36B03B19847204600F029F900BF25 +:1043200058BB0F0038B5084B084D5B1B9C1007D0DD +:10433000043B1D44013C55F804399847002CF9D141 +:10434000BDE8384007F002BCC8860020C4860020C3 +:1043500070B50D4E0D4D761BB61006D0002455F8E5 +:10436000043B01349847A642F9D1094E094D761B0A +:1043700007F0E6FBB61006D0002455F8043B0134E4 +:104380009847A642F9D170BDBC860020BC860020AB +:10439000C4860020BC860020830730B548D0541E58 +:1043A000002A3FD0CAB2034601E0013C3AD303F8E9 +:1043B000012B9D07F9D1032C2DD9CDB245EA052556 +:1043C0000F2C45EA054536D9A4F1100222F00F0C56 +:1043D00003F1200EE6444FEA121C03F1100242E9F9 +:1043E000045542E9025510327245F8D10CF1010230 +:1043F00014F00C0F03EB021204F00F0C13D0ACF10D +:10440000040323F003030433134442F8045B934290 +:10441000FBD10CF003042CB1CAB21C4403F8012BED +:104420009C42FBD130BD64461346002CF4D1F9E721 +:1044300003461446BFE71A46A446E0E770B4184C9A +:104440002568D5F848411CB365681F2D25DC38B9AF +:10445000AB1C0135656044F82310002070BC704728 +:1044600004EB850C0228CCF88820D4F888614FF042 +:10447000010202FA05F246EA0206C4F88861CCF8A5 +:104480000831E5D1D4F88C311343C4F88C31DFE71F +:1044900005F5A674C5F84841D6E74FF0FF30DDE7D3 +:1044A00058BB0F002DE9F84F2B4B1F68D7F8486118 +:1044B0002DED028BC6B108EE100A8B464FF00108B5 +:1044C0004FF000097468651E0ED4013406EB8404B5 +:1044D000BBF1000F0CD0D4F800315B4508D0013D92 +:1044E0006B1CA4F10404F3D1BDEC028BBDE8F88F82 +:1044F00073682268013BAB420CBF7560C4F8009042 +:10450000002AECD0D6F88801D6F804A008FA05F104 +:1045100001420BD190477268524513D1D7F8483108 +:10452000B342DCD01E46002ECCD1DDE7D6F88C019C +:1045300001420CD1D4F8801018EE100A904772682E +:104540005245EBD0D7F84861002EBBD1CCE7D4F868 +:1045500080009047DFE700BF58BB0F00024B13B14C +:104560000248FFF7C9BE70470000000025430F0056 +:10457000FEE700BF38B50C46E8B90968C9B10F4D70 +:10458000A9420BD06B1A3B2B11D93C22284606F0CE +:10459000EDFE03E0CA5CEA54013BFBD2074800226F +:1045A0003C2103F0D3F90023A887236038BD3D23C5 +:1045B000F2E70E23F9E70123F7E700BF807F002031 +:1045C000074A6FF002039E4502D1EFF3098101E033 +:1045D000EFF308818869A0F102000078104700BF5E +:1045E00075450F0038B50446A8B10D4D00223C2199 +:1045F000284603F0ABF9AB8F83420ED12A4605F172 +:104600003C0152F8040B44F8040B8A42F9D10133FF +:10461000AB87002038BD0E20FCE70B20FAE700BF77 +:10462000807F00200B2970B50446154608462FD917 +:104630002389053304EB43012044431ADAB2012AEB +:1046400026D9814224D8134806F090FE2388522BA5 +:1046500006D1AB0711D062884CF668639A420CD041 +:104660000F2014E034F8022B824204D0AE89964227 +:1046700003F1010308D1002009E0218900230A3455 +:104680004FF6FE704FF440559942EBD80B2070BDA9 +:104690000920FCE7E486002008B5002203F056F963 +:1046A000034B1B88834214BF0B20002008BD00BFB2 +:1046B000E486002038B50C4C21684B1C054612D00E +:1046C0000A484FF4805206F01FFE48B115B1206829 +:1046D00000F00CFC054920684FF4806200F026FCD5 +:1046E0004FF0FF33236038BD30840020F086002077 +:1046F0002DE9F041DFF84480044624F47F65184634 +:10470000D8F8003025F00F05AB420E46174609D009 +:10471000FFF7D0FF0848C8F800504FF480522946F0 +:1047200006F024FE0448C4F30B043A463146204404 +:10473000BDE8F04106F01ABEF0860020308400206B +:10474000BFF34F8F0549064BCA6802F4E06213437A +:10475000CB60BFF34F8F00BFFDE700BF00ED00E06F +:104760000400FA054BDF704710DF704711DF704718 +:1047700013DF704718DF704760DF704769DF7047ED +:1047800061DF70471FB50023CDE90133039368460D +:1047900002230093FFF7EEFF05B05DF804FB08B5B8 +:1047A0004FF0E023D3F8F03DDB0700D500BEFFF764 +:1047B000C7FF0000014B1878704700BFF19600203A +:1047C0002DE9FF484C4B40F60212C3F8402500F09B +:1047D00005FA00F021FE002000F0AAFA00F09CFE8D +:1047E00048B1052000F0A4FA00F0A8FE00F0CCFECD +:1047F000062000F09DFA4FF08043DFF81081D3F8D7 +:104800001C55B12D0CBF0123002388F800304AD07D +:10481000A5F1A8014C424C41384EDFF8F49004F069 +:10482000010333704FF08043D3F8007407F00107A1 +:10483000002C3BD14E2D38D0572D36D0304B1B6835 +:104840001A68304B9A4200D17FBB6D2D2ED01220BA +:1048500000F0B0F9044633789BBB122000F0AAF9AF +:1048600010B1122000F0A6F900F00100307000F045 +:1048700005FDDFF8A0B0824630B12CB9204B1B6893 +:104880001A68214B9A4257D04FF440535A684A4510 +:104890000ABF9B684FF4905303F500731B685B4598 +:1048A0003AD1012448E00124B6E701244FF08043C7 +:1048B00000226D2DC3F81C2500F0E480002CCAD125 +:1048C000C5E70120D0E7544636E03C4634E04FF4DB +:1048D00080030B6071E0022000F02AFAA5F14E037C +:1048E0005842584103F012FEAEE000221146C1E0EA +:1048F00003F05CFEC6E000BF00A00040F19600207F +:1049000034840020D51A5A007E67E54EF2960020C6 +:10491000DBE5B1517CB0EE87002CC2D1BAF1000FBB +:10492000D1D0002FD1D0654B654A1B6865481A600D +:10493000654B43F0010398474FF440535A684A458A +:1049400008BF9B685D4A0CBF03F500734FF490539A +:1049500012681B685B450CBF5C4B002313601CB9DD +:10496000BAF1000F40F08E803378002BB3D00820CE +:1049700000F0DEF998F800300BB9FFF703FF0123D0 +:104980004FF4742088F80030FFF7F2FE504B514985 +:104990001868019001A8FFF7E7FE4F4991F8163318 +:1049A0005A09EC231341DA0707D54C4B9A68002AC1 +:1049B0008DD01A6842F480021A600C22484B029390 +:1049C00000210DEB0200FFF7E7FC40F20113029A11 +:1049D000039303A94020FFF7D1FE0C2200210DEB29 +:1049E0000200FFF7D9FC9DF80C30029A43F0010356 +:1049F00003A9A0208DF80C30FFF7C0FE0C22002187 +:104A00000DEB0200FFF7C8FC01241723029AADF852 +:104A10000E3003A923208DF80C40FFF7AFFE0C22C7 +:104A200000210DEB0200FFF7B7FC0623029A8DF878 +:104A30000C4003A920208DF80E40ADF81030FFF790 +:104A40009DFE02A8FFF798FE4FF4405330785A6855 +:104A50004A450ABF9B684FF4905303F500731B68E7 +:104A60005B4504D0572D02D04E2D7FF43EAF01227E +:104A700040F6B83100F0E8FC3378002B3FF438AF53 +:104A8000FFF774FE00F0EEF800F0F8FBA0B100F0C4 +:104A900043FD88B94FF440535B684B4506D198F805 +:104AA00000300BB9FFF76EFEFFF760FE034B1B688B +:104AB00000221A6000F004FDFFF742FE348400205B +:104AC000D51A5A000048E80160BB0F007E67E54E2A +:104AD0005CBB0F009F470F0000E100E0409D0020FD +:104AE0000080002010B58EB03423ADF802300DF1F7 +:104AF0000201002301A8ADF80430FFF741FE04468F +:104B000040B9BDF80430102B07D0112B0CD001A8F0 +:104B100000F0CCFF20460EB010BD054B01221A70EC +:104B2000072000F005F9F2E7014B18700820F8E7BC +:104B3000F096002013B5002301A80193FFF712FEA1 +:104B4000044660B9019802F053FA019B0A2B09D080 +:104B5000092B09D00B2B02D1012004F09BFB20462E +:104B600002B010BD2046F8E70220F6E708B5FFF7CF +:104B7000B9FF0528FBD1FFF7DDFF0528F7D108BDF8 +:104B80000021024A084602F003BE00BF6D4B0F0031 +:104B90001F2884BF00F01F00044B054A98BF4FF048 +:104BA000A04300F5E07043F8202070470003005058 +:104BB0000C0003001F288ABF064B4FF0A04300F0F3 +:104BC0001F00D3F8103523FA00F0C04300F00100B5 +:104BD000704700BF000300507047000008B54FF059 +:104BE000804301220021DA601220C3F818159A6070 +:104BF000FFF7CEFF1220FFF7CBFF154B4FF4C85045 +:104C000043F001039847FFF7E7FF124A1E210820EF +:104C100002F09AFD08B102F051FE02F0FBFC0E49D1 +:104C20000E4BE02081F823001B684FF47A72B3FB2F +:104C3000F2F3013BB3F1807F08D24FF0E0225361E1 +:104C4000002381F8230093610723136108BD00BF8F +:104C500070BB0F00F496002000ED00E038840020C7 +:104C6000704700004FF0E0224FF40031002310B5F0 +:104C70001361C2F8801102F1C04202F540524FF4B4 +:104C80008031C2F84813C2F80813012151609160C5 +:104C90004FF080420A4CD16002201F2B1A46C6BF3B +:104CA00003F01F0221464FF0A04102F5E0720133EC +:104CB000302B41F82200F0D1FFF7D2FF10BD00BF2A +:104CC00000030050074B23F81010074B002282B05E +:104CD000C3F81021D3F810210192019A01229A60A1 +:104CE00002B07047E898002000C001400A4A0B4B10 +:104CF00011681B68B1FBF3F203FB1211B1EB530F08 +:104D00004FEA530288BF591A4F2359430020B1FB81 +:104D1000F2F189B2FFF7D6BFE4980020F0980020A6 +:104D2000024A136801331360FFF7E0BFE4980020E4 +:104D30001B490A68082823D8DFE800F0130513226E +:104D4000221A1E242A00174B40F6B83018604FF480 +:104D50007F4303F0103323F080539A4218BF0B6057 +:104D60007047104B4FF4967018604FF47F03F0E7D4 +:104D70000C4B64221A6070470A4B40F6B83018603A +:104D80001346E6E7074B40F6B8301860FF23E0E72C +:104D9000044B4FF4967018604FF0FF13D9E700BF33 +:104DA000F4980020F098002000F1804382B01A6847 +:104DB000002A14BF0120002004D000221A601B68C2 +:104DC0000193019B02B070470F4A1378D3B903785F +:104DD0004FF08041C3F34003C1F88035037803F0FE +:104DE0000103C1F87835094B1968C90706D4E021D9 +:104DF00083F800130121C3F88011196001230448CE +:104E000013707047034870470499002000E100E0E8 +:104E10000000AD0B0C00AD0B014B02681A6070472F +:104E2000009900204FF080434FF46072C3F80423D0 +:104E30007047000010B54FF08043D3F80443620779 +:104E400007D54FF48470FFF7AFFF10B11E4B1B68FE +:104E50009847A30608D54FF48A70FFF7A5FF18B14D +:104E60001A4B00201B689847600608D54FF48C70D9 +:104E7000FFF79AFF18B1154B01201B6898472106D0 +:104E800008D54FF48E70FFF78FFF18B1104B00203C +:104E90001B689847E20508D54FF49070FFF784FF30 +:104EA00018B10B4B01201B689847A3050AD54FF496 +:104EB0009270FFF779FF28B1054BBDE810401B68E1 +:104EC0000220184710BD00BFF8980020FC98002071 +:104ED00000990020044AD2F80034DB07FBD50160BA +:104EE000BFF35F8F704700BF00E001404FF0805379 +:104EF0001A69B0FBF2F302FB130373B9084B0222E9 +:104F0000C3F80425C3F80805D3F80024D207FBD55D +:104F100000220448C3F8042570470348704700BFC7 +:104F200000E001400000AD0B0A00AD0BF8B50B4BE3 +:104F30001546012206460F46C3F804250024A54263 +:104F400004D1064B0022C3F80425F8BD57F82410FD +:104F500006EB8400FFF7BEFF0134F0E700E00140FC +:104F6000BFF34F8F0549064BCA6802F4E062134352 +:104F7000CB60BFF34F8F00BFFDE700BF00ED00E047 +:104F80000400FA054FF08053D3F83021082A06D1E7 +:104F9000D3F83431032B02D8024AD05C704700208A +:104FA000704700BF76BB0F0008B54FF08053D3F8B1 +:104FB0003021082A4ED14FF080420021C2F80C1156 +:104FC000C2F81011C2F8381502F54042D3F80414A3 +:104FD000C2F82015D3F80814C2F82415D3F80C141D +:104FE000C2F82815D3F81014C2F82C15D3F81414ED +:104FF000C2F83015D3F81814C2F83415D3F81C14BD +:10500000C2F84015D3F82014C2F84415D3F824147C +:10501000C2F84815D3F82814C2F84C15D3F82C144C +:10502000C2F85015D3F83014C2F85415D3F834141C +:10503000C2F86015D3F83814C2F86415D3F83C14DC +:10504000C2F86815D3F84014C2F86C15D3F844348C +:10505000C2F87035FFF796FF18B1494B494AC3F8BB +:105060008C26FFF78FFF18B1474BFB22C3F818259A +:10507000FFF788FF70B14FF080414FF08053D1F8B7 +:10508000E42ED3F8583222F00F0203F00F0313433B +:10509000C1F8E43EFFF776FF20B13C4B4FF40072BD +:1050A000C3F840264FF08053D3F83031082B09D194 +:1050B0004FF08043D3F80024D10744BF6FF00102C2 +:1050C000C3F80024324AD2F8883043F47003C2F89F +:1050D0008830BFF34F8FBFF36F8F4FF01023D3F89B +:1050E0000C22D2071DD52B4B0122C3F80425D3F87F +:1050F0000024002AFBD04FF01022D2F80C3223F00B +:105100000103C2F80C32234BD3F80024002AFBD051 +:105110000022C3F80425D3F80024002AFBD0FFF7AF +:105120001FFFD3F80022002A03DBD3F80432002B40 +:1051300022DA184B0122C3F80425D3F80024002AF0 +:10514000FBD04FF010221221C2F80012D3F8002435 +:10515000002AFBD04FF010231222C3F804220D4B7B +:10516000D3F80024002AFBD00022C3F80425D3F88A +:105170000024002AFBD0D2E7074B084A1A6008BD7A +:10518000005000404881030000F0004000900240C1 +:1051900000ED00E000E00140388400200090D003E2 +:1051A00013DF704718DF7047064B1878012803D1CA +:1051B000012904BF0221197012B1104602F07EBB12 +:1051C000704700BF3599002008B5FFF7F3FA88B1A2 +:1051D00011481C2101F098FF08B102F06FFB0F4944 +:1051E0000D4800231C2201F07FFF98B1BDE8084064 +:1051F00002F064BB4FF47F20FFF778FE07220749D7 +:105200004FF47F20FFF792FE054B1A78012A04BF66 +:1052100002221A7008BD00BF2C9900203899002086 +:105220003599002070B5124C124D134ED4F800344D +:105230007BB1C4F80056C4F80456C4F80856C4F844 +:105240000C56C4F81056C4F81456C4F81856C4F8CE +:105250001C5602F005FB05F0F4FF20B104F0DAFD66 +:10526000002005F003FA3378023B022BDED870BD34 +:10527000000001403546526E3599002013B54FF4B9 +:105280004053124A596891420CBF9C684FF48054B5 +:1052900001A800F0A7F92368013302D16368013344 +:1052A00011D0019B1A88012A0DD1588820B1996824 +:1052B0000022204602F04AFB019B5B881B1A5842E1 +:1052C000584102B010BD0020FBE700BFDBE5B15143 +:1052D00084B02DE9F34108AC84E80F009DF820402C +:1052E000BDF8228001A80F4616461D4600F07AF947 +:1052F00054B9384B0122FF21A3F802809D601A8027 +:105300009980354B1A7012E0012C17D1314BBA1924 +:105310002A449A60A5221A80FF229A800C9AA3F848 +:105320000280C3E903765D619A612B4B1C70FFF725 +:105330004BFF02B0BDE8F04104B07047032C0FD121 +:10534000019A244B11881980518892689A60C3E9A8 +:105350000376AA2259809A805D611F4B0122D1E712 +:10536000022C15D1019A1B4B1188A5290AD10022C4 +:105370009A60FF221A60FF229A800022C3E903226A +:105380005A61EAE719805188926859809A60F2E779 +:10539000052C0ED1FFF70EFA40B100F097FD08B1D1 +:1053A00002F08CFA0C4B03221A70C2E700F010FADC +:1053B000F5E7042C08D1074B00229A60FF221A60FF +:1053C000019A92889A80B2E7062CB2D1024B04224D +:1053D000EAE700BF389900203599002000B50C4B52 +:1053E0001B7889B063B90B4B1B786BB905238DF81B +:1053F0000C30079B009303AB0FCBFFF769FF03E073 +:1054000004F000FB0028EED009B05DF804FB00BFFB +:1054100034990020289900201FB50023CDE90233DC +:10542000074B019301F030FE30B906494FF47F235A +:1054300001A84B6001F046FE05B05DF804FB00BF1B +:10544000A9510F002C99002070B505460E460AB1EF +:1054500080F00102154B02F001021A7000F0B0FF5B +:10546000044628B935B100F08BFC0446FFF7DAFE9C +:10547000204670BDBEB10E4B0E4A0F481D70294626 +:1054800002F0F8F84FF400444FF4FA7029464FF454 +:105490007A720023E6FB040106F0D0F92A460146A1 +:1054A000064802F0F9F800F06FF9DEE734990020C1 +:1054B00028990020DD530F007CBB0F0008990020C5 +:1054C0001FB5134B4FF0FF32C3F88020C3F8802183 +:1054D0004FF440530F4A596891420DD19C682046C1 +:1054E000FFF75EFE10B14FF000531C60204604B081 +:1054F000BDE8104000F09AB80023CDE902334FF424 +:10550000805406236846CDE90034FFF74BFEE9E7F7 +:1055100000E100E0DBE5B15107B501A800F062F859 +:10552000019B1A88A52A07D09888A0F1AA0358429F +:10553000584103B05DF804FB0120FAE710B501F013 +:105540005DF9A8B10E4B0F4843F00103984701F0F5 +:10555000BFF808B102F0B2F901F050F908B102F059 +:10556000ADF901F001F9044638B102F0A7F904E001 +:1055700001F01EF904460028E4D1204610BD00BF0A +:1055800080BB0F0000A8610000B589B003AB1422F6 +:1055900000211846FEF700FF02228DF80C200022A1 +:1055A00000920FC8FFF794FEFFF73CFE002009B001 +:1055B0005DF804FB13B5044601A800F013F8019B45 +:1055C0001A8822805A8862809A68A2609A88A2808B +:1055D000DA68E2601A6922615A6962619B69A361B3 +:1055E00002B010BD014B0360704700BF00F00F0018 +:1055F000F0B50346186880F308885868FF2464B241 +:10560000EFF30585002D01D1A64600472546064645 +:1056100021273FBAF0B40024002500260027F0B46B +:10562000F92040B2004700BFF0BD00BFFFF7E0BF68 +:1056300073B500230DF1020101A8ADF8023001930A +:1056400002F0C4FDF8B9019C25785DB3174B93F8BF +:105650003020032A28D00C2606FB00F29958E9B91D +:1056600098189D5093F830200132D2B283F8302040 +:10567000BDF802300E4A9B08013B0434436084604D +:10568000084602F085F8019B33B128B1184602F0B4 +:10569000B9FD08B102F012F902B070BD0130042862 +:1056A000DAD1F0E70720EEE70420ECE75499002078 +:1056B000F9560F00084609B102F000B97047000022 +:1056C00010B50C220B4B504319181A5882B193F89D +:1056D00030208C68013AD2B283F8302000221A5070 +:1056E000C1E90122201F02F08DFD08B102F0E6F8A9 +:1056F000002010BD54990020214B70B50122214E8D +:105700001A7096F8303003B970BD1E4C002523681E +:1057100083B1013B042B07D8DFE803F01C0612031A +:105720002800204600F0DEFEE8B2FFF7C9FF08B10E +:1057300002F0C4F80135042D04F10C04E7D1E0E7D0 +:10574000A3686360204600F073FE0028ECD002F0EE +:10575000B5F8E9E7204600F053FF00F02FFF08B14D +:1057600002F0ACF80520FFF7E3FADDE700F074FF84 +:1057700000F092FFBDE870400620FFF7D9BA00BFE5 +:10578000289900205499002008B50E4B002283F878 +:10579000302004210139C3E901221A6003F10C030E +:1057A000F8D1094800F03EFE02F0A8FC08B102F072 +:1057B00085F8064802F08EFC08B102F07FF8002060 +:1057C00008BD00BF54990020B5560F0031560F0098 +:1057D00008B50020FFF774FF0120FFF771FF0220DA +:1057E000FFF76EFF0320FFF76BFFBDE8084002F0F4 +:1057F000CDBC006870476CDF70476DDF70476EDFAF +:1058000070476FDF704772DF704773DF704774DF78 +:10581000704776DF704777DF70477ADF70477CDF4D +:1058200070477FDF704786DF70478FDF704790DFFC +:105830007047AFDF7047B0DF7047B1DF7047B2DF4E +:105840007047B5DF704764DF704766DF70470C282C +:1058500013D8DFE800F01412121212120912071204 +:10586000120D0B0002207047032070470420704780 +:10587000042914BF06200520704706207047012028 +:10588000704702F01BB810B5044608460321FFF725 +:10589000DEFF0246204601F075F918B1BDE8104060 +:1058A00002F00CB810BD00000346032B10B50846EB +:1058B000144620D0042B23D169B1124B18884FF61F +:1058C000FF7398421CD01321FFF7A3FFC0B1BDE8BE +:1058D000104001F0F3BF104602F094F808B101F057 +:1058E000EDFF094B1B689C420AD1012203210748A6 +:1058F00001F048F9EAE70121FFF7A9FF0246F6E7C0 +:1059000010BD00BF3E840020489A0020F899002076 +:10591000F8B50A4DAB889E181D2E14460DDC2F6875 +:10592000FE1802F1010C07F803C07070B01C05F0FE +:105930001DFDAB8802331A19AA80F8BDA899002072 +:10594000F0B54E4E317895B0002940F092804C4C25 +:10595000019110222046FEF71FFD4A4B019923605A +:1059600018220EA8FEF718FD01238DF838302823E1 +:105970001093454B1B78002B7DD0444B04AC03F1B6 +:10598000100518685968224603C20833AB42144612 +:10599000F7D13F4C10220DEB0201E01D05F0B4FCE5 +:1059A000002868D03B4801210460FFF728FF08B1B8 +:1059B00001F084FF384B08AA03F1100C1746186851 +:1059C0005968154603C5083363452A46F7D1206850 +:1059D0000C903248A288A379ADF8342007600122E8 +:1059E00000218DF83630FFF70CFF08B101F066FF9B +:1059F00003238DF84C3004238DF80E3041F23053E0 +:105A0000ADF81030264B08AA9B798DF812300DF1B5 +:105A10000F0104A8FFF717FF012210460DF10E0138 +:105A2000FFF776FF1F4805F04BFE1E49C2B2092062 +:105A3000FFF76EFF102208A90620FFF769FF104943 +:105A400019480EAAFFF7DFFE08B101F037FF164C28 +:105A5000042221780120FFF7DEFE08B101F02EFFBD +:105A600020780121FFF7D1FE08B101F027FF0123C3 +:105A7000337015B0F0BD0623BEE700BF2C9A00209E +:105A8000A899002088990020F4990020A9BB0F0054 +:105A9000B8990020449A0020BF990020289A00203D +:105AA000F899002086BB0F003C840020F0B5044626 +:105AB0000146B1B0A84801F099F82388262B3BD8BD +:105AC0000F2B04D8012B00F0CC8031B0F0BD103B7F +:105AD000162BFAD801A252F823F000BF655B0F0025 +:105AE000735B0F00CB5A0F00A55B0F009F5C0F008C +:105AF000CB5A0F00CB5A0F00CB5A0F00CB5A0F00D6 +:105B0000CB5A0F00BB5C0F00CB5A0F00CB5A0F00D3 +:105B1000CB5A0F00CB5A0F00CB5A0F00CB5A0F00B5 +:105B2000315D0F00CB5A0F00235D0F00CB5A0F00E1 +:105B3000CB5A0F00255C0F00513B9AB2052AC4D8FE +:105B4000052BC2D801A252F823F000BF6F5C0F00F2 +:105B5000BB5C0F00CB5A0F00CB5A0F00475D0F0004 +:105B60000B5C0F007D4BA2881A807D4B00221A70BF +:105B7000ABE78023794CADF824307A4B2088322271 +:105B80001A6010A9012309AAFFF759FE08B101F014 +:105B900095FE754B1B780BB9FFF7D2FE4FF6FF73DE +:105BA000238092E7714B03AC9A79186899888DF835 +:105BB00022200790DA1DADF8201017332646106812 +:105BC0005168254603C508329A422C46F7D1684BE6 +:105BD00009AA03F11807154618685968144603C442 +:105BE0000833BB422246F7D1186820605B48614AFF +:105BF000008810AB8521CDE91456FFF712FE00286E +:105C00003FF463AF01F05AFE5FE7A379002B7FF406 +:105C10005CAF524B13211888FFF7FBFD00283FF4BF +:105C200054AF79E0237A012B7FF44FAF4C4B002225 +:105C30001A704C4B19680139196069B910AB1422FC +:105C40001846FEF7A9FB05228DF84020149A009211 +:105C50000FC8FFF73DFB38E731B0BDE8F040FFF774 +:105C60006FBE3E4B00211888FFF7EFFDD6E7A37902 +:105C7000002B3FF42AAFA27B043A022A3FF625AF5D +:105C8000022B18BF01238DF840304FF4C173ADF8DB +:105C90004430324B10A91888FFF7CDFDAFE7334AE7 +:105CA000258A508D02F118010023854218BF19463C +:105CB0000732A088FFF7B7FDB0E7284B1C884FF6E6 +:105CC000FF75AC4227D02C4B1B78F3B12B49012335 +:105CD00008222046FFF7B1FDF0B902460146022333 +:105CE0002046FFF7AAFDB8B92A460C212046FFF747 +:105CF000A0FDA0F54053023B012B7FF6E6AE08283D +:105D00003FF4E3AE112889D1DFE61A461946204652 +:105D1000FFF793FD82E7082031B0BDE8F04001F0C5 +:105D2000CDBD0E4B002218881146FFF780FD75E7A8 +:105D300000238DF840308DF84130084B10A91888A9 +:105D4000FFF773FDC1E6E188044B1729188828BFC7 +:105D50001721FFF776FD61E7F89900203E840020C7 +:105D60002C9A0020408400203F9A0020B8990020FF +:105D7000D09900203A9A0020F4990020EC99002054 +:105D800030B5464A464800231370464A95B0137012 +:105D900000F048FB01F0F6FD0446002868D14248B7 +:105DA000FEF720FC002866D1404B01221A70112317 +:105DB0003F488DF8043005F083FC3D4982B201A8CC +:105DC000FFF72DFD08B101F079FD0822002104A89C +:105DD000FEF7E2FA0823ADF810301823ADF81230C0 +:105DE0000023ADF8143004A84FF4C873ADF8163092 +:105DF000FFF713FD08B101F061FD00210C2201A89D +:105E0000FEF7CAFA0823ADF804302A4B02932A4859 +:105E10002A4B039301A900F02FFD08B101F04EFDBC +:105E2000274D4022002104A8FEF7B6FA284605F0C7 +:105E300047FCADF810002846059505F041FC079594 +:105E4000204DADF81800284605F03AFC1123ADF8B6 +:105E5000300004A8ADF84C300D9500F0DBFF1A4B74 +:105E600030221A7007225A7010229A70FFF768FDCC +:105E7000204615B030BD04A8FFF7BFFC08B101F003 +:105E80001DFD9DF8113004A801338DF81130FFF786 +:105E9000B2FC00288BD001F011FD88E73F9A00206A +:105EA000A9580F00399A0020B8990020F4990020D1 +:105EB00086BB0F001D5F0F00F899002083580F006C +:105EC0008DBB0F0098BB0F003A9A002010B50F4B06 +:105ED00001221A700E4B18884FF6FF73984207D0B4 +:105EE0001321FFF796FC08B101F0E8FC002010BD7B +:105EF000084C2378002BF9D0074B1878FFF787FC64 +:105F000008B101F0DBFC00232370EFE73F9A00208B +:105F10003E8400202C9A00203C840020F0B50B78B1 +:105F200089B005460C46092B35D8DFE813F02D0063 +:105F3000360041000A001900260007011001440044 +:105F4000150100F089FB0421FFF781FC0246284679 +:105F500000F018FEF8B109B0BDE8F04001F0AEBCA9 +:105F6000FFF7B4FF08B101F0A9FC00F095FB90B178 +:105F700009B0BDE8F04000F09DBBFFF7A7FF002887 +:105F8000F6D001F09BFCF3E7764B01221A704B68C8 +:105F90001A78754B1A7009B0F0BD724B02261E704C +:105FA0004B681B78012BF6D100F008FB3146CBE79C +:105FB0006C4B0322EEE70520FEF7BAFE694B1E7814 +:105FC000022E37D0032E59D0012EE4D104AB10227B +:105FD00018460021FEF7E0F9634A237A12788DF81B +:105FE0001020002203920C2B4FF00302CDE9012078 +:105FF00008D03146284600F0C5FD0028CBD001F07E +:106000005DFCC8E763681846FFF7F3FB0590181DB1 +:10601000FFF7EFFB069003F10800FFF7EAFB07909C +:1060200001A800F005FA0028B5D03146FFF70FFCB3 +:106030000246DFE7237A13F0030011D0C0F1040217 +:106040001A44D2B219464FF0000C0E46013167686F +:10605000C9B2914207F806C0F7D11B1A0433237264 +:106060000123049363680693237A04A89B0805938D +:1060700000F0C6FA00288ED00221D7E7207A8307E5 +:1060800002D03246314662E7384E0190314601F087 +:106090008FFC014618B12846FFF7F5FB7BE76168E6 +:1060A000019A306805F062F9019801F0E7FC0146B9 +:1060B0000028F0D101A9304601F0F0FC014600288B +:1060C000E9D104230493019B9B08059304A833683A +:1060D000069300F007FA074640B9254A237A11686B +:1060E0000B441360234B32681A6054E709281BD114 +:1060F0001F4B217A1A68114419601F4B1B78002B23 +:106100003FF449AF1D4C2388013B9BB22380002BF9 +:106110007FF441AF284600F0FBFC08B101F0CEFB54 +:10612000174B1B88238036E7306801F06BFC014673 +:1061300010B12846FFF7A7FB3946ACE70E4B01220A +:106140001A700F4A8B8813800C4A138023E70A4A7F +:10615000002313700A4AF8E7054B196800F09CFC0D +:10616000F8E600BF399A0020409A00204C9A00209F +:10617000309A0020489A0020389A0020369A002051 +:10618000349A002018DF7047012973B514460D4674 +:106190001A4608D0032912D014B3204602B0BDE835 +:1061A000704001F08BBB0F4B1B78052BF4D10E4BCD +:1061B0001B68002BF0D0214604209847ECE7094EDD +:1061C0003378022BE8D1094B01925B689847064B64 +:1061D00035701B68002BDFD0019A21462846ECE77A +:1061E00002B070BD589A0020509A00205C9A00209E +:1061F00030B589B003AC142200212046FEF7CCF85C +:10620000094B1B88ADF80E30084BDB680693002560 +:10621000079B8DF80C50009394E80F00FFF758F897 +:10622000284609B030BD00BF689A0020B49A00200B +:1062300000B589B003238DF80C300A4B1B88ADF8EC +:106240000E30094B5A6804929A68DB680693079BE4 +:106250000093059203AB0FCBFFF73AF8002009B08B +:106260005DF804FB689A0020B49A002000B589B05C +:1062700001238DF80C300F4B0F4A1B88ADF80E3000 +:106280004FF440535968914208BF9A680B4B5968C4 +:10629000049118BF4FF480529968DB68069305910A +:1062A000009203AB0FCBFFF713F8002009B05DF8A5 +:1062B00004FB00BF689A0020DBE5B151B49A0020CE +:1062C00000B589B003AB142200211846FEF764F82C +:1062D00004228DF80C20002200920FC8FEF7F8FF70 +:1062E00009B05DF804FB0000194BF7B5194C1C60B0 +:1062F000194B02221A70FEF75DFA184B48B1196863 +:10630000204600F001FF00B303B0BDE8F04001F00B +:10631000D5BA1D68124F013D2D0B013504464FF4CF +:1063200040567368BB420CBFB0684FF4805000EB1E +:1063300004300134FEF7DAFDA542F2D80023054807 +:1063400000931A460321FFF71FFF03B0F0BD00BF03 +:10635000CC9A0020C49A0020589A00206C9A002001 +:10636000DBE5B15170B50C4686B00321CDE90210D2 +:106370000546960802A8019304940596FFF702FFCC +:10638000E0B1B4F5805F019B11D8012302A8CDE9EB +:106390000235CDE90446FFF7F5FE78B9032302A8DC +:1063A000CDE90235CDE90446FFF7ECFE06E01A46DA +:1063B000E11AE81AFFF7D6FF0028E6D006B070BD54 +:1063C0001FB5114B0193114B114900241C70114B47 +:1063D00001A81C80CDE9024400F074FE0E4B10B100 +:1063E0001C7004B010BD4FF440520C4954688C42EC +:1063F00007490CBF92684FF480524A60084A002156 +:10640000116001221A70ECE789610F00B09A002038 +:10641000C49A0020689A0020589A0020DBE5B15108 +:10642000549A0020014B1860704700BF509A00201A +:1064300038B54368214C0FCB84E80F002278500711 +:1064400001D5910733D16068830730D1A3689D07D8 +:106450002DD1E16811F0030429D1184408441849EA +:10646000B3F5204F086024D84FF4405315495D68B8 +:106470008D420ABF9B684FF46923C3F56A23984293 +:1064800017D8114B1149196011495960D10709D525 +:10649000104A9A60104B1B78012B0CD1FFF724FF98 +:1064A000204638BD92074CBF0C4A0D4AF1E706243E +:1064B000F6E70C24F4E70824F2E700BFB49A0020C2 +:1064C0006C9A0020DBE5B1515C9A0020E9620F0074 +:1064D000C1620F006D620F00589A002031620F00F8 +:1064E000F1610F002DE9F04385B0002853D0816899 +:1064F00011F0030451D12C4B1B78052B4FD12B4E9F +:1065000042683368DFF8AC9003EB82039500D9F85A +:106510000020934207D94FF0FF3333600C2420460C +:1065200005B0BDE8F0830391FEF744F9DFF88880F9 +:10653000039940B13368D8F800002A4600F0D4FD32 +:10654000D8B10446EBE74FF44053194A586837680E +:10655000904208BF9868039118BF4FF48050002301 +:106560002A463844FEF7C4F80399D8F8000000958D +:106570000B4600220121FFF707FE33681D44D9F8BE +:10658000003035609D420CD1FEF714F90028C6D1C9 +:10659000FEF790F8C3E70E24C1E71024BFE70824F4 +:1065A000BDE70924BBE700BF589A0020549A002099 +:1065B000DBE5B1516C9A0020CC9A002070B50B4BF2 +:1065C0001D6885B90A4E3378042B0CD1094C0A4B4F +:1065D00021781A780948FEF725F810B90523337099 +:1065E00070BD2570FCE70820FAE700BF549A002030 +:1065F000589A0020B09A0020B49A0020709A002087 +:10660000F8B5114B1A78032A03D0042A03D00824C2 +:1066100016E004221A700D4B1C68002CF7D10C4DAB +:1066200043682F789E0007EB8303402B0AD88168CC +:1066300008483246384404F099FE2B7833442B70D6 +:106640002046F8BD0924FBE7589A0020549A002000 +:10665000B09A0020709A002010B50B4C2378052BBF +:1066600010D10A4B0A4A1B68116899420AD10623C5 +:106670002370084B1B685868FEF70EF808B907230B +:10668000237010BD0820FCE7589A00206C9A002067 +:10669000549A0020CC9A0020044B1B78072B02D17F +:1066A000034B9B6818470820704700BF589A00208A +:1066B0005C9A002000B589B006238DF80C30079B4A +:1066C000009303AB0FCBFEF703FE09B05DF804FBAC +:1066D000F0B58DB005A8FEF76DFF089C002C3ED0EC +:1066E0000B9E04F58053B3422DD91E4BA6F5805561 +:1066F00003EA55054FF440539B689C420BD8690050 +:106700002B46A4EB450201F5805106EB4500FFF74F +:1067100029FE0DB0F0BD05F58053012701A8CDE994 +:106720000173CDE90337FFF72DFD0028F1D14FF4B8 +:10673000805301A8CDE9023301970497FFF722FDAA +:106740000028E6D1DBE70123CDE90136A4084FF4A8 +:10675000805301A803930494FFF714FDD9E7204662 +:10676000D7E700BF00F0FFFF00B58DB005A8FEF72A +:1067700021FF099880B1089B8BB94FF440530B4A15 +:10678000596891420ED19B6880080022039001A8AD +:10679000CDE90123FFF7F6FC0DB05DF804FB0B9A81 +:1067A0001344F1E74FF48053EEE700BFDBE5B1514E +:1067B00000B58DB005A8FEF7FDFE099898B1089BBD +:1067C000A3B94FF440530C4A5968914211D19B68C8 +:1067D0000393800803214FF47422049001A8CDE9AB +:1067E0000112FFF7CFFC0DB05DF804FB0B9A1344C8 +:1067F000EEE74FF48053EBE7DBE5B15110B58CB019 +:1068000005A8FEF7D7FE0898B8B10B9C00F5805399 +:10681000A34214D94FF440539B6898421BD80F4BA6 +:10682000A4F5805203EA52035900A0EB430201F59C +:10683000805104EB4300FFF795FD0CB010BD8008BC +:1068400003224FF48053049001A8CDE9012303945F +:10685000FFF798FCF1E70E20EFE700BF00F0FFFF25 +:10686000A8DF7047AADF7047ADDF7047AEDF704723 +:10687000B0DF704762DF70472DE9F0470E4694B0F5 +:106880000546002800F00181002900F0FE804B68D9 +:10689000002B00F0FA804FF6FF7303800023ADF861 +:1068A0000A307B4B04AA03F1100C1746186859688C +:1068B000144603C4083363452246F7D141F23053EE +:1068C0000DF10A013846ADF80830FFF7D3FF044652 +:1068D000002840F0D6802A1D02A90120FFF7C0FF42 +:1068E0000446002840F0CD809DF80A30AB71014687 +:1068F0001C220DA8FDF750FD9DF834300E9443F096 +:1069000004038DF8343001AFAB798DF80E30214699 +:1069100041F2325303223846CDE91044CDE9124406 +:10692000ADF80C30FDF738FD9DF806308DF80440C9 +:1069300023F01F0343F00303214614224FF0110AF2 +:1069400008A88DF806308DF805A00DF10C08FDF7AC +:1069500023FD4FF01409A8880A9405F1080308AA3A +:106960000DA90C94CDE90887ADF82C90FFF77AFFBC +:106970000446002840F0858001461C220DA8FDF742 +:106980000BFD9DF834300E9423F0180343F01803E8 +:106990008DF83430AB798DF80E30214641F2315309 +:1069A00003223846CDE91044CDE91244ADF80C304D +:1069B000FDF7F2FC9DF806308DF8044023F01F032C +:1069C00043F0130321464A4608A88DF806308DF897 +:1069D00005A0FDF7E1FC1723ADF82C30A8880A9438 +:1069E00005F1100308AA0DA90C94CDE90887FFF75B +:1069F00039FF0446002844D101461C220DA8FDF7AA +:106A0000CBFC9DF834300E9443F002038DF8343003 +:106A1000AB798DF80E30214641F2345303223846CB +:106A2000CDE91044CDE91244ADF80C30FDF7B4FCCB +:106A30009DF806308DF8054023F01F0343F0030353 +:106A400021464A4608A88DF806308DF804A0FDF7C7 +:106A5000A3FC02230A93ADF82C30A8880C9605F10C +:106A6000200308AA0DA9CDE90887FFF7FBFE04461D +:106A700038B97368AB62B36803B1EB62054B0122AE +:106A80001A70204614B0BDE8F0870E24F9E700BF65 +:106A9000B9BB0F00D09A002070B5054686B070B320 +:106AA00002884FF6FF739A422BD0174B1B7843B3E3 +:106AB000164C1022080AE170207121FA02F0090E2A +:106AC000072301266071A17102A800216370ADF84F +:106AD00006302270A670FDF75FFC2B8AADF80830F7 +:106AE0000023ADF80C3028888DF80A600DF10603FC +:106AF00002A9CDE90434FFF7B9FE06B070BD0E203F +:106B0000FBE70820F9E700BFD09A0020D19A0020C7 +:106B100030B5044687B060B302884FF6FF739A42DF +:106B200029D0164B1B7833B3154D11232B700B0A4C +:106B30006970AB700B0C090EEB70297105230021F5 +:106B4000102202A8ADF80630FDF726FC238AADF826 +:106B5000083001238DF80A300023ADF80C3020886E +:106B60000DF1060302A9CDE90435FFF77FFE07B05A +:106B700030BD0E20FBE70820F9E700BFD09A0020C7 +:106B8000D19A002030B5044687B038B300884FF65C +:106B9000FF73984224D0134B1B780BB3124D102374 +:106BA00069700321ADF80610AA7000211A4602A8E8 +:106BB0002B70FDF7F1FB238AADF8083001238DF827 +:106BC0000A300023ADF80C3020880DF1060302A92D +:106BD000CDE90435FFF74AFE07B030BD0E20FBE7D4 +:106BE0000820F9E7D09A0020D19A002070B50D4610 +:106BF00088B0044650B149B1826A3AB10B88502B33 +:106C000049D005D8102B43D0112B54D008B070BDFB +:106C1000512BFBD18E79022EF8D10A89038A9A4230 +:106C2000F4D18B7B043B022BF0D99DF816308DF804 +:106C3000106043F001038DF816300B8AADF8183060 +:106C40004B8AADF81A30082201F1140301A8002183 +:106C50000793FDF7A1FBA18A2088019601AACDF830 +:106C600008D0FFF701FE48B3E36A03B1984740F24A +:106C7000FD132088ADF8143004A9FFF7F9FD0028B2 +:106C8000C4D0E36A002BC1D008B0BDE870401847FB +:106C90008B882380BAE7C98803899942B6D1082333 +:106CA0008DF81030123535F8023C8DF81830059506 +:106CB00004A99047AAE74FF6FF73EAE7BDF8003052 +:106CC0002088DB07D3D5002604A9ADF81460FFF7B0 +:106CD000CFFD0028D5D1297D4B1E072B3ED8DFE8FC +:106CE00003F004192226282A3B2C6B8A8DF80460B5 +:106CF000012B05D8062201212046FFF743FFBEE7FE +:106D0000012315358DF80C300295A36A01A92046A0 +:106D100098477BE76A8A01239A428DF80430F0D8BD +:106D200006220221E8E702238DF80430EDE7032371 +:106D3000FAE70423F8E70523F6E76B8A022B02D86B +:106D400003220821D8E7B5F81530ADF80830002B3C +:106D50000CBF07230623E7E70923E5E70322CBE778 +:106D6000A8DF7047AADF70472DE9F04180468EB05A +:106D700015461F460E4611B9084600F09FFD15B98D +:106D8000284600F09BFD1C220DEB02000021FDF7C0 +:106D900003FB9DF81C30ADF80480002443F002038F +:106DA0008DF81C3021460123032268468DF80630F9 +:106DB000CDE90A44CDE90C440894FDF7EDFA3B789F +:106DC0008DF800307B788DF801309DF8023023F08B +:106DD0001F0343F002032146142202A88DF802305B +:106DE000FDF7DAFA0A48CDF80CD001AB029302AAFB +:106DF000149B0088ADF8105007A9ADF81240ADF80B +:106E000014500696FFF7AEFF0EB0BDE8F08100BF4C +:106E1000F89A002030B587B041F60A032B4AADF846 +:106E20000C30044603A901208DF80E00FFF798FFEF +:106E30000546D8B92288E2B922894AB1244B009389 +:106E4000E16804F13C0342F62420FFF78DFFD8B936 +:106E5000228C4AB11F4B0093616A04F13C0342F655 +:106E60002620FFF781FF78B9A36B7BB9284607B0CE +:106E700030BD194B0093616804F13C0342F62920B0 +:106E8000FFF772FF0028D7D00546EFE71A788DF894 +:106E900010205A888DF81120120A8DF812209A8835 +:106EA000DB888DF815301B0A8DF813208DF816300D +:106EB000120A0A4B8DF814200093072204F13C03B8 +:106EC00004A942F65020FFF74FFFDDE7F89A0020B3 +:106ED000E89A0020D89A0020E09A0020F09A00203A +:106EE00029DF704728DF7047064B182202FB00306D +:106EF00000230422C0E90423037183608361C3601B +:106F0000704700BF0C9B002023B502460846C968A5 +:106F100043680093044B53F82150436910F80C1B4D +:106F2000A84702B020BD00BFFC9A002038B5194C1C +:106F30002378182202FB03431A795869012A03D0E7 +:106F4000032A1AD00F2038BD134A996915689A6828 +:106F5000DB68A2EB0532B2F5805F184401EB053126 +:106F600000EB053034BF92084FF48062FFF7B8FFA2 +:106F70000028E8D10123A370E5E74FF080531B6997 +:106F80009BB2B0FBF3F0044B1B681844FFF7AAFF59 +:106F9000EEE700BF0C9B0020049C002070B5134D51 +:106FA0006C780A2C1FD02E783444E4B2092C84BFAC +:106FB0000A3CE4B2182606FB0454A261207103C9FE +:106FC000A360049BE360AB7804F1100282E8030045 +:106FD00023B100206B7801336B7070BDFFF7A6FF03 +:106FE0001128F7D1F5E70420F7E700BF0C9B00203C +:106FF00070B5234CA3782BB100260228A67002D0CE +:10700000032833D070BD25781E4A182101FB0541A5 +:10701000136889680133B1EB033F136014D86378B8 +:107020001660013B63706B1CDBB21821092B01FB5E +:10703000054188BFA5F10903002004312370FFF743 +:1070400063FF2846FFF750FF6378002BDAD0A37860 +:10705000002BD7D1FFF76AFF0028D3D01128D1D059 +:107060002178182303FB0141043105E0217818231E +:1070700003FB014104310D20BDE87040FFF744BF20 +:107080000C9B0020049C002008B50A4B00211960CD +:10709000094B1980997008460131FFF725FF0A292D +:1070A000F9D1064B00201860054BC3E90000C3E985 +:1070B000020008BD049C00200C9B0020009C0020C6 +:1070C000FC9A0020064A03461068042807D008608E +:1070D000411C11601A68034B43F8202000207047C0 +:1070E000009C0020FC9A002013B5CC180C43A40788 +:1070F00008D1009313460A4601460120FFF74EFFD0 +:1071000002B010BD1020FBE707B500220B4600922D +:1071100001460320FFF742FF03B05DF804FB0000C7 +:10712000094B5A7899780132D2B2914208BF0022B5 +:10713000197891421FBF02705878182202FB003064 +:1071400014BF043000207047089C0020082910B5A7 +:10715000044602D0002000F0B1FBD4E90030BDE8C5 +:107160001040184773B5054600240DF107000E4680 +:107170008DF8074000F0B0FB0DF10600FFF7D0FFDF +:1071800090B10670094B9DF8062045605A709DF835 +:10719000070000F0C5FB24B9054B4FF48012C3F87B +:1071A0000021204602B070BD0424F0E7089C0020B6 +:1071B00000E100E0204B21491A682F2300BF00BFE7 +:1071C00000BF00BF00BF00BF00BF00BF8A422FD07A +:1071D00000BF00BF00BF00BF00BF00BF00BF00BFB7 +:1071E00000BF00BF00BF00BF00BF00BF00BF00BFA7 +:1071F00000BF00BF00BF00BF00BF00BF00BF00BF97 +:1072000000BF00BF00BF00BF00BF00BF00BF00BF86 +:1072100000BF00BF00BF00BF00BF00BF00BF00BF76 +:1072200000BF00BF00BF00BF00BF00BF00BF00BF66 +:10723000013BC3D1704700BF388400200024F40014 +:107240000C4B0D484FF4003210B5C3F880200124D8 +:107250004FF48033C0F84833C0F808334460FFF778 +:10726000A9FF064B846000201860FFF7A3FF044BC2 +:10727000187010BD00E100E000100140249D0020C6 +:10728000159D00202DE9F3412549264B0025C1F825 +:107290004051C1F84451C1F84851C1F84C51C1F8AE +:1072A0000051C1F804511B68002B34D0D1F80445BB +:1072B0001D49DFF888800968641A24F07F442F464E +:1072C0001968A14212D81A7CDE69641A0D4462B1B1 +:1072D0005A691F7400929B690193424608216846CF +:1072E00000F056FA08B100F0E9FABEB90F4A104BA7 +:1072F00011781B788B4205D10133DBB2022B08BF1A +:107300000023137012780B4B43F822500A4B4FF4B2 +:107310008012C3F8002102B0BDE8F0813346CFE708 +:1073200000100140289D0020249D0020219D002068 +:10733000209D0020189D002000E100E04D710F000D +:107340002DE9F74FA84AA94913780978A84C994222 +:107350003BD00133DBB2022B08BF00231370A549D9 +:107360001278A54B0F6853F822003B1823F07F4397 +:1073700000220B60236815461646944613B942B1A5 +:10738000236006E0196881420DD902B12360091A11 +:10739000196001262368DFF8689200930027BDB9C1 +:1073A000DFF868A268E0401A0E44D968D3F81CE000 +:1073B000C3F800C031B1BA1922F07F42C3E90121FC +:1073C000DD611D4673460122D8E700252E46E1E720 +:1073D0002846ED69874BD0F804C01B68DFF830E21F +:1073E0008168ACEB030222F07F42724500F2AD806F +:1073F0000A4402600122027422680023C0E90133BA +:10740000C361002A40F0AB802060C8E75A1C9AF89C +:107410000210D4F800B0D2B291428AF8002004BF22 +:1074200000228AF80020182202FB03A31A79986828 +:10743000022A77D0032A00F08580012A1CD190F817 +:1074400010C0BCF1000F17D1D96841601A69826081 +:107450005A69C2609B698361684B1B78002B18BF17 +:1074600061464160B6E7904200F09E809046D26946 +:10747000002AF8D1002303749AF800309AF801200A +:107480009A42C3D1236827B9009A9A4201D1002EAB +:1074900042D0002B00F08580D3F80090584C554B1B +:1074A000D4F804651868574F351A3B7825F07F45A6 +:1074B00003359BB94FF48033C4F84433C4F8043324 +:1074C000514B4FF400324FF00108C3F880211A608D +:1074D000C4F80080FFF76EFE87F80080A9452CBF36 +:1074E0004844401920F07F40C4F84005D4F80435E2 +:1074F0009B1B23F07F43801B033320F07F4083429C +:107500000AD9D4F80435C4F84035FFF753FE3E4B92 +:107510004FF40032C3F80021384B00221A7003B038 +:10752000BDE8F08F5A46D846A2E78BF81020DBF86A +:107530001CB00123BBF1000FF7D1002B9CD0C4F885 +:1075400000B099E700231A46F4E7A3EB0C0323F0FD +:107550007F438B4234BFCB1A002303604AE70168A4 +:10756000136899421BD85B1A1360C2614CE7A1EB08 +:107570000C01D3F81CC01A46BCF1000F0AD06346B8 +:10758000D3F800C08C45F2D3ACEB010CC3F800C0BB +:107590009C4613460160C0F81CC0D861FFE6134644 +:1075A000EEE7FFF74DFEB7E7404510D1DBF81C30A2 +:1075B000236063B9DFF83CE001920121C9F80810AB +:1075C000CEF800300D4B1970FFF7F4FD019A1368E7 +:1075D000D269C8F81C2012B111680B4413602368EB +:1075E0005B4518BF012745E7209D0020219D002015 +:1075F000289D0020249D0020189D0020149D00201F +:1076000000100140159D002000E100E0089C0020D2 +:10761000FEFF7F0008B5FFF713FE104B00200B2282 +:1076200018809A700E4B18600E4B18700E4B187025 +:107630000E4B4FF48012E021C3F8802183F814131D +:107640001A6002F18042A2F56F22C2F8080583F8A1 +:107650001113074BD2F804251A6008BD089C0020BE +:10766000289D0020209D0020219D002000E100E0B9 +:10767000249D0020074B9B784BB132B128B10368A1 +:10768000187C20B959745A61704707207047082048 +:10769000704700BF089C00202DE9F743DFF8848085 +:1076A00098F8023005460E461746ABB3A0B304293E +:1076B00030D9436983B3437C0024012B0DF10700CB +:1076C0000CBF8946A1468DF8074000F005F90DF181 +:1076D0000600FFF725FDD8B1012303700F4B45606D +:1076E000D3F80435C0E90497C0E902369DF80630A6 +:1076F00088F801309DF8070000F012F924B9084B12 +:107700004FF48012C3F80021204603B0BDE8F08397 +:107710000424EFE70724F7E70824F5E70010014009 +:1077200000E100E0089C0020064A92783AB130B1AE +:10773000426922B1002202740221FFF713BD082022 +:10774000704700BF089C00204B1C30B5DB0004468E +:1077500012F003009BB20DD1074D2A601A44074B6B +:107760001A60074B1870074B1870074B1C80074BAB +:10777000198030BD0720FCE7349D0020309D00209B +:107780002C9D00203C9D0020389D00203A9D00202B +:107790002DE9F347DFF8C080B8F800308B42064689 +:1077A0000D4617464CD300240DF107008DF8074015 +:1077B00000F092F8244B254A25481B78008892F85F +:1077C00000C084455FFA8CF138BF4C1CDBB238BF77 +:1077D000E4B2A3422ED014781178CBB2884286BF8F +:1077E0000133DBB2002313709DF8070000F098F816 +:1077F0004FF6FF739C4225D0DFF86090D9F8002047 +:107800004FEAC40A42F8347002EBC403AEB1A5B12A +:10781000104BB8F800001B682A4604FB00303146C4 +:1078200003F0A4FDD9F80030534400209D8002B03D +:10783000BDE8F0874FF6FF74D6E700209880F6E7A2 +:107840000920F4E70420F2E73C9D00202C9D002055 +:107850003A9D0020309D0020389D0020349D00205E +:1078600070B5104C104D22782B789A4200D170BD23 +:107870000E480F4A2378126806880E4802EBC301AF +:10788000006852F83320898803FB060090470A49B4 +:1078900022780988D3B2914286BF0133DBB200233C +:1078A0002370E0E73C9D00202C9D0020389D0020A7 +:1078B000349D0020309D00203A9D00201FB50021FE +:1078C000CDE9021001AA44F20100ADF80410FCF762 +:1078D00066FF05B05DF804FB70B5EFF3108672B675 +:1078E0000C4A946801239CB993600B4B0B4DD3F861 +:1078F000801029401160C3F88050D3F88410516083 +:107900004FF0FF32C3F88420047006B962B670BD30 +:107910000370FAE7409D002000E100E0FC06FFBD97 +:1079200010B5084B9A685AB150B9EFF3108172B68E +:10793000054A1C6814605C685460986001B962B6BE +:1079400010BD00BF409D002000E100E003462AB1C9 +:1079500010881A4619448A4203D170474FF6FF70C7 +:10796000F7E712F8013B40BA80B25840C0F3031366 +:10797000584080EA0033580100F4FF509BB2584051 +:10798000E9E70000064B074A00201870064B1A6012 +:107990000822C3E90120C3E90300C3E905007047D9 +:1079A0004C9D0020509D002030B0002000207047EA +:1079B00030B5F9B1124B5C6800220A60E4B1B0F551 +:1079C000167F1BD8D868013C01305C60D8601C6809 +:1079D00018694FF4177505FB00440C60012101FA8A +:1079E00000F49969013000F00700214318619961A2 +:1079F000104630BD0E20FCE70420FAE70C20F8E723 +:107A000030B00020F0B51C498A689AB34D690E6801 +:107A1000AC1A04F0070423464FF4177707FB036CF6 +:107A2000604511D1012000FA03F58869684088613A +:107A300000204E68D1F818C04FF0010E73440025A5 +:107A4000164403F007030AE0013303F007039D42E5 +:107A5000E4D11020EDE74AB1013A1C4601250EFAA7 +:107A600004F414EA0C0FA6EB0207F4D00DB1C1E93F +:107A70000172F0BD0420FCE730B00020064A136913 +:107A80001268013B4FF4177103F0070301FB032356 +:107A9000C3F858020020704730B0002030B5C0B1A4 +:107AA000B9B10E4BDA68B2B1013ADA609A681C6873 +:107AB00001329A605A694FF4177505FB024404605D +:107AC0000132D4F85802086002F007025A6100201F +:107AD00030BD0E20FCE70420FAE700BF30B00020E4 +:107AE0003FB40C49086890B10B4B1C687CB10B4A41 +:107AF0001568CDE9025000238DF804300B60136047 +:107B000004AB13E90700234604B030BC184704B0A7 +:107B100030BC704754B0002058B0002064B0002042 +:107B2000DC2810B509D0DD2810D0C02816D1FFF709 +:107B3000D7FF0E4B0E4A1A6010BD0E4A0E4B196845 +:107B40001368581C1060C022CA54F2E7094A0A4B55 +:107B500019681368581C1060DB22F5E7064B054ACC +:107B6000196813685C1CC8541460E2E74484002060 +:107B7000917B0F0054B0002064B00020C02802BFE9 +:107B8000014B024A1A60704744840020917B0F0029 +:107B9000C02810B409D0DB280BD0094B094A19685A +:107BA00013685C1CC854146006E05DF8044BFFF7D2 +:107BB00097BF054B054A1A605DF8044B704700BF3C +:107BC00064B0002054B0002044840020217B0F00CA +:107BD00007B501228DF807000DF10701002002F022 +:107BE00085FD00280CBF0420002003B05DF804FBD5 +:107BF00010B5064A064C12682368D05CFFF7E8FF10 +:107C000010B923680133236010BD00BF68B00020A5 +:107C10005CB0002008B5C020FFF7DAFF28B9034B9D +:107C20001B6813B9024B034A1A6008BD5CB0002000 +:107C300048840020F17B0F0008B5DB20FFF7C8FF68 +:107C400010B9024B024A1A6008BD00BF48840020E8 +:107C5000557C0F0010B50C4A0C4C12682368D35C9D +:107C6000C02B03D0DB2B0DD0042010BDDC20FFF790 +:107C7000AFFF0028F9D12368054A01332360054B83 +:107C80001A60F2E7DD20F2E768B000205CB0002067 +:107C9000F17B0F00488400207FB5184C184D194E19 +:107CA000002002F0C3FC30B322689AB1296833681F +:107CB00099420FD2012201A9002002F0C3FC10B9A1 +:107CC0004FF0FF3001E09DF804000F4BC0B21B687D +:107CD0009847E5E70D4B1B686BB10292084A0221F9 +:107CE000126803928DF8041004AA12E9070004B088 +:107CF000BDE87040184704B070BD00BF64B00020FC +:107D000054B0002050B000204484002058B000201F +:107D1000014B18600020704758B00020034B1A78C0 +:107D20000AB901221A700020704700BF4CB0002031 +:107D3000014B0020187070474CB000202DE9F04F27 +:107D400085B0002851D02A4F3B78012B07D0022B59 +:107D500014BF08240424204605B0BDE8F08F254D4B +:107D6000DFF8A090244E254CDFF89C80DFF89CA023 +:107D7000DFF89CB0C9F8001000232B6002233060AC +:107D80003B70C4F800802A68D9F800309A4215D3B5 +:107D9000C4F80080FFF73EFF044608BB184B1B6881 +:107DA00001223A70E3B18DF80420326802922A6809 +:107DB000039204AA12E907009847CCE733682A68BF +:107DC0009A5CC02A03D02A689B5CDB2B04D1236811 +:107DD000534508BFC4F800B023689847042801D170 +:107DE0000024B8E71128CED1FAE71024B3E700BF8A +:107DF0004CB000205CB0002068B000204884002017 +:107E000058B0002060B00020157C0F00F17B0F00FF +:107E1000397C0F00054B064A1860064B1960064B6B +:107E200000201860054B1A60704700BF64B0002046 +:107E30007D7B0F0050B0002054B00020448400200F +:107E4000064B07481B68DB00DBB2002203705B4275 +:107E500042708270C3700421FFF770BF94B000209D +:107E60006CB0002070B52B4C2B4D02462378012BB3 +:107E700014D0022B21D0002B4BD1002A49D1274806 +:107E8000FFF752FC08B1FFF719FD254B1B68002BCB +:107E90003FD0244ABDE8704010781847012A38D1F5 +:107EA0002968214B06311868FFF748FF08B1FFF732 +:107EB00005FD022323700022D8E7022A16D0032AE8 +:107EC0000CD032BB194B15481A6041F67F21FFF7E1 +:107ED000E3FBF0B1BDE87040FFF7F0BC144A136853 +:107EE000013303F0070313600023E3E70F4A13682D +:107EF000052B0AD001331360074B19680A4BBDE804 +:107F0000704018680631FFF719BF064B01221A703E +:107F1000EAE770BDB8B00020ACB0002070B000201F +:107F2000A8B00020B0B00020C0B00020B4B0002045 +:107F300098B00020F0B585B004AB03E907009DF8C8 +:107F40000400032874D8DFE800F00802A3A601208B +:107F500005B0BDE8F040FFF785BF039E544C032EEB +:107F600040F28280029D6B7813F00F0265D00E2ADA +:107F70007AD1042E55D02A78500652D5110650D504 +:107F80001A44AB781A44EB781A4412F0FF0248D135 +:107F9000B71E39462846FFF7D9FCEB5B834240D138 +:107FA00044492A780B6802F00702D8B282422BD1EA +:107FB000013303F007030B60FFF742FF3E4B012242 +:107FC00030461A70FFF75AFD08B1FFF777FC3849C1 +:107FD0004FF41670FFF7ECFC002862D0042802D0A2 +:107FE0000020FFF76BFC35480521FFF713FF08B1B0 +:107FF000FFF764FC324B1B68002B56D04FF000009B +:1080000005B0BDE8F040184720684FF41671FFF73F +:1080100001FF08B1FFF752FC05B0BDE8F040FFF7E3 +:108020000FBF20684FF41671FFF7F4FE00283CD014 +:1080300005B0BDE8F040FFF741BC2978AA780B44B1 +:108040001344EA78134413F0FF030DD11D4A12685C +:108050000132C1F3C20102F00702914204D11A4A6F +:1080600003201370FFF7FEFE25681DB14FF4167153 +:108070002846D9E70E494FF41670FFF799FC60B116 +:10808000042802D02846FFF719FC0C480521CBE74D +:108090000A480521C8E70320CAE720684FF4167193 +:1080A000C2E720684FF416719FE705B0F0BD00BF2E +:1080B000BCB0002094B0002090B000209CB0002004 +:1080C000A4B0002098B00020B0B000200220FFF73C +:1080D000C9BE0000074B10B5044618600648FFF7FC +:1080E00017FE08B1FFF7EAFB002C0CBF0E200020A2 +:1080F00010BD00BFA4B00020357F0F00184A1948FA +:10810000002310B51360184A1360184A1360184A08 +:108110001370184A1370184B184A01211960184B34 +:108120001960184B1970FFF7A5FA08B1032010BDAC +:10813000FFF728FC0028FAD1FFF7F0FD0028F6D160 +:10814000114C4FF416702146FFF732FC0028EDD198 +:1081500020684FF41671BDE81040FFF75BBE00BF0A +:10816000C0B00020CCBB0F00ACB00020B4B00020E9 +:1081700090B00020B8B0002094B00020CD800F0057 +:1081800098B00020B0B00020BCB000200C4A08B568 +:10819000002313600B4A1360FFF708FC08B1FFF7D8 +:1081A0008DFBFFF7C5FD08B1FFF788FB0648FFF719 +:1081B000BBFA042802D10020FFF780FB002008BD95 +:1081C000A8B00020A4B0002070B0002037B50D4644 +:1081D000044698B191B10A4B19780022019259B125 +:1081E00001A91A70FFF75AFC019B063B2B802368FC +:1081F0000433236003B030BD0420FBE70E20F9E711 +:1082000090B000200438FFF7FDBB18DF7047000076 +:10821000F0B51D46154B87B018680F4659681B7A94 +:1082200003AC03C42370124B18685968114B0093B8 +:1082300001AC03C42046164603F042FA214602462A +:10824000384603F093F801A803F03AFA01A9024670 +:10825000304603F08BF8684603F032FA694602466E +:10826000284603F083F807B0F0BD00BFD0BB0F0075 +:10827000D9BB0F00312E30000120704710B51C46CD +:108280000B781E2B0AD000232022052102F07AFC55 +:108290004FF6FF70A04228BF204610BD0020F9E72E +:1082A000F8B5069F14460D463A46002118461E466C +:1082B000FCF772F87CB14FF0E023D3F8F03DDB0718 +:1082C00000D500BE4FF0FF300AE0284600F0F8F974 +:1082D000013504F50074BC4206EB0401F5D32046D9 +:1082E000F8BD0000F8B50A4F0D461E460024069B57 +:1082F0009C4206EB040101D32046F8BD3A462846CD +:1083000000F0B4FA0028F7D0013504F50074EEE768 +:10831000C4B0002030B5264D2A7A8DB09AB107AC92 +:108320001422002120460625FCF736F88DF81C5053 +:108330000B9B009394E80F00FCF7CAFF0620FCF7A4 +:10834000F7FC0DB030BD2B68002BFAD0194B197813 +:1083500019B105201A70FCF7EBFCD5E900329A42FE +:10836000EFD307AC142200212046FCF715F86B7AF6 +:10837000DBB106234FF420424FF474214FF4602008 +:108380008DF81C3002F0C0FF0028D1D0102200214F +:1083900003A8FCF701F84FF460224FF4205303A820 +:1083A000CDE90423FFF731FFC2E78DF81C30BFE7AA +:1083B000C4B000204C840020024B0B604FF40073CB +:1083C0001380704709010100012070470048704781 +:1083D000FA840020044B054A1878054B002814BF86 +:1083E00010461846704700BFE0B20020AF8400205E +:1083F0004D8400202DE9FF411E4B187020B11E4B0B +:108400002A229A720022DA721C4A1D4DDFF878C0C7 +:1084100017461C4BEE4603F110067446186859685F +:10842000F046A8E803000833B342C646F6D12B78DD +:1084300003F00F0310336B4413F8103CD373114B4C +:1084400018685968A646AEE803000833B34274467C +:10845000F6D115F8013B04A901EB1313654513F898 +:10846000103C9373A2F10202D3D100233B7404B0F9 +:10847000BDE8F081E0B20020FA84002064B300205F +:1084800060000010E1BB0F006800001010B570B96B +:10849000134B14481968022202F068FF01230133CC +:1084A000DBB211485B0043F44073038010BD052824 +:1084B00014D80B4B53F82040204603F001F9C3B207 +:1084C0001F2B28BF1F23084A2046E118884202F1CB +:1084D0000202E4D010F8014B1480F7E70020E5E732 +:1084E0000C850020E4B20020E2B200204DDF70478E +:1084F0004EDF70474FDF704750DF704712DF704725 +:1085000000F0C8BE002000F033BD00001FB5244BB2 +:10851000402283F8272300238DF807304FF440537F +:1085200004465A681F4B9A4227D10DF10700FFF706 +:10853000E5FF9DF8073003B30120FFF7D9FF0120C5 +:10854000FFF7D4FF0120FFF7D5FF02A8FFF7D4FF04 +:10855000029BDA0702D5002000F09CFE029B9B07DD +:1085600002D5022000F096FE2046FFF743FF00F000 +:1085700027F802F059FE04B010BD002301A88DF8C1 +:108580000430FCF721FC084B039303A8FCF744FCE0 +:10859000FCF748FC4FF08043D3F838340293D7E718 +:1085A00000E100E0DBE5B15101850F00012000F0A2 +:1085B00071BE0120FCF7BCBB0220FCF7B9BB000078 +:1085C0007FB52F492F4802F0E7FF4FF440532E4A62 +:1085D000596891424CD11A78102A46D9142A186940 +:1085E00044D95B69294CB3FBF4F50A2201A904FBC9 +:1085F000153403F021F92649224802F0CDFF01A9E4 +:10860000204802F0C9FF23491E4802F0C5FF0A2294 +:1086100001A9284603F010F901A91A4802F0BCFF8D +:108620001D49184802F0B8FF4FF47A760A2201A9D2 +:10863000B4FBF6F5284603F0FFF801A9114802F053 +:10864000ABFF15490F4802F0A7FF0A2201A906FB5C +:10865000154003F0F1F801A90A4802F09DFF0F4907 +:10866000084802F099FF04B070BD00200023B9E76C +:108670000B49044804B0BDE8704002F08DBF00BF54 +:10868000FFBB0F0024850020DBE5B15140420F0005 +:108690000CBC0F000ABC0F000EBC0F0019BC0F0071 +:1086A00010BC0F0010B503461C1A944200DB10BD2D +:1086B0000C781CB1013103F8014BF5E72024FAE7EF +:1086C0002DE9F3410C4605464FF400720021204687 +:1086D000FBF762FE6DB95E493E22204602F046FE7F +:1086E000552384F8FE31AA2384F8FF3102B0BDE897 +:1086F000F081B5F5017F2DD8691EB1F5817F24BFCA +:108700006FF4817805EB0801C9B10B02C1EBC151CF +:1087100003F5807004EB412440F693651A1FB2F50F +:10872000696F03F1010206D2AB4214BF91B24FF65A +:10873000FF7124F8131090421346EFD1D6E7F823C7 +:10874000237004F109022346FF2003F8010F93422E +:10875000FBD1DAE7B5F5027F3BD86FF4017C6544C5 +:108760003DB920463B490B22FFF79CFF2823E372CB +:10877000203439492E014FF0000801EB05256FF038 +:108780001F07022EB2D80B2229462046FFF78AFF88 +:108790005923212269216374E3746376B31C84F83E +:1087A0000D80A773E1732274A27484F8148084F896 +:1087B0001580A775E17522766383E86830B102F011 +:1087C0007FFFE061013620341035DAE74FF4E9101D +:1087D000F7E7224B9D4289D86FF40277EA19012A04 +:1087E0000FD81D4B03EB0213D9680191084602F024 +:1087F00067FF01990246204602B0BDE8F04102F051 +:10880000B5BD6FF4FD76A9190902B1F5801FBFF45B +:108810006DAF134B236003F1144303F52C1303F6E0 +:10882000023363600F4BC4F8FC314FF46963A361FA +:108830004FF40053A5F20B254FF48072A3600A4B4E +:108840006561E1602261E36104F12000D4E700BFCB +:108850001CBC0F0047BC0F00D4BC0F000801010076 +:108860005546320A306FB10A29009A23F7B5654B95 +:1088700014460A689A420D4639D103F114434A68F6 +:1088800003F52C1303F602339A4230D1D1F8FC21C0 +:108890005D4B9A422BD18B6823F4FF5323F01E03C8 +:1088A0009B049B0CB3F5005F21D10B69B3F5807F6E +:1088B0001DD1C86810F0FF0619D1CB69534A934205 +:1088C00005D0534A934215D0524A93420FD1A0F596 +:1088D0008053B3F5692F07D201234FF4807205F15D +:1088E0002001FBF705FF22E0B0F5805F1FD34FF0BA +:1088F000FF3021E001276772CB68B3F1102F1DD143 +:1089000004223431684602F031FD042205F13801B9 +:108910000DEB020002F02AFD009BB3F5742F03D18A +:10892000019BB3F57E2F01D02772E0E7A772AB69F8 +:10893000002B37D14FF4007003B0F0BDA3F57422C3 +:10894000B2F5204F28D2E27A01F12007DAB9324A93 +:10895000934218D32B69B34215D90422B91968463A +:1089600002F004FD009BD02B14D10422311D0DEB2D +:108970000200394402F0FAFC264B019A9A424FF069 +:1089800001030DD1E372E8682A6901233946A0F595 +:10899000A030A6E70836DDE7B3F5805FC7D3012333 +:1089A0002372A4E72268934207D041F263018B420D +:1089B00000D80AB14FF0FF3323606B6941F26302C4 +:1089C0009342B7D803F0070204EBD303012191408F +:1089D0001A7B1142C8B204D16168024301311A7393 +:1089E0006160D4E900329A42A4D30120FBF762FE11 +:1089F000637A002B9ED0A37A002B9BD10123237294 +:108A000098E700BF5546320A306FB10A4028A5AD3D +:108A10003C8263D629009A2300D80F004FF0805380 +:108A2000D3F83001082802D1D3F8343123B9A0F1AA +:108A30000D0358425841704701207047094B0122ED +:108A400083F8D8200260BFF36F8FBFF34F8F064AC1 +:108A5000904202D0043A904202D1002283F8D820FA +:108A6000704700BF78B300205070024042DF70476B +:108A700043DF704744DF704712DF704710B5134B78 +:108A8000134A5B68C3F3080373B9EFF310835BB950 +:108A900010494B681B0607D58024C1F8844092F822 +:108AA000D8307BB14C60F8E792F8D83033B101464A +:108AB000BDE810400848012201F094B8BDE810401C +:108AC000FFF7BCBFFFF7BAFF4C6010BD00ED00E040 +:108AD00078B3002000E100E07D8A0F000D4B1822E2 +:108AE00002FB0033598A1A8A521A998A92B28A4230 +:108AF00028BF0A46D9681423434303F1804303F592 +:108B00001C33C3F80016C3F80426034B03EB8000A4 +:108B1000FFF7B4BF78B300200470024007B54FF4EC +:108B2000405300205A68084B9A420AD18DF807003A +:108B30000DF10700FFF7A0FF9DF80700003818BFF0 +:108B4000012003B05DF804FBDBE5B15107B5FFF789 +:108B5000E5FF58B1002301A80193FFF78BFF0198AF +:108B6000003818BF012003B05DF804FB4FF08043CC +:108B7000D3F80C0400F00110A0F101135842584141 +:108B8000F1E70000074BD3F8C024D10309D406490C +:108B90000648D1F8C010C3F8A017C3F8A427FFF700 +:108BA0006DBF70470070024078B3002048700240EB +:108BB0000828F0B402D1F0BCFFF7E4BF0F4D104A13 +:108BC000182141436E1800F59473695852F82340F8 +:108BD000F788B388DB1B9BB2A4B2A34228BF23460D +:108BE000142404FB0022C2F80017C2F80437054B16 +:108BF000F0BC03EB8000FFF741BF00BF78B300205B +:108C0000007002402870024070470000014B802233 +:108C10005A60704700E100E0024B8022C3F88420D4 +:108C2000704700BF00E100E0074BD3F80014D3F811 +:108C300000240A43C3F800240022C3F858214FF44B +:108C40008002C3F8042370470070024070B5887832 +:108C5000404D00F07F0318220C26C4095A4306FB3E +:108C600004228E882A44C6F30A061681CA7802F0C6 +:108C70000302012A29D00121374A01FA03F5D4B9A8 +:108C800003F10C06B140C2F80413D2F8141503F531 +:108C900094732943C2F8141542F823402E4BC3F8AD +:108CA000180540F48070C3F80C05BFF36F8FBFF355 +:108CB0004F8F012014E002339940C2F80413D2F818 +:108CC00010352B43C2F81035E8E7082B09D04FF0D8 +:108CD000E023D3F8F00D10F0010001D000BE002019 +:108CE00070BD1D4BDCB9B5F8D42012B18022C3F899 +:108CF0001C250022C3F85021D3F8002312F40012DF +:108D000008BFC3F85421144B4FF44012C3F8042396 +:108D1000D3F8142542F48072C3F81425BEE700226C +:108D2000C3F82C21B5F8C82012B18022C3F81C2545 +:108D3000094BD3F8002312F4001208BFC3F85421E2 +:108D4000064AC3F80423D3F8102542F48072C3F80E +:108D50001025A3E778B3002000700240000820002F +:108D60001D4B2DE9F041802201241C4DDFF8788055 +:108D7000C3F88420274604F10C03A21C07FA02F270 +:108D800007FA03F31343C5F80833A30003F1804344 +:108D900003F51C330026182202FB04805E60314676 +:108DA0009E620134FBF7F8FA082C4FF01802E2D16A +:108DB0000B4BC5F808330B48C5F81C6531466E628D +:108DC000AE64FBF7E9FA044BC5F814758022C5F8C8 +:108DD00010755A60BDE8F08100E100E000700240CB +:108DE0000008300038B4002078B30020F7B51F46E3 +:108DF00001F07F0018231F4CCD090E4643430C2180 +:108E000001FB053104EB010C62500022ACF8047048 +:108E1000ACF8062018B1F5B1FFF760FE18E017BBFB +:108E2000154BD3F88034C3F3C0139D421BD01348B5 +:108E3000FFF724FE124B5B68C3F30803003B18BF27 +:108E4000012300933A463B463146384600F0B5FED2 +:108E5000012003B0F0BD1C44A37A002BF8D0A5720A +:108E6000FFF7A6FEF4E7002DD6D10648FFF706FE71 +:108E7000EEE700BF78B3002000700240507002405F +:108E800000ED00E04C70024011F07F0008B507D102 +:108E90000D4B01225A65BFF36F8FBFF34F8F08BD93 +:108EA0000828F8D0084B41F48072C909C3F8182586 +:108EB000F1D1064B182202FB00339A7A002AEAD03D +:108EC0009972FFF775FEE6E70070024078B3002064 +:108ED00011F0770F12D00A4B41F48072C3F80C15D1 +:108EE000C3F80C25CA09C3F8181504BF01F594711D +:108EF00043F82120BFF36F8FBFF34F8F704700BF40 +:108F000000700240174B0122002110B5C3F8142550 +:108F1000C3F810250A468B0003F1804303F51C3388 +:108F2000013108295A609A62F5D10E4B0E4C5A62F3 +:108F30009A64C3F85821D3F80014D3F800240A43E4 +:108F4000C3F80024D3F80023C3F80823074AC3F862 +:108F500004230021DC222046FBF71EFA4023A382D3 +:108F6000238110BD0070024078B300200514C001B9 +:108F70002DE9F04FB24BB34AD3F80013002385B06C +:108F80001C4601201D4621FA03F6F6070BD552F8C0 +:108F9000236046B100FA03F6344342F82350BFF38E +:108FA0006F8FBFF34F8F0133192BECD1E20706D53A +:108FB000FFF7A8FF00210122084600F0D5FD14F4B8 +:108FC000006FA14D08D09E4BD3F8A8369BB2A5F8F0 +:108FD000D230012385F8D730A30221D5984ED6F898 +:108FE000143513F4807302D0FFF7CCFD0123D6F8BB +:108FF0001025D70540F1188195F8D7305BB1B5F849 +:10900000D2200023012185F8D73092B20091184672 +:10901000882100F0D2FD01220321002000F094FD00 +:10902000660228D5864BD3F8006406F4E062F005AA +:10903000C3F8002406D50122C3F82C250421002002 +:1090400000F082FD71050FD57D4B0122C3F8082584 +:109050009A65D3F8002312F4001208BFC3F8542114 +:109060004FF40012C3F80423B20504D501220521F0 +:10907000002000F069FD23022BD5714BD3F880143A +:10908000C9B28DF80810D3F88424D2B28DF8092023 +:10909000D3F888048DF80A00D3F88C048DF80B00FF +:1090A000D3F890048DF80C00D3F894048DF80D00DB +:1090B000D3F898048DF80E00D3F89C348DF80F3057 +:1090C0004F0601D1052A04D0012202A9002000F098 +:1090D0005EFD5E4B23405BB195F8D830002B40F02D +:1090E000AB804FF0E023D3F8F03DDE0700D500BEA3 +:1090F000DFF85481DFF84891DFF858B14746002681 +:109100004FF0140A06F10C0324FA03F3D807F1B266 +:1091100022D50AFB0693082ED3F808273B6853FA9A +:1091200082F33B604FF0180303FB0653D2B2D8889A +:1091300012FA80F080B2D88000F08E803889904298 +:1091400040F08A80DB88BA889BB29A4240F28480E1 +:1091500011B95846FFF792FC0136092E07F118079E +:10916000D0D13B4B2340002B5BD0354BD3F86C94D4 +:10917000C3F86C94BFF36F8FBFF34F8F14F4806408 +:1091800007D0D3F88044D3F880341906C4F3C01450 +:1091900070D54FF0000A2C4F00264FF0180B29FA1B +:1091A00006F3DA07F0B201D4CEB9C4B1244B1422CD +:1091B00002FB0633FA68D3F8083652FA83F2FA60F3 +:1091C0000BFB0652518A89B251FA83F39BB2538248 +:1091D000538A398A9BB299424FD9FFF77FFC0136F7 +:1091E000082E07F11807DAD100241826012704F108 +:1091F000100329FA03F3DB07E0B203D464B9BAF130 +:10920000000F09D006FB0452B8F80410D3889BB2B3 +:1092100099423DD9FFF7CCFC0134082C08F118081D +:10922000E5D105B0BDE8F08F002B7FF4F4AE4FF42C +:109230000013C6F80833EEE6002385F8D83057E768 +:10924000007002400071024078B30020FCFB1F0058 +:10925000000400014C700240182303FB0653DA8817 +:10926000BA80DA8801230093002392B2184600F0F6 +:10927000A4FC71E74FF0010A8DE7528A01230093A5 +:10928000002340F0800192B2184600F096FCA6E759 +:109290009772C1E7012813B5044600F0C380022885 +:1092A00059D0002855D1784BD3F80025002A50D149 +:1092B0004FF48002C3F808234FF40062C3F800247F +:1092C000BFF36F8FBFF34F8FFFF7A8FB60B16F4BFA +:1092D000D3F8001C032269BB49F27531C3F8001CA6 +:1092E000C3F8142DC3F8001C4FF08053D3F830316D +:1092F000082B0CD1654BD3F8001CC022E9B949F208 +:109300007531C3F8001CC3F8142CC3F8001C5E4B65 +:109310000124C3F80045BFF36F8FBFF34F8FFFF7F2 +:1093200015FCB0B9FFF7FAFB50B102B0BDE8104030 +:10933000FFF79CBBC3F8142DD6E7C3F8142CE6E75F +:109340004FF08043C3F80001D3F800210192019A45 +:109350001C6002B010BD4C4CD4F804351BB1FFF7B3 +:10936000F5FB0028F5D1D4F800341B05FBD54FF4EC +:109370000063C4F80034BFF36F8FBFF34F8F4FF01B +:109380008053D3F83031082B0CD1404BD3F8001C5C +:1093900000293FD149F27532C3F8002CC3F8141CE0 +:1093A000C3F8002CFFF73AFB58B1384BD3F8001C38 +:1093B000A1BB49F27532C3F8002CC3F8141DC3F8E1 +:1093C000002C4FF08053D3F83031082B2E4B0AD1AC +:1093D00040F2E372C3F800284022C3F80428BFF328 +:1093E0006F8FBFF34F8F80220121C3F81C25C3F874 +:1093F0000413274BC3F884215A60FFF7A7FB00280A +:10940000FBD0214B0122C3F80425BFF36F8FBFF3BC +:109410004F8F9EE70022C3F8142CC3E70022C3F845 +:10942000142DCEE7184BD3F80025002A91D0002246 +:10943000C3F80425BFF36F8FBFF34F8F144980200B +:10944000C1F88400D3F80013C3F80813C3F800254B +:10945000BFF36F8FBFF34F8FFFF760FB78B1FFF75C +:1094600007FB0C4B5A68C2F30802003A18BF0122EE +:109470000221002002B0BDE8104000F065BB4FF0B3 +:1094800080435C60EDE700BF0070024000E00640F2 +:1094900000E100E000ED00E00A44034690B288429B +:1094A00002D39A89824202D25A89104480B270470C +:1094B00082888A4210B504D884898B1A9BB29C4258 +:1094C00003D243891A44891A8BB2038210BD9308D0 +:1094D00013B501EB8303044699420BD112F003024A +:1094E00006D0002301A8019301F040FF019B2360F7 +:1094F00002B010BD51F8040B2060EDE72DE9F043F8 +:1095000085B01446BDF83050AB4238BF4289A3EB5A +:1095100005091FFA89F938BFA9EB0209828838BF0B +:109520001FFA89F94A4588460746194605D2FFF7CA +:10953000BFFF058AB0F80490ADB2B9F1000F1FD09B +:10954000A14528BFA146BC88AC421DD9FA889DF828 +:1095500034003968661BA9EB04042C44B3B214FB35 +:1095600002F416FB02F60128B6B2A4B202FB051102 +:1095700016D099450BD802FB09F2404601F0F6FEE1 +:10958000484605B0BDE8F0832D1BADB2DCE732469E +:10959000404601F0EBFE3968224608EB0600EDE795 +:1095A000994506D819FB02F292B24046FFF78FFFA9 +:1095B000E6E726F00305ADB22A4640460191FFF7E3 +:1095C00086FF16F0030628D001990D44C6F1040168 +:1095D00089B2A1424FF0000328BF2146641A0393C9 +:1095E00003ABA4B2A8191A4685420CD13B68013ED0 +:1095F000164419448B420BD1039BC8F80030002C51 +:10960000BED02246D1E715F801CB03F801CBEBE73A +:1096100013F8012B06F8012FECE73968EFE713B5D3 +:10962000930800EB8303984209D112F0030204D09F +:109630000B68019301A901F099FE02B010BD0C68FE +:1096400040F8044BEFE770B59A42A2EB03041D46C5 +:1096500038BF4389A4B238BFE41A838838BFA4B2A4 +:10966000A3420E46114602D2FFF722FF848874B14E +:109670008288AA4208D9C2880168304602FB0511D7 +:1096800001F074FE012070BDAD1AADB2F1E72046C5 +:10969000F9E72DE9F0430746B0F80E908588048A73 +:1096A0001646C288007A85B01FFA89F9A4B288BB31 +:1096B000A145A9EB040038BF7C8980B23CBF001BE8 +:1096C00080B2281A80B2864228BF06464C46AC4279 +:1096D00028D2A5EB0408751B386825441FFA88FCBE +:1096E00015FB02F518FB02F8012B1FFA88F8ADB242 +:1096F00002FB040022D0664517D8724301F036FE03 +:10970000324649463846FFF7C7FEF881304605B075 +:10971000BDE8F083AE4221BF761B02FB0611A146D5 +:109720002E46D3E7641BA4B2D1E74246009101F074 +:109730001DFE009938682A464144DFE7664505D892 +:1097400016FB02F292B2FFF76AFFD9E728F0030492 +:10975000A4B22246CDE90001FFF761FF18F003082B +:10976000019929D0C8F104039BB2AB4200980A6862 +:10977000039228BF2B46013CED1A0DF10C0C20443E +:10978000ADB244466246013C1CF801EB00F801EF23 +:1097900014F0FF04F7D13868904408EB0304421E2C +:1097A000A04504D11844002DAAD02A46CBE718F8CA +:1097B00001CB02F801CFF3E73868F4E7B2F5004FC8 +:1097C00010D882805200C38092B29DF8003003729C +:1097D000531E838152420023C38101604281038270 +:1097E0000120704700207047C189028A89B292B275 +:1097F0009142A1EB020338BF428980889BB23CBFF3 +:109800009B1A9BB2984228BF18467047C289038AA8 +:1098100092B29BB2D31A58425841704710B5C189D1 +:10982000028A848889B292B2914238BF4089A1EB02 +:1098300002039BB23CBF1B1A9BB2E01A80B210BD60 +:1098400038B5C289038A04469BB292B2FFF7FBFE89 +:10985000218A054682B289B22046FFF71DFE20828A +:10986000284638BD73B5C389058A0026ADB20446C3 +:10987000CDE900569BB2FFF741FE218A054602461C +:1098800089B22046FFF708FE2082284602B070BD4C +:1098900038B5C589028AADB292B2AA42A5EB0203DD +:1098A00088BF42899BB288BF9B1A828888BF9BB2BF +:1098B0009A42044614D1007A90B938BD9B1A9BB2E3 +:1098C0009342FBD2E288206802FB030001F04EFDC8 +:1098D000012229462046FFF7DFFDE0810120ECE769 +:1098E0002B46EDE712B10023FFF7D3BE10467047B9 +:1098F0000023C381038283885B009BB25A1E5B42B4 +:10990000828143810120704701720120704700006D +:109910000B4B63B10B4B1B78834206D90A4B1B6878 +:1099200000EB400003EBC0007047C01AC0B2012832 +:1099300003D8064B00EB4000F4E70020704700BF5F +:109940000000000058B4002054B4002004BD0F00F3 +:1099500070B5104E054600242046FFF7D9FF436836 +:109960002846984733780134E4B20133A342F3DA4E +:10997000372200210848FAF70FFD1022FF2107487F +:10998000FAF70AFDBDE8704005481222FF21FAF7F8 +:1099900003BD00BF58B4002059B400205CB40020BF +:1099A0006CB4002037B50C460546C868019200F03B +:1099B000A5FDE368019A0021284603B0BDE83040C8 +:1099C000184773B5054614463AB90378012B04D1FC +:1099D00010460191FFF720F90199281DFFF758FF64 +:1099E00006462CB92B78012B02D12046FFF70EF941 +:1099F00036B94FF0E023D3F8F03DDB0700D500BEC9 +:109A000002B070BD024B5878003818BF0120704773 +:109A100059B40020024B1878C0F38000704700BF93 +:109A200059B40020014B1878704700BF90B4002053 +:109A3000F8B5164E3178054629BB154C1548372226 +:109A4000FAF7AAFC201DFFF753FF134B1C60134BC2 +:109A500023B11348AFF30080124B1860104F00245D +:109A60002046FFF755FF036898473B780134E4B27E +:109A70000133A342F4DA2846FFF7C6F82846FFF779 +:109A8000C5F8012333700120F8BD00BF90B4002059 +:109A9000A486002059B4002094B4002000000000E7 +:109AA00058B4002054B400201FB54378023B0A4646 +:109AB000032B12D8DFE803F0022A1921204B197872 +:109AC0006FF300011970197800246FF341011970C8 +:109AD0005C70197864F3820119701A4B014618689A +:109AE00004B0BDE81040FFF76CBF154B1978C907EB +:109AF00023D5197841F00401EEE711490B78DC0712 +:109B00001BD50B786FF382030B70E6E70C490B78DB +:109B10005B0712D50B786FF382030B700023CDE93E +:109B20000133039303788DF8043005238DF8053055 +:109B3000044B01A91868FFF744FF04B010BD00BF33 +:109B400059B4002094B400201FB50023CDE901339F +:109B50008DF804008DF8051001A811460393FFF756 +:109B6000A3FF05B05DF804FB1FB50023CDE9013369 +:109B700003938DF8040001238DF8081001A8114605 +:109B80008DF80530FFF790FF05B05DF804FB1FB5B9 +:109B9000144600230822CDE9013303938DF8040015 +:109BA00006230DEB02008DF8053001F0DFFB2146A6 +:109BB00001A8FFF779FF04B010BD1FB50024CDE95F +:109BC00001448DF8040007208DF805008DF8081079 +:109BD00001A89DF8181003928DF80930FFF764FF73 +:109BE00004B010BD1FB54FF40063CDE901300391FF +:109BF00001A81146FFF758FF05B05DF804FB00000F +:109C000038B58B7803F07F03082B05460C4608D93E +:109C10004FF0E023D3F8F03DDB0700D500BE002075 +:109C200038BD064B2046997801F00DFB0028EFD097 +:109C300021462846BDE83840FFF708B859B400204F +:109C40002DE9F047DDE9085681460C4690469A46D4 +:109C50000027B84501DC01200EE06378052B04D114 +:109C6000E37803F0030353450AD04FF0E023D3F821 +:109C7000F03DDA0702D40020BDE8F08700BEFAE725 +:109C800021464846FFF7BCFF38B94FF0E023D3F830 +:109C9000F03DDB07EFD500BEEEE7A378DA0914BF8D +:109CA00033702B70237801371C44D2E70B4B01F043 +:109CB0007F0203EB420303EBD1112031487910F00E +:109CC000010008D14B795B0706D44B7943F00403BC +:109CD0004B71012070470020704700BF59B400202D +:109CE0000B4B01F07F0203EB420303EBD111203158 +:109CF0004B7913F0010209D14B79C3F380005B0764 +:109D000005D54B7962F382034B7170470020704791 +:109D100059B4002070B5164D01F07F0605EB4605DD +:109D200005EBD11420346579ED0709D54FF0E02318 +:109D3000D3F8F03DDA0701D4002070BD00BEFBE788 +:109D4000657945F001056571FFF750F80028F4D1F9 +:109D5000637960F300036371637960F38203637175 +:109D60004FF0E023D3F8F03DDB07E5D500BEE4E794 +:109D700059B40020054B01F07F0203EB420303EBD3 +:109D8000D11191F8250000F00100704759B400206E +:109D900010B50B4B01F07F0203EB420303EBD11430 +:109DA000203463799B0709D4FFF76EF8637943F099 +:109DB00002036371637943F00103637110BD00BF57 +:109DC00059B4002010B50B4B01F07F0203EB4203A6 +:109DD00003EBD114203463799B0709D5FFF778F89A +:109DE00063796FF34103637163796FF30003637108 +:109DF00010BD00BF59B40020054B01F07F0203EBFA +:109E0000420303EBD11191F82500C0F340007047E5 +:109E100059B400202DE9F04F87B001F012FA002864 +:109E200000F09182AF4B1D682B78012B02D10020EE +:109E3000FEF7F2FE03A9281DFFF702FD2B78012B88 +:109E4000044602D10020FEF7E1FE002C00F07B82E8 +:109E50009DF80D30013B072B00F2B382DFE813F0D1 +:109E600008001300A8027E028D021F004A02AA0207 +:109E70009DF80C00FFF76CFD00F038FB9A4B9DF845 +:109E800010209A70CEE79DF80C00FFF761FD00F0FE +:109E90002DFB964B002BC5D0FEF78EFBC2E7924CF4 +:109EA0009DF80C50237843F00103237094F825307B +:109EB0006FF3000384F8253094F825306FF38203A4 +:109EC00084F8253094F826306FF3000384F82630A8 +:109ED00094F826306FF3820384F82630002000F0D7 +:109EE0000DFB9DF8106006F06002602A11D14FF062 +:109EF000E023D3F8F03DDC0700D500BE9DF80C0050 +:109F00000021FEF7C1FF9DF80C008021FEF7BCFF89 +:109F100088E7402A0DD176480028EFD000F0EEFA0D +:109F200004AA00212846AFF3008000287FF47AAF0E +:109F3000E4E706F01F06012E00F07181022E00F00A +:109F40009881002ED3D1202A0FD19DF814300F2BE9 +:109F5000D4D82344D878FFF7DBFC01460028CDD0C5 +:109F600004AA2846FFF71EFDDFE7002ABFD19DF8AF +:109F70001130092BBBD801A252F823F009A20F001F +:109F8000F7A10F00EF9E0F00E3A10F00EF9E0F005F +:109F9000A59F0F0021A10F00EF9E0F00BF9F0F0094 +:109FA000D59F0F0004A800F0AFFA9DF812102846C4 +:109FB000FEF73AFE237843F00203237032E763781A +:109FC0008DF80A3001230DF10A0204A9284600F099 +:109FD00059FA27E79DF812906378994537D063784E +:109FE0003BB12846FEF7BCFEA6782846FFF7B0FC3A +:109FF000A670B9F1000F2AD009F1FF30C0B2FEF708 +:10A00000E9F910B14378022B08D04FF0E023D3F8E0 +:10A01000F03DDF077FF56BAF00BE68E7C379C3F3A0 +:10A020008012C3F340131B0143EA4213227822F04B +:10A030003002134323704388C31800F109060093CC +:10A04000009BB3420AD82B4B0BB1FEF7B2FA84F84F +:10A05000019004A9284600F003FAE3E673780B2B7D +:10A0600003BF337896F80380F6184FF00108737831 +:10A07000042BCAD1009B9A1B93B201934FF0000BA3 +:10A080001D4B1B785FFA8BF70133BB42BDDB3846B3 +:10A09000FFF73EFC31468368019A8246284698477E +:10A0A0000828024639D9019B834236D3B8F1010F03 +:10A0B00006D1DAF8083011498B4208BF4FF0020888 +:10A0C0000021CBB298451DD83B4631460C48019241 +:10A0D00001F0E9F8084B019A1B7801339F421644BE +:10A0E000AEDD92E794B4002059B40020B9850F008A +:10A0F00000000000B3850F0058B40020A9A70F008E +:10A100006CB40020B078034454FA83F30131D8785A +:10A11000FF287FF47AAFDF70D3E70BF1010BAFE7D5 +:10A12000BDF81200030A5A1EC0B20E2A3FF6E6AE70 +:10A1300001A151F822F000BF75A10F009FA10F00EF +:10A14000C1A10F00FD9E0F00FD9E0F00D5A10F00C5 +:10A150009FA10F00FD9E0F00FD9E0F00FD9E0F00B2 +:10A16000FD9E0F00FD9E0F00FD9E0F00FD9E0F0047 +:10A1700087A10F00FEF72AF91223024604A92846F8 +:10A1800000F080F9D1E6934B002B3FF4B7AEAFF36C +:10A190000080024600283FF4AAAE4388EEE7022B77 +:10A1A00007D1FEF717F900283FF4A1AE4388024615 +:10A1B000E4E7894B002B3FF4A1AEAFF30080F2E758 +:10A1C000BDF81410FEF762F9024600283FF496AE7F +:10A1D0000378D3E7814B002B3FF490AEAFF30080C0 +:10A1E000F2E7BDF81230012B7FF488AE237843F0FC +:10A1F000080323702DE7BDF81230012B7FF47EAEEB +:10A2000023786FF3C303F4E72378C3F340129B086A +:10A2100003F002031343ADF80A300223D3E69DF89E +:10A2200014300F2B3FF66AAE2344D878FFF770FB4B +:10A23000014600283FF462AE04AA2846FFF7B2FBAD +:10A2400000287FF4EFAD9DF8103013F060047FF428 +:10A2500055AE9DF811300A3B012B3FF64FAE00F092 +:10A260004DF99DF811300A2B7FF4F3AE8DF80A40BA +:10A27000A8E69DF8141001F07F03082B3FF637AED7 +:10A2800004EB430303EBD113D87CFFF741FB0746F4 +:10A290002AB100283FF432AE04AA014661E69DF8D7 +:10A2A000113003F0FD02012A08D0002B7FF41FAE0D +:10A2B0002846FFF7A1FDADF80A00AEE7BDF8122071 +:10A2C00022B9012B284612D1FFF77CFD002F3FF465 +:10A2D000A9AD04AA39462846FFF764FB002000F028 +:10A2E0000DF994F82630DE073FF59CADB1E6FFF797 +:10A2F0004FFDEBE79DF81010394B01F07F0403EBA5 +:10A30000440303EBD11393F825006FF3000083F8A7 +:10A31000250093F825006FF3820083F825003CB9EF +:10A32000059B9DF811209DF80C0000F0FBF879E5E5 +:10A33000D87CFFF7EDFA48B94FF0E023D3F8F03DB1 +:10A34000D80700D500BE07B0BDE8F08F0469059BB3 +:10A350009DF811209DF80C00A04763E5204B1A786A +:10A36000D1077FF55FAD1F4A002A3FF45BAD187837 +:10A37000C0F3C000AFF3008054E5194B1B78DA0737 +:10A380007FF550AD184B002B3FF44CADAFF3008080 +:10A3900048E5FFF7BDFA436913B19DF80C009847F3 +:10A3A0000134124B1B78E0B201338342F1DA39E514 +:10A3B0000024F6E7049B002B3FF434AD0598984742 +:10A3C00030E54FF0E023D3F8F03DDB077FF52AAD11 +:10A3D00000BE27E5000000000000000000000000B3 +:10A3E00059B40020000000000000000058B4002014 +:10A3F00037B514490446CA89888991F90050831AEF +:10A400009BB2402B28BF4023002D10DA904214D07D +:10A410001A4689680C48019300F0A8FF0A4A019B7C +:10A420008021204603B0BDE83040FFF773BC904266 +:10A430004FF0000103D10022F3E78021FBE7024A3D +:10A44000EFE700BF58B500206CB5002011F0800F79 +:10A450004FF000031A460CBF80211946FFF75ABC83 +:10A4600030B4074C05460B4608684968224603C2CB +:10A470000022C4E902222846197830BCFFF7E6BF63 +:10A4800058B50020F8B5184E0C46054608684968CE +:10A49000B260374603C70021F181E1888B4228BFB3 +:10A4A0000B46B381E18889B153B14AB94FF0E0233B +:10A4B000D3F8F03DDA0701D40020F8BD00BEFBE779 +:10A4C0002846FFF795FF30B10120F6E721782846AE +:10A4D000FFF7BCFFF7E74FF0E023D3F8F03DDB07D1 +:10A4E000EAD500BEE9E700BF58B5002002481422B3 +:10A4F0000021F9F751BF00BF58B50020014B18618A +:10A50000704700BF58B5002010B50246044C0068E3 +:10A510005168234603C30023C4E9023310BD00BFC2 +:10A5200058B5002070B52D4C1E462378C909B1EBF3 +:10A53000D31F054618D04EB14FF0E023D3F8F03DBD +:10A54000DA0701D4002070BD00BEFBE7244B13B135 +:10A550002146AFF3008023690BB90120F3E71F4ABE +:10A56000022128469847F8E794F90030002B06DBD3 +:10A57000A0680028E6D01B49324600F0F7FEA2682A +:10A58000E38932443344A260E2889BB29A42E38179 +:10A5900001D03F2E1ED823696BB921782846FFF7DA +:10A5A00055FF0028D9D14FF0E023D3F8F03DDB0769 +:10A5B000C8D500BEC7E70121084A2846984701468A +:10A5C0000028EAD12846FEF75FFC80212846FEF7E6 +:10A5D0005BFCC2E72846FFF70BFFE2E758B5002017 +:10A5E000000000006CB5002070B500F110050446B5 +:10A5F0002846FFF713F93F2817D9E1780020FFF725 +:10A6000055FB90B12846FFF709F93F28E17807D9B3 +:10A6100004F638024023BDE870400020FFF77ABB03 +:10A62000BDE870400020FFF75BBB70BD08B5044B70 +:10A6300040F6B80202FB00301030FFF7D5F808BD35 +:10A64000ACB5002070B540F6B804074E444304F1A1 +:10A65000100092B23044FFF705F905463019FFF7B4 +:10A66000C3FF284670BD00BFACB500202DE9F04106 +:10A670000446FFF7C7F910B90020BDE8F081FFF7E5 +:10A68000C9F906460028F7D140F6B801164D4C43EB +:10A6900004F12408A8444046FFF7A6F80028EBD0B0 +:10A6A0002F193046B978FFF701FB0028E4D004F6F3 +:10A6B00078042544294640224046FFF7D3F8B9786C +:10A6C000044668B103462A463046FFF723FB48B9E3 +:10A6D0004FF0E023D3F8F03DDB07CDD500BECCE74B +:10A6E000FFF7FEFA2046C8E7ACB5002070B50B4C6A +:10A6F00040F6B80303FB0044243492B205462046DA +:10A70000FFF7F0F806462046FFF76EF83F2802D91B +:10A710002846FFF7ABFF304670BD00BFACB5002048 +:10A7200037B5144C40F6B80200212046F9F734FE44 +:10A73000FF234FF4424201256371E2800023082287 +:10A7400063812273009304F138012B464FF4806239 +:10A7500004F110002581FFF731F800952B464FF4E6 +:10A76000806204F5876104F12400FFF727F803B045 +:10A7700030BD00BFACB5002010B50A4C0021052249 +:10A780002046F9F709FE04F110002434FFF7B0F871 +:10A790002046FFF7ADF820460121BDE81040FFF745 +:10A7A000B3B800BFACB50020F7B54B79022B064615 +:10A7B00003D00025284603B0F0BD8B79022BF8D1D9 +:10A7C000204FBB787BBB8B783B700C7809250C4401 +:10A7D00003E023781D44ADB21C446378242B1BD1C5 +:10A7E0009542F6D96378042B12D163790A2B0FD1E5 +:10A7F000154B277801930133009302231A46E11980 +:10A800003046FFF71DFA70B10E3517FA85F5ADB277 +:10A810000C48FFF7E9FECDE7052BE3D12146304692 +:10A82000FFF7EEF938B94FF0E023D3F8F03DDB073E +:10A83000BFD500BEBDE7A3787B7023781D44ADB2C1 +:10A840001C44CFE7ACB50020AEB5002070B50B4678 +:10A850001146127802F06002202A45D1234E8A88E0 +:10A860003478944240D14A78203A032A3CD8DFE831 +:10A8700002F00213162F2BB91D4A0723FFF702FE21 +:10A88000012070BD022BFBD11A4B002BF8D01849C8 +:10A890000020AFF30080F3E7002BF1D1ECE713B910 +:10A8A000FFF7DEFDECE7022BEAD14C881248347149 +:10A8B00004F0010585F00101FFF726F80F4B002B8E +:10A8C000DED0C4F3400229460020AFF30080D7E772 +:10A8D000002BE5D0022BD3D1094B002BD0D04988D7 +:10A8E0000020AFF30080CBE70020CAE7ACB5002022 +:10A8F000B2B5002000000000D0B50020000000002C +:10A90000000000002DE9F347374D1C46EB788B42E1 +:10A9100007460E4607D0AB788B4258D1AB78B3428E +:10A9200032D001245CE0A2B205F6380105F1100036 +:10A93000FEF7D8FF2D4B2BB92D4BEBB92A48FFF76B +:10A9400053FEEBE76B79FF2BF6D005F638094FF095 +:10A95000000805F1100AA045EED019F8013B6A790C +:10A960009A4206D15046FEF751FF10B96979AFF30C +:10A97000008008F10108EEE71E48FEF747FF0028B7 +:10A98000DCD1FDF789F9D9E71B4B13B10020AFF3F8 +:10A9900000800020FFF76AFE0028C2D11748FEF7AA +:10A9A00023FF0028BDD1002CBBD014F03F03B8D149 +:10A9B000A97801933846FFF779F9019B04460028EE +:10A9C000AFD0A9781A463846FFF7A4F908E04FF04F +:10A9D000E023D3F8F04D14F0010401D000BE0024B0 +:10A9E000204602B0BDE8F087ACB5002000000000B2 +:10A9F000997C0F00BCB5002000000000D0B50020FD +:10AA000030B4104B02249A6B83F82C10996883F8A9 +:10AA1000304093F83C408A1A9A6224B942F2050504 +:10AA20009D8783F83E4051B14AB11A7BD20930BCB0 +:10AA300014BF93F82E1093F82F10FFF7A9B930BC6C +:10AA4000704700BF64CE002038B5154B154C054645 +:10AA500073B1607BAFF3008050B942F2077384F8A2 +:10AA60003E00A38728460121BDE83840FFF7C8BF54 +:10AA7000A26BA36894F82F109B1AB3F5805F28BFD0 +:10AA80004FF48053084A9BB22846FFF743F930B988 +:10AA90004FF0E023D3F8F03DDB0700D500BE38BD12 +:10AAA0000000000064CE002064BE002073B5234C7B +:10AAB000E28AA36852BA92B2054612B1B3FBF2F22F +:10AAC00092B2A06BD4F81110B0FBF2F61B1AB3F5DA +:10AAD000805F28BF4FF4805309BA009302FB16022F +:10AAE000174B607B3144FDF7DBFB031E0CDA43F2AE +:10AAF0000333A38701210023284684F83E3002B0A7 +:10AB0000BDE87040FFF77CBF94F82E1006D100938B +:10AB10001A462846FFF751F802B070BD084A9BB2AA +:10AB20002846FFF7F7F80028F6D14FF0E023D3F8D6 +:10AB3000F03DDB07F0D500BEEEE700BF64CE00209D +:10AB400064BE0020C28A836852BA92B223B9002A36 +:10AB50000CBF002002207047C17B282904D1017B53 +:10AB6000C90906D1022070472A2902D1017BC909EF +:10AB7000F8D122B1934234BF022000207047012057 +:10AB800070470000044880F83C1080F83D2080F8B1 +:10AB90003E300120704700BF64CE002002484022B2 +:10ABA0000021F9F7F9BB00BF64CE00200248402223 +:10ABB0000021F9F7F1BB00BF64CE002073B54B79DB +:10ABC000082B054602D0002002B070BD8B79062B01 +:10ABD000F9D1CB79502BF6D1162A07D84FF0E023C4 +:10ABE000D3F8F03DD907EED500BEECE7164C8B78D4 +:10ABF00084F82D3004F12E030E78019304F12F0315 +:10AC0000009302231A463144FFF71AF838B94FF07F +:10AC1000E023D3F8F03DDA07D5D500BED4E7002312 +:10AC200084F8303094F82F101F2322462846FFF76F +:10AC300071F830B94FF0E023D3F8F03DDB0700D5D1 +:10AC400000BE1720C0E700BF64CE00207FB50646D7 +:10AC50001546A1B9137803F07F02022A48D16C7817 +:10AC6000012C45D16A88002A42D1AB883C4D95F829 +:10AC70003020042ADBB204D11946FFF789F80120FD +:10AC80001AE095F82E10994218D1022AF7D1AA6B32 +:10AC9000AB689B1AAB62032385F8303005F12002C4 +:10ACA0000D23FFF737F80028E9D14FF0E023D3F860 +:10ACB000F03DDB0752D500BE04B070BD95F82F10F3 +:10ACC0009942DCD1002ADAD10191FFF753F80199BA +:10ACD0000028D4D13046FFF78FF80028CFD10023C9 +:10ACE00085F830301E4A95F82F101F233046D8E7DC +:10ACF00003F06003202B31D16B78FE2B13D0FF2B98 +:10AD00002CD16B8853BBE9888AB23ABB144B3046CE +:10AD100099872946C3E90D2283F8302083F83E2025 +:10AD2000FFF79EFBABE76B88C3B9EB88012B15D10E +:10AD30008DF80F300B4B1BB1AFF300808DF80F0077 +:10AD40009DF80F3053B1013B8DF80F300DF10F021C +:10AD5000012329463046FFF795FB90E70020ABE73B +:10AD600064CE0020000000002DE9F041AB4C94F8C7 +:10AD70003070012F90B005461E4600F0A181032FD0 +:10AD800000F00D82002F41D194F82F308B4201D07A +:10AD9000012013E01F2E03D12268A14B9A4210D04C +:10ADA00094F82E100423284684F83030FEF7F0FF84 +:10ADB00094F82F102846FEF7EBFF002010B0BDE8F6 +:10ADC000F081984B23626368E67BD4F8088084F8AE +:10ADD0002C70C4E90937012384F8303006F0FD03F4 +:10ADE000282BC4E90D872BD12046FFF7ABFE014687 +:10ADF00018B12846FFF704FE08E0B8F1000F56D05E +:10AE0000282E40F0A8812846FFF750FE94F83030F5 +:10AE1000022BBDD194F82E102846FEF7EDFF002836 +:10AE2000B6D1A368A26B94F82E10934240F2E08151 +:10AE3000207BC00900F0DC812846FEF7A9FFA7E7C8 +:10AE4000B8F1000F17D0237BDB0914D1B8F5805F70 +:10AE500001D90121CDE7744A1FFA88F32846FEF78D +:10AE600059FF0028D2D14FF0E023D3F8F03DDA07A4 +:10AE7000A3D500BEA2E7252E677B08D8192E1AD8C5 +:10AE8000032E00F0F780122E00F09F8096B394F806 +:10AE90003C30002BDDD1A38E634A6449607BFDF713 +:10AEA000EDF9031ED5DB60D1A368002BD1D10223BD +:10AEB00084F83030AAE71A3E0B2EE8D801A353F8E5 +:10AEC00026F000BF35B00F0015AF0F008FAE0F009A +:10AED0008FAE0F008FAE0F008FAE0F008FAE0F0042 +:10AEE0008FAE0F008FAE0F0085AF0F008FAE0F003B +:10AEF0002FAF0F003846FDF7BFF90028D4D194F8E2 +:10AF00003C30002BC3D140F20243A387002384F8D6 +:10AF10003E30BCE7464B002BC6D0E17C3846C1F33F +:10AF2000400301F001020909FDF74EFAE5E70DF1D2 +:10AF3000160206A93846FDF73FFA069B13B1BDF885 +:10AF400016203AB994F83C30002BA0D140F20242CE +:10AF5000A287DCE712BA013B1BBA0892324807937A +:10AF6000082207A900F002FA0823A06800283FF48D +:10AF700070AF834228BF034663632B4A94F82E10B8 +:10AF80009BB26BE70023CDE90733099308238DF8C3 +:10AF90001F300DF11602022306A938468DF8243021 +:10AFA000FDF70AFA069A002ACCD0BDF81630002B1D +:10AFB000C8D012BA5BBA08921B48ADF826300C22F2 +:10AFC00007A900F0D3F90C23CFE72422002107A81A +:10AFD000F9F7E2F980238DF81D30082202232021A1 +:10AFE00009A88DF81E308DF81F30F9F7D5F9102219 +:10AFF00020210BA8F9F7D0F9042220210FA8F9F796 +:10B00000CBF90FAB0BAA09A93846FDF701F90648A1 +:10B01000242207A900F0AAF92423A6E764CE002081 +:10B02000555342435553425364BE002073CE002013 +:10B03000C9830F0003238DF81C3000238DF81D30C9 +:10B040008DF81E308DF81F30704B8BB13846AFF342 +:10B0500000809DF81E3080F0010060F3C7130422C9 +:10B060006B488DF81E3007A900F080F904237CE7B7 +:10B070000120EEE71222002107A8F9F78DF9F0234D +:10B0800094F83C208DF81C300A238DF823304FF0C3 +:10B09000000362F303038DF81E3094F83D308DF801 +:10B0A00028305B4894F83E308DF82930122207A9E9 +:10B0B00000F05CF90023A38784F83E30122354E7A4 +:10B0C000E37BA06B282B06D1636B30449842A063CE +:10B0D000BFF4EDAE97E62A2B41D1E28A52BA92B282 +:10B0E0001AB1A368B3FBF2F292B2D4F81110484F30 +:10B0F000B0FBF2FC09BA02FB1C020096607B3B46E7 +:10B100006144FDF7EFF8002809DAA36B3344A36329 +:10B1100043F20333A387002384F83E3099E6864246 +:10B1200012D9321A40B1A36B03920344391838463E +:10B13000A36300F0B5F9039A94F82F10002300934D +:10B140002846FEF73AFD61E6A36B1E44636BA663D7 +:10B150009E42BFF4ACAE2846FFF776FC56E6237B52 +:10B160003044DB09A0630CD1A38E294A607B04F133 +:10B170000F01FDF783F8002803DA39462846FFF768 +:10B180003FFCD4E90D329A42BFF491AE4FF0E02378 +:10B19000D3F8F03DDB077FF539AE00BE36E694F814 +:10B1A0002E308B427FF432AE0D2E7FF42FAEE37B38 +:10B1B000282B09D02A2B14D0164B53B1607B04F1F5 +:10B1C0000F01AFF3008004E0134B13B1607BAFF3CA +:10B1D0000080002384F83030104A94F82F101F2389 +:10B1E0003CE60F4B002BF4D0607BFDF793F8F0E7C3 +:10B1F0009B1AA362032384F830300A4A0D232846A1 +:10B20000FEF788FD00287FF4C3AD2CE600000000A7 +:10B2100064BE0020000000000000000064CE00209A +:10B2200015830F0084CE002008B50020FEF700FC37 +:10B2300030B94FF0E023D3F8F03DDB0700D500BE76 +:10B2400008BDFEF7EFBB8388C07800F0030002283A +:10B25000C3F30A0315D003281DD001280FD10229FA +:10B2600040F2FF3208BF4FF480629A420FD24FF093 +:10B27000E023D3F8F00D10F0010008D000BE00204C +:10B280007047022904D1B3F5007FF0D10120704747 +:10B29000402BFBD9EBE702290CBF4FF48062402220 +:10B2A0009A42F3D2E3E730B50A44914200D330BD6D +:10B2B0004C78052C06D18C7804F07F0500EB450511 +:10B2C000E4092B550C782144EFE700000649074AB2 +:10B2D000074B9B1A03DD043BC858D050FBDCF9F741 +:10B2E00063FEF8F7D5FF000068BD0F000080002066 +:10B2F000C8860020FEE7FEE7FEE7FEE7FEE7FEE782 +:10B30000FEE7FEE7FEE7FEE7032A70B515D940EA3F +:10B31000010C1CF0030F04460B4621D119462046B0 +:10B320000E680568B54204F1040403F1040317D163 +:10B33000043A032A20461946F0D8541EA2B100F15F +:10B34000FF3C013901E0C3180CD01CF801EF11F8E3 +:10B35000012F9645A4EB0C03F5D0AEEB020070BDB7 +:10B36000541EECE7184670BD104670BD844641EA95 +:10B37000000313F003036DD1403A41D351F8043B6D +:10B3800040F8043B51F8043B40F8043B51F8043BBF +:10B3900040F8043B51F8043B40F8043B51F8043BAF +:10B3A00040F8043B51F8043B40F8043B51F8043B9F +:10B3B00040F8043B51F8043B40F8043B51F8043B8F +:10B3C00040F8043B51F8043B40F8043B51F8043B7F +:10B3D00040F8043B51F8043B40F8043B51F8043B6F +:10B3E00040F8043B51F8043B40F8043B51F8043B5F +:10B3F00040F8043B51F8043B40F8043B403ABDD2CE +:10B40000303211D351F8043B40F8043B51F8043B6F +:10B4100040F8043B51F8043B40F8043B51F8043B2E +:10B4200040F8043B103AEDD20C3205D351F8043BFE +:10B4300040F8043B043AF9D2043208D0D2071CBFCA +:10B4400011F8013B00F8013B01D30B8803806046F3 +:10B45000704700BF082A13D38B078DD010F0030369 +:10B460008AD0C3F10403D21ADB071CBF11F8013BD9 +:10B4700000F8013B80D331F8023B20F8023B7BE728 +:10B48000043AD9D3013A11F8013B00F8013BF9D253 +:10B490000B7803704B7843708B78837060467047ED +:10B4A00088420DD98B1883420AD900EB020CBAB13D +:10B4B000624613F801CD02F801CD9942F9D17047E7 +:10B4C0000F2A0ED8034602F1FF3C4AB10CF1010CE1 +:10B4D000013B8C4411F8012B03F8012F6145F9D190 +:10B4E000704740EA01039B0750D1A2F1100370B5E9 +:10B4F00001F1200C23F00F0501F1100E00F11004F2 +:10B50000AC441B095EF8105C44F8105C5EF80C5CFF +:10B5100044F80C5C5EF8085C44F8085C5EF8045C77 +:10B5200044F8045C0EF1100EE64504F11004E9D174 +:10B53000013312F00C0F01EB031102F00F0400EBCA +:10B54000031327D0043C24F003064FEA940C1E4456 +:10B550001C1F8E465EF8045B44F8045FB442F9D1C8 +:10B560000CF1010402F0030203EB840301EB8401FC +:10B5700002F1FF3C4AB10CF1010C013B8C4411F883 +:10B58000012B03F8012F6145F9D170BD02F1FF3C99 +:10B5900003469BE72246EBE7830710B5044610D12C +:10B5A0000268A2F1013323EA020313F0803F08D1BD +:10B5B00050F8042FA2F1013323EA020313F0803F75 +:10B5C000F6D003781BB110F8013F002BFBD100F03F +:10B5D00003F8204610BD00BF80EA0102844612F045 +:10B5E000030F4FD111F0030F32D14DF8044D11F07C +:10B5F000040F51F8043B0BD0A3F101329A4312F02F +:10B60000803F04BF4CF8043B51F8043B16D100BF07 +:10B6100051F8044BA3F101329A4312F0803FA4F198 +:10B6200001320BD14CF8043BA24312F0803F04BF1F +:10B6300051F8043B4CF8044BEAD023460CF8013B8C +:10B6400013F0FF0F4FEA3323F8D15DF8044B704736 +:10B6500011F0010F06D011F8012B0CF8012B002A74 +:10B6600008BF704711F0020FBFD031F8022B12F063 +:10B67000FF0F16BF2CF8022B8CF8002012F47F4F1E +:10B68000B3D1704711F8012B0CF8012B002AF9D126 +:10B69000704700BF00000000000000000000000034 +:10B6A000000000000000000000000000000000009A +:10B6B000000000000000000000000000000000008A +:10B6C00090F800F06DE9024520F007016FF0000CE2 +:10B6D00010F0070491F820F040F049804FF000048A +:10B6E0006FF00700D1E9002391F840F000F1080065 +:10B6F00082FA4CF2A4FA8CF283FA4CF3A2FA8CF39D +:10B700004BBBD1E9022382FA4CF200F10800A4FA03 +:10B710008CF283FA4CF3A2FA8CF3E3B9D1E9042357 +:10B7200082FA4CF200F10800A4FA8CF283FA4CF38E +:10B73000A2FA8CF37BB9D1E9062301F1200182FA48 +:10B740004CF200F10800A4FA8CF283FA4CF3A2FA4E +:10B750008CF3002BC6D0002A04BF04301A4612BA5C +:10B76000B2FA82F2FDE8024500EBD2007047D1E95F +:10B77000002304F00305C4F100004FEAC50514F0EE +:10B78000040F91F840F00CFA05F562EA05021CBFBF +:10B7900063EA050362464FF00004A9E7F0B5254FC0 +:10B7A000A2F1020E164605460C460FCF8BB0EC46B2 +:10B7B000ACE80F000FCFACE80F0097E803004CF89F +:10B7C000040BBEF1220F8CF800102ED804F1FF3EBE +:10B7D00070464FF0000CB5FBF6F206FB125328330F +:10B7E0006B44614613F828CC00F801CF2B469E42EB +:10B7F00001F1010C1546EED9002304F80C3089B193 +:10B80000A44472461EF8010F1CF8015D8EF800502A +:10B810006FEA0E0302322344121B0B449A428CF847 +:10B820000000EEDB20460BB0F0BD002020700BB016 +:10B83000F0BD00BF34BD0F00FFF7B0BF53B94AB928 +:10B84000002908BF00281CBF4FF0FF314FF0FF3028 +:10B8500000F074B9ADF1080C6DE904CE00F006F803 +:10B86000DDF804E0DDE9022304B070472DE9F0477C +:10B87000089D04468E46002B4DD18A42944669D9D4 +:10B88000B2FA82F252B101FA02F3C2F1200120FAB7 +:10B8900001F10CFA02FC41EA030E94404FEA1C4805 +:10B8A000210CBEFBF8F61FFA8CF708FB16E341EA01 +:10B8B000034306FB07F199420AD91CEB030306F187 +:10B8C000FF3080F01F81994240F21C81023E6344A8 +:10B8D0005B1AA4B2B3FBF8F008FB103344EA03444C +:10B8E00000FB07F7A7420AD91CEB040400F1FF3361 +:10B8F00080F00A81A74240F207816444023840EA9E +:10B900000640E41B00261DB1D4400023C5E90043D6 +:10B910003146BDE8F0878B4209D9002D00F0EF8059 +:10B920000026C5E9000130463146BDE8F087B3FA8C +:10B9300083F6002E4AD18B4202D3824200F2F98074 +:10B94000841A61EB030301209E46002DE0D0C5E977 +:10B95000004EDDE702B9FFDEB2FA82F2002A40F0C3 +:10B960009280A1EB0C014FEA1C471FFA8CFE0126C6 +:10B97000200CB1FBF7F307FB131140EA01410EFB6A +:10B9800003F0884208D91CEB010103F1FF3802D211 +:10B99000884200F2CB804346091AA4B2B1FBF7F00B +:10B9A00007FB101144EA01440EFB00FEA64508D92E +:10B9B0001CEB040400F1FF3102D2A64500F2BB806B +:10B9C0000846A4EB0E0440EA03409CE7C6F12007BA +:10B9D000B34022FA07FC4CEA030C20FA07F401FA00 +:10B9E00006F31C43F9404FEA1C4900FA06F3B1FB89 +:10B9F000F9F8200C1FFA8CFE09FB181140EA0141EE +:10BA000008FB0EF0884202FA06F20BD91CEB01018A +:10BA100008F1FF3A80F08880884240F28580A8F1E2 +:10BA200002086144091AA4B2B1FBF9F009FB101134 +:10BA300044EA014100FB0EFE8E4508D91CEB0101D2 +:10BA400000F1FF346CD28E456AD90238614440EA75 +:10BA50000840A0FB0294A1EB0E01A142C846A646F5 +:10BA600056D353D05DB1B3EB080261EB0E0101FA7E +:10BA700007F722FA06F3F1401F43C5E900710026DB +:10BA80003146BDE8F087C2F12003D8400CFA02FC31 +:10BA900021FA03F3914001434FEA1C471FFA8CFE41 +:10BAA000B3FBF7F007FB10360B0C43EA064300FB31 +:10BAB0000EF69E4204FA02F408D91CEB030300F1CF +:10BAC000FF382FD29E422DD9023863449B1B89B286 +:10BAD000B3FBF7F607FB163341EA034106FB0EF30F +:10BAE0008B4208D91CEB010106F1FF3816D28B42BC +:10BAF00014D9023E6144C91A46EA004638E72E4688 +:10BB0000284605E70646E3E61846F8E64B45A9D27F +:10BB1000B9EB020864EB0C0E0138A3E74646EAE7EE +:10BB2000204694E74046D1E7D0467BE7023B61449C +:10BB300032E7304609E76444023842E7704700BF05 +:10BB4000F8B500BFF8BC08BC9E467047F8B500BF0A +:10BB5000F8BC08BC9E467047088000200010020018 +:10BB60000338FDD87047000000000000000000000E +:10BB70000338FDD87047010000000000089900203C +:10BB80000338FDD87047416461444655004D6573E4 +:10BB90006874617374696300302E392E32207331FA +:10BBA000343020362E312E3100000000000000001D +:10BBB00000000000000000000023D1BCEA5F7823F1 +:10BBC00015DEEF12120000000000000070B000202F +:10BBD0004164616672756974006E52462055463242 +:10BBE00000303132333435363738394142434445F9 +:10BBF00046006E52462053657269616C0009045319 +:10BC00006F66744465766963653A200053002E00C0 +:10BC10006E6F7420666F756E640D0A00EB3C905574 +:10BC20004632205546322000020101000240000049 +:10BC300000F80201010001000000000009010100FC +:10BC4000800029420042004D455348544153544915 +:10BC5000430046415431362020203C21646F6374F8 +:10BC60007970652068746D6C3E0A3C68746D6C3E3A +:10BC70003C626F64793E3C7363726970743E0A6C17 +:10BC80006F636174696F6E2E7265706C6163652895 +:10BC90002268747470733A2F2F6275796D656163D1 +:10BCA0006F666665652E636F6D2F6D61726B2E62B8 +:10BCB0006972737322293B0A3C2F73637269707433 +:10BCC0003E3C2F626F64793E3C2F68746D6C3E0A77 +:10BCD00000000000494E464F5F554632545854000C +:10BCE00024850020494E44455820202048544D00CA +:10BCF0005ABC0F0043555252454E5420554632000F +:10BD00000000000021A70F0079A70F00A9A70F00CE +:10BD10004DA80F0005A90F00000000009DAB0F000B +:10BD2000ADAB0F00BDAB0F004DAC0F0069AD0F0008 +:10BD30000000000030313233343536373839616233 +:10BD4000636465666768696A6B6C6D6E6F7071724B +:10BD5000737475767778797A00000000000000002F +:10BD60002885FF7F010000000880002000000000FF +:10BD700000000000F48200205C830020C4830020C7 +:10BD800000000000000000000000000000000000B3 +:10BD900000000000000000000000000000000000A3 +:10BDA0000000000000000000000000000000000093 +:10BDB0000000000000000000000000000000000083 +:10BDC0000000000000000000000000000000000073 +:10BDD0000000000000000000000000000000000063 +:10BDE0000000000000000000000000000000000053 +:10BDF0000000000000000000000000000000000043 +:10BE00000000000000000000000000000000000032 +:10BE10000000000000000000010000000000000021 +:10BE20000E33CDAB34126DE6ECDE05000B000000E6 +:10BE30000000000000000000000000000000000002 +:10BE400000000000000000000000000000000000F2 +:10BE500000000000000000000000000000000000E2 +:10BE600000000000000000000000000000000000D2 +:10BE700000000000000000000000000000000000C2 +:10BE800000000000000000000000000000000000B2 +:10BE900000000000000000000000000000000000A2 +:10BEA0000000000000000000000000000000000092 +:10BEB0000000000000000000000000000000000082 +:10BEC0000000000000000000000000000000000072 +:10BED0000000000000000000000000000000000062 +:10BEE0000000000000000000000000000000000052 +:10BEF0000000000000000000000000000000000042 +:10BF00000000000000000000000000000000000031 +:10BF10000000000000000000000000000000000021 +:10BF20000000000000000000000000000000000011 +:10BF30000000000000000000000000000000000001 +:10BF400000000000000000000000000000000000F1 +:10BF500000000000000000000000000000000000E1 +:10BF600000000000000000000000000000000000D1 +:10BF700000000000000000000000000000000000C1 +:10BF800000000000000000000000000000000000B1 +:10BF900000000000000000000000000000000000A1 +:10BFA0000000000000000000000000000000000091 +:10BFB0000000000000000000000000000000000081 +:10BFC0000000000000000000000000000000000071 +:10BFD0000000000000000000000000000000000061 +:10BFE0000000000000000000000000000000000051 +:10BFF0000000000000000000000000000000000041 +:10C000000000000000000000000000000000000030 +:10C010000000000000000000000000000000000020 +:10C020000000000000000000000000000000000010 +:10C030000000000000000000000000000000000000 +:10C0400000000000000000000000000000000000F0 +:10C0500000000000000000000000000000000000E0 +:10C0600000000000000000000000000000000000D0 +:10C0700000000000000000000000000000000000C0 +:10C0800000000000000000000000000000000000B0 +:10C0900000000000000000000000000000000000A0 +:10C0A0000000000000000000000000000000000090 +:10C0B0000000000000000000000000000000000080 +:10C0C0000000000000000000000000000000000070 +:10C0D0000000000000000000000000000000000060 +:10C0E0000000000000000000000000000000000050 +:10C0F0000000000000000000000000000000000040 +:10C10000000000000000000000000000000000002F +:10C11000000000000000000000000000000000001F +:10C12000000000000000000000000000000000000F +:10C1300000000000000000000000000000000000FF +:10C1400000000000000000000000000000000000EF +:10C1500000000000000000000000000000000000DF +:10C1600000000000000000000000000000000000CF +:10C1700000000000000000000000000000000000BF +:10C1800000000000000000000000000000000000AF +:10C190000000000000000000FFFFFFFF7C7F002088 +:10C1A0000090D003FF00FFFF320000007D7B0F00F6 +:10C1B000F17B0F0001090262000301008032080BCD +:10C1C000000202020000090400000102020004054E +:10C1D0002400200105240100010424020205240694 +:10C1E00000010705810308001009040100020A008C +:10C1F000000007050202400000070582024000001F +:10C200000904020002080650050705030240000069 +:10C210000705830240000009024B00020100803242 +:10C22000080B0002020200000904000001020200E3 +:10C230000405240020010524010001042402020554 +:10C24000240600010705810308001009040100020B +:10C250000A000000070502024000000705820240B4 +:10C26000000012010002EF0201409A2329000001A0 +:10C2700001020301FDBB0F008DBB0F008DBB0F0042 +:10C2800064B30020F2BB0F00D9BB0F00554632202B +:10C29000426F6F746C6F6164657220302E392E327C +:10C2A000206C69622F6E726678202876322E302ECE +:10C2B0003029206C69622F74696E79757362202849 +:10C2C000302E31322E302D3134352D673937373518 +:10C2D000653736393129206C69622F75663220281E +:10C2E00072656D6F7465732F6F726967696E2F6306 +:10C2F0006F6E6669677570646174652D392D67614D +:10C30000646262386337290D0A4D6F64656C3A20A8 +:10C3100068747470733A2F2F6275796D6561636FFD +:10C32000666665652E636F6D2F6D61726B2E626937 +:10C330007273730D0A426F6172642D49443A204D45 +:10C340006573687461737469630D0A446174653A56 +:10C350002053657020203120323032340D0A000025 +:10C3600000000000000000000000000000000000CD +:10C3700000000000000000000000000000000000BD +:10C3800000000000000000000000000000000000AD +:10C39000000000000000000000000000000000009D +:10C3A000000000000000000000000000000000008D +:10C3B000000000000000000000000000000000007D +:10C3C000000000000000000000000000000000006D +:10C3D000000000000000000000000000000000005D +:10C3E000000000000000000000000000000000004D +:10C3F000000000000000000000000000000000003D +:10C40000000000000000000000000000010000002B +:10C4100098B4002010000C000000E0FF1F00000096 +:10C42000000000005D450F0069420F0041420F000F +:10D80000F1109E1E797A22200500000064000000BD +:10D81000CC00000000001000CD000000000004005B +:10D82000D000000029009A23D10000004028A5ADB7 +:10D83000D2000000200000000000000000000000F6 +:10D8400000000000000000000000000000000000D8 +:08D850000000000000000000D0 +:020000041000EA +:0810140000400F0000E00F0096 +:00000001FF diff --git a/bin/generic/Meshtastic_6.1.0_bootloader-0.9.2_s140_6.1.1.zip b/bin/generic/Meshtastic_6.1.0_bootloader-0.9.2_s140_6.1.1.zip new file mode 100644 index 000000000..ae035898d Binary files /dev/null and b/bin/generic/Meshtastic_6.1.0_bootloader-0.9.2_s140_6.1.1.zip differ diff --git a/bin/generic/Meshtastic_7.3.0_bootloader-0.9.2_s140_7.3.0.hex b/bin/generic/Meshtastic_7.3.0_bootloader-0.9.2_s140_7.3.0.hex new file mode 100644 index 000000000..37750fc2c --- /dev/null +++ b/bin/generic/Meshtastic_7.3.0_bootloader-0.9.2_s140_7.3.0.hex @@ -0,0 +1,11851 @@ +:04000003F000B2CD8A +:020000040000FA +:1000000000040020810A000015070000610A0000BA +:100010001F07000029070000330700000000000050 +:10002000000000000000000000000000A50A000021 +:100030003D070000000000004707000051070000D6 +:100040005B070000650700006F07000079070000EC +:10005000830700008D07000097070000A10700003C +:10006000AB070000B5070000BF070000C90700008C +:10007000D3070000DD070000E7070000F1070000DC +:10008000FB070000050800000F0800001908000029 +:10009000230800002D080000370800004108000078 +:1000A0004B080000550800005F08000069080000C8 +:1000B000730800007D080000870800009108000018 +:1000C0009B080000A5080000AF080000B908000068 +:1000D000C3080000CD080000D7080000E1080000B8 +:1000E000EB080000F5080000FF0800000909000007 +:1000F000130900001D090000270900003109000054 +:100100003B0900001FB500F003F88DE80F001FBD8C +:1001100000F0ACBC40F6FC7108684FF01022401CA7 +:1001200008D00868401C09D00868401C04D0086842 +:1001300000F037BA9069F5E79069F9E7704770B554 +:100140000B46010B184400F6FF70040B4FF0805073 +:100150000022090303692403406943431D1B104621 +:1001600000F048FA29462046BDE8704000F042BA47 +:10017000F0B54FF6FF734FF4B4751A466E1E11E0DA +:10018000A94201D3344600E00C46091B30F8027B3B +:10019000641E3B441A44F9D19CB204EB134394B25D +:1001A00004EB12420029EBD198B200EB134002EBB2 +:1001B000124140EA0140F0BDF34992B00446D1E952 +:1001C0000001CDE91001FF224021684600F0F4FB58 +:1001D00094E80F008DE80F00684610A902E004C8FB +:1001E00041F8042D8842FAD110216846FFF7C0FF7C +:1001F0001090AA208DF8440000F099F9FFF78AFFCB +:1002000040F6FC7420684FF01025401C0FD0206889 +:1002100010226946803000F078F92068401C08D030 +:100220002068082210A900F070F900F061F9A869AF +:10023000EEE7A869F5E74FF080500369406940F6A2 +:10024000FC71434308684FF01022401C06D0086838 +:1002500000F58050834203D2092070479069F7E788 +:100260000868401C04D00868401C03D00020704778 +:100270009069F9E70420704770B504460068C34DE3 +:10028000072876D2DFE800F033041929631E250021 +:10029000D4E9026564682946304600F062F92A46CE +:1002A0002146304600F031F9AA002146304600F0E0 +:1002B00057FB002800D0032070BD00F009FC4FF46C +:1002C000805007E0201D00F040F90028F4D100F034 +:1002D000FFFB60682860002070BD241D94E80700C3 +:1002E000920000F03DFB0028F6D00E2070BDFFF715 +:1002F000A2FF0028FAD1D4E901034FF0805100EBAE +:10030000830208694D69684382420ED840F6F8704E +:1003100005684FF010226D1C09D0056805EB8305B8 +:100320000B6949694B439D4203D9092070BD55694A +:10033000F4E70168491C03D00068401C02D003E0C8 +:100340005069FAE70F2070BD2046FFF735FFFFF731 +:1003500072FF0028F7D1201D00F0F7F80028F2D135 +:1003600060680028F0D100F0E2F8FFF7D3FE00F05B +:10037000BFF8072070BD10B50C46182802D0012028 +:10038000086010BD2068FFF777FF206010BD41684E +:10039000054609B1012700E0002740F6F8742068FF +:1003A0004FF01026401C2BD02068AA68920000F065 +:1003B000D7FA38B3A86881002068401C27D020688D +:1003C000FFF7BDFED7B12068401C22D026684FF051 +:1003D0008050AC686D68016942695143A9420DD9EA +:1003E000016940694143A14208D92146304600F0E5 +:1003F000B8F822462946304600F087F800F078F831 +:100400007069D2E700F093F8FFF784FEF6E77069B1 +:10041000D6E77669DBE740F6FC7420684FF01026DB +:10042000401C23D02068401C0CD02068401C1FD0EA +:100430002568206805F18005401C1BD027683879A5 +:10044000AA2819D040F6F8700168491C42D001680A +:10045000491C45D00168491C3ED001680968491C07 +:100460003ED00168491C39D000683EE0B069DAE747 +:10047000B569DEE7B769E2E710212846FFF778FEA5 +:100480003968814222D12068401C05D0D4F8001080 +:1004900001F18002C03107E0B169F9E730B108CA63 +:1004A00051F8040D984201D1012000E000208A4259 +:1004B000F4D158B1286810B1042803D0FEE72846CB +:1004C000FFF765FF3149686808600EE0FFF722FE1C +:1004D00000F00EF87169BBE77169BFE7706904E06D +:1004E0004FF480500168491C01D000F0CBFAFEE7C0 +:1004F000BFF34F8F26480168264A01F4E06111439B +:100500000160BFF34F8F00BFFDE72DE9F0411746B3 +:100510000D460646002406E03046296800F054F8EF +:10052000641C2D1D361DBC42F6D3BDE8F08140F69B +:10053000FC700168491C04D0D0F800004FF48051D1 +:10054000FDE54FF010208069F8E74FF080510A690F +:10055000496900684A43824201D810207047002050 +:10056000704770B50C4605464FF4806608E0284693 +:1005700000F017F8B44205D3A4F5806405F5805562 +:10058000002CF4D170BD0000F40A0000000000202F +:100590000CED00E00400FA05144801680029FCD0C5 +:1005A0007047134A0221116010490B68002BFCD0E0 +:1005B0000F4B1B1D186008680028FCD0002010603D +:1005C00008680028FCD07047094B10B501221A605A +:1005D000064A1468002CFCD0016010680028FCD08A +:1005E0000020186010680028FCD010BD00E4014015 +:1005F00004E5014070B50C46054600F073F810B9EB +:1006000000F07EF828B121462846BDE8704000F091 +:1006100007B821462846BDE8704000F037B8000012 +:100620007FB5002200920192029203920A0B000B06 +:100630006946012302440AE0440900F01F0651F80C +:10064000245003FA06F6354341F82450401C8242F8 +:10065000F2D80D490868009A10430860081D016827 +:10066000019A1143016000F03DF800280AD00649C4 +:1006700010310868029A10430860091D0868039A3F +:10068000104308607FBD00000006004030B50F4CED +:10069000002200BF04EB0213D3F800582DB9D3F8A1 +:1006A000045815B9D3F808581DB1521C082AF1D3C3 +:1006B00030BD082AFCD204EB0212C2F80008C3F8CD +:1006C00004180220C3F8080830BD000000E0014013 +:1006D0004FF08050D0F83001082801D0002070473A +:1006E000012070474FF08050D0F83011062905D016 +:1006F000D0F83001401C01D0002070470120704725 +:100700004FF08050D0F830010A2801D00020704707 +:100710000120704708208F490968095808471020B0 +:100720008C4909680958084714208A4909680958FA +:100730000847182087490968095808473020854923 +:100740000968095808473820824909680958084744 +:100750003C20804909680958084740207D490968BC +:100760000958084744207B49096809580847482028 +:1007700078490968095808474C207649096809589A +:10078000084750207349096809580847542071499F +:1007900009680958084758206E49096809580847E8 +:1007A0005C206C4909680958084760206949096854 +:1007B00009580847642067490968095808476820AC +:1007C00064490968095808476C2062490968095852 +:1007D000084770205F4909680958084774205D4937 +:1007E00009680958084778205A490968095808478C +:1007F0007C205849096809580847802055490968EC +:10080000095808478420534909680958084788202F +:1008100050490968095808478C204E490968095809 +:10082000084790204B4909680958084794204949CE +:10083000096809580847982046490968095808472F +:100840009C204449096809580847A0204149096883 +:1008500009580847A4203F49096809580847A820B3 +:100860003C49096809580847AC203A4909680958C1 +:100870000847B0203749096809580847B420354966 +:10088000096809580847B8203249096809580847D3 +:10089000BC203049096809580847C0202D4909681B +:1008A00009580847C4202B49096809580847C82037 +:1008B0002849096809580847CC2026490968095879 +:1008C0000847D0202349096809580847D4202149FE +:1008D000096809580847D8201E4909680958084777 +:1008E000DC201C49096809580847E02019490968B3 +:1008F00009580847E4201749096809580847E820BB +:100900001449096809580847EC2012490968095830 +:100910000847F0200F49096809580847F4200D4995 +:10092000096809580847F8200A490968095808471A +:10093000FC2008490968095808475FF48070054998 +:10094000096809580847000003480449024A034B54 +:100950007047000000000020000B0000000B0000AA +:1009600040EA010310B59B070FD1042A0DD310C82C +:1009700008C9121F9C42F8D020BA19BA884201D97E +:10098000012010BD4FF0FF3010BD1AB1D30703D0C6 +:10099000521C07E0002010BD10F8013B11F8014B7C +:1009A0001B1B07D110F8013B11F8014B1B1B01D198 +:1009B000921EF1D1184610BD02F0FF0343EA032254 +:1009C00042EA024200F005B87047704770474FF0A6 +:1009D00000020429C0F0128010F0030C00F01B800C +:1009E000CCF1040CBCF1020F18BF00F8012BA8BF1A +:1009F00020F8022BA1EB0C0100F00DB85FEAC17CDE +:100A000024BF00F8012B00F8012B48BF00F8012B90 +:100A100070474FF0000200B51346944696462039C1 +:100A200022BFA0E80C50A0E80C50B1F12001BFF4A7 +:100A3000F7AF090728BFA0E80C5048BF0CC05DF80D +:100A400004EB890028BF40F8042B08BF704748BF5B +:100A500020F8022B11F0804F18BF00F8012B7047CF +:100A6000014B1B68DB6818470000002009480A4951 +:100A70007047FFF7FBFFFFF745FB00BD20BFFDE719 +:100A8000064B1847064A1060016881F308884068E1 +:100A900000470000000B0000000B000017040000DE +:100AA000000000201EF0040F0CBFEFF30881EFF3ED +:100AB0000981886902380078182803D100E0000015 +:100AC000074A1047074A12682C3212681047000084 +:100AD00000B5054B1B68054A9B58984700BD0000B0 +:100AE0007703000000000020F00A0000040000006E +:100AF000001000000000000000FFFFFF0090D00386 +:10100000C8130020395E020085C100009F5D020008 +:1010100085C1000085C1000085C1000000000000FE +:10102000000000000000000000000000C55E02009B +:1010300085C100000000000085C1000085C10000DE +:101040002D5F0200335F020085C1000085C10000F2 +:1010500085C1000085C1000085C1000085C1000078 +:10106000395F020085C1000085C100003F5F0200BA +:1010700085C10000455F02004B5F0200515F020026 +:1010800085C1000085C1000085C1000085C1000048 +:1010900085C1000085C1000085C1000085C1000038 +:1010A00085C10000575F020085C1000085C10000B6 +:1010B00085C1000085C1000085C1000085C1000018 +:1010C0005D5F020085C1000085C1000085C1000090 +:1010D00085C1000085C1000085C1000085C10000F8 +:1010E00085C1000085C1000085C1000085C10000E8 +:1010F00085C1000085C1000085C1000085C10000D8 +:1011000085C1000085C1000000F002F824F083FED4 +:101110000AA090E8000C82448344AAF10107DA4552 +:1011200001D124F078FEAFF2090EBAE80F0013F0F7 +:10113000010F18BFFB1A43F00103184718530200B0 +:10114000385302000A444FF0000C10F8013B13F032 +:10115000070408BF10F8014B1D1108BF10F8015B10 +:10116000641E05D010F8016B641E01F8016BF9D103 +:1011700013F0080F1EBF10F8014BAD1C0C1B09D15A +:101180006D1E58BF01F801CBFAD505E014F8016BCC +:1011900001F8016B6D1EF9D59142D6D3704700005E +:1011A0000023002400250026103A28BF78C1FBD870 +:1011B000520728BF30C148BF0B6070471FB500F011 +:1011C00003F88DE80F001FBD24F022BE70B51A4C45 +:1011D00005460A202070A01C00F0D5F85920A080F8 +:1011E00029462046BDE8704008F082B908F08BB966 +:1011F00070B50C461149097829B1A0F160015E294A +:1012000008D3012013E0602804D0692802D043F2FB +:1012100001000CE020CC0A4E94E80E0006EB8000A2 +:10122000A0F58050241FD0F8806E2846B04720607B +:1012300070BD012070470000080000201C00002045 +:10124000A05F02003249884201D20120704700208D +:10125000704770B50446A0F500002E4EB0F1786FCF +:1012600002D23444A4F500042948844201D2012565 +:1012700000E0002500F043F848B125B9B44204D39A +:101280002548006808E0012070BD002070BD002DD9 +:10129000F9D1B442F9D321488442F6D2F3E710B52C +:1012A0000446A0F50000B0F1786F03D21948044459 +:1012B000A4F5000400F023F84FF0804130B1164847 +:1012C000006804E08C4204D2012003E01348844209 +:1012D000F8D2002080F0010010BD10B520B1FFF75A +:1012E000DEFF08B1012010BD002010BD10B520B1F7 +:1012F000FFF7AFFF08B1012010BD002010BD084866 +:1013000008490068884201D10120704700207047D9 +:1013100000700200000000202000002008000020D3 +:101320005C000020BEBAFECA10B5044600210120B0 +:1013300000F042F800210B2000F03EF800210820C8 +:1013400000F03AF80421192000F036F804210D20AD +:1013500000F032F804210E2000F02EF804210F20B6 +:1013600000F02AF80421C84300F026F806211620D0 +:1013700000F022F80621152000F01EF82046FFF7A5 +:1013800025FF002010BD40F2231101807047FFF7B8 +:101390002DBF1148704710487047104A10B51468A7 +:1013A0000E4B0F4A08331A60FFF722FF0B48001D4F +:1013B000046010BD704770474907090E002804DB20 +:1013C00000F1E02080F80014704700F00F0000F1F9 +:1013D000E02080F8141D704703F900421005024018 +:1013E00001000001FD48002101604160018170475A +:1013F0002DE9FF4F93B09B46209F160004460DD069 +:101400001046FFF726FF18B1102017B0BDE8F08F87 +:101410003146012001F0D3FE0028F6D101258DF8D8 +:1014200042504FF4C050ADF84000002210A92846A9 +:1014300006F0C5FC0028E8D18DF84250A8464FF4CC +:1014400028500025ADF840001C2229466846079523 +:101450000DF01DF89DF81C000DF11C0A20F00F0086 +:10146000401C20F0F00010308DF81C0020788DF822 +:101470001D0061789DF81E000DF1400961F34200E6 +:1014800040F001008DF81E009DF8000008AA40F011 +:1014900002008DF800002089ADF83000ADF8325020 +:1014A0006089ADF83400CDF82CA060680E900AA9D0 +:1014B000CDF82890684606F090FA0028A5D160681B +:1014C000FFF70BFF40B16068FFF710FF20B96078AD +:1014D00000F00300022801D0012000E00020BF4CF2 +:1014E00008AA0AA92072BDF8200020808DF8428049 +:1014F00042F60120ADF840009DF81E0020F00600E5 +:10150000801C20F001008DF81E000220ADF8300094 +:10151000ADF8340014A80E90684606F05EFA002874 +:1015200089D1BDF82000608036B1211D304600F021 +:101530005FF90028C2D109E0BBF1000F05D00CF023 +:1015400021FDE8BB0CF01EFDD0BBA58017B1012F1B +:1015500043D04AE08DF8428042F6A620ADF8400024 +:1015600046461C220021684607950CF090FF9DF826 +:101570001C00ADF8346020F00F00401C20F0F0009B +:1015800010308DF81C009DF81D0020F0FF008DF834 +:101590001D009DF81E0020F0060040F00100801C98 +:1015A0008DF81E009DF800008DF8446040F00200A8 +:1015B0008DF80000CDE90A9AADF8306011A800E07E +:1015C00011E00E9008AA0AA9684606F006FA00285B +:1015D000A6D1BDF82000E08008E00CF0D3FC10B9E3 +:1015E0000CF0D0FC08B103200FE7E58000200CE7E9 +:1015F0003EB50446794D0820ADF80000A88828B112 +:101600002046FFF726FE18B110203EBD06203EBD45 +:101610002146012001F0D3FD0028F8D12088ADF843 +:1016200004006088ADF80600A088ADF80800E088E6 +:10163000ADF80A00A88801AB6A46002106F0AAFDB1 +:10164000BDF800100829E2D003203EBD7FB5634DF0 +:101650000446A88868B1002002900820ADF8080070 +:10166000CDF80CD02046FFF7F4FD20B1102004B0D7 +:1016700070BD0620FBE7A98802AA4FF6FF7006F0AE +:10168000CCFF0028F3D1BDF80810082901D00320B1 +:10169000EDE7BDF800102180BDF802106180BDF8B3 +:1016A0000410A180BDF80610E180E0E701B582B02A +:1016B0000220ADF80000494802AB6A46408800218C +:1016C00006F068FDBDF80010022900D003200EBD11 +:1016D0001CB5002100910221ADF800100190FFF728 +:1016E000DEFD08B110201CBD3C486A4641884FF61B +:1016F000FF7006F092FFBDF800100229F3D003201E +:101700001CBDFEB5354C06461546207A0F46C0076F +:1017100005D00846FFF79DFD18B11020FEBD0F2033 +:10172000FEBDF82D01D90C20FEBD3046FFF791FD1E +:1017300018BB208801A905F03AFE0028F4D13078C2 +:101740008DF80500208801A906F003FD0028EBD1E3 +:1017500000909DF800009DF8051040F002008DF803 +:101760000000090703D040F008008DF80000208831 +:10177000694606F08BFC0028D6D1ADF808502088C9 +:101780003B4602AA002106F005FDBDF80810A9425B +:10179000CAD00320FEBD7CB5054600200090019014 +:1017A0000888ADF800000C4628460195FFF795FD26 +:1017B00018B92046FFF773FD08B110207CBD15B1A4 +:1017C000BDF8000060B105486A4601884FF6FF7019 +:1017D00006F023FFBDF8001021807CBD240200200C +:1017E0000C20FAE72F48C088002800D0012070475D +:1017F00030B5044693B000200D46014600901422F7 +:1018000001A80CF044FE1C22002108A80CF03FFEA9 +:101810009DF80000CDF808D020F00F00401C20F00B +:10182000F00010308DF800009DF8010006AA20F0AD +:10183000FF008DF801009DF8200001A940F0020092 +:101840008DF8200001208DF8460042F60420ADF806 +:10185000440011A801902088ADF83C006088ADF8E4 +:101860003E00A088ADF84000E088ADF842009DF849 +:10187000020020F00600801C20F001008DF802001C +:101880000820ADF80C00ADF810000FA8059008A8CE +:1018900006F0A3F8002803D1BDF818002880002026 +:1018A00013B030BD24020020F0B5007B059F1E461A +:1018B00014460D46012800D0FFDF0C2030803A206E +:1018C0003880002C08D0287A032806D0287B0128ED +:1018D00000D0FFDF17206081F0BDA889FBE72DE96C +:1018E000F0470D4686B095F80C900E991446B9F164 +:1018F000010F0BD01022007B2E8A9046052807D0BE +:10190000062839D0FFDF06B0BDE8F0870222F2E7F3 +:10191000E8890C2200EB400002EB400018803320E5 +:101920000880002CEFD0E8896081002720E0009635 +:10193000688808F1020301AA696900F097FF06EBC5 +:101940000800801C07EB470186B204EB4102BDF89A +:1019500004009081F848007808B1012300E00023DA +:101960000DF1060140460E3214F029F87F1CBFB27B +:101970006089B842DBD8C6E734200880E889B9F12D +:10198000010F11D0122148430E301880002CBAD01C +:10199000E88960814846B9F1010F00D00220207328 +:1019A00000270DF1040A1FE00621ECE70096688885 +:1019B00008F1020301AA696900F058FF06EB08006C +:1019C000801C86B2B9F1010F12D007EBC70004EBFF +:1019D0004000BDF80410C18110220AF1020110304C +:1019E0000CF02BFD7F1CBFB26089B842DED88AE7BD +:1019F00007EB470104EB4102BDF80400D0810AF176 +:101A000002014046103213F0FCFFEBE72DE9F047EE +:101A10000E4688B090F80CC096F80C80378AF5898D +:101A20000C20DFF81493109902F10C04BCF1030FA1 +:101A300008D0BCF1040F3DD0BCF1070F75D0FFDF1B +:101A400008B061E705EB850C00EB4C0018803120F5 +:101A50000880002AF4D0A8F1060000F0FF0A5581A2 +:101A600024E01622002101A80CF011FD00977088D7 +:101A7000434601AA716900F0F9FEBDF80400208018 +:101A8000BDF80600E080BDF80800208199F800004C +:101A900008B1012300E00023A21C0DF10A01504609 +:101AA00013F08DFF07EB080087B20A346D1EADB24C +:101AB000D7D2C5E705EB850C00EB4C00188032202F +:101AC0000880002ABCD0A8F1050000F0FF0A55816B +:101AD00037E000977088434601AA716900F0C6FE9E +:101AE0009DF80600BDF80410E1802179420860F3FA +:101AF000000162F34101820862F38201C20862F3CD +:101B0000C301020962F30411420962F3451182091B +:101B100062F386112171C0096071BDF80700208150 +:101B200099F8000010B1012301E00EE000232246E5 +:101B30000DF10901504613F042FF07EB080087B290 +:101B40000A346D1EADB2C4D27AE7A8F1020084B2A5 +:101B500005FB08FC0CF10E00188035200880002AD7 +:101B6000A7D05581948100971FFA8CF370880E32AC +:101B7000716900F07BFE63E72DE9F84F1E460A9D70 +:101B80000C4681462AB1607A00F58070D080E089E9 +:101B9000108199F80C000C274FF000084FF00E0A46 +:101BA0000D2872D2DFE800F09D070E1B272F374566 +:101BB000546972727200214648460095FFF774FE20 +:101BC000BDE8F88F207B9146082802D0032800D07A +:101BD000FFDF3780302009E0A9F80A80F0E7207B9A +:101BE0009146042800D0FFDF378031202880B9F1EA +:101BF000000FF1D1E4E7207B9146042800D0FFDFFD +:101C000037803220F2E7207B9146022800D0FFDFA8 +:101C100037803320EAE7207B1746022800D0FFDF19 +:101C20003420A6F800A02880002FC9D0A7F80A8089 +:101C3000C6E7207B1746042800D0FFDF3520A6F832 +:101C400000A02880002FBBD04046A7F80A8012E0F1 +:101C5000207B1746052802D0062800D0FFDF102081 +:101C6000308036202880002FAAD0E0897881A7F81C +:101C70000E80B9F80E00B881A2E7207B91460728B4 +:101C800000D0FFDF37803720B0E72AE04FF01200A6 +:101C900018804FF038001700288091D0E0897881B3 +:101CA000A7F80E80A7F8108099F80C000A2805D034 +:101CB0000B2809D00C280DD0FFDF81E7207B0A28F4 +:101CC00000D0FFDF01200AE0207B0B2800D0FFDFDF +:101CD000042004E0207B0C2800D0FFDF05203873AF +:101CE0006EE7FFDF6CE770B50C46054601F0AAFB16 +:101CF00020B10078222804D2082070BD43F20200EF +:101D000070BD0521284612F0D1F8206008B10020EE +:101D100070BD032070BD30B44880087820F00F00FB +:101D2000C01C20F0F000903001F8080B1DCA81E8BB +:101D30001D0030BC07F05DBC100000202DE9FF47FE +:101D400084B0002782460297079890468946123051 +:101D50000AF069FA401D20F00306079828B907A980 +:101D60005046FFF7C0FF002854D1B9F1000F05D04D +:101D70000798017B19BB052504681BE098F8000053 +:101D8000092803D00D2812D0FFDF46E0079903256C +:101D90004868B0B3497B42887143914239D98AB2CD +:101DA000B3B2011D11F0F5FE0446078002E0079C66 +:101DB000042508340CB1208810B1032D29D02CE063 +:101DC0000798012112300AF060FAADF80C000246C3 +:101DD00002AB2946504608F0B8FA070001D1A01C12 +:101DE000029007983A461230C8F80400A8F802A0FA +:101DF00003A94046029B0AF055FAD8B10A2817D227 +:101E000000E006E0DFE800F007091414100B0D14E1 +:101E10001412132014E6002012E6112010E6082008 +:101E20000EE643F203000BE6072009E60D2007E665 +:101E3000032005E6BDF80C002346CDE900702A46D4 +:101E40005046079900F022FD57B9032D08D1079895 +:101E5000B3B2417B406871438AB2011D11F0ADFEFF +:101E6000B9F1000FD7D0079981F80C90D3E72DE98D +:101E7000FE4F91461A881C468A468046FAB102AB4C +:101E8000494608F062FA050019D04046A61C27888A +:101E900012F04FF93246072629463B46009611F0CC +:101EA0005EFD20882346CDE900504A465146404613 +:101EB00000F0ECFC002020800120BDE8FE8F002017 +:101EC000FBE710B586B01C46AAB104238DF800309C +:101ED0001388ADF808305288ADF80A208A788DF85A +:101EE0000E200988ADF80C1000236A462146FFF742 +:101EF00025FF06B010BD1020FBE770B50D4605218B +:101F000011F0D4FF040000D1FFDF294604F11200D4 +:101F1000BDE870400AF0A2B92DE9F8430D468046AD +:101F2000002607F063FB04462878102878D2DFE803 +:101F300000F0773B345331311231313108313131D6 +:101F400031312879001FC0B2022801D0102810D1E9 +:101F500014BBFFDF35E004B9FFDF0521404611F077 +:101F6000A5FF007B032806D004280BD0072828D023 +:101F7000FFDF072655E02879801FC0B2022820D055 +:101F800050B1F6E72879401FC0B2022819D01028B6 +:101F900017D0EEE704B9FFDF13E004B9FFDF2879BB +:101FA00001280ED1172137E00521404611F07EFFB0 +:101FB000070000D1FFDF07F1120140460AF02BF9BC +:101FC0002CB12A4621464046FFF7A5FE29E0132101 +:101FD000404602F01FFD24E004B9FFDF0521404622 +:101FE00011F064FF060000D1FFDF694606F1120020 +:101FF0000AF01BF9060000D0FFDFA988172901D2DB +:10200000172200E00A46BDF80000824202D90146CC +:1020100002E005E01729C5D3404600F047FCD0E7B1 +:10202000FFDF3046BDE8F883401D20F0030219B100 +:1020300002FB01F0001D00E000201044704713B5C2 +:10204000009858B10024684611F04DFD002C04D1D1 +:10205000F749009A4A6000220A701CBD0124002042 +:10206000F2E72DE9F0470C461546242200212046D0 +:102070000CF00DFA05B9FFDFA87860732888DFF847 +:10208000B0A3401D20F00301AF788946DAF80400C0 +:1020900011F047FD060000D1FFDF4FF00008266079 +:1020A000A6F8008077B109FB07F1091D0AD0DAF81C +:1020B000040011F036FD060000D1FFDF6660C6F8AF +:1020C000008001E0C4F80480298804F11200BDE812 +:1020D000F0470AF091B82DE9F047804601F112006F +:1020E0000D4681460AF09FF8401DD14F20F00302B3 +:1020F0006E7B14462968786811F03EFD3EB104FB02 +:1021000006F2121D03D06968786811F035FD0520CC +:1021100011F074FE0446052011F078FE201A012803 +:1021200002D1786811F0F2FC49464046BDE8F0471C +:102130000AF078B870B50546052111F0B7FE040025 +:1021400000D1FFDF04F112012846BDE870400AF01B +:1021500062B82DE9F04F91B04FF0000BADF828B008 +:10216000ADF804B047880C4605469246052138462E +:1021700011F09CFE060000D1FFDF24B1A780A4F877 +:1021800006B0A4F808B0297809220B20B2EB111F81 +:1021900073D12A7A04F1100138274FF00C084FF060 +:1021A00012090291102A69D2DFE802F068F2F1F018 +:1021B0008008D3898EA03DDCF3EEB7B7307B0228D0 +:1021C00000D0FFDFA88908EBC001ADF80410302172 +:1021D000ADF82810002C25D06081B5F80E800027BE +:1021E0001DE004EBC709317C89F80E10F189A9F8CC +:1021F0000C10CDF800806888042305AA296900F036 +:1022000035FBBDF81410A9F8101008F10400BDF852 +:1022100016107F1C1FFA80F8A9F81210BFB260894F +:10222000B842DED80CE1307B022800D0FFDFE9891C +:1022300008EBC100ADF804003020ADF8280095F897 +:102240000C90002CA9F10400C0B20F90EAD061817B +:10225000B5F81080002725E0CDF8008068884B464F +:1022600003AA696900F002FB08EB09001FFA80F875 +:102270006F48007818B1012302E0DDE0DAE00023C6 +:1022800004EBC702009204A90C320F9813F097FBDD +:10229000009ABDF80C007F1C1082009ABDF80E0059 +:1022A000BFB250826089B842D6D8C9E00AA800906F +:1022B00001AB224629463046FFF711FBC0E0307BD8 +:1022C000082805D0FFDF03E0307B082800D0FFDFBF +:1022D000E8891030ADF804003620ADF82800002C55 +:1022E0003FD0A9896181F189A18127E0307B09284C +:1022F00000D0FFDFA88901460C30ADF8040037207C +:10230000ADF82800002C2CD06181E8890090AB89C1 +:10231000688804F10C02296955E0E88939211030F8 +:1023200080B2ADF80400ADF82810002C72D0A98955 +:102330006181287A0E280AD002212173E989E1817E +:10234000288A0090EB8968886969029A3BE001213C +:10235000F3E70AA8009001AB224629463046FFF772 +:1023600055FB6DE0307B0A2800D0FFDFADF804900C +:10237000ADF828704CB3A9896181A4F810B0A4F815 +:102380000EB0012020735BE020E002E030E038E096 +:1023900041E0307B0B2800D0FFDF288AADF82870A1 +:1023A0001230ADF8040084B104212173A989618140 +:1023B000E989E181298A2182688A00902B8A6888CC +:1023C00004F11202696900F051FA39E0307B0C28FF +:1023D00000D0FFDFADF80490ADF828703CB30521C4 +:1023E0002173A4F80AB0A4F80EB0A4F810B027E046 +:1023F0000AA8009001AB224629463046FFF754FA5E +:102400001EE00AA8009001AB224629463046FFF79D +:10241000B3FB15E034E03B21ADF80400ADF8281023 +:1024200074B30120E080A4F808B084F80AB007E093 +:1024300010000020FFDF03E0297A012917D0FFDF19 +:10244000BDF80400AAF800006CB1BDF82800208097 +:10245000BDF804006080BDF82800392803D03C286E +:1024600001D086F80CB011B00020BDE8F08F3C21FF +:10247000ADF80400ADF8281014B1697AA172DFE755 +:10248000AAF80000EFE72DE9F84356880F4680468A +:1024900015460521304611F009FD040000D1FFDF8B +:1024A000123400943B46414630466A680AF02EF8E2 +:1024B000B8E570B50D46052111F0F8FC040000D117 +:1024C000FFDF294604F11200BDE8704009F0B8BEF4 +:1024D00070B50D46052111F0E9FC040000D1FFDFC5 +:1024E000294604F11200BDE8704009F0D6BE70B56F +:1024F0000546052111F0DAFC040000D1FFDF04F1EC +:10250000080321462846BDE870400422AFE470B5B8 +:102510000546052111F0CAFC040000D1FFDF214669 +:1025200028462368BDE870400522A0E470B5064641 +:10253000052111F0BBFC040000D1FFDF04F1120003 +:1025400009F071FE401D20F0030511E0011D008817 +:102550000322431821463046FFF789FC00280BD0A0 +:10256000607BABB2684382B26068011D11F05BFB17 +:10257000606841880029E9D170BD70B50E460546F6 +:1025800007F034F8040000D1FFDF012020726672EA +:102590006580207820F00F00C01C20F0F000303063 +:1025A0002070BDE8704007F024B8602801D00720F3 +:1025B00070470878C54900F0010008700020704796 +:1025C0002DE9F0438BB00D461446814606A9FFF76E +:1025D0008AFB002814D14FF6FF7601274FF42058CC +:1025E0008CB103208DF800001020ADF8100007A872 +:1025F000059007AA204604A913F005FA78B1072030 +:102600000BB0BDE8F0830820ADF808508DF80E70CF +:102610008DF80000ADF80A60ADF80C800CE006986B +:10262000A17801742188C1818DF80E70ADF8085031 +:10263000ADF80C80ADF80A606A4602214846069B58 +:10264000FFF77CFBDCE708B501228DF8022042F69B +:102650000202ADF800200A4603236946FFF731FC69 +:1026600008BD08B501228DF8022042F60302ADF83C +:1026700000200A4604236946FFF723FC08BD00B585 +:1026800087B079B102228DF800200A88ADF80820C1 +:102690004988ADF80A1000236A460521FFF74EFB72 +:1026A00007B000BD1020FBE709B1072309E40720AC +:1026B000704770B588B00D461446064606A9FFF768 +:1026C00012FB00280ED17CB10620ADF808508DF821 +:1026D0000000ADF80A40069B6A460821DC813046BE +:1026E000FFF72CFB08B070BD05208DF80000ADF899 +:1026F0000850F0E700B587B059B107238DF80030D6 +:10270000ADF80820039100236A460921FFF716FB64 +:10271000C6E71020C4E770B588B00C460646002511 +:1027200006A9FFF7E0FA0028DCD106980121123053 +:1027300009F0ABFD9CB12178062921D2DFE801F038 +:10274000200505160318801E80B2C01EE28880B2E4 +:102750000AB1A3681BB1824203D90C20C2E7102042 +:10276000C0E7042904D0A08850B901E00620B9E7E9 +:10277000012913D0022905D004291CD005292AD00B +:102780000720AFE709208DF800006088ADF8080049 +:10279000E088ADF80A00A068039023E00A208DF8D5 +:1027A00000006088ADF80800E088ADF80A00A06875 +:1027B0000A25039016E00B208DF800006088ADF824 +:1027C0000800A088ADF80A00E088ADF80C00A06809 +:1027D0000B25049006E00C208DF8000060788DF841 +:1027E00008000C256A4629463046069BFFF7A6FAE4 +:1027F00078E700B587B00D228DF80020ADF80810FD +:1028000000236A461946FFF799FA49E700B587B0F1 +:1028100071B102228DF800200A88ADF8082049889D +:10282000ADF80A1000236A460621FFF787FA37E75A +:10283000102035E770B586B0064601200D46ADF88C +:1028400008108DF80000014600236A463046FFF765 +:1028500075FA040008D12946304605F0B5FC002180 +:10286000304605F0CFFC204606B070BDF8B51C46DA +:1028700015460E46069F11F04AFC2346FF1DBCB2CA +:1028800031462A46009411F036F8F8BD30B41146AE +:10289000DDE902423CB1032903D0002330BC08F03B +:1028A00032BE0123FAE71A8030BC704770B50C467F +:1028B0000546FFF722FB2146284605F094FC2846F2 +:1028C000BDE87040012105F09DBC00001000002013 +:1028D0004FF0E0224FF400400021C2F88001BFF326 +:1028E0004F8FBFF36F8F1748016001601649900248 +:1028F00008607047134900B500220A600A60124B55 +:102900004FF060721A60002808BF00BD0F4A104BDC +:10291000DFF840C001280CD002281CBFFFDF00BD3B +:10292000032008601A604FF4000000BFCCF80000DC +:1029300000BD022008601A604FF04070F6E700B555 +:10294000FFDF00BD00F5004008F50140A4020020B3 +:1029500014F5004004F5014070B50B2000F0BDF9FE +:10296000082000F0BAF900210B2000F0D4F9002172 +:10297000082000F0D0F9F44C01256560A560002026 +:10298000C4F84001C4F84401C4F848010B2000F029 +:10299000B5F9082000F0B2F90B2000F091F925609C +:1029A00070BD10B50B2000F098F9082000F095F9E3 +:1029B000E548012141608160E4490A68002AFCD1B0 +:1029C0000021C0F84011C0F84411C0F848110B2094 +:1029D00000F094F9BDE81040082000F08FB910B560 +:1029E0000B2000F08BF9BDE81040082000F086B9FC +:1029F00000B530B1012806D0022806D0FFDF002044 +:102A000000BDD34800BDD34800BDD248001D00BD65 +:102A100070B5D1494FF000400860D04DC00BC5F8EB +:102A20000803CF4800240460C5F840410820C4359D +:102A300000F053F9C5F83C41CA48047070BD08B5B0 +:102A4000C14A002128B1012811D002281CD0FFDF83 +:102A500008BD4FF48030C2F80803C2F84803BB48F1 +:102A60003C300160C2F84011BDE80840D0E74FF4A7 +:102A70000030C2F80803C2F84803B448403001608F +:102A8000C2F84411B3480CE04FF48020C2F80803A8 +:102A9000C2F84803AD4844300160C2F84811AD485F +:102AA000001D0068009008BD70B516460D4604462E +:102AB000022800D9FFDF0022A348012304F11001FE +:102AC0008B4000EB8401C1F8405526B1C1F840218C +:102AD000C0F8043303E0C0F80833C1F84021C0F85F +:102AE000443370BD2DE9F0411D46144630B1012834 +:102AF00033D0022838D0FFDFBDE8F081891E0022E4 +:102B000021F07F411046FFF7CFFF012D23D0002099 +:102B1000944D924F012668703E61914900203C39E6 +:102B200008600220091D08608D49042030390860C2 +:102B30008B483D34046008206C6000F0DFF83004FE +:102B4000C7F80403082000F0BBF88349F007091F09 +:102B500008602E70D0E70120DAE7012B02D00022B6 +:102B6000012005E00122FBE7012B04D00022022016 +:102B7000BDE8F04198E70122F9E774480068704722 +:102B800070B500F0D8F8704C0546D4F84001002626 +:102B9000012809D1D4F80803C00305D54FF48030CB +:102BA000C4F80803C4F84061D4F8440101280CD1EA +:102BB000D4F80803800308D54FF40030C4F80803A4 +:102BC000C4F84461012013F0EEFED4F84801012856 +:102BD0000CD1D4F80803400308D54FF48020C4F882 +:102BE0000803C4F84861022013F0DDFE5E4805606A +:102BF00070BD70B500F09FF85A4D0446287850B16A +:102C0000FFF706FF687818B10020687013F0CBFE5C +:102C10005548046070BD0320F8E74FF0E0214FF401 +:102C20000010C1F800027047152000F067B84B494A +:102C300001200861082000F061B848494FF47C1079 +:102C4000C1F808030020024601EB8003C3F84025C9 +:102C5000C3F84021401CC0B20628F5D37047410A92 +:102C600043F609525143C0F3080010FB02F000F58F +:102C7000807001EB5020704710B5430B48F2376469 +:102C800063431B0C5C020C60384C03FB0400384BA4 +:102C90004CF2F72443435B0D13FB04F404EB402098 +:102CA00000F580704012107008681844086010BD6C +:102CB0002C484068704729490120C1F8000270473C +:102CC000002809DB00F01F0201219140400980002B +:102CD00000F1E020C0F80011704700280DDB00F083 +:102CE0001F02012191404009800000F1E020C0F85E +:102CF0008011BFF34F8FBFF36F8F7047002809DB40 +:102D000000F01F02012191404009800000F1E02005 +:102D1000C0F8801270474907090E002804DB00F153 +:102D2000E02080F80014704700F00F0000F1E02070 +:102D300080F8141D70470C48001F00680A4A0D49AE +:102D4000121D11607047000000B0004004B5004043 +:102D50004081004044B1004008F50140008000403F +:102D6000408500403C00002014050240F7C2FFFFF0 +:102D70006F0C0100010000010A4810B50468094900 +:102D800009480831086013F0A2FE0648001D0460DF +:102D900010BD0649002008604FF0E0210220C1F874 +:102DA000800270471005024001000001FC1F004036 +:102DB000374901200860704770B50D2000F049F8D0 +:102DC000344C0020C4F800010125C4F804530D2040 +:102DD00000F050F825604FF0E0216014C1F80001C8 +:102DE00070BD10B50D2000F034F82A480121416073 +:102DF0000021C0F80011BDE810400D2000F03AB8E5 +:102E0000254810B504682449244808310860214940 +:102E1000D1F80001012804D0FFDF1F48001D046025 +:102E200010BD1B48001D00680022C0B2C1F800217F +:102E300014F07FFBF1E710B5164800BFD0F8001181 +:102E40000029FBD0FFF7DCFFBDE810400D2000F0AB +:102E500011B800280DDB00F01F020121914040094C +:102E6000800000F1E020C0F88011BFF34F8FBFF366 +:102E70006F8F7047002809DB00F01F02012191408D +:102E80004009800000F1E020C0F880127047000087 +:102E900004D5004000D000401005024001000001B0 +:102EA0004FF0E0214FF00070C1F8800101F5C071D2 +:102EB000BFF34F8FBFF36F8FC1F80001394B8022F2 +:102EC00083F8002441F8800C704700B502460420C6 +:102ED000354903E001EBC0031B792BB1401EC0B2A2 +:102EE000F8D2FFDFFF2000BD41F8302001EBC00128 +:102EF00000224A718A7101220A7100BD2A4A00210A +:102F000002EBC0000171704710B50446042800D3DD +:102F1000FFDF254800EBC4042079012800D0FFDF43 +:102F20006079A179401CC0B2814200D060714FF03D +:102F3000E0214FF00070C1F8000210BD70B504250B +:102F4000194E1A4C16E0217806EBC1000279012ACD +:102F500008D1427983799A4204D04279827156F835 +:102F6000310080472078401CC0B22070042801D373 +:102F7000002020706D1EEDB2E5D270BD0C4810B57A +:102F800004680B490B4808310860064890F80004B3 +:102F90004009042800D0FFDFFFF7D0FF0448001DE0 +:102FA000046010BD19E000E0E0050020580000209A +:102FB00010050240010000010548064A01689142DF +:102FC00001D1002101600449012008607047000020 +:102FD0005C000020BEBAFECA40E5014070B50C4658 +:102FE000054609F02FFC21462846BDE870400AF04E +:102FF00010BD7047704770470021016081807047A5 +:103000002CFFFFFFDBE5B151007002002301FFFF41 +:103010008C00000078DB6A007A2E9AC67DB66CFAC6 +:10302000F35721CCC310D5E51471FB3C30B5FC4DF2 +:103030000446062CA9780ED2DFE804F0030E0E0E2B +:103040000509FFDF08E0022906D0FFDF04E00329BD +:1030500002D0FFDF00E0FFDFAC7030BD30B50446CA +:103060001038EF4D07280CD2DFE800F0040C060CF6 +:103070000C0C0C00FFDF05E0287E112802D0FFDFDA +:1030800000E0FFDF2C7630BD2DE9F04112F026FE86 +:10309000044614F063F8201AC5B2062010F0AEFE04 +:1030A0000446062010F0B2FE211ADD4C207E1228C4 +:1030B00018D000200F18072010F0A0FE06460720A9 +:1030C00010F0A4FE301A3918207E13280CD00020EE +:1030D0000144A078042809D000200844281AC0B26E +:1030E000BDE8F0810120E5E70120F1E70120F4E7E8 +:1030F000CB4810B590F825004108C94800F12600DA +:1031000005D00EF0F5FEBDE8104006F08CB80EF0CC +:10311000D0FEF8E730B50446A1F120000D460A289C +:103120004AD2DFE800F005070C1C2328353A3F445B +:10313000FFDF42E0207820283FD1FFDF3DE0B848A4 +:103140008178052939D0007E122836D020782428AD +:1031500033D0252831D023282FD0FFDF2DE0207851 +:1031600022282AD0232828D8FFDF26E0207822280A +:1031700023D0FFDF21E0207822281ED024281CD075 +:1031800026281AD0272818D0292816D0FFDF14E0C7 +:103190002078252811D0FFDF0FE0207825280CD0DB +:1031A000FFDF0AE02078252807D0FFDF05E0207840 +:1031B000282802D0FFDF00E0FFDF257030BD1FB5FB +:1031C00004466A46002001F0A5FEB4B1BDF8022015 +:1031D0004FF6FF700621824201D1ADF80210BDF812 +:1031E0000420824201D1ADF80410BDF808108142DC +:1031F00003D14FF44860ADF8080068460FF0E2FADA +:1032000006F011F804B010BD70B516460C46054620 +:10321000FEF71FF848B90CB1B44208D90C2070BDB4 +:1032200055F82400FEF715F808B1102070BD2046AF +:10323000641EE4B2F4D270BD2DE9F04105461F468C +:1032400090460E4600240068FEF750F830B9A98871 +:1032500028680844401EFEF749F808B110203FE7EF +:1032600028680028A88802D0B84202D850E0002878 +:10327000F5D0092034E72968085DB8B1671CCA5D3C +:10328000152A2ED03CDC152A3AD2DFE802F039129A +:10329000222228282A2A313139393939393939391C +:1032A00039392200085D30BB641CA4B2A242F9D8AF +:1032B00033E00228DDD1A01C085C88F80000072854 +:1032C00001D2400701D40A200AE7307840F001001B +:1032D00015E0C143C90707E0012807D010E0062028 +:1032E000FEE60107A1F180510029F5D01846F7E666 +:1032F0003078810701D50B20F2E640F002003070F3 +:103300002868005D384484B2A888A04202D2B0E7A1 +:103310004FF4485382B2A242ADD80020E0E610B587 +:10332000027843F2022354080122022C12D003DC5B +:103330003CB1012C16D106E0032C10D07F2C11D10A +:1033400012E0002011E080790324B4EB901F09D132 +:103350000A700BE08079B2EB901F03D1F8E7807917 +:103360008009F5D0184610BDFF200870002010BD60 +:1033700008B500208DF80000294890F82E1051B1B2 +:1033800090F82F0002280FD003280FD0FFDF00BFD6 +:103390009DF8000008BD22486946253001F009FE6D +:1033A0000028F5D0FFDFF3E7032000E001208DF8CF +:1033B0000000EDE738B50C460546694601F0F9FD19 +:1033C00000280DD19DF80010207861F3470020708F +:1033D00055F8010FC4F80100A888A4F805000020E2 +:1033E00038BD38B5137888B102280FD0FF281BD01C +:1033F0000CA46D46246800944C7905EB9414247851 +:1034000064F347031370032805D010E023F0FE0394 +:1034100013700228F7D1D8B240F001000AE0000092 +:10342000F00100200302FF0143F0FE00107010784D +:1034300020F0010010700868C2F801008888A2F826 +:10344000050038BD022110F031BD38B50C460978B1 +:10345000222901D2082038BDADF800008DF80220E5 +:1034600068460EF087FD05F0DEFE050003D1212140 +:103470002046FFF74FFE284638BD1CB500208DF8CA +:103480000000CDF80100ADF80500FB4890F82E00D3 +:10349000022801D0012000E000208DF807006846D6 +:1034A0000EF0F0FD002800D0FFDF1CBD00220A80D6 +:1034B000437892B263F3451222F040020A8000780A +:1034C0000C282BD2DFE800F02A06090E1116191C71 +:1034D0001F220C2742F0110009E042F01D00088075 +:1034E0000020704742F0110012E042F0100040F05E +:1034F0000200F4E742F01000F1E742F00100EEE7CD +:1035000042F0010004E042F00200E8E742F002006D +:1035100040F00400E3E742F00400E0E707207047D2 +:103520002DE9FF478AB00025BDF82C6082461C4675 +:1035300091468DF81C50700703D56068FDF789FE31 +:1035400068B9CD4F4FF0010897F82E0058B197F8A1 +:103550002F00022807D16068FDF7C8FE18B11020BF +:103560000EB0BDE8F087300702D5A08980283DD88D +:10357000700705D4B9F1000F02D097F8240098B372 +:10358000E07DC0F300108DF81B00627D0720032151 +:103590005AB3012A2CD0022AE2D0042AE0D18DF8B5 +:1035A0001710F00627D4A27D072022B3012A22D0CB +:1035B000022A23D0042AD3D18DF819108DF8159042 +:1035C000606810B307A9FFF7AAFE0028C8D19DF8CC +:1035D0001C00FF2816D0606850F8011FCDF80F10AE +:1035E0008088ADF8130014E000E001E00720B7E7A1 +:1035F0008DF81780D5E78DF81980DFE702208DF868 +:103600001900DBE743F20220AAE7CDF80F50ADF82E +:103610001350E07B40B9207C30B9607C20B9A07C9D +:1036200010B9E07CC00601D0062099E78DF800A013 +:10363000BDF82C00ADF80200A0680190A0680290CF +:1036400004F10F0001F0A9FC8DF80C00FFF790FECB +:103650008DF80D009DF81C008DF80E008DF81650A9 +:103660008DF81850E07D08A900F00F008DF81A00C1 +:1036700068460FF0E3F905F0D6FD71E7F0B58FB0BD +:1036800000258DF830508DF814508DF834500646D2 +:103690008DF82850019502950395049519B10FC92D +:1036A00001AC84E80F00744CA078052801D00428F0 +:1036B0000CD101986168884200D120B90398E16873 +:1036C000884203D110B108200FB0F0BD207DC006A4 +:1036D00001D51F2700E0FF273B460DAA05A903A837 +:1036E000FFF7AAFD0028EFD1A08AC10702D0C006CB +:1036F00000D4EE273B460AAA0CA901A8FFF79CFDBF +:103700000028E1D19DF81400C00701D00A20DBE7B2 +:10371000A08A410708D4A17D31B19DF828108907FE +:1037200002D043F20120CFE79DF82810C90709D045 +:10373000400707D4208818B144F25061884201D96B +:103740000720C1E78DF818508DF81960BDF8080002 +:10375000ADF81A000198079006A80FF07BF905F064 +:1037600062FD0028B0D18DF820508DF82160BDF8A1 +:103770001000ADF822000398099008A80FF08CF90A +:1037800005F051FD00289FD101AD241D95E80F00E3 +:1037900084E80F00002097E770B586B00D4604005E +:1037A00005D0FDF7A3FD20B1102006B070BD0820A4 +:1037B000FBE72078C107A98802D0FF2902D303E0E4 +:1037C0001F2901D20920F0E7800763D4FFF75CFCD2 +:1037D00038B12178C1F3C100012804D0032802D0F8 +:1037E00005E01320E1E7244890F82400C8B1C80799 +:1037F0004FF001064FF0000502D08DF80F6001E098 +:103800008DF80F50FFF7B4FD8DF800002078694661 +:10381000C0F3C1008DF8010060788DF80250C20835 +:1038200001D00720C1E730B3C20701D08DF8026094 +:10383000820705D59DF8022042F002028DF8022091 +:10384000400705D59DF8020040F004008DF8020005 +:10385000002022780B18C2F38002DA7001EB4002DC +:103860006388D380401CA388C0B253810228F0D360 +:10387000207A78B905E001E0F00100208DF80260BF +:10388000E6E7607A30B9A07A20B9E07A10B9207BF7 +:10389000C00601D0062088E704F1080001F07DFB96 +:1038A0008DF80E0068460EF0F6FC05F0BCFC002812 +:1038B00089D18DF810608DF81150E088ADF81200B4 +:1038C000ADF8145004A80EF039FD05F0ACFC00284A +:1038D00088D12078C00701D0152000E01320FFF721 +:1038E000BDFB002061E72DE9FF470220FD4E8DF86A +:1038F00004000027708EADF80600B84643F20209B6 +:103900004CE001A810F039FA050006D0708EA8B37B +:10391000A6F83280ADF806803EE0039CA07F010748 +:103920002DD504F124000090A28EBDF80800214698 +:1039300004F1360301F0BCFC050005D04D452AD04A +:10394000112D3CD0FFDF3AE0A07F20F00801E07F9E +:10395000420862F3C711A177810861F30000E077A4 +:1039600094F8210000F01F0084F820002078282817 +:1039700026D129212046FFF7CDFB21E014E04007A6 +:103980000AD5BDF8080004F10E0101F01CFB05008A +:103990000DD04D4510D100257F1CFFB2022010F044 +:1039A0002DFA401CB842ACD8052D11D008E0A07FFC +:1039B00020F00400A07703E0112D00D0FFDF0025E8 +:1039C000BDF806007086052D04D0284604B0C8E571 +:1039D000A6F832800020F9E770B50646FFF732FD01 +:1039E000054605F003FE040000D1FFDF6680207865 +:1039F00020F00F00801C20F0F00020302070032009 +:103A0000207295F83E006072BDE8704005F0F1BD8F +:103A10002DE9F04786B0040000D1FFDF2078B14DDA +:103A200020F00F00801C20F0F000703020706068E3 +:103A30000178491F1B2933D2DFE801F0FE32323210 +:103A400055FD320EFDFD42FC32323278FCFCFBFAB1 +:103A500032FCFCF9F8FCFC00C6883046FFF7F2FCAB +:103A60000546304607F045FCE0B16068007A85F80D +:103A70003E0021212846FFF74DFB3046FEF75AFB5A +:103A8000304603F0D7FE3146012014F017F8A87F26 +:103A900020F01000A877FFF726FF002800D0FFDFF6 +:103AA00006B05EE5207820F0F00020302070032082 +:103AB000207266806068007A607205F09AFDD8E72F +:103AC000C5882846FFF7BEFC00B9FFDF60680079B3 +:103AD000012800D0FFDF6068017A06B02846BDE803 +:103AE000F04707F0EBBDC6883046FFF7ABFC05009A +:103AF00000D1FFDF05F07DFD606831460089288137 +:103B000060684089688160688089A881012013F01D +:103B1000D5FF0020A875A87F00F003000228BFD1C0 +:103B2000FFF7E1FE0028BBD0FFDFB9E7007928B13D +:103B30000228B5D03C28B3D0FFDFB1E705F059FD2E +:103B40006668B6F806A0307A361D012806D0687E71 +:103B5000814605F0D4FA070003D101E0E878F7E7E1 +:103B6000FFDF00220221504610F097F9040000D137 +:103B7000FFDF22212046FFF7CDFA3079012800D05F +:103B80000220A17F804668F30101A177308B20815C +:103B9000708B6081B08BA08184F822908DF80880B2 +:103BA000B8680090F86801906A460321504610F00A +:103BB00074F900B9FFDFB888ADF81000B8788DF857 +:103BC000120004AA0521504610F067F900B9FFDF82 +:103BD000B888ADF80C00F8788DF80E0003AA04211F +:103BE000504610F05AF900B9FFDF062106F1120025 +:103BF0000DF00EF940B37079800700D5FFDF7179C1 +:103C0000E07D61F34700E075D6F80600A061708999 +:103C1000A083062106F10C000DF0FAF8F0B195F83A +:103C200025004108607861F3470006E041E039E093 +:103C300071E059E04EE02FE043E06070D5F82600D7 +:103C4000C4F80200688D12E0E07D20F0FE00801CC8 +:103C5000E075D6F81200A061F08AD9E7607820F00C +:103C6000FE00801C6070F068C4F80200308AE080BA +:103C7000B8F1010F04D0B8F1020F05D0FFDF0FE754 +:103C80000320FFF7D3F90BE7287E122800D0FFDFCF +:103C90001120FFF7E3F903E706B02046BDE8F0473F +:103CA00001F092BD05F0A5FC15F8300F40F00200C0 +:103CB00005E005F09EFC15F8300F40F00400287078 +:103CC000EEE6287E13280AD01528D8D15FF016001A +:103CD000FFF7C4F906B0BDE8F04705F08ABC142030 +:103CE000F6E70000F0010020A978052909D0042991 +:103CF000C5D105F07EFC022006B0BDE8F047FFF715 +:103D000095B900790028BAD0E87801F02DF905F0CE +:103D100070FC0320F0E7287E122802D1687E01F0B3 +:103D200023F91120D4E72DE9F05F054600784FF024 +:103D300000080009DFF8B8A891460C46464601285D +:103D40006ED002286DD007280BD00A286AD0FFDF7A +:103D5000A9F8006014B1A4F8008066800020BDE8D6 +:103D6000F09F6968012704F108000B784FF0020BFF +:103D70005B1F4FF6FF721B2B7ED2DFE803F0647DE2 +:103D80007D7D0E7D7D7D7D7D7D217D7D7D2BFDFC81 +:103D9000FBFA7D14D2F9E7F8F700C8884FF0120853 +:103DA000102621469AE14FF01C080A26BCB38888E9 +:103DB000A0806868807920726868C0796072C7E7FF +:103DC0004FF01B08142654B30320207268688088C3 +:103DD000A080BDE70A793C2ABAD00D1D4FF010082B +:103DE0002C26E4B16988A180298B6182298B2182EC +:103DF000698BA182A98BE1826B790246A91D1846C5 +:103E0000FFF7EFFA2979002001290CD084F80FB0D0 +:103E1000FF212176E06120626062A06298E70FE0F6 +:103E20003BE15EE199E1E77320760AF1040090E856 +:103E30000E00DAF81000C4E90930C4E9071287E778 +:103E4000A9F800608AE72C264FF01D08002CF7D057 +:103E5000A28005460F1D897B008861F30000288041 +:103E6000B97A490861F341002880B97A890861F379 +:103E700082002880B97A00E00CE1C90861F3C30030 +:103E80002880B97AAA1C0911491C61F3041000F0BA +:103E90007F0028807878B91CFFF7A3FA387D05F1F8 +:103EA000090207F11501FFF79CFA387B01F0A9F828 +:103EB0002874787B01F0A5F86874F87EA874787A85 +:103EC000E874387F2875B87B6875388AE882DAF834 +:103ED0001C10A961B97A504697F808A0C1F34111A6 +:103EE000012904D0008C504503D2824609E0FFDF4F +:103EF00010E0022903D0288820F0600009E0504536 +:103F000004D1288820F06000403002E0288840F08A +:103F100060002880A4F824A0524607F11D01A8697A +:103F20009BE011264FF02008002C89D0A280686801 +:103F300004F10A02007920726868007B6072696887 +:103F40008B1D48791946FFF74CFA01E70A264FF016 +:103F50002108002CE9D08888A080686880792072C8 +:103F60006868C07960729AF8301006E078E06BE01B +:103F700052E07FE019E003E03AE021F00401A6E01E +:103F80000B264FF02208002CCFD0C888A08068688C +:103F9000007920726868007A01F033F8607268680E +:103FA000407A01F02EF8A072D2E61C264FF02608C7 +:103FB000002CBAD0A2806868407960726868007A84 +:103FC000A0720AF1040090E80E00DAF81000C4E9CB +:103FD0000530C4E90312686800793C2803D04328FF +:103FE00003D0FFDFB4E62772B2E684F808B0AFE68C +:103FF00010264FF02408002C97D08888A08068688D +:10400000807920816868807A608168680089A081F1 +:1040100068688089E0819BE610264FF02308002C19 +:1040200098D08888A0806868C088208168680089E6 +:10403000608168684089A08168688089E0819AF819 +:10404000301021F0020142E030264FF02508002C0C +:104050009AD0A2806968282249680AF0EEF977E6CA +:104060002A264FF02F08002C8ED0A28069682222C9 +:10407000091DF2E714264FF01B08002C84D0A28003 +:10408000686800790128B0D02772DAE90710C4E91E +:1040900003105DE64A46214660E0287A012803D0F5 +:1040A000022817D0FFDF53E610264FF01F08002C20 +:1040B000A2D06888A080A8892081E8896081288AA8 +:1040C000A081688AE0819AF8301021F001018AF815 +:1040D00030103DE64FF012081026688800F07EFF91 +:1040E00036E6287AC8B3012838D0022836D003280B +:1040F00001D0FFDF2CE609264FF01108002C8FD0ED +:104100006F883846FFF79EF990F822A0A780687A5A +:104110002072042138460FF0DBFE052138460FF0EF +:10412000D7FE002138460FF0D3FE012138460FF0AC +:10413000CFFE032138460FF0CBFE022138460FF0A8 +:10414000C7FE062138460FF0C3FE072138460FF0A0 +:10415000BFFE504600F008FFFAE5FFE72846BDE83D +:10416000F05F01F0BBBC70B5012803D0052800D07A +:10417000FFDF70BD8DB22846FFF764F9040000D15F +:10418000FFDF20782128F4D005F030FA80B10178E3 +:1041900021F00F01891C21F0F00110310170022182 +:1041A000017245800020A075BDE8704005F021BA7D +:1041B00021462846BDE870401322FFF746B92DE995 +:1041C000F04116460C00804600D1FFDF307820F029 +:1041D0000F00801C20F0F000103030702078012893 +:1041E00004D0022818D0FFDFBDE8F0814046FFF779 +:1041F00029F9050000D1FFDF0320A87505F0F9F9C2 +:1042000094E80F00083686E80F00F94810F8301FD0 +:1042100041F001010170E7E74046FFF713F905009F +:1042200000D1FFDFA1884FF6FF700027814202D145 +:10423000E288824203D0814201D1E08840B105F09A +:10424000D8F994E80F00083686E80F00AF75CBE781 +:10425000A87D0128C8D178230022414613F084FBB1 +:104260000220A875C0E738B50C4624285CD008DCCD +:1042700020280FD0212825D022284BD0232806D152 +:104280004CE0252841D0262832D03F2851D00725A0 +:10429000284638BD0021052013F0E6FB08B11120A7 +:1042A00038BDA01C0EF0E1FA04F0BDFF0500EFD10F +:1042B000002208231146052013F056FB0528E7D0FD +:1042C000FFDFE5E76068FDF708F808B1102038BDAA +:1042D000618820886A460EF071FD04F0A4FF050095 +:1042E000D6D160680028D3D0BDF800100180CFE798 +:1042F000206820B1FCF7FAFF08B11025C8E7204676 +:104300000EF03BFE1DE00546C2E7A17820880EF0C6 +:1043100086FD16E0086801F08DFEF4E7087800F0ED +:1043200001000DF0B9FD0CE0618820880EF0C1FCA1 +:1043300007E0087800F001008DF8000068460EF0F4 +:10434000DFF804F070FFDEE770B505460C4608465E +:10435000FCF7A5FF08B1102070BD202D07D0212D3E +:104360000DD0222D0BD0252D09D0072070BD20881F +:10437000A11C0DF065FEBDE8704004F054BF06209E +:1043800070BD9B482530704708B5342200219848FD +:104390000AF07DF80120FEF749FE1120FEF75EFECF +:1043A00093496846263105F0B7F891489DF80020FA +:1043B00010F8251F62F3470121F00101017000216F +:1043C00041724FF46171A0F8071002218172FEF76B +:1043D0008FFE00B1FFDFFDF705F801F0BEF908BD63 +:1043E00010B50C464022002120460AF050F8A07F6C +:1043F00020F00300A077202020700020A07584F812 +:10440000230010BD70472DE9FC410746FCF721FF52 +:1044100010B11020BDE8FC81754E06F12501D6F8DB +:1044200025000090B6F82950ADF8045096F82B40BE +:104430008DF806403846FEF7BDFF0028EAD1FEF7AA +:1044400057FE0028E6D0009946F8251FB580B471C4 +:10445000E0E710B50446FCF722FF08B1102010BDBC +:1044600063486349224690F8250026314008FEF74C +:10447000B8FF002010BD3EB504460D460846FCF7C7 +:104480000EFF08B110203EBD14B143F204003EBD42 +:1044900057488078052803D0042801D008203EBD65 +:1044A000694602A80AF012FC2A4669469DF80800EF +:1044B000FEF797FF00203EBDFEB50D4604004FF00D +:1044C000000712D00822FEF79FFE002812D1002616 +:1044D00009E000BF54F826006946FEF720FF0028D7 +:1044E00008D1761CF6B2AE42F4D30DF01CFC10B12C +:1044F00043F20320FEBD3E4E86F824700CB3002725 +:104500001BE000BF54F8270002A9FEF708FF00B126 +:10451000FFDF9DF808008DF8000054F8270050F8E0 +:10452000011FCDF801108088ADF8050068460DF038 +:104530001FFC00B1FFDF7F1CFFB2AF42E2D386F861 +:1045400024500020FEBD2DE9F0418AB01546884672 +:1045500004001ED00F4608222946FEF755FE00280B +:1045600011D1002613E000BF54F826006946103030 +:1045700000F01FFD002806D13FB157F82600FCF7D8 +:1045800068FE10B110200AB02EE6761CF6B2AE42DC +:10459000EAD3681EC6B217E0701CC7B212E000BFB3 +:1045A00054F82600017C4A0854F827100B7CB2EB23 +:1045B000530F05D106221130113109F011FF50B10E +:1045C0007F1CFFB2AF42EBD3761EF6B2E4D2464672 +:1045D00024B1012003E043F20520D4E700200DF0D0 +:1045E000ECFB10B90DF0F5FB20B143F20420CAE753 +:1045F000F001002064B300270DF1170826E000BF8A +:1046000054F827006946103000F0D3FC00B1FFDFFA +:1046100054F82700102250F8111FCDF8011080889F +:10462000ADF8050054F827100DF1070009F005FF5B +:1046300096B156F827101022404609F0FEFE684653 +:104640000DF07BFB00B1FFDF7F1CFFB2AF42D7D381 +:10465000FEF713FF002096E7404601F0DFFCEEE78F +:1046600030B585B00446FDF7BDF830B906200FF02F +:10467000C5FB10B1062005B030BD2046FCF7E9FDB2 +:1046800018B96068FCF732FE08B11020F3E76088C3 +:104690004AF2B811884206D82078F94D28B101288D +:1046A00006D0022804D00720E5E7FEF721FD18E038 +:1046B0006078022804D0032802D043F20220DAE70F +:1046C00085F82F00C1B200200090ADF80400022947 +:1046D0002CD0032927D0FFDF68460DF009FC04F039 +:1046E000A2FD0028C7D1606801F08BFC207858B18A +:1046F00001208DF800000DF1010001F08FFC6846EB +:104700000EF0FDFB00B1FFDF207885F82E00FEF7EC +:10471000B4FE608860B1A88580B20DF046FB00B1A0 +:10472000FFDF0020A7E78DF80500D5E74020FAE776 +:104730004FF46170EFE710B50446FCF7B0FD20B907 +:10474000606838B1FCF7C9FD08B1102010BD606881 +:1047500001F064FCCA4830F82C1F6180C178617098 +:1047600080782070002010BD2DE9F843144689465A +:104770000646FCF794FDA0B94846FCF7B7FD80B9A2 +:104780002046FCF7B3FD60B9BD4DA878012800D1E3 +:104790003CB13178FF2906D049B143F20400BDE8AD +:1047A000F8831020FBE7012801D00420F7E7CCB301 +:1047B000052811D004280FD069462046FEF776FE62 +:1047C0000028ECD1217D49B1012909D0022909D065 +:1047D000032909D00720E2E70820E0E7024604E0C9 +:1047E000012202E0022200E003228046234617460F +:1047F00000200099FEF794FE0028D0D1A0892880DF +:10480000A07BE875BDF80000A882AF75BDF8001068 +:10481000090701D5A18931B1A1892980C00704D038 +:10482000032003E006E08021F7E70220FEF7FEFB0D +:1048300086F800804946BDE8F8430020FEF71EBF19 +:104840007CB58F4C05460E46A078022803D003287D +:1048500001D008207CBD15B143F204007CBD0720C7 +:104860000FF0D4FA10B9A078032806D0FEF70CFC9C +:1048700028B1A078032804D009E012207CBD1320C1 +:104880007CBD304600F053FB0028F9D1E670FEF7FE +:104890006FFD0AF058F901208DF800008DF8010035 +:1048A0008DF802502088ADF80400E07D8DF80600F8 +:1048B00068460EF0C1F904F0B6FC0028E0D1A078FB +:1048C000032805D05FF00400FEF7B0FB00207CBD9C +:1048D000E07800F03CFB0520F6E71CB510B143F290 +:1048E00004001CBD664CA078042803D0052801D024 +:1048F00008201CBD00208DF8000001218DF801105A +:104900008DF8020068460EF097F904F08CFC002840 +:10491000EFD1A078052805D05FF00200FEF786FBF6 +:1049200000201CBDE07800F01FFB0320F6E72DE916 +:10493000FC4180460E4603250846FCF7D7FC0028BC +:1049400066D14046FEF77EFD040004D02078222880 +:1049500004D208205EE543F202005BE5A07F00F090 +:1049600003073EB1012F0CD000203146FEF727FC93 +:104970000500EFD1012F06D0022F1AD0FFDF284605 +:1049800048E50120F1E7A07D3146022801D011B1B0 +:1049900007E011203EE56846FCF758FE0028D9D113 +:1049A0006946404606F04DFE0500E8D10120A0759D +:1049B000E5E7A07D032804D1314890F83000C00716 +:1049C00001D02EB30EE026B1A07F40071ED40021F7 +:1049D00000E00121404606F054FE0500CFD1A0754D +:1049E000002ECCD03146404600F0EDFA05461128A5 +:1049F000C5D1A07F4107C2D4316844F80E1F716849 +:104A0000616040F0040020740025B8E71125B6E786 +:104A10001020FFE470B50C460546FEF713FD0100BB +:104A200005D022462846BDE87040FEF70EBD43F291 +:104A3000020070BD10B5012807D1114B9B78012BE6 +:104A400000D011B143F2040010BD0DF0E0F9BDE853 +:104A5000104004F0E8BB012300F090BA00231A468E +:104A6000194600F08BBA70B506460C460846FCF7AE +:104A7000F0FB18B92068FCF712FC18B1102070BDCB +:104A8000F0010020F84D2A7E112A04D0132A00D309 +:104A90003EB10820F3E721463046FEF77DFE60B1C7 +:104AA000EDE70920132A0DD0142A0BD0A188FF2985 +:104AB000E5D31520FEF7D2FA0020D4E90012C5E9AB +:104AC0000712DCE7A1881F29D9D31320F2E71CB510 +:104AD000E548007E132801D208201CBD00208DF877 +:104AE000000068460DF02AFC04F09DFB0028F4D17C +:104AF0001120FEF7B3FA00201CBD2DE9F04FDFF8BE +:104B000068A3814691B09AF818009B4615460C465A +:104B1000132803D3FFF7DBFF00281FD12046FCF743 +:104B200098FBE8BB2846FCF794FBC8BB20784FF005 +:104B30000107C0074FF0000102D08DF83A7001E084 +:104B40008DF83A1020788846C0F3C1008DF8000037 +:104B500060788DF80910C10803D0072011B0BDE8B6 +:104B6000F08FB0B3C10701D08DF80970810705D56A +:104B70009DF8091041F002018DF80910400705D594 +:104B80009DF8090040F004008DF809009DF8090027 +:104B9000810703D540F001008DF80900002000E0F6 +:104BA00015E06E4606EB400162884A81401CA288EF +:104BB000C0B20A820328F5D32078C0F3C1000128CF +:104BC00025D0032823D04846FCF743FB28B110200A +:104BD000C4E7FFE78DF80970D8E799F800004008AE +:104BE00008D0012809D0022807D0032805D043F2B5 +:104BF0000220B3E78DF8028001E08DF8027048468C +:104C000050F8011FCDF803108088ADF80700FEF7BB +:104C1000AFFB8DF801000021424606EB41002B88D6 +:104C2000C3826B888383AB884384EB880385491CEC +:104C3000C285C9B282860329EFD3E088ADF83C0073 +:104C400068460DF053FC002887D19AF818005546A5 +:104C5000112801D0082081E706200FF0D7F838B1DD +:104C60002078C0F3C100012804D0032802D006E058 +:104C7000122073E795F8240000283FF46EAFFEF78A +:104C800003FA022801D2132068E7584600F04FF9D2 +:104C900000289DD185F819B068460DF06DFD04F02F +:104CA000C2FA040094D1687E00F051F91220FEF798 +:104CB000D5F9204652E770B56B4D287E122801D0F9 +:104CC0000820DCE60DF05BFD04F0ADFA040005D130 +:104CD000687E00F049F91120FEF7C0F92046CEE6C3 +:104CE00070B5064615460C460846FCF7D8FA18B9C2 +:104CF0002846FCF7D4FA08B11020C0E62A4621461F +:104D000030460EF03BF804F08EFA0028F5D12178F9 +:104D10007F29F2D10520B2E67CB505460C4608464F +:104D2000FCF797FA08B110207CBD2846FEF78AFBF5 +:104D300020B10078222804D208207CBD43F2020072 +:104D40007CBD494890F83000400701D511207CBD5A +:104D50002078C00802D16078C00801D007207CBD4F +:104D6000ADF8005020788DF8020060788DF80300CF +:104D70000220ADF8040068460CF03BFE04F053FA44 +:104D80007CBD70B586B014460D460646FEF75AFB4C +:104D900028B10078222805D2082006B06FE643F239 +:104DA0000200FAE72846FCF7A1FA20B944B12046F0 +:104DB000FCF793FA08B11020EFE700202060A080F4 +:104DC000294890F83000800701D51120E5E703A9B4 +:104DD00030460CF05EFE10B104F025FADDE7ADF8C8 +:104DE0000060BDF81400ADF80200BDF81600ADF883 +:104DF0000400BDF81000BDF81210ADF80600ADF8C3 +:104E000008107DB1298809B1ADF80610698809B18B +:104E1000ADF80210A98809B1ADF80810E98809B108 +:104E2000ADF80410DCB1BDF80610814201D9081AB2 +:104E30002080BDF80210BDF81400814201D9081A83 +:104E40006080BDF80800BDF80410BDF816200144CC +:104E5000BDF812001044814201D9081AA0806846AA +:104E60000CF0D5FEB8E70000F00100201CB56C493D +:104E70000968CDE9001068460DF03AFB04F0D3F95B +:104E80001CBD1CB500200090019068460DF030FB61 +:104E900004F0C9F91CBD70B505460C460846FCF780 +:104EA000FEF908B11020EAE5214628460DF012F976 +:104EB000BDE8704004F0B7B93EB505460C4608465B +:104EC000FCF7EDF908B110203EBD002000900190E4 +:104ED0000290ADF800502089ADF8080020788DF8D8 +:104EE0000200606801902089ADF808006089ADF883 +:104EF0000A0068460DF000F904F095F93EBD0EB5C4 +:104F0000ADF800000020019068460DF0F5F804F0BF +:104F10008AF90EBD10800888508048889080C88823 +:104F200010818888D080002050819081704710B512 +:104F3000044604F0E4F830B1407830B1204604F083 +:104F4000FCFB002010BD052010BD122010BD10B5C7 +:104F500004F0D5F8040000D1FFDF607800B9FFDF6E +:104F60006078401E607010BD10B504F0C8F80400F1 +:104F700000D1FFDF6078401C607010BD1CB5ADF83B +:104F800000008DF802308DF803108DF8042068467B +:104F90000DF0B7FE04F047F91CBD0CB521A2D2E913 +:104FA0000012CDE900120079694601EB501000783B +:104FB0000CBD0278520804D0012A02D043F202202C +:104FC0007047FEF7ACB91FB56A46FFF7A3FF684606 +:104FD0000DF008FC04F027F904B010BD70B50C000A +:104FE00006460DD0FEF72EFA050000D1FFDFA680A1 +:104FF00028892081288960816889A081A889E08129 +:105000003DE500B540B1012805D0022803D00328B2 +:1050100004D0FFDF002000BDFF2000BD042000BD44 +:1050200014610200070605040302010010B50446DE +:10503000FCF70FF908B1102010BD2078C0F3021062 +:10504000042807D86078072804D3A178102901D84C +:10505000814201D2072010BDE078410706D42179B2 +:105060004A0703D4000701D4080701D5062010BD64 +:10507000002010BD10B513785C08837F64F3C7135C +:10508000837713789C08C37F64F30003C377107899 +:10509000C309487863F34100487013781C090B7802 +:1050A00064F347130B701378DB0863F30000487058 +:1050B0005078487110BD10B5C4780B7864F30003C4 +:1050C0000B70C478640864F341030B70C478A408BF +:1050D00064F382030B70C478E40864F3C3030B70B9 +:1050E0000379117863F30001117003795B0863F3AE +:1050F0004101117003799B0863F3820111700079FB +:10510000C00860F3C301117010BD70B514460D46A0 +:10511000064604F06BFA80B10178182221F00F01E5 +:10512000891C21F0F001A03100F8081B214609F08C +:1051300084F9BDE8704004F05CBA29463046BDE809 +:1051400070401322FEF781B92DE9F047064608A802 +:10515000904690E8300489461F46142200212846D4 +:1051600009F095F90021CAF80010B8F1000F03D03A +:10517000B9F1000F03D114E03878C00711D02068CE +:10518000FCF78DF8C0BBB8F1000F07D120681230D2 +:1051900028602068143068602068A8602168CAF818 +:1051A00000103878800724D56068FCF796F818BBA3 +:1051B000B9F1000F21D0FFF7E4F80168C6F86811D3 +:1051C0008188A6F86C11807986F86E0101F013FDD4 +:1051D000F94FEF60626862B196F8680106F26911F2 +:1051E00040081032FEF7FDF810223946606809F0D9 +:1051F00024F90020BDE8F08706E0606820B1E8608F +:105200006068C6F86401F4E71020F3E730B505469E +:1052100008780C4620F00F00401C20F0F0011031FF +:1052200021700020607095F8230030B104280FD061 +:10523000052811D0062814D0FFDF20780121B1EB1A +:10524000101F04D295F8200000F01F00607030BDE0 +:1052500021F0F000203002E021F0F000303020702A +:10526000EBE721F0F0004030F9E7F0B591B002270C +:1052700015460C4606463A46ADF80870092103ABC0 +:1052800005F063F80490002810D004208DF8040085 +:105290008DF80170E034099605948DF818500AA92C +:1052A000684610F0FCFA00B1FFDF012011B0F0BD3C +:1052B00010B588B00C460A99ADF80000CBB118685B +:1052C000CDF80200D3F80400CDF80600ADF80A20AE +:1052D000102203A809F0B1F868460DF0F3FA03F0C4 +:1052E000A2FF002803D1A17F41F01001A17708B0EF +:1052F00010BD0020CDF80200E6E72DE9F84F064684 +:10530000808A0D4680B28246FEF79CF804463078CB +:10531000DFF8A48200274FF00209A8F120080F2827 +:1053200070D2DFE800F06FF23708387D8CC8F1F0FA +:10533000EFF35FF3F300A07F00F00300022809D031 +:105340005FF0000080F0010150460EF0AFFD050057 +:1053500003D101E00120F5E7FFDF98F85C10C907F1 +:1053600002D0D8F860000BE0032105F11D0012F017 +:10537000BEF8D5F81D009149B0FBF1F201FB120017 +:10538000C5F81D0070686867B068A8672078252890 +:1053900000D0FFDFCAE0A07F00F00300022809D0A0 +:1053A0005FF0000080F0010150460EF07FFD060026 +:1053B00003D101E00120F5E7FFDF3078810702D556 +:1053C0002178252904D040F001003070BDE8F88F25 +:1053D00085F80090307F287106F11D002D36C5E953 +:1053E0000206F3E7A07F00F00300022808D00020A7 +:1053F00080F0010150460EF059FD040004D102E096 +:105400000120F5E7A7E1FFDF2078C10604D50720DA +:1054100028703D346C60D9E740F008002070D5E773 +:10542000E07F000700D5FFDF307CB28800F0010389 +:1054300001B05046BDE8F04F092106F064B804B948 +:10544000FFDF716821B1102204F1240008F0F5FF9C +:1054500028212046FDF75EFEA07F00F00300022811 +:105460000ED104F12400002300901A462146504634 +:10547000FFF71EFF112807D029212046FDF74AFE1D +:10548000307A84F82000A1E7A07F000700D5FFDF75 +:1054900014F81E0F40F008002070E782A761E76152 +:1054A000C109607861F34100014660F382016170D7 +:1054B000307AE0708AE7A07F00F00300022809D06C +:1054C0005FF0000080F0010150460EF0EFFC040098 +:1054D00003D101E00120F5E7FFDF022104F185009F +:1054E00012F005F80420287004F5B4706860B4F870 +:1054F00085002882304810387C346C61C5E9028010 +:1055000064E703E024E15BE02DE015E0A07F00F01C +:105510000300022807D0002080F0010150460EF061 +:10552000C5FC18B901E00120F6E7FFDF324621464D +:105530005046BDE8F84FE8E504B9FFDF20782128A0 +:10554000A1D93079012803D1E07F40F00800E0774D +:10555000324621465046FFF7D8FD2046BDE8F84FB9 +:105560002321FDF7D7BD3279AA8005F1080309216F +:10557000504604F0EAFEE86010B10520287025E7E7 +:10558000A07F00F00300022808D0002080F0010175 +:1055900050460EF08BFC040003D101E00120F5E73A +:1055A000FFDF04F1620102231022081F0EF005FB49 +:1055B00007703179417009E75002002040420F0026 +:1055C000A07F00F00300022808D0002080F0010135 +:1055D00050460EF06BFC050003D101E00120F5E719 +:1055E000FFDF95F8840000F0030001287AD1A07F46 +:1055F00000F00307E07F10F0010602D0022F04D173 +:1056000033E095F8A000C0072BD0D5F8601121B386 +:1056100095F88320087C62F387000874A17FCA098B +:10562000D5F8601162F341000874D5F8601166F393 +:1056300000000874AEB1D5F86001102204F1240115 +:10564000883508F0FAFE287E40F001002876287898 +:1056500020F0010005F8880900E016B1022F04D0FF +:105660002DE095F88800C00727D0D5F85C1121B34C +:1056700095F88320087C62F387000874A17FCA092B +:10568000D5F85C1162F341000874D5F85C1166F33B +:10569000000008748EB1D5F85C01102204F12401D9 +:1056A000883508F0CAFE287840F0010005F8180B8C +:1056B000287820F0010005F8A009022F44D000202E +:1056C00000EB400005EBC00090F88800800709D58A +:1056D00095F87C00D5F86421400805F17D01103271 +:1056E000FDF77FFE8DF8009095F884006A4600F083 +:1056F00003008DF8010095F888108DF8021095F8D8 +:10570000A0008DF803002146504601F05DFA207894 +:10571000252805D0212807D0FFDF2078222803D9AB +:1057200022212046FDF7F6FCA07F00F003000228AE +:105730000CD0002080F0010150460EF0C9FB00287B +:105740003FF44FAEFFDF41E60120B9E70120F1E76A +:10575000706847703AE6FFDF38E670B5FE4C00250A +:1057600084F85C50256610F066F804F110012046BC +:1057700003F0F8FE84F8305070BD70B50D46FDF7AB +:1057800061FE040000D1FFDF4FF4B872002128460B +:1057900008F07DFE04F124002861A07F00F00300E2 +:1057A000022809D05FF0010105F1E00010F044F893 +:1057B000002800D0FFDF70BD0221F5E70A46014650 +:1057C00002F1E00010F059B870B50546406886B0A7 +:1057D00001780A2906D00D2933D00E292FD0FFDFFA +:1057E00006B070BD86883046FDF72CFE040000D15F +:1057F000FFDF20782128F3D028281BD168680221F8 +:105800000E3001F0D6F9A8B168680821801D01F0BA +:10581000D0F978B104F1240130460DF00FFA03F00D +:1058200002FD00B1FFDF06B02046BDE8704029212F +:10583000FDF770BC06B0BDE8704003F0DABE012190 +:1058400001726868C6883046FDF7FCFD040000D18F +:10585000FFDFA07F00F00301022902D120F0100039 +:10586000A077207821280AD06868017A09B10079E8 +:1058700080B1A07F00F00300022862D0FFDFA07F8C +:1058800000F003000228ABD1FEF72DF80028A7D0C6 +:10589000FFDFA5E703F0ADFEA17F08062BD5E07F73 +:1058A000C00705D094F8200000F01F00102820D079 +:1058B0005FF0050084F82300207829281DD02428D3 +:1058C000DDD13146042012F0F9F822212046FDF7FF +:1058D00021FCA07F00F00300022830D05FF0000020 +:1058E00080F0010130460EF0F3FA0028C7D0FFDF48 +:1058F000C5E70620DEE70420DCE701F0030002280C +:1059000008D0002080F0010130460EF0CFFA0500EB +:1059100003D101E00120F5E7FFDF25212046FDF757 +:10592000F9FB03208DF80000694605F1E0000FF057 +:105930009BFF0228A3D00028A1D0FFDF9FE7012012 +:10594000CEE703F056FE9AE72DE9F04387B099467B +:10595000164688460746FDF775FD04004BD02078B3 +:10596000222848D3232846D0E07F000743D4A07FD5 +:1059700000F00300022809D05FF0000080F0010170 +:1059800038460EF093FA050002D00CE00120F5E74E +:10599000A07F00F00300022805D001210022384634 +:1059A0000EF07BFA05466946284601F034F9009866 +:1059B00000B9FFDF45B10098E03505612078222865 +:1059C00006D0242804D007E000990020086103E0F5 +:1059D00025212046FDF79EFB00980121417047627A +:1059E000868001A9C0E902890FF059FF022802D080 +:1059F000002800D0FFDF07B0BDE8F08370B586B0A7 +:105A00000546FDF71FFD017822291ED9807F00F091 +:105A10000300022808D0002080F0010128460EF083 +:105A200045FA04002FD101E00120F5E7FFDF2AE06D +:105A3000B4F85E0004F1620630440178427829B17E +:105A400021462846FFF711FCB0B9C9E6ADF804209D +:105A50000921284602AB04F078FC03900028F4D01A +:105A600005208DF80000694604F1E0000FF0FCFE0F +:105A7000022801D000B1FFDF02231022314604F1D9 +:105A80005E000EF0D0F8B4F860000028D0D1A7E690 +:105A900010B586B00446FDF7D5FC017822291BD944 +:105AA000807F00F00300022808D0002080F0010170 +:105AB00020460EF0FBF9040003D101E00120F5E7D8 +:105AC000FFDF06208DF80000694604F1E0000FF0CA +:105AD000CBFE002800D0FFDF06B010BD2DE9F05F3F +:105AE00005460C4600270078904601093E4604F121 +:105AF000080BBA4602297DD0072902D00A2909D10C +:105B000046E0686801780A2905D00D2930D00E29B1 +:105B10002ED0FFDFBBE114271C26002C6BD0808821 +:105B2000A080FDF78FFC5FEA000900D1FFDF99F844 +:105B300017005A46400809F11801FDF752FC686841 +:105B4000C0892082696851F8060FC4F812004868BD +:105B5000C4F81600A07E01E03002002020F006000C +:105B600040F00100A07699F81E0040F020014DE0C1 +:105B70001A270A26002CD1D0C088A080FDF762FC2D +:105B8000050000D1FFDF59462846FFF73FFB7EE1C5 +:105B90000CB1A88BA080287A0B287DD006DC0128C8 +:105BA0007BD0022808D0032804D135E00D2875D019 +:105BB0000E2874D0FFDF6AE11E270926002CADD025 +:105BC000A088FDF73FFC5FEA000900D1FFDF287BDA +:105BD00000F003000128207A1BD020F00100207281 +:105BE000297B890861F341002072297BC90861F390 +:105BF000820001E041E1F2E02072297B090961F3B2 +:105C0000C300207299F81E0040F0400189F81E1070 +:105C10003DE140F00100E2E713270D26002CAAD059 +:105C2000A088FDF70FFC8146807F00F0030002286A +:105C300008D0002080F00101A0880EF037F905009F +:105C400003D101E00120F5E7FFDF99F81E0000F025 +:105C50000302022A50D0686F817801F00301012904 +:105C6000217A4BD021F00101217283789B0863F3E4 +:105C7000410121728378DB0863F38201217283780A +:105C80001B0963F3C3012172037863F306112172C8 +:105C9000437863F3C71103E061E0A9E090E0A1E07D +:105CA000217284F809A0C178A172022A29D0027950 +:105CB000E17A62F30001E1720279520862F3410174 +:105CC000E1720279920862F38201E1720279D208EC +:105CD00062F3C301E1724279217B62F30001217317 +:105CE0004279520862F3410121734279920862F3CA +:105CF00082012173407928E0A86FADE741F00101EE +:105D0000B2E74279E17A62F30001E1724279520826 +:105D100062F34101E1724279920862F38201E17219 +:105D20004279D20862F3C301E1720279217B62F306 +:105D3000000121730279520862F341012173027953 +:105D4000920862F3820121730079C00860F3C301F5 +:105D5000217399F80000232831D9262140E0182723 +:105D60001026E4B3A088FDF76DFB8346807F00F02A +:105D70000300022809D0002080F00101A0880EF065 +:105D800095F85FEA000903D101E00120F4E7FFDFA5 +:105D9000E868A06099F8000040F0040189F800105C +:105DA00099F80100800708D5012020739BF80000B6 +:105DB00023286CD92721584651E084F80CA066E0CE +:105DC00015270F265CB1A088FDF73CFB8146062213 +:105DD0005946E86808F0C7FB0120A073A0E041E045 +:105DE00048463CE016270926E4B3287B20724EE0A3 +:105DF000287B19270E26ACB3C4F808A0A4F80CA081 +:105E0000012807D0022805D0032805D0042803D094 +:105E1000FFDF0DE0207207E0697B042801F00F012D +:105E200041F0800121721ED0607A20F00300607280 +:105E3000A088FDF707FB05460078212827D02328F6 +:105E400000D0FFDFA87F00F00300022813D000205D +:105E500080F00101A0880EF03BF822212846FDF7D2 +:105E600059F914E004E0607A20F00300401CDEE7FA +:105E7000A8F8006010E00120EAE70CB16888A08073 +:105E8000287A68B301280AD002284FD0FFDFA8F88B +:105E900000600CB1278066800020BDE8F09F1527C8 +:105EA0000F26002CE4D0A088FDF7CCFA807F00F00C +:105EB0000300022808D0002080F00101A0880DF026 +:105EC000F5FF050003D101E00120F5E7FFDFD5F87C +:105ED0001D000622594608F046FB84F80EA0D6E7BE +:105EE00017270926002CC3D0A088FDF7ABFA8146FE +:105EF000807F00F00300022808D0002080F001011C +:105F0000A0880DF0D3FF050003D101E00120F5E7E3 +:105F1000FFDF6878800701D5022000E001202072B1 +:105F200099F800002328B2D9272159E719270E260E +:105F3000002C9DD0A088FDF785FA5FEA000900D10A +:105F4000FFDFC4F808A0A4F80CA084F808A0A07A89 +:105F500040F00300A07299F81E10C90961F3820095 +:105F6000A07299F81F2099F81E1012EAD11F05D0CF +:105F700099F8201001F01F0110292BD020F0080003 +:105F8000A07299F81F10607A61F3C3006072697A99 +:105F900001F003010129A2D140F00400607299F8D8 +:105FA0001E0000F003000228E87A16D0217B60F37F +:105FB00000012173AA7A607B62F300006073EA7AC1 +:105FC000520862F341012173A97A490861F3410043 +:105FD00060735CE740F00800D2E7617B60F300018A +:105FE0006173AA7A207B62F300002073EA7A520878 +:105FF00062F341016173A97A490861F3410020739A +:1060000045E710B5FE4C30B10146102204F12000E6 +:1060100008F013FA012084F8300010BD10B50446D2 +:1060200000F0E9FDF64920461022BDE8104020317D +:1060300008F003BA70B5F24D06004FF0000413D01B +:10604000FBF707F908B110240CE00621304608F0F0 +:1060500071FA411C05D028665FF0010085F85C00EC +:1060600000E00724204670BD0020F7E7007810F01C +:106070000F0204D0012A05D0022A0CD110E0000939 +:1060800009D10AE00009012807D0022805D0032819 +:1060900003D0042801D00720704708700020704703 +:1060A0000620704705282AD2DFE800F003070F1703 +:1060B0001F00087820F0FF001EE0087820F00F0095 +:1060C000401C20F0F000103016E0087820F00F009F +:1060D000401C20F0F00020300EE0087820F00F0087 +:1060E000401C20F0F000303006E0087820F00F006F +:1060F000401C20F0F000403008700020704707205E +:1061000070472DE9F041804688B00D4600270846CB +:10611000FBF7ECF8A8B94046FDF794F9040003D06A +:106120002078222815D104E043F2020008B0BDE82F +:10613000F08145B9A07F410603D500F00300022895 +:1061400001D01020F2E7A07FC10601D4010702D5DB +:106150000DB10820EAE7E17F090701D50D20E5E749 +:1061600000F0030002280DD165B12846FEF75EFF5E +:106170000700DBD1FBF736FB20B9E878800701D5B3 +:106180000620D3E7A07F00F00300022808D00020FB +:1061900080F0010140460DF089FE060002D00FE0BC +:1061A0000120F5E7A07F00F0030002280ED00020B8 +:1061B00080F00101002240460DF06FFE060007D07E +:1061C000A07F00F00300022804D009E00120EFE7DF +:1061D0000420ABE725B12A4631462046FEF74AFFA8 +:1061E0006946304600F017FD009800B9FFDF0099BE +:1061F000022006F1E0024870C1F824804A610022C2 +:106200000A81A27F02F00302022A1CD00120087139 +:10621000287800F00102087E62F3010008762A78EF +:10622000520862F3820008762A78920862F3C3006B +:1062300008762A78D20862F30410087624212046D2 +:10624000FCF768FF33E035B30871301D88613078A2 +:10625000400908777078C0F340004877287800F04C +:106260000102887F62F301008877A27FD20962F37E +:1062700082008877E27F62F3C3008877727862F3E6 +:1062800004108877A878C87701F1210228462031C8 +:10629000FEF711FF03E00320087105200876252191 +:1062A0002046FCF737FFA07F20F04000A07701A92F +:1062B00000980FF0F4FA022801D000B1FFDF384651 +:1062C00034E72DE9FF4F8DB09A4693460D460027DF +:1062D0000D98FDF7B7F8060006D03078262806D0CE +:1062E000082011B0BDE8F08F43F20200F9E7B07F5B +:1062F00000F00309B9F1020F11D04DB95846FEF76D +:1063000095FE0028EDD1B07F00F00300022806D0F2 +:10631000BBF1000F11D0FBF765FA20B10DE0BBF126 +:10632000000F50D109E006200DF068FD28B19BF860 +:106330000300800701D50620D3E7B07F00F00300FB +:10634000022809D05FF0000080F001010D980DF0E7 +:10635000ADFD040003D101E00120F5E7FFDF852D4D +:1063600027D007DCEDB1812D1DD0822D1DD0832DCE +:1063700008D11CE0862D1ED0882D1ED0892D1ED060 +:106380008A2D1ED00F2020710F281CD003F02EF96B +:10639000D8B101208DF81400201D06902079B0B1ED +:1063A00056E10020EFE70120EDE70220EBE70320B4 +:1063B000E9E70520E7E70620E5E70820E3E709200D +:1063C000E1E70A20DFE707208BE7112089E7B9F131 +:1063D000020F03D0A56F03D1A06F02E0656FFAE74B +:1063E000606F804631D04FF0010001904FF0020005 +:1063F00000905A4621463046FEF73CFE02E000007F +:10640000300200209BF8000000F00101A87861F341 +:106410000100A870B17FC90961F38200A870F17F03 +:1064200061F3C300A870617861F30410A87020784C +:10643000400928706078C0F3400068709BF8020043 +:10644000E87000206871287103E0022001900120AB +:106450000090A87898F80210C0F3C000C1F3C00102 +:10646000084003902CD05046FAF7F3FEC0BBDAF890 +:106470000C00FAF7EEFE98BBDAF81C00FAF7E9FE1A +:1064800070BBDAF80C00A060DAF81C00E0606078FD +:1064900098F8012042EA500161F34100607098F8D9 +:1064A0000210C0B200EA111161F300006070002018 +:1064B0002077009906F11700022907D0012106E094 +:1064C000607898F8012002EA5001E5E7002104EB2A +:1064D000810148610199701C022902D0012101E06B +:1064E00028E0002104EB81014861A87800F0030056 +:1064F000012857D198F8020000F00300012851D17B +:10650000B9F1020F04D02A1D691D5846FEF7D3FDCC +:10651000287998F8041008408DF82C00697998F8CB +:10652000052011408DF8301008433BD05046FAF753 +:1065300090FE08B11020D4E60AF110018B46B9F1A3 +:10654000020F17D00846002104F18C03CDE90003A7 +:1065500004F5AE7202920BAB2046039AFEF7F4FDEF +:106560000028E8D1B9F1020F08D0504608D14FF009 +:10657000010107E050464FF00101E5E75846F5E715 +:106580004FF0000104F1A403CDE9000304F5B0725B +:10659000029281F001010CAB2046039AFEF7D4FD74 +:1065A0000028C8D16078800733D4A87898F8021002 +:1065B000C0F38000C1F3800108432AD0297898F8FD +:1065C0000000F94AB9F1020F06D032F81120430059 +:1065D000DA4002F003070AE032F810204B00DA40FC +:1065E00012F0030705D0012F0AD0022F0AD0032F83 +:1065F00006D0039A6AB1012906D0042904D008E024 +:106600000227F6E70127F4E7012801D0042800D18A +:106610000427B07F40F08000B077F17F039860F3EB +:106620000001F1776078800705D50320A0710398F9 +:1066300070B9002029E00220022F18D0012F18D0B5 +:10664000042F2AD00020A071B07F20F08000B07706 +:1066500025213046FCF75EFD05A904F1E0000FF0AE +:1066600003F910B1022800D0FFDF002039E6A07145 +:10667000DFE7A0710D22002104F1200007F007FFE1 +:10668000207840F00200207001208DF8100004AA4C +:1066900031460D9800F098FADAE70120A071D7E7AB +:1066A0002DE9F04387B09046894604460025FCF763 +:1066B000C9FE060006D03078272806D0082007B08B +:1066C000BDE8F08343F20200F9E7B07F00F0030079 +:1066D000022809D05FF0000080F0010120460DF093 +:1066E000E5FB040003D101E00120F5E7FFDFA77916 +:1066F0005FEA090005D0012821D0B9F1020F26D1A7 +:1067000010E0B8F1000F22D1012F05D0022F05D0E3 +:10671000032F05D0FFDF2EE00C252CE001252AE019 +:10672000022528E04046FAF794FDB0B9032F0ED1B8 +:106730001022414604F11D0007F07FFE1BE0012FEF +:1067400002D0022F03D104E0B8F1000F13D00720CC +:10675000B5E74046FAF77DFD08B11020AFE71022FB +:10676000002104F11D0007F092FE0621404607F0CB +:10677000E1FEC4F81D002078252140F002002070C1 +:106780003046FCF7C7FC2078C10713D020F0010089 +:10679000207002208DF8000004F11D0002908DF899 +:1067A00004506946C3300FF05FF8022803D010B1DF +:1067B000FFDF00E02577002081E730B587B00D4688 +:1067C0000446FCF73FFE98B1807F00F003000228EA +:1067D00011D0002080F0010120460DF067FB04007D +:1067E0000ED02846FAF735FD38B1102007B030BD7D +:1067F00043F20200FAE70120ECE72078400701D4D9 +:106800000820F3E7294604F13D002022054607F061 +:1068100014FE207840F01000207001070FD520F002 +:106820000800207007208DF80000694604F1E000A0 +:1068300001950FF019F8022801D000B1FFDF002008 +:10684000D4E770B50D460646FCF7FCFD18B101789B +:10685000272921D102E043F2020070BD807F00F0C1 +:106860000300022808D0002080F0010130460DF01E +:106870001DFB040003D101E00120F5E7FFDFA07953 +:10688000022809D16078C00706D02A462146304642 +:10689000FEF7EBFC10B10FE0082070BDB4F860000B +:1068A0000E280BD204F1620102231022081F0DF002 +:1068B00084F9012101704570002070BD112070BD68 +:1068C00070B5064614460D460846FAF7C2FC18B9DC +:1068D0002046FAF7E4FC08B1102070BDA6F57F4011 +:1068E000FF380ED03046FCF7ADFD38B14178224676 +:1068F0004B08811C1846FCF774FD07E043F20200C8 +:1069000070BD2046FDF7A5FD0028F9D11021E01D3E +:1069100010F0EDFDE21D294604F1170000F08BF99F +:10692000002070BD2DE9F04104468AB01546884626 +:1069300000270846FAF7DAFC18B92846FAF7D6FC19 +:1069400018B110200AB0BDE8F0812046FCF77AFDAE +:10695000060003D0307827281BD102E043F2020062 +:10696000F0E7B07F00F00300022809D05FF00000DC +:1069700080F0010120460DF099FA040003D101E0F6 +:106980000120F5E7FFDF2078400702D56078800717 +:1069900001D40820D6E7B07F00F00300022805D01C +:1069A000A06F05D1A16F04E01C610200606FF8E7E1 +:1069B000616F407800B19DB1487810B1B8F1000F17 +:1069C0000ED0ADB1EA1D06A8E16800F034F910223E +:1069D00006A905F1170007F003FD18B1042707E029 +:1069E0000720AFE71022E91D04F12D0007F025FD77 +:1069F000B8F1000F06D0102208F1070104F11D00C4 +:106A000007F01BFD2078252140F002002070304661 +:106A1000FCF780FB2078C10715D020F00100207022 +:106A200002208DF8000004F11D0002901030039048 +:106A30008DF804706946B3300EF016FF022803D0BB +:106A400010B1FFDF00E0277700207BE7F8B515469F +:106A50000E460746FCF7F6FC040004D020782228F6 +:106A600004D00820F8BD43F20200F8BDA07F00F07A +:106A70000300022802D043F20500F8BD3046FAF7C1 +:106A8000E8FB18B92846FAF7E4FB08B11020F8BD76 +:106A900000953288B31C21463846FEF709FC1128C0 +:106AA00015D00028F3D1297C4A08A17F62F3C711D1 +:106AB000A177297CE27F61F30002E277297C8908D3 +:106AC00084F82010A17F21F04001A177F8BDA17FBB +:106AD0000907FBD4D6F80200C4F83600D6F8060041 +:106AE000C4F83A003088A0861022294604F1240018 +:106AF00007F0A3FC287C4108E07F61F34100E077C8 +:106B0000297C61F38200E077287C800884F82100EA +:106B1000A07F40F00800A0770020D3E770B50D46B5 +:106B200006460BB1072070BDFCF78CFC040007D0B3 +:106B30002078222802D3A07F800604D4082070BDCC +:106B400043F2020070BDADB1294630460CF076F834 +:106B500002F069FB297C4A08A17F62F3C711A17783 +:106B6000297CE27F61F30002E277297C890884F8BE +:106B7000201004E030460CF084F802F054FBA17FB2 +:106B800021F02001A17770BD70B50D46FCF75AFCCD +:106B9000040005D02846FAF782FB20B1102070BD12 +:106BA00043F2020070BD29462046FEF72FFB00206D +:106BB00070BD04E010F8012B0AB100207047491E97 +:106BC00089B2F7D20120704770B51546064602F02B +:106BD0000DFD040000D1FFDF207820F00F00801CA5 +:106BE00020F0F0002030207066802868A060BDE8AA +:106BF000704002F0FEBC10B5134C94F83000002831 +:106C000008D104F12001A1F110000EF06FFE012067 +:106C100084F8300010BD10B190F8B9202AB10A48AC +:106C200090F8350018B1002003E0B83001E00648C4 +:106C300034300860704708B50023009313460A46B5 +:106C40000DF031FB08BD00003002002018B1817842 +:106C5000012938D101E010207047018842F6011265 +:106C6000881A914231D018DC42F60102A1EB0200F1 +:106C700091422AD00CDC41B3B1F5C05F25D06FF44E +:106C8000C050081821D0A0F57060FF381BD11CE05F +:106C900001281AD002280AD117E0B0F5807F14D05D +:106CA00008DC012811D002280FD003280DD0FF28BE +:106CB00009D10AE0B0F5817F07D0A0F580700338D4 +:106CC00003D0012801D0002070470F2070470A2808 +:106CD0001FD008DC0A2818D2DFE800F0191B1F1F9C +:106CE000171F231D1F21102815D008DC0B2812D0D8 +:106CF0000C2810D00D2816D00F2806D10DE0112831 +:106D00000BD084280BD087280FD003207047002099 +:106D1000704705207047072070470F2070470420F8 +:106D20007047062070470C20704743F202007047FE +:106D300038B50C46050041D06946FFF797F90028A1 +:106D400019D19DF80010607861F302006070694607 +:106D5000681CFFF78BF900280DD19DF800106078B2 +:106D600061F3C5006070A978C1F34101012903D026 +:106D7000022905D0072038BD217821F0200102E04A +:106D8000217841F020012170410704D0A978C90879 +:106D900061F386106070607810F0380F07D0A97822 +:106DA000090961F3C710607010F0380F02D16078E4 +:106DB000400603D5207840F040002070002038BD08 +:106DC00070B504460020088015466068FFF7B0FFE4 +:106DD000002816D12089A189884211D8606880785E +:106DE000C0070AD0B1F5007F0AD840F20120B1FBFC +:106DF000F0F200FB1210288007E0B1F5FF7F01D907 +:106E00000C2070BD01F201212980002070BD10B559 +:106E10000478137864F3000313700478640864F34F +:106E2000410313700478A40864F382031370047898 +:106E3000E40864F3C30313700478240964F30413AF +:106E400013700478640964F34513137000788009A3 +:106E500060F38613137031B10878C10701D1800740 +:106E600001D5012000E0002060F3C713137010BDAE +:106E70004278530702D002F0070306E012F0380F01 +:106E800002D0C2F3C20300E001234A7863F3020296 +:106E90004A70407810F0380F02D0C0F3C20005E00D +:106EA000430702D000F0070000E0012060F3C502B4 +:106EB0004A7070472DE9F04F95B00D00824613D00F +:106EC00012220021284607F0E2FA4FF6FF7B05AABE +:106ED0000121584607F0A3F80024264637464FF410 +:106EE00020586FF4205972E0102015B0BDE8F08FE3 +:106EF0009DF81E0001280AD1BDF81C1041450BD099 +:106F000011EB09000AD001280CD002280CD0042C67 +:106F10000ED0052C0FD10DE0012400E00224BDF8B5 +:106F20001A6008E0032406E00424BDF81A7002E0A9 +:106F3000052400E00624BDF81A10514547D12C74F1 +:106F4000BEB34FF0000810AA4FF0070ACDE9028245 +:106F5000CDE900A80DF13C091023CDF81090424670 +:106F60003146584607F02BF908BBBDF83C002A46CD +:106F7000C0B210A90EF045FDC8B9AE81CFB1CDE9C0 +:106F800000A80DF1080C0AAE40468CE8410213231C +:106F900000223946584607F012F940B9BDF83C00C6 +:106FA000F11CC01EC0B22A1D0EF02BFD10B1032033 +:106FB0009BE70AE0BDF82900E881062C05D19DF881 +:106FC0001E00A872BDF81C00288100208DE705A8CE +:106FD00007F031F800288BD0FFF779FE85E72DE91F +:106FE000F0471C46DDE90978DDF8209015460E00D3 +:106FF000824600D1FFDF0CB1208818B1D5B1112035 +:10700000BDE8F087022D01D0012100E0002106F14A +:10701000140005F0CDFEA8F8000002463B462946C4 +:10702000504603F092F9C9F8000008B9A41C3C606E +:107030000020E5E71320E3E7F0B41446DDE904524D +:107040008DB1002314B1022C09D101E0012306E027 +:107050000D7CEE0703D025F0010501230D742146B8 +:10706000F0BC04F050BA1A80F0BC70472DE9FE4F16 +:1070700091461A881C468A468046FAB102AB4946B8 +:1070800003F063F9050019D04046A61C27880DF0CF +:1070900050F83246072629463B4600960CF05FFC26 +:1070A00020882346CDE900504A4651464046FFF726 +:1070B000C3FF002020800120BDE8FE8F0020FBE7F9 +:1070C0002DE9F04786B082460EA8904690E8B000C1 +:1070D000894604AA05A903A88DE807001E462A468A +:1070E00021465046FFF77BFF039901B1012139701A +:1070F000002818D1FA4904F1140204AB086003987F +:1071000005998DE8070042464946504606F003FAC5 +:10711000A8B1092811D2DFE800F005080510100A0F +:107120000C0C0E00002006B06AE71120FBE70720D8 +:10713000F9E70820F7E70D20F5E70320F3E7BDF8AE +:1071400010100398CDE9000133462A4621465046E7 +:10715000FFF772FFE6E72DE9F04389B01646DDE957 +:1071600010870D4681461C461422002103A807F013 +:107170008EF9012002218DF810108DF80C008DF889 +:107180001170ADF8146064B1A278D20709D08DF8FF +:107190001600E088ADF81A00A088ADF81800A068C5 +:1071A000079008A80095CDE90110424603A948467A +:1071B0006B68FFF785FF09B0BDE8F083F0B58BB0D1 +:1071C00000240646069407940727089405A8099406 +:1071D000019400970294CDE903400D461023224606 +:1071E000304606F0ECFF78B90AA806A9019400978A +:1071F0000294CDE90310BDF8143000222946304630 +:1072000006F07BFD002801D0FFF761FD0BB0F0BD5B +:1072100006F00CBC2DE9FC410C468046002602F02D +:10722000E5F9054620780D287ED2DFE800F0BC079E +:1072300013B325BD49496383AF959B00A8480068F7 +:1072400020B1417841F010014170ADE0404602F0BC +:10725000FDF9A9E0042140460CF028FE070000D10A +:10726000FFDF07F11401404605F037FDA5BB1321F0 +:107270004046FDF7CFFB97E0042140460CF016FE98 +:10728000070000D1FFDFE088ADF800000020B881E2 +:107290009DF80000010704D5C00602D5A088B8817A +:1072A00005E09DF8010040067ED5A088F88105B96B +:1072B000FFDF22462946404601F0ACFC022673E07F +:1072C000E188ADF800109DF8011009060FD50728D8 +:1072D00003D006280AD00AE024E0042140460CF03E +:1072E000E5FD060000D1FFDFA088F0810226CDB9C0 +:1072F000FFDF17E0042140460CF0D8FD070000D165 +:10730000FFDF07F1140006F0C8FB90F0010F02D177 +:10731000E079000648D5387C022640F00200387437 +:1073200005B9FFDF224600E03DE02946404601F076 +:1073300071FC39E0042140460CF0B8FD017C002DC1 +:1073400001F00206C1F340016171017C21F00201EC +:107350000174E7D1FFDFE5E702260121404602F094 +:10736000A7F921E0042140460CF0A0FD0546606825 +:1073700000902089ADF8040001226946404602F0E1 +:10738000B8F9287C20F0020028740DE0002DC9D146 +:10739000FFDFC7E7022600214046FBF799F8002DE2 +:1073A000C0D1FFDFBEE7FFDF3046BDE8FC813EB560 +:1073B0000C0009D001466B4601AA002006F084FFAC +:1073C00020B1FFF784FC3EBD10203EBD0020208090 +:1073D000A0709DF8050002A900F00700FEF762FE0C +:1073E00050B99DF8080020709DF8050002A9C0F36F +:1073F000C200FEF757FE08B103203EBD9DF808000D +:1074000060709DF80500C109A07861F30410A070B8 +:107410009DF80510890961F3C300A0709DF8041060 +:10742000890601D5022100E0012161F342009DF8A7 +:10743000001061F30000A07000203EBD70B514463E +:1074400006460D4651EA040005D075B10846F9F725 +:1074500044FF78B901E0072070BD2946304606F0A8 +:107460009AFF10B1BDE8704031E454B12046F9F7FD +:1074700034FF08B1102070BD21463046BDE8704091 +:1074800095E7002070BD2DE9FC5F0C46904605464F +:10749000002701780822007A3E46B2EB111F7DD109 +:1074A00004F10A0100910A31821E4FF0020A04F130 +:1074B000080B0191092A72D2DFE802F0EDE005F530 +:1074C00028287BAACE00688804210CF0EFFC060077 +:1074D00000D1FFDFB08928B152270726C3E00000A2 +:1074E0009402002051271026002C7DD06888A080AF +:1074F0000120A071A88900220099FFF79FFF0028B2 +:1075000073D1A8892081288AE081D1E0B5F8129052 +:10751000072824D1E87B000621D5512709F1140062 +:1075200086B2002CE1D0A88900220099FFF786FFDF +:1075300000285AD16888A08084F806A0A8892081F4 +:107540000120A073288A2082A4F81290A88A0090B3 +:1075500068884B46A969019A01F038FBA8E05027DA +:1075600009F1120086B2002C3ED0A88900225946AB +:10757000FFF764FF002838D16888A080A889E080E0 +:10758000287A072813D002202073288AE081E87B1C +:10759000C0096073A4F81090A88A01E085E082E039 +:1075A000009068884B4604F11202A969D4E70120D3 +:1075B000EAE7B5F81290512709F1140086B2002CC1 +:1075C00066D0688804210CF071FC83466888A0802E +:1075D000A88900220099FFF731FF00286ED184F8B6 +:1075E00006A0A889208101E052E067E00420A07392 +:1075F000288A2082A4F81290A88A009068884B46B6 +:10760000A969019A01F0E2FAA989ABF80E104FE0DE +:107610006888FBF717FF0746688804210CF046FCD2 +:10762000064607B9FFDF06B9FFDF687BC00702D057 +:107630005127142601E0502712264CB36888A080F9 +:10764000502F06D084F806A0287B594601F0CEFAC8 +:107650002EE0287BA11DF9E7FE49A88949898142CE +:1076600005D1542706269CB16888A08020E05327C6 +:107670000BE06888A080A889E08019E06888042170 +:107680000CF014FC00B9FFDF55270826002CF0D1C0 +:10769000A8F8006011E056270726002CF8D068886B +:1076A000A080002013E0FFDF02E0012808D0FFDF08 +:1076B000A8F800600CB1278066800020BDE8FC9F20 +:1076C00057270726002CE3D06888A080687AA0712D +:1076D000EEE7401D20F0030009B14143091D01EB15 +:1076E0004000704713B5DB4A00201071009848B184 +:1076F000002468460CF0F7F9002C02D1D64A009914 +:1077000011601CBD01240020F4E770B50D4614463D +:10771000064686B05C220021284606F0B8FE04B971 +:10772000FFDFA0786874A2782188284601F089FAE2 +:107730000020A881E881228805F11401304605F077 +:10774000B0FA6A460121304606F069FC1AE000BF33 +:107750009DF80300000715D5BDF806103046FFF769 +:107760002DFD9DF80300BDF8061040F010008DF8C7 +:107770000300BDF80300ADF81400FF233046059A5E +:1077800006F0D1FD684606F056FC0028E0D006B0B1 +:1077900070BD10B50C4601F1140005F0BAFA0146AF +:1077A000627C2046BDE8104001F080BA30B5044646 +:1077B000A84891B04FF6FF75C18905AA284606F082 +:1077C0002EFC30E09DF81E00A0422AD001282AD1CC +:1077D000BDF81C00B0F5205F03D042F601018842DD +:1077E00021D1002002AB0AAA0CA9019083E807006E +:1077F00007200090BDF81A1010230022284606F03A +:10780000DEFC38B9BDF828000BAAC0B20CA90EF0F6 +:10781000F8F810B1032011B030BD9DF82E00A04241 +:1078200001D10020F7E705A806F005FC0028C9D023 +:107830000520F0E770B5054604210CF037FB040085 +:1078400000D1FFDF04F114010C46284605F045FA8B +:1078500021462846BDE8704005F046BA70B58AB0AA +:107860000C460646FBF7EEFD050014D028782228CA +:1078700027D30CB1A08890B101208DF80C00032013 +:107880008DF8100000208DF8110054B1A088ADF8DB +:107890001800206807E043F202000AB070BD09201A +:1078A000FBE7ADF818000590042130460CF0FEFA15 +:1078B000040000D1FFDF04F1140005F040FA0007D6 +:1078C00001D40820E9E701F091FE60B108A8022187 +:1078D0000094CDE9011095F8232003A93046636890 +:1078E000FFF7EEFBD9E71120D7E72DE9F04FB2F80B +:1078F00002A0834689B0154689465046FBF7A2FD93 +:107900000746042150460CF0D1FA0026044605969D +:107910004FF002080696ADF81C6007B9FFDF04B906 +:10792000FFDF4146504603F055FF50B907AA06A9AC +:1079300005A88DE807004246214650466368FFF7D8 +:107940004EFB444807AB0660DDE9051204F1140064 +:10795000CDF80090CDE90320CDE9013197F823203F +:10796000594650466B6805F033FA06000AD0022EDD +:1079700004D0032E14D0042E00D0FFDF09B030460F +:10798000BDE8F08FBDF81C000028F7D00599CDE9BF +:1079900000104246214650466368FFF74DFBEDE775 +:1079A000687840F008006870E8E710B50C46FFF70B +:1079B000BFF900280BD1607800F00701012905D13B +:1079C00010F0380F02D02078810601D5072010BDB5 +:1079D00040F0C8002070002010BD2DE9F04F99B094 +:1079E00004464FF000081B48ADF81C80ADF820801D +:1079F000ADF82480A0F80880ADF81480ADF81880A8 +:107A0000ADF82880ADF82C80007916460D46474623 +:107A1000012808D0022806D0032804D0042802D068 +:107A2000082019B0ACE72046F9F713FCF0BB284654 +:107A3000F9F70FFCD0BB6068F9F758FCB0BB606881 +:107A400068B160892189884202D8B1F5007F05D9E3 +:107A50000C20E6E7940200201800002080460EAAC1 +:107A600006A92846FFF7ACF90028DAD168688078C3 +:107A7000C0F34100022808D19DF8190010F0380F1A +:107A800003D02869F9F729FC80B905A92069FFF717 +:107A90004FF90028C5D1206950B1607880079DF862 +:107AA000150000F0380002D5F0B301E011E0D8BBBA +:107AB0009DF8140080060ED59DF8150010F0380FC3 +:107AC00003D06068F9F709FC18B96068F9F70EFC93 +:107AD00008B11020A5E70BA906A8FFF7C9F99DF882 +:107AE0002D000BA920F00700401C8DF82D006069C7 +:107AF000FFF75BFF002894D10AA9A069FFF718F9E6 +:107B000000288ED19DF8280080062BD4A06940B1B2 +:107B10009DF8290000F00701012923D110F0380F4A +:107B200020D0E06828B100E01CE00078D0B11C282B +:107B300018D20FAA611C2046FFF769F901213846C7 +:107B400061F30F2082468DF85210B94642F60300C9 +:107B50000F46ADF850000DF13F0218A928680DF04E +:107B600052FF08B107205CE79DF8600015A9CDF829 +:107B70000090C01CCDE9019100F0FF0B00230BF237 +:107B80000122514614A806F075F9E8BBBDF854006F +:107B90000C90FB482A8929690092CDE901106B8974 +:107BA000BDF838202868069906F064F9010077D1FD +:107BB00020784FF0020AC10601D4800616D58DF850 +:107BC000527042F60210ADF85000CDF80C9008A9A2 +:107BD00003AACDF800A0CDE90121002340F2032241 +:107BE00014A80B9906F046F9010059D1E4484D4616 +:107BF00008380089ADF83D000FA8CDE90290CDF816 +:107C00000490CDF8109000E00CE04FF007095B46BF +:107C10000022CDF80090BDF854104FF6FF7006F02A +:107C20006CF810B1FFF753F8FBE69DF83C00000636 +:107C300024D52946012060F30F218DF852704FF4AE +:107C400024500395ADF8500062789DF80C00002395 +:107C500062F300008DF80C006278CDF800A05208A5 +:107C600062F341008DF80C0003AACDE9012540F232 +:107C7000032214A806F0FEF8010011D1606880B359 +:107C80002069A0B905A906A8FFF7F2F86078800777 +:107C900007D49DF8150020F038008DF8150006E097 +:107CA00077E09DF8140040F040008DF814008DF846 +:107CB000527042F60110ADF85000208940F20121C7 +:107CC000B0FBF1F201FB1202606809ABCDF8008055 +:107CD000CDE90103002314A8059906F0CBF80100B3 +:107CE00057D12078C00728D00395A06950B90AA9B8 +:107CF00006A8FFF7BDF89DF8290020F00700401CFA +:107D00008DF829009DF8280007A940F040008DF863 +:107D100028008DF8527042F60310ADF8500003AA07 +:107D2000CDF800A0CDE90121002340F2032214A8E0 +:107D30000A9906F09FF801002BD1E06868B3294644 +:107D4000012060F30F218DF8527042F60410ADF857 +:107D50005000E068002302788DF8582040788DF8B4 +:107D60005900E06816AA4088ADF85A00E06800792A +:107D70008DF85C00E068C088ADF85D00CDF800903B +:107D8000CDE901254FF4027214A806F073F8010042 +:107D900003D00C9800F0B6FF43E679480321083879 +:107DA000017156B100893080BDF824007080BDF8A3 +:107DB0002000B080BDF81C00F080002031E670B5D6 +:107DC00001258AB016460B46012802D0022816D19A +:107DD00004E08DF80E504FF4205003E08DF80E5063 +:107DE00042F60100ADF80C005BB10024601C60F3AA +:107DF0000F2404AA08A918460DF005FE18B10720A3 +:107E00004BE5102049E504A99DF820205C48CDE908 +:107E10000021801E02900023214603A802F20122C5 +:107E200006F028F810B1FEF752FF36E5544808383E +:107E30000EB1C1883180057100202EE5F0B593B0F8 +:107E4000044601268DF83E6041F601000F46ADF86C +:107E50003C0011AA0FA93046FFF7B1FF002837D127 +:107E60002000474C4FF00005A4F1080432D01C223A +:107E7000002102A806F00BFB9DF808008DF83E607B +:107E800040F020008DF8080042F60520ADF83C00D7 +:107E900004200797ADF82C00ADF8300039480A905F +:107EA0000EA80D900E950FA80990ADF82E506A46B9 +:107EB00009A902A8FFF791FD002809D1BDF800002B +:107EC0006081BDF80400A081401CE0812571002084 +:107ED00013B0F0BD6581A581BDF84400F4E72DE93C +:107EE000F74F2749A0B00024083917940A79A14612 +:107EF000012A04D0022A02D0082023B040E5CA8813 +:107F0000824201D00620F8E721988A46824201D1B8 +:107F10000720F2E70120214660F30F21ADF8480069 +:107F20004FF6FF788DF86E000691ADF84A8042F664 +:107F3000020B8DF872401CA9ADF86CB0ADF8704022 +:107F40001391ADF8508012A806F0A4F800252E4633 +:107F50002F460DAB072212A9404606F09EF898B1B5 +:107F60000A2861D1B5B3AEB3ADF86450ADF8666020 +:107F70009DF85E008DF8144019AC012868D06FE0C0 +:107F80009C020020266102009DF83A001FB30128E0 +:107F900059D1BDF8381059451FD118A809A9019425 +:107FA0000294CDE9031007200090BDF8361010238D +:107FB0000022404606F003F9B0BBBDF8600004287B +:107FC00001D006284AD1BDF82410219881423AD127 +:107FD0000F2092E73AE0012835D1BDF83800B0F51E +:107FE000205F03D042F6010188422CD1BAF8060086 +:107FF000BDF83610884201D1012700E0002705B105 +:108000009EB1219881421ED118A809AA0194029418 +:10801000CDE90320072000900D46102300224046A2 +:1080200006F0CDF800B902E02DE04E460BE0BDF8B9 +:108030006000022801D0102810D1C0B217AA09A9E7 +:108040000DF0DFFC50B9BDF8369082E7052054E70B +:1080500005A917A8221D0DF0D6FC08B103204CE796 +:108060009DF814000023001DC2B28DF81420229840 +:108070000092CDE901401BA8069905F0FBFE10B95E +:1080800002228AF80420FEF722FE36E710B50B46DE +:10809000401E88B084B205AA00211846FEF7B7FE3C +:1080A00000200DF1080C06AA05A901908CE8070034 +:1080B000072000900123002221464FF6FF7005F0B3 +:1080C0001CFE0446BDF81800012800D0FFDF204642 +:1080D000FEF7FDFD08B010BDF0B5FF4F044687B0B8 +:1080E00038790E46032804D0042802D0082007B0AF +:1080F000F0BD04AA03A92046FEF762FE0500F6D1F2 +:1081000060688078C0F3410002280AD19DF80D0014 +:1081100010F0380F05D02069F9F7DFF808B110200A +:10812000E5E7208905AA21698DE807006389BDF884 +:1081300010202068039905F09DFE10B1FEF7C7FDE1 +:10814000D5E716B1BDF814003080042038712846F8 +:10815000CDE7F8B50C0006460BD001464FF6FF758B +:1081600000236A46284606F0AFF820B1FEF7AFFDBF +:10817000F8BD1020F8BD69462046FEF7D9FD00285D +:10818000F8D1A078314600F001032846009A06F0A5 +:10819000CAF8EBE730B587B0144600220DF1080CA1 +:1081A00005AD01928CE82C00072200920A46014698 +:1081B00023884FF6FF7005F0A0FDBDF81410218054 +:1081C000FEF785FD07B030BD70B50D4604210BF0FC +:1081D0006DFE040000D1FFDF294604F11400BDE864 +:1081E000704004F0A5BD70B50D4604210BF05EFE95 +:1081F000040000D1FFDF294604F11400BDE87040FF +:1082000004F0B9BD70B50D4604210BF04FFE04001B +:1082100000D1FFDF294604F11400BDE8704004F0EE +:10822000D1BD70B5054604210BF040FE040000D11D +:10823000FFDF214628462368BDE870400122FEF793 +:1082400015BF70B5064604210BF030FE040000D1C6 +:10825000FFDF04F1140004F05CFD401D20F0030575 +:1082600011E0011D00880022431821463046FEF728 +:10827000FDFE00280BD0607CABB2684382B2A068E0 +:10828000011D0BF0D0FCA06841880029E9D170BD28 +:1082900070B5054604210BF009FE040000D1FFDF94 +:1082A000214628466368BDE870400222FEF7DEBE24 +:1082B00070B50E46054601F099F9040000D1FFDFC4 +:1082C0000120207266726580207820F00F00001D6A +:1082D00020F0F00040302070BDE8704001F089B916 +:1082E00010B50446012900D0FFDF2046BDE810404C +:1082F0000121FAF7EDB82DE9F04F97B04FF0000AE1 +:108300000C008346ADF814A0D04619D0E06830B117 +:10831000A068A8B10188ADF81410A0F800A05846D4 +:10832000FBF790F8070043F2020961D03878222861 +:108330005CD3042158460BF0B9FD050005D103E0DC +:10834000102017B0BDE8F08FFFDF05F1140004F036 +:10835000E0FC401D20F00306A078012803D002288D +:1083600001D00720EDE7218807AA584605F057FEFF +:1083700030BB07A805F05FFE10BB07A805F05BFE49 +:1083800048B99DF82600012805D1BDF82400A0F5C4 +:108390002451023902D04FF45050D2E7E068B0B116 +:1083A000CDE902A00720009005AACDF804A0049210 +:1083B000A2882188BDF81430584605F09EFC10B103 +:1083C000FEF785FCBDE7A168BDF8140008809DF8A4 +:1083D0001F00C00602D543F20140B2E70B9838B146 +:1083E000A1780078012905D080071AD40820A8E7D1 +:1083F0004846A6E7C007F9D002208DF83C00A868DF +:108400004FF00009A0B1697C4288714391420FD9B5 +:108410008AB2B3B2011D0BF0BCFB8046A0F800A0ED +:1084200006E003208DF83C00D5F800804FF00109EC +:108430009DF8200010F0380F00D1FFDF9DF82000DC +:108440002649C0F3C200084497F8231010F8010C25 +:10845000884201D90F2074E72088ADF8400014A9A4 +:108460000095CDE90191434607220FA95846FEF732 +:1084700027FE002891D19DF8500050B9A07801281E +:1084800007D1687CB3B2704382B2A868011D0BF0BB +:1084900094FB002055E770B5064615460C46084685 +:1084A000FEF7D4FB002805D12A4621463046BDE818 +:1084B000704084E470BD12E570B51E4614460D0090 +:1084C0000ED06CB1616859B160B10349C98881426D +:1084D00008D0072070BD000094020020296102002E +:1084E0001020F7E72068FEF7B1FB0028F2D13246F2 +:1084F00021462846BDE87040FFF76FBA70B51546B3 +:108500000C0006D038B1FE490989814203D007200A +:10851000E0E71020DEE72068FEF798FB0028D9D1BD +:1085200029462046BDE87040D6E570B5064686B0BF +:108530000D4614461046F8F7B2FED0BB6068F8F757 +:10854000D5FEB0BBA6F57F40FF3803D03046FAF722 +:1085500079FF80B128466946FEF7ACFC00280CD1B3 +:108560009DF810100F2008293DD2DFE801F0080621 +:108570000606060A0A0843F2020006B0AAE703202C +:10858000FBE79DF80210012908D1BDF80010B1F5F4 +:10859000C05FF2D06FF4C052D142EED09DF8061009 +:1085A00001290DD1BDF80410A1F52851062907D2E3 +:1085B00000E029E0DFE801F0030304030303DCE744 +:1085C0009DF80A1001290FD1BDF80810B1F5245FFC +:1085D000D3D0A1F60211B1F50051CED00129CCD0F3 +:1085E000022901D1C9E7FFDF606878B9002305AA35 +:1085F0002946304605F068FE10B1FEF768FBBCE77F +:108600009DF81400800601D41020B6E76188224648 +:1086100028466368FFF7BEFDAFE72DE9F0438146CA +:1086200087B0884614461046F8F739FE18B1102076 +:1086300007B0BDE8F083002306AA4146484605F08E +:1086400043FE10B1FEF743FBF2E79DF81800C006A9 +:1086500002D543F20140EBE70025072705A8019565 +:1086600000970295CDE9035062884FF6FF734146AB +:10867000484605F0A4FD060013D16068F8F70FFE28 +:1086800060B960680195CDE9025000970495238890 +:1086900062884146484605F092FD0646BDF8140042 +:1086A00020803046CEE739B1954B0A889B899A42A3 +:1086B00002D843F2030070471DE610B586B0904C17 +:1086C0000423ADF81430638943B1A4898C4201D2EC +:1086D000914205D943F2030006B010BD0620FBE726 +:1086E000ADF81010002100910191ADF80030022189 +:1086F0008DF8021005A9029104A90391ADF812208A +:108700006946FFF7F8FDE7E72DE9FC4781460D468E +:108710000846F8F79EFD88BB4846FAF793FE5FEAE5 +:1087200000080AD098F80000222829D304214846DE +:108730000BF0BCFB070005D103E043F20200BDE8EB +:10874000FC87FFDF07F1140004F0F9FA06462878E9 +:10875000012803D0022804D00720F0E7B0070FD586 +:1087600002E016F01C0F0BD0A8792C1DC00709D011 +:10877000E08838B1A068F8F76CFD18B11020DEE78A +:108780000820DCE721882A780720B1F5847F35D0DE +:108790001EDC40F20315A1F20313A94226D00EDC21 +:1087A000B1F5807FCBD003DCF9B1012926D1C6E732 +:1087B000A1F58073013BC2D0012B1FD113E0012B27 +:1087C000BDD0022B1AD0032BB9D0042B16D112E046 +:1087D000A1F20912082A11D2DFE802F00B040410FA +:1087E00010101004ABE7022AA9D007E0012AA6D096 +:1087F00004E0320700E0F206002AA0DACDB200F071 +:10880000F5FE50B198F82300CDE90005FA8923461A +:1088100039464846FEF79FFC91E711208FE72DE986 +:10882000F04F8BB01F4615460C4683460026FAF7DC +:1088300009FE28B10078222805D208200BB081E576 +:1088400043F20200FAE7B80801D00720F6E7032F49 +:1088500000D100274FF6FF79CCB1022D71D320460D +:10886000F8F744FD30B904EB0508A8F10100F8F76A +:108870003DFD08B11020E1E7AD1E38F8028CAAB228 +:108880002146484605F081FE40455AD1ADB21C490B +:10889000B80702D58889401C00E001201FFA80F843 +:1088A000F80701D08F8900E04F4605AA4146584697 +:1088B00005F0B5FB4FF0070A4FF00009FCB1204668 +:1088C00008E0408810283CD8361D304486B2AE42BD +:1088D00037D2A01902884245F3D352E09DF8170021 +:1088E00002074ED57CB304EB0608361DB8F80230FB +:1088F000B6B2102B25D89A19AA4222D802E040E03D +:1089000094020020B8F8002091421AD1C0061BD56D +:10891000CDE900A90DF1080C0AAAA11948468CE876 +:108920000700B8F800100022584605F0E6F910B12B +:10893000FEF7CDF982E7B8F80200BDF828108842AA +:1089400002D00B207AE704E0B8F80200304486B287 +:1089500006E0C00604D55846FEF730FC00288AD150 +:108960009DF81700BDF81A1020F010008DF81700C0 +:10897000BDF81700ADF80000FF235846009A05F037 +:10898000D2FC05A805F057FB18B9BDF81A10B9427A +:10899000A4D9042158460BF089FA040000D1FFDF66 +:1089A000A2895AB1CDE900A94D4600232146584677 +:1089B000FEF7D1FB0028BDD1A5813FE700203DE7B0 +:1089C0002DE9FF4F8BB01E4617000D464FF00004F7 +:1089D00012D0B00802D007200FB0B3E4032E00D1AC +:1089E00000265DB10846F8F778FC28B93888691E7A +:1089F0000844F8F772FC08B11020EDE7C74AB00749 +:108A000001D5D18900E00121F0074FF6FF7802D0AF +:108A1000D089401E00E0404686B206AA0B9805F0B9 +:108A2000FEFA4FF000094FF0070B0DF1140A38E081 +:108A30009DF81B00000734D5CDF80490CDF800B0A8 +:108A4000CDF80890CDE9039A434600220B9805F033 +:108A5000B6FB60BB05B3BDF814103A882144281951 +:108A6000091D8A4230D3BDF81E2020F8022BBDF824 +:108A7000142020F8022BCDE900B9CDE90290CDF801 +:108A800010A0BDF81E10BDF8143000220B9805F0A0 +:108A900096FB08B103209FE7BDF814002044001D99 +:108AA00084B206A805F0C7FA20B10A2806D0FEF75E +:108AB0000EF991E7BDF81E10B142B9D934B17DB1BC +:108AC0003888A11C884203D20C2085E7052083E763 +:108AD00022462946404605F058FD014628190180E6 +:108AE000A41C3C80002077E710B50446F8F7D7FBBC +:108AF00008B1102010BD8948C0892080002010BD19 +:108B0000F0B58BB00D4606461422002103A805F0EF +:108B1000BEFC01208DF80C008DF8100000208DF8AF +:108B20001100ADF814503046FAF78CFC48B10078CB +:108B3000222812D3042130460BF0B8F9040005D1E5 +:108B400003E043F202000BB0F0BDFFDF04F11400BC +:108B5000074604F0F4F8800601D40820F3E7207CEF +:108B6000022140F00100207409A80094CDE9011011 +:108B7000072203A930466368FEF7A2FA20B1217CE0 +:108B800021F001012174DEE729463046F9F791FC16 +:108B900008A9384604F0C2F800B1FFDFBDF8204054 +:108BA000172C01D2172000E02046A84201D92C46FC +:108BB00002E0172C00D2172421463046FFF713FBA2 +:108BC00021463046F9F799F90020BCE7F8B51C4674 +:108BD00015460E46069F0BF09AFA2346FF1DBCB2BF +:108BE00031462A4600940AF086FEF8BD70B50C4660 +:108BF00005460E220021204605F049FC0020208079 +:108C00002DB1012D01D0FFDF64E4062000E0052036 +:108C1000A0715FE410B548800878134620F00F007B +:108C2000001D20F0F00080300C4608701422194618 +:108C300004F1080005F001FC00F0DBFC374804609B +:108C400010BD2DE9F047DFF8D890491D064621F008 +:108C5000030117460C46D9F800000AF062FF050030 +:108C600000D1FFDF4FF000083560A5F800802146F5 +:108C7000D9F800000AF055FF050000D1FFDF75604C +:108C8000A5F800807FB104FB07F1091D0BD0D9F8CE +:108C900000000AF046FF040000D1FFDFB460C4F812 +:108CA0000080BDE8F087C6F80880FAE72DE9F041BA +:108CB0001746491D21F00302194D06460168144666 +:108CC00028680AF059FF2246716828680AF054FFA4 +:108CD0003FB104FB07F2121D03D0B16828680AF007 +:108CE0004BFF04200BF08AF8044604200BF08EF8AA +:108CF000201A012804D12868BDE8F0410AF006BF17 +:108D0000BDE8F08110B50C4605F058F900B1FFDF61 +:108D10002046BDE81040FDF7DABF000094020020B5 +:108D20001800002038B50C468288817B19B1418932 +:108D3000914200D90A462280C188121D90B26A462B +:108D40000AF0B2F8BDF80000032800D30320C1B236 +:108D5000208801F020F838BD38B50C468288817B28 +:108D600019B10189914200D90A462280C188121D99 +:108D700090B26A460AF098F8BDF80000022800D3C5 +:108D80000220C1B2208801F006F8401CC0B238BDF4 +:108D90002DE9FF5F82468B46F74814460BF103022C +:108DA000D0E90110CDE9021022F0030201A84FF42E +:108DB000907101920AF097FEF04E002C02D1F0491A +:108DC000019A8A60019901440191B57F05F101057D +:108DD00004D1E8B20CF098FD00B1FFDF019800EB80 +:108DE0000510C01C20F0030101915CB9707AB27AC1 +:108DF0001044C2B200200870B08C80B204F03DFF75 +:108E000000B1FFDF0198716A08440190214601A872 +:108E100000F084FF80460198C01C20F00300019000 +:108E2000B37AF27A717A04B100200AF052FF019904 +:108E300008440190214601A800F0B8FFCF48002760 +:108E40003D4690F801900CE0284600F04AFF0646A7 +:108E500081788088F9F7E8F871786D1C00FB01775C +:108E6000EDB24D45F0D10198C01C20F003000190F7 +:108E700004B100203946F9F7E2F8019900270844C7 +:108E80000190BE483D4690F801900CE0284600F065 +:108E900028FF0646C1788088FEF71BFC71786D1CA0 +:108EA00000FB0177EDB24D45F0D10198C01C20F0D8 +:108EB0000300019004B100203946FEF713FC01992C +:108EC0004FF0000908440190AC484D4647780EE049 +:108ED000284600F006FF0646807B30B106F1080008 +:108EE00002F09CF9727800FB02996D1CEDB2BD4254 +:108EF000EED10198C01C20F00300019004B10020C5 +:108F00009F494A78494602F08DF901990844019039 +:108F1000214601A800F0B8FE0198C01D20F007000E +:108F20000190DAF80010814204D3A0EB0B01B1F5F7 +:108F3000803F04DB4FF00408CAF8000004E0CAF8E0 +:108F40000000B8F1000F03D0404604B0BDE8F09F28 +:108F500084BB8C490020019A0EF044FEFBF714FA02 +:108F6000864C207F0090607F012825D0002328B305 +:108F70000022824800211030F8F73AFA00B1FFDFF2 +:108F80007E49E07F2031FEF759FF00B1FFDF7B48CB +:108F90004FF4F6720021443005F079FA7748042145 +:108FA000443080F8E91180F8EA11062180F8EB11CD +:108FB000032101710020C8E70123D8E702AAD8E7FE +:108FC00070B56E4C06464434207804EB4015E078CA +:108FD000083598B9A01990F8E80100280FD0A078BA +:108FE0000F2800D3FFDF20220021284605F04FFA8A +:108FF000687866F3020068700120E070284670BD52 +:109000002DE9F04105460C460027007805219046E1 +:109010003E46B1EB101F00D0FFDF287A50B1012887 +:109020000ED0FFDFA8F800600CB12780668000201A +:10903000BDE8F0810127092674B16888A08008E0A6 +:109040000227142644B16888A0802869E060A88AB5 +:109050002082287B2072E5E7A8F80060E7E730B5BA +:10906000464C012000212070617020726072032242 +:10907000A272E07261772177217321740521218327 +:109080001F216183607440A161610A21A177E077AB +:1090900039483B4DB0F801102184C07884F8220093 +:1090A0004FF4B06060626868C11C21F00301814226 +:1090B00000D0FFDF6868606030BD30B5304C1568A7 +:1090C000636810339D4202D20420136030BD2B4BE5 +:1090D0005D785A6802EB0512107051700320D08041 +:1090E000172090800120D0709070002090735878E5 +:1090F000401C5870606810306060002030BD70B552 +:1091000006461E480024457807E0204600F0E9FDA9 +:109110000178B14204D0641CE4B2AC42F5D1002025 +:1091200070BDF7B5074608780C4610B3FFF7E7FFA8 +:109130000546A7F12006202F06D0052E19D2DFE81C +:1091400006F00F383815270000F0D6FD0DB169780C +:1091500000E00021401AA17880B20844FF2808D816 +:10916000A07830B1A088022831D202E060881728A8 +:109170002DD20720FEBD000030610200B0030020A8 +:109180001C000020000000206E52463578000000D0 +:10919000207AE0B161881729EBD3A1881729E8D399 +:1091A000A1790029E5D0E1790029E2D0402804D94D +:1091B000DFE7242F0BD1207A48B161884FF6FB708E +:1091C000814202D8A188814201D90420D2E765B941 +:1091D000207802AA0121FFF770FF0028CAD1207869 +:1091E000FFF78DFF050000D1FFDF052E18D2DFE865 +:1091F00006F0030B0E081100A0786870A088E880C4 +:109200000FE06088A8800CE0A078A87009E0A07842 +:10921000E87006E054F8020FA8606068E86000E0BB +:10922000FFDF0020A6E71A2835D00DDC132832D244 +:10923000DFE800F01B31203131272723252D313184 +:1092400029313131312F0F00302802D003DC1E28A4 +:1092500021D1072070473A3809281CD2DFE800F0F6 +:10926000151B0F1B1B1B1B1B07000020704743F225 +:109270000400704743F202007047042070470D203D +:1092800070470F2070470820704711207047132047 +:109290007047062070470320704710B5007800F033 +:1092A000010009F0F3FDBDE81040BCE710B50078FF +:1092B00000F0010009F0F3FDBDE81040B3E70EB582 +:1092C000017801F001018DF80010417801F00101F1 +:1092D0008DF801100178C1F340018DF8021041783A +:1092E000C1F340018DF80310017889088DF804104E +:1092F000417889088DF8051081788DF80610C178BD +:109300008DF8071000798DF80800684608F0FDFD1B +:10931000FFF789FF0EBD2DE9FC5FDFF8F883FE4CF7 +:1093200000264FF490771FE0012000F082FD01201D +:10933000FFF746FE05463946D8F808000AF0F1FB6B +:10934000686000B9FFDF686808F0AAFCB0B1284681 +:10935000FAF75EFB284600F072FD28B93A466968C4 +:10936000D8F808000AF008FC94F9E9010428DBDACF +:1093700002200AF043FD07460025AAE03A46696844 +:10938000D8F808000AF0F8FBF2E7B8F802104046F7 +:10939000491C89B2A8F80210B94201D300214180CA +:1093A0000221B8F802000AF081FD002866D0B8F862 +:1093B0000200694609F0CFFCFFF735FF00B1FFDF7F +:1093C0009DF80000019078B1B8F802000AF0B1FEF3 +:1093D0005FEA000900D1FFDF48460AF020F918B122 +:1093E000B8F8020002F0E4F9B8F802000AF08FFEC3 +:1093F0005FEA000900D1FFDF48460AF008F9E8BB40 +:109400000321B8F802000AF051FD5FEA000B4BD1CE +:10941000FFDF49E0DBF8100010B10078FF284DD0E5 +:10942000022000F006FD0220FFF7CAFD82464846F2 +:109430000AF0F9F9CAF8040000B9FFDFDAF804000D +:109440000AF0C1FA002100900170B8F802105046ED +:10945000AAF8021002F0B2F848460AF0B6FA00B9CB +:10946000FFDF019800B10126504600F0E8FC18B972 +:109470009AF80100000705D5009800E027E0CBF836 +:10948000100011E0DBF8101039B10878401C10F022 +:10949000FF00087008D1FFDF06E0002211464846B1 +:1094A00000F0F0FB00B9FFDF94F9EA01022805DBC8 +:1094B000B8F8020002F049F80028ABD194F9E901AC +:1094C000042804DB48460AF0E4FA00B101266D1CCA +:1094D000EDB2BD4204D294F9EA010228BFF655AFBD +:1094E000002E7FF41DAFBDE8FC5F032000F0A1BC9F +:1094F00010B5884CE06008682061AFF2E510F9F71C +:10950000E4FC607010BD844800214438017081483B +:10951000017082494160704770B505464FF0805038 +:109520000C46D0F8A410491C05D1D0F8A810C943A6 +:109530000904090C0BD050F8A01F01F0010129709B +:10954000416821608068A080287830B970BD06210C +:1095500020460DF0CCFF01202870607940F0C0005B +:10956000607170BD70B54FF080540D46D4F8801016 +:10957000491C0BD1D4F88410491C07D1D4F88810A9 +:10958000491C03D1D4F88C10491C0CD0D4F880109D +:109590000160D4F884104160D4F888108160D4F858 +:1095A0008C10C16002E010210DF0A1FFD4F89000F2 +:1095B000401C0BD1D4F89400401C07D1D4F898007B +:1095C000401C03D1D4F89C00401C09D054F8900FE3 +:1095D000286060686860A068A860E068E86070BDA6 +:1095E0002846BDE8704010210DF081BF4A4800793F +:1095F000E6E470B5484CE07830B3207804EB4010D6 +:10960000407A00F00700204490F9E801002800DCCF +:10961000FFDF2078002504EB4010407A00F00700BF +:10962000011991F8E801401E81F8E8012078401CFA +:10963000C0B220700F2800D12570A078401CA07007 +:109640000DF0D4FDE57070BDFFDF70BD3EB5054681 +:1096500003210AF02BFC044628460AF058FD054673 +:1096600004B9FFDF206918B10078FF2800D1FFDFBF +:1096700001AA6946284600F005FB60B9FFDF0AE051 +:10968000002202A9284600F0FDFA00B9FFDF9DF88C +:10969000080000B1FFDF9DF80000411E8DF80010AA +:1096A000EED220690199884201D1002020613EBD9F +:1096B00070B50546A0F57F400C46FF3800D1FFDFAE +:1096C000012C01D0FFDF70BDFFF790FF040000D137 +:1096D000FFDF207820F00F00401D20F0F000503018 +:1096E000207065800020207201202073BDE870404A +:1096F0007FE72DE9F04116460D460746FFF776FF56 +:10970000040000D1FFDF207820F00F00401D20F082 +:10971000F00005E01C000020F403002048140020A5 +:109720005030207067800120207228682061A8884E +:10973000A0822673BDE8F0415BE77FB5FFF7DFFC51 +:10974000040000D1FFDF02A92046FFF7EBFA05462F +:1097500003A92046FFF700FB8DF800508DF80100AB +:10976000BDF80800001DADF80200BDF80C00001D9A +:10977000ADF80400E088ADF80600684609F070FB1B +:10978000002800D0FFDF7FBD2DE9F05FFC4E814651 +:10979000307810B10820BDE8F09F4846F7F77FFD0C +:1097A00008B11020F7E7F74C207808B9FFF757FC0D +:1097B000A17A607A4D460844C4B200F09DFAA042F6 +:1097C00007D2201AC1B22A460020FFF776FC0028F3 +:1097D000E1D17168EB48C91C002721F003017160D9 +:1097E000B3463E463D46BA463C4690F801800AE004 +:1097F000204600F076FA4178807B0E4410FB01553C +:10980000641CE4B27F1C4445F2D10AEB870000EBF4 +:10981000C600DC4E00EB85005C46F17A012200EBCD +:109820008100DBF80410451829464846FFF7B0FAD6 +:10983000070012D00020FFF762FC05000BD005F1F5 +:109840001300616820F00300884200D0FFDF7078C9 +:10985000401E7070656038469DE7002229464846E4 +:10986000FFF796FA00B1FFDFD9F8000060604FF60D +:10987000FF7060800120207000208CE72DE9F0410E +:109880000446BF4817460D46007810B10820BDE8D1 +:10989000F0810846F7F7DDFC08B11020F7E7B94E74 +:1098A000307808B9FFF7DBFB601E1E2807D8012CB3 +:1098B00023D12878FE2820D8B0770020E7E7A4F14C +:1098C00020001F2805D8E0B23A462946BDE8F041FD +:1098D00027E4A4F140001F2805D829462046BDE80A +:1098E000F04100F0D4BAA4F1A0001F2805D8294601 +:1098F0002046BDE8F04100F006BB0720C7E72DE990 +:10990000F05F81460F460846F7F7C9FC48B948465C +:10991000F7F7E3FC28B909F1030020F003014945FA +:1099200001D0102037E797484FF0000B4430817882 +:1099300069B14178804600EB411408343E883A46CC +:109940000021204600F089FA050004D027E0A7F89E +:1099500000B005201FE7B9F1000F24D03888B042CD +:1099600001D90C251FE0607800F00700824600F066 +:1099700060FA08EB0A063A4696F8E8014946401CA8 +:1099800086F8E801204600F068FA054696F8E801F6 +:10999000401E86F8E801032000F04BFA2DB10C2D93 +:1099A00001D0A7F800B02846F5E6754F5046BAF149 +:1099B000010F25D002280DD0BAF1030F35D0FFDFFB +:1099C00098F801104046491CC9B288F801100F29C7 +:1099D00037D038E0606828B16078000702D460882A +:1099E000FFF734FE98F8EA014446012802D178785E +:1099F000F9F78AFA94F9EA010428E1DBFFDFDFE7EF +:109A0000616821B14FF49072B8680AF0B5F898F81F +:109A1000E9014446032802D17878F9F775FA94F9F8 +:109A2000E9010428CCDBFFDFCAE76078C00602D575 +:109A30006088FFF70BFE98F9EB010628C0DBFFDF1B +:109A4000BEE780F801B08178491E88F8021096F8C8 +:109A5000E801401C86F8E801A5E770B50C4605460C +:109A6000F7F7F7FB18B92046F7F719FC08B11020F3 +:109A700070BD28460BF07FFF207008B1002070BD3C +:109A8000042070BD70B505460BF08EFFC4B22846A9 +:109A9000F7F723FC08B1102070BD35B128782C7081 +:109AA00018B1A04201D0072070BD2046FDF77EFE10 +:109AB000052805D10BF07BFF012801D0002070BDE7 +:109AC0000F2070BD70B5044615460E460846F7F7E0 +:109AD000C0FB18B92846F7F7E2FB08B1102070BDAB +:109AE000022C03D0102C01D0092070BD2A4631462B +:109AF00020460BF086FF0028F7D0052070BD70B51A +:109B000014460D460646F7F7A4FB38B92846F7F782 +:109B1000C6FB18B92046F7F7E0FB08B1102070BD6E +:109B20002246294630460BF06EFF0028F7D007206A +:109B300070BD3EB50446F7F7B2FB08B110203EBD3C +:109B4000684608F053F9FFF76EFB0028F7D19DF83F +:109B500006002070BDF808006080BDF80A00A080F3 +:109B600000203EBD70B505460C460846F7F7B5FB2C +:109B700020B95CB12068F7F792FB28B1102070BDC6 +:109B80001C000020B0030020A08828B121462846F0 +:109B9000BDE87040FDF762BE0920F0E770B50546EC +:109BA0000C460846F7F755FBA0BB681E1E280ED8CA +:109BB000032D01D90720E2E705B9FFDFFE4800EBDE +:109BC000850050F8041C2046BDE870400847A5F108 +:109BD00020001F2805D821462846BDE87040FAF726 +:109BE00042BBA5F160001F2805D821462846BDE8E4 +:109BF0007040F8F7DABCF02D0DD0F12D15D0BF2D47 +:109C0000D8D1A078218800F0010001F08DFB98B137 +:109C10000020B4E703E0A068F7F71BFB08B11020B1 +:109C2000ADE7204609F081F902E0207809F0A0F9BB +:109C3000BDE87040FFF7F7BA0820A0E770B504460A +:109C40000D460846F7F72BFB30B9601E1E280FD8CB +:109C50002846F7F7FEFA08B1102090E7012C03D050 +:109C6000022C01D0032C01D1062088E7072086E7CB +:109C7000A4F120001F28F9D829462046BDE87040ED +:109C8000FAF762BB09F092BC38B50446CB48007BBA +:109C900000F00105F9B904F01DFC0DB1226800E0E7 +:109CA0000022C7484178C06807F06DFDC4481030F5 +:109CB000C0788DF8000010B1012802D004E0012026 +:109CC00000E000208DF80000684608F0FFF8BA4870 +:109CD000243808F0B5FE002D02D02068283020601E +:109CE00038BD30B5B54D04466878A04200D8FFDFD6 +:109CF000686800EB041030BD70B5B04800252C46F4 +:109D0000467807E02046FFF7ECFF4078641C2844C3 +:109D1000C5B2E4B2B442F5D1284630E72DE9F041AE +:109D20000C4607464FF0000800F01FF90646FF28D2 +:109D300001D94FF013083868C01C20F003023A60C4 +:109D400054EA080421D19D48F3B2072128300DF0D0 +:109D5000DBFD09E0072C10D2DFE804F00604080858 +:109D60000A040600974804E0974802E0974800E09C +:109D700097480DF0E9FD054600E0FFDFA54200D061 +:109D8000FFDF641CE4B2072CE4D3386800EB061054 +:109D9000386040467BE5021D5143452900D24521EC +:109DA0000844C01CB0FBF2F0C0B270472DE9FC5F64 +:109DB000064682484FF000088B464746444690F8D6 +:109DC000019022E02046FFF78CFF050000D1FFDF65 +:109DD000687869463844C7B22846FEF7A3FF824632 +:109DE00001A92846FEF7B8FF0346BDF80400524615 +:109DF000001D81B2BDF80000001D80B20AF0D4F849 +:109E00006A78641C00FB0288E4B24C45DAD1306801 +:109E1000C01C20F003003060BBF1000F00D0002018 +:109E2000424639460AF0CEF8316808443060BDE851 +:109E3000FC9F6249443108710020C87070475F4937 +:109E40004431CA782AB10A7801EB421108318142C3 +:109E500001D001207047002070472DE9F0410646EF +:109E60000078154600F00F0400201080601E0F4699 +:109E7000052800D3FFDF50482A46183800EB84003D +:109E8000394650F8043C3046BDE8F04118472DE90A +:109E9000F0414A4E0C46402806D0412823D04228A3 +:109EA0002BD0432806D123E0A07861780D18E17803 +:109EB000814201D90720EAE42078012801D9132042 +:109EC000E5E4FF2D08D80BF009FF07460DF046F931 +:109ED000381A801EA84201DA1220D8E42068B06047 +:109EE000207930730DE0BDE8F041084600F078B805 +:109EF00008780228DED8307703E008780228D9D81D +:109F000070770020C3E4F8B500242C4DA02805D0BC +:109F1000A12815D0A22806D00720F8BD087800F0A7 +:109F20000100E8771FE00E4669463046FDF73DFD2B +:109F30000028F2D130882884B07885F8220012E019 +:109F400008680921F82801D3820701D00846F8BD26 +:109F50006A7C02F00302012A04D16A8BD73293B2E1 +:109F60008342F3D868622046F8BD2DE9F047DFF858 +:109F70004C900026344699F8090099F80A2099F87F +:109F800001700244D5B299F80B20104400F0FF088C +:109F900008E02046FFF7A5FE817B407811FB0066B4 +:109FA000641CE4B2BC42F4D199F8091099F80A0093 +:109FB0002944294441440DE054610200B0030020CB +:109FC0001C0000206741000045B30000DD2F0000A9 +:109FD000FB56010000B1012008443044BDE8F08781 +:109FE00038B50446407800F00300012803D0022869 +:109FF0000BD0072038BD606858B1F7F777F9D0B9B2 +:10A000006068F7F76AF920B915E06068F7F721F999 +:10A0100088B969462046FCF729F80028EAD160781B +:10A0200000F00300022808D19DF8000028B1606804 +:10A03000F7F753F908B1102038BD6189F8290DD818 +:10A04000208988420AD8607800F003020A48012A71 +:10A0500006D1D731426A89B28A4201D2092038BD7D +:10A0600094E80E0000F1100585E80E000AB9002101 +:10A070000183002038BD0000B00300202DE9F0412D +:10A08000074614468846084601F08AFD064608EB56 +:10A0900088001C22796802EBC0000D18688C58B14A +:10A0A0004146384601F08BFD014678680078C200D1 +:10A0B000082305F120000CE0E88CA8B141463846A1 +:10A0C00001F084FD0146786808234078C20005F15C +:10A0D000240009F0A8FD38B1062121726681D0E97B +:10A0E0000010C4E9031009E0287809280BD00520E6 +:10A0F000207266816868E060002028702046BDE814 +:10A10000F04101F02EBD072020726681F4E72DE9B1 +:10A11000F04116460D460746406801EB85011C22BA +:10A1200002EBC1014418204601F072FD40B100214C +:10A13000708865F30F2160F31F4106200DF0BEFC0F +:10A1400009202070324629463846BDE8F04195E79F +:10A150002DE9F0410E46074600241C21F07816E058 +:10A1600004EB8403726801EBC303D25C6AB1FFF7AE +:10A170003DFA050000D1FFDF6F802A4621463046B8 +:10A18000FFF7C5FF0120BDE8F081641CE4B2A042E6 +:10A19000E6D80020F7E770B5064600241C21C078F9 +:10A1A0000AE000BF04EB8403726801EBC303D51817 +:10A1B0002A782AB1641CE4B2A042F3D8402070BDD2 +:10A1C00028220021284604F062F9706880892881DD +:10A1D000204670BD70B5034600201C25DC780CE0DD +:10A1E00000EB80065A6805EBC6063244167816B1B5 +:10A1F000128A8A4204D0401CC0B28442F0D8402067 +:10A2000070BDF0B5044600201C26E5780EE000BFC6 +:10A2100000EB8007636806EBC7073B441F788F425B +:10A2200002D15B78934204D0401CC0B28542EFD883 +:10A230004020F0BD0078032801D0002070470120A5 +:10A2400070470078022801D0002070470120704735 +:10A250000078072801D000207047012070472DE9C1 +:10A26000F041064688461078F1781546884200D3BA +:10A27000FFDF2C781C27641CF078E4B2A04201D8E0 +:10A28000201AC4B204EB8401706807EBC1010844D2 +:10A29000017821B14146884708B12C7073E72878CE +:10A2A000A042E8D1402028706DE770B514460B88B5 +:10A2B0000122A240134207D113430B8001230A223B +:10A2C000011D09F07AFC047070BD2DE9FF4F81B0CB +:10A2D0000878DDE90E7B9A4691460E4640072CD45D +:10A2E000019809F026FF040000D1FFDF07F1040800 +:10A2F00020461FFA88F109F065F8050000D1FFDF5C +:10A30000204629466A4609F0B0FA0098A0F8037082 +:10A31000A0F805A0284609F056FB017869F306016C +:10A320006BF3C711017020461FFA88F109F08DF810 +:10A3300000B9FFDF019807F094F906EB0900017FEF +:10A34000491C017705B0BDE8F08F2DE9F84F0E46A6 +:10A350009A4691460746032109F0A8FD0446008D60 +:10A36000DFF8B885002518B198F80000B0421ED17A +:10A37000384609F0DEFE070000D1FFDF09F10401D5 +:10A38000384689B209F01EF8050010D03846294633 +:10A390006A4609F06AFA009800210A460180817035 +:10A3A00007F01CFA0098C01DCAF8000021E098F8D8 +:10A3B0000000B04216D104F1260734F8341F012002 +:10A3C00000FA06F911EA090F00D0FFDF2088012307 +:10A3D00040EA090020800A22391D384609F008FCAD +:10A3E000067006E0324604F1340104F12600FFF75E +:10A3F0005CFF0A2188F800102846BDE8F88FFEB5FA +:10A4000015460C46064602AB0C220621FFF79DFFBF +:10A41000002827D00299607812220A70801C4870A8 +:10A4200008224A80A07002982988052381806988C3 +:10A43000C180A9880181E988418100250C20CDE9EE +:10A440000005062221463046FFF73FFF294600223D +:10A4500066F31F41F02310460DF086FA6078801CE9 +:10A4600060700120FEBDFEB514460D46062206466C +:10A4700002AB1146FFF769FF002812D0029B1320A0 +:10A4800000211870A8785870022058809C800620FF +:10A49000CDE900010246052329463046FFF715FFA6 +:10A4A0000120FEBD2DE9FE430C46804644E002AB90 +:10A4B0000E2207214046FFF748FF002841D0606880 +:10A4C0001C2267788678BF1C06EB860102EBC1016F +:10A4D000451802981421017047700A214180698A49 +:10A4E0000181E98A4181A9888180A98981813046D9 +:10A4F00001F056FB029905230722C8806F700420E3 +:10A50000287000250E20CDE9000521464046FFF7C2 +:10A51000DCFE294666F30F2168F31F41F023002279 +:10A5200006200DF021FA6078FD49801C6070626899 +:10A530002046921CFFF793FE606880784028B6D1D1 +:10A540000120BDE8FE83FEB50D46064638E002ABAD +:10A550000E2207213046FFF7F8FE002835D0686844 +:10A560001C23C17801EB810203EBC202841802981C +:10A5700015220270627842700A224280A2894281CA +:10A58000A2888281084601F00BFB01460298818077 +:10A59000618AC180E18A0181A088B8B10020207061 +:10A5A00000210E20CDE9000105230722294630466F +:10A5B000FFF78BFE6A68DB492846D21CFFF74FFE87 +:10A5C0006868C0784028C2D10120FEBD0620E6E7B9 +:10A5D0002DE9FE430C46814644E0204601F002FB93 +:10A5E000D0B302AB082207214846FFF7AEFE002891 +:10A5F000A7D060681C2265780679AD1C06EB860141 +:10A6000002EBC10147180298B7F8108006210170CB +:10A61000457004214180304601F0C2FA014602989B +:10A6200005230722C180A0F804807D7008203870BF +:10A630000025CDE9000521464846FFF746FE29469C +:10A6400066F30F2169F31F41F023002206200DF06D +:10A650008BF96078801C60706268B3492046121DD7 +:10A66000FFF7FDFD606801794029B6D1012068E758 +:10A670002DE9F34F83B00D4691E0284601F0B2FA80 +:10A6800000287DD068681C2290F806A00AEB8A0199 +:10A6900002EBC10144185146284601F097FAA1780F +:10A6A000CB0069684978CA00014604F1240009F02A +:10A6B000D6FA07468188E08B4FF00009091A8EB25E +:10A6C00008B1C84607E04FF00108504601F053FAC0 +:10A6D00008B9B61CB6B2208BB04200D80646B346C5 +:10A6E00002AB324607210398FFF72FFE060007D082 +:10A6F000B8F1000F0BD0504601F03DFA10B106E062 +:10A7000000201FE60299B8884FF0020908800196E0 +:10A71000E28B3968ABEB09001FFA80F80A44039812 +:10A720004E46009209F005FDDDE90021F61D434685 +:10A73000009609F014F9E08B404480B2E083B988B8 +:10A74000884201D1012600E00026CDE900B6238A27 +:10A75000072229460398FFF7B8FD504601F00BFA8F +:10A7600010B9E089401EE08156B1A078401CA0706D +:10A770006868E978427811FB02F1CAB2012300E06F +:10A7800007E081690E3009F018FA80F800A0002077 +:10A79000E0836A6865492846921DFFF760FD686896 +:10A7A000817940297FF469AF0120CBE570B5064679 +:10A7B00048680D4614468179402910D104EB840184 +:10A7C0001C2202EBC101084401F043FA002806D024 +:10A7D0006868294684713046BDE8704048E770BD1E +:10A7E000FEB50C460746002645E0204601F0FAF982 +:10A7F000D8B360681C22417901EB810102EBC101F1 +:10A800004518688900B9FFDF02AB082207213846E6 +:10A81000FFF79BFD002833D00299607816220A705A +:10A82000801C4870042048806068407901F0B8F9C5 +:10A83000014602980523072281806989C18008208A +:10A84000CDE9000621463846FFF73FFD6078801CC1 +:10A850006070A88969890844B0F5803F00D3FFDFA4 +:10A86000A88969890844A8816E81626830492046B8 +:10A87000521DFFF7F4FC606841794029B5D10120F1 +:10A88000FEBD30B5438C458BC3F3C704002345B1EF +:10A89000838B641EED1AC38A6D1E1D4495FBF3F372 +:10A8A000E4B22CB1008918B1A04200D8204603447C +:10A8B0004FF6FF70834200D3034613800C7030BD07 +:10A8C0002DE9FC41074616460D46486802EB860115 +:10A8D0001C2202EBC10144186A4601A92046FFF779 +:10A8E000D0FFA089618901448AB2BDF8001091426D +:10A8F00012D0081A00D5002060816868407940288D +:10A900000AD1204601F09BF9002805D06868294645 +:10A9100046713846FFF764FFBDE8FC813000002037 +:10A9200035A2000043A2000051A2000053BC000069 +:10A930003FBC00002DE9FE4F0F468146154650886A +:10A94000032109F0B3FA0190B9F8020001F01BF9F4 +:10A9500082460146019801F045F9002824D001986B +:10A960001C2241680AEB8A0002EBC0000C1820464A +:10A9700001F04EF9002817D1B9F80000E18A8842A9 +:10A980000ED8A18961B1B8420ED100265146019876 +:10A9900001F015F9218C01EB0008608B30B114E057 +:10A9A000504601F0E8F8A0B3BDE8FE8F504601F034 +:10A9B000E2F808B1678308E0022FF5D3B9F8040084 +:10A9C0006083618A884224D80226B81B87B2B8F80F +:10A9D0000400A28B801A002814DD874200DA384672 +:10A9E0001FFA80FB688869680291D8F800100A4451 +:10A9F000009209F08CFBF61D009A5B4602990096C6 +:10AA000008F079FFA08B384480B2A083618B884224 +:10AA100007D96888019903B05246BDE8F04F01F0AC +:10AA200035B91FD14FF009002872B9F802006881CA +:10AA3000D8E90010C5E90410608BA881284601F010 +:10AA400090F85146019801F0BAF8014601980823A0 +:10AA500040680078C20004F1200009F0E4F800200A +:10AA6000A0836083504601F086F810B9A089401E8B +:10AA7000A0816888019903B00AF0FF02BDE8F04F99 +:10AA80001EE72DE9F041064615460F461C461846BE +:10AA9000F6F7DFFB18B92068F6F701FC10B11020BB +:10AAA000BDE8F0817168688C0978B0EBC10F01D303 +:10AAB0001320F5E73946304601F081F80146706809 +:10AAC00008230078C20005F1200009F076F8D4E9E7 +:10AAD0000012C0E900120020E2E710B5044603218D +:10AAE00009F0E4F90146007800F00300022805D0DF +:10AAF0002046BDE8104001F1140280E48A8A204615 +:10AB0000BDE81040AFE470B50446032109F0CEF96A +:10AB1000054601462046FFF75BFD002816D0294672 +:10AB20002046FFF75DFE002810D029462046FFF79B +:10AB30000AFD00280AD029462046FFF7B3FC00286A +:10AB400004D029462046BDE8704091E570BD2DE94E +:10AB5000F0410C4680461EE0E178427811FB02F19C +:10AB6000CAB2816901230E3009F05DF80778606888 +:10AB70001C22C179491EC17107EB8701606802EB95 +:10AB8000C10146183946204601F02CF818B130466C +:10AB900001F037F820B16068C1790029DCD17FE786 +:10ABA000FEF724FD050000D1FFDF0A202872384699 +:10ABB00000F0F6FF68813946204601F007F80146AB +:10ABC000606808234078C20006F1240009F02BF8E1 +:10ABD000D0E90010C5E90310A5F80280284600F06E +:10ABE000C0FFB07800B9FFDFB078401EB07057E703 +:10ABF00070B50C460546032109F058F90146406836 +:10AC0000C2792244C2712846BDE870409FE72DE911 +:10AC1000FE4F8246507814460F464FF00008002839 +:10AC20004FD0012807D0022822D0FFDF2068B8606B +:10AC30006068F860B8E602AB0E2208215046FFF7C4 +:10AC400084FB0028F2D00298152105230170217899 +:10AC500041700A214180C0F80480C0F80880A0F843 +:10AC60000C80628882810E20CDE90008082221E054 +:10AC7000A678304600F094FF054606EB86012C22AC +:10AC8000786802EBC1010822465A02AB11465046D1 +:10AC9000FFF75BFB0028C9D00298072101702178DB +:10ACA00041700421418008218580C680CDE90018CB +:10ACB00005230A4639465046FFF707FB87F8088008 +:10ACC00072E6A678022516B1022E13D0FFDF2A1DE8 +:10ACD000914602AB08215046FFF737FB0028A5D06C +:10ACE00002980121022E01702178417045808680F2 +:10ACF00002D005E00625EAE7A188C180E18801814C +:10AD0000CDE900980523082239465046D4E710B50E +:10AD10000446032109F0CAF8014600F10802204662 +:10AD2000BDE8104073E72DE9F04F0F4605468DB0A2 +:10AD300014465088032109F0B9F84FF000088DF847 +:10AD400014800646ADF81680042F7BD36A78002A5B +:10AD500078D028784FF6FF794FF01C0A132834D0AA +:10AD600008DC012871D006284AD007286ED01228A6 +:10AD70000ED106E014286AD0152869D0162807D10C +:10AD8000AAE10C2F04D1307800F00301022907D08A +:10AD9000CDF80880CDF80C8068788DF808004CE07C +:10ADA00040F0080030706878B07001208DF8140011 +:10ADB000A888ADF81800E888ADF81A002889ADF821 +:10ADC0001C006889ADF81E0011E1B078904239D1BD +:10ADD0003078010736D5062F34D120F008003070C6 +:10ADE0006088414660F31F4100200CF067FE02209E +:10ADF0008DF81400ADF81890A888ADF81A00F6E0A8 +:10AE0000082F1FD1A888EF88814600F0BCFE80463D +:10AE10000146304600F0E6FE18B1404600F0ABFEB9 +:10AE2000B8B1FC48D0E90010CDE902106878ADF85F +:10AE30000C908DF80800ADF80E70608802AA3146BB +:10AE4000FFF7E5FE0DB0BDE8F08FB6E01EE041E093 +:10AE5000ECE0716808EB88002C2202EBC000085A75 +:10AE6000B842EFD1EB4802AAD0E90210CDE90210B6 +:10AE700068788DF8080008F0FF058DF80A506088A2 +:10AE80003146FFF7C4FE224629461FE0082FD9D1DC +:10AE9000B5F80480E88800F076FE074601463046A3 +:10AEA00000F0A0FE0028CDD007EB870271680AEB06 +:10AEB000C2000844028A4245C4D101780829C1D1A0 +:10AEC000407869788842BDD1F9B222463046FFF712 +:10AED0001EF9B7E70E2F7FF45BAFE9886F898B46C9 +:10AEE000B5F808903046FFF775F9ABF140014029FD +:10AEF00001D309204AE0B9F1170F01D3172F01D26E +:10AF00000B2043E040280ED000EB800271680AEB72 +:10AF1000C20008440178012903D140786978884249 +:10AF200090D00A2032E03046FFF735F9014640283C +:10AF30002BD001EB810372680AEBC30002EB00081F +:10AF4000012288F800206A7888F801207068AA88B1 +:10AF50004089B84200D93846AD8903232372A282C2 +:10AF6000E7812082A4F80C906582084600F018FE64 +:10AF70006081A8F81490A8F81870A8F80E50A8F8E6 +:10AF800010B0204600F0EDFD5CE7042005212172A1 +:10AF9000A4F80A80E081012121739E49D1E90421AE +:10AFA000CDE9022169788DF80810ADF80A006088B3 +:10AFB00002AA3146FFF72BFEE3E7062F89D3B078CC +:10AFC00090421AD13078010717D520F00800307070 +:10AFD0006088414660F31F4100200CF06FFD0220A5 +:10AFE0008DF81400A888ADF81800ADF81A906088A4 +:10AFF000224605A9F9F7E3F824E704213046FFF7D4 +:10B0000000F905464028BFD0022083030090224665 +:10B010002946304600F003FE4146608865F30F2163 +:10B0200060F31F4106200CF049FD0BE70E2FABD15A +:10B0300004213046FFF7E5F881464028A4D0414678 +:10B04000608869F30F2160F31F4106200CF036FD84 +:10B05000A8890B906889099070682F894089B84247 +:10B0600000D938468346B5F80680A8880A90484635 +:10B0700000F096FD60810B9818B1022000900B9BA8 +:10B0800024E0B8F1170F1ED3172F1CD30420207211 +:10B0900009986082E781A4F810B0A4F80C8009EB4D +:10B0A000890271680AEBC2000D18DDE90913A5F8E1 +:10B0B0001480A5F818B0E9812B82204600F051FDDC +:10B0C00006202870BEE601200B2300902246494648 +:10B0D000304600F0A4FDB5E6082F8DD1A988304692 +:10B0E000FFF778F80746402886D000F044FD002896 +:10B0F0009BD107EB870271680AEBC20008448046C7 +:10B1000000F086FD002890D1ED88B8F80E002844A4 +:10B11000B0F5803F05D360883A46314600F0B6FD71 +:10B1200090E6002DCED0A8F80E0060883A46314651 +:10B13000FFF73CFB08202072384600F031FD6081AB +:10B14000A5811EE72DE9F05F0C4601281FD09579F7 +:10B1500092F8048092F8056005EB85011F2202EB4E +:10B16000C10121F0030B08EB060111FB05F14FF6BD +:10B17000FF7202EAC10909F1030115FB0611264F0E +:10B1800021F0031ABB6840B101283ED125E0616877 +:10B19000E57891F800804E78DEE75946184608F0C9 +:10B1A000C0FC606000B9FFDF5A460021606803F010 +:10B1B0006EF9E5705146B86808F0B3FC6168486103 +:10B1C00000B9FFDF6068426902EB090181616068D4 +:10B1D00080F800806068467017E0606852464169F8 +:10B1E000184608F0C9FC5A466168B86808F0C4FC03 +:10B1F000032008F003FE0446032008F007FE201A8F +:10B20000012802D1B86808F081FC0BEB0A00BDE808 +:10B21000F09F000060610200300000200246002123 +:10B2200002208FE7F7B5FF4C0A20164620700098E1 +:10B2300060B100254FEA0D0008F055FC0021A17017 +:10B240006670002D01D10099A160FEBD012500208E +:10B25000F2E770B50C46154638220021204603F06F +:10B2600016F9012666700A22002104F11C0003F081 +:10B270000EF905B9FFDF297A207861F3010020700B +:10B28000A87900282DD02A4621460020FFF75AFF32 +:10B2900061684020E34A88706168C870616808711D +:10B2A000616848716168887161682888088161688F +:10B2B00068884881606886819078002811D061682C +:10B2C0000620087761682888C885616828884886CC +:10B2D00060680685606869889288018681864685EF +:10B2E000828570BDC878002802D00022012029E79D +:10B2F000704770B50546002165F31F4100200CF032 +:10B30000DDFB0321284608F0D1FD040000D1FFDF5A +:10B3100021462846FEF71CFF002804D0207840F084 +:10B3200010002070012070BD70B505460C4603204A +:10B3300008F056FD08B1002070BDBA4885708480C1 +:10B34000012070BD2DE9FF4180460E460F0CFEF72F +:10B350004DF9050007D06F800321384608F0A6FD9F +:10B36000040008D106E004B03846BDE8F0411321DE +:10B37000F9F750BBFFDF5FEA080005D0B8F1060F10 +:10B3800018D0FFDFBDE8FF8120782A4620F00800B2 +:10B3900020700020ADF8020002208DF800004FF66A +:10B3A000FF70ADF80400ADF8060069463846F8F7BE +:10B3B00006FFE7E7C6F3072101EB81021C23606863 +:10B3C00003EBC202805C042803D008280AD0FFDF08 +:10B3D000D8E7012000904FF440432A46204600F071 +:10B3E0001EFCCFE704B02A462046BDE8F041FEF738 +:10B3F0008EBE2DE9F05F05464089002790460C4639 +:10B400003E46824600F0BFFB8146287AC01E0828CF +:10B410006BD2DFE800F00D04192058363C47722744 +:10B420001026002C6CD0D5E90301C4E902015CE0D0 +:10B4300070271226002C63D00A2205F10C0104F1BA +:10B44000080002F0FAFF50E071270C26002C57D0BC +:10B45000E868A06049E0742710269CB3D5E9030191 +:10B46000C4E902016888032108F020FD8346FEF745 +:10B47000BDF802466888508049465846FEF7FEFDF2 +:10B4800033E075270A26ECB1A88920812DE07627C4 +:10B490001426BCB105F10C0004F1080307C883E8C9 +:10B4A000070022E07727102664B1D5E90301C4E93B +:10B4B00002016888032108F0F9FC01466888FFF75B +:10B4C00046FB12E01CE073270826CCB168880321F4 +:10B4D00008F0ECFC01460078C00606D56888FEF747 +:10B4E00037FE10B96888F8F777FAA8F800602CB131 +:10B4F0002780A4F806A066806888A080002086E6E1 +:10B50000A8F80060FAE72DE9FC410C461E461746F4 +:10B510008046032108F0CAFC05460A2C0AD2DFE85F +:10B5200004F005050505050509090907042303E0DD +:10B53000062301E0FFDF0023CDE9007622462946FD +:10B540004046FEF7C2FEBDE8FC81F8B50546A0F511 +:10B550007F40FF382BD0284608F0D9FD040000D1E9 +:10B56000FFDF204608F05FF9002821D001466A4637 +:10B57000204608F07AF900980321B0F805602846C3 +:10B5800008F094FC0446052E13D0304600F0FBFA78 +:10B5900005460146204600F025FB40B1606805EBFA +:10B5A00085013E2202EBC101405A002800D0012053 +:10B5B000F8BD007A0028FAD00020F8BDF8B504469E +:10B5C000408808F0A4FD050000D1FFDF6A46284648 +:10B5D000616800F0C4FA01460098091F8BB230F888 +:10B5E000032F0280428842800188994205D1042AB3 +:10B5F00008D0052A20D0062A16D022461946FFF781 +:10B6000099F9F8BD001D0E46054601462246304612 +:10B61000F6F739FF0828F4D1224629463046FCF7D0 +:10B6200064F9F8BD30000020636864880A46011D93 +:10B630002046FAF789F9F4E72246001DFFF773FB6D +:10B64000EFE770B50D460646032108F02FFC040015 +:10B6500004D02078000704D5112070BD43F2020009 +:10B6600070BD2A4621463046FEF7C9FE18B9286843 +:10B6700060616868A061207840F0080020700020B8 +:10B6800070BD70B50D460646032108F00FFC04009E +:10B6900004D02078000704D4082070BD43F20200D3 +:10B6A00070BD2A4621463046FEF7DDFE00B9A58270 +:10B6B000207820F008002070002070BD2DE9F04FA8 +:10B6C0000E4691B08046032108F0F0FB0446404648 +:10B6D00008F02FFD07460020079008900990ADF86C +:10B6E00030000A9002900390049004B9FFDF0DF13E +:10B6F0000809FFB9FFDF1DE038460BA9002207F05B +:10B7000055FF9DF82C0000F07F050A2D00D3FFDFC8 +:10B710006019017F491E01779DF82C00000609D5AC +:10B720002A460CA907A8FEF7C0FD19F80510491C08 +:10B7300009F80510761EF6B2DED204F13400F84D99 +:10B7400004F1260BDFF8DCA304F12A07069010E0D1 +:10B750005846069900F08CFA064628700A2800D34D +:10B76000FFDF5AF8261040468847E08CC05DB042A3 +:10B7700002D0208D0028EBD10A202870E94D4E46DA +:10B7800028350EE00CA907A800F072FA0446375DD0 +:10B7900055F8240000B9FFDF55F82420394640460B +:10B7A0009047BDF81E000028ECD111B0BDE8F08F25 +:10B7B00010B5032108F07AFB040000D1FFDF0A2254 +:10B7C000002104F11C0002F062FE207840F0040029 +:10B7D000207010BD10B50C46032108F067FB204413 +:10B7E000007F002800D0012010BD2DE9F84F8946C8 +:10B7F00015468246032108F059FB070004D028466D +:10B80000F5F727FD40B903E043F20200BDE8F88FE9 +:10B810004846F5F744FD08B11020F7E7786828B1ED +:10B8200069880089814201D90920EFE7B9F8000051 +:10B830001C2488B100F0A7F980460146384600F084 +:10B84000D1F988B108EB8800796804EBC000085C86 +:10B8500001280BD00820D9E73846FEF79CFC80462B +:10B86000402807D11320D1E70520CFE7FDF7BEFE22 +:10B8700006000BD008EB8800796804EBC0000C18B8 +:10B88000B9F8000020B1E88910B113E01120BDE73C +:10B890002888172802D36888172801D20720B5E71F +:10B8A000686838B12B1D224641463846FFF7E9F853 +:10B8B0000028ABD104F10C0269462046FEF7E1FFF7 +:10B8C000288860826888E082B9F8000030B10220E0 +:10B8D0002070E889A080E889A0B12BE003202070C7 +:10B8E000A889A08078688178402905D180F80280F5 +:10B8F00039465046FEF7D6FD404600F051F9A9F80A +:10B90000000021E07868218B4089884200D90846F0 +:10B910002083A6F802A004203072B9F800007081DC +:10B92000E0897082F181208B3082A08AB08130461C +:10B9300000F017F97868C178402905D180F80380B4 +:10B9400039465046FEF7FFFD00205FE770B50D4613 +:10B950000646032108F0AAFA04000ED0284600F09B +:10B9600012F905460146204600F03CF918B1284678 +:10B9700000F001F920B1052070BD43F2020070BD56 +:10B9800005EB85011C22606802EBC101084400F050 +:10B990003FF908B1082070BD2A462146304600F024 +:10B9A00075F9002070BD2DE9F0410C461746804620 +:10B9B000032108F07BFA0546204600F0E4F804462F +:10B9C00095B10146284600F00DF980B104EB8401E1 +:10B9D0001C22686802EBC1014618304600F018F9D5 +:10B9E00038B10820BDE8F08143F20200FAE70520F3 +:10B9F000F8E73B46324621462846FFF742F8002842 +:10BA0000F0D1E2B229464046FEF75AFF708C083862 +:10BA1000082803D242484078F7F776FA0020E1E799 +:10BA20002DE9F0410D4617468046032108F03EFA05 +:10BA30000446284600F0A7F8064624B13846F5F734 +:10BA400008FC38B902E043F20200CBE73868F5F7AA +:10BA500000FC08B11020C5E73146204600F0C2F8CE +:10BA600060B106EB86011C22606802EBC10145183B +:10BA7000284600F0CDF818B10820B3E70520B1E75B +:10BA8000B888A98A884201D90C20ABE76168E88CA4 +:10BA90004978B0EBC10F01D31320A3E7314620460C +:10BAA00000F094F80146606808234078C20005F170 +:10BAB000240008F082F8D7E90012C0E90012F2B2BF +:10BAC00021464046FEF772FE00208BE72DE9F04745 +:10BAD0000D461F4690468146032108F0E7F90446CB +:10BAE000284600F050F806463CB14DB13846F5F70F +:10BAF000F4FB50B11020BDE8F08743F20200FAE7F2 +:10BB0000606858B1A0F80C8027E03146204600F06C +:10BB100069F818B1304600F02EF828B10520EAE7A0 +:10BB2000300000207861020006EB86011C2260686C +:10BB300002EBC1014518284600F06AF808B1082058 +:10BB4000D9E7A5F80880F2B221464846FEF7B8FECC +:10BB50001FB1A8896989084438800020CBE707F025 +:10BB600084BE017821F00F01491C21F0F001103151 +:10BB70000170FDF73EBD20B94E48807808B1012024 +:10BB80007047002070474B498988884201D10020C6 +:10BB90007047402801D2402000E0403880B2704712 +:10BBA00010B50446402800D9FFDF2046FFF7E3FF29 +:10BBB00010B14048808810BD4034A0B210BD40682C +:10BBC00042690078484302EBC0007047C278406881 +:10BBD000037812FB03F24378406901FB032100EB79 +:10BBE000C1007047C2788A4209D9406801EB8101DF +:10BBF0001C2202EBC101405C08B10120704700200B +:10BC000070470078062801D901207047002070474E +:10BC10000078062801D00120704700207047F0B45A +:10BC200001EB81061C27446807EBC6063444049DDB +:10BC300005262670E3802571F0BCFEF71FBA10B50B +:10BC4000418911B1FFF7DDFF08B1002010BD0120CF +:10BC500010BD10B5C18C8278B1EBC20F04D9C18977 +:10BC600011B1FFF7CEFF08B1002010BD012010BDBB +:10BC700010B50C4601230A22011D07F0D4FF0078FD +:10BC80002188012282409143218010BDF0B402EB53 +:10BC900082051C264C6806EBC505072363554B68D7 +:10BCA0001C79402C03D11A71F0BCFEF791BCF0BC9A +:10BCB000704700003000002010B5EFF3108000F056 +:10BCC000010472B6FC484178491C41704078012853 +:10BCD00001D10BF0B3FA002C00D162B610BD70B5E3 +:10BCE000F54CA07848B90125A570FFF7E5FF0BF0EA +:10BCF000B6FA20B100200BF080FA002070BD4FF0A2 +:10BD00008040E570C0F80453F7E770B5EFF310809A +:10BD100000F0010572B6E84C607800B9FFDF60788A +:10BD2000401E6070607808B90BF08CFA002D00D1CD +:10BD300062B670BDE04810B5817821B10021C170B4 +:10BD40008170FFF7E2FF002010BD10B504460BF034 +:10BD500086FAD9498978084000D001202060002067 +:10BD600010BD10B5FFF7A8FF0BF079FA02220123EE +:10BD7000D149540728B1D1480260236103200872D9 +:10BD800002E00A72C4F804330020887110BD2DE966 +:10BD9000F84FDFF824934278817889F80420002650 +:10BDA00089F80510074689F806600078DFF810B3B7 +:10BDB000354620B1012811D0022811D0FFDF0BF049 +:10BDC00060FA4FF0804498B10BF062FAB0420FD1A4 +:10BDD00030460BF061FA0028FAD042E00126EEE787 +:10BDE000FFF76AFF58460168C907FCD00226E6E75C +:10BDF0000120E060C4F80451B2490E600107D1F897 +:10BE00004412B04AC1F3423124321160AD49343199 +:10BE100008604FF0020AC4F804A3A060AA480168B1 +:10BE2000C94341F3001101F10108016841F010011B +:10BE3000016001E019F0A8FFD4F804010028F9D04E +:10BE400030460BF029FA0028FAD0B8F1000F04D1DF +:10BE50009D48016821F010010160C4F808A3C4F8EE +:10BE6000045199F805004E4680B1387870B90BF04E +:10BE7000F6F980460BF006FC6FF00042B8F1000FB7 +:10BE800002D0C6E9032001E0C6E90302DBF80000A6 +:10BE9000C00701D00BF0DFF9387810B13572BDE87A +:10BEA000F88F4FF01808C4F808830127A7614FF4F2 +:10BEB0002070ADF8000000BFBDF80000411EADF8D5 +:10BEC0000010F9D2C4F80C51C4F810517A48C01DC2 +:10BED0000BF06CFA3570FFF744FF676179493079F0 +:10BEE00020310860C4F80483D9E770B5050000D19B +:10BEF000FFDF4FF080424FF0FF30C2F8080300210F +:10BF0000C2F80011C2F80411C2F80C11C2F81011E5 +:10BF1000694C61700BF0AFF910B10120A070607036 +:10BF200067480068C00701D00BF095F92846BDE8C6 +:10BF300070402CE76048007A002800D0012070474C +:10BF40002DE9F04F61484FF0000A85B0D0F800B0FD +:10BF5000D14657465D4A5E49083211608406D4F8DE +:10BF6000080110B14FF0010801E04FF000080BF09C +:10BF7000F0F978B1D4F8240100B101208246D4F858 +:10BF80001C0100B101208146D4F8200108B101272D +:10BF900000E00027D4F8000100B101200490D4F89B +:10BFA000040100B101200390D4F80C0100B101207C +:10BFB0000290D4F8100100B101203F4D0190287883 +:10BFC00000260090B8F1000F04D0C4F808610120E9 +:10BFD0000BF013F9BAF1000F04D0C4F82461092062 +:10BFE0000BF00BF9B9F1000F04D0C4F81C610A2062 +:10BFF0000BF003F927B1C4F820610B200BF0FDF81A +:10C000002D48C01D0BF0DAF900B1FFDFDFF8AC807E +:10C010000498012780B1C4F80873E87818B1EE706D +:10C0200000200BF0EAF8287A022805D103202872B4 +:10C030000221C8F800102761039808B1C4F8046110 +:10C04000029850B1C4F80C61287A032800D0FFDFB1 +:10C05000C8F800602F72FFF758FE019838B1C4F895 +:10C060001061287A012801D100F05CF8676100981E +:10C0700038B12E70287A012801D1FFF772FEFFF740 +:10C0800044FE0D48C01D0BF0AFF91049091DC1F861 +:10C0900000B005B0BDE8F08F074810B5C01D0BF02B +:10C0A0008DF90549B0B1012008704FF0E021C1F8C9 +:10C0B0000002BDE81040FFE544000020340C0040C1 +:10C0C0000C0400401805004010ED00E0100502408F +:10C0D00001000001087A012801D1FFF742FEBDE806 +:10C0E000104024480BF080B970B5224CE41FA078B2 +:10C0F00008B90BF0A7F801208507A861207A00266F +:10C10000032809D1D5F80C0120B900200BF0C4F8A0 +:10C110000028F7D1C5F80C6126724FF0FF30C5F842 +:10C12000080370BD70B5134CE41F6079F0B10128AD +:10C1300003D0A179401E814218DA0BF090F8054631 +:10C140000BF0A0FA6179012902D9A179491CA171EA +:10C150000DB1216900E0E168411A022902DA11F10A +:10C16000020F06DC0DB1206100E0E060BDE8704028 +:10C17000F7E570BD4B0000200F4A12680D498A4256 +:10C180000CD118470C4A12680A4B9A4206D101B5E5 +:10C190000BF04AFA0BF01DFDBDE8014007490968A4 +:10C1A0000958084706480749054A064B70470000EA +:10C1B00000000000BEBAFECA5C000020040000209F +:10C1C000C8130020C8130020F8B51D46DDE9064756 +:10C1D0000E000AD007F0ADFF2346FF1DBCB231466A +:10C1E0002A46009407F0BBFBF8BDD0192246194639 +:10C1F00002F023F92046F8BD70B50D460446102222 +:10C20000002102F044F9258117206081A07B40F0D5 +:10C210000A00A07370BD4FF6FF720A80014602202B +:10C220000BF04CBC704700897047827BD30701D16B +:10C23000920703D48089088000207047052070474A +:10C24000827B920700D581817047014600200988D2 +:10C2500041F6FE52114200D00120704700B503465E +:10C26000807BC00701D0052000BD59811846FFF72B +:10C27000ECFFC00703D0987B40F004009873987BD4 +:10C2800040F001009873002000BD827B520700D56A +:10C2900009B14089704717207047827B61F3C30260 +:10C2A000827370472DE9FC5F0E460446017896467E +:10C2B000012000FA01F14DF6FF5201EA020962681D +:10C2C0004FF6FF7B1188594502D10920BDE8FC9F3C +:10C2D000B9F1000F05D041F6FE55294201D00120E9 +:10C2E000F4E741EA090111801D0014D000232B70EE +:10C2F00094F800C0052103221F464FF0020ABCF14A +:10C300000E0F76D2DFE80CF0F909252F47646B7722 +:10C31000479193B4D1D80420D8E7616820898B7BFA +:10C320009B0767D517284AD30B89834247D389894E +:10C33000172901D3814242D185F800A0A5F8010058 +:10C340003280616888816068817B21F0020181739D +:10C35000C6E0042028702089A5F801006089A5F8AE +:10C3600003003180BCE0208A3188C01D1FFA80F8AC +:10C37000414524D3062028702089A5F80100608952 +:10C38000A5F80300A089A5F805000721208ACDE9BA +:10C390000001636941E00CF0FF00082810D008207C +:10C3A00028702089A5F801006089A5F80300318074 +:10C3B0006A1D694604F10C0009F025FB10B15EE02E +:10C3C0001020EDE730889DF800100844308087E0A9 +:10C3D0000A2028702089A5F80100328044E00C2052 +:10C3E00028702089A5F801006089A5F80300318034 +:10C3F0003AE082E064E02189338800EB41021FFAD1 +:10C4000082F843453BD3B8F1050F38D30E222A708A +:10C410000BEA4101CDE90010E36860882A467146C5 +:10C42000FFF7D2FEA6F800805AE04020287060890D +:10C430003188C01C1FFA80F8414520D32878714606 +:10C4400020F03F00123028702089A5F80100608993 +:10C45000CDE9000260882A46E368FFF7B5FEA6F83A +:10C460000080287840063BD461682089888037E0C6 +:10C47000A0893288401D1FFA80F8424501D2042766 +:10C480003DE0162028702089A5F801006089A5F8F4 +:10C490000300A089CDE9000160882A46714623691E +:10C4A000FFF792FEA6F80080DEE718202870207AB9 +:10C4B0006870A6F800A013E061680A88920401D4AD +:10C4C00005271CE0C9882289914201D0062716E081 +:10C4D0001E21297030806068018821F4005101809C +:10C4E000B9F1000F0BD061887823002202200BF0F5 +:10C4F0003BFA61682078887006E033800327606823 +:10C50000018821EA090101803846DFE62DE9FF4F65 +:10C5100085B01746129C0D001E461CD03078C1070E +:10C5200003D000F03F00192801D9012100E00021CB +:10C530002046FFF7AAFEA8420DD32088A0F57F4130 +:10C54000FF3908D03078410601D4000605D508200F +:10C5500009B0BDE8F08F0720FAE700208DF8000051 +:10C560008DF8010030786B1E00F03F0C0121A81EF1 +:10C570004FF0050A4FF002094FF0030B9AB2BCF1DD +:10C58000200F75D2DFE80CF08B10745E7468748C29 +:10C59000749C74B574BA74C874D474E1747474F10E +:10C5A00074EF74EE74ED748B052D78D18DF80090D6 +:10C5B000A0788DF804007088ADF8060030798DF809 +:10C5C0000100707800F03F000C2829D00ADCA0F1AF +:10C5D0000200092863D2DFE800F0126215621A62D5 +:10C5E0001D622000122824D004DC0E281BD0102845 +:10C5F000DBD11BE016281FD01828D6D11FE02078E9 +:10C60000800701E020784007002848DAEEE0207833 +:10C610000007F9E72078C006F6E720788006F3E700 +:10C6200020784006F0E720780006EDE72088C00576 +:10C63000EAE720884005E7E720880005E4E720884E +:10C64000C004E1E72078800729D5032D27D18DF894 +:10C6500000B0B6F8010081E0217849071FD5062D0A +:10C660001DD381B27078012803D0022817D102E0CF +:10C67000C9E0022000E0102004228DF8002072782A +:10C680008DF80420801CB1FBF0F2ADF8062092B2C8 +:10C6900042438A4203D10397ADF80890A6E079E0BF +:10C6A0002078000776D598B282088DF800A0ADF802 +:10C6B0000420B0EB820F6DD10297ADF8061095E023 +:10C6C0002178C90666D5022D64D381B206208DF883 +:10C6D0000000707802285DD3B1FBF0F28DF8040001 +:10C6E000ADF8062092B242438A4253D1ADF8089089 +:10C6F0007BE0207880064DD5072003E020784006B7 +:10C700007FD508208DF80000A088ADF80400ADF8B2 +:10C710000620ADF8081068E02078000671D50920E1 +:10C72000ADF804208DF80000ADF8061002975DE02A +:10C730002188C90565D5022D63D381B20A208DF801 +:10C740000000707804285CD3C6E72088400558D5DF +:10C75000012D56D10B208DF80000A088ADF8040003 +:10C7600044E021E026E016E0FFE72088000548D5F8 +:10C77000052D46D30C208DF80000A088ADF80400EC +:10C78000B6F803006D1FADF80850ADF80600ADF81F +:10C790000AA02AE035E02088C00432D5012D30D12E +:10C7A0000D208DF8000021E02088800429D4B6F8FF +:10C7B0000100E080A07B000723D5032D21D3307832 +:10C7C00000F03F001B2818D00F208DF800002088B3 +:10C7D00040F40050A4F80000B6F80100ADF80400E1 +:10C7E000ED1EADF80650ADF808B003976946059800 +:10C7F000F5F792FB050008D016E00E208DF800003A +:10C80000EAE7072510E008250EE0307800F03F0049 +:10C810001B2809D01D2807D0022005990BF04EF9DE +:10C82000208800F400502080A07B400708D52046D7 +:10C83000FFF70BFDC00703D1A07B20F00400A0731D +:10C84000284685E61FB5022806D101208DF8000094 +:10C8500088B26946F5F760FB1FBD0000F8B51D46BC +:10C86000DDE906470E000AD007F063FC2346FF1DF2 +:10C87000BCB231462A46009407F071F8F8BDD019D1 +:10C880002246194601F0D9FD2046F8BD2DE9FF4F9B +:10C890008DB09B46DDE91B57DDF87CA00C46082BCC +:10C8A00005D0E06901F0FEF850B11020D2E02888F0 +:10C8B000092140F0100028808AF80010022617E0B5 +:10C8C000E16901208871E2694FF420519180E169AA +:10C8D0008872E06942F601010181E06900218173FB +:10C8E0002888112140F0200028808AF800100426B2 +:10C8F00038780A900A2038704FF0020904F11800C5 +:10C900004D460C9001F0C6FBB04681E0BBF1100F24 +:10C910000ED1022D0CD0A9EB0800801C80B20221A0 +:10C92000CDE9001005AB52461E990D98FFF796FF12 +:10C93000BDF816101A98814203D9F74800790F9074 +:10C9400004E003D10A9808B138702FE04FF00201DB +:10C95000CDE900190DF1160352461E990D98FFF707 +:10C960007DFF1D980088401B801B83B2C6F1FF002D +:10C97000984200D203461E990BA8D9B15FF000027D +:10C98000DDF878C0CDE9032009EB060189B2CDE9D5 +:10C9900001C10F980090BDF8161000220D9801F00B +:10C9A0000EFC387070B1C0B2832807D0BDF81600F5 +:10C9B00020833AE00AEB09018A19E1E7022011B06D +:10C9C000BDE8F08FBDF82C00811901F0FF08022DA1 +:10C9D0000DD09AF80120424506D1BDF820108142C1 +:10C9E00007D0B8F1FF0F04D09AF801801FE08AF851 +:10C9F0000180C94800680178052902D1BDF81610E8 +:10CA0000818009EB08001FFA80F905EB080085B268 +:10CA1000DDE90C1005AB0F9A01F03FFB28B91D981A +:10CA20000088411B4145BFF671AF022D13D0BBF109 +:10CA3000100F0CD1A9EB0800801C81B20220CDE9B7 +:10CA4000000105AB52461E990D98FFF707FF1D9890 +:10CA50000580002038700020B1E72DE9F8439C469E +:10CA6000089E13460027B26B9AB3491F8CB2F18F10 +:10CA7000A1F57F45FF3D05D05518AD882944891D96 +:10CA80008DB200E000252919B6F83C8008314145F7 +:10CA900020D82A44BCF8011022F8021BBCF803106D +:10CAA00022F8021B984622F8024B914607F02FFB12 +:10CAB0004FF00C0C41464A462346CDF800C006F024 +:10CAC0001AFFF587B16B00202944A41D214408807A +:10CAD00003E001E0092700E083273846BDE8F8833A +:10CAE00010B50B88848F9C420CD9846BE0180488A5 +:10CAF00044B1848824F40044A41D23440B801060B6 +:10CB0000002010BD0A2010BD2DE9F0478AB0002595 +:10CB1000904689468246ADF8185007274BE00598A5 +:10CB200006888088000446D4A8F8006007A801950C +:10CB300000970295CDE903504FF40073002231466F +:10CB4000504601F03CFB04003CD1BDF81800ADF8A4 +:10CB50002000059804888188B44216D10A0414D4B0 +:10CB600001950295039521F400410097049541F445 +:10CB7000804342882146504601F0BFF804000BD1A3 +:10CB80000598818841F40041818005AA08A948469A +:10CB9000FFF7A6FF0400DCD00097059802950195E9 +:10CBA000039504950188BDF81C300022504601F021 +:10CBB000A4F80A2C06D105AA06A94846FFF790FF5B +:10CBC0000400ACD0ADF8185004E00598818821F439 +:10CBD0000041818005AA06A94846FFF781FF002889 +:10CBE000F3D00A2C03D020460AB0BDE8F08700201D +:10CBF000FAE710B50C46896B86B051B10C218DF85F +:10CC00000010A18FADF80810A16B01916946FAF7E9 +:10CC100001FB00204FF6FF71A063E187A08706B0FB +:10CC200010BD2DE9F0410D460746896B0020069E98 +:10CC30001446002911D0012B0FD13246294638461F +:10CC4000FFF762FF002808D1002C06D032462946A3 +:10CC50003846BDE8F04100F034BFBDE8F0812DE971 +:10CC6000FC411446DDE9087C0E46DDE90A15521D3B +:10CC7000BCF800E092B2964502D20720BDE8FC81E4 +:10CC8000ACF8002017222A70A5F80160A5F803303F +:10CC90000522CDE900423B462A46FFF7DFFD002092 +:10CCA000ECE770B50C46154648220021204601F0FD +:10CCB000EEFB04F1080044F81C0F00204FF6FF7152 +:10CCC000E06161842084A5841720E08494F82A0020 +:10CCD00040F00A0084F82A0070BD4FF6FF720A8007 +:10CCE000014603200AF0EABE30B585B00C46054681 +:10CCF000FFF77FFFA18E284629B101218DF8001092 +:10CD00006946FAF787FA0020E0622063606305B0A5 +:10CD100030BDB0F8400070476000002090F8462019 +:10CD2000920703D4408808800020F4E70620F2E749 +:10CD300090F846209207EED5A0F84410EBE70146A4 +:10CD4000002009880A0700D5012011F0F00F01D05A +:10CD500040F00200CA0501D540F004008A0501D563 +:10CD600040F008004A0501D540F010000905D2D571 +:10CD700040F02000CFE700B5034690F84600C0071A +:10CD800001D0062000BDA3F842101846FFF7D7FFD8 +:10CD900010F03E0F05D093F8460040F0040083F8F1 +:10CDA000460013F8460F40F001001870002000BD47 +:10CDB00090F84620520700D511B1B0F84200AAE71A +:10CDC0001720A8E710F8462F61F3C3020270A2E70C +:10CDD0002DE9FF4F9BB00E00DDE92B34DDE929780A +:10CDE000289D24D02878C10703D000F03F001928DF +:10CDF00001D9012100E000212046FFF7D9FFB04210 +:10CE000015D32878410600F03F010CD41E290CD020 +:10CE1000218811F47F6F0AD13A8842B1A1F57F428F +:10CE2000FF3A04D001E0122901D1000602D5042006 +:10CE30001FB0C5E5FA491D984FF0000A08718DF83A +:10CE400018A08DF83CA00FAA0A60ADF81CA0ADF8A0 +:10CE500050A02978994601F03F02701F5B1C04F135 +:10CE6000180C4FF0060E4FF0040BCDF858C01F2AD7 +:10CE70007ED2DFE802F07D7D107D267DAC7DF47DE5 +:10CE8000F37DF27DF17DF47DF07D7D7DEF7DEE7DA6 +:10CE90007D7D7D7DED0094F84610B5F80100890791 +:10CEA00001D5032E02D08DF818B01EE34FF40061B7 +:10CEB000ADF85010608003218DF83C10ADF84000B3 +:10CEC000D4E2052EEFD1B5F801002083ADF81C00A7 +:10CED000B5F80310618308B1884201D9012079E1D6 +:10CEE0000020A07220814FF6FF702084169801F078 +:10CEF000D1F8052089F800000220029083460AAB91 +:10CF00001D9A16991B9801F0C8F890BB9DF82E0049 +:10CF1000012804D0022089F80100102003E001203C +:10CF200089F8010002200590002203A90BA808F04F +:10CF30006AFDE8BB9DF80C00059981423DD1398816 +:10CF4000801CA1EB0B01814237DB02990220CDE965 +:10CF500000010DF12A034A4641461B98FFF77EFC6B +:10CF600002980BF1020B801C81B217AA029101E01A +:10CF70009CE228E003A90BA808F045FD02999DF862 +:10CF80000C00CDE9000117AB4A4641461B98FFF75C +:10CF900065FC9DF80C000AAB0BEB00011FFA81FB4E +:10CFA00002991D9A084480B2029016991B9800E0DD +:10CFB00003E001F072F80028B6D0BBF1020F02D0F6 +:10CFC000A7F800B04FE20A208DF818004BE20021CC +:10CFD0000391072EFFF467AFB5F801002083ADF889 +:10CFE0001C00B5F80320628300283FF477AF90421D +:10CFF0003FF674AF0120A072B5F805002081002033 +:10D00000A073E06900F04EFD78B9E16901208871F4 +:10D01000E2694FF420519180E1698872E16942F63A +:10D0200001000881E06900218173F01F20841E98AF +:10D03000606207206084169801F02CF8072089F8B8 +:10D0400000000120049002900020ADF82A0028E0A2 +:10D0500019E29FE135E1E5E012E2A8E080E043E07B +:10D060000298012814D0E0698079012803D1BDF825 +:10D070002800ADF80E00049803ABCDE900B04A4695 +:10D0800041461B98FFF7EAFB0498001D80B204900C +:10D09000BDF82A00ADF80C00ADF80E00059880B27E +:10D0A00002900AAB1D9A16991B9800F0F6FF28B95A +:10D0B00002983988001D05908142D1D2029801283A +:10D0C00081D0E0698079012803D1BDF82800ADF84E +:10D0D0000E00049803ABCDE900B04A4641461B98C8 +:10D0E000FFF7BCFB0298BDE1072E02D0152E7FF49E +:10D0F000DAAEB5F801102183ADF81C10B5F80320A5 +:10D10000628300293FF4EAAE91423FF6E7AE012187 +:10D11000A1724FF0000BA4F808B084F80EB0052EF1 +:10D1200007D0C0B2691DE26908F06BFC00287FF4EB +:10D130004AAF4FF6FF70208401A906AA14A8CDF8C3 +:10D1400000B081E885032878214600F03F031D9A4E +:10D150001B98FFF79BFB8246208BADF81C0082E1F9 +:10D160000120032EC3D14021ADF85010B5F80110B5 +:10D170002183ADF81C100AAAB8F1000F00D00023DB +:10D18000CDE9020304921D98CDF804800090388800 +:10D190000022401E83B21B9801F011F88DF8180090 +:10D1A00090BB0B2089F80000BDF8280035E04FF057 +:10D1B000010C052E9BD18020ADF85000B5F8011070 +:10D1C0002183B5F803002084ADF81C10B0F5007F72 +:10D1D00003D907208DF8180087E140F47C422284AF +:10D1E0000CA8B8F1000F00D00023CDE90330CDE941 +:10D1F000018C1D9800903888401E83B21B9800F067 +:10D20000DEFF8DF8180018B18328A8D10220BFE0F6 +:10D210000D2189F80010BDF83000401C22E100000B +:10D2200060000020032E04D248067FF53CAE0020AB +:10D2300018E1B5F80110ADF81C102878400602D5A9 +:10D240008DF83CE002E007208DF83C004FF000082C +:10D250000320CDE902081E9BCDF810801D98019394 +:10D26000A6F1030B00901FFA8BF342461B9800F0C7 +:10D2700044FD8DF818008DF83C80297849060DD5BD +:10D280002088C00506D5208BBDF81C10884201D12E +:10D29000C4F8248040468DF81880E3E0832801D14B +:10D2A0004FF0020A4FF48070ADF85000BDF81C003A +:10D2B0002083A4F820B01E986062032060841321AC +:10D2C000CDE0052EFFF4EFADB5F80110ADF81C1060 +:10D2D000A28F6AB3A2F57F43FE3B29D008228DF8C6 +:10D2E0003C2000BF4FF0000B0523CDE9023BDDF8E9 +:10D2F00078C0CDF810B01D9A80B2CDF804C040F4CB +:10D3000000430092B5F803201B9800F0F6FC8DF85E +:10D310003CB04FF400718DF81800ADF85010832820 +:10D3200010D0F8B1A18FA1F57F40FE3807D0DCE026 +:10D330000B228DF83C204FF6FE72A287D2E7A4F8AC +:10D340003CB0D2E000942B4631461E9A1B98FFF762 +:10D3500084FB8DF8180008B183284BD1BDF81C0060 +:10D36000208353E700942B4631461E9A1B98FFF703 +:10D3700074FB8DF81800E8BBE18FA06B0844831D97 +:10D380008DE888034388828801881B98FFF767FC33 +:10D39000824668E095F80180022E70D15FEA0800AD +:10D3A00002D0B8F1010F6AD109208DF83C0007A81E +:10D3B00000908DF840804346002221461B98FFF7DD +:10D3C00030FC8DF842004FF0000B8DF843B050B99F +:10D3D000B8F1010F12D0B8F1000F04D1A18FA1F55F +:10D3E0007F40FF380AD0A08F40B18DF83CB04FF499 +:10D3F000806000E037E0ADF850000DE00FA91B9809 +:10D40000F9F708FF82468DF83CB04FF48060ADF824 +:10D410005000BAF1020F06D0FC480068C07928B16C +:10D420008DF8180027E0A4F8188044E0BAF1000F46 +:10D4300003D081208DF818003DE007A800904346F6 +:10D44000012221461B98FFF7ECFB8DF818002146BE +:10D450001B98FFF7CEFB9DF8180020B9192189F819 +:10D460000010012038809DF83C0020B10FA91B98C6 +:10D47000F9F7D0FE8246BAF1000F33D01BE018E076 +:10D480008DF818E031E02078000712D5012E10D178 +:10D490000A208DF83C00E088ADF8400003201B997D +:10D4A0000AF00CFB0820ADF85000C0E648067FF5F6 +:10D4B000FAAC4FF0040A2088BDF8501008432080D1 +:10D4C000BDF8500080050BD5A18FA1F57F40FE3837 +:10D4D00006D11E98E06228982063A6864FF0030AC2 +:10D4E0005046A5E49DF8180078B1012089F80000A5 +:10D4F000297889F80110BDF81C10A9F802109DF8D0 +:10D50000181089F80410052038802088BDF85010C4 +:10D5100088432080E4E72DE9FF4F8846087895B0DE +:10D52000012181404FF20900249C0140ADF82010F8 +:10D530002088DDF88890A0F57F424FF0000AFF3A7E +:10D5400006D039B1000705D5012019B0BDE8F08F2C +:10D550000820FAE7239E4FF0000B0EA886F800B0D3 +:10D5600018995D460988ADF83410A8498DF81CB0AB +:10D57000179A0A718DF838B0086098F800000128F1 +:10D580003BD0022809D003286FD1307820F03F002B +:10D590001D303070B8F80400E08098F800100320C7 +:10D5A000022904D1317821F03F011B31317094F808 +:10D5B0004610090759D505ABB9F1000F13D000216A +:10D5C00002AA82E80B000720CDE90009BDF834006B +:10D5D000B8F80410C01E83B20022159800F0EFFDC9 +:10D5E0000028D1D101E0F11CEAE7B8F80400A6F860 +:10D5F0000100BDF81400C01C04E198F805108DF876 +:10D600001C1098F80400012806D04FF4007A022874 +:10D610002CD00328B8D16CE12188B8F8080011F4A7 +:10D620000061ADF8201020D017281CD3B4F84010AA +:10D63000814218D3B4F84410172901D3814212D182 +:10D64000317821F03F01C91C3170A6F80100032197 +:10D65000ADF83410A4F8440094F8460020F002001D +:10D6600084F8460065E105257EE177E1208808F130 +:10D67000080700F4FE60ADF8200010F0F00F1BD09A +:10D6800010F0C00F03D03888228B9042EBD199B9AB +:10D69000B878C00710D0B9680720CDE902B1CDF83D +:10D6A00004B00090CDF810B0FB88BA88398815987E +:10D6B00000F023FB0028D6D12398BDF82010401C91 +:10D6C00080294ED006DC10290DD020290BD040290E +:10D6D00087D124E0B1F5807F6ED051457ED0B1F581 +:10D6E000806F97D1DEE0C80601D5082000E0102049 +:10D6F00082460DA907AA0520CDE902218DF8380040 +:10D70000ADF83CB0CDE9049608A93888CDE9000110 +:10D710005346072221461598FFF7B8F8A8E09DF870 +:10D720001C2001214FF00A0A002A9BD105ABB9F158 +:10D73000000F00D00020CDE902100720CDE900093C +:10D74000BDF834000493401E83B2218B002215984B +:10D7500000F035FD8DF81C000B203070BDF8140072 +:10D7600020E09DF81C2001214FF00C0A002A22D154 +:10D7700013ABB9F1000F00D00020CDE90210072053 +:10D78000CDE900090493BDF83400228C401E83B219 +:10D79000218B159800F013FD8DF81C000D203070C2 +:10D7A000BDF84C00401CADF8340005208DF8380061 +:10D7B000208BADF83C00BCE03888218B88427FF498 +:10D7C00052AF9DF81C004FF0120A00281CD1606A6D +:10D7D000A8B1B878C0073FF446AF00E018E0BA68D7 +:10D7E0000720CDE902B2CDF804B00090CDF810B01A +:10D7F000FB88BA88159800F080FA8DF81C00132079 +:10D8000030700120ADF8340093E00000600000208B +:10D810003988208B8142D2D19DF81C004FF0160A26 +:10D820000028A06B08D0E0B34FF6FF7000215F46E0 +:10D83000ADF808B0019027E068B1B978C907BED14A +:10D84000E18F0DAB0844821D03968DE80C024388DE +:10D850008288018809E0B878C007BCD0BA680DABEF +:10D8600003968DE80C02BB88FA881598FFF7F7F944 +:10D8700005005ED0072D72D076E0019005AA02A9BE +:10D880002046FFF72DF90146E28FBDF808008242DD +:10D8900001D00029F1D0E08FA16B084407800198E6 +:10D8A000E08746E09DF81C004FF0180A40B1208B3D +:10D8B000C8B13888208321461598FFF79AF938E0D7 +:10D8C00004F118000090237E012221461598FFF7ED +:10D8D000A8F98DF81C000028EDD119203070012026 +:10D8E000ADF83400E7E7052521461598FFF781F9E3 +:10D8F0003AE0208800F40070ADF8200050452DD1AA +:10D90000A08FA0F57F41FE3901D006252CE0D8F884 +:10D9100008004FF0160A48B1A063B8F80C10A187B0 +:10D920004FF6FF71E187A0F800B002E04FF6FF70FC +:10D93000A087BDF8200030F47F611AD07823002240 +:10D94000032015990AF010F898F80000207120883B +:10D95000BDF82010084320800EE000E00725208855 +:10D96000BDF8201088432080208810F47F6F1CD0E1 +:10D970003AE02188814321809DF8380020B10EA92A +:10D980001598F9F747FC05469DF81C000028EBD0D8 +:10D9900086F801A001203070208B70809DF81C005B +:10D9A00030710520ADF83400DEE7A18EE1B11898A2 +:10D9B0000DAB0088ADF834002398CDE90304CDE920 +:10D9C0000139206B0090E36A179A1598FFF700FA67 +:10D9D000054601208DF838000EA91598F9F71AFCB4 +:10D9E00000B10546A4F834B094F8460040070AD5C3 +:10D9F0002046FFF7A4F910F03E0F04D114F8460FAB +:10DA000020F0040020701898BDF8341001802846DA +:10DA10009BE500B585B0032806D102208DF80000F3 +:10DA200088B26946F9F7F6FB05B000BD10B5384C71 +:10DA30000B782268012B02D0022B2AD111E0137837 +:10DA40000BB1052B01D10423137023688A889A80B7 +:10DA50002268CB88D38022680B8913814989518140 +:10DA60000DE08B8893802268CB88D38022680B8955 +:10DA700013814B8953818B899381096911612168D5 +:10DA8000F9F7C8FB226800210228117003D0002892 +:10DA900000D0812010BD832010BD806B002800D0F5 +:10DAA000012070478178012909D10088B0F5205FF5 +:10DAB00003D042F60101884201D1002070470720BF +:10DAC0007047F0B587B0002415460E460746ADF8FE +:10DAD000184011E005980088288005980194811D60 +:10DAE000CDE902410721049400918388428801888E +:10DAF000384600F002F930B905AA06A93046FEF70B +:10DB0000EFFF0028E6D00A2800D1002007B0F0BDC2 +:10DB10006000002010B58B7883B102789A4205D15D +:10DB20000B885BB102E08B79091D4BB18B789A426F +:10DB3000F9D1B0F801300C88A342F4D1002010BD17 +:10DB4000812010BD072826D012B1012A27D103E079 +:10DB5000497801F0070102E04978C1F3C2010529C3 +:10DB60001DD2DFE801F00318080C12000AB10320EF +:10DB700070470220704704280DD250B10DE00528EF +:10DB800009D2801E022808D303E0062803D0032808 +:10DB900003D005207047002070470F207047812078 +:10DBA0007047C0B282060BD4000607D5FA48807AC7 +:10DBB0004143C01D01EBD00080B27047084670475A +:10DBC0000020704770B513880B800B781C0625D594 +:10DBD000F14CA47A844204D843F01000087000206D +:10DBE00070BD956800F0070605EBD0052D78F5406F +:10DBF00065F304130B701378D17803F0030341EA43 +:10DC0000032140F20123B1FBF3F503FB15119268E8 +:10DC1000E41D00FB012000EBD40070BD906870BDD6 +:10DC200037B51446BDF804101180117841F0040195 +:10DC300011709DF804100A061ED5D74AA368C1F3D7 +:10DC40000011927A824208D8FE2811D1D21DD20842 +:10DC50004942184600F01BFC0AE003EBD00200F03A +:10DC60000703012510789D40A84399400843107090 +:10DC7000207820F0100020703EBD2DE9F0410746CD +:10DC8000C81C0E4620F00300B04202D08620BDE83A +:10DC9000F081C14D002034462E60AF802881AA72E9 +:10DCA000E8801AE0E988491CE980810614D4E1780B +:10DCB00000F0030041EA002040F20121B0FBF1F244 +:10DCC00001FB12012068FFF76CFF2989084480B22C +:10DCD0002881381A3044A0600C3420784107E1D400 +:10DCE0000020D4E7AC4801220189C08800EB400045 +:10DCF00002EB8000084480B270472DE9FF4F89B0E5 +:10DD00001646DDE9168A0F46994623F44045084633 +:10DD100000F054FB040002D02078400703D4012017 +:10DD20000DB0BDE8F08F099806F086F802902078D3 +:10DD3000000606D59848817A0298814201D887204A +:10DD4000EEE7224601A90298FFF73CFF8346002038 +:10DD50008DF80C004046B8F1070F1AD00122214679 +:10DD6000FFF7F0FE0028DBD12078400611D5022015 +:10DD70008DF80C00ADF81070BDF80400ADF812007D +:10DD8000ADF814601898ADF81650CDF81CA0ADF899 +:10DD900018005FEA094004D500252E46A846012751 +:10DDA0000CE02178E07801F0030140EA012040F224 +:10DDB0000121B0FBF1F2804601FB12875FEA494086 +:10DDC00009D5B84507D1A178207901F0030140EACF +:10DDD0000120B04201D3BE4201D90720A0E7A81913 +:10DDE0001FFA80F9B94501D90D2099E79DF80C007B +:10DDF00028B103A90998F9F70BFA002890D1B84582 +:10DE000007D1A0784FEA192161F30100A07084F8CE +:10DE100004901A9800B10580199850EA0A0027D09A +:10DE2000199830B10BEB06002A46199900F005FB52 +:10DE30000EE00BEB06085746189E099806F067F9A6 +:10DE40002B46F61DB5B239464246009505F053FD06 +:10DE5000224601A90298FFF7B5FE9DF8040022466C +:10DE600020F010008DF80400DDE90110FFF7D8FE66 +:10DE7000002055E72DE9FF4FDFF81C91824685B061 +:10DE8000B9F80610D9F8000001EB410100EB81045C +:10DE900040F20120B2FBF0F1174600FB1175DDE9FD +:10DEA000138B4E4629460698FFF77BFE0346FFF785 +:10DEB00019FF1844B1880C30884202D9842009B077 +:10DEC0002FE70698C6B2300603D5B00601D5062066 +:10DED000F5E7B9F80620521C92B2A9F80620BBF16A +:10DEE000000F01D0ABF80020B00602D5C4F80880BE +:10DEF0000AE0B9F808201A4492B2A9F80820D9F823 +:10DF00000000891A0844A0602246FE200699FFF707 +:10DF100087FEE77025712078390A61F301002A0A2B +:10DF2000A17840F0040062F30101A17020709AF81A +:10DF300002006071BAF80000E08000252573300609 +:10DF400002D599F80A7000E00127B00601D54FF01C +:10DF500000084E4600244FF007090FE0CDE90258B3 +:10DF60000195CDF800900495F1882046129B089AFF +:10DF7000FFF7C3FE0028A2D1641CE4B2BC42EDD37B +:10DF800000209CE700B5FFF7ADFE03490C308A88FE +:10DF9000904203D9842000BD00060020CA8808688A +:10DFA00002EB420300EB8300521C037823F00403CE +:10DFB0000370CA80002101730846ECE72DE9F047A1 +:10DFC000804600F0FBF9070005D000264446F74DD7 +:10DFD00040F2012916E00120BDE8F087204600F05C +:10DFE000EDF90278C17802F0030241EA0222B2FBA5 +:10DFF000F9F309FB13210068FFF7D3FD3044641CDB +:10E0000086B2A4B2E988601E8142E7DCA8F1010073 +:10E01000E8802889801B288100203870DCE710B553 +:10E02000144631B1491E218005F006FFA070002082 +:10E0300010BD012010BD70B50446DC48C1880368DE +:10E0400001E0401C20802088884207D200EB40027B +:10E0500013EB820202D015786D07F2D580B28842A8 +:10E0600016D2AAB15079A072D08820819178107907 +:10E0700001F0030140EA0120A081A078E11CFFF734 +:10E08000A1FD20612088401C2080E080002070BD20 +:10E090000A2070BD0121018270472DE9FF4F85B034 +:10E0A0004FF6FF798246A3F8009048681E460D4659 +:10E0B00080788DF8060048680088ADF804000020DC +:10E0C0008DF80A00088A0C88A04200D304462C82EE +:10E0D00051E03878400708D4641C288AA4B2401C58 +:10E0E000288208F10100C0B246E0288A401C28823C +:10E0F000781D6968FFF70EFDD8BB3188494501D10D +:10E10000601E30803188A1EB080030806888A04212 +:10E1100038D3B878397900F0030041EA002801A922 +:10E12000781DFFF7F7FC20BB298949452ED0002236 +:10E1300039460798FFF706FDD8B92989414518D116 +:10E14000E9680391B5F80AC0D7F808B05046CDF891 +:10E1500000C005F0DCFFDDF800C05A460CF1070CEA +:10E160001FFA8CFC43460399CDF800C005F08DFBE7 +:10E1700060B1641CA4B200208046204600F01EF965 +:10E180000700A6D1641E2C820A2098E67480787954 +:10E19000B071F888B0803978F87801F0030140EA6E +:10E1A00001207081A6F80C80504605F045FE3A46E5 +:10E1B00006F10801FFF706FD306100207FE62DE93A +:10E1C000FF4F87B081461C469246DDF860B0DDF80F +:10E1D0005480089800F0F2F8050002D02878400733 +:10E1E00002D401200BB09CE5484605F025FE2978B5 +:10E1F000090605D56D49897A814201D88720F1E762 +:10E20000CAF309062A4601A9FFF7DCFC0746149861 +:10E2100007281CD000222946FFF794FC0028E1D1F2 +:10E220002878400613D501208DF808000898ADF82D +:10E230000C00BDF80400ADF80E00ADF81060ADF8AC +:10E24000124002A94846F8F7E3FF0028CAD129780E +:10E25000E87801F0030140EA0121AA78287902F068 +:10E26000030240EA0220564507D0B1F5007F04D9E9 +:10E27000611E814201DD0B20B4E7864201D90720EF +:10E28000B0E7801B85B2A54200D92546BBF1000F3F +:10E2900001D0ABF80050179818B1B9192A4600F010 +:10E2A000CCF8B8F1000F0DD03E4448464446169FC6 +:10E2B00005F03FFF2146FF1DBCB232462B460094BD +:10E2C00005F04DFB00208DE72DE9F04107461D4686 +:10E2D0001646084600F072F8040002D02078400785 +:10E2E00001D40120D3E4384605F0A6FD21780906C3 +:10E2F00005D52E49897A814201D88720C7E4224674 +:10E300003146FFF75FFC65B12178E07801F0030149 +:10E3100040EA0120B0F5007F01D8012000E0002094 +:10E3200028700020B3E42DE9F04107461D4616464B +:10E33000084600F043F8040002D02078400701D4DA +:10E340000120A4E4384605F077FD2178090605D5BB +:10E350001649897A814201D8872098E422463146BD +:10E36000FFF75EFCFF2D14D02178E07801F0030266 +:10E3700040EA022040F20122B0FBF2F302FB13005C +:10E3800015B900F2012080B2E070000A60F30101CB +:10E39000217000207BE410B50C4600F00FF810B19E +:10E3A0000178490704D4012010BD000000060020B8 +:10E3B000C18821804079A0700020F5E70749CA880C +:10E3C000824209D340B1096800EB40006FF00B02B4 +:10E3D00002EB8000084470470020704700060020D0 +:10E3E00070B504460D4621462B460AB9002070BD83 +:10E3F00001E0491C5B1C501E021E03D008781E78E9 +:10E40000B042F6D008781E78801BF0E730B50C4695 +:10E4100001462346051B954206D202E0521E9D5C32 +:10E420008D54002AFAD107E004E01D780D70491CD4 +:10E430005B1C521E002AF8D130BDF0B50E460146D5 +:10E44000334680EA030404F00304B4B906E002B9D9 +:10E45000F0BD13F8017B01F8017B521E01F00307A8 +:10E46000002FF4D10C461D4602E080CD80C4121F5F +:10E47000042AFAD221462B4600BF04E013F8014BD0 +:10E4800001F8014B521E002AF8D100BFE0E7F0B5B9 +:10E490000C460146E6B204E002B9F0BD01F8016B9A +:10E4A000521E01F00307002FF6D10B46E5B245EAF4 +:10E4B000052545EA054501E020C3121F042AFBD2C9 +:10E4C000194602E001F8016B521E002AFAD100BF82 +:10E4D000E3E7000010B509F0A0FDF4F7F9F909F041 +:10E4E000E7FBBDE8104009F0AFBC302834BF012085 +:10E4F00000207047202834BF4FF0A0420C4A01236F +:10E5000000F01F0003FA00F0002914BFC2F80C0548 +:10E51000C2F808057047202834BF4FF0A0410449D5 +:10E5200000F01F00012202FA00F0C1F81805704740 +:10E530000003005070B50346002002466FF02F051F +:10E540000EE09C5CA4F130060A2E02D34FF0FF309F +:10E5500070BD00EB800005EB4000521C2044D2B29D +:10E560008A42EED370BD30B50A230BE0B0FBF3F462 +:10E5700003FB1404B0FBF3F08D183034521E05F881 +:10E58000014CD2B2002AF1D130BD30B500234FF694 +:10E59000FF7510E0040A44EA002084B2C85C6040C1 +:10E5A000C0F30314604005EA00344440E0B25B1C51 +:10E5B00084EA40109BB29342ECD330BD2DE9F04188 +:10E5C000FE4B0026012793F864501C7893F868C02E +:10E5D000B8B183F89140A3F8921083F8902083F8A3 +:10E5E0008E70BCF1000F0CBF83F8946083F89450D8 +:10E5F000F3488068008805F08AFDBDE8F04105F029 +:10E6000021BA4FF6FF7083F89140A3F8920083F887 +:10E61000902083F88E70BCF1000F14BF83F89450E3 +:10E6200083F89460BDE8F0812DE9F041E44D29685C +:10E6300091F89C200024012A23D091F89620012AE9 +:10E6400030D091F86C301422DC4E0127012B32D0EF +:10E6500091F88E30012B4FD091F8A620012A1CBFD3 +:10E660000020BDE8F08144701F2200F8042B222214 +:10E67000A731FFF7E2FE286880F8A6400120BDE838 +:10E68000F08144701B220270D1F89D204260D1F8C5 +:10E69000A120826091F8A520027381F89C4001209E +:10E6A000BDE8F081447007220270D1F898204260E2 +:10E6B00081F89640E2E78046447000F8042B20225F +:10E6C0006E31FFF7BAFE88F80870286880F86C4051 +:10E6D00090F86E000028D1D1B6F87000A6F8980026 +:10E6E000A868417B86F89A1086F89670008805F035 +:10E6F0000EFD05F0B6F9C1E791F86C30012B0BD097 +:10E70000447017220270D1F890204260B1F8942032 +:10E71000028181F88E40B1E78046447000F8042BF6 +:10E7200020226E31FFF789FE88F80870286880F88B +:10E730006C4090F86E000028A0D1CDE7A04800689A +:10E7400090F86C10002914BFB0F870004FF6FF70FD +:10E75000704770B59A4C06462068002808BFFFDF56 +:10E760000025206845706660002808BFFFDF20682C +:10E77000417800291CBFFFDF70BDCC220021FFF7CC +:10E7800086FE2068FF2101707F2180F83810132158 +:10E790004184282180F86910012180F85C1080F8FC +:10E7A00061500AF0C1F9BDE8704009F0AEBA844981 +:10E7B0000968097881420CBF012000207047804819 +:10E7C000006890F82200C0F3400070477C48006861 +:10E7D00090F8220000F0010070477948006890F836 +:10E7E0002200C0F3001070472DE9F0437448002464 +:10E7F000036893F82400B3F822C0C0F38001C0F38B +:10E800004002114400F001000844CCF3001121B390 +:10E81000BCF1100F02BF6B4931F81000BDE8F08366 +:10E82000BCF1120F18BFBCF1130F0ED0BCF1150FC5 +:10E830001EBFFFDF2046BDE8F0830021624A32F8A8 +:10E84000102010FB0120BDE8F083604A002132F85F +:10E85000102010FB0120BDE8F08393F85E2093F8B0 +:10E860005F102E264FF47A774FF014084FF04009CE +:10E87000022A04BF4AF2D745B5FBF7F510D0012AAA +:10E8800004BF4AF22F75B5FBF7F510D04AF62315F1 +:10E89000B5FBF7F5082A08BF4E4613D0042A18D056 +:10E8A0002646082A0ED0042A13D0022A49D004F1A1 +:10E8B0002806042A0FD0082A1CBF4FF01908082286 +:10E8C00004D00AE04FF0140806F5A8764FF0400295 +:10E8D00003E006F5A8764FF0100218FB026212FB67 +:10E8E0000052C0EB00103A4D00EB800005EB8000B9 +:10E8F00010441CF0010F4FF4C8724FF4BF7504BFF1 +:10E90000CCF34006002E65D0CCF3400600F5A57090 +:10E91000EEB1082904BF174640260CD0042904BFD5 +:10E920002F46102607D0022907BF04F11807042636 +:10E9300004F12807082606EB860808EB86163E44F5 +:10E940001BE004F118064FF019080422C5E7082956 +:10E9500004BF164640270CD0042904BF2E461027BA +:10E9600007D0022907BF04F11806042704F128067E +:10E97000082707EB871706EB8706304400F19C0653 +:10E9800093F8690001F00C07002F08BF0020304405 +:10E9900018BF00F5416027D1082904BF164640275B +:10E9A0001BD0042904BF2E46102716D0022906BF0B +:10E9B00004F11806042704F128060CE00C060020D8 +:10E9C00068000020DC610200E4610200D461020002 +:10E9D000D4FEFFFF64E018BF0827C7EBC70707EBAB +:10E9E000470706EB4706304498301CF0010F17D05C +:10E9F000082908BF40210CD0042904BF2A46102151 +:10EA000007D0022907BF04F11802042104F12802EB +:10EA1000082101EB410303EB0111114408443BE0E1 +:10EA2000082904BF944640260CD0042904BFAC46F4 +:10EA3000102607D0022907BF04F1180C042604F1A0 +:10EA4000280C082606EB8616B3F840300CEB860C33 +:10EA50006044EB2B20D944F2552C0B3303FB0CF311 +:10EA60009B0D082907D0042902D0022905D008E00F +:10EA70002A46102108E0402106E004F11802042192 +:10EA800002E004F12802082101EB811102EB81016F +:10EA900001F5A57103FB010000F5B470BDE8F0833A +:10EAA00000F5A570082904BF944640260CD004291F +:10EAB00004BFAC46102607D0022907BF04F1180C8A +:10EAC000042604F1280C082606EB8616B3F8483015 +:10EAD0000CEB860C6044EB2BDED944F2552C0B3347 +:10EAE00003FB0CF39B0D0829C5D00429C0D00229D3 +:10EAF000C7D1C2E7FE4840F271210068806A4843EE +:10EB00007047FB48006890F83700002818BF0120C4 +:10EB1000704710B5F74C207B022818BF032808D196 +:10EB2000207D04F115010EF0E6FE08281CBF01202F +:10EB300010BD207B002816BF022800200120BDE860 +:10EB400010400AF021BDEB4908737047E849096895 +:10EB500081F8300070472DE9F047E54C2168087BCB +:10EB6000002816BF022800200120487301F10E0181 +:10EB70000AF0F4FC2168087B022816BF0328012252 +:10EB8000002281F82F204FF0080081F82D00487BEB +:10EB900001F10E034FF001064FF00007012804BFFA +:10EBA0005B7913F0C00F0AD001F10E03012804D1E4 +:10EBB000587900F0C000402801D0002000E001207A +:10EBC00081F82E00002A04BF91F8220010F0040FF3 +:10EBD00007D0087D01F115010EF08DFE216881F846 +:10EBE0002D002068476007F0BFFA2168C14D4FF043 +:10EBF0000009886095F82D000EF089FE804695F892 +:10EC00002F00002818BFB8F1000F04D095F82D0090 +:10EC10000EF0B1FC68B195F8300000281CBF95F8E3 +:10EC20002E0000281DD0697B05F10E0001290ED0B1 +:10EC300012E06E734A4605F10E0140460AF0E4FC0C +:10EC400095F82D1005F10E000EF063FF09E04079F4 +:10EC500000F0C000402831D0394605F10E000AF01E +:10EC60000BFD2068C77690F8220010F0040F08BF53 +:10EC7000BDE8F087002795F82D000EF017FD050080 +:10EC800008BFBDE8F087102102F0C2F8002818BFC5 +:10EC9000BDE8F08720683A4600F11C01C676284698 +:10ECA0000AF0B2FC206800F11C0160680FF08EF8D9 +:10ECB0006068BDE8F04701210FF0A3B80EF066FFD1 +:10ECC0004A4605F10E010AF09FFCCAE7884A12681D +:10ECD000137B0370D2F80E000860508A888070475A +:10ECE00078B584490446824E407B087332682078A8 +:10ECF00010706088ADF8000080B200F00101C0F330 +:10ED0000400341EA4301C0F3800341EA8301C0F3B9 +:10ED1000C00341EAC301C0F3001341EA0311C0F389 +:10ED2000401341EA4311C0F3801041EA801050843F +:10ED3000E07D012808BF012507D0022808BF022571 +:10ED400003D0032814BFFFDF0825306880F85E5029 +:10ED5000607E012808BF012507D0022808BF0225D0 +:10ED600003D0032814BFFFDF0825316881F85F5006 +:10ED700091F83500012829D0207B81F82400488CA7 +:10ED80001D280CBF002060688862607D81F8370014 +:10ED9000A07B002816BF0228002001200875D4F8A7 +:10EDA0000F00C1F81500B4F81300A1F81900A07EF7 +:10EDB00091F86B2060F3071281F86B20E07E012848 +:10EDC00018BF002081F83400002078BD91F85E2043 +:10EDD0000420082A08BF81F85E00082D08BF81F8CA +:10EDE0005F00C9E742480068408CC0F3001131B1B0 +:10EDF000C0F38000002804BF1F20704702E0C0F36A +:10EE0000400109B10020704710F0010F14BFEE203F +:10EE1000FF20704736480068408CC0F3001119B1DC +:10EE2000C0F3800028B102E0C0F3400008B1002028 +:10EE30007047012070472E49002209684A664B8CB2 +:10EE40001D2B0CBF81F8682081F8680070470023F3 +:10EE5000274A126882F85D30D164A2F85000012080 +:10EE600082F85D007047224A0023126882F85C3005 +:10EE7000A2F858000120516582F85C0070471C49D7 +:10EE8000096881F8360070471949096881F86100FE +:10EE900070471748006890F961007047144800688F +:10EEA00090F82200C0F3401070471148006890F8B5 +:10EEB0002200C0F3C0007047012070470C48006872 +:10EEC00090F85F00704770B509F018FE09F0F7FD83 +:10EED00009F0C0FC09F06CFD054C2068416E491C2E +:10EEE000416690F83300002558B109F01DFE03E09B +:10EEF000680000200C06002008F007FF206880F85A +:10EF000033502068457090F8391021B1BDE8704049 +:10EF100004200AF0AEBF90F86810D9B1406E81426B +:10EF200018D804200AF0A5FF206890F8220010F0FD +:10EF3000010F07D0A06843220188BDE8704001207E +:10EF4000FFF73CBBBDE8704043224FF6FF71002045 +:10EF5000FFF734BBBDE8704000200AF08ABF2DE9FE +:10EF6000F04782B00F468146FE4E4FF000083068F1 +:10EF7000458C15F0030F10D015F0010F05F00200BD +:10EF800005D0002808BF4FF0010806D004E0002893 +:10EF900018BF4FF0020800D1FFDF4FF0000A5446BF +:10EFA00015F0010F05F002000DD080B915F0040F27 +:10EFB0000DD04AF00800002F1CBF40F0010040F0C7 +:10EFC00002044DD09EE010B115F0040F0DD015F0E5 +:10EFD000070F10D015F0010F05F0020043D00028F4 +:10EFE00008BF15F0040F34D04AE0002F18BF4AF0D4 +:10EFF000090444D141E037B14AF00800044615F055 +:10F00000200F1BD07EE0316805F02002B1F84800E7 +:10F01000104308BF4AF0010474D04AF018000446B7 +:10F0200015F0200F6ED191F85E1011F00C0118BF91 +:10F030000121C94361F30000044663E0316891F89F +:10F040005E1011F00C0118BF012161F300000446AD +:10F0500058E04AF00800002F18BF40F0010451D1D9 +:10F0600040F010044EE0002818BF15F0040F07D040 +:10F07000002F18BF4AF00B0444D14AF0180441E0B5 +:10F0800015F0030F3DD115F0040F3AD077B1306879 +:10F090004AF0080490F85E0010F00C0118BF01213E +:10F0A00061F3410415F0200F24D02BE0306805F007 +:10F0B0002002B0F84810114308BF4AF0030421D0E1 +:10F0C0004AF0180415F0200F0AD000BF90F85E0037 +:10F0D00010F00C0018BF0120C04360F3410411E0A0 +:10F0E00090F85E1011F00C0118BF0121C94361F3C3 +:10F0F0000004EBE710F00C0018BF012060F30004DF +:10F1000000E0FFDF15F0400F1CD0CFB93168B1F837 +:10F110004800002804BF488C10F0010F0BD110F0FC +:10F12000020F08BF10F0200F05D115F0010F08BF26 +:10F1300015F0020F04D091F85E0010F00C0F01D111 +:10F1400044F040047068A0F800A0017821F020018C +:10F1500001704FF007010EF005FE414670680EF099 +:10F16000F8FF214670680FF000F814F0010F0CD082 +:10F170004FF006034FF000027B4970680EF0CFFF9E +:10F180003068417B70680EF02FFE14F0020F18D02B +:10F19000D6E90010B9F1000F4FF006034FF001025D +:10F1A00007D01C310EF0BBFF012170680EF029FE64 +:10F1B00007E015310EF0B3FF3068017D70680EF086 +:10F1C00020FE14F0040F18BFFFDF14F0080F19D051 +:10F1D000CDF800A03068BDF800200223B0F86A1016 +:10F1E00061F30B02ADF8002090F86B0003220109D7 +:10F1F0009DF8010061F307108DF801006946706801 +:10F200000EF08DFF012F62D13068B0F84810E1B3E5 +:10F2100090F82200C0F34000B8BB70680EF095FF74 +:10F22000401CC7B23068C7F1FF05B0F84820B0F8FD +:10F230005A10511AA942B8BF0D46AA423BD990F8BC +:10F24000220010F0010F36D144F0100421467068FE +:10F250000EF08BFFF81CC0B2ED1E284482B230685D +:10F26000B0F86A10436EC1F30B0151FA83F190F8C4 +:10F2700060303E4F1944BC460023E1FB07C31B0925 +:10F280006FF0240C03FB0C1100E020E080F860100C +:10F2900090F85F00012101F01FF90090BDF8000017 +:10F2A0009DF80210032340EA01400190042201A9C5 +:10F2B00070680EF034FF3068AAB2416C70680EF0CE +:10F2C00082FF3068B0F85A102944A0F85A1014F0A0 +:10F2D000400F06D0D6E900100123062261310EF05E +:10F2E0001EFF14F0200F18BFFFDF0020002818BFFA +:10F2F000FFDF02B0BDE8F0872DE9F043194C89B07B +:10F300002068002808BFFFDF20684178002944D129 +:10F310000178FF2941D0002680F83160A0F85A60BA +:10F32000867080F83960304609F062FB104802AD03 +:10F3300000F1240191E80E1085E80E10D0E90D10BF +:10F34000CDE9061002A809F041FB08F0BCFF2068D7 +:10F3500090F9610009F090F8064809F093F8064822 +:10F360000CE00000680000201A06002053E4B36E91 +:10F37000C8610200D0610200CD61020009F012FBF9 +:10F38000606809F038FB206890F8240010F0010F45 +:10F3900007D0252009F07EF80AE009B00C20BDE86E +:10F3A000F08310F0020F18BF262069D009F072F820 +:10F3B000206890F85E10252008F043FF206880F850 +:10F3C0002C6009F00FFB206890F85E10002009F017 +:10F3D00028F90F21052008F0F8FF206890F82E107A +:10F3E000002901BF90F82F10002990F8220010F09A +:10F3F000040F74D006F0B8FE0546206829468068E0 +:10F4000007F0AAFBDFF82884074690FBF8F008FB1A +:10F4100010704142284606F08EFB2168886097FBF9 +:10F42000F8F04A68104448600EF062FA014620681D +:10F43000426891426ED8C0E90165FE4D4FF0010867 +:10F4400095F82D000EF063FA814695F82F000127FC +:10F45000002818BFB9F1000F04D095F82D000EF068 +:10F460008AF8A0B195F8300000281CBF95F82E004E +:10F47000002824D0687B05F10E01012815D019E081 +:10F4800010F0040F14BF2720FFDF8FD190E73A461A +:10F490006F7305F10E0148460AF0B6F895F82D1085 +:10F4A00005F10E000EF035FB09E0487900F0C000D0 +:10F4B000402815D0414605F10E000AF0DDF820681D +:10F4C00090F8220010F0040F24D095F82D000EF0D3 +:10F4D000EDF805001ED0102101F09AFC40B119E0B2 +:10F4E0000EF054FB3A4605F10E010AF08DF8E6E7FE +:10F4F00020683A4600F11C01C77628460AF084F8D5 +:10F50000206800F11C0160680EF060FC0121606859 +:10F510000EF077FC2068417B0E3008F038FF206841 +:10F5200090F85C1061B3B0F85810A0F84810416D25 +:10F53000416490F82210C1F30011F1B9B0F86A00EB +:10F540000221C0F30B05ADF80050684607F0B0FF8C +:10F5500028B1BDF80000C0F30B00A84204D1BDF8EB +:10F560000000401CADF800002168BDF80000B1F8B3 +:10F570006A2060F30B02A1F86A20206880F85C60C2 +:10F58000206890F85D1039B1B0F85010A0F8401024 +:10F59000C16CC16380F85D60B0F86A10426EC1F35F +:10F5A0000B0151FA82F190F86020DFF88CC211440F +:10F5B00063460022E1FB0C3212096FF0240302FBC8 +:10F5C000031180F860100EF00CFA032160680EF051 +:10F5D00090FA216881F8330009B00020BDE8F0837B +:10F5E0009649886070472DE9F043944C83B02268B7 +:10F5F00092F831303BB1508C1D2808BFFFDF03B0BB +:10F60000BDE8F0435FE401260027F1B1054692F81A +:10F61000600008F03FFF206890F85F10FF2008F0BE +:10F6200010FE20684FF4A57190F85F20002009F0CB +:10F63000D4F8206890F8221011F0030F00F02C810C +:10F64000002D00F0238100F027B992F822108046A7 +:10F65000D07EC1F30011002956D0054660680780AE +:10F66000017821F020010170518C132937D01FDC63 +:10F67000102908BF022144D0122908BF062140D01A +:10F68000FFDF6C4D606805F10E010EF091FB697BA8 +:10F6900060680EF0A9FB2068418C1D2918BF152950 +:10F6A00063D0B0F84820416C60680EF0B6FB5CE0B7 +:10F6B000152918BF1D29E3D14FF001010EF052FBAF +:10F6C0006068017841F020010170216885B11C312A +:10F6D0000EF07CFB012160680EF093FBD1E7002166 +:10F6E0000EF040FB6068017841F020010170C8E72E +:10F6F00015310EF06BFB2068017D60680EF081FB18 +:10F70000BFE70EF02FFBBCE70021FFF728FC606885 +:10F71000C17811F03F0F28D0017911F0100F24D0DB +:10F720000EF01EFB2368024693F82410C1F38000FC +:10F73000C1F3400C604401F00101084493F82C101F +:10F74000C1F3800CC1F34005AC4401F001016144F8 +:10F75000401AC1B293F85E0000F0BEFE0090032391 +:10F760000422694660680EF0DAFC2068002590F8F3 +:10F77000241090F82C0021EA000212F0010F18BFAB +:10F7800001250ED111F0020F04D010F0020F08BFB6 +:10F79000022506D011F0040F03D010F0040F08BFAB +:10F7A0000425B8F1000F2BD0012D1BD0022D08BF6E +:10F7B00026201BD0042D14BFFFDF272016D0206881 +:10F7C00090F85E10252008F03CFD206890F822108B +:10F7D000C1F3001169B101224FF49671002008F0C5 +:10F7E000FCFF0DE0252008F055FEE8E708F052FE8A +:10F7F000E5E790F85E204FF49671002008F0EDFFE9 +:10F80000206890F82C10294380F82C1090F82420C0 +:10F8100032EA01011CD04670418C13292BD026DC22 +:10F82000102904BF03B0BDE8F083122923D007E0FC +:10F8300040420F000C06002053E4B36E6800002025 +:10F84000C1F30010002818BFFFDF03B0BDE8F0834C +:10F85000418C1D2908BF80F82C70DCD0C1F3001149 +:10F86000002914BF80F8316080F83170D3E7152982 +:10F8700018BF1D29DBD190F85E2003B04FF00101C5 +:10F88000BDE8F043084609F094B900BF90F85F2046 +:10F890000121084609F08DF92168002DC87E7CD031 +:10F8A0004A8C3D46C2F34000002808BF47F00805D7 +:10F8B00012F0400F18BF45F04005002819BFD1F8DD +:10F8C0003C90B1F84080D1F84490B1F8488060682D +:10F8D000072107800EF046FA002160680EF039FC1F +:10F8E000294660680EF041FC15F0080F17D020681B +:10F8F000BDF800100223B0F86A2062F30B01ADF8E6 +:10F90000001090F86B00032201099DF8010061F3DB +:10F9100007108DF80100694660680EF000FC606811 +:10F920000EF0DCFA2168C0F1FE00B1F85A20A8EB15 +:10F9300002018142A8BF0146CFB2D019404544D24E +:10F9400045F0100160680EF010FC60680EF0C6FA19 +:10F950002168C0F1FE00B1F85A10A8EB0101814204 +:10F96000A8BF0146CFB260680EF0EFFB3844421CDE +:10F970002068B0F86A10436EC1F30B0151FA83F1AD +:10F9800090F86030FE4D1944AC460023E1FB05C3FE +:10F990004FEA131C6FF0240300E03CE00CFB031162 +:10F9A00080F8601090F85F00012100F095FD009054 +:10F9B000BDF800009DF80210032340EA01400190C9 +:10F9C000042201A960680EF0AAFB216891F82200C8 +:10F9D00010F0400F05D001230622613160680EF05F +:10F9E0009EFB20683A46B0F85A0000EB09016068B7 +:10F9F0000EF0E9FB2068B0F85A103944A0F85A100C +:10FA000009F0BFFC002818BFFFDF20684670867031 +:10FA100003B0BDE8F0830121FFF7A1FAF0E7D94870 +:10FA200010B50068417841B90078FF2805D0002161 +:10FA30000846FFF7D8FD002010BD09F05FF809F077 +:10FA40003EF808F007FF08F0B3FF0C2010BD2DE9C9 +:10FA5000F041CC4D0446174628680E4690F86C00DD +:10FA6000002818BFFFDF2868002F80F86E7018BFCD +:10FA7000BDE8F0812188A0F870106188A0F8861098 +:10FA8000A188A0F88810E188A0F88A1094F888115D +:10FA900080F88C1090F82F10002749B1427B00F1BC +:10FAA0000E01012A04D1497901F0C001402935D065 +:10FAB00090F8301041B1427B00F10E01012A04BFE1 +:10FAC000497911F0C00F29D000F17A00F3F794FAC8 +:10FAD0006868FF2E0178C1F380116176D0F80310B9 +:10FAE000C4F81A10B0F80700E08328681ED0C0F8E8 +:10FAF0008010E18BA0F8841000F17402511E304692 +:10FB00000DF014FF002808BFFFDF286890F873107D +:10FB100041F0020180F87310BDE8F081D0F80E10BA +:10FB2000C0F87A10418AA0F87E10D1E7C0F8807042 +:10FB3000A0F88470617E80F87310D4F81A104167C1 +:10FB4000E18BA0F87810BDE8F08170B58D4C0125EF +:10FB5000206890F82200C0F3C00038B13C22FF2199 +:10FB6000A068FFF774FF206880F86C50206890F858 +:10FB7000220010F0010F1CBFA06801884FF03C026A +:10FB800012BF01204FF6FF710020FEF717FD20681D +:10FB900080F8395070BD7B49096881F832007047A0 +:10FBA0002DE9F041774C0026206841780127354641 +:10FBB000012906D0022901D003297DD0FFDFBDE84D +:10FBC000F081817802250029418C46D0C1F34002A2 +:10FBD000002A08BF11F0010F6FD090F85F204FF09E +:10FBE00001014FF0000008F0E4FF216891F82200C5 +:10FBF000C0F34000002814BF0C20222091F85F10B1 +:10FC000008F01FFB2068457090F8330058B108F0E9 +:10FC100068F8206890F85F0010F00C0F0CBF4020CF +:10FC2000452008F077FF206890F83400002818BFBE +:10FC300008F08FFF216891F85F0091F8691010F0CB +:10FC40000C0F08BF0021962008F0F6FE09F090FB8B +:10FC5000002818BFFFDFBDE8F081C1F3001282B1B8 +:10FC600010293FD090F8330020B108F03AF8402036 +:10FC700008F050FF206890F8221011F0040F36D0E1 +:10FC800043E090F8242090F82C309A422AD1B0F822 +:10FC90004800002808BF11F0010F05D111F0020F34 +:10FCA00008BF11F0200F6FD04FF001014FF000009E +:10FCB000FFF799FC206801E041E035E0418C11F04C +:10FCC000010F04BFC1F34001002907D1B0F85A1059 +:10FCD000B0F84820914218BFBDE8F08180F831703B +:10FCE000BDE8F081BDE8F041002101207BE490F8FF +:10FCF0003710012914BF0329102646F00E0190F891 +:10FD00005E204FF0000008F054FF206890F83400A7 +:10FD1000002818BF08F01DFF0021962008F08CFE77 +:10FD200020684570BDE8F081B0F85A10B0F848007E +:10FD3000814242D0BDE8F0410121084653E4817878 +:10FD4000D9B1418C11F0010F22D080F86C7090F87D +:10FD50006E20B0F870100120FEF730FC206845706E +:10FD600008F0CCFE08F0ABFE08F074FD08F020FEB1 +:10FD7000BDE8F04103200AF07CB88178012004E05E +:10FD800053E4B36E6800002017E0BDE8F0412AE4B8 +:10FD900011F0020F04BFFFDFBDE8F081B0F85A1088 +:10FDA000B0F84000814208D001210846FFF71BFC53 +:10FDB000216803204870BDE8F081BDE8F041FFF7FD +:10FDC00082B8FFF780B810B5FE4C206890F8341068 +:10FDD00049B1383008F0CCFE18B921687F2081F88D +:10FDE000380008F0ACFE206890F8330018B108F035 +:10FDF0009BFE07F08AFF0AF02EFCA8B1206890F85D +:10FE00002210C1F3001179B14078022818BFFFDF3A +:10FE100000210120FFF7E7FB2068417800291EBF81 +:10FE200040780128FFDF10BDBDE81040FFF74BB858 +:10FE30002DE9F047E34C0F4680462168B8F1030FE7 +:10FE4000488C08BFC0F3400508D000F0010591F8C8 +:10FE50003200002818BF4FF0010901D14FF000090E +:10FE600008F00CFB0646B8F1030F0CBF4FF0020878 +:10FE70004FF0010835EA090008BFBDE8F0872068A7 +:10FE800090F8330068B10DF08FFD38700146FF28FF +:10FE900007D06068C01C0DF060FD38780DF091FD52 +:10FEA000064360680178C1F3801221680B7D9A4295 +:10FEB00008D10622C01C1531FEF792FA002808BFAF +:10FEC000012000D000203978FF2906D0C8B9206869 +:10FED00090F82D00884216D113E0A0B1616811F8A6 +:10FEE000030BC0F380100DF006FD05460DF061FE1A +:10FEF00038B128460DF0DAFB18B1102100F088FF68 +:10FF000008B1012000E00020216891F8221011F0D2 +:10FF1000040F01D0F0B11AE0CEB9AB4890F8370029 +:10FF2000002818BF404515D1616811F8030BC0F3D4 +:10FF300080100DF0E0FC04460DF03BFE38B1204689 +:10FF40000DF0B4FB18B1102100F062FF10B10120D8 +:10FF5000BDE8F0870020BDE8F0872DE9F04F994D0E +:10FF6000044683B0286800264078022818BFFFDFC7 +:10FF700028684FF07F0B90F8341049B1383008F002 +:10FF8000F7FD002804BF286880F838B008F0D7FDD6 +:10FF900068680DF009FF8046002C00F0458208F0EB +:10FFA00010FA002800F04082012400274FF0FF09DA +:10FFB000B8F1050F1ED1686890F8240000F01F000A +:10FFC000102817D9286890F8360098B18DF800905D +:10FFD00069460520FFF72CFF002800F025822868DD +:10FFE00080F8A64069682222A730C91CFEF725FACE +:10FFF00000F01ABA68680EF062F8002800F0148267 +:020000040001F9 +:100000004046DFF8C4814FF0030A062880F02182C1 +:10001000DFE800F0FCFCFC03FCFB8DF80090694677 +:100020000320FFF705FF002800F0F180296891F810 +:10003000340010B191F89C00D8B12868817801296A +:100040004DD06868042107800DF08CFE08F10E0188 +:1000500068680DF0ADFE98F80D1068680DF0C4FEEC +:100060002868B0F84020C16B68680DF0FAFE00F017 +:1000700063B99DF8000081F89C400A7881F89D20C2 +:10008000FF280FD001F19F029E310DF04FFC002898 +:1000900008BFFFDF286890F89E1041F0020180F849 +:1000A0009E100DE068680278C2F3801281F89E20ED +:1000B000D0F80320C1F89F20B0F80700A1F8A300F2 +:1000C000286800F1A50490F838007F2808BFFFDFFA +:1000D000286890F83810217080F838B0ADE790F8B3 +:1000E00022000721C0F3801938480479686869F351 +:1000F000861407800DF036FE002168680EF029F89E +:10010000214668680EF031F80623002208F10E013E +:1001100068680EF004F82868417B68680DF064FE9A +:1001200068680DF0DBFE2968B1F84020C0F1FE01DF +:100130008A42B8BF1146CFB2BA423CD9F81EC7B204 +:1001400044F0100B594668680EF00FF868680DF01F +:10015000FCFF384400F101082868B0F86A10426ECC +:10016000C1F30B0151FA82F190F86020184C0A4457 +:10017000A4460023E2FB04C319096FF0240301FB2A +:10018000032180F8601090F85F004246012100F0E2 +:10019000A3F90190BDF804009DF80610032340EA7E +:1001A00001400290042202A968680DF0B8FF594688 +:1001B00068680DF0DAFFB9F1000F0FD0D5E9001033 +:1001C000012307E0680000200C060020C86102003F +:1001D00053E4B36E062261310DF0A1FF28683A4660 +:1001E000C16B68680DF0EFFF2868A0F85A70B0F88E +:1001F00040108F420CBF0121002180F8311009F01E +:10020000C0F8002818BFFFDF96E007E021E128686A +:100210008078002840F00A8100F006B98DF800903F +:1002200068680178C1F38019D0F803100191B0F823 +:100230000700ADF8080069460520FFF7F9FD002822 +:1002400028687DD0817800297CD090F85FB0D5E90E +:100250000104D0F80F10C4F80E10B0F8131061822A +:10026000417D2175817D6175B0F81710E182B0F88C +:1002700019106180B0F81B10A180B0F81D10E1804A +:1002800000F11F0104F1080015F085FE686890F880 +:10029000241001F01F01217690F82400400984F811 +:1002A000880184F864B084F865B01BF00C0F0CBFB3 +:1002B0000021012104F130000EF0ABF92868002282 +:1002C00090F8691084F8661090F8610084F867006F +:1002D0009DF80010A868FFF7BAFB022009F0C9FDDD +:1002E000B2480DF1040B08210468686807800DF01E +:1002F00039FD002168680DF02CFF214668680DF07B +:1003000034FF0623002208F10E0168680DF007FF94 +:100310002868417B68680DF067FD494668680DF004 +:1003200070FD06230122594668680DF0F8FE09F0B9 +:1003300028F8002818BFFFDF286880F801A077E0C0 +:100340006DE0FFE76868D5F808804FF00109027892 +:1003500098F80D10C2F34012114088F80D10D0F833 +:100360000F10C8F80E10B0F81310A8F81210417D45 +:1003700088F81410817D88F81510B0F81710A8F8C7 +:100380001610B0F81910A8F80210B0F81B10A8F851 +:100390000410B0F81D10A8F8061000F11F0108F1B4 +:1003A000080015F0F8FD686890F8241001F01F01AE +:1003B00088F8181090F824000021400988F8880176 +:1003C00088F8649088F8659008F130000EF021F903 +:1003D0002868002290F8691088F8661090F861008B +:1003E00088F867009DF80010A868FFF730FB2868C0 +:1003F00080F86C4090F86E20B0F870100120FEF785 +:10040000DDF82868477008F079FB08F058FB08F021 +:1004100021FA08F0CDFA012009F02BFD08E090F850 +:100420002200C0F3001008B1012601E0FEF74BFDE9 +:10043000286890F8330018B108F076FB07F065FCE7 +:1004400096B10AF008F960B100210120FFF7CBF85E +:1004500013E0286890F82200C0F300100028E5D0CF +:10046000E2E7FEF730FD08E028688178012904D131 +:1004700090F85F10FF2007F0E4FE2868417800291B +:1004800019BF4178012903B0BDE8F08F40780328F7 +:1004900018BFFFDF03B0BDE8F08F70B5444C0646CF +:1004A0000D462068807858B107F0F2FD21680346B8 +:1004B000304691F85F202946BDE870400AF085BAC1 +:1004C00007F0E6FD21680346304691F85E20294694 +:1004D000BDE870400AF079BA78B50C460021009169 +:1004E000082804BF4FF4C87040210DD0042804BF71 +:1004F0004FF4BF70102107D0022807BF01F1180088 +:10050000042101F128000821521D02FB01062848A0 +:100510009DF80010006890F8602062F3050141F03A +:1005200040058DF8005090F85F00012829D002287E +:100530002ED004281CBF0828FFDF2FD025F0800014 +:100540008DF80000C4EB041000EB80004FF01E019A +:1005500001EB800006FB04041648844228BFFFDF3D +:100560001548A0FB0410BDF80110000960F30C0150 +:10057000ADF80110BDF800009DF8021040EA0140FE +:1005800078BD9DF8020020F0E0008DF80200D5E76C +:100590009DF8020020F0E000203004E09DF8020009 +:1005A00020F0E00040308DF80200C7E7C86102008B +:1005B00068000020C4BF0300898888880023C383A3 +:1005C000428401EBC202521EB2FBF1F1018470477A +:1005D0002DE9F04104460026D9B3552333224FF4C8 +:1005E000FA4501297DD0022900F01481032918BFA2 +:1005F000BDE8F08104F17001207B00F01F00207342 +:1006000084F889605FF0000004EB000C9CF808C0DF +:1006100003EA5C05ACEB050C0CF0FF0C0CF03305A9 +:1006200002EA9C0CAC440D180CEB1C1C0CF00F0CDB +:1006300085F814C04D7E401CAC44C0B281F819C08E +:100640000528E1D30CF0FF00252898BFBDE8F08114 +:10065000DCE0FFE704F17005802200212846FDF769 +:1006600016FFAE71EE712E736E73EE732E746E7193 +:10067000AE76EE76212085F84000492085F84100CD +:10068000FE2085F874002588702200212046FDF7A1 +:10069000FEFE2580012584F8645084F865502820EA +:1006A00084F86600002104F130000DF0B2FF1B2237 +:1006B000A4F84E20A4F85020A4F85220A4F8542006 +:1006C0004FF4A470A4F85600A4F8580065734FF4D2 +:1006D00048606080A4F8F060A4F8F260A4F8F460C8 +:1006E00000E023E0A4F8F660A4F8F86084F8FA606B +:1006F00084F8FD60A4F8066184F80461A4F8186128 +:10070000A4F81A6184F8B66184F8B76184F8C0610E +:1007100084F8C16184F88C6184F88F6184F8A861E1 +:10072000C4F8A061C4F8A461BDE8F081A4F8066132 +:1007300084F8FB606088FE490144B1FBF0F1A4F845 +:1007400090104BF68031A4F89210B4F806C0A4F8CB +:100750009860B4F89C704FEACC0C4743BCFBF0FCAB +:1007600097FBF0F70CF1010CA4F89C701FFA8CFCBD +:100770000CFB00F704F17001A4F89AC0B7F5C84F5C +:10078000C4BFACF1010CA1F82AC0B5FBF0FC0CF120 +:10079000010CA1F830C000F5802C0CF5EE3CACF15A +:1007A0000105B5FBF0FCA1F820C0CD8B05FB00FCDA +:1007B000BCFBF0F0C8830846217B01F01F012173C8 +:1007C0004676002104EB010C9CF808C003EA5C05A6 +:1007D000ACEB050C0CF0FF0C0CF0330502EA9C0CA2 +:1007E000AC4445180CEB1C1C0CF00F0C85F814C025 +:1007F000457E491CAC44C9B280F819C00529E1D333 +:100800000CF0FF00252898BFBDE8F081FFDFBDE8B0 +:10081000F08100BFB4F8B011B4F8B4316288A4F824 +:100820009860B4F89CC0DB000CFB02FCB3FBF1F356 +:100830009CFBF1FC5B1CA4F89CC09BB203FB01FC7D +:1008400004F17000A4F89A30BCF5C84FC4BF5B1E19 +:100850004385B5FBF1F35B1C0386438C01EBC303BB +:100860005B1EB3FBF1F30384C38B5A43B2FBF1F17C +:10087000C183BDE8F0812DE9F04104460025A1B314 +:1008800055234FF4FA464FF0330C01297DD002294D +:1008900000F0E080032918BFBDE8F08104F170008A +:1008A000217B01F01F01217384F889500021621817 +:1008B000127A03EA5205521BD2B202F033050CEA57 +:1008C00092022A44451802EB121202F00F022A7516 +:1008D000457E491C2A44C9B242760529E7D3D0B2E5 +:1008E000252898BFBDE8F081B1E0FFE704F170066C +:1008F000802200213046FDF7CAFDB571F5713573D0 +:100900007573F57335747571B576F576212086F8B3 +:100910004000492086F84100FE2086F874002688B1 +:10092000702200212046FDF7B2FD2680012684F8C2 +:10093000646084F86560282084F86600002104F172 +:1009400030000DF066FE1B22A4F84E20A4F85020C3 +:10095000A4F85220A4F854204FF4A470A4F8560030 +:10096000A4F858006673A4F8F850202084F8FA0020 +:1009700084F8F050C4F8F45084F8245184F82551D8 +:1009800084F82E5184F82F5100E005E084F81451CA +:1009900084F82051BDE8F081618865480844B0FBC7 +:1009A000F1F0A4F890004BF68030A4F89200E288B1 +:1009B000A4F89850B4F89C70D2004F43B2FBF1F207 +:1009C00097FBF1F7521CA4F89C7092B202FB01F75E +:1009D00004F17000A4F89A20B7F5C84FC4BF521EA6 +:1009E0004285B6FBF1F2521C028601F5802202F527 +:1009F000EE32561EB6FBF1F20284C68B06FB01F204 +:100A0000B2FBF1F1C1830146207B00F01F0020738F +:100A10004D7600202218127A03EA5205521BD2B2F8 +:100A200002F033050CEA92022A440D1802EB12126E +:100A300002F00F022A754D7E401C2A44C0B24A764D +:100A40000528E7D3D0B2252898BFBDE8F081FFDFA5 +:100A5000BDE8F081D0F81811628804F1700348896C +:100A6000C989A4F89850B4F89CC0C9000CFB02FCDA +:100A7000B1FBF0F19CFBF0FC491CA4F89CC089B2CE +:100A800001FB00FCA4F89A10BCF5C84FC4BF491E76 +:100A90005985B6FBF0F1491C1986598C00EBC10150 +:100AA000491EB1FBF0F11984D98B5143B1FBF0F031 +:100AB000D883BDE8F0812DE9F003447E0CB1252CEC +:100AC00003D9BDE8F00312207047002A02BF0020BE +:100AD000BDE8F003704791F80DC01F260123154DA6 +:100AE0004FF00008BCF1000F7AD0BCF1010F1EBF1F +:100AF0001F20BDE8F0037047B0F800C00A7C8F7B70 +:100B000091F80F907A404F7C87EA090742EA072262 +:100B100082EA0C0C5FF000070CF0FF0999FAA9F9C2 +:100B20004FEA1C2C4FEA19699CFAACFC04E0000067 +:100B3000FFDB050053E4B36E4FEA1C6C49EA0C2C52 +:100B40000CEB0C1C7F1C9444FFB21FFA8CFC032F8F +:100B5000E2D38CEA020CFB4F0022ECFB0572120977 +:100B60006FF0240502FB05C2D2B201EBD2078276F8 +:100B700002F007053F7A03FA05F52F4218BFC27647 +:100B80007ED104FB0CF2120C521CD2B25FF00004B6 +:100B900000EB040C9CF814C094453CBFA2EB0C0283 +:100BA000D2B212D30D194FF0000C2D7A03FA0CF7C4 +:100BB0003D421CBF521ED2B2002A69D00CF1010C7A +:100BC0000CF0FF0CBCF1080FF0D304F1010C0CF099 +:100BD000FF04052CDCD33046BDE8F0037047FFE787 +:100BE00090F81AC00C7E474604FB02C2D54C4FF069 +:100BF000000CE2FB054C4FEA1C1C6FF024040CFBBC +:100C00000422D2B201EBD204827602F0070C247ADD +:100C100003FA0CFC14EA0C0F1FBFC2764046BDE875 +:100C2000F003704790F819C0B2FBFCF40CFB1422DF +:100C3000521CD2B25FF0000400EB040C9CF814C00C +:100C400094453CBFA2EB0C02D2B212D30D194FF067 +:100C5000000C2D7A03FA0CF815EA080F1CBF521E7F +:100C6000D2B272B10CF1010C0CF0FF0CBCF1080F08 +:100C7000F0D304F1010C0CF0FF04052CDCD3AAE73F +:100C800009E00CEBC401C1763846BDE8F0037047BB +:100C90000CEBC401C1764046BDE8F0037047AA4A98 +:100CA000016812681140A94A126811430160704737 +:100CB00030B4A749A44B00244FF0010C0A78521C11 +:100CC000D2B20A70202A08BF0C700D781A680CFA8C +:100CD00005F52A42F2D0097802680CFA01F1514078 +:100CE000016030BC704770B46FF01F02010C02EA63 +:100CF00090251F23A1F5AA4054381CBFA1F5AA4096 +:100D0000B0F1550009D0A1F52850AA381EBFA1F5B1 +:100D10002A40B0F1AA00012000D100204FF0000CC1 +:100D2000624601248CEA0106F6431643B6F1FF3F02 +:100D300011D005F001064FEA5C0C4CEAC63C03F00A +:100D4000010652086D085B08641C42EAC632162C84 +:100D5000E8DD70BC704770BC0020704790F804C09C +:100D60003CF01F011CBF0020704730B401785522B1 +:100D700002EA5103C91AC9B201F03304332303EA6A +:100D800091012144447801EB111102EA5405641BDE +:100D9000E4B204F0330503EA94042C4404EB141485 +:100DA00001F00F0104F00F040C448178C07802EACE +:100DB0005105491BC9B201F0330503EA91012944E9 +:100DC00001EB111101F00F01214402EA5004001B54 +:100DD000C0B200F0330403EA9000204400EB10108E +:100DE00000F00F00014402EA5C00ACEB0000C0B26E +:100DF00000F0330203EA9000104400EB101000F002 +:100E00000F00084401288CBF0120002030BC70472F +:100E10000A000ED00123012A0BDB491EC9B210F8CB +:100E200001C0BCF1000F01D0002070475B1C934251 +:100E3000F3DD01207047002A08BF70471144401EAF +:100E400012F0010F03D011F8013D00F8013F5208E4 +:100E500008BF704711F8013C437011F8023D00F8DB +:100E6000023F521EF6D1704770B58CB000F11004ED +:100E70001D4616460DF1FF3C5FF0080014F8012CEA +:100E80008CF8012014F8022D0CF8022F401EF5D129 +:100E900001F1100C6C460DF10F0108201CF8012C1B +:100EA0004A701CF8022D01F8022F401EF6D1204690 +:100EB00013F01CFB7EB16A1E04F130005FF00801E4 +:100EC00010F8013C537010F8023D02F8023F491E31 +:100ED000F6D10CB070BD08982860099868600A982F +:100EE000A8600B98E8600CB070BD38B505460C469C +:100EF000684607F03DFE002808BF38BD9DF9002078 +:100F00002272E07E607294F90A100020511A48BFE4 +:100F1000494295F82D308B42C8BF38BDFF2B08BF22 +:100F200038BDE17A491CC9B2E17295F82E30994278 +:100F300003D8A17A7F2918BF38BDA2720020E072C1 +:100F4000012038BD53E4B36E04620200086202005F +:100F5000740000200C2818BF0B2810D00D2818BFD3 +:100F60001F280CD0202818BF212808D0222818BFFD +:100F7000232804D024281EBF2628002070474FF0C5 +:100F8000010070470C2963D2DFE801F006090E1357 +:100F9000161B323C415C484E002A5BD058E0072AC1 +:100FA00018BF082A56D053E00C2A18BF0B2A51D07C +:100FB0004EE00D2A4ED04BE0A2F10F000C2849D98B +:100FC00046E023B1A2F110000B2843D940E0122AD9 +:100FD00018BF112A3ED090F8380020B1122A37D31A +:100FE0001A2A37D934E0162A32D31A2A32D92FE0F6 +:100FF000A2F10F0103292DD990F8380008B31B2A5C +:1010000028D925E0002B08BF042A21D122E013B102 +:10101000062A1FD01CE0012A1AD11BE01C2A1CBF83 +:101020001D2A1E2A16D013E01F2A18BF202A11D00D +:10103000212A18BF222A0DD0232A1CBF242A262A9F +:1010400008D005E013B10E2A04D001E0052A01D032 +:1010500000207047012070472DE9F0410D460446FD +:10106000866805F02FFA58B905F07EF840F236711F +:1010700004F061FDA060204605F024FA0028F3D0BA +:1010800095B13046A16805F067FD00280CDD2844C5 +:10109000401EB0FBF5F707FB05F1304604F04BFDB1 +:1010A000A0603846BDE8F0810020BDE8F08170B551 +:1010B0000446904228BF70BD101B64280BD325182E +:1010C0008D4206D8042105F07AFD00281CBF284671 +:1010D00070BD204670BD6420F1E711F00C0F13D0F5 +:1010E00001F0040100290DBF4022102296214FF487 +:1010F000167101F5BC71A0EB010388428CBF93FB14 +:10110000F2F0002080B27047022919BF6FF00D0184 +:1011100001EBD0006FF00E0101EB9000F2E7084404 +:1011200018449830002A14BF042100210844704755 +:1011300010B4002A14BF4FF429624FF4A472002B9C +:1011400019BF4FF429634FF0080C4FF4A4734FF00C +:10115000010C00280CBF0124002491F866001CF04B +:101160000C0F08BF0020D11808449830002C14BF81 +:1011700004210021084410BC704700280CBF012343 +:10118000002391F86600002BA0F6482000F50050DF +:1011900018BF04231844496A81422CBF0120002053 +:1011A00012F00C0118BF012131EA000014BF002029 +:1011B0000120704710B413680B66137813F00C030A +:1011C00018BF0123527812F00C0218BF012253EA13 +:1011D000020C04BF10BC7047002B0CBF4FF4A4736B +:1011E0004FF42963002A19BF4FF429624FF0080C0D +:1011F0004FF4A4724FF0010C00280CBF012400240E +:1012000091F866001CF00C0F08BF00201A4410442F +:101210009830002C14BF0422002210444A6A8242F3 +:1012200024BF10BC704791F860004FF0030230F00B +:101230000C0381F8603091F8610020F00C0081F817 +:10124000610008BF81F86020002808BF81F8612094 +:1012500010BC704710F0010F1CBF0120704710F048 +:10126000020F1CBF0220704710F0040018BF0820B6 +:1012700070472DE9F0470446174689464FF00108AC +:1012800008460DF0FAF8054648460DF0FAF810F059 +:10129000010F18BF012624D015F0010F18BF01233C +:1012A0002AD000BF56EA030108BF4FF0000810F033 +:1012B000070F08BF002615F0070F08BF002394F89A +:1012C0006400B0420CBF00203046387094F86510BE +:1012D000994208BF00237B70002808BF002B25D14E +:1012E00015E010F0020F18BF0226D5D110F0040F40 +:1012F00014BF08260026CFE715F0020F18BF0223FF +:10130000D0D115F0040F14BF08230023CAE74846C4 +:101310000DF0BDF8B4F87010401A00B247F6FE7137 +:10132000884201DC002801DC4FF0000816B1082ECD +:101330000CD018E094F86400012818BF022812D0DD +:1013400004281EBF0828FFDF032D0CD194F8C0012C +:1013500048B1B4F8C401012894F8640006D0082804 +:1013600001D0082038704046BDE8F087042818BF37 +:101370000420F7D1F5E7012814BF0228704710F0C8 +:101380000C0018BF0420704738B4CBB2C1F3072C4F +:10139000C1B2C0F30724012B07D0022B09D0042BC4 +:1013A00008BFBCF1040F2DD006E0BCF1010F03D142 +:1013B00028E0BCF1020F25D0012906D0022907D070 +:1013C000042908BF042C1DD004E0012C02D119E02F +:1013D000022C17D001EA0C0161F3070204EA0301B1 +:1013E00061F30F22D1B211F0020F18BF022310D007 +:1013F000C2F307218DF8003011F0020F18BF02214F +:101400001BD111E0214003EA0C03194061F30702EC +:10141000E6E711F0010F18BF0123E9D111F0040F25 +:1014200014BF08230023E3E711F0010F18BF0121C7 +:1014300003D111F0040118BF08218DF80110082B09 +:1014400001BF000C012804208DF80000BDF8000049 +:1014500038BC70474FF0000C082902D0042909D08D +:1014600011E001280FD10420907082F803C013808E +:1014700001207047012806D00820907082F803C030 +:1014800013800120704700207047162A10D12A22AD +:101490000C2818BF0D280FD04FF0230C1F280DD09B +:1014A00031B10878012818BF002805D0162805D0CA +:1014B00000207047012070471A70FBE783F800C0D6 +:1014C000F8E7012908D002290BD0042912BF082906 +:1014D00040F6A660704707E0002804BF40F2E240F3 +:1014E000704740F6C410704700B5FFDF40F2E2409D +:1014F00000BD00000178406829B190F82C1190F8E7 +:101500008C0038B901E001F0BDBD19B1042901D04A +:10151000012070470020704770B50C460546062133 +:1015200002F0C4FC606008B1002006E007212846F4 +:1015300002F0BCFC606018B101202070002070BD7A +:10154000022070BD2DE9FC470C4606466946FFF7B0 +:10155000E3FF00287DD19DF8000050B1FDF7EEF8C3 +:10156000B0427CD0214630460AF008FC002873D1F6 +:101570002DE00DF097F9B04271D02146304612F0BF +:10158000B6FA002868D1019D95F8F00022E001200C +:1015900000E00020804695F839004FF0010A4FF036 +:1015A0000009F0B195F83A0080071AD584F8019047 +:1015B00084F800A084F80490E68095F83B1021722E +:1015C000A98F6181E98FA18185F8399044E0019D5F +:1015D00095F82C0170350028DBD1287F0028D8D061 +:1015E000D5E7304602F0A5FD070000D1FFDF384601 +:1015F00001F0B5FF40B184F801900F212170E68021 +:10160000208184F804A027E0304602F080FD070026 +:1016100000D1FFDFB8F1000F21D0384601F0F7FF0D +:10162000B8B19DF8000038B90198D0F81801418888 +:10163000B14201D180F80090304607F00DFF84F8E8 +:1016400001900C21217084F80490E680697F21725A +:1016500000E004E085F81C900120BDE8FC87002034 +:10166000FBE71CB56946FFF757FF00B1FFDF68468F +:1016700001F014FDFE4900208968A1F8F2001CBDAC +:101680002DE9FC4104460E46062002F0B7FB054654 +:10169000072002F0B3FB2844C7B20025A8463E4409 +:1016A00017E02088401C80B22080B04202D3404620 +:1016B000A4F8008080B2B84204D3B04202D2002025 +:1016C000BDE8FC816946FFF727FF0028F8D06D1CB4 +:1016D000EDB2AE42E5D84FF6FF7020801220EFE762 +:1016E00038B54FF6FF70ADF800000DE00621BDF8EB +:1016F000000002F0EDFB04460721BDF8000002F0F7 +:10170000E7FB0CB100B1FFDF00216846FFF7B8FF2F +:101710000028EBD038BD70B507F00CFF0BF034FF9C +:10172000D44C4FF6FF76002526836683D2A0257021 +:1017300001680079A4F14002657042F8421FA11CC3 +:101740001071601C12F0EFFA1B2020814FF4A4717D +:101750006181A081E18107212177617703212174D3 +:10176000042262746082A082A4F13E00E1820570CE +:101770004680BF480C300570A4F11000057046800B +:1017800084F8205070BD70B5B94C16460D466060A7 +:10179000217007F047FEFFF7A3FFFFF7BCFF20789B +:1017A0000FF0BDFFB6480DF0D0F92178606812F057 +:1017B0005FFA20780BF0DCF8284608F0AFFEB0485E +:1017C000FCF7C7FF217860680AF0B2FB3146207849 +:1017D00012F024FDBDE870400BF0D6BE10B5012418 +:1017E0000AB1002010BD21B1012903D000242046F8 +:1017F00010BD02210CF024FDF9E710B50378044672 +:10180000002B406813460A46014609D05FF00100EC +:10181000FFF78EFC6168496A884203D9012010BD38 +:101820000020F5E7002010BD2DE9F04117468A7829 +:101830001E46804642B11546C87838B1044669074D +:1018400006D52AB1012104E00725F5E70724F6E7CC +:101850000021620702D508B1012000E0002001420A +:1018600006D0012211464046FFF7C7FF98B93DE078 +:1018700051B1002201214046FFF7BFFF58B9600770 +:1018800034D50122114620E060B1012200214046FA +:10189000FFF7B3FF10B10920BDE8F081680725D537 +:1018A000012206E068074FEA44700AD5002814DBDD +:1018B000002201214046FFF7A0FFB8B125F0040542 +:1018C00014E0002812DA012200214046FFF795FFBC +:1018D00060B100BF24F0040408E001221146404634 +:1018E000FFF78BFF10B125F00405F3E73D7034706E +:1018F0000020D1E770B58AB0044600886946FFF73A +:101900000BFE002806D1A08830B1012804D002289F +:1019100002D012200AB070BD04AB03AA214668466B +:10192000FFF782FF0500F5D19DF800100120002689 +:101930000029019906D081F8C101019991F80C1292 +:10194000B1BB2DE081F82F01019991F8561139B9F9 +:10195000019991F82E1119B9019991F8971009B1CF +:101960003A2519E00199059681F82E01019A9DF812 +:101970000C0082F83001019B9DF8102083F8312182 +:10198000A388019CA4F832318DF814008DF815203D +:1019900005AA0020FFF70EFC019880F82F6126E0D1 +:1019A000019991F8C01119B9019991F8971009B1ED +:1019B0003A2519E00199059681F8C00101989DF832 +:1019C0000C2080F8C221019B9DF8100083F8C30110 +:1019D000A388019CA4F8C4318DF814208DF815005B +:1019E00005AA0120FFF7E6FB019880F8C1612846AF +:1019F00090E710B504460020A17801B90120E278F3 +:101A00000AB940F0020001F058FB002803D120463B +:101A1000BDE810406EE710BD70B5044691F8650052 +:101A200091F866300D4610F00C0F00D1002321898B +:101A3000A088FFF774FB696A814229D2401A401CD2 +:101A4000A1884008091A8AB2A2802189081A208137 +:101A5000668895F864101046FFF73FFB864200D277 +:101A600030466080E68895F8651020890AE000001D +:101A70007800002018080020FFFFFFFF1F00000073 +:101A8000D8060020FFF729FB864200D23046E080CE +:101A900070BDF0B585B00D46064603A9FFF73CFDC5 +:101AA00000282DD19DF80C0060B300220499FB2082 +:101AB000B1F84E30FB2B00D30346B1F85040FB2069 +:101AC000FB2C00D30446DFF85CC59CE88110009035 +:101AD0000197CDF808C0ADF80230ADF80640684671 +:101AE000FFF79AFF6E80BDF80400E880BDF808009B +:101AF0006881BDF80200A880BDF80600288100209A +:101B000005B0F0BD0122D1E72DE9F04186B00446D1 +:101B100000886946FFF700FD002876D12189E0881A +:101B200001F0E4FA002870D1A188608801F0DEFAA3 +:101B300000286AD12189E08801F0CFFA002864D119 +:101B4000A188608801F0C9FA07005ED1208802A947 +:101B5000FFF79FFF00B1FFDFBDF81010628809207A +:101B6000914252D3BDF80C10E28891424DD3BDF89A +:101B70001210BDF80E2023891144A2881A44914204 +:101B800043D39DF80010019D4FF00008012640F658 +:101B9000480041B185F8B761019991F8F81105F550 +:101BA000DB7541B91AE085F82561019991F84A1170 +:101BB00005F5927509B13A2724E0E18869806188CA +:101BC000E9802189814200D30146A980A188814210 +:101BD00000D208462881012201990FE0E18869803E +:101BE0006188E9802189814200D30146A980A188CA +:101BF000814200D208462881019900222846FFF739 +:101C00000BFF2E7085F80180384606B044E67BE76E +:101C100070B504460CF0FCFDB0B12078182811D145 +:101C2000207901280ED1E088062102F03FF9040056 +:101C300008D0208807F010FC2088062102F048F91F +:101C400000B1FFDF012070BDF74D28780028FAD0E1 +:101C5000002666701420207020223146201DFCF7DB +:101C600016FC022020712E70ECE710B50446FCF73C +:101C7000DBFC002813D0207817280FD1207968B119 +:101C8000E088072102F012F940B1008807F0E4FB78 +:101C9000E088072102F01CF900B1FFDF012010BD30 +:101CA0002DE9F0475FEA000800D1FFDFDE4802219E +:101CB0001A308146FFF7E4FC00B1FFDFDA4C062062 +:101CC000678B02F09BF80546072002F097F828443E +:101CD000C5B2681CC6B2608BB04203D14046FFF764 +:101CE000C4FF58B9608BA84203D14046FFF790FF6C +:101CF00020B9608B4146FFF725FC38B1404601F022 +:101D000003FA0028E7D10120BDE8F0870221484608 +:101D1000FFF7B6FC10B9608BB842DCD14046BDE895 +:101D2000F04712F0C1BA10B501F053F908B10C2018 +:101D300010BD0BF07DFC002010BD10B504460078EE +:101D400018B1012801D0122010BD01F053F920B1C3 +:101D50000BF0C0FD08B10C2010BD207801F013F984 +:101D6000E21D04F11703611CBDE810400BF0DABC62 +:101D700010B5044601F02DF908B10C2010BD2078F3 +:101D800028B1012803D0FF280BD0122010BD01F08C +:101D9000FAF8611C0BF00CFC08B1002010BD072004 +:101DA00010BD01200BF03EFCF7E710B50BF095FDE0 +:101DB00008B1002010BD302010BD10B5044601F060 +:101DC00019F908B10C2010BD20460BF080FD002051 +:101DD00010BD10B501F00EF920B10BF07BFD08B17C +:101DE0000C2010BD0BF0F6FC002010BDFF2181700F +:101DF0004FF6FF7181808D4949680A7882718A881F +:101E000002814988418101214170002070477CB5E1 +:101E10000025022A19D015DC12F10C0F15D009DCAF +:101E200012F1280F11D012F1140F0ED012F1100F71 +:101E300011D10AE012F1080F07D012F1040F04D0FB +:101E40004AB902E0D31E052B05D8012806D0022886 +:101E500008D003280AD0122528467CBD1046FDF77D +:101E600013F8F9E710460CF06BFEF5E70846144648 +:101E70006946FFF751FB08B10225EDE79DF8000028 +:101E80000198002580F86740E6E710B51346012267 +:101E9000FEF7EAFF002010BD10B5044610F02FFA3F +:101EA000052804D020460FF029FC002010BD0C208E +:101EB00010BD10B5044601F09DF808B10C2010BD0E +:101EC0002146002007F037FB002010BD10B5044666 +:101ED0000FF0A3FC50B108F0A6FD38B1207808F04F +:101EE00029FB20780DF04DF9002010BD0C2010BD0D +:101EF00010B5044601F07EF808B10C2010BD214653 +:101F0000012007F018FB002010BD38B504464FF63D +:101F1000FF70ADF80000A079E179884216D02079F1 +:101F2000FCF7E3FA90B16079FCF7DFFA70B10022B8 +:101F3000A079114612F0A0FD40B90022E0791146C7 +:101F400012F09AFD10B9207A072801D9122038BD65 +:101F500008F076FD60B910F0D2F948B90021684662 +:101F6000FFF78EFB20B1204606F044F9002038BD73 +:101F70000C2038BD2DE9FC41817805461A2925D071 +:101F80000EDC16292ED2DFE801F02D2D2D2D2D216E +:101F90002D2D2D2D2D2D2D2D2D2D2D2D2D21212195 +:101FA0002A291FD00BDCA1F11E010C291AD2DFE86F +:101FB00001F019191919191919191919190D3A399D +:101FC00004290FD2DFE801F00E020E022888B0F5D6 +:101FD000706F07D201276946FFF79EFA20B10220F1 +:101FE000BDE8FC811220FBE79DF8000000F0D2FF65 +:101FF000019C10B104F58A7401E004F5C6749DF8E3 +:10200000000000F0C7FF019E10B106F2151601E0B6 +:1020100006F28D166846FFF76DFA08B1207838B1E0 +:102020000C20DDE70C620200180800207800002078 +:102030002770A8783070684601F030F80020CFE7AC +:102040007CB50D466946FFF767FA002618B12E6089 +:102050002E7102207CBD9DF8000000F09BFF019CCA +:102060009DF80000703400F095FF019884F84260FC +:1020700081682960017B297194F842100029F5D10B +:1020800000207CBD10B5044600F0B4FF20B10BF079 +:1020900021FC08B10C2010BD207800F074FFE2791B +:1020A000611C0BF093FD08B1002010BD022010BD93 +:1020B00010B5886E60B1002241F8682F0120CA7106 +:1020C0008979884012F0CCFC002800D01F2010BD78 +:1020D0000C2010BD1CB50C466946FFF71DFA002800 +:1020E00009D19DF8000000280198B0F8700000D0D8 +:1020F000401C208000201CBD1CB504460088694699 +:10210000FFF70AFA08B102201CBD606828B1DDE9BA +:102110000001224601F04CF81CBDDDE90001FFF78B +:10212000C7FF1CBD70B51C460D4618B1012801D073 +:10213000122070BD1946104601F078F830B12146E2 +:10214000284601F07DF808B1002070BD302070BD38 +:1021500070B5044600780E46012804D018B1022854 +:1021600001D0032840D1607828B1012803D002288B +:1021700001D0032838D1E07B10B9A078012833D1F1 +:10218000A07830F005012FD110F0050F2CD0628916 +:10219000E188E0783346FFF7C5FF002825D1A07815 +:1021A00005281DD16589A289218920793346FFF749 +:1021B000B9FF002819D1012004EB40014A891544D8 +:1021C0002218D378927893420ED1CA8889888A429D +:1021D0000AD1401CC0B20228EED3E088A84203D343 +:1021E000A07B08B1072801D9122070BD002070BD66 +:1021F00010B586B0044600F0E1FE10B10C2006B028 +:1022000010BD022104F10A0001F02FF8A0788DF82A +:102210000800A0788DF8000060788DF80400207820 +:102220008DF80300A07B8DF80500E07B00B1012054 +:102230008DF80600A078C10717D0E07801F00CF8FF +:102240008DF80100E088ADF80A006089ADF80C0057 +:10225000A078400716D5207900F0FEFF8DF8020027 +:102260002089ADF80E00A0890AE040070AD5E07881 +:1022700000F0F2FF8DF80200E088ADF80E006089F2 +:10228000ADF8100002A80FF0D4FA0028B7D16846C4 +:102290000CF07CFFB3E710B504460121FFF758FFAF +:1022A000002803D12046BDE81040A1E710BD027808 +:1022B000012A01D0BAB118E042783AB1012A05D01A +:1022C000022A12D189B1818879B100E059B14188DF +:1022D00049B1808838B101EB8101490000EB8000F1 +:1022E000B1EB002F01D2002070471220704770B56B +:1022F000044600780D46012809D010F000F80528A2 +:1023000003D00FF0A6F9002800D00C2070BD0CF00F +:102310000AFE88B10CF01CFE0CF018FF0028F5D165 +:1023200025B160780CF0ACFE0028EFD1A188608860 +:10233000BDE870400FF0A3BA122070BD10B504467E +:102340000121FFF7B4FF002804D12046BDE810406A +:102350000121CCE710BDF0B5871FDDE9056540F62A +:102360007B44A74213D28F1FA74210D288420ED8B7 +:10237000B2F5FA7F0BD2A3F10A00241FA04206D2C5 +:10238000521C4A43B2EB830F01DAAE4201D900205E +:10239000F0BD0120F0BD2DE9FC47477A894604468F +:1023A00017F0050F7ED0F8087CD194F83A0008B9F0 +:1023B000012F77D10025A8462E46F90789F0010A9A +:1023C00019D0208A514600F031FFE8B360895146A8 +:1023D00000F036FFC0B3208A6189884262D8A18E9E +:1023E000E08DCDE90001238D628CA18BE08AFFF79F +:1023F000B2FF48B30125B8070ED504EB4500828E25 +:10240000C18DCDE90012038D428C818BC08AFFF70C +:10241000A2FFC8B1A8466D1C78071ED504EB45067F +:102420005146308A00F002FF70B17089514600F0C9 +:1024300007FF48B1308A7189884253D8B18EF08D38 +:10244000CDE90001338D00E00BE0728CB18BF08A96 +:10245000FFF781FF28B12E466D1CB9F1000F03D0A4 +:1024600030E03020BDE8FC87F80707D0780705D5B5 +:1024700004EB460160894989884233D1228A0121CF +:102480001BE0414503D004EB4100008A024404EB09 +:102490004100C38A868AB34224D1838B468BB342E0 +:1024A00020D100E01EE0438C068CB3421AD1038D8C +:1024B000C08C834216D1491CC9B2A942E1D36089BC +:1024C00090420FD3207810B101280BD102E0A07800 +:1024D0000028F9D1607838B1012805D0022803D04E +:1024E000032801D01220BDE70020BBE7002152E7FE +:1024F0000178C90702D0406811F0A9BE11F076BE7C +:1025000010B50078012800D00020FCF7B8FC0020AE +:1025100010BD2DE9F0478EB00D46AFF6A422D2E9EA +:102520000092014690462846FFF735FF06000CD181 +:1025300000F044FD40B9FE4F387828B90CF0B2F9EC +:10254000A0F57F41FF3903D00C200EB0BDE8F08725 +:10255000032105F1100000F088FEF54809AA3E3875 +:102560000990F4480A90F248062110380B900CA804 +:1025700001F06AFC040037D00021FEF77CF904F179 +:1025800030017B8ABA8ACB830A84797C0091BA466F +:102590003B7CBA8A798A208801F044FD00B1FFDFD4 +:1025A000208806F058FF218804F10E0000F02CFD71 +:1025B000E1A004F1120700680590032105A804F0CA +:1025C0006DFF002005A90A5C3A54401CC0B20328E4 +:1025D000F9D3A88B6080688CA080288DE080687A11 +:1025E000410703D508270AE00920AEE7C10701D05B +:1025F000012704E0800701D5022700E000273A46C2 +:10260000BAF8160011460FF0CFF90146A062204635 +:102610000FF0D8F93A4621460020FEF7AEFD00B98A +:102620000926C34A21461C320020FEF7C3FD0027BD +:1026300084F8767084F87770A87800F0A4FC60764F +:10264000D5F80300C4F81A00B5F80700E083C4F811 +:10265000089084F80C80012084F8200101468DF850 +:102660000070684604F01AFF9DF8000000F00701B2 +:10267000C0F3C1021144C0F3401008448DF80000BB +:10268000401D2076092801D20830207601212046FD +:10269000FEF7F1F868780CF051FCEEBBA9782878C9 +:1026A000EA1C0CF01EFC48B10CF052FCA97828780A +:1026B000EA1C0CF0BFFC060002D052E0122650E0EB +:1026C000687A00F005010020CA0700D001208A07BF +:1026D00001D540F00200490701D540F008000CF098 +:1026E000E9FB06003DD1214603200CF0CDFC06009D +:1026F00037D10CF0D2FC060033D1697A01F0050124 +:102700008DF80810697AC90708D06889ADF80A0001 +:10271000288AADF80C0000E023E00120697A8A07DE +:1027200000D5401C490707D505EB40004189ADF8AD +:102730000E10008AADF8100002A80FF07AF80646D5 +:1027400095F83A0000B101200CF0C6FB4EB90CF030 +:10275000FDFC060005D1A98F20460FF00BF80600FE +:1027600008D0208806F078FE2088062101F0B0FB12 +:1027700000B1FFDF3046E8E601460020C9E638B583 +:102780006B48007878B90FF0BAFD052805D00CF039 +:1027900089F8A0F57F41FF3905D068460FF0B3F8FE +:1027A000040002D00CE00C2038BD0098008806F030 +:1027B00053FE00980621008801F08AFB00B1FFDF7C +:1027C000204638BD1CB582894189CDE900120389B4 +:1027D000C28881884088FFF7BEFD08B100201CBD7B +:1027E00030201CBD70B50546FFF7ECFF00280ED168 +:1027F0002888062101F05AFB040007D000F042FCB3 +:1028000020B1D4F81801017831B901E0022070BD7F +:10281000D4F86411097809B13A2070BD052181719D +:10282000D4F8181100200881D4F81811A88848811C +:10283000D4F81811E8888881D4F818112889C8813B +:10284000D4F81801028941898A4204D88279082A79 +:1028500001D88A4201D3122070BD29884180D4F862 +:10286000181102200870002070BD3EB50446FEF726 +:1028700075FAB0B12E480125A0F1400245702368D9 +:1028800042F8423F237900211371417069460620C6 +:1028900001F095FA00B1FFDF684601F06EFA10B161 +:1028A0000EE012203EBDBDF80440029880F8205191 +:1028B000684601F062FA18B9BDF80400A042F4D1EC +:1028C00000203EBD70B505460088062101F0EEFAF5 +:1028D000040007D000F0D6FB20B1D4F81811087816 +:1028E00030B901E0022070BDD4F86401007808B16D +:1028F0003A2070BDB020005D10F0010F22D0D5F855 +:1029000002004860D5F806008860D4F8180169898B +:1029100010228181D4F8180105F10C010E3004F564 +:102920008C74FBF78AFD216803200870288805E075 +:1029300018080020840000201122330021684880FC +:10294000002070BD0C2070BD38B504460078EF281B +:102950004DD86088ADF80000009800F097FC88B36F +:102960006188080708D4D4E9012082423FD8202A90 +:102970003DD3B0F5804F3AD8207B18B3072836D81E +:10298000607B28B1012803D0022801D003282ED172 +:102990004A0703D4022801D0032805D1A07B08B13F +:1029A000012824D1480707D4607D28B1012803D02D +:1029B000022801D003281AD1C806E07D03D50128DA +:1029C00015D110E013E0012801D003280FD1C8066B +:1029D00009D4607E012803D0022801D0032806D143 +:1029E000A07E0F2803D8E07E18B1012801D0122064 +:1029F00038BD002038BDF8B514460D46064608F02F +:102A00001FF808B10C20F8BD3046FFF79DFF0028E5 +:102A1000F9D1FCF73EFA2870B07554B9FF208DF853 +:102A2000000069460020FCF71EFA69460020FCF70A +:102A30000EFA3046BDE8F840FCF752B90022DAE75A +:102A40000078C10801D012207047FA4981F82000AF +:102A50000020704710B504460078C00704D1608894 +:102A600010B1FCF7D7F980B12078618800F001023D +:102A7000607800F02FFC002806D1FCF7B3F901467E +:102A80006088884203D9072010BD122010BD6168FC +:102A9000FCF7E9F9002010BD10B504460078C00726 +:102AA00004D1608810B1FBF78AFE70B1207861888C +:102AB00000F00102607800F00DFC002804D160886D +:102AC0006168FCF7C4F9002010BD122010BD7CB570 +:102AD000044640784225012808D8A078FBF767FE15 +:102AE00020B120781225012802D090B128467CBD63 +:102AF000FCF7DBF920B1A0880028F7D08028F5D8B2 +:102B0000FCF7DAF960B160780028EFD0207801286E +:102B100008D006F0C3FD044607F05DFC00287FD016 +:102B20000C207CBDFBF7F5FF10B9FCF7B7F990B3AB +:102B300007F086FF0028F3D1FBF700FEA0F57F41E8 +:102B4000FF39EDD1FCF707F8A68842F21070464332 +:102B5000A079FCF770F9FBF739FEF8B100220721E4 +:102B600001A801F071F9040058D0B3480021846035 +:102B70002046FDF72DFD2046FCF732FDAD4D04F15A +:102B800030006A8AA98AC2830184FBF726FE60B1FD +:102B9000E88A01210DE0FFE712207CBD31460020CC +:102BA00007F0CBFC88B3FFDF44E0FCF787F9014670 +:102BB000E88A07F091FD0146A0620022204606F057 +:102BC00070FDFBF70AFE38B9FCF778F9024621469A +:102BD0000120FEF7D2FAD0B1964A21461C320120DC +:102BE000FEF7E8FA687C00902B7CAA8A698A208824 +:102BF00001F018FA00B1FFDF208806F02CFC314606 +:102C0000204607F09AFC00B1FFDF13E008E007213F +:102C1000BDF8040001F05CF900B1FFDF09207CBDC4 +:102C200044B1208806F018FC2088072101F050F9F3 +:102C300000B1FFDF00207CBD002148E770B50D46E4 +:102C4000072101F033F9040003D094F88F0110B18B +:102C50000AE0022070BD94F87D00142801D01528E8 +:102C600002D194F8DC0108B10C2070BD1022294675 +:102C700004F5C870FBF7E1FB012084F88F01002008 +:102C800070BD10B5072101F011F918B190F88F113E +:102C900011B107E0022010BD90F87D10142903D077 +:102CA000152901D00C2010BD022180F88F110020C1 +:102CB00010BD2DE9FC410C464BF6803212219442A6 +:102CC0001DD8E4B16946FEF727FC002815D19DF810 +:102CD000000000F05FF9019E9DF80000703600F0E2 +:102CE00059F9019DAD1C2F88224639463046FDF723 +:102CF00065FC2888B842F6D10020BDE8FC81084672 +:102D0000FBE77CB5044600886946FEF705FC002811 +:102D100010D19DF8000000F03DF9019D9DF80000E4 +:102D2000703500F037F90198A27890F82C10914294 +:102D300001D10C207CBD7F212972A9720021E9728A +:102D4000E17880F82D10217980F82E10A17880F894 +:102D50002C1000207CBD1CB50C466946FEF7DCFB40 +:102D600000280AD19DF8000000F014F9019890F8AD +:102D70008C0000B10120207000201CBD7CB50D46E8 +:102D800014466946FEF7C8FB002809D19DF80000EB +:102D900000F000F9019890F82C00012801D00C20D7 +:102DA0007CBD9DF8000000F0F5F8019890F87810CF +:102DB000297090F87900207000207CBD70B50D4618 +:102DC0001646072101F072F818B381880124C388E0 +:102DD000428804EB4104AC4217D842F210746343BA +:102DE000A4106243B3FBF2F2521E94B24FF4FA7293 +:102DF000944200D91446A54200D22C46491C641CBA +:102E0000B4FBF1F24A43521E91B290F8C8211AB9AC +:102E100001E0022070BD01843180002070BD10B53A +:102E20000C46072101F042F840B1022C08D91220CB +:102E300010BD000018080020780000200220F7E7ED +:102E400014F0010180F8FD10C4F3400280F8FC206A +:102E500004D090F8FA1009B107F054FC0020E7E71D +:102E6000017889B1417879B141881B290CD38188D7 +:102E70001B2909D3C188022906D3F64902680A65CD +:102E800040684865002070471220704710B504461E +:102E90000EF086FD204607F0D8FB0020C8E710B5ED +:102EA00007F0D6FB0020C3E72DE9F04115460F4699 +:102EB00006460122114638460EF076FD04460121F1 +:102EC000384607F009FC844200D20446012130460E +:102ED00000F065F806460121002000F060F8311886 +:102EE000012096318C4206D901F19600611AB1FB9E +:102EF000F0F0401C80B228800020BDE8F08110B5C1 +:102F0000044600F077F808B10C2091E7601C0AF045 +:102F100038FE207800F00100FBF718FE207800F062 +:102F200001000CF010F8002082E710B504460720DD +:102F300000F056FF08B10C207AE72078C00711D0C6 +:102F400000226078114611F097FD08B112206FE75A +:102F5000A06809F01DFB6078D4F8041009F021FB8B +:102F6000002065E7002009F013FB00210846F5E783 +:102F700010B505F036FE00205AE710B5006805F0E0 +:102F800084F8002054E718B1022801D001207047CE +:102F90000020704708B1002070470120704710B52D +:102FA000012904D0022905D0FFDF204640E7C000F8 +:102FB000503001E080002C3084B2F6E710B50FF0FD +:102FC0009EF9042803D0052801D0002030E7012015 +:102FD0002EE710B5FFF7F2FF10B10CF07BF828B91F +:102FE00007F02EFD20B1FBF78CFD08B101201FE793 +:102FF00000201DE710B5FFF7E1FF18B907F020FD2D +:10300000002800D0012013E72DE9FE4300250F46DC +:1030100080460A260421404604F069FA4046FDF73E +:103020003EFE062000F0EAFE044616E06946062051 +:1030300000F0C5FE0BE000BFBDF80400B84206D0AA +:103040000298042241460E30FBF7CAF950B1684697 +:1030500000F093FE0500EFD0641E002C06DD002D6D +:10306000E4D005E04046FDF723FEF5E705B9FFDFB4 +:10307000D8F80000FDF737FE761E01D00028C9D031 +:10308000BDE8FE8390F8F01090F88C0020B919B1DB +:10309000042901D0012070470020704701780029E1 +:1030A0000AD0416891F8FA20002A05D0002281F860 +:1030B000FA20406807F026BB704770B514460546F5 +:1030C000012200F01BF9002806D121462846BDE860 +:1030D0007040002200F012B970BDFB2802D8B1F593 +:1030E000296F01D911207047002070471B38E12853 +:1030F00006D2B1F5A47F03D344F29020814201D9D6 +:1031000012207047002070471FB55249403191F896 +:103110002010CA0702D102781D2A0AD08A0702D4D9 +:1031200002781C2A28D049073DD40178152937D0C8 +:1031300039E08088ADF8000002A9FEF7EDF900B192 +:10314000FFDF9DF80800FFF725FF039810F8601FC8 +:103150008DF8021040788DF803000020ADF80400CF +:1031600001B9FFDF9DF8030000B9FFDF6846FEF7F5 +:1031700040FCD8B1FFDF19E08088ADF800004FF4C3 +:103180002961FB20ADF80410ADF80200ADF806008F +:10319000ADF808106846FEF73AFD38B1FFDF05E0EC +:1031A000807BC00702D0002004B041E60120FBE78D +:1031B000F8B50746508915460C4640B1B0F5004FAA +:1031C00005D20022A878114611F056FC08B1122051 +:1031D000F8BDA06E04F1700630B1A97894F86E00C5 +:1031E000814201D00C20F8BD012184F86F10A9782C +:1031F00084F86E106968A1666989A4F86C10288942 +:10320000B084002184F86F1028886946FEF762FFB9 +:10321000B08CBDF80010081A00B2002804DD214669 +:103220003846FEF745FFDDE70020F8BD042803D34C +:1032300021B9B0F5804F01D90020704701207047B7 +:10324000042803D321B9B0F5804F01D9002070477D +:1032500001207047D8070020012802D018B10020B3 +:103260007047022070470120704710B500224FF4CC +:10327000C84408E030F81230A34200D9234620F8B1 +:103280001230521CD2B28A42F4D3D1E580B2C106C8 +:103290000BD401071CD481064FEAC07101D5B9B91E +:1032A00000E099B1800713D410E0410610D48106E4 +:1032B0000ED4C1074FEA807104D0002902DB400719 +:1032C00004D405E0010703D4400701D4012070476E +:1032D0000020704770B50C460546FF2904D8FBF75F +:1032E0007CFA18B11F2C01D9122070BD2846FBF7BB +:1032F0005EFA08B1002070BD422070BD0AB1012203 +:1033000000E00222024202D1C80802D109B1002025 +:10331000704711207047000030B5058825F400443F +:1033200021448CB24FF4004194420AD2121B92B253 +:103330001B339A4201D2A94307E005F4004121431F +:1033400003E0A21A92B2A9431143018030BD0844A0 +:10335000083050434A31084480B2704770B51D466A +:1033600016460B46044629463046049AFFF7EFFFFF +:103370000646B34200D2FFDF282200212046FBF799 +:1033800086F84FF6FF70A082283EB0B26577608065 +:10339000B0F5004F00D9FFDF618805F13C008142A4 +:1033A00000D2FFDF60880835401B343880B22080AF +:1033B0001B2800D21B2020800020A07770BD8161D7 +:1033C000886170472DE9F05F0D46C188044600F121 +:1033D0002809008921F4004620F4004800F063FB2E +:1033E00010B10020BDE8F09F4FF0000A4FF0010B34 +:1033F000B0450CD9617FA8EB0600401A0838854219 +:1034000019DC09EB06000021058041801AE0608884 +:10341000617F801B471A083F0DD41B2F00DAFFDFA6 +:10342000BD4201DC294600E0B9B2681A0204120C60 +:1034300004D0424502DD84F817A0D2E709EB06006C +:103440000180428084F817B0CCE770B5044600F1E3 +:103450002802C088E37D20F400402BB1104402888C +:10346000438813448B4201D2002070BD00258A425C +:1034700002D30180458008E0891A0904090C4180C3 +:1034800003D0A01D00F01FFB08E0637F0088083315 +:10349000184481B26288A01DFFF73EFFE575012048 +:1034A00070BD70B5034600F12804C588808820F4FB +:1034B00000462644A84202D10020188270BD988997 +:1034C0003588A84206D3401B75882D1A2044ADB21A +:1034D000C01E05E02C1AA5B25C7F20443044401D7C +:1034E0000C88AC4200D90D809C8924B10024147052 +:1034F0000988198270BD0124F9E770B5044600F10E +:103500002801808820F400404518208A002825D012 +:10351000A189084480B2A08129886A881144814227 +:1035200000D2FFDF2888698800260844A1898842E4 +:1035300012D1A069807F2871698819B1201D00F01F +:10354000C2FA08E0637F28880833184481B2628891 +:10355000201DFFF7E1FEA6812682012070BD2DE926 +:10356000F041418987880026044600F12805B942C8 +:1035700019D004F10A0800BF21F400402844418812 +:1035800019B1404600F09FFA08E0637F00880833D5 +:10359000184481B262884046FFF7BEFE761C6189FE +:1035A000B6B2B942E8D13046BDE8F0812DE9F0412C +:1035B00004460B4627892830A68827F40041B4F832 +:1035C0000A8001440D46B74201D10020ECE70AB160 +:1035D000481D106023B1627F691D1846FAF72DFF60 +:1035E0002E88698804F1080021B18A1996B200F08A +:1035F0006AFA06E0637F62880833991989B2FFF797 +:103600008BFE474501D1208960813046CCE7818817 +:10361000C088814201D10120704700207047018994 +:103620008088814201D1012070470020704770B529 +:103630008588C38800F1280425F4004223F4004162 +:1036400014449D421AD08389058A5E1925886388AF +:10365000EC18A64214D313B18B4211D30EE0437F72 +:1036600008325C192244408892B2801A80B2233317 +:10367000984201D211B103E08A4201D1002070BD0D +:10368000012070BD2DE9F0478846C18804460089B5 +:1036900021F4004604F1280720F4004507EB060951 +:1036A00000F001FA002178BBB54204D9627FA81B63 +:1036B000801A002503E06088627F801B801A08382A +:1036C00023D4E28962B1B9F80020B9F802303BB1E5 +:1036D000E81A2177404518DBE0893844801A09E070 +:1036E000801A217740450ADB607FE1890830304449 +:1036F00039440844C01EA4F81280BDE8F08745454F +:1037000003DB01202077E7E7FFE761820020F4E791 +:103710002DE9F74F044600F12805C088884620F4BB +:10372000004A608A05EB0A0608B1404502D2002033 +:10373000BDE8FE8FE08978B13788B6F8029007EBD4 +:103740000901884200D0FFDF207F4FF0000B50EAD4 +:10375000090106D088B33BE00027A07FB94630714D +:10376000F2E7E18959B1607F2944083050440844A8 +:10377000B4F81F1020F8031D94F821108170E2891D +:1037800007EB080002EB0801E1813080A6F802B0E7 +:1037900002985F4650B1637F30880833184481B285 +:1037A0006288A01DFFF7B8FDE78121E0607FE18915 +:1037B00008305044294408442DE0FFE7E089B4F87C +:1037C0001F102844C01B20F8031D94F8211081709D +:1037D00009EB0800E28981B202EB0800E081378042 +:1037E00071800298A0B1A01D00F06DF9A4F80EB090 +:1037F000A07F401CA077A07D08B1E088A08284F85B +:1038000016B000BFA4F812B084F817B001208FE7FB +:10381000E0892844C01B30F8031DA4F81F108078ED +:1038200084F82100EEE710B5818800F1280321F427 +:1038300000442344848AC288A14212D0914210D00D +:10384000818971B9826972B11046FFF7E8FE50B9FB +:103850001089283220F400401044197900798842F8 +:1038600001D1002010BD184610BD00F12803407F93 +:1038700008300844C01E1060088808B9DB1E1360B9 +:1038800008884988084480B270472DE9F04100F16A +:103890002806407F1C4608309046431808884D880B +:1038A000069ADB1EA0B1C01C80B2904214D9801AC7 +:1038B000A04200DB204687B298183A464146FAF704 +:1038C0008FFD002816D1E01B84B2B844002005E02B +:1038D000ED1CADB2F61EE8E7101A80B20119A9423C +:1038E00006D8304422464146BDE8F041FAF778BD9B +:1038F0004FF0FF3058E62DE9F04100F12804407FF9 +:103900001E46083090464318002508884F88069ABE +:10391000DB1E90B1C01C80B2904212D9801AB04216 +:1039200000DB304685B299182A464046FAF785FDF5 +:10393000701B86B2A844002005E0FF1CBFB2E41E45 +:10394000EAE7101A80B28119B94206D82118324626 +:103950004046FAF772FDA81985B2284624E62DE9FB +:10396000F04100F12804407F1E460830904643187D +:10397000002508884F88069ADB1E90B1C01C80B2D3 +:10398000904212D9801AB04200DB304685B29818B6 +:103990002A464146FAF751FD701B86B2A844002022 +:1039A00005E0FF1CBFB2E41EEAE7101A80B28119DD +:1039B000B94206D8204432464146FAF73EFDA819DE +:1039C00085B22846F0E5401D704710B5044600F169 +:1039D0002801C288808820F400431944904206D010 +:1039E000A28922B9228A12B9A28A904201D100206A +:1039F00010BD0888498831B1201D00F064F800200E +:103A00002082012010BD637F62880833184481B290 +:103A1000201DFFF781FCF2E70021C181017741827F +:103A2000C1758175704703881380C28942B1C2880D +:103A300022F4004300F128021A440A60C08970474A +:103A40000020704710B50446808AA0F57F41FF39F9 +:103A500000D0FFDFE088A082E08900B10120A075DE +:103A600010BD4FF6FF71818200218175704710B53E +:103A70000446808AA0F57F41FF3900D1FFDFA07D99 +:103A800028B9A088A18A884201D1002010BD012058 +:103A900010BD8188828A914201D1807D08B10020C9 +:103AA00070470120704720F4004221F400439A42FD +:103AB00007D100F4004001F40041884201D0012008 +:103AC00070470020704730B5044600880D4620F44A +:103AD0000040A84200D2FFDF21884FF40040884315 +:103AE0002843208030BD70B50C00054609D0082C55 +:103AF00000D2FFDF1DB1A1B2286800F044F8201DFC +:103B000070BD0DB100202860002070BD002102684A +:103B100003E093881268194489B2002AF9D100F0B1 +:103B200032B870B500260D460446082900D2FFDFE2 +:103B3000206808B91EE0044620688188A94202D0A6 +:103B400001680029F7D181880646A94201D10068A1 +:103B50000DE005F1080293B20022994209D32844EE +:103B6000491B026081802168096821600160206032 +:103B700000E00026304670BD00230B608A8002689A +:103B80000A600160704700234360021D01810260EA +:103B90007047F0B50F460188408815460C181E4640 +:103BA000AC4200D3641B3044A84200D9FFDFA01907 +:103BB000A84200D9FFDF3819F0BD2DE9F041884651 +:103BC00006460188408815460C181F46AC4200D3B3 +:103BD000641B3844A84200D9FFDFE019A84200D98D +:103BE000FFDF70883844708008EB0400BDE8F08186 +:103BF0002DE9F041054600881E461746841B88467D +:103C0000BC4200D33C442C8068883044B84200D980 +:103C1000FFDFA019B84200D9FFDF68883044688010 +:103C200008EB0400E2E72DE9F04106881D46044652 +:103C3000701980B2174688462080B84201D3C01B55 +:103C400020806088A84200D2FFDF7019B84200D9F6 +:103C5000FFDF6088401B608008EB0600C6E730B5D8 +:103C60000D460188CC18944200D3A41A408898428B +:103C700000D8FFDF281930BD2DE9F041C84D0446BA +:103C80009046A8780E46A04200D8FFDF05EB8607D5 +:103C9000B86A50F8240000B1FFDFB868002816D0D9 +:103CA000304600F044F90146B868FFF73AFF0500D6 +:103CB0000CD0B86A082E40F8245000D3FFDFB94872 +:103CC0004246294650F82630204698472846BDE807 +:103CD000F0812DE9F8431E468C1991460F460546A2 +:103CE000FF2C00D9FFDFB14500D9FFDFE4B200951A +:103CF0004DB300208046E81C20F00300A84200D00D +:103D0000FFDF4946DFF89892684689F8001089F885 +:103D1000017089F8024089F8034089F8044089F865 +:103D2000054089F8066089F80770414600F008F9F7 +:103D3000002142460F464B460098C01C20F003006D +:103D4000009012B10EE00120D4E703EB8106B062CF +:103D5000002005E0D6F828C04CF82070401CC0B206 +:103D6000A042F7D30098491C00EB8400C9B2009030 +:103D70000829E1D3401BBDE8F88310B50446EDF7F0 +:103D80008EFA08B1102010BD2078854A618802EBB8 +:103D9000800092780EE0836A53F8213043B14A1CC8 +:103DA0006280A180806A50F82100A060002010BDD0 +:103DB000491C89B28A42EED86180052010BD70B5D9 +:103DC00005460C460846EDF76AFA08B1102070BDAA +:103DD000082D01D3072070BD25700020608070BDC4 +:103DE0000EB56946FFF7EBFF00B1FFDF6846FFF74E +:103DF000C4FF08B100200EBD01200EBD10B5044661 +:103E0000082800D3FFDF6648005D10BD3EB50546BB +:103E100000246946FFF7D3FF18B1FFDF01E0641CFF +:103E2000E4B26846FFF7A9FF0028F8D02846FFF75C +:103E3000E5FF001BC0B23EBD59498978814201D9D6 +:103E4000C0B27047FF2070472DE9F041544B06295E +:103E500003D007291CD19D7900E0002500244FF6EE +:103E6000FF7603EB810713F801C00AE06319D7F866 +:103E700028E09BB25EF823E0BEF1000F04D0641C82 +:103E8000A4B2A445F2D8334603801846B34201D108 +:103E900000201CE7BDE8F041EEE6A0F57F43FF3BC4 +:103EA00001D0082901D300207047E5E6A0F57F4244 +:103EB000FF3A0BD0082909D2394A9378834205D9B1 +:103EC00002EB8101896A51F8200070470020704799 +:103ED0002DE9F04104460D46A4F57F4143F202006E +:103EE000FF3902D0082D01D30720F0E62C494FF00E +:103EF00000088A78A242F8D901EB8506B26A52F826 +:103F00002470002FF1D027483946203050F8252062 +:103F100020469047B16A284641F8248000F007F80F +:103F200002463946B068FFF727FE0020CFE61D495C +:103F3000403131F810004FF6FC71C01C084070474A +:103F40002DE9F843164E8846054600242868C01C13 +:103F500020F0030028602046FFF7E9FF315D484369 +:103F6000B8F1000F01D0002200E02A68014600925B +:103F700032B100274FEA0D00FFF7B5FD1FB106E093 +:103F800001270020F8E706EB8401009A8A6029687F +:103F9000641C0844E4B22860082CD7D3EBE6000088 +:103FA0003C0800201862020070B50E461D461146FE +:103FB00000F0D3F804462946304600F0D7F82044F4 +:103FC000001D70BD2DE9F04190460D4604004FF0F4 +:103FD000000610D00027E01C20F00300A04200D013 +:103FE000FFDFE5B141460020FFF77DFD0C3000EB1F +:103FF000850617B113E00127EDE7614F04F10C00CE +:10400000AA003C602572606000EB85002060002102 +:104010006068FAF73CFA41463868FFF764FD3046BD +:10402000BDE8F0812DE9FF4F554C804681B02068F6 +:104030009A46934600B9FFDF2068027A424503D9C9 +:10404000416851F8280020B143F2020005B0BDE8F4 +:10405000F08F5146029800F080F886B258460E99CB +:1040600000F084F885B27019001D87B22068A1465F +:1040700039460068FFF755FD04001FD06780258092 +:104080002946201D0E9D07465A4601230095FFF73D +:1040900065F92088314638440123029ACDF800A002 +:1040A000FFF75CF92088C1193846FFF788F9D9F87D +:1040B00000004168002041F82840C7E70420C5E718 +:1040C00070B52F4C0546206800B9FFDF2068017AE3 +:1040D000A9420DD9426852F8251049B1002342F88F +:1040E00025304A880068FFF747FD2168087A06E016 +:1040F00043F2020070BD4A6852F820202AB9401EDF +:10410000C0B2F8D20868FFF701FD002070BD70B59D +:104110001B4E05460024306800B9FFDF3068017A85 +:10412000A94204D9406850F8250000B1041D20467A +:1041300070BD70B5124E05460024306800B9FFDF2F +:104140003068017AA94206D9406850F8251011B1AB +:1041500031F8040B4418204670BD10B50A46012101 +:10416000FFF7F5F8C01C20F0030010BD10B50A469B +:104170000121FFF7ECF8C01C20F0030010BD000087 +:104180008C00002070B50446C2F110052819FAF71A +:1041900054F915F0FF0109D0491ECAB28020A0547D +:1041A0002046BDE870400021FAF771B970BD30B506 +:1041B00005E05B1EDBB2CC5CD55C6C40C454002BCC +:1041C000F7D130BD10B5002409E00B78521E44EA47 +:1041D000430300F8013B11F8013BD2B2DC09002A8D +:1041E000F3D110BD2DE9F04389B01E46DDE9107909 +:1041F00090460D00044622D002460846F949FDF7D4 +:1042000044FE102221463846FFF7DCFFE07B000623 +:1042100006D5F44A3946102310320846FFF7C7FF87 +:10422000102239464846FFF7CDFFF87B000606D539 +:10423000EC4A4946102310320846FFF7B8FF102217 +:1042400000212046FAF723F90DE0103EB6B208EB44 +:104250000601102322466846FFF7A9FF224628469A +:104260006946FDF712FE102EEFD818D0F2B2414683 +:104270006846FFF787FF10234A46694604A8FFF700 +:1042800096FF1023224604A96846FFF790FF2246B6 +:1042900028466946FDF7F9FD09B0BDE8F083102313 +:1042A0003A464146EAE770B59CB01E4605461346BD +:1042B00020980C468DF80800202219460DF10900BF +:1042C000FAF7BBF8202221460DF12900FAF7B5F8DC +:1042D00017A913A8CDE90001412302AA31462846B7 +:1042E000FFF780FF1CB070BD2DE9FF4F9FB014AEEB +:1042F000DDE92D5410AFBB49CDE9007620232031F4 +:104300001AA8FFF76FFF4FF000088DF808804FF0F4 +:1043100001098DF8099054F8010FCDF80A00A08822 +:10432000ADF80E0014F8010C1022C0F340008DF817 +:10433000100055F8010FCDF81100A888ADF8150050 +:1043400015F8010C2C99C0F340008DF8170006A851 +:104350008246FAF772F80AA8834610222299FAF7E1 +:104360006CF8A0483523083802AA40688DF83C80D4 +:10437000CDE900760E901AA91F98FFF733FF8DF84C +:1043800008808DF809902068CDF80A00A088ADF863 +:104390000E0014F8010C1022C0F340008DF810003C +:1043A0002868CDF81100A888ADF8150015F8010CA3 +:1043B0002C99C0F340008DF817005046FAF73DF8ED +:1043C000584610222299FAF738F8864835230838DB +:1043D00002AA40688DF83C90CDE900760E901AA9AB +:1043E0002098FFF7FFFE23B0BDE8F08FF0B59BB03B +:1043F0000C460546DDE922101E461746DDE920324F +:10440000D0F801C0CDF808C0B0F805C0ADF80CC0B8 +:104410000078C0F340008DF80E00D1F80100CDF80F +:104420000F00B1F80500ADF8130008781946C0F385 +:1044300040008DF815001088ADF8160090788DF8C2 +:1044400018000DF119001022F9F7F7FF0DF12900FE +:1044500010223146F9F7F1FF0DF1390010223946EB +:10446000F9F7EBFF17A913A8CDE90001412302AA30 +:1044700021462846FFF7B6FE1BB0F0BDF0B5A3B04D +:1044800017460D4604461E46102202A82899F9F741 +:10449000D4FF06A820223946F9F7CFFF0EA8202224 +:1044A0002946F9F7CAFF1EA91AA8CDE90001502331 +:1044B00002AA314616A8FFF795FE1698206023B091 +:1044C000F0BDF0B589B00446DDE90E070D46397838 +:1044D000109EC1F340018DF8001031789446C1F36D +:1044E00040018DF801101968CDF802109988ADF8D7 +:1044F000061099798DF808100168CDF809108188A7 +:10450000ADF80D1080798DF80F0010236A466146D2 +:1045100004A8FFF74CFE2246284604A9FDF7B5FC87 +:10452000D6F801000090B6F80500ADF80400D7F801 +:104530000100CDF80600B7F80500ADF80A0000202C +:10454000039010236A46214604A8FFF730FE224656 +:10455000284604A9FDF799FC09B0F0BD1FB51C68F9 +:1045600000945B68019313680293526803920246B9 +:1045700008466946FDF789FC1FBD10B588B00446A2 +:104580001068049050680590002006900790084637 +:104590006A4604A9FDF779FCBDF80000208008B048 +:1045A00010BD1FB51288ADF800201A88ADF80220A2 +:1045B0000022019202920392024608466946FDF7E4 +:1045C00064FC1FBD7FB5074B14460546083B9A1C8B +:1045D0006846FFF7E6FF224669462846FFF7CDFF0B +:1045E0007FBD00007062020070B5044600780E4680 +:1045F000012813D0052802D0092813D10EE0A068A5 +:1046000061690578042003F059FA052D0AD0782352 +:1046100000220420616903F0A7F903E00420616926 +:1046200003F04CFA31462046BDE8704001F08AB8EC +:1046300010B500F12D03C2799C78411D144064F33C +:104640000102C271D2070DD04A795C7922404A71C9 +:104650000A791B791A400A718278C9788A4200D98E +:10466000817010BD00224A71F5E74178012900D020 +:104670000C21017070472DE9F04F93B04FF0000B03 +:104680000C690D468DF820B0097801260C201746DC +:104690004FF00D084FF0110A4FF008091B2975D291 +:1046A000DFE811F01B00C40207031F035E03710360 +:1046B000A303B803F9031A0462049504A204EF04E7 +:1046C0002D05370555056005F305360639066806DC +:1046D0008406FE062207EB06F00614B120781D289A +:1046E0002AD0D5F808805FEA08004FD001208DF865 +:1046F0002000686A02220D908DF824200A208DF88F +:104700002500A8690A90A8880028EED098F8001023 +:1047100091B10F2910D27DD2DFE801F07C1349DE80 +:10472000FCFBFAF9F8F738089CF6F50002282DD1C1 +:1047300024B120780C2801D00026F0E38DF8202049 +:10474000CBE10420696A03F0B9F9A8880728EED103 +:10475000204600F0F2FF022809D0204600F0EDFFCD +:10476000032807D9204600F0E8FF072802D20120DD +:10477000207004E0002CB8D020780128D7D198F818 +:104780000400C11F0A2902D30A2061E0C4E1A0701D +:10479000D8F80010E162B8F80410218698F80600F5 +:1047A00084F83200012028700320207044E007289C +:1047B000BDD1002C99D020780D28B8D198F80310DD +:1047C00094F82F20C1F3C000C2F3C002104201D000 +:1047D000062000E00720890707D198F8051001425C +:1047E000D2D198F806100142CED194F8312098F831 +:1047F000051020EA02021142C6D194F8322098F83E +:10480000061090430142BFD198F80400C11F0A2945 +:10481000BAD200E008E2617D81427CD8D8F800106D +:104820006160B8F80410218198F80600A072012098 +:1048300028700E20207003208DF82000686A0D90EB +:1048400004F12D000990601D0A900F300B9022E1B9 +:104850002875FCE3412891D1204600F06EFF042822 +:1048600002D1E078C00704D1204600F066FF0F288F +:1048700084D1A88CD5F80C8080B24FF0400BE6694B +:10488000FFF745FC324641465B464E46CDF8009068 +:10489000FFF731F80B208DF82000686A0D90E06971 +:1048A0000990002108A8FFF79FFE2078042806D071 +:1048B000A07D58B1012809D003280AD04AE3052079 +:1048C0002070032028708DF82060CEE184F800A0CD +:1048D00032E712202070EAE11128BCD1204600F016 +:1048E0002CFF042802D1E078C00719D0204600F040 +:1048F00024FF062805D1E078C00711D1A07D022849 +:104900000ED0204608E0CCE084E072E151E124E1E1 +:1049100003E1E9E019E0B0E100F00FFF11289AD1BE +:10492000102208F1010104F13C00F9F786FD6078DE +:1049300001286ED012202070E078C00760D0A07DE2 +:104940000028C8D00128C6D05AE0112890D12046AE +:1049500000F0F3FE082804D0204600F0EEFE1328F5 +:1049600086D104F16C00102208F101010646F9F726 +:1049700064FD207808280DD014202070E178C80745 +:104980000DD0A07D02280AD06278022A04D0032824 +:10499000A1D035E00920F0E708B1012837D1C807D8 +:1049A00013D0A07D02281DD000200090D4E906215C +:1049B00033460EA8FFF777FC10220EA904F13C0045 +:1049C000F9F70EFDC8B1042042E7D4E90912201D11 +:1049D0008DE8070004F12C0332460EA8616BFFF747 +:1049E00070FDE9E7606BC1F34401491E0068C840EF +:1049F00000F0010040F08000D7E72078092806D1B8 +:104A000085F800908DF8209036E32870EFE30920B8 +:104A1000FBE79EE1112899D1204600F08EFE0A287E +:104A200002D1E078C00704D1204600F086FE1528A8 +:104A30008CD104F13C00102208F101010646F9F77F +:104A4000FCFC20780A2816D016202070D4E9093200 +:104A5000606B611D8DE80F0004F15C0304F16C02D2 +:104A600047310EA8FFF7C2FC10220EA93046F9F715 +:104A7000B7FC18B1F9E20B20207073E22046FFF773 +:104A8000D7FDA078216AC0F110020B18002118464A +:104A9000F9F7FDFC26E3394608A8FFF7A5FD064611 +:104AA0003CE20228B7D1204600F047FE042804D398 +:104AB000204600F042FE082809D3204600F03DFEC3 +:104AC0000E2829D3204600F038FE122824D2A07DDB +:104AD0000228A0D10E208DF82000686A0D9098F869 +:104AE00001008DF82400F5E3022894D1204600F05F +:104AF00024FE002810D0204600F01FFE0128F9D027 +:104B0000204600F01AFE0C28F4D004208DF8240072 +:104B100098F801008DF8250060E21128FCD1002CE6 +:104B2000FAD020781728F7D16178606A022912D06C +:104B30005FF0000101EB4101182606EBC1011022D4 +:104B4000405808F10101F9F778FC0420696A00F087 +:104B5000E7FD2670F0E50121ECE70B28DCD1002C05 +:104B6000DAD020781828D7D16078616A02281CD062 +:104B70005FF0000000EB4002102000EBC20009587B +:104B8000B8F8010008806078616A02280FD0002020 +:104B900000EB4002142000EBC2000958404650F8D8 +:104BA000032F0A604068486039E00120E2E70120F5 +:104BB000EEE71128B0D1002CAED020781928ABD167 +:104BC0006178606A022912D05FF0000101EB4101B7 +:104BD0001C2202EBC1011022405808F10101F9F733 +:104BE0002CFC0420696A00F09BFD1A20B6E001212C +:104BF000ECE7082890D1002C8ED020781A288BD191 +:104C0000606A98F80120017862F347010170616AD7 +:104C1000D8F8022041F8012FB8F806008880042057 +:104C2000696A00F07DFD90E2072011E638780128DE +:104C300094D1182204F114007968F9F7FEFBE079A9 +:104C4000C10894F82F0001EAD001E07861F3000078 +:104C5000E070217D002974D12178032909D0C00793 +:104C600025D0032028708DF82090686A0D9041208F +:104C700008E3607DA178884201D90620E8E5022694 +:104C80002671E179204621F0E001E171617A21F09D +:104C9000F0016172A17A21F0F001A172FFF7C8FC66 +:104CA0002E708DF82090686A0D900720EAE20420AB +:104CB000ABE6387805289DD18DF82000686A0D9004 +:104CC000B8680A900720ADF824000A988DF830B033 +:104CD0006168016021898180A17A8171042020703E +:104CE000F8E23978052985D18DF82010696A0D918F +:104CF000391D09AE0EC986E80E004121ADF8241019 +:104D00008DF830B01070A88CD7F80C8080B2402697 +:104D1000A769FFF70EFA41463A463346C846CDF832 +:104D20000090FEF71CFE002108A8FFF75DFCE0786C +:104D300020F03E00801CE0702078052802D00F2073 +:104D40000CE04AE1A07D20B1012802D0032802D066 +:104D500002E10720BEE584F80080EDE42070EBE47A +:104D6000102104F15C0002F0C2FB606BB0BBA07DBF +:104D700018B1012801D00520FDE006202870F84870 +:104D80006063A063C2E23878022894D1387908B110 +:104D90002875B7E3A07D022802D0032805D022E0C1 +:104DA000B8680028F5D060631CE06078012806D060 +:104DB000A07994F82E10012805D0E94806E0A179E1 +:104DC00094F82E00F7E7B8680028E2D06063E07836 +:104DD000C00701D0012902D0E14803E003E0F868F0 +:104DE0000028D6D0A06306200FE68DF82090696ACF +:104DF0000D91E1784846C90709D06178022903D1AD +:104E0000A17D29B1012903D0A17D032900D007206C +:104E1000287033E138780528BBD1207807281ED0C8 +:104E200084F800A005208DF82000686A0D90B8680D +:104E30000A90ADF824A08DF830B003210170E1781C +:104E4000CA070FD0A27D022A1AD000210091D4E90E +:104E5000061204F15C03401CFFF725FA6BE384F8AB +:104E60000090DFE7D4E90923211D8DE80E0004F14D +:104E70002C0304F15C02401C616BFFF722FB5AE338 +:104E8000626BC1F34401491E1268CA4002F001017D +:104E900041F08001DAE738780528BDD18DF820008F +:104EA000686A0D90B8680A90ADF824A08DF830B00B +:104EB000042100F8011B102204F15C01F9F7BDFA8E +:104EC000002108A8FFF790FB2078092801D01320C3 +:104ED00044E70A2020709AE5E078C10742D0A17D1E +:104EE000012902D0022927D038E0617808A80129D9 +:104EF00016D004F16C010091D4E9061204F15C03B0 +:104F0000001DFFF7BBFA0A20287003268DF82080C9 +:104F1000686A0D90002108A8FFF766FBE1E2C7E28E +:104F200004F15C010091D4E9062104F16C03001D39 +:104F3000FFF7A4FA0026E9E7C0F3440114290DD2D3 +:104F40004FF0006101EBB0104FEAB060E0706078A4 +:104F5000012801D01020BDE40620FFE6607801287A +:104F60003FF4B6AC0A2050E5E178C90708D0A17D2E +:104F7000012903D10B202870042030E028702EE096 +:104F80000E2028706078616B012818D004F15C0352 +:104F900004F16C020EA8FFF7E1FA2046FFF748FB88 +:104FA000A0780EAEC0F1100230440021F9F76FFA7C +:104FB00006208DF82000686A09960D909BE004F1A8 +:104FC0006C0304F15C020EA8FFF7C8FAE8E7397831 +:104FD000022903D139790029D0D0297592E28DF8C0 +:104FE0002000686A0D9056E538780728F6D1D4E994 +:104FF00009216078012808D004F16C00CDE9000295 +:10500000029105D104F16C0304E004F15C00F5E7C2 +:1050100004F15C0304F14C007A680646216AFFF74C +:1050200063F96078012822D1A078216AC0F11002CA +:105030000B1800211846F9F72AFAD4E90923606B06 +:1050400004F12D018DE80F0004F15C0300E05BE248 +:1050500004F16C0231460EA8FFF7C8F910220EA920 +:1050600004F13C00F9F7BCF908B10B20ACE485F879 +:10507000008000BF8DF82090686A0D908DF824A004 +:1050800009E538780528A9D18DF82000686A0D90C7 +:10509000B8680A90ADF824A08DF830B080F8008090 +:1050A000617801291AD0D4E9092104F12D03A66BF6 +:1050B00003910096CDE9013204F16C0304F15C0226 +:1050C00004F14C01401CFFF791F9002108A8FFF7FB +:1050D0008BFA6078012805D015203FE6D4E9091243 +:1050E000631DE4E70E20287006208DF82000686A12 +:1050F000CDF824B00D90A0788DF82800CBE4387856 +:105100000328C0D1E079C00770D00F202870072095 +:1051100065E7387804286BD11422391D04F1140096 +:10512000F9F78BF9616A208CA1F80900616AA0780F +:10513000C871E179626A01F003011172616A627AF1 +:105140000A73616AA07A81F8240016205DE485F86C +:1051500000A08DF82090696A50460D9192E0000001 +:10516000706202003878052842D1B868A861617879 +:10517000606A022901D0012100E0002101EB410118 +:10518000142606EBC1014058082102F0B0F96178FD +:10519000606A022901D0012100E0002101EB4101F8 +:1051A00006EBC101425802A8E169FFF70BFA6078EB +:1051B000626A022801D0012000E0002000EB4001DB +:1051C000102000EBC1000223105802A90932FEF79B +:1051D000EEFF626AFD4B0EA80932A169FFF7E1F903 +:1051E0006178606A022904D0012103E044E18DE086 +:1051F000BFE0002101EB4101182606EBC101A278B6 +:1052000040580EA9F9F719F96178606A022901D0AE +:10521000012100E0002101EB410106EBC1014158F1 +:10522000A0780B18C0F1100200211846F9F72FF9E9 +:1052300005208DF82000686A0D90A8690A90ADF8E5 +:1052400024A08DF830B0062101706278616A022ACC +:1052500001D0012200E0002202EB420206EBC20272 +:10526000401C89581022F9F7E8F8002108A8FFF738 +:10527000BBF91220C5F818B028708DF82090686A24 +:105280000D900B208DF8240005E43878052870D1A6 +:105290008DF82000686A0D90B8680A900B20ADF870 +:1052A00024000A98072101706178626A022901D0FE +:1052B000012100E0002101EB4103102101EBC301BA +:1052C00051580988A0F801106178626A022902D059 +:1052D000012101E02FE1002101EB4103142101EB49 +:1052E000C30151580A6840F8032F4968416059E0EA +:1052F0001920287001208DF8300074E616202870DF +:105300008DF830B0002108A8FFF76EF9032617E1E9 +:1053100014202870AEE6387805282AD18DF82000B0 +:10532000686A0D90B8680A90ADF824A08DF830B086 +:1053300080F800906278616A4E46022A01D001220C +:1053400000E0002202EB42021C2303EBC202401CDD +:1053500089581022F9F771F8002108A8FFF744F9DD +:10536000152028708DF82060686A0D908DF82460F3 +:1053700039E680E0387805287DD18DF82000686A0C +:105380000D90B8680A90ADF8249009210170616908 +:10539000097849084170616951F8012FC0F802206D +:1053A0008988C18020781C28A8D1A1E7E078C007AF +:1053B00002D04FF0060C01E04FF0070C6078022895 +:1053C0000AD000BF4FF0000000EB040101F1090119 +:1053D00005D04FF0010004E04FF00100F4E74FF07A +:1053E00000000B78204413EA0C030B7010F8092F0F +:1053F00002EA0C02027004D14FF01B0C84F800C0CA +:10540000D2B394F801C0BCF1010F00D09BB990F861 +:1054100000C0E0465FEACC7C04D028F001060670AC +:10542000102606E05FEA887C05D528F002060670A3 +:1054300013262E70032694F801C0BCF1020F00D091 +:1054400092B991F800C05FEACC7804D02CF0010644 +:105450000E70172106E05FEA8C7805D52CF0020665 +:105460000E701921217000260078D0BBCAB3C3BBCF +:105470001C20207035E012E002E03878062841D187 +:105480001A2015E4207801283CD00C283AD0204678 +:10549000FFF7EBF809208DF82000686A0D9031E0E5 +:1054A0003878052805D00620387003261820287083 +:1054B00046E005208DF82000696A0D91B9680A91CF +:1054C0000221ADF8241001218DF830100A990870DE +:1054D000287D4870394608A8FFF786F80646182048 +:1054E0002870012E0ED02BE001208DF82000686A74 +:1054F0000D9003208DF82400287D8DF8250085F877 +:1055000014B012E0287D80B11D2020701720287073 +:105510008DF82090686A0D9002208DF8240039469D +:1055200008A8FFF761F806460AE00CB1FE202070DB +:105530009DF8200020B1002108A8FFF755F80CE4E1 +:1055400013B03046BDE8F08F2DE9F04387B00C462C +:105550004E6900218DF804100120257803460227AA +:105560004FF007094FF0050C85B1012D53D0022DE6 +:1055700039D1FE2030708DF80030606A059003202C +:105580008DF80400207E8DF8050063E02179012963 +:1055900025D002292DD0032928D0042923D1B17D7B +:1055A000022920D131780D1F042D04D30A3D032D8B +:1055B00001D31D2917D12189022914D38DF8047034 +:1055C000237020899DF80410884201E0686202007F +:1055D00018D208208DF80000606A059057E07078B6 +:1055E0000128EBD0052007B0BDE8F0831D20307006 +:1055F000E4E771780229F5D131780C29F3D18DF8DF +:105600000490DDE7083402F804CB94E80B0082E84C +:105610000B000320E7E71578052DE4D18DF800C0D5 +:10562000656A0595956802958DF8101094F80480C8 +:10563000B8F1010F13D0B8F1020F2DD0B8F1030F5C +:105640001CD0B8F1040FCED1ADF804700E20287034 +:10565000207E687000216846FEF7C6FF0CE0ADF8BA +:1056600004700B202870207E002100F01F0068705D +:105670006846FEF7B9FF37700020B4E7ADF8047054 +:105680008DF8103085F800C0207E687027701146B4 +:105690006846FEF7A9FFA6E7ADF804902B70207FBF +:1056A0006870607F00F00100A870A07F00F01F000C +:1056B000E870E27F2A71C0071CD094F8200000F047 +:1056C0000700687194F8210000F00700A87100211C +:1056D0006846FEF789FF2868F062A8883086A879B6 +:1056E00086F83200A069407870752879B0700D2076 +:1056F0003070C1E7A9716971E9E700B587B0042886 +:105700000CD101208DF800008DF8040000200591D7 +:105710008DF8050001466846FEF766FF07B000BD3C +:1057200070B50C46054602F0C9F921462846BDE889 +:1057300070407823002202F017B908B10078704752 +:105740000C20704770B50C0005784FF000010CD0AC +:1057500021702146EFF7D1FD69482178405D8842EC +:1057600001D1032070BD022070BDEFF7C6FD0020FF +:1057700070BD0279012A05D000220A704B78012BF6 +:1057800002D003E0042070470A758A610279930011 +:10579000521C0271C15003207047F0B587B00F460C +:1057A00005460124287905EB800050F8046C7078D8 +:1057B000411E02290AD252493A46083901EB8000BB +:1057C000314650F8043C2846984704460CB1012C59 +:1057D00011D12879401E10F0FF00287101D0032458 +:1057E000E0E70A208DF80000706A0590002101961C +:1057F0006846FFF7A7FF032CD4D007B02046F0BDC2 +:1058000070B515460A46044629461046FFF7C5FFFF +:10581000064674B12078FE280BD1207C30B10020E0 +:105820002870294604F10C00FFF7B7FF2046FEF769 +:105830001CFF304670BD704770B50E4604467C2292 +:105840000021F8F724FE0225012E03D0022E04D0F9 +:10585000052070BD0120607000E065702046FEF7F5 +:1058600004FFA575002070BD28B1027C1AB10A465C +:1058700000F10C01C4E70120704710B5044686B062 +:10588000042002F01BF92078FE2806D000208DF8B5 +:10589000000069462046FFF7E7FF06B010BD7CB563 +:1058A0000E4600218DF804104178012903D0022909 +:1058B00003D0002405E0046900E044690CB1217CB8 +:1058C00089B16D4601462846FFF753FF032809D1E9 +:1058D000324629462046FFF793FF9DF80410002921 +:1058E00000D004207CBD04F10C05EBE730B40C467D +:1058F0000146034A204630BC024B0C3AFEF751BE2B +:10590000AC6202006862020070B50D46040011D05E +:1059100085B1220100212846F8F7B9FD102250492F +:105920002846F8F78AFD4F48012101704470456010 +:10593000002070BD012070BD70B505460024494EA1 +:1059400011E07068AA7B00EB0410817B914208D1C2 +:10595000C17BEA7B914204D10C222946F8F740FD35 +:1059600030B1641CE4B230788442EAD3002070BDC8 +:10597000641CE0B270BD70B50546FFF7DDFF00287E +:1059800005D1384C20786178884201D3002070BD61 +:105990006168102201EB00102946F8F74EFD2078CF +:1059A000401CC0B2207070BD2E48007870472D4951 +:1059B0000878012802D0401E08700020704770B59A +:1059C0000D460021917014461180022802D0102843 +:1059D00015D105E0288890B10121A17010800CE05C +:1059E000284613B1FFF7C7FF01E0FFF7A5FFA0703E +:1059F00010F0FF0F03D0A8892080002070BD012087 +:105A000070BD0023DBE770B5054614460E0009D0D3 +:105A100000203070A878012806D003D911490A78EF +:105A200090420AD9012070BD24B1287820702888BE +:105A3000000A5070022008700FE064B1496810221B +:105A400001EB001120461039F8F7F7FC2878207395 +:105A50002888000A607310203070002070BD00009C +:105A6000BB620200900000202DE9F04190460C46F8 +:105A700007460025FE48072F00EB881607D2DFE80F +:105A800007F00707070704040400012500E0FFDF13 +:105A900006F81470002D13D0F548803000EB880113 +:105AA00091F82700202803D006EB4000447001E065 +:105AB00081F8264006EB44022020507081F82740F0 +:105AC000BDE8F081F0B51F4614460E460546202A73 +:105AD00000D1FFDFE649E648803100EB871C0CEB84 +:105AE000440001EB8702202E07D00CEB46014078E2 +:105AF0004B784870184620210AE092F8253040780B +:105B000082F82500F6E701460CEB4100057040786D +:105B1000A142F8D192F82740202C03D00CEB44048A +:105B2000637001E082F826300CEB4104202363709F +:105B300082F82710F0BD30B50D46CE4B4419002237 +:105B4000181A72EB020100D2FFDFCB48854200DD5C +:105B5000FFDFC9484042854200DAFFDFC548401CEC +:105B6000844207DA002C01DB204630BDC148401CCE +:105B7000201830BDBF48C043FAE710B5044601689D +:105B8000407ABE4A52F82020114450B10220084405 +:105B900020F07F40EDF763F894F90810BDE810405D +:105BA000C9E70420F3E72DE9F047B14E803696F8B7 +:105BB0002D50DFF8BC9206EB850090F8264034E0CB +:105BC00009EB85174FF0070817F81400012806D0D5 +:105BD00004282ED005282ED0062800D0FFDF01F0A3 +:105BE00025F9014607EB4400427806EB850080F872 +:105BF000262090F82720A24202D1202280F82720D8 +:105C0000084601F01EF92A4621460120FFF72CFF25 +:105C10009B48414600EB041002682046904796F8E6 +:105C20002D5006EB850090F82640202CC8D1BDE809 +:105C3000F087022000E003208046D0E710B58C4CAE +:105C40002021803484F8251084F8261084F8271049 +:105C5000002084F8280084F82D0084F82E10411EBE +:105C6000A16044F8100B2074607420736073A073FB +:105C70008449E07720750870487000217C4A103C08 +:105C800002F81100491CC9B22029F9D30120ECF710 +:105C9000D6FE0020ECF7D3FE012084F82200EDF7B9 +:105CA000FFF87948EDF711F9764CA41E207077487B +:105CB000EDF70BF96070BDE81040ECF74DBE10B584 +:105CC000ECF76FFE6F4CA41E2078EDF717F96078A3 +:105CD000EDF714F9BDE8104001F0E0B8202070475E +:105CE0000020ECF785BE70B5054601240E46AC4099 +:105CF0005AB1FFF7F5FF0146654800EBC500C0F853 +:105D00001015C0F81465634801E06248001D046086 +:105D100070BD2DE9F34F564C0025803404EB810A09 +:105D200089B09AF82500202821D0691E0291544993 +:105D3000009501EB0017391D03AB07C983E8070085 +:105D4000A18BADF81C10A07F8DF81E009DF81500EA +:105D5000A046C8B10226494951F820400399A2192A +:105D6000114421F07F41019184B102210FE0012013 +:105D7000ECF765FE0020ECF762FEECF730FE01F078 +:105D80008DF884F82F50A9E00426E4E700218DF86F +:105D90001810022801D0012820D103980119099870 +:105DA000081A801C9DF81C1020F07F4001B10221D0 +:105DB000353181420BD203208DF815000398C4F1D0 +:105DC0003201401A20F07F40322403900CE098F812 +:105DD000240018B901F043FA002863D0322C03D212 +:105DE00014B101F04FF801E001F058F8254A10789D +:105DF00018B393465278039B121B00219DF818405C +:105E0000994601281AD0032818D000208DF81E00CA +:105E1000002A04DD981A039001208DF818009DF8DF +:105E20001C0000B1022103981B4A20F07F40039020 +:105E300003AB099801F03EF810B110E00120E5E74E +:105E40009DF81D0018B99BF80000032829D08DF893 +:105E50001C50CDF80C908DF818408DF81E509DF810 +:105E6000180010B30398012381190022184615E089 +:105E7000840A0020FF7F841E0020A107CC6202005C +:105E8000840800209A00002017780100A75B010019 +:105E900000F0014004F50140FFFF3F00ECF722FE57 +:105EA00006E000200BB0BDE8F08F0120ECF7C7FD45 +:105EB00097F90C20012300200199ECF713FEF87BE1 +:105EC000C00701D0ECF7F7FE012188F82F108AF8FF +:105ED000285020226946FE48F8F7AFFA0120E1E792 +:105EE0002DE9F05FDFF8E883064608EB860090F8BE +:105EF0002550202D1FD0A8F180002C4600EB8617DE +:105F0000A0F50079DFF8CCB305E0A24607EB4A0024 +:105F10004478202C0AD0ECF730FE09EB04135A46E3 +:105F200001211B1D00F0C6FF0028EED0AC4202D0BC +:105F3000334652461EE0E84808B1AFF30080ECF764 +:105F40001CFE98F82F206AB1D8F80C20411C891A41 +:105F50000902CA1701EB12610912002902DD0020B3 +:105F6000BDE8F09F3146FFF7D4FE08B10120F7E706 +:105F700033462A4620210420FFF7A4FDEFE72DE950 +:105F8000F041D34C2569ECF7F8FD401B0002C11726 +:105F900000EB1160001200D4FFDF94F8220000B182 +:105FA000FFDF012784F8227094F82E00202800D10A +:105FB000FFDF94F82E60202084F82E00002584F85E +:105FC0002F5084F8205084F82150C4482560007870 +:105FD000022833D0032831D000202077A068401C4D +:105FE00005D04FF0FF30A0600120ECF728FD002025 +:105FF000ECF725FDECF721FEECF719FEECF7EFFCD2 +:106000000EF0D6FDB648056005604FF0E0214FF474 +:106010000040B846C1F88002ECF7BBFE94F82D7042 +:106020003846FFF75DFF0028FAD0A948803800EB1A +:10603000871010F81600022802D006E00120CCE7F5 +:106040003A4631460620FFF70FFD84F8238004EB23 +:10605000870090F82600202804D0A048801E4078B1 +:10606000ECF752FF207F002803D0ECF7D6FD257710 +:10607000657725E5964910B591F82D2000248039E3 +:1060800001EB821111F814302BB1641CE4B2202C06 +:10609000F8D3202010BD934901EB041108600020C3 +:1060A000C87321460120FFF7DFFC204610BD10B564 +:1060B000012801D0032800D171B3854A92F82D3010 +:1060C000834C0022803C04EB831300BF13F8124082 +:1060D0000CB1082010BD521CD2B2202AF6D37F4A40 +:1060E00048B1022807D0072916D2DFE801F01506CB +:1060F000080A0C0E100000210AE01B2108E03A21DA +:1061000006E0582104E0772102E0962100E0B52165 +:1061100051701070002010BD072010BD6F4810B5E1 +:106120004078ECF79CFD80B210BD10B5202811D24C +:10613000674991F82D30A1F1800202EB831414F825 +:1061400010303BB191F82D3002EB831212F8102081 +:10615000012A01D0002010BD91F82D200146002019 +:10616000FFF782FC012010BD10B5ECF706FDBDE87D +:106170001040ECF774BD2DE9F0410E46544F017804 +:106180002025803F0C4607EB831303E0254603EBF5 +:1061900045046478944202D0202CF7D108E0202CEA +:1061A00006D0A14206D103EB41014978017007E016 +:1061B000002085E403EB440003EB45014078487080 +:1061C000494F7EB127B1002140F22D40AFF300804E +:1061D0003078A04206D127B100214FF48660AFF39A +:1061E0000080357027B1002140F23540AFF30080C8 +:1061F000012065E410B542680B689A1A1202D417A0 +:1062000002EB1462121216D4497A91B1427A82B921 +:10621000364A006852F82110126819441044001DD3 +:10622000891C081A0002C11700EB11600012322805 +:1062300001DB012010BD002010BD2DE9F047294EE3 +:10624000814606F500709846144600EB811712E06F +:1062500006EB0415291D4846FFF7CCFF68B988F8FE +:106260000040A97B99F80A00814201D80020DEE4B1 +:1062700007EB44004478202CEAD10120D7E42DE933 +:10628000F047824612480E4600EB8600DFF8548045 +:1062900090F825402020107008F5007099461546AA +:1062A00000EB86170BE000BF08EB04105146001D01 +:1062B000FFF7A0FF28B107EB44002C704478202C96 +:1062C000F2D1297889F800104B46224631460FE07A +:1062D000040B0020FFFF3F00000000009A00002098 +:1062E00000F500408408002000000000CC6202009D +:1062F0005046BDE8F047A0E72DE9FC410F460446B3 +:106300000025FE4E10E000BF9DF80000256806EB5A +:1063100000108168204600F0E1FD2068A84202D10B +:106320000020BDE8FC8101256B4601AA39462046C4 +:10633000FFF7A5FF0028E7D02846F2E770B504462E +:10634000EF480125A54300EB841100EB85104022A6 +:10635000F8F773F8EB4E26B1002140F29D40AFF301 +:106360000080E748803000EB850100EB8400D0F826 +:106370002500C1F8250026B1002140F2A140AFF36D +:106380000080284670BD8A4203D003460520FFF7EF +:1063900099BB202906D0DA4A02EB801000EB4100BD +:1063A00040787047D649803101EB800090F8250095 +:1063B0007047D24901EB0010001DFFF7DEBB7CB532 +:1063C0001D46134604460E4600F1080221461846B3 +:1063D000ECF752FC94F908000F2804DD1F382072F6 +:1063E0002068401C206096B10220C74951F8261051 +:1063F000461820686946801B20F07F40206094F991 +:1064000008002844C01C1F2803DA012009E00420EA +:10641000EBE701AAECF730FC9DF8040010B10098FE +:10642000401C00900099206831440844C01C20F0B2 +:106430007F4060607CBDFEB50C46064609786079F9 +:10644000907220791F461546507279B12179002249 +:106450002846A368FFF7B3FFA9492846803191F881 +:106460002E20202A0AD00969491D0DE0D4E9022313 +:10647000217903B02846BDE8F040A0E7A349497858 +:10648000052900D20521314421F07F4100F026FD8D +:1064900039462846FFF730FFD4E9023221796846B1 +:1064A000FFF78DFF2B4600213046019A00F002FDD8 +:1064B000002806D103B031462846BDE8F04000F080 +:1064C0000DBDFEBD2DE9F14F84B000F0C3FCF0B16D +:1064D00000270498007800284FF000006DD1884D07 +:1064E000884C82468346803524B1002140F2045016 +:1064F000AFF3008095F82D8085F823B0002624B1F5 +:10650000002140F20950AFF3008017B105E00127E8 +:10651000DFE74046FFF712FF804624B1002140F23A +:106520001150AFF30080ECF728FB814643466A46E2 +:106530000499FFF780FF24B1002140F21750AFF318 +:10654000008095F82E0020280CD029690098401A68 +:106550000002C21700EB1260001203D5684600F07B +:10656000BDFC01264CB1002140F22150AFF3008068 +:10657000002140F22650AFF300806B46644A0021B0 +:10658000484600F097FC98B127B941466846FFF7A6 +:10659000B3FE064326B16846FFF7EFFA0499886018 +:1065A0004FF0010A24B1002140F23A50AFF30080CD +:1065B00095F82300002897D1504605B073E42DE9E3 +:1065C000F04F89B08B46824600F044FC4C4C80343E +:1065D00030B39BF80000002710B1012800D0FFDF86 +:1065E000484D25B1002140F2F950AFF300804349F6 +:1065F000012001EB0A18A946CDF81C005FEA090644 +:1066000004D0002140F20160AFF30080079800F051 +:1066100018FC94F82D50002084F8230067B119E08D +:1066200094F82E000127202800D1FFDF9BF80000FE +:106630000028D5D0FFDFD3E72846FFF77FFE0546C9 +:1066400026B1002140F20B60AFF3008094F82300E4 +:106650000028D3D126B1002140F21560AFF30080AD +:10666000ECF78BFA2B4602AA59460790FFF7E3FE98 +:1066700098F80F005FEA060900F001008DF813009A +:1066800004D0002140F21F60AFF300803B462A4651 +:1066900002A9CDF800A0079800F02BFC064604EBF9 +:1066A000850090F828000090B9F1000F04D0002177 +:1066B00040F22660AFF3008000F0B8FB0790B9F11C +:1066C000000F04D0002140F22C60AFF3008094F85A +:1066D0002300002892D1B9F1000F04D0002140F22C +:1066E0003460AFF300800DF1080C9CE80E00C8E99F +:1066F0000112C8F80C30BEB30CE000008408002082 +:10670000840A002000000000CC6202009A000020F1 +:10671000FFFF3F005FEA090604D0002140F241601C +:10672000AFF300800098B84312D094F82E002028D0 +:106730000ED126B1002140F24660AFF3008028461A +:10674000FFF7CEFB20B99BF80000D8B3012849D051 +:10675000B9F1000F04D0002140F26360AFF3008074 +:10676000284600F05CFB01265FEA090504D0002101 +:1067700040F26C60AFF30080079800F062FB25B137 +:1067800000214FF4CE60AFF300808EB194F82D005D +:1067900004EB800090F82600202809D025B10021C4 +:1067A00040F27760AFF30080F7484078ECF7ACFB3D +:1067B00025B1002140F27C60AFF3008009B0304683 +:1067C000BDE8F08FFFE7B9F1000F04D0002140F2DF +:1067D0004E60AFF3008094F82D2051460420FFF75F +:1067E00043F9C0E7002E3FF409AF002140F25960A1 +:1067F000AFF3008002E72DE9F84FE44D814695F8AC +:106800002D004FF00008E24C4FF0010B474624B139 +:10681000002140F28A60AFF30080584600F011FB7F +:1068200085F8237024B1002140F28F60AFF300801F +:1068300095F82D00FFF782FD064695F8230028B154 +:10684000002CE4D0002140F295604BE024B10021FF +:1068500040F29960AFF30080CC48803800EB86119D +:1068600011F81900032856D1334605EB830A4A462E +:106870009AF82500904201D1012000E0002000900C +:106880000AF125000021FFF776FC0146009801423D +:1068900003D001228AF82820AF77E1B324B1002188 +:1068A00040F29E60AFF30080324649460120FFF778 +:1068B000DBF89AF828A024B1002140F2A960AFF3D8 +:1068C000008000F0B3FA834624B1002140F2AE60AC +:1068D000AFF3008095F8230038B1002C97D0002149 +:1068E00040F2B260AFF3008091E7BAF1000F07D039 +:1068F00095F82E00202803D13046FFF7F1FAE0B1D9 +:1069000024B1002140F2C660AFF30080304600F0B1 +:1069100086FA4FF0010824B1002140F2CF60AFF3B6 +:106920000080584600F08DFA24B1002140F2D36077 +:10693000AFF300804046BDE8F88F002CF1D0002175 +:1069400040F2C160AFF30080E6E70120ECF750B8F9 +:106950008D48007870472DE9F0418C4C94F82E005A +:1069600020281FD194F82D6004EB860797F8255056 +:10697000202D00D1FFDF8549803901EB861000EB27 +:106980004500407807F8250F0120F87084F82300AF +:10699000294684F82E50324602202234FFF764F84C +:1069A0000020207005E42DE9F0417A4E774C012556 +:1069B00038B1012821D0022879D003287DD0FFDF0B +:1069C00017E400F05FFAFFF7C6FF207E00B1FFDF9B +:1069D00084F821500020ECF732F8A168481C04D05C +:1069E000012300221846ECF77DF814F82E0F2178C9 +:1069F00006EB01110A68012154E0FFF7ACFF01200A +:106A0000ECF71DF894F8210050B1A068401C07D0A5 +:106A100014F82E0F217806EB01110A68062141E0D7 +:106A2000207EDFF86481002708F10208012803D0E6 +:106A300002281ED0FFDFB5E7A777ECF7EEF898F84D +:106A40000000032801D165772577607D524951F810 +:106A5000200094F8201051B948B161680123091A47 +:106A600000221846ECF73EF8022020769AE72776B7 +:106A700098E784F8205000F005FAA07F50B198F80C +:106A8000010061680123091A00221846ECF72AF870 +:106A9000257600E0277614F82E0F217806EB0111F9 +:106AA0000A680021BDE8F041104700E005E03648E3 +:106AB0000078BDE8F041ECF727BAFFF74CFF14F877 +:106AC0002E0F217806EB01110A680521EAE710B5BF +:106AD0002E4C94F82E00202800D1FFDF14F82E0F42 +:106AE00021782C4A02EB01110A68BDE8104004210C +:106AF00010477CB5254C054694F82E00202800D17F +:106B0000FFDFA068401C00D0FFDF94F82E00214971 +:106B100001AA01EB0010694690F90C002844ECF73B +:106B2000ABF89DF904000F2801DD012000E00020F2 +:106B3000009908446168084420F07F41A16094F8FE +:106B40002100002807D002B00123BDE870400022D8 +:106B50001846EBF7C7BF7CBD30B5104A0B1A541C62 +:106B6000B3EB940F1ED3451AB5EB940F1AD393428F +:106B700003D9101A43185B1C14E0954210D9511A1E +:106B80000844401C43420DE098000020040B002004 +:106B90000000000084080020CC620200FF7F841EF9 +:106BA000FFDF0023184630BD0123002201460220EA +:106BB000EBF798BF0220EBF742BFEBF7DEBF2DE902 +:106BC000FE4FEE4C05468A4694F82E00202800D150 +:106BD000FFDFEA4E94F82E10A0462046A6F520725C +:106BE00002EB011420218DF8001090F82D10376968 +:106BF00000EB8101D8F8000091F82590284402AA02 +:106C000001A90C36ECF738F89DF90800002802DDE0 +:106C10000198401C0190A0680199642D084452D34A +:106C2000D74B00225B1B72EB02014CD36168411A07 +:106C300021F07F41B1F5800F45D220F07F40706098 +:106C400086F80AA098F82D1044466B464A4630460E +:106C5000FFF7F3FAB0B3A068401C10D0EBF78DFF3C +:106C6000A168081A0002C11700EB11600012022887 +:106C70002BDD0120EBF7E3FE4FF0FF30A06094F82E +:106C80002D009DF8002020210F34FFF77CFBA17F11 +:106C9000BA4A803A02EB8111E27F01EB420148706F +:106CA00054F80F0C284444F80F0C012020759DF86F +:106CB0000000202803D0B3484078ECF725F90120E4 +:106CC000BDE8FE8F01E00020FAE77760FBE72DE9E1 +:106CD000F047AA4C074694F82D00A4F1800606EB75 +:106CE000801010F8170000B9FFDF94F82D50A0466F +:106CF000A54C24B1002140F6EA00AFF3008040F635 +:106D0000F60940F6FF0A06EB851600BF16F81700D5 +:106D1000012819D0042811D005280FD006280DD03D +:106D20001CB100214846AFF300800FF02DF8002C75 +:106D3000ECD000215046AFF30080E7E72A46394601 +:106D40000120FEF791FEF2E74FF0010A4FF0000933 +:106D5000454624B1002140F60610AFF300805046AE +:106D600000F06FF885F8239024B1002140F60B1055 +:106D7000AFF3008095F82D00FFF7E0FA064695F88E +:106D8000230028B1002CE4D0002140F611101FE0B0 +:106D900024B1002140F61510AFF3008005EB86000A +:106DA00000F1270133463A462630FFF7E4F924B1D3 +:106DB000002140F61910AFF3008000F037F882464A +:106DC00095F8230038B1002CC3D0002140F61F10E5 +:106DD000AFF30080BDE785F82D60012085F8230022 +:106DE000504600F02EF8002C04D0002140F62C1064 +:106DF000AFF30080BDE8F08730B504465F480D462C +:106E000090F82D005D49803901EB801010F81400D6 +:106E100000B9FFDF5D4800EB0410C57330BD574972 +:106E200081F82D00012081F82300704710B55848E3 +:106E300008B1AFF30080EFF3108000F0010072B6EC +:106E400010BD10B5002804D1524808B1AFF300803E +:106E500062B610BD50480068C005C00D10D0103893 +:106E600040B2002804DB00F1E02090F8000405E0C7 +:106E700000F00F0000F1E02090F8140D4009704779 +:106E80000820704710B53D4C94F82400002804D128 +:106E9000F4F712FF012084F8240010BD10B5374C20 +:106EA00094F82400002804D0F4F72FFF002084F881 +:106EB000240010BD10B51C685B68241A181A24F051 +:106EC0007F4420F07F40A14206D8B4F5800F03D262 +:106ED000904201D8012010BD002010BDD0E9003241 +:106EE000D21A21F07F43114421F07F41C0E90031E3 +:106EF00070472DE9FC418446204815468038089C9F +:106F000000EB85160F4616F81400012804D002285D +:106F100002D00020BDE8FC810B46204A01216046DA +:106F2000FFF7C8FFF0B101AB6A4629463846FFF7C4 +:106F3000A6F9B8B19DF804209DF800102846FFF787 +:106F400022FA06EB440148709DF8000020280DD07D +:106F500006EB400044702A4621460320FEF784FDDC +:106F60000120D7E72A4621460420F7E703480121FC +:106F700000EB850000F8254FC170ECE7040B002002 +:106F8000FF1FA107980000200000000084080020D7 +:106F9000000000000000000004ED00E0FFFF3F00E3 +:106FA0002DE9F041044680074FF000054FF001063F +:106FB0000CD56B480560066000F0E8F920B169481F +:106FC000016841F48061016024F00204E0044FF0A4 +:106FD000FF3705D564484660C0F8087324F4805430 +:106FE000600003D56148056024F08044E0050FD5BA +:106FF0005F48C0F80052C0F808735E490D60091D73 +:107000000D605C4A04210C321160066124F4807426 +:10701000A00409D558484660C0F80052C0F808736B +:107020005648056024F40054C4F38030C4F3C031E2 +:10703000884200D0FFDF14F4404F14D0504846601F +:10704000C0F808734F488660C0F80052C0F8087353 +:107050004D490D600A1D16608660C0F808730D600A +:10706000166024F4404420050AD5484846608660EE +:10707000C0F80873C0F848734548056024F40064FC +:107080000DF070FD4348044200D0FFDFBDE8F08101 +:10709000F0B50022202501234FEA020420FA02F174 +:1070A000C9072DD051B2002910DB00BF4FEA51179C +:1070B0004FEA870701F01F0607F1E02703FA06F6FB +:1070C000C7F88061BFF34F8FBFF36F8F0CDB00BF3A +:1070D0004FEA51174FEA870701F01F0607F1E02733 +:1070E00003FA06F6C7F8806204DB01F1E02181F8BB +:1070F000004405E001F00F0101F1E02181F8144D99 +:1071000002F10102AA42C9D3F0BD10B5224C2060A1 +:107110000846F4F7EAFE2068FFF742FF2068FFF711 +:10712000B7FF0DF045F900F092F90DF01BFD0DF0E1 +:1071300058FCEBF7B5FEBDE810400DF0EDB910B509 +:10714000154C2068FFF72CFF2068FFF7A1FF0DF01A +:1071500009FDF4F7C9FF0020206010BD0A20704728 +:10716000FC1F00403C17004000C0004004E5014007 +:10717000008000400485004000D0004004D500405D +:1071800000E0004000F0004000F5004000B000408A +:1071900008B50040FEFF0FFD9C00002070B5264999 +:1071A0000A680AB30022154601244B685B1C4B6039 +:1071B0000C2B00D34D600E7904FA06F30E681E42C4 +:1071C0000FD0EFF3108212F0010272B600D001224C +:1071D0000C689C430C6002B962B6496801600020EB +:1071E00070BD521C0C2AE0D3052070BD4FF0E02189 +:1071F0004FF48000C1F800027047EFF3108111F0E6 +:10720000010F72B64FF0010202FA00F20A48036859 +:1072100042EA0302026000D162B6E7E706480021B5 +:1072200001604160704701218140034800680840C7 +:1072300000D0012070470000A0000020012081073D +:10724000086070470121880741600021C0F80011E3 +:1072500018480170704717490120087070474FF0B7 +:107260008040D0F80001012803D01248007800289F +:1072700000D00120704710480068C00700D00120EE +:1072800070470D480C300068C00700D001207047DF +:107290000948143000687047074910310A68D20362 +:1072A00006D5096801F00301814201D10120704730 +:1072B00000207047A8000020080400404FF08050D4 +:1072C000D0F830010A2801D0002070470120704713 +:1072D00000B5FFF7F3FF20B14FF08050D0F8340134 +:1072E00008B1002000BD012000BD4FF08050D0F853 +:1072F00030010E2801D000207047012070474FF068 +:107300008050D0F83001062803D0401C01D0002066 +:107310007047012070474FF08050D0F830010D28A1 +:1073200001D000207047012070474FF08050D0F806 +:107330003001082801D000207047012070474FF02D +:107340008050D0F83001102801D000207047012073 +:10735000704700B5FFF7F3FF30B9FFF7DCFF18B94E +:10736000FFF7E3FF002800D0012000BD00B5FFF7C4 +:10737000C6FF38B14FF08050D0F83401062803D34F +:10738000401C01D0002000BD012000BD00B5FFF76A +:10739000B6FF48B14FF08050D0F83401062803D32F +:1073A000401C01D0012000BD002000BD0021017063 +:1073B000084670470146002008707047EFF31081BF +:1073C00001F0010172B60278012A01D0012200E029 +:1073D00000220123037001B962B60AB10020704790 +:1073E0004FF400507047E9E7EFF3108111F0010FFF +:1073F00072B64FF00002027000D162B600207047F2 +:10740000F2E700002DE9F04115460E46044600273C +:1074100000F0EBF8A84215D3002341200FE000BF95 +:1074200094F84220A25CF25494F84210491CB1FB3B +:10743000F0F200FB12115B1C84F84210DBB2AB428D +:10744000EED3012700F0DDF83846BDE8F08172493F +:1074500010B5802081F800047049002081F84200B6 +:1074600081F84100433181F8420081F84100433105 +:1074700081F8420081F841006948FFF797FF6848AA +:10748000401CFFF793FFEBF793FCBDE8104000F0C2 +:10749000B8B840207047614800F0A7B80A460146D6 +:1074A0005E48AFE7402070475C48433000F09DB82D +:1074B0000A46014659484330A4E7402101700020A4 +:1074C000704710B504465548863000F08EF820709D +:1074D000002010BD0A460146504810B58630FFF71F +:1074E00091FF08B1002010BD42F2070010BD70B539 +:1074F0000C460646412900D9FFDF4A48006810388B +:1075000040B200F054F8C5B20D2000F050F8C0B2FF +:10751000854201D3012504E0002502E00DB1EBF71F +:107520008AFC224631463D48FFF76CFF0028F5D023 +:1075300070BD2DE9F0413A4F0025064617F10407CA +:1075400057F82540204600F041F810B36D1CEDB20D +:10755000032DF5D33148433000F038F8002825D00A +:107560002E4800F033F8002820D02C48863000F058 +:107570002DF800281AD0EBF734FC2948FFF71EFF3E +:10758000B0F5005F00D0FFDFBDE8F0412448FFF711 +:107590002BBF94F841004121265414F8410F401CA0 +:1075A000B0FBF1F201FB12002070D3E74DE7002899 +:1075B00004DB00F1E02090F8000405E000F00F008B +:1075C00000F1E02090F8140D4009704710F8411FB9 +:1075D0004122491CB1FBF2F302FB131140788142B6 +:1075E00001D1012070470020704710F8411F4078FA +:1075F000814201D3081A02E0C0F141000844C0B240 +:10760000704710B50648FFF7D9FE002803D1BDE842 +:107610001040EBF7D1BB10BD0DE000E0340B0020B3 +:10762000AC00002004ED00E070B5154D2878401C3A +:10763000C4B26878844202D000F0DBFA2C7070BDCE +:107640002DE9F0410E4C4FF0E02600BF00F0C6FAE5 +:107650000EF09AFB40BF20BF677820786070D6F8A4 +:107660000052E9F798FE854305D1D6F8040210B917 +:107670002078B842EAD000F0ACFA0020BDE8F081F2 +:10768000BC0000202DE9F04101264FF0E02231033B +:107690004FF000084046C2F88011BFF34F8FBFF390 +:1076A0006F8F204CC4F800010C2000F02EF81E4D06 +:1076B0002868C04340F30017286840F01000286095 +:1076C000C4F8046326607F1C02E000BF0EF05CFB80 +:1076D000D4F800010028F9D01FB9286820F0100064 +:1076E0002860124805686660C4F80863C4F8008121 +:1076F0000C2000F00AF82846BDE8F08110B50446D9 +:10770000FFF7C0FF2060002010BD002809DB00F05B +:107710001F02012191404009800000F1E020C0F8E3 +:107720008012704700C0004010ED00E008C5004026 +:107730002DE9F047FF4C0646FF21A06800EB06123A +:1077400011702178FF2910D04FF0080909EB0111C1 +:1077500009EB06174158C05900F0F4F9002807DD7D +:10776000A168207801EB061108702670BDE8F0874B +:1077700094F8008045460DE0A06809EB05114158DA +:10778000C05900F0DFF9002806DCA068A84600EB2D +:1077900008100578FF2DEFD1A06800EB061100EB73 +:1077A00008100D700670E1E7F0B5E24B04460020CA +:1077B00001259A680C269B780CE000BF05EB0017AA +:1077C000D75DA74204D106EB0017D7598F4204D0EA +:1077D000401CC0B28342F1D8FF20F0BD70B5FFF766 +:1077E000ECF9D44C08252278A16805EB02128958DF +:1077F00000F0A8F9012808DD2178A06805EB011147 +:107800004058BDE87040FFF7CFB9FFF7A1F8BDE8D9 +:107810007040EBF779BB2DE9F041C64C2578FFF7B6 +:10782000CCF9FF2D6ED04FF00808A26808EB0516C2 +:10783000915900F087F90228A06801DD80595DE0C8 +:1078400000EB051109782170022101EB0511425C62 +:107850005AB1521E4254815901F5800121F07F41F5 +:1078600081512846FFF764FF34E00423012203EB33 +:10787000051302EB051250F803C0875CBCF1000F42 +:1078800010D0BCF5007F10D9CCF3080250F806C028 +:107890000CEB423C2CF07F4C40F806C0C3589A1ABF +:1078A000520A09E0FF2181540AE0825902EB4C326E +:1078B00022F07F428251002242542846FFF738FFCF +:1078C0000C21A06801EB05114158E06850F8272011 +:1078D000384690472078FF2814D0FFF76EF92278B9 +:1078E000A16808EB02124546895800F02BF90128DF +:1078F00093DD2178A06805EB01114058BDE8F04107 +:10790000FFF752B9BDE8F081F0B51D4614460E46AA +:107910000746FF2B00D3FFDFA00700D0FFDF85481D +:10792000FF210022C0E90247C57006710170427054 +:1079300082701046012204E002EB0013401CE15467 +:10794000C0B2A842F8D3F0BD70B57A4C064665784F +:107950002079854200D3FFDFE06840F82560607839 +:10796000401C6070284670BD2DE9FF5F1D468B46A8 +:107970000746FF24FFF721F9DFF8B891064699F88A +:107980000100B84200D8FFDF00214FF001084FF09E +:107990000C0A99F80220D9F808000EE008EB011350 +:1079A000C35CFF2B0ED0BB4205D10AEB011350F88C +:1079B00003C0DC450CD0491CC9B28A42EED8FF2C6A +:1079C00002D00DE00C46F6E799F803108A4203D185 +:1079D000FF2004B0BDE8F09F1446521C89F8022035 +:1079E00008EB04110AEB0412475440F802B00421DA +:1079F000029B0022012B01EB04110CD040F8012066 +:107A00004FF4007808234FF0020C454513D9E905DF +:107A1000C90D02D002E04550F2E7414606EB413283 +:107A200003EB041322F07F42C250691A0CEB0412DC +:107A3000490A81540BE005B9012506EB453103EBFA +:107A4000041321F07F41C1500CEB0411425499F80A +:107A500000502046FFF76CFE99F80000A84201D0C4 +:107A6000FFF7BCFE3846B4E770B50C460546FFF795 +:107A7000A4F8064621462846FFF796FE0446FF284E +:107A80001AD02C4D082101EB0411A868415830464A +:107A900000F058F800F58050C11700EBD1404013BA +:107AA0000221AA6801EB0411515C09B100EB4120ED +:107AB000002800DC012070BD002070BD2DE9F047DA +:107AC00088468146FFF770FE0746FF281BD0194DF8 +:107AD0002E78A8683146344605E0BC4206D02646DA +:107AE00000EB06121478FF2CF7D10CE0FF2C0AD023 +:107AF000A6420CD100EB011000782870FF2804D0BA +:107B0000FFF76CFE03E0002030E6FFF753F8414634 +:107B10004846FFF7A9FF0123A968024603EB0413B7 +:107B2000FF20C854A878401EB84200D1A87001EBCD +:107B3000041001E0000C002001EB06110078087031 +:107B4000104613E6081A0002C11700EB116000127C +:107B50007047000010B5202000F07FF8202000F0D2 +:107B60008DF84D49202081F80004E9F712FC4B49BB +:107B700008604B48D0F8041341F00101C0F8041329 +:107B8000D0F8041341F08071C0F804134249012079 +:107B90001C39C1F8000110BD10B5202000F05DF8BF +:107BA0003E480021C8380160001D01603D4A481E62 +:107BB00010603B4AC2F80803384B1960C2F8000154 +:107BC000C2F8600138490860BDE81040202000F08C +:107BD00055B834493548091F086070473149334862 +:107BE000086070472D48C8380160001D521E0260B1 +:107BF00070472C4901200860BFF34F8F70472DE973 +:107C0000F0412849D0F8188028480860244CD4F85E +:107C100000010025244E6F1E28B14046E9F712FBF3 +:107C200040B9002111E0D4F8600198B14046E9F76D +:107C300009FB48B1C4F80051C4F860513760BDE891 +:107C4000F041202000F01AB831684046BDE8F0410C +:107C50000EF0A4B8FFDFBDE8F08100280DDB00F0D6 +:107C60001F02012191404009800000F1E020C0F88E +:107C70008011BFF34F8FBFF36F8F7047002809DB70 +:107C800000F01F02012191404009800000F1E02036 +:107C9000C0F880127047000020E000E0C8060240F3 +:107CA00000000240180502400004024001000001EB +:107CB0005E4800210170417010218170704770B5DD +:107CC000054616460C460220EAF714FE57490120E5 +:107CD00008705749F01E086056480560001F046090 +:107CE00070BD10B50220EAF705FE5049012008706A +:107CF00051480021C0F80011C0F80411C0F8081163 +:107D00004E494FF40000086010BD48480178D9B1D1 +:107D10004B4A4FF4000111604749D1F8003100226D +:107D2000002B1CBFD1F80431002B02D0D1F8081170 +:107D300019B142704FF0100104E04FF001014170A1 +:107D400040490968817002704FF00000EAF7D2BD27 +:107D500010B50220EAF7CEFD34480122002102705E +:107D60003548C0F80011C0F80411C0F808110260CD +:107D700010BD2E480178002904BF407870472E4876 +:107D8000D0F80011002904BF02207047D0F800117C +:107D900000291CBFD0F80411002905D0D0F8080133 +:107DA000002804BF01207047002070471F4800B51D +:107DB0000278214B4078C821491EC9B282B1D3F85C +:107DC00000C1BCF1000F10D0D3F8000100281CBF87 +:107DD000D3F8040100280BD0D3F8080150B107E014 +:107DE000022802D0012805D002E00029E4D1FFDFFB +:107DF000002000BD012000BD0C480178002904BF0F +:107E0000807870470C48D0F8001100291CBFD0F8CA +:107E10000411002902D0D0F8080110B14FF0100071 +:107E2000704708480068C0B270470000BE000020DC +:107E300010F5004008F5004000F0004004F5014056 +:107E400008F5014000F400405748002101704170DE +:107E5000704770B5064614460D460120EAF74AFD04 +:107E600052480660001D0460001D05605049002056 +:107E7000C1F850014F490320086050494E4808603E +:107E8000091D4F48086070BD2DE9F0410546464880 +:107E90000C46012606704B4945EA024040F08070CE +:107EA0000860FFF72CFA002804BF47480460002749 +:107EB000464CC4F80471474945480860002D02BF8C +:107EC000C4F800622660BDE8F081012D18BFFFDF15 +:107ED000C4F80072266041493F480860BDE8F0815F +:107EE0003148017871B13B4A394911603749D1F8BD +:107EF00004210021002A08BF417002D0384A1268CC +:107F0000427001700020EAF7F5BC2748017800298B +:107F100004BF407870472D48D0F80401002808BFFE +:107F200070472F480068C0B27047002808BF7047EC +:107F30002DE9F0471C480078002808BFFFDF234CDC +:107F4000D4F80401002818BFBDE8F0874FF00209FB +:107F5000C4F80493234F3868C0F30018386840F021 +:107F600010003860D4F80401002804BF4FF4004525 +:107F70004FF0E02608D100BFC6F880520DF004FF94 +:107F8000D4F804010028F7D0B8F1000F03D1386805 +:107F900020F010003860C4F80893BDE8F0870B4962 +:107FA0000120886070470000C100002008F50040F3 +:107FB000001000401CF500405011004098F50140B1 +:107FC0000CF0004004F5004018F5004000F00040BF +:107FD0000000020308F501400000020204F5014020 +:107FE00000F4004010ED00E0012804BF41F6A47049 +:107FF0007047022804BF41F288307047042804BF4C +:1080000046F218007047082804BF47F2A0307047B6 +:1080100000B5FFDF41F6A47000BD10B5FE48002496 +:1080200001214470047044728472C17280F825404A +:10803000C462846380F83C4080F83D40FF2180F8B2 +:108040003E105F2180F83F1018300DF09FFFF3497C +:10805000601E0860091D0860091D0C60091D08608C +:10806000091D0C60091D0860091D0860091D0860D4 +:10807000091D0860091D0860091D0860091D0860C8 +:10808000091D0860091D086010BDE549486070477A +:10809000E448016801F00F01032904BF0120704783 +:1080A000016801F00F01042904BF02207047016834 +:1080B00001F00F01052904D0006800F00F00062828 +:1080C00007D1D948006810F0060F0CBF0820042023 +:1080D000704700B5FFDF012000BD012812BF022854 +:1080E00000207047042812BF08284FF4C87070475A +:1080F00000B5FFDF002000BD012804BF2820704725 +:10810000022804BF18207047042812BF08284FF423 +:10811000A870704700B5FFDF282000BD70B5C148CA +:10812000016801F00F01032908BF012414D0016880 +:1081300001F00F01042904BF022418210DD00168A9 +:1081400001F00F0105294BD0006800F00F00062850 +:108150001CBFFFDF012443D02821AF48C26A806AD8 +:10816000101A0E18082C04BF4EF6981547F2A030CE +:108170002DD02046042C08BF4EF628350BD0012800 +:1081800008BF41F6A47506D0022C1ABFFFDF41F6E6 +:10819000A47541F28835012C08BF41F6A47016D0B1 +:1081A000022C08BF002005D0042C1ABFFFDF0020DE +:1081B0004FF4C8702D1A022C08BF41F2883006D047 +:1081C000042C1ABFFFDF41F6A47046F21800281AEB +:1081D0004FF47A7100F2E730B0FBF1F0304470BD3B +:1081E0009148006810F0060F0CBF082404244FF4D7 +:1081F000A871B2E710B58D49026801F118040A634D +:1082000042684A63007A81F83800207E48B1207FB6 +:10821000F6F781F9A07E011C18BF0121207FF6F737 +:1082200069F9607E002808BF10BD607FF6F773F91A +:10823000E07E011C18BF0121607FBDE81040F6F709 +:1082400059B930B50024054601290AD0022908BFD2 +:108250004FF0807405D0042916BF08294FF0C74499 +:10826000FFDF44F4847040F480107149086045F4E5 +:10827000403001F1040140F00070086030BD30B5BD +:108280000024054601290AD0022908BF4FF0807456 +:1082900005D0042916BF08294FF0C744FFDF44F476 +:1082A000847040F480106249086045F4403001F168 +:1082B000040140F0007008605E48D0F8000100281A +:1082C00018BFFFDF30BD2DE9F04102274FF0E02855 +:1082D00001250024C8F88071BFF34F8FBFF36F8F63 +:1082E000554804600560FFF751F8544E18B13068E6 +:1082F00040F480603060FFF702F838B1306820F059 +:10830000690040F0960040F0004030604D494C4814 +:1083100008604FF01020806CB0F1FF3F04D04A4954 +:108320000A6860F317420A60484940F25B600860DF +:10833000091F40F203100860081F05603949032037 +:10834000086043480560444A42491160444A434931 +:108350001160121F43491160016821F440710160EE +:10836000016841F480710160C8F8807231491020C1 +:10837000C1F80403284880F83140C46228484068A6 +:10838000002808BFBDE8F081BDE8F0410047274A5A +:108390000368C2F81A308088D08302F11800017295 +:1083A00070471D4B10B51A7A8A4208D10146062241 +:1083B000981CF6F715F8002804BF012010BD002016 +:1083C00010BD154890F825007047134A5170107081 +:1083D0007047F0B50546800000F1804000F5805000 +:1083E0008B88C0F820360B78D1F8011043EA0121C0 +:1083F000C0F8001605F10800012707FA00F61A4C2C +:10840000002A04BF2068B04304D0012A18BFFFDF50 +:1084100020683043206029E0280C0020000E004036 +:10842000C40000201015004014140040100C00205F +:108430001415004000100040FC1F00403C17004095 +:108440002C000089781700408C150040381500403A +:108450005016004000000E0408F501404080004026 +:10846000A4F501401011004040160040206807FAB2 +:1084700005F108432060F0BD0CF0C4BCFE4890F844 +:1084800032007047FD4AC17811600068FC49000263 +:1084900008607047252808BF02210ED0262808BF93 +:1084A0001A210AD0272808BF502106D00A2894BFD5 +:1084B0000422062202EB4001C9B2F24A1160F249DD +:1084C000086070472DE9F047EB4CA17A012956D09E +:1084D000022918BFBDE8F087627E002A08BFBDE808 +:1084E000F087012950D0E17E667F0D1C18BF012561 +:1084F0005FF02401DFF894934FF00108C9F84C8035 +:10850000DFF88CA34718DAF80000B84228BFFFDF75 +:108510000020C9F84C01CAF80070300285F0010152 +:1085200040EA015040F0031194F82000820002F16B +:10853000804202F5C042C2F81015D64901EB800115 +:10854000A07FC20002F1804202F5F832C2F8141591 +:10855000D14BC2F81035E27FD30003F1804303F51D +:10856000F833C3F81415CD49C3F8101508FA00F014 +:1085700008FA02F10843CA490860BDE8F087227E84 +:10858000002AAED1BDE8F087A17E267F002914BF66 +:10859000012500251121ADE72DE9F041C14E8046AE +:1085A00003200D46C6F80002BD49BF4808602846B2 +:1085B0000CF02CFCB04F0124B8F1000F04BFBC72CA +:1085C000346026D0B8F1010F23D1B848006860B9F3 +:1085D00015F00C0F09D0C6F80443012000F0DAFEB4 +:1085E000F463346487F83C4002E0002000F0D2FEDF +:1085F00028460CF0F3FC0220B872FEF7B7FE38B93B +:10860000FEF7C4FE20B9AA48016841F4C021016008 +:1086100074609E48C4649E4800682946BDE8F041E5 +:1086200050E72DE9F0479F4E814603200D46C6F8DE +:108630000002DFF86C829C48C8F8000008460CF085 +:10864000E5FB28460CF0CAFC01248B4FB9F1000F62 +:1086500003D0B9F1010F0AD031E0BC72B86B40F41D +:108660008010B8634FF48010C8F8000027E00220A3 +:10867000B872B86B40F40010B8634FF40010C8F83B +:1086800000008A48006860B915F00C0F09D0C6F8E0 +:108690000443012000F07EFEF463346487F83C401C +:1086A00002E0002000F076FEFEF760FE38B9FEF72B +:1086B0006DFE20B97E48016841F4C0210160EAF7EF +:1086C000F7FA2946BDE8F047FCE62DE9F84F754C6E +:1086D0008246032088461746C4F80002DFF8C0919E +:1086E0007148C9F8000010460CF090FBDFF8C4B1E7 +:1086F000614E0125BAF1000F04BFCBF80040B572FE +:1087000004D0BAF1010F18BFFFDF2FD06A48C0F8BC +:1087100000806B4969480860B06B40F40020B0638A +:10872000D4F800321021C4F808130020C4F8000265 +:10873000DFF890C18A03CCF80020C4F80001C4F827 +:108740000C01C4F81001C4F80401C4F81401C4F801 +:1087500018015D4800680090C4F80032C9F8002094 +:10876000C4F80413BAF1010F14D026E038460CF017 +:1087700035FCFEF7FBFD38B9FEF708FE20B94C4882 +:10878000016841F4C02101605048CBF8000002208C +:10879000B072BBE74548006860B917F00C0F09D00C +:1087A000C4F80453012000F0F5FDE563256486F864 +:1087B0003C5002E0002000F0EDFD4FF40020C9F82D +:1087C00000003248C56432480068404528BFFFDFDA +:1087D00039464046BDE8F84F74E62DE9F041264C95 +:1087E0000646002594F8310017468846002808BF41 +:1087F000FFDF16B1012E16D021E094F831000128D8 +:1088000008D094F83020394640460CF014FBE16A59 +:10881000451814E094F830103A4640460CF049FBF5 +:10882000E16A45180BE094F8310094F83010012803 +:108830003A46404609D00CF064FBE16A45183A46D6 +:1088400029463046BDE8F0413FE70CF014FBE16AF1 +:108850004518F4E72DE9F84F124CD4F8000220F047 +:108860000309D4F804034FF0100AC0F30018C4F849 +:1088700008A300262CE00000280C0020241500404E +:108880001C150040081500405415004000800040B1 +:108890004C850040006000404C81004010110040B9 +:1088A00004F5014000100040000004048817004057 +:1088B00068150040ACF50140488500404881004003 +:1088C000A8F5014008F501401811004004100040CF +:1088D000C4F80062FC48FB490160FC4D0127A97AFD +:1088E000012902D0022903D015E0297E11B912E036 +:1088F000697E81B1A97FEA7F07FA01F107FA02F2E6 +:108900001143016095F82000800000F1804000F5DF +:10891000C040C0F81065FF208DF80000C4F8106159 +:10892000276104E09DF80000401E8DF800009DF8CE +:10893000000018B1D4F810010028F3D09DF8000011 +:10894000002808BFFFDFC4F81061002000F022FDFE +:108950006E72AE72EF72C4F80092B8F1000F18BFD9 +:10896000C4F804A3BDE8F88FFF2008B58DF8000017 +:10897000D7480021C0F810110121016105E000BFB6 +:108980009DF80010491E8DF800109DF8001019B1D7 +:10899000D0F810110029F3D09DF80000002808BF7E +:1089A000FFDF08BD0068CB4920F07F4008607047BA +:1089B0004FF0E0200221C0F8801100F5C070BFF335 +:1089C0004F8FBFF36F8FC0F80011704710B490E85D +:1089D0001C10C14981E81C10D0E90420C1E9042021 +:1089E00010BC70474FF0E0210220C1F80001704731 +:1089F000BA4908707047BA490860704770B50546B3 +:108A0000EAF756F9B14C2844E16A884298BFFFDF83 +:108A100001202074EAF74CF9B24A28440021606131 +:108A2000C2F84411B0490860A06BB04940F480001E +:108A3000A063D001086070BD70B5A44C0546AC4A77 +:108A40000220207410680E4600F00F00032808BFB3 +:108A5000012213D0106800F00F00042808BF022282 +:108A60000CD0106800F00F0005281BD0106800F033 +:108A70000F0006281CBFFFDF012213D094F831003D +:108A800094F83010012815D028460CF081FA954949 +:108A900060610020C1F844016169E06A08449249BC +:108AA000086070BD9348006810F0060F0CBF0822E4 +:108AB0000422E3E7334628460CF038FAE7E7824918 +:108AC0004FF4800008608148816B21F4800181634C +:108AD000002101747047C20002F1804202F5F832B1 +:108AE000854BC2F81035C2F81415012181407F482A +:108AF00001607648826B1143816370477948012198 +:108B00004160C1600021C0F84411774801606F489E +:108B1000C1627047794908606D48D0F8001241F091 +:108B20004001C0F8001270476948D0F8001221F0E7 +:108B30004001C0F800127149002008607047644885 +:108B4000D0F8001221F01001C0F80012012181615B +:108B500070475E49FF2081F83E005D480021C0F863 +:108B60001C11D0F8001241F01001C0F8001270473B +:108B7000574981B0D1F81C21012A0DD0534991F8F1 +:108B80003E10FF290DBF00204942017001B008BF0F +:108B90007047012001B07047594A126802F07F0205 +:108BA000524202700020C1F81C0156480068009033 +:108BB000EFE7F0B517460C00064608BFFFDF434D50 +:108BC00014F0010F2F731CBF012CFFDF002E0CBF10 +:108BD000012002206872EC7201281CBF0228FFDF0E +:108BE000F0BD3A4981F83F007047384A136C036082 +:108BF000506C086070472DE9F84F38480078042819 +:108C000028BFFFDF314CDFF8C080314D94F83C00C5 +:108C100000260127E0B1D5F8040110F1000918BFC2 +:108C20004FF00109D5F81001002818BF012050EAC3 +:108C300009014FF4002B17D08021C5F80813C8F89C +:108C400000B084F83C6090F0010F18BFBDE8F88FC9 +:108C5000DFF89090D9F84C01002871D0A07A012853 +:108C60006FD002286ED0D1E0D5F80001DFF890A0D7 +:108C700030B3C5F800616F61FF20009002E0401E34 +:108C8000009005D0D5F81C0100280098F7D000B955 +:108C9000FFDFDAF8000000F07F0A94F83F0050454B +:108CA0003CBF002000F076FB84F83EA0C5F81C61B4 +:108CB000C5F808731348006800902F64AF6326E07E +:108CC00022E0000000000E0408F50140280C0020FE +:108CD000001000403C150040100C0020C400002093 +:108CE00004150040008000404485004004F5014028 +:108CF000101500401414004004110040601500409D +:108D0000481500401C110040B9F1000F03D0B9F123 +:108D1000000F2ED05CE0DAF8000000F07F0084F84D +:108D20003E00C5F81C6194F83D1061B194F83F1005 +:108D300081421BD2002000F02DFB2F64AF6315E0B1 +:108D400064E04CE04EE0FE49096894F83F308AB296 +:108D5000090C984203D30F2A06D9022904D2012014 +:108D600000F018FB2F6401E02F64AF63F548006842 +:108D700000908022C5F80423F3498F64F348036808 +:108D8000A0F1040CDCF800C043F698273B4463458F +:108D900015D2026842F210731A440260C1F84861A9 +:108DA000EC49EB480860091FEB480860EB48C0F845 +:108DB00000B0A06B40F40020A063BDE8F88F06600F +:108DC000C1F84861C5F80823C8F800B0C1F8486187 +:108DD0008020C5F80803C8F800B0BDE8F88F207EF1 +:108DE00010B913E0607E88B1A07FE17F07FA00F040 +:108DF00007FA01F10843C8F8000094F82000800049 +:108E000000F1804000F5C040C0F81065C9F84C7012 +:108E1000D34800682064D34800686064D248A16BDE +:108E20000160A663217C002019B1D9F84411012901 +:108E300000D00021A27A012A6ED0022A74D000BF8D +:108E4000D5F8101101290CBF1021002141EA0008BA +:108E5000C648016811F0FF0F03D0D5F8141101299D +:108E600000D0002184F83210006810F0FF0F03D00A +:108E7000D5F81801012800D0002084F83300BC4840 +:108E8000006884F83400FEF774FF012818BF002042 +:108E900084F83500C5F80061C5F80C61C5F81061AB +:108EA000C5F80461C5F81461C5F81861B1480068D7 +:108EB0000090A548C0F84461AF480068DFF8BC9254 +:108EC0000090D9F80000A062A9F104000068E062F7 +:108ED000AB48016801F00F01032908BF012013D03E +:108EE000016801F00F01042908BF02200CD00168BD +:108EF00001F00F01052926D0006800F00F000628B8 +:108F00001CBFFFDF01201ED084F83000A07A84F857 +:108F1000310002282CD11EE0D5F80C01012814BF25 +:108F2000002008208CE7FFE7D5F80C01012814BFCA +:108F300000200220934A1268012A14BF0422002252 +:108F4000104308437CE79048006810F0060F0CBF00 +:108F500008200420D8E7607850B18C490968097866 +:108F60000840217831EA000008BF84F8247001D05D +:108F700084F82460DFF818A218F0020F06D0E9F791 +:108F800097FEA16A081ADAF81010884718F0010F46 +:108F900018BF4FF0000B0DD0E9F78AFEE16ADAF84E +:108FA0001420081A594690477A48007810F0010FAB +:108FB0002FD10CE018F0020F18BF4FF0010BEBD1CE +:108FC00018F0080F18BF4FF0020BE5D1ECE7DFF8FF +:108FD000BCB1DBF80000007800F00F00072828BFC4 +:108FE00084F8256015D2DBF80000062200F10901A3 +:108FF000A01CF5F7F5F940B9207ADBF800100978E4 +:10900000B0EBD11F08BF012001D04FF0000084F861 +:109010002500E17A4FF0000011F0020F1CBF18F09C +:10902000020F18F0040F19D111F0100F1CBF94F8A3 +:109030003320002A02D094F835207AB111F0080FBD +:109040001CBF94F82420002A08D111F0040F02D08C +:1090500094F8251011B118F0010F01D04FF0010064 +:10906000617A19B168B1FFF7F5FB10E03E484A4953 +:109070000160D5F8000220F00300C5F80002E77295 +:1090800005E001290AD0022918BFFFDF0DD018F032 +:10909000010F14D0DAF80000804745E06672E772ED +:1090A000A7729621227B002006E06672E7720220FA +:1090B000A072227B96210120FFF78FFBE7E718F0D3 +:1090C000020F2AD018F0040F21D1FEF74FF9F0B9A2 +:1090D000FEF75CF9D8B931480168001F0068C0F399 +:1090E000006CC0F3425500F00F03C0F30312C0F34D +:1090F0000320BCF1000F0AD0002B1CBF002A00285F +:1091000005D1002918BF032D38BF48F0040827EA0D +:109110009800DAF80410884706E018F0080F18BF26 +:10912000DAF8080056D08047A07A022818BFBDE8B8 +:10913000F88F207C002808BFBDE8F88F02492FE097 +:10914000741500401C11004000800040488500401C +:1091500014100040ACF501404881004004F5014086 +:1091600004B500404C85004008F501404016004021 +:109170001014004018110040448100404485004014 +:109180001015004000140040141400400415004065 +:10919000100C0020C40000200000040454140040FF +:1091A000C1F8446102281DD0012818BFFFDFE16A21 +:1091B0006069884298BFFFDFD4F81400C9F8000046 +:1091C000A06B4FF4800140F48000A06382480160EE +:1091D000BDE8F88F18F0100F14BFDAF80C00FFDFAD +:1091E000A1D1A1E76169E06A0844E7E738B57B49A6 +:1091F00004460220887201212046FFF763F9784A6D +:1092000004F13D001060774B0020C3F8440176491B +:10921000C1F80001C1F80C01C1F81001C1F8040146 +:10922000C1F81401C1F818017048006800900120CD +:109230009864101D00681168884228BFFFDF38BDA0 +:109240002DE9F843654A88460024917A0125684F44 +:10925000012902D0022903D015E0117E11B912E0D4 +:10926000517E81B1917FD37F05FA01F105FA03F3B5 +:109270001943396092F82010890001F1804101F50D +:10928000C041C1F8104506460220907201213046C7 +:10929000FFF718F9524906F13D000860514AC2F83B +:1092A00044415148C0F80041C0F80C41C0F8104199 +:1092B000C0F80441C0F81441C0F818414B48006898 +:1092C00000909564081D00680968884228BFFFDF88 +:1092D000B8F1000F1CBF4FF400303860BDE8F883D0 +:1092E000022810B50DD0012804BF42F6CE3010BDC3 +:1092F000042817BF082843F6A440FFDF41F66A00A0 +:1093000010BDFDF7E5FF30B9FDF7F9FF002808BFF4 +:1093100041F6583001D041F2643041F29A010844DC +:1093200010BD314910B50020C1F800023049314864 +:109330000860324930480860091D31480860091D3D +:1093400030480860091D30480860091D2F48086032 +:10935000091D2F48086001200BF058FD1E494FF4ED +:109360003810086010BD22494FF43810086070476B +:109370002848016803291BBF00680228012000203B +:109380007047244801680B291BBF00680A28012088 +:109390000020704720490968C9B9204A204913684C +:1093A00070B123F0820343F07D0343F00043136068 +:1093B0000A6822F0100242F0600242F0004205E02A +:1093C00023F0004313600A6822F000420A60034958 +:1093D00081F83D007047000004F50140280C002092 +:1093E00044850040008000400010004018110040FB +:1093F00008F50140000004041011004098F50140F8 +:109400000410004044810040141000401C11004032 +:109410001010004050150040881700403C170040D5 +:109420007C17004010B5404822220021F5F72FF8A4 +:109430003D480024017821F010010170012104F061 +:10944000FFFE3A494FF6FF7081F822408884384980 +:109450000880488010BD704734498A8C824218BF0A +:109460007047002081F822004FF6FF708884704713 +:109470002D49016070472E49088070472B498A8C1E +:10948000A2F57F43FF3B03D00021016008467047EF +:1094900091F822202549012A1ABF016001200020ED +:1094A0007047224901F1220091F82220012A04BFCD +:1094B00000207047012202701D48008888841046F1 +:1094C00070471B49488070471849194B8A8C5B8844 +:1094D0009A4206D191F82220002A1EBF0160012085 +:1094E0007047002070471148114A818C5288914280 +:1094F00009D14FF6FF71818410F8221F19B10021A4 +:10950000017001207047002070470848084A818C8C +:109510005288914205D190F8220000281CBF0020FB +:109520007047012070470000960C0020700C00204E +:10953000CC0000207047584A012340B1012818BFD1 +:1095400070471370086890608888908170475370E6 +:109550000868C2F802008888D08070474E4A10B16F +:10956000012807D00EE0507860B1D2F80200086000 +:10957000D08804E0107828B19068086090898880CD +:109580000120704700207047434910B1012803D0E3 +:1095900006E0487810B903E0087808B10120704768 +:1095A0000020704730B58DB00C4605460D220021D5 +:1095B00004A8F4F76CFFE0788DF81F0020798DF88F +:1095C0001E0060798DF81D00286800906868019081 +:1095D000A8680290E868039068460AF087FF207840 +:1095E0009DF82F1088420CD160789DF82E1088428B +:1095F00007D1A0789DF82D10884202BF01200DB040 +:1096000030BD00200DB030BD30B50C4605468DB0E4 +:109610004FF0030104F1030012B1FDF749FF01E02F +:10962000FDF765FF60790D2220F0C00040F040009A +:109630006071002104A8F4F72AFFE0788DF81F007C +:1096400020798DF81E0060798DF81D002868009043 +:1096500068680190A8680290E868039068460AF07C +:1096600045FF9DF82F0020709DF82E0060709DF83A +:109670002D00A0700DB030BD10B5002904464FF08C +:10968000060102D0FDF714FF01E0FDF730FF60791D +:1096900020F0C000607110BDD0000020FE4840687E +:1096A00070472DE9F0410F46064601461446012059 +:1096B00005F06FF8054696F86500FEF795FC4AF24E +:1096C000B12108444FF47A71B0FBF1F0718840F297 +:1096D00071225143C0EB4100001BA0F55A7402F007 +:1096E0005AFF002818BF1E3CAF4234BF28463846F8 +:1096F000A04203D2AF422CBF3C462C467462BDE868 +:10970000F0812DE9FF4F8BB0044690F86500884644 +:109710000390DDE90D1008430A90E0480027057822 +:109720000C2D28BFFFDFDE4E36F8159094F88851D7 +:109730000C2D28BFFFDFDA4830F81500484480B20E +:10974000009094F87D000D280CBF012000200790A8 +:109750000D98002804BF94F82C0103282BD10798FA +:1097600048B3B4F8AA01404525D1D4F83401C4F86F +:109770002001608840F2E2414843C4F82401B4F873 +:109780007A01B4F806110844C4F82801204602F012 +:109790000CFFB4F8AE01E08294F8AC016075B4F847 +:1097A000B0016080B4F8B201A080B4F8B401E080E8 +:1097B000022084F82C01D4F884010990D4F88001A7 +:1097C0000690B4F80661B4F87801D4F874110191E8 +:1097D0000D9921B194F8401151B100F0D6B804F5BB +:1097E000807104917431059104F5B075091D07E08D +:1097F00004F5AA710491091D059104F5A275091DCE +:109800000891B4F87010A8EB0000A8EB01010FFA62 +:1098100080F90FFA81FBB9F1000F05DAD4F8700175 +:1098200001900120D9460A909C484FF0000A007927 +:10983000A8B3F2F77FFB90B3B4F8180102282ED337 +:1098400094F82C0102282AD094F8430138BB94F8EC +:10985000880100900C2828BFFFDF9148009930F85C +:10986000110000F5C86080B2009094F82C01012826 +:109870007ED0608840F2E2414843009901F0E6F86A +:10988000D4F8342180B206EB0B01A1EB0901821A56 +:1098900001FB02AAC4F83401012084F8430194F8C2 +:1098A0002C01002865D0012800F01482022800F065 +:1098B0007181032818BFFFDF00F04782A7EB0A0180 +:1098C0000198FCF738F90599012640F271220860E9 +:1098D0000898A0F80080002028702E710598006874 +:1098E000A8606188D4F834015143C0EB41006B4952 +:1098F000A0F54E70C8618969814287BF04990860EC +:10990000049801600498616A0068084400F5D47006 +:10991000E86002F040FE10B1E8681E30E8606E7149 +:10992000B4F8F000A0EB080000B20028C4BF032088 +:109930006871079800280E9800F06982E0B100BFB6 +:10994000B4F8181100290CBF0020B4F81A01A4F8CB +:109950001A0194F81C21401C504388420CD26879AB +:10996000401E002808DD6E71B4F81A01401C01E0A9 +:109970000FE05AE0A4F81A010D98002800F06A825E +:1099800094F84001002800F061820FB00220BDE889 +:10999000F08F94F8800003283DD03F4894F865107C +:1099A00090F82C00F7F78DFDE18A40F271225143C7 +:1099B00000EB4100CDF80800D4F82401009901F033 +:1099C00045F8D4F82021D4F82811821A01FB02AA04 +:1099D000C4F820010099029801F038F8D4F8301149 +:1099E000C4F83001411A8A44608840F2E241484399 +:1099F000009901F02BF806EB0B01D4F82821A1EB1C +:109A00000901891AD4F83421C4F83401821A491E94 +:109A100001FB02AA40E7E18A40F27122D4F8240156 +:109A2000514300EB41000290C6E70698002808BFAA +:109A3000FFDF94F86510184890F82C00F7F741FD07 +:109A40000990E08A40F271214143099800EB4100FE +:109A5000009900F0FBFFC4F83001608840F2E24159 +:109A60004843009900F0F2FFC4F8340103A902A8AA +:109A7000FFF7BBF8DDE90160039FE9F7F0F8014665 +:109A80003046FDF769F800F10F06E9F711F9381AC9 +:109A9000801B009006E00000B80C0020E0000020D1 +:109AA000E4620200B4F83401214686B20120D4F801 +:109AB000289004F06EFE074694F86500FEF794FACD +:109AC0004AF2B12108444FF47A7BB0FBFBF0618885 +:109AD00040F271225143C0EB4100801BA0F55A7641 +:109AE00002F059FD002818BF1E3EB94534BF384664 +:109AF0004846B04203D2B9452CBF4E463E46666248 +:109B000094F86500FEF7E9FA00F2E140B0FBFBF1E2 +:109B100006980F1894F86500FEF7DFFA064694F8E9 +:109B20006500FEF761FA30444AF2AB310844B0FBFD +:109B3000FBF1E08A40F2712242430998D4F8306187 +:109B400000EB4200401A801B384400993138471A14 +:109B5000607D40F2E24110FB01F994F8650000904D +:109B600010F00C0F0ABF00984EF62830FEF73CFAB2 +:109B70004AF2B1210844B0FBFBF000EB460000EBD9 +:109B800009060098FEF7B8FA304400F18401FE4857 +:109B9000816193E6E18A40F27122D4F824015143B5 +:109BA00000EB4100009900F051FFC4F830016188DA +:109BB00040F2E2404843009900F048FFC4F8340105 +:109BC00087B221460120D4F828B004F0E2FD814696 +:109BD00094F86500FEF708FA4AF2B12101444FF407 +:109BE0007A70B1FBF0F0618840F271225143C0EB12 +:109BF0004100C01BA0F55A7702F0CDFC002818BF29 +:109C00001E3FCB4534BF48465846B84203D2CB45E9 +:109C10002CBF5F464F4667621EBB0E9808B394F890 +:109C200065603046FEF7E0F94AF2B12101444FF495 +:109C30007A70B1FBF0F0D4F83011E28A084440F2B7 +:109C40007123D4F824115A4301EB42010F1A304614 +:109C5000FEF752FA01460998401A3844A0F120074D +:109C60000AE0E18A40F27122D4F82401514300EB6A +:109C70004100D4F83011471AD4F82821D4F8201123 +:109C8000D4F8300101FB0209607D40F2E24110FB93 +:109C900001FB94F8656016F00C0F0ABF30464EF6D3 +:109CA0002830FEF7A1F94AF2B12101444FF47A704D +:109CB000B1FBF0F000EB490000EB0B093046FEF77A +:109CC0001BFA484400F16001AF488161012084F82B +:109CD0002C01F3E5618840F271225143D4F834013C +:109CE000D4F82821C0EB410101FB09F706EB0B0179 +:109CF000891AD4F820C1D4F83031491E0CFB023245 +:109D000001FB0029607D40F2E24110FB01FB94F869 +:109D1000656016F00C0F0ABF30464EF62830FEF78D +:109D200063F94AF2B12101444FF47A70B1FBF0F0CB +:109D300000EB490000EB0B093046FEF7DDF9484423 +:109D400000F1600190488161B8E5618840F27122BC +:109D5000D4F834015143C0EB410000FB09F794F8FB +:109D60007C0024281CBF94F87D0024280BD1B4F873 +:109D7000AA01A8EB000000B2002804DB94F8AD01B2 +:109D8000002818BF03900A9800B3FEB9099800286C +:109D90001ABF06980028FFDF94F8650010F00C0F3A +:109DA00014BF4EF62830FEF71FF94AF2B1210144E4 +:109DB0004FF47A70B1FBF0F03F1A94F86500FEF7AB +:109DC0009BF90999081A3844A0F12007D4F83411F6 +:109DD00006EB0B0000FB01F6039810F00C0F0ABF16 +:109DE00003984EF62830FEF7FFF84AF2B1210144FD +:109DF0004FF47A70B1FBF0F000EB46060398FEF7E3 +:109E00007BF9304400F160015F48816156E500282C +:109E10007FF496AD94F82C0100283FF4ADAD618835 +:109E200040F27122D4F834015143C0EB410128467D +:109E3000F7F712F90004000C3FF49EAD18990029C1 +:109E400018BF088001200FB0BDE8F08F94F87C01A6 +:109E5000FCF7D1FC94F87C012946FCF7B0FB20B15B +:109E60000D9880F0010084F841010FB00020BDE89A +:109E7000F08F2DE9F843454C0246434F00266168B8 +:109E8000606A052A60D2DFE802F003464B4F5600B5 +:109E9000A07A002560B101216846FDF709FB9DF815 +:109EA000000042F210710002B0FBF1F201FB12055A +:109EB000F4F720FE4119A069FBF73DFEA06126746E +:109EC000032060754FF0010884F81480607AD0B9DF +:109ED000A06A80B1F4F70EFE0544F4F785FC411941 +:109EE000A06A884224BF401BA06204D2C4F8288024 +:109EF000F5F72BFE07E0207B04F11001FCF75FFB78 +:109F0000002808BFFFDF2684FCF739F87879BDE820 +:109F1000F843E8F7F9BFBDE8F843002100F0B3BD0E +:109F2000C1F88001BDE8F883D1F88001BDE8F843AD +:109F3000012100F0A8BD84F83060FCF720F87879A2 +:109F4000BDE8F843E8F7E0BFFFDFBDE8F8832DE99F +:109F5000F04F0E4C824683B020788B4601270025B7 +:109F6000094E4FF00209032804BF207B50457DD1E4 +:109F7000606870612078032818BFFFDF4FF0030886 +:109F8000BBF1080F73D203E0E0000020B80C002002 +:109F9000DFE80BF0040F32322D9999926562F5F7E4 +:109FA000ABF9002818BFFFDF86F8028003B0BDE8D8 +:109FB000F08FF4F77AFF68B9F4F716FC0546E0690C +:109FC000A84228BFE56105D2281A0421FCF7F7FD55 +:109FD000E56138B1F5F723FD002818BFFFDF03B0B6 +:109FE000BDE8F08F03B00020BDE8F04F41E703B0BB +:109FF000BDE8F04FFEF7FFBD2775257494F83000DB +:10A000004FF0010A58B14FF47A71A069FBF793FD44 +:10A01000A061002104F11000F7F71EF80EE0F4F73C +:10A0200069FD82465146A069FBF785FDA061514656 +:10A0300004F11000F7F710F800F1010A208C411C20 +:10A040000A293CBF50442084606830B1208C401CF9 +:10A050000A2828BF84F8159001D284F81580607A08 +:10A06000A8B9A06AE8B1F4F745FD01E02FE02AE0C5 +:10A070008046F4F7B9FB00EB0801A06A884224BFD0 +:10A08000A0EB0800A0620CD2A762F5F75EFD207B72 +:10A09000FCF74BF82570707903B0BDE8F04FE8F796 +:10A0A00033BF207B04F11001FCF789FA002808BFB8 +:10A0B000FFDF03B0BDE8F08F207BFCF736F825709A +:10A0C00003B0BDE8F08FFFDF03B0BDE8F08FBAF159 +:10A0D000200F28BFFFDFDFF8E886072138F81A00D5 +:10A0E000F9F7E4FE040008BFFFDFBAF1200F28BF34 +:10A0F000FFDF38F81A002188884218BFFFDF4FF0D1 +:10A10000200A7461BBF1080F80F06181DFE80BF079 +:10A110000496A0A099FEFDFCC4F88051F580C4F817 +:10A12000845194F8410138B9FCF71EF8D4F84C1169 +:10A13000FCF712FD00281BDCB4F83E11B4F87000E7 +:10A14000814206D1B4F8F410081AA4F8F6002046AB +:10A1500005E0081AA4F8F600B4F83E112046A4F869 +:10A160007010D4F86811C4F84C11C0F870111DE0DB +:10A17000B4F83C11B4F87000081AA4F8F600B4F86A +:10A180003C112046A4F87010D4F84C11C4F86811A2 +:10A19000C4F87011D4F85411C4F80011D4F858114F +:10A1A000C4F87411B4F85C11A4F8781102F008F93D +:10A1B000FBF7B4FF804694F86500FDF715FF4AF2FF +:10A1C000B12108444FF47A71B0FBF1F0D4F83411A6 +:10A1D00040F27122084461885143C0EB4100A0F174 +:10A1E000300AB8F1B70F98BF4FF0B70821460120E9 +:10A1F00004F0CFFA4044AAEB0000A0F21D38A246BA +:10A200002146012004F0C5FADAF824109C3081427E +:10A2100088BF0D1AC6F80C80454528BF4546B56075 +:10A22000D4F86C01A0F5D4703061FCF762FC84F8BE +:10A23000407186F8029003B0BDE8F08F02F0A6F9F5 +:10A2400001E0FEF7D8FC84F8407103B0BDE8F08F60 +:10A25000FBF78AFFD4F8702101461046FCF77CFC1E +:10A2600048B1628840F27123D4F834115A43C1EBEB +:10A270004201B0FBF1F094F87D100D290FD0B4F835 +:10A280007010B4F83E210B189A42AEBF501C401C0F +:10A290000844A4F83E0194F8420178B905E0B4F806 +:10A2A0003E01401CA4F83E0108E0B4F83E01B4F8B9 +:10A2B000F410884204BF401CA4F83E01B4F87A01AF +:10A2C0000DF1040B401CA4F87A01B4F89A00B4F81C +:10A2D0009810401AB4F87010401E08441FFA80F914 +:10A2E0000BE000231A462046CDF800B0FFF709FA2C +:10A2F00068B3012818BFFFDF48D0B4F83E11A9EBBE +:10A30000010000B2002802E053E047E05FE0E8DA35 +:10A31000082084F88D0084F88C70204601F012FE2D +:10A3200084F82C5194F87C514FF6FF77202D00D300 +:10A33000FFDF28F8157094F87C01FBF7F6FE84F82F +:10A340007CA1707903B0BDE8F04FE8F7DDBDA06EE9 +:10A35000002804BF03B0BDE8F08FB4F83E01B4F8A4 +:10A360009420801A01B20029DCBF03B0BDE8F08F51 +:10A37000B4F86C000144491E91FBF0F189B201FB75 +:10A380000020A4F8940003B0BDE8F08FB4F83E01BB +:10A39000BDF804100844A4F83E01AEE7FEF7E4FA65 +:10A3A000FEF729FC4FF0E020C0F8809203B0BDE832 +:10A3B000F08F94F82C01042818BFFFDF84F82C518B +:10A3C00094F87C514FF6FF77202DB2D3B0E7FFDF32 +:10A3D00003B0BDE8F08F10B5FA4C207850B10120E1 +:10A3E0006072F5F7D8FB2078032805D0207A002882 +:10A3F00008BF10BD0C2010BD207BFCF7FCF9207BB2 +:10A40000FCF765FC207BFBF790FE002808BFFFDF10 +:10A410000020207010BD2DE9F04FEA4F83B038784E +:10A4200001244FF0000840B17C720120F5F7B3FB26 +:10A430003878032818BF387A0DD0DFF88C9389F864 +:10A44000034069460720F9F7BAFC002818BFFFDF70 +:10A450004FF6FF7440E0387BFCF7CDF9387BFCF712 +:10A4600036FC387BFBF761FE002808BFFFDF87F86A +:10A470000080E2E7029800281CBF90F82C11002908 +:10A480002AD00088A0421CBFDFF834A34FF0200B75 +:10A490003AD00721F9F70AFD040008BFFFDF94F85E +:10A4A0007C01FCF714FC84F82C8194F87C514FF665 +:10A4B000FF76202D28BFFFDF2AF8156094F87C0175 +:10A4C000FBF733FE84F87CB169460720F9F777FC87 +:10A4D000002818BFFFDF12E06846F9F74EFC00289D +:10A4E000C8D011E0029800281CBF90F82C11002958 +:10A4F00005D00088A0F57F41FF39CAD104E0684645 +:10A50000F9F73BFC0028EDD089F8038087F830800C +:10A5100087F80B8003B00020BDE8F08FAA4948718E +:10A520000020887001220A7048700A71C870A5491D +:10A53000087070E7A449087070472DE9F84FA14CE6 +:10A5400006460F462078002862D1A048FBF792FD0E +:10A55000207320285CD04FF00308666084F80080E8 +:10A56000002565722572AEB1012106F58E70FCF7EB +:10A57000BEFF0620F9F742FC81460720F9F73EFCB2 +:10A5800096F81C114844B1FBF0F200FB1210401C7D +:10A5900086F81C01FBF7C2FD40F2F651884238BF35 +:10A5A00040F2F65000F5A0701FFA80F9F4F7A2FA15 +:10A5B000012680B3A672F4F717F9E061FBF7D4FD2A +:10A5C000824601216846FCF769FF9DF8000042F2CF +:10A5D00010710002B0FBF1F201FB120000EB090167 +:10A5E0005046FBF7A8FAA762A061267584F815808B +:10A5F0002574207B04F11001FBF7E1FF002808BF60 +:10A60000FFDF25840020F5F7C6FA0020BDE8F88FAB +:10A610000C20BDE8F88FFFE7E761FBF7A5FD494691 +:10A62000FBF789FAA061A57284F830600120FDF77C +:10A6300054FD4FF47A7100F2E140B0FBF1F0381AAA +:10A64000A0F5AB60A5626063CFE75F4948707047D3 +:10A650005D49087170475B4810B5417A00291CBFFD +:10A66000002010BD816A51B990F8301039B1416AAB +:10A67000406B814203D9F5F768FA002010BD012034 +:10A6800010BD2DE9F041504C0646E088401CE080AA +:10A69000D4E902516078D6F8807120B13A46284654 +:10A6A000F6F705FD0546A068854205D02169281A00 +:10A6B00008442061FCF71DFAA560AF4209D896F85E +:10A6C0002C01012805D0E078002804BF0120BDE856 +:10A6D000F0810020BDE8F08110B504460846FDF782 +:10A6E00083FC4AF2B12108444FF47A71B0FBF1F0D7 +:10A6F00040F2E241614300F54E7081428CBF081A7E +:10A70000002010BD70B5044682B0002084F84001DE +:10A7100094F8FB00002807BF94F82C01032802B02E +:10A7200070BDFBF721FDD4F8702101461046FCF7FF +:10A7300013FA0028DCBF02B070BD628840F27123BA +:10A74000D4F834115A43C1EB4201B0FBF1F0B4F834 +:10A750007010401C0844A4F83C01B4F8F400B4F8AC +:10A760003C21801A00B20028DCBF02B070BD01207D +:10A7700084F84201B4F89A00B4F8982001AE801A27 +:10A78000401E084485B212E00096B4F83C11002344 +:10A7900001222046FEF7B5FF002804BF02B070BDBD +:10A7A000012815D0022812BFFFDF02B070BDB4F837 +:10A7B0003C01281A00B20028BCBF02B070BDE3E71C +:10A7C000F00C0020B80C0020E00000204F9F01009A +:10A7D000B4F83C01BDF804100844A4F83C01E6E7D5 +:10A7E000F8B50422002506295BD2DFE801F0072630 +:10A7F0000319192A044680F82C2107E00446C948A9 +:10A80000C078002818BF84F82C210AD0FBF7B7FBCA +:10A81000A4F87A51B4F87000A4F83E0184F84251CB +:10A82000F8BD0095B4F8F410012300222046FEF78D +:10A8300068FF002818BFFFDFE8E7032180F82C112C +:10A84000F8BD0646876AB0F83401314685B201206A +:10A8500003F09FFF044696F86500FDF7C5FB4AF23A +:10A86000B12108444FF47A71B0FBF1F0718840F2E5 +:10A8700071225143C0EB4100401BA0F55A7501F015 +:10A880008AFE002818BF1E3DA74234BF2046384626 +:10A89000A84228BF2C4602D2A74228BF3C46746279 +:10A8A000F8BDFFDFF8BD2DE9F05F9E4EB1780229BB +:10A8B00006BFF1880029BDE8F09F7469C4F88401DF +:10A8C00094F86500FDF718FCD4F88411081AB168F3 +:10A8D0000144B160F1680844F060746994F8430180 +:10A8E000002808BFBDE8F09F94F82C01032818BF8A +:10A8F000BDE8F09F94F8655037780C2F28BFFFDF34 +:10A90000894E36F8178094F888710C2F28BFFFDF26 +:10A9100036F81700404494F8888187B2B8F10C0FDC +:10A9200028BFFFDF36F8180000F5C8601FFA80F86E +:10A930002846FDF7E1FBD4F884114FF0000A0E1A07 +:10A9400015F00C0F0ABF28464EF62830FDF74CFBD9 +:10A950004FF47A7900F2E730B0FBF9F0361A284666 +:10A96000FDF7CAFBD4F8001115F00C0FA1EB000B9A +:10A970000ABF28464EF62830FDF736FB4AF2B121D1 +:10A980000844B0FBF9F0ABEB0000A0F160017943A3 +:10A99000B1FBF8F1292202EB50006031A0EB51022B +:10A9A00000EB5100B24201D8B04201D8F1F774FB7C +:10A9B000608840F2E2414843394600F047F8C4F865 +:10A9C000340184F843A1BDE8F09F70B505465548B1 +:10A9D00090F802C0BCF1020F07BF406900F5C074D7 +:10A9E000524800F12404002904BF256070BD4FF4D3 +:10A9F0007A7601290DD002291CBFFFDF70BD1046F9 +:10AA0000FEF76EFC00F2E140B0FBF6F0281A206081 +:10AA100070BD1846FDF761FB00F2E140B0FBF6F0B7 +:10AA2000281A206070BD4148007800281CBF002013 +:10AA3000704710B50720F9F7D3F980F0010010BD79 +:10AA40003A480078002818BF0120704730B5024608 +:10AA50000020002908BF30BDA2FB0110490A41EACD +:10AA6000C051400A4C1C40F100000022D4F1FF31DB +:10AA700040F2A17572EB000038BFFFDF04F5F4600F +:10AA8000B0FBF5F030BD2DE9F843284C0025814698 +:10AA900084F83050D4F8188084F82C10E5722570B2 +:10AAA0000127277239466068F5F792FD6168C1F8A1 +:10AAB0007081267B81F87C61C1F88091C1F8748136 +:10AAC000B1F80080202E28BFFFDF194820F816803B +:10AAD000646884F82C510023A4F878511A4619466A +:10AAE00020460095FEF70DFE002818BFFFDFC4F8D2 +:10AAF0002851C4F8205184F82C71A4F83E51A4F8D0 +:10AB00003C5184F84251B4F87000401EA4F8700023 +:10AB1000A4F87A51FBF733FA02484079BDE8F843CC +:10AB2000E8F7F2B9E0000020E4620200B80C00206F +:10AB3000F00C0020012804D0022805D0032808D1F9 +:10AB400005E0012907D004E0022904D001E004292E +:10AB500001D000207047012070472DE9F0410E46DA +:10AB6000044603F08AFC0546204603F08AFC0446AE +:10AB7000F6F770FBFB4F010015D0386990F86420A0 +:10AB80008A4210D090F8C0311BB190F8C2312342F4 +:10AB90001FD02EB990F85D30234201D18A4218D8D7 +:10ABA00090F8C001A8B12846F6F754FB70B1396996 +:10ABB00091F86520824209D091F8C00118B191F84E +:10ABC000C301284205D091F8C00110B10120BDE8B1 +:10ABD000F0810020FBE730B5E24C85B0E069002849 +:10ABE0005FD0142200216846F3F751FC206990F8E9 +:10ABF0006500FDF7F9F94FF47A7100F5FA70B0FBD2 +:10AC0000F1F5206990F86500FDF776FA2844ADF873 +:10AC1000060020690188ADF80010B0F87010ADF89A +:10AC200004104188ADF8021090F8A20130B1A0697B +:10AC3000C11C039103F002FB8DF81000206990F80D +:10AC4000A1018DF80800E169684688472069002164 +:10AC500080F8A21180F8A1110399002921D090F861 +:10AC6000A01100291DD190F87C10272919D09DF83A +:10AC70001010039A002914D013780124FF2B12D04E +:10AC8000072B0ED102290CD15178FF2909D100BF21 +:10AC900080F8A0410399C0F8A4119DF8101080F825 +:10ACA000A31105B030BD1B29F2D9FAE770B5AD4C40 +:10ACB000206990F87D001B2800D0FFDF2069002567 +:10ACC00080F8A75090F8D40100B1FFDF206990F818 +:10ACD000A81041B180F8A8500188A0F8D81180F8D8 +:10ACE000D6510E2108E00188A0F8D81180F8D6517D +:10ACF000012180F8DA110D2180F8D4110088F9F7CC +:10AD000006FAF8F79FFE2079E8F7FEF8206980F848 +:10AD10007D5070BD70B5934CA07980072CD5A0787C +:10AD2000002829D162692046D37801690D2B01F1F1 +:10AD300070005FD00DDCA3F102034FF001050B2B77 +:10AD400019D2DFE803F01A1844506127182C183A7A +:10AD50006400152B6FD008DC112B4BD0122B5AD06E +:10AD6000132B62D0142B06D166E0162B71D0172B53 +:10AD700070D0FF2B6FD0FFDF70BD91F87F200123D3 +:10AD80001946F6F7FFF80028F6D12169082081F866 +:10AD90007F0070BD1079BDE8704001F090BC91F863 +:10ADA0007E00C00700D1FFDF01F048FC206910F8E9 +:10ADB0007E1F21F00101017070BD91F87D00102807 +:10ADC00000D0FFDF2069112180F8A75008E091F83A +:10ADD0007D00142800D0FFDF2069152180F8A750DE +:10ADE00080F87D1070BD91F87D00152800D0FFDF40 +:10ADF000172005E091F87D00152800D0FFDF19200D +:10AE0000216981F87D0070BDBDE870404EE7BDE866 +:10AE1000704001F028BC91F87C2001230021F6F756 +:10AE2000B1F800B9FFDF0E200FE011F87E0F20F01F +:10AE3000040008701DE00FE091F87C200123002140 +:10AE4000F6F7A0F800B9FFDF1C20216981F87C002B +:10AE500070BD12E01BE022E091F87E00C0F301100B +:10AE6000012800D0FFDF206910F87E1F21F01001BB +:10AE70000170BDE8704001F0E1BB91F87C20012336 +:10AE80000021F6F77FF800B9FFDF1F20DDE791F81A +:10AE90007D00212801D000B1FFDF2220B0E7BDE80E +:10AEA000704001F0D7BB2F48016991F87E2013074D +:10AEB00002D501218170704742F0080281F87E209E +:10AEC0008069C07881F8E10001F0AFBB10B5254C76 +:10AED00021690A88A1F8162281F8140291F8640009 +:10AEE00001F091FB216981F8180291F8650001F0E9 +:10AEF0008AFB216981F81902012081F812020020E1 +:10AF000081F8C0012079BDE81040E7F7FDBF10B51A +:10AF1000144C05212069FFF763FC206990F85A1052 +:10AF2000012908D000F5F57103F001FC2079BDE896 +:10AF30001040E7F7E9BF022180F85A1010BD10B5A4 +:10AF4000084C01230921206990F87C207030F6F725 +:10AF500019F848B12169002001F8960F087301F82B +:10AF60001A0C10BD000100200120A070F9E770B597 +:10AF7000F74D012329462869896990F87C200979D1 +:10AF80000E2A01D1122903D000241C2A03D004E088 +:10AF9000BDE87040D3E7142902D0202A07D008E08A +:10AFA00080F87C4080F8A240BDE87040AFE71629E9 +:10AFB00006D0262A01D1162902D0172909D00CE083 +:10AFC00000F87C4F80F82640407821280CD01A20C9 +:10AFD00017E090F87D20222A07D0EA69002A03D0E2 +:10AFE000FF2901D180F8A23132E780F87D4001F0DD +:10AFF00025FB286980F8974090F8C0010028F3D01D +:10B000000020BDE8704061E710B5D14C216991F88E +:10B010007C10202902D0262902D0A2E7FFF756FF94 +:10B020002169002081F87C0081F8A20099E72DE9D0 +:10B03000F843C74C206990F87C10202908D00027DD +:10B0400090F87D10222905D07FB300F17C0503E044 +:10B050000127F5E700F17D0510F8B01F41F004016C +:10B060000170A06903F015FA4FF00108002608B33B +:10B070003946A069FFF771FDE0B16A46A169206910 +:10B08000F6F7F7F890B3A06903F001FA2169A1F887 +:10B09000AA01B1F8701001F0AAFA40B32069282182 +:10B0A00080F88D1080F88C8058E0FFE70220A070B7 +:10B0B000BDE8F883206990F8C00110B11E20FFF7A9 +:10B0C00005FFAFB1A0692169C07881F8E20008FAF4 +:10B0D00000F1C1F3006000B9FFDF20690A2180F8A8 +:10B0E0007C1090F8A20040B9FFDF06E009E02AE0FA +:10B0F0002E7001F0A3FAFFF7D6FE206980F8976062 +:10B10000D6E7226992F8C00170B1B2F8703092F8B7 +:10B110006410B2F8C40102F5D572F6F79BF968B174 +:10B120002169252081F87C00206900F17D0180F8EB +:10B1300097608D4212D180F87D600FE00020FFF70C +:10B14000C5FE2E70F0E720699DF8001080F8AC1164 +:10B150009DF8011080F8AD1124202870206900F1BD +:10B160007D018D4203D1BDE8F84301F067BA80F854 +:10B17000A2609DE770B5764C01230B21206990F801 +:10B180007D207030F5F7FEFE202650BB206901239C +:10B19000002190F87D207030F5F7F4FE0125F0B124 +:10B1A000206990F87C0024281BD0A06903F04FF997 +:10B1B000C8B1206990F8B01041F0040180F8B010D7 +:10B1C000A1694A7902F0070280F85D20097901F04F +:10B1D000070180F85C1090F8C1311BBB06E0A57038 +:10B1E00036E6A67034E6BDE870405CE690F8C03103 +:10B1F000C3B900F164035E788E4205D1197891429B +:10B2000002D180F897500DE000F503710D700288AF +:10B210004A8090F85C200A7190F85D0048712079AE +:10B22000E7F772FE2169212081F87D00BDE87040BA +:10B2300001F0FBB9F8B5464C206990F87E0010F09B +:10B24000300F04D0A07840F00100A070F8BDA069D4 +:10B2500003F0E2F850B3A06903F0D8F80746A069FC +:10B2600003F0D8F80646A06903F0CEF80546A069B9 +:10B2700003F0CEF801460097206933462A46303065 +:10B2800003F0BFF9A079800703D56069C07814285E +:10B290000FD0216991F87C001C280AD091F85A003F +:10B2A00001280ED091F8B70158B907E0BDE8F84081 +:10B2B000F9E52169012081F85A0002E091F8B60110 +:10B2C00030B1206910F87E1F41F0100101700EE0CE +:10B2D00091F87E0001F5FC7240F0200081F87E00BC +:10B2E00031F8300B03F017FA2079E7F70DFEBDE8CF +:10B2F000F84001F09AB970B5154C206990F87E10AD +:10B30000890707D590F87C20012308217030F5F7D4 +:10B3100039FEF8B1206990F8AA00800712D4A0691C +:10B3200003F056F8216981F8AB00A06930F8052FC9 +:10B33000A1F8AC204088A1F8AE0011F8AA0F40F0A7 +:10B3400002000870206990F8AA10C90705D011E022 +:10B35000000100200120A0707AE590F87E008007AF +:10B3600000D5FFDF206910F87E1F41F00201017057 +:10B3700001F05BF92069002590F87C10062906D1C0 +:10B3800080F87C5080F8A2502079E7F7BDFD206955 +:10B3900090F8A8110429DFD180F8A8512079E7F7A7 +:10B3A000B3FD206990F87C100029D5D180F8A25017 +:10B3B0004EE570B5FB4C01230021206990F87D20FB +:10B3C0007030F5F7DFFD012578B9206990F87D2010 +:10B3D000122A0AD0012305217030F5F7D3FD10B1F0 +:10B3E0000820A07034E5A57032E5206990F8A80027 +:10B3F00008B901F01AF92169A06901F5847102F018 +:10B40000C8FF2169A069D83102F0CEFF206990F809 +:10B41000DC0100B1FFDF21690888A1F8DE0101F538 +:10B42000F071A06902F0A3FF2169A06901F5F47130 +:10B4300002F0A5FF206980F8DC51142180F87D100E +:10B440002079BDE87040E7F75FBD70B5D54C0123AA +:10B450000021206990F87D207030F5F793FD0125DB +:10B46000A8B1A06902F04FFF98B1A0692169B0F8B6 +:10B470000D00A1F8AA01B1F8701001F0B8F858B1A8 +:10B480002069282180F88D1080F88C50E0E4A570A8 +:10B49000DEE4BDE8704006E5A0692169027981F823 +:10B4A000AC21B0F80520A1F8AE2102F01FFF216900 +:10B4B000A1F8B001A06902F01CFF2169A1F8B20156 +:10B4C000A06902F01DFF2169A1F8B4010D2081F8E7 +:10B4D0007D00BDE47CB5B34CA079C00738D0A0692D +:10B4E00001230521C578206990F87D207030F5F79B +:10B4F00049FD68B1AD1E0A2D06D2DFE805F0090945 +:10B500000505090905050909A07840F00800A070A3 +:10B51000A07800281CD1A06902F0BEFE00286ED0E1 +:10B52000A0690226C5781DB1012D01D0162D18D1B4 +:10B53000206990F87C00F5F70DFD90B1216991F834 +:10B540007C001F280DD0202803D0162D16D0A67001 +:10B550007CBD262081F87C00162D02D02A20FFF722 +:10B56000B5FC0C2D5BD00CDC0C2D48D2DFE805F0CF +:10B5700036331F48BEBE4BB55ABE393C2020A070A2 +:10B580007CBD0120142D6ED008DC0D2D6CD0112D4A +:10B590006BD0122D6ED0132D31D168E0152D7FD0D8 +:10B5A000162D6FD0182D6ED0FF2D28D198E0206970 +:10B5B0000123194690F87F207030F5F7E3FC00284E +:10B5C00008D1A06902F0CCFE216981F88E01072024 +:10B5D00081F87F008CE001F0EDF889E0FFF735FF9E +:10B5E00086E001F0C7F883E0206990F87D1011290A +:10B5F00001D0A6707CE0122180F87D1078E075E023 +:10B60000FFF7D7FE74E0206990F87D001728F0D18D +:10B6100001F014F821691B2081F87D0068E0FFF734 +:10B620006AFE65E0206990F87E00C00703D0A0782C +:10B6300040F0010023E06946A06902F0D0FE9DF8C9 +:10B64000000000F02501206900F8B01F9DF80110EE +:10B6500001F04901417000F0E8FF206910F87E1FF9 +:10B6600041F0010117E018E023E025E002E0FFF7D8 +:10B6700066FC3DE0216991F87E10490704D5A07071 +:10B6800036E00DE00FE011E000F0CFFF206910F888 +:10B690007E1F41F0040101702AE0FFF7CBFD27E097 +:10B6A00001F030F824E0FFF765FD21E0FFF7BFFC73 +:10B6B0001EE0A06900790DE0206910F8B01F41F08C +:10B6C00004010170A06902F0F7FE162810D1A069EC +:10B6D00002F0F6FEFFF798FC0AE0FFF748FC07E0EF +:10B6E000E16919B1216981F8A20101E0FFF7DBFBF3 +:10B6F0002169F1E93002401C42F10002C1E9000277 +:10B700007CBD70B5274CA07900074AD5A0780028E9 +:10B7100047D1206990F8E400FE2800D1FFDF2069BE +:10B72000FE21002580F8E41090F87D10192906D13B +:10B7300080F8A75000F082FF206980F87D502069D2 +:10B7400090F87C101F2902D0272921D119E090F808 +:10B750007D00F5F7FFFB78B120692621012380F8F1 +:10B760007C1090F87D200B217030F5F70BFC78B938 +:10B770002A20FFF7ABFB0BE02169202081F87C0039 +:10B7800006E0012180F8A11180F87C5080F8A250D9 +:10B79000206990F87F10082903D10221217080F8D8 +:10B7A000E41021E40001002010B5FD4C216991F85E +:10B7B000AC210AB991F8642081F8642091F8AD2198 +:10B7C0000AB991F8652081F8652010B10020FFF7D3 +:10B7D0007DFB206902F041FF002806D02069BDE80A +:10B7E000104000F5F57102F0A2BF16E470B5EC4C04 +:10B7F00006460D46206990F8E400FE2800D0FFDFE1 +:10B800002269002082F8E46015B1A2F8A400E7E400 +:10B8100022F89E0F01201071E2E470B5E04C012384 +:10B820000021206990F87C207030F5F7ABFB0028F0 +:10B830007BD0206990F8B61111B190F8B71139B1E9 +:10B8400090F8C01100296FD090F8C11119B36BE0C6 +:10B8500090F87D1024291CD090F87C10242918D051 +:10B860005FF0000300F5D67200F5DB7102F096FE82 +:10B870002169002081F8B60101461420FFF7B6FFC8 +:10B88000216901F13000C28A21F8E62F408B4880FF +:10B8900050E00123E6E790F87D2001230B21703072 +:10B8A000F5F770FB68BB206990F8640000F0ABFE10 +:10B8B0000646206990F8650000F0A5FE054620695F +:10B8C00090F8C2113046FFF735F9D8B1206990F8E9 +:10B8D000C3112846FFF72EF9A0B12269B2F87030E3 +:10B8E00092F86410B2F8C40102F5D572F5F7B2FD12 +:10B8F00020B12169252081F87C001BE00020FFF7A2 +:10B90000E5FA11E020690123032190F87D207030D1 +:10B91000F5F738FB40B920690123022190F87D201A +:10B920007030F5F72FFB08B1002059E400211620F4 +:10B93000FFF75CFF012053E410B5E8BB984C206989 +:10B9400090F87E10CA0702D00121092052E08A0730 +:10B950000AD501210C20FFF749FF206910F8AA1F22 +:10B9600041F00101017047E04A0702D5012113208F +:10B9700040E00A0705D510F8E11F417101210720B9 +:10B9800038E011F0300F3BD090F8B711A1B990F822 +:10B99000B611E1B190F87D1024292FD090F87C10D9 +:10B9A00024292BD05FF0000300F5D67200F5DB717F +:10B9B00002F0F4FD216900E022E011F87E0F20F092 +:10B9C000200040F010000870002081F83801206944 +:10B9D00090F87E10C90613D502F03FFEFFF797FAE4 +:10B9E000216901F13000C28A21F8E62F408B48809E +:10B9F00001211520FFF7FAFE0120F6E60123D3E727 +:10BA00000020F2E670B5664C206990F8E410FE293B +:10BA100078D1A178002975D190F87F2001231946AB +:10BA20007030F5F7AFFA00286CD1206990F88C11CE +:10BA300049B10021A0F89C1090F88D1180F8E61013 +:10BA4000002102205BE090F87D200123042170306A +:10BA5000F5F798FA0546FFF76FFF002852D1284600 +:10BA600000F00CFF00284DD120690123002190F83F +:10BA70007C207030F5F786FA78B120690123042123 +:10BA800090F87D207030F5F77DFA30B9206990F894 +:10BA9000960010B10021122031E0206990F87C203E +:10BAA0000A2A0DD0002D2DD1012300217030F5F789 +:10BAB00069FA78B1206990F8A81104290AD105E043 +:10BAC00010F8E21F01710021072018E090F8AA0089 +:10BAD000800718D0FFF7A1FE002813D120690123A9 +:10BAE000002190F87C207030F5F74CFA002809D03E +:10BAF000206990F8A001002804D00021FF20BDE8B3 +:10BB0000704073E609E000210C20FFF76FFE20690A +:10BB100010F8AA1F41F0010101701DE43EB5054671 +:10BB20006846FDF7ABFC00B9FFDF22220021009838 +:10BB3000F2F7ADFC0321009802F096FB0098017823 +:10BB400021F010010170294602F0B3FB144C0D2DB9 +:10BB500043D00BDCA5F102050B2D19D2DFE805F06F +:10BB600022184B191922185718192700152D5FD0C4 +:10BB700008DC112D28D0122D0BD0132D09D0142D37 +:10BB800006D155E0162D2CD0172D6AD0FF2D74D07C +:10BB9000FFDFFDF786FC002800D1FFDF3EBD00007F +:10BBA000000100202169009891F8E61017E0E26892 +:10BBB00000981178017191884171090A8171518849 +:10BBC000C171090A0172E4E70321009802F072FCD6 +:10BBD0000621009802F072FCDBE700980621017153 +:10BBE000D7E70098D4F8101091F8C221027191F8AB +:10BBF000C3114171CDE72169009801F5887102F008 +:10BC0000D7FB21690098DC3102F0DCFBC1E7FA497F +:10BC1000D1E90001CDE90101206901A990F8B00046 +:10BC200000F025008DF80400009802F006FCB0E753 +:10BC30002069B0F84810009802F0D6FB2069B0F8EF +:10BC4000E810009802F0D4FB2069B0F84410009886 +:10BC500002F0D2FB2069B0F8E610009802F0D0FBA9 +:10BC600097E7216991F8C00100280098BCD111F82C +:10BC7000642F02714978BCE7FFE7206990F8A3219F +:10BC8000D0F8A411009802F022FB82E7DB4810B53F +:10BC9000006990F8821041B990F87D2001230621B7 +:10BCA0007030F5F76FF9002800D001209DE570B5E0 +:10BCB000D24D286990F8801039B1012905D00229A8 +:10BCC00006D0032904D0FFDF03E4B0F8F41037E016 +:10BCD00090F87F10082936D0B0F89810B0F89A2064 +:10BCE00000248B1C9A4206D3511A891E0C04240C82 +:10BCF00001D0641EA4B290F8961039B190F87C205F +:10BD0000012309217030F5F73DF940B3FFF7BEFF7D +:10BD100078B129690020B1F89020B1F88E108B1C01 +:10BD20009A4203D3501A801E00D0401EA04200D277 +:10BD300084B20CB1641EA4B22869B0F8F410214496 +:10BD4000A0F8F0102DE5B0F898100329BDD330F815 +:10BD5000701F428D1144491CA0F8801021E5002479 +:10BD6000EAE770B50C4605464FF4087200212046FC +:10BD7000F2F78DFB258014E5F8F7A2B92DE9F04123 +:10BD80000D4607460721F8F791F8041E3CD094F8B9 +:10BD9000C8010026A8B16E70092028700BE0268427 +:10BDA00084F8C861D4F8CA016860D4F8CE01A860EC +:10BDB000B4F8D201A88194F8C8010028EFD12E71FF +:10BDC000AEE094F8D40190B394F8D4010D2813D0C8 +:10BDD0000E2801D0FFDFA3E02088F8F798F9074686 +:10BDE000F7F745FE78B96E700E20287094F8D601EA +:10BDF00028712088E88014E02088F8F788F9074641 +:10BE0000F7F735FE10B10020BDE8F0816E700D200F +:10BE1000287094F8D60128712088E88094F8DA0117 +:10BE2000287284F8D4613846F7F71BFE78E0FFE704 +:10BE300094F80A0230B16E701020287084F80A62FB +:10BE4000AF806DE094F8DC0190B16E700A2028702C +:10BE50002088A880D4F8E011C5F80610D4F8E411C1 +:10BE6000C5F80A10B4F8E801E88184F8DC6157E00D +:10BE700094F8040270B16E701A20287005E000BFBB +:10BE800084F80462D4F80602686094F8040200287A +:10BE9000F6D145E094F8EA0188B16E70152028705B +:10BEA00008E000BF84F8EA6104F5F6702B1D07C8AE +:10BEB00083E8070094F8EA010028F3D130E094F811 +:10BEC000F80170B16E701C20287084F8F861D4F805 +:10BED000FA016860D4F8FE01A860B4F80202A881F3 +:10BEE0001EE094F80C0238B11D20287084F80C6212 +:10BEF000D4F80E02686013E094F81202002883D090 +:10BF00006E701620287007E084F81262D4F81402CC +:10BF10006860B4F81802288194F812020028F3D15E +:10BF2000012071E735480021C16101620846704770 +:10BF300030B5324D0C46E860FFF7F4FF00B1FFDF8B +:10BF40002C7130BD002180F87C1080F87D1080F8C5 +:10BF5000801090F8FB1009B1022100E00321FEF7E8 +:10BF60003FBC2DE9F041254C0546206909B100216F +:10BF700004E0B0F80611B0F8F6201144A0F806115C +:10BF800090F88C1139B990F87F2001231946703050 +:10BF9000F4F7F8FF30B1206930F89C1FB0F85A2050 +:10BFA00011440180206990F8A23033B1B0F89E109E +:10BFB000B0F8F6201144A0F89E1090F9A670002F5A +:10BFC00006DDB0F8A410B0F8F6201144A0F8A410D3 +:10BFD00001213D2615B180F88D6017E02278022AF4 +:10BFE0000ED0012A15D0A2784AB380F88C1012F036 +:10BFF000140F11D01E2117E0FC6202000001002086 +:10C0000090F8E620062A3CD016223AE080F88C1000 +:10C0100044E090F88E2134E0110702D580F88D605D +:10C020003CE0910603D5232180F88D1036E090077F +:10C0300000D1FFDF21692A2081F88D002AE02BB191 +:10C04000B0F89E20B0F8A0309A4210D2002F05DD43 +:10C05000B0F8A420B0F8A0309A4208D2B0F89C30D2 +:10C06000B0F89A20934204D390F88C310BB122227D +:10C0700007E090F880303BB1B0F89830934209D394 +:10C08000082280F88D20C1E7B0F89820062A01D355 +:10C090003E22F6E7206990F88C1019B12069BDE8BE +:10C0A000F0414FE7BDE8F0410021FEF799BB2DE9D3 +:10C0B000F047FF4C81460D4620690088F8F739F8B3 +:10C0C000060000D1FFDFA0782843A070A0794FF0D0 +:10C0D00000058006206904D5A0F8985080F8045126 +:10C0E00003E030F8981F491C0180FFF7CFFD4FF0A7 +:10C0F000010830B3E088000506D5206990F8821069 +:10C1000011B1A0F88E501CE02069B0F88E10491CC7 +:10C1100089B2A0F88E10B0F890208A4201D3531A49 +:10C1200000E0002327897F1DBB4201D880F896805C +:10C13000914206D3A0F88E5080F80A822079E6F763 +:10C14000E3FEA0794FF0020710F0600F0ED02069D7 +:10C1500090F8801011B1032908D102E080F88080A6 +:10C1600001E080F880700121FEF73AFB206990F829 +:10C170008010012904D1E188C90501D580F88070BB +:10C18000B9F1000F72D1E188890502D5A0F81851E4 +:10C1900004E0B0F81811491CA0F8181100F035FBA4 +:10C1A000FEF719FDFFF72EFC2769B7F8F800401CD1 +:10C1B000A7F8F80097F8FC0028B100F01BFFA8B121 +:10C1C000A7F8F85012E000F012FF08B1A7F8F850F5 +:10C1D00000F015FF50B197F80401401CC0B287F879 +:10C1E0000401022802D927F8F85F3D732069012372 +:10C1F000002190F87D207030F4F7C4FE20B920694A +:10C2000090F87D000C2859D120690123002190F875 +:10C210007C207030F4F7B6FE48B32069012300217A +:10C2200090F87F207030F4F7ADFE00B3206990F8ED +:10C230008010022942D190F80401C0B93046F7F7C6 +:10C24000E6F9A0B1216991F8E400FE2836D1B1F8F1 +:10C25000F200012832D981F8FA80B1F89A00B1F8D9 +:10C260009820831E9A4203DB012004E032E025E09F +:10C27000801A401E80B2B1F8F82023899A4201D377 +:10C28000012202E09A1A521C92B2904200D9104642 +:10C29000012801D181F8FA5091F86F2092B98A6E85 +:10C2A00082B1B1F89420B1F87010511A09B2002986 +:10C2B00008DD884200DB084680B203E021690120E6 +:10C2C00081F8FA502169B1F870201044A1F8F40007 +:10C2D000FFF7EDFCE088C0F340214846FFF741FE40 +:10C2E000206980F8FB50BDE8F047FDF7FCB87049C5 +:10C2F00002468878CB78184312D10846006942B1CB +:10C300008979090703D590F87F00082808D0012013 +:10C310007047B0F84C10028E914201D8FEF7B1B9C7 +:10C320000020704770B5624C05460E46E0882843F1 +:10C33000E080A80703D5E80700D0FFDF6661EA07C1 +:10C340004FF000014FF001001AD0A661F278062AE2 +:10C3500002D00B2A14D10AE0226992F87D30172B03 +:10C360000ED10023E2E92E3302F8370C08E02269EF +:10C3700092F87D30112B03D182F8811082F8A80049 +:10C38000AA0718D56269D278052A02D00B2A12D1E1 +:10C390000AE0216991F87D20152A0CD10022E1E9FB +:10C3A000302201F83E0C06E0206990F87D20102A2A +:10C3B00001D180F88210280601D50820E07083E4BE +:10C3C0002DE9F84301273A4C002567F30701E58082 +:10C3D000A570E570257020618946804680F8FB7065 +:10C3E0000088F7F7A6FE00B9FFDF20690088FDF797 +:10C3F00042F820690088FDF764F82069B0F8F2106F +:10C4000071B190F8E410FE290FD190F88C1189B128 +:10C4100090F87F20012319467030F4F7B3FD78B10E +:10C42000206990F8E400FE2804D0206990F8E40028 +:10C43000FFF774FB206990F8FD1089B1258118E0A1 +:10C440002069A0F89C5090F88D1180F8E61000212A +:10C450000220FFF7CBF9206980F8FA500220E7E7C5 +:10C4600090F8C81119B9018C8288914200D881884E +:10C47000218130F8F61F491E8EB230F8021F314478 +:10C4800020F86019018831440180FFF7FFFB20B1DB +:10C49000206930F88E1F314401802069B0F8F21015 +:10C4A000012902D8491CA0F8F2102EB102E00000C8 +:10C4B0000001002080F8045180F8FA5090F87D10B7 +:10C4C0000B2901D00C2916D1B0F87020B0F8AA3190 +:10C4D000D21A12B2002A0EDBD0F8AC11816090F8AB +:10C4E000B01101730321F4F773F8206980F87D50CF +:10C4F00080F8B27026E0242910D1B0F87010B0F89E +:10C50000AA21891A09B2002908DB90F8C001FFF7B7 +:10C510004BF9206900F87D5F857613E090F87C1078 +:10C52000242901D025290DD1B0F87010B0F8AA0146 +:10C53000081A00B2002805DB0120FFF735F9206951 +:10C5400080F87C5020690146B0F8F6207030F4F78E +:10C55000B2FAFC480090FC4BFC4A4146484600F0C9 +:10C560007DFC216A11B16078FCF7B5FA20690123DE +:10C57000052190F87D207030F4F704FD002803D0E9 +:10C58000BDE8F84300F0FDB9BDE8F88300F015BD43 +:10C59000EF49C8617047EE48C069002800D001200B +:10C5A0007047EB4A50701162704710B5044600881E +:10C5B000A4F8CC01B4F8B001A4F8CE01B4F8B201EB +:10C5C000A4F8D001B4F8B401A4F8D201012084F891 +:10C5D000C801DF480079E6F797FC02212046F3F70F +:10C5E000F7FF002004F87D0F0320E07010BD401A13 +:10C5F00000B247F6FE71884201DC002801DC012010 +:10C6000070470020704710B5012808D0022808D0D4 +:10C61000042808D0082806D0FFDF204610BD0124DA +:10C62000FBE70224F9E70324F7E7C9480021006982 +:10C6300020F8A41F8178491C81707047C44800B558 +:10C64000016911F8A60F401E40B20870002800DAF8 +:10C65000FFDF00BDBE482721006980F87C10002163 +:10C6600080F8A011704710B5B94C206990F8A81156 +:10C67000042916D190F87C20012300217030F4F7B2 +:10C6800081FC00B9FFDF206990F8AA10890703D464 +:10C69000062180F87C1004E0002180F8A21080F8C8 +:10C6A000A811206990F87E00800707D5FFF7C6FF24 +:10C6B000206910F87E1F21F00201017010BDA4490D +:10C6C00010B5096991F87C200A2A09D191F8E22075 +:10C6D000824205D1002081F87C0081F8A20010BDC3 +:10C6E00091F87E20130706D522F0080081F87E001D +:10C6F000BDE81040A2E7FF2801D0FFDF10BDBDE874 +:10C700001040A7E7F8B5924C01230A21206990F860 +:10C710007C207030F4F736FC38B3A06901F07CFE61 +:10C72000C8B1A06901F072FE0746A06901F072FE6F +:10C730000646A06901F068FE0546A06901F068FEA2 +:10C7400001460097206933462A46303001F059FFF0 +:10C75000206901F082FF2169002081F8A20081F8A0 +:10C760007C00BDE8F840FEF7D2BBA07840F00100A5 +:10C77000A070F8BD10B5764C01230021206990F817 +:10C780007D207030F4F7FEFB30B1FFF74EFF2169DA +:10C79000102081F87D0010BD20690123052190F84B +:10C7A0007D207030F4F7EEFB08B1082000E0012096 +:10C7B000A07010BD70B5664C01230021206990F86F +:10C7C0007D207030F4F7DEFB012588B1A06901F00F +:10C7D000C4FD2169A1F8AA01B1F87010FFF707FFA5 +:10C7E00040B12069282180F88D1080F88C50E6E552 +:10C7F000A570E4E52169A06901F5D67101F0A8FDF5 +:10C8000021690B2081F87D00D9E510B5FEF779FF8D +:10C81000FEF760FE4E4CA079400708D5A07830B9ED +:10C82000206990F87F00072801D101202070FEF7D1 +:10C8300071FAA079C00609D5A07838B9206990F8B6 +:10C840007D100B2902D10C2180F87D10E0780007C3 +:10C850000ED520690123052190F87D207030F4F772 +:10C8600091FB30B10820A0702169002081F8D4012B +:10C8700010BDBDE81040002000F0C4BB10B5344C22 +:10C88000216991F87D2048B3102A06D0142A07D0D8 +:10C89000152A1AD01B2A2CD11AE001210B2019E0ED +:10C8A000FAF702FE0C2817D32069082100F58870DA +:10C8B000FAF7FEFD28B120690421DC30FAF7F8FD13 +:10C8C00000B9FFDF0121042004E000F017F803E0C5 +:10C8D00001210620FEF78AFF012010BD212A08D180 +:10C8E00091F8970038B991F8C00110B191F8C101E1 +:10C8F00008B1002010BD01211720EBE770B5144CE2 +:10C900000025206990F88F1101290AD002292ED123 +:10C9100090F8A810F1B1062180F8E610012102205C +:10C9200020E090F8D411002921D100F1C80300F5CE +:10C930008471002200F5C870F4F796FA01210520F1 +:10C9400010E00000AFC00100EFC2010025C30100EC +:10C950000001002090F8B000400701D5112000E050 +:10C960000D200121FEF742FF206980F88F5126E556 +:10C9700030B5FB4C05462078002818BFFFDFE57175 +:10C9800030BDF7490120887170472DE9F14FF54D11 +:10C990002846446804F1700794F86510608F94F895 +:10C9A0008280268F082978D0F4F797FBB8F1000F22 +:10C9B00004BF001D80B2864238BF304600F0FF0839 +:10C9C000DFF89C93E848C9F8240009F134006E6848 +:10C9D000406800F1700A90F882B096F86510358FC3 +:10C9E000708F08295DD0F4F778FB00BFBBF1000F12 +:10C9F00004BF001D80B2854238BF2846C0B29AF8F5 +:10CA00001210002918BF04210844C0B296F865101E +:10CA1000FBF735FCB87C002847D007F15801D24815 +:10CA200091E80E1000F5027585E80E10B96EC0F899 +:10CA30002112F96EC0F8251200F58170FBF7DBFFBB +:10CA4000C848007800280CBF0120002080F00101B8 +:10CA5000C6480176D7E91412C0E90412A0F5837222 +:10CA6000D9F82410FBF7F5F994F86500012808BF00 +:10CA700000220CD0022808BF012208D0042808BFD9 +:10CA8000032204D008281ABFFFDF002202224146F9 +:10CA90000120FBF7F9F90EE0FFE70421F4F71DFB95 +:10CAA00084E70421F4F719FBA0E7D9F82400FBF789 +:10CAB000A2FFFBF715FA009850B994F8650094F8B6 +:10CAC000661010F00C0F08BF00219620FBF7B4FF92 +:10CAD00094F8642001210020FCF76BF894F82C00F6 +:10CAE000012808BFFCF735F8022089F80000FCF7A0 +:10CAF0003FFC002818BFFFDFBDE8F88F2DE9F04F9D +:10CB0000DFF860A28BB050469AF800204068AAF186 +:10CB10001401059190F8751000F1700504464FF06E +:10CB200008080127AAF13406A1B3012900F0068103 +:10CB3000022900F00781032918BFFFDF00F01881E8 +:10CB4000306A0423017821F008010170AA7908EA0B +:10CB5000C202114321F004010170EA7903EA820262 +:10CB6000114321F01001017095F80590F06AF6F775 +:10CB70005EFD8046FCF7C9FCB9F1020F00F00081B0 +:10CB8000B9F1010F00F00081B9F1030F00F000814D +:10CB900000F003B9FFE795F80CC04FF002094FF021 +:10CBA000000BBCF1240F1CBF6B7B242B08D0BCF105 +:10CBB0001F0F18BFBCF1200F2AD0222B4DD077E0D9 +:10CBC00094F864109AB190F8AC01002874D0082948 +:10CBD00018BF042969D0082818BF042865D0012986 +:10CBE00018BF012853D000BF4FF0020164E090F855 +:10CBF0001201002860D0082918BF042955D0082840 +:10CC000018BF042851D0012918BF01283FD0EBE7F5 +:10CC1000222B22D0002A4BD090F8C20194F8641045 +:10CC200010F0040F18BF40460CD0082918BF042983 +:10CC30003BD0082818BF042837D0012918BF012885 +:10CC400025D0D1E710F0010F18BF3846EDD110F014 +:10CC5000020F18BF4846E8D12EE04AB390F8C2212F +:10CC600090F85D0094F8641002EA000010F0040FE0 +:10CC700018BF40460ED0082918BF042915D008282F +:10CC800018BF042811D0012918BF0128ACD14FF0DA +:10CC9000010111E010F0010F18BF3846EBD110F080 +:10CCA000020F18BF4846E6D106E04FF0080103E046 +:10CCB00094F864100429F8D0A08E11F00C0F18BF5E +:10CCC0004FF42960F4F709FA218E814238BF0846F3 +:10CCD000ADF80400A4F84C000598FCF7F5FB60B132 +:10CCE0007289316A42F48062728172694FF48060A5 +:10CCF000904703206871EF7022E709AA01A9F06A42 +:10CD0000F6F7CFFB306210B195F8371021B10598D6 +:10CD1000FCF7AEFB6F7113E79DF8241031B9A0F852 +:10CD200000B080F802B0012101F09EFABDF80410B5 +:10CD3000306A01F0C7FB85F8059001E70598FCF71C +:10CD400097FBFDE6B4F84C00ADF8040009AA01A970 +:10CD5000F06AF6F7A6FB3062002808BFFFDFEFE6B7 +:10CD60002401002058010020300D0020380F002041 +:10CD70000598FCF7A9FB002808BFFFDFE0E600BF2D +:10CD800030EA080009D106E030EA080005D102E0E7 +:10CD9000B8F1000F01D0012100E00021306A0278D3 +:10CDA00042EA01110170697C00291CBF69790129DF +:10CDB0003BD005F15801FD4891E80E1000F50278CE +:10CDC00088E80E10A96EC0F82112E96EC0F825128D +:10CDD00000F58170FBF70FFE9AF8000000280CBFE9 +:10CDE00001210021F2480176D5E91212C0E90412AE +:10CDF000A0F58371326AFBF72CF894F864000128DF +:10CE000008BF00220CD0022808BF012208D0042845 +:10CE100008BF032204D008281ABFFFDF0022022225 +:10CE2000FB210020FBF730F803E0FBF7E4FDFBF704 +:10CE300057F8012194F865200846FBF7BAFE3771D0 +:10CE4000306A0188F181807830743770FCF799FA84 +:10CE5000002818BFFFDF0BB0BDE8F08F2DE9F043CD +:10CE6000D44D87B081462878DDF838801E461746B5 +:10CE70000C4628B9002F1CBF002EB8F1000F00D1BE +:10CE8000FFDFC5F81C80C5E90D94C5E905764FF0B4 +:10CE90000000A8716871E870A8702871C64E68819A +:10CEA000A881307804F170072088F7F742F9E8622A +:10CEB0002088F7F72CF92863FBF705FA94F9670047 +:10CEC000FBF7DAFA04F11200FBF76CFD04F10E0037 +:10CED000FBF7D8FA307800280CBF03200120FBF7BD +:10CEE00087FDB64890E80E108DE80E10D0E90410CA +:10CEF000CDE90410307800280CBFB148B148049047 +:10CF00006846FBF763FDF87EFBF7C4FAFBF76AFDA2 +:10CF100094F86F0078B9A06E68B1B88C39888842EF +:10CF200009D1B4F86C1001220844B88494F86E005A +:10CF3000A16EF8F7D8FE3078002804BFFF2094F8DF +:10CF400064401AD094F8651097F81280258F608F8E +:10CF5000082926D0F4F7C1F8B8F1000F04BF001D6E +:10CF600080B2854238BF2846C0B2B97C002918BFBC +:10CF70000421084494F86540C0B22146FBF77FF9CC +:10CF80003078214688B10120FBF74BFB7068D0F860 +:10CF90000001FBF733FD0120FFF7F7FC07B0BDE808 +:10CFA000F0830421F4F799F8D6E70020FBF739FB6A +:10CFB000FFF7A4FD07B0BDE8F0837F4800B5017816 +:10CFC0003438007819B1022818BFFFDF00BD0128EE +:10CFD00018BFFFDF00BD774810B50078022818BFE2 +:10CFE000FFDFBDE8104000F070BA00F06EBA714883 +:10CFF000007970476F488089C0F3002070476D4802 +:10D00000C07870472DE9F04706006B48694D4068CD +:10D0100000F17004686A90F8019018BF012E03D1E6 +:10D02000296B07F0F1FF6870687800274FF001085E +:10D03000A0B101283CD0022860D003281CBFFFDF2C +:10D04000BDE8F087012E08BFBDE8F087286BF6F732 +:10D05000E3FCE879BDE8F047E5F756BF012E14D0B0 +:10D06000A86A002808BFFFDF2889C21CD5E909107B +:10D07000F1F7E3F9A86A686201224946286BF6F7DE +:10D0800047FB022E08BFBDE8F087D4E91401401C1D +:10D0900041F10001C4E91401E079012801D1E771EF +:10D0A00001E084F80780E879BDE8F047E5F72CBF98 +:10D0B000012E14D0A86A002808BFFFDF2889C21CEF +:10D0C000D5E90910F1F7B9F9A86A68620022494662 +:10D0D000286BF6F71DFB022E08BFBDE8F087D4E9E8 +:10D0E0001410491C40F10000C4E91410E079012833 +:10D0F0000CBFE77184F80780BDE8F087012E06D0E9 +:10D10000286BF6F789FC022E08BFBDE8F087D4E94A +:10D110001410491C40F10000C4E91410E079012802 +:10D12000BFD1BCE72DE9F041234D2846A5F13404D9 +:10D13000406800F170062078012818BFFFDFB07842 +:10D140000127002158B1B1706289042042F0040225 +:10D150006281626990472878002818BF3771216A78 +:10D160000322087832EA000009D1628912F4806F44 +:10D1700005D042F002026281626902209047A169F3 +:10D180000020884760B3607950BB287818B30E48F8 +:10D19000007810F0100F04D10449097811F0100F35 +:10D1A0001ED06189E1B9A16AA9B90FE0300D002054 +:10D1B000380F0020240100205801002004630200E1 +:10D1C000BB220200A7A8010032010020218911B171 +:10D1D00010F0100F04D0BDE8F0410020FFF7D5BBE0 +:10D1E000BDE8F04100F071B92DE9F05FCC4E044686 +:10D1F0003046A6F134054068002700F1700A28780F +:10D20000B846022818BFFFDFA889FF2240F400704B +:10D21000A881706890F864101046FBF730F89AF80F +:10D2200012004FF00109002C00F0F080FAF77DFEAB +:10D23000FAF76BFE90B99AF8120078B1686A4178F3 +:10D2400061B100789AF80710C0F3C000884205D198 +:10D2500085F80290BDE8F05F00F037B9686A417860 +:10D260002981002908BFAF6203D0286BF6F70AFABC +:10D27000A862A88940F02000A881EF70706800F1D2 +:10D28000700B044690F82C0001281BD1FBF757FCCB +:10D2900059462046F3F729FEA0B13078002870687F +:10D2A0000CBF00F59A7000F50170218841809BF851 +:10D2B000081001719BF80910417180F80090E8791D +:10D2C000E5F722FE686A9AF806100078C0F380003D +:10D2D00088423AD0706800F1700490F87500002818 +:10D2E0002FD002284AD06771307800281CBF2079DF +:10D2F000002809D027716A89394642F010026A81F4 +:10D300006A694FF010009047E078A0B1E770FCF731 +:10D31000EAF8002808BFFFDF08206A89002142F0F0 +:10D3200008026A816A699047D4E91210491C40F1E9 +:10D330000000C4E91210A07901280CBFA77184F87D +:10D340000690A88940F48070A881696A9AF807302D +:10D350000878C0F3C0029A424DD1726800F0030011 +:10D3600002F17004012818BF02282DD003281CBF29 +:10D37000687940F0040012D068713CE0E86AF6F782 +:10D38000BCF8002808BFFFDFD4E91210491C40F1A7 +:10D390000000C4E91210E879E5F7B6FDA3E784F8C8 +:10D3A0000290AA89484642F40062AA816A8942F042 +:10D3B00001026A816A699047E079012801D1E77129 +:10D3C00019E084F8079016E04878D8B1A98941F4AB +:10D3D0000061A981A96A71B1FB2884BF687940F016 +:10D3E0001000C9D8A879002808BFC84603D08020FB +:10D3F0006A69002190470120A9698847E0B36879EC +:10D40000A0B13AE0E0790128DBD1D8E7002818BFC5 +:10D41000FAF7C5FDA88940F04000A881E97801200D +:10D42000491CC9B2E97001292DD8E5E7307890B9D7 +:10D430003C48007810F0100F04D13B49097811F0F6 +:10D44000100F1AD06989B9B9A96A21B9298911B10E +:10D4500010F0100F11D0B8F1000F1CBF0120FFF722 +:10D46000D1FDFFF74BFBB8F1000F08BFBDE8F09FFF +:10D470000220BDE8F05FC5E5FFE7B8F1000F1CBF73 +:10D480000020FFF7BFFDBDE8F05F00F01EB870B5EB +:10D490000D4606462248224900784C6850B1FAF7FA +:10D4A000F7FD034694F8642029463046BDE87040F5 +:10D4B000FDF78BBAFAF7ECFD034694F86420294691 +:10D4C0003046BDE8704004F0FCBE154910B54C680C +:10D4D000FBF714FBFBF7F3FAFBF7BCF9FBF768FA71 +:10D4E000FAF7FEFC94F82C00012808BFFBF727FB95 +:10D4F00094F86F0038B9A06E28B1002294F86E003D +:10D500001146F8F7F0FB094C00216269A0899047A9 +:10D51000E2696179A07890470020207010BD00007A +:10D520005801002032010020300D0020240100208D +:10D530002DE9F047FA4F894680463D782C0014D0FB +:10D540000126012D11DB601EC4B207EBC40090F868 +:10D550005311414506D10622494600F5AA70F0F75D +:10D560003FFF28B1761CAE42EDDD1020BDE8F0870C +:10D570002046BDE8F087EA498A78824286BF08449F +:10D5800090F843010020704710B540F2D3120021FB +:10D59000E348F0F77CFF0822FF21E248F0F777FF2D +:10D5A000E1480021417081704FF46171818010BDAC +:10D5B0002DE9F0410E460546FFF7BAFFD84C10287A +:10D5C00016D004EBC00191F85A0110F0010F1CBFF6 +:10D5D0000120BDE8F081607808283CBF012081F877 +:10D5E0005A011CD26078401C60700120BDE8F081B7 +:10D5F0006078082813D222780127501C207004EB91 +:10D60000C2083068C8F85401B088A8F85801102A38 +:10D6100028BFFFDF88F8535188F85A71E2E70020ED +:10D62000BDE8F081C04988707047BF488078704776 +:10D630002DE9F041BA4D00272878401E44B2002C55 +:10D6400030DB00BF05EBC40090F85A0110F0010F69 +:10D6500024D06878E6B2401E687005EBC6083046F4 +:10D6600088F85A7100F0E8FA102817D12878401E7F +:10D67000C0B22870B04211D005EBC001D1F85301FF +:10D68000C8F85301D1F85701C8F85701287800F0BD +:10D69000D3FA10281CBF284480F80361601E44B2EE +:10D6A000002CCFDAA0488770BDE8F0819C498A78C9 +:10D6B000824286BF01EB0010C01C002070472DE99C +:10D6C000F0470127994690463D460026FFF730FF78 +:10D6D000102820D0924C04EBC00191F85A1101F0AF +:10D6E000010600F0A9FA102815D0B9F1000F18BFF3 +:10D6F00089F80000A17881420DD904EB001111F1E5 +:10D70000030F08D0204490F84B5190F83B010128BA +:10D710000CBF0127002748EA060047EA0501084038 +:10D72000BDE8F0872DE9F05F1F4690468946064622 +:10D73000FFF7FEFE7A4C054610282ED000F07CFA4A +:10D7400010281CBF1220BDE8F09FA07808283ED208 +:10D75000A6781022701CA07004EB061909F10300D2 +:10D760004146F3F768FB09F1830010223946F3F7CD +:10D7700062FB10213846F3F74BFB3444102184F848 +:10D7800043014046F3F744FB84F84B0184F803510E +:10D79000002084F83B01BDE8F09FA078082816D24D +:10D7A00025784FF0000A681C207004EBC50BD9F8EF +:10D7B0000000CBF85401B9F80400ABF85801102D63 +:10D7C00028BFFFDF8BF853618BF85AA1C0E7072011 +:10D7D000BDE8F09F2DE9F041514CA078401E45B2C4 +:10D7E000002DB8BFBDE8F081EAB2A078401EC1B2FA +:10D7F000A17054FA85F090F803618A423DD004EBA1 +:10D80000011004EB0213D0F803C0C3F803C0D0F832 +:10D8100007C0C3F807C0D0F80BC0C3F80BC0D0F8DE +:10D820000FC0C3F80FC0D0F883C0C3F883C0D0F8CE +:10D8300087C0C3F887C0D0F88BC0C3F88BC0D0F8BE +:10D840008F00C3F88F006318A01801EB410193F813 +:10D8500003C102EB420204EB410180F803C104EB77 +:10D860004202D1F80BC1C2F80BC1B1F80F11A2F8F6 +:10D870000F1193F83B1180F83B1104EBC60797F8A2 +:10D880005A0110F0010F1CD1304600F0D5F91028D4 +:10D8900017D12078401EC0B22070B04211D004EBE6 +:10D8A000C000D0F85311C7F85311D0F85701C7F88A +:10D8B0005701207800F0C0F910281CBF204480F8E0 +:10D8C0000361681E45B2002D8EDABDE8F08116496D +:10D8D0004870704714484078704738B14AF2B81120 +:10D8E000884203D810498880012070470020704783 +:10D8F0000D488088704710B5FFF71AFE102804D035 +:10D9000000F09AF9102818BF10BD082010BD044976 +:10D910008A78824286BF01EB001083300020704776 +:10D92000600F00206C01002060010020FE4B93F886 +:10D9300002C084459CBF00207047184490F8030142 +:10D9400003EBC00090F853310B70D0F85411116004 +:10D95000B0F85801908001207047F34A114491F8C3 +:10D960000321F2490A700268C1F8062080884881C4 +:10D97000704770B516460C460546FBF7D5F8FAF722 +:10D98000C4F9EA48407868B1E748817851B12A196A +:10D99000002E0CBF8330C01CFAF791F9FAF7D8F9C2 +:10D9A000012070BD002070BD10B5FAF7FFF9002806 +:10D9B00004BFFF2010BDBDE81040FAF71DBAFAF70A +:10D9C000F5B9D9498A7882429CBF00207047084443 +:10D9D00090F8030101EBC00090F85A0100F001003B +:10D9E00070472DE9F047D04D00273E4628780028A3 +:10D9F00086BF4FF01009DFF83883BDE8F087AC78B8 +:10DA000021000CD00122012909DB601EC4B22819B3 +:10DA100090F80331B34203D0521C8A42F5DD4C46E4 +:10DA2000A14286BF05EB0410C01C002005EBC60A0E +:10DA30009AF85A1111F0010F16D050B1102C04D0E1 +:10DA4000291991F83B11012903D01021F3F7E0F9CE +:10DA500050B108F8074038467B1C9AF853210AF564 +:10DA6000AA71DFB2FAF7B5FC701CC6B22878B042D2 +:10DA7000C5D8BDE8F0872DE9F041AB4C002635460E +:10DA8000A07800288CBFAA4FBDE8F0816119C0B210 +:10DA900091F80381A84286BF04EB0510C01C00204A +:10DAA00091F83B11012903D01021F3F7B1F958B1D6 +:10DAB00004EBC800BD5590F8532100F5AA7130461B +:10DAC000731CDEB2FAF785FC681CC5B2A078A842C8 +:10DAD000DCD8BDE8F0810144934810B500EB02109A +:10DAE0000A4601218330FAF7EAF8BDE81040FAF758 +:10DAF0002FB90A468D4910B5497841B18A4B9978BA +:10DB000029B10244D81CFAF7DAF8012010BD002030 +:10DB100010BD854A01EB410102EB41010268C1F8E9 +:10DB20000B218088A1F80F0170472DE9F0417E4D4F +:10DB300007460024A878002898BFBDE8F081C0B24D +:10DB4000A04217D905EB041010F1830612D0102162 +:10DB50003046F3F75DF968B904EB440005EB400883 +:10DB600008F20B113A463046FBF74EFDB8F80F01AC +:10DB7000A8F80F01601CC4B2A878A042DFD8BDE8A5 +:10DB8000F081014610226B48F3F755B96948704798 +:10DB900065498A78824203D90A1892F843210AB16A +:10DBA0000020704700EB400001EB400000F20B103A +:10DBB00070475D498A78824206D9084490F83B0153 +:10DBC000002804BF01207047002070472DE9F04174 +:10DBD0000E460746144606213046F3F719F9524D12 +:10DBE00098B1A97871B105F59D7011F0010F18BFBA +:10DBF00000F8014FA978490804D0447000F8024F9A +:10DC0000491EFAD10120BDE8F08138463146FFF7C0 +:10DC10008FFC10280CD000F00FF8102818BF08282F +:10DC200006D0284480F83B414FF00100BDE8F08168 +:10DC30004FF00000BDE8F0813B4B10B4844698786B +:10DC400001000ED0012201290BDB401EC0B21C18BE +:10DC500094F80341644504BF10BC7047521C8A42CB +:10DC6000F3DD10BC1020704770B52F4C01466218D0 +:10DC7000A078401EC0B2A07092F8035181423CD0FF +:10DC800004EB011304EB001C01EB4101DCF8036021 +:10DC9000C3F80360DCF80760C3F80760DCF80B60CA +:10DCA000C3F80B60DCF80F60C3F80F60DCF883602A +:10DCB000C3F88360DCF88760C3F88760DCF88B60AA +:10DCC000C3F88B60DCF88FC0C3F88FC0231800EB5B +:10DCD000400093F803C104EB400082F803C104EB59 +:10DCE0004101D0F80BC1C1F80BC1B0F80F01A1F888 +:10DCF0000F0193F83B0182F83B0104EBC50696F84F +:10DD00005A0110F0010F18BF70BD2846FFF794FFAD +:10DD1000102818BF70BD2078401EC0B22070A842E5 +:10DD200008BF70BD08E00000600F00206001002007 +:10DD30006C0100203311002004EBC000D0F8531117 +:10DD4000C6F85311D0F85701C6F857012078FFF7ED +:10DD500073FF10281CBF204480F8035170BD0000E1 +:10DD60004078704730B50546007801F00F0220F08A +:10DD70000F0010432870092912D2DFE801F00507CF +:10DD800005070509050B0F0006240BE00C2409E02C +:10DD9000222407E001240020E87003E00E2401E0C3 +:10DDA0000024FFDF6C7030BD007800F00F0070477A +:10DDB0000A68C0F803208988A0F807107047D0F8D7 +:10DDC00003200A60B0F80700888070470A68C0F82E +:10DDD00009208988A0F80D107047D0F809200A6042 +:10DDE000B0F80D00888070470278402322F040028E +:10DDF00003EA81111143017070470078C0F380106D +:10DE000070470278802322F0800203EAC111114397 +:10DE1000017070470078C009704770B514460E460F +:10DE200005461F2A88BFFFDF2246314605F109005B +:10DE3000F0F703FBA01D687070BD70B544780E4606 +:10DE40000546062C38BFFFDFA01F84B21F2C88BFF9 +:10DE50001F24224605F109013046F0F7EEFA20466C +:10DE600070BD70B514460E4605461F2A88BFFFDFF9 +:10DE70002246314605F10900F0F7DFFAA01D68706F +:10DE800070BD0968C0F80F1070470A88A0F8132009 +:10DE900089784175704790F8242001F01F0122F025 +:10DEA0001F02114380F824107047072988BF0721FB +:10DEB00090F82420E02322F0E00203EA411111430C +:10DEC00080F8241070471F3008F065B810B504467C +:10DED00000F000FB002818BF204410BDC17811F0ED +:10DEE0003F0F1BBF027912F0010F0022012211F037 +:10DEF0003F0F1BBF037913F0020F002301231A44C5 +:10DF000002EB4202530011F03F0F1BBF027912F0E7 +:10DF1000080F0022012203EB420311F03F0F1BBF49 +:10DF2000027912F0040F00220122134411F03F0F76 +:10DF30001BBF027912F0200F0022012202EBC20265 +:10DF400003EB420311F03F0F1BBF027912F0100FD9 +:10DF50000022012202EB42021A4411F03F0F1BBFC4 +:10DF6000007910F0400F00200120104410F0FF0055 +:10DF700014BF012100210844C0B2704770B5027877 +:10DF8000417802F00F02082A4DD2DFE802F00408BF +:10DF90000B4C4C4C0F14881F1F280AD943E00C2946 +:10DFA00007D040E0881F1F2803D93CE0881F1F28A6 +:10DFB00039D8012070BD4A1EFE2A34D88446C07864 +:10DFC00000258209032A09D000F03F04601C884222 +:10DFD00004D86046FFF782FFA04201D9284670BDF1 +:10DFE0009CF803004FF0010610F03F0F1EBF1CF11C +:10DFF0000400007810F0100F13D06446042160462E +:10E0000000F068FA002818BF14EB0000E6D0017891 +:10E0100001F03F012529E1D280780221B1EB501FA8 +:10E02000DCD3304670BD002070BD70B5017801258D +:10E0300001F00F01002404290AD007290DD0082976 +:10E040001CBF002070BD40780E2836D0204670BD21 +:10E050004078801F1F2830D9F8E7844640789CF824 +:10E0600003108A09032AF1D001F03F06711C814296 +:10E07000ECD86046FFF732FFB042E7D89CF80300C7 +:10E0800010F03F0F1EBF1CF10400007810F0100FBD +:10E0900013D066460421604600F01CFA002818BF21 +:10E0A00016EB0000D2D0017801F03F012529CDD236 +:10E0B00080780221B1EB501FC8D3284670BD10B440 +:10E0C000017801F00F01032920D0052921D14478DE +:10E0D000B0F81910B0F81BC0B0F81730827D222CB0 +:10E0E00017D1062915D3B1F5486F98BFBCF5FA7F53 +:10E0F0000FD272B1082A98BF8A420AD28B429CBFC3 +:10E10000B0F81D00B0F5486F03D805E040780C2842 +:10E1100002D010BC0020704710BC012070472DE9D0 +:10E12000F0411F4614460D00064608BFFFDF21469A +:10E13000304600F0CFF9040008BFFFDF30193A463F +:10E140002946BDE8F041F0F778B9C07800F03F000B +:10E150007047C02202EA8111C27802F03F021143E7 +:10E16000C1707047C07880097047C9B201F00102E0 +:10E17000C1F340031A4402EB4202C1F3800303EBF4 +:10E180004202C1F3C00302EB4302C1F3001303EBED +:10E1900043031A44C1F3401303EBC30302EB4302EE +:10E1A000C1F380131A4412F0FF0202D0521CD2B203 +:10E1B0000171C37802F03F0103F0C0031943C1703D +:10E1C000511C417070472DE9F0410546C078164654 +:10E1D00000F03F041019401C0F46FF2888BFFFDFE6 +:10E1E000281932463946001DF0F727F9A019401CBE +:10E1F0006870BDE8F081C178407801F03F01401AB5 +:10E20000401E80B2704710B590F803C00B460CF06A +:10E210003F0144780CF03F0CA4EB0C0CACF1010C6A +:10E220001FFA8CF4944288BF14462BB10844011D98 +:10E2300022461846F0F701F9204610BD4078704795 +:10E2400000B5027801F0030322F003021A430270C2 +:10E25000012914BF0229002104D0032916BFFFDFC2 +:10E26000012100BD417000BD00B5027801F003033B +:10E2700022F003021A430270012914BF022900216F +:10E2800004D0032916BFFFDF012100BD417000BD8E +:10E29000007800F003007047417841B1C078192838 +:10E2A00003D2BC4A105C884201D101207047002093 +:10E2B000704730B501240546C17019293CBFB548E7 +:10E2C000445C02D3FF2918BFFFDF6C7030BD70B50E +:10E2D00015460E4604461B2A88BFFFDF65702A4696 +:10E2E0003146E01CBDE87040F0F7A7B8B0F8070071 +:10E2F0007047B0F809007047C172090A017370478E +:10E30000B0F80B00704730B4B0F80720B0F809C07F +:10E31000B0F805300179941F40F67A45AC4298BFB9 +:10E32000BCF5FA7F0ED269B1082998BF914209D293 +:10E3300093429FBFB0F80B00B0F5486F012030BC8E +:10E3400098BF7047002030BC7047001D07F023BE07 +:10E35000021D0846114607F01EBEB0F809007047BE +:10E36000007970470A684260496881607047426876 +:10E370000A60806848607047098881817047808999 +:10E38000088070470A68C0F80E204968C0F812106B +:10E390007047D0F80E200A60D0F81200486070472D +:10E3A0000968C0F816107047D0F81600086070476A +:10E3B0000A68426049688160704742680A60806804 +:10E3C000486070470968C1607047C068086070475E +:10E3D000007970470A684260496881607047426806 +:10E3E0000A608068486070470171090A417170478E +:10E3F0008171090AC17170470172090A417270473F +:10E400008172090AC172704780887047C08870475E +:10E41000008970474089704701891B2924BF4189C1 +:10E42000B1F5A47F07D381881B2921BFC088B0F52F +:10E43000A47F01207047002070470A684260496845 +:10E440008160704742680A6080684860704701795F +:10E4500011F0070F1BBF407910F0070F00200120BB +:10E460007047017911F0070F1BBF407910F0070FBB +:10E470000020012070470171704700797047417199 +:10E480007047407970478171090AC1717047C0882F +:10E4900070470179407901F007023F498A5C012AFF +:10E4A00006D800F00700085C01289CBF01207047D7 +:10E4B00000207047017170470079704741717047C3 +:10E4C0004079704730B50C460546FB2988BFFFDF11 +:10E4D0006C7030BDC378024613F03F0008BF704730 +:10E4E0000520127903F03F0312F0010F37D0002905 +:10E4F00014BF0B20704700BF12F0020F32D0012969 +:10E5000014BF801D704700BF12F0040F2DD00229E8 +:10E5100014BF401C704700BF12F0080F28D0032919 +:10E5200014BF801C704700BF12F0100F23D00429C5 +:10E5300014BFC01C704700BF12F0200F1ED0052969 +:10E540001ABF1230C0B2704712F0400F19D006291E +:10E550001ABF401CC0B27047072918D114E0002927 +:10E56000CAD114E00129CFD111E00229D4D10EE0A3 +:10E570000329D9D10BE00429DED108E00529E3D134 +:10E5800005E00629E8D102E0834288BF70470020F9 +:10E5900070470000246302001C63020030B490F84E +:10E5A00064508C88B1F808C015F00C0F1BD000BF68 +:10E5B000B4F5296F98BF4FF4296490F8655015F0B1 +:10E5C0000C0F17D0BCF5296F98BF4FF4296C4A88FF +:10E5D000C988A0F84420A0F84810A0F84640A0F848 +:10E5E0004AC030BC7047002B1CBF157815F00C0FCB +:10E5F000DED1E2E7002B1CBF527812F00C0FE1D104 +:10E60000E5E7DDF800C08181C2810382A0F812C075 +:10E6100070471B2202838282C281828142800281F2 +:10E62000028042848284828359B14FF429614183FC +:10E63000C18241820182C18041818180C184018582 +:10E6400070474FF4A4714183C18241820182C1802D +:10E6500041818180C18401857047F0B4B0F84820C1 +:10E66000818F468EC58E8A4228BF0A4690F8651073 +:10E670004FF0000311F00C0F18BF4FF4296106D1C1 +:10E68000B0F84AC0B0F840108C4538BF61464286A9 +:10E69000C186048FB0F83AC0944238BF14468C4506 +:10E6A00038BF8C460487A0F83AC0B2420ABFA942DC +:10E6B0004FF0010C4FF0000C058EB0F84410C28FE3 +:10E6C000848E914228BF114690F8642012F00C0FFE +:10E6D00018BF4FF4296206D1B0F84660B0F8422066 +:10E6E000964238BF324690F85A60022E0AD0018610 +:10E6F0008286A9420ABFA2420120002040EA0C0003 +:10E70000F0BC70478D4238BF2946944238BF22463C +:10E7100080F85A30EBE7508088899080C889D08093 +:10E72000088A1081488A508101201070704730B4E7 +:10E7300002884A80B0F830C0A1F804C0838ECB8034 +:10E74000428E0A81C48E4C81B0F85650A54204BF57 +:10E75000B0F85240944208D1B0F858409C4202BFF1 +:10E76000B0F854306345002301D04FF001030B7320 +:10E7700000F13003A0F852201A464B89D3848B88CD +:10E780009384CA88A0F858204FF00100087030BC6C +:10E79000704730B404460A46088E91F864104FF46E +:10E7A000747311F00C0F1CBF03EB801080B21ED0ED +:10E7B000918E814238BF0846118F92F865C01CF0D7 +:10E7C0000C0F1CBF03EB811189B218D0538F8B4201 +:10E7D00038BF194692F866301CF00C0F08BF0023B2 +:10E7E000002C0CBF0122002230BCF2F798BC022999 +:10E7F00007BF80003C30C000703080B2D8E7BCF169 +:10E80000020F07BF89003C31C900703189B2DDE7D2 +:10E810002DE9F041044606F099FCC8B9FE4F78682E +:10E8200090F8221001260025012914D00178012931 +:10E830001BD090F8281001291CBF0020BDE8F081F2 +:10E84000657018212170D0F82A10616080F8285076 +:10E850000120BDE8F081657007212170416A616087 +:10E8600080F822500120BDE8F081657014212170EC +:10E87000811C2022201DEFF7E0FD257279680D70C4 +:10E8800081F82850E54882888284C26B527B80F8E8 +:10E89000262080F82260C86B0088F5F738FCF5F771 +:10E8A000E0F8D5E7DC4840680178002914BF80888B +:10E8B0004FF6FF70704730B5D74C83B00D462078C7 +:10E8C0007F2808BFFFDF94F900307F202070D4F844 +:10E8D00004C09CF85000062808BF002205D09CF810 +:10E8E000500008280CBF022201229CF85400CDE9F8 +:10E8F000000302929CF873309CF880200CF13201E6 +:10E90000284606F08FFC03B0BDE8304006F01FBE7D +:10E910002DE9F04106F05FFC002818BF06F0E4FB8B +:10E92000BD4C606800F1840290F87610895C80F834 +:10E930008010002003F07EF828B3FAF753F86068DF +:10E94000B74990F855000D5C2846F9F7A3FD6068BB +:10E950004FF0000680F8735090F8801011F00C0F03 +:10E960000CBF25200F20F9F76CFC606890F8801030 +:10E970000120F9F711FE606890F84010032918BFD4 +:10E9800002290FD103E0BDE8F04101F02FB990F862 +:10E9900076108430085C012804D101221146002041 +:10E9A000FAF707F9FAF7D5F8606890F88050012D6A +:10E9B00007BF0127032100270521A068FFF799F869 +:10E9C000616881F8520040B1002F18BF402521D066 +:10E9D000F9F787F92846FAF79DF86068806DFAF72D +:10E9E0000DF8606890F85410FF291CBF6D30FEF7D9 +:10E9F000B4FFFF21606880F8531080F8541080F84D +:10EA0000626080F8616080F87D60062180F85010B7 +:10EA1000BDE8F08115F00C0F14BF55255025D7E740 +:10EA200070B57D4C0646606800F150052046806850 +:10EA300041B1D0F80510C5F81D10B0F80900A5F8CF +:10EA4000210003E005F11D01FFF7B9F9A068FFF708 +:10EA5000D4F985F82400A0680021032E018002D09B +:10EA6000052E04D03DE00321FFF77CF939E00521B4 +:10EA7000FFF778F96068C06B00F10E01A068FFF73E +:10EA800000FA6068C06B00F11201A068FFF7FDF9A1 +:10EA9000D4E90110CA6B527D8275CA6BD28AC275E5 +:10EAA000120A0276CA6B52884276120A8276CA6BC2 +:10EAB0009288C276120A0277CA6BD2884277120A0B +:10EAC0008277C96B0831FFF7FEF96068C06B017E81 +:10EAD000A068FFF7E0F9606890F88610A068FFF77B +:10EAE000E4F905F11D01A068FFF770F995F824100D +:10EAF000A068FFF786F9606800F1320590F8316090 +:10EB000090F8511091B190F84010032906D190F877 +:10EB10003910002918BF90F8560001D190F8530021 +:10EB2000FFF736F800281CBF012605462946A068D5 +:10EB3000FFF73EF93146A068BDE87040FFF754B9D1 +:10EB40003549496881F84B00704770B5324D002453 +:10EB50000126A8606968A1F8814081F8834081F8A6 +:10EB6000506091F85020022A1FBF91F850100129DF +:10EB7000FFDF70BD06F0CDFA6868047080F82240AF +:10EB800080F8284090F8520030B1F9F7CDFFF9F73E +:10EB9000BCF8686880F852406868072180F84A40ED +:10EBA00080F8396080F8404080F8554080F84B404C +:10EBB00080F87D4080F8381070BD2DE9F041164C8A +:10EBC000054686B0606890F85000012818BF0228FA +:10EBD00005D003281EBF0C2006B0BDE8F081687A7E +:10EBE000022839D0F9F76FFB0220F9F701FF0D4930 +:10EBF00001F10C0090E80D108DE80D10D1E907012E +:10EC0000CDE904016846F9F7E1FE606890F94B0030 +:10EC1000F9F732FCA06807E07401002044110020DD +:10EC20004363020040630200F9F7E5FEFC48F9F790 +:10EC3000B9FEFC48F9F726FC606890F831103230D4 +:10EC4000F9F7A5FB0F210720F9F7BFFB606890F8E3 +:10EC50003900E0B1FEF70FFF6168287A01F1840204 +:10EC600081F87600287A805C81F880006868886581 +:10EC70002A68CA65687A68B1012824D00525022867 +:10EC800008BF81F850506FD0032878D080E0FEF79D +:10EC9000A8FEE1E7E44B91F83850002291F85500C6 +:10ECA000401CA3FB006C4FEA5C0CACEB8C0C60448A +:10ECB00081F8550025FA00F010F0010F03D1501C27 +:10ECC000C2B2032AEAD3002681F87D6091F8490098 +:10ECD000002804BF91F85100002841D0F7F744FA0A +:10ECE000074660683946406CF7F736FFDFF83C832B +:10ECF000054690FBF8F008FB105041423846F6F705 +:10ED00001AFF6168486495FBF8F08A6F10448867C1 +:10ED1000FEF7EEFD01466068826F914220D847649D +:10ED2000866790F8510000281CBF0120FEF7FDFE09 +:10ED30000121606890F84A20002A1CBF90F8492001 +:10ED4000002A0DD090F8313000F13202012B04D1AD +:10ED5000527902F0C002402A08D03230FAF78CFC17 +:10ED60006168042081F8500012E008E00125FEF7F8 +:10ED70000DFF61682A463231FAF746FCF0E7002AB7 +:10ED800018BFFFDF012000F089FF606880F8505055 +:10ED900006B00020BDE8F08170B5A54D686890F818 +:10EDA000501004292ED005291CBF0C2070BD90F8EE +:10EDB0007D100026002990F883104FEA511124D0CD +:10EDC000002908BF012407D0012908BF022403D06D +:10EDD000022914BF00240824C06D00281CBF002095 +:10EDE00000F05CFF6868806DF9F708FE686890F8CD +:10EDF0004010022943D0032904BF90F86C10012968 +:10EE000041D04DE0FFF784FD52E0002908BF012406 +:10EE100007D0012908BF022403D0022914BF00240F +:10EE20000824C06D00281CBF002000F037FF686870 +:10EE3000806DF9F7E3FD686890F84010022906D06C +:10EE4000032904BF90F86C10012904D010E090F859 +:10EE50006C1002290CD1224614F00C0F04D090F84B +:10EE60004C00012808BF042201210020F9F7A1FE6F +:10EE70006868072180F8804080F8616016E090F8AB +:10EE80006C1002290CD1224614F00C0F04D090F81B +:10EE90004C00012808BF042201210020F9F789FE57 +:10EEA0006868082180F8804080F8616080F8501020 +:10EEB000002070BD5E49002210F0010F496802D0A9 +:10EEC000012281F8842010F0080F03D0114408209B +:10EED00081F88400002070475549496881F848004E +:10EEE000704710B5524C636893F83030022B14BF52 +:10EEF000032B00280BD100291ABF02290120002072 +:10EF00001146FEF7F8FC08281CBF012010BD606800 +:10EF100090F83000002816BF022800200120BDE82C +:10EF20001040FAF731BB4248406890F830000028A2 +:10EF300016BF022800200120FAF726BB3C49496889 +:10EF400081F8300070473A49496881F84A007047B3 +:10EF500070B5374C616891F83000002816BF022860 +:10EF60000020012081F8310001F13201FAF7F6FAB0 +:10EF7000606890F83010022916BF03290121002192 +:10EF800080F8511090F8312000F132034FF0000565 +:10EF9000012A04BF5B7913F0C00F0AD000F13203DD +:10EFA000012A04D15A7902F0C002402A01D000227D +:10EFB00000E0012280F84920002A04BF002970BD2A +:10EFC0008567F7F7D1F86168486491F85100002827 +:10EFD0001CBF0020FEF7A9FD0026606890F84A10CB +:10EFE00000291ABF90F84910002970BD90F831200F +:10EFF00000F13201012A04D1497901F0C001402910 +:10F0000005D02946BDE870403230FAF735BBFEF72F +:10F01000BDFD61683246BDE870403231FAF7F4BA9E +:10F020004063020046630200ABAAAAAA40420F0056 +:10F030007401002070B5FF4D0C4600280CBF012361 +:10F040000023696881F8393081F842004FF00800E8 +:10F0500081F856000CD1002C1ABF022C0120002090 +:10F060001146FEF748FC6968082881F8560001D06F +:10F07000002070BD022C14BF032C1220F8D170BDEB +:10F08000002818BF112070470328EA4A526808BFB9 +:10F09000D16382F840000020704710B5E54C6068ED +:10F0A00090F8401003291CBF002180F8601001D0A7 +:10F0B000002010BD0123C16B1A460020F2F738F87A +:10F0C0006168CA6B526A904294BF0120002081F8A7 +:10F0D0006000EDE7D748416891F84000032804D06C +:10F0E000012818BF022807D004E091F84200012847 +:10F0F00008BF70470020704791F84100012814BFF5 +:10F1000003280120F6D1704770B5F9F7F7FCF9F73D +:10F11000D6FCF9F79FFBF9F74BFCC64C002560685D +:10F1200090F8520030B1F9F7FFFCF8F7EEFD606897 +:10F1300080F8525060680121A0F8815080F8835017 +:10F1400080F8501080F82850002070BDB94810B5E4 +:10F150004068643006F0B1FB002010BDB5480121C5 +:10F16000406890F84020032A03BF80F82A10C26B41 +:10F170001288002218BF80F82A20828580F8281083 +:10F180007047AC49496881F88600704701780023D0 +:10F1900011F0010FA749496809D04278032A08BF36 +:10F1A000CB6381F84020012281F884201346027845 +:10F1B00012F0040F0CD082784FF0000C032A08BF25 +:10F1C000C1F83CC081F840200B44082283F8842019 +:10F1D000C27881F830200279002A16BF022A012362 +:10F1E000002381F8393081F84120427981F83820B4 +:10F1F000807981F848004FF0000070478D484068E2 +:10F200008030704770B58B4C06460D46606890F8AC +:10F210005000032818BFFFDF022E1EBF032EFFDFA2 +:10F2200070BD002D18BF06F0A1F900216068A0F89C +:10F23000811080F88310012180F8501070BD00F01B +:10F24000D5BC2DE9F0477B4C0646894660684FF0F7 +:10F250000108072E90F8397038BF032540D3082ED7 +:10F2600084BF0020BDE8F08790F85010062908BF41 +:10F27000002105D090F8501008290CBF022101216F +:10F2800090F8800005F0AEFF002873D1A068C17827 +:10F2900011F03F0F12D0027912F0010F0ED0616809 +:10F2A0004FF0050591F85220002A18BFB9F1000F60 +:10F2B00016D091F88010012909D011E011F03F0F0C +:10F2C0001ABF007910F0100F002F53D14CE04FF00F +:10F2D00001024FF00501FEF74CFB616881F8520016 +:10F2E000A16808782944C0F3801030B1487900F053 +:10F2F000C000402808BF012000D00020616891F8BC +:10F300005210002918BF002807D0FEF74DFB014618 +:10F31000606880F8531080F86180606890F853103E +:10F32000FF292AD080F854100846FEF74AFB40EA2D +:10F330000705606890F85320FF2A18BF002D10D0F1 +:10F34000072E0ED3A068C17811F03F0F09D00179C4 +:10F3500011F0020F05D00B21FEF7BDFB606880F8AD +:10F3600062802846BDE8F087FEF75FF9002808BFF5 +:10F37000BDE8F0870120BDE8F087A36890F8392048 +:10F3800059191B78C3F3801C00F153036046FEF744 +:10F3900096F90546CDE72DE9F043264C87B0A068E5 +:10F3A000FEF7E0FE7F264FF00108002558B1022746 +:10F3B00001287DD0022800F0EF80F9F74BFA07B062 +:10F3C0000620BDE8F083F9F745FA616891F840003E +:10F3D000032800F01581A068C27812F03F0F05D015 +:10F3E000037913F0100F18BF012700D10027002F59 +:10F3F00014BF0823012312F03F0F00F001810079B0 +:10F4000033EA000240F0FC8010F0020F08D091F8BF +:10F410008000002105F064FE002808BF012000D014 +:10F4200000208DF80C508DF810508DF814504FF0CE +:10F43000FF0801E074010020D0B105AA03A904A8C7 +:10F4400000F07AFC606890F831809DF80C0000288C +:10F4500018BF48F002080BD1A068FEF7DBFC81461C +:10F460000121A068FEF732FD4946F8F79AFF28B35C +:10F47000FFB1012000F0DDFB002852D020787F286A +:10F4800008BFFFDF94F900102670606890F85420E0 +:10F49000CDE90021029590F8733090F8802000F1BA +:10F4A0003201404605F0BEFE606880F86C50A3E073 +:10F4B00038E041460020FFF7FEF9A1E0606890F8CF +:10F4C0004100032818BF02282BD19DF81000002806 +:10F4D00027D09DF80C00002823D1F7B1012000F0BF +:10F4E000A8FB00281DD020787F2808BFFFDF94F9F3 +:10F4F00000102670606890F85420CDE90021029534 +:10F5000090F8733090F8802000F13201FE2005F071 +:10F5100089FE606880F86C506EE0FE210020FFF7E5 +:10F52000CAF96DE0F9F796F9A0681821C27812F0CF +:10F530003F0F65D00279914362D10421FEF7C6FCEA +:10F54000616891F84020032A01BF8078B7EB501F13 +:10F5500091F86000002853D04FF0010000F069FBE3 +:10F56000E8B320787F2808BFFFDF94F900102670E9 +:10F57000606890F85420CDE90021029590F873302E +:10F5800090F8802000F13201FF2005F04BFE60680A +:10F5900080F86C8030E000BFF9F75CF9606890F8A3 +:10F5A000400003282CD0A0681821C27812F03F0F29 +:10F5B00026D0007931EA000022D1012000F039FB89 +:10F5C00068B120787F2808BFFFDF94F9001026700B +:10F5D000606890F85420CDE90021029500E00FE02A +:10F5E00090F8733090F8802000F13201FF2005F090 +:10F5F00019FE606880F86C7007B00320BDE8F083E6 +:10F6000007B00620BDE8F083F0B5FE4C074683B096 +:10F6100060686D460078002818BFFFDF002661682B +:10F620008E70C86B02888A8042884A8382888A8367 +:10F63000C088C88381F8206047B10121A068FEF727 +:10F6400045FC0546A0680078C10907E06946A06846 +:10F65000FEF7B5FBA0680078C0F380116068012751 +:10F6600090F85120002A18BF002904D06A7902F0CE +:10F67000C002402A26D090F84A20002A18BF00294C +:10F6800003D0697911F0C00F1CD000F10E00E3F730 +:10F69000B3FC616891F85400FF2819D001F1080209 +:10F6A000C91DFEF743F9002808BFFFDF6068C17974 +:10F6B00041F00201C171D0F86D104161B0F87110D4 +:10F6C00001830FE02968C0F80E10A9884182E0E7A5 +:10F6D000C86B427ECA71D0F81A208A60C08B8881BC +:10F6E0004E610E8360680770C26B90F84B1082F811 +:10F6F0006710C06B0088F4F70AFDF4F7A3F903B0B4 +:10F70000F0BD2DE9F041BF4C0546002760684FF081 +:10F7100001083E4690F84000012818BF022802D098 +:10F72000032818BFFFDF5DB1A068FEF727FC18B9FA +:10F73000A068FEF77AFC18B100F08FFB074645E0A1 +:10F74000606890F850007F25801F06283ED2DFE8D1 +:10F7500000F003191924352FAA48F9F709FA0028EF +:10F7600008BF2570F9F7EBF9606890F8520030B1E6 +:10F77000F9F7DAF9F8F7C9FA606880F85260F9F732 +:10F7800069F830E09F48F9F7F3F9002808BF2570C1 +:10F79000F9F7D5F905F0EAFEC3E09A48F9F7E8F978 +:10F7A000002808BF2570F9F7CAF9F9F753F81AE0ED +:10F7B0009448F9F7DDF930B9257004E09148F9F77C +:10F7C000D7F90028F8D0F9F7BAF9AAE0102F80F09D +:10F7D0003881DFE807F01E9DA6AAF1F108B3F2F127 +:10F7E000F1F10C832051BDE8F041FFF791B80320FF +:10F7F00002F020F9002870D000210320FFF710F953 +:10F80000012211461046F9F7D4F961680C2081F8FD +:10F810005000BDE8F081606800F15005042002F05E +:10F8200009F900287DD00E202870012002F0FDFC8F +:10F83000A06861680078C0F3401081F8750000216D +:10F840000520FFF7EDF87048A1684FF0200CC26B5F +:10F850000B78527B23F020030CEA42121A430A7001 +:10F86000C16B95F825304A7B1A404A73C06B28213A +:10F8700080F86610BDE8F081062002F0DBF8002871 +:10F880004FD0614D0F2085F85000022002F0CDFCD2 +:10F890006068012190F880200846F9F78AF9A0688D +:10F8A00061680078C0F3401081F8750001210520DF +:10F8B000FFF7B6F8E86B80F80D80A068017821F0BA +:10F8C00020010170F9F75DFD002818BFFFDF282037 +:10F8D000E96B81F86600BDE8F08122E0052002F0C6 +:10F8E000A9F8F0B101210320FFF79AF8F9F749FDD3 +:10F8F000002818BFFFDF6068012190F880200846CB +:10F90000F9F757F961680D2081F85000BDE8F081E2 +:10F910006068A0F8816080F8836080F85080BDE85E +:10F92000F081BDE8F04100F061B96168032081F821 +:10F930005000BDE8F041082002F077BC606890F804 +:10F940008310490908BF012507D0012908BF0225F6 +:10F9500003D0022914BF00250825C06D00281CBF54 +:10F96000002000F09BF96068806DF9F747F8606847 +:10F9700090F84010022906D0032904BF90F86C10BB +:10F98000012904D010E090F86C1002290CD12A460D +:10F9900015F00C0F04D090F84C00012808BF042289 +:10F9A00001210020F9F705F96068072180F88050EF +:10F9B00080F8616041E000E043E0606890F8831007 +:10F9C000490908BF012507D0012908BF022503D036 +:10F9D000022914BF00250825C06D00281CBF002087 +:10F9E00000F05CF96068806DF9F708F8606890F8DD +:10F9F000401002290AD0032904BF90F86C10012995 +:10FA000008D014E0740100204411002090F86C101C +:10FA100002290CD12A4615F00C0F04D090F84C00A6 +:10FA2000012808BF042201210020F9F7C2F860680C +:10FA3000082180F8805080F8616080F85010BDE89F +:10FA4000F081FFDFBDE8F08170B5FE4C606890F892 +:10FA5000503000210C2B38D001220D2B40D00E2B22 +:10FA600055D00F2B1CBFFFDF70BD042002F0DDFB63 +:10FA7000606890F880100E20F8F7E3FB606890F85B +:10FA8000800010F00C0F14BF282100219620F8F7F9 +:10FA9000D3FFF9F75EF86068052190F88050A06800 +:10FAA000FEF727F8616881F8520048B115F00C0F95 +:10FAB0000CBF50255525F8F714F92846F9F72AF810 +:10FAC00061680B2081F8500070BDF9F742F8002101 +:10FAD0009620F8F7B1FF6168092081F8500070BDE9 +:10FAE00090F88010FF20F8F7ACFB606890F8800079 +:10FAF00010F00C0F14BF282100219620F8F79CFF6E +:10FB0000F9F727F861680A2081F8500070BDA0F865 +:10FB1000811080F8831080F850200020FFF774FDDA +:10FB2000BDE87040032002F080BB70B5C54C606832 +:10FB300090F850007F25801F062828BF70BDDFE8A1 +:10FB400000F0171F1D032A11BE48F9F711F800280D +:10FB500008BF2570F8F7F3FFF8F77CFEBDE87040AA +:10FB6000FEF7D6BEB748F9F703F8C8B9257017E015 +:10FB7000B448F8F7FDFF40B9257006E005F0F6FC43 +:10FB8000B048F8F7F5FF0028F6D0F8F7D8FFBDE841 +:10FB9000704000F02BB8AB48F8F7EAFF0028E5D03A +:10FBA000F8F7CDFF60680021643005F037FEBDE84E +:10FBB000704000F01BB870B5A24C06460D460129F6 +:10FBC00008D0606890F880203046BDE87040134649 +:10FBD00002F077BBF8F75CFA61680346304691F8AB +:10FBE00080202946BDE8704002F06BBB70B5F8F785 +:10FBF00085FFF8F764FFF8F72DFEF8F7D9FE914C72 +:10FC00000025606890F8520030B1F8F78DFFF8F7E2 +:10FC10007CF8606880F852506068022180F85010CB +:10FC2000A0F8815080F88350BDE87040002002F0B9 +:10FC3000FCBA70B5834D06460421A868FEF746F964 +:10FC4000044605F0C8FA002808BF70BD207800F00F +:10FC50003F00252814D2F8F761FA217811F0800FBF +:10FC60000CBF1E214FF49671B4F80120C2F30C02B0 +:10FC700012FB01F10A1AB2F5877F28BF814201D237 +:10FC8000002070BD68682188A0F88110A17880F8F4 +:10FC900083103046BDE8704001F0CCBE2DE9F04144 +:10FCA000684C0746606800F1810690F883004009BF +:10FCB00008BF012507D0012808BF022503D002286C +:10FCC00014BF00250825F8F78DFE307800F03F06B8 +:10FCD0003046F8F7DFFB606880F8736090F86C00DE +:10FCE00002280CBF4020FF202946F8F7AAFA27B1C6 +:10FCF00029460120F8F795FC05E060682A46C16DA9 +:10FD00000120F8F7E2FCF8F724FF0521A068FDF7D1 +:10FD1000F0FE6168002881F8520008BFBDE8F0815C +:10FD200015F00C0F0CBF50245524F7F7DAFF2046CE +:10FD3000BDE8F041F8F7EEBE2DE9F74F414C002544 +:10FD4000914660688A4690F8510000280CBF4FF039 +:10FD500001084FF00008A0680178CE090121FEF7E4 +:10FD6000B5F836B1407900F0C000402808BF012640 +:10FD700000D00026606890F85210002961D090F8F9 +:10FD800040104FF0000B032906D190F839100029DC +:10FD900018BF90F856700ED1A068C17811F03F0FCF +:10FDA0001CBF007910F0010F02D105F061F940B3DA +:10FDB000606890F85370FF2F18BF082F21D0384685 +:10FDC000FDF7D9FB002818BF4FF00108002E38D0EE +:10FDD000606890F8620030B1FDF7F1FD054660689B +:10FDE00080F862B02DE03846FDF791FD054601210F +:10FDF000A068FEF76BF801462846F9F7D3FB0546E5 +:10FE00001FE0F6B1606890F86100D0B9A068C178D1 +:10FE100011F03F0F05D0017911F0010F18BF0B2130 +:10FE200000D105210022FDF7A4FD616881F8520090 +:10FE300038B1FDF7B9FDFF2803D06168012581F8CD +:10FE4000530001E0740100208AF800500098067009 +:10FE500089F8008003B0BDE8F08F2DE9F04FFF4C2A +:10FE600087B00025606890F850002E46801F4FF044 +:10FE70007F08062880F0D581DFE800F00308088BB2 +:10FE8000FDDB00F0F8FB054600F0CCB9F348F8F7CD +:10FE90006FFE002808BF84F80080F8F750FEA068C5 +:10FEA000FDF782FF0546072861D1A068FEF75AF9E1 +:10FEB0000146606890F86C208A4258D190F8501042 +:10FEC000062908BF002005D090F8500008280CBF74 +:10FED0000220012005F08AF970B90321A068FDF71E +:10FEE000F5FF002843D001884078C1F30B010009D9 +:10FEF00005F07BFC00283AD000212846FFF7A1F945 +:10FF0000A0B38DF80C608DF808608DF8046062680D +:10FF1000FF2592F8500008280CBF02210121A0689B +:10FF2000C37813F03F0F1CBF007910F0020F12D0FE +:10FF300092F8800005F0D4F868B901AA03A902A8D4 +:10FF4000FFF7FAFE606890F831509DF80C00002829 +:10FF500018BF45F002052B469DF804209DF80810B7 +:10FF60009DF80C0000F0D5F9054603E0FFE705F029 +:10FF7000FDFA0225606890F85200002800F05281D6 +:10FF8000F8F7D2FDF7F7C1FE606880F8526000F024 +:10FF900049B9A068FDF708FF0646A1686068CA78FD +:10FFA00090F86D309A4221D10A7990F86E309A42D9 +:10FFB0001CD14A7990F86F309A4217D18A7990F81B +:10FFC00070309A4212D1CA7990F871309A420DD1AC +:10FFD0000A7A90F872309A4208D1097890F8740041 +:10FFE000C1F38011814208BF012500D00025F8F738 +:10FFF00031FC9A48F8F7BCFD002808BF84F800805F +:020000040002F8 +:10000000F8F79DFD042E11D185B120787F2808BF17 +:10001000FFDF94F9003084F80080606890F8732066 +:1000200090F87D1090F8540005F06EFB062500F066 +:10003000F9B802278948F8F79BFD002808BF84F823 +:100040000080F8F77CFDA068FDF7AEFE0546A068CD +:10005000FEF788F8082D08BF00287CD1A0684FF073 +:100060000301C27812F03F0F75D0007931EA000029 +:1000700071D1606800E095E000F1500890F8390017 +:10008000002814BF98F8066098F803604FF0000944 +:1000900098F8020078B1FDF787FC0546FF280AD0E2 +:1000A0000146A068401DFDF758FCB5420CBF4FF05B +:1000B00001094FF000090021A068FDF707FF0622A3 +:1000C00008F11D01EEF78CF940B9A068FDF795FE27 +:1000D00098F82410884208BF012000D0002059EA77 +:1000E00000095DD0606800F1320590F831A098F801 +:1000F000010038B13046FDF74BFD00281CBF054616 +:100100004FF0010A4FF00008A06801784FEAD11BB8 +:100110000121FDF7DBFEBBF1000F07D0407900F0B5 +:10012000C000402808BF4FF0010B01D04FF0000B7A +:100130000121A068FDF7CAFE06222946EEF750F914 +:1001400030B9A068FDF766FE504508BF012501D013 +:100150004FF0000500E023E03BEA050018BFFF2E4A +:100160000DD03046FDF7D3FB060008D00121A06872 +:10017000FDF7ACFE01463046F9F714FA804645EA31 +:10018000080019EA000F0BD060680121643005F007 +:1001900045FB01273846FFF737FA052002F045F8FE +:1001A0003D463FE002252D48F8F7E2FC002808BF55 +:1001B00084F80080F8F7C3FCA068FDF7F5FD06465B +:1001C000A068FDF7CFFF072E08BF00282AD1A0683E +:1001D0004FF00101C27812F03F0F23D00279914312 +:1001E00020D1616801F150060021FDF76FFE062263 +:1001F00006F11D01EEF7F4F8A0B9A068FDF7FDFDCA +:1002000096F8241088420DD160680121643005F011 +:1002100005FBFF21022000F009F8002818BF032584 +:1002200000E0FFDF07B02846BDE8F08F2DE9F0437E +:100230000A4C0F4601466068002683B090F87D2086 +:10024000002A35D090F8500008280CBF022501255F +:10025000A168C87810F03F0F02E000007401002090 +:10026000FD484FF000084FF07F0990F900001CBFD7 +:10027000097911F0100F22D07F2808BFFFDF94F911 +:10028000001084F80090606890F85420CDE90021B7 +:10029000029590F8733090F8802000F132013846D2 +:1002A00004F0C0FF05F0AAFA10B305F050F92CE0F5 +:1002B000002914BF0221012180F87D10C2E77F28A8 +:1002C00008BFFFDF94F9001084F80090606890F890 +:1002D0005420CDE90021029590F8733090F88020E9 +:1002E00000F13201384604F09DFF05F030F90CE0D2 +:1002F0000220FFF79EFC30B16068012680F86C8018 +:10030000F8F7A8FA01E005F031F903B03046BDE88E +:10031000F0832DE9F047D04C054684B09A46174645 +:100320000E46A068FDF71EFF4FF00109002800F0FF +:10033000CF804FF00208012808D0022800F00E817B +:1003400005F014F904B04046BDE8F087A068092123 +:10035000C27812F03F0F00F059810279914340F0CA +:100360005581616891F84010032906D012F0020F00 +:1003700008BFFF2118D05DB115E00021FDF7A6FDF3 +:1003800061680622C96B1A31EEF72AF848BB1EE0F5 +:10039000FDF740FD05460121A068FDF797FD2946C0 +:1003A000F7F7FFFF18B15146012000F051B960681E +:1003B00090F84100032818BF022840F02781002E42 +:1003C0001CBFFE21012040F0438100F01FB9A0684E +:1003D000FDF713FD6168C96B497E884208BF01269D +:1003E00000D00026A068C17811F03F0F05D0017938 +:1003F00011F0020F01D06DB338E0616891F842202E +:10040000012A01D096B11BE0D6B90021FDF75EFDAF +:1004100061680268C96BC1F81A208088C883A06827 +:10042000FDF7EBFC6168C96B487609E091F8530071 +:1004300091F85610884203D004B04046BDE8F087DA +:100440006068643005F02EFA002840D004B00F2018 +:10045000BDE8F08767B1FDF7DDFC05460121A06826 +:10046000FDF734FD2946F7F79CFF08B1012200E0B3 +:100470000022616891F84200012807D040B92EB9E6 +:1004800091F8533091F856108B4201D1012100E0D0 +:1004900000210A421BD0012808BF002E11D14FF0C5 +:1004A0000001A068FDF712FD61680268C96BC1F820 +:1004B0001A208088C883A068FDF79FFC6168C96B1B +:1004C00048766068643005F0EDF90028BED19DE003 +:1004D00060682F46554690F840104FF002080329F7 +:1004E000AAD0A168CA7812F03F0F1BBF097911F09A +:1004F000020F002201224FF0FF0A90F85010082945 +:100500000CBF0221012192B190F8800004F0E8FDB7 +:1005100068B95FB9A068FDF77DFC07460121A068B6 +:10052000FDF7D4FC3946F7F73CFF48B1AA465146DF +:100530000020FFF77BFE002818BF4FF003087BE781 +:10054000606890F84100032818BF02287FF474AF58 +:10055000002E18BF4FF0FE0AE9D16DE7616891F8EF +:100560004030032B52D0A0684FF0090CC27812F033 +:100570003F0F4BD002793CEA020C47D1022B06D048 +:1005800012F0020F08BFFF2161D0E5B35EE012F068 +:10059000020F4FF07F0801D04DB114E001F164006B +:1005A00005F080F980B320787F2842D013E067B34C +:1005B000FDF730FC05460121A068FDF787FC2946C0 +:1005C000F7F7EFFE08B36068643005F06BF9D8B157 +:1005D00020787F282DD094F9001084F8008060687E +:1005E00090F85420CDE90021CDF8089090F87330B0 +:1005F00090F8802000F13201504604F013FE0D20E7 +:1006000004B0BDE8F08716E000E001E00220F7E763 +:10061000606890F84100032818BF0228F6D1002E28 +:10062000F4D04FF0FE014FF00200FEF744F9022033 +:10063000E6E7FFDFCFE7FDF7EDFB05460121A06808 +:10064000FDF744FC2946F7F7ACFE38B151460220CD +:10065000FEF731F9DAE7000074010020606890F8D5 +:100660004100032818BF0228D0D1002E1CBFFE2154 +:100670000220EDD1CAE72DE9F84F4FF00008F74806 +:10068000F8F776FA7F27F54C002808BF2770F8F7AF +:1006900056FAA068FDF788FB81460121FEF7D1FDDF +:1006A000616891F88020012A14D0042A1CBF082A0E +:1006B000FFDF00F0D781606890F8520038B1F8F79A +:1006C00033FAF7F722FB6168002081F852004046B8 +:1006D000BDE8F88F0125E24EB9F1080F3AD2DFE804 +:1006E00009F03EC00439393914FC0546F8F7B2F870 +:1006F000002D72D0606890F84000012818BF0228D1 +:100700006BD120787F2869D122E018B391F840009E +:10071000022802D0012818D01CE020787F2808BFCA +:10072000FFDF94F90000277000906068FF2190F8C7 +:10073000733090F85420323004F02FFF61680020AD +:100740004FF00C0881F87D00B5E720787F2860D154 +:10075000FFDF5EE0F8F77EF84FF00608ABE74FF0FA +:100760000008002800F0508191F84000022836D09F +:1007700001284BD003289ED1A068CA6BC37892F899 +:100780001AC0634521D1037992F81BC063451CD17F +:10079000437992F81CC0634517D1837992F81DC044 +:1007A000634512D1C37992F81EC063450DD1037A17 +:1007B00092F81FC0634508D1037892F819C0C3F3BB +:1007C0008013634508BF012300D0002391F8421035 +:1007D00001292CD0C3B300F013B93FE019E0207811 +:1007E0007F2808BFFFDF94F9000027700090606841 +:1007F000FF2190F8733090F85420323004F0CDFE91 +:1008000060684FF00C0880F87D5054E720787F280E +:100810009ED094F90000277000906068FF2190F846 +:10082000733090F85420323004F0B7FE16E0002BFD +:100830007ED102F11A01FDF7C2FAA068FDF7DDFAD8 +:100840006168C96B4876DBE0FFE796F85600082838 +:1008500070D096F8531081426AD0D5E04FF0060868 +:1008600029E7054691F8510000280CBF4FF0010B15 +:100870004FF0000B4FF00008A06810F8092BD209C8 +:1008800007D0407900F0C000402808BF4FF0010AAF +:1008900001D04FF0000A91F84000032806D191F8EA +:1008A0003900002818BF91F8569001D191F8539063 +:1008B0004846FDF72CF80090D8B34846FCF75BFE9D +:1008C000002818BF4FF0010BBAF1000F37D0A06815 +:1008D000A14600F10901009800E0B6E0F8F762FED9 +:1008E0005FEA0008D9F8040090F8319018BF49F089 +:1008F0000209606890F84010032924D0F7F7AAFF96 +:10090000002DABD0F7F75DFD002808BFB8F1000F50 +:100910007DD020787F2808BFFFDF94F90000277082 +:1009200000906068494690F8733090F8542002E0D7 +:1009300066E004E068E0323004F02FFE8EE7606885 +:1009400090F83190D5E7A168C06BCA78837E9A424F +:100950001BD10A79C37E9A4217D14A79037F9A4202 +:1009600013D18A79437F9A420FD1CA79837F9A4201 +:100970000BD10A7AC37F9A4207D10978407EC1F32E +:100980008011814208BF012700D0002796F853004C +:10099000082806D096F85610884208BF4FF0010983 +:1009A00001D04FF00009B8F1000F05D1BBF1000FE5 +:1009B00004D0F7F706FD08B1012000E000204DB19A +:1009C00096F84210012903D021B957EA090101D054 +:1009D000012100E00021084216D0606890F8421022 +:1009E000012908BF002F0BD1C06B00F11A01A068CC +:1009F000FDF7E5F9A068FDF700FA6168C96B487674 +:100A00004FF00E0857E602E0F7F724FF26E760688C +:100A100090F84100032818BF02287FF41FAFBAF1F5 +:100A2000000F3FF41BAF20787F2808BFFFDF94F949 +:100A30000000277000906068FE2190F8733090F8F5 +:100A40005420323004F0A9FD08E791F8481000293D +:100A500018BF00283FF47EAE0BE0000074010020B8 +:100A600044110020B9F1070F7FF474AE00283FF461 +:100A700071AEFEF790FC80461DE60000D0F8001134 +:100A800049B1D0E941231A448B691A448A61D0E9FB +:100A90003F12D16003E0FE4AD0F8FC101162D0E9A9 +:100AA0003F1009B1086170470028FCD00021816126 +:100AB00070472DE9FF4F06460C46488883B040F248 +:100AC000E24148430190E08A002500FB01FA94F8D6 +:100AD0007C0090460D2822D00C2820D024281ED03F +:100AE00094F87D0024281AD000208346069818B177 +:100AF0000121204603F0C0F894F8641094F86500D2 +:100B0000009094F8F0200F464FF47A794AB1012A08 +:100B100061D0022A44D0032A5DD0FFDFB5E0012076 +:100B2000E3E7B8F1000F00D1FFDFD94814F8641FE4 +:100B3000243090F83400F0F7C4FC01902078F8F7E6 +:100B4000CFFB4D4600F2E730B0FBF5F1DFF8409304 +:100B5000D9F80C0001EB00082078F8F7C1FB01463A +:100B600014F86409022816D0012816D040F6340083 +:100B700008444AF2EF010844B0FBF5F10198D9F8B6 +:100B80001C20411A514402EB08000D18012084F882 +:100B9000F0002D1D78E02846EAE74FF4C860E7E74B +:100BA000DFF8EC92A8F10100D9F80810014300D158 +:100BB000FFDFB848B8F1000F016801EB0A0506D065 +:100BC000D9F8080000F22630A84200D9FFDF032040 +:100BD00084F8F00058E094F87C20019D242A05D088 +:100BE00094F87D30242B01D0252A3AD1B4F8702016 +:100BF000B4F81031D21A521C12B2002A31DB94F828 +:100C0000122172B3174694F8132102B110460090D6 +:100C1000022916D0012916D040F6340049F60852B0 +:100C20008118022F12D0012F12D040F63400104448 +:100C3000814210D9081A00F5FA70B0FBF9F00544AA +:100C40000FE04846EAE74FF4C860E7E74846EEE7BA +:100C50004FF4C860EBE7401A00F5FA70B0FBF9F00A +:100C60002D1AB8F1000F0FD0DFF82482D8F8080051 +:100C700018B9B8F8020000B1FFDFD8F8080000F298 +:100C80002630A84200D9FFDF05B9FFDF2946D4F896 +:100C9000F400F4F750FFC4F8F400B06000203070A6 +:100CA0004FF0010886F80480204603F040F8ABF1CD +:100CB0000101084202D186F8058005E094F8F000B1 +:100CC000012844D003207071606A3946009A01F00F +:100CD00042FBF060069830EA0B0035D029463046DA +:100CE000F0F7BAF987B2204603F021F8B8420FD8DE +:100CF000074686F8058005FB07F1D4F8F400F4F701 +:100D00001AFFB06029463046F0F7A6F9384487B29A +:100D10003946204602F0B0FFB068C4F8F400A06E77 +:100D2000002811D0B4F87000B4F89420801A01B2F1 +:100D3000002909DD34F86C0F0144491E91FBF0F1E4 +:100D400089B201FB0020208507B0BDE8F08F0220AA +:100D5000B9E72DE9F04106460C46012001F0DBFA27 +:100D6000C5B20B2001F0D7FAC0B2854200D0FFDF38 +:100D70000025082C7ED2DFE804F00461696965C6AD +:100D80008293304601F0DDFA0621F3F78FF8040074 +:100D900000D1FFDF304601F0D4FA2188884200D02C +:100DA000FFDF94F8F00000B9FFDF204602F00FFEED +:100DB000374E21460020B5607580F561FDF7E9FCEE +:100DC00000F19807606AB84217D994F86500F7F700 +:100DD0000BF9014694F864004FF47A72022828D087 +:100DE000012828D040F6340008444AF2473108442C +:100DF000B0FBF2F1606A0844C51B21460020356152 +:100E0000FDF7C7FC618840F2E24251439830081A6E +:100E1000A0F22630706194F8652094F86410606A3E +:100E200001F099FAA0F5CB70B061BDE8F041F5F79B +:100E300060BE1046D8E74FF4C860D5E7BDE8F04182 +:100E400002F02FBEBDE8F041F7F7D5BE304601F005 +:100E500078FA0621F3F72AF8040000D1FFDF3046C4 +:100E600001F06FFA2188884200D0FFDF01220021C3 +:100E7000204600E047E0BDE8F04101F089BAF7F70D +:100E800073FDF7F7B8FE02204FF0E02104E0000008 +:100E9000CC11002084010020C1F88002BDE8F0815F +:100EA000304601F04EFA0621F3F700F8040000D1B5 +:100EB000FFDF304601F045FA2188884200D0FFDF8D +:100EC00094F8F000042800D0FFDF84F8F05094F884 +:100ED000FA504FF6FF76202D00D3FFDFFA4820F8B6 +:100EE000156094F8FA00F5F720F900B9FFDF20202B +:100EF00084F8FA002046FFF7C1FDF4480078BDE809 +:100F0000F041E2F701B8FFDFC8E770B5EE4C00250D +:100F1000443C84F82850E07868B1E570FEF71EF98B +:100F20002078042803D0606AFFF7A8FD6562E748CF +:100F30000078E1F7E9FFBDE8704001F03ABA70B51A +:100F4000E14C0146443CE069F5F706FE6568A2788D +:100F500090FBF5F172B140F27122B5FBF2F292B260 +:100F6000A36B01FB02F6B34202D901FB123200E08F +:100F70000022A2634D43002800DAFFDF2946E06922 +:100F8000F4F7D9FDE06170BD2DE9F05FFEF736F9A9 +:100F90008246CD48683800F1240881684646D8F872 +:100FA0001800F4F7C8FD0146F069F5F7D5FD4FF0DC +:100FB0000009074686F835903C4640F28F254E469C +:100FC0001EE000BF0AEB06000079F7F70DF80146B6 +:100FD0004AF2B12001444FF47A70B1FBF0F008EB13 +:100FE0008602414692681044844207D3241A91F83D +:100FF0003500A4F28F24401C88F83500761CF6B228 +:1010000098F83600B042DDD8002C10DD98F8351085 +:10101000404608EB81018968A14208D24168C91B9A +:10102000B1F5247F00D30D466C4288F8359098F8CE +:101030003560C3460AEB060898F80400F6F7D4FFBB +:101040004AF2B12101444FF47A7AB1FBFAF298F8EE +:101050000410082909D0042909D0002013180429F4 +:101060000AD0082908D0252207E0082000E0022045 +:1010700000EB40002830F1E70F22521D4FF4A8701A +:10108000082914D0042915D0022916D04FF0080CD5 +:101090005FF0280012FB0C00184462190BEB86036A +:1010A00010449A68D84690420BD8791925E04FF041 +:1010B000400CEFE74FF0100CECE74FF0040C182059 +:1010C000E8E798F8352098F836604046B24210D2EA +:1010D000521C88F835203C1B986862198418084611 +:1010E000F6F782FF4AF2B1210144B1FBFAF001198F +:1010F00003E080F83590D8F80410D8F81C00BDE85B +:10110000F05FF4F718BD2DE9FE4F14460546FEF7D3 +:1011100075F8DFF8B4A10290AAF1440A50469AF893 +:1011200035604FF0000B0AEB86018968CAF83C1065 +:10113000F4B3044600780027042825D005283ED0C3 +:10114000FFDFA04639466069F4F7F5FC0746F5F77E +:101150000BF881463946D8F80440F5F7FDFC401EEF +:1011600090FBF4F0C14361433846F4F7E4FC0146D8 +:10117000C8F81C004846F5F7EFFC002800DDFFDF4B +:10118000012188F813108DE0D4F81490D4F804806D +:1011900001F07AF9070010D0387800B9FFDF7969DB +:1011A00078684A460844414601F05AF9074600E08B +:1011B0000BE04045C5D9FFDFC3E75F46C1E7606A82 +:1011C00001F004F940F6B837BBE7C1690AEB460005 +:1011D0000191408D10B35446DAF81400FFF7AFFECA +:1011E0006168E069F4F7A7FC074684F835B0019C14 +:1011F000D0462046DAF81410F5F7AEFC81463946A1 +:101200002046F5F7A9FCD8F804200146B9FBF2F016 +:10121000B1FBF2F1884242D0012041E0F4F7A4FF93 +:10122000FFF78DFEFFF7B0FE9AF83510DAF804905C +:101230000AEB81010746896800913946DAF81C00FB +:10124000F5F78AFC00248046484504DB98FBF9F456 +:1012500004FB09F41AE0002052469AF8351007E022 +:1012600002EB800304F28F249B68401C1C44C0B234 +:101270008142F5D851B10120F6F7B6FE4AF2B1210C +:1012800001444FF47A70B1FBF0F004440099A8EBEC +:1012900004000C1A00D5FFDFCAF83C40A7E7002085 +:1012A00088F813009AF802005446B8B13946E0694C +:1012B000F5F752FC0146A26B40F2712042438A428C +:1012C00006D2C4F83CB009E03412002080010020AE +:1012D000E06B511A884200D30846E063AF6085F89E +:1012E00000B001202871029F94F835003F1DC05DB9 +:1012F000F6F77AFE4AF23B5101444FF47A70B1FBA3 +:10130000F0F0E16BFE300844E8602078042808D152 +:1013100094F8350004EB4000408D0A2801D20320E8 +:1013200000E00220687104EB4600408DC0B1284601 +:101330006168EFF791FE82B20020761C0CE000BFDE +:1013400004EB4001B0424B8D13449BB24B8501D35B +:101350005B1C4B85401CC0B294F836108142EFD222 +:10136000A8686061A06194F8350004EB4001488DE5 +:10137000401C488594F83500C05D082803D0042837 +:1013800003D000210BE0082100E0022101EB410124 +:1013900028314FF4A872082804D0042802D002286B +:1013A00007D028220A44042805D0082803D0252184 +:1013B00002E01822F6E70F21491D08280CD0042866 +:1013C0000CD002280CD0082011FB0020E16B8842D1 +:1013D00008D20120BDE8FE8F4020F5E71020F3E79A +:1013E0000420F1E70020F5E770B5FE4C061D14F867 +:1013F000352F905DF6F7F8FD4FF47A7100F2E73083 +:10140000B0FBF1F0D4F8071045182078805DF6F7AE +:1014100073FE2178895D082903D0042903D00022B6 +:101420000BE0082200E0022202EB420228324FF4D5 +:10143000A873082904D0042902D0022907D0282340 +:101440001344042905D0082903D0252202E01823DB +:10145000F6E70F22521D08290AD004290AD00229D2 +:101460000AD0082112FB0131081A281A293070BD50 +:101470004021F7E71021F5E70421F3E72DE9FF41CB +:1014800007460C46012000F046FFC5B20B2000F0D5 +:1014900042FFC0B2854200D0FFDF20460126002572 +:1014A000D04C082869D2DFE800F004304646426894 +:1014B0006865667426746078002819D1FDF79EFE71 +:1014C000009594F835108DF808104188C90411D0A2 +:1014D000206C019003208DF80900C24824388560F3 +:1014E000C56125746846FDF768FB002800D0FFDF62 +:1014F000BDE8FF81FFF778FF0190E07C10B18DF827 +:101500000950EAE78DF80960E7E7607840B1207C90 +:1015100008B9FDF7F9FD6574BDE8FF41F4F72FBD8B +:10152000A674FDF739FC0028E2D0FFDFE0E7BDE854 +:10153000FF41F7F760BBFDF761FE4088C00407D0AC +:1015400001210320FDF75EFEA7480078E1F7DCFCEF +:10155000002239466846FFF7D6FD38B1694638465D +:1015600000F0EDFE0028C3D1FFDFC1E7E670FFF712 +:10157000CCFCBDE7BDE8FF41C7E4FFDFB8E7994910 +:1015800050B101228A704A6840F27123B2FBF3F233 +:1015900002EB0010886370470020887070472DE9C7 +:1015A000F05F894640F271218E4E48430025044683 +:1015B000706090462F46D0074AF2B12A4FF47A7BEA +:1015C0000FD0B9F800004843B0600120F6F70CFDD9 +:1015D00000EB0A01B1FBFBF0241AB7680125A4F265 +:1015E0008F245FEA087016D539F8151040F2712083 +:1015F000414306EB85080820C8F80810F6F7F4FC0C +:1016000000EB0A01B1FBFBF0241AD8F80800A4F2A1 +:101610008F2407446D1CA74219D9002D17D0391B00 +:10162000B1FBF5F0B268101AB1FBF5F205FB12122E +:10163000801AB060012008E0B1FBF5F306EB8002F0 +:101640009468E31A401CC0B29360A842F4D3BDE88A +:10165000F09F2DE9F041634C00262078042804D047 +:101660002078052801D00C2018E401206070607CEF +:10167000002538B1EFF3108010F0010F72B610D0D2 +:1016800001270FE0FDF7BAFD074694F82000F5F7B3 +:10169000B2F87888C00411D000210320FDF7B2FD14 +:1016A0000CE00027607C38B1A07C28B1FDF72CFD50 +:1016B0006574A574F4F763FC07B962B694F820006A +:1016C000F5F705FB94F8280030B184F8285020780D +:1016D000052800D0FFDF0C26657000F06AFE30465A +:1016E00012E4404810B5007808B1FFF7B2FF00F0EF +:1016F000D4FE3C4900202439086210BD10B53A4C94 +:1017000058B1012807D0FFDFA06841F66A0188427E +:1017100000D3FFDF10BD40F6C410A060F4E73249EB +:1017200008B508702F4900200870487081F828001B +:10173000C8700874487488742022486281F8202098 +:10174000243948704FF6FF7211F1680121F810201A +:10175000401CC0B22028F9D30020FFF7CFFFFFF7CD +:10176000C0FF1020ADF80000012269460420FFF7F9 +:1017700016FF08BD7FB51B4C05460E46207810B1FC +:101780000C2004B070BD95F8652095F86410686A67 +:1017900000F0C5FEC5F80401656295F8F00000B1DF +:1017A000FFDF104900202439C861052121706070D5 +:1017B00084F82800014604E004EB4102491C5085EE +:1017C000C9B294F836208A42F6D284F83500304601 +:1017D000FFF7D5FE0548F4F74DFC84F820002028DB +:1017E00007D105E0F0110020800100207D140200E7 +:1017F000FFDFF4F7B9FC606194F82010012268461D +:10180000FFF781FC00B9FFDF94F82000694600F083 +:1018100096FD00B9FFDF0020B3E7F94810B5007866 +:1018200008B1002010BD0620F2F7DAFA80F00100BE +:1018300010BDF8B5F24D0446287800B1FFDF002056 +:10184000009023780246DE0701466B4605D060888B +:10185000A188ADF80010012211462678760706D53A +:10186000E088248923F8114042F00802491C491EEF +:1018700085F836101946FFF792FE0020F8BD1FB517 +:1018800011B1112004B010BDDD4C217809B10C203C +:10189000F8E70022627004212170114605E000BFC4 +:1018A00004EB4103491C5A85C9B294F836308B4287 +:1018B000F6D284F83520FFF762FED248F4F7DAFB5F +:1018C00084F82000202800D1FFDF00F0DDFD10B1FA +:1018D000F4F74AFC05E0F4F747FC40F6B831F4F7BA +:1018E0002AF9606194F8201001226846FFF70BFC8A +:1018F00000B9FFDF94F82000694600F020FD00B930 +:10190000FFDF0020BEE770B5BD4C616A0160FFF7E4 +:10191000A0FE050002D1606AFFF7B0F80020606207 +:10192000284670BD7FB5B64C2178052901D00C2022 +:1019300027E7B3492439C860606A00B9FFDF606AED +:1019400090F8F00000B1FFDF606A90F8FA002028FC +:1019500000D0FFDFAC48F4F78DFB616A0546202814 +:1019600081F8FA000E8800D3FFDFA548443020F844 +:101970001560606A90F8FA00202800D1FFDF00238C +:1019800001226846616AFFF794F8606A694690F838 +:10199000FA0000F0D4FC00B9FFDF00206062F0E63E +:1019A000974924394870704710B540F2E24300FB74 +:1019B00003F4002000F0B3FD844201D9201A10BDC9 +:1019C000002010BD70B50D46064601460020FCF70C +:1019D000E0FE044696F86500F6F706FB014696F829 +:1019E00064004FF47A72022815D0012815D040F611 +:1019F000340008444AF247310844B0FBF2F17088E1 +:101A000040F271225043C1EB4000A0F22630A542C3 +:101A100006D2214605E01046EBE74FF4C860E8E740 +:101A20002946814204D2A54201D2204600E0284640 +:101A3000706270BD70B50546FDF7E0FB7049007837 +:101A400024398C689834072D30D2DFE805F004344F +:101A500034252C34340014214FF4A873042810D0FA +:101A60000822082809D02A2102280FD011FB0240A1 +:101A700000222823D118441819E0402211FB02400B +:101A8000F8E7102211FB02402E22F3E7042211FB9B +:101A9000024000221823EDE7282100F04BFC04440B +:101AA00004F5317403E004F5B07400E0FFDF54483E +:101AB000C06BA04201D9012070BD002070BD70B57F +:101AC0004F4C243C607870B1D4E904512846A26898 +:101AD000EFF7EDFA2061A84205D0A169401B084448 +:101AE000A061F5F706F82169A068884201D820783E +:101AF00008B1002070BD012070BD2DE9F04F0546F2 +:101B000085B016460F461C461846F6F7F5FA05EB63 +:101B100047014718204600F0F5FB4AF2C5714FF423 +:101B20007A7908444D46B0FBF5F0384400F160087E +:101B30003348761C24388068304404902046F6F7F9 +:101B4000DBFAA8EB0007204600F0DCFB0646204647 +:101B5000F6F74AFA301AB0FBF5F03A1A18252820A1 +:101B60004FF4C8764FF4BF774FF0020B082C30D0FB +:101B7000042C2BD00021022C2ED0082311F1280197 +:101B800003EB830C0CEB831319440A444FF0000A57 +:101B9000082C29D0042C22D00021022C29D0054663 +:101BA000082001F5B07100BF00EB0010284481420D +:101BB00032D2082C2AD0042C1ED00020022C28D08F +:101BC0000821283001EB0111084434E03946102384 +:101BD000D6E731464023D3E704231831D0E73D460A +:101BE00040F2EE311020DFE735464FF435614020FA +:101BF000DAE70420B431D7E738461021E2E70000E5 +:101C0000F01100207D140200530D020030464021E7 +:101C1000D8E704211830D5E7082C4FD0042C4AD03F +:101C20000021022C4DD0082311F12801C3EBC30081 +:101C300000EB4310084415182821204600F07AFBD9 +:101C400005EB4001082C42D0042C3DD00026022C8C +:101C50003FD0082016F1280600EB801006EB80002C +:101C60000E180120FA4D8DF804008DF800A08DF8B3 +:101C700005B0A86906F22A260499F3F75CFFCDE9BE +:101C800002062046F6F7B0F94AF23B510144B1FB97 +:101C9000F9F0301AFE38E8630298C5F84080A86170 +:101CA00095F82000694600F04AFB002800D1FFDFCC +:101CB00005B0BDE8F08F39461023B7E73146402321 +:101CC000B4E704231831B1E73E461020C4E74020B2 +:101CD000C2E704201836BFE72DE9FE4F06461C4632 +:101CE000174688464FF0010A1846F6F705FAD84D10 +:101CF000243DA9688A1907EB48011144471820467A +:101D000000F000FB4FF47A7BD84600F6FB00B0FBF6 +:101D1000F8F0384400F120092046F6F7EDF9A968FB +:101D20000246A9EB0100801B871A204600F0EAFA60 +:101D300005462046F6F758F9281AB0FBF8F03A1A8B +:101D4000182528204FF4C8774FF4BF78082C2DD0E1 +:101D5000042C28D00021022C2BD0082311F12801BB +:101D600003EB830C0CEB831319440A44082C28D092 +:101D7000042C21D00021022C28D00546082001F592 +:101D8000B07100BF00EB0010284481422AD2082C19 +:101D900022D0042C1DD00020022C20D00821283075 +:101DA00001EB01112CE041461023D9E739464023CD +:101DB000D6E704231831D3E7454640F2EE31102030 +:101DC000E0E73D464FF435614020DBE70420B431C5 +:101DD000D8E740461021E3E738464021E0E70421F8 +:101DE0001830DDE7082C48D0042C43D00020022C0A +:101DF00046D0082110F12800C1EBC10303EB4111CB +:101E0000084415182821204600F094FA05EB4001FB +:101E1000082C3BD0042C36D00027022C38D00820C8 +:101E200017F1280700EB801007EB80000C1804F571 +:101E300096740C98F6F7D8F84AF23B510144B1FB7E +:101E4000FBF0834DFE30A5F12407E96B06F1FE029D +:101E50000844B9680B191A44824224D93219114432 +:101E60000C1AFE342044B0F1807F37D2642C12D299 +:101E7000642011E040461021BEE738464021BBE710 +:101E800004211830B8E747461020CBE74020C9E7C7 +:101E900004201837C6E720460421F4F790FEE8B185 +:101EA000E86B2044E863E0F703FFB9682938314460 +:101EB0000844CDE9000995F835008DF808000220A6 +:101EC0008DF809006846FCF778FE00B1FFDFFCF7EB +:101ED00063FF00B1FFDF5046BDE8FE8F4FF0000A00 +:101EE000F9E71FB500F021FB594C607880B994F8F0 +:101EF000201000226846FFF706F938B194F8200058 +:101F0000694600F01CFA18B9FFDF01E00120E0701B +:101F1000F4F735F800206074A0741FBD2DE9F84F68 +:101F2000FDF76CF90646451CC07840090CD0012825 +:101F30000CD002280CD000202978824608064FF4E5 +:101F4000967407D41E2006E00120F5E70220F3E78F +:101F50000820F1E72046B5F80120C2F30C0212FB7D +:101F600000F7C80901D010B103E01E2401E0FFDF33 +:101F70000024F6F7D3F8A7EB00092878B77909EB26 +:101F80000408C0F3801010B120B1322504E04FF4F2 +:101F9000FA7501E0FFDF00250C2F00D3FFDF2D488D +:101FA0002D4A30F81700291801FB0821501CB1FBFD +:101FB000F0F5F6F76DF8F6F717F84FF47A7100F2CE +:101FC0007160B0FBF1F1A9EB0100471BA7F15900CB +:101FD000103FB0F5247F11D31D4E717829B9024608 +:101FE000534629462046FFF788FD00F09EFAF3F796 +:101FF000C6FF00207074B074BDE8F88F3078009090 +:102000005346224629463846FFF766FE0028F3D19C +:1020100001210220FDF7F6F8BDE8F84F61E710B5A1 +:102020000446012903D10A482438007830B104203D +:1020300084F8F000BDE81040F3F7A1BF00220121B1 +:10204000204600F0A5F934F8700F401C2080F1E71D +:10205000F0110020646302003F420F002DE9F041BF +:102060000746FDF7CBF8050000D1FFDF287810F018 +:102070000C0F01D0012100E00021F74C606A3030E4 +:10208000FCF7C7FA29783846EFF71BFAA4F12406C3 +:102090000146A069B26802446FB32878082803D0CB +:1020A000042803D000230BE0082300E0022303EB05 +:1020B000430328334FF4A877082804D0042802D01B +:1020C000022810D028273B4408280ED004280ED020 +:1020D00002280ED05FF00800C0EBC00707EB4010ED +:1020E0001844983009E01827EDE74020F4E7102065 +:1020F000F2E70420F0E74FF4FC701044471828780A +:102100003F1DF5F771FF014628784FF47A720228D7 +:102110001DD001281DD040F6340008444AF2EF01DA +:102120000844B0FBF2F03A1A606A40F2E241B0466D +:102130004788F0304F43316A81420DD03946206BD9 +:1021400000F08EF90646B84207D9FFDF05E01046D9 +:10215000E3E74FF4C860E0E70026C04880688642A5 +:1021600007D2616A40F271224888424306EB420678 +:1021700004E040F2E240B6FBF0F0616AC882606AB7 +:10218000297880F86410297880F865100521417558 +:10219000C08A6FF41C71484306EB400040F635419D +:1021A000C8F81C00B0EB410F00D3FFDFBDE8F081A1 +:1021B00010B5052937D2DFE801F00509030D31001C +:1021C000002100E00121BDE8104028E7032180F84C +:1021D000F01010BD0446408840F2E24148439F4958 +:1021E000091D0860D4F818010089E082D4F81801AC +:1021F00080796075D4F8180140896080D4F818019E +:102200008089A080D4F81801C089E0802046A16AA6 +:10221000FFF7D8FB022084F8F00010BD816ABDE80A +:102220001040FFF7CFBBFFDF10BD70B58A4C243CD8 +:102230000928A1683FD2DFE800F0050B0B15131544 +:1022400038380800BDE870404BE6BDE8704065E6F0 +:10225000022803D00020BDE87040FFE60120FAE725 +:10226000E16070BD032802D005281CD000E0E160C9 +:102270005FF0000600F059F9774D012085F828003D +:1022800085F83460686AA9690026C0F8F41080F8FF +:10229000F060E068FFF746FB00B1FFDFF3F76FFE89 +:1022A0006E74AE7470BD0126E4E76C480078BDE83A +:1022B0007040E0F729BEFFDF70BD674924394860F0 +:1022C000704770B5644D0446243DB1B14FF47A7641 +:1022D000012903D0022905D0FFDF70BD1846F5F7AC +:1022E000FCFE05E06888401C68801046F6F7F8FFA1 +:1022F00000F2E730B0FBF6F0201AA86070BD564837 +:1023000000787047082803D0042801D0F5F76CBE88 +:102310004EF628307047002804DB00F1E02090F8EA +:10232000000405E000F00F0000F1E02090F8140D2B +:102330004009704710F00C0000D008467047F4F7D1 +:102340003EB910B50446202800D3FFDF4248443090 +:1023500030F8140010BD70B505460C461046F5F770 +:1023600043FE4FF47A71022C0DD0012C0DD040F6B3 +:10237000340210444AF247321044B0FBF1F02844D2 +:1023800000F5CB7070BD0A46F3E74FF4C862F0E782 +:102390001FB513460A46044601466846FEF789FB08 +:1023A00094F8FA006946FFF7CAFF002800D1FFDF62 +:1023B0001FBD70B5284C0025257094F82000F3F758 +:1023C000B4FE00B9FFDF84F8205070BD2DE9F04164 +:1023D000050000D1FFDF204A0024243AD5F804612B +:1023E0002046631E116A08E08869B04203D3984210 +:1023F00001D203460C460846C9680029F4D104B945 +:1024000004460021C5F80041F035C4B1E068E5603C +:10241000E86000B105612E698846A96156B1B069CE +:1024200030B16F69B84200D2FFDFB069C01BA8614C +:10243000C6F81880084D5CB1207820B902E0E96048 +:102440001562E8E7FFDF6169606808442863ADE66C +:10245000C5F83080AAE60000F011002080010020BD +:1024600010B50C4601461046F4F776FB002806DA54 +:10247000211A491EB1FBF4F101FB040010BD90FBD1 +:10248000F4F101FB140010BD2E48016A002001E0A8 +:102490000846C9680029FBD170472DE9FE43294D44 +:1024A0000120287000264FF6FF7420E00621F1F786 +:1024B000FDFC070000D1FFDF97F8FA00F037F4F7D2 +:1024C00006FC07F80A6BA14617F8FA89B8F1200F45 +:1024D00000D3FFDF1B4A683222F8189097F8FA0001 +:1024E000F3F723FE00B9FFDF202087F8FA006946E2 +:1024F0000620F1F764FC50B1FFDF08E0029830B12C +:1025000090F8F01019B10088A042CFD104E06846DD +:10251000F1F733FC0028F1D02E70BDE8FE8310B532 +:10252000FFF719FF00F5C87010BD064800212430E0 +:1025300090F8352000EB4200418503480078E0F731 +:10254000E3BC0000CC11002080010020012804D051 +:10255000022805D0032808D105E0012907D004E0AE +:10256000022904D001E0042901D000207047012095 +:102570007047F748806890F8A21029B1B0F89E1013 +:10258000B0F8A020914215D290F8A61029B1B0F869 +:10259000A410B0F8A02091420CD2B0F89C20B0F862 +:1025A0009A108A4206D290F88020B0F898001AB1AA +:1025B000884203D3012070470628FBD200207047D1 +:1025C0002DE9F041E24D0746A86800F1700490F84B +:1025D000140130B9E27B002301212046EEF7D2FC42 +:1025E00010B1A08D401CA08501263D21AFB92878EF +:1025F000022808D001280AD06878C8B110F0140F5A +:1026000009D01E2039E0162037E026773EE0A86882 +:1026100090F8160131E0020701D56177F5E78107EF +:1026200001D02A2029E0800600D4FFDF232024E007 +:1026300094F8320028B1E08D411CE185218E88425A +:1026400013D294F8360028B1A08E411CA186218EA9 +:1026500088420AD2A18D608D814203D3AA6892F884 +:10266000142112B9228E914201D3222005E0217C4F +:1026700029B1218D814207D308206077C5E7208DDD +:10268000062801D33E20F8E7207FB0B10020207358 +:10269000607320740221A868FFF78AFDA86890F88B +:1026A000E410012904D1D0F81C110878401E0870EC +:1026B000E878BDE8F041E0F727BCA868BDE8F04144 +:1026C0000021FFF775BDA2490C28896881F8E40054 +:1026D00014D0132812D0182810D0002211280ED0A0 +:1026E00007280BD015280AD0012807D0002805D0CC +:1026F000022803D021F89E2F012008717047A1F80D +:10270000A420704710B5924CA1680A88A1F86021F6 +:1027100081F85E0191F8640001F046FBA16881F840 +:10272000620191F8650001F03FFBA16881F8630147 +:10273000012081F85C01002081F82E01E078BDE8DD +:102740001040E0F7E1BB70B5814C00231946A0684A +:1027500090F87C207030EEF715FC00283DD0A06882 +:1027600090F820110025C9B3A1690978B1BB90F890 +:102770007D00EEF7EFFB88BBA168B1F870000A2876 +:102780002DD905220831E069EBF72AFE10B3A068C5 +:10279000D0F81C11087858B10522491CE069EBF704 +:1027A0001FFE002819D1A068D0F81C01007840B99C +:1027B000A068E169D0F81C010A68C0F80120097915 +:1027C0004171A068D0F81C110878401C08700120E5 +:1027D000FFF779FFA06880F8205170BDFFE7A0687F +:1027E00090F8241111B190F82511C1B390F82E1171 +:1027F0000029F2D090F82F110029EED190F87D0039 +:10280000EEF7A8FB0028E8D1A06890F8640001F07A +:10281000CBFA0646A06890F8650001F0C5FA0546B7 +:10282000A06890F830113046FFF790FEA0B3A06882 +:1028300090F831112846FFF789FE68B3A268B2F814 +:10284000703092F86410B2F8320102F58872EEF737 +:1028500001FE20B3A168252081F87C00BDE7FFE7D9 +:1028600090F87D10242918D090F87C10242914D0D9 +:102870005FF0000300F5897200F59271FBF78EFEA0 +:10288000A16881F8245101F13000C28A21F8E62FB5 +:10289000408B4880142007E005E00123EAE7BDE80B +:1028A000704000202EE71620BDE870400BE710B501 +:1028B000F4F7FAFD0C2813D3254C0821A068D0F8B2 +:1028C00018011E30F4F7F4FD28B1A0680421D830B7 +:1028D000F4F7EEFD00B9FFDFBDE810400320F2E69B +:1028E00010BD10B51A4CA068D0F818110A78002A4B +:1028F0001FD04988028891421BD190F87C20002388 +:1029000019467030EEF73EFB002812D0A068D0F8D0 +:1029100018110978022907D003290BD0042919D0EE +:10292000052906D108200DE090F87D00EEF712FB96 +:1029300040B110BD90F8811039B190F8820000B913 +:10294000FFDF0A20BDE81040BDE6BDE81040AEE75D +:102950008C01002090F8AA008007EAD10C20FFF734 +:10296000B2FEA068002120F89E1F01210171017BA9 +:1029700041F00101017310BD70B5F74CA268556EAE +:10298000EEF702FDEBB2C1B200228B4203D0A36886 +:1029900083F8121102E0A16881F81221C5F3072122 +:1029A000C0F30720814203D0A16881F8130114E726 +:1029B000A06880F8132110E710B5E74C0421A06847 +:1029C000FFF7F6FBA06890F85A10012908D000F52F +:1029D0009E71FBF7ACFEE078BDE81040E0F794BADA +:1029E000022180F85A1010BD70B5DB4CA06890F839 +:1029F000E410FE2955D16178002952D190F87F204A +:102A0000002301217030EEF7BDFA002849D1A068FB +:102A100090F8141109B1022037E090F87C200023CF +:102A200019467030EEF7AEFA28B1A06890F896001B +:102A300008B1122029E0A068002590F87C20122A15 +:102A40001DD004DC032A23D0112A04D119E0182A4E +:102A50001AD0232A26D0002304217030EEF792FAF0 +:102A600000281ED1A06890F87D10192971D020DCB3 +:102A700001292AD0022935D0032932D120E00B20A8 +:102A800003E0BDE8704012E70620BDE870401AE69A +:102A900010F8E21F01710720FFF715FEA06880F80B +:102AA0007C509AE61820FFF70EFEA068A0F89E5012 +:102AB00093E61D2918D01E2916D0212966D149E098 +:102AC00010F8E11F4171072070E00C20FFF7FBFDBB +:102AD000A06820F8A45F817941F00101817100F8BC +:102AE000275C53E013202CE090F8252182BB90F85E +:102AF0002421B2B1242912D090F87C1024290ED0C0 +:102B00005FF0000300F5897200F59271FBF746FD56 +:102B1000A0681E2180F87D1080F8245103E0012375 +:102B2000F0E71E2932D1A068FBF797FDFFF744FFBD +:102B3000A16801F13000C28A21F8E62F408B48805D +:102B40001520FFF7C0FDA068A0F8A45080F87D50C4 +:102B50001CE02AE090F8971051B180F8125180F8EB +:102B600013511820FFF7AFFDA068A0F8A4500DE0A6 +:102B700090F82F1151B990F82E1139B1C16DD0F8DC +:102B80003001FFF7F9FE1820FFF79DFDA06890F8CF +:102B9000E400FE2885D1FFF7A4FEA06890F8E400C9 +:102BA000FE2885D1BDE87040CDE51120FFF78BFDF3 +:102BB000A068CBE7684A0129926819D0002302294E +:102BC0000FD003291ED010B301282BD0032807D122 +:102BD00092F87C00132803D0162801D0182804D1BD +:102BE000704792F8E4000028FAD0D2F8180117E0F4 +:102BF00092F8E4000128F3D0D2F81C110878401EA6 +:102C00000870704792F8E4000328EED17047D2F8BC +:102C10001801B2F870108288891A09B20029F5DB10 +:102C200003707047B2F87000B2F82211401A00B277 +:102C30000028F6DBD2F81C010178491E01707047AC +:102C400070B5044690F87C0000250C2810D00D28A3 +:102C50002ED1D4F81811B4F870008988401C88422D +:102C600026D1D4F864013C4E017811B3FFDF42E075 +:102C7000B4F87000B4F82211401C884218D1D4F87E +:102C80001C01D0F80110A160407920730321204677 +:102C9000EDF7F1FDD4F81C01007800B9FFDF012148 +:102CA000FE20FFF787FF84F87C50012084F8B200F3 +:102CB00093E52188C180D4F81801D4F864114089C3 +:102CC0000881D4F81801D4F8641180894881D4F8B7 +:102CD0001801D4F86411C0898881D4F864010571A1 +:102CE000D4F8641109200870D4F864112088488051 +:102CF000F078E0F709F902212046EDF7BCFD032149 +:102D00002046FFF755FAB068D0F81801007802287D +:102D100000D0FFDF0221FE20FFF74CFF84F87C503B +:102D20005BE52DE9F0410C4C00260327D4F808C0E0 +:102D3000012598B12069C0788CF8E20005FA00F00E +:102D4000C0F3C05000B9FFDFA06800F87C7F468464 +:102D500080F82650BDE8F0818C01002000239CF80B +:102D60007D2019460CF17000EEF70CF970B1607817 +:102D70000028EFD12069C178A06880F8E11080F8C0 +:102D80007D70A0F8A46080F8A650E3E76570E1E7E5 +:102D9000F0B5F74C002385B0A068194690F87D2067 +:102DA0007030EEF7EFF8012580B1A06890F87C0054 +:102DB00023280ED024280CD06846F6F785FB68B18E +:102DC000009801A9C0788DF8040008E0657005B08E +:102DD000F0BD607840F020006070F8E70021A06846 +:102DE00003AB162290F87C00EEF74FFB002648B1AB +:102DF000A0689DF80C20162180F80C2180F80D1198 +:102E0000192136E02069FBF722FB78B121690879A6 +:102E100000F00702A06880F85C20497901F0070102 +:102E200080F85D1090F82F310BBB03E00020FFF716 +:102E300078FFCCE790F82E31CBB900F164035F78CE +:102E4000974205D11A788A4202D180F897500EE055 +:102E500000F5AC71028821F8022990F85C200A7113 +:102E600090F85D0048710D70E078E0F74DF8A068CB +:102E7000212180F87D1080F8A650A0F8A460A6E774 +:102E8000F8B5BB4C00231946A06890F87D2070303F +:102E9000EEF778F840B32069FBF7BEFA48B3206933 +:102EA000FBF7B4FA07462069FBF7B4FA0646206937 +:102EB000FBF7AAFA05462069FBF7AAFA0146009734 +:102EC000A06833462A463030FBF79BFBA1680125FA +:102ED00091F87C001C2810D091F85A00012812D0DB +:102EE00091F8250178B90BE0607840F0010060703E +:102EF000F8BDBDE8F840002013E781F85A5002E021 +:102F000091F8240118B11E2081F87D000BE01D20EE +:102F100081F87D0001F5A57231F8300BFBF7FBFB62 +:102F2000E078DFF7F1FFA068002120F8A41F85708A +:102F3000F8BD10B58E4C00230921A06890F87C20C4 +:102F40007030EEF71FF848B16078002805D1A1680D +:102F500001F8960F087301F81A0C10BD012060707B +:102F600010BD7CB5824C00230721A06890F87C201E +:102F70007030EEF707F838B36078002826D169463C +:102F80002069FBF75FFA9DF80000002500F025019D +:102F9000A06880F8B0109DF8011001F0490180F898 +:102FA000B11080F8A250D0F81811008849888142E9 +:102FB00000D0FFDFA068D0F818110D70D0F86411B0 +:102FC0000A7822B1FFDF16E0012060707CBD30F886 +:102FD000E82BCA80C16F0D71C16F009A8A60019A97 +:102FE000CA60C26F0821117030F8E81CC06F4180C0 +:102FF000E078DFF789FFA06880F87C507CBD70B571 +:103000005B4C00231946A06890F87D207030EDF7E6 +:10301000B9FF012540B9A0680023082190F87C2061 +:103020007030EDF7AFFF10B36078002820D1A068B2 +:1030300090F8AA00800712D42069FBF7C9F9A168AB +:1030400081F8AB00206930F8052FA1F8AC2040884A +:10305000A1F8AE0011F8AA0F40F002000870A068B5 +:103060004FF0000690F8AA10C90702D011E0657071 +:103070009DE490F87D20002319467030EDF782FF23 +:1030800000B9FFDFA06880F87D5080F8A650A0F856 +:10309000A460A06890F87C10012906D180F87C60BB +:1030A00080F8A260E078DFF72FFFA168D1F818015F +:1030B000098842888A42DBD101780429D8D1067078 +:1030C000E078DFF721FFA06890F87C100029CFD1CD +:1030D00080F8A2606BE470B5254DA86890F87C106C +:1030E0001A2902D00220687061E469780029FBD1B6 +:1030F000002480F8A74080F8A240D0F8181100887A +:103100004988814200D0FFDFA868D0F818110C7000 +:10311000D0F864110A780AB1FFDF25E090F8A82002 +:1031200072B180F8A8400288CA80D0F864110C718E +:10313000D0F864210E2111700188D0F864010DE0EF +:1031400030F8E82BCA80C16F0C71C26F0121117277 +:10315000C26F0D21117030F8E81CC06F418000F083 +:10316000A1FEE878DFF7D0FEA86880F87C401EE476 +:103170008C01002070B5FA4CA16891F87C20162AC9 +:1031800001D0132A02D191F8A82012B10220607058 +:103190000DE46278002AFBD181F8E000002581F877 +:1031A000A75081F8A250D1F81801098840888842B8 +:1031B00000D0FFDFA068D0F818010078032800D005 +:1031C000FFDF0321FE20FFF7F5FCA068D0F86411B3 +:1031D0000A780AB1FFDF14E030F8E02BCA8010F85B +:1031E000081BC26F1171C16F0D72C26F0D2111707A +:1031F00030F8E81CC06F418000F054FEE078DFF743 +:1032000083FEA06880F87C504BE470B5D44C092153 +:103210000023A06890F87C207030EDF7B3FE002505 +:1032200018B12069007912281ED0A0680A21002355 +:1032300090F87C207030EDF7A5FE18B12069007978 +:10324000142814D02069007916281AD1A06890F8A3 +:103250007C101F2915D180F87C5080F8A250BDE861 +:1032600070401A20FFF74EBABDE8704061E6A068D2 +:1032700000F87C5F458480F82650BDE87040FFF779 +:103280009BBB0EE470B5B64C2079C00773D02069A3 +:1032900000230521C578A06890F87C207030EDF7F8 +:1032A00071FE98B1062D11D006DC022D0ED0042D32 +:1032B0000CD0052D06D109E00B2D07D00D2D05D022 +:1032C000112D03D0607840F008006070607800280D +:1032D00051D12069FAF7E0FF00287ED0206900254F +:1032E0000226C178891E162977D2DFE801F00B7615 +:1032F00034374722764D76254A457676763A5350CE +:103300006A6D7073A0680023012190F87F207030EF +:10331000EDF738FE08BB2069FBF722F8A16881F8B9 +:103320001601072081F87F0081F8A65081F8A2508D +:1033300056E0FFF76AFF53E0A06890F87C100F2971 +:1033400001D066704CE0617839B980F88150122163 +:1033500080F87C1044E000F0D0FD41E000F0ACFDCE +:103360003EE0FBF7A9F803283AD12069FBF7A8F85B +:10337000FFF700FF34E03BE00079F9E7FFF7ABFE31 +:103380002EE0FFF73CFE2BE0FFF7EBFD28E0FFF718 +:10339000D0FD25E0A0680023194690F87D2070300C +:1033A000EDF7F0FD012110B16078C8B901E061705E +:1033B00016E0A06820F8A45F817000F8276C0FE089 +:1033C0000BE0FFF75DFD0BE000F034FD08E0FFF7D8 +:1033D000DFFC05E000F0FAFC02E00020FFF7A1FCB2 +:1033E000A268F2E93001401C41F10001C2E900018C +:1033F0005EE42DE9F0415A4C2079800741D5607890 +:1034000000283ED1E06801270026C178204619290E +:10341000856805F170006FD2DFE801F04B3E0D6F5B +:10342000C1C1801C34C1556287C1C1C1C1BE8B9569 +:1034300098A4B0C1BA0095F87F2000230121EDF7D0 +:10344000A1FD00281DD1A068082180F87F1080F818 +:10345000A26090E0002395F87D201946EDF792FDDB +:1034600010B1A06880F8A660A0680023194690F803 +:103470007C207030EDF786FD002802D0A06880F82F +:10348000A26067E4002395F87C201946EDF77AFDE9 +:1034900000B9FFDF042008E0002395F87C201946DE +:1034A000EDF770FD00B9FFDF0C20A16881F87C000A +:1034B00050E4002395F87C201946EDF763FD00B930 +:1034C000FFDF0D20F1E7002395F87C201946EDF78A +:1034D00059FD00B9FFDFA0680F2180F8A77008E050 +:1034E00095F87C00122800D0FFDFA068112180F839 +:1034F000A87080F87C102DE451E0002395F87C2022 +:103500001946EDF73FFD20B9A06890F8A80000B972 +:10351000FFDFA068132180F8A770EAE795F87C0028 +:10352000182800D0FFDF1A20BFE7BDE8F04100F007 +:1035300063BD002395F87C201946EDF723FD00B903 +:10354000FFDF0520B1E785F8A66003E4002395F8C6 +:103550007C201946EDF716FD00B9FFDF1C20A4E71B +:103560008C010020002395F87D201946EDF70AFD17 +:1035700000B9FFDFA06880F8A66006E4002395F894 +:103580007C201946EDF7FEFC00B9FFDF1F208CE719 +:10359000BDE8F04100F0F8BC85F87D60D3E7FFDFBF +:1035A0006FE710B5F74C6078002837D120794007D5 +:1035B0000FD5A06890F87C00032800D1FFDFA06839 +:1035C00090F87F10072904D101212170002180F893 +:1035D0007F10FFF70EFF00F0B5FCFFF753FEA07859 +:1035E000000716D5A0680023052190F87C207030D4 +:1035F000EDF7C8FC50B108206070A068D0F86411E5 +:1036000008780D2800D10020087002E00020F9F7AA +:10361000F9FCA068BDE81040FFF712BB10BD2DE912 +:10362000F041D84C07464FF00005607808436070C1 +:10363000207981062046806802D5A0F8985004E0E1 +:10364000B0F89810491CA0F8981000F018FD012659 +:10365000F8B1A088000506D5A06890F8821011B1D5 +:10366000A0F88E5015E0A068B0F88E10491CA0F8A4 +:103670008E1000F0F3FCA068B0F88E10B0F8902027 +:10368000914206D3A0F88E5080F83A61E078DFF7D7 +:103690003BFC207910F0600F08D0A06890F88010F3 +:1036A00021B980F880600121FEF782FD1FB9FFF784 +:1036B00078FFFFF799F93846FEF782FFBDE8F04141 +:1036C000F5F711BFAF4A51789378194313D11146DA +:1036D0000128896808D01079400703D591F87F0048 +:1036E000072808D001207047B1F84C00098E8842A5 +:1036F00001D8FEF7E4B900207047A249C278896872 +:10370000012A06D05AB1182A08D1B1F81011FAF7D7 +:10371000BABEB1F822114172090A81727047D1F81C +:10372000181189884173090A8173704770B5954CE7 +:1037300005460E46A0882843A080A80703D5E807C1 +:1037400000D0FFDFE660E80700D02661A80719D5A2 +:10375000F078062802D00B2814D10BE0A06890F86E +:103760007C1018290ED10021E0E93011012100F868 +:103770003E1C07E0A06890F87C10122902D10021BD +:1037800080F88210280601D50820A07068050AD5A7 +:10379000A0688288B0F87010304600F07FFC304698 +:1037A000BDE87040A9E763E43EB505466846F5F715 +:1037B00065FE00B9FFDF222200210098EAF767FECC +:1037C00003210098FAF750FD0098017821F01001CC +:1037D00001702946FAF76DFD6A4C192D71D2DFE8A8 +:1037E00005F020180D3EC8C8C91266C8C9C959C815 +:1037F000C8C8C8BBC9C971718AC89300A1680098BC +:1038000091F8151103E0A168009891F8E610017194 +:10381000B0E0A068D0F81C110098491CFAF795FD9B +:10382000A8E0A1680098D1F8182192790271D1F826 +:10383000182112894271120A8271D1F81821528915 +:10384000C271120A0272D1F8182192894272120AC8 +:103850008272D1F81811C989FAF74EFD8AE0A06882 +:10386000D0F818110098091DFAF77CFDA068D0F86F +:10387000181100980C31FAF77FFDA068D0F81811E4 +:1038800000981E31FAF77EFDA1680098D831FAF74A +:1038900087FD6FE06269009811780171918841712C +:1038A000090A81715188C171090A017262E03649C1 +:1038B000D1E90001CDE9010101A90098FAF78AFDDB +:1038C00058E056E0A068B0F844100098FAF794FD6C +:1038D000A068B0F8E6100098FAF792FDA068B0F87A +:1038E00048100098FAF780FDA068B0F8E81000983A +:1038F000FAF77EFD3EE0A168009891F83021027150 +:1039000091F83111417135E0A06890F81301EDF79D +:1039100032FD01460098FAF7B2FDA06890F8120156 +:1039200000F03DFA70B1A06890F8640000F037FA3A +:1039300040B1A06890F8121190F86400814201D063 +:10394000002002E0A06890F81201EDF714FD014696 +:103950000098FAF790FD0DE0A06890F80D1100981E +:10396000FAF7A8FDA06890F80C110098FAF7A6FDE8 +:1039700000E0FFDFF5F795FD00B9FFDF0098FFF7E6 +:10398000BCFE3EBD8C0100207C63020010B5F94CEA +:10399000A06890F8121109B990F8641080F86410CA +:1039A00090F8131109B990F8651080F8651000209F +:1039B000FEF7A8FEA068FAF750FE002806D0A0681F +:1039C000BDE8104000F59E71FAF7B1BE10BDF8B524 +:1039D000E84E00250446B060B5807570B57035704E +:1039E0000088F5F748FDB0680088F5F76AFDB4F87F +:1039F000F800B168401C82B201F17000EDF75BF88D +:103A000000B1FFDF94F87D00242809D1B4F87010CC +:103A1000B4F81001081A00B2002801DB707830B148 +:103A200094F87C0024280AD0252808D015E0FFF758 +:103A3000ADFF84F87D50B16881F897500DE0B4F87F +:103A40007010B4F81001081A00B2002805DB707875 +:103A500018B9FFF79BFF84F87C50A4F8F850FEF7E4 +:103A600088FD00281CD1B06890F8E400FE2801D041 +:103A7000FFF79AFEC0480090C04BC14A2146284635 +:103A8000F9F7ECF9B0680023052190F87C2070303C +:103A9000EDF778FA002803D0BDE8F840F8F771BFD9 +:103AA000F8BD10B5FEF765FD20B10020BDE810405F +:103AB0000146B4E5BDE81040F9F77FBA70B50C4691 +:103AC000154606464FF4B47200212046EAF7DFFCA3 +:103AD000268005B9FFDF2868C4F818016868C4F8B3 +:103AE0001C01A868C4F8640182E4F0F7E9BA2DE982 +:103AF000F0410D4607460621F0F7D8F9041E3DD0E7 +:103B0000D4F864110026087858B14A8821888A427E +:103B100007D109280FD00E2819D00D2826D0082843 +:103B20003ED094F83A01D0B36E701020287084F81B +:103B30003A61AF809AE06E7009202870D4F8640171 +:103B4000416869608168A9608089A88133E008467E +:103B5000F0F7DDFA0746EFF78AFF70B96E700E20B6 +:103B60002870D4F864014068686011E00846F0F7F6 +:103B7000CEFA0746EFF77BFF08B1002081E46E70B4 +:103B80000D202870D4F8640141686960008928819B +:103B9000D4F8640106703846EFF763FF66E00EE084 +:103BA0006E7008202870D4F86401416869608168EB +:103BB000A960C068E860D4F86401067056E094F823 +:103BC0003C0198B16E70152028700AE084F83C61C1 +:103BD000D4F83E016860D4F84201A860D4F84601E8 +:103BE000E86094F83C010028F0D13FE094F84A01E5 +:103BF00058B16E701C20287084F84A610A2204F5BE +:103C0000A671281DEAF719FC30E094F8560140B17E +:103C10006E701D20287084F85661D4F858016860D1 +:103C200024E094F8340168B16E701A20287004E022 +:103C300084F83461D4F83601686094F834010028BF +:103C4000F6D113E094F85C01002897D06E7016202E +:103C5000287007E084F85C61D4F85E016860B4F80D +:103C60006201288194F85C010028F3D1012008E466 +:103C7000404A5061D170704770B50D4604464EE021 +:103C8000B4F8F800401CA4F8F800B4F89800401C00 +:103C9000A4F89800204600F0F2F9B8B1B4F88E000C +:103CA000401CA4F88E00204600F0D8F9B4F88E002D +:103CB000B4F89010884209D30020A4F88E000120A7 +:103CC00084F83A012B48C078DFF71EF994F8A20077 +:103CD00020B1B4F89E00401CA4F89E0094F8A60001 +:103CE00020B1B4F8A400401CA4F8A40094F8140176 +:103CF00040B994F87F200023012104F17000EDF712 +:103D000041F920B1B4F89C00401CA4F89C00204666 +:103D1000FEF796FFB4F87000401CA4F870006D1E0A +:103D2000ADB2ADD23FE5134AC2E90601704770B5A6 +:103D30000446B0F8980094F88010D1B1B4F89A1005 +:103D40000D1A2D1F94F8960040B194F87C200023A2 +:103D5000092104F17000EDF715F9B8B1B4F88E60DF +:103D6000204600F08CF980B1B4F89000801B001F51 +:103D70000CE007E08C0100201F360200C53602006F +:103D80002D370200C0F10205DCE72846A84200DA20 +:103D90000546002D01DC002005E5A8B203E510F082 +:103DA0000C0000D00120704710B5012808D002286F +:103DB00008D0042808D0082806D0FFDF204610BD10 +:103DC0000124FBE70224F9E70324F7E770B5CC4CA4 +:103DD000A06890F87C001F2804D0607840F00100B3 +:103DE0006070E0E42069FAF73CFBD8B12069012259 +:103DF0000179407901F0070161F30705294600F0D8 +:103E0000070060F30F21A06880F8A2200022A0F82C +:103E10009E20232200F87C2FD0F8B400BDE870402B +:103E2000FEF7AABD0120FEF77CFFBDE870401E2012 +:103E3000FEF768BCF8B5B24C00230A21A06890F8E0 +:103E40007C207030EDF79EF838B32069FAF7E4FA79 +:103E5000C8B12069FAF7DAFA07462069FAF7DAFA00 +:103E600006462069FAF7D0FA05462069FAF7D0FA33 +:103E700001460097A06833462A463030FAF7C1FB66 +:103E8000A068FAF7EAFBA168002081F8A20081F897 +:103E90007C00BDE8F840FEF78FBD607840F001007F +:103EA0006070F8BD964810B580680088F0F72FF96B +:103EB000BDE81040EFF7C6BD10B5914CA36893F86C +:103EC0007C00162802D00220607010BD60780028A7 +:103ED000FBD1D3F81801002200F11E010E30C833C7 +:103EE000ECF7C2FFA0680021C0E92E11012180F883 +:103EF0008110182180F87C1010BD10B5804CA0688E +:103F000090F87C10132902D00220607010BD6178F7 +:103F10000029FBD1D0F8181100884988814200D0CF +:103F2000FFDFA068D0F8181120692631FAF745FAAA +:103F3000A1682069DC31FAF748FAA168162081F8F7 +:103F40007C0010BD10B56E4C207900071BD5607841 +:103F5000002818D1A068002190F8E400FEF72AFE9E +:103F6000A06890F8E400FE2800D1FFDFA068FE21E1 +:103F700080F8E41090F87F10082904D10221217004 +:103F8000002180F87F1010BD70B55D4D2421002404 +:103F9000A86890F87D20212A05D090F87C20232A5B +:103FA00018D0FFDFA0E590F8122112B990F8132184 +:103FB0002AB180F87D10A86880F8A64094E500F842 +:103FC0007D4F847690F8B1000028F4D00020FEF7F1 +:103FD00099FBF0E790F8122112B990F813212AB159 +:103FE00080F87C10A86880F8A2407DE580F87C40CD +:103FF0000020FEF787FBF5E770B5414C0025A0686F +:10400000D0F8181103884A889A4219D109780429EE +:1040100016D190F87C20002319467030ECF7B2FFDF +:1040200000B9FFDFA06890F8AA10890703D4012126 +:1040300080F87C1004E080F8A250D0F818010570D8 +:10404000A0680023194690F87D207030ECF79AFFA5 +:10405000002802D0A06880F8A65045E5B0F890206E +:10406000B0F88E108A4201D3511A00E000218288F4 +:10407000521D8A4202D3012180F89610704710B574 +:1040800090F8821041B990F87C200023062170300E +:10409000ECF778FF002800D0012010BD70B5114466 +:1040A000174D891D8CB2C078A968012806D040B18F +:1040B000182805D191F8120138B109E0A1F8224180 +:1040C00012E5D1F8180184800EE591F8131191B131 +:1040D000FFF765FE80B1A86890F86400FFF75FFE07 +:1040E00050B1A86890F8121190F86420914203D062 +:1040F00090F8130100B90024A868A0F81041F3E477 +:104100008C01002070B58F4C0829207A6CD2DFE832 +:1041100001F004176464276B6B6458B1F4F7D3F8AB +:10412000F5F7FFF80020A072F4F7B4F9BDE870408D +:10413000F4F758BCF5F717F9BDE87040F1F71FBF69 +:10414000DEF7B6FDF5F752F8D4E90001F1F7F3FC1C +:104150002060A07A401CC0B2A072282824D370BD71 +:10416000A07A0025401EC6B2E0683044F4F700FD96 +:1041700010B9E1687F208855A07A272828BF01253B +:10418000DEF796FDA17A01EB4102C2EB81110844F2 +:104190002946F5F755F8A07A282809D2401CC0B264 +:1041A000A072282828BF70BDBDE87040F4F772B92E +:1041B000207A002818BF00F086F8F4F74BFBF4F7DC +:1041C000F7FBF5F7D0F80120E0725F480078DEF7E2 +:1041D0009BFEBDE87040F1F7D2BE002808BF70BD5D +:1041E000BDE8704000F06FB8FFDF70BD10B5554CF2 +:1041F000207A002804BF0C2010BD00202072E0723D +:10420000607AF2F7F8FA607AF2F761FD607AF1F716 +:104210008CFF00280CBF1F20002010BD002270B5AD +:10422000484C06460D46207A68B12272E272607AE6 +:10423000F2F7E1FA607AF2F74AFD607AF1F775FF7A +:10424000002808BFFFDF4048E560067070BD70B50C +:10425000050007D0A5F5E8503C494C3881429CBF89 +:10426000122070BD374CE068002804BF092070BDE3 +:10427000207A00281CBF0C2070BD3548F1F7FAFEEB +:104280006072202804BF1F2070BDF1F76DFF206011 +:104290001DB12946F1F74FFC2060012065602072B6 +:1042A00000F011F8002070BD2649CA7A002A04BF28 +:1042B000002070471E22027000224270CB684360CB +:1042C000CA7201207047F0B585B0F1F74DFF1D4D62 +:1042D0000746394668682C6800EB80004600204697 +:1042E000F2F73AFCB04206DB6868811B3846F1F70A +:1042F00022FC0446286040F2367621463846F2F722 +:104300002BFCB04204DA31463846F1F714FC04467F +:1043100000208DF8000040F6E210039004208DF894 +:10432000050001208DF8040068460294F2F7CAF8EF +:10433000687A6946F2F743F9002808BFFFDF05B045 +:10434000F0BD000074120020AC010020B5EB3C0071 +:10435000054102002DE9F0410C4612490D68114A51 +:10436000114908321160A0F12001312901D3012047 +:104370000CE0412810D040CC0C4F94E80E0007EB25 +:104380008000241F50F8807C3046B84720600548E4 +:10439000001D0560BDE8F081204601F0EBFCF5E76B +:1043A00006207047100502400100000184630200EE +:1043B00010B55548F2F7FAFF00B1FFDF5248401C34 +:1043C000F2F7F4FF002800D0FFDF10BD2DE9F14F18 +:1043D0004E4E82B0D6F800B001274B48F2F7EEFF00 +:1043E000DFF8248120B9002708F10100F2F7FCFF73 +:1043F000474C00254FF0030901206060C4F80051CC +:10440000C4F80451029931602060DFF808A11BE074 +:10441000DAF80000C00617D50E2000F068F8EFF3B8 +:10442000108010F0010072B600D001200090C4F896 +:104430000493D4F8000120B9D4F8040108B901F0BC +:10444000A3FC009800B962B6D4F8000118B9D4F8FA +:1044500004010028DCD0D4F804010028CCD137B105 +:10446000C6F800B008F10100F2F7A8FF11E008F16A +:104470000100F2F7A3FF0028B6D1C4F80893C4F8EE +:104480000451C4F800510E2000F031F81E48F2F734 +:10449000ABFF0020BDE8FE8F2DE9F0438DB00D4647 +:1044A000064600240DF110090DF1200818E000BFA8 +:1044B00004EB4407102255F827106846E9F7BDFFC2 +:1044C00005EB8707102248467968E9F7B6FF68468A +:1044D000FFF77CFF10224146B868E9F7AEFF641C85 +:1044E000B442E5DB0DB00020BDE8F0836EE70028A4 +:1044F00009DB00F01F02012191404009800000F11A +:10450000E020C0F880127047AD01002004E50040B3 +:1045100000E0004010ED00E0B54900200870704751 +:1045200070B5B44D01232B60B34B1C68002CFCD03C +:10453000002407E00E6806601E68002EFCD0001DF7 +:10454000091D641C9442F5D30020286018680028D7 +:10455000FCD070BD70B5A64E0446A84D3078022838 +:1045600000D0FFDFAC4200D3FFDF7169A44801290E +:1045700003D847F23052944201DD03224271491CB4 +:104580007161291BC1609E49707800F02EF90028E6 +:1045900000D1FFDF70BD70B5954C0D466178884243 +:1045A00000D0FFDF954E082D4BD2DFE805F04A041E +:1045B0001E2D4A4A4A382078022800D0FFDF032007 +:1045C0002070A078012801D020B108E0A06801F097 +:1045D00085F904E004F1080007C8FFF7A1FF0520F2 +:1045E0002070BDE87040F1F7CABCF1F7BDFD01468F +:1045F0006068F2F7B1FAB04202D2616902290BD3C6 +:104600000320F2F7FAFD12E0F1F7AEFD0146606813 +:10461000F2F7A2FAB042F3D2BDE870409AE72078F0 +:1046200002280AD0052806D0FFDF04202070BDE84C +:10463000704000F0D0B8022000E00320F2F7DDFD6A +:10464000F3E7FFDF70BD70B50546F1F78DFD684CEF +:1046500060602078012800D0FFDF694901200870E0 +:104660000020087104208D6048716448C8600220F1 +:104670002070607800F0B9F8002800D1FFDF70BD2D +:1046800010B55B4C207838B90220F2F7CCFD18B990 +:104690000320F2F7C8FD08B1112010BD5948F1F709 +:1046A000E9FC6070202804D00120207000206061A7 +:1046B00010BD032010BD2DE9F0471446054600EB60 +:1046C00084000E46A0F1040801F01BF907464FF0E4 +:1046D000805001694F4306EB8401091FB14201D2AA +:1046E000012100E0002189461CB10069B4EB900F64 +:1046F00002D90920BDE8F0872846DCF7A3FD90B970 +:10470000A84510D3BD4205D2B84503D245EA0600FC +:10471000800701D01020EDE73046DCF793FD10B99B +:10472000B9F1000F01D00F20E4E73748374900689E +:10473000884205D0224631462846FFF7F1FE1AE0AE +:10474000FFF79EFF0028D5D1294800218560C0E9E8 +:1047500003648170F2F7D3FD08B12D4801E04AF2FD +:10476000F87060434FF47A7100F2E730B0FBF1F07B +:104770001830FFF768FF0020BCE770B505464FF022 +:10478000805004696C432046DCF75CFD08B10F20C3 +:1047900070BD01F0B6F8A84201D8102070BD1A48CB +:1047A0001A490068884203D0204601F097F810E0CB +:1047B000FFF766FF0028F1D10D4801218460817068 +:1047C000F2F79DFD08B1134800E013481830FFF7D9 +:1047D0003AFF002070BD10B5054C6078F1F7A5FCDC +:1047E00000B9FFDF0020207010BDF1F7E8BE000027 +:1047F000B001002004E5014000E40140105C0C0021 +:1048000084120020974502005C000020BEBAFECA58 +:1048100050280500645E0100A85B01007E4909681C +:104820000160002070477C4908600020704701212A +:104830008A0720B1012804D042F204007047916732 +:1048400000E0D1670020704774490120086042F2FF +:104850000600704708B50423704A1907103230B1BA +:10486000C1F80433106840F0010010600BE01068DC +:1048700020F001001060C1F808330020C1F80801E1 +:10488000674800680090002008BD011F0B2909D867 +:10489000624910310A6822F01E0242EA40000860B4 +:1048A0000020704742F2050070470F2809D85B4985 +:1048B00010310A6822F4706242EA00200860002089 +:1048C000704742F205007047000100F18040C0F8D7 +:1048D000041900207047000100F18040C0F8081959 +:1048E00000207047000100F18040D0F80009086006 +:1048F00000207047012801D907207047494A52F823 +:10490000200002680A43026000207047012801D994 +:1049100007207047434A52F8200002688A43026029 +:1049200000207047012801D9072070473D4A52F8FE +:104930002000006808600020704702003A494FF0EC +:10494000000003D0012A01D0072070470A60704799 +:10495000020036494FF0000003D0012A01D00720A1 +:1049600070470A60704708B54FF40072510510B1E6 +:10497000C1F8042308E0C1F808230020C1F824018D +:1049800027481C3000680090002008BD08B5802230 +:10499000D10510B1C1F8042308E0C1F808230020B4 +:1049A000C1F81C011E48143000680090002008BDAA +:1049B00008B54FF48072910510B1C1F8042308E0E6 +:1049C000C1F808230020C1F82001154818300068FC +:1049D0000090002008BD10493831096801600020AE +:1049E000704770B54FF080450024C5F80841F2F7D4 +:1049F00092FC10B9F2F799FC28B1C5F82441C5F82A +:104A00001C41C5F820414FF0E020802180F80014BF +:104A10000121C0F8001170BD0004004000050040F5 +:104A2000080100404864020078050040800500400D +:104A30006249634B0A6863499A42096801D1C1F32C +:104A400010010160002070475C495D4B0A685D49B8 +:104A5000091D9A4201D1C0F3100008600020704780 +:104A60005649574B0A68574908319A4201D1C0F359 +:104A7000100008600020704730B5504B504D1C6846 +:104A800042F20803AC4202D0142802D203E01128FB +:104A900001D3184630BDC3004B481844C0F8101568 +:104AA000C0F81425002030BD4449454B0A6842F245 +:104AB00009019A4202D0062802D203E0042801D359 +:104AC00008467047404A012142F8301000207047E4 +:104AD0003A493B4B0A6842F209019A4202D0062841 +:104AE00002D203E0042801D308467047364A012168 +:104AF00002EBC00041600020704770B52F4A304E75 +:104B0000314C156842F2090304EB8002B54204D02F +:104B1000062804D2C2F8001807E0042801D318467A +:104B200070BDC1F31000C2F80008002070BD70B560 +:104B3000224A234E244C156842F2090304EB8002FA +:104B4000B54204D0062804D2D2F8000807E00428B1 +:104B500001D3184670BDD2F80008C0F310000860F9 +:104B6000002070BD174910B50831184808601120A1 +:104B7000154A002102EBC003C3F81015C3F8141541 +:104B8000401C1428F6D3002006E0042804D302EBCE +:104B90008003C3F8001807E002EB8003D3F8004855 +:104BA000C4F31004C3F80048401C0628EDD310BD20 +:104BB0000449064808310860704700005C00002086 +:104BC000BEBAFECA00F5014000F001400000FEFF41 +:104BD000814B1B6803B19847BFF34F8F7F48016833 +:104BE0007F4A01F4E06111430160BFF34F8F00BFC2 +:104BF000FDE710B5EFF3108010F0010F72B601D091 +:104C0000012400E0002400F0DDF850B1DCF7BFFB28 +:104C1000F1F755F8F2F793FAF2F7BEFF7149002069 +:104C2000086004B962B6002010BD2DE9F0410C46C1 +:104C30000546EFF3108010F0010F72B601D0012687 +:104C400000E0002600F0BEF820B106B962B60820E8 +:104C5000BDE8F08101F01EF9DCF79DFB0246002063 +:104C600001234709BF0007F1E02700F01F01D7F833 +:104C70000071CF40F9071BD0202803D222FA00F19F +:104C8000C90727D141B2002904DB01F1E02191F8E5 +:104C9000001405E001F00F0101F1E02191F8141D6D +:104CA0004909082916D203FA01F717F0EC0F11D0C1 +:104CB000401C6428D5D3F2F74DFF4B4A4B490020E6 +:104CC000F2F790FF47494A4808602046DCF7C1FAEE +:104CD00060B904E006B962B641F20100B8E73E48A7 +:104CE00004602DB12846DCF701FB18B1102428E040 +:104CF000404D19E02878022802D94FF4805420E072 +:104D000007240028687801D0D8B908E0C8B1202865 +:104D100017D8A878212814D8012812D001E0A87843 +:104D200078B9E8780B280CD8DCF735FB2946F2F780 +:104D3000ECF9F0F783FF00F017FE2846DCF7F4FAF1 +:104D4000044606B962B61CB1FFF753FF20467FE761 +:104D500000207DE710B5044600F034F800B10120D2 +:104D60002070002010BD244908600020704770B5F5 +:104D70000C4622490D682149214E08310E60102849 +:104D800007D011280CD012280FD0132811D00120E1 +:104D900013E0D4E90001FFF748FF354620600DE03D +:104DA000FFF727FF0025206008E02068FFF7D2FF0B +:104DB00003E0114920680860002020600F48001DB2 +:104DC000056070BD07480A490068884201D101208A +:104DD0007047002070470000C80100200CED00E083 +:104DE0000400FA055C0000204814002000000020A8 +:104DF000BEBAFECA50640200040000201005024042 +:104E0000010000017D49C0B20860704700B57C49CF +:104E1000012808BF03200CD0022808BF042008D0B6 +:104E2000042808BF062004D0082816BFFFDF05208D +:104E300000BD086000BD70B505460C46164610461C +:104E4000F3F7D2F8022C08BF4FF47A7105D0012C89 +:104E50000CBF4FF4C86140F6340144183046F3F7F4 +:104E60003CF9204449F6797108444FF47A71B0FB5B +:104E7000F1F0281A70BD70B505460C460846F4F7E7 +:104E80002FFA022C08BF40F24C4105D0012C0CBF78 +:104E900040F634014FF4AF5149F6CA62511A084442 +:104EA0004FF47A7100F2E140B0FBF1F0281A801E55 +:104EB00070BD70B5064615460C460846F4F710FA64 +:104EC000022D08BF4FF47A7105D0012D0CBF4FF4AD +:104ED000C86140F63401022C08BF40F24C4205D0B4 +:104EE000012C0CBF40F634024FF4AF52891A08442B +:104EF00049F6FC6108444FF47A71B0FBF1F0301AC6 +:104F000070BD70B504460E460846F3F76DF80546C9 +:104F10003046F3F7E2F828444AF2AB3108444FF444 +:104F20007A71B0FBF1F0201A801E70BD2DE9F041BE +:104F300007461E460D4614461046082A16BF04288A +:104F40004EF62830F3F750F807EB4701C1EBC711D5 +:104F500000EBC100022D08BF40F24C4105D0012DED +:104F60000CBF40F634014FF4AF5147182846F4F710 +:104F7000B7F9381A4FF47A7100F6B730B0FBF1F593 +:104F80002046F3F7B9F828443044401DBDE8F081CD +:104F900070B5054614460E460846F3F725F805EBAE +:104FA0004502C2EBC512C0EBC2053046F3F795F8D7 +:104FB0002D1A2046082C16BF04284EF62830F3F789 +:104FC00013F828444FF47A7100F6B730B0FBF1F5CE +:104FD0002046F3F791F82844401D70BD0949082880 +:104FE00018BF0428086803BF20F46C5040F4444004 +:104FF00040F0004020F00040086070470C15004071 +:105000001015004040170040F0B585B00C4605462D +:10501000F9F73EF907466E78204603A96A46EEF78F +:1050200002FD81198EB258B1012F02D0032005B0C4 +:10503000F0BD204604AA0399EEF717FC049D01E099 +:10504000022F0FD1ED1C042E0FD32888BDF80010BD +:10505000001D80B2884201D8864202D14FF0000084 +:10506000E5E702D34FF00200E1E74FF00100DEE791 +:10507000FA48C078FF2814BF0120002070472DE9AE +:10508000F041F74C0746160060680D4603D0F9F76B +:1050900069F8A0B121E0F9F765F8D8B96068F9F7C7 +:1050A00061F8D0B915F00C0F17D06068C17811F015 +:1050B0003F0F1CBF007910F0100F0ED00AE0022E37 +:1050C00008D0E6481FB1807DFF2806D002E0C078F6 +:1050D000FF2802D00120BDE8F0810020BDE8F0816A +:1050E0000A4601460120CAE710B5DC4C1D2200210A +:1050F000A01CE9F7CCF97F206077FF202074E070D6 +:10510000A075A08920F060002030A08100202070D0 +:1051100010BD70B5D249486001200870D248D1490D +:10512000002541600570CD4C1D222946A01CE9F7E1 +:10513000AEF97F206077FF202074E070A075A08911 +:1051400020F060002030A081257070BD2DE9F0476F +:10515000C24C06462078C24F4FF0010907F10808FB +:10516000002520B13878D0B998F80000B8B198F887 +:10517000000068B387F80090D8F804103C2239B3D7 +:105180007570301DE9F759F90520307086F80490E4 +:105190003878002818BF88F8005005D015E03D7019 +:1051A000A11C4FF48E72EAE71D220021A01CE9F732 +:1051B0006EF97F206077FF202074E070A075A089D1 +:1051C00020F060002030A08125700120BDE8F0872C +:1051D0000020BDE8F087A148007800280CBF01201E +:1051E000002070470A460146002048E710B510B17C +:1051F000022810D014E09A4C6068F8F7B3FF78B931 +:105200006068C17811F03F0F1CBF007910F0100FDB +:1052100006D1012010BD9148007B10F0080FF8D195 +:10522000002010BD2DE9FF4F81B08C4D8346DDE994 +:105230000F042978DDF838A09846164600291CBFCF +:1052400005B0BDE8F08F8849097800291CBF05B07A +:10525000BDE8F08FE872B4B1012E08BF012708D075 +:10526000022E08BF022704D0042E16BF082E0327E3 +:10527000FFDFEF7385F81E804FF00008784F8CB188 +:10528000022C1DD020E0012E08BF012708D0022EDD +:1052900008BF022704D0042E16BF082E0327FFDF05 +:1052A000AF73E7E77868F8F75DFF68B97868C178A9 +:1052B00011F03F0F1CBF007910F0100F04D110E067 +:1052C000287B10F0080F0CD14FF003017868F8F735 +:1052D000FDFD30B14178090929740088C0F30B0045 +:1052E0006882CDF800807868F8F73CFF0146012815 +:1052F000BDF8000005F102090CBF40F0010020F0EC +:105300000100ADF8000099F80A2012F0020F4ED10A +:10531000022918BF20F0020049D000BFADF80000FC +:1053200010F0020F04D0002908BF40F0080801D097 +:1053300020F00808ADF800807868C17811F03F0FC0 +:105340001CBF007910F0020F0CD0314622464FF0FE +:105350000100FFF794FE002804BF48F00400ADF8F8 +:10536000000006D099F80A00800860F38208ADF8C2 +:10537000008099F80A004109BDF8000061F3461069 +:10538000ADF8000080B20090BDF80000A8810421B3 +:105390007868F8F79BFD002804BFA88920F060001A +:1053A0000CD0B0F80100C004C00C03D007E040F0FE +:1053B0000200B3E7A88920F060004030A8815CB902 +:1053C00016F00C0F08D07868C17811F03F0F1CBFA1 +:1053D000007910F0100F0DD17868C17811F03F0FEF +:1053E00008D0017911F0400F04D00621F8F76EFDC6 +:1053F00000786877314622460020FFF740FE60BB08 +:105400007968C87810F03F0F3FD0087910F0010F8D +:105410003BD0504605F1040905F10308BAF1FF0F2E +:105420000DD04A464146F8F781FA002808BFFFDF51 +:1054300098F8000040F0020088F8000025E00846D7 +:10544000F8F7DBFC88F800007868F8F7ADFC07286F +:105450000CD249467868F8F7B2FC16E094120020A6 +:10546000CC010020D2120020D40100207868F8F787 +:105470009BFC072809D100217868F8F727FD01680F +:10548000C9F800108088A9F804003146224601209E +:10549000FFF7F5FD80BB7868C17811F03F0F2BD086 +:1054A000017911F0020F27D005F1170605F1160852 +:1054B000BBF1020F18BFBBF1030F08D0F8F774FC63 +:1054C00007280AD231467868F8F787FC12E002987C +:1054D000016831608088B0800CE07868F8F764FC7F +:1054E000072807D101217868F8F7F0FC01683160DE +:1054F0008088B08088F800B0002C04BF05B0BDE8FB +:10550000F08F7868F8F72EFE022804BF05B0BDE8DA +:10551000F08F05F11F047868F8F76DFEAB7AC3F1E0 +:10552000FF01884228BF084605D9A98921F06001FA +:1055300001F14001A981C2B203EB04017868F8F7D8 +:1055400062FEA97A0844A87205B0BDE8F08FB048A1 +:105550000178002918BF704701220270007B10F00B +:10556000080F14BF07200620FCF75FBEA848C17BC8 +:10557000002908BF70470122818921F06001403174 +:1055800081810378002B18BF7047027011F0080F5B +:1055900014BF07200620FCF748BE2DE9FF5F9C4F93 +:1055A000DDF838B0914638780E4600281CBF04B0AC +:1055B000BDE8F09FBC1C1D2200212046E8F767FFD4 +:1055C000944D4FF0010A84F800A06868F8F7ECFBEE +:1055D00018B3012826D0022829D0062818BFFFDFDB +:1055E0002AD000BF04F11D016868F8F726FC20727C +:1055F000484604F1020904F10108FF2821D04A4677 +:105600004146F8F793F9002808BFFFDF98F800003B +:1056100040F0020088F8000031E0608940F013009B +:105620006081DFE7608940F015006081E0E7608914 +:1056300040F010006081D5E7608940F01200608181 +:10564000D0E76868F8F7D9FB88F800006868F8F7D1 +:10565000ABFB072804D249466868F8F7B0FB0EE0B8 +:105660006868F8F7A1FB072809D100216868F8F7F6 +:105670002DFC0168C9F800108088A9F8040084F89E +:1056800009B084F80CA000206073FF20A073A17AF9 +:1056900011F0040F08BF20752AD004F1150804F199 +:1056A0001409022E18BF032E09D06868F8F77CFB96 +:1056B00007280CD241466868F8F78FFB16E000987F +:1056C0000168C8F800108088A8F804000EE0686837 +:1056D000F8F76AFB072809D101216868F8F7F6FB9B +:1056E0000168C8F800108088A8F8040089F80060F4 +:1056F0007F20E0760398207787F800A004B006208A +:10570000BDE8F05FFCF791BD2DE9FF5F424F814698 +:105710009A4638788B4600281CBF04B0BDE8F09F3D +:105720003B48017831B1007B10F0100F04BF04B08A +:10573000BDE8F09F1D227C6800212046E8F7A7FE07 +:1057400048464FF00108661C324D84F8008004F191 +:105750000209FF280BD04A463146F8F7E7F800283F +:1057600008BFFFDF307840F0020030701CE068684E +:10577000F8F743FB30706868F8F716FB072804D287 +:1057800049466868F8F71BFB0EE06868F8F70CFB01 +:10579000072809D100216868F8F798FB0168C9F863 +:1057A00000108088A9F8040004F11D016868F8F76A +:1057B00044FB207284F809A060896BF3000040F07C +:1057C0001A00608184F80C8000206073FF20A073B1 +:1057D00020757F20E0760298207787F8008004B05B +:1057E0000720BDE8F05FFCF720BD094A137C834227 +:1057F00005BF508A88420020012070470448007B82 +:10580000C0F3411002280CBF0120002070470000A7 +:1058100094120020CC010020D4010020C2790D2375 +:1058200041B342BB8188012904D94908818004BF62 +:10583000012282800168012918BF002930D0016847 +:105840006FEA0101C1EBC10202EB011281796FEA3B +:10585000010101EB8103C3EB811111444FEA914235 +:1058600001608188B2FBF1F301FB132181714FF0DC +:10587000010102E01AB14FF00001C1717047818847 +:10588000FF2908D24FF6FF7202EA41018180FF2909 +:1058900084BFFF2282800168012918BF0029CED170 +:1058A0000360CCE7817931B1491E11F0FF018171AC +:1058B0001CBF002070470120704710B50121C17145 +:1058C0008171818004460421F1F7E8FD002818BFAA +:1058D00010BD2068401C206010BD00000B4A022152 +:1058E00011600B490B68002BFCD0084B1B1D186086 +:1058F00008680028FCD00020106008680028FCD050 +:1059000070474FF0805040697047000004E5014047 +:1059100000E4014002000B464FF00000014620D099 +:10592000012A04D0022A04D0032A0DD103E0012069 +:1059300002E0022015E00320072B05D2DFE803F088 +:105940000406080A0C0E100007207047012108E029 +:10595000022106E0032104E0042102E0052100E029 +:105960000621F0F7A4BB0000E24805218170002168 +:10597000017041707047E0490A78012A05D0CA6871 +:105980001044C8604038F1F7B4B88A6810448860A1 +:10599000F8E7002819D00378D849D94A13B1012B68 +:1059A0000ED011E00379012B00D06BB943790BB114 +:1059B000012B09D18368643B8B4205D2C0680EE09D +:1059C0000379012B02D00BB10020704743790BB152 +:1059D000012BF9D1C368643B8B42F5D280689042B9 +:1059E000F2D801207047C44901220A70027972B1CD +:1059F00000220A71427962B104224A7182685232ED +:105A00008A60C068C860BB49022088707047032262 +:105A1000EFE70322F1E770B5B74D04460020287088 +:105A2000207988B100202871607978B10420B14EC6 +:105A30006871A168F068F0F77EF8A860E0685230FD +:105A4000E8600320B07070BD0120ECE70320EEE7B2 +:105A50002DE9F04105460226F0F777FF006800B116 +:105A6000FFDFA44C01273DB12878B8B1012805D04B +:105A7000022811D0032814D027710DE06868C828C7 +:105A800008D30421F1F79BF820B16868FFF773FF92 +:105A9000012603E0002601E000F014F93046BDE8DD +:105AA000F08120780028F7D16868FFF772FF00289E +:105AB000E2D06868017879B1A078042800D0FFDFCF +:105AC00001216868FFF7A7FF8B49E07800F003F930 +:105AD0000028E1D1FFDFDFE7FFF785FF6770DBE735 +:105AE0002DE9F041834C0F46E178884200D0FFDF7A +:105AF00000250126082F7DD2DFE807F0040B2828B7 +:105B00003D434F57A0780328C9D00228C7D0FFDFF4 +:105B1000C5E7A078032802D0022800D0FFDF0420C8 +:105B2000A07025712078B8BB0020FFF724FF7248D1 +:105B30000178012906D08068E06000F0EDF820616E +:105B4000002023E0E078F0F734FCF5E7A0780328A4 +:105B500002D0022800D0FFDF207880BB022F08D0BF +:105B60005FF00500F1F749FBA078032840D0A5704D +:105B700095E70420F6E7A078042800D0FFDF022094 +:105B800004E0A078042800D0FFDF0120A168884746 +:105B9000FFF75EFF054633E003E0A078042800D05D +:105BA000FFDFBDE8F04100F08DB8A078042804D0F4 +:105BB000617809B1022800D0FFDF207818B1BDE874 +:105BC000F04100F08AB8207920B10620F1F715FBEA +:105BD00025710DE0607840B14749E07800F07BF82E +:105BE00000B9FFDF65705AE704E00720F1F705FB15 +:105BF000A67054E7FFDF52E73DB1012D03D0FFDF70 +:105C0000022DF9D14BE70420C0E70320BEE770B5B1 +:105C1000050004D0374CA078052806D101E01020FB +:105C200070BD0820F1F7FFFA08B1112070BD3548AA +:105C3000F0F720FAE070202806D00121F1F7DCF817 +:105C40000020A560A07070BD032070BD294810B56C +:105C5000017809B1112010BD8178052906D00129EC +:105C600006D029B101210170002010BD0F2010BD08 +:105C700000F033F8F8E770B51E4C0546A07808B17F +:105C8000012809D155B12846FFF783FE40B1287895 +:105C900040B1A078012809D00F2070BD102070BD40 +:105CA000072070BD2846FFF79EFE03E0002128462E +:105CB000FFF7B1FE1049E07800F00DF800B9FFDF02 +:105CC000002070BD0B4810B5006900F01DF8BDE85C +:105CD0001040F0F754B9F0F772BC064810B5C07820 +:105CE000F0F723FA00B9FFDF0820F1F786FABDE8E4 +:105CF000104039E6DC010020B41300203D8601008D +:105D0000FF1FA107E15A02000C490A6848F202137A +:105D10009A4302430A607047084A116848F2021326 +:105D200001EA03009943116070470246044B1020BA +:105D30001344FC2B01D8116000207047C8060240B4 +:105D40000018FEBF1EF0040F0CBFEFF30880EFF346 +:105D50000980014A10470000FF7B010001B41EB416 +:105D600000B5F1F76DFC01B40198864601BC01B0A5 +:105D70001EBD00008269034981614FF0010010449B +:105D8000704700005D5D02000FF20C0000F10000A2 +:105D9000694641F8080C20BF70470000FEDF184933 +:105DA0000978F9B90420714608421BD10699154AB1 +:105DB000914217DC0699022914DB02394878DF2862 +:105DC00010D10878FE2807D0FF280BD14FF0010032 +:105DD0004FF000020C4B184741F201000099019A64 +:105DE000094B1847094B002B02D01B68DB6818478A +:105DF0004FF0FF3071464FF00002034B1847000090 +:105E000028ED00E000700200D14B020004000020E9 +:105E1000174818497047FFF7FBFFDBF7CFF900BDC4 +:105E2000154816490968884203D1154A13605B6812 +:105E3000184700BD20BFFDE70F4810490968884298 +:105E400010D1104B18684FF0FF318842F2D080F328 +:105E500008884FF02021884204DD0B4802680321A6 +:105E60000A4302600948804709488047FFDF000075 +:105E7000C8130020C81300200010000000000020FC +:105E8000040000200070020014090040B92F000037 +:105E9000215E0200F0B44046494652465B460FB4CC +:105EA00002A0013001B50648004700BF01BC86468C +:105EB0000FBC8046894692469B46F0BC7047000066 +:105EC0000911000004207146084202D0EFF3098155 +:105ED00001E0EFF30881886902380078102813DBAD +:105EE00020280FDB2C280BDB0A4A12680A4B9A4247 +:105EF00003D1602804DB094A10470220086070477C +:105F0000074A1047074A1047074A12682C3212689E +:105F1000104700005C000020BEBAFECA9B130000C0 +:105F2000554302006F4D0200040000200D4B0E4946 +:105F300008470E4B0C4908470D4B0B4908470D4BC2 +:105F4000094908470C4B084908470C4B06490847C4 +:105F50000B4B054908470B4B034908470A4B0249BD +:105F60000847000041BF000079C10000792D000002 +:105F7000F32B0000812B0000012E0000B71300005E +:105F80003F2900007D2F0000455D020000210160D7 +:105F90004160017270470A6802600B7903717047B3 +:105FA00089970000FF9800005B9A0000C59A0000E6 +:105FB000FF9A0000339B0000659B00009D9B000042 +:105FC0003D9C00007D980000859A0000331200007F +:105FD0000744000053440000B94400004745000056 +:105FE0006146000037470000694700004148000053 +:105FF000DB4800002F490000154A0000354A000028 +:10600000AD160000D1160000F11500004D1600007D +:10601000031700009717000003610000C36200002F +:10602000A1660000BB67000043680000C168000073 +:10603000256900004D6A00001D6B0000896B00009F +:10604000574A00005D4A0000674A0000CF4A00003E +:10605000FB4A0000B74C0000E14C0000194D000065 +:10606000834D00006D4E0000834E00007744000019 +:10607000974E0000B94E0000FF4E000033120000A2 +:10608000331200003312000033120000C12500005B +:1060900047260000632600007F2600000D28000030 +:1060A000A9260000B3260000F526000017270000EF +:1060B000F3270000352800003312000033120000DF +:1060C00097840000B7840000B9840000FD840000BC +:1060D0002B8500001B860000A7860000BB86000001 +:1060E000098700001F880000C1890000E98A0000BC +:1060F0003D740000018B00003312000033120000D9 +:10610000EBB700004DB90000A7B9000021BA0000AC +:10611000CDBA0000010000000000000010011001D5 +:106120003A0200001A020000020004050600000006 +:1061300007111102FFFFFFFF0000FFFFF3B3000094 +:10614000273D0000532100008774000001900000EB +:1061500000000000BF9200009B920000AD92000082 +:10616000000002000000000000020000000000002B +:1061700000010000000000004382000023820000B4 +:10618000918200002D250000EF2400000F25000063 +:10619000DBAA000007AB00000FAD0000FD590000B6 +:1061A000B182000000000000E18200007B250000B9 +:1061B000000000000000000000000000F1AB000043 +:1061C00000000000915A00000300000001555555E1 +:1061D000D6BE898E00006606660C661200000A03B1 +:1061E000AE055208000056044608360CC7FD0000F4 +:1061F0005BFF0000A1FB0000C3FD0000A7A8010099 +:106200009B040100AAAED7AB15412010000000008E +:10621000900A0000900A00007B5700007B570000A6 +:10622000E143000053B200000B7700006320000040 +:10623000BD3A020063BD0100BD570000BD5700001C +:1062400005440000E5B2000093770000D72000006D +:10625000EB3A020079BD0100700170014000380086 +:106260005C0024006801200200000300656C746279 +:10627000000000000000000000000000000000001E +:106280008700000000000000000000000000000087 +:10629000BE83605ADB0B376038A5F5AA9183886C02 +:1062A000010000007746010049550100000000018F +:1062B0000206030405000000070000FB349B5F801A +:1062C000000080001000000000000000000000003E +:1062D000060000000A000000320000007300000009 +:1062E000B4000000F401FA00960064004B00320094 +:1062F0001E0014000A000500020001000049000011 +:1063000000000000D7CF0100E9D1010025D1010034 +:10631000EBCF0100000000008FD40100000101025A +:10632000010202030C0802170D0101020909010113 +:1063300006020918180301010909030305000000FA +:10634000555555252627D6BE898E00002BFB01000A +:1063500003F7010049FA01003FF20100BB220200ED +:10636000B7FB0100F401FA00960064004B00320014 +:106370001E0014000A00050002000100254900006B +:1063800000000000314A0200494A0200614A02004E +:10639000794A0200A94A0200D14A0200FB4A0200DF +:1063A0002F4B02007B470200B7460200A1430200C8 +:1063B0002B5D0200AD730100BD730100E9730100A4 +:1063C000BB740100C3740100D57401002F480200A2 +:1063D000494802001D4802002748020055480200B3 +:1063E0008B480200AB480200C9480200D7480200AF +:1063F000E5480200F54802000D4902002549020067 +:106400003B4902005149020000000000DFBC0000CF +:1064100035BD00004BBD000015590200CD43020000 +:10642000994402000F5C02004D5C0200775C0200A0 +:106430009D710100FD760100674902008D4902004F +:10644000B1490200D74902001C0500402005004068 +:10645000001002007464020008000020E80100003F +:106460004411000098640200F0010020D8110000DF +:10647000A011000001181348140244200B440C061C +:106480004813770B1B2034041ABA0401A40213101A +:08649000327F0B744411C000BF +:02000004000FEB +:1040000000000420CDB20F00F5B20F00F7B20F0090 +:10401000F9B20F00FBB20F00FDB20F00000000006C +:10402000000000000000000000000000C1450F007B +:1040300001B30F000000000003B30F00214D0F007B +:10404000354E0F0007B30F0007B30F0007B30F0083 +:1040500007B30F0007B30F0007B30F0007B30F003C +:1040600007B30F0007B30F0007B30F0007B30F002C +:1040700007B30F0007B30F0007B30F0007B30F001C +:1040800007B30F0085720F0007B30F0007B30F00CF +:1040900041730F0007B30F00814B0F0007B30F00F0 +:1040A00007B30F0007B30F0007B30F0007B30F00EC +:1040B00007B30F0007B30F0000000000000000006E +:1040C00007B30F0007B30F0007B30F0007B30F00CC +:1040D00007B30F0007B30F0007B30F0005850F00EC +:1040E00007B30F0007B30F0007B30F000000000075 +:1040F0000000000007B30F000000000007B30F002E +:1041000000000000000000000000000000000000AF +:10411000000000000000000000000000000000009F +:10412000000000000000000000000000000000008F +:10413000000000000000000000000000000000007F +:10414000000000000000000000000000000000006F +:10415000000000000000000000000000000000005F +:10416000000000000000000000000000000000004F +:10417000000000000000000000000000000000003F +:10418000000000000000000000000000000000002F +:10419000000000000000000000000000000000001F +:1041A000000000000000000000000000000000000F +:1041B00000000000000000000000000000000000FF +:1041C00000000000000000000000000000000000EF +:1041D00000000000000000000000000000000000DF +:1041E00000000000000000000000000000000000CF +:1041F00000000000000000000000000000000000BF +:104200000348044B834202D0034B03B11847704765 +:10421000C8860020C8860020000000000548064926 +:104220000B1AD90F01EBA301491002D0034B03B1C4 +:1042300018477047C8860020C8860020000000008C +:1042400010B5064C237843B9FFF7DAFF044B13B1DE +:104250000448AFF300800123237010BDC8860020FE +:10426000000000005CBD0F0008B5044B1BB1044901 +:104270000448AFF30080BDE80840CFE7000000002D +:10428000CC8600205CBD0F00A3F5803A704700BFCC +:10429000154B002B08BF114B9D46FFF7F5FF002182 +:1042A0008B460F461148124A121A00F075F80C4B53 +:1042B000002B00D098470B4B002B00D098470020D4 +:1042C000002104000D000B4800F016F800F040F843 +:1042D0002000290000F074FA00F014F80000080033 +:1042E000000000000000000000000420C88600203C +:1042F000A4CE002025430F00002301461A4618468D +:1043000000F09CB808B50021044600F0CBF8044B3F +:104310001868C36B03B19847204600F029F900BF25 +:1043200058BB0F0038B5084B084D5B1B9C1007D0DD +:10433000043B1D44013C55F804399847002CF9D141 +:10434000BDE8384007F002BCC8860020C4860020C3 +:1043500070B50D4E0D4D761BB61006D0002455F8E5 +:10436000043B01349847A642F9D1094E094D761B0A +:1043700007F0E6FBB61006D0002455F8043B0134E4 +:104380009847A642F9D170BDBC860020BC860020AB +:10439000C4860020BC860020830730B548D0541E58 +:1043A000002A3FD0CAB2034601E0013C3AD303F8E9 +:1043B000012B9D07F9D1032C2DD9CDB245EA052556 +:1043C0000F2C45EA054536D9A4F1100222F00F0C56 +:1043D00003F1200EE6444FEA121C03F1100242E9F9 +:1043E000045542E9025510327245F8D10CF1010230 +:1043F00014F00C0F03EB021204F00F0C13D0ACF10D +:10440000040323F003030433134442F8045B934290 +:10441000FBD10CF003042CB1CAB21C4403F8012BED +:104420009C42FBD130BD64461346002CF4D1F9E721 +:1044300003461446BFE71A46A446E0E770B4184C9A +:104440002568D5F848411CB365681F2D25DC38B9AF +:10445000AB1C0135656044F82310002070BC704728 +:1044600004EB850C0228CCF88820D4F888614FF042 +:10447000010202FA05F246EA0206C4F88861CCF8A5 +:104480000831E5D1D4F88C311343C4F88C31DFE71F +:1044900005F5A674C5F84841D6E74FF0FF30DDE7D3 +:1044A00058BB0F002DE9F84F2B4B1F68D7F8486118 +:1044B0002DED028BC6B108EE100A8B464FF00108B5 +:1044C0004FF000097468651E0ED4013406EB8404B5 +:1044D000BBF1000F0CD0D4F800315B4508D0013D92 +:1044E0006B1CA4F10404F3D1BDEC028BBDE8F88F82 +:1044F00073682268013BAB420CBF7560C4F8009042 +:10450000002AECD0D6F88801D6F804A008FA05F104 +:1045100001420BD190477268524513D1D7F8483108 +:10452000B342DCD01E46002ECCD1DDE7D6F88C019C +:1045300001420CD1D4F8801018EE100A904772682E +:104540005245EBD0D7F84861002EBBD1CCE7D4F868 +:1045500080009047DFE700BF58BB0F00024B13B14C +:104560000248FFF7C9BE70470000000025430F0056 +:10457000FEE700BF38B50C46E8B90968C9B10F4D70 +:10458000A9420BD06B1A3B2B11D93C22284606F0CE +:10459000EDFE03E0CA5CEA54013BFBD2074800226F +:1045A0003C2103F0D3F90023A887236038BD3D23C5 +:1045B000F2E70E23F9E70123F7E700BF807F002031 +:1045C000074A6FF002039E4502D1EFF3098101E033 +:1045D000EFF308818869A0F102000078104700BF5E +:1045E00075450F0038B50446A8B10D4D00223C2199 +:1045F000284603F0ABF9AB8F83420ED12A4605F172 +:104600003C0152F8040B44F8040B8A42F9D10133FF +:10461000AB87002038BD0E20FCE70B20FAE700BF77 +:10462000807F00200B2970B50446154608462FD917 +:104630002389053304EB43012044431ADAB2012AEB +:1046400026D9814224D8134806F090FE2388522BA5 +:1046500006D1AB0711D062884CF668639A420CD041 +:104660000F2014E034F8022B824204D0AE89964227 +:1046700003F1010308D1002009E0218900230A3455 +:104680004FF6FE704FF440559942EBD80B2070BDA9 +:104690000920FCE7E486002008B5002203F056F963 +:1046A000034B1B88834214BF0B20002008BD00BFB2 +:1046B000E486002038B50C4C21684B1C054612D00E +:1046C0000A484FF4805206F01FFE48B115B1206829 +:1046D00000F00CFC054920684FF4806200F026FCD5 +:1046E0004FF0FF33236038BD30840020F086002077 +:1046F0002DE9F041DFF84480044624F47F65184634 +:10470000D8F8003025F00F05AB420E46174609D009 +:10471000FFF7D0FF0848C8F800504FF480522946F0 +:1047200006F024FE0448C4F30B043A463146204404 +:10473000BDE8F04106F01ABEF0860020308400206B +:10474000BFF34F8F0549064BCA6802F4E06213437A +:10475000CB60BFF34F8F00BFFDE700BF00ED00E06F +:104760000400FA054BDF704710DF704711DF704718 +:1047700013DF704718DF704760DF704769DF7047ED +:1047800061DF70471FB50023CDE90133039368460D +:1047900002230093FFF7EEFF05B05DF804FB08B5B8 +:1047A0004FF0E023D3F8F03DDB0700D500BEFFF764 +:1047B000C7FF0000014B1878704700BFF19600203A +:1047C0002DE9FF484C4B40F60212C3F8402500F09B +:1047D00005FA00F021FE002000F0AAFA00F09CFE8D +:1047E00048B1052000F0A4FA00F0A8FE00F0CCFECD +:1047F000062000F09DFA4FF08043DFF81081D3F8D7 +:104800001C55B12D0CBF0123002388F800304AD07D +:10481000A5F1A8014C424C41384EDFF8F49004F069 +:10482000010333704FF08043D3F8007407F00107A1 +:10483000002C3BD14E2D38D0572D36D0304B1B6835 +:104840001A68304B9A4200D17FBB6D2D2ED01220BA +:1048500000F0B0F9044633789BBB122000F0AAF9AF +:1048600010B1122000F0A6F900F00100307000F045 +:1048700005FDDFF8A0B0824630B12CB9204B1B6893 +:104880001A68214B9A4257D04FF440535A684A4510 +:104890000ABF9B684FF4905303F500731B685B4598 +:1048A0003AD1012448E00124B6E701244FF08043C7 +:1048B00000226D2DC3F81C2500F0E480002CCAD125 +:1048C000C5E70120D0E7544636E03C4634E04FF4DB +:1048D00080030B6071E0022000F02AFAA5F14E037C +:1048E0005842584103F012FEAEE000221146C1E0EA +:1048F00003F05CFEC6E000BF00A00040F19600207F +:1049000034840020D51A5A007E67E54EF2960020C6 +:10491000DBE5B1517CB0EE87002CC2D1BAF1000FBB +:10492000D1D0002FD1D0654B654A1B6865481A600D +:10493000654B43F0010398474FF440535A684A458A +:1049400008BF9B685D4A0CBF03F500734FF490539A +:1049500012681B685B450CBF5C4B002313601CB9DD +:10496000BAF1000F40F08E803378002BB3D00820CE +:1049700000F0DEF998F800300BB9FFF703FF0123D0 +:104980004FF4742088F80030FFF7F2FE504B514985 +:104990001868019001A8FFF7E7FE4F4991F8163318 +:1049A0005A09EC231341DA0707D54C4B9A68002AC1 +:1049B0008DD01A6842F480021A600C22484B029390 +:1049C00000210DEB0200FFF7E7FC40F20113029A11 +:1049D000039303A94020FFF7D1FE0C2200210DEB29 +:1049E0000200FFF7D9FC9DF80C30029A43F0010356 +:1049F00003A9A0208DF80C30FFF7C0FE0C22002187 +:104A00000DEB0200FFF7C8FC01241723029AADF852 +:104A10000E3003A923208DF80C40FFF7AFFE0C22C7 +:104A200000210DEB0200FFF7B7FC0623029A8DF878 +:104A30000C4003A920208DF80E40ADF81030FFF790 +:104A40009DFE02A8FFF798FE4FF4405330785A6855 +:104A50004A450ABF9B684FF4905303F500731B68E7 +:104A60005B4504D0572D02D04E2D7FF43EAF01227E +:104A700040F6B83100F0E8FC3378002B3FF438AF53 +:104A8000FFF774FE00F0EEF800F0F8FBA0B100F0C4 +:104A900043FD88B94FF440535B684B4506D198F805 +:104AA00000300BB9FFF76EFEFFF760FE034B1B688B +:104AB00000221A6000F004FDFFF742FE348400205B +:104AC000D51A5A000048E80160BB0F007E67E54E2A +:104AD0005CBB0F009F470F0000E100E0409D0020FD +:104AE0000080002010B58EB03423ADF802300DF1F7 +:104AF0000201002301A8ADF80430FFF741FE04468F +:104B000040B9BDF80430102B07D0112B0CD001A8F0 +:104B100000F0CCFF20460EB010BD054B01221A70EC +:104B2000072000F005F9F2E7014B18700820F8E7BC +:104B3000F096002013B5002301A80193FFF712FEA1 +:104B4000044660B9019802F053FA019B0A2B09D080 +:104B5000092B09D00B2B02D1012004F09BFB20462E +:104B600002B010BD2046F8E70220F6E708B5FFF7CF +:104B7000B9FF0528FBD1FFF7DDFF0528F7D108BDF8 +:104B80000021024A084602F003BE00BF6D4B0F0031 +:104B90001F2884BF00F01F00044B054A98BF4FF048 +:104BA000A04300F5E07043F8202070470003005058 +:104BB0000C0003001F288ABF064B4FF0A04300F0F3 +:104BC0001F00D3F8103523FA00F0C04300F00100B5 +:104BD000704700BF000300507047000008B54FF059 +:104BE000804301220021DA601220C3F818159A6070 +:104BF000FFF7CEFF1220FFF7CBFF154B4FF4C85045 +:104C000043F001039847FFF7E7FF124A1E210820EF +:104C100002F09AFD08B102F051FE02F0FBFC0E49D1 +:104C20000E4BE02081F823001B684FF47A72B3FB2F +:104C3000F2F3013BB3F1807F08D24FF0E0225361E1 +:104C4000002381F8230093610723136108BD00BF8F +:104C500070BB0F00F496002000ED00E038840020C7 +:104C6000704700004FF0E0224FF40031002310B5F0 +:104C70001361C2F8801102F1C04202F540524FF4B4 +:104C80008031C2F84813C2F80813012151609160C5 +:104C90004FF080420A4CD16002201F2B1A46C6BF3B +:104CA00003F01F0221464FF0A04102F5E0720133EC +:104CB000302B41F82200F0D1FFF7D2FF10BD00BF2A +:104CC00000030050074B23F81010074B002282B05E +:104CD000C3F81021D3F810210192019A01229A60A1 +:104CE00002B07047E898002000C001400A4A0B4B10 +:104CF00011681B68B1FBF3F203FB1211B1EB530F08 +:104D00004FEA530288BF591A4F2359430020B1FB81 +:104D1000F2F189B2FFF7D6BFE4980020F0980020A6 +:104D2000024A136801331360FFF7E0BFE4980020E4 +:104D30001B490A68082823D8DFE800F0130513226E +:104D4000221A1E242A00174B40F6B83018604FF480 +:104D50007F4303F0103323F080539A4218BF0B6057 +:104D60007047104B4FF4967018604FF47F03F0E7D4 +:104D70000C4B64221A6070470A4B40F6B83018603A +:104D80001346E6E7074B40F6B8301860FF23E0E72C +:104D9000044B4FF4967018604FF0FF13D9E700BF33 +:104DA000F4980020F098002000F1804382B01A6847 +:104DB000002A14BF0120002004D000221A601B68C2 +:104DC0000193019B02B070470F4A1378D3B903785F +:104DD0004FF08041C3F34003C1F88035037803F0FE +:104DE0000103C1F87835094B1968C90706D4E021D9 +:104DF00083F800130121C3F88011196001230448CE +:104E000013707047034870470499002000E100E0E8 +:104E10000000AD0B0C00AD0B014B02681A6070472F +:104E2000009900204FF080434FF46072C3F80423D0 +:104E30007047000010B54FF08043D3F80443620779 +:104E400007D54FF48470FFF7AFFF10B11E4B1B68FE +:104E50009847A30608D54FF48A70FFF7A5FF18B14D +:104E60001A4B00201B689847600608D54FF48C70D9 +:104E7000FFF79AFF18B1154B01201B6898472106D0 +:104E800008D54FF48E70FFF78FFF18B1104B00203C +:104E90001B689847E20508D54FF49070FFF784FF30 +:104EA00018B10B4B01201B689847A3050AD54FF496 +:104EB0009270FFF779FF28B1054BBDE810401B68E1 +:104EC0000220184710BD00BFF8980020FC98002071 +:104ED00000990020044AD2F80034DB07FBD50160BA +:104EE000BFF35F8F704700BF00E001404FF0805379 +:104EF0001A69B0FBF2F302FB130373B9084B0222E9 +:104F0000C3F80425C3F80805D3F80024D207FBD55D +:104F100000220448C3F8042570470348704700BFC7 +:104F200000E001400000AD0B0A00AD0BF8B50B4BE3 +:104F30001546012206460F46C3F804250024A54263 +:104F400004D1064B0022C3F80425F8BD57F82410FD +:104F500006EB8400FFF7BEFF0134F0E700E00140FC +:104F6000BFF34F8F0549064BCA6802F4E062134352 +:104F7000CB60BFF34F8F00BFFDE700BF00ED00E047 +:104F80000400FA054FF08053D3F83021082A06D1E7 +:104F9000D3F83431032B02D8024AD05C704700208A +:104FA000704700BF76BB0F0008B54FF08053D3F8B1 +:104FB0003021082A4ED14FF080420021C2F80C1156 +:104FC000C2F81011C2F8381502F54042D3F80414A3 +:104FD000C2F82015D3F80814C2F82415D3F80C141D +:104FE000C2F82815D3F81014C2F82C15D3F81414ED +:104FF000C2F83015D3F81814C2F83415D3F81C14BD +:10500000C2F84015D3F82014C2F84415D3F824147C +:10501000C2F84815D3F82814C2F84C15D3F82C144C +:10502000C2F85015D3F83014C2F85415D3F834141C +:10503000C2F86015D3F83814C2F86415D3F83C14DC +:10504000C2F86815D3F84014C2F86C15D3F844348C +:10505000C2F87035FFF796FF18B1494B494AC3F8BB +:105060008C26FFF78FFF18B1474BFB22C3F818259A +:10507000FFF788FF70B14FF080414FF08053D1F8B7 +:10508000E42ED3F8583222F00F0203F00F0313433B +:10509000C1F8E43EFFF776FF20B13C4B4FF40072BD +:1050A000C3F840264FF08053D3F83031082B09D194 +:1050B0004FF08043D3F80024D10744BF6FF00102C2 +:1050C000C3F80024324AD2F8883043F47003C2F89F +:1050D0008830BFF34F8FBFF36F8F4FF01023D3F89B +:1050E0000C22D2071DD52B4B0122C3F80425D3F87F +:1050F0000024002AFBD04FF01022D2F80C3223F00B +:105100000103C2F80C32234BD3F80024002AFBD051 +:105110000022C3F80425D3F80024002AFBD0FFF7AF +:105120001FFFD3F80022002A03DBD3F80432002B40 +:1051300022DA184B0122C3F80425D3F80024002AF0 +:10514000FBD04FF010221221C2F80012D3F8002435 +:10515000002AFBD04FF010231222C3F804220D4B7B +:10516000D3F80024002AFBD00022C3F80425D3F88A +:105170000024002AFBD0D2E7074B084A1A6008BD7A +:10518000005000404881030000F0004000900240C1 +:1051900000ED00E000E00140388400200090D003E2 +:1051A00013DF704718DF7047064B1878012803D1CA +:1051B000012904BF0221197012B1104602F07EBB12 +:1051C000704700BF3599002008B5FFF7F3FA88B1A2 +:1051D00011481C2101F098FF08B102F06FFB0F4944 +:1051E0000D4800231C2201F07FFF98B1BDE8084064 +:1051F00002F064BB4FF47F20FFF778FE07220749D7 +:105200004FF47F20FFF792FE054B1A78012A04BF66 +:1052100002221A7008BD00BF2C9900203899002086 +:105220003599002070B5124C124D134ED4F800344D +:105230007BB1C4F80056C4F80456C4F80856C4F844 +:105240000C56C4F81056C4F81456C4F81856C4F8CE +:105250001C5602F005FB05F0F4FF20B104F0DAFD66 +:10526000002005F003FA3378023B022BDED870BD34 +:10527000000001403546526E3599002013B54FF4B9 +:105280004053124A596891420CBF9C684FF48054B5 +:1052900001A800F0A7F92368013302D16368013344 +:1052A00011D0019B1A88012A0DD1588820B1996824 +:1052B0000022204602F04AFB019B5B881B1A5842E1 +:1052C000584102B010BD0020FBE700BFDBE5B15143 +:1052D00084B02DE9F34108AC84E80F009DF820402C +:1052E000BDF8228001A80F4616461D4600F07AF947 +:1052F00054B9384B0122FF21A3F802809D601A8027 +:105300009980354B1A7012E0012C17D1314BBA1924 +:105310002A449A60A5221A80FF229A800C9AA3F848 +:105320000280C3E903765D619A612B4B1C70FFF725 +:105330004BFF02B0BDE8F04104B07047032C0FD121 +:10534000019A244B11881980518892689A60C3E9A8 +:105350000376AA2259809A805D611F4B0122D1E712 +:10536000022C15D1019A1B4B1188A5290AD10022C4 +:105370009A60FF221A60FF229A800022C3E903226A +:105380005A61EAE719805188926859809A60F2E779 +:10539000052C0ED1FFF70EFA40B100F097FD08B1D1 +:1053A00002F08CFA0C4B03221A70C2E700F010FADC +:1053B000F5E7042C08D1074B00229A60FF221A60FF +:1053C000019A92889A80B2E7062CB2D1024B04224D +:1053D000EAE700BF389900203599002000B50C4B52 +:1053E0001B7889B063B90B4B1B786BB905238DF81B +:1053F0000C30079B009303AB0FCBFFF769FF03E073 +:1054000004F000FB0028EED009B05DF804FB00BFFB +:1054100034990020289900201FB50023CDE90233DC +:10542000074B019301F030FE30B906494FF47F235A +:1054300001A84B6001F046FE05B05DF804FB00BF1B +:10544000A9510F002C99002070B505460E460AB1EF +:1054500080F00102154B02F001021A7000F0B0FF5B +:10546000044628B935B100F08BFC0446FFF7DAFE9C +:10547000204670BDBEB10E4B0E4A0F481D70294626 +:1054800002F0F8F84FF400444FF4FA7029464FF454 +:105490007A720023E6FB040106F0D0F92A460146A1 +:1054A000064802F0F9F800F06FF9DEE734990020C1 +:1054B00028990020DD530F007CBB0F0008990020C5 +:1054C0001FB5134B4FF0FF32C3F88020C3F8802183 +:1054D0004FF440530F4A596891420DD19C682046C1 +:1054E000FFF75EFE10B14FF000531C60204604B081 +:1054F000BDE8104000F09AB80023CDE902334FF424 +:10550000805406236846CDE90034FFF74BFEE9E7F7 +:1055100000E100E0DBE5B15107B501A800F062F859 +:10552000019B1A88A52A07D09888A0F1AA0358429F +:10553000584103B05DF804FB0120FAE710B501F013 +:105540005DF9A8B10E4B0F4843F00103984701F0F5 +:10555000BFF808B102F0B2F901F050F908B102F059 +:10556000ADF901F001F9044638B102F0A7F904E001 +:1055700001F01EF904460028E4D1204610BD00BF0A +:1055800080BB0F0000A8610000B589B003AB1422F6 +:1055900000211846FEF700FF02228DF80C200022A1 +:1055A00000920FC8FFF794FEFFF73CFE002009B001 +:1055B0005DF804FB13B5044601A800F013F8019B45 +:1055C0001A8822805A8862809A68A2609A88A2808B +:1055D000DA68E2601A6922615A6962619B69A361B3 +:1055E00002B010BD014B0360704700BF00F00F0018 +:1055F000F0B50346186880F308885868FF2464B241 +:10560000EFF30585002D01D1A64600472546064645 +:1056100021273FBAF0B40024002500260027F0B46B +:10562000F92040B2004700BFF0BD00BFFFF7E0BF68 +:1056300073B500230DF1020101A8ADF8023001930A +:1056400002F0C4FDF8B9019C25785DB3174B93F8BF +:105650003020032A28D00C2606FB00F29958E9B91D +:1056600098189D5093F830200132D2B283F8302040 +:10567000BDF802300E4A9B08013B0434436084604D +:10568000084602F085F8019B33B128B1184602F0B4 +:10569000B9FD08B102F012F902B070BD0130042862 +:1056A000DAD1F0E70720EEE70420ECE75499002078 +:1056B000F9560F00084609B102F000B97047000022 +:1056C00010B50C220B4B504319181A5882B193F89D +:1056D00030208C68013AD2B283F8302000221A5070 +:1056E000C1E90122201F02F08DFD08B102F0E6F8A9 +:1056F000002010BD54990020214B70B50122214E8D +:105700001A7096F8303003B970BD1E4C002523681E +:1057100083B1013B042B07D8DFE803F01C0612031A +:105720002800204600F0DEFEE8B2FFF7C9FF08B10E +:1057300002F0C4F80135042D04F10C04E7D1E0E7D0 +:10574000A3686360204600F073FE0028ECD002F0EE +:10575000B5F8E9E7204600F053FF00F02FFF08B14D +:1057600002F0ACF80520FFF7E3FADDE700F074FF84 +:1057700000F092FFBDE870400620FFF7D9BA00BFE5 +:10578000289900205499002008B50E4B002283F878 +:10579000302004210139C3E901221A6003F10C030E +:1057A000F8D1094800F03EFE02F0A8FC08B102F072 +:1057B00085F8064802F08EFC08B102F07FF8002060 +:1057C00008BD00BF54990020B5560F0031560F0098 +:1057D00008B50020FFF774FF0120FFF771FF0220DA +:1057E000FFF76EFF0320FFF76BFFBDE8084002F0F4 +:1057F000CDBC006870476CDF70476DDF70476EDFAF +:1058000070476FDF704772DF704773DF704774DF78 +:10581000704776DF704777DF70477ADF70477CDF4D +:1058200070477FDF704786DF70478FDF704790DFFC +:105830007047AFDF7047B0DF7047B1DF7047B2DF4E +:105840007047B5DF704764DF704766DF70470C282C +:1058500013D8DFE800F01412121212120912071204 +:10586000120D0B0002207047032070470420704780 +:10587000042914BF06200520704706207047012028 +:10588000704702F01BB810B5044608460321FFF725 +:10589000DEFF0246204601F075F918B1BDE8104060 +:1058A00002F00CB810BD00000346032B10B50846EB +:1058B000144620D0042B23D169B1124B18884FF61F +:1058C000FF7398421CD01321FFF7A3FFC0B1BDE8BE +:1058D000104001F0F3BF104602F094F808B101F057 +:1058E000EDFF094B1B689C420AD1012203210748A6 +:1058F00001F048F9EAE70121FFF7A9FF0246F6E7C0 +:1059000010BD00BF3E840020489A0020F899002076 +:10591000F8B50A4DAB889E181D2E14460DDC2F6875 +:10592000FE1802F1010C07F803C07070B01C05F0FE +:105930001DFDAB8802331A19AA80F8BDA899002072 +:10594000F0B54E4E317895B0002940F092804C4C25 +:10595000019110222046FEF71FFD4A4B019923605A +:1059600018220EA8FEF718FD01238DF838302823E1 +:105970001093454B1B78002B7DD0444B04AC03F1B6 +:10598000100518685968224603C20833AB42144612 +:10599000F7D13F4C10220DEB0201E01D05F0B4FCE5 +:1059A000002868D03B4801210460FFF728FF08B1B8 +:1059B00001F084FF384B08AA03F1100C1746186851 +:1059C0005968154603C5083363452A46F7D1206850 +:1059D0000C903248A288A379ADF8342007600122E8 +:1059E00000218DF83630FFF70CFF08B101F066FF9B +:1059F00003238DF84C3004238DF80E3041F23053E0 +:105A0000ADF81030264B08AA9B798DF812300DF1B5 +:105A10000F0104A8FFF717FF012210460DF10E0138 +:105A2000FFF776FF1F4805F04BFE1E49C2B2092062 +:105A3000FFF76EFF102208A90620FFF769FF104943 +:105A400019480EAAFFF7DFFE08B101F037FF164C28 +:105A5000042221780120FFF7DEFE08B101F02EFFBD +:105A600020780121FFF7D1FE08B101F027FF0123C3 +:105A7000337015B0F0BD0623BEE700BF2C9A00209E +:105A8000A899002088990020F4990020A9BB0F0054 +:105A9000B8990020449A0020BF990020289A00203D +:105AA000F899002086BB0F003C840020F0B5044626 +:105AB0000146B1B0A84801F099F82388262B3BD8BD +:105AC0000F2B04D8012B00F0CC8031B0F0BD103B7F +:105AD000162BFAD801A252F823F000BF655B0F0025 +:105AE000735B0F00CB5A0F00A55B0F009F5C0F008C +:105AF000CB5A0F00CB5A0F00CB5A0F00CB5A0F00D6 +:105B0000CB5A0F00BB5C0F00CB5A0F00CB5A0F00D3 +:105B1000CB5A0F00CB5A0F00CB5A0F00CB5A0F00B5 +:105B2000315D0F00CB5A0F00235D0F00CB5A0F00E1 +:105B3000CB5A0F00255C0F00513B9AB2052AC4D8FE +:105B4000052BC2D801A252F823F000BF6F5C0F00F2 +:105B5000BB5C0F00CB5A0F00CB5A0F00475D0F0004 +:105B60000B5C0F007D4BA2881A807D4B00221A70BF +:105B7000ABE78023794CADF824307A4B2088322271 +:105B80001A6010A9012309AAFFF759FE08B101F014 +:105B900095FE754B1B780BB9FFF7D2FE4FF6FF73DE +:105BA000238092E7714B03AC9A79186899888DF835 +:105BB00022200790DA1DADF8201017332646106812 +:105BC0005168254603C508329A422C46F7D1684BE6 +:105BD00009AA03F11807154618685968144603C442 +:105BE0000833BB422246F7D1186820605B48614AFF +:105BF000008810AB8521CDE91456FFF712FE00286E +:105C00003FF463AF01F05AFE5FE7A379002B7FF406 +:105C10005CAF524B13211888FFF7FBFD00283FF4BF +:105C200054AF79E0237A012B7FF44FAF4C4B002225 +:105C30001A704C4B19680139196069B910AB1422FC +:105C40001846FEF7A9FB05228DF84020149A009211 +:105C50000FC8FFF73DFB38E731B0BDE8F040FFF774 +:105C60006FBE3E4B00211888FFF7EFFDD6E7A37902 +:105C7000002B3FF42AAFA27B043A022A3FF625AF5D +:105C8000022B18BF01238DF840304FF4C173ADF8DB +:105C90004430324B10A91888FFF7CDFDAFE7334AE7 +:105CA000258A508D02F118010023854218BF19463C +:105CB0000732A088FFF7B7FDB0E7284B1C884FF6E6 +:105CC000FF75AC4227D02C4B1B78F3B12B49012335 +:105CD00008222046FFF7B1FDF0B902460146022333 +:105CE0002046FFF7AAFDB8B92A460C212046FFF747 +:105CF000A0FDA0F54053023B012B7FF6E6AE08283D +:105D00003FF4E3AE112889D1DFE61A461946204652 +:105D1000FFF793FD82E7082031B0BDE8F04001F0C5 +:105D2000CDBD0E4B002218881146FFF780FD75E7A8 +:105D300000238DF840308DF84130084B10A91888A9 +:105D4000FFF773FDC1E6E188044B1729188828BFC7 +:105D50001721FFF776FD61E7F89900203E840020C7 +:105D60002C9A0020408400203F9A0020B8990020FF +:105D7000D09900203A9A0020F4990020EC99002054 +:105D800030B5464A464800231370464A95B0137012 +:105D900000F048FB01F0F6FD0446002868D14248B7 +:105DA000FEF720FC002866D1404B01221A70112317 +:105DB0003F488DF8043005F083FC3D4982B201A8CC +:105DC000FFF72DFD08B101F079FD0822002104A89C +:105DD000FEF7E2FA0823ADF810301823ADF81230C0 +:105DE0000023ADF8143004A84FF4C873ADF8163092 +:105DF000FFF713FD08B101F061FD00210C2201A89D +:105E0000FEF7CAFA0823ADF804302A4B02932A4859 +:105E10002A4B039301A900F02FFD08B101F04EFDBC +:105E2000274D4022002104A8FEF7B6FA284605F0C7 +:105E300047FCADF810002846059505F041FC079594 +:105E4000204DADF81800284605F03AFC1123ADF8B6 +:105E5000300004A8ADF84C300D9500F0DBFF1A4B74 +:105E600030221A7007225A7010229A70FFF768FDCC +:105E7000204615B030BD04A8FFF7BFFC08B101F003 +:105E80001DFD9DF8113004A801338DF81130FFF786 +:105E9000B2FC00288BD001F011FD88E73F9A00206A +:105EA000A9580F00399A0020B8990020F4990020D1 +:105EB00086BB0F001D5F0F00F899002083580F006C +:105EC0008DBB0F0098BB0F003A9A002010B50F4B06 +:105ED00001221A700E4B18884FF6FF73984207D0B4 +:105EE0001321FFF796FC08B101F0E8FC002010BD7B +:105EF000084C2378002BF9D0074B1878FFF787FC64 +:105F000008B101F0DBFC00232370EFE73F9A00208B +:105F10003E8400202C9A00203C840020F0B50B78B1 +:105F200089B005460C46092B35D8DFE813F02D0063 +:105F3000360041000A001900260007011001440044 +:105F4000150100F089FB0421FFF781FC0246284679 +:105F500000F018FEF8B109B0BDE8F04001F0AEBCA9 +:105F6000FFF7B4FF08B101F0A9FC00F095FB90B178 +:105F700009B0BDE8F04000F09DBBFFF7A7FF002887 +:105F8000F6D001F09BFCF3E7764B01221A704B68C8 +:105F90001A78754B1A7009B0F0BD724B02261E704C +:105FA0004B681B78012BF6D100F008FB3146CBE79C +:105FB0006C4B0322EEE70520FEF7BAFE694B1E7814 +:105FC000022E37D0032E59D0012EE4D104AB10227B +:105FD00018460021FEF7E0F9634A237A12788DF81B +:105FE0001020002203920C2B4FF00302CDE9012078 +:105FF00008D03146284600F0C5FD0028CBD001F07E +:106000005DFCC8E763681846FFF7F3FB0590181DB1 +:10601000FFF7EFFB069003F10800FFF7EAFB07909C +:1060200001A800F005FA0028B5D03146FFF70FFCB3 +:106030000246DFE7237A13F0030011D0C0F1040217 +:106040001A44D2B219464FF0000C0E46013167686F +:10605000C9B2914207F806C0F7D11B1A0433237264 +:106060000123049363680693237A04A89B0805938D +:1060700000F0C6FA00288ED00221D7E7207A8307E5 +:1060800002D03246314662E7384E0190314601F087 +:106090008FFC014618B12846FFF7F5FB7BE76168E6 +:1060A000019A306805F062F9019801F0E7FC0146B9 +:1060B0000028F0D101A9304601F0F0FC014600288B +:1060C000E9D104230493019B9B08059304A833683A +:1060D000069300F007FA074640B9254A237A11686B +:1060E0000B441360234B32681A6054E709281BD114 +:1060F0001F4B217A1A68114419601F4B1B78002B23 +:106100003FF449AF1D4C2388013B9BB22380002BF9 +:106110007FF441AF284600F0FBFC08B101F0CEFB54 +:10612000174B1B88238036E7306801F06BFC014673 +:1061300010B12846FFF7A7FB3946ACE70E4B01220A +:106140001A700F4A8B8813800C4A138023E70A4A7F +:10615000002313700A4AF8E7054B196800F09CFC0D +:10616000F8E600BF399A0020409A00204C9A00209F +:10617000309A0020489A0020389A0020369A002051 +:10618000349A002018DF7047012973B514460D4674 +:106190001A4608D0032912D014B3204602B0BDE835 +:1061A000704001F08BBB0F4B1B78052BF4D10E4BCD +:1061B0001B68002BF0D0214604209847ECE7094EDD +:1061C0003378022BE8D1094B01925B689847064B64 +:1061D00035701B68002BDFD0019A21462846ECE77A +:1061E00002B070BD589A0020509A00205C9A00209E +:1061F00030B589B003AC142200212046FEF7CCF85C +:10620000094B1B88ADF80E30084BDB680693002560 +:10621000079B8DF80C50009394E80F00FFF758F897 +:10622000284609B030BD00BF689A0020B49A00200B +:1062300000B589B003238DF80C300A4B1B88ADF8EC +:106240000E30094B5A6804929A68DB680693079BE4 +:106250000093059203AB0FCBFFF73AF8002009B08B +:106260005DF804FB689A0020B49A002000B589B05C +:1062700001238DF80C300F4B0F4A1B88ADF80E3000 +:106280004FF440535968914208BF9A680B4B5968C4 +:10629000049118BF4FF480529968DB68069305910A +:1062A000009203AB0FCBFFF713F8002009B05DF8A5 +:1062B00004FB00BF689A0020DBE5B151B49A0020CE +:1062C00000B589B003AB142200211846FEF764F82C +:1062D00004228DF80C20002200920FC8FEF7F8FF70 +:1062E00009B05DF804FB0000194BF7B5194C1C60B0 +:1062F000194B02221A70FEF75DFA184B48B1196863 +:10630000204600F001FF00B303B0BDE8F04001F00B +:10631000D5BA1D68124F013D2D0B013504464FF4CF +:1063200040567368BB420CBFB0684FF4805000EB1E +:1063300004300134FEF7DAFDA542F2D80023054807 +:1063400000931A460321FFF71FFF03B0F0BD00BF03 +:10635000CC9A0020C49A0020589A00206C9A002001 +:10636000DBE5B15170B50C4686B00321CDE90210D2 +:106370000546960802A8019304940596FFF702FFCC +:10638000E0B1B4F5805F019B11D8012302A8CDE9EB +:106390000235CDE90446FFF7F5FE78B9032302A8DC +:1063A000CDE90235CDE90446FFF7ECFE06E01A46DA +:1063B000E11AE81AFFF7D6FF0028E6D006B070BD54 +:1063C0001FB5114B0193114B114900241C70114B47 +:1063D00001A81C80CDE9024400F074FE0E4B10B100 +:1063E0001C7004B010BD4FF440520C4954688C42EC +:1063F00007490CBF92684FF480524A60084A002156 +:10640000116001221A70ECE789610F00B09A002038 +:10641000C49A0020689A0020589A0020DBE5B15108 +:10642000549A0020014B1860704700BF509A00201A +:1064300038B54368214C0FCB84E80F002278500711 +:1064400001D5910733D16068830730D1A3689D07D8 +:106450002DD1E16811F0030429D1184408441849EA +:10646000B3F5204F086024D84FF4405315495D68B8 +:106470008D420ABF9B684FF46923C3F56A23984293 +:1064800017D8114B1149196011495960D10709D525 +:10649000104A9A60104B1B78012B0CD1FFF724FF98 +:1064A000204638BD92074CBF0C4A0D4AF1E706243E +:1064B000F6E70C24F4E70824F2E700BFB49A0020C2 +:1064C0006C9A0020DBE5B1515C9A0020E9620F0074 +:1064D000C1620F006D620F00589A002031620F00F8 +:1064E000F1610F002DE9F04385B0002853D0816899 +:1064F00011F0030451D12C4B1B78052B4FD12B4E9F +:1065000042683368DFF8AC9003EB82039500D9F85A +:106510000020934207D94FF0FF3333600C2420460C +:1065200005B0BDE8F0830391FEF744F9DFF88880F9 +:10653000039940B13368D8F800002A4600F0D4FD32 +:10654000D8B10446EBE74FF44053194A586837680E +:10655000904208BF9868039118BF4FF48050002301 +:106560002A463844FEF7C4F80399D8F8000000958D +:106570000B4600220121FFF707FE33681D44D9F8BE +:10658000003035609D420CD1FEF714F90028C6D1C9 +:10659000FEF790F8C3E70E24C1E71024BFE70824F4 +:1065A000BDE70924BBE700BF589A0020549A002099 +:1065B000DBE5B1516C9A0020CC9A002070B50B4BF2 +:1065C0001D6885B90A4E3378042B0CD1094C0A4B4F +:1065D00021781A780948FEF725F810B90523337099 +:1065E00070BD2570FCE70820FAE700BF549A002030 +:1065F000589A0020B09A0020B49A0020709A002087 +:10660000F8B5114B1A78032A03D0042A03D00824C2 +:1066100016E004221A700D4B1C68002CF7D10C4DAB +:1066200043682F789E0007EB8303402B0AD88168CC +:1066300008483246384404F099FE2B7833442B70D6 +:106640002046F8BD0924FBE7589A0020549A002000 +:10665000B09A0020709A002010B50B4C2378052BBF +:1066600010D10A4B0A4A1B68116899420AD10623C5 +:106670002370084B1B685868FEF70EF808B907230B +:10668000237010BD0820FCE7589A00206C9A002067 +:10669000549A0020CC9A0020044B1B78072B02D17F +:1066A000034B9B6818470820704700BF589A00208A +:1066B0005C9A002000B589B006238DF80C30079B4A +:1066C000009303AB0FCBFEF703FE09B05DF804FBAC +:1066D000F0B58DB005A8FEF76DFF089C002C3ED0EC +:1066E0000B9E04F58053B3422DD91E4BA6F5805561 +:1066F00003EA55054FF440539B689C420BD8690050 +:106700002B46A4EB450201F5805106EB4500FFF74F +:1067100029FE0DB0F0BD05F58053012701A8CDE994 +:106720000173CDE90337FFF72DFD0028F1D14FF4B8 +:10673000805301A8CDE9023301970497FFF722FDAA +:106740000028E6D1DBE70123CDE90136A4084FF4A8 +:10675000805301A803930494FFF714FDD9E7204662 +:10676000D7E700BF00F0FFFF00B58DB005A8FEF72A +:1067700021FF099880B1089B8BB94FF440530B4A15 +:10678000596891420ED19B6880080022039001A8AD +:10679000CDE90123FFF7F6FC0DB05DF804FB0B9A81 +:1067A0001344F1E74FF48053EEE700BFDBE5B1514E +:1067B00000B58DB005A8FEF7FDFE099898B1089BBD +:1067C000A3B94FF440530C4A5968914211D19B68C8 +:1067D0000393800803214FF47422049001A8CDE9AB +:1067E0000112FFF7CFFC0DB05DF804FB0B9A1344C8 +:1067F000EEE74FF48053EBE7DBE5B15110B58CB019 +:1068000005A8FEF7D7FE0898B8B10B9C00F5805399 +:10681000A34214D94FF440539B6898421BD80F4BA6 +:10682000A4F5805203EA52035900A0EB430201F59C +:10683000805104EB4300FFF795FD0CB010BD8008BC +:1068400003224FF48053049001A8CDE9012303945F +:10685000FFF798FCF1E70E20EFE700BF00F0FFFF25 +:10686000A8DF7047AADF7047ADDF7047AEDF704723 +:10687000B0DF704762DF70472DE9F0470E4694B0F5 +:106880000546002800F00181002900F0FE804B68D9 +:10689000002B00F0FA804FF6FF7303800023ADF861 +:1068A0000A307B4B04AA03F1100C1746186859688C +:1068B000144603C4083363452246F7D141F23053EE +:1068C0000DF10A013846ADF80830FFF7D3FF044652 +:1068D000002840F0D6802A1D02A90120FFF7C0FF42 +:1068E0000446002840F0CD809DF80A30AB71014687 +:1068F0001C220DA8FDF750FD9DF834300E9443F096 +:1069000004038DF8343001AFAB798DF80E30214699 +:1069100041F2325303223846CDE91044CDE9124406 +:10692000ADF80C30FDF738FD9DF806308DF80440C9 +:1069300023F01F0343F00303214614224FF0110AF2 +:1069400008A88DF806308DF805A00DF10C08FDF7AC +:1069500023FD4FF01409A8880A9405F1080308AA3A +:106960000DA90C94CDE90887ADF82C90FFF77AFFBC +:106970000446002840F0858001461C220DA8FDF742 +:106980000BFD9DF834300E9423F0180343F01803E8 +:106990008DF83430AB798DF80E30214641F2315309 +:1069A00003223846CDE91044CDE91244ADF80C304D +:1069B000FDF7F2FC9DF806308DF8044023F01F032C +:1069C00043F0130321464A4608A88DF806308DF897 +:1069D00005A0FDF7E1FC1723ADF82C30A8880A9438 +:1069E00005F1100308AA0DA90C94CDE90887FFF75B +:1069F00039FF0446002844D101461C220DA8FDF7AA +:106A0000CBFC9DF834300E9443F002038DF8343003 +:106A1000AB798DF80E30214641F2345303223846CB +:106A2000CDE91044CDE91244ADF80C30FDF7B4FCCB +:106A30009DF806308DF8054023F01F0343F0030353 +:106A400021464A4608A88DF806308DF804A0FDF7C7 +:106A5000A3FC02230A93ADF82C30A8880C9605F10C +:106A6000200308AA0DA9CDE90887FFF7FBFE04461D +:106A700038B97368AB62B36803B1EB62054B0122AE +:106A80001A70204614B0BDE8F0870E24F9E700BF65 +:106A9000B9BB0F00D09A002070B5054686B070B320 +:106AA00002884FF6FF739A422BD0174B1B7843B3E3 +:106AB000164C1022080AE170207121FA02F0090E2A +:106AC000072301266071A17102A800216370ADF84F +:106AD00006302270A670FDF75FFC2B8AADF80830F7 +:106AE0000023ADF80C3028888DF80A600DF10603FC +:106AF00002A9CDE90434FFF7B9FE06B070BD0E203F +:106B0000FBE70820F9E700BFD09A0020D19A0020C7 +:106B100030B5044687B060B302884FF6FF739A42DF +:106B200029D0164B1B7833B3154D11232B700B0A4C +:106B30006970AB700B0C090EEB70297105230021F5 +:106B4000102202A8ADF80630FDF726FC238AADF826 +:106B5000083001238DF80A300023ADF80C3020886E +:106B60000DF1060302A9CDE90435FFF77FFE07B05A +:106B700030BD0E20FBE70820F9E700BFD09A0020C7 +:106B8000D19A002030B5044687B038B300884FF65C +:106B9000FF73984224D0134B1B780BB3124D102374 +:106BA00069700321ADF80610AA7000211A4602A8E8 +:106BB0002B70FDF7F1FB238AADF8083001238DF827 +:106BC0000A300023ADF80C3020880DF1060302A92D +:106BD000CDE90435FFF74AFE07B030BD0E20FBE7D4 +:106BE0000820F9E7D09A0020D19A002070B50D4610 +:106BF00088B0044650B149B1826A3AB10B88502B33 +:106C000049D005D8102B43D0112B54D008B070BDFB +:106C1000512BFBD18E79022EF8D10A89038A9A4230 +:106C2000F4D18B7B043B022BF0D99DF816308DF804 +:106C3000106043F001038DF816300B8AADF8183060 +:106C40004B8AADF81A30082201F1140301A8002183 +:106C50000793FDF7A1FBA18A2088019601AACDF830 +:106C600008D0FFF701FE48B3E36A03B1984740F24A +:106C7000FD132088ADF8143004A9FFF7F9FD0028B2 +:106C8000C4D0E36A002BC1D008B0BDE870401847FB +:106C90008B882380BAE7C98803899942B6D1082333 +:106CA0008DF81030123535F8023C8DF81830059506 +:106CB00004A99047AAE74FF6FF73EAE7BDF8003052 +:106CC0002088DB07D3D5002604A9ADF81460FFF7B0 +:106CD000CFFD0028D5D1297D4B1E072B3ED8DFE8FC +:106CE00003F004192226282A3B2C6B8A8DF80460B5 +:106CF000012B05D8062201212046FFF743FFBEE7FE +:106D0000012315358DF80C300295A36A01A92046A0 +:106D100098477BE76A8A01239A428DF80430F0D8BD +:106D200006220221E8E702238DF80430EDE7032371 +:106D3000FAE70423F8E70523F6E76B8A022B02D86B +:106D400003220821D8E7B5F81530ADF80830002B3C +:106D50000CBF07230623E7E70923E5E70322CBE778 +:106D6000A8DF7047AADF70472DE9F04180468EB05A +:106D700015461F460E4611B9084600F09FFD15B98D +:106D8000284600F09BFD1C220DEB02000021FDF7C0 +:106D900003FB9DF81C30ADF80480002443F002038F +:106DA0008DF81C3021460123032268468DF80630F9 +:106DB000CDE90A44CDE90C440894FDF7EDFA3B789F +:106DC0008DF800307B788DF801309DF8023023F08B +:106DD0001F0343F002032146142202A88DF802305B +:106DE000FDF7DAFA0A48CDF80CD001AB029302AAFB +:106DF000149B0088ADF8105007A9ADF81240ADF80B +:106E000014500696FFF7AEFF0EB0BDE8F08100BF4C +:106E1000F89A002030B587B041F60A032B4AADF846 +:106E20000C30044603A901208DF80E00FFF798FFEF +:106E30000546D8B92288E2B922894AB1244B009389 +:106E4000E16804F13C0342F62420FFF78DFFD8B936 +:106E5000228C4AB11F4B0093616A04F13C0342F655 +:106E60002620FFF781FF78B9A36B7BB9284607B0CE +:106E700030BD194B0093616804F13C0342F62920B0 +:106E8000FFF772FF0028D7D00546EFE71A788DF894 +:106E900010205A888DF81120120A8DF812209A8835 +:106EA000DB888DF815301B0A8DF813208DF816300D +:106EB000120A0A4B8DF814200093072204F13C03B8 +:106EC00004A942F65020FFF74FFFDDE7F89A0020B3 +:106ED000E89A0020D89A0020E09A0020F09A00203A +:106EE00029DF704728DF7047064B182202FB00306D +:106EF00000230422C0E90423037183608361C3601B +:106F0000704700BF0C9B002023B502460846C968A5 +:106F100043680093044B53F82150436910F80C1B4D +:106F2000A84702B020BD00BFFC9A002038B5194C1C +:106F30002378182202FB03431A795869012A03D0E7 +:106F4000032A1AD00F2038BD134A996915689A6828 +:106F5000DB68A2EB0532B2F5805F184401EB053126 +:106F600000EB053034BF92084FF48062FFF7B8FFA2 +:106F70000028E8D10123A370E5E74FF080531B6997 +:106F80009BB2B0FBF3F0044B1B681844FFF7AAFF59 +:106F9000EEE700BF0C9B0020049C002070B5134D51 +:106FA0006C780A2C1FD02E783444E4B2092C84BFAC +:106FB0000A3CE4B2182606FB0454A261207103C9FE +:106FC000A360049BE360AB7804F1100282E8030045 +:106FD00023B100206B7801336B7070BDFFF7A6FF03 +:106FE0001128F7D1F5E70420F7E700BF0C9B00203C +:106FF00070B5234CA3782BB100260228A67002D0CE +:10700000032833D070BD25781E4A182101FB0541A5 +:10701000136889680133B1EB033F136014D86378B8 +:107020001660013B63706B1CDBB21821092B01FB5E +:10703000054188BFA5F10903002004312370FFF743 +:1070400063FF2846FFF750FF6378002BDAD0A37860 +:10705000002BD7D1FFF76AFF0028D3D01128D1D059 +:107060002178182303FB0141043105E0217818231E +:1070700003FB014104310D20BDE87040FFF744BF20 +:107080000C9B0020049C002008B50A4B00211960CD +:10709000094B1980997008460131FFF725FF0A292D +:1070A000F9D1064B00201860054BC3E90000C3E985 +:1070B000020008BD049C00200C9B0020009C0020C6 +:1070C000FC9A0020064A03461068042807D008608E +:1070D000411C11601A68034B43F8202000207047C0 +:1070E000009C0020FC9A002013B5CC180C43A40788 +:1070F00008D1009313460A4601460120FFF74EFFD0 +:1071000002B010BD1020FBE707B500220B4600922D +:1071100001460320FFF742FF03B05DF804FB0000C7 +:10712000094B5A7899780132D2B2914208BF0022B5 +:10713000197891421FBF02705878182202FB003064 +:1071400014BF043000207047089C0020082910B5A7 +:10715000044602D0002000F0B1FBD4E90030BDE8C5 +:107160001040184773B5054600240DF107000E4680 +:107170008DF8074000F0B0FB0DF10600FFF7D0FFDF +:1071800090B10670094B9DF8062045605A709DF835 +:10719000070000F0C5FB24B9054B4FF48012C3F87B +:1071A0000021204602B070BD0424F0E7089C0020B6 +:1071B00000E100E0204B21491A682F2300BF00BFE7 +:1071C00000BF00BF00BF00BF00BF00BF8A422FD07A +:1071D00000BF00BF00BF00BF00BF00BF00BF00BFB7 +:1071E00000BF00BF00BF00BF00BF00BF00BF00BFA7 +:1071F00000BF00BF00BF00BF00BF00BF00BF00BF97 +:1072000000BF00BF00BF00BF00BF00BF00BF00BF86 +:1072100000BF00BF00BF00BF00BF00BF00BF00BF76 +:1072200000BF00BF00BF00BF00BF00BF00BF00BF66 +:10723000013BC3D1704700BF388400200024F40014 +:107240000C4B0D484FF4003210B5C3F880200124D8 +:107250004FF48033C0F84833C0F808334460FFF778 +:10726000A9FF064B846000201860FFF7A3FF044BC2 +:10727000187010BD00E100E000100140249D0020C6 +:10728000159D00202DE9F3412549264B0025C1F825 +:107290004051C1F84451C1F84851C1F84C51C1F8AE +:1072A0000051C1F804511B68002B34D0D1F80445BB +:1072B0001D49DFF888800968641A24F07F442F464E +:1072C0001968A14212D81A7CDE69641A0D4462B1B1 +:1072D0005A691F7400929B690193424608216846CF +:1072E00000F056FA08B100F0E9FABEB90F4A104BA7 +:1072F00011781B788B4205D10133DBB2022B08BF1A +:107300000023137012780B4B43F822500A4B4FF4B2 +:107310008012C3F8002102B0BDE8F0813346CFE708 +:1073200000100140289D0020249D0020219D002068 +:10733000209D0020189D002000E100E04D710F000D +:107340002DE9F74FA84AA94913780978A84C994222 +:107350003BD00133DBB2022B08BF00231370A549D9 +:107360001278A54B0F6853F822003B1823F07F4397 +:1073700000220B60236815461646944613B942B1A5 +:10738000236006E0196881420DD902B12360091A11 +:10739000196001262368DFF8689200930027BDB9C1 +:1073A000DFF868A268E0401A0E44D968D3F81CE000 +:1073B000C3F800C031B1BA1922F07F42C3E90121FC +:1073C000DD611D4673460122D8E700252E46E1E720 +:1073D0002846ED69874BD0F804C01B68DFF830E21F +:1073E0008168ACEB030222F07F42724500F2AD806F +:1073F0000A4402600122027422680023C0E90133BA +:10740000C361002A40F0AB802060C8E75A1C9AF89C +:107410000210D4F800B0D2B291428AF8002004BF22 +:1074200000228AF80020182202FB03A31A79986828 +:10743000022A77D0032A00F08580012A1CD190F817 +:1074400010C0BCF1000F17D1D96841601A69826081 +:107450005A69C2609B698361684B1B78002B18BF17 +:1074600061464160B6E7904200F09E809046D26946 +:10747000002AF8D1002303749AF800309AF801200A +:107480009A42C3D1236827B9009A9A4201D1002EAB +:1074900042D0002B00F08580D3F80090584C554B1B +:1074A000D4F804651868574F351A3B7825F07F45A6 +:1074B00003359BB94FF48033C4F84433C4F8043324 +:1074C000514B4FF400324FF00108C3F880211A608D +:1074D000C4F80080FFF76EFE87F80080A9452CBF36 +:1074E0004844401920F07F40C4F84005D4F80435E2 +:1074F0009B1B23F07F43801B033320F07F4083429C +:107500000AD9D4F80435C4F84035FFF753FE3E4B92 +:107510004FF40032C3F80021384B00221A7003B038 +:10752000BDE8F08F5A46D846A2E78BF81020DBF86A +:107530001CB00123BBF1000FF7D1002B9CD0C4F885 +:1075400000B099E700231A46F4E7A3EB0C0323F0FD +:107550007F438B4234BFCB1A002303604AE70168A4 +:10756000136899421BD85B1A1360C2614CE7A1EB08 +:107570000C01D3F81CC01A46BCF1000F0AD06346B8 +:10758000D3F800C08C45F2D3ACEB010CC3F800C0BB +:107590009C4613460160C0F81CC0D861FFE6134644 +:1075A000EEE7FFF74DFEB7E7404510D1DBF81C30A2 +:1075B000236063B9DFF83CE001920121C9F80810AB +:1075C000CEF800300D4B1970FFF7F4FD019A1368E7 +:1075D000D269C8F81C2012B111680B4413602368EB +:1075E0005B4518BF012745E7209D0020219D002015 +:1075F000289D0020249D0020189D0020149D00201F +:1076000000100140159D002000E100E0089C0020D2 +:10761000FEFF7F0008B5FFF713FE104B00200B2282 +:1076200018809A700E4B18600E4B18700E4B187025 +:107630000E4B4FF48012E021C3F8802183F814131D +:107640001A6002F18042A2F56F22C2F8080583F8A1 +:107650001113074BD2F804251A6008BD089C0020BE +:10766000289D0020209D0020219D002000E100E0B9 +:10767000249D0020074B9B784BB132B128B10368A1 +:10768000187C20B959745A61704707207047082048 +:10769000704700BF089C00202DE9F743DFF8848085 +:1076A00098F8023005460E461746ABB3A0B304293E +:1076B00030D9436983B3437C0024012B0DF10700CB +:1076C0000CBF8946A1468DF8074000F005F90DF181 +:1076D0000600FFF725FDD8B1012303700F4B45606D +:1076E000D3F80435C0E90497C0E902369DF80630A6 +:1076F00088F801309DF8070000F012F924B9084B12 +:107700004FF48012C3F80021204603B0BDE8F08397 +:107710000424EFE70724F7E70824F5E70010014009 +:1077200000E100E0089C0020064A92783AB130B1AE +:10773000426922B1002202740221FFF713BD082022 +:10774000704700BF089C00204B1C30B5DB0004468E +:1077500012F003009BB20DD1074D2A601A44074B6B +:107760001A60074B1870074B1870074B1C80074BAB +:10777000198030BD0720FCE7349D0020309D00209B +:107780002C9D00203C9D0020389D00203A9D00202B +:107790002DE9F347DFF8C080B8F800308B42064689 +:1077A0000D4617464CD300240DF107008DF8074015 +:1077B00000F092F8244B254A25481B78008892F85F +:1077C00000C084455FFA8CF138BF4C1CDBB238BF77 +:1077D000E4B2A3422ED014781178CBB2884286BF8F +:1077E0000133DBB2002313709DF8070000F098F816 +:1077F0004FF6FF739C4225D0DFF86090D9F8002047 +:107800004FEAC40A42F8347002EBC403AEB1A5B12A +:10781000104BB8F800001B682A4604FB00303146C4 +:1078200003F0A4FDD9F80030534400209D8002B03D +:10783000BDE8F0874FF6FF74D6E700209880F6E7A2 +:107840000920F4E70420F2E73C9D00202C9D002055 +:107850003A9D0020309D0020389D0020349D00205E +:1078600070B5104C104D22782B789A4200D170BD23 +:107870000E480F4A2378126806880E4802EBC301AF +:10788000006852F83320898803FB060090470A49B4 +:1078900022780988D3B2914286BF0133DBB200233C +:1078A0002370E0E73C9D00202C9D0020389D0020A7 +:1078B000349D0020309D00203A9D00201FB50021FE +:1078C000CDE9021001AA44F20100ADF80410FCF762 +:1078D00066FF05B05DF804FB70B5EFF3108672B675 +:1078E0000C4A946801239CB993600B4B0B4DD3F861 +:1078F000801029401160C3F88050D3F88410516083 +:107900004FF0FF32C3F88420047006B962B670BD30 +:107910000370FAE7409D002000E100E0FC06FFBD97 +:1079200010B5084B9A685AB150B9EFF3108172B68E +:10793000054A1C6814605C685460986001B962B6BE +:1079400010BD00BF409D002000E100E003462AB1C9 +:1079500010881A4619448A4203D170474FF6FF70C7 +:10796000F7E712F8013B40BA80B25840C0F3031366 +:10797000584080EA0033580100F4FF509BB2584051 +:10798000E9E70000064B074A00201870064B1A6012 +:107990000822C3E90120C3E90300C3E905007047D9 +:1079A0004C9D0020509D002030B0002000207047EA +:1079B00030B5F9B1124B5C6800220A60E4B1B0F551 +:1079C000167F1BD8D868013C01305C60D8601C6809 +:1079D00018694FF4177505FB00440C60012101FA8A +:1079E00000F49969013000F00700214318619961A2 +:1079F000104630BD0E20FCE70420FAE70C20F8E723 +:107A000030B00020F0B51C498A689AB34D690E6801 +:107A1000AC1A04F0070423464FF4177707FB036CF6 +:107A2000604511D1012000FA03F58869684088613A +:107A300000204E68D1F818C04FF0010E73440025A5 +:107A4000164403F007030AE0013303F007039D42E5 +:107A5000E4D11020EDE74AB1013A1C4601250EFAA7 +:107A600004F414EA0C0FA6EB0207F4D00DB1C1E93F +:107A70000172F0BD0420FCE730B00020064A136913 +:107A80001268013B4FF4177103F0070301FB032356 +:107A9000C3F858020020704730B0002030B5C0B1A4 +:107AA000B9B10E4BDA68B2B1013ADA609A681C6873 +:107AB00001329A605A694FF4177505FB024404605D +:107AC0000132D4F85802086002F007025A6100201F +:107AD00030BD0E20FCE70420FAE700BF30B00020E4 +:107AE0003FB40C49086890B10B4B1C687CB10B4A41 +:107AF0001568CDE9025000238DF804300B60136047 +:107B000004AB13E90700234604B030BC184704B0A7 +:107B100030BC704754B0002058B0002064B0002042 +:107B2000DC2810B509D0DD2810D0C02816D1FFF709 +:107B3000D7FF0E4B0E4A1A6010BD0E4A0E4B196845 +:107B40001368581C1060C022CA54F2E7094A0A4B55 +:107B500019681368581C1060DB22F5E7064B054ACC +:107B6000196813685C1CC8541460E2E74484002060 +:107B7000917B0F0054B0002064B00020C02802BFE9 +:107B8000014B024A1A60704744840020917B0F0029 +:107B9000C02810B409D0DB280BD0094B094A19685A +:107BA00013685C1CC854146006E05DF8044BFFF7D2 +:107BB00097BF054B054A1A605DF8044B704700BF3C +:107BC00064B0002054B0002044840020217B0F00CA +:107BD00007B501228DF807000DF10701002002F022 +:107BE00085FD00280CBF0420002003B05DF804FBD5 +:107BF00010B5064A064C12682368D05CFFF7E8FF10 +:107C000010B923680133236010BD00BF68B00020A5 +:107C10005CB0002008B5C020FFF7DAFF28B9034B9D +:107C20001B6813B9024B034A1A6008BD5CB0002000 +:107C300048840020F17B0F0008B5DB20FFF7C8FF68 +:107C400010B9024B024A1A6008BD00BF48840020E8 +:107C5000557C0F0010B50C4A0C4C12682368D35C9D +:107C6000C02B03D0DB2B0DD0042010BDDC20FFF790 +:107C7000AFFF0028F9D12368054A01332360054B83 +:107C80001A60F2E7DD20F2E768B000205CB0002067 +:107C9000F17B0F00488400207FB5184C184D194E19 +:107CA000002002F0C3FC30B322689AB1296833681F +:107CB00099420FD2012201A9002002F0C3FC10B9A1 +:107CC0004FF0FF3001E09DF804000F4BC0B21B687D +:107CD0009847E5E70D4B1B686BB10292084A0221F9 +:107CE000126803928DF8041004AA12E9070004B088 +:107CF000BDE87040184704B070BD00BF64B00020FC +:107D000054B0002050B000204484002058B000201F +:107D1000014B18600020704758B00020034B1A78C0 +:107D20000AB901221A700020704700BF4CB0002031 +:107D3000014B0020187070474CB000202DE9F04F27 +:107D400085B0002851D02A4F3B78012B07D0022B59 +:107D500014BF08240424204605B0BDE8F08F254D4B +:107D6000DFF8A090244E254CDFF89C80DFF89CA023 +:107D7000DFF89CB0C9F8001000232B6002233060AC +:107D80003B70C4F800802A68D9F800309A4215D3B5 +:107D9000C4F80080FFF73EFF044608BB184B1B6881 +:107DA00001223A70E3B18DF80420326802922A6809 +:107DB000039204AA12E907009847CCE733682A68BF +:107DC0009A5CC02A03D02A689B5CDB2B04D1236811 +:107DD000534508BFC4F800B023689847042801D170 +:107DE0000024B8E71128CED1FAE71024B3E700BF8A +:107DF0004CB000205CB0002068B000204884002017 +:107E000058B0002060B00020157C0F00F17B0F00FF +:107E1000397C0F00054B064A1860064B1960064B6B +:107E200000201860054B1A60704700BF64B0002046 +:107E30007D7B0F0050B0002054B00020448400200F +:107E4000064B07481B68DB00DBB2002203705B4275 +:107E500042708270C3700421FFF770BF94B000209D +:107E60006CB0002070B52B4C2B4D02462378012BB3 +:107E700014D0022B21D0002B4BD1002A49D1274806 +:107E8000FFF752FC08B1FFF719FD254B1B68002BCB +:107E90003FD0244ABDE8704010781847012A38D1F5 +:107EA0002968214B06311868FFF748FF08B1FFF732 +:107EB00005FD022323700022D8E7022A16D0032AE8 +:107EC0000CD032BB194B15481A6041F67F21FFF7E1 +:107ED000E3FBF0B1BDE87040FFF7F0BC144A136853 +:107EE000013303F0070313600023E3E70F4A13682D +:107EF000052B0AD001331360074B19680A4BBDE804 +:107F0000704018680631FFF719BF064B01221A703E +:107F1000EAE770BDB8B00020ACB0002070B000201F +:107F2000A8B00020B0B00020C0B00020B4B0002045 +:107F300098B00020F0B585B004AB03E907009DF8C8 +:107F40000400032874D8DFE800F00802A3A601208B +:107F500005B0BDE8F040FFF785BF039E544C032EEB +:107F600040F28280029D6B7813F00F0265D00E2ADA +:107F70007AD1042E55D02A78500652D5110650D504 +:107F80001A44AB781A44EB781A4412F0FF0248D135 +:107F9000B71E39462846FFF7D9FCEB5B834240D138 +:107FA00044492A780B6802F00702D8B282422BD1EA +:107FB000013303F007030B60FFF742FF3E4B012242 +:107FC00030461A70FFF75AFD08B1FFF777FC3849C1 +:107FD0004FF41670FFF7ECFC002862D0042802D0A2 +:107FE0000020FFF76BFC35480521FFF713FF08B1B0 +:107FF000FFF764FC324B1B68002B56D04FF000009B +:1080000005B0BDE8F040184720684FF41671FFF73F +:1080100001FF08B1FFF752FC05B0BDE8F040FFF7E3 +:108020000FBF20684FF41671FFF7F4FE00283CD014 +:1080300005B0BDE8F040FFF741BC2978AA780B44B1 +:108040001344EA78134413F0FF030DD11D4A12685C +:108050000132C1F3C20102F00702914204D11A4A6F +:1080600003201370FFF7FEFE25681DB14FF4167153 +:108070002846D9E70E494FF41670FFF799FC60B116 +:10808000042802D02846FFF719FC0C480521CBE74D +:108090000A480521C8E70320CAE720684FF4167193 +:1080A000C2E720684FF416719FE705B0F0BD00BF2E +:1080B000BCB0002094B0002090B000209CB0002004 +:1080C000A4B0002098B00020B0B000200220FFF73C +:1080D000C9BE0000074B10B5044618600648FFF7FC +:1080E00017FE08B1FFF7EAFB002C0CBF0E200020A2 +:1080F00010BD00BFA4B00020357F0F00184A1948FA +:10810000002310B51360184A1360184A1360184A08 +:108110001370184A1370184B184A01211960184B34 +:108120001960184B1970FFF7A5FA08B1032010BDAC +:10813000FFF728FC0028FAD1FFF7F0FD0028F6D160 +:10814000114C4FF416702146FFF732FC0028EDD198 +:1081500020684FF41671BDE81040FFF75BBE00BF0A +:10816000C0B00020CCBB0F00ACB00020B4B00020E9 +:1081700090B00020B8B0002094B00020CD800F0057 +:1081800098B00020B0B00020BCB000200C4A08B568 +:10819000002313600B4A1360FFF708FC08B1FFF7D8 +:1081A0008DFBFFF7C5FD08B1FFF788FB0648FFF719 +:1081B000BBFA042802D10020FFF780FB002008BD95 +:1081C000A8B00020A4B0002070B0002037B50D4644 +:1081D000044698B191B10A4B19780022019259B125 +:1081E00001A91A70FFF75AFC019B063B2B802368FC +:1081F0000433236003B030BD0420FBE70E20F9E711 +:1082000090B000200438FFF7FDBB18DF7047000076 +:10821000F0B51D46154B87B018680F4659681B7A94 +:1082200003AC03C42370124B18685968114B0093B8 +:1082300001AC03C42046164603F042FA214602462A +:10824000384603F093F801A803F03AFA01A9024670 +:10825000304603F08BF8684603F032FA694602466E +:10826000284603F083F807B0F0BD00BFD0BB0F0075 +:10827000D9BB0F00312E30000120704710B51C46CD +:108280000B781E2B0AD000232022052102F07AFC55 +:108290004FF6FF70A04228BF204610BD0020F9E72E +:1082A000F8B5069F14460D463A46002118461E466C +:1082B000FCF772F87CB14FF0E023D3F8F03DDB0718 +:1082C00000D500BE4FF0FF300AE0284600F0F8F974 +:1082D000013504F50074BC4206EB0401F5D32046D9 +:1082E000F8BD0000F8B50A4F0D461E460024069B57 +:1082F0009C4206EB040101D32046F8BD3A462846CD +:1083000000F0B4FA0028F7D0013504F50074EEE768 +:10831000C4B0002030B5264D2A7A8DB09AB107AC92 +:108320001422002120460625FCF736F88DF81C5053 +:108330000B9B009394E80F00FCF7CAFF0620FCF7A4 +:10834000F7FC0DB030BD2B68002BFAD0194B197813 +:1083500019B105201A70FCF7EBFCD5E900329A42FE +:10836000EFD307AC142200212046FCF715F86B7AF6 +:10837000DBB106234FF420424FF474214FF4602008 +:108380008DF81C3002F0C0FF0028D1D0102200214F +:1083900003A8FCF701F84FF460224FF4205303A820 +:1083A000CDE90423FFF731FFC2E78DF81C30BFE7AA +:1083B000C4B000204C840020024B0B604FF40073CB +:1083C0001380704709010100012070470048704781 +:1083D000FA840020044B054A1878054B002814BF86 +:1083E00010461846704700BFE0B20020AF8400205E +:1083F0004D8400202DE9FF411E4B187020B11E4B0B +:108400002A229A720022DA721C4A1D4DDFF878C0C7 +:1084100017461C4BEE4603F110067446186859685F +:10842000F046A8E803000833B342C646F6D12B78DD +:1084300003F00F0310336B4413F8103CD373114B4C +:1084400018685968A646AEE803000833B34274467C +:10845000F6D115F8013B04A901EB1313654513F898 +:10846000103C9373A2F10202D3D100233B7404B0F9 +:10847000BDE8F081E0B20020FA84002064B300205F +:1084800060000010E1BB0F006800001010B570B96B +:10849000134B14481968022202F068FF01230133CC +:1084A000DBB211485B0043F44073038010BD052824 +:1084B00014D80B4B53F82040204603F001F9C3B207 +:1084C0001F2B28BF1F23084A2046E118884202F1CB +:1084D0000202E4D010F8014B1480F7E70020E5E732 +:1084E0000C850020E4B20020E2B200204DDF70478E +:1084F0004EDF70474FDF704750DF704712DF704725 +:1085000000F0C8BE002000F033BD00001FB5244BB2 +:10851000402283F8272300238DF807304FF440537F +:1085200004465A681F4B9A4227D10DF10700FFF706 +:10853000E5FF9DF8073003B30120FFF7D9FF0120C5 +:10854000FFF7D4FF0120FFF7D5FF02A8FFF7D4FF04 +:10855000029BDA0702D5002000F09CFE029B9B07DD +:1085600002D5022000F096FE2046FFF743FF00F000 +:1085700027F802F059FE04B010BD002301A88DF8C1 +:108580000430FCF721FC084B039303A8FCF744FCE0 +:10859000FCF748FC4FF08043D3F838340293D7E718 +:1085A00000E100E0DBE5B15101850F00012000F0A2 +:1085B00071BE0120FCF7BCBB0220FCF7B9BB000078 +:1085C0007FB52F492F4802F0E7FF4FF440532E4A62 +:1085D000596891424CD11A78102A46D9142A186940 +:1085E00044D95B69294CB3FBF4F50A2201A904FBC9 +:1085F000153403F021F92649224802F0CDFF01A9E4 +:10860000204802F0C9FF23491E4802F0C5FF0A2294 +:1086100001A9284603F010F901A91A4802F0BCFF8D +:108620001D49184802F0B8FF4FF47A760A2201A9D2 +:10863000B4FBF6F5284603F0FFF801A9114802F053 +:10864000ABFF15490F4802F0A7FF0A2201A906FB5C +:10865000154003F0F1F801A90A4802F09DFF0F4907 +:10866000084802F099FF04B070BD00200023B9E76C +:108670000B49044804B0BDE8704002F08DBF00BF54 +:10868000FFBB0F0024850020DBE5B15140420F0005 +:108690000CBC0F000ABC0F000EBC0F0019BC0F0071 +:1086A00010BC0F0010B503461C1A944200DB10BD2D +:1086B0000C781CB1013103F8014BF5E72024FAE7EF +:1086C0002DE9F3410C4605464FF400720021204687 +:1086D000FBF762FE6DB95E493E22204602F046FE7F +:1086E000552384F8FE31AA2384F8FF3102B0BDE897 +:1086F000F081B5F5017F2DD8691EB1F5817F24BFCA +:108700006FF4817805EB0801C9B10B02C1EBC151CF +:1087100003F5807004EB412440F693651A1FB2F50F +:10872000696F03F1010206D2AB4214BF91B24FF65A +:10873000FF7124F8131090421346EFD1D6E7F823C7 +:10874000237004F109022346FF2003F8010F93422E +:10875000FBD1DAE7B5F5027F3BD86FF4017C6544C5 +:108760003DB920463B490B22FFF79CFF2823E372CB +:10877000203439492E014FF0000801EB05256FF038 +:108780001907022EB2D80B2229462046FFF78AFF8E +:108790005923212269216374E3746376B31C84F83E +:1087A0000D80A773E1732274A27484F8148084F896 +:1087B0001580A775E17522766383E86830B102F011 +:1087C0007FFFE061013620341035DAE74FF4E9101D +:1087D000F7E7224B9D4289D86FF40277EA19012A04 +:1087E0000FD81D4B03EB0213D9680191084602F024 +:1087F00067FF01990246204602B0BDE8F04102F051 +:10880000B5BD6FF4FD76A9190902B1F5801FBFF45B +:108810006DAF134B236003F1144303F52C1303F6E0 +:10882000023363600F4BC4F8FC314FF46963A361FA +:108830004FF40053A5F20B254FF48072A3600A4B4E +:108840006561E1602261E36104F12000D4E700BFCB +:108850001CBC0F0047BC0F00D4BC0F000801010076 +:108860005546320A306FB10A29009A23F7B5654B95 +:1088700014460A689A420D4639D103F114434A68F6 +:1088800003F52C1303F602339A4230D1D1F8FC21C0 +:108890005D4B9A422BD18B6823F4FF5323F01E03C8 +:1088A0009B049B0CB3F5005F21D10B69B3F5807F6E +:1088B0001DD1C86810F0FF0619D1CB69534A934205 +:1088C00005D0534A934215D0524A93420FD1A0F596 +:1088D0008053B3F5692F07D201234FF4807205F15D +:1088E0002001FBF705FF22E0B0F5805F1FD34FF0BA +:1088F000FF3021E001276772CB68B3F1102F1DD143 +:1089000004223431684602F031FD042205F13801B9 +:108910000DEB020002F02AFD009BB3F5742F03D18A +:10892000019BB3F57E2F01D02772E0E7A772AB69F8 +:10893000002B37D14FF4007003B0F0BDA3F57422C3 +:10894000B2F5204F28D2E27A01F12007DAB9324A93 +:10895000934218D32B69B34215D90422B91968463A +:1089600002F004FD009BD02B14D10422311D0DEB2D +:108970000200394402F0FAFC264B019A9A424FF069 +:1089800001030DD1E372E8682A6901233946A0F595 +:10899000A030A6E70836DDE7B3F5805FC7D3012333 +:1089A0002372A4E72268934207D041F263018B420D +:1089B00000D80AB14FF0FF3323606B6941F26302C4 +:1089C0009342B7D803F0070204EBD303012191408F +:1089D0001A7B1142C8B204D16168024301311A7393 +:1089E0006160D4E900329A42A4D30120FBF762FE11 +:1089F000637A002B9ED0A37A002B9BD10123237294 +:108A000098E700BF5546320A306FB10A4028A5AD3D +:108A10003C8263D629009A2300D80F004FF0805380 +:108A2000D3F83001082802D1D3F8343123B9A0F1AA +:108A30000D0358425841704701207047094B0122ED +:108A400083F8D8200260BFF36F8FBFF34F8F064AC1 +:108A5000904202D0043A904202D1002283F8D820FA +:108A6000704700BF78B300205070024042DF70476B +:108A700043DF704744DF704712DF704710B5134B78 +:108A8000134A5B68C3F3080373B9EFF310835BB950 +:108A900010494B681B0607D58024C1F8844092F822 +:108AA000D8307BB14C60F8E792F8D83033B101464A +:108AB000BDE810400848012201F094B8BDE810401C +:108AC000FFF7BCBFFFF7BAFF4C6010BD00ED00E040 +:108AD00078B3002000E100E07D8A0F000D4B1822E2 +:108AE00002FB0033598A1A8A521A998A92B28A4230 +:108AF00028BF0A46D9681423434303F1804303F592 +:108B00001C33C3F80016C3F80426034B03EB8000A4 +:108B1000FFF7B4BF78B300200470024007B54FF4EC +:108B2000405300205A68084B9A420AD18DF807003A +:108B30000DF10700FFF7A0FF9DF80700003818BFF0 +:108B4000012003B05DF804FBDBE5B15107B5FFF789 +:108B5000E5FF58B1002301A80193FFF78BFF0198AF +:108B6000003818BF012003B05DF804FB4FF08043CC +:108B7000D3F80C0400F00110A0F101135842584141 +:108B8000F1E70000074BD3F8C024D10309D406490C +:108B90000648D1F8C010C3F8A017C3F8A427FFF700 +:108BA0006DBF70470070024078B3002048700240EB +:108BB0000828F0B402D1F0BCFFF7E4BF0F4D104A13 +:108BC000182141436E1800F59473695852F82340F8 +:108BD000F788B388DB1B9BB2A4B2A34228BF23460D +:108BE000142404FB0022C2F80017C2F80437054B16 +:108BF000F0BC03EB8000FFF741BF00BF78B300205B +:108C0000007002402870024070470000014B802233 +:108C10005A60704700E100E0024B8022C3F88420D4 +:108C2000704700BF00E100E0074BD3F80014D3F811 +:108C300000240A43C3F800240022C3F858214FF44B +:108C40008002C3F8042370470070024070B5887832 +:108C5000404D00F07F0318220C26C4095A4306FB3E +:108C600004228E882A44C6F30A061681CA7802F0C6 +:108C70000302012A29D00121374A01FA03F5D4B9A8 +:108C800003F10C06B140C2F80413D2F8141503F531 +:108C900094732943C2F8141542F823402E4BC3F8AD +:108CA000180540F48070C3F80C05BFF36F8FBFF355 +:108CB0004F8F012014E002339940C2F80413D2F818 +:108CC00010352B43C2F81035E8E7082B09D04FF0D8 +:108CD000E023D3F8F00D10F0010001D000BE002019 +:108CE00070BD1D4BDCB9B5F8D42012B18022C3F899 +:108CF0001C250022C3F85021D3F8002312F40012DF +:108D000008BFC3F85421144B4FF44012C3F8042396 +:108D1000D3F8142542F48072C3F81425BEE700226C +:108D2000C3F82C21B5F8C82012B18022C3F81C2545 +:108D3000094BD3F8002312F4001208BFC3F85421E2 +:108D4000064AC3F80423D3F8102542F48072C3F80E +:108D50001025A3E778B3002000700240000820002F +:108D60001D4B2DE9F041802201241C4DDFF8788055 +:108D7000C3F88420274604F10C03A21C07FA02F270 +:108D800007FA03F31343C5F80833A30003F1804344 +:108D900003F51C330026182202FB04805E60314676 +:108DA0009E620134FBF7F8FA082C4FF01802E2D16A +:108DB0000B4BC5F808330B48C5F81C6531466E628D +:108DC000AE64FBF7E9FA044BC5F814758022C5F8C8 +:108DD00010755A60BDE8F08100E100E000700240CB +:108DE0000008300038B4002078B30020F7B51F46E3 +:108DF00001F07F0018231F4CCD090E4643430C2180 +:108E000001FB053104EB010C62500022ACF8047048 +:108E1000ACF8062018B1F5B1FFF760FE18E017BBFB +:108E2000154BD3F88034C3F3C0139D421BD01348B5 +:108E3000FFF724FE124B5B68C3F30803003B18BF27 +:108E4000012300933A463B463146384600F0B5FED2 +:108E5000012003B0F0BD1C44A37A002BF8D0A5720A +:108E6000FFF7A6FEF4E7002DD6D10648FFF706FE71 +:108E7000EEE700BF78B3002000700240507002405F +:108E800000ED00E04C70024011F07F0008B507D102 +:108E90000D4B01225A65BFF36F8FBFF34F8F08BD93 +:108EA0000828F8D0084B41F48072C909C3F8182586 +:108EB000F1D1064B182202FB00339A7A002AEAD03D +:108EC0009972FFF775FEE6E70070024078B3002064 +:108ED00011F0770F12D00A4B41F48072C3F80C15D1 +:108EE000C3F80C25CA09C3F8181504BF01F594711D +:108EF00043F82120BFF36F8FBFF34F8F704700BF40 +:108F000000700240174B0122002110B5C3F8142550 +:108F1000C3F810250A468B0003F1804303F51C3388 +:108F2000013108295A609A62F5D10E4B0E4C5A62F3 +:108F30009A64C3F85821D3F80014D3F800240A43E4 +:108F4000C3F80024D3F80023C3F80823074AC3F862 +:108F500004230021DC222046FBF71EFA4023A382D3 +:108F6000238110BD0070024078B300200514C001B9 +:108F70002DE9F04FB24BB34AD3F80013002385B06C +:108F80001C4601201D4621FA03F6F6070BD552F8C0 +:108F9000236046B100FA03F6344342F82350BFF38E +:108FA0006F8FBFF34F8F0133192BECD1E20706D53A +:108FB000FFF7A8FF00210122084600F0D5FD14F4B8 +:108FC000006FA14D08D09E4BD3F8A8369BB2A5F8F0 +:108FD000D230012385F8D730A30221D5984ED6F898 +:108FE000143513F4807302D0FFF7CCFD0123D6F8BB +:108FF0001025D70540F1188195F8D7305BB1B5F849 +:10900000D2200023012185F8D73092B20091184672 +:10901000882100F0D2FD01220321002000F094FD00 +:10902000660228D5864BD3F8006406F4E062F005AA +:10903000C3F8002406D50122C3F82C250421002002 +:1090400000F082FD71050FD57D4B0122C3F8082584 +:109050009A65D3F8002312F4001208BFC3F8542114 +:109060004FF40012C3F80423B20504D501220521F0 +:10907000002000F069FD23022BD5714BD3F880143A +:10908000C9B28DF80810D3F88424D2B28DF8092023 +:10909000D3F888048DF80A00D3F88C048DF80B00FF +:1090A000D3F890048DF80C00D3F894048DF80D00DB +:1090B000D3F898048DF80E00D3F89C348DF80F3057 +:1090C0004F0601D1052A04D0012202A9002000F098 +:1090D0005EFD5E4B23405BB195F8D830002B40F02D +:1090E000AB804FF0E023D3F8F03DDE0700D500BEA3 +:1090F000DFF85481DFF84891DFF858B14746002681 +:109100004FF0140A06F10C0324FA03F3D807F1B266 +:1091100022D50AFB0693082ED3F808273B6853FA9A +:1091200082F33B604FF0180303FB0653D2B2D8889A +:1091300012FA80F080B2D88000F08E803889904298 +:1091400040F08A80DB88BA889BB29A4240F28480E1 +:1091500011B95846FFF792FC0136092E07F118079E +:10916000D0D13B4B2340002B5BD0354BD3F86C94D4 +:10917000C3F86C94BFF36F8FBFF34F8F14F4806408 +:1091800007D0D3F88044D3F880341906C4F3C01450 +:1091900070D54FF0000A2C4F00264FF0180B29FA1B +:1091A00006F3DA07F0B201D4CEB9C4B1244B1422CD +:1091B00002FB0633FA68D3F8083652FA83F2FA60F3 +:1091C0000BFB0652518A89B251FA83F39BB2538248 +:1091D000538A398A9BB299424FD9FFF77FFC0136F7 +:1091E000082E07F11807DAD100241826012704F108 +:1091F000100329FA03F3DB07E0B203D464B9BAF130 +:10920000000F09D006FB0452B8F80410D3889BB2B3 +:1092100099423DD9FFF7CCFC0134082C08F118081D +:10922000E5D105B0BDE8F08F002B7FF4F4AE4FF42C +:109230000013C6F80833EEE6002385F8D83057E768 +:10924000007002400071024078B30020FCFB1F0058 +:10925000000400014C700240182303FB0653DA8817 +:10926000BA80DA8801230093002392B2184600F0F6 +:10927000A4FC71E74FF0010A8DE7528A01230093A5 +:10928000002340F0800192B2184600F096FCA6E759 +:109290009772C1E7012813B5044600F0C380022885 +:1092A00059D0002855D1784BD3F80025002A50D149 +:1092B0004FF48002C3F808234FF40062C3F800247F +:1092C000BFF36F8FBFF34F8FFFF7A8FB60B16F4BFA +:1092D000D3F8001C032269BB49F27531C3F8001CA6 +:1092E000C3F8142DC3F8001C4FF08053D3F830316D +:1092F000082B0CD1654BD3F8001CC022E9B949F208 +:109300007531C3F8001CC3F8142CC3F8001C5E4B65 +:109310000124C3F80045BFF36F8FBFF34F8FFFF7F2 +:1093200015FCB0B9FFF7FAFB50B102B0BDE8104030 +:10933000FFF79CBBC3F8142DD6E7C3F8142CE6E75F +:109340004FF08043C3F80001D3F800210192019A45 +:109350001C6002B010BD4C4CD4F804351BB1FFF7B3 +:10936000F5FB0028F5D1D4F800341B05FBD54FF4EC +:109370000063C4F80034BFF36F8FBFF34F8F4FF01B +:109380008053D3F83031082B0CD1404BD3F8001C5C +:1093900000293FD149F27532C3F8002CC3F8141CE0 +:1093A000C3F8002CFFF73AFB58B1384BD3F8001C38 +:1093B000A1BB49F27532C3F8002CC3F8141DC3F8E1 +:1093C000002C4FF08053D3F83031082B2E4B0AD1AC +:1093D00040F2E372C3F800284022C3F80428BFF328 +:1093E0006F8FBFF34F8F80220121C3F81C25C3F874 +:1093F0000413274BC3F884215A60FFF7A7FB00280A +:10940000FBD0214B0122C3F80425BFF36F8FBFF3BC +:109410004F8F9EE70022C3F8142CC3E70022C3F845 +:10942000142DCEE7184BD3F80025002A91D0002246 +:10943000C3F80425BFF36F8FBFF34F8F144980200B +:10944000C1F88400D3F80013C3F80813C3F800254B +:10945000BFF36F8FBFF34F8FFFF760FB78B1FFF75C +:1094600007FB0C4B5A68C2F30802003A18BF0122EE +:109470000221002002B0BDE8104000F065BB4FF0B3 +:1094800080435C60EDE700BF0070024000E00640F2 +:1094900000E100E000ED00E00A44034690B288429B +:1094A00002D39A89824202D25A89104480B270470C +:1094B00082888A4210B504D884898B1A9BB29C4258 +:1094C00003D243891A44891A8BB2038210BD9308D0 +:1094D00013B501EB8303044699420BD112F003024A +:1094E00006D0002301A8019301F040FF019B2360F7 +:1094F00002B010BD51F8040B2060EDE72DE9F043F8 +:1095000085B01446BDF83050AB4238BF4289A3EB5A +:1095100005091FFA89F938BFA9EB0209828838BF0B +:109520001FFA89F94A4588460746194605D2FFF7CA +:10953000BFFF058AB0F80490ADB2B9F1000F1FD09B +:10954000A14528BFA146BC88AC421DD9FA889DF828 +:1095500034003968661BA9EB04042C44B3B214FB35 +:1095600002F416FB02F60128B6B2A4B202FB051102 +:1095700016D099450BD802FB09F2404601F0F6FEE1 +:10958000484605B0BDE8F0832D1BADB2DCE732469E +:10959000404601F0EBFE3968224608EB0600EDE795 +:1095A000994506D819FB02F292B24046FFF78FFFA9 +:1095B000E6E726F00305ADB22A4640460191FFF7E3 +:1095C00086FF16F0030628D001990D44C6F1040168 +:1095D00089B2A1424FF0000328BF2146641A0393C9 +:1095E00003ABA4B2A8191A4685420CD13B68013ED0 +:1095F000164419448B420BD1039BC8F80030002C51 +:10960000BED02246D1E715F801CB03F801CBEBE73A +:1096100013F8012B06F8012FECE73968EFE713B5D3 +:10962000930800EB8303984209D112F0030204D09F +:109630000B68019301A901F099FE02B010BD0C68FE +:1096400040F8044BEFE770B59A42A2EB03041D46C5 +:1096500038BF4389A4B238BFE41A838838BFA4B2A4 +:10966000A3420E46114602D2FFF722FF848874B14E +:109670008288AA4208D9C2880168304602FB0511D7 +:1096800001F074FE012070BDAD1AADB2F1E72046C5 +:10969000F9E72DE9F0430746B0F80E908588048A73 +:1096A0001646C288007A85B01FFA89F9A4B288BB31 +:1096B000A145A9EB040038BF7C8980B23CBF001BE8 +:1096C00080B2281A80B2864228BF06464C46AC4279 +:1096D00028D2A5EB0408751B386825441FFA88FCBE +:1096E00015FB02F518FB02F8012B1FFA88F8ADB242 +:1096F00002FB040022D0664517D8724301F036FE03 +:10970000324649463846FFF7C7FEF881304605B075 +:10971000BDE8F083AE4221BF761B02FB0611A146D5 +:109720002E46D3E7641BA4B2D1E74246009101F074 +:109730001DFE009938682A464144DFE7664505D892 +:1097400016FB02F292B2FFF76AFFD9E728F0030492 +:10975000A4B22246CDE90001FFF761FF18F003082B +:10976000019929D0C8F104039BB2AB4200980A6862 +:10977000039228BF2B46013CED1A0DF10C0C20443E +:10978000ADB244466246013C1CF801EB00F801EF23 +:1097900014F0FF04F7D13868904408EB0304421E2C +:1097A000A04504D11844002DAAD02A46CBE718F8CA +:1097B00001CB02F801CFF3E73868F4E7B2F5004FC8 +:1097C00010D882805200C38092B29DF8003003729C +:1097D000531E838152420023C38101604281038270 +:1097E0000120704700207047C189028A89B292B275 +:1097F0009142A1EB020338BF428980889BB23CBFF3 +:109800009B1A9BB2984228BF18467047C289038AA8 +:1098100092B29BB2D31A58425841704710B5C189D1 +:10982000028A848889B292B2914238BF4089A1EB02 +:1098300002039BB23CBF1B1A9BB2E01A80B210BD60 +:1098400038B5C289038A04469BB292B2FFF7FBFE89 +:10985000218A054682B289B22046FFF71DFE20828A +:10986000284638BD73B5C389058A0026ADB20446C3 +:10987000CDE900569BB2FFF741FE218A054602461C +:1098800089B22046FFF708FE2082284602B070BD4C +:1098900038B5C589028AADB292B2AA42A5EB0203DD +:1098A00088BF42899BB288BF9B1A828888BF9BB2BF +:1098B0009A42044614D1007A90B938BD9B1A9BB2E3 +:1098C0009342FBD2E288206802FB030001F04EFDC8 +:1098D000012229462046FFF7DFFDE0810120ECE769 +:1098E0002B46EDE712B10023FFF7D3BE10467047B9 +:1098F0000023C381038283885B009BB25A1E5B42B4 +:10990000828143810120704701720120704700006D +:109910000B4B63B10B4B1B78834206D90A4B1B6878 +:1099200000EB400003EBC0007047C01AC0B2012832 +:1099300003D8064B00EB4000F4E70020704700BF5F +:109940000000000058B4002054B4002004BD0F00F3 +:1099500070B5104E054600242046FFF7D9FF436836 +:109960002846984733780134E4B20133A342F3DA4E +:10997000372200210848FAF70FFD1022FF2107487F +:10998000FAF70AFDBDE8704005481222FF21FAF7F8 +:1099900003BD00BF58B4002059B400205CB40020BF +:1099A0006CB4002037B50C460546C868019200F03B +:1099B000A5FDE368019A0021284603B0BDE83040C8 +:1099C000184773B5054614463AB90378012B04D1FC +:1099D00010460191FFF720F90199281DFFF758FF64 +:1099E00006462CB92B78012B02D12046FFF70EF941 +:1099F00036B94FF0E023D3F8F03DDB0700D500BEC9 +:109A000002B070BD024B5878003818BF0120704773 +:109A100059B40020024B1878C0F38000704700BF93 +:109A200059B40020014B1878704700BF90B4002053 +:109A3000F8B5164E3178054629BB154C1548372226 +:109A4000FAF7AAFC201DFFF753FF134B1C60134BC2 +:109A500023B11348AFF30080124B1860104F00245D +:109A60002046FFF755FF036898473B780134E4B27E +:109A70000133A342F4DA2846FFF7C6F82846FFF779 +:109A8000C5F8012333700120F8BD00BF90B4002059 +:109A9000A486002059B4002094B4002000000000E7 +:109AA00058B4002054B400201FB54378023B0A4646 +:109AB000032B12D8DFE803F0022A1921204B197872 +:109AC0006FF300011970197800246FF341011970C8 +:109AD0005C70197864F3820119701A4B014618689A +:109AE00004B0BDE81040FFF76CBF154B1978C907EB +:109AF00023D5197841F00401EEE711490B78DC0712 +:109B00001BD50B786FF382030B70E6E70C490B78DB +:109B10005B0712D50B786FF382030B700023CDE93E +:109B20000133039303788DF8043005238DF8053055 +:109B3000044B01A91868FFF744FF04B010BD00BF33 +:109B400059B4002094B400201FB50023CDE901339F +:109B50008DF804008DF8051001A811460393FFF756 +:109B6000A3FF05B05DF804FB1FB50023CDE9013369 +:109B700003938DF8040001238DF8081001A8114605 +:109B80008DF80530FFF790FF05B05DF804FB1FB5B9 +:109B9000144600230822CDE9013303938DF8040015 +:109BA00006230DEB02008DF8053001F0DFFB2146A6 +:109BB00001A8FFF779FF04B010BD1FB50024CDE95F +:109BC00001448DF8040007208DF805008DF8081079 +:109BD00001A89DF8181003928DF80930FFF764FF73 +:109BE00004B010BD1FB54FF40063CDE901300391FF +:109BF00001A81146FFF758FF05B05DF804FB00000F +:109C000038B58B7803F07F03082B05460C4608D93E +:109C10004FF0E023D3F8F03DDB0700D500BE002075 +:109C200038BD064B2046997801F00DFB0028EFD097 +:109C300021462846BDE83840FFF708B859B400204F +:109C40002DE9F047DDE9085681460C4690469A46D4 +:109C50000027B84501DC01200EE06378052B04D114 +:109C6000E37803F0030353450AD04FF0E023D3F821 +:109C7000F03DDA0702D40020BDE8F08700BEFAE725 +:109C800021464846FFF7BCFF38B94FF0E023D3F830 +:109C9000F03DDB07EFD500BEEEE7A378DA0914BF8D +:109CA00033702B70237801371C44D2E70B4B01F043 +:109CB0007F0203EB420303EBD1112031487910F00E +:109CC000010008D14B795B0706D44B7943F00403BC +:109CD0004B71012070470020704700BF59B400202D +:109CE0000B4B01F07F0203EB420303EBD111203158 +:109CF0004B7913F0010209D14B79C3F380005B0764 +:109D000005D54B7962F382034B7170470020704791 +:109D100059B4002070B5164D01F07F0605EB4605DD +:109D200005EBD11420346579ED0709D54FF0E02318 +:109D3000D3F8F03DDA0701D4002070BD00BEFBE788 +:109D4000657945F001056571FFF750F80028F4D1F9 +:109D5000637960F300036371637960F38203637175 +:109D60004FF0E023D3F8F03DDB07E5D500BEE4E794 +:109D700059B40020054B01F07F0203EB420303EBD3 +:109D8000D11191F8250000F00100704759B400206E +:109D900010B50B4B01F07F0203EB420303EBD11430 +:109DA000203463799B0709D4FFF76EF8637943F099 +:109DB00002036371637943F00103637110BD00BF57 +:109DC00059B4002010B50B4B01F07F0203EB4203A6 +:109DD00003EBD114203463799B0709D5FFF778F89A +:109DE00063796FF34103637163796FF30003637108 +:109DF00010BD00BF59B40020054B01F07F0203EBFA +:109E0000420303EBD11191F82500C0F340007047E5 +:109E100059B400202DE9F04F87B001F012FA002864 +:109E200000F09182AF4B1D682B78012B02D10020EE +:109E3000FEF7F2FE03A9281DFFF702FD2B78012B88 +:109E4000044602D10020FEF7E1FE002C00F07B82E8 +:109E50009DF80D30013B072B00F2B382DFE813F0D1 +:109E600008001300A8027E028D021F004A02AA0207 +:109E70009DF80C00FFF76CFD00F038FB9A4B9DF845 +:109E800010209A70CEE79DF80C00FFF761FD00F0FE +:109E90002DFB964B002BC5D0FEF78EFBC2E7924CF4 +:109EA0009DF80C50237843F00103237094F825307B +:109EB0006FF3000384F8253094F825306FF38203A4 +:109EC00084F8253094F826306FF3000384F82630A8 +:109ED00094F826306FF3820384F82630002000F0D7 +:109EE0000DFB9DF8106006F06002602A11D14FF062 +:109EF000E023D3F8F03DDC0700D500BE9DF80C0050 +:109F00000021FEF7C1FF9DF80C008021FEF7BCFF89 +:109F100088E7402A0DD176480028EFD000F0EEFA0D +:109F200004AA00212846AFF3008000287FF47AAF0E +:109F3000E4E706F01F06012E00F07181022E00F00A +:109F40009881002ED3D1202A0FD19DF814300F2BE9 +:109F5000D4D82344D878FFF7DBFC01460028CDD0C5 +:109F600004AA2846FFF71EFDDFE7002ABFD19DF8AF +:109F70001130092BBBD801A252F823F009A20F001F +:109F8000F7A10F00EF9E0F00E3A10F00EF9E0F005F +:109F9000A59F0F0021A10F00EF9E0F00BF9F0F0094 +:109FA000D59F0F0004A800F0AFFA9DF812102846C4 +:109FB000FEF73AFE237843F00203237032E763781A +:109FC0008DF80A3001230DF10A0204A9284600F099 +:109FD00059FA27E79DF812906378994537D063784E +:109FE0003BB12846FEF7BCFEA6782846FFF7B0FC3A +:109FF000A670B9F1000F2AD009F1FF30C0B2FEF708 +:10A00000E9F910B14378022B08D04FF0E023D3F8E0 +:10A01000F03DDF077FF56BAF00BE68E7C379C3F3A0 +:10A020008012C3F340131B0143EA4213227822F04B +:10A030003002134323704388C31800F109060093CC +:10A04000009BB3420AD82B4B0BB1FEF7B2FA84F84F +:10A05000019004A9284600F003FAE3E673780B2B7D +:10A0600003BF337896F80380F6184FF00108737831 +:10A07000042BCAD1009B9A1B93B201934FF0000BA3 +:10A080001D4B1B785FFA8BF70133BB42BDDB3846B3 +:10A09000FFF73EFC31468368019A8246284698477E +:10A0A0000828024639D9019B834236D3B8F1010F03 +:10A0B00006D1DAF8083011498B4208BF4FF0020888 +:10A0C0000021CBB298451DD83B4631460C48019241 +:10A0D00001F0E9F8084B019A1B7801339F421644BE +:10A0E000AEDD92E794B4002059B40020B9850F008A +:10A0F00000000000B3850F0058B40020A9A70F008E +:10A100006CB40020B078034454FA83F30131D8785A +:10A11000FF287FF47AAFDF70D3E70BF1010BAFE7D5 +:10A12000BDF81200030A5A1EC0B20E2A3FF6E6AE70 +:10A1300001A151F822F000BF75A10F009FA10F00EF +:10A14000C1A10F00FD9E0F00FD9E0F00D5A10F00C5 +:10A150009FA10F00FD9E0F00FD9E0F00FD9E0F00B2 +:10A16000FD9E0F00FD9E0F00FD9E0F00FD9E0F0047 +:10A1700087A10F00FEF72AF91223024604A92846F8 +:10A1800000F080F9D1E6934B002B3FF4B7AEAFF36C +:10A190000080024600283FF4AAAE4388EEE7022B77 +:10A1A00007D1FEF717F900283FF4A1AE4388024615 +:10A1B000E4E7894B002B3FF4A1AEAFF30080F2E758 +:10A1C000BDF81410FEF762F9024600283FF496AE7F +:10A1D0000378D3E7814B002B3FF490AEAFF30080C0 +:10A1E000F2E7BDF81230012B7FF488AE237843F0FC +:10A1F000080323702DE7BDF81230012B7FF47EAEEB +:10A2000023786FF3C303F4E72378C3F340129B086A +:10A2100003F002031343ADF80A300223D3E69DF89E +:10A2200014300F2B3FF66AAE2344D878FFF770FB4B +:10A23000014600283FF462AE04AA2846FFF7B2FBAD +:10A2400000287FF4EFAD9DF8103013F060047FF428 +:10A2500055AE9DF811300A3B012B3FF64FAE00F092 +:10A260004DF99DF811300A2B7FF4F3AE8DF80A40BA +:10A27000A8E69DF8141001F07F03082B3FF637AED7 +:10A2800004EB430303EBD113D87CFFF741FB0746F4 +:10A290002AB100283FF432AE04AA014661E69DF8D7 +:10A2A000113003F0FD02012A08D0002B7FF41FAE0D +:10A2B0002846FFF7A1FDADF80A00AEE7BDF8122071 +:10A2C00022B9012B284612D1FFF77CFD002F3FF465 +:10A2D000A9AD04AA39462846FFF764FB002000F028 +:10A2E0000DF994F82630DE073FF59CADB1E6FFF797 +:10A2F0004FFDEBE79DF81010394B01F07F0403EBA5 +:10A30000440303EBD11393F825006FF3000083F8A7 +:10A31000250093F825006FF3820083F825003CB9EF +:10A32000059B9DF811209DF80C0000F0FBF879E5E5 +:10A33000D87CFFF7EDFA48B94FF0E023D3F8F03DB1 +:10A34000D80700D500BE07B0BDE8F08F0469059BB3 +:10A350009DF811209DF80C00A04763E5204B1A786A +:10A36000D1077FF55FAD1F4A002A3FF45BAD187837 +:10A37000C0F3C000AFF3008054E5194B1B78DA0737 +:10A380007FF550AD184B002B3FF44CADAFF3008080 +:10A3900048E5FFF7BDFA436913B19DF80C009847F3 +:10A3A0000134124B1B78E0B201338342F1DA39E514 +:10A3B0000024F6E7049B002B3FF434AD0598984742 +:10A3C00030E54FF0E023D3F8F03DDB077FF52AAD11 +:10A3D00000BE27E5000000000000000000000000B3 +:10A3E00059B40020000000000000000058B4002014 +:10A3F00037B514490446CA89888991F90050831AEF +:10A400009BB2402B28BF4023002D10DA904214D07D +:10A410001A4689680C48019300F0A8FF0A4A019B7C +:10A420008021204603B0BDE83040FFF773BC904266 +:10A430004FF0000103D10022F3E78021FBE7024A3D +:10A44000EFE700BF58B500206CB5002011F0800F79 +:10A450004FF000031A460CBF80211946FFF75ABC83 +:10A4600030B4074C05460B4608684968224603C2CB +:10A470000022C4E902222846197830BCFFF7E6BF63 +:10A4800058B50020F8B5184E0C46054608684968CE +:10A49000B260374603C70021F181E1888B4228BFB3 +:10A4A0000B46B381E18889B153B14AB94FF0E0233B +:10A4B000D3F8F03DDA0701D40020F8BD00BEFBE779 +:10A4C0002846FFF795FF30B10120F6E721782846AE +:10A4D000FFF7BCFFF7E74FF0E023D3F8F03DDB07D1 +:10A4E000EAD500BEE9E700BF58B5002002481422B3 +:10A4F0000021F9F751BF00BF58B50020014B18618A +:10A50000704700BF58B5002010B50246044C0068E3 +:10A510005168234603C30023C4E9023310BD00BFC2 +:10A5200058B5002070B52D4C1E462378C909B1EBF3 +:10A53000D31F054618D04EB14FF0E023D3F8F03DBD +:10A54000DA0701D4002070BD00BEFBE7244B13B135 +:10A550002146AFF3008023690BB90120F3E71F4ABE +:10A56000022128469847F8E794F90030002B06DBD3 +:10A57000A0680028E6D01B49324600F0F7FEA2682A +:10A58000E38932443344A260E2889BB29A42E38179 +:10A5900001D03F2E1ED823696BB921782846FFF7DA +:10A5A00055FF0028D9D14FF0E023D3F8F03DDB0769 +:10A5B000C8D500BEC7E70121084A2846984701468A +:10A5C0000028EAD12846FEF75FFC80212846FEF7E6 +:10A5D0005BFCC2E72846FFF70BFFE2E758B5002017 +:10A5E000000000006CB5002070B500F110050446B5 +:10A5F0002846FFF713F93F2817D9E1780020FFF725 +:10A6000055FB90B12846FFF709F93F28E17807D9B3 +:10A6100004F638024023BDE870400020FFF77ABB03 +:10A62000BDE870400020FFF75BBB70BD08B5044B70 +:10A6300040F6B80202FB00301030FFF7D5F808BD35 +:10A64000ACB5002070B540F6B804074E444304F1A1 +:10A65000100092B23044FFF705F905463019FFF7B4 +:10A66000C3FF284670BD00BFACB500202DE9F04106 +:10A670000446FFF7C7F910B90020BDE8F081FFF7E5 +:10A68000C9F906460028F7D140F6B801164D4C43EB +:10A6900004F12408A8444046FFF7A6F80028EBD0B0 +:10A6A0002F193046B978FFF701FB0028E4D004F6F3 +:10A6B00078042544294640224046FFF7D3F8B9786C +:10A6C000044668B103462A463046FFF723FB48B9E3 +:10A6D0004FF0E023D3F8F03DDB07CDD500BECCE74B +:10A6E000FFF7FEFA2046C8E7ACB5002070B50B4C6A +:10A6F00040F6B80303FB0044243492B205462046DA +:10A70000FFF7F0F806462046FFF76EF83F2802D91B +:10A710002846FFF7ABFF304670BD00BFACB5002048 +:10A7200037B5144C40F6B80200212046F9F734FE44 +:10A73000FF234FF4424201256371E2800023082287 +:10A7400063812273009304F138012B464FF4806239 +:10A7500004F110002581FFF731F800952B464FF4E6 +:10A76000806204F5876104F12400FFF727F803B045 +:10A7700030BD00BFACB5002010B50A4C0021052249 +:10A780002046F9F709FE04F110002434FFF7B0F871 +:10A790002046FFF7ADF820460121BDE81040FFF745 +:10A7A000B3B800BFACB50020F7B54B79022B064615 +:10A7B00003D00025284603B0F0BD8B79022BF8D1D9 +:10A7C000204FBB787BBB8B783B700C7809250C4401 +:10A7D00003E023781D44ADB21C446378242B1BD1C5 +:10A7E0009542F6D96378042B12D163790A2B0FD1E5 +:10A7F000154B277801930133009302231A46E11980 +:10A800003046FFF71DFA70B10E3517FA85F5ADB277 +:10A810000C48FFF7E9FECDE7052BE3D12146304692 +:10A82000FFF7EEF938B94FF0E023D3F8F03DDB073E +:10A83000BFD500BEBDE7A3787B7023781D44ADB2C1 +:10A840001C44CFE7ACB50020AEB5002070B50B4678 +:10A850001146127802F06002202A45D1234E8A88E0 +:10A860003478944240D14A78203A032A3CD8DFE831 +:10A8700002F00213162F2BB91D4A0723FFF702FE21 +:10A88000012070BD022BFBD11A4B002BF8D01849C8 +:10A890000020AFF30080F3E7002BF1D1ECE713B910 +:10A8A000FFF7DEFDECE7022BEAD14C881248347149 +:10A8B00004F0010585F00101FFF726F80F4B002B8E +:10A8C000DED0C4F3400229460020AFF30080D7E772 +:10A8D000002BE5D0022BD3D1094B002BD0D04988D7 +:10A8E0000020AFF30080CBE70020CAE7ACB5002022 +:10A8F000B2B5002000000000D0B50020000000002C +:10A90000000000002DE9F347374D1C46EB788B42E1 +:10A9100007460E4607D0AB788B4258D1AB78B3428E +:10A9200032D001245CE0A2B205F6380105F1100036 +:10A93000FEF7D8FF2D4B2BB92D4BEBB92A48FFF76B +:10A9400053FEEBE76B79FF2BF6D005F638094FF095 +:10A95000000805F1100AA045EED019F8013B6A790C +:10A960009A4206D15046FEF751FF10B96979AFF30C +:10A97000008008F10108EEE71E48FEF747FF0028B7 +:10A98000DCD1FDF789F9D9E71B4B13B10020AFF3F8 +:10A9900000800020FFF76AFE0028C2D11748FEF7AA +:10A9A00023FF0028BDD1002CBBD014F03F03B8D149 +:10A9B000A97801933846FFF779F9019B04460028EE +:10A9C000AFD0A9781A463846FFF7A4F908E04FF04F +:10A9D000E023D3F8F04D14F0010401D000BE0024B0 +:10A9E000204602B0BDE8F087ACB5002000000000B2 +:10A9F000997C0F00BCB5002000000000D0B50020FD +:10AA000030B4104B02249A6B83F82C10996883F8A9 +:10AA1000304093F83C408A1A9A6224B942F2050504 +:10AA20009D8783F83E4051B14AB11A7BD20930BCB0 +:10AA300014BF93F82E1093F82F10FFF7A9B930BC6C +:10AA4000704700BF64CE002038B5154B154C054645 +:10AA500073B1607BAFF3008050B942F2077384F8A2 +:10AA60003E00A38728460121BDE83840FFF7C8BF54 +:10AA7000A26BA36894F82F109B1AB3F5805F28BFD0 +:10AA80004FF48053084A9BB22846FFF743F930B988 +:10AA90004FF0E023D3F8F03DDB0700D500BE38BD12 +:10AAA0000000000064CE002064BE002073B5234C7B +:10AAB000E28AA36852BA92B2054612B1B3FBF2F22F +:10AAC00092B2A06BD4F81110B0FBF2F61B1AB3F5DA +:10AAD000805F28BF4FF4805309BA009302FB16022F +:10AAE000174B607B3144FDF7DBFB031E0CDA43F2AE +:10AAF0000333A38701210023284684F83E3002B0A7 +:10AB0000BDE87040FFF77CBF94F82E1006D100938B +:10AB10001A462846FFF751F802B070BD084A9BB2AA +:10AB20002846FFF7F7F80028F6D14FF0E023D3F8D6 +:10AB3000F03DDB07F0D500BEEEE700BF64CE00209D +:10AB400064BE0020C28A836852BA92B223B9002A36 +:10AB50000CBF002002207047C17B282904D1017B53 +:10AB6000C90906D1022070472A2902D1017BC909EF +:10AB7000F8D122B1934234BF022000207047012057 +:10AB800070470000044880F83C1080F83D2080F8B1 +:10AB90003E300120704700BF64CE002002484022B2 +:10ABA0000021F9F7F9BB00BF64CE00200248402223 +:10ABB0000021F9F7F1BB00BF64CE002073B54B79DB +:10ABC000082B054602D0002002B070BD8B79062B01 +:10ABD000F9D1CB79502BF6D1162A07D84FF0E023C4 +:10ABE000D3F8F03DD907EED500BEECE7164C8B78D4 +:10ABF00084F82D3004F12E030E78019304F12F0315 +:10AC0000009302231A463144FFF71AF838B94FF07F +:10AC1000E023D3F8F03DDA07D5D500BED4E7002312 +:10AC200084F8303094F82F101F2322462846FFF76F +:10AC300071F830B94FF0E023D3F8F03DDB0700D5D1 +:10AC400000BE1720C0E700BF64CE00207FB50646D7 +:10AC50001546A1B9137803F07F02022A48D16C7817 +:10AC6000012C45D16A88002A42D1AB883C4D95F829 +:10AC70003020042ADBB204D11946FFF789F80120FD +:10AC80001AE095F82E10994218D1022AF7D1AA6B32 +:10AC9000AB689B1AAB62032385F8303005F12002C4 +:10ACA0000D23FFF737F80028E9D14FF0E023D3F860 +:10ACB000F03DDB0752D500BE04B070BD95F82F10F3 +:10ACC0009942DCD1002ADAD10191FFF753F80199BA +:10ACD0000028D4D13046FFF78FF80028CFD10023C9 +:10ACE00085F830301E4A95F82F101F233046D8E7DC +:10ACF00003F06003202B31D16B78FE2B13D0FF2B98 +:10AD00002CD16B8853BBE9888AB23ABB144B3046CE +:10AD100099872946C3E90D2283F8302083F83E2025 +:10AD2000FFF79EFBABE76B88C3B9EB88012B15D10E +:10AD30008DF80F300B4B1BB1AFF300808DF80F0077 +:10AD40009DF80F3053B1013B8DF80F300DF10F021C +:10AD5000012329463046FFF795FB90E70020ABE73B +:10AD600064CE0020000000002DE9F041AB4C94F8C7 +:10AD70003070012F90B005461E4600F0A181032FD0 +:10AD800000F00D82002F41D194F82F308B4201D07A +:10AD9000012013E01F2E03D12268A14B9A4210D04C +:10ADA00094F82E100423284684F83030FEF7F0FF84 +:10ADB00094F82F102846FEF7EBFF002010B0BDE8F6 +:10ADC000F081984B23626368E67BD4F8088084F8AE +:10ADD0002C70C4E90937012384F8303006F0FD03F4 +:10ADE000282BC4E90D872BD12046FFF7ABFE014687 +:10ADF00018B12846FFF704FE08E0B8F1000F56D05E +:10AE0000282E40F0A8812846FFF750FE94F83030F5 +:10AE1000022BBDD194F82E102846FEF7EDFF002836 +:10AE2000B6D1A368A26B94F82E10934240F2E08151 +:10AE3000207BC00900F0DC812846FEF7A9FFA7E7C8 +:10AE4000B8F1000F17D0237BDB0914D1B8F5805F70 +:10AE500001D90121CDE7744A1FFA88F32846FEF78D +:10AE600059FF0028D2D14FF0E023D3F8F03DDA07A4 +:10AE7000A3D500BEA2E7252E677B08D8192E1AD8C5 +:10AE8000032E00F0F780122E00F09F8096B394F806 +:10AE90003C30002BDDD1A38E634A6449607BFDF713 +:10AEA000EDF9031ED5DB60D1A368002BD1D10223BD +:10AEB00084F83030AAE71A3E0B2EE8D801A353F8E5 +:10AEC00026F000BF35B00F0015AF0F008FAE0F009A +:10AED0008FAE0F008FAE0F008FAE0F008FAE0F0042 +:10AEE0008FAE0F008FAE0F0085AF0F008FAE0F003B +:10AEF0002FAF0F003846FDF7BFF90028D4D194F8E2 +:10AF00003C30002BC3D140F20243A387002384F8D6 +:10AF10003E30BCE7464B002BC6D0E17C3846C1F33F +:10AF2000400301F001020909FDF74EFAE5E70DF1D2 +:10AF3000160206A93846FDF73FFA069B13B1BDF885 +:10AF400016203AB994F83C30002BA0D140F20242CE +:10AF5000A287DCE712BA013B1BBA0892324807937A +:10AF6000082207A900F002FA0823A06800283FF48D +:10AF700070AF834228BF034663632B4A94F82E10B8 +:10AF80009BB26BE70023CDE90733099308238DF8C3 +:10AF90001F300DF11602022306A938468DF8243021 +:10AFA000FDF70AFA069A002ACCD0BDF81630002B1D +:10AFB000C8D012BA5BBA08921B48ADF826300C22F2 +:10AFC00007A900F0D3F90C23CFE72422002107A81A +:10AFD000F9F7E2F980238DF81D30082202232021A1 +:10AFE00009A88DF81E308DF81F30F9F7D5F9102219 +:10AFF00020210BA8F9F7D0F9042220210FA8F9F796 +:10B00000CBF90FAB0BAA09A93846FDF701F90648A1 +:10B01000242207A900F0AAF92423A6E764CE002081 +:10B02000555342435553425364BE002073CE002013 +:10B03000C9830F0003238DF81C3000238DF81D30C9 +:10B040008DF81E308DF81F30704B8BB13846AFF342 +:10B0500000809DF81E3080F0010060F3C7130422C9 +:10B060006B488DF81E3007A900F080F904237CE7B7 +:10B070000120EEE71222002107A8F9F78DF9F0234D +:10B0800094F83C208DF81C300A238DF823304FF0C3 +:10B09000000362F303038DF81E3094F83D308DF801 +:10B0A00028305B4894F83E308DF82930122207A9E9 +:10B0B00000F05CF90023A38784F83E30122354E7A4 +:10B0C000E37BA06B282B06D1636B30449842A063CE +:10B0D000BFF4EDAE97E62A2B41D1E28A52BA92B282 +:10B0E0001AB1A368B3FBF2F292B2D4F81110484F30 +:10B0F000B0FBF2FC09BA02FB1C020096607B3B46E7 +:10B100006144FDF7EFF8002809DAA36B3344A36329 +:10B1100043F20333A387002384F83E3099E6864246 +:10B1200012D9321A40B1A36B03920344391838463E +:10B13000A36300F0B5F9039A94F82F10002300934D +:10B140002846FEF73AFD61E6A36B1E44636BA663D7 +:10B150009E42BFF4ACAE2846FFF776FC56E6237B52 +:10B160003044DB09A0630CD1A38E294A607B04F133 +:10B170000F01FDF783F8002803DA39462846FFF768 +:10B180003FFCD4E90D329A42BFF491AE4FF0E02378 +:10B19000D3F8F03DDB077FF539AE00BE36E694F814 +:10B1A0002E308B427FF432AE0D2E7FF42FAEE37B38 +:10B1B000282B09D02A2B14D0164B53B1607B04F1F5 +:10B1C0000F01AFF3008004E0134B13B1607BAFF3CA +:10B1D0000080002384F83030104A94F82F101F2389 +:10B1E0003CE60F4B002BF4D0607BFDF793F8F0E7C3 +:10B1F0009B1AA362032384F830300A4A0D232846A1 +:10B20000FEF788FD00287FF4C3AD2CE600000000A7 +:10B2100064BE0020000000000000000064CE00209A +:10B2200015830F0084CE002008B50020FEF700FC37 +:10B2300030B94FF0E023D3F8F03DDB0700D500BE76 +:10B2400008BDFEF7EFBB8388C07800F0030002283A +:10B25000C3F30A0315D003281DD001280FD10229FA +:10B2600040F2FF3208BF4FF480629A420FD24FF093 +:10B27000E023D3F8F00D10F0010008D000BE00204C +:10B280007047022904D1B3F5007FF0D10120704747 +:10B29000402BFBD9EBE702290CBF4FF48062402220 +:10B2A0009A42F3D2E3E730B50A44914200D330BD6D +:10B2B0004C78052C06D18C7804F07F0500EB450511 +:10B2C000E4092B550C782144EFE700000649074AB2 +:10B2D000074B9B1A03DD043BC858D050FBDCF9F741 +:10B2E00063FEF8F7D5FF000068BD0F000080002066 +:10B2F000C8860020FEE7FEE7FEE7FEE7FEE7FEE782 +:10B30000FEE7FEE7FEE7FEE7032A70B515D940EA3F +:10B31000010C1CF0030F04460B4621D119462046B0 +:10B320000E680568B54204F1040403F1040317D163 +:10B33000043A032A20461946F0D8541EA2B100F15F +:10B34000FF3C013901E0C3180CD01CF801EF11F8E3 +:10B35000012F9645A4EB0C03F5D0AEEB020070BDB7 +:10B36000541EECE7184670BD104670BD844641EA95 +:10B37000000313F003036DD1403A41D351F8043B6D +:10B3800040F8043B51F8043B40F8043B51F8043BBF +:10B3900040F8043B51F8043B40F8043B51F8043BAF +:10B3A00040F8043B51F8043B40F8043B51F8043B9F +:10B3B00040F8043B51F8043B40F8043B51F8043B8F +:10B3C00040F8043B51F8043B40F8043B51F8043B7F +:10B3D00040F8043B51F8043B40F8043B51F8043B6F +:10B3E00040F8043B51F8043B40F8043B51F8043B5F +:10B3F00040F8043B51F8043B40F8043B403ABDD2CE +:10B40000303211D351F8043B40F8043B51F8043B6F +:10B4100040F8043B51F8043B40F8043B51F8043B2E +:10B4200040F8043B103AEDD20C3205D351F8043BFE +:10B4300040F8043B043AF9D2043208D0D2071CBFCA +:10B4400011F8013B00F8013B01D30B8803806046F3 +:10B45000704700BF082A13D38B078DD010F0030369 +:10B460008AD0C3F10403D21ADB071CBF11F8013BD9 +:10B4700000F8013B80D331F8023B20F8023B7BE728 +:10B48000043AD9D3013A11F8013B00F8013BF9D253 +:10B490000B7803704B7843708B78837060467047ED +:10B4A00088420DD98B1883420AD900EB020CBAB13D +:10B4B000624613F801CD02F801CD9942F9D17047E7 +:10B4C0000F2A0ED8034602F1FF3C4AB10CF1010CE1 +:10B4D000013B8C4411F8012B03F8012F6145F9D190 +:10B4E000704740EA01039B0750D1A2F1100370B5E9 +:10B4F00001F1200C23F00F0501F1100E00F11004F2 +:10B50000AC441B095EF8105C44F8105C5EF80C5CFF +:10B5100044F80C5C5EF8085C44F8085C5EF8045C77 +:10B5200044F8045C0EF1100EE64504F11004E9D174 +:10B53000013312F00C0F01EB031102F00F0400EBCA +:10B54000031327D0043C24F003064FEA940C1E4456 +:10B550001C1F8E465EF8045B44F8045FB442F9D1C8 +:10B560000CF1010402F0030203EB840301EB8401FC +:10B5700002F1FF3C4AB10CF1010C013B8C4411F883 +:10B58000012B03F8012F6145F9D170BD02F1FF3C99 +:10B5900003469BE72246EBE7830710B5044610D12C +:10B5A0000268A2F1013323EA020313F0803F08D1BD +:10B5B00050F8042FA2F1013323EA020313F0803F75 +:10B5C000F6D003781BB110F8013F002BFBD100F03F +:10B5D00003F8204610BD00BF80EA0102844612F045 +:10B5E000030F4FD111F0030F32D14DF8044D11F07C +:10B5F000040F51F8043B0BD0A3F101329A4312F02F +:10B60000803F04BF4CF8043B51F8043B16D100BF07 +:10B6100051F8044BA3F101329A4312F0803FA4F198 +:10B6200001320BD14CF8043BA24312F0803F04BF1F +:10B6300051F8043B4CF8044BEAD023460CF8013B8C +:10B6400013F0FF0F4FEA3323F8D15DF8044B704736 +:10B6500011F0010F06D011F8012B0CF8012B002A74 +:10B6600008BF704711F0020FBFD031F8022B12F063 +:10B67000FF0F16BF2CF8022B8CF8002012F47F4F1E +:10B68000B3D1704711F8012B0CF8012B002AF9D126 +:10B69000704700BF00000000000000000000000034 +:10B6A000000000000000000000000000000000009A +:10B6B000000000000000000000000000000000008A +:10B6C00090F800F06DE9024520F007016FF0000CE2 +:10B6D00010F0070491F820F040F049804FF000048A +:10B6E0006FF00700D1E9002391F840F000F1080065 +:10B6F00082FA4CF2A4FA8CF283FA4CF3A2FA8CF39D +:10B700004BBBD1E9022382FA4CF200F10800A4FA03 +:10B710008CF283FA4CF3A2FA8CF3E3B9D1E9042357 +:10B7200082FA4CF200F10800A4FA8CF283FA4CF38E +:10B73000A2FA8CF37BB9D1E9062301F1200182FA48 +:10B740004CF200F10800A4FA8CF283FA4CF3A2FA4E +:10B750008CF3002BC6D0002A04BF04301A4612BA5C +:10B76000B2FA82F2FDE8024500EBD2007047D1E95F +:10B77000002304F00305C4F100004FEAC50514F0EE +:10B78000040F91F840F00CFA05F562EA05021CBFBF +:10B7900063EA050362464FF00004A9E7F0B5254FC0 +:10B7A000A2F1020E164605460C460FCF8BB0EC46B2 +:10B7B000ACE80F000FCFACE80F0097E803004CF89F +:10B7C000040BBEF1220F8CF800102ED804F1FF3EBE +:10B7D00070464FF0000CB5FBF6F206FB125328330F +:10B7E0006B44614613F828CC00F801CF2B469E42EB +:10B7F00001F1010C1546EED9002304F80C3089B193 +:10B80000A44472461EF8010F1CF8015D8EF800502A +:10B810006FEA0E0302322344121B0B449A428CF847 +:10B820000000EEDB20460BB0F0BD002020700BB016 +:10B83000F0BD00BF34BD0F00FFF7B0BF53B94AB928 +:10B84000002908BF00281CBF4FF0FF314FF0FF3028 +:10B8500000F074B9ADF1080C6DE904CE00F006F803 +:10B86000DDF804E0DDE9022304B070472DE9F0477C +:10B87000089D04468E46002B4DD18A42944669D9D4 +:10B88000B2FA82F252B101FA02F3C2F1200120FAB7 +:10B8900001F10CFA02FC41EA030E94404FEA1C4805 +:10B8A000210CBEFBF8F61FFA8CF708FB16E341EA01 +:10B8B000034306FB07F199420AD91CEB030306F187 +:10B8C000FF3080F01F81994240F21C81023E6344A8 +:10B8D0005B1AA4B2B3FBF8F008FB103344EA03444C +:10B8E00000FB07F7A7420AD91CEB040400F1FF3361 +:10B8F00080F00A81A74240F207816444023840EA9E +:10B900000640E41B00261DB1D4400023C5E90043D6 +:10B910003146BDE8F0878B4209D9002D00F0EF8059 +:10B920000026C5E9000130463146BDE8F087B3FA8C +:10B9300083F6002E4AD18B4202D3824200F2F98074 +:10B94000841A61EB030301209E46002DE0D0C5E977 +:10B95000004EDDE702B9FFDEB2FA82F2002A40F0C3 +:10B960009280A1EB0C014FEA1C471FFA8CFE0126C6 +:10B97000200CB1FBF7F307FB131140EA01410EFB6A +:10B9800003F0884208D91CEB010103F1FF3802D211 +:10B99000884200F2CB804346091AA4B2B1FBF7F00B +:10B9A00007FB101144EA01440EFB00FEA64508D92E +:10B9B0001CEB040400F1FF3102D2A64500F2BB806B +:10B9C0000846A4EB0E0440EA03409CE7C6F12007BA +:10B9D000B34022FA07FC4CEA030C20FA07F401FA00 +:10B9E00006F31C43F9404FEA1C4900FA06F3B1FB89 +:10B9F000F9F8200C1FFA8CFE09FB181140EA0141EE +:10BA000008FB0EF0884202FA06F20BD91CEB01018A +:10BA100008F1FF3A80F08880884240F28580A8F1E2 +:10BA200002086144091AA4B2B1FBF9F009FB101134 +:10BA300044EA014100FB0EFE8E4508D91CEB0101D2 +:10BA400000F1FF346CD28E456AD90238614440EA75 +:10BA50000840A0FB0294A1EB0E01A142C846A646F5 +:10BA600056D353D05DB1B3EB080261EB0E0101FA7E +:10BA700007F722FA06F3F1401F43C5E900710026DB +:10BA80003146BDE8F087C2F12003D8400CFA02FC31 +:10BA900021FA03F3914001434FEA1C471FFA8CFE41 +:10BAA000B3FBF7F007FB10360B0C43EA064300FB31 +:10BAB0000EF69E4204FA02F408D91CEB030300F1CF +:10BAC000FF382FD29E422DD9023863449B1B89B286 +:10BAD000B3FBF7F607FB163341EA034106FB0EF30F +:10BAE0008B4208D91CEB010106F1FF3816D28B42BC +:10BAF00014D9023E6144C91A46EA004638E72E4688 +:10BB0000284605E70646E3E61846F8E64B45A9D27F +:10BB1000B9EB020864EB0C0E0138A3E74646EAE7EE +:10BB2000204694E74046D1E7D0467BE7023B61449C +:10BB300032E7304609E76444023842E7704700BF05 +:10BB4000F8B500BFF8BC08BC9E467047F8B500BF0A +:10BB5000F8BC08BC9E467047088000200010020018 +:10BB60000338FDD87047000000000000000000000E +:10BB70000338FDD87047010000000000089900203C +:10BB80000338FDD87047416461444655004D6573E4 +:10BB90006874617374696300302E392E32207331FA +:10BBA000343020372E332E3000000000000000001B +:10BBB00000000000000000000023D1BCEA5F7823F1 +:10BBC00015DEEF12120000000000000070B000202F +:10BBD0004164616672756974006E52462055463242 +:10BBE00000303132333435363738394142434445F9 +:10BBF00046006E52462053657269616C0009045319 +:10BC00006F66744465766963653A200053002E00C0 +:10BC10006E6F7420666F756E640D0A00EB3C905574 +:10BC20004632205546322000020101000240000049 +:10BC300000F80201010001000000000009010100FC +:10BC4000800029420042004D455348544153544915 +:10BC5000430046415431362020203C21646F6374F8 +:10BC60007970652068746D6C3E0A3C68746D6C3E3A +:10BC70003C626F64793E3C7363726970743E0A6C17 +:10BC80006F636174696F6E2E7265706C6163652895 +:10BC90002268747470733A2F2F6275796D656163D1 +:10BCA0006F666665652E636F6D2F6D61726B2E62B8 +:10BCB0006972737322293B0A3C2F73637269707433 +:10BCC0003E3C2F626F64793E3C2F68746D6C3E0A77 +:10BCD00000000000494E464F5F554632545854000C +:10BCE00024850020494E44455820202048544D00CA +:10BCF0005ABC0F0043555252454E5420554632000F +:10BD00000000000021A70F0079A70F00A9A70F00CE +:10BD10004DA80F0005A90F00000000009DAB0F000B +:10BD2000ADAB0F00BDAB0F004DAC0F0069AD0F0008 +:10BD30000000000030313233343536373839616233 +:10BD4000636465666768696A6B6C6D6E6F7071724B +:10BD5000737475767778797A00000000000000002F +:10BD60002885FF7F010000000880002000000000FF +:10BD700000000000F48200205C830020C4830020C7 +:10BD800000000000000000000000000000000000B3 +:10BD900000000000000000000000000000000000A3 +:10BDA0000000000000000000000000000000000093 +:10BDB0000000000000000000000000000000000083 +:10BDC0000000000000000000000000000000000073 +:10BDD0000000000000000000000000000000000063 +:10BDE0000000000000000000000000000000000053 +:10BDF0000000000000000000000000000000000043 +:10BE00000000000000000000000000000000000032 +:10BE10000000000000000000010000000000000021 +:10BE20000E33CDAB34126DE6ECDE05000B000000E6 +:10BE30000000000000000000000000000000000002 +:10BE400000000000000000000000000000000000F2 +:10BE500000000000000000000000000000000000E2 +:10BE600000000000000000000000000000000000D2 +:10BE700000000000000000000000000000000000C2 +:10BE800000000000000000000000000000000000B2 +:10BE900000000000000000000000000000000000A2 +:10BEA0000000000000000000000000000000000092 +:10BEB0000000000000000000000000000000000082 +:10BEC0000000000000000000000000000000000072 +:10BED0000000000000000000000000000000000062 +:10BEE0000000000000000000000000000000000052 +:10BEF0000000000000000000000000000000000042 +:10BF00000000000000000000000000000000000031 +:10BF10000000000000000000000000000000000021 +:10BF20000000000000000000000000000000000011 +:10BF30000000000000000000000000000000000001 +:10BF400000000000000000000000000000000000F1 +:10BF500000000000000000000000000000000000E1 +:10BF600000000000000000000000000000000000D1 +:10BF700000000000000000000000000000000000C1 +:10BF800000000000000000000000000000000000B1 +:10BF900000000000000000000000000000000000A1 +:10BFA0000000000000000000000000000000000091 +:10BFB0000000000000000000000000000000000081 +:10BFC0000000000000000000000000000000000071 +:10BFD0000000000000000000000000000000000061 +:10BFE0000000000000000000000000000000000051 +:10BFF0000000000000000000000000000000000041 +:10C000000000000000000000000000000000000030 +:10C010000000000000000000000000000000000020 +:10C020000000000000000000000000000000000010 +:10C030000000000000000000000000000000000000 +:10C0400000000000000000000000000000000000F0 +:10C0500000000000000000000000000000000000E0 +:10C0600000000000000000000000000000000000D0 +:10C0700000000000000000000000000000000000C0 +:10C0800000000000000000000000000000000000B0 +:10C0900000000000000000000000000000000000A0 +:10C0A0000000000000000000000000000000000090 +:10C0B0000000000000000000000000000000000080 +:10C0C0000000000000000000000000000000000070 +:10C0D0000000000000000000000000000000000060 +:10C0E0000000000000000000000000000000000050 +:10C0F0000000000000000000000000000000000040 +:10C10000000000000000000000000000000000002F +:10C11000000000000000000000000000000000001F +:10C12000000000000000000000000000000000000F +:10C1300000000000000000000000000000000000FF +:10C1400000000000000000000000000000000000EF +:10C1500000000000000000000000000000000000DF +:10C1600000000000000000000000000000000000CF +:10C1700000000000000000000000000000000000BF +:10C1800000000000000000000000000000000000AF +:10C190000000000000000000FFFFFFFF7C7F002088 +:10C1A0000090D003FF00FFFF320000007D7B0F00F6 +:10C1B000F17B0F0001090262000301008032080BCD +:10C1C000000202020000090400000102020004054E +:10C1D0002400200105240100010424020205240694 +:10C1E00000010705810308001009040100020A008C +:10C1F000000007050202400000070582024000001F +:10C200000904020002080650050705030240000069 +:10C210000705830240000009024B00020100803242 +:10C22000080B0002020200000904000001020200E3 +:10C230000405240020010524010001042402020554 +:10C24000240600010705810308001009040100020B +:10C250000A000000070502024000000705820240B4 +:10C26000000012010002EF0201409A2329000001A0 +:10C2700001020301FDBB0F008DBB0F008DBB0F0042 +:10C2800064B30020F2BB0F00D9BB0F00554632202B +:10C29000426F6F746C6F6164657220302E392E327C +:10C2A000206C69622F6E726678202876322E302ECE +:10C2B0003029206C69622F74696E79757362202849 +:10C2C000302E31322E302D3134352D673937373518 +:10C2D000653736393129206C69622F75663220281E +:10C2E00072656D6F7465732F6F726967696E2F6306 +:10C2F0006F6E6669677570646174652D392D67614D +:10C30000646262386337290D0A4D6F64656C3A20A8 +:10C3100068747470733A2F2F6275796D6561636FFD +:10C32000666665652E636F6D2F6D61726B2E626937 +:10C330007273730D0A426F6172642D49443A204D45 +:10C340006573687461737469630D0A446174653A56 +:10C350002053657020203120323032340D0A000025 +:10C3600000000000000000000000000000000000CD +:10C3700000000000000000000000000000000000BD +:10C3800000000000000000000000000000000000AD +:10C39000000000000000000000000000000000009D +:10C3A000000000000000000000000000000000008D +:10C3B000000000000000000000000000000000007D +:10C3C000000000000000000000000000000000006D +:10C3D000000000000000000000000000000000005D +:10C3E000000000000000000000000000000000004D +:10C3F000000000000000000000000000000000003D +:10C40000000000000000000000000000010000002B +:10C4100098B4002010000C000000E0FF1F00000096 +:10C42000000000005D450F0069420F0041420F000F +:10D80000F1109E1E797A22200500000064000000BD +:10D81000CC00000000001000CD000000000004005B +:10D82000D000000029009A23D10000004028A5ADB7 +:10D83000D2000000200000000000000000000000F6 +:10D8400000000000000000000000000000000000D8 +:08D850000000000000000000D0 +:020000041000EA +:0810140000400F0000E00F0096 +:00000001FF diff --git a/bin/generic/Meshtastic_7.3.0_bootloader-0.9.2_s140_7.3.0.zip b/bin/generic/Meshtastic_7.3.0_bootloader-0.9.2_s140_7.3.0.zip new file mode 100644 index 000000000..bccd58625 Binary files /dev/null and b/bin/generic/Meshtastic_7.3.0_bootloader-0.9.2_s140_7.3.0.zip differ diff --git a/bin/generic/update-Meshtastic_6.1.0_bootloader-0.9.2_nosd.uf2 b/bin/generic/update-Meshtastic_6.1.0_bootloader-0.9.2_nosd.uf2 new file mode 100644 index 000000000..65032ce66 Binary files /dev/null and b/bin/generic/update-Meshtastic_6.1.0_bootloader-0.9.2_nosd.uf2 differ diff --git a/bin/generic/update-Meshtastic_7.3.0_bootloader-0.9.2_nosd.uf2 b/bin/generic/update-Meshtastic_7.3.0_bootloader-0.9.2_nosd.uf2 new file mode 100644 index 000000000..beffb3206 Binary files /dev/null and b/bin/generic/update-Meshtastic_7.3.0_bootloader-0.9.2_nosd.uf2 differ diff --git a/bin/mergehex b/bin/mergehex new file mode 100755 index 000000000..2a93c5710 Binary files /dev/null and b/bin/mergehex differ diff --git a/bin/native-install.sh b/bin/native-install.sh index cc6d968f9..ba71c4f46 100755 --- a/bin/native-install.sh +++ b/bin/native-install.sh @@ -1,6 +1,6 @@ #!/usr/bin/env bash -cp "release/meshtasticd_linux_$(arch)" /usr/sbin/meshtasticd +cp "release/meshtasticd_linux_$(uname -m)" /usr/sbin/meshtasticd mkdir /etc/meshtasticd if [[ -f "/etc/meshtasticd/config.yaml" ]]; then cp bin/config-dist.yaml /etc/meshtasticd/config-upgrade.yaml diff --git a/bin/platformio-custom.py b/bin/platformio-custom.py index e03a35e3a..0f099c09a 100644 --- a/bin/platformio-custom.py +++ b/bin/platformio-custom.py @@ -1,13 +1,15 @@ -import subprocess -import configparser -import traceback +#!/usr/bin/env python3 +# trunk-ignore-all(ruff/F821) +# trunk-ignore-all(flake8/F821): For SConstruct imports import sys from os.path import join + from readprops import readProps Import("env") platform = env.PioPlatform() + def esp32_create_combined_bin(source, target, env): # this sub is borrowed from ESPEasy build toolchain. It's licensed under GPL V3 # https://github.com/letscontrolit/ESPEasy/blob/mega/tools/pio/post_esp32.py @@ -20,8 +22,8 @@ def esp32_create_combined_bin(source, target, env): firmware_name = env.subst("$BUILD_DIR/${PROGNAME}.bin") chip = env.get("BOARD_MCU") flash_size = env.BoardConfig().get("upload.flash_size") - flash_freq = env.BoardConfig().get("build.f_flash", '40m') - flash_freq = flash_freq.replace('000000L', 'm') + flash_freq = env.BoardConfig().get("build.f_flash", "40m") + flash_freq = flash_freq.replace("000000L", "m") flash_mode = env.BoardConfig().get("build.flash_mode", "dio") memory_type = env.BoardConfig().get("build.arduino.memory_type", "qio_qspi") if flash_mode == "qio" or flash_mode == "qout": @@ -51,23 +53,47 @@ def esp32_create_combined_bin(source, target, env): print(f" - {hex(app_offset)} | {firmware_name}") cmd += [hex(app_offset), firmware_name] - print('Using esptool.py arguments: %s' % ' '.join(cmd)) + print("Using esptool.py arguments: %s" % " ".join(cmd)) esptool.main(cmd) -if (platform.name == "espressif32"): + +if platform.name == "espressif32": sys.path.append(join(platform.get_package_dir("tool-esptoolpy"))) import esptool - env.AddPostAction("$BUILD_DIR/${PROGNAME}.bin", esp32_create_combined_bin) + + env.AddPostAction("$BUILD_DIR/${PROGNAME}.bin", esp32_create_combined_bin) + + esp32_kind = env.GetProjectOption("custom_esp32_kind") + if esp32_kind == "esp32": + # Free up some IRAM by removing auxiliary SPI flash chip drivers. + # Wrapped stub symbols are defined in src/platform/esp32/iram-quirk.c. + env.Append( + LINKFLAGS=[ + "-Wl,--wrap=esp_flash_chip_gd", + "-Wl,--wrap=esp_flash_chip_issi", + "-Wl,--wrap=esp_flash_chip_winbond", + ] + ) + else: + # For newer ESP32 targets, using newlib nano works better. + env.Append(LINKFLAGS=["--specs=nano.specs", "-u", "_printf_float"]) + +if platform.name == "nordicnrf52": + env.AddPostAction("$BUILD_DIR/${PROGNAME}.hex", + env.VerboseAction(f"{sys.executable} ./bin/uf2conv.py $BUILD_DIR/firmware.hex -c -f 0xADA52840 -o $BUILD_DIR/firmware.uf2", + "Generating UF2 file")) Import("projenv") prefsLoc = projenv["PROJECT_DIR"] + "/version.properties" verObj = readProps(prefsLoc) -print("Using meshtastic platformio-custom.py, firmware version " + verObj['long']) +print("Using meshtastic platformio-custom.py, firmware version " + verObj["long"]) # General options that are passed to the C and C++ compilers -projenv.Append(CCFLAGS=[ - "-DAPP_VERSION=" + verObj['long'], - "-DAPP_VERSION_SHORT=" + verObj['short'] -]) +projenv.Append( + CCFLAGS=[ + "-DAPP_VERSION=" + verObj["long"], + "-DAPP_VERSION_SHORT=" + verObj["short"], + ] +) diff --git a/bin/readprops.py b/bin/readprops.py index ffa361541..4b730658a 100644 --- a/bin/readprops.py +++ b/bin/readprops.py @@ -1,9 +1,5 @@ - - -import subprocess import configparser -import traceback -import sys +import subprocess def readProps(prefsLoc): @@ -11,27 +7,36 @@ def readProps(prefsLoc): config = configparser.RawConfigParser() config.read(prefsLoc) - version = dict(config.items('VERSION')) - verObj = dict(short = "{}.{}.{}".format(version["major"], version["minor"], version["build"]), - long = "unset") + version = dict(config.items("VERSION")) + verObj = dict( + short="{}.{}.{}".format(version["major"], version["minor"], version["build"]), + long="unset", + ) # Try to find current build SHA if if the workspace is clean. This could fail if git is not installed try: - sha = subprocess.check_output( - ['git', 'rev-parse', '--short', 'HEAD']).decode("utf-8").strip() - isDirty = subprocess.check_output( - ['git', 'diff', 'HEAD']).decode("utf-8").strip() + sha = ( + subprocess.check_output(["git", "rev-parse", "--short", "HEAD"]) + .decode("utf-8") + .strip() + ) + isDirty = ( + subprocess.check_output(["git", "diff", "HEAD"]).decode("utf-8").strip() + ) suffix = sha # if isDirty: # # short for 'dirty', we want to keep our verstrings source for protobuf reasons # suffix = sha + "-d" - verObj['long'] = "{}.{}.{}.{}".format( - version["major"], version["minor"], version["build"], suffix) + verObj["long"] = "{}.{}.{}.{}".format( + version["major"], version["minor"], version["build"], suffix + ) except: # print("Unexpected error:", sys.exc_info()[0]) # traceback.print_exc() - verObj['long'] = verObj['short'] + verObj["long"] = verObj["short"] # print("firmware version " + verStr) return verObj + + # print("path is" + ','.join(sys.path)) diff --git a/bin/regen-protos.bat b/bin/regen-protos.bat index 1422f7914..7fa8f333d 100644 --- a/bin/regen-protos.bat +++ b/bin/regen-protos.bat @@ -1 +1 @@ -cd protobufs && ..\nanopb-0.4.7\generator-bin\protoc.exe --experimental_allow_proto3_optional --nanopb_out=-v:..\src\mesh\generated -I=..\protobufs ..\protobufs\meshtastic\*.proto +cd protobufs && ..\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 diff --git a/bin/regen-protos.sh b/bin/regen-protos.sh index ad771ab45..12546bfdc 100755 --- a/bin/regen-protos.sh +++ b/bin/regen-protos.sh @@ -2,19 +2,10 @@ set -e -echo "This script requires https://jpa.kapsi.fi/nanopb/download/ version 0.4.7 to be located in the" +echo "This script requires https://jpa.kapsi.fi/nanopb/download/ version 0.4.9 to be located in the" echo "firmware root directory if the following step fails, you should download the correct" -echo "prebuilt binaries for your computer into nanopb-0.4.7" +echo "prebuilt binaries for your computer into nanopb-0.4.9" # the nanopb tool seems to require that the .options file be in the current directory! cd protobufs -../nanopb-0.4.7/generator-bin/protoc --nanopb_out=-v:../src/mesh/generated/ -I=../protobufs meshtastic/*.proto --experimental_allow_proto3_optional - -# cd ../src/mesh/generated/meshtastic -# sed -i 's/#include "meshtastic/#include "./g' -- * - -# sed -i 's/meshtastic_//g' -- * - -#echo "Regenerating protobuf documentation - if you see an error message" -#echo "you can ignore it unless doing a new protobuf release to github." -#bin/regen-docs.sh +../nanopb-0.4.9/generator-bin/protoc --experimental_allow_proto3_optional "--nanopb_out=-S.cpp -v:../src/mesh/generated/" -I=../protobufs meshtastic/*.proto diff --git a/bin/s140_nrf52_7.3.0_softdevice.hex b/bin/s140_nrf52_7.3.0_softdevice.hex new file mode 100644 index 000000000..639927f50 --- /dev/null +++ b/bin/s140_nrf52_7.3.0_softdevice.hex @@ -0,0 +1,9726 @@ +:020000040000FA +:1000000000040020810A000015070000610A0000BA +:100010001F07000029070000330700000000000050 +:10002000000000000000000000000000A50A000021 +:100030003D070000000000004707000051070000D6 +:100040005B070000650700006F07000079070000EC +:10005000830700008D07000097070000A10700003C +:10006000AB070000B5070000BF070000C90700008C +:10007000D3070000DD070000E7070000F1070000DC +:10008000FB070000050800000F0800001908000029 +:10009000230800002D080000370800004108000078 +:1000A0004B080000550800005F08000069080000C8 +:1000B000730800007D080000870800009108000018 +:1000C0009B080000A5080000AF080000B908000068 +:1000D000C3080000CD080000D7080000E1080000B8 +:1000E000EB080000F5080000FF0800000909000007 +:1000F000130900001D090000270900003109000054 +:100100003B0900001FB500F003F88DE80F001FBD8C +:1001100000F0ACBC40F6FC7108684FF01022401CA7 +:1001200008D00868401C09D00868401C04D0086842 +:1001300000F037BA9069F5E79069F9E7704770B554 +:100140000B46010B184400F6FF70040B4FF0805073 +:100150000022090303692403406943431D1B104621 +:1001600000F048FA29462046BDE8704000F042BA47 +:10017000F0B54FF6FF734FF4B4751A466E1E11E0DA +:10018000A94201D3344600E00C46091B30F8027B3B +:10019000641E3B441A44F9D19CB204EB134394B25D +:1001A00004EB12420029EBD198B200EB134002EBB2 +:1001B000124140EA0140F0BDF34992B00446D1E952 +:1001C0000001CDE91001FF224021684600F0F4FB58 +:1001D00094E80F008DE80F00684610A902E004C8FB +:1001E00041F8042D8842FAD110216846FFF7C0FF7C +:1001F0001090AA208DF8440000F099F9FFF78AFFCB +:1002000040F6FC7420684FF01025401C0FD0206889 +:1002100010226946803000F078F92068401C08D030 +:100220002068082210A900F070F900F061F9A869AF +:10023000EEE7A869F5E74FF080500369406940F6A2 +:10024000FC71434308684FF01022401C06D0086838 +:1002500000F58050834203D2092070479069F7E788 +:100260000868401C04D00868401C03D00020704778 +:100270009069F9E70420704770B504460068C34DE3 +:10028000072876D2DFE800F033041929631E250021 +:10029000D4E9026564682946304600F062F92A46CE +:1002A0002146304600F031F9AA002146304600F0E0 +:1002B00057FB002800D0032070BD00F009FC4FF46C +:1002C000805007E0201D00F040F90028F4D100F034 +:1002D000FFFB60682860002070BD241D94E80700C3 +:1002E000920000F03DFB0028F6D00E2070BDFFF715 +:1002F000A2FF0028FAD1D4E901034FF0805100EBAE +:10030000830208694D69684382420ED840F6F8704E +:1003100005684FF010226D1C09D0056805EB8305B8 +:100320000B6949694B439D4203D9092070BD55694A +:10033000F4E70168491C03D00068401C02D003E0C8 +:100340005069FAE70F2070BD2046FFF735FFFFF731 +:1003500072FF0028F7D1201D00F0F7F80028F2D135 +:1003600060680028F0D100F0E2F8FFF7D3FE00F05B +:10037000BFF8072070BD10B50C46182802D0012028 +:10038000086010BD2068FFF777FF206010BD41684E +:10039000054609B1012700E0002740F6F8742068FF +:1003A0004FF01026401C2BD02068AA68920000F065 +:1003B000D7FA38B3A86881002068401C27D020688D +:1003C000FFF7BDFED7B12068401C22D026684FF051 +:1003D0008050AC686D68016942695143A9420DD9EA +:1003E000016940694143A14208D92146304600F0E5 +:1003F000B8F822462946304600F087F800F078F831 +:100400007069D2E700F093F8FFF784FEF6E77069B1 +:10041000D6E77669DBE740F6FC7420684FF01026DB +:10042000401C23D02068401C0CD02068401C1FD0EA +:100430002568206805F18005401C1BD027683879A5 +:10044000AA2819D040F6F8700168491C42D001680A +:10045000491C45D00168491C3ED001680968491C07 +:100460003ED00168491C39D000683EE0B069DAE747 +:10047000B569DEE7B769E2E710212846FFF778FEA5 +:100480003968814222D12068401C05D0D4F8001080 +:1004900001F18002C03107E0B169F9E730B108CA63 +:1004A00051F8040D984201D1012000E000208A4259 +:1004B000F4D158B1286810B1042803D0FEE72846CB +:1004C000FFF765FF3149686808600EE0FFF722FE1C +:1004D00000F00EF87169BBE77169BFE7706904E06D +:1004E0004FF480500168491C01D000F0CBFAFEE7C0 +:1004F000BFF34F8F26480168264A01F4E06111439B +:100500000160BFF34F8F00BFFDE72DE9F0411746B3 +:100510000D460646002406E03046296800F054F8EF +:10052000641C2D1D361DBC42F6D3BDE8F08140F69B +:10053000FC700168491C04D0D0F800004FF48051D1 +:10054000FDE54FF010208069F8E74FF080510A690F +:10055000496900684A43824201D810207047002050 +:10056000704770B50C4605464FF4806608E0284693 +:1005700000F017F8B44205D3A4F5806405F5805562 +:10058000002CF4D170BD0000F40A0000000000202F +:100590000CED00E00400FA05144801680029FCD0C5 +:1005A0007047134A0221116010490B68002BFCD0E0 +:1005B0000F4B1B1D186008680028FCD0002010603D +:1005C00008680028FCD07047094B10B501221A605A +:1005D000064A1468002CFCD0016010680028FCD08A +:1005E0000020186010680028FCD010BD00E4014015 +:1005F00004E5014070B50C46054600F073F810B9EB +:1006000000F07EF828B121462846BDE8704000F091 +:1006100007B821462846BDE8704000F037B8000012 +:100620007FB5002200920192029203920A0B000B06 +:100630006946012302440AE0440900F01F0651F80C +:10064000245003FA06F6354341F82450401C8242F8 +:10065000F2D80D490868009A10430860081D016827 +:10066000019A1143016000F03DF800280AD00649C4 +:1006700010310868029A10430860091D0868039A3F +:10068000104308607FBD00000006004030B50F4CED +:10069000002200BF04EB0213D3F800582DB9D3F8A1 +:1006A000045815B9D3F808581DB1521C082AF1D3C3 +:1006B00030BD082AFCD204EB0212C2F80008C3F8CD +:1006C00004180220C3F8080830BD000000E0014013 +:1006D0004FF08050D0F83001082801D0002070473A +:1006E000012070474FF08050D0F83011062905D016 +:1006F000D0F83001401C01D0002070470120704725 +:100700004FF08050D0F830010A2801D00020704707 +:100710000120704708208F490968095808471020B0 +:100720008C4909680958084714208A4909680958FA +:100730000847182087490968095808473020854923 +:100740000968095808473820824909680958084744 +:100750003C20804909680958084740207D490968BC +:100760000958084744207B49096809580847482028 +:1007700078490968095808474C207649096809589A +:10078000084750207349096809580847542071499F +:1007900009680958084758206E49096809580847E8 +:1007A0005C206C4909680958084760206949096854 +:1007B00009580847642067490968095808476820AC +:1007C00064490968095808476C2062490968095852 +:1007D000084770205F4909680958084774205D4937 +:1007E00009680958084778205A490968095808478C +:1007F0007C205849096809580847802055490968EC +:10080000095808478420534909680958084788202F +:1008100050490968095808478C204E490968095809 +:10082000084790204B4909680958084794204949CE +:10083000096809580847982046490968095808472F +:100840009C204449096809580847A0204149096883 +:1008500009580847A4203F49096809580847A820B3 +:100860003C49096809580847AC203A4909680958C1 +:100870000847B0203749096809580847B420354966 +:10088000096809580847B8203249096809580847D3 +:10089000BC203049096809580847C0202D4909681B +:1008A00009580847C4202B49096809580847C82037 +:1008B0002849096809580847CC2026490968095879 +:1008C0000847D0202349096809580847D4202149FE +:1008D000096809580847D8201E4909680958084777 +:1008E000DC201C49096809580847E02019490968B3 +:1008F00009580847E4201749096809580847E820BB +:100900001449096809580847EC2012490968095830 +:100910000847F0200F49096809580847F4200D4995 +:10092000096809580847F8200A490968095808471A +:10093000FC2008490968095808475FF48070054998 +:10094000096809580847000003480449024A034B54 +:100950007047000000000020000B0000000B0000AA +:1009600040EA010310B59B070FD1042A0DD310C82C +:1009700008C9121F9C42F8D020BA19BA884201D97E +:10098000012010BD4FF0FF3010BD1AB1D30703D0C6 +:10099000521C07E0002010BD10F8013B11F8014B7C +:1009A0001B1B07D110F8013B11F8014B1B1B01D198 +:1009B000921EF1D1184610BD02F0FF0343EA032254 +:1009C00042EA024200F005B87047704770474FF0A6 +:1009D00000020429C0F0128010F0030C00F01B800C +:1009E000CCF1040CBCF1020F18BF00F8012BA8BF1A +:1009F00020F8022BA1EB0C0100F00DB85FEAC17CDE +:100A000024BF00F8012B00F8012B48BF00F8012B90 +:100A100070474FF0000200B51346944696462039C1 +:100A200022BFA0E80C50A0E80C50B1F12001BFF4A7 +:100A3000F7AF090728BFA0E80C5048BF0CC05DF80D +:100A400004EB890028BF40F8042B08BF704748BF5B +:100A500020F8022B11F0804F18BF00F8012B7047CF +:100A6000014B1B68DB6818470000002009480A4951 +:100A70007047FFF7FBFFFFF745FB00BD20BFFDE719 +:100A8000064B1847064A1060016881F308884068E1 +:100A900000470000000B0000000B000017040000DE +:100AA000000000201EF0040F0CBFEFF30881EFF3ED +:100AB0000981886902380078182803D100E0000015 +:100AC000074A1047074A12682C3212681047000084 +:100AD00000B5054B1B68054A9B58984700BD0000B0 +:100AE0007703000000000020F00A0000040000006E +:100AF000001000000000000000FFFFFF0090D00386 +:10100000C8130020395E020085C100009F5D020008 +:1010100085C1000085C1000085C1000000000000FE +:10102000000000000000000000000000C55E02009B +:1010300085C100000000000085C1000085C10000DE +:101040002D5F0200335F020085C1000085C10000F2 +:1010500085C1000085C1000085C1000085C1000078 +:10106000395F020085C1000085C100003F5F0200BA +:1010700085C10000455F02004B5F0200515F020026 +:1010800085C1000085C1000085C1000085C1000048 +:1010900085C1000085C1000085C1000085C1000038 +:1010A00085C10000575F020085C1000085C10000B6 +:1010B00085C1000085C1000085C1000085C1000018 +:1010C0005D5F020085C1000085C1000085C1000090 +:1010D00085C1000085C1000085C1000085C10000F8 +:1010E00085C1000085C1000085C1000085C10000E8 +:1010F00085C1000085C1000085C1000085C10000D8 +:1011000085C1000085C1000000F002F824F083FED4 +:101110000AA090E8000C82448344AAF10107DA4552 +:1011200001D124F078FEAFF2090EBAE80F0013F0F7 +:10113000010F18BFFB1A43F00103184718530200B0 +:10114000385302000A444FF0000C10F8013B13F032 +:10115000070408BF10F8014B1D1108BF10F8015B10 +:10116000641E05D010F8016B641E01F8016BF9D103 +:1011700013F0080F1EBF10F8014BAD1C0C1B09D15A +:101180006D1E58BF01F801CBFAD505E014F8016BCC +:1011900001F8016B6D1EF9D59142D6D3704700005E +:1011A0000023002400250026103A28BF78C1FBD870 +:1011B000520728BF30C148BF0B6070471FB500F011 +:1011C00003F88DE80F001FBD24F022BE70B51A4C45 +:1011D00005460A202070A01C00F0D5F85920A080F8 +:1011E00029462046BDE8704008F082B908F08BB966 +:1011F00070B50C461149097829B1A0F160015E294A +:1012000008D3012013E0602804D0692802D043F2FB +:1012100001000CE020CC0A4E94E80E0006EB8000A2 +:10122000A0F58050241FD0F8806E2846B04720607B +:1012300070BD012070470000080000201C00002045 +:10124000A05F02003249884201D20120704700208D +:10125000704770B50446A0F500002E4EB0F1786FCF +:1012600002D23444A4F500042948844201D2012565 +:1012700000E0002500F043F848B125B9B44204D39A +:101280002548006808E0012070BD002070BD002DD9 +:10129000F9D1B442F9D321488442F6D2F3E710B52C +:1012A0000446A0F50000B0F1786F03D21948044459 +:1012B000A4F5000400F023F84FF0804130B1164847 +:1012C000006804E08C4204D2012003E01348844209 +:1012D000F8D2002080F0010010BD10B520B1FFF75A +:1012E000DEFF08B1012010BD002010BD10B520B1F7 +:1012F000FFF7AFFF08B1012010BD002010BD084866 +:1013000008490068884201D10120704700207047D9 +:1013100000700200000000202000002008000020D3 +:101320005C000020BEBAFECA10B5044600210120B0 +:1013300000F042F800210B2000F03EF800210820C8 +:1013400000F03AF80421192000F036F804210D20AD +:1013500000F032F804210E2000F02EF804210F20B6 +:1013600000F02AF80421C84300F026F806211620D0 +:1013700000F022F80621152000F01EF82046FFF7A5 +:1013800025FF002010BD40F2231101807047FFF7B8 +:101390002DBF1148704710487047104A10B51468A7 +:1013A0000E4B0F4A08331A60FFF722FF0B48001D4F +:1013B000046010BD704770474907090E002804DB20 +:1013C00000F1E02080F80014704700F00F0000F1F9 +:1013D000E02080F8141D704703F900421005024018 +:1013E00001000001FD48002101604160018170475A +:1013F0002DE9FF4F93B09B46209F160004460DD069 +:101400001046FFF726FF18B1102017B0BDE8F08F87 +:101410003146012001F0D3FE0028F6D101258DF8D8 +:1014200042504FF4C050ADF84000002210A92846A9 +:1014300006F0C5FC0028E8D18DF84250A8464FF4CC +:1014400028500025ADF840001C2229466846079523 +:101450000DF01DF89DF81C000DF11C0A20F00F0086 +:10146000401C20F0F00010308DF81C0020788DF822 +:101470001D0061789DF81E000DF1400961F34200E6 +:1014800040F001008DF81E009DF8000008AA40F011 +:1014900002008DF800002089ADF83000ADF8325020 +:1014A0006089ADF83400CDF82CA060680E900AA9D0 +:1014B000CDF82890684606F090FA0028A5D160681B +:1014C000FFF70BFF40B16068FFF710FF20B96078AD +:1014D00000F00300022801D0012000E00020BF4CF2 +:1014E00008AA0AA92072BDF8200020808DF8428049 +:1014F00042F60120ADF840009DF81E0020F00600E5 +:10150000801C20F001008DF81E000220ADF8300094 +:10151000ADF8340014A80E90684606F05EFA002874 +:1015200089D1BDF82000608036B1211D304600F021 +:101530005FF90028C2D109E0BBF1000F05D00CF023 +:1015400021FDE8BB0CF01EFDD0BBA58017B1012F1B +:1015500043D04AE08DF8428042F6A620ADF8400024 +:1015600046461C220021684607950CF090FF9DF826 +:101570001C00ADF8346020F00F00401C20F0F0009B +:1015800010308DF81C009DF81D0020F0FF008DF834 +:101590001D009DF81E0020F0060040F00100801C98 +:1015A0008DF81E009DF800008DF8446040F00200A8 +:1015B0008DF80000CDE90A9AADF8306011A800E07E +:1015C00011E00E9008AA0AA9684606F006FA00285B +:1015D000A6D1BDF82000E08008E00CF0D3FC10B9E3 +:1015E0000CF0D0FC08B103200FE7E58000200CE7E9 +:1015F0003EB50446794D0820ADF80000A88828B112 +:101600002046FFF726FE18B110203EBD06203EBD45 +:101610002146012001F0D3FD0028F8D12088ADF843 +:1016200004006088ADF80600A088ADF80800E088E6 +:10163000ADF80A00A88801AB6A46002106F0AAFDB1 +:10164000BDF800100829E2D003203EBD7FB5634DF0 +:101650000446A88868B1002002900820ADF8080070 +:10166000CDF80CD02046FFF7F4FD20B1102004B0D7 +:1016700070BD0620FBE7A98802AA4FF6FF7006F0AE +:10168000CCFF0028F3D1BDF80810082901D00320B1 +:10169000EDE7BDF800102180BDF802106180BDF8B3 +:1016A0000410A180BDF80610E180E0E701B582B02A +:1016B0000220ADF80000494802AB6A46408800218C +:1016C00006F068FDBDF80010022900D003200EBD11 +:1016D0001CB5002100910221ADF800100190FFF728 +:1016E000DEFD08B110201CBD3C486A4641884FF61B +:1016F000FF7006F092FFBDF800100229F3D003201E +:101700001CBDFEB5354C06461546207A0F46C0076F +:1017100005D00846FFF79DFD18B11020FEBD0F2033 +:10172000FEBDF82D01D90C20FEBD3046FFF791FD1E +:1017300018BB208801A905F03AFE0028F4D13078C2 +:101740008DF80500208801A906F003FD0028EBD1E3 +:1017500000909DF800009DF8051040F002008DF803 +:101760000000090703D040F008008DF80000208831 +:10177000694606F08BFC0028D6D1ADF808502088C9 +:101780003B4602AA002106F005FDBDF80810A9425B +:10179000CAD00320FEBD7CB5054600200090019014 +:1017A0000888ADF800000C4628460195FFF795FD26 +:1017B00018B92046FFF773FD08B110207CBD15B1A4 +:1017C000BDF8000060B105486A4601884FF6FF7019 +:1017D00006F023FFBDF8001021807CBD240200200C +:1017E0000C20FAE72F48C088002800D0012070475D +:1017F00030B5044693B000200D46014600901422F7 +:1018000001A80CF044FE1C22002108A80CF03FFEA9 +:101810009DF80000CDF808D020F00F00401C20F00B +:10182000F00010308DF800009DF8010006AA20F0AD +:10183000FF008DF801009DF8200001A940F0020092 +:101840008DF8200001208DF8460042F60420ADF806 +:10185000440011A801902088ADF83C006088ADF8E4 +:101860003E00A088ADF84000E088ADF842009DF849 +:10187000020020F00600801C20F001008DF802001C +:101880000820ADF80C00ADF810000FA8059008A8CE +:1018900006F0A3F8002803D1BDF818002880002026 +:1018A00013B030BD24020020F0B5007B059F1E461A +:1018B00014460D46012800D0FFDF0C2030803A206E +:1018C0003880002C08D0287A032806D0287B0128ED +:1018D00000D0FFDF17206081F0BDA889FBE72DE96C +:1018E000F0470D4686B095F80C900E991446B9F164 +:1018F000010F0BD01022007B2E8A9046052807D0BE +:10190000062839D0FFDF06B0BDE8F0870222F2E7F3 +:10191000E8890C2200EB400002EB400018803320E5 +:101920000880002CEFD0E8896081002720E0009635 +:10193000688808F1020301AA696900F097FF06EBC5 +:101940000800801C07EB470186B204EB4102BDF89A +:1019500004009081F848007808B1012300E00023DA +:101960000DF1060140460E3214F029F87F1CBFB27B +:101970006089B842DBD8C6E734200880E889B9F12D +:10198000010F11D0122148430E301880002CBAD01C +:10199000E88960814846B9F1010F00D00220207328 +:1019A00000270DF1040A1FE00621ECE70096688885 +:1019B00008F1020301AA696900F058FF06EB08006C +:1019C000801C86B2B9F1010F12D007EBC70004EBFF +:1019D0004000BDF80410C18110220AF1020110304C +:1019E0000CF02BFD7F1CBFB26089B842DED88AE7BD +:1019F00007EB470104EB4102BDF80400D0810AF176 +:101A000002014046103213F0FCFFEBE72DE9F047EE +:101A10000E4688B090F80CC096F80C80378AF5898D +:101A20000C20DFF81493109902F10C04BCF1030FA1 +:101A300008D0BCF1040F3DD0BCF1070F75D0FFDF1B +:101A400008B061E705EB850C00EB4C0018803120F5 +:101A50000880002AF4D0A8F1060000F0FF0A5581A2 +:101A600024E01622002101A80CF011FD00977088D7 +:101A7000434601AA716900F0F9FEBDF80400208018 +:101A8000BDF80600E080BDF80800208199F800004C +:101A900008B1012300E00023A21C0DF10A01504609 +:101AA00013F08DFF07EB080087B20A346D1EADB24C +:101AB000D7D2C5E705EB850C00EB4C00188032202F +:101AC0000880002ABCD0A8F1050000F0FF0A55816B +:101AD00037E000977088434601AA716900F0C6FE9E +:101AE0009DF80600BDF80410E1802179420860F3FA +:101AF000000162F34101820862F38201C20862F3CD +:101B0000C301020962F30411420962F3451182091B +:101B100062F386112171C0096071BDF80700208150 +:101B200099F8000010B1012301E00EE000232246E5 +:101B30000DF10901504613F042FF07EB080087B290 +:101B40000A346D1EADB2C4D27AE7A8F1020084B2A5 +:101B500005FB08FC0CF10E00188035200880002AD7 +:101B6000A7D05581948100971FFA8CF370880E32AC +:101B7000716900F07BFE63E72DE9F84F1E460A9D70 +:101B80000C4681462AB1607A00F58070D080E089E9 +:101B9000108199F80C000C274FF000084FF00E0A46 +:101BA0000D2872D2DFE800F09D070E1B272F374566 +:101BB000546972727200214648460095FFF774FE20 +:101BC000BDE8F88F207B9146082802D0032800D07A +:101BD000FFDF3780302009E0A9F80A80F0E7207B9A +:101BE0009146042800D0FFDF378031202880B9F1EA +:101BF000000FF1D1E4E7207B9146042800D0FFDFFD +:101C000037803220F2E7207B9146022800D0FFDFA8 +:101C100037803320EAE7207B1746022800D0FFDF19 +:101C20003420A6F800A02880002FC9D0A7F80A8089 +:101C3000C6E7207B1746042800D0FFDF3520A6F832 +:101C400000A02880002FBBD04046A7F80A8012E0F1 +:101C5000207B1746052802D0062800D0FFDF102081 +:101C6000308036202880002FAAD0E0897881A7F81C +:101C70000E80B9F80E00B881A2E7207B91460728B4 +:101C800000D0FFDF37803720B0E72AE04FF01200A6 +:101C900018804FF038001700288091D0E0897881B3 +:101CA000A7F80E80A7F8108099F80C000A2805D034 +:101CB0000B2809D00C280DD0FFDF81E7207B0A28F4 +:101CC00000D0FFDF01200AE0207B0B2800D0FFDFDF +:101CD000042004E0207B0C2800D0FFDF05203873AF +:101CE0006EE7FFDF6CE770B50C46054601F0AAFB16 +:101CF00020B10078222804D2082070BD43F20200EF +:101D000070BD0521284612F0D1F8206008B10020EE +:101D100070BD032070BD30B44880087820F00F00FB +:101D2000C01C20F0F000903001F8080B1DCA81E8BB +:101D30001D0030BC07F05DBC100000202DE9FF47FE +:101D400084B0002782460297079890468946123051 +:101D50000AF069FA401D20F00306079828B907A980 +:101D60005046FFF7C0FF002854D1B9F1000F05D04D +:101D70000798017B19BB052504681BE098F8000053 +:101D8000092803D00D2812D0FFDF46E0079903256C +:101D90004868B0B3497B42887143914239D98AB2CD +:101DA000B3B2011D11F0F5FE0446078002E0079C66 +:101DB000042508340CB1208810B1032D29D02CE063 +:101DC0000798012112300AF060FAADF80C000246C3 +:101DD00002AB2946504608F0B8FA070001D1A01C12 +:101DE000029007983A461230C8F80400A8F802A0FA +:101DF00003A94046029B0AF055FAD8B10A2817D227 +:101E000000E006E0DFE800F007091414100B0D14E1 +:101E10001412132014E6002012E6112010E6082008 +:101E20000EE643F203000BE6072009E60D2007E665 +:101E3000032005E6BDF80C002346CDE900702A46D4 +:101E40005046079900F022FD57B9032D08D1079895 +:101E5000B3B2417B406871438AB2011D11F0ADFEFF +:101E6000B9F1000FD7D0079981F80C90D3E72DE98D +:101E7000FE4F91461A881C468A468046FAB102AB4C +:101E8000494608F062FA050019D04046A61C27888A +:101E900012F04FF93246072629463B46009611F0CC +:101EA0005EFD20882346CDE900504A465146404613 +:101EB00000F0ECFC002020800120BDE8FE8F002017 +:101EC000FBE710B586B01C46AAB104238DF800309C +:101ED0001388ADF808305288ADF80A208A788DF85A +:101EE0000E200988ADF80C1000236A462146FFF742 +:101EF00025FF06B010BD1020FBE770B50D4605218B +:101F000011F0D4FF040000D1FFDF294604F11200D4 +:101F1000BDE870400AF0A2B92DE9F8430D468046AD +:101F2000002607F063FB04462878102878D2DFE803 +:101F300000F0773B345331311231313108313131D6 +:101F400031312879001FC0B2022801D0102810D1E9 +:101F500014BBFFDF35E004B9FFDF0521404611F077 +:101F6000A5FF007B032806D004280BD0072828D023 +:101F7000FFDF072655E02879801FC0B2022820D055 +:101F800050B1F6E72879401FC0B2022819D01028B6 +:101F900017D0EEE704B9FFDF13E004B9FFDF2879BB +:101FA00001280ED1172137E00521404611F07EFFB0 +:101FB000070000D1FFDF07F1120140460AF02BF9BC +:101FC0002CB12A4621464046FFF7A5FE29E0132101 +:101FD000404602F01FFD24E004B9FFDF0521404622 +:101FE00011F064FF060000D1FFDF694606F1120020 +:101FF0000AF01BF9060000D0FFDFA988172901D2DB +:10200000172200E00A46BDF80000824202D90146CC +:1020100002E005E01729C5D3404600F047FCD0E7B1 +:10202000FFDF3046BDE8F883401D20F0030219B100 +:1020300002FB01F0001D00E000201044704713B5C2 +:10204000009858B10024684611F04DFD002C04D1D1 +:10205000F749009A4A6000220A701CBD0124002042 +:10206000F2E72DE9F0470C461546242200212046D0 +:102070000CF00DFA05B9FFDFA87860732888DFF847 +:10208000B0A3401D20F00301AF788946DAF80400C0 +:1020900011F047FD060000D1FFDF4FF00008266079 +:1020A000A6F8008077B109FB07F1091D0AD0DAF81C +:1020B000040011F036FD060000D1FFDF6660C6F8AF +:1020C000008001E0C4F80480298804F11200BDE812 +:1020D000F0470AF091B82DE9F047804601F112006F +:1020E0000D4681460AF09FF8401DD14F20F00302B3 +:1020F0006E7B14462968786811F03EFD3EB104FB02 +:1021000006F2121D03D06968786811F035FD0520CC +:1021100011F074FE0446052011F078FE201A012803 +:1021200002D1786811F0F2FC49464046BDE8F0471C +:102130000AF078B870B50546052111F0B7FE040025 +:1021400000D1FFDF04F112012846BDE870400AF01B +:1021500062B82DE9F04F91B04FF0000BADF828B008 +:10216000ADF804B047880C4605469246052138462E +:1021700011F09CFE060000D1FFDF24B1A780A4F877 +:1021800006B0A4F808B0297809220B20B2EB111F81 +:1021900073D12A7A04F1100138274FF00C084FF060 +:1021A00012090291102A69D2DFE802F068F2F1F018 +:1021B0008008D3898EA03DDCF3EEB7B7307B0228D0 +:1021C00000D0FFDFA88908EBC001ADF80410302172 +:1021D000ADF82810002C25D06081B5F80E800027BE +:1021E0001DE004EBC709317C89F80E10F189A9F8CC +:1021F0000C10CDF800806888042305AA296900F036 +:1022000035FBBDF81410A9F8101008F10400BDF852 +:1022100016107F1C1FFA80F8A9F81210BFB260894F +:10222000B842DED80CE1307B022800D0FFDFE9891C +:1022300008EBC100ADF804003020ADF8280095F897 +:102240000C90002CA9F10400C0B20F90EAD061817B +:10225000B5F81080002725E0CDF8008068884B464F +:1022600003AA696900F002FB08EB09001FFA80F875 +:102270006F48007818B1012302E0DDE0DAE00023C6 +:1022800004EBC702009204A90C320F9813F097FBDD +:10229000009ABDF80C007F1C1082009ABDF80E0059 +:1022A000BFB250826089B842D6D8C9E00AA800906F +:1022B00001AB224629463046FFF711FBC0E0307BD8 +:1022C000082805D0FFDF03E0307B082800D0FFDFBF +:1022D000E8891030ADF804003620ADF82800002C55 +:1022E0003FD0A9896181F189A18127E0307B09284C +:1022F00000D0FFDFA88901460C30ADF8040037207C +:10230000ADF82800002C2CD06181E8890090AB89C1 +:10231000688804F10C02296955E0E88939211030F8 +:1023200080B2ADF80400ADF82810002C72D0A98955 +:102330006181287A0E280AD002212173E989E1817E +:10234000288A0090EB8968886969029A3BE001213C +:10235000F3E70AA8009001AB224629463046FFF772 +:1023600055FB6DE0307B0A2800D0FFDFADF804900C +:10237000ADF828704CB3A9896181A4F810B0A4F815 +:102380000EB0012020735BE020E002E030E038E096 +:1023900041E0307B0B2800D0FFDF288AADF82870A1 +:1023A0001230ADF8040084B104212173A989618140 +:1023B000E989E181298A2182688A00902B8A6888CC +:1023C00004F11202696900F051FA39E0307B0C28FF +:1023D00000D0FFDFADF80490ADF828703CB30521C4 +:1023E0002173A4F80AB0A4F80EB0A4F810B027E046 +:1023F0000AA8009001AB224629463046FFF754FA5E +:102400001EE00AA8009001AB224629463046FFF79D +:10241000B3FB15E034E03B21ADF80400ADF8281023 +:1024200074B30120E080A4F808B084F80AB007E093 +:1024300010000020FFDF03E0297A012917D0FFDF19 +:10244000BDF80400AAF800006CB1BDF82800208097 +:10245000BDF804006080BDF82800392803D03C286E +:1024600001D086F80CB011B00020BDE8F08F3C21FF +:10247000ADF80400ADF8281014B1697AA172DFE755 +:10248000AAF80000EFE72DE9F84356880F4680468A +:1024900015460521304611F009FD040000D1FFDF8B +:1024A000123400943B46414630466A680AF02EF8E2 +:1024B000B8E570B50D46052111F0F8FC040000D117 +:1024C000FFDF294604F11200BDE8704009F0B8BEF4 +:1024D00070B50D46052111F0E9FC040000D1FFDFC5 +:1024E000294604F11200BDE8704009F0D6BE70B56F +:1024F0000546052111F0DAFC040000D1FFDF04F1EC +:10250000080321462846BDE870400422AFE470B5B8 +:102510000546052111F0CAFC040000D1FFDF214669 +:1025200028462368BDE870400522A0E470B5064641 +:10253000052111F0BBFC040000D1FFDF04F1120003 +:1025400009F071FE401D20F0030511E0011D008817 +:102550000322431821463046FFF789FC00280BD0A0 +:10256000607BABB2684382B26068011D11F05BFB17 +:10257000606841880029E9D170BD70B50E460546F6 +:1025800007F034F8040000D1FFDF012020726672EA +:102590006580207820F00F00C01C20F0F000303063 +:1025A0002070BDE8704007F024B8602801D00720F3 +:1025B00070470878C54900F0010008700020704796 +:1025C0002DE9F0438BB00D461446814606A9FFF76E +:1025D0008AFB002814D14FF6FF7601274FF42058CC +:1025E0008CB103208DF800001020ADF8100007A872 +:1025F000059007AA204604A913F005FA78B1072030 +:102600000BB0BDE8F0830820ADF808508DF80E70CF +:102610008DF80000ADF80A60ADF80C800CE006986B +:10262000A17801742188C1818DF80E70ADF8085031 +:10263000ADF80C80ADF80A606A4602214846069B58 +:10264000FFF77CFBDCE708B501228DF8022042F69B +:102650000202ADF800200A4603236946FFF731FC69 +:1026600008BD08B501228DF8022042F60302ADF83C +:1026700000200A4604236946FFF723FC08BD00B585 +:1026800087B079B102228DF800200A88ADF80820C1 +:102690004988ADF80A1000236A460521FFF74EFB72 +:1026A00007B000BD1020FBE709B1072309E40720AC +:1026B000704770B588B00D461446064606A9FFF768 +:1026C00012FB00280ED17CB10620ADF808508DF821 +:1026D0000000ADF80A40069B6A460821DC813046BE +:1026E000FFF72CFB08B070BD05208DF80000ADF899 +:1026F0000850F0E700B587B059B107238DF80030D6 +:10270000ADF80820039100236A460921FFF716FB64 +:10271000C6E71020C4E770B588B00C460646002511 +:1027200006A9FFF7E0FA0028DCD106980121123053 +:1027300009F0ABFD9CB12178062921D2DFE801F038 +:10274000200505160318801E80B2C01EE28880B2E4 +:102750000AB1A3681BB1824203D90C20C2E7102042 +:10276000C0E7042904D0A08850B901E00620B9E7E9 +:10277000012913D0022905D004291CD005292AD00B +:102780000720AFE709208DF800006088ADF8080049 +:10279000E088ADF80A00A068039023E00A208DF8D5 +:1027A00000006088ADF80800E088ADF80A00A06875 +:1027B0000A25039016E00B208DF800006088ADF824 +:1027C0000800A088ADF80A00E088ADF80C00A06809 +:1027D0000B25049006E00C208DF8000060788DF841 +:1027E00008000C256A4629463046069BFFF7A6FAE4 +:1027F00078E700B587B00D228DF80020ADF80810FD +:1028000000236A461946FFF799FA49E700B587B0F1 +:1028100071B102228DF800200A88ADF8082049889D +:10282000ADF80A1000236A460621FFF787FA37E75A +:10283000102035E770B586B0064601200D46ADF88C +:1028400008108DF80000014600236A463046FFF765 +:1028500075FA040008D12946304605F0B5FC002180 +:10286000304605F0CFFC204606B070BDF8B51C46DA +:1028700015460E46069F11F04AFC2346FF1DBCB2CA +:1028800031462A46009411F036F8F8BD30B41146AE +:10289000DDE902423CB1032903D0002330BC08F03B +:1028A00032BE0123FAE71A8030BC704770B50C467F +:1028B0000546FFF722FB2146284605F094FC2846F2 +:1028C000BDE87040012105F09DBC00001000002013 +:1028D0004FF0E0224FF400400021C2F88001BFF326 +:1028E0004F8FBFF36F8F1748016001601649900248 +:1028F00008607047134900B500220A600A60124B55 +:102900004FF060721A60002808BF00BD0F4A104BDC +:10291000DFF840C001280CD002281CBFFFDF00BD3B +:10292000032008601A604FF4000000BFCCF80000DC +:1029300000BD022008601A604FF04070F6E700B555 +:10294000FFDF00BD00F5004008F50140A4020020B3 +:1029500014F5004004F5014070B50B2000F0BDF9FE +:10296000082000F0BAF900210B2000F0D4F9002172 +:10297000082000F0D0F9F44C01256560A560002026 +:10298000C4F84001C4F84401C4F848010B2000F029 +:10299000B5F9082000F0B2F90B2000F091F925609C +:1029A00070BD10B50B2000F098F9082000F095F9E3 +:1029B000E548012141608160E4490A68002AFCD1B0 +:1029C0000021C0F84011C0F84411C0F848110B2094 +:1029D00000F094F9BDE81040082000F08FB910B560 +:1029E0000B2000F08BF9BDE81040082000F086B9FC +:1029F00000B530B1012806D0022806D0FFDF002044 +:102A000000BDD34800BDD34800BDD248001D00BD65 +:102A100070B5D1494FF000400860D04DC00BC5F8EB +:102A20000803CF4800240460C5F840410820C4359D +:102A300000F053F9C5F83C41CA48047070BD08B5B0 +:102A4000C14A002128B1012811D002281CD0FFDF83 +:102A500008BD4FF48030C2F80803C2F84803BB48F1 +:102A60003C300160C2F84011BDE80840D0E74FF4A7 +:102A70000030C2F80803C2F84803B448403001608F +:102A8000C2F84411B3480CE04FF48020C2F80803A8 +:102A9000C2F84803AD4844300160C2F84811AD485F +:102AA000001D0068009008BD70B516460D4604462E +:102AB000022800D9FFDF0022A348012304F11001FE +:102AC0008B4000EB8401C1F8405526B1C1F840218C +:102AD000C0F8043303E0C0F80833C1F84021C0F85F +:102AE000443370BD2DE9F0411D46144630B1012834 +:102AF00033D0022838D0FFDFBDE8F081891E0022E4 +:102B000021F07F411046FFF7CFFF012D23D0002099 +:102B1000944D924F012668703E61914900203C39E6 +:102B200008600220091D08608D49042030390860C2 +:102B30008B483D34046008206C6000F0DFF83004FE +:102B4000C7F80403082000F0BBF88349F007091F09 +:102B500008602E70D0E70120DAE7012B02D00022B6 +:102B6000012005E00122FBE7012B04D00022022016 +:102B7000BDE8F04198E70122F9E774480068704722 +:102B800070B500F0D8F8704C0546D4F84001002626 +:102B9000012809D1D4F80803C00305D54FF48030CB +:102BA000C4F80803C4F84061D4F8440101280CD1EA +:102BB000D4F80803800308D54FF40030C4F80803A4 +:102BC000C4F84461012013F0EEFED4F84801012856 +:102BD0000CD1D4F80803400308D54FF48020C4F882 +:102BE0000803C4F84861022013F0DDFE5E4805606A +:102BF00070BD70B500F09FF85A4D0446287850B16A +:102C0000FFF706FF687818B10020687013F0CBFE5C +:102C10005548046070BD0320F8E74FF0E0214FF401 +:102C20000010C1F800027047152000F067B84B494A +:102C300001200861082000F061B848494FF47C1079 +:102C4000C1F808030020024601EB8003C3F84025C9 +:102C5000C3F84021401CC0B20628F5D37047410A92 +:102C600043F609525143C0F3080010FB02F000F58F +:102C7000807001EB5020704710B5430B48F2376469 +:102C800063431B0C5C020C60384C03FB0400384BA4 +:102C90004CF2F72443435B0D13FB04F404EB402098 +:102CA00000F580704012107008681844086010BD6C +:102CB0002C484068704729490120C1F8000270473C +:102CC000002809DB00F01F0201219140400980002B +:102CD00000F1E020C0F80011704700280DDB00F083 +:102CE0001F02012191404009800000F1E020C0F85E +:102CF0008011BFF34F8FBFF36F8F7047002809DB40 +:102D000000F01F02012191404009800000F1E02005 +:102D1000C0F8801270474907090E002804DB00F153 +:102D2000E02080F80014704700F00F0000F1E02070 +:102D300080F8141D70470C48001F00680A4A0D49AE +:102D4000121D11607047000000B0004004B5004043 +:102D50004081004044B1004008F50140008000403F +:102D6000408500403C00002014050240F7C2FFFFF0 +:102D70006F0C0100010000010A4810B50468094900 +:102D800009480831086013F0A2FE0648001D0460DF +:102D900010BD0649002008604FF0E0210220C1F874 +:102DA000800270471005024001000001FC1F004036 +:102DB000374901200860704770B50D2000F049F8D0 +:102DC000344C0020C4F800010125C4F804530D2040 +:102DD00000F050F825604FF0E0216014C1F80001C8 +:102DE00070BD10B50D2000F034F82A480121416073 +:102DF0000021C0F80011BDE810400D2000F03AB8E5 +:102E0000254810B504682449244808310860214940 +:102E1000D1F80001012804D0FFDF1F48001D046025 +:102E200010BD1B48001D00680022C0B2C1F800217F +:102E300014F07FFBF1E710B5164800BFD0F8001181 +:102E40000029FBD0FFF7DCFFBDE810400D2000F0AB +:102E500011B800280DDB00F01F020121914040094C +:102E6000800000F1E020C0F88011BFF34F8FBFF366 +:102E70006F8F7047002809DB00F01F02012191408D +:102E80004009800000F1E020C0F880127047000087 +:102E900004D5004000D000401005024001000001B0 +:102EA0004FF0E0214FF00070C1F8800101F5C071D2 +:102EB000BFF34F8FBFF36F8FC1F80001394B8022F2 +:102EC00083F8002441F8800C704700B502460420C6 +:102ED000354903E001EBC0031B792BB1401EC0B2A2 +:102EE000F8D2FFDFFF2000BD41F8302001EBC00128 +:102EF00000224A718A7101220A7100BD2A4A00210A +:102F000002EBC0000171704710B50446042800D3DD +:102F1000FFDF254800EBC4042079012800D0FFDF43 +:102F20006079A179401CC0B2814200D060714FF03D +:102F3000E0214FF00070C1F8000210BD70B504250B +:102F4000194E1A4C16E0217806EBC1000279012ACD +:102F500008D1427983799A4204D04279827156F835 +:102F6000310080472078401CC0B22070042801D373 +:102F7000002020706D1EEDB2E5D270BD0C4810B57A +:102F800004680B490B4808310860064890F80004B3 +:102F90004009042800D0FFDFFFF7D0FF0448001DE0 +:102FA000046010BD19E000E0E0050020580000209A +:102FB00010050240010000010548064A01689142DF +:102FC00001D1002101600449012008607047000020 +:102FD0005C000020BEBAFECA40E5014070B50C4658 +:102FE000054609F02FFC21462846BDE870400AF04E +:102FF00010BD7047704770470021016081807047A5 +:103000002CFFFFFFDBE5B151007002002301FFFF41 +:103010008C00000078DB6A007A2E9AC67DB66CFAC6 +:10302000F35721CCC310D5E51471FB3C30B5FC4DF2 +:103030000446062CA9780ED2DFE804F0030E0E0E2B +:103040000509FFDF08E0022906D0FFDF04E00329BD +:1030500002D0FFDF00E0FFDFAC7030BD30B50446CA +:103060001038EF4D07280CD2DFE800F0040C060CF6 +:103070000C0C0C00FFDF05E0287E112802D0FFDFDA +:1030800000E0FFDF2C7630BD2DE9F04112F026FE86 +:10309000044614F063F8201AC5B2062010F0AEFE04 +:1030A0000446062010F0B2FE211ADD4C207E1228C4 +:1030B00018D000200F18072010F0A0FE06460720A9 +:1030C00010F0A4FE301A3918207E13280CD00020EE +:1030D0000144A078042809D000200844281AC0B26E +:1030E000BDE8F0810120E5E70120F1E70120F4E7E8 +:1030F000CB4810B590F825004108C94800F12600DA +:1031000005D00EF0F5FEBDE8104006F08CB80EF0CC +:10311000D0FEF8E730B50446A1F120000D460A289C +:103120004AD2DFE800F005070C1C2328353A3F445B +:10313000FFDF42E0207820283FD1FFDF3DE0B848A4 +:103140008178052939D0007E122836D020782428AD +:1031500033D0252831D023282FD0FFDF2DE0207851 +:1031600022282AD0232828D8FFDF26E0207822280A +:1031700023D0FFDF21E0207822281ED024281CD075 +:1031800026281AD0272818D0292816D0FFDF14E0C7 +:103190002078252811D0FFDF0FE0207825280CD0DB +:1031A000FFDF0AE02078252807D0FFDF05E0207840 +:1031B000282802D0FFDF00E0FFDF257030BD1FB5FB +:1031C00004466A46002001F0A5FEB4B1BDF8022015 +:1031D0004FF6FF700621824201D1ADF80210BDF812 +:1031E0000420824201D1ADF80410BDF808108142DC +:1031F00003D14FF44860ADF8080068460FF0E2FADA +:1032000006F011F804B010BD70B516460C46054620 +:10321000FEF71FF848B90CB1B44208D90C2070BDB4 +:1032200055F82400FEF715F808B1102070BD2046AF +:10323000641EE4B2F4D270BD2DE9F04105461F468C +:1032400090460E4600240068FEF750F830B9A98871 +:1032500028680844401EFEF749F808B110203FE7EF +:1032600028680028A88802D0B84202D850E0002878 +:10327000F5D0092034E72968085DB8B1671CCA5D3C +:10328000152A2ED03CDC152A3AD2DFE802F039129A +:10329000222228282A2A313139393939393939391C +:1032A00039392200085D30BB641CA4B2A242F9D8AF +:1032B00033E00228DDD1A01C085C88F80000072854 +:1032C00001D2400701D40A200AE7307840F001001B +:1032D00015E0C143C90707E0012807D010E0062028 +:1032E000FEE60107A1F180510029F5D01846F7E666 +:1032F0003078810701D50B20F2E640F002003070F3 +:103300002868005D384484B2A888A04202D2B0E7A1 +:103310004FF4485382B2A242ADD80020E0E610B587 +:10332000027843F2022354080122022C12D003DC5B +:103330003CB1012C16D106E0032C10D07F2C11D10A +:1033400012E0002011E080790324B4EB901F09D132 +:103350000A700BE08079B2EB901F03D1F8E7807917 +:103360008009F5D0184610BDFF200870002010BD60 +:1033700008B500208DF80000294890F82E1051B1B2 +:1033800090F82F0002280FD003280FD0FFDF00BFD6 +:103390009DF8000008BD22486946253001F009FE6D +:1033A0000028F5D0FFDFF3E7032000E001208DF8CF +:1033B0000000EDE738B50C460546694601F0F9FD19 +:1033C00000280DD19DF80010207861F3470020708F +:1033D00055F8010FC4F80100A888A4F805000020E2 +:1033E00038BD38B5137888B102280FD0FF281BD01C +:1033F0000CA46D46246800944C7905EB9414247851 +:1034000064F347031370032805D010E023F0FE0394 +:1034100013700228F7D1D8B240F001000AE0000092 +:10342000F00100200302FF0143F0FE00107010784D +:1034300020F0010010700868C2F801008888A2F826 +:10344000050038BD022110F031BD38B50C460978B1 +:10345000222901D2082038BDADF800008DF80220E5 +:1034600068460EF087FD05F0DEFE050003D1212140 +:103470002046FFF74FFE284638BD1CB500208DF8CA +:103480000000CDF80100ADF80500FB4890F82E00D3 +:10349000022801D0012000E000208DF807006846D6 +:1034A0000EF0F0FD002800D0FFDF1CBD00220A80D6 +:1034B000437892B263F3451222F040020A8000780A +:1034C0000C282BD2DFE800F02A06090E1116191C71 +:1034D0001F220C2742F0110009E042F01D00088075 +:1034E0000020704742F0110012E042F0100040F05E +:1034F0000200F4E742F01000F1E742F00100EEE7CD +:1035000042F0010004E042F00200E8E742F002006D +:1035100040F00400E3E742F00400E0E707207047D2 +:103520002DE9FF478AB00025BDF82C6082461C4675 +:1035300091468DF81C50700703D56068FDF789FE31 +:1035400068B9CD4F4FF0010897F82E0058B197F8A1 +:103550002F00022807D16068FDF7C8FE18B11020BF +:103560000EB0BDE8F087300702D5A08980283DD88D +:10357000700705D4B9F1000F02D097F8240098B372 +:10358000E07DC0F300108DF81B00627D0720032151 +:103590005AB3012A2CD0022AE2D0042AE0D18DF8B5 +:1035A0001710F00627D4A27D072022B3012A22D0CB +:1035B000022A23D0042AD3D18DF819108DF8159042 +:1035C000606810B307A9FFF7AAFE0028C8D19DF8CC +:1035D0001C00FF2816D0606850F8011FCDF80F10AE +:1035E0008088ADF8130014E000E001E00720B7E7A1 +:1035F0008DF81780D5E78DF81980DFE702208DF868 +:103600001900DBE743F20220AAE7CDF80F50ADF82E +:103610001350E07B40B9207C30B9607C20B9A07C9D +:1036200010B9E07CC00601D0062099E78DF800A013 +:10363000BDF82C00ADF80200A0680190A0680290CF +:1036400004F10F0001F0A9FC8DF80C00FFF790FECB +:103650008DF80D009DF81C008DF80E008DF81650A9 +:103660008DF81850E07D08A900F00F008DF81A00C1 +:1036700068460FF0E3F905F0D6FD71E7F0B58FB0BD +:1036800000258DF830508DF814508DF834500646D2 +:103690008DF82850019502950395049519B10FC92D +:1036A00001AC84E80F00744CA078052801D00428F0 +:1036B0000CD101986168884200D120B90398E16873 +:1036C000884203D110B108200FB0F0BD207DC006A4 +:1036D00001D51F2700E0FF273B460DAA05A903A837 +:1036E000FFF7AAFD0028EFD1A08AC10702D0C006CB +:1036F00000D4EE273B460AAA0CA901A8FFF79CFDBF +:103700000028E1D19DF81400C00701D00A20DBE7B2 +:10371000A08A410708D4A17D31B19DF828108907FE +:1037200002D043F20120CFE79DF82810C90709D045 +:10373000400707D4208818B144F25061884201D96B +:103740000720C1E78DF818508DF81960BDF8080002 +:10375000ADF81A000198079006A80FF07BF905F064 +:1037600062FD0028B0D18DF820508DF82160BDF8A1 +:103770001000ADF822000398099008A80FF08CF90A +:1037800005F051FD00289FD101AD241D95E80F00E3 +:1037900084E80F00002097E770B586B00D4604005E +:1037A00005D0FDF7A3FD20B1102006B070BD0820A4 +:1037B000FBE72078C107A98802D0FF2902D303E0E4 +:1037C0001F2901D20920F0E7800763D4FFF75CFCD2 +:1037D00038B12178C1F3C100012804D0032802D0F8 +:1037E00005E01320E1E7244890F82400C8B1C80799 +:1037F0004FF001064FF0000502D08DF80F6001E098 +:103800008DF80F50FFF7B4FD8DF800002078694661 +:10381000C0F3C1008DF8010060788DF80250C20835 +:1038200001D00720C1E730B3C20701D08DF8026094 +:10383000820705D59DF8022042F002028DF8022091 +:10384000400705D59DF8020040F004008DF8020005 +:10385000002022780B18C2F38002DA7001EB4002DC +:103860006388D380401CA388C0B253810228F0D360 +:10387000207A78B905E001E0F00100208DF80260BF +:10388000E6E7607A30B9A07A20B9E07A10B9207BF7 +:10389000C00601D0062088E704F1080001F07DFB96 +:1038A0008DF80E0068460EF0F6FC05F0BCFC002812 +:1038B00089D18DF810608DF81150E088ADF81200B4 +:1038C000ADF8145004A80EF039FD05F0ACFC00284A +:1038D00088D12078C00701D0152000E01320FFF721 +:1038E000BDFB002061E72DE9FF470220FD4E8DF86A +:1038F00004000027708EADF80600B84643F20209B6 +:103900004CE001A810F039FA050006D0708EA8B37B +:10391000A6F83280ADF806803EE0039CA07F010748 +:103920002DD504F124000090A28EBDF80800214698 +:1039300004F1360301F0BCFC050005D04D452AD04A +:10394000112D3CD0FFDF3AE0A07F20F00801E07F9E +:10395000420862F3C711A177810861F30000E077A4 +:1039600094F8210000F01F0084F820002078282817 +:1039700026D129212046FFF7CDFB21E014E04007A6 +:103980000AD5BDF8080004F10E0101F01CFB05008A +:103990000DD04D4510D100257F1CFFB2022010F044 +:1039A0002DFA401CB842ACD8052D11D008E0A07FFC +:1039B00020F00400A07703E0112D00D0FFDF0025E8 +:1039C000BDF806007086052D04D0284604B0C8E571 +:1039D000A6F832800020F9E770B50646FFF732FD01 +:1039E000054605F003FE040000D1FFDF6680207865 +:1039F00020F00F00801C20F0F00020302070032009 +:103A0000207295F83E006072BDE8704005F0F1BD8F +:103A10002DE9F04786B0040000D1FFDF2078B14DDA +:103A200020F00F00801C20F0F000703020706068E3 +:103A30000178491F1B2933D2DFE801F0FE32323210 +:103A400055FD320EFDFD42FC32323278FCFCFBFAB1 +:103A500032FCFCF9F8FCFC00C6883046FFF7F2FCAB +:103A60000546304607F045FCE0B16068007A85F80D +:103A70003E0021212846FFF74DFB3046FEF75AFB5A +:103A8000304603F0D7FE3146012014F017F8A87F26 +:103A900020F01000A877FFF726FF002800D0FFDFF6 +:103AA00006B05EE5207820F0F00020302070032082 +:103AB000207266806068007A607205F09AFDD8E72F +:103AC000C5882846FFF7BEFC00B9FFDF60680079B3 +:103AD000012800D0FFDF6068017A06B02846BDE803 +:103AE000F04707F0EBBDC6883046FFF7ABFC05009A +:103AF00000D1FFDF05F07DFD606831460089288137 +:103B000060684089688160688089A881012013F01D +:103B1000D5FF0020A875A87F00F003000228BFD1C0 +:103B2000FFF7E1FE0028BBD0FFDFB9E7007928B13D +:103B30000228B5D03C28B3D0FFDFB1E705F059FD2E +:103B40006668B6F806A0307A361D012806D0687E71 +:103B5000814605F0D4FA070003D101E0E878F7E7E1 +:103B6000FFDF00220221504610F097F9040000D137 +:103B7000FFDF22212046FFF7CDFA3079012800D05F +:103B80000220A17F804668F30101A177308B20815C +:103B9000708B6081B08BA08184F822908DF80880B2 +:103BA000B8680090F86801906A460321504610F00A +:103BB00074F900B9FFDFB888ADF81000B8788DF857 +:103BC000120004AA0521504610F067F900B9FFDF82 +:103BD000B888ADF80C00F8788DF80E0003AA04211F +:103BE000504610F05AF900B9FFDF062106F1120025 +:103BF0000DF00EF940B37079800700D5FFDF7179C1 +:103C0000E07D61F34700E075D6F80600A061708999 +:103C1000A083062106F10C000DF0FAF8F0B195F83A +:103C200025004108607861F3470006E041E039E093 +:103C300071E059E04EE02FE043E06070D5F82600D7 +:103C4000C4F80200688D12E0E07D20F0FE00801CC8 +:103C5000E075D6F81200A061F08AD9E7607820F00C +:103C6000FE00801C6070F068C4F80200308AE080BA +:103C7000B8F1010F04D0B8F1020F05D0FFDF0FE754 +:103C80000320FFF7D3F90BE7287E122800D0FFDFCF +:103C90001120FFF7E3F903E706B02046BDE8F0473F +:103CA00001F092BD05F0A5FC15F8300F40F00200C0 +:103CB00005E005F09EFC15F8300F40F00400287078 +:103CC000EEE6287E13280AD01528D8D15FF016001A +:103CD000FFF7C4F906B0BDE8F04705F08ABC142030 +:103CE000F6E70000F0010020A978052909D0042991 +:103CF000C5D105F07EFC022006B0BDE8F047FFF715 +:103D000095B900790028BAD0E87801F02DF905F0CE +:103D100070FC0320F0E7287E122802D1687E01F0B3 +:103D200023F91120D4E72DE9F05F054600784FF024 +:103D300000080009DFF8B8A891460C46464601285D +:103D40006ED002286DD007280BD00A286AD0FFDF7A +:103D5000A9F8006014B1A4F8008066800020BDE8D6 +:103D6000F09F6968012704F108000B784FF0020BFF +:103D70005B1F4FF6FF721B2B7ED2DFE803F0647DE2 +:103D80007D7D0E7D7D7D7D7D7D217D7D7D2BFDFC81 +:103D9000FBFA7D14D2F9E7F8F700C8884FF0120853 +:103DA000102621469AE14FF01C080A26BCB38888E9 +:103DB000A0806868807920726868C0796072C7E7FF +:103DC0004FF01B08142654B30320207268688088C3 +:103DD000A080BDE70A793C2ABAD00D1D4FF010082B +:103DE0002C26E4B16988A180298B6182298B2182EC +:103DF000698BA182A98BE1826B790246A91D1846C5 +:103E0000FFF7EFFA2979002001290CD084F80FB0D0 +:103E1000FF212176E06120626062A06298E70FE0F6 +:103E20003BE15EE199E1E77320760AF1040090E856 +:103E30000E00DAF81000C4E90930C4E9071287E778 +:103E4000A9F800608AE72C264FF01D08002CF7D057 +:103E5000A28005460F1D897B008861F30000288041 +:103E6000B97A490861F341002880B97A890861F379 +:103E700082002880B97A00E00CE1C90861F3C30030 +:103E80002880B97AAA1C0911491C61F3041000F0BA +:103E90007F0028807878B91CFFF7A3FA387D05F1F8 +:103EA000090207F11501FFF79CFA387B01F0A9F828 +:103EB0002874787B01F0A5F86874F87EA874787A85 +:103EC000E874387F2875B87B6875388AE882DAF834 +:103ED0001C10A961B97A504697F808A0C1F34111A6 +:103EE000012904D0008C504503D2824609E0FFDF4F +:103EF00010E0022903D0288820F0600009E0504536 +:103F000004D1288820F06000403002E0288840F08A +:103F100060002880A4F824A0524607F11D01A8697A +:103F20009BE011264FF02008002C89D0A280686801 +:103F300004F10A02007920726868007B6072696887 +:103F40008B1D48791946FFF74CFA01E70A264FF016 +:103F50002108002CE9D08888A080686880792072C8 +:103F60006868C07960729AF8301006E078E06BE01B +:103F700052E07FE019E003E03AE021F00401A6E01E +:103F80000B264FF02208002CCFD0C888A08068688C +:103F9000007920726868007A01F033F8607268680E +:103FA000407A01F02EF8A072D2E61C264FF02608C7 +:103FB000002CBAD0A2806868407960726868007A84 +:103FC000A0720AF1040090E80E00DAF81000C4E9CB +:103FD0000530C4E90312686800793C2803D04328FF +:103FE00003D0FFDFB4E62772B2E684F808B0AFE68C +:103FF00010264FF02408002C97D08888A08068688D +:10400000807920816868807A608168680089A081F1 +:1040100068688089E0819BE610264FF02308002C19 +:1040200098D08888A0806868C088208168680089E6 +:10403000608168684089A08168688089E0819AF819 +:10404000301021F0020142E030264FF02508002C0C +:104050009AD0A2806968282249680AF0EEF977E6CA +:104060002A264FF02F08002C8ED0A28069682222C9 +:10407000091DF2E714264FF01B08002C84D0A28003 +:10408000686800790128B0D02772DAE90710C4E91E +:1040900003105DE64A46214660E0287A012803D0F5 +:1040A000022817D0FFDF53E610264FF01F08002C20 +:1040B000A2D06888A080A8892081E8896081288AA8 +:1040C000A081688AE0819AF8301021F001018AF815 +:1040D00030103DE64FF012081026688800F07EFF91 +:1040E00036E6287AC8B3012838D0022836D003280B +:1040F00001D0FFDF2CE609264FF01108002C8FD0ED +:104100006F883846FFF79EF990F822A0A780687A5A +:104110002072042138460FF0DBFE052138460FF0EF +:10412000D7FE002138460FF0D3FE012138460FF0AC +:10413000CFFE032138460FF0CBFE022138460FF0A8 +:10414000C7FE062138460FF0C3FE072138460FF0A0 +:10415000BFFE504600F008FFFAE5FFE72846BDE83D +:10416000F05F01F0BBBC70B5012803D0052800D07A +:10417000FFDF70BD8DB22846FFF764F9040000D15F +:10418000FFDF20782128F4D005F030FA80B10178E3 +:1041900021F00F01891C21F0F00110310170022182 +:1041A000017245800020A075BDE8704005F021BA7D +:1041B00021462846BDE870401322FFF746B92DE995 +:1041C000F04116460C00804600D1FFDF307820F029 +:1041D0000F00801C20F0F000103030702078012893 +:1041E00004D0022818D0FFDFBDE8F0814046FFF779 +:1041F00029F9050000D1FFDF0320A87505F0F9F9C2 +:1042000094E80F00083686E80F00F94810F8301FD0 +:1042100041F001010170E7E74046FFF713F905009F +:1042200000D1FFDFA1884FF6FF700027814202D145 +:10423000E288824203D0814201D1E08840B105F09A +:10424000D8F994E80F00083686E80F00AF75CBE781 +:10425000A87D0128C8D178230022414613F084FBB1 +:104260000220A875C0E738B50C4624285CD008DCCD +:1042700020280FD0212825D022284BD0232806D152 +:104280004CE0252841D0262832D03F2851D00725A0 +:10429000284638BD0021052013F0E6FB08B11120A7 +:1042A00038BDA01C0EF0E1FA04F0BDFF0500EFD10F +:1042B000002208231146052013F056FB0528E7D0FD +:1042C000FFDFE5E76068FDF708F808B1102038BDAA +:1042D000618820886A460EF071FD04F0A4FF050095 +:1042E000D6D160680028D3D0BDF800100180CFE798 +:1042F000206820B1FCF7FAFF08B11025C8E7204676 +:104300000EF03BFE1DE00546C2E7A17820880EF0C6 +:1043100086FD16E0086801F08DFEF4E7087800F0ED +:1043200001000DF0B9FD0CE0618820880EF0C1FCA1 +:1043300007E0087800F001008DF8000068460EF0F4 +:10434000DFF804F070FFDEE770B505460C4608465E +:10435000FCF7A5FF08B1102070BD202D07D0212D3E +:104360000DD0222D0BD0252D09D0072070BD20881F +:10437000A11C0DF065FEBDE8704004F054BF06209E +:1043800070BD9B482530704708B5342200219848FD +:104390000AF07DF80120FEF749FE1120FEF75EFECF +:1043A00093496846263105F0B7F891489DF80020FA +:1043B00010F8251F62F3470121F00101017000216F +:1043C00041724FF46171A0F8071002218172FEF76B +:1043D0008FFE00B1FFDFFDF705F801F0BEF908BD63 +:1043E00010B50C464022002120460AF050F8A07F6C +:1043F00020F00300A077202020700020A07584F812 +:10440000230010BD70472DE9FC410746FCF721FF52 +:1044100010B11020BDE8FC81754E06F12501D6F8DB +:1044200025000090B6F82950ADF8045096F82B40BE +:104430008DF806403846FEF7BDFF0028EAD1FEF7AA +:1044400057FE0028E6D0009946F8251FB580B471C4 +:10445000E0E710B50446FCF722FF08B1102010BDBC +:1044600063486349224690F8250026314008FEF74C +:10447000B8FF002010BD3EB504460D460846FCF7C7 +:104480000EFF08B110203EBD14B143F204003EBD42 +:1044900057488078052803D0042801D008203EBD65 +:1044A000694602A80AF012FC2A4669469DF80800EF +:1044B000FEF797FF00203EBDFEB50D4604004FF00D +:1044C000000712D00822FEF79FFE002812D1002616 +:1044D00009E000BF54F826006946FEF720FF0028D7 +:1044E00008D1761CF6B2AE42F4D30DF01CFC10B12C +:1044F00043F20320FEBD3E4E86F824700CB3002725 +:104500001BE000BF54F8270002A9FEF708FF00B126 +:10451000FFDF9DF808008DF8000054F8270050F8E0 +:10452000011FCDF801108088ADF8050068460DF038 +:104530001FFC00B1FFDF7F1CFFB2AF42E2D386F861 +:1045400024500020FEBD2DE9F0418AB01546884672 +:1045500004001ED00F4608222946FEF755FE00280B +:1045600011D1002613E000BF54F826006946103030 +:1045700000F01FFD002806D13FB157F82600FCF7D8 +:1045800068FE10B110200AB02EE6761CF6B2AE42DC +:10459000EAD3681EC6B217E0701CC7B212E000BFB3 +:1045A00054F82600017C4A0854F827100B7CB2EB23 +:1045B000530F05D106221130113109F011FF50B10E +:1045C0007F1CFFB2AF42EBD3761EF6B2E4D2464672 +:1045D00024B1012003E043F20520D4E700200DF0D0 +:1045E000ECFB10B90DF0F5FB20B143F20420CAE753 +:1045F000F001002064B300270DF1170826E000BF8A +:1046000054F827006946103000F0D3FC00B1FFDFFA +:1046100054F82700102250F8111FCDF8011080889F +:10462000ADF8050054F827100DF1070009F005FF5B +:1046300096B156F827101022404609F0FEFE684653 +:104640000DF07BFB00B1FFDF7F1CFFB2AF42D7D381 +:10465000FEF713FF002096E7404601F0DFFCEEE78F +:1046600030B585B00446FDF7BDF830B906200FF02F +:10467000C5FB10B1062005B030BD2046FCF7E9FDB2 +:1046800018B96068FCF732FE08B11020F3E76088C3 +:104690004AF2B811884206D82078F94D28B101288D +:1046A00006D0022804D00720E5E7FEF721FD18E038 +:1046B0006078022804D0032802D043F20220DAE70F +:1046C00085F82F00C1B200200090ADF80400022947 +:1046D0002CD0032927D0FFDF68460DF009FC04F039 +:1046E000A2FD0028C7D1606801F08BFC207858B18A +:1046F00001208DF800000DF1010001F08FFC6846EB +:104700000EF0FDFB00B1FFDF207885F82E00FEF7EC +:10471000B4FE608860B1A88580B20DF046FB00B1A0 +:10472000FFDF0020A7E78DF80500D5E74020FAE776 +:104730004FF46170EFE710B50446FCF7B0FD20B907 +:10474000606838B1FCF7C9FD08B1102010BD606881 +:1047500001F064FCCA4830F82C1F6180C178617098 +:1047600080782070002010BD2DE9F843144689465A +:104770000646FCF794FDA0B94846FCF7B7FD80B9A2 +:104780002046FCF7B3FD60B9BD4DA878012800D1E3 +:104790003CB13178FF2906D049B143F20400BDE8AD +:1047A000F8831020FBE7012801D00420F7E7CCB301 +:1047B000052811D004280FD069462046FEF776FE62 +:1047C0000028ECD1217D49B1012909D0022909D065 +:1047D000032909D00720E2E70820E0E7024604E0C9 +:1047E000012202E0022200E003228046234617460F +:1047F00000200099FEF794FE0028D0D1A0892880DF +:10480000A07BE875BDF80000A882AF75BDF8001068 +:10481000090701D5A18931B1A1892980C00704D038 +:10482000032003E006E08021F7E70220FEF7FEFB0D +:1048300086F800804946BDE8F8430020FEF71EBF19 +:104840007CB58F4C05460E46A078022803D003287D +:1048500001D008207CBD15B143F204007CBD0720C7 +:104860000FF0D4FA10B9A078032806D0FEF70CFC9C +:1048700028B1A078032804D009E012207CBD1320C1 +:104880007CBD304600F053FB0028F9D1E670FEF7FE +:104890006FFD0AF058F901208DF800008DF8010035 +:1048A0008DF802502088ADF80400E07D8DF80600F8 +:1048B00068460EF0C1F904F0B6FC0028E0D1A078FB +:1048C000032805D05FF00400FEF7B0FB00207CBD9C +:1048D000E07800F03CFB0520F6E71CB510B143F290 +:1048E00004001CBD664CA078042803D0052801D024 +:1048F00008201CBD00208DF8000001218DF801105A +:104900008DF8020068460EF097F904F08CFC002840 +:10491000EFD1A078052805D05FF00200FEF786FBF6 +:1049200000201CBDE07800F01FFB0320F6E72DE916 +:10493000FC4180460E4603250846FCF7D7FC0028BC +:1049400066D14046FEF77EFD040004D02078222880 +:1049500004D208205EE543F202005BE5A07F00F090 +:1049600003073EB1012F0CD000203146FEF727FC93 +:104970000500EFD1012F06D0022F1AD0FFDF284605 +:1049800048E50120F1E7A07D3146022801D011B1B0 +:1049900007E011203EE56846FCF758FE0028D9D113 +:1049A0006946404606F04DFE0500E8D10120A0759D +:1049B000E5E7A07D032804D1314890F83000C00716 +:1049C00001D02EB30EE026B1A07F40071ED40021F7 +:1049D00000E00121404606F054FE0500CFD1A0754D +:1049E000002ECCD03146404600F0EDFA05461128A5 +:1049F000C5D1A07F4107C2D4316844F80E1F716849 +:104A0000616040F0040020740025B8E71125B6E786 +:104A10001020FFE470B50C460546FEF713FD0100BB +:104A200005D022462846BDE87040FEF70EBD43F291 +:104A3000020070BD10B5012807D1114B9B78012BE6 +:104A400000D011B143F2040010BD0DF0E0F9BDE853 +:104A5000104004F0E8BB012300F090BA00231A468E +:104A6000194600F08BBA70B506460C460846FCF7AE +:104A7000F0FB18B92068FCF712FC18B1102070BDCB +:104A8000F0010020F84D2A7E112A04D0132A00D309 +:104A90003EB10820F3E721463046FEF77DFE60B1C7 +:104AA000EDE70920132A0DD0142A0BD0A188FF2985 +:104AB000E5D31520FEF7D2FA0020D4E90012C5E9AB +:104AC0000712DCE7A1881F29D9D31320F2E71CB510 +:104AD000E548007E132801D208201CBD00208DF877 +:104AE000000068460DF02AFC04F09DFB0028F4D17C +:104AF0001120FEF7B3FA00201CBD2DE9F04FDFF8BE +:104B000068A3814691B09AF818009B4615460C465A +:104B1000132803D3FFF7DBFF00281FD12046FCF743 +:104B200098FBE8BB2846FCF794FBC8BB20784FF005 +:104B30000107C0074FF0000102D08DF83A7001E084 +:104B40008DF83A1020788846C0F3C1008DF8000037 +:104B500060788DF80910C10803D0072011B0BDE8B6 +:104B6000F08FB0B3C10701D08DF80970810705D56A +:104B70009DF8091041F002018DF80910400705D594 +:104B80009DF8090040F004008DF809009DF8090027 +:104B9000810703D540F001008DF80900002000E0F6 +:104BA00015E06E4606EB400162884A81401CA288EF +:104BB000C0B20A820328F5D32078C0F3C1000128CF +:104BC00025D0032823D04846FCF743FB28B110200A +:104BD000C4E7FFE78DF80970D8E799F800004008AE +:104BE00008D0012809D0022807D0032805D043F2B5 +:104BF0000220B3E78DF8028001E08DF8027048468C +:104C000050F8011FCDF803108088ADF80700FEF7BB +:104C1000AFFB8DF801000021424606EB41002B88D6 +:104C2000C3826B888383AB884384EB880385491CEC +:104C3000C285C9B282860329EFD3E088ADF83C0073 +:104C400068460DF053FC002887D19AF818005546A5 +:104C5000112801D0082081E706200FF0D7F838B1DD +:104C60002078C0F3C100012804D0032802D006E058 +:104C7000122073E795F8240000283FF46EAFFEF78A +:104C800003FA022801D2132068E7584600F04FF9D2 +:104C900000289DD185F819B068460DF06DFD04F02F +:104CA000C2FA040094D1687E00F051F91220FEF798 +:104CB000D5F9204652E770B56B4D287E122801D0F9 +:104CC0000820DCE60DF05BFD04F0ADFA040005D130 +:104CD000687E00F049F91120FEF7C0F92046CEE6C3 +:104CE00070B5064615460C460846FCF7D8FA18B9C2 +:104CF0002846FCF7D4FA08B11020C0E62A4621461F +:104D000030460EF03BF804F08EFA0028F5D12178F9 +:104D10007F29F2D10520B2E67CB505460C4608464F +:104D2000FCF797FA08B110207CBD2846FEF78AFBF5 +:104D300020B10078222804D208207CBD43F2020072 +:104D40007CBD494890F83000400701D511207CBD5A +:104D50002078C00802D16078C00801D007207CBD4F +:104D6000ADF8005020788DF8020060788DF80300CF +:104D70000220ADF8040068460CF03BFE04F053FA44 +:104D80007CBD70B586B014460D460646FEF75AFB4C +:104D900028B10078222805D2082006B06FE643F239 +:104DA0000200FAE72846FCF7A1FA20B944B12046F0 +:104DB000FCF793FA08B11020EFE700202060A080F4 +:104DC000294890F83000800701D51120E5E703A9B4 +:104DD00030460CF05EFE10B104F025FADDE7ADF8C8 +:104DE0000060BDF81400ADF80200BDF81600ADF883 +:104DF0000400BDF81000BDF81210ADF80600ADF8C3 +:104E000008107DB1298809B1ADF80610698809B18B +:104E1000ADF80210A98809B1ADF80810E98809B108 +:104E2000ADF80410DCB1BDF80610814201D9081AB2 +:104E30002080BDF80210BDF81400814201D9081A83 +:104E40006080BDF80800BDF80410BDF816200144CC +:104E5000BDF812001044814201D9081AA0806846AA +:104E60000CF0D5FEB8E70000F00100201CB56C493D +:104E70000968CDE9001068460DF03AFB04F0D3F95B +:104E80001CBD1CB500200090019068460DF030FB61 +:104E900004F0C9F91CBD70B505460C460846FCF780 +:104EA000FEF908B11020EAE5214628460DF012F976 +:104EB000BDE8704004F0B7B93EB505460C4608465B +:104EC000FCF7EDF908B110203EBD002000900190E4 +:104ED0000290ADF800502089ADF8080020788DF8D8 +:104EE0000200606801902089ADF808006089ADF883 +:104EF0000A0068460DF000F904F095F93EBD0EB5C4 +:104F0000ADF800000020019068460DF0F5F804F0BF +:104F10008AF90EBD10800888508048889080C88823 +:104F200010818888D080002050819081704710B512 +:104F3000044604F0E4F830B1407830B1204604F083 +:104F4000FCFB002010BD052010BD122010BD10B5C7 +:104F500004F0D5F8040000D1FFDF607800B9FFDF6E +:104F60006078401E607010BD10B504F0C8F80400F1 +:104F700000D1FFDF6078401C607010BD1CB5ADF83B +:104F800000008DF802308DF803108DF8042068467B +:104F90000DF0B7FE04F047F91CBD0CB521A2D2E913 +:104FA0000012CDE900120079694601EB501000783B +:104FB0000CBD0278520804D0012A02D043F202202C +:104FC0007047FEF7ACB91FB56A46FFF7A3FF684606 +:104FD0000DF008FC04F027F904B010BD70B50C000A +:104FE00006460DD0FEF72EFA050000D1FFDFA680A1 +:104FF00028892081288960816889A081A889E08129 +:105000003DE500B540B1012805D0022803D00328B2 +:1050100004D0FFDF002000BDFF2000BD042000BD44 +:1050200014610200070605040302010010B50446DE +:10503000FCF70FF908B1102010BD2078C0F3021062 +:10504000042807D86078072804D3A178102901D84C +:10505000814201D2072010BDE078410706D42179B2 +:105060004A0703D4000701D4080701D5062010BD64 +:10507000002010BD10B513785C08837F64F3C7135C +:10508000837713789C08C37F64F30003C377107899 +:10509000C309487863F34100487013781C090B7802 +:1050A00064F347130B701378DB0863F30000487058 +:1050B0005078487110BD10B5C4780B7864F30003C4 +:1050C0000B70C478640864F341030B70C478A408BF +:1050D00064F382030B70C478E40864F3C3030B70B9 +:1050E0000379117863F30001117003795B0863F3AE +:1050F0004101117003799B0863F3820111700079FB +:10510000C00860F3C301117010BD70B514460D46A0 +:10511000064604F06BFA80B10178182221F00F01E5 +:10512000891C21F0F001A03100F8081B214609F08C +:1051300084F9BDE8704004F05CBA29463046BDE809 +:1051400070401322FEF781B92DE9F047064608A802 +:10515000904690E8300489461F46142200212846D4 +:1051600009F095F90021CAF80010B8F1000F03D03A +:10517000B9F1000F03D114E03878C00711D02068CE +:10518000FCF78DF8C0BBB8F1000F07D120681230D2 +:1051900028602068143068602068A8602168CAF818 +:1051A00000103878800724D56068FCF796F818BBA3 +:1051B000B9F1000F21D0FFF7E4F80168C6F86811D3 +:1051C0008188A6F86C11807986F86E0101F013FDD4 +:1051D000F94FEF60626862B196F8680106F26911F2 +:1051E00040081032FEF7FDF810223946606809F0D9 +:1051F00024F90020BDE8F08706E0606820B1E8608F +:105200006068C6F86401F4E71020F3E730B505469E +:1052100008780C4620F00F00401C20F0F0011031FF +:1052200021700020607095F8230030B104280FD061 +:10523000052811D0062814D0FFDF20780121B1EB1A +:10524000101F04D295F8200000F01F00607030BDE0 +:1052500021F0F000203002E021F0F000303020702A +:10526000EBE721F0F0004030F9E7F0B591B002270C +:1052700015460C4606463A46ADF80870092103ABC0 +:1052800005F063F80490002810D004208DF8040085 +:105290008DF80170E034099605948DF818500AA92C +:1052A000684610F0FCFA00B1FFDF012011B0F0BD3C +:1052B00010B588B00C460A99ADF80000CBB118685B +:1052C000CDF80200D3F80400CDF80600ADF80A20AE +:1052D000102203A809F0B1F868460DF0F3FA03F0C4 +:1052E000A2FF002803D1A17F41F01001A17708B0EF +:1052F00010BD0020CDF80200E6E72DE9F84F064684 +:10530000808A0D4680B28246FEF79CF804463078CB +:10531000DFF8A48200274FF00209A8F120080F2827 +:1053200070D2DFE800F06FF23708387D8CC8F1F0FA +:10533000EFF35FF3F300A07F00F00300022809D031 +:105340005FF0000080F0010150460EF0AFFD050057 +:1053500003D101E00120F5E7FFDF98F85C10C907F1 +:1053600002D0D8F860000BE0032105F11D0012F017 +:10537000BEF8D5F81D009149B0FBF1F201FB120017 +:10538000C5F81D0070686867B068A8672078252890 +:1053900000D0FFDFCAE0A07F00F00300022809D0A0 +:1053A0005FF0000080F0010150460EF07FFD060026 +:1053B00003D101E00120F5E7FFDF3078810702D556 +:1053C0002178252904D040F001003070BDE8F88F25 +:1053D00085F80090307F287106F11D002D36C5E953 +:1053E0000206F3E7A07F00F00300022808D00020A7 +:1053F00080F0010150460EF059FD040004D102E096 +:105400000120F5E7A7E1FFDF2078C10604D50720DA +:1054100028703D346C60D9E740F008002070D5E773 +:10542000E07F000700D5FFDF307CB28800F0010389 +:1054300001B05046BDE8F04F092106F064B804B948 +:10544000FFDF716821B1102204F1240008F0F5FF9C +:1054500028212046FDF75EFEA07F00F00300022811 +:105460000ED104F12400002300901A462146504634 +:10547000FFF71EFF112807D029212046FDF74AFE1D +:10548000307A84F82000A1E7A07F000700D5FFDF75 +:1054900014F81E0F40F008002070E782A761E76152 +:1054A000C109607861F34100014660F382016170D7 +:1054B000307AE0708AE7A07F00F00300022809D06C +:1054C0005FF0000080F0010150460EF0EFFC040098 +:1054D00003D101E00120F5E7FFDF022104F185009F +:1054E00012F005F80420287004F5B4706860B4F870 +:1054F00085002882304810387C346C61C5E9028010 +:1055000064E703E024E15BE02DE015E0A07F00F01C +:105510000300022807D0002080F0010150460EF061 +:10552000C5FC18B901E00120F6E7FFDF324621464D +:105530005046BDE8F84FE8E504B9FFDF20782128A0 +:10554000A1D93079012803D1E07F40F00800E0774D +:10555000324621465046FFF7D8FD2046BDE8F84FB9 +:105560002321FDF7D7BD3279AA8005F1080309216F +:10557000504604F0EAFEE86010B10520287025E7E7 +:10558000A07F00F00300022808D0002080F0010175 +:1055900050460EF08BFC040003D101E00120F5E73A +:1055A000FFDF04F1620102231022081F0EF005FB49 +:1055B00007703179417009E75002002040420F0026 +:1055C000A07F00F00300022808D0002080F0010135 +:1055D00050460EF06BFC050003D101E00120F5E719 +:1055E000FFDF95F8840000F0030001287AD1A07F46 +:1055F00000F00307E07F10F0010602D0022F04D173 +:1056000033E095F8A000C0072BD0D5F8601121B386 +:1056100095F88320087C62F387000874A17FCA098B +:10562000D5F8601162F341000874D5F8601166F393 +:1056300000000874AEB1D5F86001102204F1240115 +:10564000883508F0FAFE287E40F001002876287898 +:1056500020F0010005F8880900E016B1022F04D0FF +:105660002DE095F88800C00727D0D5F85C1121B34C +:1056700095F88320087C62F387000874A17FCA092B +:10568000D5F85C1162F341000874D5F85C1166F33B +:10569000000008748EB1D5F85C01102204F12401D9 +:1056A000883508F0CAFE287840F0010005F8180B8C +:1056B000287820F0010005F8A009022F44D000202E +:1056C00000EB400005EBC00090F88800800709D58A +:1056D00095F87C00D5F86421400805F17D01103271 +:1056E000FDF77FFE8DF8009095F884006A4600F083 +:1056F00003008DF8010095F888108DF8021095F8D8 +:10570000A0008DF803002146504601F05DFA207894 +:10571000252805D0212807D0FFDF2078222803D9AB +:1057200022212046FDF7F6FCA07F00F003000228AE +:105730000CD0002080F0010150460EF0C9FB00287B +:105740003FF44FAEFFDF41E60120B9E70120F1E76A +:10575000706847703AE6FFDF38E670B5FE4C00250A +:1057600084F85C50256610F066F804F110012046BC +:1057700003F0F8FE84F8305070BD70B50D46FDF7AB +:1057800061FE040000D1FFDF4FF4B872002128460B +:1057900008F07DFE04F124002861A07F00F00300E2 +:1057A000022809D05FF0010105F1E00010F044F893 +:1057B000002800D0FFDF70BD0221F5E70A46014650 +:1057C00002F1E00010F059B870B50546406886B0A7 +:1057D00001780A2906D00D2933D00E292FD0FFDFFA +:1057E00006B070BD86883046FDF72CFE040000D15F +:1057F000FFDF20782128F3D028281BD168680221F8 +:105800000E3001F0D6F9A8B168680821801D01F0BA +:10581000D0F978B104F1240130460DF00FFA03F00D +:1058200002FD00B1FFDF06B02046BDE8704029212F +:10583000FDF770BC06B0BDE8704003F0DABE012190 +:1058400001726868C6883046FDF7FCFD040000D18F +:10585000FFDFA07F00F00301022902D120F0100039 +:10586000A077207821280AD06868017A09B10079E8 +:1058700080B1A07F00F00300022862D0FFDFA07F8C +:1058800000F003000228ABD1FEF72DF80028A7D0C6 +:10589000FFDFA5E703F0ADFEA17F08062BD5E07F73 +:1058A000C00705D094F8200000F01F00102820D079 +:1058B0005FF0050084F82300207829281DD02428D3 +:1058C000DDD13146042012F0F9F822212046FDF7FF +:1058D00021FCA07F00F00300022830D05FF0000020 +:1058E00080F0010130460EF0F3FA0028C7D0FFDF48 +:1058F000C5E70620DEE70420DCE701F0030002280C +:1059000008D0002080F0010130460EF0CFFA0500EB +:1059100003D101E00120F5E7FFDF25212046FDF757 +:10592000F9FB03208DF80000694605F1E0000FF057 +:105930009BFF0228A3D00028A1D0FFDF9FE7012012 +:10594000CEE703F056FE9AE72DE9F04387B099467B +:10595000164688460746FDF775FD04004BD02078B3 +:10596000222848D3232846D0E07F000743D4A07FD5 +:1059700000F00300022809D05FF0000080F0010170 +:1059800038460EF093FA050002D00CE00120F5E74E +:10599000A07F00F00300022805D001210022384634 +:1059A0000EF07BFA05466946284601F034F9009866 +:1059B00000B9FFDF45B10098E03505612078222865 +:1059C00006D0242804D007E000990020086103E0F5 +:1059D00025212046FDF79EFB00980121417047627A +:1059E000868001A9C0E902890FF059FF022802D080 +:1059F000002800D0FFDF07B0BDE8F08370B586B0A7 +:105A00000546FDF71FFD017822291ED9807F00F091 +:105A10000300022808D0002080F0010128460EF083 +:105A200045FA04002FD101E00120F5E7FFDF2AE06D +:105A3000B4F85E0004F1620630440178427829B17E +:105A400021462846FFF711FCB0B9C9E6ADF804209D +:105A50000921284602AB04F078FC03900028F4D01A +:105A600005208DF80000694604F1E0000FF0FCFE0F +:105A7000022801D000B1FFDF02231022314604F1D9 +:105A80005E000EF0D0F8B4F860000028D0D1A7E690 +:105A900010B586B00446FDF7D5FC017822291BD944 +:105AA000807F00F00300022808D0002080F0010170 +:105AB00020460EF0FBF9040003D101E00120F5E7D8 +:105AC000FFDF06208DF80000694604F1E0000FF0CA +:105AD000CBFE002800D0FFDF06B010BD2DE9F05F3F +:105AE00005460C4600270078904601093E4604F121 +:105AF000080BBA4602297DD0072902D00A2909D10C +:105B000046E0686801780A2905D00D2930D00E29B1 +:105B10002ED0FFDFBBE114271C26002C6BD0808821 +:105B2000A080FDF78FFC5FEA000900D1FFDF99F844 +:105B300017005A46400809F11801FDF752FC686841 +:105B4000C0892082696851F8060FC4F812004868BD +:105B5000C4F81600A07E01E03002002020F006000C +:105B600040F00100A07699F81E0040F020014DE0C1 +:105B70001A270A26002CD1D0C088A080FDF762FC2D +:105B8000050000D1FFDF59462846FFF73FFB7EE1C5 +:105B90000CB1A88BA080287A0B287DD006DC0128C8 +:105BA0007BD0022808D0032804D135E00D2875D019 +:105BB0000E2874D0FFDF6AE11E270926002CADD025 +:105BC000A088FDF73FFC5FEA000900D1FFDF287BDA +:105BD00000F003000128207A1BD020F00100207281 +:105BE000297B890861F341002072297BC90861F390 +:105BF000820001E041E1F2E02072297B090961F3B2 +:105C0000C300207299F81E0040F0400189F81E1070 +:105C10003DE140F00100E2E713270D26002CAAD059 +:105C2000A088FDF70FFC8146807F00F0030002286A +:105C300008D0002080F00101A0880EF037F905009F +:105C400003D101E00120F5E7FFDF99F81E0000F025 +:105C50000302022A50D0686F817801F00301012904 +:105C6000217A4BD021F00101217283789B0863F3E4 +:105C7000410121728378DB0863F38201217283780A +:105C80001B0963F3C3012172037863F306112172C8 +:105C9000437863F3C71103E061E0A9E090E0A1E07D +:105CA000217284F809A0C178A172022A29D0027950 +:105CB000E17A62F30001E1720279520862F3410174 +:105CC000E1720279920862F38201E1720279D208EC +:105CD00062F3C301E1724279217B62F30001217317 +:105CE0004279520862F3410121734279920862F3CA +:105CF00082012173407928E0A86FADE741F00101EE +:105D0000B2E74279E17A62F30001E1724279520826 +:105D100062F34101E1724279920862F38201E17219 +:105D20004279D20862F3C301E1720279217B62F306 +:105D3000000121730279520862F341012173027953 +:105D4000920862F3820121730079C00860F3C301F5 +:105D5000217399F80000232831D9262140E0182723 +:105D60001026E4B3A088FDF76DFB8346807F00F02A +:105D70000300022809D0002080F00101A0880EF065 +:105D800095F85FEA000903D101E00120F4E7FFDFA5 +:105D9000E868A06099F8000040F0040189F800105C +:105DA00099F80100800708D5012020739BF80000B6 +:105DB00023286CD92721584651E084F80CA066E0CE +:105DC00015270F265CB1A088FDF73CFB8146062213 +:105DD0005946E86808F0C7FB0120A073A0E041E045 +:105DE00048463CE016270926E4B3287B20724EE0A3 +:105DF000287B19270E26ACB3C4F808A0A4F80CA081 +:105E0000012807D0022805D0032805D0042803D094 +:105E1000FFDF0DE0207207E0697B042801F00F012D +:105E200041F0800121721ED0607A20F00300607280 +:105E3000A088FDF707FB05460078212827D02328F6 +:105E400000D0FFDFA87F00F00300022813D000205D +:105E500080F00101A0880EF03BF822212846FDF7D2 +:105E600059F914E004E0607A20F00300401CDEE7FA +:105E7000A8F8006010E00120EAE70CB16888A08073 +:105E8000287A68B301280AD002284FD0FFDFA8F88B +:105E900000600CB1278066800020BDE8F09F1527C8 +:105EA0000F26002CE4D0A088FDF7CCFA807F00F00C +:105EB0000300022808D0002080F00101A0880DF026 +:105EC000F5FF050003D101E00120F5E7FFDFD5F87C +:105ED0001D000622594608F046FB84F80EA0D6E7BE +:105EE00017270926002CC3D0A088FDF7ABFA8146FE +:105EF000807F00F00300022808D0002080F001011C +:105F0000A0880DF0D3FF050003D101E00120F5E7E3 +:105F1000FFDF6878800701D5022000E001202072B1 +:105F200099F800002328B2D9272159E719270E260E +:105F3000002C9DD0A088FDF785FA5FEA000900D10A +:105F4000FFDFC4F808A0A4F80CA084F808A0A07A89 +:105F500040F00300A07299F81E10C90961F3820095 +:105F6000A07299F81F2099F81E1012EAD11F05D0CF +:105F700099F8201001F01F0110292BD020F0080003 +:105F8000A07299F81F10607A61F3C3006072697A99 +:105F900001F003010129A2D140F00400607299F8D8 +:105FA0001E0000F003000228E87A16D0217B60F37F +:105FB00000012173AA7A607B62F300006073EA7AC1 +:105FC000520862F341012173A97A490861F3410043 +:105FD00060735CE740F00800D2E7617B60F300018A +:105FE0006173AA7A207B62F300002073EA7A520878 +:105FF00062F341016173A97A490861F3410020739A +:1060000045E710B5FE4C30B10146102204F12000E6 +:1060100008F013FA012084F8300010BD10B50446D2 +:1060200000F0E9FDF64920461022BDE8104020317D +:1060300008F003BA70B5F24D06004FF0000413D01B +:10604000FBF707F908B110240CE00621304608F0F0 +:1060500071FA411C05D028665FF0010085F85C00EC +:1060600000E00724204670BD0020F7E7007810F01C +:106070000F0204D0012A05D0022A0CD110E0000939 +:1060800009D10AE00009012807D0022805D0032819 +:1060900003D0042801D00720704708700020704703 +:1060A0000620704705282AD2DFE800F003070F1703 +:1060B0001F00087820F0FF001EE0087820F00F0095 +:1060C000401C20F0F000103016E0087820F00F009F +:1060D000401C20F0F00020300EE0087820F00F0087 +:1060E000401C20F0F000303006E0087820F00F006F +:1060F000401C20F0F000403008700020704707205E +:1061000070472DE9F041804688B00D4600270846CB +:10611000FBF7ECF8A8B94046FDF794F9040003D06A +:106120002078222815D104E043F2020008B0BDE82F +:10613000F08145B9A07F410603D500F00300022895 +:1061400001D01020F2E7A07FC10601D4010702D5DB +:106150000DB10820EAE7E17F090701D50D20E5E749 +:1061600000F0030002280DD165B12846FEF75EFF5E +:106170000700DBD1FBF736FB20B9E878800701D5B3 +:106180000620D3E7A07F00F00300022808D00020FB +:1061900080F0010140460DF089FE060002D00FE0BC +:1061A0000120F5E7A07F00F0030002280ED00020B8 +:1061B00080F00101002240460DF06FFE060007D07E +:1061C000A07F00F00300022804D009E00120EFE7DF +:1061D0000420ABE725B12A4631462046FEF74AFFA8 +:1061E0006946304600F017FD009800B9FFDF0099BE +:1061F000022006F1E0024870C1F824804A610022C2 +:106200000A81A27F02F00302022A1CD00120087139 +:10621000287800F00102087E62F3010008762A78EF +:10622000520862F3820008762A78920862F3C3006B +:1062300008762A78D20862F30410087624212046D2 +:10624000FCF768FF33E035B30871301D88613078A2 +:10625000400908777078C0F340004877287800F04C +:106260000102887F62F301008877A27FD20962F37E +:1062700082008877E27F62F3C3008877727862F3E6 +:1062800004108877A878C87701F1210228462031C8 +:10629000FEF711FF03E00320087105200876252191 +:1062A0002046FCF737FFA07F20F04000A07701A92F +:1062B00000980FF0F4FA022801D000B1FFDF384651 +:1062C00034E72DE9FF4F8DB09A4693460D460027DF +:1062D0000D98FDF7B7F8060006D03078262806D0CE +:1062E000082011B0BDE8F08F43F20200F9E7B07F5B +:1062F00000F00309B9F1020F11D04DB95846FEF76D +:1063000095FE0028EDD1B07F00F00300022806D0F2 +:10631000BBF1000F11D0FBF765FA20B10DE0BBF126 +:10632000000F50D109E006200DF068FD28B19BF860 +:106330000300800701D50620D3E7B07F00F00300FB +:10634000022809D05FF0000080F001010D980DF0E7 +:10635000ADFD040003D101E00120F5E7FFDF852D4D +:1063600027D007DCEDB1812D1DD0822D1DD0832DCE +:1063700008D11CE0862D1ED0882D1ED0892D1ED060 +:106380008A2D1ED00F2020710F281CD003F02EF96B +:10639000D8B101208DF81400201D06902079B0B1ED +:1063A00056E10020EFE70120EDE70220EBE70320B4 +:1063B000E9E70520E7E70620E5E70820E3E709200D +:1063C000E1E70A20DFE707208BE7112089E7B9F131 +:1063D000020F03D0A56F03D1A06F02E0656FFAE74B +:1063E000606F804631D04FF0010001904FF0020005 +:1063F00000905A4621463046FEF73CFE02E000007F +:10640000300200209BF8000000F00101A87861F341 +:106410000100A870B17FC90961F38200A870F17F03 +:1064200061F3C300A870617861F30410A87020784C +:10643000400928706078C0F3400068709BF8020043 +:10644000E87000206871287103E0022001900120AB +:106450000090A87898F80210C0F3C000C1F3C00102 +:10646000084003902CD05046FAF7F3FEC0BBDAF890 +:106470000C00FAF7EEFE98BBDAF81C00FAF7E9FE1A +:1064800070BBDAF80C00A060DAF81C00E0606078FD +:1064900098F8012042EA500161F34100607098F8D9 +:1064A0000210C0B200EA111161F300006070002018 +:1064B0002077009906F11700022907D0012106E094 +:1064C000607898F8012002EA5001E5E7002104EB2A +:1064D000810148610199701C022902D0012101E06B +:1064E00028E0002104EB81014861A87800F0030056 +:1064F000012857D198F8020000F00300012851D17B +:10650000B9F1020F04D02A1D691D5846FEF7D3FDCC +:10651000287998F8041008408DF82C00697998F8CB +:10652000052011408DF8301008433BD05046FAF753 +:1065300090FE08B11020D4E60AF110018B46B9F1A3 +:10654000020F17D00846002104F18C03CDE90003A7 +:1065500004F5AE7202920BAB2046039AFEF7F4FDEF +:106560000028E8D1B9F1020F08D0504608D14FF009 +:10657000010107E050464FF00101E5E75846F5E715 +:106580004FF0000104F1A403CDE9000304F5B0725B +:10659000029281F001010CAB2046039AFEF7D4FD74 +:1065A0000028C8D16078800733D4A87898F8021002 +:1065B000C0F38000C1F3800108432AD0297898F8FD +:1065C0000000F94AB9F1020F06D032F81120430059 +:1065D000DA4002F003070AE032F810204B00DA40FC +:1065E00012F0030705D0012F0AD0022F0AD0032F83 +:1065F00006D0039A6AB1012906D0042904D008E024 +:106600000227F6E70127F4E7012801D0042800D18A +:106610000427B07F40F08000B077F17F039860F3EB +:106620000001F1776078800705D50320A0710398F9 +:1066300070B9002029E00220022F18D0012F18D0B5 +:10664000042F2AD00020A071B07F20F08000B07706 +:1066500025213046FCF75EFD05A904F1E0000FF0AE +:1066600003F910B1022800D0FFDF002039E6A07145 +:10667000DFE7A0710D22002104F1200007F007FFE1 +:10668000207840F00200207001208DF8100004AA4C +:1066900031460D9800F098FADAE70120A071D7E7AB +:1066A0002DE9F04387B09046894604460025FCF763 +:1066B000C9FE060006D03078272806D0082007B08B +:1066C000BDE8F08343F20200F9E7B07F00F0030079 +:1066D000022809D05FF0000080F0010120460DF093 +:1066E000E5FB040003D101E00120F5E7FFDFA77916 +:1066F0005FEA090005D0012821D0B9F1020F26D1A7 +:1067000010E0B8F1000F22D1012F05D0022F05D0E3 +:10671000032F05D0FFDF2EE00C252CE001252AE019 +:10672000022528E04046FAF794FDB0B9032F0ED1B8 +:106730001022414604F11D0007F07FFE1BE0012FEF +:1067400002D0022F03D104E0B8F1000F13D00720CC +:10675000B5E74046FAF77DFD08B11020AFE71022FB +:10676000002104F11D0007F092FE0621404607F0CB +:10677000E1FEC4F81D002078252140F002002070C1 +:106780003046FCF7C7FC2078C10713D020F0010089 +:10679000207002208DF8000004F11D0002908DF899 +:1067A00004506946C3300FF05FF8022803D010B1DF +:1067B000FFDF00E02577002081E730B587B00D4688 +:1067C0000446FCF73FFE98B1807F00F003000228EA +:1067D00011D0002080F0010120460DF067FB04007D +:1067E0000ED02846FAF735FD38B1102007B030BD7D +:1067F00043F20200FAE70120ECE72078400701D4D9 +:106800000820F3E7294604F13D002022054607F061 +:1068100014FE207840F01000207001070FD520F002 +:106820000800207007208DF80000694604F1E000A0 +:1068300001950FF019F8022801D000B1FFDF002008 +:10684000D4E770B50D460646FCF7FCFD18B101789B +:10685000272921D102E043F2020070BD807F00F0C1 +:106860000300022808D0002080F0010130460DF01E +:106870001DFB040003D101E00120F5E7FFDFA07953 +:10688000022809D16078C00706D02A462146304642 +:10689000FEF7EBFC10B10FE0082070BDB4F860000B +:1068A0000E280BD204F1620102231022081F0DF002 +:1068B00084F9012101704570002070BD112070BD68 +:1068C00070B5064614460D460846FAF7C2FC18B9DC +:1068D0002046FAF7E4FC08B1102070BDA6F57F4011 +:1068E000FF380ED03046FCF7ADFD38B14178224676 +:1068F0004B08811C1846FCF774FD07E043F20200C8 +:1069000070BD2046FDF7A5FD0028F9D11021E01D3E +:1069100010F0EDFDE21D294604F1170000F08BF99F +:10692000002070BD2DE9F04104468AB01546884626 +:1069300000270846FAF7DAFC18B92846FAF7D6FC19 +:1069400018B110200AB0BDE8F0812046FCF77AFDAE +:10695000060003D0307827281BD102E043F2020062 +:10696000F0E7B07F00F00300022809D05FF00000DC +:1069700080F0010120460DF099FA040003D101E0F6 +:106980000120F5E7FFDF2078400702D56078800717 +:1069900001D40820D6E7B07F00F00300022805D01C +:1069A000A06F05D1A16F04E01C610200606FF8E7E1 +:1069B000616F407800B19DB1487810B1B8F1000F17 +:1069C0000ED0ADB1EA1D06A8E16800F034F910223E +:1069D00006A905F1170007F003FD18B1042707E029 +:1069E0000720AFE71022E91D04F12D0007F025FD77 +:1069F000B8F1000F06D0102208F1070104F11D00C4 +:106A000007F01BFD2078252140F002002070304661 +:106A1000FCF780FB2078C10715D020F00100207022 +:106A200002208DF8000004F11D0002901030039048 +:106A30008DF804706946B3300EF016FF022803D0BB +:106A400010B1FFDF00E0277700207BE7F8B515469F +:106A50000E460746FCF7F6FC040004D020782228F6 +:106A600004D00820F8BD43F20200F8BDA07F00F07A +:106A70000300022802D043F20500F8BD3046FAF7C1 +:106A8000E8FB18B92846FAF7E4FB08B11020F8BD76 +:106A900000953288B31C21463846FEF709FC1128C0 +:106AA00015D00028F3D1297C4A08A17F62F3C711D1 +:106AB000A177297CE27F61F30002E277297C8908D3 +:106AC00084F82010A17F21F04001A177F8BDA17FBB +:106AD0000907FBD4D6F80200C4F83600D6F8060041 +:106AE000C4F83A003088A0861022294604F1240018 +:106AF00007F0A3FC287C4108E07F61F34100E077C8 +:106B0000297C61F38200E077287C800884F82100EA +:106B1000A07F40F00800A0770020D3E770B50D46B5 +:106B200006460BB1072070BDFCF78CFC040007D0B3 +:106B30002078222802D3A07F800604D4082070BDCC +:106B400043F2020070BDADB1294630460CF076F834 +:106B500002F069FB297C4A08A17F62F3C711A17783 +:106B6000297CE27F61F30002E277297C890884F8BE +:106B7000201004E030460CF084F802F054FBA17FB2 +:106B800021F02001A17770BD70B50D46FCF75AFCCD +:106B9000040005D02846FAF782FB20B1102070BD12 +:106BA00043F2020070BD29462046FEF72FFB00206D +:106BB00070BD04E010F8012B0AB100207047491E97 +:106BC00089B2F7D20120704770B51546064602F02B +:106BD0000DFD040000D1FFDF207820F00F00801CA5 +:106BE00020F0F0002030207066802868A060BDE8AA +:106BF000704002F0FEBC10B5134C94F83000002831 +:106C000008D104F12001A1F110000EF06FFE012067 +:106C100084F8300010BD10B190F8B9202AB10A48AC +:106C200090F8350018B1002003E0B83001E00648C4 +:106C300034300860704708B50023009313460A46B5 +:106C40000DF031FB08BD00003002002018B1817842 +:106C5000012938D101E010207047018842F6011265 +:106C6000881A914231D018DC42F60102A1EB0200F1 +:106C700091422AD00CDC41B3B1F5C05F25D06FF44E +:106C8000C050081821D0A0F57060FF381BD11CE05F +:106C900001281AD002280AD117E0B0F5807F14D05D +:106CA00008DC012811D002280FD003280DD0FF28BE +:106CB00009D10AE0B0F5817F07D0A0F580700338D4 +:106CC00003D0012801D0002070470F2070470A2808 +:106CD0001FD008DC0A2818D2DFE800F0191B1F1F9C +:106CE000171F231D1F21102815D008DC0B2812D0D8 +:106CF0000C2810D00D2816D00F2806D10DE0112831 +:106D00000BD084280BD087280FD003207047002099 +:106D1000704705207047072070470F2070470420F8 +:106D20007047062070470C20704743F202007047FE +:106D300038B50C46050041D06946FFF797F90028A1 +:106D400019D19DF80010607861F302006070694607 +:106D5000681CFFF78BF900280DD19DF800106078B2 +:106D600061F3C5006070A978C1F34101012903D026 +:106D7000022905D0072038BD217821F0200102E04A +:106D8000217841F020012170410704D0A978C90879 +:106D900061F386106070607810F0380F07D0A97822 +:106DA000090961F3C710607010F0380F02D16078E4 +:106DB000400603D5207840F040002070002038BD08 +:106DC00070B504460020088015466068FFF7B0FFE4 +:106DD000002816D12089A189884211D8606880785E +:106DE000C0070AD0B1F5007F0AD840F20120B1FBFC +:106DF000F0F200FB1210288007E0B1F5FF7F01D907 +:106E00000C2070BD01F201212980002070BD10B559 +:106E10000478137864F3000313700478640864F34F +:106E2000410313700478A40864F382031370047898 +:106E3000E40864F3C30313700478240964F30413AF +:106E400013700478640964F34513137000788009A3 +:106E500060F38613137031B10878C10701D1800740 +:106E600001D5012000E0002060F3C713137010BDAE +:106E70004278530702D002F0070306E012F0380F01 +:106E800002D0C2F3C20300E001234A7863F3020296 +:106E90004A70407810F0380F02D0C0F3C20005E00D +:106EA000430702D000F0070000E0012060F3C502B4 +:106EB0004A7070472DE9F04F95B00D00824613D00F +:106EC00012220021284607F0E2FA4FF6FF7B05AABE +:106ED0000121584607F0A3F80024264637464FF410 +:106EE00020586FF4205972E0102015B0BDE8F08FE3 +:106EF0009DF81E0001280AD1BDF81C1041450BD099 +:106F000011EB09000AD001280CD002280CD0042C67 +:106F10000ED0052C0FD10DE0012400E00224BDF8B5 +:106F20001A6008E0032406E00424BDF81A7002E0A9 +:106F3000052400E00624BDF81A10514547D12C74F1 +:106F4000BEB34FF0000810AA4FF0070ACDE9028245 +:106F5000CDE900A80DF13C091023CDF81090424670 +:106F60003146584607F02BF908BBBDF83C002A46CD +:106F7000C0B210A90EF045FDC8B9AE81CFB1CDE9C0 +:106F800000A80DF1080C0AAE40468CE8410213231C +:106F900000223946584607F012F940B9BDF83C00C6 +:106FA000F11CC01EC0B22A1D0EF02BFD10B1032033 +:106FB0009BE70AE0BDF82900E881062C05D19DF881 +:106FC0001E00A872BDF81C00288100208DE705A8CE +:106FD00007F031F800288BD0FFF779FE85E72DE91F +:106FE000F0471C46DDE90978DDF8209015460E00D3 +:106FF000824600D1FFDF0CB1208818B1D5B1112035 +:10700000BDE8F087022D01D0012100E0002106F14A +:10701000140005F0CDFEA8F8000002463B462946C4 +:10702000504603F092F9C9F8000008B9A41C3C606E +:107030000020E5E71320E3E7F0B41446DDE904524D +:107040008DB1002314B1022C09D101E0012306E027 +:107050000D7CEE0703D025F0010501230D742146B8 +:10706000F0BC04F050BA1A80F0BC70472DE9FE4F16 +:1070700091461A881C468A468046FAB102AB4946B8 +:1070800003F063F9050019D04046A61C27880DF0CF +:1070900050F83246072629463B4600960CF05FFC26 +:1070A00020882346CDE900504A4651464046FFF726 +:1070B000C3FF002020800120BDE8FE8F0020FBE7F9 +:1070C0002DE9F04786B082460EA8904690E8B000C1 +:1070D000894604AA05A903A88DE807001E462A468A +:1070E00021465046FFF77BFF039901B1012139701A +:1070F000002818D1FA4904F1140204AB086003987F +:1071000005998DE8070042464946504606F003FAC5 +:10711000A8B1092811D2DFE800F005080510100A0F +:107120000C0C0E00002006B06AE71120FBE70720D8 +:10713000F9E70820F7E70D20F5E70320F3E7BDF8AE +:1071400010100398CDE9000133462A4621465046E7 +:10715000FFF772FFE6E72DE9F04389B01646DDE957 +:1071600010870D4681461C461422002103A807F013 +:107170008EF9012002218DF810108DF80C008DF889 +:107180001170ADF8146064B1A278D20709D08DF8FF +:107190001600E088ADF81A00A088ADF81800A068C5 +:1071A000079008A80095CDE90110424603A948467A +:1071B0006B68FFF785FF09B0BDE8F083F0B58BB0D1 +:1071C00000240646069407940727089405A8099406 +:1071D000019400970294CDE903400D461023224606 +:1071E000304606F0ECFF78B90AA806A9019400978A +:1071F0000294CDE90310BDF8143000222946304630 +:1072000006F07BFD002801D0FFF761FD0BB0F0BD5B +:1072100006F00CBC2DE9FC410C468046002602F02D +:10722000E5F9054620780D287ED2DFE800F0BC079E +:1072300013B325BD49496383AF959B00A8480068F7 +:1072400020B1417841F010014170ADE0404602F0BC +:10725000FDF9A9E0042140460CF028FE070000D10A +:10726000FFDF07F11401404605F037FDA5BB1321F0 +:107270004046FDF7CFFB97E0042140460CF016FE98 +:10728000070000D1FFDFE088ADF800000020B881E2 +:107290009DF80000010704D5C00602D5A088B8817A +:1072A00005E09DF8010040067ED5A088F88105B96B +:1072B000FFDF22462946404601F0ACFC022673E07F +:1072C000E188ADF800109DF8011009060FD50728D8 +:1072D00003D006280AD00AE024E0042140460CF03E +:1072E000E5FD060000D1FFDFA088F0810226CDB9C0 +:1072F000FFDF17E0042140460CF0D8FD070000D165 +:10730000FFDF07F1140006F0C8FB90F0010F02D177 +:10731000E079000648D5387C022640F00200387437 +:1073200005B9FFDF224600E03DE02946404601F076 +:1073300071FC39E0042140460CF0B8FD017C002DC1 +:1073400001F00206C1F340016171017C21F00201EC +:107350000174E7D1FFDFE5E702260121404602F094 +:10736000A7F921E0042140460CF0A0FD0546606825 +:1073700000902089ADF8040001226946404602F0E1 +:10738000B8F9287C20F0020028740DE0002DC9D146 +:10739000FFDFC7E7022600214046FBF799F8002DE2 +:1073A000C0D1FFDFBEE7FFDF3046BDE8FC813EB560 +:1073B0000C0009D001466B4601AA002006F084FFAC +:1073C00020B1FFF784FC3EBD10203EBD0020208090 +:1073D000A0709DF8050002A900F00700FEF762FE0C +:1073E00050B99DF8080020709DF8050002A9C0F36F +:1073F000C200FEF757FE08B103203EBD9DF808000D +:1074000060709DF80500C109A07861F30410A070B8 +:107410009DF80510890961F3C300A0709DF8041060 +:10742000890601D5022100E0012161F342009DF8A7 +:10743000001061F30000A07000203EBD70B514463E +:1074400006460D4651EA040005D075B10846F9F725 +:1074500044FF78B901E0072070BD2946304606F0A8 +:107460009AFF10B1BDE8704031E454B12046F9F7FD +:1074700034FF08B1102070BD21463046BDE8704091 +:1074800095E7002070BD2DE9FC5F0C46904605464F +:10749000002701780822007A3E46B2EB111F7DD109 +:1074A00004F10A0100910A31821E4FF0020A04F130 +:1074B000080B0191092A72D2DFE802F0EDE005F530 +:1074C00028287BAACE00688804210CF0EFFC060077 +:1074D00000D1FFDFB08928B152270726C3E00000A2 +:1074E0009402002051271026002C7DD06888A080AF +:1074F0000120A071A88900220099FFF79FFF0028B2 +:1075000073D1A8892081288AE081D1E0B5F8129052 +:10751000072824D1E87B000621D5512709F1140062 +:1075200086B2002CE1D0A88900220099FFF786FFDF +:1075300000285AD16888A08084F806A0A8892081F4 +:107540000120A073288A2082A4F81290A88A0090B3 +:1075500068884B46A969019A01F038FBA8E05027DA +:1075600009F1120086B2002C3ED0A88900225946AB +:10757000FFF764FF002838D16888A080A889E080E0 +:10758000287A072813D002202073288AE081E87B1C +:10759000C0096073A4F81090A88A01E085E082E039 +:1075A000009068884B4604F11202A969D4E70120D3 +:1075B000EAE7B5F81290512709F1140086B2002CC1 +:1075C00066D0688804210CF071FC83466888A0802E +:1075D000A88900220099FFF731FF00286ED184F8B6 +:1075E00006A0A889208101E052E067E00420A07392 +:1075F000288A2082A4F81290A88A009068884B46B6 +:10760000A969019A01F0E2FAA989ABF80E104FE0DE +:107610006888FBF717FF0746688804210CF046FCD2 +:10762000064607B9FFDF06B9FFDF687BC00702D057 +:107630005127142601E0502712264CB36888A080F9 +:10764000502F06D084F806A0287B594601F0CEFAC8 +:107650002EE0287BA11DF9E7FE49A88949898142CE +:1076600005D1542706269CB16888A08020E05327C6 +:107670000BE06888A080A889E08019E06888042170 +:107680000CF014FC00B9FFDF55270826002CF0D1C0 +:10769000A8F8006011E056270726002CF8D068886B +:1076A000A080002013E0FFDF02E0012808D0FFDF08 +:1076B000A8F800600CB1278066800020BDE8FC9F20 +:1076C00057270726002CE3D06888A080687AA0712D +:1076D000EEE7401D20F0030009B14143091D01EB15 +:1076E0004000704713B5DB4A00201071009848B184 +:1076F000002468460CF0F7F9002C02D1D64A009914 +:1077000011601CBD01240020F4E770B50D4614463D +:10771000064686B05C220021284606F0B8FE04B971 +:10772000FFDFA0786874A2782188284601F089FAE2 +:107730000020A881E881228805F11401304605F077 +:10774000B0FA6A460121304606F069FC1AE000BF33 +:107750009DF80300000715D5BDF806103046FFF769 +:107760002DFD9DF80300BDF8061040F010008DF8C7 +:107770000300BDF80300ADF81400FF233046059A5E +:1077800006F0D1FD684606F056FC0028E0D006B0B1 +:1077900070BD10B50C4601F1140005F0BAFA0146AF +:1077A000627C2046BDE8104001F080BA30B5044646 +:1077B000A84891B04FF6FF75C18905AA284606F082 +:1077C0002EFC30E09DF81E00A0422AD001282AD1CC +:1077D000BDF81C00B0F5205F03D042F601018842DD +:1077E00021D1002002AB0AAA0CA9019083E807006E +:1077F00007200090BDF81A1010230022284606F03A +:10780000DEFC38B9BDF828000BAAC0B20CA90EF0F6 +:10781000F8F810B1032011B030BD9DF82E00A04241 +:1078200001D10020F7E705A806F005FC0028C9D023 +:107830000520F0E770B5054604210CF037FB040085 +:1078400000D1FFDF04F114010C46284605F045FA8B +:1078500021462846BDE8704005F046BA70B58AB0AA +:107860000C460646FBF7EEFD050014D028782228CA +:1078700027D30CB1A08890B101208DF80C00032013 +:107880008DF8100000208DF8110054B1A088ADF8DB +:107890001800206807E043F202000AB070BD09201A +:1078A000FBE7ADF818000590042130460CF0FEFA15 +:1078B000040000D1FFDF04F1140005F040FA0007D6 +:1078C00001D40820E9E701F091FE60B108A8022187 +:1078D0000094CDE9011095F8232003A93046636890 +:1078E000FFF7EEFBD9E71120D7E72DE9F04FB2F80B +:1078F00002A0834689B0154689465046FBF7A2FD93 +:107900000746042150460CF0D1FA0026044605969D +:107910004FF002080696ADF81C6007B9FFDF04B906 +:10792000FFDF4146504603F055FF50B907AA06A9AC +:1079300005A88DE807004246214650466368FFF7D8 +:107940004EFB444807AB0660DDE9051204F1140064 +:10795000CDF80090CDE90320CDE9013197F823203F +:10796000594650466B6805F033FA06000AD0022EDD +:1079700004D0032E14D0042E00D0FFDF09B030460F +:10798000BDE8F08FBDF81C000028F7D00599CDE9BF +:1079900000104246214650466368FFF74DFBEDE775 +:1079A000687840F008006870E8E710B50C46FFF70B +:1079B000BFF900280BD1607800F00701012905D13B +:1079C00010F0380F02D02078810601D5072010BDB5 +:1079D00040F0C8002070002010BD2DE9F04F99B094 +:1079E00004464FF000081B48ADF81C80ADF820801D +:1079F000ADF82480A0F80880ADF81480ADF81880A8 +:107A0000ADF82880ADF82C80007916460D46474623 +:107A1000012808D0022806D0032804D0042802D068 +:107A2000082019B0ACE72046F9F713FCF0BB284654 +:107A3000F9F70FFCD0BB6068F9F758FCB0BB606881 +:107A400068B160892189884202D8B1F5007F05D9E3 +:107A50000C20E6E7940200201800002080460EAAC1 +:107A600006A92846FFF7ACF90028DAD168688078C3 +:107A7000C0F34100022808D19DF8190010F0380F1A +:107A800003D02869F9F729FC80B905A92069FFF717 +:107A90004FF90028C5D1206950B1607880079DF862 +:107AA000150000F0380002D5F0B301E011E0D8BBBA +:107AB0009DF8140080060ED59DF8150010F0380FC3 +:107AC00003D06068F9F709FC18B96068F9F70EFC93 +:107AD00008B11020A5E70BA906A8FFF7C9F99DF882 +:107AE0002D000BA920F00700401C8DF82D006069C7 +:107AF000FFF75BFF002894D10AA9A069FFF718F9E6 +:107B000000288ED19DF8280080062BD4A06940B1B2 +:107B10009DF8290000F00701012923D110F0380F4A +:107B200020D0E06828B100E01CE00078D0B11C282B +:107B300018D20FAA611C2046FFF769F901213846C7 +:107B400061F30F2082468DF85210B94642F60300C9 +:107B50000F46ADF850000DF13F0218A928680DF04E +:107B600052FF08B107205CE79DF8600015A9CDF829 +:107B70000090C01CCDE9019100F0FF0B00230BF237 +:107B80000122514614A806F075F9E8BBBDF854006F +:107B90000C90FB482A8929690092CDE901106B8974 +:107BA000BDF838202868069906F064F9010077D1FD +:107BB00020784FF0020AC10601D4800616D58DF850 +:107BC000527042F60210ADF85000CDF80C9008A9A2 +:107BD00003AACDF800A0CDE90121002340F2032241 +:107BE00014A80B9906F046F9010059D1E4484D4616 +:107BF00008380089ADF83D000FA8CDE90290CDF816 +:107C00000490CDF8109000E00CE04FF007095B46BF +:107C10000022CDF80090BDF854104FF6FF7006F02A +:107C20006CF810B1FFF753F8FBE69DF83C00000636 +:107C300024D52946012060F30F218DF852704FF4AE +:107C400024500395ADF8500062789DF80C00002395 +:107C500062F300008DF80C006278CDF800A05208A5 +:107C600062F341008DF80C0003AACDE9012540F232 +:107C7000032214A806F0FEF8010011D1606880B359 +:107C80002069A0B905A906A8FFF7F2F86078800777 +:107C900007D49DF8150020F038008DF8150006E097 +:107CA00077E09DF8140040F040008DF814008DF846 +:107CB000527042F60110ADF85000208940F20121C7 +:107CC000B0FBF1F201FB1202606809ABCDF8008055 +:107CD000CDE90103002314A8059906F0CBF80100B3 +:107CE00057D12078C00728D00395A06950B90AA9B8 +:107CF00006A8FFF7BDF89DF8290020F00700401CFA +:107D00008DF829009DF8280007A940F040008DF863 +:107D100028008DF8527042F60310ADF8500003AA07 +:107D2000CDF800A0CDE90121002340F2032214A8E0 +:107D30000A9906F09FF801002BD1E06868B3294644 +:107D4000012060F30F218DF8527042F60410ADF857 +:107D50005000E068002302788DF8582040788DF8B4 +:107D60005900E06816AA4088ADF85A00E06800792A +:107D70008DF85C00E068C088ADF85D00CDF800903B +:107D8000CDE901254FF4027214A806F073F8010042 +:107D900003D00C9800F0B6FF43E679480321083879 +:107DA000017156B100893080BDF824007080BDF8A3 +:107DB0002000B080BDF81C00F080002031E670B5D6 +:107DC00001258AB016460B46012802D0022816D19A +:107DD00004E08DF80E504FF4205003E08DF80E5063 +:107DE00042F60100ADF80C005BB10024601C60F3AA +:107DF0000F2404AA08A918460DF005FE18B10720A3 +:107E00004BE5102049E504A99DF820205C48CDE908 +:107E10000021801E02900023214603A802F20122C5 +:107E200006F028F810B1FEF752FF36E5544808383E +:107E30000EB1C1883180057100202EE5F0B593B0F8 +:107E4000044601268DF83E6041F601000F46ADF86C +:107E50003C0011AA0FA93046FFF7B1FF002837D127 +:107E60002000474C4FF00005A4F1080432D01C223A +:107E7000002102A806F00BFB9DF808008DF83E607B +:107E800040F020008DF8080042F60520ADF83C00D7 +:107E900004200797ADF82C00ADF8300039480A905F +:107EA0000EA80D900E950FA80990ADF82E506A46B9 +:107EB00009A902A8FFF791FD002809D1BDF800002B +:107EC0006081BDF80400A081401CE0812571002084 +:107ED00013B0F0BD6581A581BDF84400F4E72DE93C +:107EE000F74F2749A0B00024083917940A79A14612 +:107EF000012A04D0022A02D0082023B040E5CA8813 +:107F0000824201D00620F8E721988A46824201D1B8 +:107F10000720F2E70120214660F30F21ADF8480069 +:107F20004FF6FF788DF86E000691ADF84A8042F664 +:107F3000020B8DF872401CA9ADF86CB0ADF8704022 +:107F40001391ADF8508012A806F0A4F800252E4633 +:107F50002F460DAB072212A9404606F09EF898B1B5 +:107F60000A2861D1B5B3AEB3ADF86450ADF8666020 +:107F70009DF85E008DF8144019AC012868D06FE0C0 +:107F80009C020020266102009DF83A001FB30128E0 +:107F900059D1BDF8381059451FD118A809A9019425 +:107FA0000294CDE9031007200090BDF8361010238D +:107FB0000022404606F003F9B0BBBDF8600004287B +:107FC00001D006284AD1BDF82410219881423AD127 +:107FD0000F2092E73AE0012835D1BDF83800B0F51E +:107FE000205F03D042F6010188422CD1BAF8060086 +:107FF000BDF83610884201D1012700E0002705B105 +:108000009EB1219881421ED118A809AA0194029418 +:10801000CDE90320072000900D46102300224046A2 +:1080200006F0CDF800B902E02DE04E460BE0BDF8B9 +:108030006000022801D0102810D1C0B217AA09A9E7 +:108040000DF0DFFC50B9BDF8369082E7052054E70B +:1080500005A917A8221D0DF0D6FC08B103204CE796 +:108060009DF814000023001DC2B28DF81420229840 +:108070000092CDE901401BA8069905F0FBFE10B95E +:1080800002228AF80420FEF722FE36E710B50B46DE +:10809000401E88B084B205AA00211846FEF7B7FE3C +:1080A00000200DF1080C06AA05A901908CE8070034 +:1080B000072000900123002221464FF6FF7005F0B3 +:1080C0001CFE0446BDF81800012800D0FFDF204642 +:1080D000FEF7FDFD08B010BDF0B5FF4F044687B0B8 +:1080E00038790E46032804D0042802D0082007B0AF +:1080F000F0BD04AA03A92046FEF762FE0500F6D1F2 +:1081000060688078C0F3410002280AD19DF80D0014 +:1081100010F0380F05D02069F9F7DFF808B110200A +:10812000E5E7208905AA21698DE807006389BDF884 +:1081300010202068039905F09DFE10B1FEF7C7FDE1 +:10814000D5E716B1BDF814003080042038712846F8 +:10815000CDE7F8B50C0006460BD001464FF6FF758B +:1081600000236A46284606F0AFF820B1FEF7AFFDBF +:10817000F8BD1020F8BD69462046FEF7D9FD00285D +:10818000F8D1A078314600F001032846009A06F0A5 +:10819000CAF8EBE730B587B0144600220DF1080CA1 +:1081A00005AD01928CE82C00072200920A46014698 +:1081B00023884FF6FF7005F0A0FDBDF81410218054 +:1081C000FEF785FD07B030BD70B50D4604210BF0FC +:1081D0006DFE040000D1FFDF294604F11400BDE864 +:1081E000704004F0A5BD70B50D4604210BF05EFE95 +:1081F000040000D1FFDF294604F11400BDE87040FF +:1082000004F0B9BD70B50D4604210BF04FFE04001B +:1082100000D1FFDF294604F11400BDE8704004F0EE +:10822000D1BD70B5054604210BF040FE040000D11D +:10823000FFDF214628462368BDE870400122FEF793 +:1082400015BF70B5064604210BF030FE040000D1C6 +:10825000FFDF04F1140004F05CFD401D20F0030575 +:1082600011E0011D00880022431821463046FEF728 +:10827000FDFE00280BD0607CABB2684382B2A068E0 +:10828000011D0BF0D0FCA06841880029E9D170BD28 +:1082900070B5054604210BF009FE040000D1FFDF94 +:1082A000214628466368BDE870400222FEF7DEBE24 +:1082B00070B50E46054601F099F9040000D1FFDFC4 +:1082C0000120207266726580207820F00F00001D6A +:1082D00020F0F00040302070BDE8704001F089B916 +:1082E00010B50446012900D0FFDF2046BDE810404C +:1082F0000121FAF7EDB82DE9F04F97B04FF0000AE1 +:108300000C008346ADF814A0D04619D0E06830B117 +:10831000A068A8B10188ADF81410A0F800A05846D4 +:10832000FBF790F8070043F2020961D03878222861 +:108330005CD3042158460BF0B9FD050005D103E0DC +:10834000102017B0BDE8F08FFFDF05F1140004F036 +:10835000E0FC401D20F00306A078012803D002288D +:1083600001D00720EDE7218807AA584605F057FEFF +:1083700030BB07A805F05FFE10BB07A805F05BFE49 +:1083800048B99DF82600012805D1BDF82400A0F5C4 +:108390002451023902D04FF45050D2E7E068B0B116 +:1083A000CDE902A00720009005AACDF804A0049210 +:1083B000A2882188BDF81430584605F09EFC10B103 +:1083C000FEF785FCBDE7A168BDF8140008809DF8A4 +:1083D0001F00C00602D543F20140B2E70B9838B146 +:1083E000A1780078012905D080071AD40820A8E7D1 +:1083F0004846A6E7C007F9D002208DF83C00A868DF +:108400004FF00009A0B1697C4288714391420FD9B5 +:108410008AB2B3B2011D0BF0BCFB8046A0F800A0ED +:1084200006E003208DF83C00D5F800804FF00109EC +:108430009DF8200010F0380F00D1FFDF9DF82000DC +:108440002649C0F3C200084497F8231010F8010C25 +:10845000884201D90F2074E72088ADF8400014A9A4 +:108460000095CDE90191434607220FA95846FEF732 +:1084700027FE002891D19DF8500050B9A07801281E +:1084800007D1687CB3B2704382B2A868011D0BF0BB +:1084900094FB002055E770B5064615460C46084685 +:1084A000FEF7D4FB002805D12A4621463046BDE818 +:1084B000704084E470BD12E570B51E4614460D0090 +:1084C0000ED06CB1616859B160B10349C98881426D +:1084D00008D0072070BD000094020020296102002E +:1084E0001020F7E72068FEF7B1FB0028F2D13246F2 +:1084F00021462846BDE87040FFF76FBA70B51546B3 +:108500000C0006D038B1FE490989814203D007200A +:10851000E0E71020DEE72068FEF798FB0028D9D1BD +:1085200029462046BDE87040D6E570B5064686B0BF +:108530000D4614461046F8F7B2FED0BB6068F8F757 +:10854000D5FEB0BBA6F57F40FF3803D03046FAF722 +:1085500079FF80B128466946FEF7ACFC00280CD1B3 +:108560009DF810100F2008293DD2DFE801F0080621 +:108570000606060A0A0843F2020006B0AAE703202C +:10858000FBE79DF80210012908D1BDF80010B1F5F4 +:10859000C05FF2D06FF4C052D142EED09DF8061009 +:1085A00001290DD1BDF80410A1F52851062907D2E3 +:1085B00000E029E0DFE801F0030304030303DCE744 +:1085C0009DF80A1001290FD1BDF80810B1F5245FFC +:1085D000D3D0A1F60211B1F50051CED00129CCD0F3 +:1085E000022901D1C9E7FFDF606878B9002305AA35 +:1085F0002946304605F068FE10B1FEF768FBBCE77F +:108600009DF81400800601D41020B6E76188224648 +:1086100028466368FFF7BEFDAFE72DE9F0438146CA +:1086200087B0884614461046F8F739FE18B1102076 +:1086300007B0BDE8F083002306AA4146484605F08E +:1086400043FE10B1FEF743FBF2E79DF81800C006A9 +:1086500002D543F20140EBE70025072705A8019565 +:1086600000970295CDE9035062884FF6FF734146AB +:10867000484605F0A4FD060013D16068F8F70FFE28 +:1086800060B960680195CDE9025000970495238890 +:1086900062884146484605F092FD0646BDF8140042 +:1086A00020803046CEE739B1954B0A889B899A42A3 +:1086B00002D843F2030070471DE610B586B0904C17 +:1086C0000423ADF81430638943B1A4898C4201D2EC +:1086D000914205D943F2030006B010BD0620FBE726 +:1086E000ADF81010002100910191ADF80030022189 +:1086F0008DF8021005A9029104A90391ADF812208A +:108700006946FFF7F8FDE7E72DE9FC4781460D468E +:108710000846F8F79EFD88BB4846FAF793FE5FEAE5 +:1087200000080AD098F80000222829D304214846DE +:108730000BF0BCFB070005D103E043F20200BDE8EB +:10874000FC87FFDF07F1140004F0F9FA06462878E9 +:10875000012803D0022804D00720F0E7B0070FD586 +:1087600002E016F01C0F0BD0A8792C1DC00709D011 +:10877000E08838B1A068F8F76CFD18B11020DEE78A +:108780000820DCE721882A780720B1F5847F35D0DE +:108790001EDC40F20315A1F20313A94226D00EDC21 +:1087A000B1F5807FCBD003DCF9B1012926D1C6E732 +:1087B000A1F58073013BC2D0012B1FD113E0012B27 +:1087C000BDD0022B1AD0032BB9D0042B16D112E046 +:1087D000A1F20912082A11D2DFE802F00B040410FA +:1087E00010101004ABE7022AA9D007E0012AA6D096 +:1087F00004E0320700E0F206002AA0DACDB200F071 +:10880000F5FE50B198F82300CDE90005FA8923461A +:1088100039464846FEF79FFC91E711208FE72DE986 +:10882000F04F8BB01F4615460C4683460026FAF7DC +:1088300009FE28B10078222805D208200BB081E576 +:1088400043F20200FAE7B80801D00720F6E7032F49 +:1088500000D100274FF6FF79CCB1022D71D320460D +:10886000F8F744FD30B904EB0508A8F10100F8F76A +:108870003DFD08B11020E1E7AD1E38F8028CAAB228 +:108880002146484605F081FE40455AD1ADB21C490B +:10889000B80702D58889401C00E001201FFA80F843 +:1088A000F80701D08F8900E04F4605AA4146584697 +:1088B00005F0B5FB4FF0070A4FF00009FCB1204668 +:1088C00008E0408810283CD8361D304486B2AE42BD +:1088D00037D2A01902884245F3D352E09DF8170021 +:1088E00002074ED57CB304EB0608361DB8F80230FB +:1088F000B6B2102B25D89A19AA4222D802E040E03D +:1089000094020020B8F8002091421AD1C0061BD56D +:10891000CDE900A90DF1080C0AAAA11948468CE876 +:108920000700B8F800100022584605F0E6F910B12B +:10893000FEF7CDF982E7B8F80200BDF828108842AA +:1089400002D00B207AE704E0B8F80200304486B287 +:1089500006E0C00604D55846FEF730FC00288AD150 +:108960009DF81700BDF81A1020F010008DF81700C0 +:10897000BDF81700ADF80000FF235846009A05F037 +:10898000D2FC05A805F057FB18B9BDF81A10B9427A +:10899000A4D9042158460BF089FA040000D1FFDF66 +:1089A000A2895AB1CDE900A94D4600232146584677 +:1089B000FEF7D1FB0028BDD1A5813FE700203DE7B0 +:1089C0002DE9FF4F8BB01E4617000D464FF00004F7 +:1089D00012D0B00802D007200FB0B3E4032E00D1AC +:1089E00000265DB10846F8F778FC28B93888691E7A +:1089F0000844F8F772FC08B11020EDE7C74AB00749 +:108A000001D5D18900E00121F0074FF6FF7802D0AF +:108A1000D089401E00E0404686B206AA0B9805F0B9 +:108A2000FEFA4FF000094FF0070B0DF1140A38E081 +:108A30009DF81B00000734D5CDF80490CDF800B0A8 +:108A4000CDF80890CDE9039A434600220B9805F033 +:108A5000B6FB60BB05B3BDF814103A882144281951 +:108A6000091D8A4230D3BDF81E2020F8022BBDF824 +:108A7000142020F8022BCDE900B9CDE90290CDF801 +:108A800010A0BDF81E10BDF8143000220B9805F0A0 +:108A900096FB08B103209FE7BDF814002044001D99 +:108AA00084B206A805F0C7FA20B10A2806D0FEF75E +:108AB0000EF991E7BDF81E10B142B9D934B17DB1BC +:108AC0003888A11C884203D20C2085E7052083E763 +:108AD00022462946404605F058FD014628190180E6 +:108AE000A41C3C80002077E710B50446F8F7D7FBBC +:108AF00008B1102010BD8948C0892080002010BD19 +:108B0000F0B58BB00D4606461422002103A805F0EF +:108B1000BEFC01208DF80C008DF8100000208DF8AF +:108B20001100ADF814503046FAF78CFC48B10078CB +:108B3000222812D3042130460BF0B8F9040005D1E5 +:108B400003E043F202000BB0F0BDFFDF04F11400BC +:108B5000074604F0F4F8800601D40820F3E7207CEF +:108B6000022140F00100207409A80094CDE9011011 +:108B7000072203A930466368FEF7A2FA20B1217CE0 +:108B800021F001012174DEE729463046F9F791FC16 +:108B900008A9384604F0C2F800B1FFDFBDF8204054 +:108BA000172C01D2172000E02046A84201D92C46FC +:108BB00002E0172C00D2172421463046FFF713FBA2 +:108BC00021463046F9F799F90020BCE7F8B51C4674 +:108BD00015460E46069F0BF09AFA2346FF1DBCB2BF +:108BE00031462A4600940AF086FEF8BD70B50C4660 +:108BF00005460E220021204605F049FC0020208079 +:108C00002DB1012D01D0FFDF64E4062000E0052036 +:108C1000A0715FE410B548800878134620F00F007B +:108C2000001D20F0F00080300C4608701422194618 +:108C300004F1080005F001FC00F0DBFC374804609B +:108C400010BD2DE9F047DFF8D890491D064621F008 +:108C5000030117460C46D9F800000AF062FF050030 +:108C600000D1FFDF4FF000083560A5F800802146F5 +:108C7000D9F800000AF055FF050000D1FFDF75604C +:108C8000A5F800807FB104FB07F1091D0BD0D9F8CE +:108C900000000AF046FF040000D1FFDFB460C4F812 +:108CA0000080BDE8F087C6F80880FAE72DE9F041BA +:108CB0001746491D21F00302194D06460168144666 +:108CC00028680AF059FF2246716828680AF054FFA4 +:108CD0003FB104FB07F2121D03D0B16828680AF007 +:108CE0004BFF04200BF08AF8044604200BF08EF8AA +:108CF000201A012804D12868BDE8F0410AF006BF17 +:108D0000BDE8F08110B50C4605F058F900B1FFDF61 +:108D10002046BDE81040FDF7DABF000094020020B5 +:108D20001800002038B50C468288817B19B1418932 +:108D3000914200D90A462280C188121D90B26A462B +:108D40000AF0B2F8BDF80000032800D30320C1B236 +:108D5000208801F020F838BD38B50C468288817B28 +:108D600019B10189914200D90A462280C188121D99 +:108D700090B26A460AF098F8BDF80000022800D3C5 +:108D80000220C1B2208801F006F8401CC0B238BDF4 +:108D90002DE9FF5F82468B46F74814460BF103022C +:108DA000D0E90110CDE9021022F0030201A84FF42E +:108DB000907101920AF097FEF04E002C02D1F0491A +:108DC000019A8A60019901440191B57F05F101057D +:108DD00004D1E8B20CF098FD00B1FFDF019800EB80 +:108DE0000510C01C20F0030101915CB9707AB27AC1 +:108DF0001044C2B200200870B08C80B204F03DFF75 +:108E000000B1FFDF0198716A08440190214601A872 +:108E100000F084FF80460198C01C20F00300019000 +:108E2000B37AF27A717A04B100200AF052FF019904 +:108E300008440190214601A800F0B8FFCF48002760 +:108E40003D4690F801900CE0284600F04AFF0646A7 +:108E500081788088F9F7E8F871786D1C00FB01775C +:108E6000EDB24D45F0D10198C01C20F003000190F7 +:108E700004B100203946F9F7E2F8019900270844C7 +:108E80000190BE483D4690F801900CE0284600F065 +:108E900028FF0646C1788088FEF71BFC71786D1CA0 +:108EA00000FB0177EDB24D45F0D10198C01C20F0D8 +:108EB0000300019004B100203946FEF713FC01992C +:108EC0004FF0000908440190AC484D4647780EE049 +:108ED000284600F006FF0646807B30B106F1080008 +:108EE00002F09CF9727800FB02996D1CEDB2BD4254 +:108EF000EED10198C01C20F00300019004B10020C5 +:108F00009F494A78494602F08DF901990844019039 +:108F1000214601A800F0B8FE0198C01D20F007000E +:108F20000190DAF80010814204D3A0EB0B01B1F5F7 +:108F3000803F04DB4FF00408CAF8000004E0CAF8E0 +:108F40000000B8F1000F03D0404604B0BDE8F09F28 +:108F500084BB8C490020019A0EF044FEFBF714FA02 +:108F6000864C207F0090607F012825D0002328B305 +:108F70000022824800211030F8F73AFA00B1FFDFF2 +:108F80007E49E07F2031FEF759FF00B1FFDF7B48CB +:108F90004FF4F6720021443005F079FA7748042145 +:108FA000443080F8E91180F8EA11062180F8EB11CD +:108FB000032101710020C8E70123D8E702AAD8E7FE +:108FC00070B56E4C06464434207804EB4015E078CA +:108FD000083598B9A01990F8E80100280FD0A078BA +:108FE0000F2800D3FFDF20220021284605F04FFA8A +:108FF000687866F3020068700120E070284670BD52 +:109000002DE9F04105460C460027007805219046E1 +:109010003E46B1EB101F00D0FFDF287A50B1012887 +:109020000ED0FFDFA8F800600CB12780668000201A +:10903000BDE8F0810127092674B16888A08008E0A6 +:109040000227142644B16888A0802869E060A88AB5 +:109050002082287B2072E5E7A8F80060E7E730B5BA +:10906000464C012000212070617020726072032242 +:10907000A272E07261772177217321740521218327 +:109080001F216183607440A161610A21A177E077AB +:1090900039483B4DB0F801102184C07884F8220093 +:1090A0004FF4B06060626868C11C21F00301814226 +:1090B00000D0FFDF6868606030BD30B5304C1568A7 +:1090C000636810339D4202D20420136030BD2B4BE5 +:1090D0005D785A6802EB0512107051700320D08041 +:1090E000172090800120D0709070002090735878E5 +:1090F000401C5870606810306060002030BD70B552 +:1091000006461E480024457807E0204600F0E9FDA9 +:109110000178B14204D0641CE4B2AC42F5D1002025 +:1091200070BDF7B5074608780C4610B3FFF7E7FFA8 +:109130000546A7F12006202F06D0052E19D2DFE81C +:1091400006F00F383815270000F0D6FD0DB169780C +:1091500000E00021401AA17880B20844FF2808D816 +:10916000A07830B1A088022831D202E060881728A8 +:109170002DD20720FEBD000030610200B0030020A8 +:109180001C000020000000206E52463578000000D0 +:10919000207AE0B161881729EBD3A1881729E8D399 +:1091A000A1790029E5D0E1790029E2D0402804D94D +:1091B000DFE7242F0BD1207A48B161884FF6FB708E +:1091C000814202D8A188814201D90420D2E765B941 +:1091D000207802AA0121FFF770FF0028CAD1207869 +:1091E000FFF78DFF050000D1FFDF052E18D2DFE865 +:1091F00006F0030B0E081100A0786870A088E880C4 +:109200000FE06088A8800CE0A078A87009E0A07842 +:10921000E87006E054F8020FA8606068E86000E0BB +:10922000FFDF0020A6E71A2835D00DDC132832D244 +:10923000DFE800F01B31203131272723252D313184 +:1092400029313131312F0F00302802D003DC1E28A4 +:1092500021D1072070473A3809281CD2DFE800F0F6 +:10926000151B0F1B1B1B1B1B07000020704743F225 +:109270000400704743F202007047042070470D203D +:1092800070470F2070470820704711207047132047 +:109290007047062070470320704710B5007800F033 +:1092A000010009F0F3FDBDE81040BCE710B50078FF +:1092B00000F0010009F0F3FDBDE81040B3E70EB582 +:1092C000017801F001018DF80010417801F00101F1 +:1092D0008DF801100178C1F340018DF8021041783A +:1092E000C1F340018DF80310017889088DF804104E +:1092F000417889088DF8051081788DF80610C178BD +:109300008DF8071000798DF80800684608F0FDFD1B +:10931000FFF789FF0EBD2DE9FC5FDFF8F883FE4CF7 +:1093200000264FF490771FE0012000F082FD01201D +:10933000FFF746FE05463946D8F808000AF0F1FB6B +:10934000686000B9FFDF686808F0AAFCB0B1284681 +:10935000FAF75EFB284600F072FD28B93A466968C4 +:10936000D8F808000AF008FC94F9E9010428DBDACF +:1093700002200AF043FD07460025AAE03A46696844 +:10938000D8F808000AF0F8FBF2E7B8F802104046F7 +:10939000491C89B2A8F80210B94201D300214180CA +:1093A0000221B8F802000AF081FD002866D0B8F862 +:1093B0000200694609F0CFFCFFF735FF00B1FFDF7F +:1093C0009DF80000019078B1B8F802000AF0B1FEF3 +:1093D0005FEA000900D1FFDF48460AF020F918B122 +:1093E000B8F8020002F0E4F9B8F802000AF08FFEC3 +:1093F0005FEA000900D1FFDF48460AF008F9E8BB40 +:109400000321B8F802000AF051FD5FEA000B4BD1CE +:10941000FFDF49E0DBF8100010B10078FF284DD0E5 +:10942000022000F006FD0220FFF7CAFD82464846F2 +:109430000AF0F9F9CAF8040000B9FFDFDAF804000D +:109440000AF0C1FA002100900170B8F802105046ED +:10945000AAF8021002F0B2F848460AF0B6FA00B9CB +:10946000FFDF019800B10126504600F0E8FC18B972 +:109470009AF80100000705D5009800E027E0CBF836 +:10948000100011E0DBF8101039B10878401C10F022 +:10949000FF00087008D1FFDF06E0002211464846B1 +:1094A00000F0F0FB00B9FFDF94F9EA01022805DBC8 +:1094B000B8F8020002F049F80028ABD194F9E901AC +:1094C000042804DB48460AF0E4FA00B101266D1CCA +:1094D000EDB2BD4204D294F9EA010228BFF655AFBD +:1094E000002E7FF41DAFBDE8FC5F032000F0A1BC9F +:1094F00010B5884CE06008682061AFF2E510F9F71C +:10950000E4FC607010BD844800214438017081483B +:10951000017082494160704770B505464FF0805038 +:109520000C46D0F8A410491C05D1D0F8A810C943A6 +:109530000904090C0BD050F8A01F01F0010129709B +:10954000416821608068A080287830B970BD06210C +:1095500020460DF0CCFF01202870607940F0C0005B +:10956000607170BD70B54FF080540D46D4F8801016 +:10957000491C0BD1D4F88410491C07D1D4F88810A9 +:10958000491C03D1D4F88C10491C0CD0D4F880109D +:109590000160D4F884104160D4F888108160D4F858 +:1095A0008C10C16002E010210DF0A1FFD4F89000F2 +:1095B000401C0BD1D4F89400401C07D1D4F898007B +:1095C000401C03D1D4F89C00401C09D054F8900FE3 +:1095D000286060686860A068A860E068E86070BDA6 +:1095E0002846BDE8704010210DF081BF4A4800793F +:1095F000E6E470B5484CE07830B3207804EB4010D6 +:10960000407A00F00700204490F9E801002800DCCF +:10961000FFDF2078002504EB4010407A00F00700BF +:10962000011991F8E801401E81F8E8012078401CFA +:10963000C0B220700F2800D12570A078401CA07007 +:109640000DF0D4FDE57070BDFFDF70BD3EB5054681 +:1096500003210AF02BFC044628460AF058FD054673 +:1096600004B9FFDF206918B10078FF2800D1FFDFBF +:1096700001AA6946284600F005FB60B9FFDF0AE051 +:10968000002202A9284600F0FDFA00B9FFDF9DF88C +:10969000080000B1FFDF9DF80000411E8DF80010AA +:1096A000EED220690199884201D1002020613EBD9F +:1096B00070B50546A0F57F400C46FF3800D1FFDFAE +:1096C000012C01D0FFDF70BDFFF790FF040000D137 +:1096D000FFDF207820F00F00401D20F0F000503018 +:1096E000207065800020207201202073BDE870404A +:1096F0007FE72DE9F04116460D460746FFF776FF56 +:10970000040000D1FFDF207820F00F00401D20F082 +:10971000F00005E01C000020F403002048140020A5 +:109720005030207067800120207228682061A8884E +:10973000A0822673BDE8F0415BE77FB5FFF7DFFC51 +:10974000040000D1FFDF02A92046FFF7EBFA05462F +:1097500003A92046FFF700FB8DF800508DF80100AB +:10976000BDF80800001DADF80200BDF80C00001D9A +:10977000ADF80400E088ADF80600684609F070FB1B +:10978000002800D0FFDF7FBD2DE9F05FFC4E814651 +:10979000307810B10820BDE8F09F4846F7F77FFD0C +:1097A00008B11020F7E7F74C207808B9FFF757FC0D +:1097B000A17A607A4D460844C4B200F09DFAA042F6 +:1097C00007D2201AC1B22A460020FFF776FC0028F3 +:1097D000E1D17168EB48C91C002721F003017160D9 +:1097E000B3463E463D46BA463C4690F801800AE004 +:1097F000204600F076FA4178807B0E4410FB01553C +:10980000641CE4B27F1C4445F2D10AEB870000EBF4 +:10981000C600DC4E00EB85005C46F17A012200EBCD +:109820008100DBF80410451829464846FFF7B0FAD6 +:10983000070012D00020FFF762FC05000BD005F1F5 +:109840001300616820F00300884200D0FFDF7078C9 +:10985000401E7070656038469DE7002229464846E4 +:10986000FFF796FA00B1FFDFD9F8000060604FF60D +:10987000FF7060800120207000208CE72DE9F0410E +:109880000446BF4817460D46007810B10820BDE8D1 +:10989000F0810846F7F7DDFC08B11020F7E7B94E74 +:1098A000307808B9FFF7DBFB601E1E2807D8012CB3 +:1098B00023D12878FE2820D8B0770020E7E7A4F14C +:1098C00020001F2805D8E0B23A462946BDE8F041FD +:1098D00027E4A4F140001F2805D829462046BDE80A +:1098E000F04100F0D4BAA4F1A0001F2805D8294601 +:1098F0002046BDE8F04100F006BB0720C7E72DE990 +:10990000F05F81460F460846F7F7C9FC48B948465C +:10991000F7F7E3FC28B909F1030020F003014945FA +:1099200001D0102037E797484FF0000B4430817882 +:1099300069B14178804600EB411408343E883A46CC +:109940000021204600F089FA050004D027E0A7F89E +:1099500000B005201FE7B9F1000F24D03888B042CD +:1099600001D90C251FE0607800F00700824600F066 +:1099700060FA08EB0A063A4696F8E8014946401CA8 +:1099800086F8E801204600F068FA054696F8E801F6 +:10999000401E86F8E801032000F04BFA2DB10C2D93 +:1099A00001D0A7F800B02846F5E6754F5046BAF149 +:1099B000010F25D002280DD0BAF1030F35D0FFDFFB +:1099C00098F801104046491CC9B288F801100F29C7 +:1099D00037D038E0606828B16078000702D460882A +:1099E000FFF734FE98F8EA014446012802D178785E +:1099F000F9F78AFA94F9EA010428E1DBFFDFDFE7EF +:109A0000616821B14FF49072B8680AF0B5F898F81F +:109A1000E9014446032802D17878F9F775FA94F9F8 +:109A2000E9010428CCDBFFDFCAE76078C00602D575 +:109A30006088FFF70BFE98F9EB010628C0DBFFDF1B +:109A4000BEE780F801B08178491E88F8021096F8C8 +:109A5000E801401C86F8E801A5E770B50C4605460C +:109A6000F7F7F7FB18B92046F7F719FC08B11020F3 +:109A700070BD28460BF07FFF207008B1002070BD3C +:109A8000042070BD70B505460BF08EFFC4B22846A9 +:109A9000F7F723FC08B1102070BD35B128782C7081 +:109AA00018B1A04201D0072070BD2046FDF77EFE10 +:109AB000052805D10BF07BFF012801D0002070BDE7 +:109AC0000F2070BD70B5044615460E460846F7F7E0 +:109AD000C0FB18B92846F7F7E2FB08B1102070BDAB +:109AE000022C03D0102C01D0092070BD2A4631462B +:109AF00020460BF086FF0028F7D0052070BD70B51A +:109B000014460D460646F7F7A4FB38B92846F7F782 +:109B1000C6FB18B92046F7F7E0FB08B1102070BD6E +:109B20002246294630460BF06EFF0028F7D007206A +:109B300070BD3EB50446F7F7B2FB08B110203EBD3C +:109B4000684608F053F9FFF76EFB0028F7D19DF83F +:109B500006002070BDF808006080BDF80A00A080F3 +:109B600000203EBD70B505460C460846F7F7B5FB2C +:109B700020B95CB12068F7F792FB28B1102070BDC6 +:109B80001C000020B0030020A08828B121462846F0 +:109B9000BDE87040FDF762BE0920F0E770B50546EC +:109BA0000C460846F7F755FBA0BB681E1E280ED8CA +:109BB000032D01D90720E2E705B9FFDFFE4800EBDE +:109BC000850050F8041C2046BDE870400847A5F108 +:109BD00020001F2805D821462846BDE87040FAF726 +:109BE00042BBA5F160001F2805D821462846BDE8E4 +:109BF0007040F8F7DABCF02D0DD0F12D15D0BF2D47 +:109C0000D8D1A078218800F0010001F08DFB98B137 +:109C10000020B4E703E0A068F7F71BFB08B11020B1 +:109C2000ADE7204609F081F902E0207809F0A0F9BB +:109C3000BDE87040FFF7F7BA0820A0E770B504460A +:109C40000D460846F7F72BFB30B9601E1E280FD8CB +:109C50002846F7F7FEFA08B1102090E7012C03D050 +:109C6000022C01D0032C01D1062088E7072086E7CB +:109C7000A4F120001F28F9D829462046BDE87040ED +:109C8000FAF762BB09F092BC38B50446CB48007BBA +:109C900000F00105F9B904F01DFC0DB1226800E0E7 +:109CA0000022C7484178C06807F06DFDC4481030F5 +:109CB000C0788DF8000010B1012802D004E0012026 +:109CC00000E000208DF80000684608F0FFF8BA4870 +:109CD000243808F0B5FE002D02D02068283020601E +:109CE00038BD30B5B54D04466878A04200D8FFDFD6 +:109CF000686800EB041030BD70B5B04800252C46F4 +:109D0000467807E02046FFF7ECFF4078641C2844C3 +:109D1000C5B2E4B2B442F5D1284630E72DE9F041AE +:109D20000C4607464FF0000800F01FF90646FF28D2 +:109D300001D94FF013083868C01C20F003023A60C4 +:109D400054EA080421D19D48F3B2072128300DF0D0 +:109D5000DBFD09E0072C10D2DFE804F00604080858 +:109D60000A040600974804E0974802E0974800E09C +:109D700097480DF0E9FD054600E0FFDFA54200D061 +:109D8000FFDF641CE4B2072CE4D3386800EB061054 +:109D9000386040467BE5021D5143452900D24521EC +:109DA0000844C01CB0FBF2F0C0B270472DE9FC5F64 +:109DB000064682484FF000088B464746444690F8D6 +:109DC000019022E02046FFF78CFF050000D1FFDF65 +:109DD000687869463844C7B22846FEF7A3FF824632 +:109DE00001A92846FEF7B8FF0346BDF80400524615 +:109DF000001D81B2BDF80000001D80B20AF0D4F849 +:109E00006A78641C00FB0288E4B24C45DAD1306801 +:109E1000C01C20F003003060BBF1000F00D0002018 +:109E2000424639460AF0CEF8316808443060BDE851 +:109E3000FC9F6249443108710020C87070475F4937 +:109E40004431CA782AB10A7801EB421108318142C3 +:109E500001D001207047002070472DE9F0410646EF +:109E60000078154600F00F0400201080601E0F4699 +:109E7000052800D3FFDF50482A46183800EB84003D +:109E8000394650F8043C3046BDE8F04118472DE90A +:109E9000F0414A4E0C46402806D0412823D04228A3 +:109EA0002BD0432806D123E0A07861780D18E17803 +:109EB000814201D90720EAE42078012801D9132042 +:109EC000E5E4FF2D08D80BF009FF07460DF046F931 +:109ED000381A801EA84201DA1220D8E42068B06047 +:109EE000207930730DE0BDE8F041084600F078B805 +:109EF00008780228DED8307703E008780228D9D81D +:109F000070770020C3E4F8B500242C4DA02805D0BC +:109F1000A12815D0A22806D00720F8BD087800F0A7 +:109F20000100E8771FE00E4669463046FDF73DFD2B +:109F30000028F2D130882884B07885F8220012E019 +:109F400008680921F82801D3820701D00846F8BD26 +:109F50006A7C02F00302012A04D16A8BD73293B2E1 +:109F60008342F3D868622046F8BD2DE9F047DFF858 +:109F70004C900026344699F8090099F80A2099F87F +:109F800001700244D5B299F80B20104400F0FF088C +:109F900008E02046FFF7A5FE817B407811FB0066B4 +:109FA000641CE4B2BC42F4D199F8091099F80A0093 +:109FB0002944294441440DE054610200B0030020CB +:109FC0001C0000206741000045B30000DD2F0000A9 +:109FD000FB56010000B1012008443044BDE8F08781 +:109FE00038B50446407800F00300012803D0022869 +:109FF0000BD0072038BD606858B1F7F777F9D0B9B2 +:10A000006068F7F76AF920B915E06068F7F721F999 +:10A0100088B969462046FCF729F80028EAD160781B +:10A0200000F00300022808D19DF8000028B1606804 +:10A03000F7F753F908B1102038BD6189F8290DD818 +:10A04000208988420AD8607800F003020A48012A71 +:10A0500006D1D731426A89B28A4201D2092038BD7D +:10A0600094E80E0000F1100585E80E000AB9002101 +:10A070000183002038BD0000B00300202DE9F0412D +:10A08000074614468846084601F08AFD064608EB56 +:10A0900088001C22796802EBC0000D18688C58B14A +:10A0A0004146384601F08BFD014678680078C200D1 +:10A0B000082305F120000CE0E88CA8B141463846A1 +:10A0C00001F084FD0146786808234078C20005F15C +:10A0D000240009F0A8FD38B1062121726681D0E97B +:10A0E0000010C4E9031009E0287809280BD00520E6 +:10A0F000207266816868E060002028702046BDE814 +:10A10000F04101F02EBD072020726681F4E72DE9B1 +:10A11000F04116460D460746406801EB85011C22BA +:10A1200002EBC1014418204601F072FD40B100214C +:10A13000708865F30F2160F31F4106200DF0BEFC0F +:10A1400009202070324629463846BDE8F04195E79F +:10A150002DE9F0410E46074600241C21F07816E058 +:10A1600004EB8403726801EBC303D25C6AB1FFF7AE +:10A170003DFA050000D1FFDF6F802A4621463046B8 +:10A18000FFF7C5FF0120BDE8F081641CE4B2A042E6 +:10A19000E6D80020F7E770B5064600241C21C078F9 +:10A1A0000AE000BF04EB8403726801EBC303D51817 +:10A1B0002A782AB1641CE4B2A042F3D8402070BDD2 +:10A1C00028220021284604F062F9706880892881DD +:10A1D000204670BD70B5034600201C25DC780CE0DD +:10A1E00000EB80065A6805EBC6063244167816B1B5 +:10A1F000128A8A4204D0401CC0B28442F0D8402067 +:10A2000070BDF0B5044600201C26E5780EE000BFC6 +:10A2100000EB8007636806EBC7073B441F788F425B +:10A2200002D15B78934204D0401CC0B28542EFD883 +:10A230004020F0BD0078032801D0002070470120A5 +:10A2400070470078022801D0002070470120704735 +:10A250000078072801D000207047012070472DE9C1 +:10A26000F041064688461078F1781546884200D3BA +:10A27000FFDF2C781C27641CF078E4B2A04201D8E0 +:10A28000201AC4B204EB8401706807EBC1010844D2 +:10A29000017821B14146884708B12C7073E72878CE +:10A2A000A042E8D1402028706DE770B514460B88B5 +:10A2B0000122A240134207D113430B8001230A223B +:10A2C000011D09F07AFC047070BD2DE9FF4F81B0CB +:10A2D0000878DDE90E7B9A4691460E4640072CD45D +:10A2E000019809F026FF040000D1FFDF07F1040800 +:10A2F00020461FFA88F109F065F8050000D1FFDF5C +:10A30000204629466A4609F0B0FA0098A0F8037082 +:10A31000A0F805A0284609F056FB017869F306016C +:10A320006BF3C711017020461FFA88F109F08DF810 +:10A3300000B9FFDF019807F094F906EB0900017FEF +:10A34000491C017705B0BDE8F08F2DE9F84F0E46A6 +:10A350009A4691460746032109F0A8FD0446008D60 +:10A36000DFF8B885002518B198F80000B0421ED17A +:10A37000384609F0DEFE070000D1FFDF09F10401D5 +:10A38000384689B209F01EF8050010D03846294633 +:10A390006A4609F06AFA009800210A460180817035 +:10A3A00007F01CFA0098C01DCAF8000021E098F8D8 +:10A3B0000000B04216D104F1260734F8341F012002 +:10A3C00000FA06F911EA090F00D0FFDF2088012307 +:10A3D00040EA090020800A22391D384609F008FCAD +:10A3E000067006E0324604F1340104F12600FFF75E +:10A3F0005CFF0A2188F800102846BDE8F88FFEB5FA +:10A4000015460C46064602AB0C220621FFF79DFFBF +:10A41000002827D00299607812220A70801C4870A8 +:10A4200008224A80A07002982988052381806988C3 +:10A43000C180A9880181E988418100250C20CDE9EE +:10A440000005062221463046FFF73FFF294600223D +:10A4500066F31F41F02310460DF086FA6078801CE9 +:10A4600060700120FEBDFEB514460D46062206466C +:10A4700002AB1146FFF769FF002812D0029B1320A0 +:10A4800000211870A8785870022058809C800620FF +:10A49000CDE900010246052329463046FFF715FFA6 +:10A4A0000120FEBD2DE9FE430C46804644E002AB90 +:10A4B0000E2207214046FFF748FF002841D0606880 +:10A4C0001C2267788678BF1C06EB860102EBC1016F +:10A4D000451802981421017047700A214180698A49 +:10A4E0000181E98A4181A9888180A98981813046D9 +:10A4F00001F056FB029905230722C8806F700420E3 +:10A50000287000250E20CDE9000521464046FFF7C2 +:10A51000DCFE294666F30F2168F31F41F023002279 +:10A5200006200DF021FA6078FD49801C6070626899 +:10A530002046921CFFF793FE606880784028B6D1D1 +:10A540000120BDE8FE83FEB50D46064638E002ABAD +:10A550000E2207213046FFF7F8FE002835D0686844 +:10A560001C23C17801EB810203EBC202841802981C +:10A5700015220270627842700A224280A2894281CA +:10A58000A2888281084601F00BFB01460298818077 +:10A59000618AC180E18A0181A088B8B10020207061 +:10A5A00000210E20CDE9000105230722294630466F +:10A5B000FFF78BFE6A68DB492846D21CFFF74FFE87 +:10A5C0006868C0784028C2D10120FEBD0620E6E7B9 +:10A5D0002DE9FE430C46814644E0204601F002FB93 +:10A5E000D0B302AB082207214846FFF7AEFE002891 +:10A5F000A7D060681C2265780679AD1C06EB860141 +:10A6000002EBC10147180298B7F8108006210170CB +:10A61000457004214180304601F0C2FA014602989B +:10A6200005230722C180A0F804807D7008203870BF +:10A630000025CDE9000521464846FFF746FE29469C +:10A6400066F30F2169F31F41F023002206200DF06D +:10A650008BF96078801C60706268B3492046121DD7 +:10A66000FFF7FDFD606801794029B6D1012068E758 +:10A670002DE9F34F83B00D4691E0284601F0B2FA80 +:10A6800000287DD068681C2290F806A00AEB8A0199 +:10A6900002EBC10144185146284601F097FAA1780F +:10A6A000CB0069684978CA00014604F1240009F02A +:10A6B000D6FA07468188E08B4FF00009091A8EB25E +:10A6C00008B1C84607E04FF00108504601F053FAC0 +:10A6D00008B9B61CB6B2208BB04200D80646B346C5 +:10A6E00002AB324607210398FFF72FFE060007D082 +:10A6F000B8F1000F0BD0504601F03DFA10B106E062 +:10A7000000201FE60299B8884FF0020908800196E0 +:10A71000E28B3968ABEB09001FFA80F80A44039812 +:10A720004E46009209F005FDDDE90021F61D434685 +:10A73000009609F014F9E08B404480B2E083B988B8 +:10A74000884201D1012600E00026CDE900B6238A27 +:10A75000072229460398FFF7B8FD504601F00BFA8F +:10A7600010B9E089401EE08156B1A078401CA0706D +:10A770006868E978427811FB02F1CAB2012300E06F +:10A7800007E081690E3009F018FA80F800A0002077 +:10A79000E0836A6865492846921DFFF760FD686896 +:10A7A000817940297FF469AF0120CBE570B5064679 +:10A7B00048680D4614468179402910D104EB840184 +:10A7C0001C2202EBC101084401F043FA002806D024 +:10A7D0006868294684713046BDE8704048E770BD1E +:10A7E000FEB50C460746002645E0204601F0FAF982 +:10A7F000D8B360681C22417901EB810102EBC101F1 +:10A800004518688900B9FFDF02AB082207213846E6 +:10A81000FFF79BFD002833D00299607816220A705A +:10A82000801C4870042048806068407901F0B8F9C5 +:10A83000014602980523072281806989C18008208A +:10A84000CDE9000621463846FFF73FFD6078801CC1 +:10A850006070A88969890844B0F5803F00D3FFDFA4 +:10A86000A88969890844A8816E81626830492046B8 +:10A87000521DFFF7F4FC606841794029B5D10120F1 +:10A88000FEBD30B5438C458BC3F3C704002345B1EF +:10A89000838B641EED1AC38A6D1E1D4495FBF3F372 +:10A8A000E4B22CB1008918B1A04200D8204603447C +:10A8B0004FF6FF70834200D3034613800C7030BD07 +:10A8C0002DE9FC41074616460D46486802EB860115 +:10A8D0001C2202EBC10144186A4601A92046FFF779 +:10A8E000D0FFA089618901448AB2BDF8001091426D +:10A8F00012D0081A00D5002060816868407940288D +:10A900000AD1204601F09BF9002805D06868294645 +:10A9100046713846FFF764FFBDE8FC813000002037 +:10A9200035A2000043A2000051A2000053BC000069 +:10A930003FBC00002DE9FE4F0F468146154650886A +:10A94000032109F0B3FA0190B9F8020001F01BF9F4 +:10A9500082460146019801F045F9002824D001986B +:10A960001C2241680AEB8A0002EBC0000C1820464A +:10A9700001F04EF9002817D1B9F80000E18A8842A9 +:10A980000ED8A18961B1B8420ED100265146019876 +:10A9900001F015F9218C01EB0008608B30B114E057 +:10A9A000504601F0E8F8A0B3BDE8FE8F504601F034 +:10A9B000E2F808B1678308E0022FF5D3B9F8040084 +:10A9C0006083618A884224D80226B81B87B2B8F80F +:10A9D0000400A28B801A002814DD874200DA384672 +:10A9E0001FFA80FB688869680291D8F800100A4451 +:10A9F000009209F08CFBF61D009A5B4602990096C6 +:10AA000008F079FFA08B384480B2A083618B884224 +:10AA100007D96888019903B05246BDE8F04F01F0AC +:10AA200035B91FD14FF009002872B9F802006881CA +:10AA3000D8E90010C5E90410608BA881284601F010 +:10AA400090F85146019801F0BAF8014601980823A0 +:10AA500040680078C20004F1200009F0E4F800200A +:10AA6000A0836083504601F086F810B9A089401E8B +:10AA7000A0816888019903B00AF0FF02BDE8F04F99 +:10AA80001EE72DE9F041064615460F461C461846BE +:10AA9000F6F7DFFB18B92068F6F701FC10B11020BB +:10AAA000BDE8F0817168688C0978B0EBC10F01D303 +:10AAB0001320F5E73946304601F081F80146706809 +:10AAC00008230078C20005F1200009F076F8D4E9E7 +:10AAD0000012C0E900120020E2E710B5044603218D +:10AAE00009F0E4F90146007800F00300022805D0DF +:10AAF0002046BDE8104001F1140280E48A8A204615 +:10AB0000BDE81040AFE470B50446032109F0CEF96A +:10AB1000054601462046FFF75BFD002816D0294672 +:10AB20002046FFF75DFE002810D029462046FFF79B +:10AB30000AFD00280AD029462046FFF7B3FC00286A +:10AB400004D029462046BDE8704091E570BD2DE94E +:10AB5000F0410C4680461EE0E178427811FB02F19C +:10AB6000CAB2816901230E3009F05DF80778606888 +:10AB70001C22C179491EC17107EB8701606802EB95 +:10AB8000C10146183946204601F02CF818B130466C +:10AB900001F037F820B16068C1790029DCD17FE786 +:10ABA000FEF724FD050000D1FFDF0A202872384699 +:10ABB00000F0F6FF68813946204601F007F80146AB +:10ABC000606808234078C20006F1240009F02BF8E1 +:10ABD000D0E90010C5E90310A5F80280284600F06E +:10ABE000C0FFB07800B9FFDFB078401EB07057E703 +:10ABF00070B50C460546032109F058F90146406836 +:10AC0000C2792244C2712846BDE870409FE72DE911 +:10AC1000FE4F8246507814460F464FF00008002839 +:10AC20004FD0012807D0022822D0FFDF2068B8606B +:10AC30006068F860B8E602AB0E2208215046FFF7C4 +:10AC400084FB0028F2D00298152105230170217899 +:10AC500041700A214180C0F80480C0F80880A0F843 +:10AC60000C80628882810E20CDE90008082221E054 +:10AC7000A678304600F094FF054606EB86012C22AC +:10AC8000786802EBC1010822465A02AB11465046D1 +:10AC9000FFF75BFB0028C9D00298072101702178DB +:10ACA00041700421418008218580C680CDE90018CB +:10ACB00005230A4639465046FFF707FB87F8088008 +:10ACC00072E6A678022516B1022E13D0FFDF2A1DE8 +:10ACD000914602AB08215046FFF737FB0028A5D06C +:10ACE00002980121022E01702178417045808680F2 +:10ACF00002D005E00625EAE7A188C180E18801814C +:10AD0000CDE900980523082239465046D4E710B50E +:10AD10000446032109F0CAF8014600F10802204662 +:10AD2000BDE8104073E72DE9F04F0F4605468DB0A2 +:10AD300014465088032109F0B9F84FF000088DF847 +:10AD400014800646ADF81680042F7BD36A78002A5B +:10AD500078D028784FF6FF794FF01C0A132834D0AA +:10AD600008DC012871D006284AD007286ED01228A6 +:10AD70000ED106E014286AD0152869D0162807D10C +:10AD8000AAE10C2F04D1307800F00301022907D08A +:10AD9000CDF80880CDF80C8068788DF808004CE07C +:10ADA00040F0080030706878B07001208DF8140011 +:10ADB000A888ADF81800E888ADF81A002889ADF821 +:10ADC0001C006889ADF81E0011E1B078904239D1BD +:10ADD0003078010736D5062F34D120F008003070C6 +:10ADE0006088414660F31F4100200CF067FE02209E +:10ADF0008DF81400ADF81890A888ADF81A00F6E0A8 +:10AE0000082F1FD1A888EF88814600F0BCFE80463D +:10AE10000146304600F0E6FE18B1404600F0ABFEB9 +:10AE2000B8B1FC48D0E90010CDE902106878ADF85F +:10AE30000C908DF80800ADF80E70608802AA3146BB +:10AE4000FFF7E5FE0DB0BDE8F08FB6E01EE041E093 +:10AE5000ECE0716808EB88002C2202EBC000085A75 +:10AE6000B842EFD1EB4802AAD0E90210CDE90210B6 +:10AE700068788DF8080008F0FF058DF80A506088A2 +:10AE80003146FFF7C4FE224629461FE0082FD9D1DC +:10AE9000B5F80480E88800F076FE074601463046A3 +:10AEA00000F0A0FE0028CDD007EB870271680AEB06 +:10AEB000C2000844028A4245C4D101780829C1D1A0 +:10AEC000407869788842BDD1F9B222463046FFF712 +:10AED0001EF9B7E70E2F7FF45BAFE9886F898B46C9 +:10AEE000B5F808903046FFF775F9ABF140014029FD +:10AEF00001D309204AE0B9F1170F01D3172F01D26E +:10AF00000B2043E040280ED000EB800271680AEB72 +:10AF1000C20008440178012903D140786978884249 +:10AF200090D00A2032E03046FFF735F9014640283C +:10AF30002BD001EB810372680AEBC30002EB00081F +:10AF4000012288F800206A7888F801207068AA88B1 +:10AF50004089B84200D93846AD8903232372A282C2 +:10AF6000E7812082A4F80C906582084600F018FE64 +:10AF70006081A8F81490A8F81870A8F80E50A8F8E6 +:10AF800010B0204600F0EDFD5CE7042005212172A1 +:10AF9000A4F80A80E081012121739E49D1E90421AE +:10AFA000CDE9022169788DF80810ADF80A006088B3 +:10AFB00002AA3146FFF72BFEE3E7062F89D3B078CC +:10AFC00090421AD13078010717D520F00800307070 +:10AFD0006088414660F31F4100200CF06FFD0220A5 +:10AFE0008DF81400A888ADF81800ADF81A906088A4 +:10AFF000224605A9F9F7E3F824E704213046FFF7D4 +:10B0000000F905464028BFD0022083030090224665 +:10B010002946304600F003FE4146608865F30F2163 +:10B0200060F31F4106200CF049FD0BE70E2FABD15A +:10B0300004213046FFF7E5F881464028A4D0414678 +:10B04000608869F30F2160F31F4106200CF036FD84 +:10B05000A8890B906889099070682F894089B84247 +:10B0600000D938468346B5F80680A8880A90484635 +:10B0700000F096FD60810B9818B1022000900B9BA8 +:10B0800024E0B8F1170F1ED3172F1CD30420207211 +:10B0900009986082E781A4F810B0A4F80C8009EB4D +:10B0A000890271680AEBC2000D18DDE90913A5F8E1 +:10B0B0001480A5F818B0E9812B82204600F051FDDC +:10B0C00006202870BEE601200B2300902246494648 +:10B0D000304600F0A4FDB5E6082F8DD1A988304692 +:10B0E000FFF778F80746402886D000F044FD002896 +:10B0F0009BD107EB870271680AEBC20008448046C7 +:10B1000000F086FD002890D1ED88B8F80E002844A4 +:10B11000B0F5803F05D360883A46314600F0B6FD71 +:10B1200090E6002DCED0A8F80E0060883A46314651 +:10B13000FFF73CFB08202072384600F031FD6081AB +:10B14000A5811EE72DE9F05F0C4601281FD09579F7 +:10B1500092F8048092F8056005EB85011F2202EB4E +:10B16000C10121F0030B08EB060111FB05F14FF6BD +:10B17000FF7202EAC10909F1030115FB0611264F0E +:10B1800021F0031ABB6840B101283ED125E0616877 +:10B19000E57891F800804E78DEE75946184608F0C9 +:10B1A000C0FC606000B9FFDF5A460021606803F010 +:10B1B0006EF9E5705146B86808F0B3FC6168486103 +:10B1C00000B9FFDF6068426902EB090181616068D4 +:10B1D00080F800806068467017E0606852464169F8 +:10B1E000184608F0C9FC5A466168B86808F0C4FC03 +:10B1F000032008F003FE0446032008F007FE201A8F +:10B20000012802D1B86808F081FC0BEB0A00BDE808 +:10B21000F09F000060610200300000200246002123 +:10B2200002208FE7F7B5FF4C0A20164620700098E1 +:10B2300060B100254FEA0D0008F055FC0021A17017 +:10B240006670002D01D10099A160FEBD012500208E +:10B25000F2E770B50C46154638220021204603F06F +:10B2600016F9012666700A22002104F11C0003F081 +:10B270000EF905B9FFDF297A207861F3010020700B +:10B28000A87900282DD02A4621460020FFF75AFF32 +:10B2900061684020E34A88706168C870616808711D +:10B2A000616848716168887161682888088161688F +:10B2B00068884881606886819078002811D061682C +:10B2C0000620087761682888C885616828884886CC +:10B2D00060680685606869889288018681864685EF +:10B2E000828570BDC878002802D00022012029E79D +:10B2F000704770B50546002165F31F4100200CF032 +:10B30000DDFB0321284608F0D1FD040000D1FFDF5A +:10B3100021462846FEF71CFF002804D0207840F084 +:10B3200010002070012070BD70B505460C4603204A +:10B3300008F056FD08B1002070BDBA4885708480C1 +:10B34000012070BD2DE9FF4180460E460F0CFEF72F +:10B350004DF9050007D06F800321384608F0A6FD9F +:10B36000040008D106E004B03846BDE8F0411321DE +:10B37000F9F750BBFFDF5FEA080005D0B8F1060F10 +:10B3800018D0FFDFBDE8FF8120782A4620F00800B2 +:10B3900020700020ADF8020002208DF800004FF66A +:10B3A000FF70ADF80400ADF8060069463846F8F7BE +:10B3B00006FFE7E7C6F3072101EB81021C23606863 +:10B3C00003EBC202805C042803D008280AD0FFDF08 +:10B3D000D8E7012000904FF440432A46204600F071 +:10B3E0001EFCCFE704B02A462046BDE8F041FEF738 +:10B3F0008EBE2DE9F05F05464089002790460C4639 +:10B400003E46824600F0BFFB8146287AC01E0828CF +:10B410006BD2DFE800F00D04192058363C47722744 +:10B420001026002C6CD0D5E90301C4E902015CE0D0 +:10B4300070271226002C63D00A2205F10C0104F1BA +:10B44000080002F0FAFF50E071270C26002C57D0BC +:10B45000E868A06049E0742710269CB3D5E9030191 +:10B46000C4E902016888032108F020FD8346FEF745 +:10B47000BDF802466888508049465846FEF7FEFDF2 +:10B4800033E075270A26ECB1A88920812DE07627C4 +:10B490001426BCB105F10C0004F1080307C883E8C9 +:10B4A000070022E07727102664B1D5E90301C4E93B +:10B4B00002016888032108F0F9FC01466888FFF75B +:10B4C00046FB12E01CE073270826CCB168880321F4 +:10B4D00008F0ECFC01460078C00606D56888FEF747 +:10B4E00037FE10B96888F8F777FAA8F800602CB131 +:10B4F0002780A4F806A066806888A080002086E6E1 +:10B50000A8F80060FAE72DE9FC410C461E461746F4 +:10B510008046032108F0CAFC05460A2C0AD2DFE85F +:10B5200004F005050505050509090907042303E0DD +:10B53000062301E0FFDF0023CDE9007622462946FD +:10B540004046FEF7C2FEBDE8FC81F8B50546A0F511 +:10B550007F40FF382BD0284608F0D9FD040000D1E9 +:10B56000FFDF204608F05FF9002821D001466A4637 +:10B57000204608F07AF900980321B0F805602846C3 +:10B5800008F094FC0446052E13D0304600F0FBFA78 +:10B5900005460146204600F025FB40B1606805EBFA +:10B5A00085013E2202EBC101405A002800D0012053 +:10B5B000F8BD007A0028FAD00020F8BDF8B504469E +:10B5C000408808F0A4FD050000D1FFDF6A46284648 +:10B5D000616800F0C4FA01460098091F8BB230F888 +:10B5E000032F0280428842800188994205D1042AB3 +:10B5F00008D0052A20D0062A16D022461946FFF781 +:10B6000099F9F8BD001D0E46054601462246304612 +:10B61000F6F739FF0828F4D1224629463046FCF7D0 +:10B6200064F9F8BD30000020636864880A46011D93 +:10B630002046FAF789F9F4E72246001DFFF773FB6D +:10B64000EFE770B50D460646032108F02FFC040015 +:10B6500004D02078000704D5112070BD43F2020009 +:10B6600070BD2A4621463046FEF7C9FE18B9286843 +:10B6700060616868A061207840F0080020700020B8 +:10B6800070BD70B50D460646032108F00FFC04009E +:10B6900004D02078000704D4082070BD43F20200D3 +:10B6A00070BD2A4621463046FEF7DDFE00B9A58270 +:10B6B000207820F008002070002070BD2DE9F04FA8 +:10B6C0000E4691B08046032108F0F0FB0446404648 +:10B6D00008F02FFD07460020079008900990ADF86C +:10B6E00030000A9002900390049004B9FFDF0DF13E +:10B6F0000809FFB9FFDF1DE038460BA9002207F05B +:10B7000055FF9DF82C0000F07F050A2D00D3FFDFC8 +:10B710006019017F491E01779DF82C00000609D5AC +:10B720002A460CA907A8FEF7C0FD19F80510491C08 +:10B7300009F80510761EF6B2DED204F13400F84D99 +:10B7400004F1260BDFF8DCA304F12A07069010E0D1 +:10B750005846069900F08CFA064628700A2800D34D +:10B76000FFDF5AF8261040468847E08CC05DB042A3 +:10B7700002D0208D0028EBD10A202870E94D4E46DA +:10B7800028350EE00CA907A800F072FA0446375DD0 +:10B7900055F8240000B9FFDF55F82420394640460B +:10B7A0009047BDF81E000028ECD111B0BDE8F08F25 +:10B7B00010B5032108F07AFB040000D1FFDF0A2254 +:10B7C000002104F11C0002F062FE207840F0040029 +:10B7D000207010BD10B50C46032108F067FB204413 +:10B7E000007F002800D0012010BD2DE9F84F8946C8 +:10B7F00015468246032108F059FB070004D028466D +:10B80000F5F727FD40B903E043F20200BDE8F88FE9 +:10B810004846F5F744FD08B11020F7E7786828B1ED +:10B8200069880089814201D90920EFE7B9F8000051 +:10B830001C2488B100F0A7F980460146384600F084 +:10B84000D1F988B108EB8800796804EBC000085C86 +:10B8500001280BD00820D9E73846FEF79CFC80462B +:10B86000402807D11320D1E70520CFE7FDF7BEFE22 +:10B8700006000BD008EB8800796804EBC0000C18B8 +:10B88000B9F8000020B1E88910B113E01120BDE73C +:10B890002888172802D36888172801D20720B5E71F +:10B8A000686838B12B1D224641463846FFF7E9F853 +:10B8B0000028ABD104F10C0269462046FEF7E1FFF7 +:10B8C000288860826888E082B9F8000030B10220E0 +:10B8D0002070E889A080E889A0B12BE003202070C7 +:10B8E000A889A08078688178402905D180F80280F5 +:10B8F00039465046FEF7D6FD404600F051F9A9F80A +:10B90000000021E07868218B4089884200D90846F0 +:10B910002083A6F802A004203072B9F800007081DC +:10B92000E0897082F181208B3082A08AB08130461C +:10B9300000F017F97868C178402905D180F80380B4 +:10B9400039465046FEF7FFFD00205FE770B50D4613 +:10B950000646032108F0AAFA04000ED0284600F09B +:10B9600012F905460146204600F03CF918B1284678 +:10B9700000F001F920B1052070BD43F2020070BD56 +:10B9800005EB85011C22606802EBC101084400F050 +:10B990003FF908B1082070BD2A462146304600F024 +:10B9A00075F9002070BD2DE9F0410C461746804620 +:10B9B000032108F07BFA0546204600F0E4F804462F +:10B9C00095B10146284600F00DF980B104EB8401E1 +:10B9D0001C22686802EBC1014618304600F018F9D5 +:10B9E00038B10820BDE8F08143F20200FAE70520F3 +:10B9F000F8E73B46324621462846FFF742F8002842 +:10BA0000F0D1E2B229464046FEF75AFF708C083862 +:10BA1000082803D242484078F7F776FA0020E1E799 +:10BA20002DE9F0410D4617468046032108F03EFA05 +:10BA30000446284600F0A7F8064624B13846F5F734 +:10BA400008FC38B902E043F20200CBE73868F5F7AA +:10BA500000FC08B11020C5E73146204600F0C2F8CE +:10BA600060B106EB86011C22606802EBC10145183B +:10BA7000284600F0CDF818B10820B3E70520B1E75B +:10BA8000B888A98A884201D90C20ABE76168E88CA4 +:10BA90004978B0EBC10F01D31320A3E7314620460C +:10BAA00000F094F80146606808234078C20005F170 +:10BAB000240008F082F8D7E90012C0E90012F2B2BF +:10BAC00021464046FEF772FE00208BE72DE9F04745 +:10BAD0000D461F4690468146032108F0E7F90446CB +:10BAE000284600F050F806463CB14DB13846F5F70F +:10BAF000F4FB50B11020BDE8F08743F20200FAE7F2 +:10BB0000606858B1A0F80C8027E03146204600F06C +:10BB100069F818B1304600F02EF828B10520EAE7A0 +:10BB2000300000207861020006EB86011C2260686C +:10BB300002EBC1014518284600F06AF808B1082058 +:10BB4000D9E7A5F80880F2B221464846FEF7B8FECC +:10BB50001FB1A8896989084438800020CBE707F025 +:10BB600084BE017821F00F01491C21F0F001103151 +:10BB70000170FDF73EBD20B94E48807808B1012024 +:10BB80007047002070474B498988884201D10020C6 +:10BB90007047402801D2402000E0403880B2704712 +:10BBA00010B50446402800D9FFDF2046FFF7E3FF29 +:10BBB00010B14048808810BD4034A0B210BD40682C +:10BBC00042690078484302EBC0007047C278406881 +:10BBD000037812FB03F24378406901FB032100EB79 +:10BBE000C1007047C2788A4209D9406801EB8101DF +:10BBF0001C2202EBC101405C08B10120704700200B +:10BC000070470078062801D901207047002070474E +:10BC10000078062801D00120704700207047F0B45A +:10BC200001EB81061C27446807EBC6063444049DDB +:10BC300005262670E3802571F0BCFEF71FBA10B50B +:10BC4000418911B1FFF7DDFF08B1002010BD0120CF +:10BC500010BD10B5C18C8278B1EBC20F04D9C18977 +:10BC600011B1FFF7CEFF08B1002010BD012010BDBB +:10BC700010B50C4601230A22011D07F0D4FF0078FD +:10BC80002188012282409143218010BDF0B402EB53 +:10BC900082051C264C6806EBC505072363554B68D7 +:10BCA0001C79402C03D11A71F0BCFEF791BCF0BC9A +:10BCB000704700003000002010B5EFF3108000F056 +:10BCC000010472B6FC484178491C41704078012853 +:10BCD00001D10BF0B3FA002C00D162B610BD70B5E3 +:10BCE000F54CA07848B90125A570FFF7E5FF0BF0EA +:10BCF000B6FA20B100200BF080FA002070BD4FF0A2 +:10BD00008040E570C0F80453F7E770B5EFF310809A +:10BD100000F0010572B6E84C607800B9FFDF60788A +:10BD2000401E6070607808B90BF08CFA002D00D1CD +:10BD300062B670BDE04810B5817821B10021C170B4 +:10BD40008170FFF7E2FF002010BD10B504460BF034 +:10BD500086FAD9498978084000D001202060002067 +:10BD600010BD10B5FFF7A8FF0BF079FA02220123EE +:10BD7000D149540728B1D1480260236103200872D9 +:10BD800002E00A72C4F804330020887110BD2DE966 +:10BD9000F84FDFF824934278817889F80420002650 +:10BDA00089F80510074689F806600078DFF810B3B7 +:10BDB000354620B1012811D0022811D0FFDF0BF049 +:10BDC00060FA4FF0804498B10BF062FAB0420FD1A4 +:10BDD00030460BF061FA0028FAD042E00126EEE787 +:10BDE000FFF76AFF58460168C907FCD00226E6E75C +:10BDF0000120E060C4F80451B2490E600107D1F897 +:10BE00004412B04AC1F3423124321160AD49343199 +:10BE100008604FF0020AC4F804A3A060AA480168B1 +:10BE2000C94341F3001101F10108016841F010011B +:10BE3000016001E019F0A8FFD4F804010028F9D04E +:10BE400030460BF029FA0028FAD0B8F1000F04D1DF +:10BE50009D48016821F010010160C4F808A3C4F8EE +:10BE6000045199F805004E4680B1387870B90BF04E +:10BE7000F6F980460BF006FC6FF00042B8F1000FB7 +:10BE800002D0C6E9032001E0C6E90302DBF80000A6 +:10BE9000C00701D00BF0DFF9387810B13572BDE87A +:10BEA000F88F4FF01808C4F808830127A7614FF4F2 +:10BEB0002070ADF8000000BFBDF80000411EADF8D5 +:10BEC0000010F9D2C4F80C51C4F810517A48C01DC2 +:10BED0000BF06CFA3570FFF744FF676179493079F0 +:10BEE00020310860C4F80483D9E770B5050000D19B +:10BEF000FFDF4FF080424FF0FF30C2F8080300210F +:10BF0000C2F80011C2F80411C2F80C11C2F81011E5 +:10BF1000694C61700BF0AFF910B10120A070607036 +:10BF200067480068C00701D00BF095F92846BDE8C6 +:10BF300070402CE76048007A002800D0012070474C +:10BF40002DE9F04F61484FF0000A85B0D0F800B0FD +:10BF5000D14657465D4A5E49083211608406D4F8DE +:10BF6000080110B14FF0010801E04FF000080BF09C +:10BF7000F0F978B1D4F8240100B101208246D4F858 +:10BF80001C0100B101208146D4F8200108B101272D +:10BF900000E00027D4F8000100B101200490D4F89B +:10BFA000040100B101200390D4F80C0100B101207C +:10BFB0000290D4F8100100B101203F4D0190287883 +:10BFC00000260090B8F1000F04D0C4F808610120E9 +:10BFD0000BF013F9BAF1000F04D0C4F82461092062 +:10BFE0000BF00BF9B9F1000F04D0C4F81C610A2062 +:10BFF0000BF003F927B1C4F820610B200BF0FDF81A +:10C000002D48C01D0BF0DAF900B1FFDFDFF8AC807E +:10C010000498012780B1C4F80873E87818B1EE706D +:10C0200000200BF0EAF8287A022805D103202872B4 +:10C030000221C8F800102761039808B1C4F8046110 +:10C04000029850B1C4F80C61287A032800D0FFDFB1 +:10C05000C8F800602F72FFF758FE019838B1C4F895 +:10C060001061287A012801D100F05CF8676100981E +:10C0700038B12E70287A012801D1FFF772FEFFF740 +:10C0800044FE0D48C01D0BF0AFF91049091DC1F861 +:10C0900000B005B0BDE8F08F074810B5C01D0BF02B +:10C0A0008DF90549B0B1012008704FF0E021C1F8C9 +:10C0B0000002BDE81040FFE544000020340C0040C1 +:10C0C0000C0400401805004010ED00E0100502408F +:10C0D00001000001087A012801D1FFF742FEBDE806 +:10C0E000104024480BF080B970B5224CE41FA078B2 +:10C0F00008B90BF0A7F801208507A861207A00266F +:10C10000032809D1D5F80C0120B900200BF0C4F8A0 +:10C110000028F7D1C5F80C6126724FF0FF30C5F842 +:10C12000080370BD70B5134CE41F6079F0B10128AD +:10C1300003D0A179401E814218DA0BF090F8054631 +:10C140000BF0A0FA6179012902D9A179491CA171EA +:10C150000DB1216900E0E168411A022902DA11F10A +:10C16000020F06DC0DB1206100E0E060BDE8704028 +:10C17000F7E570BD4B0000200F4A12680D498A4256 +:10C180000CD118470C4A12680A4B9A4206D101B5E5 +:10C190000BF04AFA0BF01DFDBDE8014007490968A4 +:10C1A0000958084706480749054A064B70470000EA +:10C1B00000000000BEBAFECA5C000020040000209F +:10C1C000C8130020C8130020F8B51D46DDE9064756 +:10C1D0000E000AD007F0ADFF2346FF1DBCB231466A +:10C1E0002A46009407F0BBFBF8BDD0192246194639 +:10C1F00002F023F92046F8BD70B50D460446102222 +:10C20000002102F044F9258117206081A07B40F0D5 +:10C210000A00A07370BD4FF6FF720A80014602202B +:10C220000BF04CBC704700897047827BD30701D16B +:10C23000920703D48089088000207047052070474A +:10C24000827B920700D581817047014600200988D2 +:10C2500041F6FE52114200D00120704700B503465E +:10C26000807BC00701D0052000BD59811846FFF72B +:10C27000ECFFC00703D0987B40F004009873987BD4 +:10C2800040F001009873002000BD827B520700D56A +:10C2900009B14089704717207047827B61F3C30260 +:10C2A000827370472DE9FC5F0E460446017896467E +:10C2B000012000FA01F14DF6FF5201EA020962681D +:10C2C0004FF6FF7B1188594502D10920BDE8FC9F3C +:10C2D000B9F1000F05D041F6FE55294201D00120E9 +:10C2E000F4E741EA090111801D0014D000232B70EE +:10C2F00094F800C0052103221F464FF0020ABCF14A +:10C300000E0F76D2DFE80CF0F909252F47646B7722 +:10C31000479193B4D1D80420D8E7616820898B7BFA +:10C320009B0767D517284AD30B89834247D389894E +:10C33000172901D3814242D185F800A0A5F8010058 +:10C340003280616888816068817B21F0020181739D +:10C35000C6E0042028702089A5F801006089A5F8AE +:10C3600003003180BCE0208A3188C01D1FFA80F8AC +:10C37000414524D3062028702089A5F80100608952 +:10C38000A5F80300A089A5F805000721208ACDE9BA +:10C390000001636941E00CF0FF00082810D008207C +:10C3A00028702089A5F801006089A5F80300318074 +:10C3B0006A1D694604F10C0009F025FB10B15EE02E +:10C3C0001020EDE730889DF800100844308087E0A9 +:10C3D0000A2028702089A5F80100328044E00C2052 +:10C3E00028702089A5F801006089A5F80300318034 +:10C3F0003AE082E064E02189338800EB41021FFAD1 +:10C4000082F843453BD3B8F1050F38D30E222A708A +:10C410000BEA4101CDE90010E36860882A467146C5 +:10C42000FFF7D2FEA6F800805AE04020287060890D +:10C430003188C01C1FFA80F8414520D32878714606 +:10C4400020F03F00123028702089A5F80100608993 +:10C45000CDE9000260882A46E368FFF7B5FEA6F83A +:10C460000080287840063BD461682089888037E0C6 +:10C47000A0893288401D1FFA80F8424501D2042766 +:10C480003DE0162028702089A5F801006089A5F8F4 +:10C490000300A089CDE9000160882A46714623691E +:10C4A000FFF792FEA6F80080DEE718202870207AB9 +:10C4B0006870A6F800A013E061680A88920401D4AD +:10C4C00005271CE0C9882289914201D0062716E081 +:10C4D0001E21297030806068018821F4005101809C +:10C4E000B9F1000F0BD061887823002202200BF0F5 +:10C4F0003BFA61682078887006E033800327606823 +:10C50000018821EA090101803846DFE62DE9FF4F65 +:10C5100085B01746129C0D001E461CD03078C1070E +:10C5200003D000F03F00192801D9012100E00021CB +:10C530002046FFF7AAFEA8420DD32088A0F57F4130 +:10C54000FF3908D03078410601D4000605D508200F +:10C5500009B0BDE8F08F0720FAE700208DF8000051 +:10C560008DF8010030786B1E00F03F0C0121A81EF1 +:10C570004FF0050A4FF002094FF0030B9AB2BCF1DD +:10C58000200F75D2DFE80CF08B10745E7468748C29 +:10C59000749C74B574BA74C874D474E1747474F10E +:10C5A00074EF74EE74ED748B052D78D18DF80090D6 +:10C5B000A0788DF804007088ADF8060030798DF809 +:10C5C0000100707800F03F000C2829D00ADCA0F1AF +:10C5D0000200092863D2DFE800F0126215621A62D5 +:10C5E0001D622000122824D004DC0E281BD0102845 +:10C5F000DBD11BE016281FD01828D6D11FE02078E9 +:10C60000800701E020784007002848DAEEE0207833 +:10C610000007F9E72078C006F6E720788006F3E700 +:10C6200020784006F0E720780006EDE72088C00576 +:10C63000EAE720884005E7E720880005E4E720884E +:10C64000C004E1E72078800729D5032D27D18DF894 +:10C6500000B0B6F8010081E0217849071FD5062D0A +:10C660001DD381B27078012803D0022817D102E0CF +:10C67000C9E0022000E0102004228DF8002072782A +:10C680008DF80420801CB1FBF0F2ADF8062092B2C8 +:10C6900042438A4203D10397ADF80890A6E079E0BF +:10C6A0002078000776D598B282088DF800A0ADF802 +:10C6B0000420B0EB820F6DD10297ADF8061095E023 +:10C6C0002178C90666D5022D64D381B206208DF883 +:10C6D0000000707802285DD3B1FBF0F28DF8040001 +:10C6E000ADF8062092B242438A4253D1ADF8089089 +:10C6F0007BE0207880064DD5072003E020784006B7 +:10C700007FD508208DF80000A088ADF80400ADF8B2 +:10C710000620ADF8081068E02078000671D50920E1 +:10C72000ADF804208DF80000ADF8061002975DE02A +:10C730002188C90565D5022D63D381B20A208DF801 +:10C740000000707804285CD3C6E72088400558D5DF +:10C75000012D56D10B208DF80000A088ADF8040003 +:10C7600044E021E026E016E0FFE72088000548D5F8 +:10C77000052D46D30C208DF80000A088ADF80400EC +:10C78000B6F803006D1FADF80850ADF80600ADF81F +:10C790000AA02AE035E02088C00432D5012D30D12E +:10C7A0000D208DF8000021E02088800429D4B6F8FF +:10C7B0000100E080A07B000723D5032D21D3307832 +:10C7C00000F03F001B2818D00F208DF800002088B3 +:10C7D00040F40050A4F80000B6F80100ADF80400E1 +:10C7E000ED1EADF80650ADF808B003976946059800 +:10C7F000F5F792FB050008D016E00E208DF800003A +:10C80000EAE7072510E008250EE0307800F03F0049 +:10C810001B2809D01D2807D0022005990BF04EF9DE +:10C82000208800F400502080A07B400708D52046D7 +:10C83000FFF70BFDC00703D1A07B20F00400A0731D +:10C84000284685E61FB5022806D101208DF8000094 +:10C8500088B26946F5F760FB1FBD0000F8B51D46BC +:10C86000DDE906470E000AD007F063FC2346FF1DF2 +:10C87000BCB231462A46009407F071F8F8BDD019D1 +:10C880002246194601F0D9FD2046F8BD2DE9FF4F9B +:10C890008DB09B46DDE91B57DDF87CA00C46082BCC +:10C8A00005D0E06901F0FEF850B11020D2E02888F0 +:10C8B000092140F0100028808AF80010022617E0B5 +:10C8C000E16901208871E2694FF420519180E169AA +:10C8D0008872E06942F601010181E06900218173FB +:10C8E0002888112140F0200028808AF800100426B2 +:10C8F00038780A900A2038704FF0020904F11800C5 +:10C900004D460C9001F0C6FBB04681E0BBF1100F24 +:10C910000ED1022D0CD0A9EB0800801C80B20221A0 +:10C92000CDE9001005AB52461E990D98FFF796FF12 +:10C93000BDF816101A98814203D9F74800790F9074 +:10C9400004E003D10A9808B138702FE04FF00201DB +:10C95000CDE900190DF1160352461E990D98FFF707 +:10C960007DFF1D980088401B801B83B2C6F1FF002D +:10C97000984200D203461E990BA8D9B15FF000027D +:10C98000DDF878C0CDE9032009EB060189B2CDE9D5 +:10C9900001C10F980090BDF8161000220D9801F00B +:10C9A0000EFC387070B1C0B2832807D0BDF81600F5 +:10C9B00020833AE00AEB09018A19E1E7022011B06D +:10C9C000BDE8F08FBDF82C00811901F0FF08022DA1 +:10C9D0000DD09AF80120424506D1BDF820108142C1 +:10C9E00007D0B8F1FF0F04D09AF801801FE08AF851 +:10C9F0000180C94800680178052902D1BDF81610E8 +:10CA0000818009EB08001FFA80F905EB080085B268 +:10CA1000DDE90C1005AB0F9A01F03FFB28B91D981A +:10CA20000088411B4145BFF671AF022D13D0BBF109 +:10CA3000100F0CD1A9EB0800801C81B20220CDE9B7 +:10CA4000000105AB52461E990D98FFF707FF1D9890 +:10CA50000580002038700020B1E72DE9F8439C469E +:10CA6000089E13460027B26B9AB3491F8CB2F18F10 +:10CA7000A1F57F45FF3D05D05518AD882944891D96 +:10CA80008DB200E000252919B6F83C8008314145F7 +:10CA900020D82A44BCF8011022F8021BBCF803106D +:10CAA00022F8021B984622F8024B914607F02FFB12 +:10CAB0004FF00C0C41464A462346CDF800C006F024 +:10CAC0001AFFF587B16B00202944A41D214408807A +:10CAD00003E001E0092700E083273846BDE8F8833A +:10CAE00010B50B88848F9C420CD9846BE0180488A5 +:10CAF00044B1848824F40044A41D23440B801060B6 +:10CB0000002010BD0A2010BD2DE9F0478AB0002595 +:10CB1000904689468246ADF8185007274BE00598A5 +:10CB200006888088000446D4A8F8006007A801950C +:10CB300000970295CDE903504FF40073002231466F +:10CB4000504601F03CFB04003CD1BDF81800ADF8A4 +:10CB50002000059804888188B44216D10A0414D4B0 +:10CB600001950295039521F400410097049541F445 +:10CB7000804342882146504601F0BFF804000BD1A3 +:10CB80000598818841F40041818005AA08A948469A +:10CB9000FFF7A6FF0400DCD00097059802950195E9 +:10CBA000039504950188BDF81C300022504601F021 +:10CBB000A4F80A2C06D105AA06A94846FFF790FF5B +:10CBC0000400ACD0ADF8185004E00598818821F439 +:10CBD0000041818005AA06A94846FFF781FF002889 +:10CBE000F3D00A2C03D020460AB0BDE8F08700201D +:10CBF000FAE710B50C46896B86B051B10C218DF85F +:10CC00000010A18FADF80810A16B01916946FAF7E9 +:10CC100001FB00204FF6FF71A063E187A08706B0FB +:10CC200010BD2DE9F0410D460746896B0020069E98 +:10CC30001446002911D0012B0FD13246294638461F +:10CC4000FFF762FF002808D1002C06D032462946A3 +:10CC50003846BDE8F04100F034BFBDE8F0812DE971 +:10CC6000FC411446DDE9087C0E46DDE90A15521D3B +:10CC7000BCF800E092B2964502D20720BDE8FC81E4 +:10CC8000ACF8002017222A70A5F80160A5F803303F +:10CC90000522CDE900423B462A46FFF7DFFD002092 +:10CCA000ECE770B50C46154648220021204601F0FD +:10CCB000EEFB04F1080044F81C0F00204FF6FF7152 +:10CCC000E06161842084A5841720E08494F82A0020 +:10CCD00040F00A0084F82A0070BD4FF6FF720A8007 +:10CCE000014603200AF0EABE30B585B00C46054681 +:10CCF000FFF77FFFA18E284629B101218DF8001092 +:10CD00006946FAF787FA0020E0622063606305B0A5 +:10CD100030BDB0F8400070476000002090F8462019 +:10CD2000920703D4408808800020F4E70620F2E749 +:10CD300090F846209207EED5A0F84410EBE70146A4 +:10CD4000002009880A0700D5012011F0F00F01D05A +:10CD500040F00200CA0501D540F004008A0501D563 +:10CD600040F008004A0501D540F010000905D2D571 +:10CD700040F02000CFE700B5034690F84600C0071A +:10CD800001D0062000BDA3F842101846FFF7D7FFD8 +:10CD900010F03E0F05D093F8460040F0040083F8F1 +:10CDA000460013F8460F40F001001870002000BD47 +:10CDB00090F84620520700D511B1B0F84200AAE71A +:10CDC0001720A8E710F8462F61F3C3020270A2E70C +:10CDD0002DE9FF4F9BB00E00DDE92B34DDE929780A +:10CDE000289D24D02878C10703D000F03F001928DF +:10CDF00001D9012100E000212046FFF7D9FFB04210 +:10CE000015D32878410600F03F010CD41E290CD020 +:10CE1000218811F47F6F0AD13A8842B1A1F57F428F +:10CE2000FF3A04D001E0122901D1000602D5042006 +:10CE30001FB0C5E5FA491D984FF0000A08718DF83A +:10CE400018A08DF83CA00FAA0A60ADF81CA0ADF8A0 +:10CE500050A02978994601F03F02701F5B1C04F135 +:10CE6000180C4FF0060E4FF0040BCDF858C01F2AD7 +:10CE70007ED2DFE802F07D7D107D267DAC7DF47DE5 +:10CE8000F37DF27DF17DF47DF07D7D7DEF7DEE7DA6 +:10CE90007D7D7D7DED0094F84610B5F80100890791 +:10CEA00001D5032E02D08DF818B01EE34FF40061B7 +:10CEB000ADF85010608003218DF83C10ADF84000B3 +:10CEC000D4E2052EEFD1B5F801002083ADF81C00A7 +:10CED000B5F80310618308B1884201D9012079E1D6 +:10CEE0000020A07220814FF6FF702084169801F078 +:10CEF000D1F8052089F800000220029083460AAB91 +:10CF00001D9A16991B9801F0C8F890BB9DF82E0049 +:10CF1000012804D0022089F80100102003E001203C +:10CF200089F8010002200590002203A90BA808F04F +:10CF30006AFDE8BB9DF80C00059981423DD1398816 +:10CF4000801CA1EB0B01814237DB02990220CDE965 +:10CF500000010DF12A034A4641461B98FFF77EFC6B +:10CF600002980BF1020B801C81B217AA029101E01A +:10CF70009CE228E003A90BA808F045FD02999DF862 +:10CF80000C00CDE9000117AB4A4641461B98FFF75C +:10CF900065FC9DF80C000AAB0BEB00011FFA81FB4E +:10CFA00002991D9A084480B2029016991B9800E0DD +:10CFB00003E001F072F80028B6D0BBF1020F02D0F6 +:10CFC000A7F800B04FE20A208DF818004BE20021CC +:10CFD0000391072EFFF467AFB5F801002083ADF889 +:10CFE0001C00B5F80320628300283FF477AF90421D +:10CFF0003FF674AF0120A072B5F805002081002033 +:10D00000A073E06900F04EFD78B9E16901208871F4 +:10D01000E2694FF420519180E1698872E16942F63A +:10D0200001000881E06900218173F01F20841E98AF +:10D03000606207206084169801F02CF8072089F8B8 +:10D0400000000120049002900020ADF82A0028E0A2 +:10D0500019E29FE135E1E5E012E2A8E080E043E07B +:10D060000298012814D0E0698079012803D1BDF825 +:10D070002800ADF80E00049803ABCDE900B04A4695 +:10D0800041461B98FFF7EAFB0498001D80B204900C +:10D09000BDF82A00ADF80C00ADF80E00059880B27E +:10D0A00002900AAB1D9A16991B9800F0F6FF28B95A +:10D0B00002983988001D05908142D1D2029801283A +:10D0C00081D0E0698079012803D1BDF82800ADF84E +:10D0D0000E00049803ABCDE900B04A4641461B98C8 +:10D0E000FFF7BCFB0298BDE1072E02D0152E7FF49E +:10D0F000DAAEB5F801102183ADF81C10B5F80320A5 +:10D10000628300293FF4EAAE91423FF6E7AE012187 +:10D11000A1724FF0000BA4F808B084F80EB0052EF1 +:10D1200007D0C0B2691DE26908F06BFC00287FF4EB +:10D130004AAF4FF6FF70208401A906AA14A8CDF8C3 +:10D1400000B081E885032878214600F03F031D9A4E +:10D150001B98FFF79BFB8246208BADF81C0082E1F9 +:10D160000120032EC3D14021ADF85010B5F80110B5 +:10D170002183ADF81C100AAAB8F1000F00D00023DB +:10D18000CDE9020304921D98CDF804800090388800 +:10D190000022401E83B21B9801F011F88DF8180090 +:10D1A00090BB0B2089F80000BDF8280035E04FF057 +:10D1B000010C052E9BD18020ADF85000B5F8011070 +:10D1C0002183B5F803002084ADF81C10B0F5007F72 +:10D1D00003D907208DF8180087E140F47C422284AF +:10D1E0000CA8B8F1000F00D00023CDE90330CDE941 +:10D1F000018C1D9800903888401E83B21B9800F067 +:10D20000DEFF8DF8180018B18328A8D10220BFE0F6 +:10D210000D2189F80010BDF83000401C22E100000B +:10D2200060000020032E04D248067FF53CAE0020AB +:10D2300018E1B5F80110ADF81C102878400602D5A9 +:10D240008DF83CE002E007208DF83C004FF000082C +:10D250000320CDE902081E9BCDF810801D98019394 +:10D26000A6F1030B00901FFA8BF342461B9800F0C7 +:10D2700044FD8DF818008DF83C80297849060DD5BD +:10D280002088C00506D5208BBDF81C10884201D12E +:10D29000C4F8248040468DF81880E3E0832801D14B +:10D2A0004FF0020A4FF48070ADF85000BDF81C003A +:10D2B0002083A4F820B01E986062032060841321AC +:10D2C000CDE0052EFFF4EFADB5F80110ADF81C1060 +:10D2D000A28F6AB3A2F57F43FE3B29D008228DF8C6 +:10D2E0003C2000BF4FF0000B0523CDE9023BDDF8E9 +:10D2F00078C0CDF810B01D9A80B2CDF804C040F4CB +:10D3000000430092B5F803201B9800F0F6FC8DF85E +:10D310003CB04FF400718DF81800ADF85010832820 +:10D3200010D0F8B1A18FA1F57F40FE3807D0DCE026 +:10D330000B228DF83C204FF6FE72A287D2E7A4F8AC +:10D340003CB0D2E000942B4631461E9A1B98FFF762 +:10D3500084FB8DF8180008B183284BD1BDF81C0060 +:10D36000208353E700942B4631461E9A1B98FFF703 +:10D3700074FB8DF81800E8BBE18FA06B0844831D97 +:10D380008DE888034388828801881B98FFF767FC33 +:10D39000824668E095F80180022E70D15FEA0800AD +:10D3A00002D0B8F1010F6AD109208DF83C0007A81E +:10D3B00000908DF840804346002221461B98FFF7DD +:10D3C00030FC8DF842004FF0000B8DF843B050B99F +:10D3D000B8F1010F12D0B8F1000F04D1A18FA1F55F +:10D3E0007F40FF380AD0A08F40B18DF83CB04FF499 +:10D3F000806000E037E0ADF850000DE00FA91B9809 +:10D40000F9F708FF82468DF83CB04FF48060ADF824 +:10D410005000BAF1020F06D0FC480068C07928B16C +:10D420008DF8180027E0A4F8188044E0BAF1000F46 +:10D4300003D081208DF818003DE007A800904346F6 +:10D44000012221461B98FFF7ECFB8DF818002146BE +:10D450001B98FFF7CEFB9DF8180020B9192189F819 +:10D460000010012038809DF83C0020B10FA91B98C6 +:10D47000F9F7D0FE8246BAF1000F33D01BE018E076 +:10D480008DF818E031E02078000712D5012E10D178 +:10D490000A208DF83C00E088ADF8400003201B997D +:10D4A0000AF00CFB0820ADF85000C0E648067FF5F6 +:10D4B000FAAC4FF0040A2088BDF8501008432080D1 +:10D4C000BDF8500080050BD5A18FA1F57F40FE3837 +:10D4D00006D11E98E06228982063A6864FF0030AC2 +:10D4E0005046A5E49DF8180078B1012089F80000A5 +:10D4F000297889F80110BDF81C10A9F802109DF8D0 +:10D50000181089F80410052038802088BDF85010C4 +:10D5100088432080E4E72DE9FF4F8846087895B0DE +:10D52000012181404FF20900249C0140ADF82010F8 +:10D530002088DDF88890A0F57F424FF0000AFF3A7E +:10D5400006D039B1000705D5012019B0BDE8F08F2C +:10D550000820FAE7239E4FF0000B0EA886F800B0D3 +:10D5600018995D460988ADF83410A8498DF81CB0AB +:10D57000179A0A718DF838B0086098F800000128F1 +:10D580003BD0022809D003286FD1307820F03F002B +:10D590001D303070B8F80400E08098F800100320C7 +:10D5A000022904D1317821F03F011B31317094F808 +:10D5B0004610090759D505ABB9F1000F13D000216A +:10D5C00002AA82E80B000720CDE90009BDF834006B +:10D5D000B8F80410C01E83B20022159800F0EFFDC9 +:10D5E0000028D1D101E0F11CEAE7B8F80400A6F860 +:10D5F0000100BDF81400C01C04E198F805108DF876 +:10D600001C1098F80400012806D04FF4007A022874 +:10D610002CD00328B8D16CE12188B8F8080011F4A7 +:10D620000061ADF8201020D017281CD3B4F84010AA +:10D63000814218D3B4F84410172901D3814212D182 +:10D64000317821F03F01C91C3170A6F80100032197 +:10D65000ADF83410A4F8440094F8460020F002001D +:10D6600084F8460065E105257EE177E1208808F130 +:10D67000080700F4FE60ADF8200010F0F00F1BD09A +:10D6800010F0C00F03D03888228B9042EBD199B9AB +:10D69000B878C00710D0B9680720CDE902B1CDF83D +:10D6A00004B00090CDF810B0FB88BA88398815987E +:10D6B00000F023FB0028D6D12398BDF82010401C91 +:10D6C00080294ED006DC10290DD020290BD040290E +:10D6D00087D124E0B1F5807F6ED051457ED0B1F581 +:10D6E000806F97D1DEE0C80601D5082000E0102049 +:10D6F00082460DA907AA0520CDE902218DF8380040 +:10D70000ADF83CB0CDE9049608A93888CDE9000110 +:10D710005346072221461598FFF7B8F8A8E09DF870 +:10D720001C2001214FF00A0A002A9BD105ABB9F158 +:10D73000000F00D00020CDE902100720CDE900093C +:10D74000BDF834000493401E83B2218B002215984B +:10D7500000F035FD8DF81C000B203070BDF8140072 +:10D7600020E09DF81C2001214FF00C0A002A22D154 +:10D7700013ABB9F1000F00D00020CDE90210072053 +:10D78000CDE900090493BDF83400228C401E83B219 +:10D79000218B159800F013FD8DF81C000D203070C2 +:10D7A000BDF84C00401CADF8340005208DF8380061 +:10D7B000208BADF83C00BCE03888218B88427FF498 +:10D7C00052AF9DF81C004FF0120A00281CD1606A6D +:10D7D000A8B1B878C0073FF446AF00E018E0BA68D7 +:10D7E0000720CDE902B2CDF804B00090CDF810B01A +:10D7F000FB88BA88159800F080FA8DF81C00132079 +:10D8000030700120ADF8340093E00000600000208B +:10D810003988208B8142D2D19DF81C004FF0160A26 +:10D820000028A06B08D0E0B34FF6FF7000215F46E0 +:10D83000ADF808B0019027E068B1B978C907BED14A +:10D84000E18F0DAB0844821D03968DE80C024388DE +:10D850008288018809E0B878C007BCD0BA680DABEF +:10D8600003968DE80C02BB88FA881598FFF7F7F944 +:10D8700005005ED0072D72D076E0019005AA02A9BE +:10D880002046FFF72DF90146E28FBDF808008242DD +:10D8900001D00029F1D0E08FA16B084407800198E6 +:10D8A000E08746E09DF81C004FF0180A40B1208B3D +:10D8B000C8B13888208321461598FFF79AF938E0D7 +:10D8C00004F118000090237E012221461598FFF7ED +:10D8D000A8F98DF81C000028EDD119203070012026 +:10D8E000ADF83400E7E7052521461598FFF781F9E3 +:10D8F0003AE0208800F40070ADF8200050452DD1AA +:10D90000A08FA0F57F41FE3901D006252CE0D8F884 +:10D9100008004FF0160A48B1A063B8F80C10A187B0 +:10D920004FF6FF71E187A0F800B002E04FF6FF70FC +:10D93000A087BDF8200030F47F611AD07823002240 +:10D94000032015990AF010F898F80000207120883B +:10D95000BDF82010084320800EE000E00725208855 +:10D96000BDF8201088432080208810F47F6F1CD0E1 +:10D970003AE02188814321809DF8380020B10EA92A +:10D980001598F9F747FC05469DF81C000028EBD0D8 +:10D9900086F801A001203070208B70809DF81C005B +:10D9A00030710520ADF83400DEE7A18EE1B11898A2 +:10D9B0000DAB0088ADF834002398CDE90304CDE920 +:10D9C0000139206B0090E36A179A1598FFF700FA67 +:10D9D000054601208DF838000EA91598F9F71AFCB4 +:10D9E00000B10546A4F834B094F8460040070AD5C3 +:10D9F0002046FFF7A4F910F03E0F04D114F8460FAB +:10DA000020F0040020701898BDF8341001802846DA +:10DA10009BE500B585B0032806D102208DF80000F3 +:10DA200088B26946F9F7F6FB05B000BD10B5384C71 +:10DA30000B782268012B02D0022B2AD111E0137837 +:10DA40000BB1052B01D10423137023688A889A80B7 +:10DA50002268CB88D38022680B8913814989518140 +:10DA60000DE08B8893802268CB88D38022680B8955 +:10DA700013814B8953818B899381096911612168D5 +:10DA8000F9F7C8FB226800210228117003D0002892 +:10DA900000D0812010BD832010BD806B002800D0F5 +:10DAA000012070478178012909D10088B0F5205FF5 +:10DAB00003D042F60101884201D1002070470720BF +:10DAC0007047F0B587B0002415460E460746ADF8FE +:10DAD000184011E005980088288005980194811D60 +:10DAE000CDE902410721049400918388428801888E +:10DAF000384600F002F930B905AA06A93046FEF70B +:10DB0000EFFF0028E6D00A2800D1002007B0F0BDC2 +:10DB10006000002010B58B7883B102789A4205D15D +:10DB20000B885BB102E08B79091D4BB18B789A426F +:10DB3000F9D1B0F801300C88A342F4D1002010BD17 +:10DB4000812010BD072826D012B1012A27D103E079 +:10DB5000497801F0070102E04978C1F3C2010529C3 +:10DB60001DD2DFE801F00318080C12000AB10320EF +:10DB700070470220704704280DD250B10DE00528EF +:10DB800009D2801E022808D303E0062803D0032808 +:10DB900003D005207047002070470F207047812078 +:10DBA0007047C0B282060BD4000607D5FA48807AC7 +:10DBB0004143C01D01EBD00080B27047084670475A +:10DBC0000020704770B513880B800B781C0625D594 +:10DBD000F14CA47A844204D843F01000087000206D +:10DBE00070BD956800F0070605EBD0052D78F5406F +:10DBF00065F304130B701378D17803F0030341EA43 +:10DC0000032140F20123B1FBF3F503FB15119268E8 +:10DC1000E41D00FB012000EBD40070BD906870BDD6 +:10DC200037B51446BDF804101180117841F0040195 +:10DC300011709DF804100A061ED5D74AA368C1F3D7 +:10DC40000011927A824208D8FE2811D1D21DD20842 +:10DC50004942184600F01BFC0AE003EBD00200F03A +:10DC60000703012510789D40A84399400843107090 +:10DC7000207820F0100020703EBD2DE9F0410746CD +:10DC8000C81C0E4620F00300B04202D08620BDE83A +:10DC9000F081C14D002034462E60AF802881AA72E9 +:10DCA000E8801AE0E988491CE980810614D4E1780B +:10DCB00000F0030041EA002040F20121B0FBF1F244 +:10DCC00001FB12012068FFF76CFF2989084480B22C +:10DCD0002881381A3044A0600C3420784107E1D400 +:10DCE0000020D4E7AC4801220189C08800EB400045 +:10DCF00002EB8000084480B270472DE9FF4F89B0E5 +:10DD00001646DDE9168A0F46994623F44045084633 +:10DD100000F054FB040002D02078400703D4012017 +:10DD20000DB0BDE8F08F099806F086F802902078D3 +:10DD3000000606D59848817A0298814201D887204A +:10DD4000EEE7224601A90298FFF73CFF8346002038 +:10DD50008DF80C004046B8F1070F1AD00122214679 +:10DD6000FFF7F0FE0028DBD12078400611D5022015 +:10DD70008DF80C00ADF81070BDF80400ADF812007D +:10DD8000ADF814601898ADF81650CDF81CA0ADF899 +:10DD900018005FEA094004D500252E46A846012751 +:10DDA0000CE02178E07801F0030140EA012040F224 +:10DDB0000121B0FBF1F2804601FB12875FEA494086 +:10DDC00009D5B84507D1A178207901F0030140EACF +:10DDD0000120B04201D3BE4201D90720A0E7A81913 +:10DDE0001FFA80F9B94501D90D2099E79DF80C007B +:10DDF00028B103A90998F9F70BFA002890D1B84582 +:10DE000007D1A0784FEA192161F30100A07084F8CE +:10DE100004901A9800B10580199850EA0A0027D09A +:10DE2000199830B10BEB06002A46199900F005FB52 +:10DE30000EE00BEB06085746189E099806F067F9A6 +:10DE40002B46F61DB5B239464246009505F053FD06 +:10DE5000224601A90298FFF7B5FE9DF8040022466C +:10DE600020F010008DF80400DDE90110FFF7D8FE66 +:10DE7000002055E72DE9FF4FDFF81C91824685B061 +:10DE8000B9F80610D9F8000001EB410100EB81045C +:10DE900040F20120B2FBF0F1174600FB1175DDE9FD +:10DEA000138B4E4629460698FFF77BFE0346FFF785 +:10DEB00019FF1844B1880C30884202D9842009B077 +:10DEC0002FE70698C6B2300603D5B00601D5062066 +:10DED000F5E7B9F80620521C92B2A9F80620BBF16A +:10DEE000000F01D0ABF80020B00602D5C4F80880BE +:10DEF0000AE0B9F808201A4492B2A9F80820D9F823 +:10DF00000000891A0844A0602246FE200699FFF707 +:10DF100087FEE77025712078390A61F301002A0A2B +:10DF2000A17840F0040062F30101A17020709AF81A +:10DF300002006071BAF80000E08000252573300609 +:10DF400002D599F80A7000E00127B00601D54FF01C +:10DF500000084E4600244FF007090FE0CDE90258B3 +:10DF60000195CDF800900495F1882046129B089AFF +:10DF7000FFF7C3FE0028A2D1641CE4B2BC42EDD37B +:10DF800000209CE700B5FFF7ADFE03490C308A88FE +:10DF9000904203D9842000BD00060020CA8808688A +:10DFA00002EB420300EB8300521C037823F00403CE +:10DFB0000370CA80002101730846ECE72DE9F047A1 +:10DFC000804600F0FBF9070005D000264446F74DD7 +:10DFD00040F2012916E00120BDE8F087204600F05C +:10DFE000EDF90278C17802F0030241EA0222B2FBA5 +:10DFF000F9F309FB13210068FFF7D3FD3044641CDB +:10E0000086B2A4B2E988601E8142E7DCA8F1010073 +:10E01000E8802889801B288100203870DCE710B553 +:10E02000144631B1491E218005F006FFA070002082 +:10E0300010BD012010BD70B50446DC48C1880368DE +:10E0400001E0401C20802088884207D200EB40027B +:10E0500013EB820202D015786D07F2D580B28842A8 +:10E0600016D2AAB15079A072D08820819178107907 +:10E0700001F0030140EA0120A081A078E11CFFF734 +:10E08000A1FD20612088401C2080E080002070BD20 +:10E090000A2070BD0121018270472DE9FF4F85B034 +:10E0A0004FF6FF798246A3F8009048681E460D4659 +:10E0B00080788DF8060048680088ADF804000020DC +:10E0C0008DF80A00088A0C88A04200D304462C82EE +:10E0D00051E03878400708D4641C288AA4B2401C58 +:10E0E000288208F10100C0B246E0288A401C28823C +:10E0F000781D6968FFF70EFDD8BB3188494501D10D +:10E10000601E30803188A1EB080030806888A04212 +:10E1100038D3B878397900F0030041EA002801A922 +:10E12000781DFFF7F7FC20BB298949452ED0002236 +:10E1300039460798FFF706FDD8B92989414518D116 +:10E14000E9680391B5F80AC0D7F808B05046CDF891 +:10E1500000C005F0DCFFDDF800C05A460CF1070CEA +:10E160001FFA8CFC43460399CDF800C005F08DFBE7 +:10E1700060B1641CA4B200208046204600F01EF965 +:10E180000700A6D1641E2C820A2098E67480787954 +:10E19000B071F888B0803978F87801F0030140EA6E +:10E1A00001207081A6F80C80504605F045FE3A46E5 +:10E1B00006F10801FFF706FD306100207FE62DE93A +:10E1C000FF4F87B081461C469246DDF860B0DDF80F +:10E1D0005480089800F0F2F8050002D02878400733 +:10E1E00002D401200BB09CE5484605F025FE2978B5 +:10E1F000090605D56D49897A814201D88720F1E762 +:10E20000CAF309062A4601A9FFF7DCFC0746149861 +:10E2100007281CD000222946FFF794FC0028E1D1F2 +:10E220002878400613D501208DF808000898ADF82D +:10E230000C00BDF80400ADF80E00ADF81060ADF8AC +:10E24000124002A94846F8F7E3FF0028CAD129780E +:10E25000E87801F0030140EA0121AA78287902F068 +:10E26000030240EA0220564507D0B1F5007F04D9E9 +:10E27000611E814201DD0B20B4E7864201D90720EF +:10E28000B0E7801B85B2A54200D92546BBF1000F3F +:10E2900001D0ABF80050179818B1B9192A4600F010 +:10E2A000CCF8B8F1000F0DD03E4448464446169FC6 +:10E2B00005F03FFF2146FF1DBCB232462B460094BD +:10E2C00005F04DFB00208DE72DE9F04107461D4686 +:10E2D0001646084600F072F8040002D02078400785 +:10E2E00001D40120D3E4384605F0A6FD21780906C3 +:10E2F00005D52E49897A814201D88720C7E4224674 +:10E300003146FFF75FFC65B12178E07801F0030149 +:10E3100040EA0120B0F5007F01D8012000E0002094 +:10E3200028700020B3E42DE9F04107461D4616464B +:10E33000084600F043F8040002D02078400701D4DA +:10E340000120A4E4384605F077FD2178090605D5BB +:10E350001649897A814201D8872098E422463146BD +:10E36000FFF75EFCFF2D14D02178E07801F0030266 +:10E3700040EA022040F20122B0FBF2F302FB13005C +:10E3800015B900F2012080B2E070000A60F30101CB +:10E39000217000207BE410B50C4600F00FF810B19E +:10E3A0000178490704D4012010BD000000060020B8 +:10E3B000C18821804079A0700020F5E70749CA880C +:10E3C000824209D340B1096800EB40006FF00B02B4 +:10E3D00002EB8000084470470020704700060020D0 +:10E3E00070B504460D4621462B460AB9002070BD83 +:10E3F00001E0491C5B1C501E021E03D008781E78E9 +:10E40000B042F6D008781E78801BF0E730B50C4695 +:10E4100001462346051B954206D202E0521E9D5C32 +:10E420008D54002AFAD107E004E01D780D70491CD4 +:10E430005B1C521E002AF8D130BDF0B50E460146D5 +:10E44000334680EA030404F00304B4B906E002B9D9 +:10E45000F0BD13F8017B01F8017B521E01F00307A8 +:10E46000002FF4D10C461D4602E080CD80C4121F5F +:10E47000042AFAD221462B4600BF04E013F8014BD0 +:10E4800001F8014B521E002AF8D100BFE0E7F0B5B9 +:10E490000C460146E6B204E002B9F0BD01F8016B9A +:10E4A000521E01F00307002FF6D10B46E5B245EAF4 +:10E4B000052545EA054501E020C3121F042AFBD2C9 +:10E4C000194602E001F8016B521E002AFAD100BF82 +:10E4D000E3E7000010B509F0A0FDF4F7F9F909F041 +:10E4E000E7FBBDE8104009F0AFBC302834BF012085 +:10E4F00000207047202834BF4FF0A0420C4A01236F +:10E5000000F01F0003FA00F0002914BFC2F80C0548 +:10E51000C2F808057047202834BF4FF0A0410449D5 +:10E5200000F01F00012202FA00F0C1F81805704740 +:10E530000003005070B50346002002466FF02F051F +:10E540000EE09C5CA4F130060A2E02D34FF0FF309F +:10E5500070BD00EB800005EB4000521C2044D2B29D +:10E560008A42EED370BD30B50A230BE0B0FBF3F462 +:10E5700003FB1404B0FBF3F08D183034521E05F881 +:10E58000014CD2B2002AF1D130BD30B500234FF694 +:10E59000FF7510E0040A44EA002084B2C85C6040C1 +:10E5A000C0F30314604005EA00344440E0B25B1C51 +:10E5B00084EA40109BB29342ECD330BD2DE9F04188 +:10E5C000FE4B0026012793F864501C7893F868C02E +:10E5D000B8B183F89140A3F8921083F8902083F8A3 +:10E5E0008E70BCF1000F0CBF83F8946083F89450D8 +:10E5F000F3488068008805F08AFDBDE8F04105F029 +:10E6000021BA4FF6FF7083F89140A3F8920083F887 +:10E61000902083F88E70BCF1000F14BF83F89450E3 +:10E6200083F89460BDE8F0812DE9F041E44D29685C +:10E6300091F89C200024012A23D091F89620012AE9 +:10E6400030D091F86C301422DC4E0127012B32D0EF +:10E6500091F88E30012B4FD091F8A620012A1CBFD3 +:10E660000020BDE8F08144701F2200F8042B222214 +:10E67000A731FFF7E2FE286880F8A6400120BDE838 +:10E68000F08144701B220270D1F89D204260D1F8C5 +:10E69000A120826091F8A520027381F89C4001209E +:10E6A000BDE8F081447007220270D1F898204260E2 +:10E6B00081F89640E2E78046447000F8042B20225F +:10E6C0006E31FFF7BAFE88F80870286880F86C4051 +:10E6D00090F86E000028D1D1B6F87000A6F8980026 +:10E6E000A868417B86F89A1086F89670008805F035 +:10E6F0000EFD05F0B6F9C1E791F86C30012B0BD097 +:10E70000447017220270D1F890204260B1F8942032 +:10E71000028181F88E40B1E78046447000F8042BF6 +:10E7200020226E31FFF789FE88F80870286880F88B +:10E730006C4090F86E000028A0D1CDE7A04800689A +:10E7400090F86C10002914BFB0F870004FF6FF70FD +:10E75000704770B59A4C06462068002808BFFFDF56 +:10E760000025206845706660002808BFFFDF20682C +:10E77000417800291CBFFFDF70BDCC220021FFF7CC +:10E7800086FE2068FF2101707F2180F83810132158 +:10E790004184282180F86910012180F85C1080F8FC +:10E7A00061500AF0C1F9BDE8704009F0AEBA844981 +:10E7B0000968097881420CBF012000207047804819 +:10E7C000006890F82200C0F3400070477C48006861 +:10E7D00090F8220000F0010070477948006890F836 +:10E7E0002200C0F3001070472DE9F0437448002464 +:10E7F000036893F82400B3F822C0C0F38001C0F38B +:10E800004002114400F001000844CCF3001121B390 +:10E81000BCF1100F02BF6B4931F81000BDE8F08366 +:10E82000BCF1120F18BFBCF1130F0ED0BCF1150FC5 +:10E830001EBFFFDF2046BDE8F0830021624A32F8A8 +:10E84000102010FB0120BDE8F083604A002132F85F +:10E85000102010FB0120BDE8F08393F85E2093F8B0 +:10E860005F102E264FF47A774FF014084FF04009CE +:10E87000022A04BF4AF2D745B5FBF7F510D0012AAA +:10E8800004BF4AF22F75B5FBF7F510D04AF62315F1 +:10E89000B5FBF7F5082A08BF4E4613D0042A18D056 +:10E8A0002646082A0ED0042A13D0022A49D004F1A1 +:10E8B0002806042A0FD0082A1CBF4FF01908082286 +:10E8C00004D00AE04FF0140806F5A8764FF0400295 +:10E8D00003E006F5A8764FF0100218FB026212FB67 +:10E8E0000052C0EB00103A4D00EB800005EB8000B9 +:10E8F00010441CF0010F4FF4C8724FF4BF7504BFF1 +:10E90000CCF34006002E65D0CCF3400600F5A57090 +:10E91000EEB1082904BF174640260CD0042904BFD5 +:10E920002F46102607D0022907BF04F11807042636 +:10E9300004F12807082606EB860808EB86163E44F5 +:10E940001BE004F118064FF019080422C5E7082956 +:10E9500004BF164640270CD0042904BF2E461027BA +:10E9600007D0022907BF04F11806042704F128067E +:10E97000082707EB871706EB8706304400F19C0653 +:10E9800093F8690001F00C07002F08BF0020304405 +:10E9900018BF00F5416027D1082904BF164640275B +:10E9A0001BD0042904BF2E46102716D0022906BF0B +:10E9B00004F11806042704F128060CE00C060020D8 +:10E9C00068000020DC610200E4610200D461020002 +:10E9D000D4FEFFFF64E018BF0827C7EBC70707EBAB +:10E9E000470706EB4706304498301CF0010F17D05C +:10E9F000082908BF40210CD0042904BF2A46102151 +:10EA000007D0022907BF04F11802042104F12802EB +:10EA1000082101EB410303EB0111114408443BE0E1 +:10EA2000082904BF944640260CD0042904BFAC46F4 +:10EA3000102607D0022907BF04F1180C042604F1A0 +:10EA4000280C082606EB8616B3F840300CEB860C33 +:10EA50006044EB2B20D944F2552C0B3303FB0CF311 +:10EA60009B0D082907D0042902D0022905D008E00F +:10EA70002A46102108E0402106E004F11802042192 +:10EA800002E004F12802082101EB811102EB81016F +:10EA900001F5A57103FB010000F5B470BDE8F0833A +:10EAA00000F5A570082904BF944640260CD004291F +:10EAB00004BFAC46102607D0022907BF04F1180C8A +:10EAC000042604F1280C082606EB8616B3F8483015 +:10EAD0000CEB860C6044EB2BDED944F2552C0B3347 +:10EAE00003FB0CF39B0D0829C5D00429C0D00229D3 +:10EAF000C7D1C2E7FE4840F271210068806A4843EE +:10EB00007047FB48006890F83700002818BF0120C4 +:10EB1000704710B5F74C207B022818BF032808D196 +:10EB2000207D04F115010EF0E6FE08281CBF01202F +:10EB300010BD207B002816BF022800200120BDE860 +:10EB400010400AF021BDEB4908737047E849096895 +:10EB500081F8300070472DE9F047E54C2168087BCB +:10EB6000002816BF022800200120487301F10E0181 +:10EB70000AF0F4FC2168087B022816BF0328012252 +:10EB8000002281F82F204FF0080081F82D00487BEB +:10EB900001F10E034FF001064FF00007012804BFFA +:10EBA0005B7913F0C00F0AD001F10E03012804D1E4 +:10EBB000587900F0C000402801D0002000E001207A +:10EBC00081F82E00002A04BF91F8220010F0040FF3 +:10EBD00007D0087D01F115010EF08DFE216881F846 +:10EBE0002D002068476007F0BFFA2168C14D4FF043 +:10EBF0000009886095F82D000EF089FE804695F892 +:10EC00002F00002818BFB8F1000F04D095F82D0090 +:10EC10000EF0B1FC68B195F8300000281CBF95F8E3 +:10EC20002E0000281DD0697B05F10E0001290ED0B1 +:10EC300012E06E734A4605F10E0140460AF0E4FC0C +:10EC400095F82D1005F10E000EF063FF09E04079F4 +:10EC500000F0C000402831D0394605F10E000AF01E +:10EC60000BFD2068C77690F8220010F0040F08BF53 +:10EC7000BDE8F087002795F82D000EF017FD050080 +:10EC800008BFBDE8F087102102F0C2F8002818BFC5 +:10EC9000BDE8F08720683A4600F11C01C676284698 +:10ECA0000AF0B2FC206800F11C0160680FF08EF8D9 +:10ECB0006068BDE8F04701210FF0A3B80EF066FFD1 +:10ECC0004A4605F10E010AF09FFCCAE7884A12681D +:10ECD000137B0370D2F80E000860508A888070475A +:10ECE00078B584490446824E407B087332682078A8 +:10ECF00010706088ADF8000080B200F00101C0F330 +:10ED0000400341EA4301C0F3800341EA8301C0F3B9 +:10ED1000C00341EAC301C0F3001341EA0311C0F389 +:10ED2000401341EA4311C0F3801041EA801050843F +:10ED3000E07D012808BF012507D0022808BF022571 +:10ED400003D0032814BFFFDF0825306880F85E5029 +:10ED5000607E012808BF012507D0022808BF0225D0 +:10ED600003D0032814BFFFDF0825316881F85F5006 +:10ED700091F83500012829D0207B81F82400488CA7 +:10ED80001D280CBF002060688862607D81F8370014 +:10ED9000A07B002816BF0228002001200875D4F8A7 +:10EDA0000F00C1F81500B4F81300A1F81900A07EF7 +:10EDB00091F86B2060F3071281F86B20E07E012848 +:10EDC00018BF002081F83400002078BD91F85E2043 +:10EDD0000420082A08BF81F85E00082D08BF81F8CA +:10EDE0005F00C9E742480068408CC0F3001131B1B0 +:10EDF000C0F38000002804BF1F20704702E0C0F36A +:10EE0000400109B10020704710F0010F14BFEE203F +:10EE1000FF20704736480068408CC0F3001119B1DC +:10EE2000C0F3800028B102E0C0F3400008B1002028 +:10EE30007047012070472E49002209684A664B8CB2 +:10EE40001D2B0CBF81F8682081F8680070470023F3 +:10EE5000274A126882F85D30D164A2F85000012080 +:10EE600082F85D007047224A0023126882F85C3005 +:10EE7000A2F858000120516582F85C0070471C49D7 +:10EE8000096881F8360070471949096881F86100FE +:10EE900070471748006890F961007047144800688F +:10EEA00090F82200C0F3401070471148006890F8B5 +:10EEB0002200C0F3C0007047012070470C48006872 +:10EEC00090F85F00704770B509F018FE09F0F7FD83 +:10EED00009F0C0FC09F06CFD054C2068416E491C2E +:10EEE000416690F83300002558B109F01DFE03E09B +:10EEF000680000200C06002008F007FF206880F85A +:10EF000033502068457090F8391021B1BDE8704049 +:10EF100004200AF0AEBF90F86810D9B1406E81426B +:10EF200018D804200AF0A5FF206890F8220010F0FD +:10EF3000010F07D0A06843220188BDE8704001207E +:10EF4000FFF73CBBBDE8704043224FF6FF71002045 +:10EF5000FFF734BBBDE8704000200AF08ABF2DE9FE +:10EF6000F04782B00F468146FE4E4FF000083068F1 +:10EF7000458C15F0030F10D015F0010F05F00200BD +:10EF800005D0002808BF4FF0010806D004E0002893 +:10EF900018BF4FF0020800D1FFDF4FF0000A5446BF +:10EFA00015F0010F05F002000DD080B915F0040F27 +:10EFB0000DD04AF00800002F1CBF40F0010040F0C7 +:10EFC00002044DD09EE010B115F0040F0DD015F0E5 +:10EFD000070F10D015F0010F05F0020043D00028F4 +:10EFE00008BF15F0040F34D04AE0002F18BF4AF0D4 +:10EFF000090444D141E037B14AF00800044615F055 +:10F00000200F1BD07EE0316805F02002B1F84800E7 +:10F01000104308BF4AF0010474D04AF018000446B7 +:10F0200015F0200F6ED191F85E1011F00C0118BF91 +:10F030000121C94361F30000044663E0316891F89F +:10F040005E1011F00C0118BF012161F300000446AD +:10F0500058E04AF00800002F18BF40F0010451D1D9 +:10F0600040F010044EE0002818BF15F0040F07D040 +:10F07000002F18BF4AF00B0444D14AF0180441E0B5 +:10F0800015F0030F3DD115F0040F3AD077B1306879 +:10F090004AF0080490F85E0010F00C0118BF01213E +:10F0A00061F3410415F0200F24D02BE0306805F007 +:10F0B0002002B0F84810114308BF4AF0030421D0E1 +:10F0C0004AF0180415F0200F0AD000BF90F85E0037 +:10F0D00010F00C0018BF0120C04360F3410411E0A0 +:10F0E00090F85E1011F00C0118BF0121C94361F3C3 +:10F0F0000004EBE710F00C0018BF012060F30004DF +:10F1000000E0FFDF15F0400F1CD0CFB93168B1F837 +:10F110004800002804BF488C10F0010F0BD110F0FC +:10F12000020F08BF10F0200F05D115F0010F08BF26 +:10F1300015F0020F04D091F85E0010F00C0F01D111 +:10F1400044F040047068A0F800A0017821F020018C +:10F1500001704FF007010EF005FE414670680EF099 +:10F16000F8FF214670680FF000F814F0010F0CD082 +:10F170004FF006034FF000027B4970680EF0CFFF9E +:10F180003068417B70680EF02FFE14F0020F18D02B +:10F19000D6E90010B9F1000F4FF006034FF001025D +:10F1A00007D01C310EF0BBFF012170680EF029FE64 +:10F1B00007E015310EF0B3FF3068017D70680EF086 +:10F1C00020FE14F0040F18BFFFDF14F0080F19D051 +:10F1D000CDF800A03068BDF800200223B0F86A1016 +:10F1E00061F30B02ADF8002090F86B0003220109D7 +:10F1F0009DF8010061F307108DF801006946706801 +:10F200000EF08DFF012F62D13068B0F84810E1B3E5 +:10F2100090F82200C0F34000B8BB70680EF095FF74 +:10F22000401CC7B23068C7F1FF05B0F84820B0F8FD +:10F230005A10511AA942B8BF0D46AA423BD990F8BC +:10F24000220010F0010F36D144F0100421467068FE +:10F250000EF08BFFF81CC0B2ED1E284482B230685D +:10F26000B0F86A10436EC1F30B0151FA83F190F8C4 +:10F2700060303E4F1944BC460023E1FB07C31B0925 +:10F280006FF0240C03FB0C1100E020E080F860100C +:10F2900090F85F00012101F01FF90090BDF8000017 +:10F2A0009DF80210032340EA01400190042201A9C5 +:10F2B00070680EF034FF3068AAB2416C70680EF0CE +:10F2C00082FF3068B0F85A102944A0F85A1014F0A0 +:10F2D000400F06D0D6E900100123062261310EF05E +:10F2E0001EFF14F0200F18BFFFDF0020002818BFFA +:10F2F000FFDF02B0BDE8F0872DE9F043194C89B07B +:10F300002068002808BFFFDF20684178002944D129 +:10F310000178FF2941D0002680F83160A0F85A60BA +:10F32000867080F83960304609F062FB104802AD03 +:10F3300000F1240191E80E1085E80E10D0E90D10BF +:10F34000CDE9061002A809F041FB08F0BCFF2068D7 +:10F3500090F9610009F090F8064809F093F8064822 +:10F360000CE00000680000201A06002053E4B36E91 +:10F37000C8610200D0610200CD61020009F012FBF9 +:10F38000606809F038FB206890F8240010F0010F45 +:10F3900007D0252009F07EF80AE009B00C20BDE86E +:10F3A000F08310F0020F18BF262069D009F072F820 +:10F3B000206890F85E10252008F043FF206880F850 +:10F3C0002C6009F00FFB206890F85E10002009F017 +:10F3D00028F90F21052008F0F8FF206890F82E107A +:10F3E000002901BF90F82F10002990F8220010F09A +:10F3F000040F74D006F0B8FE0546206829468068E0 +:10F4000007F0AAFBDFF82884074690FBF8F008FB1A +:10F4100010704142284606F08EFB2168886097FBF9 +:10F42000F8F04A68104448600EF062FA014620681D +:10F43000426891426ED8C0E90165FE4D4FF0010867 +:10F4400095F82D000EF063FA814695F82F000127FC +:10F45000002818BFB9F1000F04D095F82D000EF068 +:10F460008AF8A0B195F8300000281CBF95F82E004E +:10F47000002824D0687B05F10E01012815D019E081 +:10F4800010F0040F14BF2720FFDF8FD190E73A461A +:10F490006F7305F10E0148460AF0B6F895F82D1085 +:10F4A00005F10E000EF035FB09E0487900F0C000D0 +:10F4B000402815D0414605F10E000AF0DDF820681D +:10F4C00090F8220010F0040F24D095F82D000EF0D3 +:10F4D000EDF805001ED0102101F09AFC40B119E0B2 +:10F4E0000EF054FB3A4605F10E010AF08DF8E6E7FE +:10F4F00020683A4600F11C01C77628460AF084F8D5 +:10F50000206800F11C0160680EF060FC0121606859 +:10F510000EF077FC2068417B0E3008F038FF206841 +:10F5200090F85C1061B3B0F85810A0F84810416D25 +:10F53000416490F82210C1F30011F1B9B0F86A00EB +:10F540000221C0F30B05ADF80050684607F0B0FF8C +:10F5500028B1BDF80000C0F30B00A84204D1BDF8EB +:10F560000000401CADF800002168BDF80000B1F8B3 +:10F570006A2060F30B02A1F86A20206880F85C60C2 +:10F58000206890F85D1039B1B0F85010A0F8401024 +:10F59000C16CC16380F85D60B0F86A10426EC1F35F +:10F5A0000B0151FA82F190F86020DFF88CC211440F +:10F5B00063460022E1FB0C3212096FF0240302FBC8 +:10F5C000031180F860100EF00CFA032160680EF051 +:10F5D00090FA216881F8330009B00020BDE8F0837B +:10F5E0009649886070472DE9F043944C83B02268B7 +:10F5F00092F831303BB1508C1D2808BFFFDF03B0BB +:10F60000BDE8F0435FE401260027F1B1054692F81A +:10F61000600008F03FFF206890F85F10FF2008F0BE +:10F6200010FE20684FF4A57190F85F20002009F0CB +:10F63000D4F8206890F8221011F0030F00F02C810C +:10F64000002D00F0238100F027B992F822108046A7 +:10F65000D07EC1F30011002956D0054660680780AE +:10F66000017821F020010170518C132937D01FDC63 +:10F67000102908BF022144D0122908BF062140D01A +:10F68000FFDF6C4D606805F10E010EF091FB697BA8 +:10F6900060680EF0A9FB2068418C1D2918BF152950 +:10F6A00063D0B0F84820416C60680EF0B6FB5CE0B7 +:10F6B000152918BF1D29E3D14FF001010EF052FBAF +:10F6C0006068017841F020010170216885B11C312A +:10F6D0000EF07CFB012160680EF093FBD1E7002166 +:10F6E0000EF040FB6068017841F020010170C8E72E +:10F6F00015310EF06BFB2068017D60680EF081FB18 +:10F70000BFE70EF02FFBBCE70021FFF728FC606885 +:10F71000C17811F03F0F28D0017911F0100F24D0DB +:10F720000EF01EFB2368024693F82410C1F38000FC +:10F73000C1F3400C604401F00101084493F82C101F +:10F74000C1F3800CC1F34005AC4401F001016144F8 +:10F75000401AC1B293F85E0000F0BEFE0090032391 +:10F760000422694660680EF0DAFC2068002590F8F3 +:10F77000241090F82C0021EA000212F0010F18BFAB +:10F7800001250ED111F0020F04D010F0020F08BFB6 +:10F79000022506D011F0040F03D010F0040F08BFAB +:10F7A0000425B8F1000F2BD0012D1BD0022D08BF6E +:10F7B00026201BD0042D14BFFFDF272016D0206881 +:10F7C00090F85E10252008F03CFD206890F822108B +:10F7D000C1F3001169B101224FF49671002008F0C5 +:10F7E000FCFF0DE0252008F055FEE8E708F052FE8A +:10F7F000E5E790F85E204FF49671002008F0EDFFE9 +:10F80000206890F82C10294380F82C1090F82420C0 +:10F8100032EA01011CD04670418C13292BD026DC22 +:10F82000102904BF03B0BDE8F083122923D007E0FC +:10F8300040420F000C06002053E4B36E6800002025 +:10F84000C1F30010002818BFFFDF03B0BDE8F0834C +:10F85000418C1D2908BF80F82C70DCD0C1F3001149 +:10F86000002914BF80F8316080F83170D3E7152982 +:10F8700018BF1D29DBD190F85E2003B04FF00101C5 +:10F88000BDE8F043084609F094B900BF90F85F2046 +:10F890000121084609F08DF92168002DC87E7CD031 +:10F8A0004A8C3D46C2F34000002808BF47F00805D7 +:10F8B00012F0400F18BF45F04005002819BFD1F8DD +:10F8C0003C90B1F84080D1F84490B1F8488060682D +:10F8D000072107800EF046FA002160680EF039FC1F +:10F8E000294660680EF041FC15F0080F17D020681B +:10F8F000BDF800100223B0F86A2062F30B01ADF8E6 +:10F90000001090F86B00032201099DF8010061F3DB +:10F9100007108DF80100694660680EF000FC606811 +:10F920000EF0DCFA2168C0F1FE00B1F85A20A8EB15 +:10F9300002018142A8BF0146CFB2D019404544D24E +:10F9400045F0100160680EF010FC60680EF0C6FA19 +:10F950002168C0F1FE00B1F85A10A8EB0101814204 +:10F96000A8BF0146CFB260680EF0EFFB3844421CDE +:10F970002068B0F86A10436EC1F30B0151FA83F1AD +:10F9800090F86030FE4D1944AC460023E1FB05C3FE +:10F990004FEA131C6FF0240300E03CE00CFB031162 +:10F9A00080F8601090F85F00012100F095FD009054 +:10F9B000BDF800009DF80210032340EA01400190C9 +:10F9C000042201A960680EF0AAFB216891F82200C8 +:10F9D00010F0400F05D001230622613160680EF05F +:10F9E0009EFB20683A46B0F85A0000EB09016068B7 +:10F9F0000EF0E9FB2068B0F85A103944A0F85A100C +:10FA000009F0BFFC002818BFFFDF20684670867031 +:10FA100003B0BDE8F0830121FFF7A1FAF0E7D94870 +:10FA200010B50068417841B90078FF2805D0002161 +:10FA30000846FFF7D8FD002010BD09F05FF809F077 +:10FA40003EF808F007FF08F0B3FF0C2010BD2DE9C9 +:10FA5000F041CC4D0446174628680E4690F86C00DD +:10FA6000002818BFFFDF2868002F80F86E7018BFCD +:10FA7000BDE8F0812188A0F870106188A0F8861098 +:10FA8000A188A0F88810E188A0F88A1094F888115D +:10FA900080F88C1090F82F10002749B1427B00F1BC +:10FAA0000E01012A04D1497901F0C001402935D065 +:10FAB00090F8301041B1427B00F10E01012A04BFE1 +:10FAC000497911F0C00F29D000F17A00F3F794FAC8 +:10FAD0006868FF2E0178C1F380116176D0F80310B9 +:10FAE000C4F81A10B0F80700E08328681ED0C0F8E8 +:10FAF0008010E18BA0F8841000F17402511E304692 +:10FB00000DF014FF002808BFFFDF286890F873107D +:10FB100041F0020180F87310BDE8F081D0F80E10BA +:10FB2000C0F87A10418AA0F87E10D1E7C0F8807042 +:10FB3000A0F88470617E80F87310D4F81A104167C1 +:10FB4000E18BA0F87810BDE8F08170B58D4C0125EF +:10FB5000206890F82200C0F3C00038B13C22FF2199 +:10FB6000A068FFF774FF206880F86C50206890F858 +:10FB7000220010F0010F1CBFA06801884FF03C026A +:10FB800012BF01204FF6FF710020FEF717FD20681D +:10FB900080F8395070BD7B49096881F832007047A0 +:10FBA0002DE9F041774C0026206841780127354641 +:10FBB000012906D0022901D003297DD0FFDFBDE84D +:10FBC000F081817802250029418C46D0C1F34002A2 +:10FBD000002A08BF11F0010F6FD090F85F204FF09E +:10FBE00001014FF0000008F0E4FF216891F82200C5 +:10FBF000C0F34000002814BF0C20222091F85F10B1 +:10FC000008F01FFB2068457090F8330058B108F0E9 +:10FC100068F8206890F85F0010F00C0F0CBF4020CF +:10FC2000452008F077FF206890F83400002818BFBE +:10FC300008F08FFF216891F85F0091F8691010F0CB +:10FC40000C0F08BF0021962008F0F6FE09F090FB8B +:10FC5000002818BFFFDFBDE8F081C1F3001282B1B8 +:10FC600010293FD090F8330020B108F03AF8402036 +:10FC700008F050FF206890F8221011F0040F36D0E1 +:10FC800043E090F8242090F82C309A422AD1B0F822 +:10FC90004800002808BF11F0010F05D111F0020F34 +:10FCA00008BF11F0200F6FD04FF001014FF000009E +:10FCB000FFF799FC206801E041E035E0418C11F04C +:10FCC000010F04BFC1F34001002907D1B0F85A1059 +:10FCD000B0F84820914218BFBDE8F08180F831703B +:10FCE000BDE8F081BDE8F041002101207BE490F8FF +:10FCF0003710012914BF0329102646F00E0190F891 +:10FD00005E204FF0000008F054FF206890F83400A7 +:10FD1000002818BF08F01DFF0021962008F08CFE77 +:10FD200020684570BDE8F081B0F85A10B0F848007E +:10FD3000814242D0BDE8F0410121084653E4817878 +:10FD4000D9B1418C11F0010F22D080F86C7090F87D +:10FD50006E20B0F870100120FEF730FC206845706E +:10FD600008F0CCFE08F0ABFE08F074FD08F020FEB1 +:10FD7000BDE8F04103200AF07CB88178012004E05E +:10FD800053E4B36E6800002017E0BDE8F0412AE4B8 +:10FD900011F0020F04BFFFDFBDE8F081B0F85A1088 +:10FDA000B0F84000814208D001210846FFF71BFC53 +:10FDB000216803204870BDE8F081BDE8F041FFF7FD +:10FDC00082B8FFF780B810B5FE4C206890F8341068 +:10FDD00049B1383008F0CCFE18B921687F2081F88D +:10FDE000380008F0ACFE206890F8330018B108F035 +:10FDF0009BFE07F08AFF0AF02EFCA8B1206890F85D +:10FE00002210C1F3001179B14078022818BFFFDF3A +:10FE100000210120FFF7E7FB2068417800291EBF81 +:10FE200040780128FFDF10BDBDE81040FFF74BB858 +:10FE30002DE9F047E34C0F4680462168B8F1030FE7 +:10FE4000488C08BFC0F3400508D000F0010591F8C8 +:10FE50003200002818BF4FF0010901D14FF000090E +:10FE600008F00CFB0646B8F1030F0CBF4FF0020878 +:10FE70004FF0010835EA090008BFBDE8F0872068A7 +:10FE800090F8330068B10DF08FFD38700146FF28FF +:10FE900007D06068C01C0DF060FD38780DF091FD52 +:10FEA000064360680178C1F3801221680B7D9A4295 +:10FEB00008D10622C01C1531FEF792FA002808BFAF +:10FEC000012000D000203978FF2906D0C8B9206869 +:10FED00090F82D00884216D113E0A0B1616811F8A6 +:10FEE000030BC0F380100DF006FD05460DF061FE1A +:10FEF00038B128460DF0DAFB18B1102100F088FF68 +:10FF000008B1012000E00020216891F8221011F0D2 +:10FF1000040F01D0F0B11AE0CEB9AB4890F8370029 +:10FF2000002818BF404515D1616811F8030BC0F3D4 +:10FF300080100DF0E0FC04460DF03BFE38B1204689 +:10FF40000DF0B4FB18B1102100F062FF10B10120D8 +:10FF5000BDE8F0870020BDE8F0872DE9F04F994D0E +:10FF6000044683B0286800264078022818BFFFDFC7 +:10FF700028684FF07F0B90F8341049B1383008F002 +:10FF8000F7FD002804BF286880F838B008F0D7FDD6 +:10FF900068680DF009FF8046002C00F0458208F0EB +:10FFA00010FA002800F04082012400274FF0FF09DA +:10FFB000B8F1050F1ED1686890F8240000F01F000A +:10FFC000102817D9286890F8360098B18DF800905D +:10FFD00069460520FFF72CFF002800F025822868DD +:10FFE00080F8A64069682222A730C91CFEF725FACE +:10FFF00000F01ABA68680EF062F8002800F0148267 +:020000040001F9 +:100000004046DFF8C4814FF0030A062880F02182C1 +:10001000DFE800F0FCFCFC03FCFB8DF80090694677 +:100020000320FFF705FF002800F0F180296891F810 +:10003000340010B191F89C00D8B12868817801296A +:100040004DD06868042107800DF08CFE08F10E0188 +:1000500068680DF0ADFE98F80D1068680DF0C4FEEC +:100060002868B0F84020C16B68680DF0FAFE00F017 +:1000700063B99DF8000081F89C400A7881F89D20C2 +:10008000FF280FD001F19F029E310DF04FFC002898 +:1000900008BFFFDF286890F89E1041F0020180F849 +:1000A0009E100DE068680278C2F3801281F89E20ED +:1000B000D0F80320C1F89F20B0F80700A1F8A300F2 +:1000C000286800F1A50490F838007F2808BFFFDFFA +:1000D000286890F83810217080F838B0ADE790F8B3 +:1000E00022000721C0F3801938480479686869F351 +:1000F000861407800DF036FE002168680EF029F89E +:10010000214668680EF031F80623002208F10E013E +:1001100068680EF004F82868417B68680DF064FE9A +:1001200068680DF0DBFE2968B1F84020C0F1FE01DF +:100130008A42B8BF1146CFB2BA423CD9F81EC7B204 +:1001400044F0100B594668680EF00FF868680DF01F +:10015000FCFF384400F101082868B0F86A10426ECC +:10016000C1F30B0151FA82F190F86020184C0A4457 +:10017000A4460023E2FB04C319096FF0240301FB2A +:10018000032180F8601090F85F004246012100F0E2 +:10019000A3F90190BDF804009DF80610032340EA7E +:1001A00001400290042202A968680DF0B8FF594688 +:1001B00068680DF0DAFFB9F1000F0FD0D5E9001033 +:1001C000012307E0680000200C060020C86102003F +:1001D00053E4B36E062261310DF0A1FF28683A4660 +:1001E000C16B68680DF0EFFF2868A0F85A70B0F88E +:1001F00040108F420CBF0121002180F8311009F01E +:10020000C0F8002818BFFFDF96E007E021E128686A +:100210008078002840F00A8100F006B98DF800903F +:1002200068680178C1F38019D0F803100191B0F823 +:100230000700ADF8080069460520FFF7F9FD002822 +:1002400028687DD0817800297CD090F85FB0D5E90E +:100250000104D0F80F10C4F80E10B0F8131061822A +:10026000417D2175817D6175B0F81710E182B0F88C +:1002700019106180B0F81B10A180B0F81D10E1804A +:1002800000F11F0104F1080015F085FE686890F880 +:10029000241001F01F01217690F82400400984F811 +:1002A000880184F864B084F865B01BF00C0F0CBFB3 +:1002B0000021012104F130000EF0ABF92868002282 +:1002C00090F8691084F8661090F8610084F867006F +:1002D0009DF80010A868FFF7BAFB022009F0C9FDDD +:1002E000B2480DF1040B08210468686807800DF01E +:1002F00039FD002168680DF02CFF214668680DF07B +:1003000034FF0623002208F10E0168680DF007FF94 +:100310002868417B68680DF067FD494668680DF004 +:1003200070FD06230122594668680DF0F8FE09F0B9 +:1003300028F8002818BFFFDF286880F801A077E0C0 +:100340006DE0FFE76868D5F808804FF00109027892 +:1003500098F80D10C2F34012114088F80D10D0F833 +:100360000F10C8F80E10B0F81310A8F81210417D45 +:1003700088F81410817D88F81510B0F81710A8F8C7 +:100380001610B0F81910A8F80210B0F81B10A8F851 +:100390000410B0F81D10A8F8061000F11F0108F1B4 +:1003A000080015F0F8FD686890F8241001F01F01AE +:1003B00088F8181090F824000021400988F8880176 +:1003C00088F8649088F8659008F130000EF021F903 +:1003D0002868002290F8691088F8661090F861008B +:1003E00088F867009DF80010A868FFF730FB2868C0 +:1003F00080F86C4090F86E20B0F870100120FEF785 +:10040000DDF82868477008F079FB08F058FB08F021 +:1004100021FA08F0CDFA012009F02BFD08E090F850 +:100420002200C0F3001008B1012601E0FEF74BFDE9 +:10043000286890F8330018B108F076FB07F065FCE7 +:1004400096B10AF008F960B100210120FFF7CBF85E +:1004500013E0286890F82200C0F300100028E5D0CF +:10046000E2E7FEF730FD08E028688178012904D131 +:1004700090F85F10FF2007F0E4FE2868417800291B +:1004800019BF4178012903B0BDE8F08F40780328F7 +:1004900018BFFFDF03B0BDE8F08F70B5444C0646CF +:1004A0000D462068807858B107F0F2FD21680346B8 +:1004B000304691F85F202946BDE870400AF085BAC1 +:1004C00007F0E6FD21680346304691F85E20294694 +:1004D000BDE870400AF079BA78B50C460021009169 +:1004E000082804BF4FF4C87040210DD0042804BF71 +:1004F0004FF4BF70102107D0022807BF01F1180088 +:10050000042101F128000821521D02FB01062848A0 +:100510009DF80010006890F8602062F3050141F03A +:1005200040058DF8005090F85F00012829D002287E +:100530002ED004281CBF0828FFDF2FD025F0800014 +:100540008DF80000C4EB041000EB80004FF01E019A +:1005500001EB800006FB04041648844228BFFFDF3D +:100560001548A0FB0410BDF80110000960F30C0150 +:10057000ADF80110BDF800009DF8021040EA0140FE +:1005800078BD9DF8020020F0E0008DF80200D5E76C +:100590009DF8020020F0E000203004E09DF8020009 +:1005A00020F0E00040308DF80200C7E7C86102008B +:1005B00068000020C4BF0300898888880023C383A3 +:1005C000428401EBC202521EB2FBF1F1018470477A +:1005D0002DE9F04104460026D9B3552333224FF4C8 +:1005E000FA4501297DD0022900F01481032918BFA2 +:1005F000BDE8F08104F17001207B00F01F00207342 +:1006000084F889605FF0000004EB000C9CF808C0DF +:1006100003EA5C05ACEB050C0CF0FF0C0CF03305A9 +:1006200002EA9C0CAC440D180CEB1C1C0CF00F0CDB +:1006300085F814C04D7E401CAC44C0B281F819C08E +:100640000528E1D30CF0FF00252898BFBDE8F08114 +:10065000DCE0FFE704F17005802200212846FDF769 +:1006600016FFAE71EE712E736E73EE732E746E7193 +:10067000AE76EE76212085F84000492085F84100CD +:10068000FE2085F874002588702200212046FDF7A1 +:10069000FEFE2580012584F8645084F865502820EA +:1006A00084F86600002104F130000DF0B2FF1B2237 +:1006B000A4F84E20A4F85020A4F85220A4F8542006 +:1006C0004FF4A470A4F85600A4F8580065734FF4D2 +:1006D00048606080A4F8F060A4F8F260A4F8F460C8 +:1006E00000E023E0A4F8F660A4F8F86084F8FA606B +:1006F00084F8FD60A4F8066184F80461A4F8186128 +:10070000A4F81A6184F8B66184F8B76184F8C0610E +:1007100084F8C16184F88C6184F88F6184F8A861E1 +:10072000C4F8A061C4F8A461BDE8F081A4F8066132 +:1007300084F8FB606088FE490144B1FBF0F1A4F845 +:1007400090104BF68031A4F89210B4F806C0A4F8CB +:100750009860B4F89C704FEACC0C4743BCFBF0FCAB +:1007600097FBF0F70CF1010CA4F89C701FFA8CFCBD +:100770000CFB00F704F17001A4F89AC0B7F5C84F5C +:10078000C4BFACF1010CA1F82AC0B5FBF0FC0CF120 +:10079000010CA1F830C000F5802C0CF5EE3CACF15A +:1007A0000105B5FBF0FCA1F820C0CD8B05FB00FCDA +:1007B000BCFBF0F0C8830846217B01F01F012173C8 +:1007C0004676002104EB010C9CF808C003EA5C05A6 +:1007D000ACEB050C0CF0FF0C0CF0330502EA9C0CA2 +:1007E000AC4445180CEB1C1C0CF00F0C85F814C025 +:1007F000457E491CAC44C9B280F819C00529E1D333 +:100800000CF0FF00252898BFBDE8F081FFDFBDE8B0 +:10081000F08100BFB4F8B011B4F8B4316288A4F824 +:100820009860B4F89CC0DB000CFB02FCB3FBF1F356 +:100830009CFBF1FC5B1CA4F89CC09BB203FB01FC7D +:1008400004F17000A4F89A30BCF5C84FC4BF5B1E19 +:100850004385B5FBF1F35B1C0386438C01EBC303BB +:100860005B1EB3FBF1F30384C38B5A43B2FBF1F17C +:10087000C183BDE8F0812DE9F04104460025A1B314 +:1008800055234FF4FA464FF0330C01297DD002294D +:1008900000F0E080032918BFBDE8F08104F170008A +:1008A000217B01F01F01217384F889500021621817 +:1008B000127A03EA5205521BD2B202F033050CEA57 +:1008C00092022A44451802EB121202F00F022A7516 +:1008D000457E491C2A44C9B242760529E7D3D0B2E5 +:1008E000252898BFBDE8F081B1E0FFE704F170066C +:1008F000802200213046FDF7CAFDB571F5713573D0 +:100900007573F57335747571B576F576212086F8B3 +:100910004000492086F84100FE2086F874002688B1 +:10092000702200212046FDF7B2FD2680012684F8C2 +:10093000646084F86560282084F86600002104F172 +:1009400030000DF066FE1B22A4F84E20A4F85020C3 +:10095000A4F85220A4F854204FF4A470A4F8560030 +:10096000A4F858006673A4F8F850202084F8FA0020 +:1009700084F8F050C4F8F45084F8245184F82551D8 +:1009800084F82E5184F82F5100E005E084F81451CA +:1009900084F82051BDE8F081618865480844B0FBC7 +:1009A000F1F0A4F890004BF68030A4F89200E288B1 +:1009B000A4F89850B4F89C70D2004F43B2FBF1F207 +:1009C00097FBF1F7521CA4F89C7092B202FB01F75E +:1009D00004F17000A4F89A20B7F5C84FC4BF521EA6 +:1009E0004285B6FBF1F2521C028601F5802202F527 +:1009F000EE32561EB6FBF1F20284C68B06FB01F204 +:100A0000B2FBF1F1C1830146207B00F01F0020738F +:100A10004D7600202218127A03EA5205521BD2B2F8 +:100A200002F033050CEA92022A440D1802EB12126E +:100A300002F00F022A754D7E401C2A44C0B24A764D +:100A40000528E7D3D0B2252898BFBDE8F081FFDFA5 +:100A5000BDE8F081D0F81811628804F1700348896C +:100A6000C989A4F89850B4F89CC0C9000CFB02FCDA +:100A7000B1FBF0F19CFBF0FC491CA4F89CC089B2CE +:100A800001FB00FCA4F89A10BCF5C84FC4BF491E76 +:100A90005985B6FBF0F1491C1986598C00EBC10150 +:100AA000491EB1FBF0F11984D98B5143B1FBF0F031 +:100AB000D883BDE8F0812DE9F003447E0CB1252CEC +:100AC00003D9BDE8F00312207047002A02BF0020BE +:100AD000BDE8F003704791F80DC01F260123154DA6 +:100AE0004FF00008BCF1000F7AD0BCF1010F1EBF1F +:100AF0001F20BDE8F0037047B0F800C00A7C8F7B70 +:100B000091F80F907A404F7C87EA090742EA072262 +:100B100082EA0C0C5FF000070CF0FF0999FAA9F9C2 +:100B20004FEA1C2C4FEA19699CFAACFC04E0000067 +:100B3000FFDB050053E4B36E4FEA1C6C49EA0C2C52 +:100B40000CEB0C1C7F1C9444FFB21FFA8CFC032F8F +:100B5000E2D38CEA020CFB4F0022ECFB0572120977 +:100B60006FF0240502FB05C2D2B201EBD2078276F8 +:100B700002F007053F7A03FA05F52F4218BFC27647 +:100B80007ED104FB0CF2120C521CD2B25FF00004B6 +:100B900000EB040C9CF814C094453CBFA2EB0C0283 +:100BA000D2B212D30D194FF0000C2D7A03FA0CF7C4 +:100BB0003D421CBF521ED2B2002A69D00CF1010C7A +:100BC0000CF0FF0CBCF1080FF0D304F1010C0CF099 +:100BD000FF04052CDCD33046BDE8F0037047FFE787 +:100BE00090F81AC00C7E474604FB02C2D54C4FF069 +:100BF000000CE2FB054C4FEA1C1C6FF024040CFBBC +:100C00000422D2B201EBD204827602F0070C247ADD +:100C100003FA0CFC14EA0C0F1FBFC2764046BDE875 +:100C2000F003704790F819C0B2FBFCF40CFB1422DF +:100C3000521CD2B25FF0000400EB040C9CF814C00C +:100C400094453CBFA2EB0C02D2B212D30D194FF067 +:100C5000000C2D7A03FA0CF815EA080F1CBF521E7F +:100C6000D2B272B10CF1010C0CF0FF0CBCF1080F08 +:100C7000F0D304F1010C0CF0FF04052CDCD3AAE73F +:100C800009E00CEBC401C1763846BDE8F0037047BB +:100C90000CEBC401C1764046BDE8F0037047AA4A98 +:100CA000016812681140A94A126811430160704737 +:100CB00030B4A749A44B00244FF0010C0A78521C11 +:100CC000D2B20A70202A08BF0C700D781A680CFA8C +:100CD00005F52A42F2D0097802680CFA01F1514078 +:100CE000016030BC704770B46FF01F02010C02EA63 +:100CF00090251F23A1F5AA4054381CBFA1F5AA4096 +:100D0000B0F1550009D0A1F52850AA381EBFA1F5B1 +:100D10002A40B0F1AA00012000D100204FF0000CC1 +:100D2000624601248CEA0106F6431643B6F1FF3F02 +:100D300011D005F001064FEA5C0C4CEAC63C03F00A +:100D4000010652086D085B08641C42EAC632162C84 +:100D5000E8DD70BC704770BC0020704790F804C09C +:100D60003CF01F011CBF0020704730B401785522B1 +:100D700002EA5103C91AC9B201F03304332303EA6A +:100D800091012144447801EB111102EA5405641BDE +:100D9000E4B204F0330503EA94042C4404EB141485 +:100DA00001F00F0104F00F040C448178C07802EACE +:100DB0005105491BC9B201F0330503EA91012944E9 +:100DC00001EB111101F00F01214402EA5004001B54 +:100DD000C0B200F0330403EA9000204400EB10108E +:100DE00000F00F00014402EA5C00ACEB0000C0B26E +:100DF00000F0330203EA9000104400EB101000F002 +:100E00000F00084401288CBF0120002030BC70472F +:100E10000A000ED00123012A0BDB491EC9B210F8CB +:100E200001C0BCF1000F01D0002070475B1C934251 +:100E3000F3DD01207047002A08BF70471144401EAF +:100E400012F0010F03D011F8013D00F8013F5208E4 +:100E500008BF704711F8013C437011F8023D00F8DB +:100E6000023F521EF6D1704770B58CB000F11004ED +:100E70001D4616460DF1FF3C5FF0080014F8012CEA +:100E80008CF8012014F8022D0CF8022F401EF5D129 +:100E900001F1100C6C460DF10F0108201CF8012C1B +:100EA0004A701CF8022D01F8022F401EF6D1204690 +:100EB00013F01CFB7EB16A1E04F130005FF00801E4 +:100EC00010F8013C537010F8023D02F8023F491E31 +:100ED000F6D10CB070BD08982860099868600A982F +:100EE000A8600B98E8600CB070BD38B505460C469C +:100EF000684607F03DFE002808BF38BD9DF9002078 +:100F00002272E07E607294F90A100020511A48BFE4 +:100F1000494295F82D308B42C8BF38BDFF2B08BF22 +:100F200038BDE17A491CC9B2E17295F82E30994278 +:100F300003D8A17A7F2918BF38BDA2720020E072C1 +:100F4000012038BD53E4B36E04620200086202005F +:100F5000740000200C2818BF0B2810D00D2818BFD3 +:100F60001F280CD0202818BF212808D0222818BFFD +:100F7000232804D024281EBF2628002070474FF0C5 +:100F8000010070470C2963D2DFE801F006090E1357 +:100F9000161B323C415C484E002A5BD058E0072AC1 +:100FA00018BF082A56D053E00C2A18BF0B2A51D07C +:100FB0004EE00D2A4ED04BE0A2F10F000C2849D98B +:100FC00046E023B1A2F110000B2843D940E0122AD9 +:100FD00018BF112A3ED090F8380020B1122A37D31A +:100FE0001A2A37D934E0162A32D31A2A32D92FE0F6 +:100FF000A2F10F0103292DD990F8380008B31B2A5C +:1010000028D925E0002B08BF042A21D122E013B102 +:10101000062A1FD01CE0012A1AD11BE01C2A1CBF83 +:101020001D2A1E2A16D013E01F2A18BF202A11D00D +:10103000212A18BF222A0DD0232A1CBF242A262A9F +:1010400008D005E013B10E2A04D001E0052A01D032 +:1010500000207047012070472DE9F0410D460446FD +:10106000866805F02FFA58B905F07EF840F236711F +:1010700004F061FDA060204605F024FA0028F3D0BA +:1010800095B13046A16805F067FD00280CDD2844C5 +:10109000401EB0FBF5F707FB05F1304604F04BFDB1 +:1010A000A0603846BDE8F0810020BDE8F08170B551 +:1010B0000446904228BF70BD101B64280BD325182E +:1010C0008D4206D8042105F07AFD00281CBF284671 +:1010D00070BD204670BD6420F1E711F00C0F13D0F5 +:1010E00001F0040100290DBF4022102296214FF487 +:1010F000167101F5BC71A0EB010388428CBF93FB14 +:10110000F2F0002080B27047022919BF6FF00D0184 +:1011100001EBD0006FF00E0101EB9000F2E7084404 +:1011200018449830002A14BF042100210844704755 +:1011300010B4002A14BF4FF429624FF4A472002B9C +:1011400019BF4FF429634FF0080C4FF4A4734FF00C +:10115000010C00280CBF0124002491F866001CF04B +:101160000C0F08BF0020D11808449830002C14BF81 +:1011700004210021084410BC704700280CBF012343 +:10118000002391F86600002BA0F6482000F50050DF +:1011900018BF04231844496A81422CBF0120002053 +:1011A00012F00C0118BF012131EA000014BF002029 +:1011B0000120704710B413680B66137813F00C030A +:1011C00018BF0123527812F00C0218BF012253EA13 +:1011D000020C04BF10BC7047002B0CBF4FF4A4736B +:1011E0004FF42963002A19BF4FF429624FF0080C0D +:1011F0004FF4A4724FF0010C00280CBF012400240E +:1012000091F866001CF00C0F08BF00201A4410442F +:101210009830002C14BF0422002210444A6A8242F3 +:1012200024BF10BC704791F860004FF0030230F00B +:101230000C0381F8603091F8610020F00C0081F817 +:10124000610008BF81F86020002808BF81F8612094 +:1012500010BC704710F0010F1CBF0120704710F048 +:10126000020F1CBF0220704710F0040018BF0820B6 +:1012700070472DE9F0470446174689464FF00108AC +:1012800008460DF0FAF8054648460DF0FAF810F059 +:10129000010F18BF012624D015F0010F18BF01233C +:1012A0002AD000BF56EA030108BF4FF0000810F033 +:1012B000070F08BF002615F0070F08BF002394F89A +:1012C0006400B0420CBF00203046387094F86510BE +:1012D000994208BF00237B70002808BF002B25D14E +:1012E00015E010F0020F18BF0226D5D110F0040F40 +:1012F00014BF08260026CFE715F0020F18BF0223FF +:10130000D0D115F0040F14BF08230023CAE74846C4 +:101310000DF0BDF8B4F87010401A00B247F6FE7137 +:10132000884201DC002801DC4FF0000816B1082ECD +:101330000CD018E094F86400012818BF022812D0DD +:1013400004281EBF0828FFDF032D0CD194F8C0012C +:1013500048B1B4F8C401012894F8640006D0082804 +:1013600001D0082038704046BDE8F087042818BF37 +:101370000420F7D1F5E7012814BF0228704710F0C8 +:101380000C0018BF0420704738B4CBB2C1F3072C4F +:10139000C1B2C0F30724012B07D0022B09D0042BC4 +:1013A00008BFBCF1040F2DD006E0BCF1010F03D142 +:1013B00028E0BCF1020F25D0012906D0022907D070 +:1013C000042908BF042C1DD004E0012C02D119E02F +:1013D000022C17D001EA0C0161F3070204EA0301B1 +:1013E00061F30F22D1B211F0020F18BF022310D007 +:1013F000C2F307218DF8003011F0020F18BF02214F +:101400001BD111E0214003EA0C03194061F30702EC +:10141000E6E711F0010F18BF0123E9D111F0040F25 +:1014200014BF08230023E3E711F0010F18BF0121C7 +:1014300003D111F0040118BF08218DF80110082B09 +:1014400001BF000C012804208DF80000BDF8000049 +:1014500038BC70474FF0000C082902D0042909D08D +:1014600011E001280FD10420907082F803C013808E +:1014700001207047012806D00820907082F803C030 +:1014800013800120704700207047162A10D12A22AD +:101490000C2818BF0D280FD04FF0230C1F280DD09B +:1014A00031B10878012818BF002805D0162805D0CA +:1014B00000207047012070471A70FBE783F800C0D6 +:1014C000F8E7012908D002290BD0042912BF082906 +:1014D00040F6A660704707E0002804BF40F2E240F3 +:1014E000704740F6C410704700B5FFDF40F2E2409D +:1014F00000BD00000178406829B190F82C1190F8E7 +:101500008C0038B901E001F0BDBD19B1042901D04A +:10151000012070470020704770B50C460546062133 +:1015200002F0C4FC606008B1002006E007212846F4 +:1015300002F0BCFC606018B101202070002070BD7A +:10154000022070BD2DE9FC470C4606466946FFF7B0 +:10155000E3FF00287DD19DF8000050B1FDF7EEF8C3 +:10156000B0427CD0214630460AF008FC002873D1F6 +:101570002DE00DF097F9B04271D02146304612F0BF +:10158000B6FA002868D1019D95F8F00022E001200C +:1015900000E00020804695F839004FF0010A4FF036 +:1015A0000009F0B195F83A0080071AD584F8019047 +:1015B00084F800A084F80490E68095F83B1021722E +:1015C000A98F6181E98FA18185F8399044E0019D5F +:1015D00095F82C0170350028DBD1287F0028D8D061 +:1015E000D5E7304602F0A5FD070000D1FFDF384601 +:1015F00001F0B5FF40B184F801900F212170E68021 +:10160000208184F804A027E0304602F080FD070026 +:1016100000D1FFDFB8F1000F21D0384601F0F7FF0D +:10162000B8B19DF8000038B90198D0F81801418888 +:10163000B14201D180F80090304607F00DFF84F8E8 +:1016400001900C21217084F80490E680697F21725A +:1016500000E004E085F81C900120BDE8FC87002034 +:10166000FBE71CB56946FFF757FF00B1FFDF68468F +:1016700001F014FDFE4900208968A1F8F2001CBDAC +:101680002DE9FC4104460E46062002F0B7FB054654 +:10169000072002F0B3FB2844C7B20025A8463E4409 +:1016A00017E02088401C80B22080B04202D3404620 +:1016B000A4F8008080B2B84204D3B04202D2002025 +:1016C000BDE8FC816946FFF727FF0028F8D06D1CB4 +:1016D000EDB2AE42E5D84FF6FF7020801220EFE762 +:1016E00038B54FF6FF70ADF800000DE00621BDF8EB +:1016F000000002F0EDFB04460721BDF8000002F0F7 +:10170000E7FB0CB100B1FFDF00216846FFF7B8FF2F +:101710000028EBD038BD70B507F00CFF0BF034FF9C +:10172000D44C4FF6FF76002526836683D2A0257021 +:1017300001680079A4F14002657042F8421FA11CC3 +:101740001071601C12F0EFFA1B2020814FF4A4717D +:101750006181A081E18107212177617703212174D3 +:10176000042262746082A082A4F13E00E1820570CE +:101770004680BF480C300570A4F11000057046800B +:1017800084F8205070BD70B5B94C16460D466060A7 +:10179000217007F047FEFFF7A3FFFFF7BCFF20789B +:1017A0000FF0BDFFB6480DF0D0F92178606812F057 +:1017B0005FFA20780BF0DCF8284608F0AFFEB0485E +:1017C000FCF7C7FF217860680AF0B2FB3146207849 +:1017D00012F024FDBDE870400BF0D6BE10B5012418 +:1017E0000AB1002010BD21B1012903D000242046F8 +:1017F00010BD02210CF024FDF9E710B50378044672 +:10180000002B406813460A46014609D05FF00100EC +:10181000FFF78EFC6168496A884203D9012010BD38 +:101820000020F5E7002010BD2DE9F04117468A7829 +:101830001E46804642B11546C87838B1044669074D +:1018400006D52AB1012104E00725F5E70724F6E7CC +:101850000021620702D508B1012000E0002001420A +:1018600006D0012211464046FFF7C7FF98B93DE078 +:1018700051B1002201214046FFF7BFFF58B9600770 +:1018800034D50122114620E060B1012200214046FA +:10189000FFF7B3FF10B10920BDE8F081680725D537 +:1018A000012206E068074FEA44700AD5002814DBDD +:1018B000002201214046FFF7A0FFB8B125F0040542 +:1018C00014E0002812DA012200214046FFF795FFBC +:1018D00060B100BF24F0040408E001221146404634 +:1018E000FFF78BFF10B125F00405F3E73D7034706E +:1018F0000020D1E770B58AB0044600886946FFF73A +:101900000BFE002806D1A08830B1012804D002289F +:1019100002D012200AB070BD04AB03AA214668466B +:10192000FFF782FF0500F5D19DF800100120002689 +:101930000029019906D081F8C101019991F80C1292 +:10194000B1BB2DE081F82F01019991F8561139B9F9 +:10195000019991F82E1119B9019991F8971009B1CF +:101960003A2519E00199059681F82E01019A9DF812 +:101970000C0082F83001019B9DF8102083F8312182 +:10198000A388019CA4F832318DF814008DF815203D +:1019900005AA0020FFF70EFC019880F82F6126E0D1 +:1019A000019991F8C01119B9019991F8971009B1ED +:1019B0003A2519E00199059681F8C00101989DF832 +:1019C0000C2080F8C221019B9DF8100083F8C30110 +:1019D000A388019CA4F8C4318DF814208DF815005B +:1019E00005AA0120FFF7E6FB019880F8C1612846AF +:1019F00090E710B504460020A17801B90120E278F3 +:101A00000AB940F0020001F058FB002803D120463B +:101A1000BDE810406EE710BD70B5044691F8650052 +:101A200091F866300D4610F00C0F00D1002321898B +:101A3000A088FFF774FB696A814229D2401A401CD2 +:101A4000A1884008091A8AB2A2802189081A208137 +:101A5000668895F864101046FFF73FFB864200D277 +:101A600030466080E68895F8651020890AE000001D +:101A70007800002018080020FFFFFFFF1F00000073 +:101A8000D8060020FFF729FB864200D23046E080CE +:101A900070BDF0B585B00D46064603A9FFF73CFDC5 +:101AA00000282DD19DF80C0060B300220499FB2082 +:101AB000B1F84E30FB2B00D30346B1F85040FB2069 +:101AC000FB2C00D30446DFF85CC59CE88110009035 +:101AD0000197CDF808C0ADF80230ADF80640684671 +:101AE000FFF79AFF6E80BDF80400E880BDF808009B +:101AF0006881BDF80200A880BDF80600288100209A +:101B000005B0F0BD0122D1E72DE9F04186B00446D1 +:101B100000886946FFF700FD002876D12189E0881A +:101B200001F0E4FA002870D1A188608801F0DEFAA3 +:101B300000286AD12189E08801F0CFFA002864D119 +:101B4000A188608801F0C9FA07005ED1208802A947 +:101B5000FFF79FFF00B1FFDFBDF81010628809207A +:101B6000914252D3BDF80C10E28891424DD3BDF89A +:101B70001210BDF80E2023891144A2881A44914204 +:101B800043D39DF80010019D4FF00008012640F658 +:101B9000480041B185F8B761019991F8F81105F550 +:101BA000DB7541B91AE085F82561019991F84A1170 +:101BB00005F5927509B13A2724E0E18869806188CA +:101BC000E9802189814200D30146A980A188814210 +:101BD00000D208462881012201990FE0E18869803E +:101BE0006188E9802189814200D30146A980A188CA +:101BF000814200D208462881019900222846FFF739 +:101C00000BFF2E7085F80180384606B044E67BE76E +:101C100070B504460CF0FCFDB0B12078182811D145 +:101C2000207901280ED1E088062102F03FF9040056 +:101C300008D0208807F010FC2088062102F048F91F +:101C400000B1FFDF012070BDF74D28780028FAD0E1 +:101C5000002666701420207020223146201DFCF7DB +:101C600016FC022020712E70ECE710B50446FCF73C +:101C7000DBFC002813D0207817280FD1207968B119 +:101C8000E088072102F012F940B1008807F0E4FB78 +:101C9000E088072102F01CF900B1FFDF012010BD30 +:101CA0002DE9F0475FEA000800D1FFDFDE4802219E +:101CB0001A308146FFF7E4FC00B1FFDFDA4C062062 +:101CC000678B02F09BF80546072002F097F828443E +:101CD000C5B2681CC6B2608BB04203D14046FFF764 +:101CE000C4FF58B9608BA84203D14046FFF790FF6C +:101CF00020B9608B4146FFF725FC38B1404601F022 +:101D000003FA0028E7D10120BDE8F0870221484608 +:101D1000FFF7B6FC10B9608BB842DCD14046BDE895 +:101D2000F04712F0C1BA10B501F053F908B10C2018 +:101D300010BD0BF07DFC002010BD10B504460078EE +:101D400018B1012801D0122010BD01F053F920B1C3 +:101D50000BF0C0FD08B10C2010BD207801F013F984 +:101D6000E21D04F11703611CBDE810400BF0DABC62 +:101D700010B5044601F02DF908B10C2010BD2078F3 +:101D800028B1012803D0FF280BD0122010BD01F08C +:101D9000FAF8611C0BF00CFC08B1002010BD072004 +:101DA00010BD01200BF03EFCF7E710B50BF095FDE0 +:101DB00008B1002010BD302010BD10B5044601F060 +:101DC00019F908B10C2010BD20460BF080FD002051 +:101DD00010BD10B501F00EF920B10BF07BFD08B17C +:101DE0000C2010BD0BF0F6FC002010BDFF2181700F +:101DF0004FF6FF7181808D4949680A7882718A881F +:101E000002814988418101214170002070477CB5E1 +:101E10000025022A19D015DC12F10C0F15D009DCAF +:101E200012F1280F11D012F1140F0ED012F1100F71 +:101E300011D10AE012F1080F07D012F1040F04D0FB +:101E40004AB902E0D31E052B05D8012806D0022886 +:101E500008D003280AD0122528467CBD1046FDF77D +:101E600013F8F9E710460CF06BFEF5E70846144648 +:101E70006946FFF751FB08B10225EDE79DF8000028 +:101E80000198002580F86740E6E710B51346012267 +:101E9000FEF7EAFF002010BD10B5044610F02FFA3F +:101EA000052804D020460FF029FC002010BD0C208E +:101EB00010BD10B5044601F09DF808B10C2010BD0E +:101EC0002146002007F037FB002010BD10B5044666 +:101ED0000FF0A3FC50B108F0A6FD38B1207808F04F +:101EE00029FB20780DF04DF9002010BD0C2010BD0D +:101EF00010B5044601F07EF808B10C2010BD214653 +:101F0000012007F018FB002010BD38B504464FF63D +:101F1000FF70ADF80000A079E179884216D02079F1 +:101F2000FCF7E3FA90B16079FCF7DFFA70B10022B8 +:101F3000A079114612F0A0FD40B90022E0791146C7 +:101F400012F09AFD10B9207A072801D9122038BD65 +:101F500008F076FD60B910F0D2F948B90021684662 +:101F6000FFF78EFB20B1204606F044F9002038BD73 +:101F70000C2038BD2DE9FC41817805461A2925D071 +:101F80000EDC16292ED2DFE801F02D2D2D2D2D216E +:101F90002D2D2D2D2D2D2D2D2D2D2D2D2D21212195 +:101FA0002A291FD00BDCA1F11E010C291AD2DFE86F +:101FB00001F019191919191919191919190D3A399D +:101FC00004290FD2DFE801F00E020E022888B0F5D6 +:101FD000706F07D201276946FFF79EFA20B10220F1 +:101FE000BDE8FC811220FBE79DF8000000F0D2FF65 +:101FF000019C10B104F58A7401E004F5C6749DF8E3 +:10200000000000F0C7FF019E10B106F2151601E0B6 +:1020100006F28D166846FFF76DFA08B1207838B1E0 +:102020000C20DDE70C620200180800207800002078 +:102030002770A8783070684601F030F80020CFE7AC +:102040007CB50D466946FFF767FA002618B12E6089 +:102050002E7102207CBD9DF8000000F09BFF019CCA +:102060009DF80000703400F095FF019884F84260FC +:1020700081682960017B297194F842100029F5D10B +:1020800000207CBD10B5044600F0B4FF20B10BF079 +:1020900021FC08B10C2010BD207800F074FFE2791B +:1020A000611C0BF093FD08B1002010BD022010BD93 +:1020B00010B5886E60B1002241F8682F0120CA7106 +:1020C0008979884012F0CCFC002800D01F2010BD78 +:1020D0000C2010BD1CB50C466946FFF71DFA002800 +:1020E00009D19DF8000000280198B0F8700000D0D8 +:1020F000401C208000201CBD1CB504460088694699 +:10210000FFF70AFA08B102201CBD606828B1DDE9BA +:102110000001224601F04CF81CBDDDE90001FFF78B +:10212000C7FF1CBD70B51C460D4618B1012801D073 +:10213000122070BD1946104601F078F830B12146E2 +:10214000284601F07DF808B1002070BD302070BD38 +:1021500070B5044600780E46012804D018B1022854 +:1021600001D0032840D1607828B1012803D002288B +:1021700001D0032838D1E07B10B9A078012833D1F1 +:10218000A07830F005012FD110F0050F2CD0628916 +:10219000E188E0783346FFF7C5FF002825D1A07815 +:1021A00005281DD16589A289218920793346FFF749 +:1021B000B9FF002819D1012004EB40014A891544D8 +:1021C0002218D378927893420ED1CA8889888A429D +:1021D0000AD1401CC0B20228EED3E088A84203D343 +:1021E000A07B08B1072801D9122070BD002070BD66 +:1021F00010B586B0044600F0E1FE10B10C2006B028 +:1022000010BD022104F10A0001F02FF8A0788DF82A +:102210000800A0788DF8000060788DF80400207820 +:102220008DF80300A07B8DF80500E07B00B1012054 +:102230008DF80600A078C10717D0E07801F00CF8FF +:102240008DF80100E088ADF80A006089ADF80C0057 +:10225000A078400716D5207900F0FEFF8DF8020027 +:102260002089ADF80E00A0890AE040070AD5E07881 +:1022700000F0F2FF8DF80200E088ADF80E006089F2 +:10228000ADF8100002A80FF0D4FA0028B7D16846C4 +:102290000CF07CFFB3E710B504460121FFF758FFAF +:1022A000002803D12046BDE81040A1E710BD027808 +:1022B000012A01D0BAB118E042783AB1012A05D01A +:1022C000022A12D189B1818879B100E059B14188DF +:1022D00049B1808838B101EB8101490000EB8000F1 +:1022E000B1EB002F01D2002070471220704770B56B +:1022F000044600780D46012809D010F000F80528A2 +:1023000003D00FF0A6F9002800D00C2070BD0CF00F +:102310000AFE88B10CF01CFE0CF018FF0028F5D165 +:1023200025B160780CF0ACFE0028EFD1A188608860 +:10233000BDE870400FF0A3BA122070BD10B504467E +:102340000121FFF7B4FF002804D12046BDE810406A +:102350000121CCE710BDF0B5871FDDE9056540F62A +:102360007B44A74213D28F1FA74210D288420ED8B7 +:10237000B2F5FA7F0BD2A3F10A00241FA04206D2C5 +:10238000521C4A43B2EB830F01DAAE4201D900205E +:10239000F0BD0120F0BD2DE9FC47477A894604468F +:1023A00017F0050F7ED0F8087CD194F83A0008B9F0 +:1023B000012F77D10025A8462E46F90789F0010A9A +:1023C00019D0208A514600F031FFE8B360895146A8 +:1023D00000F036FFC0B3208A6189884262D8A18E9E +:1023E000E08DCDE90001238D628CA18BE08AFFF79F +:1023F000B2FF48B30125B8070ED504EB4500828E25 +:10240000C18DCDE90012038D428C818BC08AFFF70C +:10241000A2FFC8B1A8466D1C78071ED504EB45067F +:102420005146308A00F002FF70B17089514600F0C9 +:1024300007FF48B1308A7189884253D8B18EF08D38 +:10244000CDE90001338D00E00BE0728CB18BF08A96 +:10245000FFF781FF28B12E466D1CB9F1000F03D0A4 +:1024600030E03020BDE8FC87F80707D0780705D5B5 +:1024700004EB460160894989884233D1228A0121CF +:102480001BE0414503D004EB4100008A024404EB09 +:102490004100C38A868AB34224D1838B468BB342E0 +:1024A00020D100E01EE0438C068CB3421AD1038D8C +:1024B000C08C834216D1491CC9B2A942E1D36089BC +:1024C00090420FD3207810B101280BD102E0A07800 +:1024D0000028F9D1607838B1012805D0022803D04E +:1024E000032801D01220BDE70020BBE7002152E7FE +:1024F0000178C90702D0406811F0A9BE11F076BE7C +:1025000010B50078012800D00020FCF7B8FC0020AE +:1025100010BD2DE9F0478EB00D46AFF6A422D2E9EA +:102520000092014690462846FFF735FF06000CD181 +:1025300000F044FD40B9FE4F387828B90CF0B2F9EC +:10254000A0F57F41FF3903D00C200EB0BDE8F08725 +:10255000032105F1100000F088FEF54809AA3E3875 +:102560000990F4480A90F248062110380B900CA804 +:1025700001F06AFC040037D00021FEF77CF904F179 +:1025800030017B8ABA8ACB830A84797C0091BA466F +:102590003B7CBA8A798A208801F044FD00B1FFDFD4 +:1025A000208806F058FF218804F10E0000F02CFD71 +:1025B000E1A004F1120700680590032105A804F0CA +:1025C0006DFF002005A90A5C3A54401CC0B20328E4 +:1025D000F9D3A88B6080688CA080288DE080687A11 +:1025E000410703D508270AE00920AEE7C10701D05B +:1025F000012704E0800701D5022700E000273A46C2 +:10260000BAF8160011460FF0CFF90146A062204635 +:102610000FF0D8F93A4621460020FEF7AEFD00B98A +:102620000926C34A21461C320020FEF7C3FD0027BD +:1026300084F8767084F87770A87800F0A4FC60764F +:10264000D5F80300C4F81A00B5F80700E083C4F811 +:10265000089084F80C80012084F8200101468DF850 +:102660000070684604F01AFF9DF8000000F00701B2 +:10267000C0F3C1021144C0F3401008448DF80000BB +:10268000401D2076092801D20830207601212046FD +:10269000FEF7F1F868780CF051FCEEBBA9782878C9 +:1026A000EA1C0CF01EFC48B10CF052FCA97828780A +:1026B000EA1C0CF0BFFC060002D052E0122650E0EB +:1026C000687A00F005010020CA0700D001208A07BF +:1026D00001D540F00200490701D540F008000CF098 +:1026E000E9FB06003DD1214603200CF0CDFC06009D +:1026F00037D10CF0D2FC060033D1697A01F0050124 +:102700008DF80810697AC90708D06889ADF80A0001 +:10271000288AADF80C0000E023E00120697A8A07DE +:1027200000D5401C490707D505EB40004189ADF8AD +:102730000E10008AADF8100002A80FF07AF80646D5 +:1027400095F83A0000B101200CF0C6FB4EB90CF030 +:10275000FDFC060005D1A98F20460FF00BF80600FE +:1027600008D0208806F078FE2088062101F0B0FB12 +:1027700000B1FFDF3046E8E601460020C9E638B583 +:102780006B48007878B90FF0BAFD052805D00CF039 +:1027900089F8A0F57F41FF3905D068460FF0B3F8FE +:1027A000040002D00CE00C2038BD0098008806F030 +:1027B00053FE00980621008801F08AFB00B1FFDF7C +:1027C000204638BD1CB582894189CDE900120389B4 +:1027D000C28881884088FFF7BEFD08B100201CBD7B +:1027E00030201CBD70B50546FFF7ECFF00280ED168 +:1027F0002888062101F05AFB040007D000F042FCB3 +:1028000020B1D4F81801017831B901E0022070BD7F +:10281000D4F86411097809B13A2070BD052181719D +:10282000D4F8181100200881D4F81811A88848811C +:10283000D4F81811E8888881D4F818112889C8813B +:10284000D4F81801028941898A4204D88279082A79 +:1028500001D88A4201D3122070BD29884180D4F862 +:10286000181102200870002070BD3EB50446FEF726 +:1028700075FAB0B12E480125A0F1400245702368D9 +:1028800042F8423F237900211371417069460620C6 +:1028900001F095FA00B1FFDF684601F06EFA10B161 +:1028A0000EE012203EBDBDF80440029880F8205191 +:1028B000684601F062FA18B9BDF80400A042F4D1EC +:1028C00000203EBD70B505460088062101F0EEFAF5 +:1028D000040007D000F0D6FB20B1D4F81811087816 +:1028E00030B901E0022070BDD4F86401007808B16D +:1028F0003A2070BDB020005D10F0010F22D0D5F855 +:1029000002004860D5F806008860D4F8180169898B +:1029100010228181D4F8180105F10C010E3004F564 +:102920008C74FBF78AFD216803200870288805E075 +:1029300018080020840000201122330021684880FC +:10294000002070BD0C2070BD38B504460078EF281B +:102950004DD86088ADF80000009800F097FC88B36F +:102960006188080708D4D4E9012082423FD8202A90 +:102970003DD3B0F5804F3AD8207B18B3072836D81E +:10298000607B28B1012803D0022801D003282ED172 +:102990004A0703D4022801D0032805D1A07B08B13F +:1029A000012824D1480707D4607D28B1012803D02D +:1029B000022801D003281AD1C806E07D03D50128DA +:1029C00015D110E013E0012801D003280FD1C8066B +:1029D00009D4607E012803D0022801D0032806D143 +:1029E000A07E0F2803D8E07E18B1012801D0122064 +:1029F00038BD002038BDF8B514460D46064608F02F +:102A00001FF808B10C20F8BD3046FFF79DFF0028E5 +:102A1000F9D1FCF73EFA2870B07554B9FF208DF853 +:102A2000000069460020FCF71EFA69460020FCF70A +:102A30000EFA3046BDE8F840FCF752B90022DAE75A +:102A40000078C10801D012207047FA4981F82000AF +:102A50000020704710B504460078C00704D1608894 +:102A600010B1FCF7D7F980B12078618800F001023D +:102A7000607800F02FFC002806D1FCF7B3F901467E +:102A80006088884203D9072010BD122010BD6168FC +:102A9000FCF7E9F9002010BD10B504460078C00726 +:102AA00004D1608810B1FBF78AFE70B1207861888C +:102AB00000F00102607800F00DFC002804D160886D +:102AC0006168FCF7C4F9002010BD122010BD7CB570 +:102AD000044640784225012808D8A078FBF767FE15 +:102AE00020B120781225012802D090B128467CBD63 +:102AF000FCF7DBF920B1A0880028F7D08028F5D8B2 +:102B0000FCF7DAF960B160780028EFD0207801286E +:102B100008D006F0C3FD044607F05DFC00287FD016 +:102B20000C207CBDFBF7F5FF10B9FCF7B7F990B3AB +:102B300007F086FF0028F3D1FBF700FEA0F57F41E8 +:102B4000FF39EDD1FCF707F8A68842F21070464332 +:102B5000A079FCF770F9FBF739FEF8B100220721E4 +:102B600001A801F071F9040058D0B3480021846035 +:102B70002046FDF72DFD2046FCF732FDAD4D04F15A +:102B800030006A8AA98AC2830184FBF726FE60B1FD +:102B9000E88A01210DE0FFE712207CBD31460020CC +:102BA00007F0CBFC88B3FFDF44E0FCF787F9014670 +:102BB000E88A07F091FD0146A0620022204606F057 +:102BC00070FDFBF70AFE38B9FCF778F9024621469A +:102BD0000120FEF7D2FAD0B1964A21461C320120DC +:102BE000FEF7E8FA687C00902B7CAA8A698A208824 +:102BF00001F018FA00B1FFDF208806F02CFC314606 +:102C0000204607F09AFC00B1FFDF13E008E007213F +:102C1000BDF8040001F05CF900B1FFDF09207CBDC4 +:102C200044B1208806F018FC2088072101F050F9F3 +:102C300000B1FFDF00207CBD002148E770B50D46E4 +:102C4000072101F033F9040003D094F88F0110B18B +:102C50000AE0022070BD94F87D00142801D01528E8 +:102C600002D194F8DC0108B10C2070BD1022294675 +:102C700004F5C870FBF7E1FB012084F88F01002008 +:102C800070BD10B5072101F011F918B190F88F113E +:102C900011B107E0022010BD90F87D10142903D077 +:102CA000152901D00C2010BD022180F88F110020C1 +:102CB00010BD2DE9FC410C464BF6803212219442A6 +:102CC0001DD8E4B16946FEF727FC002815D19DF810 +:102CD000000000F05FF9019E9DF80000703600F0E2 +:102CE00059F9019DAD1C2F88224639463046FDF723 +:102CF00065FC2888B842F6D10020BDE8FC81084672 +:102D0000FBE77CB5044600886946FEF705FC002811 +:102D100010D19DF8000000F03DF9019D9DF80000E4 +:102D2000703500F037F90198A27890F82C10914294 +:102D300001D10C207CBD7F212972A9720021E9728A +:102D4000E17880F82D10217980F82E10A17880F894 +:102D50002C1000207CBD1CB50C466946FEF7DCFB40 +:102D600000280AD19DF8000000F014F9019890F8AD +:102D70008C0000B10120207000201CBD7CB50D46E8 +:102D800014466946FEF7C8FB002809D19DF80000EB +:102D900000F000F9019890F82C00012801D00C20D7 +:102DA0007CBD9DF8000000F0F5F8019890F87810CF +:102DB000297090F87900207000207CBD70B50D4618 +:102DC0001646072101F072F818B381880124C388E0 +:102DD000428804EB4104AC4217D842F210746343BA +:102DE000A4106243B3FBF2F2521E94B24FF4FA7293 +:102DF000944200D91446A54200D22C46491C641CBA +:102E0000B4FBF1F24A43521E91B290F8C8211AB9AC +:102E100001E0022070BD01843180002070BD10B53A +:102E20000C46072101F042F840B1022C08D91220CB +:102E300010BD000018080020780000200220F7E7ED +:102E400014F0010180F8FD10C4F3400280F8FC206A +:102E500004D090F8FA1009B107F054FC0020E7E71D +:102E6000017889B1417879B141881B290CD38188D7 +:102E70001B2909D3C188022906D3F64902680A65CD +:102E800040684865002070471220704710B504461E +:102E90000EF086FD204607F0D8FB0020C8E710B5ED +:102EA00007F0D6FB0020C3E72DE9F04115460F4699 +:102EB00006460122114638460EF076FD04460121F1 +:102EC000384607F009FC844200D20446012130460E +:102ED00000F065F806460121002000F060F8311886 +:102EE000012096318C4206D901F19600611AB1FB9E +:102EF000F0F0401C80B228800020BDE8F08110B5C1 +:102F0000044600F077F808B10C2091E7601C0AF045 +:102F100038FE207800F00100FBF718FE207800F062 +:102F200001000CF010F8002082E710B504460720DD +:102F300000F056FF08B10C207AE72078C00711D0C6 +:102F400000226078114611F097FD08B112206FE75A +:102F5000A06809F01DFB6078D4F8041009F021FB8B +:102F6000002065E7002009F013FB00210846F5E783 +:102F700010B505F036FE00205AE710B5006805F0E0 +:102F800084F8002054E718B1022801D001207047CE +:102F90000020704708B1002070470120704710B52D +:102FA000012904D0022905D0FFDF204640E7C000F8 +:102FB000503001E080002C3084B2F6E710B50FF0FD +:102FC0009EF9042803D0052801D0002030E7012015 +:102FD0002EE710B5FFF7F2FF10B10CF07BF828B91F +:102FE00007F02EFD20B1FBF78CFD08B101201FE793 +:102FF00000201DE710B5FFF7E1FF18B907F020FD2D +:10300000002800D0012013E72DE9FE4300250F46DC +:1030100080460A260421404604F069FA4046FDF73E +:103020003EFE062000F0EAFE044616E06946062051 +:1030300000F0C5FE0BE000BFBDF80400B84206D0AA +:103040000298042241460E30FBF7CAF950B1684697 +:1030500000F093FE0500EFD0641E002C06DD002D6D +:10306000E4D005E04046FDF723FEF5E705B9FFDFB4 +:10307000D8F80000FDF737FE761E01D00028C9D031 +:10308000BDE8FE8390F8F01090F88C0020B919B1DB +:10309000042901D0012070470020704701780029E1 +:1030A0000AD0416891F8FA20002A05D0002281F860 +:1030B000FA20406807F026BB704770B514460546F5 +:1030C000012200F01BF9002806D121462846BDE860 +:1030D0007040002200F012B970BDFB2802D8B1F593 +:1030E000296F01D911207047002070471B38E12853 +:1030F00006D2B1F5A47F03D344F29020814201D9D6 +:1031000012207047002070471FB55249403191F896 +:103110002010CA0702D102781D2A0AD08A0702D4D9 +:1031200002781C2A28D049073DD40178152937D0C8 +:1031300039E08088ADF8000002A9FEF7EDF900B192 +:10314000FFDF9DF80800FFF725FF039810F8601FC8 +:103150008DF8021040788DF803000020ADF80400CF +:1031600001B9FFDF9DF8030000B9FFDF6846FEF7F5 +:1031700040FCD8B1FFDF19E08088ADF800004FF4C3 +:103180002961FB20ADF80410ADF80200ADF806008F +:10319000ADF808106846FEF73AFD38B1FFDF05E0EC +:1031A000807BC00702D0002004B041E60120FBE78D +:1031B000F8B50746508915460C4640B1B0F5004FAA +:1031C00005D20022A878114611F056FC08B1122051 +:1031D000F8BDA06E04F1700630B1A97894F86E00C5 +:1031E000814201D00C20F8BD012184F86F10A9782C +:1031F00084F86E106968A1666989A4F86C10288942 +:10320000B084002184F86F1028886946FEF762FFB9 +:10321000B08CBDF80010081A00B2002804DD214669 +:103220003846FEF745FFDDE70020F8BD042803D34C +:1032300021B9B0F5804F01D90020704701207047B7 +:10324000042803D321B9B0F5804F01D9002070477D +:1032500001207047D8070020012802D018B10020B3 +:103260007047022070470120704710B500224FF4CC +:10327000C84408E030F81230A34200D9234620F8B1 +:103280001230521CD2B28A42F4D3D1E580B2C106C8 +:103290000BD401071CD481064FEAC07101D5B9B91E +:1032A00000E099B1800713D410E0410610D48106E4 +:1032B0000ED4C1074FEA807104D0002902DB400719 +:1032C00004D405E0010703D4400701D4012070476E +:1032D0000020704770B50C460546FF2904D8FBF75F +:1032E0007CFA18B11F2C01D9122070BD2846FBF7BB +:1032F0005EFA08B1002070BD422070BD0AB1012203 +:1033000000E00222024202D1C80802D109B1002025 +:10331000704711207047000030B5058825F400443F +:1033200021448CB24FF4004194420AD2121B92B253 +:103330001B339A4201D2A94307E005F4004121431F +:1033400003E0A21A92B2A9431143018030BD0844A0 +:10335000083050434A31084480B2704770B51D466A +:1033600016460B46044629463046049AFFF7EFFFFF +:103370000646B34200D2FFDF282200212046FBF799 +:1033800086F84FF6FF70A082283EB0B26577608065 +:10339000B0F5004F00D9FFDF618805F13C008142A4 +:1033A00000D2FFDF60880835401B343880B22080AF +:1033B0001B2800D21B2020800020A07770BD8161D7 +:1033C000886170472DE9F05F0D46C188044600F121 +:1033D0002809008921F4004620F4004800F063FB2E +:1033E00010B10020BDE8F09F4FF0000A4FF0010B34 +:1033F000B0450CD9617FA8EB0600401A0838854219 +:1034000019DC09EB06000021058041801AE0608884 +:10341000617F801B471A083F0DD41B2F00DAFFDFA6 +:10342000BD4201DC294600E0B9B2681A0204120C60 +:1034300004D0424502DD84F817A0D2E709EB06006C +:103440000180428084F817B0CCE770B5044600F1E3 +:103450002802C088E37D20F400402BB1104402888C +:10346000438813448B4201D2002070BD00258A425C +:1034700002D30180458008E0891A0904090C4180C3 +:1034800003D0A01D00F01FFB08E0637F0088083315 +:10349000184481B26288A01DFFF73EFFE575012048 +:1034A00070BD70B5034600F12804C588808820F4FB +:1034B00000462644A84202D10020188270BD988997 +:1034C0003588A84206D3401B75882D1A2044ADB21A +:1034D000C01E05E02C1AA5B25C7F20443044401D7C +:1034E0000C88AC4200D90D809C8924B10024147052 +:1034F0000988198270BD0124F9E770B5044600F10E +:103500002801808820F400404518208A002825D012 +:10351000A189084480B2A08129886A881144814227 +:1035200000D2FFDF2888698800260844A1898842E4 +:1035300012D1A069807F2871698819B1201D00F01F +:10354000C2FA08E0637F28880833184481B2628891 +:10355000201DFFF7E1FEA6812682012070BD2DE926 +:10356000F041418987880026044600F12805B942C8 +:1035700019D004F10A0800BF21F400402844418812 +:1035800019B1404600F09FFA08E0637F00880833D5 +:10359000184481B262884046FFF7BEFE761C6189FE +:1035A000B6B2B942E8D13046BDE8F0812DE9F0412C +:1035B00004460B4627892830A68827F40041B4F832 +:1035C0000A8001440D46B74201D10020ECE70AB160 +:1035D000481D106023B1627F691D1846FAF72DFF60 +:1035E0002E88698804F1080021B18A1996B200F08A +:1035F0006AFA06E0637F62880833991989B2FFF797 +:103600008BFE474501D1208960813046CCE7818817 +:10361000C088814201D10120704700207047018994 +:103620008088814201D1012070470020704770B529 +:103630008588C38800F1280425F4004223F4004162 +:1036400014449D421AD08389058A5E1925886388AF +:10365000EC18A64214D313B18B4211D30EE0437F72 +:1036600008325C192244408892B2801A80B2233317 +:10367000984201D211B103E08A4201D1002070BD0D +:10368000012070BD2DE9F0478846C18804460089B5 +:1036900021F4004604F1280720F4004507EB060951 +:1036A00000F001FA002178BBB54204D9627FA81B63 +:1036B000801A002503E06088627F801B801A08382A +:1036C00023D4E28962B1B9F80020B9F802303BB1E5 +:1036D000E81A2177404518DBE0893844801A09E070 +:1036E000801A217740450ADB607FE1890830304449 +:1036F00039440844C01EA4F81280BDE8F08745454F +:1037000003DB01202077E7E7FFE761820020F4E791 +:103710002DE9F74F044600F12805C088884620F4BB +:10372000004A608A05EB0A0608B1404502D2002033 +:10373000BDE8FE8FE08978B13788B6F8029007EBD4 +:103740000901884200D0FFDF207F4FF0000B50EAD4 +:10375000090106D088B33BE00027A07FB94630714D +:10376000F2E7E18959B1607F2944083050440844A8 +:10377000B4F81F1020F8031D94F821108170E2891D +:1037800007EB080002EB0801E1813080A6F802B0E7 +:1037900002985F4650B1637F30880833184481B285 +:1037A0006288A01DFFF7B8FDE78121E0607FE18915 +:1037B00008305044294408442DE0FFE7E089B4F87C +:1037C0001F102844C01B20F8031D94F8211081709D +:1037D00009EB0800E28981B202EB0800E081378042 +:1037E00071800298A0B1A01D00F06DF9A4F80EB090 +:1037F000A07F401CA077A07D08B1E088A08284F85B +:1038000016B000BFA4F812B084F817B001208FE7FB +:10381000E0892844C01B30F8031DA4F81F108078ED +:1038200084F82100EEE710B5818800F1280321F427 +:1038300000442344848AC288A14212D0914210D00D +:10384000818971B9826972B11046FFF7E8FE50B9FB +:103850001089283220F400401044197900798842F8 +:1038600001D1002010BD184610BD00F12803407F93 +:1038700008300844C01E1060088808B9DB1E1360B9 +:1038800008884988084480B270472DE9F04100F16A +:103890002806407F1C4608309046431808884D880B +:1038A000069ADB1EA0B1C01C80B2904214D9801AC7 +:1038B000A04200DB204687B298183A464146FAF704 +:1038C0008FFD002816D1E01B84B2B844002005E02B +:1038D000ED1CADB2F61EE8E7101A80B20119A9423C +:1038E00006D8304422464146BDE8F041FAF778BD9B +:1038F0004FF0FF3058E62DE9F04100F12804407FF9 +:103900001E46083090464318002508884F88069ABE +:10391000DB1E90B1C01C80B2904212D9801AB04216 +:1039200000DB304685B299182A464046FAF785FDF5 +:10393000701B86B2A844002005E0FF1CBFB2E41E45 +:10394000EAE7101A80B28119B94206D82118324626 +:103950004046FAF772FDA81985B2284624E62DE9FB +:10396000F04100F12804407F1E460830904643187D +:10397000002508884F88069ADB1E90B1C01C80B2D3 +:10398000904212D9801AB04200DB304685B29818B6 +:103990002A464146FAF751FD701B86B2A844002022 +:1039A00005E0FF1CBFB2E41EEAE7101A80B28119DD +:1039B000B94206D8204432464146FAF73EFDA819DE +:1039C00085B22846F0E5401D704710B5044600F169 +:1039D0002801C288808820F400431944904206D010 +:1039E000A28922B9228A12B9A28A904201D100206A +:1039F00010BD0888498831B1201D00F064F800200E +:103A00002082012010BD637F62880833184481B290 +:103A1000201DFFF781FCF2E70021C181017741827F +:103A2000C1758175704703881380C28942B1C2880D +:103A300022F4004300F128021A440A60C08970474A +:103A40000020704710B50446808AA0F57F41FF39F9 +:103A500000D0FFDFE088A082E08900B10120A075DE +:103A600010BD4FF6FF71818200218175704710B53E +:103A70000446808AA0F57F41FF3900D1FFDFA07D99 +:103A800028B9A088A18A884201D1002010BD012058 +:103A900010BD8188828A914201D1807D08B10020C9 +:103AA00070470120704720F4004221F400439A42FD +:103AB00007D100F4004001F40041884201D0012008 +:103AC00070470020704730B5044600880D4620F44A +:103AD0000040A84200D2FFDF21884FF40040884315 +:103AE0002843208030BD70B50C00054609D0082C55 +:103AF00000D2FFDF1DB1A1B2286800F044F8201DFC +:103B000070BD0DB100202860002070BD002102684A +:103B100003E093881268194489B2002AF9D100F0B1 +:103B200032B870B500260D460446082900D2FFDFE2 +:103B3000206808B91EE0044620688188A94202D0A6 +:103B400001680029F7D181880646A94201D10068A1 +:103B50000DE005F1080293B20022994209D32844EE +:103B6000491B026081802168096821600160206032 +:103B700000E00026304670BD00230B608A8002689A +:103B80000A600160704700234360021D01810260EA +:103B90007047F0B50F460188408815460C181E4640 +:103BA000AC4200D3641B3044A84200D9FFDFA01907 +:103BB000A84200D9FFDF3819F0BD2DE9F041884651 +:103BC00006460188408815460C181F46AC4200D3B3 +:103BD000641B3844A84200D9FFDFE019A84200D98D +:103BE000FFDF70883844708008EB0400BDE8F08186 +:103BF0002DE9F041054600881E461746841B88467D +:103C0000BC4200D33C442C8068883044B84200D980 +:103C1000FFDFA019B84200D9FFDF68883044688010 +:103C200008EB0400E2E72DE9F04106881D46044652 +:103C3000701980B2174688462080B84201D3C01B55 +:103C400020806088A84200D2FFDF7019B84200D9F6 +:103C5000FFDF6088401B608008EB0600C6E730B5D8 +:103C60000D460188CC18944200D3A41A408898428B +:103C700000D8FFDF281930BD2DE9F041C84D0446BA +:103C80009046A8780E46A04200D8FFDF05EB8607D5 +:103C9000B86A50F8240000B1FFDFB868002816D0D9 +:103CA000304600F044F90146B868FFF73AFF0500D6 +:103CB0000CD0B86A082E40F8245000D3FFDFB94872 +:103CC0004246294650F82630204698472846BDE807 +:103CD000F0812DE9F8431E468C1991460F460546A2 +:103CE000FF2C00D9FFDFB14500D9FFDFE4B200951A +:103CF0004DB300208046E81C20F00300A84200D00D +:103D0000FFDF4946DFF89892684689F8001089F885 +:103D1000017089F8024089F8034089F8044089F865 +:103D2000054089F8066089F80770414600F008F9F7 +:103D3000002142460F464B460098C01C20F003006D +:103D4000009012B10EE00120D4E703EB8106B062CF +:103D5000002005E0D6F828C04CF82070401CC0B206 +:103D6000A042F7D30098491C00EB8400C9B2009030 +:103D70000829E1D3401BBDE8F88310B50446EDF7F0 +:103D80008EFA08B1102010BD2078854A618802EBB8 +:103D9000800092780EE0836A53F8213043B14A1CC8 +:103DA0006280A180806A50F82100A060002010BDD0 +:103DB000491C89B28A42EED86180052010BD70B5D9 +:103DC00005460C460846EDF76AFA08B1102070BDAA +:103DD000082D01D3072070BD25700020608070BDC4 +:103DE0000EB56946FFF7EBFF00B1FFDF6846FFF74E +:103DF000C4FF08B100200EBD01200EBD10B5044661 +:103E0000082800D3FFDF6648005D10BD3EB50546BB +:103E100000246946FFF7D3FF18B1FFDF01E0641CFF +:103E2000E4B26846FFF7A9FF0028F8D02846FFF75C +:103E3000E5FF001BC0B23EBD59498978814201D9D6 +:103E4000C0B27047FF2070472DE9F041544B06295E +:103E500003D007291CD19D7900E0002500244FF6EE +:103E6000FF7603EB810713F801C00AE06319D7F866 +:103E700028E09BB25EF823E0BEF1000F04D0641C82 +:103E8000A4B2A445F2D8334603801846B34201D108 +:103E900000201CE7BDE8F041EEE6A0F57F43FF3BC4 +:103EA00001D0082901D300207047E5E6A0F57F4244 +:103EB000FF3A0BD0082909D2394A9378834205D9B1 +:103EC00002EB8101896A51F8200070470020704799 +:103ED0002DE9F04104460D46A4F57F4143F202006E +:103EE000FF3902D0082D01D30720F0E62C494FF00E +:103EF00000088A78A242F8D901EB8506B26A52F826 +:103F00002470002FF1D027483946203050F8252062 +:103F100020469047B16A284641F8248000F007F80F +:103F200002463946B068FFF727FE0020CFE61D495C +:103F3000403131F810004FF6FC71C01C084070474A +:103F40002DE9F843164E8846054600242868C01C13 +:103F500020F0030028602046FFF7E9FF315D484369 +:103F6000B8F1000F01D0002200E02A68014600925B +:103F700032B100274FEA0D00FFF7B5FD1FB106E093 +:103F800001270020F8E706EB8401009A8A6029687F +:103F9000641C0844E4B22860082CD7D3EBE6000088 +:103FA0003C0800201862020070B50E461D461146FE +:103FB00000F0D3F804462946304600F0D7F82044F4 +:103FC000001D70BD2DE9F04190460D4604004FF0F4 +:103FD000000610D00027E01C20F00300A04200D013 +:103FE000FFDFE5B141460020FFF77DFD0C3000EB1F +:103FF000850617B113E00127EDE7614F04F10C00CE +:10400000AA003C602572606000EB85002060002102 +:104010006068FAF73CFA41463868FFF764FD3046BD +:10402000BDE8F0812DE9FF4F554C804681B02068F6 +:104030009A46934600B9FFDF2068027A424503D9C9 +:10404000416851F8280020B143F2020005B0BDE8F4 +:10405000F08F5146029800F080F886B258460E99CB +:1040600000F084F885B27019001D87B22068A1465F +:1040700039460068FFF755FD04001FD06780258092 +:104080002946201D0E9D07465A4601230095FFF73D +:1040900065F92088314638440123029ACDF800A002 +:1040A000FFF75CF92088C1193846FFF788F9D9F87D +:1040B00000004168002041F82840C7E70420C5E718 +:1040C00070B52F4C0546206800B9FFDF2068017AE3 +:1040D000A9420DD9426852F8251049B1002342F88F +:1040E00025304A880068FFF747FD2168087A06E016 +:1040F00043F2020070BD4A6852F820202AB9401EDF +:10410000C0B2F8D20868FFF701FD002070BD70B59D +:104110001B4E05460024306800B9FFDF3068017A85 +:10412000A94204D9406850F8250000B1041D20467A +:1041300070BD70B5124E05460024306800B9FFDF2F +:104140003068017AA94206D9406850F8251011B1AB +:1041500031F8040B4418204670BD10B50A46012101 +:10416000FFF7F5F8C01C20F0030010BD10B50A469B +:104170000121FFF7ECF8C01C20F0030010BD000087 +:104180008C00002070B50446C2F110052819FAF71A +:1041900054F915F0FF0109D0491ECAB28020A0547D +:1041A0002046BDE870400021FAF771B970BD30B506 +:1041B00005E05B1EDBB2CC5CD55C6C40C454002BCC +:1041C000F7D130BD10B5002409E00B78521E44EA47 +:1041D000430300F8013B11F8013BD2B2DC09002A8D +:1041E000F3D110BD2DE9F04389B01E46DDE9107909 +:1041F00090460D00044622D002460846F949FDF7D4 +:1042000044FE102221463846FFF7DCFFE07B000623 +:1042100006D5F44A3946102310320846FFF7C7FF87 +:10422000102239464846FFF7CDFFF87B000606D539 +:10423000EC4A4946102310320846FFF7B8FF102217 +:1042400000212046FAF723F90DE0103EB6B208EB44 +:104250000601102322466846FFF7A9FF224628469A +:104260006946FDF712FE102EEFD818D0F2B2414683 +:104270006846FFF787FF10234A46694604A8FFF700 +:1042800096FF1023224604A96846FFF790FF2246B6 +:1042900028466946FDF7F9FD09B0BDE8F083102313 +:1042A0003A464146EAE770B59CB01E4605461346BD +:1042B00020980C468DF80800202219460DF10900BF +:1042C000FAF7BBF8202221460DF12900FAF7B5F8DC +:1042D00017A913A8CDE90001412302AA31462846B7 +:1042E000FFF780FF1CB070BD2DE9FF4F9FB014AEEB +:1042F000DDE92D5410AFBB49CDE9007620232031F4 +:104300001AA8FFF76FFF4FF000088DF808804FF0F4 +:1043100001098DF8099054F8010FCDF80A00A08822 +:10432000ADF80E0014F8010C1022C0F340008DF817 +:10433000100055F8010FCDF81100A888ADF8150050 +:1043400015F8010C2C99C0F340008DF8170006A851 +:104350008246FAF772F80AA8834610222299FAF7E1 +:104360006CF8A0483523083802AA40688DF83C80D4 +:10437000CDE900760E901AA91F98FFF733FF8DF84C +:1043800008808DF809902068CDF80A00A088ADF863 +:104390000E0014F8010C1022C0F340008DF810003C +:1043A0002868CDF81100A888ADF8150015F8010CA3 +:1043B0002C99C0F340008DF817005046FAF73DF8ED +:1043C000584610222299FAF738F8864835230838DB +:1043D00002AA40688DF83C90CDE900760E901AA9AB +:1043E0002098FFF7FFFE23B0BDE8F08FF0B59BB03B +:1043F0000C460546DDE922101E461746DDE920324F +:10440000D0F801C0CDF808C0B0F805C0ADF80CC0B8 +:104410000078C0F340008DF80E00D1F80100CDF80F +:104420000F00B1F80500ADF8130008781946C0F385 +:1044300040008DF815001088ADF8160090788DF8C2 +:1044400018000DF119001022F9F7F7FF0DF12900FE +:1044500010223146F9F7F1FF0DF1390010223946EB +:10446000F9F7EBFF17A913A8CDE90001412302AA30 +:1044700021462846FFF7B6FE1BB0F0BDF0B5A3B04D +:1044800017460D4604461E46102202A82899F9F741 +:10449000D4FF06A820223946F9F7CFFF0EA8202224 +:1044A0002946F9F7CAFF1EA91AA8CDE90001502331 +:1044B00002AA314616A8FFF795FE1698206023B091 +:1044C000F0BDF0B589B00446DDE90E070D46397838 +:1044D000109EC1F340018DF8001031789446C1F36D +:1044E00040018DF801101968CDF802109988ADF8D7 +:1044F000061099798DF808100168CDF809108188A7 +:10450000ADF80D1080798DF80F0010236A466146D2 +:1045100004A8FFF74CFE2246284604A9FDF7B5FC87 +:10452000D6F801000090B6F80500ADF80400D7F801 +:104530000100CDF80600B7F80500ADF80A0000202C +:10454000039010236A46214604A8FFF730FE224656 +:10455000284604A9FDF799FC09B0F0BD1FB51C68F9 +:1045600000945B68019313680293526803920246B9 +:1045700008466946FDF789FC1FBD10B588B00446A2 +:104580001068049050680590002006900790084637 +:104590006A4604A9FDF779FCBDF80000208008B048 +:1045A00010BD1FB51288ADF800201A88ADF80220A2 +:1045B0000022019202920392024608466946FDF7E4 +:1045C00064FC1FBD7FB5074B14460546083B9A1C8B +:1045D0006846FFF7E6FF224669462846FFF7CDFF0B +:1045E0007FBD00007062020070B5044600780E4680 +:1045F000012813D0052802D0092813D10EE0A068A5 +:1046000061690578042003F059FA052D0AD0782352 +:1046100000220420616903F0A7F903E00420616926 +:1046200003F04CFA31462046BDE8704001F08AB8EC +:1046300010B500F12D03C2799C78411D144064F33C +:104640000102C271D2070DD04A795C7922404A71C9 +:104650000A791B791A400A718278C9788A4200D98E +:10466000817010BD00224A71F5E74178012900D020 +:104670000C21017070472DE9F04F93B04FF0000B03 +:104680000C690D468DF820B0097801260C201746DC +:104690004FF00D084FF0110A4FF008091B2975D291 +:1046A000DFE811F01B00C40207031F035E03710360 +:1046B000A303B803F9031A0462049504A204EF04E7 +:1046C0002D05370555056005F305360639066806DC +:1046D0008406FE062207EB06F00614B120781D289A +:1046E0002AD0D5F808805FEA08004FD001208DF865 +:1046F0002000686A02220D908DF824200A208DF88F +:104700002500A8690A90A8880028EED098F8001023 +:1047100091B10F2910D27DD2DFE801F07C1349DE80 +:10472000FCFBFAF9F8F738089CF6F50002282DD1C1 +:1047300024B120780C2801D00026F0E38DF8202049 +:10474000CBE10420696A03F0B9F9A8880728EED103 +:10475000204600F0F2FF022809D0204600F0EDFFCD +:10476000032807D9204600F0E8FF072802D20120DD +:10477000207004E0002CB8D020780128D7D198F818 +:104780000400C11F0A2902D30A2061E0C4E1A0701D +:10479000D8F80010E162B8F80410218698F80600F5 +:1047A00084F83200012028700320207044E007289C +:1047B000BDD1002C99D020780D28B8D198F80310DD +:1047C00094F82F20C1F3C000C2F3C002104201D000 +:1047D000062000E00720890707D198F8051001425C +:1047E000D2D198F806100142CED194F8312098F831 +:1047F000051020EA02021142C6D194F8322098F83E +:10480000061090430142BFD198F80400C11F0A2945 +:10481000BAD200E008E2617D81427CD8D8F800106D +:104820006160B8F80410218198F80600A072012098 +:1048300028700E20207003208DF82000686A0D90EB +:1048400004F12D000990601D0A900F300B9022E1B9 +:104850002875FCE3412891D1204600F06EFF042822 +:1048600002D1E078C00704D1204600F066FF0F288F +:1048700084D1A88CD5F80C8080B24FF0400BE6694B +:10488000FFF745FC324641465B464E46CDF8009068 +:10489000FFF731F80B208DF82000686A0D90E06971 +:1048A0000990002108A8FFF79FFE2078042806D071 +:1048B000A07D58B1012809D003280AD04AE3052079 +:1048C0002070032028708DF82060CEE184F800A0CD +:1048D00032E712202070EAE11128BCD1204600F016 +:1048E0002CFF042802D1E078C00719D0204600F040 +:1048F00024FF062805D1E078C00711D1A07D022849 +:104900000ED0204608E0CCE084E072E151E124E1E1 +:1049100003E1E9E019E0B0E100F00FFF11289AD1BE +:10492000102208F1010104F13C00F9F786FD6078DE +:1049300001286ED012202070E078C00760D0A07DE2 +:104940000028C8D00128C6D05AE0112890D12046AE +:1049500000F0F3FE082804D0204600F0EEFE1328F5 +:1049600086D104F16C00102208F101010646F9F726 +:1049700064FD207808280DD014202070E178C80745 +:104980000DD0A07D02280AD06278022A04D0032824 +:10499000A1D035E00920F0E708B1012837D1C807D8 +:1049A00013D0A07D02281DD000200090D4E906215C +:1049B00033460EA8FFF777FC10220EA904F13C0045 +:1049C000F9F70EFDC8B1042042E7D4E90912201D11 +:1049D0008DE8070004F12C0332460EA8616BFFF747 +:1049E00070FDE9E7606BC1F34401491E0068C840EF +:1049F00000F0010040F08000D7E72078092806D1B8 +:104A000085F800908DF8209036E32870EFE30920B8 +:104A1000FBE79EE1112899D1204600F08EFE0A287E +:104A200002D1E078C00704D1204600F086FE1528A8 +:104A30008CD104F13C00102208F101010646F9F77F +:104A4000FCFC20780A2816D016202070D4E9093200 +:104A5000606B611D8DE80F0004F15C0304F16C02D2 +:104A600047310EA8FFF7C2FC10220EA93046F9F715 +:104A7000B7FC18B1F9E20B20207073E22046FFF773 +:104A8000D7FDA078216AC0F110020B18002118464A +:104A9000F9F7FDFC26E3394608A8FFF7A5FD064611 +:104AA0003CE20228B7D1204600F047FE042804D398 +:104AB000204600F042FE082809D3204600F03DFEC3 +:104AC0000E2829D3204600F038FE122824D2A07DDB +:104AD0000228A0D10E208DF82000686A0D9098F869 +:104AE00001008DF82400F5E3022894D1204600F05F +:104AF00024FE002810D0204600F01FFE0128F9D027 +:104B0000204600F01AFE0C28F4D004208DF8240072 +:104B100098F801008DF8250060E21128FCD1002CE6 +:104B2000FAD020781728F7D16178606A022912D06C +:104B30005FF0000101EB4101182606EBC1011022D4 +:104B4000405808F10101F9F778FC0420696A00F087 +:104B5000E7FD2670F0E50121ECE70B28DCD1002C05 +:104B6000DAD020781828D7D16078616A02281CD062 +:104B70005FF0000000EB4002102000EBC20009587B +:104B8000B8F8010008806078616A02280FD0002020 +:104B900000EB4002142000EBC2000958404650F8D8 +:104BA000032F0A604068486039E00120E2E70120F5 +:104BB000EEE71128B0D1002CAED020781928ABD167 +:104BC0006178606A022912D05FF0000101EB4101B7 +:104BD0001C2202EBC1011022405808F10101F9F733 +:104BE0002CFC0420696A00F09BFD1A20B6E001212C +:104BF000ECE7082890D1002C8ED020781A288BD191 +:104C0000606A98F80120017862F347010170616AD7 +:104C1000D8F8022041F8012FB8F806008880042057 +:104C2000696A00F07DFD90E2072011E638780128DE +:104C300094D1182204F114007968F9F7FEFBE079A9 +:104C4000C10894F82F0001EAD001E07861F3000078 +:104C5000E070217D002974D12178032909D0C00793 +:104C600025D0032028708DF82090686A0D9041208F +:104C700008E3607DA178884201D90620E8E5022694 +:104C80002671E179204621F0E001E171617A21F09D +:104C9000F0016172A17A21F0F001A172FFF7C8FC66 +:104CA0002E708DF82090686A0D900720EAE20420AB +:104CB000ABE6387805289DD18DF82000686A0D9004 +:104CC000B8680A900720ADF824000A988DF830B033 +:104CD0006168016021898180A17A8171042020703E +:104CE000F8E23978052985D18DF82010696A0D918F +:104CF000391D09AE0EC986E80E004121ADF8241019 +:104D00008DF830B01070A88CD7F80C8080B2402697 +:104D1000A769FFF70EFA41463A463346C846CDF832 +:104D20000090FEF71CFE002108A8FFF75DFCE0786C +:104D300020F03E00801CE0702078052802D00F2073 +:104D40000CE04AE1A07D20B1012802D0032802D066 +:104D500002E10720BEE584F80080EDE42070EBE47A +:104D6000102104F15C0002F0C2FB606BB0BBA07DBF +:104D700018B1012801D00520FDE006202870F84870 +:104D80006063A063C2E23878022894D1387908B110 +:104D90002875B7E3A07D022802D0032805D022E0C1 +:104DA000B8680028F5D060631CE06078012806D060 +:104DB000A07994F82E10012805D0E94806E0A179E1 +:104DC00094F82E00F7E7B8680028E2D06063E07836 +:104DD000C00701D0012902D0E14803E003E0F868F0 +:104DE0000028D6D0A06306200FE68DF82090696ACF +:104DF0000D91E1784846C90709D06178022903D1AD +:104E0000A17D29B1012903D0A17D032900D007206C +:104E1000287033E138780528BBD1207807281ED0C8 +:104E200084F800A005208DF82000686A0D90B8680D +:104E30000A90ADF824A08DF830B003210170E1781C +:104E4000CA070FD0A27D022A1AD000210091D4E90E +:104E5000061204F15C03401CFFF725FA6BE384F8AB +:104E60000090DFE7D4E90923211D8DE80E0004F14D +:104E70002C0304F15C02401C616BFFF722FB5AE338 +:104E8000626BC1F34401491E1268CA4002F001017D +:104E900041F08001DAE738780528BDD18DF820008F +:104EA000686A0D90B8680A90ADF824A08DF830B00B +:104EB000042100F8011B102204F15C01F9F7BDFA8E +:104EC000002108A8FFF790FB2078092801D01320C3 +:104ED00044E70A2020709AE5E078C10742D0A17D1E +:104EE000012902D0022927D038E0617808A80129D9 +:104EF00016D004F16C010091D4E9061204F15C03B0 +:104F0000001DFFF7BBFA0A20287003268DF82080C9 +:104F1000686A0D90002108A8FFF766FBE1E2C7E28E +:104F200004F15C010091D4E9062104F16C03001D39 +:104F3000FFF7A4FA0026E9E7C0F3440114290DD2D3 +:104F40004FF0006101EBB0104FEAB060E0706078A4 +:104F5000012801D01020BDE40620FFE6607801287A +:104F60003FF4B6AC0A2050E5E178C90708D0A17D2E +:104F7000012903D10B202870042030E028702EE096 +:104F80000E2028706078616B012818D004F15C0352 +:104F900004F16C020EA8FFF7E1FA2046FFF748FB88 +:104FA000A0780EAEC0F1100230440021F9F76FFA7C +:104FB00006208DF82000686A09960D909BE004F1A8 +:104FC0006C0304F15C020EA8FFF7C8FAE8E7397831 +:104FD000022903D139790029D0D0297592E28DF8C0 +:104FE0002000686A0D9056E538780728F6D1D4E994 +:104FF00009216078012808D004F16C00CDE9000295 +:10500000029105D104F16C0304E004F15C00F5E7C2 +:1050100004F15C0304F14C007A680646216AFFF74C +:1050200063F96078012822D1A078216AC0F11002CA +:105030000B1800211846F9F72AFAD4E90923606B06 +:1050400004F12D018DE80F0004F15C0300E05BE248 +:1050500004F16C0231460EA8FFF7C8F910220EA920 +:1050600004F13C00F9F7BCF908B10B20ACE485F879 +:10507000008000BF8DF82090686A0D908DF824A004 +:1050800009E538780528A9D18DF82000686A0D90C7 +:10509000B8680A90ADF824A08DF830B080F8008090 +:1050A000617801291AD0D4E9092104F12D03A66BF6 +:1050B00003910096CDE9013204F16C0304F15C0226 +:1050C00004F14C01401CFFF791F9002108A8FFF7FB +:1050D0008BFA6078012805D015203FE6D4E9091243 +:1050E000631DE4E70E20287006208DF82000686A12 +:1050F000CDF824B00D90A0788DF82800CBE4387856 +:105100000328C0D1E079C00770D00F202870072095 +:1051100065E7387804286BD11422391D04F1140096 +:10512000F9F78BF9616A208CA1F80900616AA0780F +:10513000C871E179626A01F003011172616A627AF1 +:105140000A73616AA07A81F8240016205DE485F86C +:1051500000A08DF82090696A50460D9192E0000001 +:10516000706202003878052842D1B868A861617879 +:10517000606A022901D0012100E0002101EB410118 +:10518000142606EBC1014058082102F0B0F96178FD +:10519000606A022901D0012100E0002101EB4101F8 +:1051A00006EBC101425802A8E169FFF70BFA6078EB +:1051B000626A022801D0012000E0002000EB4001DB +:1051C000102000EBC1000223105802A90932FEF79B +:1051D000EEFF626AFD4B0EA80932A169FFF7E1F903 +:1051E0006178606A022904D0012103E044E18DE086 +:1051F000BFE0002101EB4101182606EBC101A278B6 +:1052000040580EA9F9F719F96178606A022901D0AE +:10521000012100E0002101EB410106EBC1014158F1 +:10522000A0780B18C0F1100200211846F9F72FF9E9 +:1052300005208DF82000686A0D90A8690A90ADF8E5 +:1052400024A08DF830B0062101706278616A022ACC +:1052500001D0012200E0002202EB420206EBC20272 +:10526000401C89581022F9F7E8F8002108A8FFF738 +:10527000BBF91220C5F818B028708DF82090686A24 +:105280000D900B208DF8240005E43878052870D1A6 +:105290008DF82000686A0D90B8680A900B20ADF870 +:1052A00024000A98072101706178626A022901D0FE +:1052B000012100E0002101EB4103102101EBC301BA +:1052C00051580988A0F801106178626A022902D059 +:1052D000012101E02FE1002101EB4103142101EB49 +:1052E000C30151580A6840F8032F4968416059E0EA +:1052F0001920287001208DF8300074E616202870DF +:105300008DF830B0002108A8FFF76EF9032617E1E9 +:1053100014202870AEE6387805282AD18DF82000B0 +:10532000686A0D90B8680A90ADF824A08DF830B086 +:1053300080F800906278616A4E46022A01D001220C +:1053400000E0002202EB42021C2303EBC202401CDD +:1053500089581022F9F771F8002108A8FFF744F9DD +:10536000152028708DF82060686A0D908DF82460F3 +:1053700039E680E0387805287DD18DF82000686A0C +:105380000D90B8680A90ADF8249009210170616908 +:10539000097849084170616951F8012FC0F802206D +:1053A0008988C18020781C28A8D1A1E7E078C007AF +:1053B00002D04FF0060C01E04FF0070C6078022895 +:1053C0000AD000BF4FF0000000EB040101F1090119 +:1053D00005D04FF0010004E04FF00100F4E74FF07A +:1053E00000000B78204413EA0C030B7010F8092F0F +:1053F00002EA0C02027004D14FF01B0C84F800C0CA +:10540000D2B394F801C0BCF1010F00D09BB990F861 +:1054100000C0E0465FEACC7C04D028F001060670AC +:10542000102606E05FEA887C05D528F002060670A3 +:1054300013262E70032694F801C0BCF1020F00D091 +:1054400092B991F800C05FEACC7804D02CF0010644 +:105450000E70172106E05FEA8C7805D52CF0020665 +:105460000E701921217000260078D0BBCAB3C3BBCF +:105470001C20207035E012E002E03878062841D187 +:105480001A2015E4207801283CD00C283AD0204678 +:10549000FFF7EBF809208DF82000686A0D9031E0E5 +:1054A0003878052805D00620387003261820287083 +:1054B00046E005208DF82000696A0D91B9680A91CF +:1054C0000221ADF8241001218DF830100A990870DE +:1054D000287D4870394608A8FFF786F80646182048 +:1054E0002870012E0ED02BE001208DF82000686A74 +:1054F0000D9003208DF82400287D8DF8250085F877 +:1055000014B012E0287D80B11D2020701720287073 +:105510008DF82090686A0D9002208DF8240039469D +:1055200008A8FFF761F806460AE00CB1FE202070DB +:105530009DF8200020B1002108A8FFF755F80CE4E1 +:1055400013B03046BDE8F08F2DE9F04387B00C462C +:105550004E6900218DF804100120257803460227AA +:105560004FF007094FF0050C85B1012D53D0022DE6 +:1055700039D1FE2030708DF80030606A059003202C +:105580008DF80400207E8DF8050063E02179012963 +:1055900025D002292DD0032928D0042923D1B17D7B +:1055A000022920D131780D1F042D04D30A3D032D8B +:1055B00001D31D2917D12189022914D38DF8047034 +:1055C000237020899DF80410884201E0686202007F +:1055D00018D208208DF80000606A059057E07078B6 +:1055E0000128EBD0052007B0BDE8F0831D20307006 +:1055F000E4E771780229F5D131780C29F3D18DF8DF +:105600000490DDE7083402F804CB94E80B0082E84C +:105610000B000320E7E71578052DE4D18DF800C0D5 +:10562000656A0595956802958DF8101094F80480C8 +:10563000B8F1010F13D0B8F1020F2DD0B8F1030F5C +:105640001CD0B8F1040FCED1ADF804700E20287034 +:10565000207E687000216846FEF7C6FF0CE0ADF8BA +:1056600004700B202870207E002100F01F0068705D +:105670006846FEF7B9FF37700020B4E7ADF8047054 +:105680008DF8103085F800C0207E687027701146B4 +:105690006846FEF7A9FFA6E7ADF804902B70207FBF +:1056A0006870607F00F00100A870A07F00F01F000C +:1056B000E870E27F2A71C0071CD094F8200000F047 +:1056C0000700687194F8210000F00700A87100211C +:1056D0006846FEF789FF2868F062A8883086A879B6 +:1056E00086F83200A069407870752879B0700D2076 +:1056F0003070C1E7A9716971E9E700B587B0042886 +:105700000CD101208DF800008DF8040000200591D7 +:105710008DF8050001466846FEF766FF07B000BD3C +:1057200070B50C46054602F0C9F921462846BDE889 +:1057300070407823002202F017B908B10078704752 +:105740000C20704770B50C0005784FF000010CD0AC +:1057500021702146EFF7D1FD69482178405D8842EC +:1057600001D1032070BD022070BDEFF7C6FD0020FF +:1057700070BD0279012A05D000220A704B78012BF6 +:1057800002D003E0042070470A758A610279930011 +:10579000521C0271C15003207047F0B587B00F460C +:1057A00005460124287905EB800050F8046C7078D8 +:1057B000411E02290AD252493A46083901EB8000BB +:1057C000314650F8043C2846984704460CB1012C59 +:1057D00011D12879401E10F0FF00287101D0032458 +:1057E000E0E70A208DF80000706A0590002101961C +:1057F0006846FFF7A7FF032CD4D007B02046F0BDC2 +:1058000070B515460A46044629461046FFF7C5FFFF +:10581000064674B12078FE280BD1207C30B10020E0 +:105820002870294604F10C00FFF7B7FF2046FEF769 +:105830001CFF304670BD704770B50E4604467C2292 +:105840000021F8F724FE0225012E03D0022E04D0F9 +:10585000052070BD0120607000E065702046FEF7F5 +:1058600004FFA575002070BD28B1027C1AB10A465C +:1058700000F10C01C4E70120704710B5044686B062 +:10588000042002F01BF92078FE2806D000208DF8B5 +:10589000000069462046FFF7E7FF06B010BD7CB563 +:1058A0000E4600218DF804104178012903D0022909 +:1058B00003D0002405E0046900E044690CB1217CB8 +:1058C00089B16D4601462846FFF753FF032809D1E9 +:1058D000324629462046FFF793FF9DF80410002921 +:1058E00000D004207CBD04F10C05EBE730B40C467D +:1058F0000146034A204630BC024B0C3AFEF751BE2B +:10590000AC6202006862020070B50D46040011D05E +:1059100085B1220100212846F8F7B9FD102250492F +:105920002846F8F78AFD4F48012101704470456010 +:10593000002070BD012070BD70B505460024494EA1 +:1059400011E07068AA7B00EB0410817B914208D1C2 +:10595000C17BEA7B914204D10C222946F8F740FD35 +:1059600030B1641CE4B230788442EAD3002070BDC8 +:10597000641CE0B270BD70B50546FFF7DDFF00287E +:1059800005D1384C20786178884201D3002070BD61 +:105990006168102201EB00102946F8F74EFD2078CF +:1059A000401CC0B2207070BD2E48007870472D4951 +:1059B0000878012802D0401E08700020704770B59A +:1059C0000D460021917014461180022802D0102843 +:1059D00015D105E0288890B10121A17010800CE05C +:1059E000284613B1FFF7C7FF01E0FFF7A5FFA0703E +:1059F00010F0FF0F03D0A8892080002070BD012087 +:105A000070BD0023DBE770B5054614460E0009D0D3 +:105A100000203070A878012806D003D911490A78EF +:105A200090420AD9012070BD24B1287820702888BE +:105A3000000A5070022008700FE064B1496810221B +:105A400001EB001120461039F8F7F7FC2878207395 +:105A50002888000A607310203070002070BD00009C +:105A6000BB620200900000202DE9F04190460C46F8 +:105A700007460025FE48072F00EB881607D2DFE80F +:105A800007F00707070704040400012500E0FFDF13 +:105A900006F81470002D13D0F548803000EB880113 +:105AA00091F82700202803D006EB4000447001E065 +:105AB00081F8264006EB44022020507081F82740F0 +:105AC000BDE8F081F0B51F4614460E460546202A73 +:105AD00000D1FFDFE649E648803100EB871C0CEB84 +:105AE000440001EB8702202E07D00CEB46014078E2 +:105AF0004B784870184620210AE092F8253040780B +:105B000082F82500F6E701460CEB4100057040786D +:105B1000A142F8D192F82740202C03D00CEB44048A +:105B2000637001E082F826300CEB4104202363709F +:105B300082F82710F0BD30B50D46CE4B4419002237 +:105B4000181A72EB020100D2FFDFCB48854200DD5C +:105B5000FFDFC9484042854200DAFFDFC548401CEC +:105B6000844207DA002C01DB204630BDC148401CCE +:105B7000201830BDBF48C043FAE710B5044601689D +:105B8000407ABE4A52F82020114450B10220084405 +:105B900020F07F40EDF763F894F90810BDE810405D +:105BA000C9E70420F3E72DE9F047B14E803696F8B7 +:105BB0002D50DFF8BC9206EB850090F8264034E0CB +:105BC00009EB85174FF0070817F81400012806D0D5 +:105BD00004282ED005282ED0062800D0FFDF01F0A3 +:105BE00025F9014607EB4400427806EB850080F872 +:105BF000262090F82720A24202D1202280F82720D8 +:105C0000084601F01EF92A4621460120FFF72CFF25 +:105C10009B48414600EB041002682046904796F8E6 +:105C20002D5006EB850090F82640202CC8D1BDE809 +:105C3000F087022000E003208046D0E710B58C4CAE +:105C40002021803484F8251084F8261084F8271049 +:105C5000002084F8280084F82D0084F82E10411EBE +:105C6000A16044F8100B2074607420736073A073FB +:105C70008449E07720750870487000217C4A103C08 +:105C800002F81100491CC9B22029F9D30120ECF710 +:105C9000D6FE0020ECF7D3FE012084F82200EDF7B9 +:105CA000FFF87948EDF711F9764CA41E207077487B +:105CB000EDF70BF96070BDE81040ECF74DBE10B584 +:105CC000ECF76FFE6F4CA41E2078EDF717F96078A3 +:105CD000EDF714F9BDE8104001F0E0B8202070475E +:105CE0000020ECF785BE70B5054601240E46AC4099 +:105CF0005AB1FFF7F5FF0146654800EBC500C0F853 +:105D00001015C0F81465634801E06248001D046086 +:105D100070BD2DE9F34F564C0025803404EB810A09 +:105D200089B09AF82500202821D0691E0291544993 +:105D3000009501EB0017391D03AB07C983E8070085 +:105D4000A18BADF81C10A07F8DF81E009DF81500EA +:105D5000A046C8B10226494951F820400399A2192A +:105D6000114421F07F41019184B102210FE0012013 +:105D7000ECF765FE0020ECF762FEECF730FE01F078 +:105D80008DF884F82F50A9E00426E4E700218DF86F +:105D90001810022801D0012820D103980119099870 +:105DA000081A801C9DF81C1020F07F4001B10221D0 +:105DB000353181420BD203208DF815000398C4F1D0 +:105DC0003201401A20F07F40322403900CE098F812 +:105DD000240018B901F043FA002863D0322C03D212 +:105DE00014B101F04FF801E001F058F8254A10789D +:105DF00018B393465278039B121B00219DF818405C +:105E0000994601281AD0032818D000208DF81E00CA +:105E1000002A04DD981A039001208DF818009DF8DF +:105E20001C0000B1022103981B4A20F07F40039020 +:105E300003AB099801F03EF810B110E00120E5E74E +:105E40009DF81D0018B99BF80000032829D08DF893 +:105E50001C50CDF80C908DF818408DF81E509DF810 +:105E6000180010B30398012381190022184615E089 +:105E7000840A0020FF7F841E0020A107CC6202005C +:105E8000840800209A00002017780100A75B010019 +:105E900000F0014004F50140FFFF3F00ECF722FE57 +:105EA00006E000200BB0BDE8F08F0120ECF7C7FD45 +:105EB00097F90C20012300200199ECF713FEF87BE1 +:105EC000C00701D0ECF7F7FE012188F82F108AF8FF +:105ED000285020226946FE48F8F7AFFA0120E1E792 +:105EE0002DE9F05FDFF8E883064608EB860090F8BE +:105EF0002550202D1FD0A8F180002C4600EB8617DE +:105F0000A0F50079DFF8CCB305E0A24607EB4A0024 +:105F10004478202C0AD0ECF730FE09EB04135A46E3 +:105F200001211B1D00F0C6FF0028EED0AC4202D0BC +:105F3000334652461EE0E84808B1AFF30080ECF764 +:105F40001CFE98F82F206AB1D8F80C20411C891A41 +:105F50000902CA1701EB12610912002902DD0020B3 +:105F6000BDE8F09F3146FFF7D4FE08B10120F7E706 +:105F700033462A4620210420FFF7A4FDEFE72DE950 +:105F8000F041D34C2569ECF7F8FD401B0002C11726 +:105F900000EB1160001200D4FFDF94F8220000B182 +:105FA000FFDF012784F8227094F82E00202800D10A +:105FB000FFDF94F82E60202084F82E00002584F85E +:105FC0002F5084F8205084F82150C4482560007870 +:105FD000022833D0032831D000202077A068401C4D +:105FE00005D04FF0FF30A0600120ECF728FD002025 +:105FF000ECF725FDECF721FEECF719FEECF7EFFCD2 +:106000000EF0D6FDB648056005604FF0E0214FF474 +:106010000040B846C1F88002ECF7BBFE94F82D7042 +:106020003846FFF75DFF0028FAD0A948803800EB1A +:10603000871010F81600022802D006E00120CCE7F5 +:106040003A4631460620FFF70FFD84F8238004EB23 +:10605000870090F82600202804D0A048801E4078B1 +:10606000ECF752FF207F002803D0ECF7D6FD257710 +:10607000657725E5964910B591F82D2000248039E3 +:1060800001EB821111F814302BB1641CE4B2202C06 +:10609000F8D3202010BD934901EB041108600020C3 +:1060A000C87321460120FFF7DFFC204610BD10B564 +:1060B000012801D0032800D171B3854A92F82D3010 +:1060C000834C0022803C04EB831300BF13F8124082 +:1060D0000CB1082010BD521CD2B2202AF6D37F4A40 +:1060E00048B1022807D0072916D2DFE801F01506CB +:1060F000080A0C0E100000210AE01B2108E03A21DA +:1061000006E0582104E0772102E0962100E0B52165 +:1061100051701070002010BD072010BD6F4810B5E1 +:106120004078ECF79CFD80B210BD10B5202811D24C +:10613000674991F82D30A1F1800202EB831414F825 +:1061400010303BB191F82D3002EB831212F8102081 +:10615000012A01D0002010BD91F82D200146002019 +:10616000FFF782FC012010BD10B5ECF706FDBDE87D +:106170001040ECF774BD2DE9F0410E46544F017804 +:106180002025803F0C4607EB831303E0254603EBF5 +:1061900045046478944202D0202CF7D108E0202CEA +:1061A00006D0A14206D103EB41014978017007E016 +:1061B000002085E403EB440003EB45014078487080 +:1061C000494F7EB127B1002140F22D40AFF300804E +:1061D0003078A04206D127B100214FF48660AFF39A +:1061E0000080357027B1002140F23540AFF30080C8 +:1061F000012065E410B542680B689A1A1202D417A0 +:1062000002EB1462121216D4497A91B1427A82B921 +:10621000364A006852F82110126819441044001DD3 +:10622000891C081A0002C11700EB11600012322805 +:1062300001DB012010BD002010BD2DE9F047294EE3 +:10624000814606F500709846144600EB811712E06F +:1062500006EB0415291D4846FFF7CCFF68B988F8FE +:106260000040A97B99F80A00814201D80020DEE4B1 +:1062700007EB44004478202CEAD10120D7E42DE933 +:10628000F047824612480E4600EB8600DFF8548045 +:1062900090F825402020107008F5007099461546AA +:1062A00000EB86170BE000BF08EB04105146001D01 +:1062B000FFF7A0FF28B107EB44002C704478202C96 +:1062C000F2D1297889F800104B46224631460FE07A +:1062D000040B0020FFFF3F00000000009A00002098 +:1062E00000F500408408002000000000CC6202009D +:1062F0005046BDE8F047A0E72DE9FC410F460446B3 +:106300000025FE4E10E000BF9DF80000256806EB5A +:1063100000108168204600F0E1FD2068A84202D10B +:106320000020BDE8FC8101256B4601AA39462046C4 +:10633000FFF7A5FF0028E7D02846F2E770B504462E +:10634000EF480125A54300EB841100EB85104022A6 +:10635000F8F773F8EB4E26B1002140F29D40AFF301 +:106360000080E748803000EB850100EB8400D0F826 +:106370002500C1F8250026B1002140F2A140AFF36D +:106380000080284670BD8A4203D003460520FFF7EF +:1063900099BB202906D0DA4A02EB801000EB4100BD +:1063A00040787047D649803101EB800090F8250095 +:1063B0007047D24901EB0010001DFFF7DEBB7CB532 +:1063C0001D46134604460E4600F1080221461846B3 +:1063D000ECF752FC94F908000F2804DD1F382072F6 +:1063E0002068401C206096B10220C74951F8261051 +:1063F000461820686946801B20F07F40206094F991 +:1064000008002844C01C1F2803DA012009E00420EA +:10641000EBE701AAECF730FC9DF8040010B10098FE +:10642000401C00900099206831440844C01C20F0B2 +:106430007F4060607CBDFEB50C46064609786079F9 +:10644000907220791F461546507279B12179002249 +:106450002846A368FFF7B3FFA9492846803191F881 +:106460002E20202A0AD00969491D0DE0D4E9022313 +:10647000217903B02846BDE8F040A0E7A349497858 +:10648000052900D20521314421F07F4100F026FD8D +:1064900039462846FFF730FFD4E9023221796846B1 +:1064A000FFF78DFF2B4600213046019A00F002FDD8 +:1064B000002806D103B031462846BDE8F04000F080 +:1064C0000DBDFEBD2DE9F14F84B000F0C3FCF0B16D +:1064D00000270498007800284FF000006DD1884D07 +:1064E000884C82468346803524B1002140F2045016 +:1064F000AFF3008095F82D8085F823B0002624B1F5 +:10650000002140F20950AFF3008017B105E00127E8 +:10651000DFE74046FFF712FF804624B1002140F23A +:106520001150AFF30080ECF728FB814643466A46E2 +:106530000499FFF780FF24B1002140F21750AFF318 +:10654000008095F82E0020280CD029690098401A68 +:106550000002C21700EB1260001203D5684600F07B +:10656000BDFC01264CB1002140F22150AFF3008068 +:10657000002140F22650AFF300806B46644A0021B0 +:10658000484600F097FC98B127B941466846FFF7A6 +:10659000B3FE064326B16846FFF7EFFA0499886018 +:1065A0004FF0010A24B1002140F23A50AFF30080CD +:1065B00095F82300002897D1504605B073E42DE9E3 +:1065C000F04F89B08B46824600F044FC4C4C80343E +:1065D00030B39BF80000002710B1012800D0FFDF86 +:1065E000484D25B1002140F2F950AFF300804349F6 +:1065F000012001EB0A18A946CDF81C005FEA090644 +:1066000004D0002140F20160AFF30080079800F051 +:1066100018FC94F82D50002084F8230067B119E08D +:1066200094F82E000127202800D1FFDF9BF80000FE +:106630000028D5D0FFDFD3E72846FFF77FFE0546C9 +:1066400026B1002140F20B60AFF3008094F82300E4 +:106650000028D3D126B1002140F21560AFF30080AD +:10666000ECF78BFA2B4602AA59460790FFF7E3FE98 +:1066700098F80F005FEA060900F001008DF813009A +:1066800004D0002140F21F60AFF300803B462A4651 +:1066900002A9CDF800A0079800F02BFC064604EBF9 +:1066A000850090F828000090B9F1000F04D0002177 +:1066B00040F22660AFF3008000F0B8FB0790B9F11C +:1066C000000F04D0002140F22C60AFF3008094F85A +:1066D0002300002892D1B9F1000F04D0002140F22C +:1066E0003460AFF300800DF1080C9CE80E00C8E99F +:1066F0000112C8F80C30BEB30CE000008408002082 +:10670000840A002000000000CC6202009A000020F1 +:10671000FFFF3F005FEA090604D0002140F241601C +:10672000AFF300800098B84312D094F82E002028D0 +:106730000ED126B1002140F24660AFF3008028461A +:10674000FFF7CEFB20B99BF80000D8B3012849D051 +:10675000B9F1000F04D0002140F26360AFF3008074 +:10676000284600F05CFB01265FEA090504D0002101 +:1067700040F26C60AFF30080079800F062FB25B137 +:1067800000214FF4CE60AFF300808EB194F82D005D +:1067900004EB800090F82600202809D025B10021C4 +:1067A00040F27760AFF30080F7484078ECF7ACFB3D +:1067B00025B1002140F27C60AFF3008009B0304683 +:1067C000BDE8F08FFFE7B9F1000F04D0002140F2DF +:1067D0004E60AFF3008094F82D2051460420FFF75F +:1067E00043F9C0E7002E3FF409AF002140F25960A1 +:1067F000AFF3008002E72DE9F84FE44D814695F8AC +:106800002D004FF00008E24C4FF0010B474624B139 +:10681000002140F28A60AFF30080584600F011FB7F +:1068200085F8237024B1002140F28F60AFF300801F +:1068300095F82D00FFF782FD064695F8230028B154 +:10684000002CE4D0002140F295604BE024B10021FF +:1068500040F29960AFF30080CC48803800EB86119D +:1068600011F81900032856D1334605EB830A4A462E +:106870009AF82500904201D1012000E0002000900C +:106880000AF125000021FFF776FC0146009801423D +:1068900003D001228AF82820AF77E1B324B1002188 +:1068A00040F29E60AFF30080324649460120FFF778 +:1068B000DBF89AF828A024B1002140F2A960AFF3D8 +:1068C000008000F0B3FA834624B1002140F2AE60AC +:1068D000AFF3008095F8230038B1002C97D0002149 +:1068E00040F2B260AFF3008091E7BAF1000F07D039 +:1068F00095F82E00202803D13046FFF7F1FAE0B1D9 +:1069000024B1002140F2C660AFF30080304600F0B1 +:1069100086FA4FF0010824B1002140F2CF60AFF3B6 +:106920000080584600F08DFA24B1002140F2D36077 +:10693000AFF300804046BDE8F88F002CF1D0002175 +:1069400040F2C160AFF30080E6E70120ECF750B8F9 +:106950008D48007870472DE9F0418C4C94F82E005A +:1069600020281FD194F82D6004EB860797F8255056 +:10697000202D00D1FFDF8549803901EB861000EB27 +:106980004500407807F8250F0120F87084F82300AF +:10699000294684F82E50324602202234FFF764F84C +:1069A0000020207005E42DE9F0417A4E774C012556 +:1069B00038B1012821D0022879D003287DD0FFDF0B +:1069C00017E400F05FFAFFF7C6FF207E00B1FFDF9B +:1069D00084F821500020ECF732F8A168481C04D05C +:1069E000012300221846ECF77DF814F82E0F2178C9 +:1069F00006EB01110A68012154E0FFF7ACFF01200A +:106A0000ECF71DF894F8210050B1A068401C07D0A5 +:106A100014F82E0F217806EB01110A68062141E0D7 +:106A2000207EDFF86481002708F10208012803D0E6 +:106A300002281ED0FFDFB5E7A777ECF7EEF898F84D +:106A40000000032801D165772577607D524951F810 +:106A5000200094F8201051B948B161680123091A47 +:106A600000221846ECF73EF8022020769AE72776B7 +:106A700098E784F8205000F005FAA07F50B198F80C +:106A8000010061680123091A00221846ECF72AF870 +:106A9000257600E0277614F82E0F217806EB0111F9 +:106AA0000A680021BDE8F041104700E005E03648E3 +:106AB0000078BDE8F041ECF727BAFFF74CFF14F877 +:106AC0002E0F217806EB01110A680521EAE710B5BF +:106AD0002E4C94F82E00202800D1FFDF14F82E0F42 +:106AE00021782C4A02EB01110A68BDE8104004210C +:106AF00010477CB5254C054694F82E00202800D17F +:106B0000FFDFA068401C00D0FFDF94F82E00214971 +:106B100001AA01EB0010694690F90C002844ECF73B +:106B2000ABF89DF904000F2801DD012000E00020F2 +:106B3000009908446168084420F07F41A16094F8FE +:106B40002100002807D002B00123BDE870400022D8 +:106B50001846EBF7C7BF7CBD30B5104A0B1A541C62 +:106B6000B3EB940F1ED3451AB5EB940F1AD393428F +:106B700003D9101A43185B1C14E0954210D9511A1E +:106B80000844401C43420DE098000020040B002004 +:106B90000000000084080020CC620200FF7F841EF9 +:106BA000FFDF0023184630BD0123002201460220EA +:106BB000EBF798BF0220EBF742BFEBF7DEBF2DE902 +:106BC000FE4FEE4C05468A4694F82E00202800D150 +:106BD000FFDFEA4E94F82E10A0462046A6F520725C +:106BE00002EB011420218DF8001090F82D10376968 +:106BF00000EB8101D8F8000091F82590284402AA02 +:106C000001A90C36ECF738F89DF90800002802DDE0 +:106C10000198401C0190A0680199642D084452D34A +:106C2000D74B00225B1B72EB02014CD36168411A07 +:106C300021F07F41B1F5800F45D220F07F40706098 +:106C400086F80AA098F82D1044466B464A4630460E +:106C5000FFF7F3FAB0B3A068401C10D0EBF78DFF3C +:106C6000A168081A0002C11700EB11600012022887 +:106C70002BDD0120EBF7E3FE4FF0FF30A06094F82E +:106C80002D009DF8002020210F34FFF77CFBA17F11 +:106C9000BA4A803A02EB8111E27F01EB420148706F +:106CA00054F80F0C284444F80F0C012020759DF86F +:106CB0000000202803D0B3484078ECF725F90120E4 +:106CC000BDE8FE8F01E00020FAE77760FBE72DE9E1 +:106CD000F047AA4C074694F82D00A4F1800606EB75 +:106CE000801010F8170000B9FFDF94F82D50A0466F +:106CF000A54C24B1002140F6EA00AFF3008040F635 +:106D0000F60940F6FF0A06EB851600BF16F81700D5 +:106D1000012819D0042811D005280FD006280DD03D +:106D20001CB100214846AFF300800FF02DF8002C75 +:106D3000ECD000215046AFF30080E7E72A46394601 +:106D40000120FEF791FEF2E74FF0010A4FF0000933 +:106D5000454624B1002140F60610AFF300805046AE +:106D600000F06FF885F8239024B1002140F60B1055 +:106D7000AFF3008095F82D00FFF7E0FA064695F88E +:106D8000230028B1002CE4D0002140F611101FE0B0 +:106D900024B1002140F61510AFF3008005EB86000A +:106DA00000F1270133463A462630FFF7E4F924B1D3 +:106DB000002140F61910AFF3008000F037F882464A +:106DC00095F8230038B1002CC3D0002140F61F10E5 +:106DD000AFF30080BDE785F82D60012085F8230022 +:106DE000504600F02EF8002C04D0002140F62C1064 +:106DF000AFF30080BDE8F08730B504465F480D462C +:106E000090F82D005D49803901EB801010F81400D6 +:106E100000B9FFDF5D4800EB0410C57330BD574972 +:106E200081F82D00012081F82300704710B55848E3 +:106E300008B1AFF30080EFF3108000F0010072B6EC +:106E400010BD10B5002804D1524808B1AFF300803E +:106E500062B610BD50480068C005C00D10D0103893 +:106E600040B2002804DB00F1E02090F8000405E0C7 +:106E700000F00F0000F1E02090F8140D4009704779 +:106E80000820704710B53D4C94F82400002804D128 +:106E9000F4F712FF012084F8240010BD10B5374C20 +:106EA00094F82400002804D0F4F72FFF002084F881 +:106EB000240010BD10B51C685B68241A181A24F051 +:106EC0007F4420F07F40A14206D8B4F5800F03D262 +:106ED000904201D8012010BD002010BDD0E9003241 +:106EE000D21A21F07F43114421F07F41C0E90031E3 +:106EF00070472DE9FC418446204815468038089C9F +:106F000000EB85160F4616F81400012804D002285D +:106F100002D00020BDE8FC810B46204A01216046DA +:106F2000FFF7C8FFF0B101AB6A4629463846FFF7C4 +:106F3000A6F9B8B19DF804209DF800102846FFF787 +:106F400022FA06EB440148709DF8000020280DD07D +:106F500006EB400044702A4621460320FEF784FDDC +:106F60000120D7E72A4621460420F7E703480121FC +:106F700000EB850000F8254FC170ECE7040B002002 +:106F8000FF1FA107980000200000000084080020D7 +:106F9000000000000000000004ED00E0FFFF3F00E3 +:106FA0002DE9F041044680074FF000054FF001063F +:106FB0000CD56B480560066000F0E8F920B169481F +:106FC000016841F48061016024F00204E0044FF0A4 +:106FD000FF3705D564484660C0F8087324F4805430 +:106FE000600003D56148056024F08044E0050FD5BA +:106FF0005F48C0F80052C0F808735E490D60091D73 +:107000000D605C4A04210C321160066124F4807426 +:10701000A00409D558484660C0F80052C0F808736B +:107020005648056024F40054C4F38030C4F3C031E2 +:10703000884200D0FFDF14F4404F14D0504846601F +:10704000C0F808734F488660C0F80052C0F8087353 +:107050004D490D600A1D16608660C0F808730D600A +:10706000166024F4404420050AD5484846608660EE +:10707000C0F80873C0F848734548056024F40064FC +:107080000DF070FD4348044200D0FFDFBDE8F08101 +:10709000F0B50022202501234FEA020420FA02F174 +:1070A000C9072DD051B2002910DB00BF4FEA51179C +:1070B0004FEA870701F01F0607F1E02703FA06F6FB +:1070C000C7F88061BFF34F8FBFF36F8F0CDB00BF3A +:1070D0004FEA51174FEA870701F01F0607F1E02733 +:1070E00003FA06F6C7F8806204DB01F1E02181F8BB +:1070F000004405E001F00F0101F1E02181F8144D99 +:1071000002F10102AA42C9D3F0BD10B5224C2060A1 +:107110000846F4F7EAFE2068FFF742FF2068FFF711 +:10712000B7FF0DF045F900F092F90DF01BFD0DF0E1 +:1071300058FCEBF7B5FEBDE810400DF0EDB910B509 +:10714000154C2068FFF72CFF2068FFF7A1FF0DF01A +:1071500009FDF4F7C9FF0020206010BD0A20704728 +:10716000FC1F00403C17004000C0004004E5014007 +:10717000008000400485004000D0004004D500405D +:1071800000E0004000F0004000F5004000B000408A +:1071900008B50040FEFF0FFD9C00002070B5264999 +:1071A0000A680AB30022154601244B685B1C4B6039 +:1071B0000C2B00D34D600E7904FA06F30E681E42C4 +:1071C0000FD0EFF3108212F0010272B600D001224C +:1071D0000C689C430C6002B962B6496801600020EB +:1071E00070BD521C0C2AE0D3052070BD4FF0E02189 +:1071F0004FF48000C1F800027047EFF3108111F0E6 +:10720000010F72B64FF0010202FA00F20A48036859 +:1072100042EA0302026000D162B6E7E706480021B5 +:1072200001604160704701218140034800680840C7 +:1072300000D0012070470000A0000020012081073D +:10724000086070470121880741600021C0F80011E3 +:1072500018480170704717490120087070474FF0B7 +:107260008040D0F80001012803D01248007800289F +:1072700000D00120704710480068C00700D00120EE +:1072800070470D480C300068C00700D001207047DF +:107290000948143000687047074910310A68D20362 +:1072A00006D5096801F00301814201D10120704730 +:1072B00000207047A8000020080400404FF08050D4 +:1072C000D0F830010A2801D0002070470120704713 +:1072D00000B5FFF7F3FF20B14FF08050D0F8340134 +:1072E00008B1002000BD012000BD4FF08050D0F853 +:1072F00030010E2801D000207047012070474FF068 +:107300008050D0F83001062803D0401C01D0002066 +:107310007047012070474FF08050D0F830010D28A1 +:1073200001D000207047012070474FF08050D0F806 +:107330003001082801D000207047012070474FF02D +:107340008050D0F83001102801D000207047012073 +:10735000704700B5FFF7F3FF30B9FFF7DCFF18B94E +:10736000FFF7E3FF002800D0012000BD00B5FFF7C4 +:10737000C6FF38B14FF08050D0F83401062803D34F +:10738000401C01D0002000BD012000BD00B5FFF76A +:10739000B6FF48B14FF08050D0F83401062803D32F +:1073A000401C01D0012000BD002000BD0021017063 +:1073B000084670470146002008707047EFF31081BF +:1073C00001F0010172B60278012A01D0012200E029 +:1073D00000220123037001B962B60AB10020704790 +:1073E0004FF400507047E9E7EFF3108111F0010FFF +:1073F00072B64FF00002027000D162B600207047F2 +:10740000F2E700002DE9F04115460E46044600273C +:1074100000F0EBF8A84215D3002341200FE000BF95 +:1074200094F84220A25CF25494F84210491CB1FB3B +:10743000F0F200FB12115B1C84F84210DBB2AB428D +:10744000EED3012700F0DDF83846BDE8F08172493F +:1074500010B5802081F800047049002081F84200B6 +:1074600081F84100433181F8420081F84100433105 +:1074700081F8420081F841006948FFF797FF6848AA +:10748000401CFFF793FFEBF793FCBDE8104000F0C2 +:10749000B8B840207047614800F0A7B80A460146D6 +:1074A0005E48AFE7402070475C48433000F09DB82D +:1074B0000A46014659484330A4E7402101700020A4 +:1074C000704710B504465548863000F08EF820709D +:1074D000002010BD0A460146504810B58630FFF71F +:1074E00091FF08B1002010BD42F2070010BD70B539 +:1074F0000C460646412900D9FFDF4A48006810388B +:1075000040B200F054F8C5B20D2000F050F8C0B2FF +:10751000854201D3012504E0002502E00DB1EBF71F +:107520008AFC224631463D48FFF76CFF0028F5D023 +:1075300070BD2DE9F0413A4F0025064617F10407CA +:1075400057F82540204600F041F810B36D1CEDB20D +:10755000032DF5D33148433000F038F8002825D00A +:107560002E4800F033F8002820D02C48863000F058 +:107570002DF800281AD0EBF734FC2948FFF71EFF3E +:10758000B0F5005F00D0FFDFBDE8F0412448FFF711 +:107590002BBF94F841004121265414F8410F401CA0 +:1075A000B0FBF1F201FB12002070D3E74DE7002899 +:1075B00004DB00F1E02090F8000405E000F00F008B +:1075C00000F1E02090F8140D4009704710F8411FB9 +:1075D0004122491CB1FBF2F302FB131140788142B6 +:1075E00001D1012070470020704710F8411F4078FA +:1075F000814201D3081A02E0C0F141000844C0B240 +:10760000704710B50648FFF7D9FE002803D1BDE842 +:107610001040EBF7D1BB10BD0DE000E0340B0020B3 +:10762000AC00002004ED00E070B5154D2878401C3A +:10763000C4B26878844202D000F0DBFA2C7070BDCE +:107640002DE9F0410E4C4FF0E02600BF00F0C6FAE5 +:107650000EF09AFB40BF20BF677820786070D6F8A4 +:107660000052E9F798FE854305D1D6F8040210B917 +:107670002078B842EAD000F0ACFA0020BDE8F081F2 +:10768000BC0000202DE9F04101264FF0E02231033B +:107690004FF000084046C2F88011BFF34F8FBFF390 +:1076A0006F8F204CC4F800010C2000F02EF81E4D06 +:1076B0002868C04340F30017286840F01000286095 +:1076C000C4F8046326607F1C02E000BF0EF05CFB80 +:1076D000D4F800010028F9D01FB9286820F0100064 +:1076E0002860124805686660C4F80863C4F8008121 +:1076F0000C2000F00AF82846BDE8F08110B50446D9 +:10770000FFF7C0FF2060002010BD002809DB00F05B +:107710001F02012191404009800000F1E020C0F8E3 +:107720008012704700C0004010ED00E008C5004026 +:107730002DE9F047FF4C0646FF21A06800EB06123A +:1077400011702178FF2910D04FF0080909EB0111C1 +:1077500009EB06174158C05900F0F4F9002807DD7D +:10776000A168207801EB061108702670BDE8F0874B +:1077700094F8008045460DE0A06809EB05114158DA +:10778000C05900F0DFF9002806DCA068A84600EB2D +:1077900008100578FF2DEFD1A06800EB061100EB73 +:1077A00008100D700670E1E7F0B5E24B04460020CA +:1077B00001259A680C269B780CE000BF05EB0017AA +:1077C000D75DA74204D106EB0017D7598F4204D0EA +:1077D000401CC0B28342F1D8FF20F0BD70B5FFF766 +:1077E000ECF9D44C08252278A16805EB02128958DF +:1077F00000F0A8F9012808DD2178A06805EB011147 +:107800004058BDE87040FFF7CFB9FFF7A1F8BDE8D9 +:107810007040EBF779BB2DE9F041C64C2578FFF7B6 +:10782000CCF9FF2D6ED04FF00808A26808EB0516C2 +:10783000915900F087F90228A06801DD80595DE0C8 +:1078400000EB051109782170022101EB0511425C62 +:107850005AB1521E4254815901F5800121F07F41F5 +:1078600081512846FFF764FF34E00423012203EB33 +:10787000051302EB051250F803C0875CBCF1000F42 +:1078800010D0BCF5007F10D9CCF3080250F806C028 +:107890000CEB423C2CF07F4C40F806C0C3589A1ABF +:1078A000520A09E0FF2181540AE0825902EB4C326E +:1078B00022F07F428251002242542846FFF738FFCF +:1078C0000C21A06801EB05114158E06850F8272011 +:1078D000384690472078FF2814D0FFF76EF92278B9 +:1078E000A16808EB02124546895800F02BF90128DF +:1078F00093DD2178A06805EB01114058BDE8F04107 +:10790000FFF752B9BDE8F081F0B51D4614460E46AA +:107910000746FF2B00D3FFDFA00700D0FFDF85481D +:10792000FF210022C0E90247C57006710170427054 +:1079300082701046012204E002EB0013401CE15467 +:10794000C0B2A842F8D3F0BD70B57A4C064665784F +:107950002079854200D3FFDFE06840F82560607839 +:10796000401C6070284670BD2DE9FF5F1D468B46A8 +:107970000746FF24FFF721F9DFF8B891064699F88A +:107980000100B84200D8FFDF00214FF001084FF09E +:107990000C0A99F80220D9F808000EE008EB011350 +:1079A000C35CFF2B0ED0BB4205D10AEB011350F88C +:1079B00003C0DC450CD0491CC9B28A42EED8FF2C6A +:1079C00002D00DE00C46F6E799F803108A4203D185 +:1079D000FF2004B0BDE8F09F1446521C89F8022035 +:1079E00008EB04110AEB0412475440F802B00421DA +:1079F000029B0022012B01EB04110CD040F8012066 +:107A00004FF4007808234FF0020C454513D9E905DF +:107A1000C90D02D002E04550F2E7414606EB413283 +:107A200003EB041322F07F42C250691A0CEB0412DC +:107A3000490A81540BE005B9012506EB453103EBFA +:107A4000041321F07F41C1500CEB0411425499F80A +:107A500000502046FFF76CFE99F80000A84201D0C4 +:107A6000FFF7BCFE3846B4E770B50C460546FFF795 +:107A7000A4F8064621462846FFF796FE0446FF284E +:107A80001AD02C4D082101EB0411A868415830464A +:107A900000F058F800F58050C11700EBD1404013BA +:107AA0000221AA6801EB0411515C09B100EB4120ED +:107AB000002800DC012070BD002070BD2DE9F047DA +:107AC00088468146FFF770FE0746FF281BD0194DF8 +:107AD0002E78A8683146344605E0BC4206D02646DA +:107AE00000EB06121478FF2CF7D10CE0FF2C0AD023 +:107AF000A6420CD100EB011000782870FF2804D0BA +:107B0000FFF76CFE03E0002030E6FFF753F8414634 +:107B10004846FFF7A9FF0123A968024603EB0413B7 +:107B2000FF20C854A878401EB84200D1A87001EBCD +:107B3000041001E0000C002001EB06110078087031 +:107B4000104613E6081A0002C11700EB116000127C +:107B50007047000010B5202000F07FF8202000F0D2 +:107B60008DF84D49202081F80004E9F712FC4B49BB +:107B700008604B48D0F8041341F00101C0F8041329 +:107B8000D0F8041341F08071C0F804134249012079 +:107B90001C39C1F8000110BD10B5202000F05DF8BF +:107BA0003E480021C8380160001D01603D4A481E62 +:107BB00010603B4AC2F80803384B1960C2F8000154 +:107BC000C2F8600138490860BDE81040202000F08C +:107BD00055B834493548091F086070473149334862 +:107BE000086070472D48C8380160001D521E0260B1 +:107BF00070472C4901200860BFF34F8F70472DE973 +:107C0000F0412849D0F8188028480860244CD4F85E +:107C100000010025244E6F1E28B14046E9F712FBF3 +:107C200040B9002111E0D4F8600198B14046E9F76D +:107C300009FB48B1C4F80051C4F860513760BDE891 +:107C4000F041202000F01AB831684046BDE8F0410C +:107C50000EF0A4B8FFDFBDE8F08100280DDB00F0D6 +:107C60001F02012191404009800000F1E020C0F88E +:107C70008011BFF34F8FBFF36F8F7047002809DB70 +:107C800000F01F02012191404009800000F1E02036 +:107C9000C0F880127047000020E000E0C8060240F3 +:107CA00000000240180502400004024001000001EB +:107CB0005E4800210170417010218170704770B5DD +:107CC000054616460C460220EAF714FE57490120E5 +:107CD00008705749F01E086056480560001F046090 +:107CE00070BD10B50220EAF705FE5049012008706A +:107CF00051480021C0F80011C0F80411C0F8081163 +:107D00004E494FF40000086010BD48480178D9B1D1 +:107D10004B4A4FF4000111604749D1F8003100226D +:107D2000002B1CBFD1F80431002B02D0D1F8081170 +:107D300019B142704FF0100104E04FF001014170A1 +:107D400040490968817002704FF00000EAF7D2BD27 +:107D500010B50220EAF7CEFD34480122002102705E +:107D60003548C0F80011C0F80411C0F808110260CD +:107D700010BD2E480178002904BF407870472E4876 +:107D8000D0F80011002904BF02207047D0F800117C +:107D900000291CBFD0F80411002905D0D0F8080133 +:107DA000002804BF01207047002070471F4800B51D +:107DB0000278214B4078C821491EC9B282B1D3F85C +:107DC00000C1BCF1000F10D0D3F8000100281CBF87 +:107DD000D3F8040100280BD0D3F8080150B107E014 +:107DE000022802D0012805D002E00029E4D1FFDFFB +:107DF000002000BD012000BD0C480178002904BF0F +:107E0000807870470C48D0F8001100291CBFD0F8CA +:107E10000411002902D0D0F8080110B14FF0100071 +:107E2000704708480068C0B270470000BE000020DC +:107E300010F5004008F5004000F0004004F5014056 +:107E400008F5014000F400405748002101704170DE +:107E5000704770B5064614460D460120EAF74AFD04 +:107E600052480660001D0460001D05605049002056 +:107E7000C1F850014F490320086050494E4808603E +:107E8000091D4F48086070BD2DE9F0410546464880 +:107E90000C46012606704B4945EA024040F08070CE +:107EA0000860FFF72CFA002804BF47480460002749 +:107EB000464CC4F80471474945480860002D02BF8C +:107EC000C4F800622660BDE8F081012D18BFFFDF15 +:107ED000C4F80072266041493F480860BDE8F0815F +:107EE0003148017871B13B4A394911603749D1F8BD +:107EF00004210021002A08BF417002D0384A1268CC +:107F0000427001700020EAF7F5BC2748017800298B +:107F100004BF407870472D48D0F80401002808BFFE +:107F200070472F480068C0B27047002808BF7047EC +:107F30002DE9F0471C480078002808BFFFDF234CDC +:107F4000D4F80401002818BFBDE8F0874FF00209FB +:107F5000C4F80493234F3868C0F30018386840F021 +:107F600010003860D4F80401002804BF4FF4004525 +:107F70004FF0E02608D100BFC6F880520DF004FF94 +:107F8000D4F804010028F7D0B8F1000F03D1386805 +:107F900020F010003860C4F80893BDE8F0870B4962 +:107FA0000120886070470000C100002008F50040F3 +:107FB000001000401CF500405011004098F50140B1 +:107FC0000CF0004004F5004018F5004000F00040BF +:107FD0000000020308F501400000020204F5014020 +:107FE00000F4004010ED00E0012804BF41F6A47049 +:107FF0007047022804BF41F288307047042804BF4C +:1080000046F218007047082804BF47F2A0307047B6 +:1080100000B5FFDF41F6A47000BD10B5FE48002496 +:1080200001214470047044728472C17280F825404A +:10803000C462846380F83C4080F83D40FF2180F8B2 +:108040003E105F2180F83F1018300DF09FFFF3497C +:10805000601E0860091D0860091D0C60091D08608C +:10806000091D0C60091D0860091D0860091D0860D4 +:10807000091D0860091D0860091D0860091D0860C8 +:10808000091D0860091D086010BDE549486070477A +:10809000E448016801F00F01032904BF0120704783 +:1080A000016801F00F01042904BF02207047016834 +:1080B00001F00F01052904D0006800F00F00062828 +:1080C00007D1D948006810F0060F0CBF0820042023 +:1080D000704700B5FFDF012000BD012812BF022854 +:1080E00000207047042812BF08284FF4C87070475A +:1080F00000B5FFDF002000BD012804BF2820704725 +:10810000022804BF18207047042812BF08284FF423 +:10811000A870704700B5FFDF282000BD70B5C148CA +:10812000016801F00F01032908BF012414D0016880 +:1081300001F00F01042904BF022418210DD00168A9 +:1081400001F00F0105294BD0006800F00F00062850 +:108150001CBFFFDF012443D02821AF48C26A806AD8 +:10816000101A0E18082C04BF4EF6981547F2A030CE +:108170002DD02046042C08BF4EF628350BD0012800 +:1081800008BF41F6A47506D0022C1ABFFFDF41F6E6 +:10819000A47541F28835012C08BF41F6A47016D0B1 +:1081A000022C08BF002005D0042C1ABFFFDF0020DE +:1081B0004FF4C8702D1A022C08BF41F2883006D047 +:1081C000042C1ABFFFDF41F6A47046F21800281AEB +:1081D0004FF47A7100F2E730B0FBF1F0304470BD3B +:1081E0009148006810F0060F0CBF082404244FF4D7 +:1081F000A871B2E710B58D49026801F118040A634D +:1082000042684A63007A81F83800207E48B1207FB6 +:10821000F6F781F9A07E011C18BF0121207FF6F737 +:1082200069F9607E002808BF10BD607FF6F773F91A +:10823000E07E011C18BF0121607FBDE81040F6F709 +:1082400059B930B50024054601290AD0022908BFD2 +:108250004FF0807405D0042916BF08294FF0C74499 +:10826000FFDF44F4847040F480107149086045F4E5 +:10827000403001F1040140F00070086030BD30B5BD +:108280000024054601290AD0022908BF4FF0807456 +:1082900005D0042916BF08294FF0C744FFDF44F476 +:1082A000847040F480106249086045F4403001F168 +:1082B000040140F0007008605E48D0F8000100281A +:1082C00018BFFFDF30BD2DE9F04102274FF0E02855 +:1082D00001250024C8F88071BFF34F8FBFF36F8F63 +:1082E000554804600560FFF751F8544E18B13068E6 +:1082F00040F480603060FFF702F838B1306820F059 +:10830000690040F0960040F0004030604D494C4814 +:1083100008604FF01020806CB0F1FF3F04D04A4954 +:108320000A6860F317420A60484940F25B600860DF +:10833000091F40F203100860081F05603949032037 +:10834000086043480560444A42491160444A434931 +:108350001160121F43491160016821F440710160EE +:10836000016841F480710160C8F8807231491020C1 +:10837000C1F80403284880F83140C46228484068A6 +:10838000002808BFBDE8F081BDE8F0410047274A5A +:108390000368C2F81A308088D08302F11800017295 +:1083A00070471D4B10B51A7A8A4208D10146062241 +:1083B000981CF6F715F8002804BF012010BD002016 +:1083C00010BD154890F825007047134A5170107081 +:1083D0007047F0B50546800000F1804000F5805000 +:1083E0008B88C0F820360B78D1F8011043EA0121C0 +:1083F000C0F8001605F10800012707FA00F61A4C2C +:10840000002A04BF2068B04304D0012A18BFFFDF50 +:1084100020683043206029E0280C0020000E004036 +:10842000C40000201015004014140040100C00205F +:108430001415004000100040FC1F00403C17004095 +:108440002C000089781700408C150040381500403A +:108450005016004000000E0408F501404080004026 +:10846000A4F501401011004040160040206807FAB2 +:1084700005F108432060F0BD0CF0C4BCFE4890F844 +:1084800032007047FD4AC17811600068FC49000263 +:1084900008607047252808BF02210ED0262808BF93 +:1084A0001A210AD0272808BF502106D00A2894BFD5 +:1084B0000422062202EB4001C9B2F24A1160F249DD +:1084C000086070472DE9F047EB4CA17A012956D09E +:1084D000022918BFBDE8F087627E002A08BFBDE808 +:1084E000F087012950D0E17E667F0D1C18BF012561 +:1084F0005FF02401DFF894934FF00108C9F84C8035 +:10850000DFF88CA34718DAF80000B84228BFFFDF75 +:108510000020C9F84C01CAF80070300285F0010152 +:1085200040EA015040F0031194F82000820002F16B +:10853000804202F5C042C2F81015D64901EB800115 +:10854000A07FC20002F1804202F5F832C2F8141591 +:10855000D14BC2F81035E27FD30003F1804303F51D +:10856000F833C3F81415CD49C3F8101508FA00F014 +:1085700008FA02F10843CA490860BDE8F087227E84 +:10858000002AAED1BDE8F087A17E267F002914BF66 +:10859000012500251121ADE72DE9F041C14E8046AE +:1085A00003200D46C6F80002BD49BF4808602846B2 +:1085B0000CF02CFCB04F0124B8F1000F04BFBC72CA +:1085C000346026D0B8F1010F23D1B848006860B9F3 +:1085D00015F00C0F09D0C6F80443012000F0DAFEB4 +:1085E000F463346487F83C4002E0002000F0D2FEDF +:1085F00028460CF0F3FC0220B872FEF7B7FE38B93B +:10860000FEF7C4FE20B9AA48016841F4C021016008 +:1086100074609E48C4649E4800682946BDE8F041E5 +:1086200050E72DE9F0479F4E814603200D46C6F8DE +:108630000002DFF86C829C48C8F8000008460CF085 +:10864000E5FB28460CF0CAFC01248B4FB9F1000F62 +:1086500003D0B9F1010F0AD031E0BC72B86B40F41D +:108660008010B8634FF48010C8F8000027E00220A3 +:10867000B872B86B40F40010B8634FF40010C8F83B +:1086800000008A48006860B915F00C0F09D0C6F8E0 +:108690000443012000F07EFEF463346487F83C401C +:1086A00002E0002000F076FEFEF760FE38B9FEF72B +:1086B0006DFE20B97E48016841F4C0210160EAF7EF +:1086C000F7FA2946BDE8F047FCE62DE9F84F754C6E +:1086D0008246032088461746C4F80002DFF8C0919E +:1086E0007148C9F8000010460CF090FBDFF8C4B1E7 +:1086F000614E0125BAF1000F04BFCBF80040B572FE +:1087000004D0BAF1010F18BFFFDF2FD06A48C0F8BC +:1087100000806B4969480860B06B40F40020B0638A +:10872000D4F800321021C4F808130020C4F8000265 +:10873000DFF890C18A03CCF80020C4F80001C4F827 +:108740000C01C4F81001C4F80401C4F81401C4F801 +:1087500018015D4800680090C4F80032C9F8002094 +:10876000C4F80413BAF1010F14D026E038460CF017 +:1087700035FCFEF7FBFD38B9FEF708FE20B94C4882 +:10878000016841F4C02101605048CBF8000002208C +:10879000B072BBE74548006860B917F00C0F09D00C +:1087A000C4F80453012000F0F5FDE563256486F864 +:1087B0003C5002E0002000F0EDFD4FF40020C9F82D +:1087C00000003248C56432480068404528BFFFDFDA +:1087D00039464046BDE8F84F74E62DE9F041264C95 +:1087E0000646002594F8310017468846002808BF41 +:1087F000FFDF16B1012E16D021E094F831000128D8 +:1088000008D094F83020394640460CF014FBE16A59 +:10881000451814E094F830103A4640460CF049FBF5 +:10882000E16A45180BE094F8310094F83010012803 +:108830003A46404609D00CF064FBE16A45183A46D6 +:1088400029463046BDE8F0413FE70CF014FBE16AF1 +:108850004518F4E72DE9F84F124CD4F8000220F047 +:108860000309D4F804034FF0100AC0F30018C4F849 +:1088700008A300262CE00000280C0020241500404E +:108880001C150040081500405415004000800040B1 +:108890004C850040006000404C81004010110040B9 +:1088A00004F5014000100040000004048817004057 +:1088B00068150040ACF50140488500404881004003 +:1088C000A8F5014008F501401811004004100040CF +:1088D000C4F80062FC48FB490160FC4D0127A97AFD +:1088E000012902D0022903D015E0297E11B912E036 +:1088F000697E81B1A97FEA7F07FA01F107FA02F2E6 +:108900001143016095F82000800000F1804000F5DF +:10891000C040C0F81065FF208DF80000C4F8106159 +:10892000276104E09DF80000401E8DF800009DF8CE +:10893000000018B1D4F810010028F3D09DF8000011 +:10894000002808BFFFDFC4F81061002000F022FDFE +:108950006E72AE72EF72C4F80092B8F1000F18BFD9 +:10896000C4F804A3BDE8F88FFF2008B58DF8000017 +:10897000D7480021C0F810110121016105E000BFB6 +:108980009DF80010491E8DF800109DF8001019B1D7 +:10899000D0F810110029F3D09DF80000002808BF7E +:1089A000FFDF08BD0068CB4920F07F4008607047BA +:1089B0004FF0E0200221C0F8801100F5C070BFF335 +:1089C0004F8FBFF36F8FC0F80011704710B490E85D +:1089D0001C10C14981E81C10D0E90420C1E9042021 +:1089E00010BC70474FF0E0210220C1F80001704731 +:1089F000BA4908707047BA490860704770B50546B3 +:108A0000EAF756F9B14C2844E16A884298BFFFDF83 +:108A100001202074EAF74CF9B24A28440021606131 +:108A2000C2F84411B0490860A06BB04940F480001E +:108A3000A063D001086070BD70B5A44C0546AC4A77 +:108A40000220207410680E4600F00F00032808BFB3 +:108A5000012213D0106800F00F00042808BF022282 +:108A60000CD0106800F00F0005281BD0106800F033 +:108A70000F0006281CBFFFDF012213D094F831003D +:108A800094F83010012815D028460CF081FA954949 +:108A900060610020C1F844016169E06A08449249BC +:108AA000086070BD9348006810F0060F0CBF0822E4 +:108AB0000422E3E7334628460CF038FAE7E7824918 +:108AC0004FF4800008608148816B21F4800181634C +:108AD000002101747047C20002F1804202F5F832B1 +:108AE000854BC2F81035C2F81415012181407F482A +:108AF00001607648826B1143816370477948012198 +:108B00004160C1600021C0F84411774801606F489E +:108B1000C1627047794908606D48D0F8001241F091 +:108B20004001C0F8001270476948D0F8001221F0E7 +:108B30004001C0F800127149002008607047644885 +:108B4000D0F8001221F01001C0F80012012181615B +:108B500070475E49FF2081F83E005D480021C0F863 +:108B60001C11D0F8001241F01001C0F8001270473B +:108B7000574981B0D1F81C21012A0DD0534991F8F1 +:108B80003E10FF290DBF00204942017001B008BF0F +:108B90007047012001B07047594A126802F07F0205 +:108BA000524202700020C1F81C0156480068009033 +:108BB000EFE7F0B517460C00064608BFFFDF434D50 +:108BC00014F0010F2F731CBF012CFFDF002E0CBF10 +:108BD000012002206872EC7201281CBF0228FFDF0E +:108BE000F0BD3A4981F83F007047384A136C036082 +:108BF000506C086070472DE9F84F38480078042819 +:108C000028BFFFDF314CDFF8C080314D94F83C00C5 +:108C100000260127E0B1D5F8040110F1000918BFC2 +:108C20004FF00109D5F81001002818BF012050EAC3 +:108C300009014FF4002B17D08021C5F80813C8F89C +:108C400000B084F83C6090F0010F18BFBDE8F88FC9 +:108C5000DFF89090D9F84C01002871D0A07A012853 +:108C60006FD002286ED0D1E0D5F80001DFF890A0D7 +:108C700030B3C5F800616F61FF20009002E0401E34 +:108C8000009005D0D5F81C0100280098F7D000B955 +:108C9000FFDFDAF8000000F07F0A94F83F0050454B +:108CA0003CBF002000F076FB84F83EA0C5F81C61B4 +:108CB000C5F808731348006800902F64AF6326E07E +:108CC00022E0000000000E0408F50140280C0020FE +:108CD000001000403C150040100C0020C400002093 +:108CE00004150040008000404485004004F5014028 +:108CF000101500401414004004110040601500409D +:108D0000481500401C110040B9F1000F03D0B9F123 +:108D1000000F2ED05CE0DAF8000000F07F0084F84D +:108D20003E00C5F81C6194F83D1061B194F83F1005 +:108D300081421BD2002000F02DFB2F64AF6315E0B1 +:108D400064E04CE04EE0FE49096894F83F308AB296 +:108D5000090C984203D30F2A06D9022904D2012014 +:108D600000F018FB2F6401E02F64AF63F548006842 +:108D700000908022C5F80423F3498F64F348036808 +:108D8000A0F1040CDCF800C043F698273B4463458F +:108D900015D2026842F210731A440260C1F84861A9 +:108DA000EC49EB480860091FEB480860EB48C0F845 +:108DB00000B0A06B40F40020A063BDE8F88F06600F +:108DC000C1F84861C5F80823C8F800B0C1F8486187 +:108DD0008020C5F80803C8F800B0BDE8F88F207EF1 +:108DE00010B913E0607E88B1A07FE17F07FA00F040 +:108DF00007FA01F10843C8F8000094F82000800049 +:108E000000F1804000F5C040C0F81065C9F84C7012 +:108E1000D34800682064D34800686064D248A16BDE +:108E20000160A663217C002019B1D9F84411012901 +:108E300000D00021A27A012A6ED0022A74D000BF8D +:108E4000D5F8101101290CBF1021002141EA0008BA +:108E5000C648016811F0FF0F03D0D5F8141101299D +:108E600000D0002184F83210006810F0FF0F03D00A +:108E7000D5F81801012800D0002084F83300BC4840 +:108E8000006884F83400FEF774FF012818BF002042 +:108E900084F83500C5F80061C5F80C61C5F81061AB +:108EA000C5F80461C5F81461C5F81861B1480068D7 +:108EB0000090A548C0F84461AF480068DFF8BC9254 +:108EC0000090D9F80000A062A9F104000068E062F7 +:108ED000AB48016801F00F01032908BF012013D03E +:108EE000016801F00F01042908BF02200CD00168BD +:108EF00001F00F01052926D0006800F00F000628B8 +:108F00001CBFFFDF01201ED084F83000A07A84F857 +:108F1000310002282CD11EE0D5F80C01012814BF25 +:108F2000002008208CE7FFE7D5F80C01012814BFCA +:108F300000200220934A1268012A14BF0422002252 +:108F4000104308437CE79048006810F0060F0CBF00 +:108F500008200420D8E7607850B18C490968097866 +:108F60000840217831EA000008BF84F8247001D05D +:108F700084F82460DFF818A218F0020F06D0E9F791 +:108F800097FEA16A081ADAF81010884718F0010F46 +:108F900018BF4FF0000B0DD0E9F78AFEE16ADAF84E +:108FA0001420081A594690477A48007810F0010FAB +:108FB0002FD10CE018F0020F18BF4FF0010BEBD1CE +:108FC00018F0080F18BF4FF0020BE5D1ECE7DFF8FF +:108FD000BCB1DBF80000007800F00F00072828BFC4 +:108FE00084F8256015D2DBF80000062200F10901A3 +:108FF000A01CF5F7F5F940B9207ADBF800100978E4 +:10900000B0EBD11F08BF012001D04FF0000084F861 +:109010002500E17A4FF0000011F0020F1CBF18F09C +:10902000020F18F0040F19D111F0100F1CBF94F8A3 +:109030003320002A02D094F835207AB111F0080FBD +:109040001CBF94F82420002A08D111F0040F02D08C +:1090500094F8251011B118F0010F01D04FF0010064 +:10906000617A19B168B1FFF7F5FB10E03E484A4953 +:109070000160D5F8000220F00300C5F80002E77295 +:1090800005E001290AD0022918BFFFDF0DD018F032 +:10909000010F14D0DAF80000804745E06672E772ED +:1090A000A7729621227B002006E06672E7720220FA +:1090B000A072227B96210120FFF78FFBE7E718F0D3 +:1090C000020F2AD018F0040F21D1FEF74FF9F0B9A2 +:1090D000FEF75CF9D8B931480168001F0068C0F399 +:1090E000006CC0F3425500F00F03C0F30312C0F34D +:1090F0000320BCF1000F0AD0002B1CBF002A00285F +:1091000005D1002918BF032D38BF48F0040827EA0D +:109110009800DAF80410884706E018F0080F18BF26 +:10912000DAF8080056D08047A07A022818BFBDE8B8 +:10913000F88F207C002808BFBDE8F88F02492FE097 +:10914000741500401C11004000800040488500401C +:1091500014100040ACF501404881004004F5014086 +:1091600004B500404C85004008F501404016004021 +:109170001014004018110040448100404485004014 +:109180001015004000140040141400400415004065 +:10919000100C0020C40000200000040454140040FF +:1091A000C1F8446102281DD0012818BFFFDFE16A21 +:1091B0006069884298BFFFDFD4F81400C9F8000046 +:1091C000A06B4FF4800140F48000A06382480160EE +:1091D000BDE8F88F18F0100F14BFDAF80C00FFDFAD +:1091E000A1D1A1E76169E06A0844E7E738B57B49A6 +:1091F00004460220887201212046FFF763F9784A6D +:1092000004F13D001060774B0020C3F8440176491B +:10921000C1F80001C1F80C01C1F81001C1F8040146 +:10922000C1F81401C1F818017048006800900120CD +:109230009864101D00681168884228BFFFDF38BDA0 +:109240002DE9F843654A88460024917A0125684F44 +:10925000012902D0022903D015E0117E11B912E0D4 +:10926000517E81B1917FD37F05FA01F105FA03F3B5 +:109270001943396092F82010890001F1804101F50D +:10928000C041C1F8104506460220907201213046C7 +:10929000FFF718F9524906F13D000860514AC2F83B +:1092A00044415148C0F80041C0F80C41C0F8104199 +:1092B000C0F80441C0F81441C0F818414B48006898 +:1092C00000909564081D00680968884228BFFFDF88 +:1092D000B8F1000F1CBF4FF400303860BDE8F883D0 +:1092E000022810B50DD0012804BF42F6CE3010BDC3 +:1092F000042817BF082843F6A440FFDF41F66A00A0 +:1093000010BDFDF7E5FF30B9FDF7F9FF002808BFF4 +:1093100041F6583001D041F2643041F29A010844DC +:1093200010BD314910B50020C1F800023049314864 +:109330000860324930480860091D31480860091D3D +:1093400030480860091D30480860091D2F48086032 +:10935000091D2F48086001200BF058FD1E494FF4ED +:109360003810086010BD22494FF43810086070476B +:109370002848016803291BBF00680228012000203B +:109380007047244801680B291BBF00680A28012088 +:109390000020704720490968C9B9204A204913684C +:1093A00070B123F0820343F07D0343F00043136068 +:1093B0000A6822F0100242F0600242F0004205E02A +:1093C00023F0004313600A6822F000420A60034958 +:1093D00081F83D007047000004F50140280C002092 +:1093E00044850040008000400010004018110040FB +:1093F00008F50140000004041011004098F50140F8 +:109400000410004044810040141000401C11004032 +:109410001010004050150040881700403C170040D5 +:109420007C17004010B5404822220021F5F72FF8A4 +:109430003D480024017821F010010170012104F061 +:10944000FFFE3A494FF6FF7081F822408884384980 +:109450000880488010BD704734498A8C824218BF0A +:109460007047002081F822004FF6FF708884704713 +:109470002D49016070472E49088070472B498A8C1E +:10948000A2F57F43FF3B03D00021016008467047EF +:1094900091F822202549012A1ABF016001200020ED +:1094A0007047224901F1220091F82220012A04BFCD +:1094B00000207047012202701D48008888841046F1 +:1094C00070471B49488070471849194B8A8C5B8844 +:1094D0009A4206D191F82220002A1EBF0160012085 +:1094E0007047002070471148114A818C5288914280 +:1094F00009D14FF6FF71818410F8221F19B10021A4 +:10950000017001207047002070470848084A818C8C +:109510005288914205D190F8220000281CBF0020FB +:109520007047012070470000960C0020700C00204E +:10953000CC0000207047584A012340B1012818BFD1 +:1095400070471370086890608888908170475370E6 +:109550000868C2F802008888D08070474E4A10B16F +:10956000012807D00EE0507860B1D2F80200086000 +:10957000D08804E0107828B19068086090898880CD +:109580000120704700207047434910B1012803D0E3 +:1095900006E0487810B903E0087808B10120704768 +:1095A0000020704730B58DB00C4605460D220021D5 +:1095B00004A8F4F76CFFE0788DF81F0020798DF88F +:1095C0001E0060798DF81D00286800906868019081 +:1095D000A8680290E868039068460AF087FF207840 +:1095E0009DF82F1088420CD160789DF82E1088428B +:1095F00007D1A0789DF82D10884202BF01200DB040 +:1096000030BD00200DB030BD30B50C4605468DB0E4 +:109610004FF0030104F1030012B1FDF749FF01E02F +:10962000FDF765FF60790D2220F0C00040F040009A +:109630006071002104A8F4F72AFFE0788DF81F007C +:1096400020798DF81E0060798DF81D002868009043 +:1096500068680190A8680290E868039068460AF07C +:1096600045FF9DF82F0020709DF82E0060709DF83A +:109670002D00A0700DB030BD10B5002904464FF08C +:10968000060102D0FDF714FF01E0FDF730FF60791D +:1096900020F0C000607110BDD0000020FE4840687E +:1096A00070472DE9F0410F46064601461446012059 +:1096B00005F06FF8054696F86500FEF795FC4AF24E +:1096C000B12108444FF47A71B0FBF1F0718840F297 +:1096D00071225143C0EB4100001BA0F55A7402F007 +:1096E0005AFF002818BF1E3CAF4234BF28463846F8 +:1096F000A04203D2AF422CBF3C462C467462BDE868 +:10970000F0812DE9FF4F8BB0044690F86500884644 +:109710000390DDE90D1008430A90E0480027057822 +:109720000C2D28BFFFDFDE4E36F8159094F88851D7 +:109730000C2D28BFFFDFDA4830F81500484480B20E +:10974000009094F87D000D280CBF012000200790A8 +:109750000D98002804BF94F82C0103282BD10798FA +:1097600048B3B4F8AA01404525D1D4F83401C4F86F +:109770002001608840F2E2414843C4F82401B4F873 +:109780007A01B4F806110844C4F82801204602F012 +:109790000CFFB4F8AE01E08294F8AC016075B4F847 +:1097A000B0016080B4F8B201A080B4F8B401E080E8 +:1097B000022084F82C01D4F884010990D4F88001A7 +:1097C0000690B4F80661B4F87801D4F874110191E8 +:1097D0000D9921B194F8401151B100F0D6B804F5BB +:1097E000807104917431059104F5B075091D07E08D +:1097F00004F5AA710491091D059104F5A275091DCE +:109800000891B4F87010A8EB0000A8EB01010FFA62 +:1098100080F90FFA81FBB9F1000F05DAD4F8700175 +:1098200001900120D9460A909C484FF0000A007927 +:10983000A8B3F2F77FFB90B3B4F8180102282ED337 +:1098400094F82C0102282AD094F8430138BB94F8EC +:10985000880100900C2828BFFFDF9148009930F85C +:10986000110000F5C86080B2009094F82C01012826 +:109870007ED0608840F2E2414843009901F0E6F86A +:10988000D4F8342180B206EB0B01A1EB0901821A56 +:1098900001FB02AAC4F83401012084F8430194F8C2 +:1098A0002C01002865D0012800F01482022800F065 +:1098B0007181032818BFFFDF00F04782A7EB0A0180 +:1098C0000198FCF738F90599012640F271220860E9 +:1098D0000898A0F80080002028702E710598006874 +:1098E000A8606188D4F834015143C0EB41006B4952 +:1098F000A0F54E70C8618969814287BF04990860EC +:10990000049801600498616A0068084400F5D47006 +:10991000E86002F040FE10B1E8681E30E8606E7149 +:10992000B4F8F000A0EB080000B20028C4BF032088 +:109930006871079800280E9800F06982E0B100BFB6 +:10994000B4F8181100290CBF0020B4F81A01A4F8CB +:109950001A0194F81C21401C504388420CD26879AB +:10996000401E002808DD6E71B4F81A01401C01E0A9 +:109970000FE05AE0A4F81A010D98002800F06A825E +:1099800094F84001002800F061820FB00220BDE889 +:10999000F08F94F8800003283DD03F4894F865107C +:1099A00090F82C00F7F78DFDE18A40F271225143C7 +:1099B00000EB4100CDF80800D4F82401009901F033 +:1099C00045F8D4F82021D4F82811821A01FB02AA04 +:1099D000C4F820010099029801F038F8D4F8301149 +:1099E000C4F83001411A8A44608840F2E241484399 +:1099F000009901F02BF806EB0B01D4F82821A1EB1C +:109A00000901891AD4F83421C4F83401821A491E94 +:109A100001FB02AA40E7E18A40F27122D4F8240156 +:109A2000514300EB41000290C6E70698002808BFAA +:109A3000FFDF94F86510184890F82C00F7F741FD07 +:109A40000990E08A40F271214143099800EB4100FE +:109A5000009900F0FBFFC4F83001608840F2E24159 +:109A60004843009900F0F2FFC4F8340103A902A8AA +:109A7000FFF7BBF8DDE90160039FE9F7F0F8014665 +:109A80003046FDF769F800F10F06E9F711F9381AC9 +:109A9000801B009006E00000B80C0020E0000020D1 +:109AA000E4620200B4F83401214686B20120D4F801 +:109AB000289004F06EFE074694F86500FEF794FACD +:109AC0004AF2B12108444FF47A7BB0FBFBF0618885 +:109AD00040F271225143C0EB4100801BA0F55A7641 +:109AE00002F059FD002818BF1E3EB94534BF384664 +:109AF0004846B04203D2B9452CBF4E463E46666248 +:109B000094F86500FEF7E9FA00F2E140B0FBFBF1E2 +:109B100006980F1894F86500FEF7DFFA064694F8E9 +:109B20006500FEF761FA30444AF2AB310844B0FBFD +:109B3000FBF1E08A40F2712242430998D4F8306187 +:109B400000EB4200401A801B384400993138471A14 +:109B5000607D40F2E24110FB01F994F8650000904D +:109B600010F00C0F0ABF00984EF62830FEF73CFAB2 +:109B70004AF2B1210844B0FBFBF000EB460000EBD9 +:109B800009060098FEF7B8FA304400F18401FE4857 +:109B9000816193E6E18A40F27122D4F824015143B5 +:109BA00000EB4100009900F051FFC4F830016188DA +:109BB00040F2E2404843009900F048FFC4F8340105 +:109BC00087B221460120D4F828B004F0E2FD814696 +:109BD00094F86500FEF708FA4AF2B12101444FF407 +:109BE0007A70B1FBF0F0618840F271225143C0EB12 +:109BF0004100C01BA0F55A7702F0CDFC002818BF29 +:109C00001E3FCB4534BF48465846B84203D2CB45E9 +:109C10002CBF5F464F4667621EBB0E9808B394F890 +:109C200065603046FEF7E0F94AF2B12101444FF495 +:109C30007A70B1FBF0F0D4F83011E28A084440F2B7 +:109C40007123D4F824115A4301EB42010F1A304614 +:109C5000FEF752FA01460998401A3844A0F120074D +:109C60000AE0E18A40F27122D4F82401514300EB6A +:109C70004100D4F83011471AD4F82821D4F8201123 +:109C8000D4F8300101FB0209607D40F2E24110FB93 +:109C900001FB94F8656016F00C0F0ABF30464EF6D3 +:109CA0002830FEF7A1F94AF2B12101444FF47A704D +:109CB000B1FBF0F000EB490000EB0B093046FEF77A +:109CC0001BFA484400F16001AF488161012084F82B +:109CD0002C01F3E5618840F271225143D4F834013C +:109CE000D4F82821C0EB410101FB09F706EB0B0179 +:109CF000891AD4F820C1D4F83031491E0CFB023245 +:109D000001FB0029607D40F2E24110FB01FB94F869 +:109D1000656016F00C0F0ABF30464EF62830FEF78D +:109D200063F94AF2B12101444FF47A70B1FBF0F0CB +:109D300000EB490000EB0B093046FEF7DDF9484423 +:109D400000F1600190488161B8E5618840F27122BC +:109D5000D4F834015143C0EB410000FB09F794F8FB +:109D60007C0024281CBF94F87D0024280BD1B4F873 +:109D7000AA01A8EB000000B2002804DB94F8AD01B2 +:109D8000002818BF03900A9800B3FEB9099800286C +:109D90001ABF06980028FFDF94F8650010F00C0F3A +:109DA00014BF4EF62830FEF71FF94AF2B1210144E4 +:109DB0004FF47A70B1FBF0F03F1A94F86500FEF7AB +:109DC0009BF90999081A3844A0F12007D4F83411F6 +:109DD00006EB0B0000FB01F6039810F00C0F0ABF16 +:109DE00003984EF62830FEF7FFF84AF2B1210144FD +:109DF0004FF47A70B1FBF0F000EB46060398FEF7E3 +:109E00007BF9304400F160015F48816156E500282C +:109E10007FF496AD94F82C0100283FF4ADAD618835 +:109E200040F27122D4F834015143C0EB410128467D +:109E3000F7F712F90004000C3FF49EAD18990029C1 +:109E400018BF088001200FB0BDE8F08F94F87C01A6 +:109E5000FCF7D1FC94F87C012946FCF7B0FB20B15B +:109E60000D9880F0010084F841010FB00020BDE89A +:109E7000F08F2DE9F843454C0246434F00266168B8 +:109E8000606A052A60D2DFE802F003464B4F5600B5 +:109E9000A07A002560B101216846FDF709FB9DF815 +:109EA000000042F210710002B0FBF1F201FB12055A +:109EB000F4F720FE4119A069FBF73DFEA06126746E +:109EC000032060754FF0010884F81480607AD0B9DF +:109ED000A06A80B1F4F70EFE0544F4F785FC411941 +:109EE000A06A884224BF401BA06204D2C4F8288024 +:109EF000F5F72BFE07E0207B04F11001FCF75FFB78 +:109F0000002808BFFFDF2684FCF739F87879BDE820 +:109F1000F843E8F7F9BFBDE8F843002100F0B3BD0E +:109F2000C1F88001BDE8F883D1F88001BDE8F843AD +:109F3000012100F0A8BD84F83060FCF720F87879A2 +:109F4000BDE8F843E8F7E0BFFFDFBDE8F8832DE99F +:109F5000F04F0E4C824683B020788B4601270025B7 +:109F6000094E4FF00209032804BF207B50457DD1E4 +:109F7000606870612078032818BFFFDF4FF0030886 +:109F8000BBF1080F73D203E0E0000020B80C002002 +:109F9000DFE80BF0040F32322D9999926562F5F7E4 +:109FA000ABF9002818BFFFDF86F8028003B0BDE8D8 +:109FB000F08FF4F77AFF68B9F4F716FC0546E0690C +:109FC000A84228BFE56105D2281A0421FCF7F7FD55 +:109FD000E56138B1F5F723FD002818BFFFDF03B0B6 +:109FE000BDE8F08F03B00020BDE8F04F41E703B0BB +:109FF000BDE8F04FFEF7FFBD2775257494F83000DB +:10A000004FF0010A58B14FF47A71A069FBF793FD44 +:10A01000A061002104F11000F7F71EF80EE0F4F73C +:10A0200069FD82465146A069FBF785FDA061514656 +:10A0300004F11000F7F710F800F1010A208C411C20 +:10A040000A293CBF50442084606830B1208C401CF9 +:10A050000A2828BF84F8159001D284F81580607A08 +:10A06000A8B9A06AE8B1F4F745FD01E02FE02AE0C5 +:10A070008046F4F7B9FB00EB0801A06A884224BFD0 +:10A08000A0EB0800A0620CD2A762F5F75EFD207B72 +:10A09000FCF74BF82570707903B0BDE8F04FE8F796 +:10A0A00033BF207B04F11001FCF789FA002808BFB8 +:10A0B000FFDF03B0BDE8F08F207BFCF736F825709A +:10A0C00003B0BDE8F08FFFDF03B0BDE8F08FBAF159 +:10A0D000200F28BFFFDFDFF8E886072138F81A00D5 +:10A0E000F9F7E4FE040008BFFFDFBAF1200F28BF34 +:10A0F000FFDF38F81A002188884218BFFFDF4FF0D1 +:10A10000200A7461BBF1080F80F06181DFE80BF079 +:10A110000496A0A099FEFDFCC4F88051F580C4F817 +:10A12000845194F8410138B9FCF71EF8D4F84C1169 +:10A13000FCF712FD00281BDCB4F83E11B4F87000E7 +:10A14000814206D1B4F8F410081AA4F8F6002046AB +:10A1500005E0081AA4F8F600B4F83E112046A4F869 +:10A160007010D4F86811C4F84C11C0F870111DE0DB +:10A17000B4F83C11B4F87000081AA4F8F600B4F86A +:10A180003C112046A4F87010D4F84C11C4F86811A2 +:10A19000C4F87011D4F85411C4F80011D4F858114F +:10A1A000C4F87411B4F85C11A4F8781102F008F93D +:10A1B000FBF7B4FF804694F86500FDF715FF4AF2FF +:10A1C000B12108444FF47A71B0FBF1F0D4F83411A6 +:10A1D00040F27122084461885143C0EB4100A0F174 +:10A1E000300AB8F1B70F98BF4FF0B70821460120E9 +:10A1F00004F0CFFA4044AAEB0000A0F21D38A246BA +:10A200002146012004F0C5FADAF824109C3081427E +:10A2100088BF0D1AC6F80C80454528BF4546B56075 +:10A22000D4F86C01A0F5D4703061FCF762FC84F8BE +:10A23000407186F8029003B0BDE8F08F02F0A6F9F5 +:10A2400001E0FEF7D8FC84F8407103B0BDE8F08F60 +:10A25000FBF78AFFD4F8702101461046FCF77CFC1E +:10A2600048B1628840F27123D4F834115A43C1EBEB +:10A270004201B0FBF1F094F87D100D290FD0B4F835 +:10A280007010B4F83E210B189A42AEBF501C401C0F +:10A290000844A4F83E0194F8420178B905E0B4F806 +:10A2A0003E01401CA4F83E0108E0B4F83E01B4F8B9 +:10A2B000F410884204BF401CA4F83E01B4F87A01AF +:10A2C0000DF1040B401CA4F87A01B4F89A00B4F81C +:10A2D0009810401AB4F87010401E08441FFA80F914 +:10A2E0000BE000231A462046CDF800B0FFF709FA2C +:10A2F00068B3012818BFFFDF48D0B4F83E11A9EBBE +:10A30000010000B2002802E053E047E05FE0E8DA35 +:10A31000082084F88D0084F88C70204601F012FE2D +:10A3200084F82C5194F87C514FF6FF77202D00D300 +:10A33000FFDF28F8157094F87C01FBF7F6FE84F82F +:10A340007CA1707903B0BDE8F04FE8F7DDBDA06EE9 +:10A35000002804BF03B0BDE8F08FB4F83E01B4F8A4 +:10A360009420801A01B20029DCBF03B0BDE8F08F51 +:10A37000B4F86C000144491E91FBF0F189B201FB75 +:10A380000020A4F8940003B0BDE8F08FB4F83E01BB +:10A39000BDF804100844A4F83E01AEE7FEF7E4FA65 +:10A3A000FEF729FC4FF0E020C0F8809203B0BDE832 +:10A3B000F08F94F82C01042818BFFFDF84F82C518B +:10A3C00094F87C514FF6FF77202DB2D3B0E7FFDF32 +:10A3D00003B0BDE8F08F10B5FA4C207850B10120E1 +:10A3E0006072F5F7D8FB2078032805D0207A002882 +:10A3F00008BF10BD0C2010BD207BFCF7FCF9207BB2 +:10A40000FCF765FC207BFBF790FE002808BFFFDF10 +:10A410000020207010BD2DE9F04FEA4F83B038784E +:10A4200001244FF0000840B17C720120F5F7B3FB26 +:10A430003878032818BF387A0DD0DFF88C9389F864 +:10A44000034069460720F9F7BAFC002818BFFFDF70 +:10A450004FF6FF7440E0387BFCF7CDF9387BFCF712 +:10A4600036FC387BFBF761FE002808BFFFDF87F86A +:10A470000080E2E7029800281CBF90F82C11002908 +:10A480002AD00088A0421CBFDFF834A34FF0200B75 +:10A490003AD00721F9F70AFD040008BFFFDF94F85E +:10A4A0007C01FCF714FC84F82C8194F87C514FF665 +:10A4B000FF76202D28BFFFDF2AF8156094F87C0175 +:10A4C000FBF733FE84F87CB169460720F9F777FC87 +:10A4D000002818BFFFDF12E06846F9F74EFC00289D +:10A4E000C8D011E0029800281CBF90F82C11002958 +:10A4F00005D00088A0F57F41FF39CAD104E0684645 +:10A50000F9F73BFC0028EDD089F8038087F830800C +:10A5100087F80B8003B00020BDE8F08FAA4948718E +:10A520000020887001220A7048700A71C870A5491D +:10A53000087070E7A449087070472DE9F84FA14CE6 +:10A5400006460F462078002862D1A048FBF792FD0E +:10A55000207320285CD04FF00308666084F80080E8 +:10A56000002565722572AEB1012106F58E70FCF7EB +:10A57000BEFF0620F9F742FC81460720F9F73EFCB2 +:10A5800096F81C114844B1FBF0F200FB1210401C7D +:10A5900086F81C01FBF7C2FD40F2F651884238BF35 +:10A5A00040F2F65000F5A0701FFA80F9F4F7A2FA15 +:10A5B000012680B3A672F4F717F9E061FBF7D4FD2A +:10A5C000824601216846FCF769FF9DF8000042F2CF +:10A5D00010710002B0FBF1F201FB120000EB090167 +:10A5E0005046FBF7A8FAA762A061267584F815808B +:10A5F0002574207B04F11001FBF7E1FF002808BF60 +:10A60000FFDF25840020F5F7C6FA0020BDE8F88FAB +:10A610000C20BDE8F88FFFE7E761FBF7A5FD494691 +:10A62000FBF789FAA061A57284F830600120FDF77C +:10A6300054FD4FF47A7100F2E140B0FBF1F0381AAA +:10A64000A0F5AB60A5626063CFE75F4948707047D3 +:10A650005D49087170475B4810B5417A00291CBFFD +:10A66000002010BD816A51B990F8301039B1416AAB +:10A67000406B814203D9F5F768FA002010BD012034 +:10A6800010BD2DE9F041504C0646E088401CE080AA +:10A69000D4E902516078D6F8807120B13A46284654 +:10A6A000F6F705FD0546A068854205D02169281A00 +:10A6B00008442061FCF71DFAA560AF4209D896F85E +:10A6C0002C01012805D0E078002804BF0120BDE856 +:10A6D000F0810020BDE8F08110B504460846FDF782 +:10A6E00083FC4AF2B12108444FF47A71B0FBF1F0D7 +:10A6F00040F2E241614300F54E7081428CBF081A7E +:10A70000002010BD70B5044682B0002084F84001DE +:10A7100094F8FB00002807BF94F82C01032802B02E +:10A7200070BDFBF721FDD4F8702101461046FCF7FF +:10A7300013FA0028DCBF02B070BD628840F27123BA +:10A74000D4F834115A43C1EB4201B0FBF1F0B4F834 +:10A750007010401C0844A4F83C01B4F8F400B4F8AC +:10A760003C21801A00B20028DCBF02B070BD01207D +:10A7700084F84201B4F89A00B4F8982001AE801A27 +:10A78000401E084485B212E00096B4F83C11002344 +:10A7900001222046FEF7B5FF002804BF02B070BDBD +:10A7A000012815D0022812BFFFDF02B070BDB4F837 +:10A7B0003C01281A00B20028BCBF02B070BDE3E71C +:10A7C000F00C0020B80C0020E00000204F9F01009A +:10A7D000B4F83C01BDF804100844A4F83C01E6E7D5 +:10A7E000F8B50422002506295BD2DFE801F0072630 +:10A7F0000319192A044680F82C2107E00446C948A9 +:10A80000C078002818BF84F82C210AD0FBF7B7FBCA +:10A81000A4F87A51B4F87000A4F83E0184F84251CB +:10A82000F8BD0095B4F8F410012300222046FEF78D +:10A8300068FF002818BFFFDFE8E7032180F82C112C +:10A84000F8BD0646876AB0F83401314685B201206A +:10A8500003F09FFF044696F86500FDF7C5FB4AF23A +:10A86000B12108444FF47A71B0FBF1F0718840F2E5 +:10A8700071225143C0EB4100401BA0F55A7501F015 +:10A880008AFE002818BF1E3DA74234BF2046384626 +:10A89000A84228BF2C4602D2A74228BF3C46746279 +:10A8A000F8BDFFDFF8BD2DE9F05F9E4EB1780229BB +:10A8B00006BFF1880029BDE8F09F7469C4F88401DF +:10A8C00094F86500FDF718FCD4F88411081AB168F3 +:10A8D0000144B160F1680844F060746994F8430180 +:10A8E000002808BFBDE8F09F94F82C01032818BF8A +:10A8F000BDE8F09F94F8655037780C2F28BFFFDF34 +:10A90000894E36F8178094F888710C2F28BFFFDF26 +:10A9100036F81700404494F8888187B2B8F10C0FDC +:10A9200028BFFFDF36F8180000F5C8601FFA80F86E +:10A930002846FDF7E1FBD4F884114FF0000A0E1A07 +:10A9400015F00C0F0ABF28464EF62830FDF74CFBD9 +:10A950004FF47A7900F2E730B0FBF9F0361A284666 +:10A96000FDF7CAFBD4F8001115F00C0FA1EB000B9A +:10A970000ABF28464EF62830FDF736FB4AF2B121D1 +:10A980000844B0FBF9F0ABEB0000A0F160017943A3 +:10A99000B1FBF8F1292202EB50006031A0EB51022B +:10A9A00000EB5100B24201D8B04201D8F1F774FB7C +:10A9B000608840F2E2414843394600F047F8C4F865 +:10A9C000340184F843A1BDE8F09F70B505465548B1 +:10A9D00090F802C0BCF1020F07BF406900F5C074D7 +:10A9E000524800F12404002904BF256070BD4FF4D3 +:10A9F0007A7601290DD002291CBFFFDF70BD1046F9 +:10AA0000FEF76EFC00F2E140B0FBF6F0281A206081 +:10AA100070BD1846FDF761FB00F2E140B0FBF6F0B7 +:10AA2000281A206070BD4148007800281CBF002013 +:10AA3000704710B50720F9F7D3F980F0010010BD79 +:10AA40003A480078002818BF0120704730B5024608 +:10AA50000020002908BF30BDA2FB0110490A41EACD +:10AA6000C051400A4C1C40F100000022D4F1FF31DB +:10AA700040F2A17572EB000038BFFFDF04F5F4600F +:10AA8000B0FBF5F030BD2DE9F843284C0025814698 +:10AA900084F83050D4F8188084F82C10E5722570B2 +:10AAA0000127277239466068F5F792FD6168C1F8A1 +:10AAB0007081267B81F87C61C1F88091C1F8748136 +:10AAC000B1F80080202E28BFFFDF194820F816803B +:10AAD000646884F82C510023A4F878511A4619466A +:10AAE00020460095FEF70DFE002818BFFFDFC4F8D2 +:10AAF0002851C4F8205184F82C71A4F83E51A4F8D0 +:10AB00003C5184F84251B4F87000401EA4F8700023 +:10AB1000A4F87A51FBF733FA02484079BDE8F843CC +:10AB2000E8F7F2B9E0000020E4620200B80C00206F +:10AB3000F00C0020012804D0022805D0032808D1F9 +:10AB400005E0012907D004E0022904D001E004292E +:10AB500001D000207047012070472DE9F0410E46DA +:10AB6000044603F08AFC0546204603F08AFC0446AE +:10AB7000F6F770FBFB4F010015D0386990F86420A0 +:10AB80008A4210D090F8C0311BB190F8C2312342F4 +:10AB90001FD02EB990F85D30234201D18A4218D8D7 +:10ABA00090F8C001A8B12846F6F754FB70B1396996 +:10ABB00091F86520824209D091F8C00118B191F84E +:10ABC000C301284205D091F8C00110B10120BDE8B1 +:10ABD000F0810020FBE730B5E24C85B0E069002849 +:10ABE0005FD0142200216846F3F751FC206990F8E9 +:10ABF0006500FDF7F9F94FF47A7100F5FA70B0FBD2 +:10AC0000F1F5206990F86500FDF776FA2844ADF873 +:10AC1000060020690188ADF80010B0F87010ADF89A +:10AC200004104188ADF8021090F8A20130B1A0697B +:10AC3000C11C039103F002FB8DF81000206990F80D +:10AC4000A1018DF80800E169684688472069002164 +:10AC500080F8A21180F8A1110399002921D090F861 +:10AC6000A01100291DD190F87C10272919D09DF83A +:10AC70001010039A002914D013780124FF2B12D04E +:10AC8000072B0ED102290CD15178FF2909D100BF21 +:10AC900080F8A0410399C0F8A4119DF8101080F825 +:10ACA000A31105B030BD1B29F2D9FAE770B5AD4C40 +:10ACB000206990F87D001B2800D0FFDF2069002567 +:10ACC00080F8A75090F8D40100B1FFDF206990F818 +:10ACD000A81041B180F8A8500188A0F8D81180F8D8 +:10ACE000D6510E2108E00188A0F8D81180F8D6517D +:10ACF000012180F8DA110D2180F8D4110088F9F7CC +:10AD000006FAF8F79FFE2079E8F7FEF8206980F848 +:10AD10007D5070BD70B5934CA07980072CD5A0787C +:10AD2000002829D162692046D37801690D2B01F1F1 +:10AD300070005FD00DDCA3F102034FF001050B2B77 +:10AD400019D2DFE803F01A1844506127182C183A7A +:10AD50006400152B6FD008DC112B4BD0122B5AD06E +:10AD6000132B62D0142B06D166E0162B71D0172B53 +:10AD700070D0FF2B6FD0FFDF70BD91F87F200123D3 +:10AD80001946F6F7FFF80028F6D12169082081F866 +:10AD90007F0070BD1079BDE8704001F090BC91F863 +:10ADA0007E00C00700D1FFDF01F048FC206910F8E9 +:10ADB0007E1F21F00101017070BD91F87D00102807 +:10ADC00000D0FFDF2069112180F8A75008E091F83A +:10ADD0007D00142800D0FFDF2069152180F8A750DE +:10ADE00080F87D1070BD91F87D00152800D0FFDF40 +:10ADF000172005E091F87D00152800D0FFDF19200D +:10AE0000216981F87D0070BDBDE870404EE7BDE866 +:10AE1000704001F028BC91F87C2001230021F6F756 +:10AE2000B1F800B9FFDF0E200FE011F87E0F20F01F +:10AE3000040008701DE00FE091F87C200123002140 +:10AE4000F6F7A0F800B9FFDF1C20216981F87C002B +:10AE500070BD12E01BE022E091F87E00C0F301100B +:10AE6000012800D0FFDF206910F87E1F21F01001BB +:10AE70000170BDE8704001F0E1BB91F87C20012336 +:10AE80000021F6F77FF800B9FFDF1F20DDE791F81A +:10AE90007D00212801D000B1FFDF2220B0E7BDE80E +:10AEA000704001F0D7BB2F48016991F87E2013074D +:10AEB00002D501218170704742F0080281F87E209E +:10AEC0008069C07881F8E10001F0AFBB10B5254C76 +:10AED00021690A88A1F8162281F8140291F8640009 +:10AEE00001F091FB216981F8180291F8650001F0E9 +:10AEF0008AFB216981F81902012081F812020020E1 +:10AF000081F8C0012079BDE81040E7F7FDBF10B51A +:10AF1000144C05212069FFF763FC206990F85A1052 +:10AF2000012908D000F5F57103F001FC2079BDE896 +:10AF30001040E7F7E9BF022180F85A1010BD10B5A4 +:10AF4000084C01230921206990F87C207030F6F725 +:10AF500019F848B12169002001F8960F087301F82B +:10AF60001A0C10BD000100200120A070F9E770B597 +:10AF7000F74D012329462869896990F87C200979D1 +:10AF80000E2A01D1122903D000241C2A03D004E088 +:10AF9000BDE87040D3E7142902D0202A07D008E08A +:10AFA00080F87C4080F8A240BDE87040AFE71629E9 +:10AFB00006D0262A01D1162902D0172909D00CE083 +:10AFC00000F87C4F80F82640407821280CD01A20C9 +:10AFD00017E090F87D20222A07D0EA69002A03D0E2 +:10AFE000FF2901D180F8A23132E780F87D4001F0DD +:10AFF00025FB286980F8974090F8C0010028F3D01D +:10B000000020BDE8704061E710B5D14C216991F88E +:10B010007C10202902D0262902D0A2E7FFF756FF94 +:10B020002169002081F87C0081F8A20099E72DE9D0 +:10B03000F843C74C206990F87C10202908D00027DD +:10B0400090F87D10222905D07FB300F17C0503E044 +:10B050000127F5E700F17D0510F8B01F41F004016C +:10B060000170A06903F015FA4FF00108002608B33B +:10B070003946A069FFF771FDE0B16A46A169206910 +:10B08000F6F7F7F890B3A06903F001FA2169A1F887 +:10B09000AA01B1F8701001F0AAFA40B32069282182 +:10B0A00080F88D1080F88C8058E0FFE70220A070B7 +:10B0B000BDE8F883206990F8C00110B11E20FFF7A9 +:10B0C00005FFAFB1A0692169C07881F8E20008FAF4 +:10B0D00000F1C1F3006000B9FFDF20690A2180F8A8 +:10B0E0007C1090F8A20040B9FFDF06E009E02AE0FA +:10B0F0002E7001F0A3FAFFF7D6FE206980F8976062 +:10B10000D6E7226992F8C00170B1B2F8703092F8B7 +:10B110006410B2F8C40102F5D572F6F79BF968B174 +:10B120002169252081F87C00206900F17D0180F8EB +:10B1300097608D4212D180F87D600FE00020FFF70C +:10B14000C5FE2E70F0E720699DF8001080F8AC1164 +:10B150009DF8011080F8AD1124202870206900F1BD +:10B160007D018D4203D1BDE8F84301F067BA80F854 +:10B17000A2609DE770B5764C01230B21206990F801 +:10B180007D207030F5F7FEFE202650BB206901239C +:10B19000002190F87D207030F5F7F4FE0125F0B124 +:10B1A000206990F87C0024281BD0A06903F04FF997 +:10B1B000C8B1206990F8B01041F0040180F8B010D7 +:10B1C000A1694A7902F0070280F85D20097901F04F +:10B1D000070180F85C1090F8C1311BBB06E0A57038 +:10B1E00036E6A67034E6BDE870405CE690F8C03103 +:10B1F000C3B900F164035E788E4205D1197891429B +:10B2000002D180F897500DE000F503710D700288AF +:10B210004A8090F85C200A7190F85D0048712079AE +:10B22000E7F772FE2169212081F87D00BDE87040BA +:10B2300001F0FBB9F8B5464C206990F87E0010F09B +:10B24000300F04D0A07840F00100A070F8BDA069D4 +:10B2500003F0E2F850B3A06903F0D8F80746A069FC +:10B2600003F0D8F80646A06903F0CEF80546A069B9 +:10B2700003F0CEF801460097206933462A46303065 +:10B2800003F0BFF9A079800703D56069C07814285E +:10B290000FD0216991F87C001C280AD091F85A003F +:10B2A00001280ED091F8B70158B907E0BDE8F84081 +:10B2B000F9E52169012081F85A0002E091F8B60110 +:10B2C00030B1206910F87E1F41F0100101700EE0CE +:10B2D00091F87E0001F5FC7240F0200081F87E00BC +:10B2E00031F8300B03F017FA2079E7F70DFEBDE8CF +:10B2F000F84001F09AB970B5154C206990F87E10AD +:10B30000890707D590F87C20012308217030F5F7D4 +:10B3100039FEF8B1206990F8AA00800712D4A0691C +:10B3200003F056F8216981F8AB00A06930F8052FC9 +:10B33000A1F8AC204088A1F8AE0011F8AA0F40F0A7 +:10B3400002000870206990F8AA10C90705D011E022 +:10B35000000100200120A0707AE590F87E008007AF +:10B3600000D5FFDF206910F87E1F41F00201017057 +:10B3700001F05BF92069002590F87C10062906D1C0 +:10B3800080F87C5080F8A2502079E7F7BDFD206955 +:10B3900090F8A8110429DFD180F8A8512079E7F7A7 +:10B3A000B3FD206990F87C100029D5D180F8A25017 +:10B3B0004EE570B5FB4C01230021206990F87D20FB +:10B3C0007030F5F7DFFD012578B9206990F87D2010 +:10B3D000122A0AD0012305217030F5F7D3FD10B1F0 +:10B3E0000820A07034E5A57032E5206990F8A80027 +:10B3F00008B901F01AF92169A06901F5847102F018 +:10B40000C8FF2169A069D83102F0CEFF206990F809 +:10B41000DC0100B1FFDF21690888A1F8DE0101F538 +:10B42000F071A06902F0A3FF2169A06901F5F47130 +:10B4300002F0A5FF206980F8DC51142180F87D100E +:10B440002079BDE87040E7F75FBD70B5D54C0123AA +:10B450000021206990F87D207030F5F793FD0125DB +:10B46000A8B1A06902F04FFF98B1A0692169B0F8B6 +:10B470000D00A1F8AA01B1F8701001F0B8F858B1A8 +:10B480002069282180F88D1080F88C50E0E4A570A8 +:10B49000DEE4BDE8704006E5A0692169027981F823 +:10B4A000AC21B0F80520A1F8AE2102F01FFF216900 +:10B4B000A1F8B001A06902F01CFF2169A1F8B20156 +:10B4C000A06902F01DFF2169A1F8B4010D2081F8E7 +:10B4D0007D00BDE47CB5B34CA079C00738D0A0692D +:10B4E00001230521C578206990F87D207030F5F79B +:10B4F00049FD68B1AD1E0A2D06D2DFE805F0090945 +:10B500000505090905050909A07840F00800A070A3 +:10B51000A07800281CD1A06902F0BEFE00286ED0E1 +:10B52000A0690226C5781DB1012D01D0162D18D1B4 +:10B53000206990F87C00F5F70DFD90B1216991F834 +:10B540007C001F280DD0202803D0162D16D0A67001 +:10B550007CBD262081F87C00162D02D02A20FFF722 +:10B56000B5FC0C2D5BD00CDC0C2D48D2DFE805F0CF +:10B5700036331F48BEBE4BB55ABE393C2020A070A2 +:10B580007CBD0120142D6ED008DC0D2D6CD0112D4A +:10B590006BD0122D6ED0132D31D168E0152D7FD0D8 +:10B5A000162D6FD0182D6ED0FF2D28D198E0206970 +:10B5B0000123194690F87F207030F5F7E3FC00284E +:10B5C00008D1A06902F0CCFE216981F88E01072024 +:10B5D00081F87F008CE001F0EDF889E0FFF735FF9E +:10B5E00086E001F0C7F883E0206990F87D1011290A +:10B5F00001D0A6707CE0122180F87D1078E075E023 +:10B60000FFF7D7FE74E0206990F87D001728F0D18D +:10B6100001F014F821691B2081F87D0068E0FFF734 +:10B620006AFE65E0206990F87E00C00703D0A0782C +:10B6300040F0010023E06946A06902F0D0FE9DF8C9 +:10B64000000000F02501206900F8B01F9DF80110EE +:10B6500001F04901417000F0E8FF206910F87E1FF9 +:10B6600041F0010117E018E023E025E002E0FFF7D8 +:10B6700066FC3DE0216991F87E10490704D5A07071 +:10B6800036E00DE00FE011E000F0CFFF206910F888 +:10B690007E1F41F0040101702AE0FFF7CBFD27E097 +:10B6A00001F030F824E0FFF765FD21E0FFF7BFFC73 +:10B6B0001EE0A06900790DE0206910F8B01F41F08C +:10B6C00004010170A06902F0F7FE162810D1A069EC +:10B6D00002F0F6FEFFF798FC0AE0FFF748FC07E0EF +:10B6E000E16919B1216981F8A20101E0FFF7DBFBF3 +:10B6F0002169F1E93002401C42F10002C1E9000277 +:10B700007CBD70B5274CA07900074AD5A0780028E9 +:10B7100047D1206990F8E400FE2800D1FFDF2069BE +:10B72000FE21002580F8E41090F87D10192906D13B +:10B7300080F8A75000F082FF206980F87D502069D2 +:10B7400090F87C101F2902D0272921D119E090F808 +:10B750007D00F5F7FFFB78B120692621012380F8F1 +:10B760007C1090F87D200B217030F5F70BFC78B938 +:10B770002A20FFF7ABFB0BE02169202081F87C0039 +:10B7800006E0012180F8A11180F87C5080F8A250D9 +:10B79000206990F87F10082903D10221217080F8D8 +:10B7A000E41021E40001002010B5FD4C216991F85E +:10B7B000AC210AB991F8642081F8642091F8AD2198 +:10B7C0000AB991F8652081F8652010B10020FFF7D3 +:10B7D0007DFB206902F041FF002806D02069BDE80A +:10B7E000104000F5F57102F0A2BF16E470B5EC4C04 +:10B7F00006460D46206990F8E400FE2800D0FFDFE1 +:10B800002269002082F8E46015B1A2F8A400E7E400 +:10B8100022F89E0F01201071E2E470B5E04C012384 +:10B820000021206990F87C207030F5F7ABFB0028F0 +:10B830007BD0206990F8B61111B190F8B71139B1E9 +:10B8400090F8C01100296FD090F8C11119B36BE0C6 +:10B8500090F87D1024291CD090F87C10242918D051 +:10B860005FF0000300F5D67200F5DB7102F096FE82 +:10B870002169002081F8B60101461420FFF7B6FFC8 +:10B88000216901F13000C28A21F8E62F408B4880FF +:10B8900050E00123E6E790F87D2001230B21703072 +:10B8A000F5F770FB68BB206990F8640000F0ABFE10 +:10B8B0000646206990F8650000F0A5FE054620695F +:10B8C00090F8C2113046FFF735F9D8B1206990F8E9 +:10B8D000C3112846FFF72EF9A0B12269B2F87030E3 +:10B8E00092F86410B2F8C40102F5D572F5F7B2FD12 +:10B8F00020B12169252081F87C001BE00020FFF7A2 +:10B90000E5FA11E020690123032190F87D207030D1 +:10B91000F5F738FB40B920690123022190F87D201A +:10B920007030F5F72FFB08B1002059E400211620F4 +:10B93000FFF75CFF012053E410B5E8BB984C206989 +:10B9400090F87E10CA0702D00121092052E08A0730 +:10B950000AD501210C20FFF749FF206910F8AA1F22 +:10B9600041F00101017047E04A0702D5012113208F +:10B9700040E00A0705D510F8E11F417101210720B9 +:10B9800038E011F0300F3BD090F8B711A1B990F822 +:10B99000B611E1B190F87D1024292FD090F87C10D9 +:10B9A00024292BD05FF0000300F5D67200F5DB717F +:10B9B00002F0F4FD216900E022E011F87E0F20F092 +:10B9C000200040F010000870002081F83801206944 +:10B9D00090F87E10C90613D502F03FFEFFF797FAE4 +:10B9E000216901F13000C28A21F8E62F408B48809E +:10B9F00001211520FFF7FAFE0120F6E60123D3E727 +:10BA00000020F2E670B5664C206990F8E410FE293B +:10BA100078D1A178002975D190F87F2001231946AB +:10BA20007030F5F7AFFA00286CD1206990F88C11CE +:10BA300049B10021A0F89C1090F88D1180F8E61013 +:10BA4000002102205BE090F87D200123042170306A +:10BA5000F5F798FA0546FFF76FFF002852D1284600 +:10BA600000F00CFF00284DD120690123002190F83F +:10BA70007C207030F5F786FA78B120690123042123 +:10BA800090F87D207030F5F77DFA30B9206990F894 +:10BA9000960010B10021122031E0206990F87C203E +:10BAA0000A2A0DD0002D2DD1012300217030F5F789 +:10BAB00069FA78B1206990F8A81104290AD105E043 +:10BAC00010F8E21F01710021072018E090F8AA0089 +:10BAD000800718D0FFF7A1FE002813D120690123A9 +:10BAE000002190F87C207030F5F74CFA002809D03E +:10BAF000206990F8A001002804D00021FF20BDE8B3 +:10BB0000704073E609E000210C20FFF76FFE20690A +:10BB100010F8AA1F41F0010101701DE43EB5054671 +:10BB20006846FDF7ABFC00B9FFDF22220021009838 +:10BB3000F2F7ADFC0321009802F096FB0098017823 +:10BB400021F010010170294602F0B3FB144C0D2DB9 +:10BB500043D00BDCA5F102050B2D19D2DFE805F06F +:10BB600022184B191922185718192700152D5FD0C4 +:10BB700008DC112D28D0122D0BD0132D09D0142D37 +:10BB800006D155E0162D2CD0172D6AD0FF2D74D07C +:10BB9000FFDFFDF786FC002800D1FFDF3EBD00007F +:10BBA000000100202169009891F8E61017E0E26892 +:10BBB00000981178017191884171090A8171518849 +:10BBC000C171090A0172E4E70321009802F072FCD6 +:10BBD0000621009802F072FCDBE700980621017153 +:10BBE000D7E70098D4F8101091F8C221027191F8AB +:10BBF000C3114171CDE72169009801F5887102F008 +:10BC0000D7FB21690098DC3102F0DCFBC1E7FA497F +:10BC1000D1E90001CDE90101206901A990F8B00046 +:10BC200000F025008DF80400009802F006FCB0E753 +:10BC30002069B0F84810009802F0D6FB2069B0F8EF +:10BC4000E810009802F0D4FB2069B0F84410009886 +:10BC500002F0D2FB2069B0F8E610009802F0D0FBA9 +:10BC600097E7216991F8C00100280098BCD111F82C +:10BC7000642F02714978BCE7FFE7206990F8A3219F +:10BC8000D0F8A411009802F022FB82E7DB4810B53F +:10BC9000006990F8821041B990F87D2001230621B7 +:10BCA0007030F5F76FF9002800D001209DE570B5E0 +:10BCB000D24D286990F8801039B1012905D00229A8 +:10BCC00006D0032904D0FFDF03E4B0F8F41037E016 +:10BCD00090F87F10082936D0B0F89810B0F89A2064 +:10BCE00000248B1C9A4206D3511A891E0C04240C82 +:10BCF00001D0641EA4B290F8961039B190F87C205F +:10BD0000012309217030F5F73DF940B3FFF7BEFF7D +:10BD100078B129690020B1F89020B1F88E108B1C01 +:10BD20009A4203D3501A801E00D0401EA04200D277 +:10BD300084B20CB1641EA4B22869B0F8F410214496 +:10BD4000A0F8F0102DE5B0F898100329BDD330F815 +:10BD5000701F428D1144491CA0F8801021E5002479 +:10BD6000EAE770B50C4605464FF4087200212046FC +:10BD7000F2F78DFB258014E5F8F7A2B92DE9F04123 +:10BD80000D4607460721F8F791F8041E3CD094F8B9 +:10BD9000C8010026A8B16E70092028700BE0268427 +:10BDA00084F8C861D4F8CA016860D4F8CE01A860EC +:10BDB000B4F8D201A88194F8C8010028EFD12E71FF +:10BDC000AEE094F8D40190B394F8D4010D2813D0C8 +:10BDD0000E2801D0FFDFA3E02088F8F798F9074686 +:10BDE000F7F745FE78B96E700E20287094F8D601EA +:10BDF00028712088E88014E02088F8F788F9074641 +:10BE0000F7F735FE10B10020BDE8F0816E700D200F +:10BE1000287094F8D60128712088E88094F8DA0117 +:10BE2000287284F8D4613846F7F71BFE78E0FFE704 +:10BE300094F80A0230B16E701020287084F80A62FB +:10BE4000AF806DE094F8DC0190B16E700A2028702C +:10BE50002088A880D4F8E011C5F80610D4F8E411C1 +:10BE6000C5F80A10B4F8E801E88184F8DC6157E00D +:10BE700094F8040270B16E701A20287005E000BFBB +:10BE800084F80462D4F80602686094F8040200287A +:10BE9000F6D145E094F8EA0188B16E70152028705B +:10BEA00008E000BF84F8EA6104F5F6702B1D07C8AE +:10BEB00083E8070094F8EA010028F3D130E094F811 +:10BEC000F80170B16E701C20287084F8F861D4F805 +:10BED000FA016860D4F8FE01A860B4F80202A881F3 +:10BEE0001EE094F80C0238B11D20287084F80C6212 +:10BEF000D4F80E02686013E094F81202002883D090 +:10BF00006E701620287007E084F81262D4F81402CC +:10BF10006860B4F81802288194F812020028F3D15E +:10BF2000012071E735480021C16101620846704770 +:10BF300030B5324D0C46E860FFF7F4FF00B1FFDF8B +:10BF40002C7130BD002180F87C1080F87D1080F8C5 +:10BF5000801090F8FB1009B1022100E00321FEF7E8 +:10BF60003FBC2DE9F041254C0546206909B100216F +:10BF700004E0B0F80611B0F8F6201144A0F806115C +:10BF800090F88C1139B990F87F2001231946703050 +:10BF9000F4F7F8FF30B1206930F89C1FB0F85A2050 +:10BFA00011440180206990F8A23033B1B0F89E109E +:10BFB000B0F8F6201144A0F89E1090F9A670002F5A +:10BFC00006DDB0F8A410B0F8F6201144A0F8A410D3 +:10BFD00001213D2615B180F88D6017E02278022AF4 +:10BFE0000ED0012A15D0A2784AB380F88C1012F036 +:10BFF000140F11D01E2117E0FC6202000001002086 +:10C0000090F8E620062A3CD016223AE080F88C1000 +:10C0100044E090F88E2134E0110702D580F88D605D +:10C020003CE0910603D5232180F88D1036E090077F +:10C0300000D1FFDF21692A2081F88D002AE02BB191 +:10C04000B0F89E20B0F8A0309A4210D2002F05DD43 +:10C05000B0F8A420B0F8A0309A4208D2B0F89C30D2 +:10C06000B0F89A20934204D390F88C310BB122227D +:10C0700007E090F880303BB1B0F89830934209D394 +:10C08000082280F88D20C1E7B0F89820062A01D355 +:10C090003E22F6E7206990F88C1019B12069BDE8BE +:10C0A000F0414FE7BDE8F0410021FEF799BB2DE9D3 +:10C0B000F047FF4C81460D4620690088F8F739F8B3 +:10C0C000060000D1FFDFA0782843A070A0794FF0D0 +:10C0D00000058006206904D5A0F8985080F8045126 +:10C0E00003E030F8981F491C0180FFF7CFFD4FF0A7 +:10C0F000010830B3E088000506D5206990F8821069 +:10C1000011B1A0F88E501CE02069B0F88E10491CC7 +:10C1100089B2A0F88E10B0F890208A4201D3531A49 +:10C1200000E0002327897F1DBB4201D880F896805C +:10C13000914206D3A0F88E5080F80A822079E6F763 +:10C14000E3FEA0794FF0020710F0600F0ED02069D7 +:10C1500090F8801011B1032908D102E080F88080A6 +:10C1600001E080F880700121FEF73AFB206990F829 +:10C170008010012904D1E188C90501D580F88070BB +:10C18000B9F1000F72D1E188890502D5A0F81851E4 +:10C1900004E0B0F81811491CA0F8181100F035FBA4 +:10C1A000FEF719FDFFF72EFC2769B7F8F800401CD1 +:10C1B000A7F8F80097F8FC0028B100F01BFFA8B121 +:10C1C000A7F8F85012E000F012FF08B1A7F8F850F5 +:10C1D00000F015FF50B197F80401401CC0B287F879 +:10C1E0000401022802D927F8F85F3D732069012372 +:10C1F000002190F87D207030F4F7C4FE20B920694A +:10C2000090F87D000C2859D120690123002190F875 +:10C210007C207030F4F7B6FE48B32069012300217A +:10C2200090F87F207030F4F7ADFE00B3206990F8ED +:10C230008010022942D190F80401C0B93046F7F7C6 +:10C24000E6F9A0B1216991F8E400FE2836D1B1F8F1 +:10C25000F200012832D981F8FA80B1F89A00B1F8D9 +:10C260009820831E9A4203DB012004E032E025E09F +:10C27000801A401E80B2B1F8F82023899A4201D377 +:10C28000012202E09A1A521C92B2904200D9104642 +:10C29000012801D181F8FA5091F86F2092B98A6E85 +:10C2A00082B1B1F89420B1F87010511A09B2002986 +:10C2B00008DD884200DB084680B203E021690120E6 +:10C2C00081F8FA502169B1F870201044A1F8F40007 +:10C2D000FFF7EDFCE088C0F340214846FFF741FE40 +:10C2E000206980F8FB50BDE8F047FDF7FCB87049C5 +:10C2F00002468878CB78184312D10846006942B1CB +:10C300008979090703D590F87F00082808D0012013 +:10C310007047B0F84C10028E914201D8FEF7B1B9C7 +:10C320000020704770B5624C05460E46E0882843F1 +:10C33000E080A80703D5E80700D0FFDF6661EA07C1 +:10C340004FF000014FF001001AD0A661F278062AE2 +:10C3500002D00B2A14D10AE0226992F87D30172B03 +:10C360000ED10023E2E92E3302F8370C08E02269EF +:10C3700092F87D30112B03D182F8811082F8A80049 +:10C38000AA0718D56269D278052A02D00B2A12D1E1 +:10C390000AE0216991F87D20152A0CD10022E1E9FB +:10C3A000302201F83E0C06E0206990F87D20102A2A +:10C3B00001D180F88210280601D50820E07083E4BE +:10C3C0002DE9F84301273A4C002567F30701E58082 +:10C3D000A570E570257020618946804680F8FB7065 +:10C3E0000088F7F7A6FE00B9FFDF20690088FDF797 +:10C3F00042F820690088FDF764F82069B0F8F2106F +:10C4000071B190F8E410FE290FD190F88C1189B128 +:10C4100090F87F20012319467030F4F7B3FD78B10E +:10C42000206990F8E400FE2804D0206990F8E40028 +:10C43000FFF774FB206990F8FD1089B1258118E0A1 +:10C440002069A0F89C5090F88D1180F8E61000212A +:10C450000220FFF7CBF9206980F8FA500220E7E7C5 +:10C4600090F8C81119B9018C8288914200D881884E +:10C47000218130F8F61F491E8EB230F8021F314478 +:10C4800020F86019018831440180FFF7FFFB20B1DB +:10C49000206930F88E1F314401802069B0F8F21015 +:10C4A000012902D8491CA0F8F2102EB102E00000C8 +:10C4B0000001002080F8045180F8FA5090F87D10B7 +:10C4C0000B2901D00C2916D1B0F87020B0F8AA3190 +:10C4D000D21A12B2002A0EDBD0F8AC11816090F8AB +:10C4E000B01101730321F4F773F8206980F87D50CF +:10C4F00080F8B27026E0242910D1B0F87010B0F89E +:10C50000AA21891A09B2002908DB90F8C001FFF7B7 +:10C510004BF9206900F87D5F857613E090F87C1078 +:10C52000242901D025290DD1B0F87010B0F8AA0146 +:10C53000081A00B2002805DB0120FFF735F9206951 +:10C5400080F87C5020690146B0F8F6207030F4F78E +:10C55000B2FAFC480090FC4BFC4A4146484600F0C9 +:10C560007DFC216A11B16078FCF7B5FA20690123DE +:10C57000052190F87D207030F4F704FD002803D0E9 +:10C58000BDE8F84300F0FDB9BDE8F88300F015BD43 +:10C59000EF49C8617047EE48C069002800D001200B +:10C5A0007047EB4A50701162704710B5044600881E +:10C5B000A4F8CC01B4F8B001A4F8CE01B4F8B201EB +:10C5C000A4F8D001B4F8B401A4F8D201012084F891 +:10C5D000C801DF480079E6F797FC02212046F3F70F +:10C5E000F7FF002004F87D0F0320E07010BD401A13 +:10C5F00000B247F6FE71884201DC002801DC012010 +:10C6000070470020704710B5012808D0022808D0D4 +:10C61000042808D0082806D0FFDF204610BD0124DA +:10C62000FBE70224F9E70324F7E7C9480021006982 +:10C6300020F8A41F8178491C81707047C44800B558 +:10C64000016911F8A60F401E40B20870002800DAF8 +:10C65000FFDF00BDBE482721006980F87C10002163 +:10C6600080F8A011704710B5B94C206990F8A81156 +:10C67000042916D190F87C20012300217030F4F7B2 +:10C6800081FC00B9FFDF206990F8AA10890703D464 +:10C69000062180F87C1004E0002180F8A21080F8C8 +:10C6A000A811206990F87E00800707D5FFF7C6FF24 +:10C6B000206910F87E1F21F00201017010BDA4490D +:10C6C00010B5096991F87C200A2A09D191F8E22075 +:10C6D000824205D1002081F87C0081F8A20010BDC3 +:10C6E00091F87E20130706D522F0080081F87E001D +:10C6F000BDE81040A2E7FF2801D0FFDF10BDBDE874 +:10C700001040A7E7F8B5924C01230A21206990F860 +:10C710007C207030F4F736FC38B3A06901F07CFE61 +:10C72000C8B1A06901F072FE0746A06901F072FE6F +:10C730000646A06901F068FE0546A06901F068FEA2 +:10C7400001460097206933462A46303001F059FFF0 +:10C75000206901F082FF2169002081F8A20081F8A0 +:10C760007C00BDE8F840FEF7D2BBA07840F00100A5 +:10C77000A070F8BD10B5764C01230021206990F817 +:10C780007D207030F4F7FEFB30B1FFF74EFF2169DA +:10C79000102081F87D0010BD20690123052190F84B +:10C7A0007D207030F4F7EEFB08B1082000E0012096 +:10C7B000A07010BD70B5664C01230021206990F86F +:10C7C0007D207030F4F7DEFB012588B1A06901F00F +:10C7D000C4FD2169A1F8AA01B1F87010FFF707FFA5 +:10C7E00040B12069282180F88D1080F88C50E6E552 +:10C7F000A570E4E52169A06901F5D67101F0A8FDF5 +:10C8000021690B2081F87D00D9E510B5FEF779FF8D +:10C81000FEF760FE4E4CA079400708D5A07830B9ED +:10C82000206990F87F00072801D101202070FEF7D1 +:10C8300071FAA079C00609D5A07838B9206990F8B6 +:10C840007D100B2902D10C2180F87D10E0780007C3 +:10C850000ED520690123052190F87D207030F4F772 +:10C8600091FB30B10820A0702169002081F8D4012B +:10C8700010BDBDE81040002000F0C4BB10B5344C22 +:10C88000216991F87D2048B3102A06D0142A07D0D8 +:10C89000152A1AD01B2A2CD11AE001210B2019E0ED +:10C8A000FAF702FE0C2817D32069082100F58870DA +:10C8B000FAF7FEFD28B120690421DC30FAF7F8FD13 +:10C8C00000B9FFDF0121042004E000F017F803E0C5 +:10C8D00001210620FEF78AFF012010BD212A08D180 +:10C8E00091F8970038B991F8C00110B191F8C101E1 +:10C8F00008B1002010BD01211720EBE770B5144CE2 +:10C900000025206990F88F1101290AD002292ED123 +:10C9100090F8A810F1B1062180F8E610012102205C +:10C9200020E090F8D411002921D100F1C80300F5CE +:10C930008471002200F5C870F4F796FA01210520F1 +:10C9400010E00000AFC00100EFC2010025C30100EC +:10C950000001002090F8B000400701D5112000E050 +:10C960000D200121FEF742FF206980F88F5126E556 +:10C9700030B5FB4C05462078002818BFFFDFE57175 +:10C9800030BDF7490120887170472DE9F14FF54D11 +:10C990002846446804F1700794F86510608F94F895 +:10C9A0008280268F082978D0F4F797FBB8F1000F22 +:10C9B00004BF001D80B2864238BF304600F0FF0839 +:10C9C000DFF89C93E848C9F8240009F134006E6848 +:10C9D000406800F1700A90F882B096F86510358FC3 +:10C9E000708F08295DD0F4F778FB00BFBBF1000F12 +:10C9F00004BF001D80B2854238BF2846C0B29AF8F5 +:10CA00001210002918BF04210844C0B296F865101E +:10CA1000FBF735FCB87C002847D007F15801D24815 +:10CA200091E80E1000F5027585E80E10B96EC0F899 +:10CA30002112F96EC0F8251200F58170FBF7DBFFBB +:10CA4000C848007800280CBF0120002080F00101B8 +:10CA5000C6480176D7E91412C0E90412A0F5837222 +:10CA6000D9F82410FBF7F5F994F86500012808BF00 +:10CA700000220CD0022808BF012208D0042808BFD9 +:10CA8000032204D008281ABFFFDF002202224146F9 +:10CA90000120FBF7F9F90EE0FFE70421F4F71DFB95 +:10CAA00084E70421F4F719FBA0E7D9F82400FBF789 +:10CAB000A2FFFBF715FA009850B994F8650094F8B6 +:10CAC000661010F00C0F08BF00219620FBF7B4FF92 +:10CAD00094F8642001210020FCF76BF894F82C00F6 +:10CAE000012808BFFCF735F8022089F80000FCF7A0 +:10CAF0003FFC002818BFFFDFBDE8F88F2DE9F04F9D +:10CB0000DFF860A28BB050469AF800204068AAF186 +:10CB10001401059190F8751000F1700504464FF06E +:10CB200008080127AAF13406A1B3012900F0068103 +:10CB3000022900F00781032918BFFFDF00F01881E8 +:10CB4000306A0423017821F008010170AA7908EA0B +:10CB5000C202114321F004010170EA7903EA820262 +:10CB6000114321F01001017095F80590F06AF6F775 +:10CB70005EFD8046FCF7C9FCB9F1020F00F00081B0 +:10CB8000B9F1010F00F00081B9F1030F00F000814D +:10CB900000F003B9FFE795F80CC04FF002094FF021 +:10CBA000000BBCF1240F1CBF6B7B242B08D0BCF105 +:10CBB0001F0F18BFBCF1200F2AD0222B4DD077E0D9 +:10CBC00094F864109AB190F8AC01002874D0082948 +:10CBD00018BF042969D0082818BF042865D0012986 +:10CBE00018BF012853D000BF4FF0020164E090F855 +:10CBF0001201002860D0082918BF042955D0082840 +:10CC000018BF042851D0012918BF01283FD0EBE7F5 +:10CC1000222B22D0002A4BD090F8C20194F8641045 +:10CC200010F0040F18BF40460CD0082918BF042983 +:10CC30003BD0082818BF042837D0012918BF012885 +:10CC400025D0D1E710F0010F18BF3846EDD110F014 +:10CC5000020F18BF4846E8D12EE04AB390F8C2212F +:10CC600090F85D0094F8641002EA000010F0040FE0 +:10CC700018BF40460ED0082918BF042915D008282F +:10CC800018BF042811D0012918BF0128ACD14FF0DA +:10CC9000010111E010F0010F18BF3846EBD110F080 +:10CCA000020F18BF4846E6D106E04FF0080103E046 +:10CCB00094F864100429F8D0A08E11F00C0F18BF5E +:10CCC0004FF42960F4F709FA218E814238BF0846F3 +:10CCD000ADF80400A4F84C000598FCF7F5FB60B132 +:10CCE0007289316A42F48062728172694FF48060A5 +:10CCF000904703206871EF7022E709AA01A9F06A42 +:10CD0000F6F7CFFB306210B195F8371021B10598D6 +:10CD1000FCF7AEFB6F7113E79DF8241031B9A0F852 +:10CD200000B080F802B0012101F09EFABDF80410B5 +:10CD3000306A01F0C7FB85F8059001E70598FCF71C +:10CD400097FBFDE6B4F84C00ADF8040009AA01A970 +:10CD5000F06AF6F7A6FB3062002808BFFFDFEFE6B7 +:10CD60002401002058010020300D0020380F002041 +:10CD70000598FCF7A9FB002808BFFFDFE0E600BF2D +:10CD800030EA080009D106E030EA080005D102E0E7 +:10CD9000B8F1000F01D0012100E00021306A0278D3 +:10CDA00042EA01110170697C00291CBF69790129DF +:10CDB0003BD005F15801FD4891E80E1000F50278CE +:10CDC00088E80E10A96EC0F82112E96EC0F825128D +:10CDD00000F58170FBF70FFE9AF8000000280CBFE9 +:10CDE00001210021F2480176D5E91212C0E90412AE +:10CDF000A0F58371326AFBF72CF894F864000128DF +:10CE000008BF00220CD0022808BF012208D0042845 +:10CE100008BF032204D008281ABFFFDF0022022225 +:10CE2000FB210020FBF730F803E0FBF7E4FDFBF704 +:10CE300057F8012194F865200846FBF7BAFE3771D0 +:10CE4000306A0188F181807830743770FCF799FA84 +:10CE5000002818BFFFDF0BB0BDE8F08F2DE9F043CD +:10CE6000D44D87B081462878DDF838801E461746B5 +:10CE70000C4628B9002F1CBF002EB8F1000F00D1BE +:10CE8000FFDFC5F81C80C5E90D94C5E905764FF0B4 +:10CE90000000A8716871E870A8702871C64E68819A +:10CEA000A881307804F170072088F7F742F9E8622A +:10CEB0002088F7F72CF92863FBF705FA94F9670047 +:10CEC000FBF7DAFA04F11200FBF76CFD04F10E0037 +:10CED000FBF7D8FA307800280CBF03200120FBF7BD +:10CEE00087FDB64890E80E108DE80E10D0E90410CA +:10CEF000CDE90410307800280CBFB148B148049047 +:10CF00006846FBF763FDF87EFBF7C4FAFBF76AFDA2 +:10CF100094F86F0078B9A06E68B1B88C39888842EF +:10CF200009D1B4F86C1001220844B88494F86E005A +:10CF3000A16EF8F7D8FE3078002804BFFF2094F8DF +:10CF400064401AD094F8651097F81280258F608F8E +:10CF5000082926D0F4F7C1F8B8F1000F04BF001D6E +:10CF600080B2854238BF2846C0B2B97C002918BFBC +:10CF70000421084494F86540C0B22146FBF77FF9CC +:10CF80003078214688B10120FBF74BFB7068D0F860 +:10CF90000001FBF733FD0120FFF7F7FC07B0BDE808 +:10CFA000F0830421F4F799F8D6E70020FBF739FB6A +:10CFB000FFF7A4FD07B0BDE8F0837F4800B5017816 +:10CFC0003438007819B1022818BFFFDF00BD0128EE +:10CFD00018BFFFDF00BD774810B50078022818BFE2 +:10CFE000FFDFBDE8104000F070BA00F06EBA714883 +:10CFF000007970476F488089C0F3002070476D4802 +:10D00000C07870472DE9F04706006B48694D4068CD +:10D0100000F17004686A90F8019018BF012E03D1E6 +:10D02000296B07F0F1FF6870687800274FF001085E +:10D03000A0B101283CD0022860D003281CBFFFDF2C +:10D04000BDE8F087012E08BFBDE8F087286BF6F732 +:10D05000E3FCE879BDE8F047E5F756BF012E14D0B0 +:10D06000A86A002808BFFFDF2889C21CD5E909107B +:10D07000F1F7E3F9A86A686201224946286BF6F7DE +:10D0800047FB022E08BFBDE8F087D4E91401401C1D +:10D0900041F10001C4E91401E079012801D1E771EF +:10D0A00001E084F80780E879BDE8F047E5F72CBF98 +:10D0B000012E14D0A86A002808BFFFDF2889C21CEF +:10D0C000D5E90910F1F7B9F9A86A68620022494662 +:10D0D000286BF6F71DFB022E08BFBDE8F087D4E9E8 +:10D0E0001410491C40F10000C4E91410E079012833 +:10D0F0000CBFE77184F80780BDE8F087012E06D0E9 +:10D10000286BF6F789FC022E08BFBDE8F087D4E94A +:10D110001410491C40F10000C4E91410E079012802 +:10D12000BFD1BCE72DE9F041234D2846A5F13404D9 +:10D13000406800F170062078012818BFFFDFB07842 +:10D140000127002158B1B1706289042042F0040225 +:10D150006281626990472878002818BF3771216A78 +:10D160000322087832EA000009D1628912F4806F44 +:10D1700005D042F002026281626902209047A169F3 +:10D180000020884760B3607950BB287818B30E48F8 +:10D19000007810F0100F04D10449097811F0100F35 +:10D1A0001ED06189E1B9A16AA9B90FE0300D002054 +:10D1B000380F0020240100205801002004630200E1 +:10D1C000BB220200A7A8010032010020218911B171 +:10D1D00010F0100F04D0BDE8F0410020FFF7D5BBE0 +:10D1E000BDE8F04100F071B92DE9F05FCC4E044686 +:10D1F0003046A6F134054068002700F1700A28780F +:10D20000B846022818BFFFDFA889FF2240F400704B +:10D21000A881706890F864101046FBF730F89AF80F +:10D2200012004FF00109002C00F0F080FAF77DFEAB +:10D23000FAF76BFE90B99AF8120078B1686A4178F3 +:10D2400061B100789AF80710C0F3C000884205D198 +:10D2500085F80290BDE8F05F00F037B9686A417860 +:10D260002981002908BFAF6203D0286BF6F70AFABC +:10D27000A862A88940F02000A881EF70706800F1D2 +:10D28000700B044690F82C0001281BD1FBF757FCCB +:10D2900059462046F3F729FEA0B13078002870687F +:10D2A0000CBF00F59A7000F50170218841809BF851 +:10D2B000081001719BF80910417180F80090E8791D +:10D2C000E5F722FE686A9AF806100078C0F380003D +:10D2D00088423AD0706800F1700490F87500002818 +:10D2E0002FD002284AD06771307800281CBF2079DF +:10D2F000002809D027716A89394642F010026A81F4 +:10D300006A694FF010009047E078A0B1E770FCF731 +:10D31000EAF8002808BFFFDF08206A89002142F0F0 +:10D3200008026A816A699047D4E91210491C40F1E9 +:10D330000000C4E91210A07901280CBFA77184F87D +:10D340000690A88940F48070A881696A9AF807302D +:10D350000878C0F3C0029A424DD1726800F0030011 +:10D3600002F17004012818BF02282DD003281CBF29 +:10D37000687940F0040012D068713CE0E86AF6F782 +:10D38000BCF8002808BFFFDFD4E91210491C40F1A7 +:10D390000000C4E91210E879E5F7B6FDA3E784F8C8 +:10D3A0000290AA89484642F40062AA816A8942F042 +:10D3B00001026A816A699047E079012801D1E77129 +:10D3C00019E084F8079016E04878D8B1A98941F4AB +:10D3D0000061A981A96A71B1FB2884BF687940F016 +:10D3E0001000C9D8A879002808BFC84603D08020FB +:10D3F0006A69002190470120A9698847E0B36879EC +:10D40000A0B13AE0E0790128DBD1D8E7002818BFC5 +:10D41000FAF7C5FDA88940F04000A881E97801200D +:10D42000491CC9B2E97001292DD8E5E7307890B9D7 +:10D430003C48007810F0100F04D13B49097811F0F6 +:10D44000100F1AD06989B9B9A96A21B9298911B10E +:10D4500010F0100F11D0B8F1000F1CBF0120FFF722 +:10D46000D1FDFFF74BFBB8F1000F08BFBDE8F09FFF +:10D470000220BDE8F05FC5E5FFE7B8F1000F1CBF73 +:10D480000020FFF7BFFDBDE8F05F00F01EB870B5EB +:10D490000D4606462248224900784C6850B1FAF7FA +:10D4A000F7FD034694F8642029463046BDE87040F5 +:10D4B000FDF78BBAFAF7ECFD034694F86420294691 +:10D4C0003046BDE8704004F0FCBE154910B54C680C +:10D4D000FBF714FBFBF7F3FAFBF7BCF9FBF768FA71 +:10D4E000FAF7FEFC94F82C00012808BFFBF727FB95 +:10D4F00094F86F0038B9A06E28B1002294F86E003D +:10D500001146F8F7F0FB094C00216269A0899047A9 +:10D51000E2696179A07890470020207010BD00007A +:10D520005801002032010020300D0020240100208D +:10D530002DE9F047FA4F894680463D782C0014D0FB +:10D540000126012D11DB601EC4B207EBC40090F868 +:10D550005311414506D10622494600F5AA70F0F75D +:10D560003FFF28B1761CAE42EDDD1020BDE8F0870C +:10D570002046BDE8F087EA498A78824286BF08449F +:10D5800090F843010020704710B540F2D3120021FB +:10D59000E348F0F77CFF0822FF21E248F0F777FF2D +:10D5A000E1480021417081704FF46171818010BDAC +:10D5B0002DE9F0410E460546FFF7BAFFD84C10287A +:10D5C00016D004EBC00191F85A0110F0010F1CBFF6 +:10D5D0000120BDE8F081607808283CBF012081F877 +:10D5E0005A011CD26078401C60700120BDE8F081B7 +:10D5F0006078082813D222780127501C207004EB91 +:10D60000C2083068C8F85401B088A8F85801102A38 +:10D6100028BFFFDF88F8535188F85A71E2E70020ED +:10D62000BDE8F081C04988707047BF488078704776 +:10D630002DE9F041BA4D00272878401E44B2002C55 +:10D6400030DB00BF05EBC40090F85A0110F0010F69 +:10D6500024D06878E6B2401E687005EBC6083046F4 +:10D6600088F85A7100F0E8FA102817D12878401E7F +:10D67000C0B22870B04211D005EBC001D1F85301FF +:10D68000C8F85301D1F85701C8F85701287800F0BD +:10D69000D3FA10281CBF284480F80361601E44B2EE +:10D6A000002CCFDAA0488770BDE8F0819C498A78C9 +:10D6B000824286BF01EB0010C01C002070472DE99C +:10D6C000F0470127994690463D460026FFF730FF78 +:10D6D000102820D0924C04EBC00191F85A1101F0AF +:10D6E000010600F0A9FA102815D0B9F1000F18BFF3 +:10D6F00089F80000A17881420DD904EB001111F1E5 +:10D70000030F08D0204490F84B5190F83B010128BA +:10D710000CBF0127002748EA060047EA0501084038 +:10D72000BDE8F0872DE9F05F1F4690468946064622 +:10D73000FFF7FEFE7A4C054610282ED000F07CFA4A +:10D7400010281CBF1220BDE8F09FA07808283ED208 +:10D75000A6781022701CA07004EB061909F10300D2 +:10D760004146F3F768FB09F1830010223946F3F7CD +:10D7700062FB10213846F3F74BFB3444102184F848 +:10D7800043014046F3F744FB84F84B0184F803510E +:10D79000002084F83B01BDE8F09FA078082816D24D +:10D7A00025784FF0000A681C207004EBC50BD9F8EF +:10D7B0000000CBF85401B9F80400ABF85801102D63 +:10D7C00028BFFFDF8BF853618BF85AA1C0E7072011 +:10D7D000BDE8F09F2DE9F041514CA078401E45B2C4 +:10D7E000002DB8BFBDE8F081EAB2A078401EC1B2FA +:10D7F000A17054FA85F090F803618A423DD004EBA1 +:10D80000011004EB0213D0F803C0C3F803C0D0F832 +:10D8100007C0C3F807C0D0F80BC0C3F80BC0D0F8DE +:10D820000FC0C3F80FC0D0F883C0C3F883C0D0F8CE +:10D8300087C0C3F887C0D0F88BC0C3F88BC0D0F8BE +:10D840008F00C3F88F006318A01801EB410193F813 +:10D8500003C102EB420204EB410180F803C104EB77 +:10D860004202D1F80BC1C2F80BC1B1F80F11A2F8F6 +:10D870000F1193F83B1180F83B1104EBC60797F8A2 +:10D880005A0110F0010F1CD1304600F0D5F91028D4 +:10D8900017D12078401EC0B22070B04211D004EBE6 +:10D8A000C000D0F85311C7F85311D0F85701C7F88A +:10D8B0005701207800F0C0F910281CBF204480F8E0 +:10D8C0000361681E45B2002D8EDABDE8F08116496D +:10D8D0004870704714484078704738B14AF2B81120 +:10D8E000884203D810498880012070470020704783 +:10D8F0000D488088704710B5FFF71AFE102804D035 +:10D9000000F09AF9102818BF10BD082010BD044976 +:10D910008A78824286BF01EB001083300020704776 +:10D92000600F00206C01002060010020FE4B93F886 +:10D9300002C084459CBF00207047184490F8030142 +:10D9400003EBC00090F853310B70D0F85411116004 +:10D95000B0F85801908001207047F34A114491F8C3 +:10D960000321F2490A700268C1F8062080884881C4 +:10D97000704770B516460C460546FBF7D5F8FAF722 +:10D98000C4F9EA48407868B1E748817851B12A196A +:10D99000002E0CBF8330C01CFAF791F9FAF7D8F9C2 +:10D9A000012070BD002070BD10B5FAF7FFF9002806 +:10D9B00004BFFF2010BDBDE81040FAF71DBAFAF70A +:10D9C000F5B9D9498A7882429CBF00207047084443 +:10D9D00090F8030101EBC00090F85A0100F001003B +:10D9E00070472DE9F047D04D00273E4628780028A3 +:10D9F00086BF4FF01009DFF83883BDE8F087AC78B8 +:10DA000021000CD00122012909DB601EC4B22819B3 +:10DA100090F80331B34203D0521C8A42F5DD4C46E4 +:10DA2000A14286BF05EB0410C01C002005EBC60A0E +:10DA30009AF85A1111F0010F16D050B1102C04D0E1 +:10DA4000291991F83B11012903D01021F3F7E0F9CE +:10DA500050B108F8074038467B1C9AF853210AF564 +:10DA6000AA71DFB2FAF7B5FC701CC6B22878B042D2 +:10DA7000C5D8BDE8F0872DE9F041AB4C002635460E +:10DA8000A07800288CBFAA4FBDE8F0816119C0B210 +:10DA900091F80381A84286BF04EB0510C01C00204A +:10DAA00091F83B11012903D01021F3F7B1F958B1D6 +:10DAB00004EBC800BD5590F8532100F5AA7130461B +:10DAC000731CDEB2FAF785FC681CC5B2A078A842C8 +:10DAD000DCD8BDE8F0810144934810B500EB02109A +:10DAE0000A4601218330FAF7EAF8BDE81040FAF758 +:10DAF0002FB90A468D4910B5497841B18A4B9978BA +:10DB000029B10244D81CFAF7DAF8012010BD002030 +:10DB100010BD854A01EB410102EB41010268C1F8E9 +:10DB20000B218088A1F80F0170472DE9F0417E4D4F +:10DB300007460024A878002898BFBDE8F081C0B24D +:10DB4000A04217D905EB041010F1830612D0102162 +:10DB50003046F3F75DF968B904EB440005EB400883 +:10DB600008F20B113A463046FBF74EFDB8F80F01AC +:10DB7000A8F80F01601CC4B2A878A042DFD8BDE8A5 +:10DB8000F081014610226B48F3F755B96948704798 +:10DB900065498A78824203D90A1892F843210AB16A +:10DBA0000020704700EB400001EB400000F20B103A +:10DBB00070475D498A78824206D9084490F83B0153 +:10DBC000002804BF01207047002070472DE9F04174 +:10DBD0000E460746144606213046F3F719F9524D12 +:10DBE00098B1A97871B105F59D7011F0010F18BFBA +:10DBF00000F8014FA978490804D0447000F8024F9A +:10DC0000491EFAD10120BDE8F08138463146FFF7C0 +:10DC10008FFC10280CD000F00FF8102818BF08282F +:10DC200006D0284480F83B414FF00100BDE8F08168 +:10DC30004FF00000BDE8F0813B4B10B4844698786B +:10DC400001000ED0012201290BDB401EC0B21C18BE +:10DC500094F80341644504BF10BC7047521C8A42CB +:10DC6000F3DD10BC1020704770B52F4C01466218D0 +:10DC7000A078401EC0B2A07092F8035181423CD0FF +:10DC800004EB011304EB001C01EB4101DCF8036021 +:10DC9000C3F80360DCF80760C3F80760DCF80B60CA +:10DCA000C3F80B60DCF80F60C3F80F60DCF883602A +:10DCB000C3F88360DCF88760C3F88760DCF88B60AA +:10DCC000C3F88B60DCF88FC0C3F88FC0231800EB5B +:10DCD000400093F803C104EB400082F803C104EB59 +:10DCE0004101D0F80BC1C1F80BC1B0F80F01A1F888 +:10DCF0000F0193F83B0182F83B0104EBC50696F84F +:10DD00005A0110F0010F18BF70BD2846FFF794FFAD +:10DD1000102818BF70BD2078401EC0B22070A842E5 +:10DD200008BF70BD08E00000600F00206001002007 +:10DD30006C0100203311002004EBC000D0F8531117 +:10DD4000C6F85311D0F85701C6F857012078FFF7ED +:10DD500073FF10281CBF204480F8035170BD0000E1 +:10DD60004078704730B50546007801F00F0220F08A +:10DD70000F0010432870092912D2DFE801F00507CF +:10DD800005070509050B0F0006240BE00C2409E02C +:10DD9000222407E001240020E87003E00E2401E0C3 +:10DDA0000024FFDF6C7030BD007800F00F0070477A +:10DDB0000A68C0F803208988A0F807107047D0F8D7 +:10DDC00003200A60B0F80700888070470A68C0F82E +:10DDD00009208988A0F80D107047D0F809200A6042 +:10DDE000B0F80D00888070470278402322F040028E +:10DDF00003EA81111143017070470078C0F380106D +:10DE000070470278802322F0800203EAC111114397 +:10DE1000017070470078C009704770B514460E460F +:10DE200005461F2A88BFFFDF2246314605F109005B +:10DE3000F0F703FBA01D687070BD70B544780E4606 +:10DE40000546062C38BFFFDFA01F84B21F2C88BFF9 +:10DE50001F24224605F109013046F0F7EEFA20466C +:10DE600070BD70B514460E4605461F2A88BFFFDFF9 +:10DE70002246314605F10900F0F7DFFAA01D68706F +:10DE800070BD0968C0F80F1070470A88A0F8132009 +:10DE900089784175704790F8242001F01F0122F025 +:10DEA0001F02114380F824107047072988BF0721FB +:10DEB00090F82420E02322F0E00203EA411111430C +:10DEC00080F8241070471F3008F065B810B504467C +:10DED00000F000FB002818BF204410BDC17811F0ED +:10DEE0003F0F1BBF027912F0010F0022012211F037 +:10DEF0003F0F1BBF037913F0020F002301231A44C5 +:10DF000002EB4202530011F03F0F1BBF027912F0E7 +:10DF1000080F0022012203EB420311F03F0F1BBF49 +:10DF2000027912F0040F00220122134411F03F0F76 +:10DF30001BBF027912F0200F0022012202EBC20265 +:10DF400003EB420311F03F0F1BBF027912F0100FD9 +:10DF50000022012202EB42021A4411F03F0F1BBFC4 +:10DF6000007910F0400F00200120104410F0FF0055 +:10DF700014BF012100210844C0B2704770B5027877 +:10DF8000417802F00F02082A4DD2DFE802F00408BF +:10DF90000B4C4C4C0F14881F1F280AD943E00C2946 +:10DFA00007D040E0881F1F2803D93CE0881F1F28A6 +:10DFB00039D8012070BD4A1EFE2A34D88446C07864 +:10DFC00000258209032A09D000F03F04601C884222 +:10DFD00004D86046FFF782FFA04201D9284670BDF1 +:10DFE0009CF803004FF0010610F03F0F1EBF1CF11C +:10DFF0000400007810F0100F13D06446042160462E +:10E0000000F068FA002818BF14EB0000E6D0017891 +:10E0100001F03F012529E1D280780221B1EB501FA8 +:10E02000DCD3304670BD002070BD70B5017801258D +:10E0300001F00F01002404290AD007290DD0082976 +:10E040001CBF002070BD40780E2836D0204670BD21 +:10E050004078801F1F2830D9F8E7844640789CF824 +:10E0600003108A09032AF1D001F03F06711C814296 +:10E07000ECD86046FFF732FFB042E7D89CF80300C7 +:10E0800010F03F0F1EBF1CF10400007810F0100FBD +:10E0900013D066460421604600F01CFA002818BF21 +:10E0A00016EB0000D2D0017801F03F012529CDD236 +:10E0B00080780221B1EB501FC8D3284670BD10B440 +:10E0C000017801F00F01032920D0052921D14478DE +:10E0D000B0F81910B0F81BC0B0F81730827D222CB0 +:10E0E00017D1062915D3B1F5486F98BFBCF5FA7F53 +:10E0F0000FD272B1082A98BF8A420AD28B429CBFC3 +:10E10000B0F81D00B0F5486F03D805E040780C2842 +:10E1100002D010BC0020704710BC012070472DE9D0 +:10E12000F0411F4614460D00064608BFFFDF21469A +:10E13000304600F0CFF9040008BFFFDF30193A463F +:10E140002946BDE8F041F0F778B9C07800F03F000B +:10E150007047C02202EA8111C27802F03F021143E7 +:10E16000C1707047C07880097047C9B201F00102E0 +:10E17000C1F340031A4402EB4202C1F3800303EBF4 +:10E180004202C1F3C00302EB4302C1F3001303EBED +:10E1900043031A44C1F3401303EBC30302EB4302EE +:10E1A000C1F380131A4412F0FF0202D0521CD2B203 +:10E1B0000171C37802F03F0103F0C0031943C1703D +:10E1C000511C417070472DE9F0410546C078164654 +:10E1D00000F03F041019401C0F46FF2888BFFFDFE6 +:10E1E000281932463946001DF0F727F9A019401CBE +:10E1F0006870BDE8F081C178407801F03F01401AB5 +:10E20000401E80B2704710B590F803C00B460CF06A +:10E210003F0144780CF03F0CA4EB0C0CACF1010C6A +:10E220001FFA8CF4944288BF14462BB10844011D98 +:10E2300022461846F0F701F9204610BD4078704795 +:10E2400000B5027801F0030322F003021A430270C2 +:10E25000012914BF0229002104D0032916BFFFDFC2 +:10E26000012100BD417000BD00B5027801F003033B +:10E2700022F003021A430270012914BF022900216F +:10E2800004D0032916BFFFDF012100BD417000BD8E +:10E29000007800F003007047417841B1C078192838 +:10E2A00003D2BC4A105C884201D101207047002093 +:10E2B000704730B501240546C17019293CBFB548E7 +:10E2C000445C02D3FF2918BFFFDF6C7030BD70B50E +:10E2D00015460E4604461B2A88BFFFDF65702A4696 +:10E2E0003146E01CBDE87040F0F7A7B8B0F8070071 +:10E2F0007047B0F809007047C172090A017370478E +:10E30000B0F80B00704730B4B0F80720B0F809C07F +:10E31000B0F805300179941F40F67A45AC4298BFB9 +:10E32000BCF5FA7F0ED269B1082998BF914209D293 +:10E3300093429FBFB0F80B00B0F5486F012030BC8E +:10E3400098BF7047002030BC7047001D07F023BE07 +:10E35000021D0846114607F01EBEB0F809007047BE +:10E36000007970470A684260496881607047426876 +:10E370000A60806848607047098881817047808999 +:10E38000088070470A68C0F80E204968C0F812106B +:10E390007047D0F80E200A60D0F81200486070472D +:10E3A0000968C0F816107047D0F81600086070476A +:10E3B0000A68426049688160704742680A60806804 +:10E3C000486070470968C1607047C068086070475E +:10E3D000007970470A684260496881607047426806 +:10E3E0000A608068486070470171090A417170478E +:10E3F0008171090AC17170470172090A417270473F +:10E400008172090AC172704780887047C08870475E +:10E41000008970474089704701891B2924BF4189C1 +:10E42000B1F5A47F07D381881B2921BFC088B0F52F +:10E43000A47F01207047002070470A684260496845 +:10E440008160704742680A6080684860704701795F +:10E4500011F0070F1BBF407910F0070F00200120BB +:10E460007047017911F0070F1BBF407910F0070FBB +:10E470000020012070470171704700797047417199 +:10E480007047407970478171090AC1717047C0882F +:10E4900070470179407901F007023F498A5C012AFF +:10E4A00006D800F00700085C01289CBF01207047D7 +:10E4B00000207047017170470079704741717047C3 +:10E4C0004079704730B50C460546FB2988BFFFDF11 +:10E4D0006C7030BDC378024613F03F0008BF704730 +:10E4E0000520127903F03F0312F0010F37D0002905 +:10E4F00014BF0B20704700BF12F0020F32D0012969 +:10E5000014BF801D704700BF12F0040F2DD00229E8 +:10E5100014BF401C704700BF12F0080F28D0032919 +:10E5200014BF801C704700BF12F0100F23D00429C5 +:10E5300014BFC01C704700BF12F0200F1ED0052969 +:10E540001ABF1230C0B2704712F0400F19D006291E +:10E550001ABF401CC0B27047072918D114E0002927 +:10E56000CAD114E00129CFD111E00229D4D10EE0A3 +:10E570000329D9D10BE00429DED108E00529E3D134 +:10E5800005E00629E8D102E0834288BF70470020F9 +:10E5900070470000246302001C63020030B490F84E +:10E5A00064508C88B1F808C015F00C0F1BD000BF68 +:10E5B000B4F5296F98BF4FF4296490F8655015F0B1 +:10E5C0000C0F17D0BCF5296F98BF4FF4296C4A88FF +:10E5D000C988A0F84420A0F84810A0F84640A0F848 +:10E5E0004AC030BC7047002B1CBF157815F00C0FCB +:10E5F000DED1E2E7002B1CBF527812F00C0FE1D104 +:10E60000E5E7DDF800C08181C2810382A0F812C075 +:10E6100070471B2202838282C281828142800281F2 +:10E62000028042848284828359B14FF429614183FC +:10E63000C18241820182C18041818180C184018582 +:10E6400070474FF4A4714183C18241820182C1802D +:10E6500041818180C18401857047F0B4B0F84820C1 +:10E66000818F468EC58E8A4228BF0A4690F8651073 +:10E670004FF0000311F00C0F18BF4FF4296106D1C1 +:10E68000B0F84AC0B0F840108C4538BF61464286A9 +:10E69000C186048FB0F83AC0944238BF14468C4506 +:10E6A00038BF8C460487A0F83AC0B2420ABFA942DC +:10E6B0004FF0010C4FF0000C058EB0F84410C28FE3 +:10E6C000848E914228BF114690F8642012F00C0FFE +:10E6D00018BF4FF4296206D1B0F84660B0F8422066 +:10E6E000964238BF324690F85A60022E0AD0018610 +:10E6F0008286A9420ABFA2420120002040EA0C0003 +:10E70000F0BC70478D4238BF2946944238BF22463C +:10E7100080F85A30EBE7508088899080C889D08093 +:10E72000088A1081488A508101201070704730B4E7 +:10E7300002884A80B0F830C0A1F804C0838ECB8034 +:10E74000428E0A81C48E4C81B0F85650A54204BF57 +:10E75000B0F85240944208D1B0F858409C4202BFF1 +:10E76000B0F854306345002301D04FF001030B7320 +:10E7700000F13003A0F852201A464B89D3848B88CD +:10E780009384CA88A0F858204FF00100087030BC6C +:10E79000704730B404460A46088E91F864104FF46E +:10E7A000747311F00C0F1CBF03EB801080B21ED0ED +:10E7B000918E814238BF0846118F92F865C01CF0D7 +:10E7C0000C0F1CBF03EB811189B218D0538F8B4201 +:10E7D00038BF194692F866301CF00C0F08BF0023B2 +:10E7E000002C0CBF0122002230BCF2F798BC022999 +:10E7F00007BF80003C30C000703080B2D8E7BCF169 +:10E80000020F07BF89003C31C900703189B2DDE7D2 +:10E810002DE9F041044606F099FCC8B9FE4F78682E +:10E8200090F8221001260025012914D00178012931 +:10E830001BD090F8281001291CBF0020BDE8F081F2 +:10E84000657018212170D0F82A10616080F8285076 +:10E850000120BDE8F081657007212170416A616087 +:10E8600080F822500120BDE8F081657014212170EC +:10E87000811C2022201DEFF7E0FD257279680D70C4 +:10E8800081F82850E54882888284C26B527B80F8E8 +:10E89000262080F82260C86B0088F5F738FCF5F771 +:10E8A000E0F8D5E7DC4840680178002914BF80888B +:10E8B0004FF6FF70704730B5D74C83B00D462078C7 +:10E8C0007F2808BFFFDF94F900307F202070D4F844 +:10E8D00004C09CF85000062808BF002205D09CF810 +:10E8E000500008280CBF022201229CF85400CDE9F8 +:10E8F000000302929CF873309CF880200CF13201E6 +:10E90000284606F08FFC03B0BDE8304006F01FBE7D +:10E910002DE9F04106F05FFC002818BF06F0E4FB8B +:10E92000BD4C606800F1840290F87610895C80F834 +:10E930008010002003F07EF828B3FAF753F86068DF +:10E94000B74990F855000D5C2846F9F7A3FD6068BB +:10E950004FF0000680F8735090F8801011F00C0F03 +:10E960000CBF25200F20F9F76CFC606890F8801030 +:10E970000120F9F711FE606890F84010032918BFD4 +:10E9800002290FD103E0BDE8F04101F02FB990F862 +:10E9900076108430085C012804D101221146002041 +:10E9A000FAF707F9FAF7D5F8606890F88050012D6A +:10E9B00007BF0127032100270521A068FFF799F869 +:10E9C000616881F8520040B1002F18BF402521D066 +:10E9D000F9F787F92846FAF79DF86068806DFAF72D +:10E9E0000DF8606890F85410FF291CBF6D30FEF7D9 +:10E9F000B4FFFF21606880F8531080F8541080F84D +:10EA0000626080F8616080F87D60062180F85010B7 +:10EA1000BDE8F08115F00C0F14BF55255025D7E740 +:10EA200070B57D4C0646606800F150052046806850 +:10EA300041B1D0F80510C5F81D10B0F80900A5F8CF +:10EA4000210003E005F11D01FFF7B9F9A068FFF708 +:10EA5000D4F985F82400A0680021032E018002D09B +:10EA6000052E04D03DE00321FFF77CF939E00521B4 +:10EA7000FFF778F96068C06B00F10E01A068FFF73E +:10EA800000FA6068C06B00F11201A068FFF7FDF9A1 +:10EA9000D4E90110CA6B527D8275CA6BD28AC275E5 +:10EAA000120A0276CA6B52884276120A8276CA6BC2 +:10EAB0009288C276120A0277CA6BD2884277120A0B +:10EAC0008277C96B0831FFF7FEF96068C06B017E81 +:10EAD000A068FFF7E0F9606890F88610A068FFF77B +:10EAE000E4F905F11D01A068FFF770F995F824100D +:10EAF000A068FFF786F9606800F1320590F8316090 +:10EB000090F8511091B190F84010032906D190F877 +:10EB10003910002918BF90F8560001D190F8530021 +:10EB2000FFF736F800281CBF012605462946A068D5 +:10EB3000FFF73EF93146A068BDE87040FFF754B9D1 +:10EB40003549496881F84B00704770B5324D002453 +:10EB50000126A8606968A1F8814081F8834081F8A6 +:10EB6000506091F85020022A1FBF91F850100129DF +:10EB7000FFDF70BD06F0CDFA6868047080F82240AF +:10EB800080F8284090F8520030B1F9F7CDFFF9F73E +:10EB9000BCF8686880F852406868072180F84A40ED +:10EBA00080F8396080F8404080F8554080F84B404C +:10EBB00080F87D4080F8381070BD2DE9F041164C8A +:10EBC000054686B0606890F85000012818BF0228FA +:10EBD00005D003281EBF0C2006B0BDE8F081687A7E +:10EBE000022839D0F9F76FFB0220F9F701FF0D4930 +:10EBF00001F10C0090E80D108DE80D10D1E907012E +:10EC0000CDE904016846F9F7E1FE606890F94B0030 +:10EC1000F9F732FCA06807E07401002044110020DD +:10EC20004363020040630200F9F7E5FEFC48F9F790 +:10EC3000B9FEFC48F9F726FC606890F831103230D4 +:10EC4000F9F7A5FB0F210720F9F7BFFB606890F8E3 +:10EC50003900E0B1FEF70FFF6168287A01F1840204 +:10EC600081F87600287A805C81F880006868886581 +:10EC70002A68CA65687A68B1012824D00525022867 +:10EC800008BF81F850506FD0032878D080E0FEF79D +:10EC9000A8FEE1E7E44B91F83850002291F85500C6 +:10ECA000401CA3FB006C4FEA5C0CACEB8C0C60448A +:10ECB00081F8550025FA00F010F0010F03D1501C27 +:10ECC000C2B2032AEAD3002681F87D6091F8490098 +:10ECD000002804BF91F85100002841D0F7F744FA0A +:10ECE000074660683946406CF7F736FFDFF83C832B +:10ECF000054690FBF8F008FB105041423846F6F705 +:10ED00001AFF6168486495FBF8F08A6F10448867C1 +:10ED1000FEF7EEFD01466068826F914220D847649D +:10ED2000866790F8510000281CBF0120FEF7FDFE09 +:10ED30000121606890F84A20002A1CBF90F8492001 +:10ED4000002A0DD090F8313000F13202012B04D1AD +:10ED5000527902F0C002402A08D03230FAF78CFC17 +:10ED60006168042081F8500012E008E00125FEF7F8 +:10ED70000DFF61682A463231FAF746FCF0E7002AB7 +:10ED800018BFFFDF012000F089FF606880F8505055 +:10ED900006B00020BDE8F08170B5A54D686890F818 +:10EDA000501004292ED005291CBF0C2070BD90F8EE +:10EDB0007D100026002990F883104FEA511124D0CD +:10EDC000002908BF012407D0012908BF022403D06D +:10EDD000022914BF00240824C06D00281CBF002095 +:10EDE00000F05CFF6868806DF9F708FE686890F8CD +:10EDF0004010022943D0032904BF90F86C10012968 +:10EE000041D04DE0FFF784FD52E0002908BF012406 +:10EE100007D0012908BF022403D0022914BF00240F +:10EE20000824C06D00281CBF002000F037FF686870 +:10EE3000806DF9F7E3FD686890F84010022906D06C +:10EE4000032904BF90F86C10012904D010E090F859 +:10EE50006C1002290CD1224614F00C0F04D090F84B +:10EE60004C00012808BF042201210020F9F7A1FE6F +:10EE70006868072180F8804080F8616016E090F8AB +:10EE80006C1002290CD1224614F00C0F04D090F81B +:10EE90004C00012808BF042201210020F9F789FE57 +:10EEA0006868082180F8804080F8616080F8501020 +:10EEB000002070BD5E49002210F0010F496802D0A9 +:10EEC000012281F8842010F0080F03D0114408209B +:10EED00081F88400002070475549496881F848004E +:10EEE000704710B5524C636893F83030022B14BF52 +:10EEF000032B00280BD100291ABF02290120002072 +:10EF00001146FEF7F8FC08281CBF012010BD606800 +:10EF100090F83000002816BF022800200120BDE82C +:10EF20001040FAF731BB4248406890F830000028A2 +:10EF300016BF022800200120FAF726BB3C49496889 +:10EF400081F8300070473A49496881F84A007047B3 +:10EF500070B5374C616891F83000002816BF022860 +:10EF60000020012081F8310001F13201FAF7F6FAB0 +:10EF7000606890F83010022916BF03290121002192 +:10EF800080F8511090F8312000F132034FF0000565 +:10EF9000012A04BF5B7913F0C00F0AD000F13203DD +:10EFA000012A04D15A7902F0C002402A01D000227D +:10EFB00000E0012280F84920002A04BF002970BD2A +:10EFC0008567F7F7D1F86168486491F85100002827 +:10EFD0001CBF0020FEF7A9FD0026606890F84A10CB +:10EFE00000291ABF90F84910002970BD90F831200F +:10EFF00000F13201012A04D1497901F0C001402910 +:10F0000005D02946BDE870403230FAF735BBFEF72F +:10F01000BDFD61683246BDE870403231FAF7F4BA9E +:10F020004063020046630200ABAAAAAA40420F0056 +:10F030007401002070B5FF4D0C4600280CBF012361 +:10F040000023696881F8393081F842004FF00800E8 +:10F0500081F856000CD1002C1ABF022C0120002090 +:10F060001146FEF748FC6968082881F8560001D06F +:10F07000002070BD022C14BF032C1220F8D170BDEB +:10F08000002818BF112070470328EA4A526808BFB9 +:10F09000D16382F840000020704710B5E54C6068ED +:10F0A00090F8401003291CBF002180F8601001D0A7 +:10F0B000002010BD0123C16B1A460020F2F738F87A +:10F0C0006168CA6B526A904294BF0120002081F8A7 +:10F0D0006000EDE7D748416891F84000032804D06C +:10F0E000012818BF022807D004E091F84200012847 +:10F0F00008BF70470020704791F84100012814BFF5 +:10F1000003280120F6D1704770B5F9F7F7FCF9F73D +:10F11000D6FCF9F79FFBF9F74BFCC64C002560685D +:10F1200090F8520030B1F9F7FFFCF8F7EEFD606897 +:10F1300080F8525060680121A0F8815080F8835017 +:10F1400080F8501080F82850002070BDB94810B5E4 +:10F150004068643006F0B1FB002010BDB5480121C5 +:10F16000406890F84020032A03BF80F82A10C26B41 +:10F170001288002218BF80F82A20828580F8281083 +:10F180007047AC49496881F88600704701780023D0 +:10F1900011F0010FA749496809D04278032A08BF36 +:10F1A000CB6381F84020012281F884201346027845 +:10F1B00012F0040F0CD082784FF0000C032A08BF25 +:10F1C000C1F83CC081F840200B44082283F8842019 +:10F1D000C27881F830200279002A16BF022A012362 +:10F1E000002381F8393081F84120427981F83820B4 +:10F1F000807981F848004FF0000070478D484068E2 +:10F200008030704770B58B4C06460D46606890F8AC +:10F210005000032818BFFFDF022E1EBF032EFFDFA2 +:10F2200070BD002D18BF06F0A1F900216068A0F89C +:10F23000811080F88310012180F8501070BD00F01B +:10F24000D5BC2DE9F0477B4C0646894660684FF0F7 +:10F250000108072E90F8397038BF032540D3082ED7 +:10F2600084BF0020BDE8F08790F85010062908BF41 +:10F27000002105D090F8501008290CBF022101216F +:10F2800090F8800005F0AEFF002873D1A068C17827 +:10F2900011F03F0F12D0027912F0010F0ED0616809 +:10F2A0004FF0050591F85220002A18BFB9F1000F60 +:10F2B00016D091F88010012909D011E011F03F0F0C +:10F2C0001ABF007910F0100F002F53D14CE04FF00F +:10F2D00001024FF00501FEF74CFB616881F8520016 +:10F2E000A16808782944C0F3801030B1487900F053 +:10F2F000C000402808BF012000D00020616891F8BC +:10F300005210002918BF002807D0FEF74DFB014618 +:10F31000606880F8531080F86180606890F853103E +:10F32000FF292AD080F854100846FEF74AFB40EA2D +:10F330000705606890F85320FF2A18BF002D10D0F1 +:10F34000072E0ED3A068C17811F03F0F09D00179C4 +:10F3500011F0020F05D00B21FEF7BDFB606880F8AD +:10F3600062802846BDE8F087FEF75FF9002808BFF5 +:10F37000BDE8F0870120BDE8F087A36890F8392048 +:10F3800059191B78C3F3801C00F153036046FEF744 +:10F3900096F90546CDE72DE9F043264C87B0A068E5 +:10F3A000FEF7E0FE7F264FF00108002558B1022746 +:10F3B00001287DD0022800F0EF80F9F74BFA07B062 +:10F3C0000620BDE8F083F9F745FA616891F840003E +:10F3D000032800F01581A068C27812F03F0F05D015 +:10F3E000037913F0100F18BF012700D10027002F59 +:10F3F00014BF0823012312F03F0F00F001810079B0 +:10F4000033EA000240F0FC8010F0020F08D091F8BF +:10F410008000002105F064FE002808BF012000D014 +:10F4200000208DF80C508DF810508DF814504FF0CE +:10F43000FF0801E074010020D0B105AA03A904A8C7 +:10F4400000F07AFC606890F831809DF80C0000288C +:10F4500018BF48F002080BD1A068FEF7DBFC81461C +:10F460000121A068FEF732FD4946F8F79AFF28B35C +:10F47000FFB1012000F0DDFB002852D020787F286A +:10F4800008BFFFDF94F900102670606890F85420E0 +:10F49000CDE90021029590F8733090F8802000F1BA +:10F4A0003201404605F0BEFE606880F86C50A3E073 +:10F4B00038E041460020FFF7FEF9A1E0606890F8CF +:10F4C0004100032818BF02282BD19DF81000002806 +:10F4D00027D09DF80C00002823D1F7B1012000F0BF +:10F4E000A8FB00281DD020787F2808BFFFDF94F9F3 +:10F4F00000102670606890F85420CDE90021029534 +:10F5000090F8733090F8802000F13201FE2005F071 +:10F5100089FE606880F86C506EE0FE210020FFF7E5 +:10F52000CAF96DE0F9F796F9A0681821C27812F0CF +:10F530003F0F65D00279914362D10421FEF7C6FCEA +:10F54000616891F84020032A01BF8078B7EB501F13 +:10F5500091F86000002853D04FF0010000F069FBE3 +:10F56000E8B320787F2808BFFFDF94F900102670E9 +:10F57000606890F85420CDE90021029590F873302E +:10F5800090F8802000F13201FF2005F04BFE60680A +:10F5900080F86C8030E000BFF9F75CF9606890F8A3 +:10F5A000400003282CD0A0681821C27812F03F0F29 +:10F5B00026D0007931EA000022D1012000F039FB89 +:10F5C00068B120787F2808BFFFDF94F9001026700B +:10F5D000606890F85420CDE90021029500E00FE02A +:10F5E00090F8733090F8802000F13201FF2005F090 +:10F5F00019FE606880F86C7007B00320BDE8F083E6 +:10F6000007B00620BDE8F083F0B5FE4C074683B096 +:10F6100060686D460078002818BFFFDF002661682B +:10F620008E70C86B02888A8042884A8382888A8367 +:10F63000C088C88381F8206047B10121A068FEF727 +:10F6400045FC0546A0680078C10907E06946A06846 +:10F65000FEF7B5FBA0680078C0F380116068012751 +:10F6600090F85120002A18BF002904D06A7902F0CE +:10F67000C002402A26D090F84A20002A18BF00294C +:10F6800003D0697911F0C00F1CD000F10E00E3F730 +:10F69000B3FC616891F85400FF2819D001F1080209 +:10F6A000C91DFEF743F9002808BFFFDF6068C17974 +:10F6B00041F00201C171D0F86D104161B0F87110D4 +:10F6C00001830FE02968C0F80E10A9884182E0E7A5 +:10F6D000C86B427ECA71D0F81A208A60C08B8881BC +:10F6E0004E610E8360680770C26B90F84B1082F811 +:10F6F0006710C06B0088F4F70AFDF4F7A3F903B0B4 +:10F70000F0BD2DE9F041BF4C0546002760684FF081 +:10F7100001083E4690F84000012818BF022802D098 +:10F72000032818BFFFDF5DB1A068FEF727FC18B9FA +:10F73000A068FEF77AFC18B100F08FFB074645E0A1 +:10F74000606890F850007F25801F06283ED2DFE8D1 +:10F7500000F003191924352FAA48F9F709FA0028EF +:10F7600008BF2570F9F7EBF9606890F8520030B1E6 +:10F77000F9F7DAF9F8F7C9FA606880F85260F9F732 +:10F7800069F830E09F48F9F7F3F9002808BF2570C1 +:10F79000F9F7D5F905F0EAFEC3E09A48F9F7E8F978 +:10F7A000002808BF2570F9F7CAF9F9F753F81AE0ED +:10F7B0009448F9F7DDF930B9257004E09148F9F77C +:10F7C000D7F90028F8D0F9F7BAF9AAE0102F80F09D +:10F7D0003881DFE807F01E9DA6AAF1F108B3F2F127 +:10F7E000F1F10C832051BDE8F041FFF791B80320FF +:10F7F00002F020F9002870D000210320FFF710F953 +:10F80000012211461046F9F7D4F961680C2081F8FD +:10F810005000BDE8F081606800F15005042002F05E +:10F8200009F900287DD00E202870012002F0FDFC8F +:10F83000A06861680078C0F3401081F8750000216D +:10F840000520FFF7EDF87048A1684FF0200CC26B5F +:10F850000B78527B23F020030CEA42121A430A7001 +:10F86000C16B95F825304A7B1A404A73C06B28213A +:10F8700080F86610BDE8F081062002F0DBF8002871 +:10F880004FD0614D0F2085F85000022002F0CDFCD2 +:10F890006068012190F880200846F9F78AF9A0688D +:10F8A00061680078C0F3401081F8750001210520DF +:10F8B000FFF7B6F8E86B80F80D80A068017821F0BA +:10F8C00020010170F9F75DFD002818BFFFDF282037 +:10F8D000E96B81F86600BDE8F08122E0052002F0C6 +:10F8E000A9F8F0B101210320FFF79AF8F9F749FDD3 +:10F8F000002818BFFFDF6068012190F880200846CB +:10F90000F9F757F961680D2081F85000BDE8F081E2 +:10F910006068A0F8816080F8836080F85080BDE85E +:10F92000F081BDE8F04100F061B96168032081F821 +:10F930005000BDE8F041082002F077BC606890F804 +:10F940008310490908BF012507D0012908BF0225F6 +:10F9500003D0022914BF00250825C06D00281CBF54 +:10F96000002000F09BF96068806DF9F747F8606847 +:10F9700090F84010022906D0032904BF90F86C10BB +:10F98000012904D010E090F86C1002290CD12A460D +:10F9900015F00C0F04D090F84C00012808BF042289 +:10F9A00001210020F9F705F96068072180F88050EF +:10F9B00080F8616041E000E043E0606890F8831007 +:10F9C000490908BF012507D0012908BF022503D036 +:10F9D000022914BF00250825C06D00281CBF002087 +:10F9E00000F05CF96068806DF9F708F8606890F8DD +:10F9F000401002290AD0032904BF90F86C10012995 +:10FA000008D014E0740100204411002090F86C101C +:10FA100002290CD12A4615F00C0F04D090F84C00A6 +:10FA2000012808BF042201210020F9F7C2F860680C +:10FA3000082180F8805080F8616080F85010BDE89F +:10FA4000F081FFDFBDE8F08170B5FE4C606890F892 +:10FA5000503000210C2B38D001220D2B40D00E2B22 +:10FA600055D00F2B1CBFFFDF70BD042002F0DDFB63 +:10FA7000606890F880100E20F8F7E3FB606890F85B +:10FA8000800010F00C0F14BF282100219620F8F7F9 +:10FA9000D3FFF9F75EF86068052190F88050A06800 +:10FAA000FEF727F8616881F8520048B115F00C0F95 +:10FAB0000CBF50255525F8F714F92846F9F72AF810 +:10FAC00061680B2081F8500070BDF9F742F8002101 +:10FAD0009620F8F7B1FF6168092081F8500070BDE9 +:10FAE00090F88010FF20F8F7ACFB606890F8800079 +:10FAF00010F00C0F14BF282100219620F8F79CFF6E +:10FB0000F9F727F861680A2081F8500070BDA0F865 +:10FB1000811080F8831080F850200020FFF774FDDA +:10FB2000BDE87040032002F080BB70B5C54C606832 +:10FB300090F850007F25801F062828BF70BDDFE8A1 +:10FB400000F0171F1D032A11BE48F9F711F800280D +:10FB500008BF2570F8F7F3FFF8F77CFEBDE87040AA +:10FB6000FEF7D6BEB748F9F703F8C8B9257017E015 +:10FB7000B448F8F7FDFF40B9257006E005F0F6FC43 +:10FB8000B048F8F7F5FF0028F6D0F8F7D8FFBDE841 +:10FB9000704000F02BB8AB48F8F7EAFF0028E5D03A +:10FBA000F8F7CDFF60680021643005F037FEBDE84E +:10FBB000704000F01BB870B5A24C06460D460129F6 +:10FBC00008D0606890F880203046BDE87040134649 +:10FBD00002F077BBF8F75CFA61680346304691F8AB +:10FBE00080202946BDE8704002F06BBB70B5F8F785 +:10FBF00085FFF8F764FFF8F72DFEF8F7D9FE914C72 +:10FC00000025606890F8520030B1F8F78DFFF8F7E2 +:10FC10007CF8606880F852506068022180F85010CB +:10FC2000A0F8815080F88350BDE87040002002F0B9 +:10FC3000FCBA70B5834D06460421A868FEF746F964 +:10FC4000044605F0C8FA002808BF70BD207800F00F +:10FC50003F00252814D2F8F761FA217811F0800FBF +:10FC60000CBF1E214FF49671B4F80120C2F30C02B0 +:10FC700012FB01F10A1AB2F5877F28BF814201D237 +:10FC8000002070BD68682188A0F88110A17880F8F4 +:10FC900083103046BDE8704001F0CCBE2DE9F04144 +:10FCA000684C0746606800F1810690F883004009BF +:10FCB00008BF012507D0012808BF022503D002286C +:10FCC00014BF00250825F8F78DFE307800F03F06B8 +:10FCD0003046F8F7DFFB606880F8736090F86C00DE +:10FCE00002280CBF4020FF202946F8F7AAFA27B1C6 +:10FCF00029460120F8F795FC05E060682A46C16DA9 +:10FD00000120F8F7E2FCF8F724FF0521A068FDF7D1 +:10FD1000F0FE6168002881F8520008BFBDE8F0815C +:10FD200015F00C0F0CBF50245524F7F7DAFF2046CE +:10FD3000BDE8F041F8F7EEBE2DE9F74F414C002544 +:10FD4000914660688A4690F8510000280CBF4FF039 +:10FD500001084FF00008A0680178CE090121FEF7E4 +:10FD6000B5F836B1407900F0C000402808BF012640 +:10FD700000D00026606890F85210002961D090F8F9 +:10FD800040104FF0000B032906D190F839100029DC +:10FD900018BF90F856700ED1A068C17811F03F0FCF +:10FDA0001CBF007910F0010F02D105F061F940B3DA +:10FDB000606890F85370FF2F18BF082F21D0384685 +:10FDC000FDF7D9FB002818BF4FF00108002E38D0EE +:10FDD000606890F8620030B1FDF7F1FD054660689B +:10FDE00080F862B02DE03846FDF791FD054601210F +:10FDF000A068FEF76BF801462846F9F7D3FB0546E5 +:10FE00001FE0F6B1606890F86100D0B9A068C178D1 +:10FE100011F03F0F05D0017911F0010F18BF0B2130 +:10FE200000D105210022FDF7A4FD616881F8520090 +:10FE300038B1FDF7B9FDFF2803D06168012581F8CD +:10FE4000530001E0740100208AF800500098067009 +:10FE500089F8008003B0BDE8F08F2DE9F04FFF4C2A +:10FE600087B00025606890F850002E46801F4FF044 +:10FE70007F08062880F0D581DFE800F00308088BB2 +:10FE8000FDDB00F0F8FB054600F0CCB9F348F8F7CD +:10FE90006FFE002808BF84F80080F8F750FEA068C5 +:10FEA000FDF782FF0546072861D1A068FEF75AF9E1 +:10FEB0000146606890F86C208A4258D190F8501042 +:10FEC000062908BF002005D090F8500008280CBF74 +:10FED0000220012005F08AF970B90321A068FDF71E +:10FEE000F5FF002843D001884078C1F30B010009D9 +:10FEF00005F07BFC00283AD000212846FFF7A1F945 +:10FF0000A0B38DF80C608DF808608DF8046062680D +:10FF1000FF2592F8500008280CBF02210121A0689B +:10FF2000C37813F03F0F1CBF007910F0020F12D0FE +:10FF300092F8800005F0D4F868B901AA03A902A8D4 +:10FF4000FFF7FAFE606890F831509DF80C00002829 +:10FF500018BF45F002052B469DF804209DF80810B7 +:10FF60009DF80C0000F0D5F9054603E0FFE705F029 +:10FF7000FDFA0225606890F85200002800F05281D6 +:10FF8000F8F7D2FDF7F7C1FE606880F8526000F024 +:10FF900049B9A068FDF708FF0646A1686068CA78FD +:10FFA00090F86D309A4221D10A7990F86E309A42D9 +:10FFB0001CD14A7990F86F309A4217D18A7990F81B +:10FFC00070309A4212D1CA7990F871309A420DD1AC +:10FFD0000A7A90F872309A4208D1097890F8740041 +:10FFE000C1F38011814208BF012500D00025F8F738 +:10FFF00031FC9A48F8F7BCFD002808BF84F800805F +:020000040002F8 +:10000000F8F79DFD042E11D185B120787F2808BF17 +:10001000FFDF94F9003084F80080606890F8732066 +:1000200090F87D1090F8540005F06EFB062500F066 +:10003000F9B802278948F8F79BFD002808BF84F823 +:100040000080F8F77CFDA068FDF7AEFE0546A068CD +:10005000FEF788F8082D08BF00287CD1A0684FF073 +:100060000301C27812F03F0F75D0007931EA000029 +:1000700071D1606800E095E000F1500890F8390017 +:10008000002814BF98F8066098F803604FF0000944 +:1000900098F8020078B1FDF787FC0546FF280AD0E2 +:1000A0000146A068401DFDF758FCB5420CBF4FF05B +:1000B00001094FF000090021A068FDF707FF0622A3 +:1000C00008F11D01EEF78CF940B9A068FDF795FE27 +:1000D00098F82410884208BF012000D0002059EA77 +:1000E00000095DD0606800F1320590F831A098F801 +:1000F000010038B13046FDF74BFD00281CBF054616 +:100100004FF0010A4FF00008A06801784FEAD11BB8 +:100110000121FDF7DBFEBBF1000F07D0407900F0B5 +:10012000C000402808BF4FF0010B01D04FF0000B7A +:100130000121A068FDF7CAFE06222946EEF750F914 +:1001400030B9A068FDF766FE504508BF012501D013 +:100150004FF0000500E023E03BEA050018BFFF2E4A +:100160000DD03046FDF7D3FB060008D00121A06872 +:10017000FDF7ACFE01463046F9F714FA804645EA31 +:10018000080019EA000F0BD060680121643005F007 +:1001900045FB01273846FFF737FA052002F045F8FE +:1001A0003D463FE002252D48F8F7E2FC002808BF55 +:1001B00084F80080F8F7C3FCA068FDF7F5FD06465B +:1001C000A068FDF7CFFF072E08BF00282AD1A0683E +:1001D0004FF00101C27812F03F0F23D00279914312 +:1001E00020D1616801F150060021FDF76FFE062263 +:1001F00006F11D01EEF7F4F8A0B9A068FDF7FDFDCA +:1002000096F8241088420DD160680121643005F011 +:1002100005FBFF21022000F009F8002818BF032584 +:1002200000E0FFDF07B02846BDE8F08F2DE9F0437E +:100230000A4C0F4601466068002683B090F87D2086 +:10024000002A35D090F8500008280CBF022501255F +:10025000A168C87810F03F0F02E000007401002090 +:10026000FD484FF000084FF07F0990F900001CBFD7 +:10027000097911F0100F22D07F2808BFFFDF94F911 +:10028000001084F80090606890F85420CDE90021B7 +:10029000029590F8733090F8802000F132013846D2 +:1002A00004F0C0FF05F0AAFA10B305F050F92CE0F5 +:1002B000002914BF0221012180F87D10C2E77F28A8 +:1002C00008BFFFDF94F9001084F80090606890F890 +:1002D0005420CDE90021029590F8733090F88020E9 +:1002E00000F13201384604F09DFF05F030F90CE0D2 +:1002F0000220FFF79EFC30B16068012680F86C8018 +:10030000F8F7A8FA01E005F031F903B03046BDE88E +:10031000F0832DE9F047D04C054684B09A46174645 +:100320000E46A068FDF71EFF4FF00109002800F0FF +:10033000CF804FF00208012808D0022800F00E817B +:1003400005F014F904B04046BDE8F087A068092123 +:10035000C27812F03F0F00F059810279914340F0CA +:100360005581616891F84010032906D012F0020F00 +:1003700008BFFF2118D05DB115E00021FDF7A6FDF3 +:1003800061680622C96B1A31EEF72AF848BB1EE0F5 +:10039000FDF740FD05460121A068FDF797FD2946C0 +:1003A000F7F7FFFF18B15146012000F051B960681E +:1003B00090F84100032818BF022840F02781002E42 +:1003C0001CBFFE21012040F0438100F01FB9A0684E +:1003D000FDF713FD6168C96B497E884208BF01269D +:1003E00000D00026A068C17811F03F0F05D0017938 +:1003F00011F0020F01D06DB338E0616891F842202E +:10040000012A01D096B11BE0D6B90021FDF75EFDAF +:1004100061680268C96BC1F81A208088C883A06827 +:10042000FDF7EBFC6168C96B487609E091F8530071 +:1004300091F85610884203D004B04046BDE8F087DA +:100440006068643005F02EFA002840D004B00F2018 +:10045000BDE8F08767B1FDF7DDFC05460121A06826 +:10046000FDF734FD2946F7F79CFF08B1012200E0B3 +:100470000022616891F84200012807D040B92EB9E6 +:1004800091F8533091F856108B4201D1012100E0D0 +:1004900000210A421BD0012808BF002E11D14FF0C5 +:1004A0000001A068FDF712FD61680268C96BC1F820 +:1004B0001A208088C883A068FDF79FFC6168C96B1B +:1004C00048766068643005F0EDF90028BED19DE003 +:1004D00060682F46554690F840104FF002080329F7 +:1004E000AAD0A168CA7812F03F0F1BBF097911F09A +:1004F000020F002201224FF0FF0A90F85010082945 +:100500000CBF0221012192B190F8800004F0E8FDB7 +:1005100068B95FB9A068FDF77DFC07460121A068B6 +:10052000FDF7D4FC3946F7F73CFF48B1AA465146DF +:100530000020FFF77BFE002818BF4FF003087BE781 +:10054000606890F84100032818BF02287FF474AF58 +:10055000002E18BF4FF0FE0AE9D16DE7616891F8EF +:100560004030032B52D0A0684FF0090CC27812F033 +:100570003F0F4BD002793CEA020C47D1022B06D048 +:1005800012F0020F08BFFF2161D0E5B35EE012F068 +:10059000020F4FF07F0801D04DB114E001F164006B +:1005A00005F080F980B320787F2842D013E067B34C +:1005B000FDF730FC05460121A068FDF787FC2946C0 +:1005C000F7F7EFFE08B36068643005F06BF9D8B157 +:1005D00020787F282DD094F9001084F8008060687E +:1005E00090F85420CDE90021CDF8089090F87330B0 +:1005F00090F8802000F13201504604F013FE0D20E7 +:1006000004B0BDE8F08716E000E001E00220F7E763 +:10061000606890F84100032818BF0228F6D1002E28 +:10062000F4D04FF0FE014FF00200FEF744F9022033 +:10063000E6E7FFDFCFE7FDF7EDFB05460121A06808 +:10064000FDF744FC2946F7F7ACFE38B151460220CD +:10065000FEF731F9DAE7000074010020606890F8D5 +:100660004100032818BF0228D0D1002E1CBFFE2154 +:100670000220EDD1CAE72DE9F84F4FF00008F74806 +:10068000F8F776FA7F27F54C002808BF2770F8F7AF +:1006900056FAA068FDF788FB81460121FEF7D1FDDF +:1006A000616891F88020012A14D0042A1CBF082A0E +:1006B000FFDF00F0D781606890F8520038B1F8F79A +:1006C00033FAF7F722FB6168002081F852004046B8 +:1006D000BDE8F88F0125E24EB9F1080F3AD2DFE804 +:1006E00009F03EC00439393914FC0546F8F7B2F870 +:1006F000002D72D0606890F84000012818BF0228D1 +:100700006BD120787F2869D122E018B391F840009E +:10071000022802D0012818D01CE020787F2808BFCA +:10072000FFDF94F90000277000906068FF2190F8C7 +:10073000733090F85420323004F02FFF61680020AD +:100740004FF00C0881F87D00B5E720787F2860D154 +:10075000FFDF5EE0F8F77EF84FF00608ABE74FF0FA +:100760000008002800F0508191F84000022836D09F +:1007700001284BD003289ED1A068CA6BC37892F899 +:100780001AC0634521D1037992F81BC063451CD17F +:10079000437992F81CC0634517D1837992F81DC044 +:1007A000634512D1C37992F81EC063450DD1037A17 +:1007B00092F81FC0634508D1037892F819C0C3F3BB +:1007C0008013634508BF012300D0002391F8421035 +:1007D00001292CD0C3B300F013B93FE019E0207811 +:1007E0007F2808BFFFDF94F9000027700090606841 +:1007F000FF2190F8733090F85420323004F0CDFE91 +:1008000060684FF00C0880F87D5054E720787F280E +:100810009ED094F90000277000906068FF2190F846 +:10082000733090F85420323004F0B7FE16E0002BFD +:100830007ED102F11A01FDF7C2FAA068FDF7DDFAD8 +:100840006168C96B4876DBE0FFE796F85600082838 +:1008500070D096F8531081426AD0D5E04FF0060868 +:1008600029E7054691F8510000280CBF4FF0010B15 +:100870004FF0000B4FF00008A06810F8092BD209C8 +:1008800007D0407900F0C000402808BF4FF0010AAF +:1008900001D04FF0000A91F84000032806D191F8EA +:1008A0003900002818BF91F8569001D191F8539063 +:1008B0004846FDF72CF80090D8B34846FCF75BFE9D +:1008C000002818BF4FF0010BBAF1000F37D0A06815 +:1008D000A14600F10901009800E0B6E0F8F762FED9 +:1008E0005FEA0008D9F8040090F8319018BF49F089 +:1008F0000209606890F84010032924D0F7F7AAFF96 +:10090000002DABD0F7F75DFD002808BFB8F1000F50 +:100910007DD020787F2808BFFFDF94F90000277082 +:1009200000906068494690F8733090F8542002E0D7 +:1009300066E004E068E0323004F02FFE8EE7606885 +:1009400090F83190D5E7A168C06BCA78837E9A424F +:100950001BD10A79C37E9A4217D14A79037F9A4202 +:1009600013D18A79437F9A420FD1CA79837F9A4201 +:100970000BD10A7AC37F9A4207D10978407EC1F32E +:100980008011814208BF012700D0002796F853004C +:10099000082806D096F85610884208BF4FF0010983 +:1009A00001D04FF00009B8F1000F05D1BBF1000FE5 +:1009B00004D0F7F706FD08B1012000E000204DB19A +:1009C00096F84210012903D021B957EA090101D054 +:1009D000012100E00021084216D0606890F8421022 +:1009E000012908BF002F0BD1C06B00F11A01A068CC +:1009F000FDF7E5F9A068FDF700FA6168C96B487674 +:100A00004FF00E0857E602E0F7F724FF26E760688C +:100A100090F84100032818BF02287FF41FAFBAF1F5 +:100A2000000F3FF41BAF20787F2808BFFFDF94F949 +:100A30000000277000906068FE2190F8733090F8F5 +:100A40005420323004F0A9FD08E791F8481000293D +:100A500018BF00283FF47EAE0BE0000074010020B8 +:100A600044110020B9F1070F7FF474AE00283FF461 +:100A700071AEFEF790FC80461DE60000D0F8001134 +:100A800049B1D0E941231A448B691A448A61D0E9FB +:100A90003F12D16003E0FE4AD0F8FC101162D0E9A9 +:100AA0003F1009B1086170470028FCD00021816126 +:100AB00070472DE9FF4F06460C46488883B040F248 +:100AC000E24148430190E08A002500FB01FA94F8D6 +:100AD0007C0090460D2822D00C2820D024281ED03F +:100AE00094F87D0024281AD000208346069818B177 +:100AF0000121204603F0C0F894F8641094F86500D2 +:100B0000009094F8F0200F464FF47A794AB1012A08 +:100B100061D0022A44D0032A5DD0FFDFB5E0012076 +:100B2000E3E7B8F1000F00D1FFDFD94814F8641FE4 +:100B3000243090F83400F0F7C4FC01902078F8F7E6 +:100B4000CFFB4D4600F2E730B0FBF5F1DFF8409304 +:100B5000D9F80C0001EB00082078F8F7C1FB01463A +:100B600014F86409022816D0012816D040F6340083 +:100B700008444AF2EF010844B0FBF5F10198D9F8B6 +:100B80001C20411A514402EB08000D18012084F882 +:100B9000F0002D1D78E02846EAE74FF4C860E7E74B +:100BA000DFF8EC92A8F10100D9F80810014300D158 +:100BB000FFDFB848B8F1000F016801EB0A0506D065 +:100BC000D9F8080000F22630A84200D9FFDF032040 +:100BD00084F8F00058E094F87C20019D242A05D088 +:100BE00094F87D30242B01D0252A3AD1B4F8702016 +:100BF000B4F81031D21A521C12B2002A31DB94F828 +:100C0000122172B3174694F8132102B110460090D6 +:100C1000022916D0012916D040F6340049F60852B0 +:100C20008118022F12D0012F12D040F63400104448 +:100C3000814210D9081A00F5FA70B0FBF9F00544AA +:100C40000FE04846EAE74FF4C860E7E74846EEE7BA +:100C50004FF4C860EBE7401A00F5FA70B0FBF9F00A +:100C60002D1AB8F1000F0FD0DFF82482D8F8080051 +:100C700018B9B8F8020000B1FFDFD8F8080000F298 +:100C80002630A84200D9FFDF05B9FFDF2946D4F896 +:100C9000F400F4F750FFC4F8F400B06000203070A6 +:100CA0004FF0010886F80480204603F040F8ABF1CD +:100CB0000101084202D186F8058005E094F8F000B1 +:100CC000012844D003207071606A3946009A01F00F +:100CD00042FBF060069830EA0B0035D029463046DA +:100CE000F0F7BAF987B2204603F021F8B8420FD8DE +:100CF000074686F8058005FB07F1D4F8F400F4F701 +:100D00001AFFB06029463046F0F7A6F9384487B29A +:100D10003946204602F0B0FFB068C4F8F400A06E77 +:100D2000002811D0B4F87000B4F89420801A01B2F1 +:100D3000002909DD34F86C0F0144491E91FBF0F1E4 +:100D400089B201FB0020208507B0BDE8F08F0220AA +:100D5000B9E72DE9F04106460C46012001F0DBFA27 +:100D6000C5B20B2001F0D7FAC0B2854200D0FFDF38 +:100D70000025082C7ED2DFE804F00461696965C6AD +:100D80008293304601F0DDFA0621F3F78FF8040074 +:100D900000D1FFDF304601F0D4FA2188884200D02C +:100DA000FFDF94F8F00000B9FFDF204602F00FFEED +:100DB000374E21460020B5607580F561FDF7E9FCEE +:100DC00000F19807606AB84217D994F86500F7F700 +:100DD0000BF9014694F864004FF47A72022828D087 +:100DE000012828D040F6340008444AF2473108442C +:100DF000B0FBF2F1606A0844C51B21460020356152 +:100E0000FDF7C7FC618840F2E24251439830081A6E +:100E1000A0F22630706194F8652094F86410606A3E +:100E200001F099FAA0F5CB70B061BDE8F041F5F79B +:100E300060BE1046D8E74FF4C860D5E7BDE8F04182 +:100E400002F02FBEBDE8F041F7F7D5BE304601F005 +:100E500078FA0621F3F72AF8040000D1FFDF3046C4 +:100E600001F06FFA2188884200D0FFDF01220021C3 +:100E7000204600E047E0BDE8F04101F089BAF7F70D +:100E800073FDF7F7B8FE02204FF0E02104E0000008 +:100E9000CC11002084010020C1F88002BDE8F0815F +:100EA000304601F04EFA0621F3F700F8040000D1B5 +:100EB000FFDF304601F045FA2188884200D0FFDF8D +:100EC00094F8F000042800D0FFDF84F8F05094F884 +:100ED000FA504FF6FF76202D00D3FFDFFA4820F8B6 +:100EE000156094F8FA00F5F720F900B9FFDF20202B +:100EF00084F8FA002046FFF7C1FDF4480078BDE809 +:100F0000F041E2F701B8FFDFC8E770B5EE4C00250D +:100F1000443C84F82850E07868B1E570FEF71EF98B +:100F20002078042803D0606AFFF7A8FD6562E748CF +:100F30000078E1F7E9FFBDE8704001F03ABA70B51A +:100F4000E14C0146443CE069F5F706FE6568A2788D +:100F500090FBF5F172B140F27122B5FBF2F292B260 +:100F6000A36B01FB02F6B34202D901FB123200E08F +:100F70000022A2634D43002800DAFFDF2946E06922 +:100F8000F4F7D9FDE06170BD2DE9F05FFEF736F9A9 +:100F90008246CD48683800F1240881684646D8F872 +:100FA0001800F4F7C8FD0146F069F5F7D5FD4FF0DC +:100FB0000009074686F835903C4640F28F254E469C +:100FC0001EE000BF0AEB06000079F7F70DF80146B6 +:100FD0004AF2B12001444FF47A70B1FBF0F008EB13 +:100FE0008602414692681044844207D3241A91F83D +:100FF0003500A4F28F24401C88F83500761CF6B228 +:1010000098F83600B042DDD8002C10DD98F8351085 +:10101000404608EB81018968A14208D24168C91B9A +:10102000B1F5247F00D30D466C4288F8359098F8CE +:101030003560C3460AEB060898F80400F6F7D4FFBB +:101040004AF2B12101444FF47A7AB1FBFAF298F8EE +:101050000410082909D0042909D0002013180429F4 +:101060000AD0082908D0252207E0082000E0022045 +:1010700000EB40002830F1E70F22521D4FF4A8701A +:10108000082914D0042915D0022916D04FF0080CD5 +:101090005FF0280012FB0C00184462190BEB86036A +:1010A00010449A68D84690420BD8791925E04FF041 +:1010B000400CEFE74FF0100CECE74FF0040C182059 +:1010C000E8E798F8352098F836604046B24210D2EA +:1010D000521C88F835203C1B986862198418084611 +:1010E000F6F782FF4AF2B1210144B1FBFAF001198F +:1010F00003E080F83590D8F80410D8F81C00BDE85B +:10110000F05FF4F718BD2DE9FE4F14460546FEF7D3 +:1011100075F8DFF8B4A10290AAF1440A50469AF893 +:1011200035604FF0000B0AEB86018968CAF83C1065 +:10113000F4B3044600780027042825D005283ED0C3 +:10114000FFDFA04639466069F4F7F5FC0746F5F77E +:101150000BF881463946D8F80440F5F7FDFC401EEF +:1011600090FBF4F0C14361433846F4F7E4FC0146D8 +:10117000C8F81C004846F5F7EFFC002800DDFFDF4B +:10118000012188F813108DE0D4F81490D4F804806D +:1011900001F07AF9070010D0387800B9FFDF7969DB +:1011A00078684A460844414601F05AF9074600E08B +:1011B0000BE04045C5D9FFDFC3E75F46C1E7606A82 +:1011C00001F004F940F6B837BBE7C1690AEB460005 +:1011D0000191408D10B35446DAF81400FFF7AFFECA +:1011E0006168E069F4F7A7FC074684F835B0019C14 +:1011F000D0462046DAF81410F5F7AEFC81463946A1 +:101200002046F5F7A9FCD8F804200146B9FBF2F016 +:10121000B1FBF2F1884242D0012041E0F4F7A4FF93 +:10122000FFF78DFEFFF7B0FE9AF83510DAF804905C +:101230000AEB81010746896800913946DAF81C00FB +:10124000F5F78AFC00248046484504DB98FBF9F456 +:1012500004FB09F41AE0002052469AF8351007E022 +:1012600002EB800304F28F249B68401C1C44C0B234 +:101270008142F5D851B10120F6F7B6FE4AF2B1210C +:1012800001444FF47A70B1FBF0F004440099A8EBEC +:1012900004000C1A00D5FFDFCAF83C40A7E7002085 +:1012A00088F813009AF802005446B8B13946E0694C +:1012B000F5F752FC0146A26B40F2712042438A428C +:1012C00006D2C4F83CB009E03412002080010020AE +:1012D000E06B511A884200D30846E063AF6085F89E +:1012E00000B001202871029F94F835003F1DC05DB9 +:1012F000F6F77AFE4AF23B5101444FF47A70B1FBA3 +:10130000F0F0E16BFE300844E8602078042808D152 +:1013100094F8350004EB4000408D0A2801D20320E8 +:1013200000E00220687104EB4600408DC0B1284601 +:101330006168EFF791FE82B20020761C0CE000BFDE +:1013400004EB4001B0424B8D13449BB24B8501D35B +:101350005B1C4B85401CC0B294F836108142EFD222 +:10136000A8686061A06194F8350004EB4001488DE5 +:10137000401C488594F83500C05D082803D0042837 +:1013800003D000210BE0082100E0022101EB410124 +:1013900028314FF4A872082804D0042802D002286B +:1013A00007D028220A44042805D0082803D0252184 +:1013B00002E01822F6E70F21491D08280CD0042866 +:1013C0000CD002280CD0082011FB0020E16B8842D1 +:1013D00008D20120BDE8FE8F4020F5E71020F3E79A +:1013E0000420F1E70020F5E770B5FE4C061D14F867 +:1013F000352F905DF6F7F8FD4FF47A7100F2E73083 +:10140000B0FBF1F0D4F8071045182078805DF6F7AE +:1014100073FE2178895D082903D0042903D00022B6 +:101420000BE0082200E0022202EB420228324FF4D5 +:10143000A873082904D0042902D0022907D0282340 +:101440001344042905D0082903D0252202E01823DB +:10145000F6E70F22521D08290AD004290AD00229D2 +:101460000AD0082112FB0131081A281A293070BD50 +:101470004021F7E71021F5E70421F3E72DE9FF41CB +:1014800007460C46012000F046FFC5B20B2000F0D5 +:1014900042FFC0B2854200D0FFDF20460126002572 +:1014A000D04C082869D2DFE800F004304646426894 +:1014B0006865667426746078002819D1FDF79EFE71 +:1014C000009594F835108DF808104188C90411D0A2 +:1014D000206C019003208DF80900C24824388560F3 +:1014E000C56125746846FDF768FB002800D0FFDF62 +:1014F000BDE8FF81FFF778FF0190E07C10B18DF827 +:101500000950EAE78DF80960E7E7607840B1207C90 +:1015100008B9FDF7F9FD6574BDE8FF41F4F72FBD8B +:10152000A674FDF739FC0028E2D0FFDFE0E7BDE854 +:10153000FF41F7F760BBFDF761FE4088C00407D0AC +:1015400001210320FDF75EFEA7480078E1F7DCFCEF +:10155000002239466846FFF7D6FD38B1694638465D +:1015600000F0EDFE0028C3D1FFDFC1E7E670FFF712 +:10157000CCFCBDE7BDE8FF41C7E4FFDFB8E7994910 +:1015800050B101228A704A6840F27123B2FBF3F233 +:1015900002EB0010886370470020887070472DE9C7 +:1015A000F05F894640F271218E4E48430025044683 +:1015B000706090462F46D0074AF2B12A4FF47A7BEA +:1015C0000FD0B9F800004843B0600120F6F70CFDD9 +:1015D00000EB0A01B1FBFBF0241AB7680125A4F265 +:1015E0008F245FEA087016D539F8151040F2712083 +:1015F000414306EB85080820C8F80810F6F7F4FC0C +:1016000000EB0A01B1FBFBF0241AD8F80800A4F2A1 +:101610008F2407446D1CA74219D9002D17D0391B00 +:10162000B1FBF5F0B268101AB1FBF5F205FB12122E +:10163000801AB060012008E0B1FBF5F306EB8002F0 +:101640009468E31A401CC0B29360A842F4D3BDE88A +:10165000F09F2DE9F041634C00262078042804D047 +:101660002078052801D00C2018E401206070607CEF +:10167000002538B1EFF3108010F0010F72B610D0D2 +:1016800001270FE0FDF7BAFD074694F82000F5F7B3 +:10169000B2F87888C00411D000210320FDF7B2FD14 +:1016A0000CE00027607C38B1A07C28B1FDF72CFD50 +:1016B0006574A574F4F763FC07B962B694F820006A +:1016C000F5F705FB94F8280030B184F8285020780D +:1016D000052800D0FFDF0C26657000F06AFE30465A +:1016E00012E4404810B5007808B1FFF7B2FF00F0EF +:1016F000D4FE3C4900202439086210BD10B53A4C94 +:1017000058B1012807D0FFDFA06841F66A0188427E +:1017100000D3FFDF10BD40F6C410A060F4E73249EB +:1017200008B508702F4900200870487081F828001B +:10173000C8700874487488742022486281F8202098 +:10174000243948704FF6FF7211F1680121F810201A +:10175000401CC0B22028F9D30020FFF7CFFFFFF7CD +:10176000C0FF1020ADF80000012269460420FFF7F9 +:1017700016FF08BD7FB51B4C05460E46207810B1FC +:101780000C2004B070BD95F8652095F86410686A67 +:1017900000F0C5FEC5F80401656295F8F00000B1DF +:1017A000FFDF104900202439C861052121706070D5 +:1017B00084F82800014604E004EB4102491C5085EE +:1017C000C9B294F836208A42F6D284F83500304601 +:1017D000FFF7D5FE0548F4F74DFC84F820002028DB +:1017E00007D105E0F0110020800100207D140200E7 +:1017F000FFDFF4F7B9FC606194F82010012268461D +:10180000FFF781FC00B9FFDF94F82000694600F083 +:1018100096FD00B9FFDF0020B3E7F94810B5007866 +:1018200008B1002010BD0620F2F7DAFA80F00100BE +:1018300010BDF8B5F24D0446287800B1FFDF002056 +:10184000009023780246DE0701466B4605D060888B +:10185000A188ADF80010012211462678760706D53A +:10186000E088248923F8114042F00802491C491EEF +:1018700085F836101946FFF792FE0020F8BD1FB517 +:1018800011B1112004B010BDDD4C217809B10C203C +:10189000F8E70022627004212170114605E000BFC4 +:1018A00004EB4103491C5A85C9B294F836308B4287 +:1018B000F6D284F83520FFF762FED248F4F7DAFB5F +:1018C00084F82000202800D1FFDF00F0DDFD10B1FA +:1018D000F4F74AFC05E0F4F747FC40F6B831F4F7BA +:1018E0002AF9606194F8201001226846FFF70BFC8A +:1018F00000B9FFDF94F82000694600F020FD00B930 +:10190000FFDF0020BEE770B5BD4C616A0160FFF7E4 +:10191000A0FE050002D1606AFFF7B0F80020606207 +:10192000284670BD7FB5B64C2178052901D00C2022 +:1019300027E7B3492439C860606A00B9FFDF606AED +:1019400090F8F00000B1FFDF606A90F8FA002028FC +:1019500000D0FFDFAC48F4F78DFB616A0546202814 +:1019600081F8FA000E8800D3FFDFA548443020F844 +:101970001560606A90F8FA00202800D1FFDF00238C +:1019800001226846616AFFF794F8606A694690F838 +:10199000FA0000F0D4FC00B9FFDF00206062F0E63E +:1019A000974924394870704710B540F2E24300FB74 +:1019B00003F4002000F0B3FD844201D9201A10BDC9 +:1019C000002010BD70B50D46064601460020FCF70C +:1019D000E0FE044696F86500F6F706FB014696F829 +:1019E00064004FF47A72022815D0012815D040F611 +:1019F000340008444AF247310844B0FBF2F17088E1 +:101A000040F271225043C1EB4000A0F22630A542C3 +:101A100006D2214605E01046EBE74FF4C860E8E740 +:101A20002946814204D2A54201D2204600E0284640 +:101A3000706270BD70B50546FDF7E0FB7049007837 +:101A400024398C689834072D30D2DFE805F004344F +:101A500034252C34340014214FF4A873042810D0FA +:101A60000822082809D02A2102280FD011FB0240A1 +:101A700000222823D118441819E0402211FB02400B +:101A8000F8E7102211FB02402E22F3E7042211FB9B +:101A9000024000221823EDE7282100F04BFC04440B +:101AA00004F5317403E004F5B07400E0FFDF54483E +:101AB000C06BA04201D9012070BD002070BD70B57F +:101AC0004F4C243C607870B1D4E904512846A26898 +:101AD000EFF7EDFA2061A84205D0A169401B084448 +:101AE000A061F5F706F82169A068884201D820783E +:101AF00008B1002070BD012070BD2DE9F04F0546F2 +:101B000085B016460F461C461846F6F7F5FA05EB63 +:101B100047014718204600F0F5FB4AF2C5714FF423 +:101B20007A7908444D46B0FBF5F0384400F160087E +:101B30003348761C24388068304404902046F6F7F9 +:101B4000DBFAA8EB0007204600F0DCFB0646204647 +:101B5000F6F74AFA301AB0FBF5F03A1A18252820A1 +:101B60004FF4C8764FF4BF774FF0020B082C30D0FB +:101B7000042C2BD00021022C2ED0082311F1280197 +:101B800003EB830C0CEB831319440A444FF0000A57 +:101B9000082C29D0042C22D00021022C29D0054663 +:101BA000082001F5B07100BF00EB0010284481420D +:101BB00032D2082C2AD0042C1ED00020022C28D08F +:101BC0000821283001EB0111084434E03946102384 +:101BD000D6E731464023D3E704231831D0E73D460A +:101BE00040F2EE311020DFE735464FF435614020FA +:101BF000DAE70420B431D7E738461021E2E70000E5 +:101C0000F01100207D140200530D020030464021E7 +:101C1000D8E704211830D5E7082C4FD0042C4AD03F +:101C20000021022C4DD0082311F12801C3EBC30081 +:101C300000EB4310084415182821204600F07AFBD9 +:101C400005EB4001082C42D0042C3DD00026022C8C +:101C50003FD0082016F1280600EB801006EB80002C +:101C60000E180120FA4D8DF804008DF800A08DF8B3 +:101C700005B0A86906F22A260499F3F75CFFCDE9BE +:101C800002062046F6F7B0F94AF23B510144B1FB97 +:101C9000F9F0301AFE38E8630298C5F84080A86170 +:101CA00095F82000694600F04AFB002800D1FFDFCC +:101CB00005B0BDE8F08F39461023B7E73146402321 +:101CC000B4E704231831B1E73E461020C4E74020B2 +:101CD000C2E704201836BFE72DE9FE4F06461C4632 +:101CE000174688464FF0010A1846F6F705FAD84D10 +:101CF000243DA9688A1907EB48011144471820467A +:101D000000F000FB4FF47A7BD84600F6FB00B0FBF6 +:101D1000F8F0384400F120092046F6F7EDF9A968FB +:101D20000246A9EB0100801B871A204600F0EAFA60 +:101D300005462046F6F758F9281AB0FBF8F03A1A8B +:101D4000182528204FF4C8774FF4BF78082C2DD0E1 +:101D5000042C28D00021022C2BD0082311F12801BB +:101D600003EB830C0CEB831319440A44082C28D092 +:101D7000042C21D00021022C28D00546082001F592 +:101D8000B07100BF00EB0010284481422AD2082C19 +:101D900022D0042C1DD00020022C20D00821283075 +:101DA00001EB01112CE041461023D9E739464023CD +:101DB000D6E704231831D3E7454640F2EE31102030 +:101DC000E0E73D464FF435614020DBE70420B431C5 +:101DD000D8E740461021E3E738464021E0E70421F8 +:101DE0001830DDE7082C48D0042C43D00020022C0A +:101DF00046D0082110F12800C1EBC10303EB4111CB +:101E0000084415182821204600F094FA05EB4001FB +:101E1000082C3BD0042C36D00027022C38D00820C8 +:101E200017F1280700EB801007EB80000C1804F571 +:101E300096740C98F6F7D8F84AF23B510144B1FB7E +:101E4000FBF0834DFE30A5F12407E96B06F1FE029D +:101E50000844B9680B191A44824224D93219114432 +:101E60000C1AFE342044B0F1807F37D2642C12D299 +:101E7000642011E040461021BEE738464021BBE710 +:101E800004211830B8E747461020CBE74020C9E7C7 +:101E900004201837C6E720460421F4F790FEE8B185 +:101EA000E86B2044E863E0F703FFB9682938314460 +:101EB0000844CDE9000995F835008DF808000220A6 +:101EC0008DF809006846FCF778FE00B1FFDFFCF7EB +:101ED00063FF00B1FFDF5046BDE8FE8F4FF0000A00 +:101EE000F9E71FB500F021FB594C607880B994F8F0 +:101EF000201000226846FFF706F938B194F8200058 +:101F0000694600F01CFA18B9FFDF01E00120E0701B +:101F1000F4F735F800206074A0741FBD2DE9F84F68 +:101F2000FDF76CF90646451CC07840090CD0012825 +:101F30000CD002280CD000202978824608064FF4E5 +:101F4000967407D41E2006E00120F5E70220F3E78F +:101F50000820F1E72046B5F80120C2F30C0212FB7D +:101F600000F7C80901D010B103E01E2401E0FFDF33 +:101F70000024F6F7D3F8A7EB00092878B77909EB26 +:101F80000408C0F3801010B120B1322504E04FF4F2 +:101F9000FA7501E0FFDF00250C2F00D3FFDF2D488D +:101FA0002D4A30F81700291801FB0821501CB1FBFD +:101FB000F0F5F6F76DF8F6F717F84FF47A7100F2CE +:101FC0007160B0FBF1F1A9EB0100471BA7F15900CB +:101FD000103FB0F5247F11D31D4E717829B9024608 +:101FE000534629462046FFF788FD00F09EFAF3F796 +:101FF000C6FF00207074B074BDE8F88F3078009090 +:102000005346224629463846FFF766FE0028F3D19C +:1020100001210220FDF7F6F8BDE8F84F61E710B5A1 +:102020000446012903D10A482438007830B104203D +:1020300084F8F000BDE81040F3F7A1BF00220121B1 +:10204000204600F0A5F934F8700F401C2080F1E71D +:10205000F0110020646302003F420F002DE9F041BF +:102060000746FDF7CBF8050000D1FFDF287810F018 +:102070000C0F01D0012100E00021F74C606A3030E4 +:10208000FCF7C7FA29783846EFF71BFAA4F12406C3 +:102090000146A069B26802446FB32878082803D0CB +:1020A000042803D000230BE0082300E0022303EB05 +:1020B000430328334FF4A877082804D0042802D01B +:1020C000022810D028273B4408280ED004280ED020 +:1020D00002280ED05FF00800C0EBC00707EB4010ED +:1020E0001844983009E01827EDE74020F4E7102065 +:1020F000F2E70420F0E74FF4FC701044471828780A +:102100003F1DF5F771FF014628784FF47A720228D7 +:102110001DD001281DD040F6340008444AF2EF01DA +:102120000844B0FBF2F03A1A606A40F2E241B0466D +:102130004788F0304F43316A81420DD03946206BD9 +:1021400000F08EF90646B84207D9FFDF05E01046D9 +:10215000E3E74FF4C860E0E70026C04880688642A5 +:1021600007D2616A40F271224888424306EB420678 +:1021700004E040F2E240B6FBF0F0616AC882606AB7 +:10218000297880F86410297880F865100521417558 +:10219000C08A6FF41C71484306EB400040F635419D +:1021A000C8F81C00B0EB410F00D3FFDFBDE8F081A1 +:1021B00010B5052937D2DFE801F00509030D31001C +:1021C000002100E00121BDE8104028E7032180F84C +:1021D000F01010BD0446408840F2E24148439F4958 +:1021E000091D0860D4F818010089E082D4F81801AC +:1021F00080796075D4F8180140896080D4F818019E +:102200008089A080D4F81801C089E0802046A16AA6 +:10221000FFF7D8FB022084F8F00010BD816ABDE80A +:102220001040FFF7CFBBFFDF10BD70B58A4C243CD8 +:102230000928A1683FD2DFE800F0050B0B15131544 +:1022400038380800BDE870404BE6BDE8704065E6F0 +:10225000022803D00020BDE87040FFE60120FAE725 +:10226000E16070BD032802D005281CD000E0E160C9 +:102270005FF0000600F059F9774D012085F828003D +:1022800085F83460686AA9690026C0F8F41080F8FF +:10229000F060E068FFF746FB00B1FFDFF3F76FFE89 +:1022A0006E74AE7470BD0126E4E76C480078BDE83A +:1022B0007040E0F729BEFFDF70BD674924394860F0 +:1022C000704770B5644D0446243DB1B14FF47A7641 +:1022D000012903D0022905D0FFDF70BD1846F5F7AC +:1022E000FCFE05E06888401C68801046F6F7F8FFA1 +:1022F00000F2E730B0FBF6F0201AA86070BD564837 +:1023000000787047082803D0042801D0F5F76CBE88 +:102310004EF628307047002804DB00F1E02090F8EA +:10232000000405E000F00F0000F1E02090F8140D2B +:102330004009704710F00C0000D008467047F4F7D1 +:102340003EB910B50446202800D3FFDF4248443090 +:1023500030F8140010BD70B505460C461046F5F770 +:1023600043FE4FF47A71022C0DD0012C0DD040F6B3 +:10237000340210444AF247321044B0FBF1F02844D2 +:1023800000F5CB7070BD0A46F3E74FF4C862F0E782 +:102390001FB513460A46044601466846FEF789FB08 +:1023A00094F8FA006946FFF7CAFF002800D1FFDF62 +:1023B0001FBD70B5284C0025257094F82000F3F758 +:1023C000B4FE00B9FFDF84F8205070BD2DE9F04164 +:1023D000050000D1FFDF204A0024243AD5F804612B +:1023E0002046631E116A08E08869B04203D3984210 +:1023F00001D203460C460846C9680029F4D104B945 +:1024000004460021C5F80041F035C4B1E068E5603C +:10241000E86000B105612E698846A96156B1B069CE +:1024200030B16F69B84200D2FFDFB069C01BA8614C +:10243000C6F81880084D5CB1207820B902E0E96048 +:102440001562E8E7FFDF6169606808442863ADE66C +:10245000C5F83080AAE60000F011002080010020BD +:1024600010B50C4601461046F4F776FB002806DA54 +:10247000211A491EB1FBF4F101FB040010BD90FBD1 +:10248000F4F101FB140010BD2E48016A002001E0A8 +:102490000846C9680029FBD170472DE9FE43294D44 +:1024A0000120287000264FF6FF7420E00621F1F786 +:1024B000FDFC070000D1FFDF97F8FA00F037F4F7D2 +:1024C00006FC07F80A6BA14617F8FA89B8F1200F45 +:1024D00000D3FFDF1B4A683222F8189097F8FA0001 +:1024E000F3F723FE00B9FFDF202087F8FA006946E2 +:1024F0000620F1F764FC50B1FFDF08E0029830B12C +:1025000090F8F01019B10088A042CFD104E06846DD +:10251000F1F733FC0028F1D02E70BDE8FE8310B532 +:10252000FFF719FF00F5C87010BD064800212430E0 +:1025300090F8352000EB4200418503480078E0F731 +:10254000E3BC0000CC11002080010020012804D051 +:10255000022805D0032808D105E0012907D004E0AE +:10256000022904D001E0042901D000207047012095 +:102570007047F748806890F8A21029B1B0F89E1013 +:10258000B0F8A020914215D290F8A61029B1B0F869 +:10259000A410B0F8A02091420CD2B0F89C20B0F862 +:1025A0009A108A4206D290F88020B0F898001AB1AA +:1025B000884203D3012070470628FBD200207047D1 +:1025C0002DE9F041E24D0746A86800F1700490F84B +:1025D000140130B9E27B002301212046EEF7D2FC42 +:1025E00010B1A08D401CA08501263D21AFB92878EF +:1025F000022808D001280AD06878C8B110F0140F5A +:1026000009D01E2039E0162037E026773EE0A86882 +:1026100090F8160131E0020701D56177F5E78107EF +:1026200001D02A2029E0800600D4FFDF232024E007 +:1026300094F8320028B1E08D411CE185218E88425A +:1026400013D294F8360028B1A08E411CA186218EA9 +:1026500088420AD2A18D608D814203D3AA6892F884 +:10266000142112B9228E914201D3222005E0217C4F +:1026700029B1218D814207D308206077C5E7208DDD +:10268000062801D33E20F8E7207FB0B10020207358 +:10269000607320740221A868FFF78AFDA86890F88B +:1026A000E410012904D1D0F81C110878401E0870EC +:1026B000E878BDE8F041E0F727BCA868BDE8F04144 +:1026C0000021FFF775BDA2490C28896881F8E40054 +:1026D00014D0132812D0182810D0002211280ED0A0 +:1026E00007280BD015280AD0012807D0002805D0CC +:1026F000022803D021F89E2F012008717047A1F80D +:10270000A420704710B5924CA1680A88A1F86021F6 +:1027100081F85E0191F8640001F046FBA16881F840 +:10272000620191F8650001F03FFBA16881F8630147 +:10273000012081F85C01002081F82E01E078BDE8DD +:102740001040E0F7E1BB70B5814C00231946A0684A +:1027500090F87C207030EEF715FC00283DD0A06882 +:1027600090F820110025C9B3A1690978B1BB90F890 +:102770007D00EEF7EFFB88BBA168B1F870000A2876 +:102780002DD905220831E069EBF72AFE10B3A068C5 +:10279000D0F81C11087858B10522491CE069EBF704 +:1027A0001FFE002819D1A068D0F81C01007840B99C +:1027B000A068E169D0F81C010A68C0F80120097915 +:1027C0004171A068D0F81C110878401C08700120E5 +:1027D000FFF779FFA06880F8205170BDFFE7A0687F +:1027E00090F8241111B190F82511C1B390F82E1171 +:1027F0000029F2D090F82F110029EED190F87D0039 +:10280000EEF7A8FB0028E8D1A06890F8640001F07A +:10281000CBFA0646A06890F8650001F0C5FA0546B7 +:10282000A06890F830113046FFF790FEA0B3A06882 +:1028300090F831112846FFF789FE68B3A268B2F814 +:10284000703092F86410B2F8320102F58872EEF737 +:1028500001FE20B3A168252081F87C00BDE7FFE7D9 +:1028600090F87D10242918D090F87C10242914D0D9 +:102870005FF0000300F5897200F59271FBF78EFEA0 +:10288000A16881F8245101F13000C28A21F8E62FB5 +:10289000408B4880142007E005E00123EAE7BDE80B +:1028A000704000202EE71620BDE870400BE710B501 +:1028B000F4F7FAFD0C2813D3254C0821A068D0F8B2 +:1028C00018011E30F4F7F4FD28B1A0680421D830B7 +:1028D000F4F7EEFD00B9FFDFBDE810400320F2E69B +:1028E00010BD10B51A4CA068D0F818110A78002A4B +:1028F0001FD04988028891421BD190F87C20002388 +:1029000019467030EEF73EFB002812D0A068D0F8D0 +:1029100018110978022907D003290BD0042919D0EE +:10292000052906D108200DE090F87D00EEF712FB96 +:1029300040B110BD90F8811039B190F8820000B913 +:10294000FFDF0A20BDE81040BDE6BDE81040AEE75D +:102950008C01002090F8AA008007EAD10C20FFF734 +:10296000B2FEA068002120F89E1F01210171017BA9 +:1029700041F00101017310BD70B5F74CA268556EAE +:10298000EEF702FDEBB2C1B200228B4203D0A36886 +:1029900083F8121102E0A16881F81221C5F3072122 +:1029A000C0F30720814203D0A16881F8130114E726 +:1029B000A06880F8132110E710B5E74C0421A06847 +:1029C000FFF7F6FBA06890F85A10012908D000F52F +:1029D0009E71FBF7ACFEE078BDE81040E0F794BADA +:1029E000022180F85A1010BD70B5DB4CA06890F839 +:1029F000E410FE2955D16178002952D190F87F204A +:102A0000002301217030EEF7BDFA002849D1A068FB +:102A100090F8141109B1022037E090F87C200023CF +:102A200019467030EEF7AEFA28B1A06890F896001B +:102A300008B1122029E0A068002590F87C20122A15 +:102A40001DD004DC032A23D0112A04D119E0182A4E +:102A50001AD0232A26D0002304217030EEF792FAF0 +:102A600000281ED1A06890F87D10192971D020DCB3 +:102A700001292AD0022935D0032932D120E00B20A8 +:102A800003E0BDE8704012E70620BDE870401AE69A +:102A900010F8E21F01710720FFF715FEA06880F80B +:102AA0007C509AE61820FFF70EFEA068A0F89E5012 +:102AB00093E61D2918D01E2916D0212966D149E098 +:102AC00010F8E11F4171072070E00C20FFF7FBFDBB +:102AD000A06820F8A45F817941F00101817100F8BC +:102AE000275C53E013202CE090F8252182BB90F85E +:102AF0002421B2B1242912D090F87C1024290ED0C0 +:102B00005FF0000300F5897200F59271FBF746FD56 +:102B1000A0681E2180F87D1080F8245103E0012375 +:102B2000F0E71E2932D1A068FBF797FDFFF744FFBD +:102B3000A16801F13000C28A21F8E62F408B48805D +:102B40001520FFF7C0FDA068A0F8A45080F87D50C4 +:102B50001CE02AE090F8971051B180F8125180F8EB +:102B600013511820FFF7AFFDA068A0F8A4500DE0A6 +:102B700090F82F1151B990F82E1139B1C16DD0F8DC +:102B80003001FFF7F9FE1820FFF79DFDA06890F8CF +:102B9000E400FE2885D1FFF7A4FEA06890F8E400C9 +:102BA000FE2885D1BDE87040CDE51120FFF78BFDF3 +:102BB000A068CBE7684A0129926819D0002302294E +:102BC0000FD003291ED010B301282BD0032807D122 +:102BD00092F87C00132803D0162801D0182804D1BD +:102BE000704792F8E4000028FAD0D2F8180117E0F4 +:102BF00092F8E4000128F3D0D2F81C110878401EA6 +:102C00000870704792F8E4000328EED17047D2F8BC +:102C10001801B2F870108288891A09B20029F5DB10 +:102C200003707047B2F87000B2F82211401A00B277 +:102C30000028F6DBD2F81C010178491E01707047AC +:102C400070B5044690F87C0000250C2810D00D28A3 +:102C50002ED1D4F81811B4F870008988401C88422D +:102C600026D1D4F864013C4E017811B3FFDF42E075 +:102C7000B4F87000B4F82211401C884218D1D4F87E +:102C80001C01D0F80110A160407920730321204677 +:102C9000EDF7F1FDD4F81C01007800B9FFDF012148 +:102CA000FE20FFF787FF84F87C50012084F8B200F3 +:102CB00093E52188C180D4F81801D4F864114089C3 +:102CC0000881D4F81801D4F8641180894881D4F8B7 +:102CD0001801D4F86411C0898881D4F864010571A1 +:102CE000D4F8641109200870D4F864112088488051 +:102CF000F078E0F709F902212046EDF7BCFD032149 +:102D00002046FFF755FAB068D0F81801007802287D +:102D100000D0FFDF0221FE20FFF74CFF84F87C503B +:102D20005BE52DE9F0410C4C00260327D4F808C0E0 +:102D3000012598B12069C0788CF8E20005FA00F00E +:102D4000C0F3C05000B9FFDFA06800F87C7F468464 +:102D500080F82650BDE8F0818C01002000239CF80B +:102D60007D2019460CF17000EEF70CF970B1607817 +:102D70000028EFD12069C178A06880F8E11080F8C0 +:102D80007D70A0F8A46080F8A650E3E76570E1E7E5 +:102D9000F0B5F74C002385B0A068194690F87D2067 +:102DA0007030EEF7EFF8012580B1A06890F87C0054 +:102DB00023280ED024280CD06846F6F785FB68B18E +:102DC000009801A9C0788DF8040008E0657005B08E +:102DD000F0BD607840F020006070F8E70021A06846 +:102DE00003AB162290F87C00EEF74FFB002648B1AB +:102DF000A0689DF80C20162180F80C2180F80D1198 +:102E0000192136E02069FBF722FB78B121690879A6 +:102E100000F00702A06880F85C20497901F0070102 +:102E200080F85D1090F82F310BBB03E00020FFF716 +:102E300078FFCCE790F82E31CBB900F164035F78CE +:102E4000974205D11A788A4202D180F897500EE055 +:102E500000F5AC71028821F8022990F85C200A7113 +:102E600090F85D0048710D70E078E0F74DF8A068CB +:102E7000212180F87D1080F8A650A0F8A460A6E774 +:102E8000F8B5BB4C00231946A06890F87D2070303F +:102E9000EEF778F840B32069FBF7BEFA48B3206933 +:102EA000FBF7B4FA07462069FBF7B4FA0646206937 +:102EB000FBF7AAFA05462069FBF7AAFA0146009734 +:102EC000A06833462A463030FBF79BFBA1680125FA +:102ED00091F87C001C2810D091F85A00012812D0DB +:102EE00091F8250178B90BE0607840F0010060703E +:102EF000F8BDBDE8F840002013E781F85A5002E021 +:102F000091F8240118B11E2081F87D000BE01D20EE +:102F100081F87D0001F5A57231F8300BFBF7FBFB62 +:102F2000E078DFF7F1FFA068002120F8A41F85708A +:102F3000F8BD10B58E4C00230921A06890F87C20C4 +:102F40007030EEF71FF848B16078002805D1A1680D +:102F500001F8960F087301F81A0C10BD012060707B +:102F600010BD7CB5824C00230721A06890F87C201E +:102F70007030EEF707F838B36078002826D169463C +:102F80002069FBF75FFA9DF80000002500F025019D +:102F9000A06880F8B0109DF8011001F0490180F898 +:102FA000B11080F8A250D0F81811008849888142E9 +:102FB00000D0FFDFA068D0F818110D70D0F86411B0 +:102FC0000A7822B1FFDF16E0012060707CBD30F886 +:102FD000E82BCA80C16F0D71C16F009A8A60019A97 +:102FE000CA60C26F0821117030F8E81CC06F4180C0 +:102FF000E078DFF789FFA06880F87C507CBD70B571 +:103000005B4C00231946A06890F87D207030EDF7E6 +:10301000B9FF012540B9A0680023082190F87C2061 +:103020007030EDF7AFFF10B36078002820D1A068B2 +:1030300090F8AA00800712D42069FBF7C9F9A168AB +:1030400081F8AB00206930F8052FA1F8AC2040884A +:10305000A1F8AE0011F8AA0F40F002000870A068B5 +:103060004FF0000690F8AA10C90702D011E0657071 +:103070009DE490F87D20002319467030EDF782FF23 +:1030800000B9FFDFA06880F87D5080F8A650A0F856 +:10309000A460A06890F87C10012906D180F87C60BB +:1030A00080F8A260E078DFF72FFFA168D1F818015F +:1030B000098842888A42DBD101780429D8D1067078 +:1030C000E078DFF721FFA06890F87C100029CFD1CD +:1030D00080F8A2606BE470B5254DA86890F87C106C +:1030E0001A2902D00220687061E469780029FBD1B6 +:1030F000002480F8A74080F8A240D0F8181100887A +:103100004988814200D0FFDFA868D0F818110C7000 +:10311000D0F864110A780AB1FFDF25E090F8A82002 +:1031200072B180F8A8400288CA80D0F864110C718E +:10313000D0F864210E2111700188D0F864010DE0EF +:1031400030F8E82BCA80C16F0C71C26F0121117277 +:10315000C26F0D21117030F8E81CC06F418000F083 +:10316000A1FEE878DFF7D0FEA86880F87C401EE476 +:103170008C01002070B5FA4CA16891F87C20162AC9 +:1031800001D0132A02D191F8A82012B10220607058 +:103190000DE46278002AFBD181F8E000002581F877 +:1031A000A75081F8A250D1F81801098840888842B8 +:1031B00000D0FFDFA068D0F818010078032800D005 +:1031C000FFDF0321FE20FFF7F5FCA068D0F86411B3 +:1031D0000A780AB1FFDF14E030F8E02BCA8010F85B +:1031E000081BC26F1171C16F0D72C26F0D2111707A +:1031F00030F8E81CC06F418000F054FEE078DFF743 +:1032000083FEA06880F87C504BE470B5D44C092153 +:103210000023A06890F87C207030EDF7B3FE002505 +:1032200018B12069007912281ED0A0680A21002355 +:1032300090F87C207030EDF7A5FE18B12069007978 +:10324000142814D02069007916281AD1A06890F8A3 +:103250007C101F2915D180F87C5080F8A250BDE861 +:1032600070401A20FFF74EBABDE8704061E6A068D2 +:1032700000F87C5F458480F82650BDE87040FFF779 +:103280009BBB0EE470B5B64C2079C00773D02069A3 +:1032900000230521C578A06890F87C207030EDF7F8 +:1032A00071FE98B1062D11D006DC022D0ED0042D32 +:1032B0000CD0052D06D109E00B2D07D00D2D05D022 +:1032C000112D03D0607840F008006070607800280D +:1032D00051D12069FAF7E0FF00287ED0206900254F +:1032E0000226C178891E162977D2DFE801F00B7615 +:1032F00034374722764D76254A457676763A5350CE +:103300006A6D7073A0680023012190F87F207030EF +:10331000EDF738FE08BB2069FBF722F8A16881F8B9 +:103320001601072081F87F0081F8A65081F8A2508D +:1033300056E0FFF76AFF53E0A06890F87C100F2971 +:1033400001D066704CE0617839B980F88150122163 +:1033500080F87C1044E000F0D0FD41E000F0ACFDCE +:103360003EE0FBF7A9F803283AD12069FBF7A8F85B +:10337000FFF700FF34E03BE00079F9E7FFF7ABFE31 +:103380002EE0FFF73CFE2BE0FFF7EBFD28E0FFF718 +:10339000D0FD25E0A0680023194690F87D2070300C +:1033A000EDF7F0FD012110B16078C8B901E061705E +:1033B00016E0A06820F8A45F817000F8276C0FE089 +:1033C0000BE0FFF75DFD0BE000F034FD08E0FFF7D8 +:1033D000DFFC05E000F0FAFC02E00020FFF7A1FCB2 +:1033E000A268F2E93001401C41F10001C2E900018C +:1033F0005EE42DE9F0415A4C2079800741D5607890 +:1034000000283ED1E06801270026C178204619290E +:10341000856805F170006FD2DFE801F04B3E0D6F5B +:10342000C1C1801C34C1556287C1C1C1C1BE8B9569 +:1034300098A4B0C1BA0095F87F2000230121EDF7D0 +:10344000A1FD00281DD1A068082180F87F1080F818 +:10345000A26090E0002395F87D201946EDF792FDDB +:1034600010B1A06880F8A660A0680023194690F803 +:103470007C207030EDF786FD002802D0A06880F82F +:10348000A26067E4002395F87C201946EDF77AFDE9 +:1034900000B9FFDF042008E0002395F87C201946DE +:1034A000EDF770FD00B9FFDF0C20A16881F87C000A +:1034B00050E4002395F87C201946EDF763FD00B930 +:1034C000FFDF0D20F1E7002395F87C201946EDF78A +:1034D00059FD00B9FFDFA0680F2180F8A77008E050 +:1034E00095F87C00122800D0FFDFA068112180F839 +:1034F000A87080F87C102DE451E0002395F87C2022 +:103500001946EDF73FFD20B9A06890F8A80000B972 +:10351000FFDFA068132180F8A770EAE795F87C0028 +:10352000182800D0FFDF1A20BFE7BDE8F04100F007 +:1035300063BD002395F87C201946EDF723FD00B903 +:10354000FFDF0520B1E785F8A66003E4002395F8C6 +:103550007C201946EDF716FD00B9FFDF1C20A4E71B +:103560008C010020002395F87D201946EDF70AFD17 +:1035700000B9FFDFA06880F8A66006E4002395F894 +:103580007C201946EDF7FEFC00B9FFDF1F208CE719 +:10359000BDE8F04100F0F8BC85F87D60D3E7FFDFBF +:1035A0006FE710B5F74C6078002837D120794007D5 +:1035B0000FD5A06890F87C00032800D1FFDFA06839 +:1035C00090F87F10072904D101212170002180F893 +:1035D0007F10FFF70EFF00F0B5FCFFF753FEA07859 +:1035E000000716D5A0680023052190F87C207030D4 +:1035F000EDF7C8FC50B108206070A068D0F86411E5 +:1036000008780D2800D10020087002E00020F9F7AA +:10361000F9FCA068BDE81040FFF712BB10BD2DE912 +:10362000F041D84C07464FF00005607808436070C1 +:10363000207981062046806802D5A0F8985004E0E1 +:10364000B0F89810491CA0F8981000F018FD012659 +:10365000F8B1A088000506D5A06890F8821011B1D5 +:10366000A0F88E5015E0A068B0F88E10491CA0F8A4 +:103670008E1000F0F3FCA068B0F88E10B0F8902027 +:10368000914206D3A0F88E5080F83A61E078DFF7D7 +:103690003BFC207910F0600F08D0A06890F88010F3 +:1036A00021B980F880600121FEF782FD1FB9FFF784 +:1036B00078FFFFF799F93846FEF782FFBDE8F04141 +:1036C000F5F711BFAF4A51789378194313D11146DA +:1036D0000128896808D01079400703D591F87F0048 +:1036E000072808D001207047B1F84C00098E8842A5 +:1036F00001D8FEF7E4B900207047A249C278896872 +:10370000012A06D05AB1182A08D1B1F81011FAF7D7 +:10371000BABEB1F822114172090A81727047D1F81C +:10372000181189884173090A8173704770B5954CE7 +:1037300005460E46A0882843A080A80703D5E807C1 +:1037400000D0FFDFE660E80700D02661A80719D5A2 +:10375000F078062802D00B2814D10BE0A06890F86E +:103760007C1018290ED10021E0E93011012100F868 +:103770003E1C07E0A06890F87C10122902D10021BD +:1037800080F88210280601D50820A07068050AD5A7 +:10379000A0688288B0F87010304600F07FFC304698 +:1037A000BDE87040A9E763E43EB505466846F5F715 +:1037B00065FE00B9FFDF222200210098EAF767FECC +:1037C00003210098FAF750FD0098017821F01001CC +:1037D00001702946FAF76DFD6A4C192D71D2DFE8A8 +:1037E00005F020180D3EC8C8C91266C8C9C959C815 +:1037F000C8C8C8BBC9C971718AC89300A1680098BC +:1038000091F8151103E0A168009891F8E610017194 +:10381000B0E0A068D0F81C110098491CFAF795FD9B +:10382000A8E0A1680098D1F8182192790271D1F826 +:10383000182112894271120A8271D1F81821528915 +:10384000C271120A0272D1F8182192894272120AC8 +:103850008272D1F81811C989FAF74EFD8AE0A06882 +:10386000D0F818110098091DFAF77CFDA068D0F86F +:10387000181100980C31FAF77FFDA068D0F81811E4 +:1038800000981E31FAF77EFDA1680098D831FAF74A +:1038900087FD6FE06269009811780171918841712C +:1038A000090A81715188C171090A017262E03649C1 +:1038B000D1E90001CDE9010101A90098FAF78AFDDB +:1038C00058E056E0A068B0F844100098FAF794FD6C +:1038D000A068B0F8E6100098FAF792FDA068B0F87A +:1038E00048100098FAF780FDA068B0F8E81000983A +:1038F000FAF77EFD3EE0A168009891F83021027150 +:1039000091F83111417135E0A06890F81301EDF79D +:1039100032FD01460098FAF7B2FDA06890F8120156 +:1039200000F03DFA70B1A06890F8640000F037FA3A +:1039300040B1A06890F8121190F86400814201D063 +:10394000002002E0A06890F81201EDF714FD014696 +:103950000098FAF790FD0DE0A06890F80D1100981E +:10396000FAF7A8FDA06890F80C110098FAF7A6FDE8 +:1039700000E0FFDFF5F795FD00B9FFDF0098FFF7E6 +:10398000BCFE3EBD8C0100207C63020010B5F94CEA +:10399000A06890F8121109B990F8641080F86410CA +:1039A00090F8131109B990F8651080F8651000209F +:1039B000FEF7A8FEA068FAF750FE002806D0A0681F +:1039C000BDE8104000F59E71FAF7B1BE10BDF8B524 +:1039D000E84E00250446B060B5807570B57035704E +:1039E0000088F5F748FDB0680088F5F76AFDB4F87F +:1039F000F800B168401C82B201F17000EDF75BF88D +:103A000000B1FFDF94F87D00242809D1B4F87010CC +:103A1000B4F81001081A00B2002801DB707830B148 +:103A200094F87C0024280AD0252808D015E0FFF758 +:103A3000ADFF84F87D50B16881F897500DE0B4F87F +:103A40007010B4F81001081A00B2002805DB707875 +:103A500018B9FFF79BFF84F87C50A4F8F850FEF7E4 +:103A600088FD00281CD1B06890F8E400FE2801D041 +:103A7000FFF79AFEC0480090C04BC14A2146284635 +:103A8000F9F7ECF9B0680023052190F87C2070303C +:103A9000EDF778FA002803D0BDE8F840F8F771BFD9 +:103AA000F8BD10B5FEF765FD20B10020BDE810405F +:103AB0000146B4E5BDE81040F9F77FBA70B50C4691 +:103AC000154606464FF4B47200212046EAF7DFFCA3 +:103AD000268005B9FFDF2868C4F818016868C4F8B3 +:103AE0001C01A868C4F8640182E4F0F7E9BA2DE982 +:103AF000F0410D4607460621F0F7D8F9041E3DD0E7 +:103B0000D4F864110026087858B14A8821888A427E +:103B100007D109280FD00E2819D00D2826D0082843 +:103B20003ED094F83A01D0B36E701020287084F81B +:103B30003A61AF809AE06E7009202870D4F8640171 +:103B4000416869608168A9608089A88133E008467E +:103B5000F0F7DDFA0746EFF78AFF70B96E700E20B6 +:103B60002870D4F864014068686011E00846F0F7F6 +:103B7000CEFA0746EFF77BFF08B1002081E46E70B4 +:103B80000D202870D4F8640141686960008928819B +:103B9000D4F8640106703846EFF763FF66E00EE084 +:103BA0006E7008202870D4F86401416869608168EB +:103BB000A960C068E860D4F86401067056E094F823 +:103BC0003C0198B16E70152028700AE084F83C61C1 +:103BD000D4F83E016860D4F84201A860D4F84601E8 +:103BE000E86094F83C010028F0D13FE094F84A01E5 +:103BF00058B16E701C20287084F84A610A2204F5BE +:103C0000A671281DEAF719FC30E094F8560140B17E +:103C10006E701D20287084F85661D4F858016860D1 +:103C200024E094F8340168B16E701A20287004E022 +:103C300084F83461D4F83601686094F834010028BF +:103C4000F6D113E094F85C01002897D06E7016202E +:103C5000287007E084F85C61D4F85E016860B4F80D +:103C60006201288194F85C010028F3D1012008E466 +:103C7000404A5061D170704770B50D4604464EE021 +:103C8000B4F8F800401CA4F8F800B4F89800401C00 +:103C9000A4F89800204600F0F2F9B8B1B4F88E000C +:103CA000401CA4F88E00204600F0D8F9B4F88E002D +:103CB000B4F89010884209D30020A4F88E000120A7 +:103CC00084F83A012B48C078DFF71EF994F8A20077 +:103CD00020B1B4F89E00401CA4F89E0094F8A60001 +:103CE00020B1B4F8A400401CA4F8A40094F8140176 +:103CF00040B994F87F200023012104F17000EDF712 +:103D000041F920B1B4F89C00401CA4F89C00204666 +:103D1000FEF796FFB4F87000401CA4F870006D1E0A +:103D2000ADB2ADD23FE5134AC2E90601704770B5A6 +:103D30000446B0F8980094F88010D1B1B4F89A1005 +:103D40000D1A2D1F94F8960040B194F87C200023A2 +:103D5000092104F17000EDF715F9B8B1B4F88E60DF +:103D6000204600F08CF980B1B4F89000801B001F51 +:103D70000CE007E08C0100201F360200C53602006F +:103D80002D370200C0F10205DCE72846A84200DA20 +:103D90000546002D01DC002005E5A8B203E510F082 +:103DA0000C0000D00120704710B5012808D002286F +:103DB00008D0042808D0082806D0FFDF204610BD10 +:103DC0000124FBE70224F9E70324F7E770B5CC4CA4 +:103DD000A06890F87C001F2804D0607840F00100B3 +:103DE0006070E0E42069FAF73CFBD8B12069012259 +:103DF0000179407901F0070161F30705294600F0D8 +:103E0000070060F30F21A06880F8A2200022A0F82C +:103E10009E20232200F87C2FD0F8B400BDE870402B +:103E2000FEF7AABD0120FEF77CFFBDE870401E2012 +:103E3000FEF768BCF8B5B24C00230A21A06890F8E0 +:103E40007C207030EDF79EF838B32069FAF7E4FA79 +:103E5000C8B12069FAF7DAFA07462069FAF7DAFA00 +:103E600006462069FAF7D0FA05462069FAF7D0FA33 +:103E700001460097A06833462A463030FAF7C1FB66 +:103E8000A068FAF7EAFBA168002081F8A20081F897 +:103E90007C00BDE8F840FEF78FBD607840F001007F +:103EA0006070F8BD964810B580680088F0F72FF96B +:103EB000BDE81040EFF7C6BD10B5914CA36893F86C +:103EC0007C00162802D00220607010BD60780028A7 +:103ED000FBD1D3F81801002200F11E010E30C833C7 +:103EE000ECF7C2FFA0680021C0E92E11012180F883 +:103EF0008110182180F87C1010BD10B5804CA0688E +:103F000090F87C10132902D00220607010BD6178F7 +:103F10000029FBD1D0F8181100884988814200D0CF +:103F2000FFDFA068D0F8181120692631FAF745FAAA +:103F3000A1682069DC31FAF748FAA168162081F8F7 +:103F40007C0010BD10B56E4C207900071BD5607841 +:103F5000002818D1A068002190F8E400FEF72AFE9E +:103F6000A06890F8E400FE2800D1FFDFA068FE21E1 +:103F700080F8E41090F87F10082904D10221217004 +:103F8000002180F87F1010BD70B55D4D2421002404 +:103F9000A86890F87D20212A05D090F87C20232A5B +:103FA00018D0FFDFA0E590F8122112B990F8132184 +:103FB0002AB180F87D10A86880F8A64094E500F842 +:103FC0007D4F847690F8B1000028F4D00020FEF7F1 +:103FD00099FBF0E790F8122112B990F813212AB159 +:103FE00080F87C10A86880F8A2407DE580F87C40CD +:103FF0000020FEF787FBF5E770B5414C0025A0686F +:10400000D0F8181103884A889A4219D109780429EE +:1040100016D190F87C20002319467030ECF7B2FFDF +:1040200000B9FFDFA06890F8AA10890703D4012126 +:1040300080F87C1004E080F8A250D0F818010570D8 +:10404000A0680023194690F87D207030ECF79AFFA5 +:10405000002802D0A06880F8A65045E5B0F890206E +:10406000B0F88E108A4201D3511A00E000218288F4 +:10407000521D8A4202D3012180F89610704710B574 +:1040800090F8821041B990F87C200023062170300E +:10409000ECF778FF002800D0012010BD70B5114466 +:1040A000174D891D8CB2C078A968012806D040B18F +:1040B000182805D191F8120138B109E0A1F8224180 +:1040C00012E5D1F8180184800EE591F8131191B131 +:1040D000FFF765FE80B1A86890F86400FFF75FFE07 +:1040E00050B1A86890F8121190F86420914203D062 +:1040F00090F8130100B90024A868A0F81041F3E477 +:104100008C01002070B58F4C0829207A6CD2DFE832 +:1041100001F004176464276B6B6458B1F4F7D3F8AB +:10412000F5F7FFF80020A072F4F7B4F9BDE870408D +:10413000F4F758BCF5F717F9BDE87040F1F71FBF69 +:10414000DEF7B6FDF5F752F8D4E90001F1F7F3FC1C +:104150002060A07A401CC0B2A072282824D370BD71 +:10416000A07A0025401EC6B2E0683044F4F700FD96 +:1041700010B9E1687F208855A07A272828BF01253B +:10418000DEF796FDA17A01EB4102C2EB81110844F2 +:104190002946F5F755F8A07A282809D2401CC0B264 +:1041A000A072282828BF70BDBDE87040F4F772B92E +:1041B000207A002818BF00F086F8F4F74BFBF4F7DC +:1041C000F7FBF5F7D0F80120E0725F480078DEF7E2 +:1041D0009BFEBDE87040F1F7D2BE002808BF70BD5D +:1041E000BDE8704000F06FB8FFDF70BD10B5554CF2 +:1041F000207A002804BF0C2010BD00202072E0723D +:10420000607AF2F7F8FA607AF2F761FD607AF1F716 +:104210008CFF00280CBF1F20002010BD002270B5AD +:10422000484C06460D46207A68B12272E272607AE6 +:10423000F2F7E1FA607AF2F74AFD607AF1F775FF7A +:10424000002808BFFFDF4048E560067070BD70B50C +:10425000050007D0A5F5E8503C494C3881429CBF89 +:10426000122070BD374CE068002804BF092070BDE3 +:10427000207A00281CBF0C2070BD3548F1F7FAFEEB +:104280006072202804BF1F2070BDF1F76DFF206011 +:104290001DB12946F1F74FFC2060012065602072B6 +:1042A00000F011F8002070BD2649CA7A002A04BF28 +:1042B000002070471E22027000224270CB684360CB +:1042C000CA7201207047F0B585B0F1F74DFF1D4D62 +:1042D0000746394668682C6800EB80004600204697 +:1042E000F2F73AFCB04206DB6868811B3846F1F70A +:1042F00022FC0446286040F2367621463846F2F722 +:104300002BFCB04204DA31463846F1F714FC04467F +:1043100000208DF8000040F6E210039004208DF894 +:10432000050001208DF8040068460294F2F7CAF8EF +:10433000687A6946F2F743F9002808BFFFDF05B045 +:10434000F0BD000074120020AC010020B5EB3C0071 +:10435000054102002DE9F0410C4612490D68114A51 +:10436000114908321160A0F12001312901D3012047 +:104370000CE0412810D040CC0C4F94E80E0007EB25 +:104380008000241F50F8807C3046B84720600548E4 +:10439000001D0560BDE8F081204601F0EBFCF5E76B +:1043A00006207047100502400100000184630200EE +:1043B00010B55548F2F7FAFF00B1FFDF5248401C34 +:1043C000F2F7F4FF002800D0FFDF10BD2DE9F14F18 +:1043D0004E4E82B0D6F800B001274B48F2F7EEFF00 +:1043E000DFF8248120B9002708F10100F2F7FCFF73 +:1043F000474C00254FF0030901206060C4F80051CC +:10440000C4F80451029931602060DFF808A11BE074 +:10441000DAF80000C00617D50E2000F068F8EFF3B8 +:10442000108010F0010072B600D001200090C4F896 +:104430000493D4F8000120B9D4F8040108B901F0BC +:10444000A3FC009800B962B6D4F8000118B9D4F8FA +:1044500004010028DCD0D4F804010028CCD137B105 +:10446000C6F800B008F10100F2F7A8FF11E008F16A +:104470000100F2F7A3FF0028B6D1C4F80893C4F8EE +:104480000451C4F800510E2000F031F81E48F2F734 +:10449000ABFF0020BDE8FE8F2DE9F0438DB00D4647 +:1044A000064600240DF110090DF1200818E000BFA8 +:1044B00004EB4407102255F827106846E9F7BDFFC2 +:1044C00005EB8707102248467968E9F7B6FF68468A +:1044D000FFF77CFF10224146B868E9F7AEFF641C85 +:1044E000B442E5DB0DB00020BDE8F0836EE70028A4 +:1044F00009DB00F01F02012191404009800000F11A +:10450000E020C0F880127047AD01002004E50040B3 +:1045100000E0004010ED00E0B54900200870704751 +:1045200070B5B44D01232B60B34B1C68002CFCD03C +:10453000002407E00E6806601E68002EFCD0001DF7 +:10454000091D641C9442F5D30020286018680028D7 +:10455000FCD070BD70B5A64E0446A84D3078022838 +:1045600000D0FFDFAC4200D3FFDF7169A44801290E +:1045700003D847F23052944201DD03224271491CB4 +:104580007161291BC1609E49707800F02EF90028E6 +:1045900000D1FFDF70BD70B5954C0D466178884243 +:1045A00000D0FFDF954E082D4BD2DFE805F04A041E +:1045B0001E2D4A4A4A382078022800D0FFDF032007 +:1045C0002070A078012801D020B108E0A06801F097 +:1045D00085F904E004F1080007C8FFF7A1FF0520F2 +:1045E0002070BDE87040F1F7CABCF1F7BDFD01468F +:1045F0006068F2F7B1FAB04202D2616902290BD3C6 +:104600000320F2F7FAFD12E0F1F7AEFD0146606813 +:10461000F2F7A2FAB042F3D2BDE870409AE72078F0 +:1046200002280AD0052806D0FFDF04202070BDE84C +:10463000704000F0D0B8022000E00320F2F7DDFD6A +:10464000F3E7FFDF70BD70B50546F1F78DFD684CEF +:1046500060602078012800D0FFDF694901200870E0 +:104660000020087104208D6048716448C8600220F1 +:104670002070607800F0B9F8002800D1FFDF70BD2D +:1046800010B55B4C207838B90220F2F7CCFD18B990 +:104690000320F2F7C8FD08B1112010BD5948F1F709 +:1046A000E9FC6070202804D00120207000206061A7 +:1046B00010BD032010BD2DE9F0471446054600EB60 +:1046C00084000E46A0F1040801F01BF907464FF0E4 +:1046D000805001694F4306EB8401091FB14201D2AA +:1046E000012100E0002189461CB10069B4EB900F64 +:1046F00002D90920BDE8F0872846DCF7A3FD90B970 +:10470000A84510D3BD4205D2B84503D245EA0600FC +:10471000800701D01020EDE73046DCF793FD10B99B +:10472000B9F1000F01D00F20E4E73748374900689E +:10473000884205D0224631462846FFF7F1FE1AE0AE +:10474000FFF79EFF0028D5D1294800218560C0E9E8 +:1047500003648170F2F7D3FD08B12D4801E04AF2FD +:10476000F87060434FF47A7100F2E730B0FBF1F07B +:104770001830FFF768FF0020BCE770B505464FF022 +:10478000805004696C432046DCF75CFD08B10F20C3 +:1047900070BD01F0B6F8A84201D8102070BD1A48CB +:1047A0001A490068884203D0204601F097F810E0CB +:1047B000FFF766FF0028F1D10D4801218460817068 +:1047C000F2F79DFD08B1134800E013481830FFF7D9 +:1047D0003AFF002070BD10B5054C6078F1F7A5FCDC +:1047E00000B9FFDF0020207010BDF1F7E8BE000027 +:1047F000B001002004E5014000E40140105C0C0021 +:1048000084120020974502005C000020BEBAFECA58 +:1048100050280500645E0100A85B01007E4909681C +:104820000160002070477C4908600020704701212A +:104830008A0720B1012804D042F204007047916732 +:1048400000E0D1670020704774490120086042F2FF +:104850000600704708B50423704A1907103230B1BA +:10486000C1F80433106840F0010010600BE01068DC +:1048700020F001001060C1F808330020C1F80801E1 +:10488000674800680090002008BD011F0B2909D867 +:10489000624910310A6822F01E0242EA40000860B4 +:1048A0000020704742F2050070470F2809D85B4985 +:1048B00010310A6822F4706242EA00200860002089 +:1048C000704742F205007047000100F18040C0F8D7 +:1048D000041900207047000100F18040C0F8081959 +:1048E00000207047000100F18040D0F80009086006 +:1048F00000207047012801D907207047494A52F823 +:10490000200002680A43026000207047012801D994 +:1049100007207047434A52F8200002688A43026029 +:1049200000207047012801D9072070473D4A52F8FE +:104930002000006808600020704702003A494FF0EC +:10494000000003D0012A01D0072070470A60704799 +:10495000020036494FF0000003D0012A01D00720A1 +:1049600070470A60704708B54FF40072510510B1E6 +:10497000C1F8042308E0C1F808230020C1F824018D +:1049800027481C3000680090002008BD08B5802230 +:10499000D10510B1C1F8042308E0C1F808230020B4 +:1049A000C1F81C011E48143000680090002008BDAA +:1049B00008B54FF48072910510B1C1F8042308E0E6 +:1049C000C1F808230020C1F82001154818300068FC +:1049D0000090002008BD10493831096801600020AE +:1049E000704770B54FF080450024C5F80841F2F7D4 +:1049F00092FC10B9F2F799FC28B1C5F82441C5F82A +:104A00001C41C5F820414FF0E020802180F80014BF +:104A10000121C0F8001170BD0004004000050040F5 +:104A2000080100404864020078050040800500400D +:104A30006249634B0A6863499A42096801D1C1F32C +:104A400010010160002070475C495D4B0A685D49B8 +:104A5000091D9A4201D1C0F3100008600020704780 +:104A60005649574B0A68574908319A4201D1C0F359 +:104A7000100008600020704730B5504B504D1C6846 +:104A800042F20803AC4202D0142802D203E01128FB +:104A900001D3184630BDC3004B481844C0F8101568 +:104AA000C0F81425002030BD4449454B0A6842F245 +:104AB00009019A4202D0062802D203E0042801D359 +:104AC00008467047404A012142F8301000207047E4 +:104AD0003A493B4B0A6842F209019A4202D0062841 +:104AE00002D203E0042801D308467047364A012168 +:104AF00002EBC00041600020704770B52F4A304E75 +:104B0000314C156842F2090304EB8002B54204D02F +:104B1000062804D2C2F8001807E0042801D318467A +:104B200070BDC1F31000C2F80008002070BD70B560 +:104B3000224A234E244C156842F2090304EB8002FA +:104B4000B54204D0062804D2D2F8000807E00428B1 +:104B500001D3184670BDD2F80008C0F310000860F9 +:104B6000002070BD174910B50831184808601120A1 +:104B7000154A002102EBC003C3F81015C3F8141541 +:104B8000401C1428F6D3002006E0042804D302EBCE +:104B90008003C3F8001807E002EB8003D3F8004855 +:104BA000C4F31004C3F80048401C0628EDD310BD20 +:104BB0000449064808310860704700005C00002086 +:104BC000BEBAFECA00F5014000F001400000FEFF41 +:104BD000814B1B6803B19847BFF34F8F7F48016833 +:104BE0007F4A01F4E06111430160BFF34F8F00BFC2 +:104BF000FDE710B5EFF3108010F0010F72B601D091 +:104C0000012400E0002400F0DDF850B1DCF7BFFB28 +:104C1000F1F755F8F2F793FAF2F7BEFF7149002069 +:104C2000086004B962B6002010BD2DE9F0410C46C1 +:104C30000546EFF3108010F0010F72B601D0012687 +:104C400000E0002600F0BEF820B106B962B60820E8 +:104C5000BDE8F08101F01EF9DCF79DFB0246002063 +:104C600001234709BF0007F1E02700F01F01D7F833 +:104C70000071CF40F9071BD0202803D222FA00F19F +:104C8000C90727D141B2002904DB01F1E02191F8E5 +:104C9000001405E001F00F0101F1E02191F8141D6D +:104CA0004909082916D203FA01F717F0EC0F11D0C1 +:104CB000401C6428D5D3F2F74DFF4B4A4B490020E6 +:104CC000F2F790FF47494A4808602046DCF7C1FAEE +:104CD00060B904E006B962B641F20100B8E73E48A7 +:104CE00004602DB12846DCF701FB18B1102428E040 +:104CF000404D19E02878022802D94FF4805420E072 +:104D000007240028687801D0D8B908E0C8B1202865 +:104D100017D8A878212814D8012812D001E0A87843 +:104D200078B9E8780B280CD8DCF735FB2946F2F780 +:104D3000ECF9F0F783FF00F017FE2846DCF7F4FAF1 +:104D4000044606B962B61CB1FFF753FF20467FE761 +:104D500000207DE710B5044600F034F800B10120D2 +:104D60002070002010BD244908600020704770B5F5 +:104D70000C4622490D682149214E08310E60102849 +:104D800007D011280CD012280FD0132811D00120E1 +:104D900013E0D4E90001FFF748FF354620600DE03D +:104DA000FFF727FF0025206008E02068FFF7D2FF0B +:104DB00003E0114920680860002020600F48001DB2 +:104DC000056070BD07480A490068884201D101208A +:104DD0007047002070470000C80100200CED00E083 +:104DE0000400FA055C0000204814002000000020A8 +:104DF000BEBAFECA50640200040000201005024042 +:104E0000010000017D49C0B20860704700B57C49CF +:104E1000012808BF03200CD0022808BF042008D0B6 +:104E2000042808BF062004D0082816BFFFDF05208D +:104E300000BD086000BD70B505460C46164610461C +:104E4000F3F7D2F8022C08BF4FF47A7105D0012C89 +:104E50000CBF4FF4C86140F6340144183046F3F7F4 +:104E60003CF9204449F6797108444FF47A71B0FB5B +:104E7000F1F0281A70BD70B505460C460846F4F7E7 +:104E80002FFA022C08BF40F24C4105D0012C0CBF78 +:104E900040F634014FF4AF5149F6CA62511A084442 +:104EA0004FF47A7100F2E140B0FBF1F0281A801E55 +:104EB00070BD70B5064615460C460846F4F710FA64 +:104EC000022D08BF4FF47A7105D0012D0CBF4FF4AD +:104ED000C86140F63401022C08BF40F24C4205D0B4 +:104EE000012C0CBF40F634024FF4AF52891A08442B +:104EF00049F6FC6108444FF47A71B0FBF1F0301AC6 +:104F000070BD70B504460E460846F3F76DF80546C9 +:104F10003046F3F7E2F828444AF2AB3108444FF444 +:104F20007A71B0FBF1F0201A801E70BD2DE9F041BE +:104F300007461E460D4614461046082A16BF04288A +:104F40004EF62830F3F750F807EB4701C1EBC711D5 +:104F500000EBC100022D08BF40F24C4105D0012DED +:104F60000CBF40F634014FF4AF5147182846F4F710 +:104F7000B7F9381A4FF47A7100F6B730B0FBF1F593 +:104F80002046F3F7B9F828443044401DBDE8F081CD +:104F900070B5054614460E460846F3F725F805EBAE +:104FA0004502C2EBC512C0EBC2053046F3F795F8D7 +:104FB0002D1A2046082C16BF04284EF62830F3F789 +:104FC00013F828444FF47A7100F6B730B0FBF1F5CE +:104FD0002046F3F791F82844401D70BD0949082880 +:104FE00018BF0428086803BF20F46C5040F4444004 +:104FF00040F0004020F00040086070470C15004071 +:105000001015004040170040F0B585B00C4605462D +:10501000F9F73EF907466E78204603A96A46EEF78F +:1050200002FD81198EB258B1012F02D0032005B0C4 +:10503000F0BD204604AA0399EEF717FC049D01E099 +:10504000022F0FD1ED1C042E0FD32888BDF80010BD +:10505000001D80B2884201D8864202D14FF0000084 +:10506000E5E702D34FF00200E1E74FF00100DEE791 +:10507000FA48C078FF2814BF0120002070472DE9AE +:10508000F041F74C0746160060680D4603D0F9F76B +:1050900069F8A0B121E0F9F765F8D8B96068F9F7C7 +:1050A00061F8D0B915F00C0F17D06068C17811F015 +:1050B0003F0F1CBF007910F0100F0ED00AE0022E37 +:1050C00008D0E6481FB1807DFF2806D002E0C078F6 +:1050D000FF2802D00120BDE8F0810020BDE8F0816A +:1050E0000A4601460120CAE710B5DC4C1D2200210A +:1050F000A01CE9F7CCF97F206077FF202074E070D6 +:10510000A075A08920F060002030A08100202070D0 +:1051100010BD70B5D249486001200870D248D1490D +:10512000002541600570CD4C1D222946A01CE9F7E1 +:10513000AEF97F206077FF202074E070A075A08911 +:1051400020F060002030A081257070BD2DE9F0476F +:10515000C24C06462078C24F4FF0010907F10808FB +:10516000002520B13878D0B998F80000B8B198F887 +:10517000000068B387F80090D8F804103C2239B3D7 +:105180007570301DE9F759F90520307086F80490E4 +:105190003878002818BF88F8005005D015E03D7019 +:1051A000A11C4FF48E72EAE71D220021A01CE9F732 +:1051B0006EF97F206077FF202074E070A075A089D1 +:1051C00020F060002030A08125700120BDE8F0872C +:1051D0000020BDE8F087A148007800280CBF01201E +:1051E000002070470A460146002048E710B510B17C +:1051F000022810D014E09A4C6068F8F7B3FF78B931 +:105200006068C17811F03F0F1CBF007910F0100FDB +:1052100006D1012010BD9148007B10F0080FF8D195 +:10522000002010BD2DE9FF4F81B08C4D8346DDE994 +:105230000F042978DDF838A09846164600291CBFCF +:1052400005B0BDE8F08F8849097800291CBF05B07A +:10525000BDE8F08FE872B4B1012E08BF012708D075 +:10526000022E08BF022704D0042E16BF082E0327E3 +:10527000FFDFEF7385F81E804FF00008784F8CB188 +:10528000022C1DD020E0012E08BF012708D0022EDD +:1052900008BF022704D0042E16BF082E0327FFDF05 +:1052A000AF73E7E77868F8F75DFF68B97868C178A9 +:1052B00011F03F0F1CBF007910F0100F04D110E067 +:1052C000287B10F0080F0CD14FF003017868F8F735 +:1052D000FDFD30B14178090929740088C0F30B0045 +:1052E0006882CDF800807868F8F73CFF0146012815 +:1052F000BDF8000005F102090CBF40F0010020F0EC +:105300000100ADF8000099F80A2012F0020F4ED10A +:10531000022918BF20F0020049D000BFADF80000FC +:1053200010F0020F04D0002908BF40F0080801D097 +:1053300020F00808ADF800807868C17811F03F0FC0 +:105340001CBF007910F0020F0CD0314622464FF0FE +:105350000100FFF794FE002804BF48F00400ADF8F8 +:10536000000006D099F80A00800860F38208ADF8C2 +:10537000008099F80A004109BDF8000061F3461069 +:10538000ADF8000080B20090BDF80000A8810421B3 +:105390007868F8F79BFD002804BFA88920F060001A +:1053A0000CD0B0F80100C004C00C03D007E040F0FE +:1053B0000200B3E7A88920F060004030A8815CB902 +:1053C00016F00C0F08D07868C17811F03F0F1CBFA1 +:1053D000007910F0100F0DD17868C17811F03F0FEF +:1053E00008D0017911F0400F04D00621F8F76EFDC6 +:1053F00000786877314622460020FFF740FE60BB08 +:105400007968C87810F03F0F3FD0087910F0010F8D +:105410003BD0504605F1040905F10308BAF1FF0F2E +:105420000DD04A464146F8F781FA002808BFFFDF51 +:1054300098F8000040F0020088F8000025E00846D7 +:10544000F8F7DBFC88F800007868F8F7ADFC07286F +:105450000CD249467868F8F7B2FC16E094120020A6 +:10546000CC010020D2120020D40100207868F8F787 +:105470009BFC072809D100217868F8F727FD01680F +:10548000C9F800108088A9F804003146224601209E +:10549000FFF7F5FD80BB7868C17811F03F0F2BD086 +:1054A000017911F0020F27D005F1170605F1160852 +:1054B000BBF1020F18BFBBF1030F08D0F8F774FC63 +:1054C00007280AD231467868F8F787FC12E002987C +:1054D000016831608088B0800CE07868F8F764FC7F +:1054E000072807D101217868F8F7F0FC01683160DE +:1054F0008088B08088F800B0002C04BF05B0BDE8FB +:10550000F08F7868F8F72EFE022804BF05B0BDE8DA +:10551000F08F05F11F047868F8F76DFEAB7AC3F1E0 +:10552000FF01884228BF084605D9A98921F06001FA +:1055300001F14001A981C2B203EB04017868F8F7D8 +:1055400062FEA97A0844A87205B0BDE8F08FB048A1 +:105550000178002918BF704701220270007B10F00B +:10556000080F14BF07200620FCF75FBEA848C17BC8 +:10557000002908BF70470122818921F06001403174 +:1055800081810378002B18BF7047027011F0080F5B +:1055900014BF07200620FCF748BE2DE9FF5F9C4F93 +:1055A000DDF838B0914638780E4600281CBF04B0AC +:1055B000BDE8F09FBC1C1D2200212046E8F767FFD4 +:1055C000944D4FF0010A84F800A06868F8F7ECFBEE +:1055D00018B3012826D0022829D0062818BFFFDFDB +:1055E0002AD000BF04F11D016868F8F726FC20727C +:1055F000484604F1020904F10108FF2821D04A4677 +:105600004146F8F793F9002808BFFFDF98F800003B +:1056100040F0020088F8000031E0608940F013009B +:105620006081DFE7608940F015006081E0E7608914 +:1056300040F010006081D5E7608940F01200608181 +:10564000D0E76868F8F7D9FB88F800006868F8F7D1 +:10565000ABFB072804D249466868F8F7B0FB0EE0B8 +:105660006868F8F7A1FB072809D100216868F8F7F6 +:105670002DFC0168C9F800108088A9F8040084F89E +:1056800009B084F80CA000206073FF20A073A17AF9 +:1056900011F0040F08BF20752AD004F1150804F199 +:1056A0001409022E18BF032E09D06868F8F77CFB96 +:1056B00007280CD241466868F8F78FFB16E000987F +:1056C0000168C8F800108088A8F804000EE0686837 +:1056D000F8F76AFB072809D101216868F8F7F6FB9B +:1056E0000168C8F800108088A8F8040089F80060F4 +:1056F0007F20E0760398207787F800A004B006208A +:10570000BDE8F05FFCF791BD2DE9FF5F424F814698 +:105710009A4638788B4600281CBF04B0BDE8F09F3D +:105720003B48017831B1007B10F0100F04BF04B08A +:10573000BDE8F09F1D227C6800212046E8F7A7FE07 +:1057400048464FF00108661C324D84F8008004F191 +:105750000209FF280BD04A463146F8F7E7F800283F +:1057600008BFFFDF307840F0020030701CE068684E +:10577000F8F743FB30706868F8F716FB072804D287 +:1057800049466868F8F71BFB0EE06868F8F70CFB01 +:10579000072809D100216868F8F798FB0168C9F863 +:1057A00000108088A9F8040004F11D016868F8F76A +:1057B00044FB207284F809A060896BF3000040F07C +:1057C0001A00608184F80C8000206073FF20A073B1 +:1057D00020757F20E0760298207787F8008004B05B +:1057E0000720BDE8F05FFCF720BD094A137C834227 +:1057F00005BF508A88420020012070470448007B82 +:10580000C0F3411002280CBF0120002070470000A7 +:1058100094120020CC010020D4010020C2790D2375 +:1058200041B342BB8188012904D94908818004BF62 +:10583000012282800168012918BF002930D0016847 +:105840006FEA0101C1EBC10202EB011281796FEA3B +:10585000010101EB8103C3EB811111444FEA914235 +:1058600001608188B2FBF1F301FB132181714FF0DC +:10587000010102E01AB14FF00001C1717047818847 +:10588000FF2908D24FF6FF7202EA41018180FF2909 +:1058900084BFFF2282800168012918BF0029CED170 +:1058A0000360CCE7817931B1491E11F0FF018171AC +:1058B0001CBF002070470120704710B50121C17145 +:1058C0008171818004460421F1F7E8FD002818BFAA +:1058D00010BD2068401C206010BD00000B4A022152 +:1058E00011600B490B68002BFCD0084B1B1D186086 +:1058F00008680028FCD00020106008680028FCD050 +:1059000070474FF0805040697047000004E5014047 +:1059100000E4014002000B464FF00000014620D099 +:10592000012A04D0022A04D0032A0DD103E0012069 +:1059300002E0022015E00320072B05D2DFE803F088 +:105940000406080A0C0E100007207047012108E029 +:10595000022106E0032104E0042102E0052100E029 +:105960000621F0F7A4BB0000E24805218170002168 +:10597000017041707047E0490A78012A05D0CA6871 +:105980001044C8604038F1F7B4B88A6810448860A1 +:10599000F8E7002819D00378D849D94A13B1012B68 +:1059A0000ED011E00379012B00D06BB943790BB114 +:1059B000012B09D18368643B8B4205D2C0680EE09D +:1059C0000379012B02D00BB10020704743790BB152 +:1059D000012BF9D1C368643B8B42F5D280689042B9 +:1059E000F2D801207047C44901220A70027972B1CD +:1059F00000220A71427962B104224A7182685232ED +:105A00008A60C068C860BB49022088707047032262 +:105A1000EFE70322F1E770B5B74D04460020287088 +:105A2000207988B100202871607978B10420B14EC6 +:105A30006871A168F068F0F77EF8A860E0685230FD +:105A4000E8600320B07070BD0120ECE70320EEE7B2 +:105A50002DE9F04105460226F0F777FF006800B116 +:105A6000FFDFA44C01273DB12878B8B1012805D04B +:105A7000022811D0032814D027710DE06868C828C7 +:105A800008D30421F1F79BF820B16868FFF773FF92 +:105A9000012603E0002601E000F014F93046BDE8DD +:105AA000F08120780028F7D16868FFF772FF00289E +:105AB000E2D06868017879B1A078042800D0FFDFCF +:105AC00001216868FFF7A7FF8B49E07800F003F930 +:105AD0000028E1D1FFDFDFE7FFF785FF6770DBE735 +:105AE0002DE9F041834C0F46E178884200D0FFDF7A +:105AF00000250126082F7DD2DFE807F0040B2828B7 +:105B00003D434F57A0780328C9D00228C7D0FFDFF4 +:105B1000C5E7A078032802D0022800D0FFDF0420C8 +:105B2000A07025712078B8BB0020FFF724FF7248D1 +:105B30000178012906D08068E06000F0EDF820616E +:105B4000002023E0E078F0F734FCF5E7A0780328A4 +:105B500002D0022800D0FFDF207880BB022F08D0BF +:105B60005FF00500F1F749FBA078032840D0A5704D +:105B700095E70420F6E7A078042800D0FFDF022094 +:105B800004E0A078042800D0FFDF0120A168884746 +:105B9000FFF75EFF054633E003E0A078042800D05D +:105BA000FFDFBDE8F04100F08DB8A078042804D0F4 +:105BB000617809B1022800D0FFDF207818B1BDE874 +:105BC000F04100F08AB8207920B10620F1F715FBEA +:105BD00025710DE0607840B14749E07800F07BF82E +:105BE00000B9FFDF65705AE704E00720F1F705FB15 +:105BF000A67054E7FFDF52E73DB1012D03D0FFDF70 +:105C0000022DF9D14BE70420C0E70320BEE770B5B1 +:105C1000050004D0374CA078052806D101E01020FB +:105C200070BD0820F1F7FFFA08B1112070BD3548AA +:105C3000F0F720FAE070202806D00121F1F7DCF817 +:105C40000020A560A07070BD032070BD294810B56C +:105C5000017809B1112010BD8178052906D00129EC +:105C600006D029B101210170002010BD0F2010BD08 +:105C700000F033F8F8E770B51E4C0546A07808B17F +:105C8000012809D155B12846FFF783FE40B1287895 +:105C900040B1A078012809D00F2070BD102070BD40 +:105CA000072070BD2846FFF79EFE03E0002128462E +:105CB000FFF7B1FE1049E07800F00DF800B9FFDF02 +:105CC000002070BD0B4810B5006900F01DF8BDE85C +:105CD0001040F0F754B9F0F772BC064810B5C07820 +:105CE000F0F723FA00B9FFDF0820F1F786FABDE8E4 +:105CF000104039E6DC010020B41300203D8601008D +:105D0000FF1FA107E15A02000C490A6848F202137A +:105D10009A4302430A607047084A116848F2021326 +:105D200001EA03009943116070470246044B1020BA +:105D30001344FC2B01D8116000207047C8060240B4 +:105D40000018FEBF1EF0040F0CBFEFF30880EFF346 +:105D50000980014A10470000FF7B010001B41EB416 +:105D600000B5F1F76DFC01B40198864601BC01B0A5 +:105D70001EBD00008269034981614FF0010010449B +:105D8000704700005D5D02000FF20C0000F10000A2 +:105D9000694641F8080C20BF70470000FEDF184933 +:105DA0000978F9B90420714608421BD10699154AB1 +:105DB000914217DC0699022914DB02394878DF2862 +:105DC00010D10878FE2807D0FF280BD14FF0010032 +:105DD0004FF000020C4B184741F201000099019A64 +:105DE000094B1847094B002B02D01B68DB6818478A +:105DF0004FF0FF3071464FF00002034B1847000090 +:105E000028ED00E000700200D14B020004000020E9 +:105E1000174818497047FFF7FBFFDBF7CFF900BDC4 +:105E2000154816490968884203D1154A13605B6812 +:105E3000184700BD20BFFDE70F4810490968884298 +:105E400010D1104B18684FF0FF318842F2D080F328 +:105E500008884FF02021884204DD0B4802680321A6 +:105E60000A4302600948804709488047FFDF000075 +:105E7000C8130020C81300200010000000000020FC +:105E8000040000200070020014090040B92F000037 +:105E9000215E0200F0B44046494652465B460FB4CC +:105EA00002A0013001B50648004700BF01BC86468C +:105EB0000FBC8046894692469B46F0BC7047000066 +:105EC0000911000004207146084202D0EFF3098155 +:105ED00001E0EFF30881886902380078102813DBAD +:105EE00020280FDB2C280BDB0A4A12680A4B9A4247 +:105EF00003D1602804DB094A10470220086070477C +:105F0000074A1047074A1047074A12682C3212689E +:105F1000104700005C000020BEBAFECA9B130000C0 +:105F2000554302006F4D0200040000200D4B0E4946 +:105F300008470E4B0C4908470D4B0B4908470D4BC2 +:105F4000094908470C4B084908470C4B06490847C4 +:105F50000B4B054908470B4B034908470A4B0249BD +:105F60000847000041BF000079C10000792D000002 +:105F7000F32B0000812B0000012E0000B71300005E +:105F80003F2900007D2F0000455D020000210160D7 +:105F90004160017270470A6802600B7903717047B3 +:105FA00089970000FF9800005B9A0000C59A0000E6 +:105FB000FF9A0000339B0000659B00009D9B000042 +:105FC0003D9C00007D980000859A0000331200007F +:105FD0000744000053440000B94400004745000056 +:105FE0006146000037470000694700004148000053 +:105FF000DB4800002F490000154A0000354A000028 +:10600000AD160000D1160000F11500004D1600007D +:10601000031700009717000003610000C36200002F +:10602000A1660000BB67000043680000C168000073 +:10603000256900004D6A00001D6B0000896B00009F +:10604000574A00005D4A0000674A0000CF4A00003E +:10605000FB4A0000B74C0000E14C0000194D000065 +:10606000834D00006D4E0000834E00007744000019 +:10607000974E0000B94E0000FF4E000033120000A2 +:10608000331200003312000033120000C12500005B +:1060900047260000632600007F2600000D28000030 +:1060A000A9260000B3260000F526000017270000EF +:1060B000F3270000352800003312000033120000DF +:1060C00097840000B7840000B9840000FD840000BC +:1060D0002B8500001B860000A7860000BB86000001 +:1060E000098700001F880000C1890000E98A0000BC +:1060F0003D740000018B00003312000033120000D9 +:10610000EBB700004DB90000A7B9000021BA0000AC +:10611000CDBA0000010000000000000010011001D5 +:106120003A0200001A020000020004050600000006 +:1061300007111102FFFFFFFF0000FFFFF3B3000094 +:10614000273D0000532100008774000001900000EB +:1061500000000000BF9200009B920000AD92000082 +:10616000000002000000000000020000000000002B +:1061700000010000000000004382000023820000B4 +:10618000918200002D250000EF2400000F25000063 +:10619000DBAA000007AB00000FAD0000FD590000B6 +:1061A000B182000000000000E18200007B250000B9 +:1061B000000000000000000000000000F1AB000043 +:1061C00000000000915A00000300000001555555E1 +:1061D000D6BE898E00006606660C661200000A03B1 +:1061E000AE055208000056044608360CC7FD0000F4 +:1061F0005BFF0000A1FB0000C3FD0000A7A8010099 +:106200009B040100AAAED7AB15412010000000008E +:10621000900A0000900A00007B5700007B570000A6 +:10622000E143000053B200000B7700006320000040 +:10623000BD3A020063BD0100BD570000BD5700001C +:1062400005440000E5B2000093770000D72000006D +:10625000EB3A020079BD0100700170014000380086 +:106260005C0024006801200200000300656C746279 +:10627000000000000000000000000000000000001E +:106280008700000000000000000000000000000087 +:10629000BE83605ADB0B376038A5F5AA9183886C02 +:1062A000010000007746010049550100000000018F +:1062B0000206030405000000070000FB349B5F801A +:1062C000000080001000000000000000000000003E +:1062D000060000000A000000320000007300000009 +:1062E000B4000000F401FA00960064004B00320094 +:1062F0001E0014000A000500020001000049000011 +:1063000000000000D7CF0100E9D1010025D1010034 +:10631000EBCF0100000000008FD40100000101025A +:10632000010202030C0802170D0101020909010113 +:1063300006020918180301010909030305000000FA +:10634000555555252627D6BE898E00002BFB01000A +:1063500003F7010049FA01003FF20100BB220200ED +:10636000B7FB0100F401FA00960064004B00320014 +:106370001E0014000A00050002000100254900006B +:1063800000000000314A0200494A0200614A02004E +:10639000794A0200A94A0200D14A0200FB4A0200DF +:1063A0002F4B02007B470200B7460200A1430200C8 +:1063B0002B5D0200AD730100BD730100E9730100A4 +:1063C000BB740100C3740100D57401002F480200A2 +:1063D000494802001D4802002748020055480200B3 +:1063E0008B480200AB480200C9480200D7480200AF +:1063F000E5480200F54802000D4902002549020067 +:106400003B4902005149020000000000DFBC0000CF +:1064100035BD00004BBD000015590200CD43020000 +:10642000994402000F5C02004D5C0200775C0200A0 +:106430009D710100FD760100674902008D4902004F +:10644000B1490200D74902001C0500402005004068 +:10645000001002007464020008000020E80100003F +:106460004411000098640200F0010020D8110000DF +:10647000A011000001181348140244200B440C061C +:106480004813770B1B2034041ABA0401A40213101A +:08649000327F0B744411C000BF +:00000001FF diff --git a/bin/setup-python-for-esp-debug.sh b/bin/setup-python-for-esp-debug.sh new file mode 100644 index 000000000..edba43e72 --- /dev/null +++ b/bin/setup-python-for-esp-debug.sh @@ -0,0 +1,12 @@ +# shellcheck shell=bash +# (this minor script is actually shell agnostic, and is intended to be sourced rather than run in a subshell) + +# This is a little script you can source if you want to make ESP debugging work on a modern (24.04) ubuntu machine +# It assumes you have built and installed python 2.7 from source with: +# ./configure --enable-optimizations --enable-shared --enable-unicode=ucs4 +# sudo make clean +# make +# sudo make altinstall + +export LD_LIBRARY_PATH=$HOME/packages/python-2.7.18/ +export PYTHON_HOME=/usr/local/lib/python2.7/ diff --git a/bin/uf2conv.py b/bin/uf2conv.py index b619d14db..a1e241b7a 100755 --- a/bin/uf2conv.py +++ b/bin/uf2conv.py @@ -1,39 +1,38 @@ #!/usr/bin/env python3 -import sys -import struct -import subprocess -import re +import argparse import os import os.path -import argparse +import re +import struct +import subprocess +import sys - -UF2_MAGIC_START0 = 0x0A324655 # "UF2\n" -UF2_MAGIC_START1 = 0x9E5D5157 # Randomly selected -UF2_MAGIC_END = 0x0AB16F30 # Ditto +UF2_MAGIC_START0 = 0x0A324655 # "UF2\n" +UF2_MAGIC_START1 = 0x9E5D5157 # Randomly selected +UF2_MAGIC_END = 0x0AB16F30 # Ditto families = { - 'SAMD21': 0x68ed2b88, - 'SAML21': 0x1851780a, - 'SAMD51': 0x55114460, - 'NRF52': 0x1b57745f, - 'STM32F0': 0x647824b6, - 'STM32F1': 0x5ee21072, - 'STM32F2': 0x5d1a0a2e, - 'STM32F3': 0x6b846188, - 'STM32F4': 0x57755a57, - 'STM32F7': 0x53b80f00, - 'STM32G0': 0x300f5633, - 'STM32G4': 0x4c71240a, - 'STM32H7': 0x6db66082, - 'STM32L0': 0x202e3a91, - 'STM32L1': 0x1e1f432d, - 'STM32L4': 0x00ff6919, - 'STM32L5': 0x04240bdf, - 'STM32WB': 0x70d16653, - 'STM32WL': 0x21460ff0, - 'ATMEGA32': 0x16573617, - 'MIMXRT10XX': 0x4FB2D5BD + "SAMD21": 0x68ED2B88, + "SAML21": 0x1851780A, + "SAMD51": 0x55114460, + "NRF52": 0x1B57745F, + "STM32F0": 0x647824B6, + "STM32F1": 0x5EE21072, + "STM32F2": 0x5D1A0A2E, + "STM32F3": 0x6B846188, + "STM32F4": 0x57755A57, + "STM32F7": 0x53B80F00, + "STM32G0": 0x300F5633, + "STM32G4": 0x4C71240A, + "STM32H7": 0x6DB66082, + "STM32L0": 0x202E3A91, + "STM32L1": 0x1E1F432D, + "STM32L4": 0x00FF6919, + "STM32L5": 0x04240BDF, + "STM32WB": 0x70D16653, + "STM32WL": 0x21460FF0, + "ATMEGA32": 0x16573617, + "MIMXRT10XX": 0x4FB2D5BD, } INFO_FILE = "/INFO_UF2.TXT" @@ -46,15 +45,17 @@ def is_uf2(buf): w = struct.unpack(" 10*1024*1024: + if padding > 10 * 1024 * 1024: assert False, "More than 10M of padding needed at " + ptr if padding % 4 != 0: assert False, "Non-word padding size at " + ptr @@ -91,6 +92,7 @@ def convert_from_uf2(buf): curraddr = newaddr + datalen return outp + def convert_to_carray(file_content): outp = "const unsigned char bindata[] __attribute__((aligned(16))) = {" for i in range(len(file_content)): @@ -100,6 +102,7 @@ def convert_to_carray(file_content): outp += "\n};\n" return outp + def convert_to_uf2(file_content): global familyid datapadding = b"" @@ -109,13 +112,21 @@ def convert_to_uf2(file_content): outp = b"" for blockno in range(numblocks): ptr = 256 * blockno - chunk = file_content[ptr:ptr + 256] + chunk = file_content[ptr : ptr + 256] flags = 0x0 if familyid: flags |= 0x2000 - hd = struct.pack(b"= 3 and words[1] == "2" and words[2] == "FAT": drives.append(words[0]) else: @@ -206,7 +238,6 @@ def get_drives(): for d in os.listdir(rootpath): drives.append(os.path.join(rootpath, d)) - def has_info(d): try: return os.path.isfile(d + INFO_FILE) @@ -217,7 +248,7 @@ def get_drives(): def board_id(path): - with open(path + INFO_FILE, mode='r') as file: + with open(path + INFO_FILE, mode="r") as file: file_content = file.read() return re.search("Board-ID: ([^\r\n]*)", file_content).group(1) @@ -235,30 +266,61 @@ def write_file(name, buf): def main(): global appstartaddr, familyid + def error(msg): print(msg) sys.exit(1) - parser = argparse.ArgumentParser(description='Convert to UF2 or flash directly.') - parser.add_argument('input', metavar='INPUT', type=str, nargs='?', - help='input file (HEX, BIN or UF2)') - parser.add_argument('-b' , '--base', dest='base', type=str, - default="0x2000", - help='set base address of application for BIN format (default: 0x2000)') - parser.add_argument('-o' , '--output', metavar="FILE", dest='output', type=str, - help='write output to named file; defaults to "flash.uf2" or "flash.bin" where sensible') - parser.add_argument('-d' , '--device', dest="device_path", - help='select a device path to flash') - parser.add_argument('-l' , '--list', action='store_true', - help='list connected devices') - parser.add_argument('-c' , '--convert', action='store_true', - help='do not flash, just convert') - parser.add_argument('-D' , '--deploy', action='store_true', - help='just flash, do not convert') - parser.add_argument('-f' , '--family', dest='family', type=str, - default="0x0", - help='specify familyID - number or name (default: 0x0)') - parser.add_argument('-C' , '--carray', action='store_true', - help='convert binary file to a C array, not UF2') + + parser = argparse.ArgumentParser(description="Convert to UF2 or flash directly.") + parser.add_argument( + "input", + metavar="INPUT", + type=str, + nargs="?", + help="input file (HEX, BIN or UF2)", + ) + parser.add_argument( + "-b", + "--base", + dest="base", + type=str, + default="0x2000", + help="set base address of application for BIN format (default: 0x2000)", + ) + parser.add_argument( + "-o", + "--output", + metavar="FILE", + dest="output", + type=str, + help='write output to named file; defaults to "flash.uf2" or "flash.bin" where sensible', + ) + parser.add_argument( + "-d", "--device", dest="device_path", help="select a device path to flash" + ) + parser.add_argument( + "-l", "--list", action="store_true", help="list connected devices" + ) + parser.add_argument( + "-c", "--convert", action="store_true", help="do not flash, just convert" + ) + parser.add_argument( + "-D", "--deploy", action="store_true", help="just flash, do not convert" + ) + parser.add_argument( + "-f", + "--family", + dest="family", + type=str, + default="0x0", + help="specify familyID - number or name (default: 0x0)", + ) + parser.add_argument( + "-C", + "--carray", + action="store_true", + help="convert binary file to a C array, not UF2", + ) args = parser.parse_args() appstartaddr = int(args.base, 0) @@ -268,14 +330,17 @@ def main(): try: familyid = int(args.family, 0) except ValueError: - error("Family ID needs to be a number or one of: " + ", ".join(families.keys())) + error( + "Family ID needs to be a number or one of: " + + ", ".join(families.keys()) + ) if args.list: list_drives() else: if not args.input: error("Need input file") - with open(args.input, mode='rb') as f: + with open(args.input, mode="rb") as f: inpbuf = f.read() from_uf2 = is_uf2(inpbuf) ext = "uf2" @@ -291,8 +356,10 @@ def main(): ext = "h" else: outbuf = convert_to_uf2(inpbuf) - print("Converting to %s, output size: %d, start address: 0x%x" % - (ext, len(outbuf), appstartaddr)) + print( + "Converting to %s, output size: %d, start address: 0x%x" + % (ext, len(outbuf), appstartaddr) + ) if args.convert or ext != "uf2": drives = [] if args.output == None: diff --git a/bin/wio_tracker_bootloader_update.bin b/bin/wio_tracker_bootloader_update.bin new file mode 100644 index 000000000..57cd0ad17 --- /dev/null +++ b/bin/wio_tracker_bootloader_update.bin @@ -0,0 +1,30 @@ +# tips from mark on how to replace the (broken) bootloader on the red wio_tracker_1110 boards. + +~/.platformio/penv/bin/adafruit-nrfutil --verbose dfu serial --package wio_tracker_1110_bootloader-0.9.1_s140_7.3.0.zip -p /dev/ttyACM1 -b 115200 --singlebank --touch 1200 + +exit + +# Output should look like + +Upgrading target on /dev/ttyACM1 with DFU package /home/kevinh/development/meshtastic/WioWM1110/wio_tracker_1110_bootloader-0.9.1_s140_7.3.0.zip. Flow control is disabled, Single bank, Touch 1200 +Touched serial port /dev/ttyACM1 +Opened serial port /dev/ttyACM1 +Starting DFU upgrade of type 3, SoftDevice size: 152728, bootloader size: 39000, application size: 0 +Sending DFU start packet +Sending DFU init packet +Sending firmware file +######################################## +######################################## +######################################## +######################################## +######################################## +######################################## +######################################## +######################################## +######################################## +############### +Activating new firmware + +DFU upgrade took 20.242434978485107s +Device programmed. + diff --git a/boards/CDEBYTE_EoRa-S3.json b/boards/CDEBYTE_EoRa-S3.json new file mode 100644 index 000000000..afaabc5a7 --- /dev/null +++ b/boards/CDEBYTE_EoRa-S3.json @@ -0,0 +1,38 @@ +{ + "build": { + "arduino": { + "ldscript": "esp32s3_out.ld" + }, + "core": "esp32", + "extra_flags": [ + "-D CDEBYTE_EORA_S3", + "-D ARDUINO_USB_CDC_ON_BOOT=1", + "-D ARDUINO_USB_MODE=0", + "-D ARDUINO_RUNNING_CORE=1", + "-D ARDUINO_EVENT_RUNNING_CORE=1", + "-D BOARD_HAS_PSRAM" + ], + "f_cpu": "240000000L", + "f_flash": "80000000L", + "flash_mode": "dio", + "hwids": [["0x303A", "0x1001"]], + "mcu": "esp32s3", + "variant": "CDEBYTE_EoRa-S3" + }, + "connectivity": ["wifi", "bluetooth"], + "debug": { + "openocd_target": "esp32s3.cfg" + }, + "frameworks": ["arduino", "espidf"], + "name": "CDEBYTE EoRa-S3", + "upload": { + "flash_size": "4MB", + "maximum_ram_size": 327680, + "maximum_size": 4194304, + "wait_for_upload_port": true, + "require_upload_port": true, + "speed": 921600 + }, + "url": "https://www.cdebyte.com/Module-Testkits-EoRaPI", + "vendor": "CDEBYTE" +} diff --git a/boards/ESP32-S3-WROOM-1-N4.json b/boards/ESP32-S3-WROOM-1-N4.json new file mode 100644 index 000000000..160926b21 --- /dev/null +++ b/boards/ESP32-S3-WROOM-1-N4.json @@ -0,0 +1,39 @@ +{ + "build": { + "arduino": { + "ldscript": "esp32s3_out.ld" + }, + "core": "esp32", + "extra_flags": [ + "-D ARDUINO_USB_CDC_ON_BOOT=0", + "-D ARDUINO_USB_MSC_ON_BOOT=0", + "-D ARDUINO_USB_DFU_ON_BOOT=0", + "-D ARDUINO_USB_MODE=0", + "-D ARDUINO_RUNNING_CORE=1", + "-D ARDUINO_EVENT_RUNNING_CORE=1" + ], + "f_cpu": "240000000L", + "f_flash": "80000000L", + "flash_mode": "qio", + "hwids": [["0x303A", "0x1001"]], + "mcu": "esp32s3", + "variant": "ESP32-S3-WROOM-1-N4" + }, + "connectivity": ["wifi", "bluetooth"], + "debug": { + "default_tool": "esp-builtin", + "onboard_tools": ["esp-builtin"], + "openocd_target": "esp32s3.cfg" + }, + "frameworks": ["arduino", "espidf"], + "name": "ESP32-S3-WROOM-1-N4 (4 MB Flash, No PSRAM)", + "upload": { + "flash_size": "4MB", + "maximum_ram_size": 524288, + "maximum_size": 4194304, + "require_upload_port": true, + "speed": 921600 + }, + "url": "https://www.espressif.com/sites/default/files/documentation/esp32-s3-wroom-1_wroom-1u_datasheet_en.pdf", + "vendor": "Espressif" +} diff --git a/boards/canaryone.json b/boards/canaryone.json index d8f966a47..f64a4a7c7 100644 --- a/boards/canaryone.json +++ b/boards/canaryone.json @@ -7,7 +7,10 @@ "cpu": "cortex-m4", "extra_flags": "-DARDUINO_NRF52840_CANARY -DNRF52840_XXAA", "f_cpu": "64000000L", - "hwids": [["0x239A", "0x4405"]], + "hwids": [ + ["0x239A", "0x4405"], + ["0x239A", "0x009F"] + ], "usb_product": "CanaryOne", "mcu": "nrf52840", "variant": "canaryone", diff --git a/boards/lora-relay-v1.json b/boards/heltec_mesh_node_t114.json similarity index 63% rename from boards/lora-relay-v1.json rename to boards/heltec_mesh_node_t114.json index b390b8404..2bd306eb9 100644 --- a/boards/lora-relay-v1.json +++ b/boards/heltec_mesh_node_t114.json @@ -5,12 +5,16 @@ }, "core": "nRF5", "cpu": "cortex-m4", - "extra_flags": "-DARDUINO_NRF52840_LORA_RELAY_V1 -DNRF52840_XXAA", + "extra_flags": "-DHELTEC_T114 -DNRF52840_XXAA", "f_cpu": "64000000L", - "hwids": [["0x239A", "0x4404"]], - "usb_product": "LORA_RELAY", + "hwids": [ + ["0x239A", "0x4405"], + ["0x239A", "0x0029"], + ["0x239A", "0x002A"] + ], + "usb_product": "HT-n5262", "mcu": "nrf52840", - "variant": "lora_relay_v1", + "variant": "heltec_mesh_node_t114", "variants_dir": "variants", "bsp": { "name": "adafruit" @@ -33,15 +37,17 @@ "openocd_target": "nrf52840-mdk-rs" }, "frameworks": ["arduino"], - "name": "Meshtastic Lora Relay V1 (Adafruit BSP)", + "name": "Heltec nrf (Adafruit BSP)", "upload": { "maximum_ram_size": 248832, "maximum_size": 815104, - "require_upload_port": true, "speed": 115200, - "protocol": "jlink", - "protocols": ["jlink", "nrfjprog", "stlink"] + "protocol": "nrfutil", + "protocols": ["jlink", "nrfjprog", "nrfutil", "stlink"], + "use_1200bps_touch": true, + "require_upload_port": true, + "wait_for_upload_port": true }, - "url": "https://github.com/BigCorvus/SX1262-LoRa-BLE-Relay", - "vendor": "BigCorvus" + "url": "FIXME", + "vendor": "Heltec" } diff --git a/boards/heltec_vision_master_e213.json b/boards/heltec_vision_master_e213.json new file mode 100644 index 000000000..bf5fe15ad --- /dev/null +++ b/boards/heltec_vision_master_e213.json @@ -0,0 +1,42 @@ +{ + "build": { + "arduino": { + "ldscript": "esp32s3_out.ld", + "partitions": "default_8MB.csv" + }, + "core": "esp32", + "extra_flags": [ + "-DBOARD_HAS_PSRAM", + "-DARDUINO_USB_CDC_ON_BOOT=1", + "-DARDUINO_USB_MODE=0", + "-DARDUINO_RUNNING_CORE=1", + "-DARDUINO_EVENT_RUNNING_CORE=1" + ], + "f_cpu": "240000000L", + "f_flash": "80000000L", + "flash_mode": "qio", + "hwids": [ + ["0x303A", "0x1001"], + ["0x303A", "0x0002"] + ], + "mcu": "esp32s3", + "variant": "heltec_vision_master_e213" + }, + "connectivity": ["wifi", "bluetooth", "lora"], + "debug": { + "openocd_target": "esp32s3.cfg" + }, + "frameworks": ["arduino", "espidf"], + "name": "Heltec Vision Master E213", + "upload": { + "flash_size": "8MB", + "maximum_ram_size": 327680, + "maximum_size": 8388608, + "use_1200bps_touch": true, + "wait_for_upload_port": true, + "require_upload_port": true, + "speed": 921600 + }, + "url": "https://heltec.org/project/vision-master-e213/", + "vendor": "Heltec" +} diff --git a/boards/heltec_vision_master_e290.json b/boards/heltec_vision_master_e290.json new file mode 100644 index 000000000..70f7d5f02 --- /dev/null +++ b/boards/heltec_vision_master_e290.json @@ -0,0 +1,42 @@ +{ + "build": { + "arduino": { + "ldscript": "esp32s3_out.ld", + "partitions": "default_8MB.csv" + }, + "core": "esp32", + "extra_flags": [ + "-DBOARD_HAS_PSRAM", + "-DARDUINO_USB_CDC_ON_BOOT=1", + "-DARDUINO_USB_MODE=0", + "-DARDUINO_RUNNING_CORE=1", + "-DARDUINO_EVENT_RUNNING_CORE=1" + ], + "f_cpu": "240000000L", + "f_flash": "80000000L", + "flash_mode": "qio", + "hwids": [ + ["0x303A", "0x1001"], + ["0x303A", "0x0002"] + ], + "mcu": "esp32s3", + "variant": "heltec_vision_master_e290" + }, + "connectivity": ["wifi", "bluetooth", "lora"], + "debug": { + "openocd_target": "esp32s3.cfg" + }, + "frameworks": ["arduino", "espidf"], + "name": "Heltec Vision Master E290", + "upload": { + "flash_size": "8MB", + "maximum_ram_size": 327680, + "maximum_size": 8388608, + "use_1200bps_touch": true, + "wait_for_upload_port": true, + "require_upload_port": true, + "speed": 921600 + }, + "url": "https://heltec.org/project/vision-master-e290/", + "vendor": "Heltec" +} diff --git a/boards/heltec_vision_master_t190.json b/boards/heltec_vision_master_t190.json new file mode 100644 index 000000000..341e70218 --- /dev/null +++ b/boards/heltec_vision_master_t190.json @@ -0,0 +1,42 @@ +{ + "build": { + "arduino": { + "ldscript": "esp32s3_out.ld", + "partitions": "default_8MB.csv" + }, + "core": "esp32", + "extra_flags": [ + "-DBOARD_HAS_PSRAM", + "-DARDUINO_USB_CDC_ON_BOOT=1", + "-DARDUINO_USB_MODE=0", + "-DARDUINO_RUNNING_CORE=1", + "-DARDUINO_EVENT_RUNNING_CORE=1" + ], + "f_cpu": "240000000L", + "f_flash": "80000000L", + "flash_mode": "qio", + "hwids": [ + ["0x303A", "0x1001"], + ["0x303A", "0x0002"] + ], + "mcu": "esp32s3", + "variant": "heltec_vision_master_t190" + }, + "connectivity": ["wifi", "bluetooth", "lora"], + "debug": { + "openocd_target": "esp32s3.cfg" + }, + "frameworks": ["arduino", "espidf"], + "name": "Heltec Vision Master t190", + "upload": { + "flash_size": "8MB", + "maximum_ram_size": 327680, + "maximum_size": 8388608, + "use_1200bps_touch": true, + "wait_for_upload_port": true, + "require_upload_port": true, + "speed": 921600 + }, + "url": "https://heltec.org/project/vision-master-t190/", + "vendor": "Heltec" +} diff --git a/boards/lora_isp4520.json b/boards/lora_isp4520.json deleted file mode 100644 index 8125aa666..000000000 --- a/boards/lora_isp4520.json +++ /dev/null @@ -1,40 +0,0 @@ -{ - "build": { - "arduino": { - "ldscript": "nrf52832_s132_v6.ld" - }, - "core": "nRF5", - "cpu": "cortex-m4", - "extra_flags": "-DNRF52832_XXAA -DNRF52", - "f_cpu": "64000000L", - "mcu": "nrf52832", - "variant": "lora_isp4520", - "bsp": { - "name": "adafruit" - }, - "softdevice": { - "sd_flags": "-DS132", - "sd_name": "s132", - "sd_version": "6.1.1", - "sd_fwid": "0x00B7" - } - }, - "connectivity": ["bluetooth"], - "debug": { - "jlink_device": "nRF52832_xxAA", - "svd_path": "nrf52.svd", - "openocd_target": "nrf52840-mdk-rs" - }, - "frameworks": ["arduino"], - "name": "lora ISP4520", - "upload": { - "maximum_ram_size": 65536, - "maximum_size": 524288, - "require_upload_port": true, - "speed": 115200, - "protocol": "nrfutil", - "protocols": ["jlink", "nrfjprog", "nrfutil", "stlink"] - }, - "url": "", - "vendor": "PsiSoft" -} diff --git a/boards/me25ls01-4y10td.json b/boards/me25ls01-4y10td.json new file mode 100644 index 000000000..9e1d63265 --- /dev/null +++ b/boards/me25ls01-4y10td.json @@ -0,0 +1,58 @@ +{ + "build": { + "arduino": { + "ldscript": "nrf52840_s140_v7.ld" + }, + "core": "nRF5", + "cpu": "cortex-m4", + "extra_flags": "-DME25LS01_4Y10TD -DNRF52840_XXAA", + "f_cpu": "64000000L", + "hwids": [ + ["0x239A", "0x8029"], + ["0x239A", "0x0029"], + ["0x239A", "0x002A"], + ["0x239A", "0x802A"] + ], + "usb_product": "ME25LS01-BOOT", + "mcu": "nrf52840", + "variant": "MINEWSEMI_ME25LS01", + "bsp": { + "name": "adafruit" + }, + "softdevice": { + "sd_flags": "-DS140", + "sd_name": "s140", + "sd_version": "7.3.0", + "sd_fwid": "0x0123" + }, + "bootloader": { + "settings_addr": "0xFF000" + } + }, + "connectivity": ["bluetooth"], + "debug": { + "jlink_device": "nRF52840_xxAA", + "svd_path": "nrf52840.svd" + }, + "frameworks": ["arduino"], + "name": "Minesemi ME25LS01", + "upload": { + "maximum_ram_size": 248832, + "maximum_size": 815104, + "speed": 115200, + "protocol": "nrfutil", + "protocols": [ + "jlink", + "nrfjprog", + "nrfutil", + "stlink", + "cmsis-dap", + "blackmagic" + ], + "use_1200bps_touch": true, + "require_upload_port": true, + "wait_for_upload_port": true + }, + "url": "https://en.minewsemi.com/lora-module/lr1110-nrf52840-me25LS01l", + "vendor": "Minesemi" +} diff --git a/boards/ms24sf1.json b/boards/ms24sf1.json new file mode 100644 index 000000000..8356e3012 --- /dev/null +++ b/boards/ms24sf1.json @@ -0,0 +1,58 @@ +{ + "build": { + "arduino": { + "ldscript": "nrf52840_s140_v7.ld" + }, + "core": "nRF5", + "cpu": "cortex-m4", + "extra_flags": "-DMS24SF1 -DNRF52840_XXAA", + "f_cpu": "64000000L", + "hwids": [ + ["0x239A", "0x8029"], + ["0x239A", "0x0029"], + ["0x239A", "0x002A"], + ["0x239A", "0x802A"] + ], + "usb_product": "MS24SF1-BOOT", + "mcu": "nrf52840", + "variant": "MINEWSEMI_MS24SF1_SX1262", + "bsp": { + "name": "adafruit" + }, + "softdevice": { + "sd_flags": "-DS140", + "sd_name": "s140", + "sd_version": "7.3.0", + "sd_fwid": "0x0123" + }, + "bootloader": { + "settings_addr": "0xFF000" + } + }, + "connectivity": ["bluetooth"], + "debug": { + "jlink_device": "nRF52840_xxAA", + "svd_path": "nrf52840.svd" + }, + "frameworks": ["arduino"], + "name": "MINEWSEMI_MS24SF1_SX1262", + "upload": { + "maximum_ram_size": 248832, + "maximum_size": 815104, + "speed": 115200, + "protocol": "nrfutil", + "protocols": [ + "jlink", + "nrfjprog", + "nrfutil", + "stlink", + "cmsis-dap", + "blackmagic" + ], + "use_1200bps_touch": true, + "require_upload_port": true, + "wait_for_upload_port": true + }, + "url": "https://en.minewsemi.com/lora-module/nrf52840-sx1262-ms24sf1", + "vendor": "Minesemi" +} diff --git a/boards/nordic_pca10059.json b/boards/nordic_pca10059.json index b99e3c763..6540817a2 100644 --- a/boards/nordic_pca10059.json +++ b/boards/nordic_pca10059.json @@ -5,7 +5,7 @@ }, "core": "nRF5", "cpu": "cortex-m4", - "extra_flags": "-DARDUINO_NRF52840_FEATHER -DNRF52840_XXAA", + "extra_flags": "-DNORDIC_PCA10059 -DNRF52840_XXAA", "f_cpu": "64000000L", "hwids": [ ["0x239A", "0x8029"], diff --git a/boards/nrf52840_dk_modified.json b/boards/nrf52840_dk_modified.json deleted file mode 100644 index 2932cb4b9..000000000 --- a/boards/nrf52840_dk_modified.json +++ /dev/null @@ -1,47 +0,0 @@ -{ - "build": { - "arduino": { - "ldscript": "nrf52840_s113_v7.ld" - }, - "core": "nRF5", - "cpu": "cortex-m4", - "extra_flags": "-DARDUINO_NRF52840_PCA10056 -DNRF52840_XXAA", - "f_cpu": "64000000L", - "hwids": [["0x239A", "0x4404"]], - "usb_product": "nrf52840dk", - "mcu": "nrf52840", - "variant": "pca10056-rc-clock", - "variants_dir": "variants", - "bsp": { - "name": "adafruit" - }, - "softdevice": { - "sd_flags": "-DS140", - "sd_name": "s140", - "sd_version": "6.1.1", - "sd_fwid": "0x00B6" - }, - "bootloader": { - "settings_addr": "0xFF000" - } - }, - "connectivity": ["bluetooth"], - "debug": { - "jlink_device": "nRF52840_xxAA", - "onboard_tools": ["jlink"], - "svd_path": "nrf52840.svd", - "openocd_target": "nrf52840-mdk-rs" - }, - "frameworks": ["arduino"], - "name": "A modified NRF52840-DK devboard (Adafruit BSP)", - "upload": { - "maximum_ram_size": 248832, - "maximum_size": 815104, - "require_upload_port": true, - "speed": 115200, - "protocol": "jlink", - "protocols": ["jlink", "nrfjprog", "stlink"] - }, - "url": "https://meshtastic.org/", - "vendor": "Nordic Semi" -} diff --git a/boards/ppr.json b/boards/ppr.json deleted file mode 100644 index 15e3025c0..000000000 --- a/boards/ppr.json +++ /dev/null @@ -1,47 +0,0 @@ -{ - "build": { - "arduino": { - "ldscript": "nrf52840_s140_v6.ld" - }, - "core": "nRF5", - "cpu": "cortex-m4", - "extra_flags": "-DARDUINO_NRF52840_PPR -DNRF52840_XXAA", - "f_cpu": "64000000L", - "hwids": [["0x239A", "0x4403"]], - "usb_product": "PPR", - "mcu": "nrf52840", - "variant": "ppr", - "variants_dir": "variants", - "bsp": { - "name": "adafruit" - }, - "softdevice": { - "sd_flags": "-DS140", - "sd_name": "s140", - "sd_version": "6.1.1", - "sd_fwid": "0x00B6" - }, - "bootloader": { - "settings_addr": "0xFF000" - } - }, - "connectivity": ["bluetooth"], - "debug": { - "jlink_device": "nRF52840_xxAA", - "onboard_tools": ["jlink"], - "svd_path": "nrf52840.svd", - "openocd_target": "nrf52840-mdk-rs" - }, - "frameworks": ["arduino"], - "name": "Meshtastic PPR (Adafruit BSP)", - "upload": { - "maximum_ram_size": 248832, - "maximum_size": 815104, - "require_upload_port": true, - "speed": 115200, - "protocol": "jlink", - "protocols": ["jlink", "nrfjprog", "stlink"] - }, - "url": "https://meshtastic.org/", - "vendor": "Othernet" -} diff --git a/boards/ppr1.json b/boards/ppr1.json deleted file mode 100644 index 35bf7d1e4..000000000 --- a/boards/ppr1.json +++ /dev/null @@ -1,47 +0,0 @@ -{ - "build": { - "arduino": { - "ldscript": "nrf52833_s113_v7.ld" - }, - "core": "nRF5", - "cpu": "cortex-m4", - "extra_flags": "-DARDUINO_NRF52833_PPR -DNRF52833_XXAA", - "f_cpu": "64000000L", - "hwids": [["0x239A", "0x4406"]], - "usb_product": "PPR", - "mcu": "nrf52833", - "variant": "ppr", - "variants_dir": "variants", - "bsp": { - "name": "adafruit" - }, - "softdevice": { - "sd_flags": "-DS113", - "sd_name": "s113", - "sd_version": "7.2.0", - "sd_fwid": "0x00b6" - }, - "bootloader": { - "settings_addr": "0xFF000" - } - }, - "connectivity": ["bluetooth"], - "debug": { - "jlink_device": "nRF52833_xxAA", - "onboard_tools": ["jlink"], - "svd_path": "nrf52833.svd", - "openocd_target": "nrf52840-mdk-rs" - }, - "frameworks": ["arduino"], - "name": "Meshtastic PPR1 (Adafruit BSP)", - "upload": { - "maximum_ram_size": 248832, - "maximum_size": 815104, - "require_upload_port": true, - "speed": 115200, - "protocol": "jlink", - "protocols": ["jlink", "nrfjprog", "stlink"] - }, - "url": "https://meshtastic.org/", - "vendor": "Othernet" -} diff --git a/boards/lora-relay-v2.json b/boards/promicro-nrf52840.json similarity index 51% rename from boards/lora-relay-v2.json rename to boards/promicro-nrf52840.json index 52b775e58..99ae3f01e 100644 --- a/boards/lora-relay-v2.json +++ b/boards/promicro-nrf52840.json @@ -5,13 +5,18 @@ }, "core": "nRF5", "cpu": "cortex-m4", - "extra_flags": "-DARDUINO_NRF52840_LORA_RELAY_V2 -DNRF52840_XXAA", + "extra_flags": "-DARDUINO_NRF52840_FEATHER -DNRF52840_XXAA", "f_cpu": "64000000L", - "hwids": [["0x239A", "0x4406"]], - "usb_product": "LORA_RELAY", + "hwids": [ + ["0x239A", "0x00B3"], + ["0x239A", "0x8029"], + ["0x239A", "0x0029"], + ["0x239A", "0x002A"], + ["0x239A", "0x802A"] + ], + "usb_product": "ProMicro compatible nRF52840", "mcu": "nrf52840", - "variant": "lora_relay_v2", - "variants_dir": "variants", + "variant": "promicro_diy", "bsp": { "name": "adafruit" }, @@ -28,20 +33,20 @@ "connectivity": ["bluetooth"], "debug": { "jlink_device": "nRF52840_xxAA", - "onboard_tools": ["jlink"], - "svd_path": "nrf52840.svd", - "openocd_target": "nrf52840-mdk-rs" + "svd_path": "nrf52840.svd" }, "frameworks": ["arduino"], - "name": "Meshtastic Lora Relay V1 (Adafruit BSP)", + "name": "ProMicro compatible nRF52840", "upload": { "maximum_ram_size": 248832, "maximum_size": 815104, - "require_upload_port": true, "speed": 115200, - "protocol": "jlink", - "protocols": ["jlink", "nrfjprog", "stlink"] + "protocol": "nrfutil", + "protocols": ["nrfutil", "jlink", "nrfjprog", "stlink"], + "use_1200bps_touch": true, + "require_upload_port": true, + "wait_for_upload_port": true }, - "url": "https://github.com/BigCorvus/SX1262-LoRa-BLE-Relay", - "vendor": "BigCorvus" + "url": "https://www.nologo.tech/product/otherboard/NRF52840.html", + "vendor": "Nologo" } diff --git a/boards/seeed-sensecap-indicator.json b/boards/seeed-sensecap-indicator.json new file mode 100644 index 000000000..3fc57126f --- /dev/null +++ b/boards/seeed-sensecap-indicator.json @@ -0,0 +1,42 @@ +{ + "build": { + "arduino": { + "ldscript": "esp32s3_out.ld", + "partitions": "default_8MB.csv", + "memory_type": "qio_opi" + }, + "core": "esp32", + "extra_flags": [ + "-DBOARD_HAS_PSRAM", + "-DARDUINO_USB_CDC_ON_BOOT=0", + "-DARDUINO_USB_MODE=1", + "-DARDUINO_RUNNING_CORE=1", + "-DARDUINO_EVENT_RUNNING_CORE=1" + ], + "f_cpu": "240000000L", + "f_flash": "80000000L", + "flash_mode": "qio", + "hwids": [["0x1A86", "0x7523"]], + "mcu": "esp32s3", + "variant": "esp32s3r8" + }, + "connectivity": ["wifi", "bluetooth", "lora"], + "debug": { + "default_tool": "esp-builtin", + "onboard_tools": ["esp-builtin"], + "openocd_target": "esp32s3.cfg" + }, + "frameworks": ["arduino"], + "name": "Seeed Studio SenseCAP Indicator", + "upload": { + "flash_size": "8MB", + "maximum_ram_size": 327680, + "maximum_size": 8388608, + "require_upload_port": true, + "use_1200bps_touch": true, + "wait_for_upload_port": true, + "speed": 921600 + }, + "url": "https://www.seeedstudio.com/Indicator-for-Meshtastic.html", + "vendor": "Seeed Studio" +} diff --git a/boards/seeed-xiao-s3.json b/boards/seeed-xiao-s3.json new file mode 100644 index 000000000..0b7b432a0 --- /dev/null +++ b/boards/seeed-xiao-s3.json @@ -0,0 +1,41 @@ +{ + "build": { + "arduino": { + "ldscript": "esp32s3_out.ld", + "memory_type": "qio_opi" + }, + "core": "esp32", + "extra_flags": [ + "-DBOARD_HAS_PSRAM", + "-DARDUINO_USB_CDC_ON_BOOT=1", + "-DARDUINO_USB_MODE=0", + "-DARDUINO_RUNNING_CORE=1", + "-DARDUINO_EVENT_RUNNING_CORE=0" + ], + "f_cpu": "240000000L", + "f_flash": "80000000L", + "flash_mode": "qio", + "hwids": [["0x2886", "0x0059"]], + "mcu": "esp32s3", + "variant": "seeed-xiao-s3" + }, + "connectivity": ["wifi", "bluetooth", "lora"], + "debug": { + "default_tool": "esp-builtin", + "onboard_tools": ["esp-builtin"], + "openocd_target": "esp32s3.cfg" + }, + "frameworks": ["arduino", "espidf"], + "name": "seeed-xiao-s3", + "upload": { + "flash_size": "8MB", + "maximum_ram_size": 8388608, + "maximum_size": 8388608, + "use_1200bps_touch": true, + "wait_for_upload_port": true, + "require_upload_port": true, + "speed": 921600 + }, + "url": "https://www.seeedstudio.com/XIAO-ESP32S3-Sense-p-5639.html", + "vendor": "Seeed Studio" +} diff --git a/boards/station-g2.json b/boards/station-g2.json new file mode 100755 index 000000000..871f067aa --- /dev/null +++ b/boards/station-g2.json @@ -0,0 +1,41 @@ +{ + "build": { + "arduino": { + "ldscript": "esp32s3_out.ld", + "memory_type": "qio_opi" + }, + "core": "esp32", + "extra_flags": [ + "-DBOARD_HAS_PSRAM", + "-DARDUINO_USB_CDC_ON_BOOT=1", + "-DARDUINO_USB_MODE=0", + "-DARDUINO_RUNNING_CORE=1", + "-DARDUINO_EVENT_RUNNING_CORE=0" + ], + "f_cpu": "240000000L", + "f_flash": "80000000L", + "flash_mode": "qio", + "hwids": [["0x303A", "0x1001"]], + "mcu": "esp32s3", + "variant": "station-g2" + }, + "connectivity": ["wifi", "bluetooth", "lora"], + "debug": { + "default_tool": "esp-builtin", + "onboard_tools": ["esp-builtin"], + "openocd_target": "esp32s3.cfg" + }, + "frameworks": ["arduino", "espidf"], + "name": "BQ Station G2", + "upload": { + "flash_size": "16MB", + "maximum_ram_size": 327680, + "maximum_size": 16777216, + "use_1200bps_touch": true, + "wait_for_upload_port": true, + "require_upload_port": true, + "speed": 921600 + }, + "url": "https://wiki.uniteng.com/en/meshtastic/station-g2", + "vendor": "BQ Consulting" +} diff --git a/boards/tlora-t3s3-v1.json b/boards/tlora-t3s3-v1.json index c5a68981b..0bfd17afc 100644 --- a/boards/tlora-t3s3-v1.json +++ b/boards/tlora-t3s3-v1.json @@ -19,7 +19,7 @@ "mcu": "esp32s3", "variant": "tlora-t3s3-v1" }, - "connectivity": ["wifi"], + "connectivity": ["wifi", "bluetooth"], "debug": { "openocd_target": "esp32s3.cfg" }, diff --git a/boards/tracker-t1000-e.json b/boards/tracker-t1000-e.json new file mode 100644 index 000000000..2be716e22 --- /dev/null +++ b/boards/tracker-t1000-e.json @@ -0,0 +1,58 @@ +{ + "build": { + "arduino": { + "ldscript": "nrf52840_s140_v7.ld" + }, + "core": "nRF5", + "cpu": "cortex-m4", + "extra_flags": "-DARDUINO_WIO_WM1110 -DNRF52840_XXAA", + "f_cpu": "64000000L", + "hwids": [ + ["0x239A", "0x8029"], + ["0x239A", "0x0029"], + ["0x239A", "0x002A"], + ["0x239A", "0x802A"] + ], + "usb_product": "T1000-E-BOOT", + "mcu": "nrf52840", + "variant": "Seeed_T1000-E", + "bsp": { + "name": "adafruit" + }, + "softdevice": { + "sd_flags": "-DS140", + "sd_name": "s140", + "sd_version": "7.3.0", + "sd_fwid": "0x0123" + }, + "bootloader": { + "settings_addr": "0xFF000" + } + }, + "connectivity": ["bluetooth"], + "debug": { + "jlink_device": "nRF52840_xxAA", + "svd_path": "nrf52840.svd" + }, + "frameworks": ["arduino"], + "name": "Seeed T1000-E", + "upload": { + "maximum_ram_size": 248832, + "maximum_size": 815104, + "speed": 115200, + "protocol": "nrfutil", + "protocols": [ + "jlink", + "nrfjprog", + "nrfutil", + "stlink", + "cmsis-dap", + "blackmagic" + ], + "use_1200bps_touch": true, + "require_upload_port": true, + "wait_for_upload_port": true + }, + "url": "https://www.seeedstudio.com/SenseCAP-Card-Tracker-T1000-E-for-Meshtastic-p-5913.html", + "vendor": "Seeed Studio" +} diff --git a/boards/wio-sdk-wm1110.json b/boards/wio-sdk-wm1110.json new file mode 100644 index 000000000..f45b030d1 --- /dev/null +++ b/boards/wio-sdk-wm1110.json @@ -0,0 +1,51 @@ +{ + "build": { + "arduino": { + "ldscript": "nrf52840_s140_v7.ld" + }, + "core": "nRF5", + "cpu": "cortex-m4", + "extra_flags": "-DARDUINO_WIO_WM1110 -DNRF52840_XXAA", + "f_cpu": "64000000L", + "mcu": "nrf52840", + "variant": "Seeed_WIO_WM1110", + "bsp": { + "name": "adafruit" + }, + "softdevice": { + "sd_flags": "-DS140", + "sd_name": "s140", + "sd_version": "7.3.0", + "sd_fwid": "0x0123" + }, + "bootloader": { + "settings_addr": "0xFF000" + } + }, + "connectivity": ["bluetooth"], + "debug": { + "jlink_device": "nRF52840_xxAA", + "svd_path": "nrf52840.svd" + }, + "frameworks": ["arduino", "freertos"], + "name": "Seeed WIO WM1110", + "upload": { + "maximum_ram_size": 248832, + "maximum_size": 815104, + "speed": 115200, + "protocol": "nrfutil", + "protocols": [ + "jlink", + "nrfjprog", + "nrfutil", + "stlink", + "cmsis-dap", + "blackmagic" + ], + "use_1200bps_touch": true, + "require_upload_port": true, + "wait_for_upload_port": true + }, + "url": "https://www.seeedstudio.com/Wio-WM1110-Dev-Kit-p-5677.html", + "vendor": "Seeed Studio" +} diff --git a/boards/wio-t1000-s.json b/boards/wio-t1000-s.json new file mode 100644 index 000000000..654a8f73d --- /dev/null +++ b/boards/wio-t1000-s.json @@ -0,0 +1,58 @@ +{ + "build": { + "arduino": { + "ldscript": "nrf52840_s140_v7.ld" + }, + "core": "nRF5", + "cpu": "cortex-m4", + "extra_flags": "-DARDUINO_WIO_WM1110 -DNRF52840_XXAA", + "f_cpu": "64000000L", + "hwids": [ + ["0x239A", "0x8029"], + ["0x239A", "0x0029"], + ["0x239A", "0x002A"], + ["0x239A", "0x802A"] + ], + "usb_product": "WIO-BOOT", + "mcu": "nrf52840", + "variant": "Seeed_WIO_WM1110", + "bsp": { + "name": "adafruit" + }, + "softdevice": { + "sd_flags": "-DS140", + "sd_name": "s140", + "sd_version": "7.3.0", + "sd_fwid": "0x0123" + }, + "bootloader": { + "settings_addr": "0xFF000" + } + }, + "connectivity": ["bluetooth"], + "debug": { + "jlink_device": "nRF52840_xxAA", + "svd_path": "nrf52840.svd" + }, + "frameworks": ["arduino"], + "name": "Seeed WIO WM1110", + "upload": { + "maximum_ram_size": 248832, + "maximum_size": 815104, + "speed": 115200, + "protocol": "nrfutil", + "protocols": [ + "jlink", + "nrfjprog", + "nrfutil", + "stlink", + "cmsis-dap", + "blackmagic" + ], + "use_1200bps_touch": true, + "require_upload_port": true, + "wait_for_upload_port": true + }, + "url": "https://www.seeedstudio.com/LoRaWAN-Tracker-c-1938.html", + "vendor": "Seeed Studio" +} diff --git a/boards/wio-tracker-wm1110.json b/boards/wio-tracker-wm1110.json new file mode 100644 index 000000000..37a9186ab --- /dev/null +++ b/boards/wio-tracker-wm1110.json @@ -0,0 +1,58 @@ +{ + "build": { + "arduino": { + "ldscript": "nrf52840_s140_v7.ld" + }, + "core": "nRF5", + "cpu": "cortex-m4", + "extra_flags": "-DARDUINO_WIO_WM1110 -DNRF52840_XXAA", + "f_cpu": "64000000L", + "hwids": [ + ["0x239A", "0x8029"], + ["0x239A", "0x0029"], + ["0x239A", "0x002A"], + ["0x239A", "0x802A"] + ], + "usb_product": "WIO-BOOT", + "mcu": "nrf52840", + "variant": "Seeed_WIO_WM1110", + "bsp": { + "name": "adafruit" + }, + "softdevice": { + "sd_flags": "-DS140", + "sd_name": "s140", + "sd_version": "7.3.0", + "sd_fwid": "0x0123" + }, + "bootloader": { + "settings_addr": "0xFF000" + } + }, + "connectivity": ["bluetooth"], + "debug": { + "jlink_device": "nRF52840_xxAA", + "svd_path": "nrf52840.svd" + }, + "frameworks": ["arduino"], + "name": "Seeed WIO WM1110", + "upload": { + "maximum_ram_size": 248832, + "maximum_size": 815104, + "speed": 115200, + "protocol": "nrfutil", + "protocols": [ + "jlink", + "nrfjprog", + "nrfutil", + "stlink", + "cmsis-dap", + "blackmagic" + ], + "use_1200bps_touch": true, + "require_upload_port": true, + "wait_for_upload_port": true + }, + "url": "https://www.seeedstudio.com/Wio-Tracker-1110-Dev-Board-p-5799.html", + "vendor": "Seeed Studio" +} diff --git a/boards/wiphone.json b/boards/wiphone.json new file mode 100644 index 000000000..bb01f425f --- /dev/null +++ b/boards/wiphone.json @@ -0,0 +1,34 @@ +{ + "build": { + "arduino": { + "ldscript": "esp32_out.ld", + "partitions": "default_16MB.csv" + }, + "core": "esp32", + "extra_flags": [ + "-DARDUINO_WIPHONE14", + "-DBOARD_HAS_PSRAM", + "-mfix-esp32-psram-cache-issue", + "-mfix-esp32-psram-cache-strategy=memw" + ], + "f_cpu": "240000000L", + "f_flash": "40000000L", + "flash_mode": "dio", + "mcu": "esp32", + "variant": "wiphone", + "board": "WiPhone" + }, + "connectivity": ["wifi", "bluetooth"], + "frameworks": ["arduino", "espidf"], + "name": "WIPhone Integrated 1.4", + "upload": { + "flash_size": "16MB", + "maximum_ram_size": 532480, + "maximum_size": 6553600, + "maximum_data_size": 4521984, + "require_upload_port": true, + "speed": 921600 + }, + "url": "https://www.wiphone.io/", + "vendor": "HackEDA" +} diff --git a/boards/wiscore_rak11200.json b/boards/wiscore_rak11200.json index 33d16ba77..54ee9b69e 100644 --- a/boards/wiscore_rak11200.json +++ b/boards/wiscore_rak11200.json @@ -4,7 +4,7 @@ "ldscript": "esp32_out.ld" }, "core": "esp32", - "extra_flags": "-DARDUINO_ESP32_DEV", + "extra_flags": ["-DBOARD_HAS_PSRAM", "-DARDUINO_ESP32_DEV"], "f_cpu": "240000000L", "f_flash": "40000000L", "flash_mode": "dio", diff --git a/boards/generic_wl5e.json b/boards/wiscore_rak3172.json similarity index 91% rename from boards/generic_wl5e.json rename to boards/wiscore_rak3172.json index 5c4bc24a7..714e09115 100644 --- a/boards/generic_wl5e.json +++ b/boards/wiscore_rak3172.json @@ -1,5 +1,8 @@ { "build": { + "arduino": { + "variant_h": "variant_RAK3172_MODULE.h" + }, "core": "stm32", "cpu": "cortex-m4", "extra_flags": "-DSTM32WLxx -DSTM32WLE5xx -DARDUINO_GENERIC_WLE5CCUX", diff --git a/boards/wiscore_rak4631.json b/boards/wiscore_rak4631.json index 6dec3f7cb..c783f33a6 100644 --- a/boards/wiscore_rak4631.json +++ b/boards/wiscore_rak4631.json @@ -35,7 +35,7 @@ "svd_path": "nrf52840.svd", "openocd_target": "nrf52840-mdk-rs" }, - "frameworks": ["arduino"], + "frameworks": ["arduino", "freertos"], "name": "WisCore RAK4631 Board", "upload": { "maximum_ram_size": 248832, diff --git a/extra_scripts/README.md b/extra_scripts/README.md new file mode 100644 index 000000000..4c797f49f --- /dev/null +++ b/extra_scripts/README.md @@ -0,0 +1,3 @@ +# extra_scripts + +This directory contains special [scripts](https://docs.platformio.org/en/latest/scripting/index.html) that are used to modify the platformio environment in rare cases. diff --git a/extra_scripts/disable_adafruit_usb.py b/extra_scripts/disable_adafruit_usb.py new file mode 100644 index 000000000..596242184 --- /dev/null +++ b/extra_scripts/disable_adafruit_usb.py @@ -0,0 +1,28 @@ +# trunk-ignore-all(flake8/F821) +# trunk-ignore-all(ruff/F821) + +Import("env") + +# NOTE: This is not currently used, but can serve as an example on how to write extra_scripts + +# print("Current CLI targets", COMMAND_LINE_TARGETS) +# print("Current Build targets", BUILD_TARGETS) +# print("CPP defs", env.get("CPPDEFINES")) +# print(env.Dump()) + +# Adafruit.py in the platformio build tree is a bit naive and always enables their USB stack for building. We don't want this. +# 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 +# which might not be accepted. -@geeksville + +lib_builders = env.get("__PIO_LIB_BUILDERS", None) +if lib_builders is not None: + print("Disabling Adafruit USB stack") + for k in lib_builders: + if k.name == "Adafruit TinyUSB Library": + libenv = k.env + # print(f"{k.name }: { libenv.Dump() } ") + # libenv["CPPDEFINES"].remove("USBCON") + libenv["CPPDEFINES"].remove("USE_TINYUSB") + +# Custom actions when building program/firmware +# env.AddPreAction("buildprog", callback...) diff --git a/images/compass.png b/images/compass.png index 8639dde52..c4e5b589b 100644 Binary files a/images/compass.png and b/images/compass.png differ diff --git a/images/face-24px.svg b/images/face-24px.svg index 293468664..08e8f5ffc 100644 --- a/images/face-24px.svg +++ b/images/face-24px.svg @@ -1 +1 @@ - \ No newline at end of file + \ No newline at end of file diff --git a/images/face.png b/images/face.png index 036e29f73..eb6b91e13 100644 Binary files a/images/face.png and b/images/face.png differ diff --git a/images/location_searching-24px.svg b/images/location_searching-24px.svg index 7f72a31bc..abef0ef78 100644 --- a/images/location_searching-24px.svg +++ b/images/location_searching-24px.svg @@ -1 +1 @@ - \ No newline at end of file + \ No newline at end of file diff --git a/images/pin.png b/images/pin.png index 112a7ce8e..3c91a726c 100644 Binary files a/images/pin.png and b/images/pin.png differ diff --git a/images/room-24px.svg b/images/room-24px.svg index 79a4807e7..48e55ab80 100644 --- a/images/room-24px.svg +++ b/images/room-24px.svg @@ -1 +1 @@ - \ No newline at end of file + \ No newline at end of file diff --git a/images/textsms-24px.svg b/images/textsms-24px.svg index 4455f047e..84c4fdcc1 100644 --- a/images/textsms-24px.svg +++ b/images/textsms-24px.svg @@ -1 +1 @@ - \ No newline at end of file + \ No newline at end of file diff --git a/meshtestic b/meshtestic new file mode 160000 index 000000000..dcac7e567 --- /dev/null +++ b/meshtestic @@ -0,0 +1 @@ +Subproject commit dcac7e5673005f4d8a2b1f0f6e06877b689d7519 diff --git a/monitor/filter_c3_exception_decoder.py b/monitor/filter_c3_exception_decoder.py index e59b0be2a..6d7b5370c 100644 --- a/monitor/filter_c3_exception_decoder.py +++ b/monitor/filter_c3_exception_decoder.py @@ -18,10 +18,7 @@ import subprocess import sys from platformio.project.exception import PlatformioException -from platformio.public import ( - DeviceMonitorFilterBase, - load_build_metadata, -) +from platformio.public import DeviceMonitorFilterBase, load_build_metadata # By design, __init__ is called inside miniterm and we can't pass context to it. # pylint: disable=attribute-defined-outside-init @@ -32,7 +29,7 @@ IS_WINDOWS = sys.platform.startswith("win") class Esp32C3ExceptionDecoder(DeviceMonitorFilterBase): NAME = "esp32_c3_exception_decoder" - PCADDR_PATTERN = re.compile(r'0x4[0-9a-f]{7}', re.IGNORECASE) + PCADDR_PATTERN = re.compile(r"0x4[0-9a-f]{7}", re.IGNORECASE) def __call__(self): self.buffer = "" @@ -75,14 +72,14 @@ See https://docs.platformio.org/page/projectconf/build_configurations.html % self.__class__.__name__ ) return False - + if not os.path.isfile(self.addr2line_path): sys.stderr.write( "%s: disabling, addr2line at %s does not exist\n" % (self.__class__.__name__, self.addr2line_path) ) return False - + return True except PlatformioException as e: sys.stderr.write( @@ -117,7 +114,7 @@ See https://docs.platformio.org/page/projectconf/build_configurations.html trace = self.get_backtrace(m) if len(trace) != "": - text = text[: last] + trace + text[last :] + text = text[:last] + trace + text[last:] last += len(trace) return text @@ -125,14 +122,10 @@ See https://docs.platformio.org/page/projectconf/build_configurations.html def get_backtrace(self, match): trace = "\n" enc = "mbcs" if IS_WINDOWS else "utf-8" - args = [self.addr2line_path, u"-fipC", u"-e", self.firmware_path] + args = [self.addr2line_path, "-fipC", "-e", self.firmware_path] try: addr = match.group() - output = ( - subprocess.check_output(args + [addr]) - .decode(enc) - .strip() - ) + output = subprocess.check_output(args + [addr]).decode(enc).strip() output = output.replace( "\n", "\n " ) # newlines happen with inlined methods diff --git a/platformio.ini b/platformio.ini index 0033b6e46..e437b572e 100644 --- a/platformio.ini +++ b/platformio.ini @@ -17,11 +17,9 @@ default_envs = tbeam ;default_envs = tlora-v2-1-1_6 ;default_envs = tlora-v2-1-1_6-tcxo ;default_envs = tlora-t3s3-v1 -;default_envs = lora-relay-v1 # nrf board ;default_envs = t-echo ;default_envs = canaryone -;default_envs = nrf52840dk-geeksville -;default_envs = native # lora-relay-v1 # nrf52840dk-geeksville # linux # or if you'd like to change the default to something like lora-relay-v1 put that here +;default_envs = native ;default_envs = nano-g1 ;default_envs = pca10059_diy_eink ;default_envs = meshtastic-diy-v1 @@ -29,14 +27,25 @@ default_envs = tbeam ;default_envs = meshtastic-dr-dev ;default_envs = m5stack-coreink ;default_envs = rak4631 +;default_envs = rak4631_eth_gw +;default_envs = rak2560 ;default_envs = rak10701 ;default_envs = wio-e5 +;default_envs = radiomaster_900_bandit_nano +;default_envs = radiomaster_900_bandit_micro +;default_envs = radiomaster_900_bandit +;default_envs = heltec_capsule_sensor_v3 +;default_envs = heltec_vision_master_t190 +;default_envs = heltec_vision_master_e213 +;default_envs = heltec_vision_master_e290 +;default_envs = heltec_mesh_node_t114 extra_configs = arch/*/*.ini variants/*/platformio.ini [env] +test_build_src = true extra_scripts = bin/platformio-custom.py ; note: we add src to our include search path so that lmic_project_config can override @@ -50,36 +59,42 @@ build_flags = -Wno-missing-field-initializers -DUSE_THREAD_NAMES -DTINYGPS_OPTION_NO_CUSTOM_FIELDS -DPB_ENABLE_MALLOC=1 - -DRADIOLIB_EXCLUDE_CC1101 - -DRADIOLIB_EXCLUDE_NRF24 - -DRADIOLIB_EXCLUDE_RF69 - -DRADIOLIB_EXCLUDE_SX1231 - -DRADIOLIB_EXCLUDE_SX1233 - -DRADIOLIB_EXCLUDE_SI443X - -DRADIOLIB_EXCLUDE_RFM2X - -DRADIOLIB_EXCLUDE_AFSK - -DRADIOLIB_EXCLUDE_BELL - -DRADIOLIB_EXCLUDE_HELLSCHREIBER - -DRADIOLIB_EXCLUDE_MORSE - -DRADIOLIB_EXCLUDE_RTTY - -DRADIOLIB_EXCLUDE_SSTV - -DRADIOLIB_EXCLUDE_AX25 - -DRADIOLIB_EXCLUDE_DIRECT_RECEIVE - -DRADIOLIB_EXCLUDE_BELL - -DRADIOLIB_EXCLUDE_PAGER - -DRADIOLIB_EXCLUDE_FSK4 - -DRADIOLIB_EXCLUDE_APRS + -DRADIOLIB_EXCLUDE_CC1101=1 + -DRADIOLIB_EXCLUDE_NRF24=1 + -DRADIOLIB_EXCLUDE_RF69=1 + -DRADIOLIB_EXCLUDE_SX1231=1 + -DRADIOLIB_EXCLUDE_SX1233=1 + -DRADIOLIB_EXCLUDE_SI443X=1 + -DRADIOLIB_EXCLUDE_RFM2X=1 + -DRADIOLIB_EXCLUDE_AFSK=1 + -DRADIOLIB_EXCLUDE_BELL=1 + -DRADIOLIB_EXCLUDE_HELLSCHREIBER=1 + -DRADIOLIB_EXCLUDE_MORSE=1 + -DRADIOLIB_EXCLUDE_RTTY=1 + -DRADIOLIB_EXCLUDE_SSTV=1 + -DRADIOLIB_EXCLUDE_AX25=1 + -DRADIOLIB_EXCLUDE_DIRECT_RECEIVE=1 + -DRADIOLIB_EXCLUDE_BELL=1 + -DRADIOLIB_EXCLUDE_PAGER=1 + -DRADIOLIB_EXCLUDE_FSK4=1 + -DRADIOLIB_EXCLUDE_APRS=1 + -DRADIOLIB_EXCLUDE_LORAWAN=1 + -DMESHTASTIC_EXCLUDE_DROPZONE=1 + -DMESHTASTIC_EXCLUDE_REMOTEHARDWARE=1 + #-DBUILD_EPOCH=$UNIX_TIME + ;-D OLED_PL monitor_speed = 115200 +monitor_filters = direct lib_deps = - jgromes/RadioLib@^6.4.0 - https://github.com/meshtastic/esp8266-oled-ssd1306.git#ee628ee6c9588d4c56c9e3da35f0fc9448ad54a8 ; ESP8266_SSD1306 - mathertel/OneButton@^2.5.0 ; OneButton library for non-blocking button debounce + jgromes/RadioLib@~7.0.2 + https://github.com/meshtastic/esp8266-oled-ssd1306.git#e16cee124fe26490cb14880c679321ad8ac89c95 ; ESP8266_SSD1306 + mathertel/OneButton@~2.6.1 ; OneButton library for non-blocking button debounce https://github.com/meshtastic/arduino-fsm.git#7db3702bf0cfe97b783d6c72595e3f38e0b19159 - https://github.com/meshtastic/TinyGPSPlus.git#2044b2c51e91ab4cd8cc93b15e40658cd808dd06 - https://github.com/meshtastic/ArduinoThread.git#72921ac222eed6f526ba1682023cee290d9aa1b3 - nanopb/Nanopb@^0.4.7 + https://github.com/meshtastic/TinyGPSPlus.git#71a82db35f3b973440044c476d4bcdc673b104f4 + https://github.com/meshtastic/ArduinoThread.git#1ae8778c85d0a2a729f989e0b1e7d7c4dc84eef0 + nanopb/Nanopb@^0.4.9 erriez/ErriezCRC32@^1.0.1 ; Used for the code analysis in PIO Home / Inspect @@ -95,7 +110,6 @@ check_flags = framework = arduino lib_deps = ${env.lib_deps} - mprograms/QMC5883LCompass@^1.2.0 end2endzone/NonBlockingRTTTL@^1.3.0 https://github.com/meshtastic/SparkFun_ATECCX08a_Arduino_Library.git#5cf62b36c6f30bc72a07bdb2c11fc9a22d1e31da @@ -113,20 +127,40 @@ lib_deps = ; (not included in native / portduino) [environmental_base] lib_deps = - adafruit/Adafruit BusIO@^1.11.4 + adafruit/Adafruit BusIO@^1.16.1 adafruit/Adafruit Unified Sensor@^1.1.11 adafruit/Adafruit BMP280 Library@^2.6.8 + adafruit/Adafruit BMP085 Library@^1.2.4 adafruit/Adafruit BME280 Library@^2.2.2 - https://github.com/boschsensortec/Bosch-BSEC2-Library#v1.5.2400 - boschsensortec/BME68x Sensor Library@^1.1.40407 + adafruit/Adafruit BMP3XX Library@^2.1.5 adafruit/Adafruit MCP9808 Library@^2.0.0 - https://github.com/KodinLanewave/INA3221@^1.0.0 adafruit/Adafruit INA260 Library@^1.5.0 adafruit/Adafruit INA219@^1.2.0 + adafruit/Adafruit MAX1704X@^1.0.3 adafruit/Adafruit SHTC3 Library@^1.0.0 adafruit/Adafruit LPS2X@^2.0.4 adafruit/Adafruit SHT31 Library@^2.2.2 - adafruit/Adafruit PM25 AQI Sensor@^1.0.6 + adafruit/Adafruit PM25 AQI Sensor@^1.1.1 adafruit/Adafruit MPU6050@^2.2.4 - adafruit/Adafruit LIS3DH@^1.2.4 - https://github.com/lewisxhe/BMA423_Library@^0.0.1 + adafruit/Adafruit LIS3DH@^1.3.0 + adafruit/Adafruit AHTX0@^2.0.5 + adafruit/Adafruit LSM6DS@^4.7.2 + adafruit/Adafruit VEML7700 Library@^2.1.6 + adafruit/Adafruit SHT4x Library@^1.0.4 + adafruit/Adafruit TSL2591 Library@^1.4.5 + sparkfun/SparkFun Qwiic Scale NAU7802 Arduino Library@^1.0.5 + sparkfun/SparkFun 9DoF IMU Breakout - ICM 20948 - Arduino Library@^1.2.13 + ClosedCube OPT3001@^1.1.2 + emotibit/EmotiBit MLX90632@^1.0.8 + dfrobot/DFRobot_RTU@^1.0.3 + sparkfun/SparkFun MAX3010x Pulse and Proximity Sensor Library@^1.1.2 + adafruit/Adafruit MLX90614 Library@^2.1.5 + + https://github.com/boschsensortec/Bosch-BSEC2-Library#v1.7.2502 + boschsensortec/BME68x Sensor Library@^1.1.40407 + https://github.com/KodinLanewave/INA3221@^1.0.1 + lewisxhe/SensorLib@0.2.0 + mprograms/QMC5883LCompass@^1.2.0 + + https://github.com/meshtastic/DFRobot_LarkWeatherStation#4de3a9cadef0f6a5220a8a906cf9775b02b0040d + https://github.com/gjelsoe/STK8xxx-Accelerometer.git#v0.1.1 diff --git a/protobufs b/protobufs index 24edea644..c9ae7fd47 160000 --- a/protobufs +++ b/protobufs @@ -1 +1 @@ -Subproject commit 24edea64429de4474c00d09990ef4c496614dc5d +Subproject commit c9ae7fd478bffe5f954b30de6cb140821fe9ff52 diff --git a/pyocd.yaml b/pyocd.yaml new file mode 100644 index 000000000..84bd9336b --- /dev/null +++ b/pyocd.yaml @@ -0,0 +1,7 @@ +# This is a config file to control pyocd ICE debugger probe options (only used for NRF52 targets with hardware debugging connections) +# for more info see FIXMEURL + +# console or telnet +semihost_console_type: telnet +enable_semihosting: True +telnet_port: 4444 diff --git a/src/AccelerometerThread.h b/src/AccelerometerThread.h deleted file mode 100644 index 744f0ad64..000000000 --- a/src/AccelerometerThread.h +++ /dev/null @@ -1,174 +0,0 @@ -#include "PowerFSM.h" -#include "concurrency/OSThread.h" -#include "configuration.h" -#include "main.h" -#include "power.h" - -#include -#include -#include -#include -#include - -BMA423 bmaSensor; -bool BMA_IRQ = false; - -#define ACCELEROMETER_CHECK_INTERVAL_MS 100 -#define ACCELEROMETER_CLICK_THRESHOLD 40 - -uint16_t readRegister(uint8_t address, uint8_t reg, uint8_t *data, uint16_t len) -{ - Wire.beginTransmission(address); - Wire.write(reg); - Wire.endTransmission(); - Wire.requestFrom((uint8_t)address, (uint8_t)len); - uint8_t i = 0; - while (Wire.available()) { - data[i++] = Wire.read(); - } - return 0; // Pass -} - -uint16_t writeRegister(uint8_t address, uint8_t reg, uint8_t *data, uint16_t len) -{ - Wire.beginTransmission(address); - Wire.write(reg); - Wire.write(data, len); - return (0 != Wire.endTransmission()); -} - -namespace concurrency -{ -class AccelerometerThread : public concurrency::OSThread -{ - public: - explicit AccelerometerThread(ScanI2C::DeviceType type) : OSThread("AccelerometerThread") - { - if (accelerometer_found.port == ScanI2C::I2CPort::NO_I2C) { - LOG_DEBUG("AccelerometerThread disabling due to no sensors found\n"); - disable(); - return; - } - - if (!config.display.wake_on_tap_or_motion && !config.device.double_tap_as_button_press) { - LOG_DEBUG("AccelerometerThread disabling due to no interested configurations\n"); - disable(); - return; - } - - acceleremoter_type = type; - LOG_DEBUG("AccelerometerThread initializing\n"); - - if (acceleremoter_type == ScanI2C::DeviceType::MPU6050 && mpu.begin(accelerometer_found.address)) { - LOG_DEBUG("MPU6050 initializing\n"); - // setup motion detection - mpu.setHighPassFilter(MPU6050_HIGHPASS_0_63_HZ); - mpu.setMotionDetectionThreshold(1); - mpu.setMotionDetectionDuration(20); - mpu.setInterruptPinLatch(true); // Keep it latched. Will turn off when reinitialized. - mpu.setInterruptPinPolarity(true); - } else if (acceleremoter_type == ScanI2C::DeviceType::LIS3DH && lis.begin(accelerometer_found.address)) { - LOG_DEBUG("LIS3DH initializing\n"); - lis.setRange(LIS3DH_RANGE_2_G); - // Adjust threshold, higher numbers are less sensitive - lis.setClick(config.device.double_tap_as_button_press ? 2 : 1, ACCELEROMETER_CLICK_THRESHOLD); - } else if (acceleremoter_type == ScanI2C::DeviceType::BMA423 && bmaSensor.begin(readRegister, writeRegister, delay)) { - LOG_DEBUG("BMA423 initializing\n"); - Acfg cfg; - cfg.odr = BMA4_OUTPUT_DATA_RATE_100HZ; - cfg.range = BMA4_ACCEL_RANGE_2G; - cfg.bandwidth = BMA4_ACCEL_NORMAL_AVG4; - cfg.perf_mode = BMA4_CONTINUOUS_MODE; - bmaSensor.setAccelConfig(cfg); - bmaSensor.enableAccel(); - - struct bma4_int_pin_config pin_config; - pin_config.edge_ctrl = BMA4_LEVEL_TRIGGER; - pin_config.lvl = BMA4_ACTIVE_HIGH; - pin_config.od = BMA4_PUSH_PULL; - pin_config.output_en = BMA4_OUTPUT_ENABLE; - pin_config.input_en = BMA4_INPUT_DISABLE; - // The correct trigger interrupt needs to be configured as needed - bmaSensor.setINTPinConfig(pin_config, BMA4_INTR1_MAP); - -#ifdef BMA423_INT - pinMode(BMA4XX_INT, INPUT); - attachInterrupt( - BMA4XX_INT, - [] { - // Set interrupt to set irq value to true - BMA_IRQ = true; - }, - RISING); // Select the interrupt mode according to the actual circuit -#endif - - struct bma423_axes_remap remap_data; - remap_data.x_axis = 0; - remap_data.x_axis_sign = 1; - remap_data.y_axis = 1; - remap_data.y_axis_sign = 0; - remap_data.z_axis = 2; - remap_data.z_axis_sign = 1; - // Need to raise the wrist function, need to set the correct axis - bmaSensor.setRemapAxes(&remap_data); - // sensor.enableFeature(BMA423_STEP_CNTR, true); - bmaSensor.enableFeature(BMA423_TILT, true); - bmaSensor.enableFeature(BMA423_WAKEUP, true); - // sensor.resetStepCounter(); - - // Turn on feature interrupt - bmaSensor.enableStepCountInterrupt(); - bmaSensor.enableTiltInterrupt(); - // It corresponds to isDoubleClick interrupt - bmaSensor.enableWakeupInterrupt(); - } - } - - protected: - int32_t runOnce() override - { - canSleep = true; // Assume we should not keep the board awake - - if (acceleremoter_type == ScanI2C::DeviceType::MPU6050 && mpu.getMotionInterruptStatus()) { - wakeScreen(); - } else if (acceleremoter_type == ScanI2C::DeviceType::LIS3DH && lis.getClick() > 0) { - uint8_t click = lis.getClick(); - if (!config.device.double_tap_as_button_press) { - wakeScreen(); - } - - if (config.device.double_tap_as_button_press && (click & 0x20)) { - buttonPress(); - return 500; - } - } else if (acceleremoter_type == ScanI2C::DeviceType::BMA423 && bmaSensor.getINT()) { - if (bmaSensor.isTilt() || bmaSensor.isDoubleClick()) { - wakeScreen(); - return 500; - } - } - - return ACCELEROMETER_CHECK_INTERVAL_MS; - } - - private: - void wakeScreen() - { - if (powerFSM.getState() == &stateDARK) { - LOG_INFO("Tap or motion detected. Turning on screen\n"); - powerFSM.trigger(EVENT_INPUT); - } - } - - void buttonPress() - { - LOG_DEBUG("Double-tap detected. Firing button press\n"); - powerFSM.trigger(EVENT_PRESS); - } - - ScanI2C::DeviceType acceleremoter_type; - Adafruit_MPU6050 mpu; - Adafruit_LIS3DH lis; -}; - -} // namespace concurrency \ No newline at end of file diff --git a/src/AmbientLightingThread.h b/src/AmbientLightingThread.h index 98ccedde4..fdd4b53fa 100644 --- a/src/AmbientLightingThread.h +++ b/src/AmbientLightingThread.h @@ -1,3 +1,4 @@ +#include "Observer.h" #include "configuration.h" #ifdef HAS_NCP5623 @@ -5,6 +6,16 @@ NCP5623 rgb; #endif +#ifdef HAS_NEOPIXEL +#include +Adafruit_NeoPixel pixels(NEOPIXEL_COUNT, NEOPIXEL_DATA, NEOPIXEL_TYPE); +#endif + +#ifdef UNPHONE +#include "unPhone.h" +extern unPhone unphone; +#endif + namespace concurrency { class AmbientLightingThread : public concurrency::OSThread @@ -12,10 +23,18 @@ class AmbientLightingThread : public concurrency::OSThread public: explicit AmbientLightingThread(ScanI2C::DeviceType type) : OSThread("AmbientLightingThread") { + notifyDeepSleepObserver.observe(¬ifyDeepSleep); // Let us know when shutdown() is issued. + +// Enables Ambient Lighting by default if conditions are meet. +#if defined(HAS_NCP5623) || defined(RGBLED_RED) || defined(HAS_NEOPIXEL) || defined(UNPHONE) +#ifdef ENABLE_AMBIENTLIGHTING + moduleConfig.ambient_lighting.led_state = true; +#endif +#endif // Uncomment to test module // moduleConfig.ambient_lighting.led_state = true; // moduleConfig.ambient_lighting.current = 10; - // // Default to a color based on our node number + // Default to a color based on our node number // moduleConfig.ambient_lighting.red = (myNodeInfo.my_node_num & 0xFF0000) >> 16; // moduleConfig.ambient_lighting.green = (myNodeInfo.my_node_num & 0x00FF00) >> 8; // moduleConfig.ambient_lighting.blue = myNodeInfo.my_node_num & 0x0000FF; @@ -27,15 +46,31 @@ class AmbientLightingThread : public concurrency::OSThread disable(); return; } +#endif +#if defined(HAS_NCP5623) || defined(RGBLED_RED) || defined(HAS_NEOPIXEL) || defined(UNPHONE) if (!moduleConfig.ambient_lighting.led_state) { LOG_DEBUG("AmbientLightingThread disabling due to moduleConfig.ambient_lighting.led_state OFF\n"); disable(); return; } LOG_DEBUG("AmbientLightingThread initializing\n"); +#ifdef HAS_NCP5623 if (_type == ScanI2C::NCP5623) { rgb.begin(); +#endif +#ifdef RGBLED_RED + pinMode(RGBLED_RED, OUTPUT); + pinMode(RGBLED_GREEN, OUTPUT); + pinMode(RGBLED_BLUE, OUTPUT); +#endif +#ifdef HAS_NEOPIXEL + pixels.begin(); // Initialise the pixel(s) + pixels.clear(); // Set all pixel colors to 'off' + pixels.setBrightness(moduleConfig.ambient_lighting.current); +#endif setLighting(); +#endif +#ifdef HAS_NCP5623 } #endif } @@ -43,21 +78,59 @@ class AmbientLightingThread : public concurrency::OSThread protected: int32_t runOnce() override { +#if defined(HAS_NCP5623) || defined(RGBLED_RED) || defined(HAS_NEOPIXEL) || defined(UNPHONE) #ifdef HAS_NCP5623 if (_type == ScanI2C::NCP5623 && moduleConfig.ambient_lighting.led_state) { +#endif setLighting(); return 30000; // 30 seconds to reset from any animations that may have been running from Ext. Notification - } else { - return disable(); +#ifdef HAS_NCP5623 } -#else - return disable(); #endif +#endif + return disable(); } + // When shutdown() is issued, setLightingOff will be called. + CallbackObserver notifyDeepSleepObserver = + CallbackObserver(this, &AmbientLightingThread::setLightingOff); + private: ScanI2C::DeviceType _type = ScanI2C::DeviceType::NONE; + // Turn RGB lighting off, is used in junction to shutdown() + int setLightingOff(void *unused) + { +#ifdef HAS_NCP5623 + rgb.setCurrent(0); + rgb.setRed(0); + rgb.setGreen(0); + rgb.setBlue(0); + LOG_INFO("Turn Off NCP5623 Ambient lighting.\n"); +#endif +#ifdef HAS_NEOPIXEL + pixels.clear(); + pixels.show(); + LOG_INFO("Turn Off NeoPixel Ambient lighting.\n"); +#endif +#ifdef RGBLED_CA + analogWrite(RGBLED_RED, 255 - 0); + analogWrite(RGBLED_GREEN, 255 - 0); + analogWrite(RGBLED_BLUE, 255 - 0); + LOG_INFO("Turn Off Ambient lighting RGB Common Anode.\n"); +#elif defined(RGBLED_RED) + analogWrite(RGBLED_RED, 0); + analogWrite(RGBLED_GREEN, 0); + analogWrite(RGBLED_BLUE, 0); + LOG_INFO("Turn Off Ambient lighting RGB Common Cathode.\n"); +#endif +#ifdef UNPHONE + unphone.rgb(0, 0, 0); + LOG_INFO("Turn Off unPhone Ambient lighting.\n"); +#endif + return 0; + } + void setLighting() { #ifdef HAS_NCP5623 @@ -65,9 +138,47 @@ class AmbientLightingThread : public concurrency::OSThread rgb.setRed(moduleConfig.ambient_lighting.red); rgb.setGreen(moduleConfig.ambient_lighting.green); rgb.setBlue(moduleConfig.ambient_lighting.blue); - LOG_DEBUG("Initializing Ambient lighting w/ current=%d, red=%d, green=%d, blue=%d\n", + LOG_DEBUG("Initializing NCP5623 Ambient lighting w/ current=%d, red=%d, green=%d, blue=%d\n", moduleConfig.ambient_lighting.current, moduleConfig.ambient_lighting.red, moduleConfig.ambient_lighting.green, moduleConfig.ambient_lighting.blue); +#endif +#ifdef HAS_NEOPIXEL + pixels.fill(pixels.Color(moduleConfig.ambient_lighting.red, moduleConfig.ambient_lighting.green, + moduleConfig.ambient_lighting.blue), + 0, NEOPIXEL_COUNT); + +// RadioMaster Bandit has addressable LED at the two buttons +// this allow us to set different lighting for them in variant.h file. +#ifdef RADIOMASTER_900_BANDIT +#if defined(BUTTON1_COLOR) && defined(BUTTON1_COLOR_INDEX) + pixels.fill(BUTTON1_COLOR, BUTTON1_COLOR_INDEX, 1); +#endif +#if defined(BUTTON2_COLOR) && defined(BUTTON2_COLOR_INDEX) + pixels.fill(BUTTON2_COLOR, BUTTON1_COLOR_INDEX, 1); +#endif +#endif + pixels.show(); + LOG_DEBUG("Initializing NeoPixel Ambient lighting w/ brightness(current)=%d, red=%d, green=%d, blue=%d\n", + moduleConfig.ambient_lighting.current, moduleConfig.ambient_lighting.red, moduleConfig.ambient_lighting.green, + moduleConfig.ambient_lighting.blue); +#endif +#ifdef RGBLED_CA + analogWrite(RGBLED_RED, 255 - moduleConfig.ambient_lighting.red); + analogWrite(RGBLED_GREEN, 255 - moduleConfig.ambient_lighting.green); + analogWrite(RGBLED_BLUE, 255 - moduleConfig.ambient_lighting.blue); + LOG_DEBUG("Initializing Ambient lighting RGB Common Anode w/ red=%d, green=%d, blue=%d\n", + moduleConfig.ambient_lighting.red, moduleConfig.ambient_lighting.green, moduleConfig.ambient_lighting.blue); +#elif defined(RGBLED_RED) + analogWrite(RGBLED_RED, moduleConfig.ambient_lighting.red); + analogWrite(RGBLED_GREEN, moduleConfig.ambient_lighting.green); + analogWrite(RGBLED_BLUE, moduleConfig.ambient_lighting.blue); + LOG_DEBUG("Initializing Ambient lighting RGB Common Cathode w/ red=%d, green=%d, blue=%d\n", + moduleConfig.ambient_lighting.red, moduleConfig.ambient_lighting.green, moduleConfig.ambient_lighting.blue); +#endif +#ifdef UNPHONE + unphone.rgb(moduleConfig.ambient_lighting.red, moduleConfig.ambient_lighting.green, moduleConfig.ambient_lighting.blue); + LOG_DEBUG("Initializing unPhone Ambient lighting w/ red=%d, green=%d, blue=%d\n", moduleConfig.ambient_lighting.red, + moduleConfig.ambient_lighting.green, moduleConfig.ambient_lighting.blue); #endif } }; diff --git a/src/BluetoothCommon.cpp b/src/BluetoothCommon.cpp index 53faae997..d9502e4f5 100644 --- a/src/BluetoothCommon.cpp +++ b/src/BluetoothCommon.cpp @@ -10,4 +10,8 @@ const uint8_t TORADIO_UUID_16[16u] = {0xe7, 0x01, 0x44, 0x12, 0x66, 0x78, 0xdd, const uint8_t FROMRADIO_UUID_16[16u] = {0x02, 0x00, 0x12, 0xac, 0x42, 0x02, 0x78, 0xb8, 0xed, 0x11, 0x93, 0x49, 0x9e, 0xe6, 0x55, 0x2c}; const uint8_t FROMNUM_UUID_16[16u] = {0x53, 0x44, 0xe3, 0x47, 0x75, 0xaa, 0x70, 0xa6, - 0x66, 0x4f, 0x00, 0xa8, 0x8c, 0xa1, 0x9d, 0xed}; \ No newline at end of file + 0x66, 0x4f, 0x00, 0xa8, 0x8c, 0xa1, 0x9d, 0xed}; +const uint8_t LEGACY_LOGRADIO_UUID_16[16u] = {0xe2, 0xf2, 0x1e, 0xbe, 0xc5, 0x15, 0xcf, 0xaa, + 0x6b, 0x43, 0xfa, 0x78, 0x38, 0xd2, 0x6f, 0x6c}; +const uint8_t LOGRADIO_UUID_16[16u] = {0x47, 0x95, 0xDF, 0x8C, 0xDE, 0xE9, 0x44, 0x99, + 0x23, 0x44, 0xE6, 0x06, 0x49, 0x6E, 0x3D, 0x5A}; \ No newline at end of file diff --git a/src/BluetoothCommon.h b/src/BluetoothCommon.h index 586ffaa3c..440d13844 100644 --- a/src/BluetoothCommon.h +++ b/src/BluetoothCommon.h @@ -11,10 +11,12 @@ #define TORADIO_UUID "f75c76d2-129e-4dad-a1dd-7866124401e7" #define FROMRADIO_UUID "2c55e69e-4993-11ed-b878-0242ac120002" #define FROMNUM_UUID "ed9da18c-a800-4f66-a670-aa7547e34453" +#define LEGACY_LOGRADIO_UUID "6c6fd238-78fa-436b-aacf-15c5be1ef2e2" +#define LOGRADIO_UUID "5a3d6e49-06e6-4423-9944-e9de8cdf9547" // NRF52 wants these constants as byte arrays // Generated here https://yupana-engineering.com/online-uuid-to-c-array-converter - but in REVERSE BYTE ORDER -extern const uint8_t MESH_SERVICE_UUID_16[], TORADIO_UUID_16[16u], FROMRADIO_UUID_16[], FROMNUM_UUID_16[]; +extern const uint8_t MESH_SERVICE_UUID_16[], TORADIO_UUID_16[16u], FROMRADIO_UUID_16[], FROMNUM_UUID_16[], LOGRADIO_UUID_16[]; /// Given a level between 0-100, update the BLE attribute void updateBatteryLevel(uint8_t level); diff --git a/src/ButtonThread.cpp b/src/ButtonThread.cpp index 84d433285..9e6ef55f5 100644 --- a/src/ButtonThread.cpp +++ b/src/ButtonThread.cpp @@ -1,10 +1,12 @@ #include "ButtonThread.h" +#include "configuration.h" +#if !MESHTASTIC_EXCLUDE_GPS #include "GPS.h" +#endif #include "MeshService.h" #include "PowerFSM.h" #include "RadioLibInterface.h" #include "buzz.h" -#include "graphics/Screen.h" #include "main.h" #include "modules/ExternalNotificationModule.h" #include "power.h" @@ -21,51 +23,55 @@ using namespace concurrency; +ButtonThread *buttonThread; // Declared extern in header volatile ButtonThread::ButtonEventType ButtonThread::btnEvent = ButtonThread::BUTTON_EVENT_NONE; +#if defined(BUTTON_PIN) || defined(ARCH_PORTDUINO) +OneButton ButtonThread::userButton; // Get reference to static member +#endif ButtonThread::ButtonThread() : OSThread("Button") { -#if defined(ARCH_PORTDUINO) || defined(BUTTON_PIN) +#if defined(BUTTON_PIN) || defined(ARCH_PORTDUINO) + #if defined(ARCH_PORTDUINO) if (settingsMap.count(user) != 0 && settingsMap[user] != RADIOLIB_NC) { - userButton = OneButton(settingsMap[user], true, true); + this->userButton = OneButton(settingsMap[user], true, true); LOG_DEBUG("Using GPIO%02d for button\n", settingsMap[user]); } #elif defined(BUTTON_PIN) - int pin = config.device.button_gpio ? config.device.button_gpio : BUTTON_PIN; + int pin = config.device.button_gpio ? config.device.button_gpio : BUTTON_PIN; // Resolved button pin +#if defined(HELTEC_CAPSULE_SENSOR_V3) + this->userButton = OneButton(pin, false, false); +#elif defined(BUTTON_ACTIVE_LOW) + this->userButton = OneButton(pin, BUTTON_ACTIVE_LOW, BUTTON_ACTIVE_PULLUP); +#else this->userButton = OneButton(pin, true, true); +#endif LOG_DEBUG("Using GPIO%02d for button\n", pin); #endif #ifdef INPUT_PULLUP_SENSE // Some platforms (nrf52) have a SENSE variant which allows wake from sleep - override what OneButton did +#ifdef BUTTON_SENSE_TYPE + pinMode(pin, BUTTON_SENSE_TYPE); +#else pinMode(pin, INPUT_PULLUP_SENSE); #endif +#endif + +#if defined(BUTTON_PIN) || defined(ARCH_PORTDUINO) userButton.attachClick(userButtonPressed); - userButton.setClickMs(250); - userButton.setPressMs(c_longPressTime); + userButton.setClickMs(BUTTON_CLICK_MS); + userButton.setPressMs(BUTTON_LONGPRESS_MS); userButton.setDebounceMs(1); userButton.attachDoubleClick(userButtonDoublePressed); - userButton.attachMultiClick(userButtonMultiPressed); + userButton.attachMultiClick(userButtonMultiPressed, this); // Reference to instance: get click count from non-static OneButton #ifndef T_DECK // T-Deck immediately wakes up after shutdown, so disable this function userButton.attachLongPressStart(userButtonPressedLongStart); userButton.attachLongPressStop(userButtonPressedLongStop); #endif -#if defined(ARCH_PORTDUINO) - if (settingsMap.count(user) != 0 && settingsMap[user] != RADIOLIB_NC) - wakeOnIrq(settingsMap[user], FALLING); -#else - static OneButton *pBtn = &userButton; // only one instance of ButtonThread is created, so static is safe - attachInterrupt( - pin, - []() { - BaseType_t higherWake = 0; - mainDelay.interruptFromISR(&higherWake); - pBtn->tick(); - }, - CHANGE); -#endif #endif + #ifdef BUTTON_PIN_ALT userButtonAlt = OneButton(BUTTON_PIN_ALT, true, true); #ifdef INPUT_PULLUP_SENSE @@ -73,19 +79,21 @@ ButtonThread::ButtonThread() : OSThread("Button") pinMode(BUTTON_PIN_ALT, INPUT_PULLUP_SENSE); #endif userButtonAlt.attachClick(userButtonPressed); - userButtonAlt.setClickMs(250); - userButtonAlt.setPressMs(c_longPressTime); + userButtonAlt.setClickMs(BUTTON_CLICK_MS); + userButtonAlt.setPressMs(BUTTON_LONGPRESS_MS); userButtonAlt.setDebounceMs(1); userButtonAlt.attachDoubleClick(userButtonDoublePressed); userButtonAlt.attachLongPressStart(userButtonPressedLongStart); userButtonAlt.attachLongPressStop(userButtonPressedLongStop); - wakeOnIrq(BUTTON_PIN_ALT, FALLING); #endif #ifdef BUTTON_PIN_TOUCH userButtonTouch = OneButton(BUTTON_PIN_TOUCH, true, true); - userButtonTouch.attachClick(touchPressed); - wakeOnIrq(BUTTON_PIN_TOUCH, FALLING); + userButtonTouch.setPressMs(BUTTON_TOUCH_MS); + userButtonTouch.attachLongPressStart(touchPressedLongStart); // Better handling with longpress than click? +#endif + + attachButtonInterrupts(); #endif } @@ -116,6 +124,11 @@ int32_t ButtonThread::runOnce() switch (btnEvent) { case BUTTON_EVENT_PRESSED: { LOG_BUTTON("press!\n"); + // If a nag notification is running, stop it and prevent other actions + if (moduleConfig.external_notification.enabled && (externalNotificationModule->nagCycleCutoff != UINT32_MAX)) { + externalNotificationModule->stopNow(); + return 50; + } #ifdef BUTTON_PIN if (((config.device.button_gpio ? config.device.button_gpio : BUTTON_PIN) != moduleConfig.canned_message.inputbroker_pin_press) || @@ -136,31 +149,51 @@ int32_t ButtonThread::runOnce() case BUTTON_EVENT_DOUBLE_PRESSED: { LOG_BUTTON("Double press!\n"); -#if defined(USE_EINK) && defined(PIN_EINK_EN) - digitalWrite(PIN_EINK_EN, digitalRead(PIN_EINK_EN) == LOW); -#endif - service.refreshLocalMeshNode(); - service.sendNetworkPing(NODENUM_BROADCAST, true); - if (screen) - screen->print("Sent ad-hoc ping\n"); - break; - } - - case BUTTON_EVENT_MULTI_PRESSED: { - LOG_BUTTON("Multi press!\n"); - if (!config.device.disable_triple_click && (gps != nullptr)) { - gps->toggleGpsMode(); - if (screen) - screen->forceDisplay(); + service->refreshLocalMeshNode(); + auto sentPosition = service->trySendPosition(NODENUM_BROADCAST, true); + if (screen) { + if (sentPosition) + screen->print("Sent ad-hoc position\n"); + else + screen->print("Sent ad-hoc nodeinfo\n"); + screen->forceDisplay(true); // Force a new UI frame, then force an EInk update } break; } + case BUTTON_EVENT_MULTI_PRESSED: { + LOG_BUTTON("Mulitipress! %hux\n", multipressClickCount); + switch (multipressClickCount) { +#if HAS_GPS + // 3 clicks: toggle GPS + case 3: + if (!config.device.disable_triple_click && (gps != nullptr)) { + gps->toggleGpsMode(); + if (screen) + screen->forceDisplay(true); // Force a new UI frame, then force an EInk update + } + break; +#endif +#if defined(USE_EINK) && defined(PIN_EINK_EN) // i.e. T-Echo + // 4 clicks: toggle backlight + case 4: + digitalWrite(PIN_EINK_EN, digitalRead(PIN_EINK_EN) == LOW); + break; +#endif + // No valid multipress action + default: + break; + } // end switch: click count + + break; + } // end multipress event + case BUTTON_EVENT_LONG_PRESSED: { LOG_BUTTON("Long press!\n"); powerFSM.trigger(EVENT_PRESS); - if (screen) - screen->startShutdownScreen(); + if (screen) { + screen->startAlert("Shutting down..."); + } playBeep(); break; } @@ -174,12 +207,22 @@ int32_t ButtonThread::runOnce() power->shutdown(); break; } - case BUTTON_EVENT_TOUCH_PRESSED: { + +#ifdef BUTTON_PIN_TOUCH + case BUTTON_EVENT_TOUCH_LONG_PRESSED: { LOG_BUTTON("Touch press!\n"); - if (screen) + if (screen) { + // Wake if asleep + if (powerFSM.getState() == &stateDARK) + powerFSM.trigger(EVENT_PRESS); + + // Update display (legacy behaviour) screen->forceDisplay(); + } break; } +#endif // BUTTON_PIN_TOUCH + default: break; } @@ -189,6 +232,59 @@ int32_t ButtonThread::runOnce() return 50; } +/* + * Attach (or re-attach) hardware interrupts for buttons + * Public method. Used outside class when waking from MCU sleep + */ +void ButtonThread::attachButtonInterrupts() +{ +#if defined(ARCH_PORTDUINO) + if (settingsMap.count(user) != 0 && settingsMap[user] != RADIOLIB_NC) + wakeOnIrq(settingsMap[user], FALLING); +#elif defined(BUTTON_PIN) + // Interrupt for user button, during normal use. Improves responsiveness. + attachInterrupt( + config.device.button_gpio ? config.device.button_gpio : BUTTON_PIN, + []() { + ButtonThread::userButton.tick(); + runASAP = true; + BaseType_t higherWake = 0; + mainDelay.interruptFromISR(&higherWake); + }, + CHANGE); +#endif + +#ifdef BUTTON_PIN_ALT + wakeOnIrq(BUTTON_PIN_ALT, FALLING); +#endif + +#ifdef BUTTON_PIN_TOUCH + wakeOnIrq(BUTTON_PIN_TOUCH, FALLING); +#endif +} + +/* + * Detach the "normal" button interrupts. + * Public method. Used before attaching a "wake-on-button" interrupt for MCU sleep + */ +void ButtonThread::detachButtonInterrupts() +{ +#if defined(ARCH_PORTDUINO) + if (settingsMap.count(user) != 0 && settingsMap[user] != RADIOLIB_NC) + detachInterrupt(settingsMap[user]); +#elif defined(BUTTON_PIN) + detachInterrupt(config.device.button_gpio ? config.device.button_gpio : BUTTON_PIN); +#endif + +#ifdef BUTTON_PIN_ALT + detachInterrupt(BUTTON_PIN_ALT); +#endif + +#ifdef BUTTON_PIN_TOUCH + detachInterrupt(BUTTON_PIN_TOUCH); +#endif +} + /** * Watch a GPIO and if we get an IRQ, wake the main thread. * Use to add wake on button press @@ -200,10 +296,30 @@ void ButtonThread::wakeOnIrq(int irq, int mode) [] { BaseType_t higherWake = 0; mainDelay.interruptFromISR(&higherWake); + runASAP = true; }, FALLING); } +// Static callback +void ButtonThread::userButtonMultiPressed(void *callerThread) +{ + // Grab click count from non-static button, while the info is still valid + ButtonThread *thread = (ButtonThread *)callerThread; + thread->storeClickCount(); + + // Then handle later, in the usual way + btnEvent = BUTTON_EVENT_MULTI_PRESSED; +} + +// Non-static method, runs during callback. Grabs info while still valid +void ButtonThread::storeClickCount() +{ +#ifdef BUTTON_PIN + multipressClickCount = userButton.getNumberClicks(); +#endif +} + void ButtonThread::userButtonPressedLongStart() { if (millis() > c_holdOffTime) { @@ -216,4 +332,4 @@ void ButtonThread::userButtonPressedLongStop() if (millis() > c_holdOffTime) { btnEvent = BUTTON_EVENT_LONG_RELEASED; } -} +} \ No newline at end of file diff --git a/src/ButtonThread.h b/src/ButtonThread.h index 554c1f0c4..9cd7b3dac 100644 --- a/src/ButtonThread.h +++ b/src/ButtonThread.h @@ -4,11 +4,22 @@ #include "concurrency/OSThread.h" #include "configuration.h" +#ifndef BUTTON_CLICK_MS +#define BUTTON_CLICK_MS 250 +#endif + +#ifndef BUTTON_LONGPRESS_MS +#define BUTTON_LONGPRESS_MS 5000 +#endif + +#ifndef BUTTON_TOUCH_MS +#define BUTTON_TOUCH_MS 400 +#endif + class ButtonThread : public concurrency::OSThread { public: - static const uint32_t c_longPressTime = 5000; // shutdown after 5s - static const uint32_t c_holdOffTime = 30000; // hold off 30s after boot + static const uint32_t c_holdOffTime = 30000; // hold off 30s after boot enum ButtonEventType { BUTTON_EVENT_NONE, @@ -17,15 +28,18 @@ class ButtonThread : public concurrency::OSThread BUTTON_EVENT_MULTI_PRESSED, BUTTON_EVENT_LONG_PRESSED, BUTTON_EVENT_LONG_RELEASED, - BUTTON_EVENT_TOUCH_PRESSED + BUTTON_EVENT_TOUCH_LONG_PRESSED, }; ButtonThread(); int32_t runOnce() override; + void attachButtonInterrupts(); + void detachButtonInterrupts(); + void storeClickCount(); private: -#ifdef BUTTON_PIN - OneButton userButton; +#if defined(BUTTON_PIN) || defined(ARCH_PORTDUINO) + static OneButton userButton; // Static - accessed from an interrupt #endif #ifdef BUTTON_PIN_ALT OneButton userButtonAlt; @@ -33,20 +47,22 @@ class ButtonThread : public concurrency::OSThread #ifdef BUTTON_PIN_TOUCH OneButton userButtonTouch; #endif -#if defined(ARCH_PORTDUINO) - OneButton userButton; -#endif // set during IRQ static volatile ButtonEventType btnEvent; + // Store click count during callback, for later use + volatile int multipressClickCount = 0; + static void wakeOnIrq(int irq, int mode); // IRQ callbacks - static void touchPressed() { btnEvent = BUTTON_EVENT_TOUCH_PRESSED; } static void userButtonPressed() { btnEvent = BUTTON_EVENT_PRESSED; } static void userButtonDoublePressed() { btnEvent = BUTTON_EVENT_DOUBLE_PRESSED; } - static void userButtonMultiPressed() { btnEvent = BUTTON_EVENT_MULTI_PRESSED; } + static void userButtonMultiPressed(void *callerThread); // Retrieve click count from non-static Onebutton while still valid static void userButtonPressedLongStart(); static void userButtonPressedLongStop(); + static void touchPressedLongStart() { btnEvent = BUTTON_EVENT_TOUCH_LONG_PRESSED; } }; + +extern ButtonThread *buttonThread; diff --git a/src/DebugConfiguration.cpp b/src/DebugConfiguration.cpp index 9df402e77..1c081ae29 100644 --- a/src/DebugConfiguration.cpp +++ b/src/DebugConfiguration.cpp @@ -26,7 +26,21 @@ SOFTWARE.*/ #include "DebugConfiguration.h" -#if HAS_WIFI || HAS_ETHERNET +#ifdef ARCH_PORTDUINO +#include "platform/portduino/PortduinoGlue.h" +#endif + +/// A C wrapper for LOG_DEBUG that can be used from arduino C libs that don't know about C++ or meshtastic +extern "C" void logLegacy(const char *level, const char *fmt, ...) +{ + va_list args; + va_start(args, fmt); + if (console) + console->vprintf(level, fmt, args); + va_end(args); +} + +#if HAS_NETWORKING Syslog::Syslog(UDP &client) { @@ -83,12 +97,14 @@ Syslog &Syslog::logMask(uint8_t priMask) void Syslog::enable() { + this->_client->begin(this->_port); this->_enabled = true; } void Syslog::disable() { this->_enabled = false; + this->_client->stop(); } bool Syslog::isEnabled() @@ -129,6 +145,11 @@ bool Syslog::vlogf(uint16_t pri, const char *appName, const char *fmt, va_list a inline bool Syslog::_sendLog(uint16_t pri, const char *appName, const char *message) { int result; +#ifdef ARCH_PORTDUINO + bool utf = !settingsMap[ascii_logs]; +#else + bool utf = true; +#endif if (!this->_enabled) return false; @@ -159,7 +180,12 @@ inline bool Syslog::_sendLog(uint16_t pri, const char *appName, const char *mess this->_client->print(this->_deviceHostname); this->_client->print(' '); this->_client->print(appName); - this->_client->print(F(" - - - \xEF\xBB\xBF")); + this->_client->print(F(" - - - ")); + if (utf) { + this->_client->print(F("\xEF\xBB\xBF")); + } else { + this->_client->print(F(" ")); + } this->_client->print(F("[")); this->_client->print(int(millis() / 1000)); this->_client->print(F("]: ")); diff --git a/src/DebugConfiguration.h b/src/DebugConfiguration.h index f0686b811..55453ea1e 100644 --- a/src/DebugConfiguration.h +++ b/src/DebugConfiguration.h @@ -1,9 +1,10 @@ -#ifndef SYSLOG_H -#define SYSLOG_H +#pragma once + +#include "configuration.h" // DEBUG LED -#ifndef LED_INVERTED -#define LED_INVERTED 0 // define as 1 if LED is active low (on) +#ifndef LED_STATE_ON +#define LED_STATE_ON 1 #endif // ----------------------------------------------------------------------------- @@ -25,6 +26,14 @@ #include "SerialConsole.h" +// If defined we will include support for ARM ICE "semihosting" for a virtual +// console over the JTAG port (to replace the normal serial port) +// Note: Normally this flag is passed into the gcc commandline by platformio.ini. +// for an example see env:rak4631_dap. +// #ifndef USE_SEMIHOSTING +// #define USE_SEMIHOSTING +// #endif + #define DEBUG_PORT (*console) // Serial debug port #ifdef USE_SEGGER @@ -36,7 +45,7 @@ #define LOG_CRIT(...) SEGGER_RTT_printf(0, __VA_ARGS__) #define LOG_TRACE(...) SEGGER_RTT_printf(0, __VA_ARGS__) #else -#ifdef DEBUG_PORT +#if defined(DEBUG_PORT) && !defined(DEBUG_MUTE) && !defined(PIO_UNIT_TESTING) #define LOG_DEBUG(...) DEBUG_PORT.log(MESHTASTIC_LOG_LEVEL_DEBUG, __VA_ARGS__) #define LOG_INFO(...) DEBUG_PORT.log(MESHTASTIC_LOG_LEVEL_INFO, __VA_ARGS__) #define LOG_WARN(...) DEBUG_PORT.log(MESHTASTIC_LOG_LEVEL_WARN, __VA_ARGS__) @@ -53,6 +62,9 @@ #endif #endif +/// A C wrapper for LOG_DEBUG that can be used from arduino C libs that don't know about C++ or meshtastic +extern "C" void logLegacy(const char *level, const char *fmt, ...); + #define SYSLOG_NILVALUE "-" #define SYSLOG_CRIT 2 /* critical conditions */ @@ -117,7 +129,7 @@ #include #endif // HAS_WIFI -#if HAS_WIFI || HAS_ETHERNET +#if HAS_NETWORKING class Syslog { @@ -152,6 +164,4 @@ class Syslog bool vlogf(uint16_t pri, const char *appName, const char *fmt, va_list args) __attribute__((format(printf, 3, 0))); }; -#endif // HAS_ETHERNET || HAS_WIFI - -#endif // SYSLOG_H \ No newline at end of file +#endif // HAS_ETHERNET || HAS_WIFI \ No newline at end of file diff --git a/src/DisplayFormatters.cpp b/src/DisplayFormatters.cpp index f15052de6..0718ffcbd 100644 --- a/src/DisplayFormatters.cpp +++ b/src/DisplayFormatters.cpp @@ -3,6 +3,9 @@ const char *DisplayFormatters::getModemPresetDisplayName(meshtastic_Config_LoRaConfig_ModemPreset preset, bool useShortName) { switch (preset) { + case meshtastic_Config_LoRaConfig_ModemPreset_SHORT_TURBO: + return useShortName ? "ShortT" : "ShortTurbo"; + break; case meshtastic_Config_LoRaConfig_ModemPreset_SHORT_SLOW: return useShortName ? "ShortS" : "ShortSlow"; break; diff --git a/src/FSCommon.cpp b/src/FSCommon.cpp index e7760c575..24d3f477e 100644 --- a/src/FSCommon.cpp +++ b/src/FSCommon.cpp @@ -24,6 +24,39 @@ SPIClass SPI1(HSPI); #endif // HAS_SDCARD +#if defined(ARCH_STM32WL) + +uint16_t OSFS::startOfEEPROM = 1; +uint16_t OSFS::endOfEEPROM = 2048; + +// 3) How do I read from the medium? +void OSFS::readNBytes(uint16_t address, unsigned int num, byte *output) +{ + for (uint16_t i = address; i < address + num; i++) { + *output = EEPROM.read(i); + output++; + } +} + +// 4) How to I write to the medium? +void OSFS::writeNBytes(uint16_t address, unsigned int num, const byte *input) +{ + for (uint16_t i = address; i < address + num; i++) { + EEPROM.update(i, *input); + input++; + } +} +#endif + +bool lfs_assert_failed = + false; // Note: we use this global on all platforms, though it can only be set true on nrf52 (in our modified lfs_util.h) + +extern "C" void lfs_assert(const char *reason) +{ + LOG_ERROR("LFS assert: %s\n", reason); + lfs_assert_failed = true; +} + /** * @brief Copies a file from one location to another. * @@ -33,7 +66,33 @@ SPIClass SPI1(HSPI); */ bool copyFile(const char *from, const char *to) { -#ifdef FSCom +#ifdef ARCH_STM32WL + unsigned char cbuffer[2048]; + + // Var to hold the result of actions + OSFS::result r; + + r = OSFS::getFile(from, cbuffer); + + if (r == notfound) { + LOG_ERROR("Failed to open source file %s\n", from); + return false; + } else if (r == noerr) { + r = OSFS::newFile(to, cbuffer, true); + if (r == noerr) { + return true; + } else { + LOG_ERROR("OSFS Error %d\n", r); + return false; + } + + } else { + LOG_ERROR("OSFS Error %d\n", r); + return false; + } + return true; + +#elif defined(FSCom) unsigned char cbuffer[16]; File f1 = FSCom.open(from, FILE_O_READ); @@ -70,7 +129,13 @@ bool copyFile(const char *from, const char *to) */ bool renameFile(const char *pathFrom, const char *pathTo) { -#ifdef FSCom +#ifdef ARCH_STM32WL + if (copyFile(pathFrom, pathTo) && (OSFS::deleteFile(pathFrom) == OSFS::result::NO_ERROR)) { + return true; + } else { + return false; + } +#elif defined(FSCom) #ifdef ARCH_ESP32 // rename was fixed for ESP32 IDF LittleFS in April return FSCom.rename(pathFrom, pathTo); @@ -84,6 +149,58 @@ bool renameFile(const char *pathFrom, const char *pathTo) #endif } +#include + +/** + * @brief Get the list of files in a directory. + * + * This function returns a list of files in a directory. The list includes the full path of each file. + * + * @param dirname The name of the directory. + * @param levels The number of levels of subdirectories to list. + * @return A vector of strings containing the full path of each file in the directory. + */ +std::vector getFiles(const char *dirname, uint8_t levels) +{ + std::vector filenames = {}; +#ifdef FSCom + File root = FSCom.open(dirname, FILE_O_READ); + if (!root) + return filenames; + if (!root.isDirectory()) + return filenames; + + File file = root.openNextFile(); + while (file) { + if (file.isDirectory() && !String(file.name()).endsWith(".")) { + if (levels) { +#ifdef ARCH_ESP32 + std::vector subDirFilenames = getFiles(file.path(), levels - 1); +#else + std::vector subDirFilenames = getFiles(file.name(), levels - 1); +#endif + filenames.insert(filenames.end(), subDirFilenames.begin(), subDirFilenames.end()); + file.close(); + } + } else { + meshtastic_FileInfo fileInfo = {"", file.size()}; +#ifdef ARCH_ESP32 + strcpy(fileInfo.file_name, file.path()); +#else + strcpy(fileInfo.file_name, file.name()); +#endif + if (!String(fileInfo.file_name).endsWith(".")) { + filenames.push_back(fileInfo); + } + file.close(); + } + file = root.openNextFile(); + } + root.close(); +#endif + return filenames; +} + /** * Lists the contents of a directory. * @@ -91,7 +208,7 @@ bool renameFile(const char *pathFrom, const char *pathTo) * @param levels The number of levels of subdirectories to list. * @param del Whether or not to delete the contents of the directory after listing. */ -void listDir(const char *dirname, uint8_t levels, bool del = false) +void listDir(const char *dirname, uint8_t levels, bool del) { #ifdef FSCom #if (defined(ARCH_ESP32) || defined(ARCH_RP2040) || defined(ARCH_PORTDUINO)) @@ -106,7 +223,9 @@ void listDir(const char *dirname, uint8_t levels, bool del = false) } File file = root.openNextFile(); - while (file) { + while ( + file && + file.name()[0]) { // This file.name() check is a workaround for a bug in the Adafruit LittleFS nrf52 glue (see issue 4395) if (file.isDirectory() && !String(file.name()).endsWith(".")) { if (levels) { #ifdef ARCH_ESP32 @@ -130,6 +249,7 @@ void listDir(const char *dirname, uint8_t levels, bool del = false) file.close(); } #else + LOG_DEBUG(" %s (directory)\n", file.name()); listDir(file.name(), levels - 1, del); file.close(); #endif @@ -156,7 +276,7 @@ void listDir(const char *dirname, uint8_t levels, bool del = false) file.close(); } #else - LOG_DEBUG(" %s (%i Bytes)\n", file.name(), file.size()); + LOG_DEBUG(" %s (%i Bytes)\n", file.name(), file.size()); file.close(); #endif } @@ -212,7 +332,7 @@ void fsInit() LOG_ERROR("Filesystem mount Failed.\n"); // assert(0); This auto-formats the partition, so no need to fail here. } -#ifdef ARCH_ESP32 +#if defined(ARCH_ESP32) LOG_DEBUG("Filesystem files (%d/%d Bytes):\n", FSCom.usedBytes(), FSCom.totalBytes()); #else LOG_DEBUG("Filesystem files:\n"); @@ -250,8 +370,8 @@ void setupSDCard() } uint64_t cardSize = SD.cardSize() / (1024 * 1024); - LOG_DEBUG("SD Card Size: %lluMB\n", cardSize); - LOG_DEBUG("Total space: %llu MB\n", SD.totalBytes() / (1024 * 1024)); - LOG_DEBUG("Used space: %llu MB\n", SD.usedBytes() / (1024 * 1024)); + LOG_DEBUG("SD Card Size: %lu MB\n", (uint32_t)cardSize); + LOG_DEBUG("Total space: %lu MB\n", (uint32_t)(SD.totalBytes() / (1024 * 1024))); + LOG_DEBUG("Used space: %lu MB\n", (uint32_t)(SD.usedBytes() / (1024 * 1024))); #endif } \ No newline at end of file diff --git a/src/FSCommon.h b/src/FSCommon.h index ef1d3e4c1..254245b29 100644 --- a/src/FSCommon.h +++ b/src/FSCommon.h @@ -1,6 +1,7 @@ #pragma once #include "configuration.h" +#include // Cross platform filesystem API @@ -14,10 +15,13 @@ #endif #if defined(ARCH_STM32WL) -#include "platform/stm32wl/InternalFileSystem.h" // STM32WL version -#define FSCom InternalFS -#define FSBegin() FSCom.begin() -using namespace LittleFS_Namespace; +// STM32WL series 2 Kbytes (8 rows of 256 bytes) +#include +#include + +// Useful consts +const OSFS::result noerr = OSFS::result::NO_ERROR; +const OSFS::result notfound = OSFS::result::FILE_NOT_FOUND; #endif #if defined(ARCH_RP2040) @@ -47,8 +51,13 @@ using namespace Adafruit_LittleFS_Namespace; #endif void fsInit(); +void fsListFiles(); bool copyFile(const char *from, const char *to); bool renameFile(const char *pathFrom, const char *pathTo); -void listDir(const char *dirname, uint8_t levels, bool del); +std::vector getFiles(const char *dirname, uint8_t levels); +void listDir(const char *dirname, uint8_t levels, bool del = false); void rmDir(const char *dirname); -void setupSDCard(); \ No newline at end of file +void setupSDCard(); + +extern bool lfs_assert_failed; // Note: we use this global on all platforms, though it can only be set true on nrf52 (in our + // modified lfs_util.h) diff --git a/src/Fusion/Fusion.h b/src/Fusion/Fusion.h new file mode 100644 index 000000000..48f5198c5 --- /dev/null +++ b/src/Fusion/Fusion.h @@ -0,0 +1,32 @@ +/** + * @file Fusion.h + * @author Seb Madgwick + * @brief Main header file for the Fusion library. This is the only file that + * needs to be included when using the library. + */ + +#ifndef FUSION_H +#define FUSION_H + +//------------------------------------------------------------------------------ +// Includes + +#ifdef __cplusplus +extern "C" { +#endif + +#include "FusionAhrs.h" +#include "FusionAxes.h" +#include "FusionCalibration.h" +#include "FusionCompass.h" +#include "FusionConvention.h" +#include "FusionMath.h" +#include "FusionOffset.h" + +#ifdef __cplusplus +} +#endif + +#endif +//------------------------------------------------------------------------------ +// End of file diff --git a/src/Fusion/FusionAhrs.c b/src/Fusion/FusionAhrs.c new file mode 100644 index 000000000..d6c1d0215 --- /dev/null +++ b/src/Fusion/FusionAhrs.c @@ -0,0 +1,542 @@ +/** + * @file FusionAhrs.c + * @author Seb Madgwick + * @brief AHRS algorithm to combine gyroscope, accelerometer, and magnetometer + * measurements into a single measurement of orientation relative to the Earth. + */ + +//------------------------------------------------------------------------------ +// Includes + +#include "FusionAhrs.h" +#include // FLT_MAX +#include // atan2f, cosf, fabsf, powf, sinf + +//------------------------------------------------------------------------------ +// Definitions + +/** + * @brief Initial gain used during the initialisation. + */ +#define INITIAL_GAIN (10.0f) + +/** + * @brief Initialisation period in seconds. + */ +#define INITIALISATION_PERIOD (3.0f) + +//------------------------------------------------------------------------------ +// Function declarations + +static inline FusionVector HalfGravity(const FusionAhrs *const ahrs); + +static inline FusionVector HalfMagnetic(const FusionAhrs *const ahrs); + +static inline FusionVector Feedback(const FusionVector sensor, const FusionVector reference); + +static inline int Clamp(const int value, const int min, const int max); + +//------------------------------------------------------------------------------ +// Functions + +/** + * @brief Initialises the AHRS algorithm structure. + * @param ahrs AHRS algorithm structure. + */ +void FusionAhrsInitialise(FusionAhrs *const ahrs) +{ + const FusionAhrsSettings settings = { + .convention = FusionConventionNwu, + .gain = 0.5f, + .gyroscopeRange = 0.0f, + .accelerationRejection = 90.0f, + .magneticRejection = 90.0f, + .recoveryTriggerPeriod = 0, + }; + FusionAhrsSetSettings(ahrs, &settings); + FusionAhrsReset(ahrs); +} + +/** + * @brief Resets the AHRS algorithm. This is equivalent to reinitialising the + * algorithm while maintaining the current settings. + * @param ahrs AHRS algorithm structure. + */ +void FusionAhrsReset(FusionAhrs *const ahrs) +{ + ahrs->quaternion = FUSION_IDENTITY_QUATERNION; + ahrs->accelerometer = FUSION_VECTOR_ZERO; + ahrs->initialising = true; + ahrs->rampedGain = INITIAL_GAIN; + ahrs->angularRateRecovery = false; + ahrs->halfAccelerometerFeedback = FUSION_VECTOR_ZERO; + ahrs->halfMagnetometerFeedback = FUSION_VECTOR_ZERO; + ahrs->accelerometerIgnored = false; + ahrs->accelerationRecoveryTrigger = 0; + ahrs->accelerationRecoveryTimeout = ahrs->settings.recoveryTriggerPeriod; + ahrs->magnetometerIgnored = false; + ahrs->magneticRecoveryTrigger = 0; + ahrs->magneticRecoveryTimeout = ahrs->settings.recoveryTriggerPeriod; +} + +/** + * @brief Sets the AHRS algorithm settings. + * @param ahrs AHRS algorithm structure. + * @param settings Settings. + */ +void FusionAhrsSetSettings(FusionAhrs *const ahrs, const FusionAhrsSettings *const settings) +{ + ahrs->settings.convention = settings->convention; + ahrs->settings.gain = settings->gain; + ahrs->settings.gyroscopeRange = settings->gyroscopeRange == 0.0f ? FLT_MAX : 0.98f * settings->gyroscopeRange; + ahrs->settings.accelerationRejection = settings->accelerationRejection == 0.0f + ? FLT_MAX + : powf(0.5f * sinf(FusionDegreesToRadians(settings->accelerationRejection)), 2); + ahrs->settings.magneticRejection = + settings->magneticRejection == 0.0f ? FLT_MAX : powf(0.5f * sinf(FusionDegreesToRadians(settings->magneticRejection)), 2); + ahrs->settings.recoveryTriggerPeriod = settings->recoveryTriggerPeriod; + ahrs->accelerationRecoveryTimeout = ahrs->settings.recoveryTriggerPeriod; + ahrs->magneticRecoveryTimeout = ahrs->settings.recoveryTriggerPeriod; + if ((settings->gain == 0.0f) || + (settings->recoveryTriggerPeriod == 0)) { // disable acceleration and magnetic rejection features if gain is zero + ahrs->settings.accelerationRejection = FLT_MAX; + ahrs->settings.magneticRejection = FLT_MAX; + } + if (ahrs->initialising == false) { + ahrs->rampedGain = ahrs->settings.gain; + } + ahrs->rampedGainStep = (INITIAL_GAIN - ahrs->settings.gain) / INITIALISATION_PERIOD; +} + +/** + * @brief Updates the AHRS algorithm using the gyroscope, accelerometer, and + * magnetometer measurements. + * @param ahrs AHRS algorithm structure. + * @param gyroscope Gyroscope measurement in degrees per second. + * @param accelerometer Accelerometer measurement in g. + * @param magnetometer Magnetometer measurement in arbitrary units. + * @param deltaTime Delta time in seconds. + */ +void FusionAhrsUpdate(FusionAhrs *const ahrs, const FusionVector gyroscope, const FusionVector accelerometer, + const FusionVector magnetometer, const float deltaTime) +{ +#define Q ahrs->quaternion.element + + // Store accelerometer + ahrs->accelerometer = accelerometer; + + // Reinitialise if gyroscope range exceeded + if ((fabsf(gyroscope.axis.x) > ahrs->settings.gyroscopeRange) || (fabsf(gyroscope.axis.y) > ahrs->settings.gyroscopeRange) || + (fabsf(gyroscope.axis.z) > ahrs->settings.gyroscopeRange)) { + const FusionQuaternion quaternion = ahrs->quaternion; + FusionAhrsReset(ahrs); + ahrs->quaternion = quaternion; + ahrs->angularRateRecovery = true; + } + + // Ramp down gain during initialisation + if (ahrs->initialising) { + ahrs->rampedGain -= ahrs->rampedGainStep * deltaTime; + if ((ahrs->rampedGain < ahrs->settings.gain) || (ahrs->settings.gain == 0.0f)) { + ahrs->rampedGain = ahrs->settings.gain; + ahrs->initialising = false; + ahrs->angularRateRecovery = false; + } + } + + // Calculate direction of gravity indicated by algorithm + const FusionVector halfGravity = HalfGravity(ahrs); + + // Calculate accelerometer feedback + FusionVector halfAccelerometerFeedback = FUSION_VECTOR_ZERO; + ahrs->accelerometerIgnored = true; + if (FusionVectorIsZero(accelerometer) == false) { + + // Calculate accelerometer feedback scaled by 0.5 + ahrs->halfAccelerometerFeedback = Feedback(FusionVectorNormalise(accelerometer), halfGravity); + + // Don't ignore accelerometer if acceleration error below threshold + if (ahrs->initialising || + ((FusionVectorMagnitudeSquared(ahrs->halfAccelerometerFeedback) <= ahrs->settings.accelerationRejection))) { + ahrs->accelerometerIgnored = false; + ahrs->accelerationRecoveryTrigger -= 9; + } else { + ahrs->accelerationRecoveryTrigger += 1; + } + + // Don't ignore accelerometer during acceleration recovery + if (ahrs->accelerationRecoveryTrigger > ahrs->accelerationRecoveryTimeout) { + ahrs->accelerationRecoveryTimeout = 0; + ahrs->accelerometerIgnored = false; + } else { + ahrs->accelerationRecoveryTimeout = ahrs->settings.recoveryTriggerPeriod; + } + ahrs->accelerationRecoveryTrigger = Clamp(ahrs->accelerationRecoveryTrigger, 0, ahrs->settings.recoveryTriggerPeriod); + + // Apply accelerometer feedback + if (ahrs->accelerometerIgnored == false) { + halfAccelerometerFeedback = ahrs->halfAccelerometerFeedback; + } + } + + // Calculate magnetometer feedback + FusionVector halfMagnetometerFeedback = FUSION_VECTOR_ZERO; + ahrs->magnetometerIgnored = true; + if (FusionVectorIsZero(magnetometer) == false) { + + // Calculate direction of magnetic field indicated by algorithm + const FusionVector halfMagnetic = HalfMagnetic(ahrs); + + // Calculate magnetometer feedback scaled by 0.5 + ahrs->halfMagnetometerFeedback = + Feedback(FusionVectorNormalise(FusionVectorCrossProduct(halfGravity, magnetometer)), halfMagnetic); + + // Don't ignore magnetometer if magnetic error below threshold + if (ahrs->initialising || + ((FusionVectorMagnitudeSquared(ahrs->halfMagnetometerFeedback) <= ahrs->settings.magneticRejection))) { + ahrs->magnetometerIgnored = false; + ahrs->magneticRecoveryTrigger -= 9; + } else { + ahrs->magneticRecoveryTrigger += 1; + } + + // Don't ignore magnetometer during magnetic recovery + if (ahrs->magneticRecoveryTrigger > ahrs->magneticRecoveryTimeout) { + ahrs->magneticRecoveryTimeout = 0; + ahrs->magnetometerIgnored = false; + } else { + ahrs->magneticRecoveryTimeout = ahrs->settings.recoveryTriggerPeriod; + } + ahrs->magneticRecoveryTrigger = Clamp(ahrs->magneticRecoveryTrigger, 0, ahrs->settings.recoveryTriggerPeriod); + + // Apply magnetometer feedback + if (ahrs->magnetometerIgnored == false) { + halfMagnetometerFeedback = ahrs->halfMagnetometerFeedback; + } + } + + // Convert gyroscope to radians per second scaled by 0.5 + const FusionVector halfGyroscope = FusionVectorMultiplyScalar(gyroscope, FusionDegreesToRadians(0.5f)); + + // Apply feedback to gyroscope + const FusionVector adjustedHalfGyroscope = FusionVectorAdd( + halfGyroscope, + FusionVectorMultiplyScalar(FusionVectorAdd(halfAccelerometerFeedback, halfMagnetometerFeedback), ahrs->rampedGain)); + + // Integrate rate of change of quaternion + ahrs->quaternion = FusionQuaternionAdd( + ahrs->quaternion, + FusionQuaternionMultiplyVector(ahrs->quaternion, FusionVectorMultiplyScalar(adjustedHalfGyroscope, deltaTime))); + + // Normalise quaternion + ahrs->quaternion = FusionQuaternionNormalise(ahrs->quaternion); +#undef Q +} + +/** + * @brief Returns the direction of gravity scaled by 0.5. + * @param ahrs AHRS algorithm structure. + * @return Direction of gravity scaled by 0.5. + */ +static inline FusionVector HalfGravity(const FusionAhrs *const ahrs) +{ +#define Q ahrs->quaternion.element + switch (ahrs->settings.convention) { + case FusionConventionNwu: + case FusionConventionEnu: { + const FusionVector halfGravity = {.axis = { + .x = Q.x * Q.z - Q.w * Q.y, + .y = Q.y * Q.z + Q.w * Q.x, + .z = Q.w * Q.w - 0.5f + Q.z * Q.z, + }}; // third column of transposed rotation matrix scaled by 0.5 + return halfGravity; + } + case FusionConventionNed: { + const FusionVector halfGravity = {.axis = { + .x = Q.w * Q.y - Q.x * Q.z, + .y = -1.0f * (Q.y * Q.z + Q.w * Q.x), + .z = 0.5f - Q.w * Q.w - Q.z * Q.z, + }}; // third column of transposed rotation matrix scaled by -0.5 + return halfGravity; + } + } + return FUSION_VECTOR_ZERO; // avoid compiler warning +#undef Q +} + +/** + * @brief Returns the direction of the magnetic field scaled by 0.5. + * @param ahrs AHRS algorithm structure. + * @return Direction of the magnetic field scaled by 0.5. + */ +static inline FusionVector HalfMagnetic(const FusionAhrs *const ahrs) +{ +#define Q ahrs->quaternion.element + switch (ahrs->settings.convention) { + case FusionConventionNwu: { + const FusionVector halfMagnetic = {.axis = { + .x = Q.x * Q.y + Q.w * Q.z, + .y = Q.w * Q.w - 0.5f + Q.y * Q.y, + .z = Q.y * Q.z - Q.w * Q.x, + }}; // second column of transposed rotation matrix scaled by 0.5 + return halfMagnetic; + } + case FusionConventionEnu: { + const FusionVector halfMagnetic = {.axis = { + .x = 0.5f - Q.w * Q.w - Q.x * Q.x, + .y = Q.w * Q.z - Q.x * Q.y, + .z = -1.0f * (Q.x * Q.z + Q.w * Q.y), + }}; // first column of transposed rotation matrix scaled by -0.5 + return halfMagnetic; + } + case FusionConventionNed: { + const FusionVector halfMagnetic = {.axis = { + .x = -1.0f * (Q.x * Q.y + Q.w * Q.z), + .y = 0.5f - Q.w * Q.w - Q.y * Q.y, + .z = Q.w * Q.x - Q.y * Q.z, + }}; // second column of transposed rotation matrix scaled by -0.5 + return halfMagnetic; + } + } + return FUSION_VECTOR_ZERO; // avoid compiler warning +#undef Q +} + +/** + * @brief Returns the feedback. + * @param sensor Sensor. + * @param reference Reference. + * @return Feedback. + */ +static inline FusionVector Feedback(const FusionVector sensor, const FusionVector reference) +{ + if (FusionVectorDotProduct(sensor, reference) < 0.0f) { // if error is >90 degrees + return FusionVectorNormalise(FusionVectorCrossProduct(sensor, reference)); + } + return FusionVectorCrossProduct(sensor, reference); +} + +/** + * @brief Returns a value limited to maximum and minimum. + * @param value Value. + * @param min Minimum value. + * @param max Maximum value. + * @return Value limited to maximum and minimum. + */ +static inline int Clamp(const int value, const int min, const int max) +{ + if (value < min) { + return min; + } + if (value > max) { + return max; + } + return value; +} + +/** + * @brief Updates the AHRS algorithm using the gyroscope and accelerometer + * measurements only. + * @param ahrs AHRS algorithm structure. + * @param gyroscope Gyroscope measurement in degrees per second. + * @param accelerometer Accelerometer measurement in g. + * @param deltaTime Delta time in seconds. + */ +void FusionAhrsUpdateNoMagnetometer(FusionAhrs *const ahrs, const FusionVector gyroscope, const FusionVector accelerometer, + const float deltaTime) +{ + + // Update AHRS algorithm + FusionAhrsUpdate(ahrs, gyroscope, accelerometer, FUSION_VECTOR_ZERO, deltaTime); + + // Zero heading during initialisation + if (ahrs->initialising) { + FusionAhrsSetHeading(ahrs, 0.0f); + } +} + +/** + * @brief Updates the AHRS algorithm using the gyroscope, accelerometer, and + * heading measurements. + * @param ahrs AHRS algorithm structure. + * @param gyroscope Gyroscope measurement in degrees per second. + * @param accelerometer Accelerometer measurement in g. + * @param heading Heading measurement in degrees. + * @param deltaTime Delta time in seconds. + */ +void FusionAhrsUpdateExternalHeading(FusionAhrs *const ahrs, const FusionVector gyroscope, const FusionVector accelerometer, + const float heading, const float deltaTime) +{ +#define Q ahrs->quaternion.element + + // Calculate roll + const float roll = atan2f(Q.w * Q.x + Q.y * Q.z, 0.5f - Q.y * Q.y - Q.x * Q.x); + + // Calculate magnetometer + const float headingRadians = FusionDegreesToRadians(heading); + const float sinHeadingRadians = sinf(headingRadians); + const FusionVector magnetometer = {.axis = { + .x = cosf(headingRadians), + .y = -1.0f * cosf(roll) * sinHeadingRadians, + .z = sinHeadingRadians * sinf(roll), + }}; + + // Update AHRS algorithm + FusionAhrsUpdate(ahrs, gyroscope, accelerometer, magnetometer, deltaTime); +#undef Q +} + +/** + * @brief Returns the quaternion describing the sensor relative to the Earth. + * @param ahrs AHRS algorithm structure. + * @return Quaternion describing the sensor relative to the Earth. + */ +FusionQuaternion FusionAhrsGetQuaternion(const FusionAhrs *const ahrs) +{ + return ahrs->quaternion; +} + +/** + * @brief Sets the quaternion describing the sensor relative to the Earth. + * @param ahrs AHRS algorithm structure. + * @param quaternion Quaternion describing the sensor relative to the Earth. + */ +void FusionAhrsSetQuaternion(FusionAhrs *const ahrs, const FusionQuaternion quaternion) +{ + ahrs->quaternion = quaternion; +} + +/** + * @brief Returns the linear acceleration measurement equal to the accelerometer + * measurement with the 1 g of gravity removed. + * @param ahrs AHRS algorithm structure. + * @return Linear acceleration measurement in g. + */ +FusionVector FusionAhrsGetLinearAcceleration(const FusionAhrs *const ahrs) +{ +#define Q ahrs->quaternion.element + + // Calculate gravity in the sensor coordinate frame + const FusionVector gravity = {.axis = { + .x = 2.0f * (Q.x * Q.z - Q.w * Q.y), + .y = 2.0f * (Q.y * Q.z + Q.w * Q.x), + .z = 2.0f * (Q.w * Q.w - 0.5f + Q.z * Q.z), + }}; // third column of transposed rotation matrix + + // Remove gravity from accelerometer measurement + switch (ahrs->settings.convention) { + case FusionConventionNwu: + case FusionConventionEnu: { + return FusionVectorSubtract(ahrs->accelerometer, gravity); + } + case FusionConventionNed: { + return FusionVectorAdd(ahrs->accelerometer, gravity); + } + } + return FUSION_VECTOR_ZERO; // avoid compiler warning +#undef Q +} + +/** + * @brief Returns the Earth acceleration measurement equal to accelerometer + * measurement in the Earth coordinate frame with the 1 g of gravity removed. + * @param ahrs AHRS algorithm structure. + * @return Earth acceleration measurement in g. + */ +FusionVector FusionAhrsGetEarthAcceleration(const FusionAhrs *const ahrs) +{ +#define Q ahrs->quaternion.element +#define A ahrs->accelerometer.axis + + // Calculate accelerometer measurement in the Earth coordinate frame + const float qwqw = Q.w * Q.w; // calculate common terms to avoid repeated operations + const float qwqx = Q.w * Q.x; + const float qwqy = Q.w * Q.y; + const float qwqz = Q.w * Q.z; + const float qxqy = Q.x * Q.y; + const float qxqz = Q.x * Q.z; + const float qyqz = Q.y * Q.z; + FusionVector accelerometer = {.axis = { + .x = 2.0f * ((qwqw - 0.5f + Q.x * Q.x) * A.x + (qxqy - qwqz) * A.y + (qxqz + qwqy) * A.z), + .y = 2.0f * ((qxqy + qwqz) * A.x + (qwqw - 0.5f + Q.y * Q.y) * A.y + (qyqz - qwqx) * A.z), + .z = 2.0f * ((qxqz - qwqy) * A.x + (qyqz + qwqx) * A.y + (qwqw - 0.5f + Q.z * Q.z) * A.z), + }}; // rotation matrix multiplied with the accelerometer + + // Remove gravity from accelerometer measurement + switch (ahrs->settings.convention) { + case FusionConventionNwu: + case FusionConventionEnu: + accelerometer.axis.z -= 1.0f; + break; + case FusionConventionNed: + accelerometer.axis.z += 1.0f; + break; + } + return accelerometer; +#undef Q +#undef A +} + +/** + * @brief Returns the AHRS algorithm internal states. + * @param ahrs AHRS algorithm structure. + * @return AHRS algorithm internal states. + */ +FusionAhrsInternalStates FusionAhrsGetInternalStates(const FusionAhrs *const ahrs) +{ + const FusionAhrsInternalStates internalStates = { + .accelerationError = FusionRadiansToDegrees(FusionAsin(2.0f * FusionVectorMagnitude(ahrs->halfAccelerometerFeedback))), + .accelerometerIgnored = ahrs->accelerometerIgnored, + .accelerationRecoveryTrigger = + ahrs->settings.recoveryTriggerPeriod == 0 + ? 0.0f + : (float)ahrs->accelerationRecoveryTrigger / (float)ahrs->settings.recoveryTriggerPeriod, + .magneticError = FusionRadiansToDegrees(FusionAsin(2.0f * FusionVectorMagnitude(ahrs->halfMagnetometerFeedback))), + .magnetometerIgnored = ahrs->magnetometerIgnored, + .magneticRecoveryTrigger = ahrs->settings.recoveryTriggerPeriod == 0 + ? 0.0f + : (float)ahrs->magneticRecoveryTrigger / (float)ahrs->settings.recoveryTriggerPeriod, + }; + return internalStates; +} + +/** + * @brief Returns the AHRS algorithm flags. + * @param ahrs AHRS algorithm structure. + * @return AHRS algorithm flags. + */ +FusionAhrsFlags FusionAhrsGetFlags(const FusionAhrs *const ahrs) +{ + const FusionAhrsFlags flags = { + .initialising = ahrs->initialising, + .angularRateRecovery = ahrs->angularRateRecovery, + .accelerationRecovery = ahrs->accelerationRecoveryTrigger > ahrs->accelerationRecoveryTimeout, + .magneticRecovery = ahrs->magneticRecoveryTrigger > ahrs->magneticRecoveryTimeout, + }; + return flags; +} + +/** + * @brief Sets the heading of the orientation measurement provided by the AHRS + * algorithm. This function can be used to reset drift in heading when the AHRS + * algorithm is being used without a magnetometer. + * @param ahrs AHRS algorithm structure. + * @param heading Heading angle in degrees. + */ +void FusionAhrsSetHeading(FusionAhrs *const ahrs, const float heading) +{ +#define Q ahrs->quaternion.element + const float yaw = atan2f(Q.w * Q.z + Q.x * Q.y, 0.5f - Q.y * Q.y - Q.z * Q.z); + const float halfYawMinusHeading = 0.5f * (yaw - FusionDegreesToRadians(heading)); + const FusionQuaternion rotation = {.element = { + .w = cosf(halfYawMinusHeading), + .x = 0.0f, + .y = 0.0f, + .z = -1.0f * sinf(halfYawMinusHeading), + }}; + ahrs->quaternion = FusionQuaternionMultiply(rotation, ahrs->quaternion); +#undef Q +} + +//------------------------------------------------------------------------------ +// End of file diff --git a/src/Fusion/FusionAhrs.h b/src/Fusion/FusionAhrs.h new file mode 100644 index 000000000..aa2326e43 --- /dev/null +++ b/src/Fusion/FusionAhrs.h @@ -0,0 +1,112 @@ +/** + * @file FusionAhrs.h + * @author Seb Madgwick + * @brief AHRS algorithm to combine gyroscope, accelerometer, and magnetometer + * measurements into a single measurement of orientation relative to the Earth. + */ + +#ifndef FUSION_AHRS_H +#define FUSION_AHRS_H + +//------------------------------------------------------------------------------ +// Includes + +#include "FusionConvention.h" +#include "FusionMath.h" +#include + +//------------------------------------------------------------------------------ +// Definitions + +/** + * @brief AHRS algorithm settings. + */ +typedef struct { + FusionConvention convention; + float gain; + float gyroscopeRange; + float accelerationRejection; + float magneticRejection; + unsigned int recoveryTriggerPeriod; +} FusionAhrsSettings; + +/** + * @brief AHRS algorithm structure. Structure members are used internally and + * must not be accessed by the application. + */ +typedef struct { + FusionAhrsSettings settings; + FusionQuaternion quaternion; + FusionVector accelerometer; + bool initialising; + float rampedGain; + float rampedGainStep; + bool angularRateRecovery; + FusionVector halfAccelerometerFeedback; + FusionVector halfMagnetometerFeedback; + bool accelerometerIgnored; + int accelerationRecoveryTrigger; + int accelerationRecoveryTimeout; + bool magnetometerIgnored; + int magneticRecoveryTrigger; + int magneticRecoveryTimeout; +} FusionAhrs; + +/** + * @brief AHRS algorithm internal states. + */ +typedef struct { + float accelerationError; + bool accelerometerIgnored; + float accelerationRecoveryTrigger; + float magneticError; + bool magnetometerIgnored; + float magneticRecoveryTrigger; +} FusionAhrsInternalStates; + +/** + * @brief AHRS algorithm flags. + */ +typedef struct { + bool initialising; + bool angularRateRecovery; + bool accelerationRecovery; + bool magneticRecovery; +} FusionAhrsFlags; + +//------------------------------------------------------------------------------ +// Function declarations + +void FusionAhrsInitialise(FusionAhrs *const ahrs); + +void FusionAhrsReset(FusionAhrs *const ahrs); + +void FusionAhrsSetSettings(FusionAhrs *const ahrs, const FusionAhrsSettings *const settings); + +void FusionAhrsUpdate(FusionAhrs *const ahrs, const FusionVector gyroscope, const FusionVector accelerometer, + const FusionVector magnetometer, const float deltaTime); + +void FusionAhrsUpdateNoMagnetometer(FusionAhrs *const ahrs, const FusionVector gyroscope, const FusionVector accelerometer, + const float deltaTime); + +void FusionAhrsUpdateExternalHeading(FusionAhrs *const ahrs, const FusionVector gyroscope, const FusionVector accelerometer, + const float heading, const float deltaTime); + +FusionQuaternion FusionAhrsGetQuaternion(const FusionAhrs *const ahrs); + +void FusionAhrsSetQuaternion(FusionAhrs *const ahrs, const FusionQuaternion quaternion); + +FusionVector FusionAhrsGetLinearAcceleration(const FusionAhrs *const ahrs); + +FusionVector FusionAhrsGetEarthAcceleration(const FusionAhrs *const ahrs); + +FusionAhrsInternalStates FusionAhrsGetInternalStates(const FusionAhrs *const ahrs); + +FusionAhrsFlags FusionAhrsGetFlags(const FusionAhrs *const ahrs); + +void FusionAhrsSetHeading(FusionAhrs *const ahrs, const float heading); + +#endif + +//------------------------------------------------------------------------------ +// End of file diff --git a/src/Fusion/FusionAxes.h b/src/Fusion/FusionAxes.h new file mode 100644 index 000000000..9673c88ff --- /dev/null +++ b/src/Fusion/FusionAxes.h @@ -0,0 +1,188 @@ +/** + * @file FusionAxes.h + * @author Seb Madgwick + * @brief Swaps sensor axes for alignment with the body axes. + */ + +#ifndef FUSION_AXES_H +#define FUSION_AXES_H + +//------------------------------------------------------------------------------ +// Includes + +#include "FusionMath.h" + +//------------------------------------------------------------------------------ +// Definitions + +/** + * @brief Axes alignment describing the sensor axes relative to the body axes. + * For example, if the body X axis is aligned with the sensor Y axis and the + * body Y axis is aligned with sensor X axis but pointing the opposite direction + * then alignment is +Y-X+Z. + */ +typedef enum { + FusionAxesAlignmentPXPYPZ, /* +X+Y+Z */ + FusionAxesAlignmentPXNZPY, /* +X-Z+Y */ + FusionAxesAlignmentPXNYNZ, /* +X-Y-Z */ + FusionAxesAlignmentPXPZNY, /* +X+Z-Y */ + FusionAxesAlignmentNXPYNZ, /* -X+Y-Z */ + FusionAxesAlignmentNXPZPY, /* -X+Z+Y */ + FusionAxesAlignmentNXNYPZ, /* -X-Y+Z */ + FusionAxesAlignmentNXNZNY, /* -X-Z-Y */ + FusionAxesAlignmentPYNXPZ, /* +Y-X+Z */ + FusionAxesAlignmentPYNZNX, /* +Y-Z-X */ + FusionAxesAlignmentPYPXNZ, /* +Y+X-Z */ + FusionAxesAlignmentPYPZPX, /* +Y+Z+X */ + FusionAxesAlignmentNYPXPZ, /* -Y+X+Z */ + FusionAxesAlignmentNYNZPX, /* -Y-Z+X */ + FusionAxesAlignmentNYNXNZ, /* -Y-X-Z */ + FusionAxesAlignmentNYPZNX, /* -Y+Z-X */ + FusionAxesAlignmentPZPYNX, /* +Z+Y-X */ + FusionAxesAlignmentPZPXPY, /* +Z+X+Y */ + FusionAxesAlignmentPZNYPX, /* +Z-Y+X */ + FusionAxesAlignmentPZNXNY, /* +Z-X-Y */ + FusionAxesAlignmentNZPYPX, /* -Z+Y+X */ + FusionAxesAlignmentNZNXPY, /* -Z-X+Y */ + FusionAxesAlignmentNZNYNX, /* -Z-Y-X */ + FusionAxesAlignmentNZPXNY, /* -Z+X-Y */ +} FusionAxesAlignment; + +//------------------------------------------------------------------------------ +// Inline functions + +/** + * @brief Swaps sensor axes for alignment with the body axes. + * @param sensor Sensor axes. + * @param alignment Axes alignment. + * @return Sensor axes aligned with the body axes. + */ +static inline FusionVector FusionAxesSwap(const FusionVector sensor, const FusionAxesAlignment alignment) +{ + FusionVector result; + switch (alignment) { + case FusionAxesAlignmentPXPYPZ: + break; + case FusionAxesAlignmentPXNZPY: + result.axis.x = +sensor.axis.x; + result.axis.y = -sensor.axis.z; + result.axis.z = +sensor.axis.y; + return result; + case FusionAxesAlignmentPXNYNZ: + result.axis.x = +sensor.axis.x; + result.axis.y = -sensor.axis.y; + result.axis.z = -sensor.axis.z; + return result; + case FusionAxesAlignmentPXPZNY: + result.axis.x = +sensor.axis.x; + result.axis.y = +sensor.axis.z; + result.axis.z = -sensor.axis.y; + return result; + case FusionAxesAlignmentNXPYNZ: + result.axis.x = -sensor.axis.x; + result.axis.y = +sensor.axis.y; + result.axis.z = -sensor.axis.z; + return result; + case FusionAxesAlignmentNXPZPY: + result.axis.x = -sensor.axis.x; + result.axis.y = +sensor.axis.z; + result.axis.z = +sensor.axis.y; + return result; + case FusionAxesAlignmentNXNYPZ: + result.axis.x = -sensor.axis.x; + result.axis.y = -sensor.axis.y; + result.axis.z = +sensor.axis.z; + return result; + case FusionAxesAlignmentNXNZNY: + result.axis.x = -sensor.axis.x; + result.axis.y = -sensor.axis.z; + result.axis.z = -sensor.axis.y; + return result; + case FusionAxesAlignmentPYNXPZ: + result.axis.x = +sensor.axis.y; + result.axis.y = -sensor.axis.x; + result.axis.z = +sensor.axis.z; + return result; + case FusionAxesAlignmentPYNZNX: + result.axis.x = +sensor.axis.y; + result.axis.y = -sensor.axis.z; + result.axis.z = -sensor.axis.x; + return result; + case FusionAxesAlignmentPYPXNZ: + result.axis.x = +sensor.axis.y; + result.axis.y = +sensor.axis.x; + result.axis.z = -sensor.axis.z; + return result; + case FusionAxesAlignmentPYPZPX: + result.axis.x = +sensor.axis.y; + result.axis.y = +sensor.axis.z; + result.axis.z = +sensor.axis.x; + return result; + case FusionAxesAlignmentNYPXPZ: + result.axis.x = -sensor.axis.y; + result.axis.y = +sensor.axis.x; + result.axis.z = +sensor.axis.z; + return result; + case FusionAxesAlignmentNYNZPX: + result.axis.x = -sensor.axis.y; + result.axis.y = -sensor.axis.z; + result.axis.z = +sensor.axis.x; + return result; + case FusionAxesAlignmentNYNXNZ: + result.axis.x = -sensor.axis.y; + result.axis.y = -sensor.axis.x; + result.axis.z = -sensor.axis.z; + return result; + case FusionAxesAlignmentNYPZNX: + result.axis.x = -sensor.axis.y; + result.axis.y = +sensor.axis.z; + result.axis.z = -sensor.axis.x; + return result; + case FusionAxesAlignmentPZPYNX: + result.axis.x = +sensor.axis.z; + result.axis.y = +sensor.axis.y; + result.axis.z = -sensor.axis.x; + return result; + case FusionAxesAlignmentPZPXPY: + result.axis.x = +sensor.axis.z; + result.axis.y = +sensor.axis.x; + result.axis.z = +sensor.axis.y; + return result; + case FusionAxesAlignmentPZNYPX: + result.axis.x = +sensor.axis.z; + result.axis.y = -sensor.axis.y; + result.axis.z = +sensor.axis.x; + return result; + case FusionAxesAlignmentPZNXNY: + result.axis.x = +sensor.axis.z; + result.axis.y = -sensor.axis.x; + result.axis.z = -sensor.axis.y; + return result; + case FusionAxesAlignmentNZPYPX: + result.axis.x = -sensor.axis.z; + result.axis.y = +sensor.axis.y; + result.axis.z = +sensor.axis.x; + return result; + case FusionAxesAlignmentNZNXPY: + result.axis.x = -sensor.axis.z; + result.axis.y = -sensor.axis.x; + result.axis.z = +sensor.axis.y; + return result; + case FusionAxesAlignmentNZNYNX: + result.axis.x = -sensor.axis.z; + result.axis.y = -sensor.axis.y; + result.axis.z = -sensor.axis.x; + return result; + case FusionAxesAlignmentNZPXNY: + result.axis.x = -sensor.axis.z; + result.axis.y = +sensor.axis.x; + result.axis.z = -sensor.axis.y; + return result; + } + return sensor; // avoid compiler warning +} + +#endif + +//------------------------------------------------------------------------------ +// End of file diff --git a/src/Fusion/FusionCalibration.h b/src/Fusion/FusionCalibration.h new file mode 100644 index 000000000..be7102b73 --- /dev/null +++ b/src/Fusion/FusionCalibration.h @@ -0,0 +1,49 @@ +/** + * @file FusionCalibration.h + * @author Seb Madgwick + * @brief Gyroscope, accelerometer, and magnetometer calibration models. + */ + +#ifndef FUSION_CALIBRATION_H +#define FUSION_CALIBRATION_H + +//------------------------------------------------------------------------------ +// Includes + +#include "FusionMath.h" + +//------------------------------------------------------------------------------ +// Inline functions + +/** + * @brief Gyroscope and accelerometer calibration model. + * @param uncalibrated Uncalibrated measurement. + * @param misalignment Misalignment matrix. + * @param sensitivity Sensitivity. + * @param offset Offset. + * @return Calibrated measurement. + */ +static inline FusionVector FusionCalibrationInertial(const FusionVector uncalibrated, const FusionMatrix misalignment, + const FusionVector sensitivity, const FusionVector offset) +{ + return FusionMatrixMultiplyVector(misalignment, + FusionVectorHadamardProduct(FusionVectorSubtract(uncalibrated, offset), sensitivity)); +} + +/** + * @brief Magnetometer calibration model. + * @param uncalibrated Uncalibrated measurement. + * @param softIronMatrix Soft-iron matrix. + * @param hardIronOffset Hard-iron offset. + * @return Calibrated measurement. + */ +static inline FusionVector FusionCalibrationMagnetic(const FusionVector uncalibrated, const FusionMatrix softIronMatrix, + const FusionVector hardIronOffset) +{ + return FusionMatrixMultiplyVector(softIronMatrix, FusionVectorSubtract(uncalibrated, hardIronOffset)); +} + +#endif + +//------------------------------------------------------------------------------ +// End of file diff --git a/src/Fusion/FusionCompass.c b/src/Fusion/FusionCompass.c new file mode 100644 index 000000000..6a6f9591a --- /dev/null +++ b/src/Fusion/FusionCompass.c @@ -0,0 +1,51 @@ +/** + * @file FusionCompass.c + * @author Seb Madgwick + * @brief Tilt-compensated compass to calculate the magnetic heading using + * accelerometer and magnetometer measurements. + */ + +//------------------------------------------------------------------------------ +// Includes + +#include "FusionCompass.h" +#include "FusionAxes.h" +#include // atan2f + +//------------------------------------------------------------------------------ +// Functions + +/** + * @brief Calculates the magnetic heading. + * @param convention Earth axes convention. + * @param accelerometer Accelerometer measurement in any calibrated units. + * @param magnetometer Magnetometer measurement in any calibrated units. + * @return Heading angle in degrees. + */ +float FusionCompassCalculateHeading(const FusionConvention convention, const FusionVector accelerometer, + const FusionVector magnetometer) +{ + switch (convention) { + case FusionConventionNwu: { + const FusionVector west = FusionVectorNormalise(FusionVectorCrossProduct(accelerometer, magnetometer)); + const FusionVector north = FusionVectorNormalise(FusionVectorCrossProduct(west, accelerometer)); + return FusionRadiansToDegrees(atan2f(west.axis.x, north.axis.x)); + } + case FusionConventionEnu: { + const FusionVector west = FusionVectorNormalise(FusionVectorCrossProduct(accelerometer, magnetometer)); + const FusionVector north = FusionVectorNormalise(FusionVectorCrossProduct(west, accelerometer)); + const FusionVector east = FusionVectorMultiplyScalar(west, -1.0f); + return FusionRadiansToDegrees(atan2f(north.axis.x, east.axis.x)); + } + case FusionConventionNed: { + const FusionVector up = FusionVectorMultiplyScalar(accelerometer, -1.0f); + const FusionVector west = FusionVectorNormalise(FusionVectorCrossProduct(up, magnetometer)); + const FusionVector north = FusionVectorNormalise(FusionVectorCrossProduct(west, up)); + return FusionRadiansToDegrees(atan2f(west.axis.x, north.axis.x)); + } + } + return 0; // avoid compiler warning +} + +//------------------------------------------------------------------------------ +// End of file diff --git a/src/Fusion/FusionCompass.h b/src/Fusion/FusionCompass.h new file mode 100644 index 000000000..a3d0b466a --- /dev/null +++ b/src/Fusion/FusionCompass.h @@ -0,0 +1,26 @@ +/** + * @file FusionCompass.h + * @author Seb Madgwick + * @brief Tilt-compensated compass to calculate the magnetic heading using + * accelerometer and magnetometer measurements. + */ + +#ifndef FUSION_COMPASS_H +#define FUSION_COMPASS_H + +//------------------------------------------------------------------------------ +// Includes + +#include "FusionConvention.h" +#include "FusionMath.h" + +//------------------------------------------------------------------------------ +// Function declarations + +float FusionCompassCalculateHeading(const FusionConvention convention, const FusionVector accelerometer, + const FusionVector magnetometer); + +#endif + +//------------------------------------------------------------------------------ +// End of file diff --git a/src/Fusion/FusionConvention.h b/src/Fusion/FusionConvention.h new file mode 100644 index 000000000..0b0d43adc --- /dev/null +++ b/src/Fusion/FusionConvention.h @@ -0,0 +1,25 @@ +/** + * @file FusionConvention.h + * @author Seb Madgwick + * @brief Earth axes convention. + */ + +#ifndef FUSION_CONVENTION_H +#define FUSION_CONVENTION_H + +//------------------------------------------------------------------------------ +// Definitions + +/** + * @brief Earth axes convention. + */ +typedef enum { + FusionConventionNwu, /* North-West-Up */ + FusionConventionEnu, /* East-North-Up */ + FusionConventionNed, /* North-East-Down */ +} FusionConvention; + +#endif + +//------------------------------------------------------------------------------ +// End of file diff --git a/src/Fusion/FusionMath.h b/src/Fusion/FusionMath.h new file mode 100644 index 000000000..c3fc34b2d --- /dev/null +++ b/src/Fusion/FusionMath.h @@ -0,0 +1,503 @@ +/** + * @file FusionMath.h + * @author Seb Madgwick + * @brief Math library. + */ + +#ifndef FUSION_MATH_H +#define FUSION_MATH_H + +//------------------------------------------------------------------------------ +// Includes + +#include // M_PI, sqrtf, atan2f, asinf +#include +#include + +//------------------------------------------------------------------------------ +// Definitions + +/** + * @brief 3D vector. + */ +typedef union { + float array[3]; + + struct { + float x; + float y; + float z; + } axis; +} FusionVector; + +/** + * @brief Quaternion. + */ +typedef union { + float array[4]; + + struct { + float w; + float x; + float y; + float z; + } element; +} FusionQuaternion; + +/** + * @brief 3x3 matrix in row-major order. + * See http://en.wikipedia.org/wiki/Row-major_order + */ +typedef union { + float array[3][3]; + + struct { + float xx; + float xy; + float xz; + float yx; + float yy; + float yz; + float zx; + float zy; + float zz; + } element; +} FusionMatrix; + +/** + * @brief Euler angles. Roll, pitch, and yaw correspond to rotations around + * X, Y, and Z respectively. + */ +typedef union { + float array[3]; + + struct { + float roll; + float pitch; + float yaw; + } angle; +} FusionEuler; + +/** + * @brief Vector of zeros. + */ +#define FUSION_VECTOR_ZERO ((FusionVector){.array = {0.0f, 0.0f, 0.0f}}) + +/** + * @brief Vector of ones. + */ +#define FUSION_VECTOR_ONES ((FusionVector){.array = {1.0f, 1.0f, 1.0f}}) + +/** + * @brief Identity quaternion. + */ +#define FUSION_IDENTITY_QUATERNION ((FusionQuaternion){.array = {1.0f, 0.0f, 0.0f, 0.0f}}) + +/** + * @brief Identity matrix. + */ +#define FUSION_IDENTITY_MATRIX ((FusionMatrix){.array = {{1.0f, 0.0f, 0.0f}, {0.0f, 1.0f, 0.0f}, {0.0f, 0.0f, 1.0f}}}) + +/** + * @brief Euler angles of zero. + */ +#define FUSION_EULER_ZERO ((FusionEuler){.array = {0.0f, 0.0f, 0.0f}}) + +/** + * @brief Pi. May not be defined in math.h. + */ +#ifndef M_PI +#define M_PI (3.14159265358979323846) +#endif + +/** + * @brief Include this definition or add as a preprocessor definition to use + * normal square root operations. + */ +// #define FUSION_USE_NORMAL_SQRT + +//------------------------------------------------------------------------------ +// Inline functions - Degrees and radians conversion + +/** + * @brief Converts degrees to radians. + * @param degrees Degrees. + * @return Radians. + */ +static inline float FusionDegreesToRadians(const float degrees) +{ + return degrees * ((float)M_PI / 180.0f); +} + +/** + * @brief Converts radians to degrees. + * @param radians Radians. + * @return Degrees. + */ +static inline float FusionRadiansToDegrees(const float radians) +{ + return radians * (180.0f / (float)M_PI); +} + +//------------------------------------------------------------------------------ +// Inline functions - Arc sine + +/** + * @brief Returns the arc sine of the value. + * @param value Value. + * @return Arc sine of the value. + */ +static inline float FusionAsin(const float value) +{ + if (value <= -1.0f) { + return (float)M_PI / -2.0f; + } + if (value >= 1.0f) { + return (float)M_PI / 2.0f; + } + return asinf(value); +} + +//------------------------------------------------------------------------------ +// Inline functions - Fast inverse square root + +#ifndef FUSION_USE_NORMAL_SQRT + +/** + * @brief Calculates the reciprocal of the square root. + * See https://pizer.wordpress.com/2008/10/12/fast-inverse-square-root/ + * @param x Operand. + * @return Reciprocal of the square root of x. + */ +static inline float FusionFastInverseSqrt(const float x) +{ + + typedef union { + float f; + int32_t i; + } Union32; + + Union32 union32 = {.f = x}; + union32.i = 0x5F1F1412 - (union32.i >> 1); + return union32.f * (1.69000231f - 0.714158168f * x * union32.f * union32.f); +} + +#endif + +//------------------------------------------------------------------------------ +// Inline functions - Vector operations + +/** + * @brief Returns true if the vector is zero. + * @param vector Vector. + * @return True if the vector is zero. + */ +static inline bool FusionVectorIsZero(const FusionVector vector) +{ + return (vector.axis.x == 0.0f) && (vector.axis.y == 0.0f) && (vector.axis.z == 0.0f); +} + +/** + * @brief Returns the sum of two vectors. + * @param vectorA Vector A. + * @param vectorB Vector B. + * @return Sum of two vectors. + */ +static inline FusionVector FusionVectorAdd(const FusionVector vectorA, const FusionVector vectorB) +{ + const FusionVector result = {.axis = { + .x = vectorA.axis.x + vectorB.axis.x, + .y = vectorA.axis.y + vectorB.axis.y, + .z = vectorA.axis.z + vectorB.axis.z, + }}; + return result; +} + +/** + * @brief Returns vector B subtracted from vector A. + * @param vectorA Vector A. + * @param vectorB Vector B. + * @return Vector B subtracted from vector A. + */ +static inline FusionVector FusionVectorSubtract(const FusionVector vectorA, const FusionVector vectorB) +{ + const FusionVector result = {.axis = { + .x = vectorA.axis.x - vectorB.axis.x, + .y = vectorA.axis.y - vectorB.axis.y, + .z = vectorA.axis.z - vectorB.axis.z, + }}; + return result; +} + +/** + * @brief Returns the sum of the elements. + * @param vector Vector. + * @return Sum of the elements. + */ +static inline float FusionVectorSum(const FusionVector vector) +{ + return vector.axis.x + vector.axis.y + vector.axis.z; +} + +/** + * @brief Returns the multiplication of a vector by a scalar. + * @param vector Vector. + * @param scalar Scalar. + * @return Multiplication of a vector by a scalar. + */ +static inline FusionVector FusionVectorMultiplyScalar(const FusionVector vector, const float scalar) +{ + const FusionVector result = {.axis = { + .x = vector.axis.x * scalar, + .y = vector.axis.y * scalar, + .z = vector.axis.z * scalar, + }}; + return result; +} + +/** + * @brief Calculates the Hadamard product (element-wise multiplication). + * @param vectorA Vector A. + * @param vectorB Vector B. + * @return Hadamard product. + */ +static inline FusionVector FusionVectorHadamardProduct(const FusionVector vectorA, const FusionVector vectorB) +{ + const FusionVector result = {.axis = { + .x = vectorA.axis.x * vectorB.axis.x, + .y = vectorA.axis.y * vectorB.axis.y, + .z = vectorA.axis.z * vectorB.axis.z, + }}; + return result; +} + +/** + * @brief Returns the cross product. + * @param vectorA Vector A. + * @param vectorB Vector B. + * @return Cross product. + */ +static inline FusionVector FusionVectorCrossProduct(const FusionVector vectorA, const FusionVector vectorB) +{ +#define A vectorA.axis +#define B vectorB.axis + const FusionVector result = {.axis = { + .x = A.y * B.z - A.z * B.y, + .y = A.z * B.x - A.x * B.z, + .z = A.x * B.y - A.y * B.x, + }}; + return result; +#undef A +#undef B +} + +/** + * @brief Returns the dot product. + * @param vectorA Vector A. + * @param vectorB Vector B. + * @return Dot product. + */ +static inline float FusionVectorDotProduct(const FusionVector vectorA, const FusionVector vectorB) +{ + return FusionVectorSum(FusionVectorHadamardProduct(vectorA, vectorB)); +} + +/** + * @brief Returns the vector magnitude squared. + * @param vector Vector. + * @return Vector magnitude squared. + */ +static inline float FusionVectorMagnitudeSquared(const FusionVector vector) +{ + return FusionVectorSum(FusionVectorHadamardProduct(vector, vector)); +} + +/** + * @brief Returns the vector magnitude. + * @param vector Vector. + * @return Vector magnitude. + */ +static inline float FusionVectorMagnitude(const FusionVector vector) +{ + return sqrtf(FusionVectorMagnitudeSquared(vector)); +} + +/** + * @brief Returns the normalised vector. + * @param vector Vector. + * @return Normalised vector. + */ +static inline FusionVector FusionVectorNormalise(const FusionVector vector) +{ +#ifdef FUSION_USE_NORMAL_SQRT + const float magnitudeReciprocal = 1.0f / sqrtf(FusionVectorMagnitudeSquared(vector)); +#else + const float magnitudeReciprocal = FusionFastInverseSqrt(FusionVectorMagnitudeSquared(vector)); +#endif + return FusionVectorMultiplyScalar(vector, magnitudeReciprocal); +} + +//------------------------------------------------------------------------------ +// Inline functions - Quaternion operations + +/** + * @brief Returns the sum of two quaternions. + * @param quaternionA Quaternion A. + * @param quaternionB Quaternion B. + * @return Sum of two quaternions. + */ +static inline FusionQuaternion FusionQuaternionAdd(const FusionQuaternion quaternionA, const FusionQuaternion quaternionB) +{ + const FusionQuaternion result = {.element = { + .w = quaternionA.element.w + quaternionB.element.w, + .x = quaternionA.element.x + quaternionB.element.x, + .y = quaternionA.element.y + quaternionB.element.y, + .z = quaternionA.element.z + quaternionB.element.z, + }}; + return result; +} + +/** + * @brief Returns the multiplication of two quaternions. + * @param quaternionA Quaternion A (to be post-multiplied). + * @param quaternionB Quaternion B (to be pre-multiplied). + * @return Multiplication of two quaternions. + */ +static inline FusionQuaternion FusionQuaternionMultiply(const FusionQuaternion quaternionA, const FusionQuaternion quaternionB) +{ +#define A quaternionA.element +#define B quaternionB.element + const FusionQuaternion result = {.element = { + .w = A.w * B.w - A.x * B.x - A.y * B.y - A.z * B.z, + .x = A.w * B.x + A.x * B.w + A.y * B.z - A.z * B.y, + .y = A.w * B.y - A.x * B.z + A.y * B.w + A.z * B.x, + .z = A.w * B.z + A.x * B.y - A.y * B.x + A.z * B.w, + }}; + return result; +#undef A +#undef B +} + +/** + * @brief Returns the multiplication of a quaternion with a vector. This is a + * normal quaternion multiplication where the vector is treated a + * quaternion with a W element value of zero. The quaternion is post- + * multiplied by the vector. + * @param quaternion Quaternion. + * @param vector Vector. + * @return Multiplication of a quaternion with a vector. + */ +static inline FusionQuaternion FusionQuaternionMultiplyVector(const FusionQuaternion quaternion, const FusionVector vector) +{ +#define Q quaternion.element +#define V vector.axis + const FusionQuaternion result = {.element = { + .w = -Q.x * V.x - Q.y * V.y - Q.z * V.z, + .x = Q.w * V.x + Q.y * V.z - Q.z * V.y, + .y = Q.w * V.y - Q.x * V.z + Q.z * V.x, + .z = Q.w * V.z + Q.x * V.y - Q.y * V.x, + }}; + return result; +#undef Q +#undef V +} + +/** + * @brief Returns the normalised quaternion. + * @param quaternion Quaternion. + * @return Normalised quaternion. + */ +static inline FusionQuaternion FusionQuaternionNormalise(const FusionQuaternion quaternion) +{ +#define Q quaternion.element +#ifdef FUSION_USE_NORMAL_SQRT + const float magnitudeReciprocal = 1.0f / sqrtf(Q.w * Q.w + Q.x * Q.x + Q.y * Q.y + Q.z * Q.z); +#else + const float magnitudeReciprocal = FusionFastInverseSqrt(Q.w * Q.w + Q.x * Q.x + Q.y * Q.y + Q.z * Q.z); +#endif + const FusionQuaternion result = {.element = { + .w = Q.w * magnitudeReciprocal, + .x = Q.x * magnitudeReciprocal, + .y = Q.y * magnitudeReciprocal, + .z = Q.z * magnitudeReciprocal, + }}; + return result; +#undef Q +} + +//------------------------------------------------------------------------------ +// Inline functions - Matrix operations + +/** + * @brief Returns the multiplication of a matrix with a vector. + * @param matrix Matrix. + * @param vector Vector. + * @return Multiplication of a matrix with a vector. + */ +static inline FusionVector FusionMatrixMultiplyVector(const FusionMatrix matrix, const FusionVector vector) +{ +#define R matrix.element + const FusionVector result = {.axis = { + .x = R.xx * vector.axis.x + R.xy * vector.axis.y + R.xz * vector.axis.z, + .y = R.yx * vector.axis.x + R.yy * vector.axis.y + R.yz * vector.axis.z, + .z = R.zx * vector.axis.x + R.zy * vector.axis.y + R.zz * vector.axis.z, + }}; + return result; +#undef R +} + +//------------------------------------------------------------------------------ +// Inline functions - Conversion operations + +/** + * @brief Converts a quaternion to a rotation matrix. + * @param quaternion Quaternion. + * @return Rotation matrix. + */ +static inline FusionMatrix FusionQuaternionToMatrix(const FusionQuaternion quaternion) +{ +#define Q quaternion.element + const float qwqw = Q.w * Q.w; // calculate common terms to avoid repeated operations + const float qwqx = Q.w * Q.x; + const float qwqy = Q.w * Q.y; + const float qwqz = Q.w * Q.z; + const float qxqy = Q.x * Q.y; + const float qxqz = Q.x * Q.z; + const float qyqz = Q.y * Q.z; + const FusionMatrix matrix = {.element = { + .xx = 2.0f * (qwqw - 0.5f + Q.x * Q.x), + .xy = 2.0f * (qxqy - qwqz), + .xz = 2.0f * (qxqz + qwqy), + .yx = 2.0f * (qxqy + qwqz), + .yy = 2.0f * (qwqw - 0.5f + Q.y * Q.y), + .yz = 2.0f * (qyqz - qwqx), + .zx = 2.0f * (qxqz - qwqy), + .zy = 2.0f * (qyqz + qwqx), + .zz = 2.0f * (qwqw - 0.5f + Q.z * Q.z), + }}; + return matrix; +#undef Q +} + +/** + * @brief Converts a quaternion to ZYX Euler angles in degrees. + * @param quaternion Quaternion. + * @return Euler angles in degrees. + */ +static inline FusionEuler FusionQuaternionToEuler(const FusionQuaternion quaternion) +{ +#define Q quaternion.element + const float halfMinusQySquared = 0.5f - Q.y * Q.y; // calculate common terms to avoid repeated operations + const FusionEuler euler = {.angle = { + .roll = FusionRadiansToDegrees(atan2f(Q.w * Q.x + Q.y * Q.z, halfMinusQySquared - Q.x * Q.x)), + .pitch = FusionRadiansToDegrees(FusionAsin(2.0f * (Q.w * Q.y - Q.z * Q.x))), + .yaw = FusionRadiansToDegrees(atan2f(Q.w * Q.z + Q.x * Q.y, halfMinusQySquared - Q.z * Q.z)), + }}; + return euler; +#undef Q +} + +#endif + +//------------------------------------------------------------------------------ +// End of file diff --git a/src/Fusion/FusionOffset.c b/src/Fusion/FusionOffset.c new file mode 100644 index 000000000..d4334c874 --- /dev/null +++ b/src/Fusion/FusionOffset.c @@ -0,0 +1,80 @@ +/** + * @file FusionOffset.c + * @author Seb Madgwick + * @brief Gyroscope offset correction algorithm for run-time calibration of the + * gyroscope offset. + */ + +//------------------------------------------------------------------------------ +// Includes + +#include "FusionOffset.h" +#include // fabsf + +//------------------------------------------------------------------------------ +// Definitions + +/** + * @brief Cutoff frequency in Hz. + */ +#define CUTOFF_FREQUENCY (0.02f) + +/** + * @brief Timeout in seconds. + */ +#define TIMEOUT (5) + +/** + * @brief Threshold in degrees per second. + */ +#define THRESHOLD (3.0f) + +//------------------------------------------------------------------------------ +// Functions + +/** + * @brief Initialises the gyroscope offset algorithm. + * @param offset Gyroscope offset algorithm structure. + * @param sampleRate Sample rate in Hz. + */ +void FusionOffsetInitialise(FusionOffset *const offset, const unsigned int sampleRate) +{ + offset->filterCoefficient = 2.0f * (float)M_PI * CUTOFF_FREQUENCY * (1.0f / (float)sampleRate); + offset->timeout = TIMEOUT * sampleRate; + offset->timer = 0; + offset->gyroscopeOffset = FUSION_VECTOR_ZERO; +} + +/** + * @brief Updates the gyroscope offset algorithm and returns the corrected + * gyroscope measurement. + * @param offset Gyroscope offset algorithm structure. + * @param gyroscope Gyroscope measurement in degrees per second. + * @return Corrected gyroscope measurement in degrees per second. + */ +FusionVector FusionOffsetUpdate(FusionOffset *const offset, FusionVector gyroscope) +{ + + // Subtract offset from gyroscope measurement + gyroscope = FusionVectorSubtract(gyroscope, offset->gyroscopeOffset); + + // Reset timer if gyroscope not stationary + if ((fabsf(gyroscope.axis.x) > THRESHOLD) || (fabsf(gyroscope.axis.y) > THRESHOLD) || (fabsf(gyroscope.axis.z) > THRESHOLD)) { + offset->timer = 0; + return gyroscope; + } + + // Increment timer while gyroscope stationary + if (offset->timer < offset->timeout) { + offset->timer++; + return gyroscope; + } + + // Adjust offset if timer has elapsed + offset->gyroscopeOffset = + FusionVectorAdd(offset->gyroscopeOffset, FusionVectorMultiplyScalar(gyroscope, offset->filterCoefficient)); + return gyroscope; +} + +//------------------------------------------------------------------------------ +// End of file diff --git a/src/Fusion/FusionOffset.h b/src/Fusion/FusionOffset.h new file mode 100644 index 000000000..51ae4a896 --- /dev/null +++ b/src/Fusion/FusionOffset.h @@ -0,0 +1,40 @@ +/** + * @file FusionOffset.h + * @author Seb Madgwick + * @brief Gyroscope offset correction algorithm for run-time calibration of the + * gyroscope offset. + */ + +#ifndef FUSION_OFFSET_H +#define FUSION_OFFSET_H + +//------------------------------------------------------------------------------ +// Includes + +#include "FusionMath.h" + +//------------------------------------------------------------------------------ +// Definitions + +/** + * @brief Gyroscope offset algorithm structure. Structure members are used + * internally and must not be accessed by the application. + */ +typedef struct { + float filterCoefficient; + unsigned int timeout; + unsigned int timer; + FusionVector gyroscopeOffset; +} FusionOffset; + +//------------------------------------------------------------------------------ +// Function declarations + +void FusionOffsetInitialise(FusionOffset *const offset, const unsigned int sampleRate); + +FusionVector FusionOffsetUpdate(FusionOffset *const offset, FusionVector gyroscope); + +#endif + +//------------------------------------------------------------------------------ +// End of file diff --git a/src/GPSStatus.h b/src/GPSStatus.h index bcfb5f2eb..c2ab16c86 100644 --- a/src/GPSStatus.h +++ b/src/GPSStatus.h @@ -4,8 +4,6 @@ #include "configuration.h" #include -extern NodeDB nodeDB; - namespace meshtastic { @@ -55,7 +53,7 @@ class GPSStatus : public Status #ifdef GPS_EXTRAVERBOSE LOG_WARN("Using fixed latitude\n"); #endif - meshtastic_NodeInfoLite *node = nodeDB.getMeshNode(nodeDB.getNodeNum()); + meshtastic_NodeInfoLite *node = nodeDB->getMeshNode(nodeDB->getNodeNum()); return node->position.latitude_i; } else { return p.latitude_i; @@ -68,7 +66,7 @@ class GPSStatus : public Status #ifdef GPS_EXTRAVERBOSE LOG_WARN("Using fixed longitude\n"); #endif - meshtastic_NodeInfoLite *node = nodeDB.getMeshNode(nodeDB.getNodeNum()); + meshtastic_NodeInfoLite *node = nodeDB->getMeshNode(nodeDB->getNodeNum()); return node->position.longitude_i; } else { return p.longitude_i; @@ -81,27 +79,18 @@ class GPSStatus : public Status #ifdef GPS_EXTRAVERBOSE LOG_WARN("Using fixed altitude\n"); #endif - meshtastic_NodeInfoLite *node = nodeDB.getMeshNode(nodeDB.getNodeNum()); + meshtastic_NodeInfoLite *node = nodeDB->getMeshNode(nodeDB->getNodeNum()); return node->position.altitude; } else { return p.altitude; } } - uint32_t getDOP() const - { - return p.PDOP; - } + uint32_t getDOP() const { return p.PDOP; } - uint32_t getHeading() const - { - return p.ground_track; - } + uint32_t getHeading() const { return p.ground_track; } - uint32_t getNumSatellites() const - { - return p.sats_in_view; - } + uint32_t getNumSatellites() const { return p.sats_in_view; } bool matches(const GPSStatus *newStatus) const { @@ -135,7 +124,7 @@ class GPSStatus : public Status if (isDirty) { if (hasLock) { // In debug logs, identify position by @timestamp:stage (stage 3 = notify) - LOG_DEBUG("New GPS pos@%x:3 lat=%f, lon=%f, alt=%d, pdop=%.2f, track=%.2f, speed=%.2f, sats=%d\n", p.timestamp, + LOG_DEBUG("New GPS pos@%x:3 lat=%f lon=%f alt=%d pdop=%.2f track=%.2f speed=%.2f sats=%d\n", p.timestamp, p.latitude_i * 1e-7, p.longitude_i * 1e-7, p.altitude, p.PDOP * 1e-2, p.ground_track * 1e-5, p.ground_speed * 1e-2, p.sats_in_view); } else { @@ -149,4 +138,4 @@ class GPSStatus : public Status } // namespace meshtastic -extern meshtastic::GPSStatus *gpsStatus; \ No newline at end of file +extern meshtastic::GPSStatus *gpsStatus; diff --git a/src/GpioLogic.cpp b/src/GpioLogic.cpp new file mode 100644 index 000000000..cbe26fc60 --- /dev/null +++ b/src/GpioLogic.cpp @@ -0,0 +1,104 @@ +#include "GpioLogic.h" +#include + +void GpioVirtPin::set(bool value) +{ + if (value != this->value) { + this->value = value ? PinState::On : PinState::Off; + if (dependentPin) + dependentPin->update(); + } +} + +void GpioHwPin::set(bool value) +{ + // if (num == 3) LOG_DEBUG("Setting pin %d to %d\n", num, value); + pinMode(num, OUTPUT); + digitalWrite(num, value); +} + +GpioTransformer::GpioTransformer(GpioPin *outPin) : outPin(outPin) {} + +void GpioTransformer::set(bool value) +{ + outPin->set(value); +} + +GpioUnaryTransformer::GpioUnaryTransformer(GpioVirtPin *inPin, GpioPin *outPin) : GpioTransformer(outPin), inPin(inPin) +{ + assert(!inPin->dependentPin); // We only allow one dependent pin + inPin->dependentPin = this; + + // Don't update at construction time, because various GpioPins might be global constructor based not yet initied because + // order of operations for global constructors is not defined. + // update(); +} + +/** + * Update the output pin based on the current state of the input pin. + */ +void GpioUnaryTransformer::update() +{ + auto p = inPin->get(); + if (p == GpioVirtPin::PinState::Unset) + return; // Not yet fully initialized + + set(p); +} + +/** + * Update the output pin based on the current state of the input pin. + */ +void GpioNotTransformer::update() +{ + auto p = inPin->get(); + if (p == GpioVirtPin::PinState::Unset) + return; // Not yet fully initialized + + set(!p); +} + +GpioBinaryTransformer::GpioBinaryTransformer(GpioVirtPin *inPin1, GpioVirtPin *inPin2, GpioPin *outPin, Operation operation) + : GpioTransformer(outPin), inPin1(inPin1), inPin2(inPin2), operation(operation) +{ + assert(!inPin1->dependentPin); // We only allow one dependent pin + inPin1->dependentPin = this; + assert(!inPin2->dependentPin); // We only allow one dependent pin + inPin2->dependentPin = this; + + // Don't update at construction time, because various GpioPins might be global constructor based not yet initied because + // order of operations for global constructors is not defined. + // update(); +} + +void GpioBinaryTransformer::update() +{ + auto p1 = inPin1->get(), p2 = inPin2->get(); + GpioVirtPin::PinState newValue = GpioVirtPin::PinState::Unset; + + if (p1 == GpioVirtPin::PinState::Unset) + newValue = p2; // Not yet fully initialized + else if (p2 == GpioVirtPin::PinState::Unset) + newValue = p1; // Not yet fully initialized + + // If we've already found our value just use it, otherwise need to do the operation + if (newValue == GpioVirtPin::PinState::Unset) { + switch (operation) { + case And: + newValue = (GpioVirtPin::PinState)(p1 && p2); + break; + case Or: + // LOG_DEBUG("Doing GPIO OR\n"); + newValue = (GpioVirtPin::PinState)(p1 || p2); + break; + case Xor: + newValue = (GpioVirtPin::PinState)(p1 != p2); + break; + default: + assert(false); + } + } + set(newValue); +} + +GpioSplitter::GpioSplitter(GpioPin *outPin1, GpioPin *outPin2) : outPin1(outPin1), outPin2(outPin2) {} \ No newline at end of file diff --git a/src/GpioLogic.h b/src/GpioLogic.h new file mode 100644 index 000000000..947d49625 --- /dev/null +++ b/src/GpioLogic.h @@ -0,0 +1,160 @@ +#pragma once + +#include "configuration.h" + +/**This is a set of classes to mediate access to GPIOs in a structured way. Most usage of GPIOs do not + require these classes! But if your hardware has a GPIO that is 'shared' between multiple devices (i.e. a shared power enable) + then using these classes might be able to let you cleanly turn on that enable when either dependent device is needed. + + Note: these classes are intended to be 99% inline for the common case so should have minimal impact on flash or RAM + requirements. +*/ + +/** + * A logical GPIO pin (not necessary raw hardware). + */ +class GpioPin +{ + public: + virtual void set(bool value) = 0; +}; + +/** + * A physical GPIO hw pin. + */ +class GpioHwPin : public GpioPin +{ + uint32_t num; + + public: + explicit GpioHwPin(uint32_t num) : num(num) {} + + void set(bool value); +}; + +class GpioTransformer; +class GpioNotTransformer; +class GpioBinaryTransformer; + +/** + * A virtual GPIO pin. + */ +class GpioVirtPin : public GpioPin +{ + friend class GpioBinaryTransformer; + friend class GpioUnaryTransformer; + + public: + enum PinState { On = true, Off = false, Unset = 2 }; + + void set(bool value); + PinState get() const { return value; } + + private: + PinState value = PinState::Unset; + GpioTransformer *dependentPin = NULL; +}; + +#include + +/** + * A 'smart' trigger that can depend in a fake GPIO and if that GPIO changes, drive some other downstream GPIO to change. + * notably: the set method is not public (because it always is calculated by a subclass) + */ +class GpioTransformer +{ + public: + /** + * Update the output pin based on the current state of the input pin. + */ + virtual void update() = 0; + + protected: + GpioTransformer(GpioPin *outPin); + + void set(bool value); + + private: + GpioPin *outPin; +}; + +/** + * A transformer that just drives a hw pin based on a virtual pin. + */ +class GpioUnaryTransformer : public GpioTransformer +{ + public: + GpioUnaryTransformer(GpioVirtPin *inPin, GpioPin *outPin); + + protected: + friend class GpioVirtPin; + + /** + * Update the output pin based on the current state of the input pin. + */ + virtual void update(); + + GpioVirtPin *inPin; +}; + +/** + * A transformer that performs a unary NOT operation from an input. + */ +class GpioNotTransformer : public GpioUnaryTransformer +{ + public: + GpioNotTransformer(GpioVirtPin *inPin, GpioPin *outPin) : GpioUnaryTransformer(inPin, outPin) {} + + protected: + friend class GpioVirtPin; + + /** + * Update the output pin based on the current state of the input pin. + */ + void update(); +}; + +/** + * A transformer that combines multiple virtual pins to drive an output pin + */ +class GpioBinaryTransformer : public GpioTransformer +{ + + public: + enum Operation { And, Or, Xor }; + + GpioBinaryTransformer(GpioVirtPin *inPin1, GpioVirtPin *inPin2, GpioPin *outPin, Operation operation); + + protected: + friend class GpioVirtPin; + + /** + * Update the output pin based on the current state of the input pins. + */ + void update(); + + private: + GpioVirtPin *inPin1; + GpioVirtPin *inPin2; + Operation operation; +}; + +/** + * Sometimes a single output GPIO single needs to drive multiple physical GPIOs. This class provides that. + */ +class GpioSplitter : public GpioPin +{ + + public: + GpioSplitter(GpioPin *outPin1, GpioPin *outPin2); + + void set(bool value) + { + outPin1->set(value); + outPin2->set(value); + } + + private: + GpioPin *outPin1; + GpioPin *outPin2; +}; \ No newline at end of file diff --git a/src/Led.cpp b/src/Led.cpp new file mode 100644 index 000000000..6406cd2f7 --- /dev/null +++ b/src/Led.cpp @@ -0,0 +1,66 @@ +#include "Led.h" +#include "PowerMon.h" +#include "main.h" +#include "power.h" + +GpioVirtPin ledForceOn, ledBlink; + +#if defined(LED_PIN) +// Most boards have a GPIO for LED control +static GpioHwPin ledRawHwPin(LED_PIN); +#else +static GpioVirtPin ledRawHwPin; // Dummy pin for no hardware +#endif + +#if LED_STATE_ON == 0 +static GpioVirtPin ledHwPin; +static GpioNotTransformer ledInverter(&ledHwPin, &ledRawHwPin); +#else +static GpioPin &ledHwPin = ledRawHwPin; +#endif + +#if defined(HAS_PMU) +/** + * A GPIO controlled by the PMU + */ +class GpioPmuPin : public GpioPin +{ + public: + void set(bool value) + { + if (pmu_found && PMU) { + // blink the axp led + PMU->setChargingLedMode(value ? XPOWERS_CHG_LED_ON : XPOWERS_CHG_LED_OFF); + } + } +} ledPmuHwPin; + +// In some cases we need to drive a PMU LED and a normal LED +static GpioSplitter ledFinalPin(&ledHwPin, &ledPmuHwPin); +#else +static GpioPin &ledFinalPin = ledHwPin; +#endif + +#ifdef USE_POWERMON +/** + * We monitor changes to the LED drive output because we use that as a sanity test in our power monitor stuff. + */ +class MonitoredLedPin : public GpioPin +{ + public: + void set(bool value) + { + if (powerMon) { + if (value) + powerMon->setState(meshtastic_PowerMon_State_LED_On); + else + powerMon->clearState(meshtastic_PowerMon_State_LED_On); + } + ledFinalPin.set(value); + } +} monitoredLedPin; +#else +static GpioPin &monitoredLedPin = ledFinalPin; +#endif + +static GpioBinaryTransformer ledForcer(&ledForceOn, &ledBlink, &monitoredLedPin, GpioBinaryTransformer::Or); \ No newline at end of file diff --git a/src/Led.h b/src/Led.h new file mode 100644 index 000000000..68833e041 --- /dev/null +++ b/src/Led.h @@ -0,0 +1,7 @@ +#include "GpioLogic.h" +#include "configuration.h" + +/** + * ledForceOn and ledForceOff both override the normal ledBlinker behavior (which is controlled by main) + */ +extern GpioVirtPin ledForceOn, ledBlink; \ No newline at end of file diff --git a/src/OSTimer.cpp b/src/OSTimer.cpp deleted file mode 100644 index f6739d75e..000000000 --- a/src/OSTimer.cpp +++ /dev/null @@ -1,60 +0,0 @@ -#include "OSTimer.h" -#include "configuration.h" - -/** - * Schedule a callback to run. The callback must _not_ block, though it is called from regular thread level (not ISR) - * - * NOTE! xTimerPend... seems to ignore the time passed in on ESP32 and on NRF52 - * The reason this didn't work is because xTimerPednFunctCall really isn't a timer function at all - it just means run the -callback - * from the timer thread the next time you have spare cycles. - * - * @return true if successful, false if the timer fifo is too full. - -bool scheduleOSCallback(PendableFunction callback, void *param1, uint32_t param2, uint32_t delayMsec) -{ - return xTimerPendFunctionCall(callback, param1, param2, pdMS_TO_TICKS(delayMsec)); -} */ - -#ifdef ARCH_ESP32 - -// Super skanky quick hack to use hardware timers of the ESP32 -static hw_timer_t *timer; -static PendableFunction tCallback; -static void *tParam1; -static uint32_t tParam2; - -static void IRAM_ATTR onTimer() -{ - (*tCallback)(tParam1, tParam2); -} - -/** - * Schedules a hardware callback function to be executed after a specified delay. - * - * @param callback The function to be executed. - * @param param1 The first parameter to be passed to the function. - * @param param2 The second parameter to be passed to the function. - * @param delayMsec The delay time in milliseconds before the function is executed. - * - * @return True if the function was successfully scheduled, false otherwise. - */ -bool scheduleHWCallback(PendableFunction callback, void *param1, uint32_t param2, uint32_t delayMsec) -{ - if (!timer) { - timer = timerBegin(0, 80, true); // one usec per tick (main clock is 80MhZ on ESP32) - assert(timer); - timerAttachInterrupt(timer, &onTimer, true); - } - - tCallback = callback; - tParam1 = param1; - tParam2 = param2; - - timerAlarmWrite(timer, delayMsec * 1000UL, false); // Do not reload, we want it to be a single shot timer - timerRestart(timer); - timerAlarmEnable(timer); - return true; -} - -#endif \ No newline at end of file diff --git a/src/OSTimer.h b/src/OSTimer.h deleted file mode 100644 index 37415f3a6..000000000 --- a/src/OSTimer.h +++ /dev/null @@ -1,8 +0,0 @@ -#pragma once - -#include - -typedef void (*PendableFunction)(void *pvParameter1, uint32_t ulParameter2); - -/// Uses a hardware timer, but calls the handler in _interrupt_ context -bool scheduleHWCallback(PendableFunction callback, void *param1, uint32_t param2, uint32_t delayMsec); \ No newline at end of file diff --git a/src/Power.cpp b/src/Power.cpp index 8e44ddb98..2fe28633a 100644 --- a/src/Power.cpp +++ b/src/Power.cpp @@ -13,6 +13,7 @@ #include "power.h" #include "NodeDB.h" #include "PowerFSM.h" +#include "Throttle.h" #include "buzz/buzz.h" #include "configuration.h" #include "main.h" @@ -24,12 +25,15 @@ #include "nrfx_power.h" #endif -#ifdef DEBUG_HEAP_MQTT +#if defined(DEBUG_HEAP_MQTT) && !MESHTASTIC_EXCLUDE_MQTT #include "mqtt/MQTT.h" #include "target_specific.h" +#if HAS_WIFI #include #endif +#endif + #ifndef DELAY_FOREVER #define DELAY_FOREVER portMAX_DELAY #endif @@ -48,22 +52,45 @@ RTC_NOINIT_ATTR uint64_t RTC_reg_b; esp_adc_cal_characteristics_t *adc_characs = (esp_adc_cal_characteristics_t *)calloc(1, sizeof(esp_adc_cal_characteristics_t)); #ifndef ADC_ATTENUATION -static const adc_atten_t atten = ADC_ATTEN_DB_11; +static const adc_atten_t atten = ADC_ATTEN_DB_12; #else static const adc_atten_t atten = ADC_ATTENUATION; #endif #endif // BATTERY_PIN && ARCH_ESP32 -#if HAS_TELEMETRY && !defined(ARCH_PORTDUINO) +#ifdef EXT_CHRG_DETECT +#ifndef EXT_CHRG_DETECT_MODE +static const uint8_t ext_chrg_detect_mode = INPUT; +#else +static const uint8_t ext_chrg_detect_mode = EXT_CHRG_DETECT_MODE; +#endif +#ifndef EXT_CHRG_DETECT_VALUE +static const uint8_t ext_chrg_detect_value = HIGH; +#else +static const uint8_t ext_chrg_detect_value = EXT_CHRG_DETECT_VALUE; +#endif +#endif + +#if HAS_TELEMETRY && !MESHTASTIC_EXCLUDE_ENVIRONMENTAL_SENSOR && !defined(ARCH_PORTDUINO) INA260Sensor ina260Sensor; INA219Sensor ina219Sensor; INA3221Sensor ina3221Sensor; #endif +#if !MESHTASTIC_EXCLUDE_I2C && !defined(ARCH_PORTDUINO) && !defined(ARCH_STM32WL) +#include "modules/Telemetry/Sensor/MAX17048Sensor.h" +#include +extern std::pair nodeTelemetrySensorsMap[_meshtastic_TelemetrySensorType_MAX + 1]; +#if HAS_TELEMETRY && (!MESHTASTIC_EXCLUDE_ENVIRONMENTAL_SENSOR || !MESHTASTIC_EXCLUDE_POWER_TELEMETRY) +MAX17048Sensor max17048Sensor; +#endif +#endif + +#if HAS_RAKPROT && !defined(ARCH_PORTDUINO) +RAK9154Sensor rak9154Sensor; +#endif + #ifdef HAS_PMU -#include "XPowersAXP192.tpp" -#include "XPowersAXP2101.tpp" -#include "XPowersLibInterface.hpp" XPowersLibInterface *PMU = NULL; #else @@ -120,16 +147,51 @@ using namespace meshtastic; */ static HasBatteryLevel *batteryLevel; // Default to NULL for no battery level sensor +#ifdef BATTERY_PIN + +static void adcEnable() +{ +#ifdef ADC_CTRL // enable adc voltage divider when we need to read +#ifdef ADC_USE_PULLUP + pinMode(ADC_CTRL, INPUT_PULLUP); +#else + pinMode(ADC_CTRL, OUTPUT); + digitalWrite(ADC_CTRL, ADC_CTRL_ENABLED); +#endif + delay(10); +#endif +} + +static void adcDisable() +{ +#ifdef ADC_CTRL // disable adc voltage divider when we need to read +#ifdef ADC_USE_PULLUP + pinMode(ADC_CTRL, INPUT_PULLDOWN); +#else + digitalWrite(ADC_CTRL, !ADC_CTRL_ENABLED); +#endif +#endif +} + +#endif + /** * A simple battery level sensor that assumes the battery voltage is attached via a voltage-divider to an analog input */ class AnalogBatteryLevel : public HasBatteryLevel { + public: /** * Battery state of charge, from 0 to 100 or -1 for unknown */ virtual int getBatteryPercent() override { +#if defined(HAS_RAKPROT) && !defined(ARCH_PORTDUINO) && !defined(HAS_PMU) + if (hasRAK()) { + return rak9154Sensor.getBusBatteryPercent(); + } +#endif + float v = getBattVoltage(); if (v < noBatVolt) @@ -169,7 +231,14 @@ class AnalogBatteryLevel : public HasBatteryLevel virtual uint16_t getBattVoltage() override { -#if defined(HAS_TELEMETRY) && !defined(ARCH_PORTDUINO) && !defined(HAS_PMU) +#if defined(HAS_RAKPROT) && !defined(ARCH_PORTDUINO) && !defined(HAS_PMU) + if (hasRAK()) { + return getRAKVoltage(); + } +#endif + +#if HAS_TELEMETRY && !defined(ARCH_PORTDUINO) && !defined(ARCH_STM32WL) && !defined(HAS_PMU) && \ + !MESHTASTIC_EXCLUDE_ENVIRONMENTAL_SENSOR if (hasINA()) { LOG_DEBUG("Using INA on I2C addr 0x%x for device battery voltage\n", config.power.device_battery_ina_address); return getINAVoltage(); @@ -191,12 +260,13 @@ class AnalogBatteryLevel : public HasBatteryLevel config.power.adc_multiplier_override > 0 ? config.power.adc_multiplier_override : ADC_MULTIPLIER; // Do not call analogRead() often. const uint32_t min_read_interval = 5000; - if (millis() - last_read_time_ms > min_read_interval) { + if (!Throttle::isWithinTimespanMs(last_read_time_ms, min_read_interval)) { last_read_time_ms = millis(); uint32_t raw = 0; float scaled = 0; + adcEnable(); #ifdef ARCH_ESP32 // ADC block for espressif platforms raw = espAdcRead(); scaled = esp_adc_cal_raw_to_voltage(raw, adc_characs); @@ -208,7 +278,18 @@ class AnalogBatteryLevel : public HasBatteryLevel raw = raw / BATTERY_SENSE_SAMPLES; scaled = operativeAdcMultiplier * ((1000 * AREF_VOLTAGE) / pow(2, BATTERY_SENSE_RESOLUTION_BITS)) * raw; #endif - last_read_value += (scaled - last_read_value) * 0.5; // Virtual LPF + adcDisable(); + + if (!initial_read_done) { + // Flush the smoothing filter with an ADC reading, if the reading is plausibly correct + if (scaled > last_read_value) + last_read_value = scaled; + initial_read_done = true; + } else { + // Already initialized - filter this reading + last_read_value += (scaled - last_read_value) * 0.5; // Virtual LPF + } + // LOG_DEBUG("battery gpio %d raw val=%u scaled=%u filtered=%u\n", BATTERY_PIN, raw, (uint32_t)(scaled), (uint32_t) // (last_read_value)); } @@ -228,11 +309,6 @@ class AnalogBatteryLevel : public HasBatteryLevel uint8_t raw_c = 0; // raw reading counter #ifndef BAT_MEASURE_ADC_UNIT // ADC1 -#ifdef ADC_CTRL // enable adc voltage divider when we need to read - pinMode(ADC_CTRL, OUTPUT); - digitalWrite(ADC_CTRL, ADC_CTRL_ENABLED); - delay(10); -#endif for (int i = 0; i < BATTERY_SENSE_SAMPLES; i++) { int val_ = adc1_get_raw(adc_channel); if (val_ >= 0) { // save only valid readings @@ -241,18 +317,7 @@ class AnalogBatteryLevel : public HasBatteryLevel } // delayMicroseconds(100); } -#ifdef ADC_CTRL // disable adc voltage divider when we need to read - digitalWrite(ADC_CTRL, !ADC_CTRL_ENABLED); -#endif -#else // ADC2 -#ifdef ADC_CTRL -#if defined(HELTEC_WIRELESS_PAPER) || defined(HELTEC_WIRELESS_PAPER_V1_0) - pinMode(ADC_CTRL, OUTPUT); - digitalWrite(ADC_CTRL, LOW); // ACTIVE LOW - delay(10); -#endif -#endif // End ADC_CTRL - +#else // ADC2 #ifdef CONFIG_IDF_TARGET_ESP32S3 // ESP32S3 // ADC2 wifi bug workaround not required, breaks compile // On ESP32S3, ADC2 can take turns with Wifi (?) @@ -287,12 +352,6 @@ class AnalogBatteryLevel : public HasBatteryLevel } #endif // BAT_MEASURE_ADC_UNIT -#ifdef ADC_CTRL -#if defined(HELTEC_WIRELESS_PAPER) || defined(HELTEC_WIRELESS_PAPER_V1_0) - digitalWrite(ADC_CTRL, HIGH); -#endif -#endif // End ADC_CTRL - #endif // End BAT_MEASURE_ADC_UNIT return (raw / (raw_c < 1 ? 1 : raw_c)); } @@ -310,19 +369,38 @@ class AnalogBatteryLevel : public HasBatteryLevel virtual bool isVbusIn() override { #ifdef EXT_PWR_DETECT +#ifdef HELTEC_CAPSULE_SENSOR_V3 + // if external powered that pin will be pulled down + if (digitalRead(EXT_PWR_DETECT) == LOW) { + return true; + } + // if it's not LOW - check the battery +#else // if external powered that pin will be pulled up if (digitalRead(EXT_PWR_DETECT) == HIGH) { return true; } // if it's not HIGH - check the battery #endif - +#endif return getBattVoltage() > chargingVolt; } /// Assume charging if we have a battery and external power is connected. /// we can't be smart enough to say 'full'? - virtual bool isCharging() override { return isBatteryConnect() && isVbusIn(); } + virtual bool isCharging() override + { +#if defined(HAS_RAKPROT) && !defined(ARCH_PORTDUINO) && !defined(HAS_PMU) + if (hasRAK()) { + return (rak9154Sensor.isCharging()) ? OptTrue : OptFalse; + } +#endif +#ifdef EXT_CHRG_DETECT + return digitalRead(EXT_CHRG_DETECT) == ext_chrg_detect_value; +#else + return isBatteryConnect() && isVbusIn(); +#endif + } private: /// If we see a battery voltage higher than physics allows - assume charger is pumping @@ -335,10 +413,24 @@ class AnalogBatteryLevel : public HasBatteryLevel const float noBatVolt = (OCV[NUM_OCV_POINTS - 1] - 500) * NUM_CELLS; // Start value from minimum voltage for the filter to not start from 0 // that could trigger some events. + // This value is over-written by the first ADC reading, it the voltage seems reasonable. + bool initial_read_done = false; float last_read_value = (OCV[NUM_OCV_POINTS - 1] * NUM_CELLS); uint32_t last_read_time_ms = 0; -#if defined(HAS_TELEMETRY) && !defined(ARCH_PORTDUINO) +#if defined(HAS_RAKPROT) + + uint16_t getRAKVoltage() { return rak9154Sensor.getBusVoltageMv(); } + + bool hasRAK() + { + if (!rak9154Sensor.isInitialized()) + return rak9154Sensor.runOnce() > 0; + return rak9154Sensor.isRunning(); + } +#endif + +#if HAS_TELEMETRY && !MESHTASTIC_EXCLUDE_ENVIRONMENTAL_SENSOR && !defined(ARCH_PORTDUINO) && !defined(ARCH_STM32WL) uint16_t getINAVoltage() { if (nodeTelemetrySensorsMap[meshtastic_TelemetrySensorType_INA219].first == config.power.device_battery_ina_address) { @@ -367,13 +459,18 @@ class AnalogBatteryLevel : public HasBatteryLevel if (!ina260Sensor.isInitialized()) return ina260Sensor.runOnce() > 0; return ina260Sensor.isRunning(); + } else if (nodeTelemetrySensorsMap[meshtastic_TelemetrySensorType_INA3221].first == + config.power.device_battery_ina_address) { + if (!ina3221Sensor.isInitialized()) + return ina3221Sensor.runOnce() > 0; + return ina3221Sensor.isRunning(); } return false; } #endif }; -AnalogBatteryLevel analogLevel; +static AnalogBatteryLevel analogLevel; Power::Power() : OSThread("Power") { @@ -387,8 +484,15 @@ Power::Power() : OSThread("Power") bool Power::analogInit() { #ifdef EXT_PWR_DETECT +#ifdef HELTEC_CAPSULE_SENSOR_V3 + pinMode(EXT_PWR_DETECT, INPUT_PULLUP); +#else pinMode(EXT_PWR_DETECT, INPUT); #endif +#endif +#ifdef EXT_CHRG_DETECT + pinMode(EXT_CHRG_DETECT, ext_chrg_detect_mode); +#endif #ifdef BATTERY_PIN LOG_DEBUG("Using analog input %d for battery level\n", BATTERY_PIN); @@ -463,7 +567,16 @@ bool Power::analogInit() */ bool Power::setup() { - bool found = axpChipInit() || analogInit(); + // initialise one power sensor (only) + bool found = axpChipInit(); + if (!found) + found = lipoInit(); + if (!found) + found = analogInit(); + +#ifdef NRF_APM + found = true; +#endif enabled = found; low_voltage_counter = 0; @@ -473,19 +586,9 @@ bool Power::setup() void Power::shutdown() { - screen->setOn(false); -#if defined(USE_EINK) && defined(PIN_EINK_EN) - digitalWrite(PIN_EINK_EN, LOW); // power off backlight first -#endif - LOG_INFO("Shutting down\n"); -#ifdef HAS_PMU - if (pmu_found == true) { - PMU->setChargingLedMode(XPOWERS_CHG_LED_OFF); - PMU->shutdown(); - } -#elif defined(ARCH_NRF52) || defined(ARCH_ESP32) +#if defined(ARCH_NRF52) || defined(ARCH_ESP32) || defined(ARCH_RP2040) #ifdef PIN_LED1 ledOff(PIN_LED1); #endif @@ -504,10 +607,16 @@ void Power::shutdown() // TODO(girts): move this and other axp stuff to power.h/power.cpp. void Power::readPowerStatus() { + int32_t batteryVoltageMv = -1; // Assume unknown + int8_t batteryChargePercent = -1; + OptionalBool usbPowered = OptUnknown; + OptionalBool hasBattery = OptUnknown; // These must be static because NRF_APM code doesn't run every time + OptionalBool isCharging = OptUnknown; + if (batteryLevel) { - bool hasBattery = batteryLevel->isBatteryConnect(); - uint32_t batteryVoltageMv = 0; - int8_t batteryChargePercent = 0; + hasBattery = batteryLevel->isBatteryConnect() ? OptTrue : OptFalse; + usbPowered = batteryLevel->isVbusIn() ? OptTrue : OptFalse; + isCharging = batteryLevel->isCharging() ? OptTrue : OptFalse; if (hasBattery) { batteryVoltageMv = batteryLevel->getBattVoltage(); // If the AXP192 returns a valid battery percentage, use it @@ -522,92 +631,90 @@ void Power::readPowerStatus() 0, 100); } } + } - OptionalBool NRF_USB = OptFalse; - +// FIXME: IMO we shouldn't be littering our code with all these ifdefs. Way better instead to make a Nrf52IsUsbPowered subclass +// (which shares a superclass with the BatteryLevel stuff) +// that just provides a few methods. But in the interest of fixing this bug I'm going to follow current +// practice. #ifdef NRF_APM // Section of code detects USB power on the RAK4631 and updates the power states. Takes 20 seconds or so to detect // changes. - nrfx_power_usb_state_t nrf_usb_state = nrfx_power_usbstatus_get(); + nrfx_power_usb_state_t nrf_usb_state = nrfx_power_usbstatus_get(); + // LOG_DEBUG("NRF Power %d\n", nrf_usb_state); + + // If changed to DISCONNECTED + if (nrf_usb_state == NRFX_POWER_USB_STATE_DISCONNECTED) + isCharging = usbPowered = OptFalse; + // If changed to CONNECTED / READY + else + isCharging = usbPowered = OptTrue; - if (nrf_usb_state == NRFX_POWER_USB_STATE_DISCONNECTED) { - powerFSM.trigger(EVENT_POWER_DISCONNECTED); - NRF_USB = OptFalse; - } else { - powerFSM.trigger(EVENT_POWER_CONNECTED); - NRF_USB = OptTrue; - } #endif - // Notify any status instances that are observing us - const PowerStatus powerStatus2 = PowerStatus( - hasBattery ? OptTrue : OptFalse, batteryLevel->isVbusIn() || NRF_USB == OptTrue ? OptTrue : OptFalse, - batteryLevel->isCharging() || NRF_USB == OptTrue ? OptTrue : OptFalse, batteryVoltageMv, batteryChargePercent); - LOG_DEBUG("Battery: usbPower=%d, isCharging=%d, batMv=%d, batPct=%d\n", powerStatus2.getHasUSB(), - powerStatus2.getIsCharging(), powerStatus2.getBatteryVoltageMv(), powerStatus2.getBatteryChargePercent()); - newStatus.notifyObservers(&powerStatus2); + + // Notify any status instances that are observing us + const PowerStatus powerStatus2 = PowerStatus(hasBattery, usbPowered, isCharging, batteryVoltageMv, batteryChargePercent); + LOG_DEBUG("Battery: usbPower=%d, isCharging=%d, batMv=%d, batPct=%d\n", powerStatus2.getHasUSB(), + powerStatus2.getIsCharging(), powerStatus2.getBatteryVoltageMv(), powerStatus2.getBatteryChargePercent()); + newStatus.notifyObservers(&powerStatus2); #ifdef DEBUG_HEAP - if (lastheap != memGet.getFreeHeap()) { - LOG_DEBUG("Threads running:"); - int running = 0; - for (int i = 0; i < MAX_THREADS; i++) { - auto thread = concurrency::mainController.get(i); - if ((thread != nullptr) && (thread->enabled)) { - LOG_DEBUG(" %s", thread->ThreadName.c_str()); - running++; - } + if (lastheap != memGet.getFreeHeap()) { + LOG_DEBUG("Threads running:"); + int running = 0; + for (int i = 0; i < MAX_THREADS; i++) { + auto thread = concurrency::mainController.get(i); + if ((thread != nullptr) && (thread->enabled)) { + LOG_DEBUG(" %s", thread->ThreadName.c_str()); + running++; } - LOG_DEBUG("\n"); - LOG_DEBUG("Heap status: %d/%d bytes free (%d), running %d/%d threads\n", memGet.getFreeHeap(), memGet.getHeapSize(), - memGet.getFreeHeap() - lastheap, running, concurrency::mainController.size(false)); - lastheap = memGet.getFreeHeap(); } + LOG_DEBUG("\n"); + LOG_DEBUG("Heap status: %d/%d bytes free (%d), running %d/%d threads\n", memGet.getFreeHeap(), memGet.getHeapSize(), + memGet.getFreeHeap() - lastheap, running, concurrency::mainController.size(false)); + lastheap = memGet.getFreeHeap(); + } #ifdef DEBUG_HEAP_MQTT - if (mqtt) { - // send MQTT-Packet with Heap-Size - uint8_t dmac[6]; - getMacAddr(dmac); // Get our hardware ID - char mac[18]; - sprintf(mac, "!%02x%02x%02x%02x", dmac[2], dmac[3], dmac[4], dmac[5]); + if (mqtt) { + // send MQTT-Packet with Heap-Size + uint8_t dmac[6]; + getMacAddr(dmac); // Get our hardware ID + char mac[18]; + sprintf(mac, "!%02x%02x%02x%02x", dmac[2], dmac[3], dmac[4], dmac[5]); - auto newHeap = memGet.getFreeHeap(); - std::string heapTopic = - (*moduleConfig.mqtt.root ? moduleConfig.mqtt.root : "msh") + std::string("/2/heap/") + std::string(mac); - std::string heapString = std::to_string(newHeap); - mqtt->pubSub.publish(heapTopic.c_str(), heapString.c_str(), false); - auto wifiRSSI = WiFi.RSSI(); - std::string wifiTopic = - (*moduleConfig.mqtt.root ? moduleConfig.mqtt.root : "msh") + std::string("/2/wifi/") + std::string(mac); - std::string wifiString = std::to_string(wifiRSSI); - mqtt->pubSub.publish(wifiTopic.c_str(), wifiString.c_str(), false); - } + auto newHeap = memGet.getFreeHeap(); + std::string heapTopic = + (*moduleConfig.mqtt.root ? moduleConfig.mqtt.root : "msh") + std::string("/2/heap/") + std::string(mac); + std::string heapString = std::to_string(newHeap); + mqtt->pubSub.publish(heapTopic.c_str(), heapString.c_str(), false); + auto wifiRSSI = WiFi.RSSI(); + std::string wifiTopic = + (*moduleConfig.mqtt.root ? moduleConfig.mqtt.root : "msh") + std::string("/2/wifi/") + std::string(mac); + std::string wifiString = std::to_string(wifiRSSI); + mqtt->pubSub.publish(wifiTopic.c_str(), wifiString.c_str(), false); + } #endif #endif - // If we have a battery at all and it is less than 0%, force deep sleep if we have more than 10 low readings in - // a row. NOTE: min LiIon/LiPo voltage is 2.0 to 2.5V, current OCV min is set to 3100 that is large enough. - // - if (powerStatus2.getHasBattery() && !powerStatus2.getHasUSB()) { - if (batteryLevel->getBattVoltage() < OCV[NUM_OCV_POINTS - 1]) { - low_voltage_counter++; - LOG_DEBUG("Low voltage counter: %d/10\n", low_voltage_counter); - if (low_voltage_counter > 10) { + // If we have a battery at all and it is less than 0%, force deep sleep if we have more than 10 low readings in + // a row. NOTE: min LiIon/LiPo voltage is 2.0 to 2.5V, current OCV min is set to 3100 that is large enough. + // + if (batteryLevel && powerStatus2.getHasBattery() && !powerStatus2.getHasUSB()) { + if (batteryLevel->getBattVoltage() < OCV[NUM_OCV_POINTS - 1]) { + low_voltage_counter++; + LOG_DEBUG("Low voltage counter: %d/10\n", low_voltage_counter); + if (low_voltage_counter > 10) { #ifdef ARCH_NRF52 - // We can't trigger deep sleep on NRF52, it's freezing the board - LOG_DEBUG("Low voltage detected, but not triggering deep sleep\n"); + // We can't trigger deep sleep on NRF52, it's freezing the board + LOG_DEBUG("Low voltage detected, but not triggering deep sleep\n"); #else - LOG_INFO("Low voltage detected, triggering deep sleep\n"); - powerFSM.trigger(EVENT_LOW_BATTERY); + LOG_INFO("Low voltage detected, triggering deep sleep\n"); + powerFSM.trigger(EVENT_LOW_BATTERY); #endif - } - } else { - low_voltage_counter = 0; } + } else { + low_voltage_counter = 0; } - } else { - // No power sensing on this board - tell everyone else we have no idea what is happening - const PowerStatus powerStatus3 = PowerStatus(OptUnknown, OptUnknown, OptUnknown, -1, -1); - newStatus.notifyObservers(&powerStatus3); } } @@ -864,7 +971,6 @@ bool Power::axpChipInit() PMU->enableVbusVoltageMeasure(); PMU->enableBattVoltageMeasure(); - LOG_DEBUG("=======================================================================\n"); if (PMU->isChannelAvailable(XPOWERS_DCDC1)) { LOG_DEBUG("DC1 : %s Voltage:%u mV \n", PMU->isPowerChannelEnable(XPOWERS_DCDC1) ? "+" : "-", PMU->getPowerChannelVoltage(XPOWERS_DCDC1)); @@ -913,7 +1019,6 @@ bool Power::axpChipInit() LOG_DEBUG("BLDO2: %s Voltage:%u mV \n", PMU->isPowerChannelEnable(XPOWERS_BLDO2) ? "+" : "-", PMU->getPowerChannelVoltage(XPOWERS_BLDO2)); } - LOG_DEBUG("=======================================================================\n"); // We can safely ignore this approach for most (or all) boards because MCU turned off // earlier than battery discharged to 2.6V. @@ -957,3 +1062,81 @@ bool Power::axpChipInit() return false; #endif } + +#if !MESHTASTIC_EXCLUDE_I2C && !defined(ARCH_PORTDUINO) && !defined(ARCH_STM32WL) + +/** + * Wrapper class for an I2C MAX17048 Lipo battery sensor. + */ +class LipoBatteryLevel : public HasBatteryLevel +{ + private: + MAX17048Singleton *max17048 = nullptr; + + public: + /** + * Init the I2C MAX17048 Lipo battery level sensor + */ + bool runOnce() + { + if (max17048 == nullptr) { + max17048 = MAX17048Singleton::GetInstance(); + } + + // try to start if the sensor has been detected + if (nodeTelemetrySensorsMap[meshtastic_TelemetrySensorType_MAX17048].first != 0) { + return max17048->runOnce(nodeTelemetrySensorsMap[meshtastic_TelemetrySensorType_MAX17048].second); + } + return false; + } + + /** + * Battery state of charge, from 0 to 100 or -1 for unknown + */ + virtual int getBatteryPercent() override { return max17048->getBusBatteryPercent(); } + + /** + * The raw voltage of the battery in millivolts, or NAN if unknown + */ + virtual uint16_t getBattVoltage() override { return max17048->getBusVoltageMv(); } + + /** + * return true if there is a battery installed in this unit + */ + virtual bool isBatteryConnect() override { return max17048->isBatteryConnected(); } + + /** + * return true if there is an external power source detected + */ + virtual bool isVbusIn() override { return max17048->isExternallyPowered(); } + + /** + * return true if the battery is currently charging + */ + virtual bool isCharging() override { return max17048->isBatteryCharging(); } +}; + +LipoBatteryLevel lipoLevel; + +/** + * Init the Lipo battery level sensor + */ +bool Power::lipoInit() +{ + bool result = lipoLevel.runOnce(); + LOG_DEBUG("Power::lipoInit lipo sensor is %s\n", result ? "ready" : "not ready yet"); + if (!result) + return false; + batteryLevel = &lipoLevel; + return true; +} + +#else +/** + * The Lipo battery level sensor is unavailable - default to AnalogBatteryLevel + */ +bool Power::lipoInit() +{ + return false; +} +#endif \ No newline at end of file diff --git a/src/PowerFSM.cpp b/src/PowerFSM.cpp index bac3899bb..8bf7d3218 100644 --- a/src/PowerFSM.cpp +++ b/src/PowerFSM.cpp @@ -8,19 +8,29 @@ * actions to be taken upon entering or exiting each state. */ #include "PowerFSM.h" +#include "Default.h" +#include "Led.h" #include "MeshService.h" #include "NodeDB.h" +#include "PowerMon.h" #include "configuration.h" #include "graphics/Screen.h" #include "main.h" #include "sleep.h" #include "target_specific.h" +#ifndef SLEEP_TIME +#define SLEEP_TIME 30 +#endif +#if EXCLUDE_POWER_FSM +FakeFsm powerFSM; +void PowerFSM_setup(){}; +#else /// Should we behave as if we have AC power now? static bool isPowered() { // Circumvent the battery sensing logic and assumes constant power if no battery pin or power mgmt IC -#if !defined(BATTERY_PIN) && !defined(HAS_AXP192) && !defined(HAS_AXP2101) +#if !defined(BATTERY_PIN) && !defined(HAS_AXP192) && !defined(HAS_AXP2101) && !defined(NRF_APM) return true; #endif @@ -45,7 +55,7 @@ static void sdsEnter() { LOG_DEBUG("Enter state: SDS\n"); // FIXME - make sure GPS and LORA radio are off first - because we want close to zero current draw - doDeepSleep(getConfiguredOrDefaultMs(config.power.sds_secs), false); + doDeepSleep(Default::getConfiguredOrDefaultMs(config.power.sds_secs), false); } extern Power *power; @@ -80,16 +90,18 @@ static void lsIdle() // If some other service would stall sleep, don't let sleep happen yet if (doPreflightSleep()) { // Briefly come out of sleep long enough to blink the led once every few seconds - uint32_t sleepTime = 30; + uint32_t sleepTime = SLEEP_TIME; - setLed(false); // Never leave led on while in light sleep + powerMon->setState(meshtastic_PowerMon_State_CPU_LightSleep); + ledBlink.set(false); // Never leave led on while in light sleep esp_sleep_source_t wakeCause2 = doLightSleep(sleepTime * 1000LL); + powerMon->clearState(meshtastic_PowerMon_State_CPU_LightSleep); switch (wakeCause2) { case ESP_SLEEP_WAKEUP_TIMER: // Normal case: timer expired, we should just go back to sleep ASAP - setLed(true); // briefly turn on led + ledBlink.set(true); // briefly turn on led wakeCause2 = doLightSleep(100); // leave led on for 1ms secsSlept += sleepTime; @@ -102,9 +114,7 @@ static void lsIdle() break; default: - // We woke for some other reason (button press, device interrupt) - // uint64_t status = esp_sleep_get_ext1_wakeup_status(); - LOG_INFO("wakeCause2 %d\n", wakeCause2); + // We woke for some other reason (button press, device IRQ interrupt) #ifdef BUTTON_PIN bool pressed = !digitalRead(config.device.button_gpio ? config.device.button_gpio : BUTTON_PIN); @@ -126,7 +136,7 @@ static void lsIdle() } } else { // Time to stop sleeping! - setLed(false); + ledBlink.set(false); LOG_INFO("Reached ls_secs, servicing loop()\n"); powerFSM.trigger(EVENT_WAKE_TIMER); } @@ -182,10 +192,12 @@ static void powerEnter() screen->setOn(true); setBluetoothEnable(true); // within enter() the function getState() returns the state we came from - if (strcmp(powerFSM.getState()->name, "BOOT") != 0 && strcmp(powerFSM.getState()->name, "POWER") != 0 && + + // Mothballed: print change of power-state to device screen + /* if (strcmp(powerFSM.getState()->name, "BOOT") != 0 && strcmp(powerFSM.getState()->name, "POWER") != 0 && strcmp(powerFSM.getState()->name, "DARK") != 0) { screen->print("Powered...\n"); - } + }*/ } } @@ -202,8 +214,10 @@ static void powerExit() { screen->setOn(true); setBluetoothEnable(true); - if (!isPowered()) - screen->print("Unpowered...\n"); + + // Mothballed: print change of power-state to device screen + /*if (!isPowered()) + screen->print("Unpowered...\n");*/ } static void onEnter() @@ -341,15 +355,18 @@ void PowerFSM_setup() powerFSM.add_transition(&stateDARK, &stateDARK, EVENT_CONTACT_FROM_PHONE, NULL, "Contact from phone"); - powerFSM.add_timed_transition(&stateON, &stateDARK, - getConfiguredOrDefaultMs(config.display.screen_on_secs, default_screen_on_secs), NULL, - "Screen-on timeout"); - powerFSM.add_timed_transition(&statePOWER, &stateDARK, - getConfiguredOrDefaultMs(config.display.screen_on_secs, default_screen_on_secs), NULL, - "Screen-on timeout"); - powerFSM.add_timed_transition(&stateDARK, &stateDARK, - getConfiguredOrDefaultMs(config.display.screen_on_secs, default_screen_on_secs), NULL, - "Screen-on timeout"); +#ifdef USE_EINK + // Allow E-Ink devices to suppress the screensaver, if screen timeout set to 0 + if (config.display.screen_on_secs > 0) +#endif + { + powerFSM.add_timed_transition(&stateON, &stateDARK, + Default::getConfiguredOrDefaultMs(config.display.screen_on_secs, default_screen_on_secs), + NULL, "Screen-on timeout"); + powerFSM.add_timed_transition(&statePOWER, &stateDARK, + Default::getConfiguredOrDefaultMs(config.display.screen_on_secs, default_screen_on_secs), + NULL, "Screen-on timeout"); + } // We never enter light-sleep or NB states on NRF52 (because the CPU uses so little power normally) #ifdef ARCH_ESP32 @@ -358,13 +375,28 @@ void PowerFSM_setup() // modules if ((isRouter || config.power.is_power_saving) && !isTrackerOrSensor) { powerFSM.add_timed_transition(&stateNB, &stateLS, - getConfiguredOrDefaultMs(config.power.min_wake_secs, default_min_wake_secs), NULL, + Default::getConfiguredOrDefaultMs(config.power.min_wake_secs, default_min_wake_secs), NULL, "Min wake timeout"); - powerFSM.add_timed_transition(&stateDARK, &stateLS, - getConfiguredOrDefaultMs(config.power.wait_bluetooth_secs, default_wait_bluetooth_secs), - NULL, "Bluetooth timeout"); + + // If ESP32 and using power-saving, timer mover from DARK to light-sleep + // Also serves purpose of the old DARK to DARK transition(?) See https://github.com/meshtastic/firmware/issues/3517 + powerFSM.add_timed_transition( + &stateDARK, &stateLS, + Default::getConfiguredOrDefaultMs(config.power.wait_bluetooth_secs, default_wait_bluetooth_secs), NULL, + "Bluetooth timeout"); + } else { + // If ESP32, but not using power-saving, check periodically if config has drifted out of stateDark + powerFSM.add_timed_transition(&stateDARK, &stateDARK, + Default::getConfiguredOrDefaultMs(config.display.screen_on_secs, default_screen_on_secs), + NULL, "Screen-on timeout"); } +#else + // If not ESP32, light-sleep not used. Check periodically if config has drifted out of stateDark + powerFSM.add_timed_transition(&stateDARK, &stateDARK, + Default::getConfiguredOrDefaultMs(config.display.screen_on_secs, default_screen_on_secs), NULL, + "Screen-on timeout"); #endif powerFSM.run_machine(); // run one iteration of the state machine, so we run our on enter tasks for the initial DARK state -} \ No newline at end of file +} +#endif \ No newline at end of file diff --git a/src/PowerFSM.h b/src/PowerFSM.h index 752a9f7dd..13dfdc4cc 100644 --- a/src/PowerFSM.h +++ b/src/PowerFSM.h @@ -1,6 +1,6 @@ #pragma once -#include +#include "configuration.h" // See sw-design.md for documentation @@ -22,7 +22,30 @@ #define EVENT_SHUTDOWN 16 // force a full shutdown now (not just sleep) #define EVENT_INPUT 17 // input broker wants something, we need to wake up and enable screen +#if EXCLUDE_POWER_FSM +class FakeFsm +{ + public: + void trigger(int event) + { + if (event == EVENT_SERIAL_CONNECTED) { + serialConnected = true; + } else if (event == EVENT_SERIAL_DISCONNECTED) { + serialConnected = false; + } + }; + bool getState() { return serialConnected; }; + + private: + bool serialConnected = false; +}; +extern FakeFsm powerFSM; +void PowerFSM_setup(); + +#else +#include extern Fsm powerFSM; extern State stateON, statePOWER, stateSERIAL, stateDARK; void PowerFSM_setup(); +#endif \ No newline at end of file diff --git a/src/PowerFSMThread.h b/src/PowerFSMThread.h index 584c955aa..c842f4515 100644 --- a/src/PowerFSMThread.h +++ b/src/PowerFSMThread.h @@ -1,3 +1,4 @@ +#include "Default.h" #include "NodeDB.h" #include "PowerFSM.h" #include "concurrency/OSThread.h" @@ -17,6 +18,7 @@ class PowerFSMThread : public OSThread protected: int32_t runOnce() override { +#if !EXCLUDE_POWER_FSM powerFSM.run_machine(); /// If we are in power state we force the CPU to wake every 10ms to check for serial characters (we don't yet wake @@ -28,12 +30,15 @@ class PowerFSMThread : public OSThread timeLastPowered = millis(); } else if (config.power.on_battery_shutdown_after_secs > 0 && config.power.on_battery_shutdown_after_secs != UINT32_MAX && millis() > (timeLastPowered + - getConfiguredOrDefaultMs( + Default::getConfiguredOrDefaultMs( config.power.on_battery_shutdown_after_secs))) { // shutdown after 30 minutes unpowered powerFSM.trigger(EVENT_SHUTDOWN); } return 100; +#else + return INT32_MAX; +#endif } }; diff --git a/src/PowerMon.cpp b/src/PowerMon.cpp new file mode 100644 index 000000000..16909262d --- /dev/null +++ b/src/PowerMon.cpp @@ -0,0 +1,47 @@ +#include "PowerMon.h" +#include "NodeDB.h" + +// Use the 'live' config flag to figure out if we should be showing this message +bool PowerMon::is_power_enabled(uint64_t m) +{ + // FIXME: VERY STRANGE BUG: if I or in "force_enabled || " the flashed image on a rak4631 is not accepted by the bootloader as + // valid!!! Possibly a linker/gcc/bootloader bug somewhere? + return ((m & config.power.powermon_enables) ? true : false); +} + +void PowerMon::setState(_meshtastic_PowerMon_State state, const char *reason) +{ +#ifdef USE_POWERMON + auto oldstates = states; + states |= state; + if (oldstates != states && is_power_enabled(state)) { + emitLog(reason); + } +#endif +} + +void PowerMon::clearState(_meshtastic_PowerMon_State state, const char *reason) +{ +#ifdef USE_POWERMON + auto oldstates = states; + states &= ~state; + if (oldstates != states && is_power_enabled(state)) { + emitLog(reason); + } +#endif +} + +void PowerMon::emitLog(const char *reason) +{ +#ifdef USE_POWERMON + // The nrf52 printf doesn't understand 64 bit ints, so if we ever reach that point this function will need to change. + LOG_INFO("S:PM:0x%08lx,%s\n", (uint32_t)states, reason); +#endif +} + +PowerMon *powerMon; + +void powerMonInit() +{ + powerMon = new PowerMon(); +} \ No newline at end of file diff --git a/src/PowerMon.h b/src/PowerMon.h new file mode 100644 index 000000000..a19a6d010 --- /dev/null +++ b/src/PowerMon.h @@ -0,0 +1,44 @@ +#pragma once +#include "configuration.h" + +#include "meshtastic/powermon.pb.h" + +#ifndef MESHTASTIC_EXCLUDE_POWERMON +#define USE_POWERMON // FIXME turn this only for certain builds +#endif + +/** + * The singleton class for monitoring power consumption of device + * subsystems/modes. + * + * For more information see the PowerMon docs. + */ +class PowerMon +{ + uint64_t states = 0UL; + + friend class PowerStressModule; + + /** + * If stress testing we always want all events logged + */ + bool force_enabled = false; + + public: + PowerMon() {} + + // Mark entry/exit of a power consuming state + void setState(_meshtastic_PowerMon_State state, const char *reason = ""); + void clearState(_meshtastic_PowerMon_State state, const char *reason = ""); + + private: + // Emit the coded log message + void emitLog(const char *reason); + + // Use the 'live' config flag to figure out if we should be showing this message + bool is_power_enabled(uint64_t m); +}; + +extern PowerMon *powerMon; + +void powerMonInit(); \ No newline at end of file diff --git a/src/PowerStatus.h b/src/PowerStatus.h index 56d19b758..592a03328 100644 --- a/src/PowerStatus.h +++ b/src/PowerStatus.h @@ -59,9 +59,18 @@ class PowerStatus : public Status int getBatteryVoltageMv() const { return batteryVoltageMv; } /** - * Note: 0% battery means 'unknown/this board doesn't have a battery installed' + * Note: for boards with battery pin or PMU, 0% battery means 'unknown/this board doesn't have a battery installed' */ +#if defined(HAS_PMU) || defined(BATTERY_PIN) uint8_t getBatteryChargePercent() const { return getHasBattery() ? batteryChargePercent : 0; } +#endif + + /** + * Note: for boards without battery pin and PMU, 101% battery means 'the board is using external power' + */ +#if !defined(HAS_PMU) && !defined(BATTERY_PIN) + uint8_t getBatteryChargePercent() const { return getHasBattery() ? batteryChargePercent : 101; } +#endif bool matches(const PowerStatus *newStatus) const { diff --git a/src/RF95Configuration.h b/src/RF95Configuration.h index 66b2dcf86..5c525814b 100644 --- a/src/RF95Configuration.h +++ b/src/RF95Configuration.h @@ -3,5 +3,4 @@ #define RF95_RESET LORA_RESET #define RF95_IRQ LORA_DIO0 // on SX1262 version this is a no connect DIO0 #define RF95_DIO1 LORA_DIO1 // Note: not really used for RF95, but used for pure SX127x -#define RF95_DIO2 LORA_DIO2 // Note: not really used for RF95 -#endif \ No newline at end of file +#endif diff --git a/src/RedirectablePrint.cpp b/src/RedirectablePrint.cpp index d3f39c377..6eb6f8319 100644 --- a/src/RedirectablePrint.cpp +++ b/src/RedirectablePrint.cpp @@ -3,6 +3,8 @@ #include "RTC.h" #include "concurrency/OSThread.h" #include "configuration.h" +#include "main.h" +#include "mesh/generated/meshtastic/mesh.pb.h" #include #include #include @@ -14,12 +16,7 @@ #include "platform/portduino/PortduinoGlue.h" #endif -/** - * A printer that doesn't go anywhere - */ -NoopPrint noopPrint; - -#if HAS_WIFI || HAS_ETHERNET +#if HAS_NETWORKING extern Syslog syslog; #endif void RedirectablePrint::rpInit() @@ -38,21 +35,32 @@ void RedirectablePrint::setDestination(Print *_dest) size_t RedirectablePrint::write(uint8_t c) { // Always send the characters to our segger JTAG debugger -#ifdef SEGGER_STDOUT_CH +#ifdef USE_SEGGER SEGGER_RTT_PutChar(SEGGER_STDOUT_CH, c); #endif - - if (!config.has_lora || config.device.serial_enabled) + // Account for legacy config transition + bool serialEnabled = config.has_security ? config.security.serial_enabled : config.device.serial_enabled; + if (!config.has_lora || serialEnabled) dest->write(c); return 1; // We always claim one was written, rather than trusting what the // serial port said (which could be zero) } -size_t RedirectablePrint::vprintf(const char *format, va_list arg) +size_t RedirectablePrint::vprintf(const char *logLevel, const char *format, va_list arg) { va_list copy; +#if ENABLE_JSON_LOGGING || ARCH_PORTDUINO + static char printBuf[512]; +#else static char printBuf[160]; +#endif + +#ifdef ARCH_PORTDUINO + bool color = !settingsMap[ascii_logs]; +#else + bool color = true; +#endif va_copy(copy, arg); size_t len = vsnprintf(printBuf, sizeof(printBuf), format, copy); @@ -65,25 +73,242 @@ size_t RedirectablePrint::vprintf(const char *format, va_list arg) len = sizeof(printBuf) - 1; printBuf[sizeof(printBuf) - 2] = '\n'; } - + for (size_t f = 0; f < len; f++) { + if (!std::isprint(static_cast(printBuf[f])) && printBuf[f] != '\n') + printBuf[f] = '#'; + } + if (color && logLevel != nullptr) { + if (strcmp(logLevel, MESHTASTIC_LOG_LEVEL_DEBUG) == 0) + Print::write("\u001b[34m", 6); + if (strcmp(logLevel, MESHTASTIC_LOG_LEVEL_INFO) == 0) + Print::write("\u001b[32m", 6); + if (strcmp(logLevel, MESHTASTIC_LOG_LEVEL_WARN) == 0) + Print::write("\u001b[33m", 6); + if (strcmp(logLevel, MESHTASTIC_LOG_LEVEL_ERROR) == 0) + Print::write("\u001b[31m", 6); + } len = Print::write(printBuf, len); + if (color && logLevel != nullptr) { + Print::write("\u001b[0m", 5); + } return len; } -size_t RedirectablePrint::log(const char *logLevel, const char *format, ...) +void RedirectablePrint::log_to_serial(const char *logLevel, const char *format, va_list arg) { + size_t r = 0; + + // Cope with 0 len format strings, but look for new line terminator + bool hasNewline = *format && format[strlen(format) - 1] == '\n'; #ifdef ARCH_PORTDUINO + bool color = !settingsMap[ascii_logs]; +#else + bool color = true; +#endif + + // If we are the first message on a report, include the header + if (!isContinuationMessage) { + if (color) { + if (strcmp(logLevel, MESHTASTIC_LOG_LEVEL_DEBUG) == 0) + Print::write("\u001b[34m", 6); + if (strcmp(logLevel, MESHTASTIC_LOG_LEVEL_INFO) == 0) + Print::write("\u001b[32m", 6); + if (strcmp(logLevel, MESHTASTIC_LOG_LEVEL_WARN) == 0) + Print::write("\u001b[33m", 6); + if (strcmp(logLevel, MESHTASTIC_LOG_LEVEL_ERROR) == 0) + Print::write("\u001b[31m", 6); + if (strcmp(logLevel, MESHTASTIC_LOG_LEVEL_TRACE) == 0) + Print::write("\u001b[35m", 6); + } + + uint32_t rtc_sec = getValidTime(RTCQuality::RTCQualityDevice, true); // display local time on logfile + if (rtc_sec > 0) { + long hms = rtc_sec % SEC_PER_DAY; + // hms += tz.tz_dsttime * SEC_PER_HOUR; + // hms -= tz.tz_minuteswest * SEC_PER_MIN; + // mod `hms` to ensure in positive range of [0...SEC_PER_DAY) + hms = (hms + SEC_PER_DAY) % SEC_PER_DAY; + + // Tear apart hms into h:m:s + int hour = hms / SEC_PER_HOUR; + int min = (hms % SEC_PER_HOUR) / SEC_PER_MIN; + int sec = (hms % SEC_PER_HOUR) % SEC_PER_MIN; // or hms % SEC_PER_MIN +#ifdef ARCH_PORTDUINO + ::printf("%s ", logLevel); + if (color) { + ::printf("\u001b[0m"); + } + ::printf("| %02d:%02d:%02d %u ", hour, min, sec, millis() / 1000); +#else + printf("%s ", logLevel); + if (color) { + printf("\u001b[0m"); + } + printf("| %02d:%02d:%02d %u ", hour, min, sec, millis() / 1000); +#endif + } else { +#ifdef ARCH_PORTDUINO + ::printf("%s ", logLevel); + if (color) { + ::printf("\u001b[0m"); + } + ::printf("| ??:??:?? %u ", millis() / 1000); +#else + printf("%s ", logLevel); + if (color) { + printf("\u001b[0m"); + } + printf("| ??:??:?? %u ", millis() / 1000); +#endif + } + auto thread = concurrency::OSThread::currentThread; + if (thread) { + print("["); + // printf("%p ", thread); + // assert(thread->ThreadName.length()); + print(thread->ThreadName); + print("] "); + } + } + r += vprintf(logLevel, format, arg); + + isContinuationMessage = !hasNewline; +} + +void RedirectablePrint::log_to_syslog(const char *logLevel, const char *format, va_list arg) +{ +#if HAS_NETWORKING && !defined(ARCH_PORTDUINO) + // if syslog is in use, collect the log messages and send them to syslog + if (syslog.isEnabled()) { + int ll = 0; + switch (logLevel[0]) { + case 'D': + ll = SYSLOG_DEBUG; + break; + case 'I': + ll = SYSLOG_INFO; + break; + case 'W': + ll = SYSLOG_WARN; + break; + case 'E': + ll = SYSLOG_ERR; + break; + case 'C': + ll = SYSLOG_CRIT; + break; + default: + ll = 0; + } + auto thread = concurrency::OSThread::currentThread; + if (thread) { + syslog.vlogf(ll, thread->ThreadName.c_str(), format, arg); + } else { + syslog.vlogf(ll, format, arg); + } + } +#endif +} + +void RedirectablePrint::log_to_ble(const char *logLevel, const char *format, va_list arg) +{ +#if !MESHTASTIC_EXCLUDE_BLUETOOTH + if (config.security.debug_log_api_enabled && !pauseBluetoothLogging) { + bool isBleConnected = false; +#ifdef ARCH_ESP32 + isBleConnected = nimbleBluetooth && nimbleBluetooth->isActive() && nimbleBluetooth->isConnected(); +#elif defined(ARCH_NRF52) + isBleConnected = nrf52Bluetooth != nullptr && nrf52Bluetooth->isConnected(); +#endif + if (isBleConnected) { + char *message; + size_t initialLen; + size_t len; + initialLen = strlen(format); + message = new char[initialLen + 1]; + len = vsnprintf(message, initialLen + 1, format, arg); + if (len > initialLen) { + delete[] message; + message = new char[len + 1]; + vsnprintf(message, len + 1, format, arg); + } + auto thread = concurrency::OSThread::currentThread; + meshtastic_LogRecord logRecord = meshtastic_LogRecord_init_zero; + logRecord.level = getLogLevel(logLevel); + strcpy(logRecord.message, message); + if (thread) + strcpy(logRecord.source, thread->ThreadName.c_str()); + logRecord.time = getValidTime(RTCQuality::RTCQualityDevice, true); + + uint8_t *buffer = new uint8_t[meshtastic_LogRecord_size]; + size_t size = pb_encode_to_bytes(buffer, meshtastic_LogRecord_size, meshtastic_LogRecord_fields, &logRecord); +#ifdef ARCH_ESP32 + nimbleBluetooth->sendLog(buffer, size); +#elif defined(ARCH_NRF52) + nrf52Bluetooth->sendLog(buffer, size); +#endif + delete[] message; + delete[] buffer; + } + } +#else + (void)logLevel; + (void)format; + (void)arg; +#endif +} + +meshtastic_LogRecord_Level RedirectablePrint::getLogLevel(const char *logLevel) +{ + meshtastic_LogRecord_Level ll = meshtastic_LogRecord_Level_UNSET; // default to unset + switch (logLevel[0]) { + case 'D': + ll = meshtastic_LogRecord_Level_DEBUG; + break; + case 'I': + ll = meshtastic_LogRecord_Level_INFO; + break; + case 'W': + ll = meshtastic_LogRecord_Level_WARNING; + break; + case 'E': + ll = meshtastic_LogRecord_Level_ERROR; + break; + case 'C': + ll = meshtastic_LogRecord_Level_CRITICAL; + break; + } + return ll; +} + +void RedirectablePrint::log(const char *logLevel, const char *format, ...) +{ +#if ARCH_PORTDUINO + // level trace is special, two possible ways to handle it. + if (strcmp(logLevel, MESHTASTIC_LOG_LEVEL_TRACE) == 0) { + if (settingsStrings[traceFilename] != "") { + va_list arg; + va_start(arg, format); + try { + traceFile << va_arg(arg, char *) << std::endl; + } catch (const std::ios_base::failure &e) { + } + va_end(arg); + } + if (settingsMap[logoutputlevel] < level_trace && strcmp(logLevel, MESHTASTIC_LOG_LEVEL_TRACE) == 0) + return; + } if (settingsMap[logoutputlevel] < level_debug && strcmp(logLevel, MESHTASTIC_LOG_LEVEL_DEBUG) == 0) - return 0; + return; else if (settingsMap[logoutputlevel] < level_info && strcmp(logLevel, MESHTASTIC_LOG_LEVEL_INFO) == 0) - return 0; + return; else if (settingsMap[logoutputlevel] < level_warn && strcmp(logLevel, MESHTASTIC_LOG_LEVEL_WARN) == 0) - return 0; + return; #endif if (moduleConfig.serial.override_console_serial_port && strcmp(logLevel, MESHTASTIC_LOG_LEVEL_DEBUG) == 0) { - return 0; + return; } - size_t r = 0; + #ifdef HAS_FREE_RTOS if (inDebugPrint != nullptr && xSemaphoreTake(inDebugPrint, portMAX_DELAY) == pdTRUE) { #else @@ -94,81 +319,11 @@ size_t RedirectablePrint::log(const char *logLevel, const char *format, ...) va_list arg; va_start(arg, format); - // Cope with 0 len format strings, but look for new line terminator - bool hasNewline = *format && format[strlen(format) - 1] == '\n'; - - // If we are the first message on a report, include the header - if (!isContinuationMessage) { - uint32_t rtc_sec = getValidTime(RTCQuality::RTCQualityDevice); - if (rtc_sec > 0) { - long hms = rtc_sec % SEC_PER_DAY; - // hms += tz.tz_dsttime * SEC_PER_HOUR; - // hms -= tz.tz_minuteswest * SEC_PER_MIN; - // mod `hms` to ensure in positive range of [0...SEC_PER_DAY) - hms = (hms + SEC_PER_DAY) % SEC_PER_DAY; - - // Tear apart hms into h:m:s - int hour = hms / SEC_PER_HOUR; - int min = (hms % SEC_PER_HOUR) / SEC_PER_MIN; - int sec = (hms % SEC_PER_HOUR) % SEC_PER_MIN; // or hms % SEC_PER_MIN -#ifdef ARCH_PORTDUINO - r += ::printf("%s | %02d:%02d:%02d %u ", logLevel, hour, min, sec, millis() / 1000); -#else - r += printf("%s | %02d:%02d:%02d %u ", logLevel, hour, min, sec, millis() / 1000); -#endif - } else -#ifdef ARCH_PORTDUINO - r += ::printf("%s | ??:??:?? %u ", logLevel, millis() / 1000); -#else - r += printf("%s | ??:??:?? %u ", logLevel, millis() / 1000); -#endif - - auto thread = concurrency::OSThread::currentThread; - if (thread) { - print("["); - // printf("%p ", thread); - // assert(thread->ThreadName.length()); - print(thread->ThreadName); - print("] "); - } - } - r += vprintf(format, arg); - -#if (HAS_WIFI || HAS_ETHERNET) && !defined(ARCH_PORTDUINO) - // if syslog is in use, collect the log messages and send them to syslog - if (syslog.isEnabled()) { - int ll = 0; - switch (logLevel[0]) { - case 'D': - ll = SYSLOG_DEBUG; - break; - case 'I': - ll = SYSLOG_INFO; - break; - case 'W': - ll = SYSLOG_WARN; - break; - case 'E': - ll = SYSLOG_ERR; - break; - case 'C': - ll = SYSLOG_CRIT; - break; - default: - ll = 0; - } - auto thread = concurrency::OSThread::currentThread; - if (thread) { - syslog.vlogf(ll, thread->ThreadName.c_str(), format, arg); - } else { - syslog.vlogf(ll, format, arg); - } - } -#endif + log_to_serial(logLevel, format, arg); + log_to_syslog(logLevel, format, arg); + log_to_ble(logLevel, format, arg); va_end(arg); - - isContinuationMessage = !hasNewline; #ifdef HAS_FREE_RTOS xSemaphoreGive(inDebugPrint); #else @@ -176,17 +331,17 @@ size_t RedirectablePrint::log(const char *logLevel, const char *format, ...) #endif } - return r; + return; } void RedirectablePrint::hexDump(const char *logLevel, unsigned char *buf, uint16_t len) { const char alphabet[17] = "0123456789abcdef"; - log(logLevel, " +------------------------------------------------+ +----------------+\n"); - log(logLevel, " |.0 .1 .2 .3 .4 .5 .6 .7 .8 .9 .a .b .c .d .e .f | | ASCII |\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) { if (i % 128 == 0) - log(logLevel, " +------------------------------------------------+ +----------------+\n"); + log(logLevel, " +------------------------------------------------+ +----------------+\n"); char s[] = "| | | |\n"; uint8_t ix = 1, iy = 52; for (uint8_t j = 0; j < 16; j++) { @@ -208,7 +363,7 @@ void RedirectablePrint::hexDump(const char *logLevel, unsigned char *buf, uint16 log(logLevel, "."); log(logLevel, s); } - log(logLevel, " +------------------------------------------------+ +----------------+\n"); + log(logLevel, " +------------------------------------------------+ +----------------+\n"); } std::string RedirectablePrint::mt_sprintf(const std::string fmt_str, ...) @@ -228,4 +383,4 @@ std::string RedirectablePrint::mt_sprintf(const std::string fmt_str, ...) break; } return std::string(formatted.get()); -} \ No newline at end of file +} diff --git a/src/RedirectablePrint.h b/src/RedirectablePrint.h index 31cc1b6ef..23ae3c44d 100644 --- a/src/RedirectablePrint.h +++ b/src/RedirectablePrint.h @@ -1,6 +1,7 @@ #pragma once #include "../freertosinc.h" +#include "mesh/generated/meshtastic/mesh.pb.h" #include #include #include @@ -41,23 +42,21 @@ class RedirectablePrint : public Print * log message. Otherwise we assume more prints will come before the log message ends. This * allows you to call logDebug a few times to build up a single log message line if you wish. */ - size_t log(const char *logLevel, const char *format, ...) __attribute__((format(printf, 3, 4))); + void log(const char *logLevel, const char *format, ...) __attribute__((format(printf, 3, 4))); /** like printf but va_list based */ - size_t vprintf(const char *format, va_list arg); + size_t vprintf(const char *logLevel, const char *format, va_list arg); void hexDump(const char *logLevel, unsigned char *buf, uint16_t len); std::string mt_sprintf(const std::string fmt_str, ...); -}; -class NoopPrint : public Print -{ - public: - virtual size_t write(uint8_t c) { return 1; } -}; + protected: + /// Subclasses can override if they need to change how we format over the serial port + virtual void log_to_serial(const char *logLevel, const char *format, va_list arg); -/** - * A printer that doesn't go anywhere - */ -extern NoopPrint noopPrint; \ No newline at end of file + private: + void log_to_syslog(const char *logLevel, const char *format, va_list arg); + void log_to_ble(const char *logLevel, const char *format, va_list arg); + meshtastic_LogRecord_Level getLogLevel(const char *logLevel); +}; \ No newline at end of file diff --git a/src/SafeFile.cpp b/src/SafeFile.cpp new file mode 100644 index 000000000..c17d422bd --- /dev/null +++ b/src/SafeFile.cpp @@ -0,0 +1,105 @@ +#include "SafeFile.h" + +#ifdef FSCom + +// Only way to work on both esp32 and nrf52 +static File openFile(const char *filename, bool fullAtomic) +{ + if (!fullAtomic) + FSCom.remove(filename); // Nuke the old file to make space (ignore if it !exists) + + String filenameTmp = filename; + filenameTmp += ".tmp"; + + // clear any previous LFS errors + lfs_assert_failed = false; + + return FSCom.open(filenameTmp.c_str(), FILE_O_WRITE); +} + +SafeFile::SafeFile(const char *_filename, bool fullAtomic) + : filename(_filename), f(openFile(_filename, fullAtomic)), fullAtomic(fullAtomic) +{ +} + +size_t SafeFile::write(uint8_t ch) +{ + if (!f) + return 0; + + hash ^= ch; + return f.write(ch); +} + +size_t SafeFile::write(const uint8_t *buffer, size_t size) +{ + if (!f) + return 0; + + for (size_t i = 0; i < size; i++) { + hash ^= buffer[i]; + } + return f.write((uint8_t const *)buffer, size); // This nasty cast is _IMPORTANT_ otherwise the correct adafruit method does + // not get used (they made a mistake in their typing) +} + +/** + * Atomically close the file (deleting any old versions) and readback the contents to confirm the hash matches + * + * @return false for failure + */ +bool SafeFile::close() +{ + if (!f) + return false; + + f.close(); + if (!testReadback()) + return false; + + // brief window of risk here ;-) + if (fullAtomic && FSCom.exists(filename.c_str()) && !FSCom.remove(filename.c_str())) { + LOG_ERROR("Can't remove old pref file\n"); + return false; + } + + String filenameTmp = filename; + filenameTmp += ".tmp"; + if (!renameFile(filenameTmp.c_str(), filename.c_str())) { + LOG_ERROR("Error: can't rename new pref file\n"); + return false; + } + + return true; +} + +/// Read our (closed) tempfile back in and compare the hash +bool SafeFile::testReadback() +{ + bool lfs_failed = lfs_assert_failed; + lfs_assert_failed = false; + + String filenameTmp = filename; + filenameTmp += ".tmp"; + auto f2 = FSCom.open(filenameTmp.c_str(), FILE_O_READ); + if (!f2) { + LOG_ERROR("Can't open tmp file for readback\n"); + return false; + } + + int c = 0; + uint8_t test_hash = 0; + while ((c = f2.read()) >= 0) { + test_hash ^= (uint8_t)c; + } + f2.close(); + + if (test_hash != hash) { + LOG_ERROR("Readback failed hash mismatch\n"); + return false; + } + + return !lfs_failed; +} + +#endif \ No newline at end of file diff --git a/src/SafeFile.h b/src/SafeFile.h new file mode 100644 index 000000000..61361d312 --- /dev/null +++ b/src/SafeFile.h @@ -0,0 +1,49 @@ +#pragma once + +#include "FSCommon.h" +#include "configuration.h" + +#ifdef FSCom + +/** + * This class provides 'safe'/paranoid file writing. + * + * Some of our filesystems (in particular the nrf52) may have bugs beneath our layer. Therefore we want to + * be very careful about how we write files. This class provides a restricted (Stream only) writing API for writing to files. + * + * Notably: + * - we keep a simple xor hash of all characters that were written. + * - We do not allow seeking (because we want to maintain our hash) + * - we provide an close() method which is similar to close but returns false if we were unable to successfully write the + * file. Also this method + * - atomically replaces any old version of the file on the disk with our new file (after first rereading the file from the disk + * to confirm the hash matches) + * - Some files are super huge so we can't do the full atomic rename/copy (because of filesystem size limits). If !fullAtomic + * then we still do the readback to verify file is valid so higher level code can handle failures. + */ +class SafeFile : public Print +{ + public: + explicit SafeFile(char const *filepath, bool fullAtomic = false); + + virtual size_t write(uint8_t); + virtual size_t write(const uint8_t *buffer, size_t size); + + /** + * Atomically close the file (deleting any old versions) and readback the contents to confirm the hash matches + * + * @return false for failure + */ + bool close(); + + private: + /// Read our (closed) tempfile back in and compare the hash + bool testReadback(); + + String filename; + File f; + bool fullAtomic; + uint8_t hash = 0; +}; + +#endif \ No newline at end of file diff --git a/src/SerialConsole.cpp b/src/SerialConsole.cpp index ed217c3ed..fe6ccdefe 100644 --- a/src/SerialConsole.cpp +++ b/src/SerialConsole.cpp @@ -1,9 +1,20 @@ #include "SerialConsole.h" +#include "Default.h" #include "NodeDB.h" #include "PowerFSM.h" +#include "Throttle.h" #include "configuration.h" +#include "time.h" +#ifdef RP2040_SLOW_CLOCK +#define Port Serial2 +#else +#ifdef USER_DEBUG_PORT // change by WayenWeng +#define Port USER_DEBUG_PORT +#else #define Port Serial +#endif +#endif // Defaulting to the formerly removed phone_timeout_secs value of 15 minutes #define SERIAL_CONNECTION_TIMEOUT (15 * 60) * 1000UL @@ -19,7 +30,7 @@ void consolePrintf(const char *format, ...) { va_list arg; va_start(arg, format); - console->vprintf(format, arg); + console->vprintf(nullptr, format, arg); va_end(arg); console->flush(); } @@ -29,20 +40,26 @@ SerialConsole::SerialConsole() : StreamAPI(&Port), RedirectablePrint(&Port), con assert(!console); console = this; canWrite = false; // We don't send packets to our port until it has talked to us first - // setDestination(&noopPrint); for testing, try turning off 'all' debug output and see what leaks +#ifdef RP2040_SLOW_CLOCK + Port.setTX(SERIAL2_TX); + Port.setRX(SERIAL2_RX); +#endif Port.begin(SERIAL_BAUD); -#if defined(ARCH_NRF52) || defined(CONFIG_IDF_TARGET_ESP32S2) || defined(CONFIG_IDF_TARGET_ESP32S3) || defined(ARCH_RP2040) +#if defined(ARCH_NRF52) || defined(CONFIG_IDF_TARGET_ESP32S2) || defined(CONFIG_IDF_TARGET_ESP32S3) || defined(ARCH_RP2040) || \ + defined(CONFIG_IDF_TARGET_ESP32C3) || defined(CONFIG_IDF_TARGET_ESP32C6) time_t timeout = millis(); while (!Port) { - if ((millis() - timeout) < 5000) { + if (Throttle::isWithinTimespanMs(timeout, FIVE_SECONDS_MS)) { delay(100); } else { break; } } #endif +#if !ARCH_PORTDUINO emitRebooted(); +#endif } int32_t SerialConsole::runOnce() @@ -58,25 +75,51 @@ void SerialConsole::flush() // For the serial port we can't really detect if any client is on the other side, so instead just look for recent messages bool SerialConsole::checkIsConnected() { - uint32_t now = millis(); - return (now - lastContactMsec) < SERIAL_CONNECTION_TIMEOUT; + return Throttle::isWithinTimespanMs(lastContactMsec, SERIAL_CONNECTION_TIMEOUT); } /** * we override this to notice when we've received a protobuf over the serial - * stream. Then we shunt off debug serial output. + * stream. Then we shut off debug serial output. */ bool SerialConsole::handleToRadio(const uint8_t *buf, size_t len) { // only talk to the API once the configuration has been loaded and we're sure the serial port is not disabled. - if (config.has_lora && config.device.serial_enabled) { - // Turn off debug serial printing once the API is activated, because other threads could print and corrupt packets - if (!config.device.debug_log_enabled) - setDestination(&noopPrint); + if (config.has_lora && config.security.serial_enabled) { + // Switch to protobufs for log messages + usingProtobufs = true; canWrite = true; return StreamAPI::handleToRadio(buf, len); } else { return false; } +} + +void SerialConsole::log_to_serial(const char *logLevel, const char *format, va_list arg) +{ + if (usingProtobufs && config.security.debug_log_api_enabled) { + meshtastic_LogRecord_Level ll = meshtastic_LogRecord_Level_UNSET; // default to unset + switch (logLevel[0]) { + case 'D': + ll = meshtastic_LogRecord_Level_DEBUG; + break; + case 'I': + ll = meshtastic_LogRecord_Level_INFO; + break; + case 'W': + ll = meshtastic_LogRecord_Level_WARNING; + break; + case 'E': + ll = meshtastic_LogRecord_Level_ERROR; + break; + case 'C': + ll = meshtastic_LogRecord_Level_CRITICAL; + break; + } + + auto thread = concurrency::OSThread::currentThread; + emitLogRecord(ll, thread ? thread->ThreadName.c_str() : "", format, arg); + } else + RedirectablePrint::log_to_serial(logLevel, format, arg); } \ No newline at end of file diff --git a/src/SerialConsole.h b/src/SerialConsole.h index f8891ba14..f1e636c9d 100644 --- a/src/SerialConsole.h +++ b/src/SerialConsole.h @@ -8,6 +8,11 @@ */ class SerialConsole : public StreamAPI, public RedirectablePrint, private concurrency::OSThread { + /** + * If true we are talking to a smart host and all messages (including log messages) must be framed as protobufs. + */ + bool usingProtobufs = false; + public: SerialConsole(); @@ -31,10 +36,13 @@ class SerialConsole : public StreamAPI, public RedirectablePrint, private concur protected: /// Check the current underlying physical link to see if the client is currently connected virtual bool checkIsConnected() override; + + /// Possibly switch to protobufs if we see a valid protobuf message + virtual void log_to_serial(const char *logLevel, const char *format, va_list arg); }; // A simple wrapper to allow non class aware code write to the console void consolePrintf(const char *format, ...); void consoleInit(); -extern SerialConsole *console; +extern SerialConsole *console; \ No newline at end of file diff --git a/src/StatusHandler.h b/src/StatusHandler.h deleted file mode 100644 index e69de29bb..000000000 diff --git a/src/airtime.cpp b/src/airtime.cpp index 2702ee2bf..fcda05468 100644 --- a/src/airtime.cpp +++ b/src/airtime.cpp @@ -13,17 +13,17 @@ void AirTime::logAirtime(reportTypes reportType, uint32_t airtime_ms) { if (reportType == TX_LOG) { - LOG_DEBUG("AirTime - Packet transmitted : %ums\n", airtime_ms); + LOG_DEBUG("Packet transmitted : %ums\n", airtime_ms); this->airtimes.periodTX[0] = this->airtimes.periodTX[0] + airtime_ms; air_period_tx[0] = air_period_tx[0] + airtime_ms; this->utilizationTX[this->getPeriodUtilHour()] = this->utilizationTX[this->getPeriodUtilHour()] + airtime_ms; } else if (reportType == RX_LOG) { - LOG_DEBUG("AirTime - Packet received : %ums\n", airtime_ms); + LOG_DEBUG("Packet received : %ums\n", airtime_ms); this->airtimes.periodRX[0] = this->airtimes.periodRX[0] + airtime_ms; air_period_rx[0] = air_period_rx[0] + airtime_ms; } else if (reportType == RX_ALL_LOG) { - LOG_DEBUG("AirTime - Packet received (noise?) : %ums\n", airtime_ms); + LOG_DEBUG("Packet received (noise?) : %ums\n", airtime_ms); this->airtimes.periodRX_ALL[0] = this->airtimes.periodRX_ALL[0] + airtime_ms; } diff --git a/src/commands.h b/src/commands.h index 03ede5982..f2b783010 100644 --- a/src/commands.h +++ b/src/commands.h @@ -8,13 +8,11 @@ enum class Cmd { SET_ON, SET_OFF, ON_PRESS, - START_BLUETOOTH_PIN_SCREEN, + START_ALERT_FRAME, + STOP_ALERT_FRAME, START_FIRMWARE_UPDATE_SCREEN, - STOP_BLUETOOTH_PIN_SCREEN, STOP_BOOT_SCREEN, PRINT, - START_SHUTDOWN_SCREEN, - START_REBOOT_SCREEN, SHOW_PREV_FRAME, SHOW_NEXT_FRAME }; \ No newline at end of file diff --git a/src/configuration.h b/src/configuration.h index d8b0dba5f..10a4e0a99 100644 --- a/src/configuration.h +++ b/src/configuration.h @@ -52,10 +52,6 @@ along with this program. If not, see . // Configuration // ----------------------------------------------------------------------------- -// If we are using the JTAG port for debugging, some pins must be left free for that (and things like GPS have to be disabled) -// we don't support jtag on the ttgo - access to gpio 12 is a PITA -#define REQUIRE_RADIO true // If true, we will fail to start if the radio is not found - /// Convert a preprocessor name into a quoted string #define xstr(s) ystr(s) #define ystr(s) #s @@ -73,6 +69,22 @@ along with this program. If not, see . #ifndef RTC_DATA_ATTR #define RTC_DATA_ATTR #endif +#ifndef EXT_RAM_BSS_ATTR +#define EXT_RAM_BSS_ATTR EXT_RAM_ATTR +#endif + +// ----------------------------------------------------------------------------- +// Regulatory overrides +// ----------------------------------------------------------------------------- + +// Override user saved region, for producing region-locked builds +// #define REGULATORY_LORA_REGIONCODE meshtastic_Config_LoRaConfig_RegionCode_SG_923 + +// Total system gain in dBm to subtract from Tx power to remain within regulatory ERP limit for non-licensed operators +// This value should be set in variant.h and is PA gain + antenna gain (if system ships with an antenna) +#ifndef REGULATORY_GAIN_LORA +#define REGULATORY_GAIN_LORA 0 +#endif // ----------------------------------------------------------------------------- // Feature toggles @@ -111,22 +123,41 @@ along with this program. If not, see . #define MCP9808_ADDR 0x18 #define INA_ADDR 0x40 #define INA_ADDR_ALTERNATE 0x41 +#define INA_ADDR_WAVESHARE_UPS 0x43 #define INA3221_ADDR 0x42 +#define MAX1704X_ADDR 0x36 #define QMC6310_ADDR 0x1C #define QMI8658_ADDR 0x6B -#define QMC5883L_ADDR 0x1E +#define QMC5883L_ADDR 0x0D +#define HMC5883L_ADDR 0x1E #define SHTC3_ADDR 0x70 #define LPS22HB_ADDR 0x5C #define LPS22HB_ADDR_ALT 0x5D -#define SHT31_ADDR 0x44 +#define SHT31_4x_ADDR 0x44 #define PMSA0031_ADDR 0x12 +#define AHT10_ADDR 0x38 +#define RCWL9620_ADDR 0x57 +#define VEML7700_ADDR 0x10 +#define TSL25911_ADDR 0x29 +#define OPT3001_ADDR 0x45 +#define OPT3001_ADDR_ALT 0x44 +#define MLX90632_ADDR 0x3A +#define DFROBOT_LARK_ADDR 0x42 +#define NAU7802_ADDR 0x2A +#define MAX30102_ADDR 0x57 +#define MLX90614_ADDR_DEF 0x5A // ----------------------------------------------------------------------------- // ACCELEROMETER // ----------------------------------------------------------------------------- #define MPU6050_ADDR 0x68 +#define STK8BXX_ADR 0x18 #define LIS3DH_ADR 0x18 #define BMA423_ADDR 0x19 +#define LSM6DS3_ADDR 0x6A +#define BMX160_ADDR 0x69 +#define ICM20948_ADDR 0x69 +#define ICM20948_ADDR_ALT 0x68 // ----------------------------------------------------------------------------- // LED @@ -136,43 +167,74 @@ along with this program. If not, see . // ----------------------------------------------------------------------------- // Security // ----------------------------------------------------------------------------- - #define ATECC608B_ADDR 0x35 +// ----------------------------------------------------------------------------- +// IO Expander +// ----------------------------------------------------------------------------- +#define TCA9535_ADDR 0x20 +#define TCA9555_ADDR 0x26 + // ----------------------------------------------------------------------------- // GPS // ----------------------------------------------------------------------------- -#ifndef GPS_BAUDRATE -#define GPS_BAUDRATE 9600 -#endif - #ifndef GPS_THREAD_INTERVAL #define GPS_THREAD_INTERVAL 200 #endif +// ----------------------------------------------------------------------------- +// Touchscreen +// ----------------------------------------------------------------------------- +#define FT6336U_ADDR 0x48 + +// ----------------------------------------------------------------------------- +// BIAS-T Generator +// ----------------------------------------------------------------------------- +#define TPS65233_ADDR 0x60 + // convert 24-bit color to 16-bit (56K) #define COLOR565(r, g, b) (((r & 0xF8) << 8) | ((g & 0xFC) << 3) | ((b & 0xF8) >> 3)) /* Step #1: offer chance for variant-specific defines */ #include "variant.h" -/* Step #2: follow with defines common to the architecture; - also enable HAS_ option not specifically disabled by variant.h */ -#include "architecture.h" - -/* Step #3: mop up with disabled values for HAS_ options not handled by the above two */ - -// ----------------------------------------------------------------------------- -// GPS -// ----------------------------------------------------------------------------- +#if defined(VEXT_ENABLE) && !defined(VEXT_ON_VALUE) +// Older variant.h files might not be defining this value, so stay with the old default +#define VEXT_ON_VALUE LOW +#endif #ifndef GPS_BAUDRATE #define GPS_BAUDRATE 9600 #endif -#ifndef GPS_THREAD_INTERVAL -#define GPS_THREAD_INTERVAL 100 + +/* Step #2: follow with defines common to the architecture; + also enable HAS_ option not specifically disabled by variant.h */ +#include "architecture.h" + +#ifndef DEFAULT_REBOOT_SECONDS +#define DEFAULT_REBOOT_SECONDS 7 #endif +#ifndef DEFAULT_SHUTDOWN_SECONDS +#define DEFAULT_SHUTDOWN_SECONDS 2 +#endif + +#ifndef MINIMUM_SAFE_FREE_HEAP +#define MINIMUM_SAFE_FREE_HEAP 1500 +#endif + +#ifndef WIRE_INTERFACES_COUNT +// Officially an NRF52 macro +// Repurposed cross-platform to identify devices using Wire1 +#if defined(I2C_SDA1) || defined(PIN_WIRE1_SDA) +#define WIRE_INTERFACES_COUNT 2 +#elif HAS_WIRE +#define WIRE_INTERFACES_COUNT 1 +#endif +#endif + +/* Step #3: mop up with disabled values for HAS_ options not handled by the above two */ + #ifndef HAS_WIFI #define HAS_WIFI 0 #endif @@ -216,9 +278,81 @@ along with this program. If not, see . #define HAS_BLUETOOTH 0 #endif -#include "DebugConfiguration.h" -#include "RF95Configuration.h" - #ifndef HW_VENDOR #error HW_VENDOR must be defined -#endif \ No newline at end of file +#endif + +// ----------------------------------------------------------------------------- +// Global switches to turn off features for a minimized build +// ----------------------------------------------------------------------------- + +// #define MESHTASTIC_MINIMIZE_BUILD 1 +#ifdef MESHTASTIC_MINIMIZE_BUILD +#define MESHTASTIC_EXCLUDE_MODULES 1 +#define MESHTASTIC_EXCLUDE_WIFI 1 +#define MESHTASTIC_EXCLUDE_BLUETOOTH 1 +#define MESHTASTIC_EXCLUDE_GPS 1 +#define MESHTASTIC_EXCLUDE_SCREEN 1 +#define MESHTASTIC_EXCLUDE_MQTT 1 +#define MESHTASTIC_EXCLUDE_POWERMON 1 +#define MESHTASTIC_EXCLUDE_I2C 1 +#define MESHTASTIC_EXCLUDE_PKI 1 +#define MESHTASTIC_EXCLUDE_POWER_FSM 1 +#define MESHTASTIC_EXCLUDE_TZ 1 +#endif + +// Turn off all optional modules +#ifdef MESHTASTIC_EXCLUDE_MODULES +#define MESHTASTIC_EXCLUDE_AUDIO 1 +#define MESHTASTIC_EXCLUDE_DETECTIONSENSOR 1 +#define MESHTASTIC_EXCLUDE_ENVIRONMENTAL_SENSOR 1 +#define MESHTASTIC_EXCLUDE_EXTERNALNOTIFICATION 1 +#define MESHTASTIC_EXCLUDE_PAXCOUNTER 1 +#define MESHTASTIC_EXCLUDE_POWER_TELEMETRY 1 +#define MESHTASTIC_EXCLUDE_RANGETEST 1 +#define MESHTASTIC_EXCLUDE_REMOTEHARDWARE 1 +#define MESHTASTIC_EXCLUDE_STOREFORWARD 1 +#define MESHTASTIC_EXCLUDE_TEXTMESSAGE 1 +#define MESHTASTIC_EXCLUDE_ATAK 1 +#define MESHTASTIC_EXCLUDE_CANNEDMESSAGES 1 +#define MESHTASTIC_EXCLUDE_NEIGHBORINFO 1 +#define MESHTASTIC_EXCLUDE_TRACEROUTE 1 +#define MESHTASTIC_EXCLUDE_WAYPOINT 1 +#define MESHTASTIC_EXCLUDE_INPUTBROKER 1 +#define MESHTASTIC_EXCLUDE_SERIAL 1 +#define MESHTASTIC_EXCLUDE_POWERSTRESS 1 +#define MESHTASTIC_EXCLUDE_ADMIN 1 +#endif + +// // Turn off wifi even if HW supports wifi (webserver relies on wifi and is also disabled) +#ifdef MESHTASTIC_EXCLUDE_WIFI +#define MESHTASTIC_EXCLUDE_WEBSERVER 1 +#undef HAS_WIFI +#define HAS_WIFI 0 +#endif + +// Allow code that needs internet to just check HAS_NETWORKING rather than HAS_WIFI || HAS_ETHERNET +#define HAS_NETWORKING (HAS_WIFI || HAS_ETHERNET) + +// // Turn off Bluetooth +#ifdef MESHTASTIC_EXCLUDE_BLUETOOTH +#undef HAS_BLUETOOTH +#define HAS_BLUETOOTH 0 +#endif + +// // Turn off GPS +#ifdef MESHTASTIC_EXCLUDE_GPS +#undef HAS_GPS +#define HAS_GPS 0 +#undef MESHTASTIC_EXCLUDE_RANGETEST +#define MESHTASTIC_EXCLUDE_RANGETEST 1 +#endif + +// Turn off Screen +#ifdef MESHTASTIC_EXCLUDE_SCREEN +#undef HAS_SCREEN +#define HAS_SCREEN 0 +#endif + +#include "DebugConfiguration.h" +#include "RF95Configuration.h" diff --git a/src/detect/LoRaRadioType.h b/src/detect/LoRaRadioType.h new file mode 100644 index 000000000..a059a3668 --- /dev/null +++ b/src/detect/LoRaRadioType.h @@ -0,0 +1,17 @@ +#pragma once + +enum LoRaRadioType { + NO_RADIO, + STM32WLx_RADIO, + SIM_RADIO, + RF95_RADIO, + SX1262_RADIO, + SX1268_RADIO, + LLCC68_RADIO, + SX1280_RADIO, + LR1110_RADIO, + LR1120_RADIO, + LR1121_RADIO +}; + +extern LoRaRadioType radioType; \ No newline at end of file diff --git a/src/detect/ScanI2C.cpp b/src/detect/ScanI2C.cpp index bf206c190..a9d70edaa 100644 --- a/src/detect/ScanI2C.cpp +++ b/src/detect/ScanI2C.cpp @@ -6,6 +6,7 @@ const ScanI2C::FoundDevice ScanI2C::DEVICE_NONE = ScanI2C::FoundDevice(ScanI2C:: ScanI2C::ScanI2C() = default; void ScanI2C::scanPort(ScanI2C::I2CPort port) {} +void ScanI2C::scanPort(ScanI2C::I2CPort port, uint8_t *address, uint8_t asize) {} void ScanI2C::setSuppressScreen() { @@ -36,8 +37,8 @@ ScanI2C::FoundDevice ScanI2C::firstKeyboard() const ScanI2C::FoundDevice ScanI2C::firstAccelerometer() const { - ScanI2C::DeviceType types[] = {MPU6050, LIS3DH, BMA423}; - return firstOfOrNONE(3, types); + ScanI2C::DeviceType types[] = {MPU6050, LIS3DH, BMA423, LSM6DS3, BMX160, STK8BAXX, ICM20948}; + return firstOfOrNONE(7, types); } ScanI2C::FoundDevice ScanI2C::find(ScanI2C::DeviceType) const diff --git a/src/detect/ScanI2C.h b/src/detect/ScanI2C.h index 2b4b8a735..07db3fd57 100644 --- a/src/detect/ScanI2C.h +++ b/src/detect/ScanI2C.h @@ -23,23 +23,45 @@ class ScanI2C BME_680, BME_280, BMP_280, + BMP_085, + BMP_3XX, INA260, INA219, INA3221, + MAX17048, MCP9808, SHT31, + SHT4X, SHTC3, LPS22HB, QMC6310, QMI8658, QMC5883L, + HMC5883L, PMSA0031, MPU6050, LIS3DH, BMA423, -#ifdef HAS_NCP5623 + BQ24295, + LSM6DS3, + TCA9535, + TCA9555, + VEML7700, + RCWL9620, NCP5623, -#endif + TSL2591, + OPT3001, + MLX90632, + MLX90614, + AHT10, + BMX160, + DFROBOT_LARK, + NAU7802, + FT6336U, + STK8BAXX, + ICM20948, + MAX30102, + TPS65233 } DeviceType; // typedef uint8_t DeviceAddress; @@ -50,8 +72,9 @@ class ScanI2C } I2CPort; typedef struct DeviceAddress { - I2CPort port; - uint8_t address; + // set default values for ADDRESS_NONE + I2CPort port = I2CPort::NO_I2C; + uint8_t address = 0; explicit DeviceAddress(I2CPort port, uint8_t address); DeviceAddress(); @@ -76,6 +99,7 @@ class ScanI2C ScanI2C(); virtual void scanPort(ScanI2C::I2CPort); + virtual void scanPort(ScanI2C::I2CPort, uint8_t *, uint8_t); /* * A bit of a hack, this tells the scanner not to tell later systems there is a screen to avoid enabling it. diff --git a/src/detect/ScanI2CTwoWire.cpp b/src/detect/ScanI2CTwoWire.cpp index 990fb36ea..af94290d2 100644 --- a/src/detect/ScanI2CTwoWire.cpp +++ b/src/detect/ScanI2CTwoWire.cpp @@ -1,7 +1,8 @@ #include "ScanI2CTwoWire.h" +#if !MESHTASTIC_EXCLUDE_I2C + #include "concurrency/LockGuard.h" -#include "configuration.h" #if defined(ARCH_PORTDUINO) #include "linux/LinuxHardwareI2C.h" #endif @@ -14,6 +15,15 @@ #define XPOWERS_AXP192_AXP2101_ADDRESS 0x34 #endif +bool in_array(uint8_t *array, int size, uint8_t lookfor) +{ + int i; + for (i = 0; i < size; i++) + if (lookfor == array[i]) + return true; + return false; +} + ScanI2C::FoundDevice ScanI2CTwoWire::find(ScanI2C::DeviceType type) const { concurrency::LockGuard guard((concurrency::Lock *)&lock); @@ -135,11 +145,11 @@ uint16_t ScanI2CTwoWire::getRegisterValue(const ScanI2CTwoWire::RegisterLocation type = T; \ break; -void ScanI2CTwoWire::scanPort(I2CPort port) +void ScanI2CTwoWire::scanPort(I2CPort port, uint8_t *address, uint8_t asize) { concurrency::LockGuard guard((concurrency::Lock *)&lock); - LOG_DEBUG("Scanning for i2c devices on port %d\n", port); + LOG_DEBUG("Scanning for I2C devices on port %d\n", port); uint8_t err; @@ -152,17 +162,22 @@ void ScanI2CTwoWire::scanPort(I2CPort port) Melopero_RV3028 rtc; #endif -#ifdef I2C_SDA1 +#if WIRE_INTERFACES_COUNT == 2 if (port == I2CPort::WIRE1) { i2cBus = &Wire1; } else { #endif i2cBus = &Wire; -#ifdef I2C_SDA1 +#if WIRE_INTERFACES_COUNT == 2 } #endif for (addr.address = 1; addr.address < 127; addr.address++) { + if (asize != 0) { + if (!in_array(address, asize, addr.address)) + continue; + LOG_DEBUG("Scanning address 0x%x\n", addr.address); + } i2cBus->beginTransmission(addr.address); #ifdef ARCH_PORTDUINO if (i2cBus->read() != -1) @@ -183,8 +198,13 @@ void ScanI2CTwoWire::scanPort(I2CPort port) #if !defined(ARCH_PORTDUINO) && !defined(ARCH_STM32WL) case ATECC608B_ADDR: - type = ATECC608B; - if (atecc.begin(addr.address) == true) { +#ifdef RP2040_SLOW_CLOCK + if (atecc.begin(addr.address, Wire, Serial2) == true) +#else + if (atecc.begin(addr.address) == true) +#endif + + { LOG_INFO("ATECC608B initialized\n"); } else { LOG_WARN("ATECC608B initialization failed\n"); @@ -242,14 +262,35 @@ void ScanI2CTwoWire::scanPort(I2CPort port) LOG_INFO("BME-280 sensor found at address 0x%x\n", (uint8_t)addr.address); type = BME_280; break; + case 0x55: + LOG_INFO("BMP-085 or BMP-180 sensor found at address 0x%x\n", (uint8_t)addr.address); + type = BMP_085; + break; default: - LOG_INFO("BMP-280 sensor found at address 0x%x\n", (uint8_t)addr.address); - type = BMP_280; + registerValue = getRegisterValue(ScanI2CTwoWire::RegisterLocation(addr, 0x00), 1); // GET_ID + switch (registerValue) { + case 0x50: // BMP-388 should be 0x50 + LOG_INFO("BMP-388 sensor found at address 0x%x\n", (uint8_t)addr.address); + type = BMP_3XX; + break; + case 0x58: // BMP-280 should be 0x58 + default: + LOG_INFO("BMP-280 sensor found at address 0x%x\n", (uint8_t)addr.address); + type = BMP_280; + break; + } + break; } break; - +#ifndef HAS_NCP5623 + case AHT10_ADDR: + LOG_INFO("AHT10 sensor found at address 0x%x\n", (uint8_t)addr.address); + type = AHT10; + break; +#endif case INA_ADDR: case INA_ADDR_ALTERNATE: + case INA_ADDR_WAVESHARE_UPS: registerValue = getRegisterValue(ScanI2CTwoWire::RegisterLocation(addr, 0xFE), 2); LOG_DEBUG("Register MFG_UID: 0x%x\n", registerValue); if (registerValue == 0x5449) { @@ -261,40 +302,137 @@ void ScanI2CTwoWire::scanPort(I2CPort port) } break; case INA3221_ADDR: - LOG_INFO("INA3221 sensor found at address 0x%x\n", (uint8_t)addr.address); - type = INA3221; + registerValue = getRegisterValue(ScanI2CTwoWire::RegisterLocation(addr, 0xFE), 2); + LOG_DEBUG("Register MFG_UID: 0x%x\n", registerValue); + if (registerValue == 0x5449) { + LOG_INFO("INA3221 sensor found at address 0x%x\n", (uint8_t)addr.address); + type = INA3221; + } else { + LOG_INFO("DFRobot Lark weather station found at address 0x%x\n", (uint8_t)addr.address); + type = DFROBOT_LARK; + } break; case MCP9808_ADDR: - registerValue = getRegisterValue(ScanI2CTwoWire::RegisterLocation(addr, 0x07), 2); - if (registerValue == 0x0400) { - type = MCP9808; - LOG_INFO("MCP9808 sensor found\n"); + // We need to check for STK8BAXX first, since register 0x07 is new data flag for the z-axis and can produce some + // weird result. and register 0x00 doesn't seems to be colliding with MCP9808 and LIS3DH chips. + { + // Check register 0x00 for 0x8700 response to ID STK8BA53 chip. + registerValue = getRegisterValue(ScanI2CTwoWire::RegisterLocation(addr, 0x00), 2); + if (registerValue == 0x8700) { + type = STK8BAXX; + LOG_INFO("STK8BAXX accelerometer found\n"); + break; + } + + // Check register 0x07 for 0x0400 response to ID MCP9808 chip. + registerValue = getRegisterValue(ScanI2CTwoWire::RegisterLocation(addr, 0x07), 2); + if (registerValue == 0x0400) { + type = MCP9808; + LOG_INFO("MCP9808 sensor found\n"); + break; + } + + // Check register 0x0F for 0x3300 response to ID LIS3DH chip. + registerValue = getRegisterValue(ScanI2CTwoWire::RegisterLocation(addr, 0x0F), 2); + if (registerValue == 0x3300 || registerValue == 0x3333) { // RAK4631 WisBlock has LIS3DH register at 0x3333 + type = LIS3DH; + LOG_INFO("LIS3DH accelerometer found\n"); + } + break; + } + case SHT31_4x_ADDR: + registerValue = getRegisterValue(ScanI2CTwoWire::RegisterLocation(addr, 0x89), 2); + if (registerValue == 0x11a2 || registerValue == 0x11da || registerValue == 0xe9c) { + type = SHT4X; + LOG_INFO("SHT4X sensor found\n"); + } else if (getRegisterValue(ScanI2CTwoWire::RegisterLocation(addr, 0x7E), 2) == 0x5449) { + type = OPT3001; + LOG_INFO("OPT3001 light sensor found\n"); } else { - type = LIS3DH; - LOG_INFO("LIS3DH accelerometer found\n"); + type = SHT31; + LOG_INFO("SHT31 sensor found\n"); } break; - SCAN_SIMPLE_CASE(SHT31_ADDR, SHT31, "SHT31 sensor found\n") SCAN_SIMPLE_CASE(SHTC3_ADDR, SHTC3, "SHTC3 sensor found\n") + case RCWL9620_ADDR: + // get MAX30102 PARTID + registerValue = getRegisterValue(ScanI2CTwoWire::RegisterLocation(addr, 0xFF), 1); + if (registerValue == 0x15) { + type = MAX30102; + LOG_INFO("MAX30102 Health sensor found\n"); + break; + } else { + type = RCWL9620; + LOG_INFO("RCWL9620 sensor found\n"); + } + break; case LPS22HB_ADDR_ALT: SCAN_SIMPLE_CASE(LPS22HB_ADDR, LPS22HB, "LPS22HB sensor found\n") SCAN_SIMPLE_CASE(QMC6310_ADDR, QMC6310, "QMC6310 Highrate 3-Axis magnetic sensor found\n") - SCAN_SIMPLE_CASE(QMI8658_ADDR, QMI8658, "QMI8658 Highrate 6-Axis inertial measurement sensor found\n") - SCAN_SIMPLE_CASE(QMC5883L_ADDR, QMC5883L, "QMC5883L Highrate 3-Axis magnetic sensor found\n") + case QMI8658_ADDR: + registerValue = getRegisterValue(ScanI2CTwoWire::RegisterLocation(addr, 0x0A), 1); // get ID + if (registerValue == 0xC0) { + type = BQ24295; + LOG_INFO("BQ24295 PMU found\n"); + break; + } + registerValue = getRegisterValue(ScanI2CTwoWire::RegisterLocation(addr, 0x0F), 1); // get ID + if (registerValue == 0x6A) { + type = LSM6DS3; + LOG_INFO("LSM6DS3 accelerometer found at address 0x%x\n", (uint8_t)addr.address); + } else { + type = QMI8658; + LOG_INFO("QMI8658 Highrate 6-Axis inertial measurement sensor found\n"); + } + break; + + SCAN_SIMPLE_CASE(QMC5883L_ADDR, QMC5883L, "QMC5883L Highrate 3-Axis magnetic sensor found\n") + SCAN_SIMPLE_CASE(HMC5883L_ADDR, HMC5883L, "HMC5883L 3-Axis digital compass found\n") SCAN_SIMPLE_CASE(PMSA0031_ADDR, PMSA0031, "PMSA0031 air quality sensor found\n") - SCAN_SIMPLE_CASE(MPU6050_ADDR, MPU6050, "MPU6050 accelerometer found\n"); SCAN_SIMPLE_CASE(BMA423_ADDR, BMA423, "BMA423 accelerometer found\n"); + SCAN_SIMPLE_CASE(LSM6DS3_ADDR, LSM6DS3, "LSM6DS3 accelerometer found at address 0x%x\n", (uint8_t)addr.address); + SCAN_SIMPLE_CASE(TCA9535_ADDR, TCA9535, "TCA9535 I2C expander found\n"); + SCAN_SIMPLE_CASE(TCA9555_ADDR, TCA9555, "TCA9555 I2C expander found\n"); + SCAN_SIMPLE_CASE(VEML7700_ADDR, VEML7700, "VEML7700 light sensor found\n"); + SCAN_SIMPLE_CASE(TSL25911_ADDR, TSL2591, "TSL2591 light sensor found\n"); + SCAN_SIMPLE_CASE(OPT3001_ADDR, OPT3001, "OPT3001 light sensor found\n"); + SCAN_SIMPLE_CASE(MLX90632_ADDR, MLX90632, "MLX90632 IR temp sensor found\n"); + SCAN_SIMPLE_CASE(NAU7802_ADDR, NAU7802, "NAU7802 based scale found\n"); + SCAN_SIMPLE_CASE(FT6336U_ADDR, FT6336U, "FT6336U touchscreen found\n"); + SCAN_SIMPLE_CASE(MAX1704X_ADDR, MAX17048, "MAX17048 lipo fuel gauge found\n"); +#ifdef HAS_TPS65233 + SCAN_SIMPLE_CASE(TPS65233_ADDR, TPS65233, "TPS65233 BIAS-T found\n"); +#endif + SCAN_SIMPLE_CASE(MLX90614_ADDR_DEF, MLX90614, "MLX90614 IR temp sensor found\n"); + + case ICM20948_ADDR: // same as BMX160_ADDR + case ICM20948_ADDR_ALT: // same as MPU6050_ADDR + registerValue = getRegisterValue(ScanI2CTwoWire::RegisterLocation(addr, 0x00), 1); + if (registerValue == 0xEA) { + type = ICM20948; + LOG_INFO("ICM20948 9-dof motion processor found\n"); + break; + } else if (addr.address == BMX160_ADDR) { + type = BMX160; + LOG_INFO("BMX160 accelerometer found\n"); + break; + } else { + type = MPU6050; + LOG_INFO("MPU6050 accelerometer found\n"); + break; + } + break; default: LOG_INFO("Device found at address 0x%x was not able to be enumerated\n", addr.address); } } else if (err == 4) { - LOG_ERROR("Unknown error at address 0x%x\n", addr); + LOG_ERROR("Unknown error at address 0x%x\n", addr.address); } // Check if a type was found for the enumerated device - save, if so @@ -305,12 +443,17 @@ void ScanI2CTwoWire::scanPort(I2CPort port) } } +void ScanI2CTwoWire::scanPort(I2CPort port) +{ + scanPort(port, nullptr, 0); +} + TwoWire *ScanI2CTwoWire::fetchI2CBus(ScanI2C::DeviceAddress address) const { if (address.port == ScanI2C::I2CPort::WIRE) { return &Wire; } else { -#ifdef I2C_SDA1 +#if WIRE_INTERFACES_COUNT == 2 return &Wire1; #else return &Wire; @@ -321,4 +464,5 @@ TwoWire *ScanI2CTwoWire::fetchI2CBus(ScanI2C::DeviceAddress address) const size_t ScanI2CTwoWire::countDevices() const { return foundDevices.size(); -} \ No newline at end of file +} +#endif \ No newline at end of file diff --git a/src/detect/ScanI2CTwoWire.h b/src/detect/ScanI2CTwoWire.h index 9acd736d2..c8dd96469 100644 --- a/src/detect/ScanI2CTwoWire.h +++ b/src/detect/ScanI2CTwoWire.h @@ -1,5 +1,8 @@ #pragma once +#include "configuration.h" +#if !MESHTASTIC_EXCLUDE_I2C + #include #include #include @@ -16,6 +19,8 @@ class ScanI2CTwoWire : public ScanI2C public: void scanPort(ScanI2C::I2CPort) override; + void scanPort(ScanI2C::I2CPort, uint8_t *, uint8_t) override; + ScanI2C::FoundDevice find(ScanI2C::DeviceType) const override; TwoWire *fetchI2CBus(ScanI2C::DeviceAddress) const; @@ -54,3 +59,4 @@ class ScanI2CTwoWire : public ScanI2C DeviceType probeOLED(ScanI2C::DeviceAddress) const; }; +#endif \ No newline at end of file diff --git a/src/freertosinc.h b/src/freertosinc.h index 166054241..e9e6cd53a 100644 --- a/src/freertosinc.h +++ b/src/freertosinc.h @@ -12,7 +12,7 @@ #include #endif -#if defined(ARDUINO_NRF52_ADAFRUIT) || defined(ARDUINO_ARCH_STM32) || defined(ARDUINO_ARCH_RP2040) +#if defined(ARDUINO_NRF52_ADAFRUIT) || defined(ARDUINO_ARCH_RP2040) #define HAS_FREE_RTOS #include diff --git a/src/gps/GPS.cpp b/src/gps/GPS.cpp index 08ef116b2..33c21c5bb 100644 --- a/src/gps/GPS.cpp +++ b/src/gps/GPS.cpp @@ -1,9 +1,19 @@ -#include "GPS.h" -#include "NodeDB.h" -#include "RTC.h" #include "configuration.h" +#if !MESHTASTIC_EXCLUDE_GPS +#include "Default.h" +#include "GPS.h" +#include "GpioLogic.h" +#include "NodeDB.h" +#include "PowerMon.h" +#include "RTC.h" +#include "Throttle.h" +#include "meshUtils.h" + #include "main.h" // pmu_found #include "sleep.h" + +#include "GPSUpdateScheduling.h" +#include "cas.h" #include "ubx.h" #ifdef ARCH_PORTDUINO @@ -18,12 +28,16 @@ #if defined(NRF52840_XXAA) || defined(NRF52833_XXAA) || defined(ARCH_ESP32) || defined(ARCH_PORTDUINO) HardwareSerial *GPS::_serial_gps = &Serial1; +#elif defined(ARCH_RP2040) +SerialUART *GPS::_serial_gps = &Serial1; #else HardwareSerial *GPS::_serial_gps = NULL; #endif GPS *gps = nullptr; +GPSUpdateScheduling scheduling; + /// Multiple GPS instances might use the same serial port (in sequence), but we can /// only init that port once. static bool didSerialInit; @@ -33,6 +47,26 @@ uint8_t uBloxProtocolVersion; #define GPS_SOL_EXPIRY_MS 5000 // in millis. give 1 second time to combine different sentences. NMEA Frequency isn't higher anyway #define NMEA_MSG_GXGSA "GNGSA" // GSA message (GPGSA, GNGSA etc) +// For logging +const char *getGPSPowerStateString(GPSPowerState state) +{ + switch (state) { + case GPS_ACTIVE: + return "ACTIVE"; + case GPS_IDLE: + return "IDLE"; + case GPS_SOFTSLEEP: + return "SOFTSLEEP"; + case GPS_HARDSLEEP: + return "HARDSLEEP"; + case GPS_OFF: + return "OFF"; + default: + assert(false); // Unhandled enum value.. + return "FALSE"; // to make new ESP-IDF happy + } +} + void GPS::UBXChecksum(uint8_t *message, size_t length) { uint8_t CK_A = 0, CK_B = 0; @@ -48,6 +82,28 @@ void GPS::UBXChecksum(uint8_t *message, size_t length) message[length - 1] = CK_B; } +// Calculate the checksum for a CAS packet +void GPS::CASChecksum(uint8_t *message, size_t length) +{ + uint32_t cksum = ((uint32_t)message[5] << 24); // Message ID + cksum += ((uint32_t)message[4]) << 16; // Class + cksum += message[2]; // Payload Len + + // Iterate over the payload as a series of uint32_t's and + // accumulate the cksum + for (size_t i = 0; i < (length - 10) / 4; i++) { + uint32_t pl = 0; + memcpy(&pl, (message + 6) + (i * sizeof(uint32_t)), sizeof(uint32_t)); // avoid pointer dereference + cksum += pl; + } + + // Place the checksum values in the message + message[length - 4] = (cksum & 0xFF); + message[length - 3] = (cksum & (0xFF << 8)) >> 8; + message[length - 2] = (cksum & (0xFF << 16)) >> 16; + message[length - 1] = (cksum & (0xFF << 24)) >> 24; +} + // Function to create a ublox packet for editing in memory uint8_t GPS::makeUBXPacket(uint8_t class_id, uint8_t msg_id, uint8_t payload_size, const uint8_t *msg) { @@ -69,6 +125,41 @@ uint8_t GPS::makeUBXPacket(uint8_t class_id, uint8_t msg_id, uint8_t payload_siz return (payload_size + 8); } +// Function to create a CAS packet for editing in memory +uint8_t GPS::makeCASPacket(uint8_t class_id, uint8_t msg_id, uint8_t payload_size, const uint8_t *msg) +{ + // General CAS structure + // | H1 | H2 | payload_len | cls | msg | Payload ... | Checksum | + // Size: | 1 | 1 | 2 | 1 | 1 | payload_len | 4 | + // Pos: | 0 | 1 | 2 | 3 | 4 | 5 | 6 | 7 ... | 6 + payload_len ... | + // |------|------|-------------|------|------|------|--------------|---------------------------| + // | 0xBA | 0xCE | 0xXX | 0xXX | 0xXX | 0xXX | 0xXX | 0xXX ... | 0xXX | 0xXX | 0xXX | 0xXX | + + // Construct the CAS packet + UBXscratch[0] = 0xBA; // header 1 (0xBA) + UBXscratch[1] = 0xCE; // header 2 (0xCE) + UBXscratch[2] = payload_size; // length 1 + UBXscratch[3] = 0; // length 2 + UBXscratch[4] = class_id; // class + UBXscratch[5] = msg_id; // id + + UBXscratch[6 + payload_size] = 0x00; // Checksum + UBXscratch[7 + payload_size] = 0x00; + UBXscratch[8 + payload_size] = 0x00; + UBXscratch[9 + payload_size] = 0x00; + + for (int i = 0; i < payload_size; i++) { + UBXscratch[6 + i] = pgm_read_byte(&msg[i]); + } + CASChecksum(UBXscratch, (payload_size + 10)); + +#if defined(GPS_DEBUG) && defined(DEBUG_PORT) + LOG_DEBUG("Constructed CAS packet: \n"); + DEBUG_PORT.hexDump(MESHTASTIC_LOG_LEVEL_DEBUG, UBXscratch, payload_size + 10); +#endif + return (payload_size + 10); +} + GPS_RESPONSE GPS::getACK(const char *message, uint32_t waitMillis) { uint8_t buffer[768] = {0}; @@ -78,19 +169,23 @@ GPS_RESPONSE GPS::getACK(const char *message, uint32_t waitMillis) while (millis() < startTimeout) { if (_serial_gps->available()) { b = _serial_gps->read(); + #ifdef GPS_DEBUG - LOG_DEBUG("%02X", (char *)buffer); + LOG_DEBUG("%c", (b >= 32 && b <= 126) ? b : '.'); #endif buffer[bytesRead] = b; bytesRead++; if ((bytesRead == 767) || (b == '\r')) { if (strnstr((char *)buffer, message, bytesRead) != nullptr) { #ifdef GPS_DEBUG - LOG_DEBUG("\r"); + LOG_DEBUG("\r\nFound: %s\r\n", message); // Log the found message #endif return GNSS_RESPONSE_OK; } else { bytesRead = 0; +#ifdef GPS_DEBUG + LOG_DEBUG("\r\n"); +#endif } } } @@ -101,6 +196,67 @@ GPS_RESPONSE GPS::getACK(const char *message, uint32_t waitMillis) return GNSS_RESPONSE_NONE; } +GPS_RESPONSE GPS::getACKCas(uint8_t class_id, uint8_t msg_id, uint32_t waitMillis) +{ + uint32_t startTime = millis(); + uint8_t buffer[CAS_ACK_NACK_MSG_SIZE] = {0}; + uint8_t bufferPos = 0; + + // CAS-ACK-(N)ACK structure + // | H1 | H2 | Payload Len | cls | msg | Payload | Checksum (4) | + // | | | | | | Cls | Msg | Reserved | | + // |------|------|-------------|------|------|------|------|-------------|---------------------------| + // ACK-NACK| 0xBA | 0xCE | 0x04 | 0x00 | 0x05 | 0x00 | 0xXX | 0xXX | 0x00 | 0x00 | 0xXX | 0xXX | 0xXX | 0xXX | + // ACK-ACK | 0xBA | 0xCE | 0x04 | 0x00 | 0x05 | 0x01 | 0xXX | 0xXX | 0x00 | 0x00 | 0xXX | 0xXX | 0xXX | 0xXX | + + while (Throttle::isWithinTimespanMs(startTime, waitMillis)) { + if (_serial_gps->available()) { + buffer[bufferPos++] = _serial_gps->read(); + + // keep looking at the first two bytes of buffer until + // we have found the CAS frame header (0xBA, 0xCE), if not + // keep reading bytes until we find a frame header or we run + // out of time. + if ((bufferPos == 2) && !(buffer[0] == 0xBA && buffer[1] == 0xCE)) { + buffer[0] = buffer[1]; + buffer[1] = 0; + bufferPos = 1; + } + } + + // we have read all the bytes required for the Ack/Nack (14-bytes) + // and we must have found a frame to get this far + if (bufferPos == sizeof(buffer) - 1) { + uint8_t msg_cls = buffer[4]; // message class should be 0x05 + uint8_t msg_msg_id = buffer[5]; // message id should be 0x00 or 0x01 + uint8_t payload_cls = buffer[6]; // payload class id + uint8_t payload_msg = buffer[7]; // payload message id + + // Check for an ACK-ACK for the specified class and message id + if ((msg_cls == 0x05) && (msg_msg_id == 0x01) && payload_cls == class_id && payload_msg == msg_id) { +#ifdef GPS_DEBUG + LOG_INFO("Got ACK for class %02X message %02X in %d millis.\n", class_id, msg_id, millis() - startTime); +#endif + return GNSS_RESPONSE_OK; + } + + // Check for an ACK-NACK for the specified class and message id + if ((msg_cls == 0x05) && (msg_msg_id == 0x00) && payload_cls == class_id && payload_msg == msg_id) { +#ifdef GPS_DEBUG + LOG_WARN("Got NACK for class %02X message %02X in %d millis.\n", class_id, msg_id, millis() - startTime); +#endif + return GNSS_RESPONSE_NAK; + } + + // This isn't the frame we are looking for, clear the buffer + // and try again until we run out of time. + memset(buffer, 0x0, sizeof(buffer)); + bufferPos = 0; + } + } + return GNSS_RESPONSE_NONE; +} + GPS_RESPONSE GPS::getACK(uint8_t class_id, uint8_t msg_id, uint32_t waitMillis) { uint8_t b; @@ -122,7 +278,7 @@ GPS_RESPONSE GPS::getACK(uint8_t class_id, uint8_t msg_id, uint32_t waitMillis) buf[9] += buf[8]; } - while (millis() - startTime < waitMillis) { + while (Throttle::isWithinTimespanMs(startTime, waitMillis)) { if (ack > 9) { #ifdef GPS_DEBUG LOG_DEBUG("\n"); @@ -177,9 +333,9 @@ int GPS::getACK(uint8_t *buffer, uint16_t size, uint8_t requestedClass, uint8_t { uint16_t ubxFrameCounter = 0; uint32_t startTime = millis(); - uint16_t needRead; + uint16_t needRead = 0; - while (millis() - startTime < waitMillis) { + while (Throttle::isWithinTimespanMs(startTime, waitMillis)) { if (_serial_gps->available()) { int c = _serial_gps->read(); switch (ubxFrameCounter) { @@ -250,25 +406,16 @@ int GPS::getACK(uint8_t *buffer, uint16_t size, uint8_t requestedClass, uint8_t bool GPS::setup() { - int msglen = 0; if (!didSerialInit) { -#if !defined(GPS_UC6580) - -#if defined(RAK4630) && defined(PIN_3V3_EN) - // If we are using the RAK4630 and we have no other peripherals on the I2C bus or module interest in 3V3_S, - // then we can safely set en_gpio turn off power to 3V3 (IO2) to hard sleep the GPS - if (rtc_found.port == ScanI2C::DeviceType::NONE && rgb_found.type == ScanI2C::DeviceType::NONE && - accelerometer_found.port == ScanI2C::DeviceType::NONE && !moduleConfig.detection_sensor.enabled && - !moduleConfig.telemetry.air_quality_enabled && !moduleConfig.telemetry.environment_measurement_enabled && - config.power.device_battery_ina_address == 0 && en_gpio == 0) { - LOG_DEBUG("Since no problematic peripherals or interested modules were found, setting power save GPS_EN to pin %i\n", - PIN_3V3_EN); - en_gpio = PIN_3V3_EN; - } -#endif - + int msglen = 0; if (tx_gpio && gnssModel == GNSS_MODEL_UNKNOWN) { + + // if GPS_BAUDRATE is specified in variant (i.e. not 9600), skip to the specified rate. + if (speedSelect == 0 && GPS_BAUDRATE != serialSpeeds[speedSelect]) { + speedSelect = std::find(serialSpeeds, std::end(serialSpeeds), GPS_BAUDRATE) - serialSpeeds; + } + LOG_DEBUG("Probing for GPS at %d \n", serialSpeeds[speedSelect]); gnssModel = probe(serialSpeeds[speedSelect]); if (gnssModel == GNSS_MODEL_UNKNOWN) { @@ -284,9 +431,6 @@ bool GPS::setup() } else { gnssModel = GNSS_MODEL_UNKNOWN; } -#else - gnssModel = GNSS_MODEL_UC6580; -#endif if (gnssModel == GNSS_MODEL_MTK) { /* @@ -303,6 +447,53 @@ bool GPS::setup() // Switch to Vehicle Mode, since SoftRF enables Aviation < 2g _serial_gps->write("$PCAS11,3*1E\r\n"); delay(250); + } else if (gnssModel == GNSS_MODEL_MTK_L76B) { + // Waveshare Pico-GPS hat uses the L76B with 9600 baud + // Initialize the L76B Chip, use GPS + GLONASS + // See note in L76_Series_GNSS_Protocol_Specification, chapter 3.29 + _serial_gps->write("$PMTK353,1,1,0,0,0*2B\r\n"); + // Above command will reset the GPS and takes longer before it will accept new commands + delay(1000); + // only ask for RMC and GGA (GNRMC and GNGGA) + // See note in L76_Series_GNSS_Protocol_Specification, chapter 2.1 + _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"); + delay(250); + // Enable SBAS + _serial_gps->write("$PMTK301,2*2E\r\n"); + delay(250); + // Enable PPS for 2D/3D fix only + _serial_gps->write("$PMTK285,3,100*3F\r\n"); + delay(250); + // Switch to Fitness Mode, for running and walking purpose with low speed (<5 m/s) + _serial_gps->write("$PMTK886,1*29\r\n"); + delay(250); + } else if (gnssModel == GNSS_MODEL_ATGM336H) { + // Set the intial configuration of the device - these _should_ work for most AT6558 devices + msglen = makeCASPacket(0x06, 0x07, sizeof(_message_CAS_CFG_NAVX_CONF), _message_CAS_CFG_NAVX_CONF); + _serial_gps->write(UBXscratch, msglen); + if (getACKCas(0x06, 0x07, 250) != GNSS_RESPONSE_OK) { + LOG_WARN("ATGM336H - Could not set Configuration"); + } + + // Set the update frequence to 1Hz + msglen = makeCASPacket(0x06, 0x04, sizeof(_message_CAS_CFG_RATE_1HZ), _message_CAS_CFG_RATE_1HZ); + _serial_gps->write(UBXscratch, msglen); + if (getACKCas(0x06, 0x04, 250) != GNSS_RESPONSE_OK) { + LOG_WARN("ATGM336H - Could not set Update Frequency"); + } + + // Set the NEMA output messages + // Ask for only RMC and GGA + uint8_t fields[] = {CAS_NEMA_RMC, CAS_NEMA_GGA}; + for (unsigned int i = 0; i < sizeof(fields); i++) { + // Construct a CAS-CFG-MSG packet + uint8_t cas_cfg_msg_packet[] = {0x4e, fields[i], 0x01, 0x00}; + msglen = makeCASPacket(0x06, 0x01, sizeof(cas_cfg_msg_packet), cas_cfg_msg_packet); + _serial_gps->write(UBXscratch, msglen); + if (getACKCas(0x06, 0x01, 250) != GNSS_RESPONSE_OK) { + LOG_WARN("ATGM336H - Could not enable NMEA MSG: %d\n", fields[i]); + } + } } else if (gnssModel == GNSS_MODEL_UC6580) { // The Unicore UC6580 can use a lot of sat systems, enable it to // use GPS L1 & L5 + BDS B1I & B2a + GLONASS L1 + GALILEO E1 & E5a + SBAS @@ -314,288 +505,177 @@ bool GPS::setup() // Turn off GSV messages, we don't really care about which and where the sats are, maybe someday. _serial_gps->write("$CFGMSG,0,3,0\r\n"); delay(250); + // Turn off GSA messages, TinyGPS++ doesn't use this message. + _serial_gps->write("$CFGMSG,0,2,0\r\n"); + delay(250); // Turn off NOTICE __TXT messages, these may provide Unicore some info but we don't care. _serial_gps->write("$CFGMSG,6,0,0\r\n"); delay(250); _serial_gps->write("$CFGMSG,6,1,0\r\n"); delay(250); + } else if (IS_ONE_OF(gnssModel, GNSS_MODEL_AG3335, GNSS_MODEL_AG3352)) { - } else if (gnssModel == GNSS_MODEL_UBLOX) { - // Configure GNSS system to GPS+SBAS+GLONASS (Module may restart after this command) - // We need set it because by default it is GPS only, and we want to use GLONASS too - // Also we need SBAS for better accuracy and extra features - // ToDo: Dynamic configure GNSS systems depending of LoRa region + _serial_gps->write("$PAIR066,1,0,1,0,0,1*3B\r\n"); // Enable GPS+GALILEO+NAVIC - if (strncmp(info.hwVersion, "000A0000", 8) != 0) { - if (strncmp(info.hwVersion, "00040007", 8) != 0) { - // The original ublox Neo-6 is GPS only and doesn't support the UBX-CFG-GNSS message - // Max7 seems to only support GPS *or* GLONASS - // Neo-7 is supposed to support GPS *and* GLONASS but NAKs the CFG-GNSS command to do it - // So treat all the u-blox 7 series as GPS only - // M8 can support 3 constallations at once so turn on GPS, GLONASS and Galileo (or BeiDou) + // Configure NMEA (sentences will output once per fix) + _serial_gps->write("$PAIR062,0,1*3F\r\n"); // GGA ON + _serial_gps->write("$PAIR062,1,0*3F\r\n"); // GLL OFF + _serial_gps->write("$PAIR062,2,0*3C\r\n"); // GSA OFF + _serial_gps->write("$PAIR062,3,0*3D\r\n"); // GSV OFF + _serial_gps->write("$PAIR062,4,1*3B\r\n"); // RMC ON + _serial_gps->write("$PAIR062,5,0*3B\r\n"); // VTG OFF + _serial_gps->write("$PAIR062,6,0*38\r\n"); // ZDA ON - if (strncmp(info.hwVersion, "00070000", 8) == 0) { - LOG_DEBUG("Setting GPS+SBAS\n"); - msglen = makeUBXPacket(0x06, 0x3e, sizeof(_message_GNSS_7), _message_GNSS_7); - _serial_gps->write(UBXscratch, msglen); - } else { - msglen = makeUBXPacket(0x06, 0x3e, sizeof(_message_GNSS_8), _message_GNSS_8); - _serial_gps->write(UBXscratch, msglen); - } + delay(250); + _serial_gps->write("$PAIR513*3D\r\n"); // save configuration + } else if (gnssModel == GNSS_MODEL_UBLOX6) { + clearBuffer(); + SEND_UBX_PACKET(0x06, 0x02, _message_DISABLE_TXT_INFO, "disable text info messages", 500); + SEND_UBX_PACKET(0x06, 0x39, _message_JAM_6_7, "enable interference resistance", 500); + SEND_UBX_PACKET(0x06, 0x23, _message_NAVX5, "configure NAVX5 settings", 500); - if (getACK(0x06, 0x3e, 800) == GNSS_RESPONSE_NAK) { - // It's not critical if the module doesn't acknowledge this configuration. - LOG_INFO("Unable to reconfigure GNSS - defaults maintained. Is this module GPS-only?\n"); - } else { - if (strncmp(info.hwVersion, "00070000", 8) == 0) { - LOG_INFO("GNSS configured for GPS+SBAS. Pause for 0.75s before sending next command.\n"); - } else { - LOG_INFO( - "GNSS configured for GPS+SBAS+GLONASS+Galileo. Pause for 0.75s before sending next command.\n"); - } - // Documentation say, we need wait atleast 0.5s after reconfiguration of GNSS module, before sending next - // commands for the M8 it tends to be more... 1 sec should be enough ;>) - delay(1000); - } + // Turn off unwanted NMEA messages, set update rate + SEND_UBX_PACKET(0x06, 0x08, _message_1HZ, "set GPS update rate", 500); + SEND_UBX_PACKET(0x06, 0x01, _message_GLL, "disable NMEA GLL", 500); + SEND_UBX_PACKET(0x06, 0x01, _message_GSA, "enable NMEA GSA", 500); + SEND_UBX_PACKET(0x06, 0x01, _message_GSV, "disable NMEA GSV", 500); + SEND_UBX_PACKET(0x06, 0x01, _message_VTG, "disable NMEA VTG", 500); + SEND_UBX_PACKET(0x06, 0x01, _message_RMC, "enable NMEA RMC", 500); + SEND_UBX_PACKET(0x06, 0x01, _message_GGA, "enable NMEA GGA", 500); + + clearBuffer(); + SEND_UBX_PACKET(0x06, 0x11, _message_CFG_RXM_ECO, "enable powersaving ECO mode for Neo-6", 500); + SEND_UBX_PACKET(0x06, 0x3B, _message_CFG_PM2, "enable powersaving details for GPS", 500); + SEND_UBX_PACKET(0x06, 0x01, _message_AID, "disable UBX-AID", 500); + + msglen = makeUBXPacket(0x06, 0x09, sizeof(_message_SAVE), _message_SAVE); + _serial_gps->write(UBXscratch, msglen); + if (getACK(0x06, 0x09, 2000) != GNSS_RESPONSE_OK) { + LOG_WARN("Unable to save GNSS module configuration.\n"); + } else { + LOG_INFO("GNSS module configuration saved!\n"); + } + } else if (IS_ONE_OF(gnssModel, GNSS_MODEL_UBLOX7, GNSS_MODEL_UBLOX8, GNSS_MODEL_UBLOX9)) { + if (gnssModel == GNSS_MODEL_UBLOX7) { + LOG_DEBUG("Setting GPS+SBAS\n"); + msglen = makeUBXPacket(0x06, 0x3e, sizeof(_message_GNSS_7), _message_GNSS_7); + _serial_gps->write(UBXscratch, msglen); + } else { // 8,9 + msglen = makeUBXPacket(0x06, 0x3e, sizeof(_message_GNSS_8), _message_GNSS_8); + _serial_gps->write(UBXscratch, msglen); + } + + if (getACK(0x06, 0x3e, 800) == GNSS_RESPONSE_NAK) { + // It's not critical if the module doesn't acknowledge this configuration. + LOG_INFO("reconfigure GNSS - defaults maintained. Is this module GPS-only?\n"); + } else { + if (gnssModel == GNSS_MODEL_UBLOX7) { + LOG_INFO("GNSS configured for GPS+SBAS.\n"); + } else { // 8,9 + LOG_INFO("GNSS configured for GPS+SBAS+GLONASS+Galileo.\n"); } - // Disable Text Info messages - msglen = makeUBXPacket(0x06, 0x02, sizeof(_message_DISABLE_TXT_INFO), _message_DISABLE_TXT_INFO); + // Documentation say, we need wait atleast 0.5s after reconfiguration of GNSS module, before sending next + // commands for the M8 it tends to be more... 1 sec should be enough ;>) + delay(1000); + } + + // Disable Text Info messages //6,7,8,9 + clearBuffer(); + SEND_UBX_PACKET(0x06, 0x02, _message_DISABLE_TXT_INFO, "disable text info messages", 500); + + if (gnssModel == GNSS_MODEL_UBLOX8) { // 8 clearBuffer(); - _serial_gps->write(UBXscratch, msglen); - if (getACK(0x06, 0x02, 500) != GNSS_RESPONSE_OK) { - LOG_WARN("Unable to disable text info messages.\n"); - } - // ToDo add M10 tests for below - if (strncmp(info.hwVersion, "00080000", 8) == 0) { - msglen = makeUBXPacket(0x06, 0x39, sizeof(_message_JAM_8), _message_JAM_8); + SEND_UBX_PACKET(0x06, 0x39, _message_JAM_8, "enable interference resistance", 500); + + clearBuffer(); + SEND_UBX_PACKET(0x06, 0x23, _message_NAVX5_8, "configure NAVX5_8 settings", 500); + } else { // 6,7,9 + SEND_UBX_PACKET(0x06, 0x39, _message_JAM_6_7, "enable interference resistance", 500); + SEND_UBX_PACKET(0x06, 0x23, _message_NAVX5, "configure NAVX5 settings", 500); + } + // Turn off unwanted NMEA messages, set update rate + SEND_UBX_PACKET(0x06, 0x08, _message_1HZ, "set GPS update rate", 500); + SEND_UBX_PACKET(0x06, 0x01, _message_GLL, "disable NMEA GLL", 500); + SEND_UBX_PACKET(0x06, 0x01, _message_GSA, "enable NMEA GSA", 500); + SEND_UBX_PACKET(0x06, 0x01, _message_GSV, "disable NMEA GSV", 500); + SEND_UBX_PACKET(0x06, 0x01, _message_VTG, "disable NMEA VTG", 500); + SEND_UBX_PACKET(0x06, 0x01, _message_RMC, "enable NMEA RMC", 500); + SEND_UBX_PACKET(0x06, 0x01, _message_GGA, "enable NMEA GGA", 500); + + if (uBloxProtocolVersion >= 18) { + clearBuffer(); + SEND_UBX_PACKET(0x06, 0x86, _message_PMS, "enable powersaving for GPS", 500); + SEND_UBX_PACKET(0x06, 0x3B, _message_CFG_PM2, "enable powersaving details for GPS", 500); + + // For M8 we want to enable NMEA vserion 4.10 so we can see the additional sats. + if (gnssModel == GNSS_MODEL_UBLOX8) { clearBuffer(); - _serial_gps->write(UBXscratch, msglen); - if (getACK(0x06, 0x39, 500) != GNSS_RESPONSE_OK) { - LOG_WARN("Unable to enable interference resistance.\n"); - } - - msglen = makeUBXPacket(0x06, 0x23, sizeof(_message_NAVX5_8), _message_NAVX5_8); - clearBuffer(); - _serial_gps->write(UBXscratch, msglen); - if (getACK(0x06, 0x23, 500) != GNSS_RESPONSE_OK) { - LOG_WARN("Unable to configure NAVX5_8 settings.\n"); - } - } else { - msglen = makeUBXPacket(0x06, 0x39, sizeof(_message_JAM_6_7), _message_JAM_6_7); - _serial_gps->write(UBXscratch, msglen); - if (getACK(0x06, 0x39, 500) != GNSS_RESPONSE_OK) { - LOG_WARN("Unable to enable interference resistance.\n"); - } - - msglen = makeUBXPacket(0x06, 0x23, sizeof(_message_NAVX5), _message_NAVX5); - _serial_gps->write(UBXscratch, msglen); - if (getACK(0x06, 0x23, 500) != GNSS_RESPONSE_OK) { - LOG_WARN("Unable to configure NAVX5 settings.\n"); - } - } - // Turn off unwanted NMEA messages, set update rate - - msglen = makeUBXPacket(0x06, 0x08, sizeof(_message_1HZ), _message_1HZ); - _serial_gps->write(UBXscratch, msglen); - if (getACK(0x06, 0x08, 500) != GNSS_RESPONSE_OK) { - LOG_WARN("Unable to set GPS update rate.\n"); - } - - msglen = makeUBXPacket(0x06, 0x01, sizeof(_message_GLL), _message_GLL); - _serial_gps->write(UBXscratch, msglen); - if (getACK(0x06, 0x01, 500) != GNSS_RESPONSE_OK) { - LOG_WARN("Unable to disable NMEA GLL.\n"); - } - - msglen = makeUBXPacket(0x06, 0x01, sizeof(_message_GSA), _message_GSA); - _serial_gps->write(UBXscratch, msglen); - if (getACK(0x06, 0x01, 500) != GNSS_RESPONSE_OK) { - LOG_WARN("Unable to Enable NMEA GSA.\n"); - } - - msglen = makeUBXPacket(0x06, 0x01, sizeof(_message_GSV), _message_GSV); - _serial_gps->write(UBXscratch, msglen); - if (getACK(0x06, 0x01, 500) != GNSS_RESPONSE_OK) { - LOG_WARN("Unable to disable NMEA GSV.\n"); - } - - msglen = makeUBXPacket(0x06, 0x01, sizeof(_message_VTG), _message_VTG); - _serial_gps->write(UBXscratch, msglen); - if (getACK(0x06, 0x01, 500) != GNSS_RESPONSE_OK) { - LOG_WARN("Unable to disable NMEA VTG.\n"); - } - - msglen = makeUBXPacket(0x06, 0x01, sizeof(_message_RMC), _message_RMC); - _serial_gps->write(UBXscratch, msglen); - if (getACK(0x06, 0x01, 500) != GNSS_RESPONSE_OK) { - LOG_WARN("Unable to enable NMEA RMC.\n"); - } - - msglen = makeUBXPacket(0x06, 0x01, sizeof(_message_GGA), _message_GGA); - _serial_gps->write(UBXscratch, msglen); - if (getACK(0x06, 0x01, 500) != GNSS_RESPONSE_OK) { - LOG_WARN("Unable to enable NMEA GGA.\n"); - } - - if (uBloxProtocolVersion >= 18) { - msglen = makeUBXPacket(0x06, 0x86, sizeof(_message_PMS), _message_PMS); - clearBuffer(); - _serial_gps->write(UBXscratch, msglen); - if (getACK(0x06, 0x86, 500) != GNSS_RESPONSE_OK) { - LOG_WARN("Unable to enable powersaving for GPS.\n"); - } - msglen = makeUBXPacket(0x06, 0x3B, sizeof(_message_CFG_PM2), _message_CFG_PM2); - _serial_gps->write(UBXscratch, msglen); - if (getACK(0x06, 0x3B, 500) != GNSS_RESPONSE_OK) { - LOG_WARN("Unable to enable powersaving details for GPS.\n"); - } - // For M8 we want to enable NMEA vserion 4.10 so we can see the additional sats. - if (strncmp(info.hwVersion, "00080000", 8) == 0) { - msglen = makeUBXPacket(0x06, 0x17, sizeof(_message_NMEA), _message_NMEA); - clearBuffer(); - _serial_gps->write(UBXscratch, msglen); - if (getACK(0x06, 0x17, 500) != GNSS_RESPONSE_OK) { - LOG_WARN("Unable to enable NMEA 4.10.\n"); - } - } - - } else { - if (strncmp(info.hwVersion, "00040007", 8) == 0) { // This PSM mode is only for Neo-6 - msglen = makeUBXPacket(0x06, 0x11, 0x2, _message_CFG_RXM_ECO); - _serial_gps->write(UBXscratch, msglen); - if (getACK(0x06, 0x11, 500) != GNSS_RESPONSE_OK) { - LOG_WARN("Unable to enable powersaving ECO mode for Neo-6.\n"); - } - msglen = makeUBXPacket(0x06, 0x3B, sizeof(_message_CFG_PM2), _message_CFG_PM2); - _serial_gps->write(UBXscratch, msglen); - if (getACK(0x06, 0x3B, 500) != GNSS_RESPONSE_OK) { - LOG_WARN("Unable to enable powersaving details for GPS.\n"); - } - msglen = makeUBXPacket(0x06, 0x01, sizeof(_message_AID), _message_AID); - _serial_gps->write(UBXscratch, msglen); - if (getACK(0x06, 0x01, 500) != GNSS_RESPONSE_OK) { - LOG_WARN("Unable to disable UBX-AID.\n"); - } - } else { - msglen = makeUBXPacket(0x06, 0x11, 0x2, _message_CFG_RXM_PSM); - _serial_gps->write(UBXscratch, msglen); - if (getACK(0x06, 0x11, 500) != GNSS_RESPONSE_OK) { - LOG_WARN("Unable to enable powersaving mode for GPS.\n"); - } - - msglen = makeUBXPacket(0x06, 0x3B, sizeof(_message_CFG_PM2), _message_CFG_PM2); - _serial_gps->write(UBXscratch, msglen); - if (getACK(0x06, 0x3B, 500) != GNSS_RESPONSE_OK) { - LOG_WARN("Unable to enable powersaving details for GPS.\n"); - } - } - } - - msglen = makeUBXPacket(0x06, 0x09, sizeof(_message_SAVE), _message_SAVE); - _serial_gps->write(UBXscratch, msglen); - if (getACK(0x06, 0x09, 2000) != GNSS_RESPONSE_OK) { - LOG_WARN("Unable to save GNSS module configuration.\n"); - } else { - LOG_INFO("GNSS module configuration saved!\n"); + SEND_UBX_PACKET(0x06, 0x17, _message_NMEA, "enable NMEA 4.10", 500); } } else { - // LOG_INFO("u-blox M10 hardware found.\n"); - delay(1000); - // First disable all NMEA messages in RAM layer - msglen = makeUBXPacket(0x06, 0x8A, sizeof(_message_VALSET_DISABLE_NMEA_RAM), _message_VALSET_DISABLE_NMEA_RAM); - clearBuffer(); - _serial_gps->write(UBXscratch, msglen); - if (getACK(0x06, 0x8A, 300) != GNSS_RESPONSE_OK) { - LOG_WARN("Unable to disable NMEA messages for M10 GPS RAM.\n"); - } - delay(250); - // Next disable unwanted NMEA messages in BBR layer - msglen = makeUBXPacket(0x06, 0x8A, sizeof(_message_VALSET_DISABLE_NMEA_BBR), _message_VALSET_DISABLE_NMEA_BBR); - clearBuffer(); - _serial_gps->write(UBXscratch, msglen); - if (getACK(0x06, 0x8A, 300) != GNSS_RESPONSE_OK) { - LOG_WARN("Unable to disable NMEA messages for M10 GPS BBR.\n"); - } - delay(250); - // Disable Info txt messages in RAM layer - msglen = - makeUBXPacket(0x06, 0x8A, sizeof(_message_VALSET_DISABLE_TXT_INFO_RAM), _message_VALSET_DISABLE_TXT_INFO_RAM); - clearBuffer(); - _serial_gps->write(UBXscratch, msglen); - if (getACK(0x06, 0x8A, 300) != GNSS_RESPONSE_OK) { - LOG_WARN("Unable to disable Info messages for M10 GPS RAM.\n"); - } - delay(250); - // Next disable Info txt messages in BBR layer - msglen = - makeUBXPacket(0x06, 0x8A, sizeof(_message_VALSET_DISABLE_TXT_INFO_BBR), _message_VALSET_DISABLE_TXT_INFO_BBR); - clearBuffer(); - _serial_gps->write(UBXscratch, msglen); - if (getACK(0x06, 0x8A, 300) != GNSS_RESPONSE_OK) { - LOG_WARN("Unable to disable Info messages for M10 GPS BBR.\n"); - } - // Do M10 configuration for Power Management. + SEND_UBX_PACKET(0x06, 0x11, _message_CFG_RXM_PSM, "enable powersaving mode for GPS", 500); + SEND_UBX_PACKET(0x06, 0x3B, _message_CFG_PM2, "enable powersaving details for GPS", 500); + } - msglen = makeUBXPacket(0x06, 0x8A, sizeof(_message_VALSET_PM_RAM), _message_VALSET_PM_RAM); - _serial_gps->write(UBXscratch, msglen); - if (getACK(0x06, 0x8A, 300) != GNSS_RESPONSE_OK) { - LOG_WARN("Unable to enable powersaving for M10 GPS RAM.\n"); - } - msglen = makeUBXPacket(0x06, 0x8A, sizeof(_message_VALSET_PM_BBR), _message_VALSET_PM_BBR); - _serial_gps->write(UBXscratch, msglen); - if (getACK(0x06, 0x8A, 300) != GNSS_RESPONSE_OK) { - LOG_WARN("Unable to enable powersaving for M10 GPS BBR.\n"); - } + msglen = makeUBXPacket(0x06, 0x09, sizeof(_message_SAVE), _message_SAVE); + _serial_gps->write(UBXscratch, msglen); + if (getACK(0x06, 0x09, 2000) != GNSS_RESPONSE_OK) { + LOG_WARN("Unable to save GNSS module configuration.\n"); + } else { + LOG_INFO("GNSS module configuration saved!\n"); + } + } else if (gnssModel == GNSS_MODEL_UBLOX10) { + delay(1000); + clearBuffer(); + SEND_UBX_PACKET(0x06, 0x8A, _message_VALSET_DISABLE_NMEA_RAM, "disable NMEA messages in M10 RAM", 300); + delay(750); + clearBuffer(); + SEND_UBX_PACKET(0x06, 0x8A, _message_VALSET_DISABLE_NMEA_BBR, "disable NMEA messages in M10 BBR", 300); + delay(750); + clearBuffer(); + SEND_UBX_PACKET(0x06, 0x8A, _message_VALSET_DISABLE_TXT_INFO_RAM, "disable Info messages for M10 GPS RAM", 300); + delay(750); + // Next disable Info txt messages in BBR layer + clearBuffer(); + SEND_UBX_PACKET(0x06, 0x8A, _message_VALSET_DISABLE_TXT_INFO_BBR, "disable Info messages for M10 GPS BBR", 300); + delay(750); + // Do M10 configuration for Power Management. + SEND_UBX_PACKET(0x06, 0x8A, _message_VALSET_PM_RAM, "enable powersaving for M10 GPS RAM", 300); + delay(750); + SEND_UBX_PACKET(0x06, 0x8A, _message_VALSET_PM_BBR, "enable powersaving for M10 GPS BBR", 300); + delay(750); + SEND_UBX_PACKET(0x06, 0x8A, _message_VALSET_ITFM_RAM, "enable Jamming detection M10 GPS RAM", 300); + delay(750); + SEND_UBX_PACKET(0x06, 0x8A, _message_VALSET_ITFM_BBR, "enable Jamming detection M10 GPS BBR", 300); + delay(750); + // Here is where the init commands should go to do further M10 initialization. + SEND_UBX_PACKET(0x06, 0x8A, _message_VALSET_DISABLE_SBAS_RAM, "disable SBAS M10 GPS RAM", 300); + delay(750); // will cause a receiver restart so wait a bit + SEND_UBX_PACKET(0x06, 0x8A, _message_VALSET_DISABLE_SBAS_BBR, "disable SBAS M10 GPS BBR", 300); + delay(750); // will cause a receiver restart so wait a bit - delay(250); - msglen = makeUBXPacket(0x06, 0x8A, sizeof(_message_VALSET_ITFM_RAM), _message_VALSET_ITFM_RAM); - _serial_gps->write(UBXscratch, msglen); - if (getACK(0x06, 0x8A, 300) != GNSS_RESPONSE_OK) { - LOG_WARN("Unable to enable Jamming detection M10 GPS RAM.\n"); - } - msglen = makeUBXPacket(0x06, 0x8A, sizeof(_message_VALSET_ITFM_BBR), _message_VALSET_ITFM_BBR); - _serial_gps->write(UBXscratch, msglen); - if (getACK(0x06, 0x8A, 300) != GNSS_RESPONSE_OK) { - LOG_WARN("Unable to enable Jamming detection M10 GPS BBR.\n"); - } + // Done with initialization, Now enable wanted NMEA messages in BBR layer so they will survive a periodic sleep. + SEND_UBX_PACKET(0x06, 0x8A, _message_VALSET_ENABLE_NMEA_BBR, "enable messages for M10 GPS BBR", 300); + delay(750); + // Next enable wanted NMEA messages in RAM layer + SEND_UBX_PACKET(0x06, 0x8A, _message_VALSET_ENABLE_NMEA_RAM, "enable messages for M10 GPS RAM", 500); + delay(750); - // Here is where the init commands should go to do further M10 initialization. - delay(250); - msglen = makeUBXPacket(0x06, 0x8A, sizeof(_message_VALSET_DISABLE_SBAS_RAM), _message_VALSET_DISABLE_SBAS_RAM); - _serial_gps->write(UBXscratch, msglen); - if (getACK(0x06, 0x8A, 300) != GNSS_RESPONSE_OK) { - LOG_WARN("Unable to disable SBAS M10 GPS RAM.\n"); - } - delay(750); // will cause a receiver restart so wait a bit - msglen = makeUBXPacket(0x06, 0x8A, sizeof(_message_VALSET_DISABLE_SBAS_BBR), _message_VALSET_DISABLE_SBAS_BBR); - _serial_gps->write(UBXscratch, msglen); - if (getACK(0x06, 0x8A, 300) != GNSS_RESPONSE_OK) { - LOG_WARN("Unable to disable SBAS M10 GPS BBR.\n"); - } - delay(750); // will cause a receiver restart so wait a bit - // Done with initialization, Now enable wanted NMEA messages in BBR layer so they will survive a periodic sleep. - msglen = makeUBXPacket(0x06, 0x8A, sizeof(_message_VALSET_ENABLE_NMEA_BBR), _message_VALSET_ENABLE_NMEA_BBR); - _serial_gps->write(UBXscratch, msglen); - if (getACK(0x06, 0x8A, 300) != GNSS_RESPONSE_OK) { - LOG_WARN("Unable to enable messages for M10 GPS BBR.\n"); - } - delay(250); - // Next enable wanted NMEA messages in RAM layer - msglen = makeUBXPacket(0x06, 0x8A, sizeof(_message_VALSET_ENABLE_NMEA_RAM), _message_VALSET_ENABLE_NMEA_RAM); - _serial_gps->write(UBXscratch, msglen); - if (getACK(0x06, 0x8A, 300) != GNSS_RESPONSE_OK) { - LOG_WARN("Unable to enable messages for M10 GPS RAM.\n"); - } - // As the M10 has no flash, the best we can do to preserve the config is to set it in RAM and BBR. - // BBR will survive a restart, and power off for a while, but modules with small backup - // batteries or super caps will not retain the config for a long power off time. + // As the M10 has no flash, the best we can do to preserve the config is to set it in RAM and BBR. + // BBR will survive a restart, and power off for a while, but modules with small backup + // batteries or super caps will not retain the config for a long power off time. + msglen = makeUBXPacket(0x06, 0x09, sizeof(_message_SAVE_10), _message_SAVE_10); + _serial_gps->write(UBXscratch, msglen); + if (getACK(0x06, 0x09, 2000) != GNSS_RESPONSE_OK) { + LOG_WARN("Unable to save GNSS module configuration.\n"); + } else { + LOG_INFO("GNSS module configuration saved!\n"); } } didSerialInit = true; } notifyDeepSleepObserver.observe(¬ifyDeepSleep); - notifyGPSSleepObserver.observe(¬ifyGPSSleep); return true; } @@ -604,78 +684,193 @@ GPS::~GPS() { // we really should unregister our sleep observer notifyDeepSleepObserver.unobserve(¬ifyDeepSleep); - notifyGPSSleepObserver.observe(¬ifyGPSSleep); +} +// Put the GPS hardware into a specified state +void GPS::setPowerState(GPSPowerState newState, uint32_t sleepTime) +{ + // Update the stored GPSPowerstate, and create local copies + GPSPowerState oldState = powerState; + powerState = newState; + LOG_INFO("GPS power state moving from %s to %s\n", getGPSPowerStateString(oldState), getGPSPowerStateString(newState)); + +#ifdef HELTEC_MESH_NODE_T114 + if ((oldState == GPS_OFF || oldState == GPS_HARDSLEEP) && (newState != GPS_OFF && newState != GPS_HARDSLEEP)) { + _serial_gps->begin(serialSpeeds[speedSelect]); + } else if ((newState == GPS_OFF || newState == GPS_HARDSLEEP) && (oldState != GPS_OFF && oldState != GPS_HARDSLEEP)) { + _serial_gps->end(); + } +#endif + switch (newState) { + case GPS_ACTIVE: + case GPS_IDLE: + if (oldState == GPS_ACTIVE || oldState == GPS_IDLE) // If hardware already awake, no changes needed + break; + if (oldState != GPS_ACTIVE && oldState != GPS_IDLE) // If hardware just waking now, clear buffer + clearBuffer(); + powerMon->setState(meshtastic_PowerMon_State_GPS_Active); // Report change for power monitoring (during testing) + writePinEN(true); // Power (EN pin): on + setPowerPMU(true); // Power (PMU): on + writePinStandby(false); // Standby (pin): awake (not standby) + setPowerUBLOX(true); // Standby (UBLOX): awake + break; + + case GPS_SOFTSLEEP: + powerMon->clearState(meshtastic_PowerMon_State_GPS_Active); // Report change for power monitoring (during testing) + writePinEN(true); // Power (EN pin): on + setPowerPMU(true); // Power (PMU): on + writePinStandby(true); // Standby (pin): asleep (not awake) + setPowerUBLOX(false, sleepTime); // Standby (UBLOX): asleep, timed + break; + + case GPS_HARDSLEEP: + powerMon->clearState(meshtastic_PowerMon_State_GPS_Active); // Report change for power monitoring (during testing) + writePinEN(false); // Power (EN pin): off + setPowerPMU(false); // Power (PMU): off + writePinStandby(true); // Standby (pin): asleep (not awake) + setPowerUBLOX(false, sleepTime); // Standby (UBLOX): asleep, timed +#ifdef GNSS_AIROHA + if (config.position.gps_update_interval * 1000 >= GPS_FIX_HOLD_TIME * 2) { + digitalWrite(PIN_GPS_EN, LOW); + } +#endif + break; + + case GPS_OFF: + assert(sleepTime == 0); // This is an indefinite sleep + powerMon->clearState(meshtastic_PowerMon_State_GPS_Active); // Report change for power monitoring (during testing) + writePinEN(false); // Power (EN pin): off + setPowerPMU(false); // Power (PMU): off + writePinStandby(true); // Standby (pin): asleep + setPowerUBLOX(false, 0); // Standby (UBLOX): asleep, indefinitely +#ifdef GNSS_AIROHA + if (config.position.gps_update_interval * 1000 >= GPS_FIX_HOLD_TIME * 2) { + digitalWrite(PIN_GPS_EN, LOW); + } +#endif + break; + } } -void GPS::setGPSPower(bool on, bool standbyOnly, uint32_t sleepTime) +// Set power with EN pin, if relevant +void GPS::writePinEN(bool on) { - LOG_INFO("Setting GPS power=%d\n", on); - if (on) { - clearBuffer(); // drop any old data waiting in the buffer before re-enabling - if (en_gpio) - digitalWrite(en_gpio, on ? GPS_EN_ACTIVE : !GPS_EN_ACTIVE); // turn this on if defined, every time - } - isInPowersave = !on; - if (!standbyOnly && en_gpio != 0 && - !(HW_VENDOR == meshtastic_HardwareModel_RAK4631 && (rotaryEncoderInterruptImpl1 || upDownInterruptImpl1))) { - LOG_DEBUG("GPS powerdown using GPS_EN_ACTIVE\n"); - digitalWrite(en_gpio, on ? GPS_EN_ACTIVE : !GPS_EN_ACTIVE); + // Abort: if conflict with Canned Messages when using Wisblock(?) + if (HW_VENDOR == meshtastic_HardwareModel_RAK4631 && (rotaryEncoderInterruptImpl1 || upDownInterruptImpl1)) return; - } -#ifdef HAS_PMU // We only have PMUs on the T-Beam, and that board has a tiny battery to save GPS ephemera, so treat as a standby. - if (pmu_found && PMU) { - uint8_t model = PMU->getChipModel(); - if (model == XPOWERS_AXP2101) { - if (HW_VENDOR == meshtastic_HardwareModel_TBEAM) { - // t-beam v1.2 GNSS power channel - on ? PMU->enablePowerOutput(XPOWERS_ALDO3) : PMU->disablePowerOutput(XPOWERS_ALDO3); - } else if (HW_VENDOR == meshtastic_HardwareModel_LILYGO_TBEAM_S3_CORE) { - // t-beam-s3-core GNSS power channel - on ? PMU->enablePowerOutput(XPOWERS_ALDO4) : PMU->disablePowerOutput(XPOWERS_ALDO4); - } - } else if (model == XPOWERS_AXP192) { - // t-beam v1.1 GNSS power channel - on ? PMU->enablePowerOutput(XPOWERS_LDO3) : PMU->disablePowerOutput(XPOWERS_LDO3); - } - return; - } + + // Write and log + enablePin->set(on); +#ifdef GPS_EXTRAVERBOSE + LOG_DEBUG("Pin EN %s\n", val == HIGH ? "HIGH" : "LOW"); #endif -#ifdef PIN_GPS_STANDBY // Specifically the standby pin for L76K and clones - if (on) { - LOG_INFO("Waking GPS"); - pinMode(PIN_GPS_STANDBY, OUTPUT); - digitalWrite(PIN_GPS_STANDBY, 1); - return; - } else { - LOG_INFO("GPS entering sleep"); - // notifyGPSSleep.notifyObservers(NULL); - pinMode(PIN_GPS_STANDBY, OUTPUT); - digitalWrite(PIN_GPS_STANDBY, 0); - return; - } +} + +// Set the value of the STANDBY pin, if relevant +// true for standby state, false for awake +void GPS::writePinStandby(bool standby) +{ +#ifdef PIN_GPS_STANDBY // Specifically the standby pin for L76B, L76K and clones + +// Determine the new value for the pin +// Normally: active HIGH for awake +#ifdef PIN_GPS_STANDBY_INVERTED + bool val = standby; +#else + bool val = !standby; #endif - if (!on) { - if (gnssModel == GNSS_MODEL_UBLOX) { - uint8_t msglen; - LOG_DEBUG("Sleep Time: %i\n", sleepTime); - if (strncmp(info.hwVersion, "000A0000", 8) != 0) { - for (int i = 0; i < 4; i++) { - gps->_message_PMREQ[0 + i] = sleepTime >> (i * 8); // Encode the sleep time in millis into the packet - } - msglen = gps->makeUBXPacket(0x02, 0x41, sizeof(_message_PMREQ), gps->_message_PMREQ); - } else { - for (int i = 0; i < 4; i++) { - gps->_message_PMREQ_10[4 + i] = sleepTime >> (i * 8); // Encode the sleep time in millis into the packet - } - msglen = gps->makeUBXPacket(0x02, 0x41, sizeof(_message_PMREQ_10), gps->_message_PMREQ_10); - } - gps->_serial_gps->write(gps->UBXscratch, msglen); + + // Write and log + pinMode(PIN_GPS_STANDBY, OUTPUT); + digitalWrite(PIN_GPS_STANDBY, val); +#ifdef GPS_EXTRAVERBOSE + LOG_DEBUG("Pin STANDBY %s\n", val == HIGH ? "HIGH" : "LOW"); +#endif +#endif +} + +// Enable / Disable GPS with PMU, if present +void GPS::setPowerPMU(bool on) +{ + // We only have PMUs on the T-Beam, and that board has a tiny battery to save GPS ephemera, + // so treat as a standby. +#ifdef HAS_PMU + // Abort: if no PMU + if (!pmu_found) + return; + + // Abort: if PMU not initialized + if (!PMU) + return; + + uint8_t model = PMU->getChipModel(); + if (model == XPOWERS_AXP2101) { + if (HW_VENDOR == meshtastic_HardwareModel_TBEAM) { + // t-beam v1.2 GNSS power channel + on ? PMU->enablePowerOutput(XPOWERS_ALDO3) : PMU->disablePowerOutput(XPOWERS_ALDO3); + } else if (HW_VENDOR == meshtastic_HardwareModel_LILYGO_TBEAM_S3_CORE) { + // t-beam-s3-core GNSS power channel + on ? PMU->enablePowerOutput(XPOWERS_ALDO4) : PMU->disablePowerOutput(XPOWERS_ALDO4); } - } else { - if (gnssModel == GNSS_MODEL_UBLOX) { - gps->_serial_gps->write(0xFF); - clearBuffer(); // This often returns old data, so drop it + } else if (model == XPOWERS_AXP192) { + // t-beam v1.1 GNSS power channel + on ? PMU->enablePowerOutput(XPOWERS_LDO3) : PMU->disablePowerOutput(XPOWERS_LDO3); + } + +#ifdef GPS_EXTRAVERBOSE + LOG_DEBUG("PMU %s\n", on ? "on" : "off"); +#endif +#endif +} + +// Set UBLOX power, if relevant +void GPS::setPowerUBLOX(bool on, uint32_t sleepMs) +{ + // Abort: if not UBLOX hardware + if (!IS_ONE_OF(gnssModel, GNSS_MODEL_UBLOX6, GNSS_MODEL_UBLOX7, GNSS_MODEL_UBLOX8, GNSS_MODEL_UBLOX9, GNSS_MODEL_UBLOX10)) + return; + + // If waking + if (on) { + gps->_serial_gps->write(0xFF); + clearBuffer(); // This often returns old data, so drop it +#ifdef GPS_EXTRAVERBOSE + LOG_DEBUG("UBLOX: wake\n"); +#endif + } + + // If putting to sleep + else { + uint8_t msglen; + + // If we're being asked to sleep indefinitely, make *sure* we're awake first, to process the new sleep command + if (sleepMs == 0) { + setPowerUBLOX(true); + delay(500); } + + // Determine hardware version + if (gnssModel == GNSS_MODEL_UBLOX10) { + // Encode the sleep time in millis into the packet + for (int i = 0; i < 4; i++) + gps->_message_PMREQ[0 + i] = sleepMs >> (i * 8); + + // Record the message length + msglen = gps->makeUBXPacket(0x02, 0x41, sizeof(_message_PMREQ), gps->_message_PMREQ); + } else { + // Encode the sleep time in millis into the packet + for (int i = 0; i < 4; i++) + gps->_message_PMREQ_10[4 + i] = sleepMs >> (i * 8); + + // Record the message length + msglen = gps->makeUBXPacket(0x02, 0x41, sizeof(_message_PMREQ_10), gps->_message_PMREQ_10); + } + + // Send the UBX packet + gps->_serial_gps->write(gps->UBXscratch, msglen); + +#ifdef GPS_EXTRAVERBOSE + LOG_DEBUG("UBLOX: sleep for %dmS\n", sleepMs); +#endif } } @@ -688,81 +883,57 @@ void GPS::setConnected() } } -/** - * Switch the GPS into a mode where we are actively looking for a lock, or alternatively switch GPS into a low power mode - * - * calls sleep/wake - */ -void GPS::setAwake(bool on) +// We want a GPS lock. Wake the hardware +void GPS::up() { - if (isAwake != on) { - LOG_DEBUG("WANT GPS=%d\n", on); - isAwake = on; - if (!enabled) { // short circuit if the user has disabled GPS - setGPSPower(false, false, 0); - return; - } + scheduling.informSearching(); + setPowerState(GPS_ACTIVE); +} - if (on) { - lastWakeStartMsec = millis(); - } else { - lastSleepStartMsec = millis(); - if (GPSCycles == 1) { // Skipping initial lock time, as it will likely be much longer than average - averageLockTime = lastSleepStartMsec - lastWakeStartMsec; - } else if (GPSCycles > 1) { - averageLockTime += ((int32_t)(lastSleepStartMsec - lastWakeStartMsec) - averageLockTime) / (int32_t)GPSCycles; - } - GPSCycles++; - LOG_DEBUG("GPS Lock took %d, average %d\n", (lastSleepStartMsec - lastWakeStartMsec) / 1000, averageLockTime / 1000); - } - if ((int32_t)getSleepTime() - averageLockTime > - 15 * 60 * 1000) { // 15 minutes is probably long enough to make a complete poweroff worth it. - setGPSPower(on, false, getSleepTime() - averageLockTime); - return; - } else if ((int32_t)getSleepTime() - averageLockTime > 10000) { // 10 seconds is enough for standby -#ifdef GPS_UC6580 - setGPSPower(on, false, getSleepTime() - averageLockTime); -#else - setGPSPower(on, true, getSleepTime() - averageLockTime); +// We've got a GPS lock. Enter a low power state, potentially. +void GPS::down() +{ + scheduling.informGotLock(); + uint32_t predictedSearchDuration = scheduling.predictedSearchDurationMs(); + uint32_t sleepTime = scheduling.msUntilNextSearch(); + uint32_t updateInterval = Default::getConfiguredOrDefaultMs(config.position.gps_update_interval); + + LOG_DEBUG("%us until next search\n", sleepTime / 1000); + + // If update interval less than 10 seconds, no attempt to sleep + if (updateInterval <= 10 * 1000UL || sleepTime == 0) + setPowerState(GPS_IDLE); + + else { + // Check whether the GPS hardware is capable of GPS_SOFTSLEEP + // If not, fallback to GPS_HARDSLEEP instead + bool softsleepSupported = false; + // U-blox is supported via PMREQ + if (IS_ONE_OF(gnssModel, GNSS_MODEL_UBLOX6, GNSS_MODEL_UBLOX7, GNSS_MODEL_UBLOX8, GNSS_MODEL_UBLOX9, GNSS_MODEL_UBLOX10)) + softsleepSupported = true; +#ifdef PIN_GPS_STANDBY // L76B, L76K and clones have a standby pin + softsleepSupported = true; #endif - return; + + if (softsleepSupported) { + // How long does gps_update_interval need to be, for GPS_HARDSLEEP to become more efficient than GPS_SOFTSLEEP? + // Heuristic equation. A compromise manually fitted to power observations from U-blox NEO-6M and M10050 + // https://www.desmos.com/calculator/6gvjghoumr + // This is not particularly accurate, but probably an impromevement over a single, fixed threshold + uint32_t hardsleepThreshold = (2750 * pow(predictedSearchDuration / 1000, 1.22)); + LOG_DEBUG("gps_update_interval >= %us needed to justify hardsleep\n", hardsleepThreshold / 1000); + + // If update interval too short: softsleep (if supported by hardware) + if (updateInterval < hardsleepThreshold) { + setPowerState(GPS_SOFTSLEEP, sleepTime); + return; + } } - if (averageLockTime > 20000) { - averageLockTime -= 1000; // eventually want to sleep again. - } - if (on) - setGPSPower(true, true, 0); // make sure we don't have a fallthrough where GPS is stuck off + // If update interval long enough (or softsleep unsupported): hardsleep instead + setPowerState(GPS_HARDSLEEP, sleepTime); } } -/** Get how long we should stay looking for each acquisition in msecs - */ -uint32_t GPS::getWakeTime() const -{ - uint32_t t = config.position.position_broadcast_secs; - - if (t == UINT32_MAX) - return t; // already maxint - - return getConfiguredOrDefaultMs(t, default_broadcast_interval_secs); -} - -/** Get how long we should sleep between aqusition attempts in msecs - */ -uint32_t GPS::getSleepTime() const -{ - uint32_t t = config.position.gps_update_interval; - - // We'll not need the GPS thread to wake up again after first acq. with fixed position. - if (config.position.gps_mode != meshtastic_Config_PositionConfig_GpsMode_ENABLED || config.position.fixed_position) - t = UINT32_MAX; // Sleep forever now - - if (t == UINT32_MAX) - return t; // already maxint - - return t * 1000; -} - void GPS::publishUpdate() { if (shouldPublish) { @@ -800,7 +971,7 @@ int32_t GPS::runOnce() LOG_WARN("GPS FactoryReset requested\n"); if (gps->factoryReset()) { // If we don't succeed try again next time devicestate.did_gps_reset = true; - nodeDB.saveToDisk(SEGMENT_DEVICESTATE); + nodeDB->saveToDisk(SEGMENT_DEVICESTATE); } } GPSInitFinished = true; @@ -811,16 +982,18 @@ int32_t GPS::runOnce() return disable(); } - if (whileIdle()) { + if (whileActive()) { // if we have received valid NMEA claim we are connected setConnected(); } else { - if ((config.position.gps_mode == meshtastic_Config_PositionConfig_GpsMode_ENABLED) && (gnssModel == GNSS_MODEL_UBLOX)) { + if ((config.position.gps_mode == meshtastic_Config_PositionConfig_GpsMode_ENABLED) && + IS_ONE_OF(gnssModel, GNSS_MODEL_UBLOX6, GNSS_MODEL_UBLOX7, GNSS_MODEL_UBLOX8, GNSS_MODEL_UBLOX9, + GNSS_MODEL_UBLOX10)) { // reset the GPS on next bootup - if (devicestate.did_gps_reset && (millis() - lastWakeStartMsec > 60000) && !hasFlow()) { + if (devicestate.did_gps_reset && scheduling.elapsedSearchMs() > 60 * 1000UL && !hasFlow()) { LOG_DEBUG("GPS is not communicating, trying factory reset on next bootup.\n"); devicestate.did_gps_reset = false; - nodeDB.saveDeviceStateToDisk(); + nodeDB->saveToDisk(SEGMENT_DEVICESTATE); return disable(); // Stop the GPS thread as it can do nothing useful until next reboot. } } @@ -832,54 +1005,43 @@ int32_t GPS::runOnce() // gps->factoryReset(); } - // If we are overdue for an update, turn on the GPS and at least publish the current status - uint32_t now = millis(); - uint32_t timeAsleep = now - lastSleepStartMsec; + // If we're due for an update, wake the GPS + if (!config.position.fixed_position && powerState != GPS_ACTIVE && scheduling.isUpdateDue()) + up(); - auto sleepTime = getSleepTime(); - if (!isAwake && (sleepTime != UINT32_MAX) && - ((timeAsleep > sleepTime) || (isInPowersave && timeAsleep > (sleepTime - averageLockTime)))) { - // We now want to be awake - so wake up the GPS - setAwake(true); + // If we've already set time from the GPS, no need to ask the GPS + bool gotTime = (getRTCQuality() >= RTCQualityGPS); + if (!gotTime && lookForTime()) { // Note: we count on this && short-circuiting and not resetting the RTC time + gotTime = true; + shouldPublish = true; } - // While we are awake - if (isAwake) { - // LOG_DEBUG("looking for location\n"); - // If we've already set time from the GPS, no need to ask the GPS - bool gotTime = (getRTCQuality() >= RTCQualityGPS); - if (!gotTime && lookForTime()) { // Note: we count on this && short-circuiting and not resetting the RTC time - gotTime = true; - shouldPublish = true; - } + bool gotLoc = lookForLocation(); + if (gotLoc && !hasValidLocation) { // declare that we have location ASAP + LOG_DEBUG("hasValidLocation RISING EDGE\n"); + hasValidLocation = true; + shouldPublish = true; + } - bool gotLoc = lookForLocation(); - if (gotLoc && !hasValidLocation) { // declare that we have location ASAP - LOG_DEBUG("hasValidLocation RISING EDGE\n"); - hasValidLocation = true; - shouldPublish = true; - } + bool tooLong = scheduling.searchedTooLong(); + if (tooLong) + LOG_WARN("Couldn't publish a valid location: didn't get a GPS lock in time.\n"); - now = millis(); - auto wakeTime = getWakeTime(); - bool tooLong = wakeTime != UINT32_MAX && (now - lastWakeStartMsec) > wakeTime; + // Once we get a location we no longer desperately want an update + // LOG_DEBUG("gotLoc %d, tooLong %d, gotTime %d\n", gotLoc, tooLong, gotTime); + if ((gotLoc && gotTime) || tooLong) { - // Once we get a location we no longer desperately want an update - // LOG_DEBUG("gotLoc %d, tooLong %d, gotTime %d\n", gotLoc, tooLong, gotTime); - if ((gotLoc && gotTime) || tooLong) { - - if (tooLong) { - // we didn't get a location during this ack window, therefore declare loss of lock - if (hasValidLocation) { - LOG_DEBUG("hasValidLocation FALLING EDGE (last read: %d)\n", gotLoc); - } - p = meshtastic_Position_init_default; - hasValidLocation = false; + if (tooLong) { + // we didn't get a location during this ack window, therefore declare loss of lock + if (hasValidLocation) { + LOG_DEBUG("hasValidLocation FALLING EDGE\n"); } - - setAwake(false); - shouldPublish = true; // publish our update for this just finished acquisition window + p = meshtastic_Position_init_default; + hasValidLocation = false; } + + down(); + shouldPublish = true; // publish our update for this just finished acquisition window } // If state has changed do a publish @@ -890,7 +1052,7 @@ int32_t GPS::runOnce() // 9600bps is approx 1 byte per msec, so considering our buffer size we never need to wake more often than 200ms // if not awake we can run super infrquently (once every 5 secs?) to see if we need to wake. - return isAwake ? GPS_THREAD_INTERVAL : 5000; + return (powerState == GPS_ACTIVE) ? GPS_THREAD_INTERVAL : 5000; } // clear the GPS rx buffer as quickly as possible @@ -905,43 +1067,69 @@ void GPS::clearBuffer() int GPS::prepareDeepSleep(void *unused) { LOG_INFO("GPS deep sleep!\n"); - - setAwake(false); - + disable(); return 0; } +const char *PROBE_MESSAGE = "Trying %s (%s)...\n"; +const char *DETECTED_MESSAGE = "%s detected, using %s Module\n"; + +#define PROBE_SIMPLE(CHIP, TOWRITE, RESPONSE, DRIVER, TIMEOUT, ...) \ + LOG_DEBUG(PROBE_MESSAGE, TOWRITE, CHIP); \ + clearBuffer(); \ + _serial_gps->write(TOWRITE "\r\n"); \ + if (getACK(RESPONSE, TIMEOUT) == GNSS_RESPONSE_OK) { \ + LOG_INFO(DETECTED_MESSAGE, CHIP, #DRIVER); \ + return DRIVER; \ + } + GnssModel_t GPS::probe(int serialSpeed) { -#if defined(ARCH_NRF52) || defined(ARCH_PORTDUINO) || defined(ARCH_RP2040) +#if defined(ARCH_NRF52) || defined(ARCH_PORTDUINO) || defined(ARCH_STM32WL) _serial_gps->end(); _serial_gps->begin(serialSpeed); +#elif defined(ARCH_RP2040) + _serial_gps->end(); + _serial_gps->setFIFOSize(256); + _serial_gps->begin(serialSpeed); #else if (_serial_gps->baudRate() != serialSpeed) { LOG_DEBUG("Setting Baud to %i\n", serialSpeed); _serial_gps->updateBaudRate(serialSpeed); } #endif -#ifdef GPS_DEBUG - for (int i = 0; i < 20; i++) { - getACK("$GP", 200); - } -#endif + memset(&info, 0, sizeof(struct uBloxGnssModelInfo)); uint8_t buffer[768] = {0}; delay(100); - // Close all NMEA sentences , Only valid for MTK platform + // Close all NMEA sentences, valid for L76K, ATGM336H (and likely other AT6558 devices) _serial_gps->write("$PCAS03,0,0,0,0,0,0,0,0,0,0,,,0,0*02\r\n"); delay(20); - // Get version information - clearBuffer(); - _serial_gps->write("$PCAS06,0*1B\r\n"); - if (getACK("$GPTXT,01,01,02,SW=", 500) == GNSS_RESPONSE_OK) { - LOG_INFO("L76K GNSS init succeeded, using L76K GNSS Module\n"); - return GNSS_MODEL_MTK; - } + // Unicore UFirebirdII Series: UC6580, UM620, UM621, UM670A, UM680A, or UM681A + PROBE_SIMPLE("UC6580", "$PDTINFO", "UC6580", GNSS_MODEL_UC6580, 500); + PROBE_SIMPLE("UM600", "$PDTINFO", "UM600", GNSS_MODEL_UC6580, 500); + PROBE_SIMPLE("ATGM336H", "$PCAS06,1*1A", "$GPTXT,01,01,02,HW=ATGM336H", GNSS_MODEL_ATGM336H, 500); + /* ATGM332D series (-11(GPS), -21(BDS), -31(GPS+BDS), -51(GPS+GLONASS), -71-0(GPS+BDS+GLONASS)) + based on AT6558 */ + PROBE_SIMPLE("ATGM332D", "$PCAS06,1*1A", "$GPTXT,01,01,02,HW=ATGM332D", GNSS_MODEL_ATGM336H, 500); + + /* Airoha (Mediatek) AG3335A/M/S, A3352Q, Quectel L89 2.0, SimCom SIM65M */ + _serial_gps->write("$PAIR062,2,0*3C\r\n"); // GSA OFF to reduce volume + _serial_gps->write("$PAIR062,3,0*3D\r\n"); // GSV OFF to reduce volume + _serial_gps->write("$PAIR513*3D\r\n"); // save configuration + PROBE_SIMPLE("AG3335", "$PAIR021*39", "$PAIR021,AG3335", GNSS_MODEL_AG3335, 500); + PROBE_SIMPLE("AG3352", "$PAIR021*39", "$PAIR021,AG3352", GNSS_MODEL_AG3352, 500); + PROBE_SIMPLE("LC86", "$PQTMVERNO*58", "$PQTMVERNO,LC86", GNSS_MODEL_AG3352, 500); + + PROBE_SIMPLE("L76K", "$PCAS06,0*1B", "$GPTXT,01,01,02,SW=", GNSS_MODEL_MTK, 500); + + // Close all NMEA sentences, valid for L76B MTK platform (Waveshare Pico GPS) + _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"); + delay(20); + + PROBE_SIMPLE("L76B", "$PMTK605*31", "Quectel-L76B", GNSS_MODEL_MTK_L76B, 500); uint8_t cfg_rate[] = {0xB5, 0x62, 0x06, 0x08, 0x00, 0x00, 0x00, 0x00}; UBXChecksum(cfg_rate, sizeof(cfg_rate)); @@ -968,9 +1156,13 @@ GnssModel_t GPS::probe(int serialSpeed) _serial_gps->write(_message_prt, sizeof(_message_prt)); delay(500); serialSpeed = 9600; -#if defined(ARCH_NRF52) || defined(ARCH_PORTDUINO) || defined(ARCH_RP2040) +#if defined(ARCH_NRF52) || defined(ARCH_PORTDUINO) || defined(ARCH_STM32WL) _serial_gps->end(); _serial_gps->begin(serialSpeed); +#elif defined(ARCH_RP2040) + _serial_gps->end(); + _serial_gps->setFIFOSize(256); + _serial_gps->begin(serialSpeed); #else _serial_gps->updateBaudRate(serialSpeed); #endif @@ -1028,9 +1220,9 @@ GnssModel_t GPS::probe(int serialSpeed) strncpy((char *)buffer, &(info.extension[i][4]), sizeof(buffer)); // LOG_DEBUG("GetModel:%s\n", (char *)buffer); if (strlen((char *)buffer)) { - LOG_INFO("UBlox GNSS probe succeeded, using UBlox %s GNSS Module\n", (char *)buffer); + LOG_INFO("%s detected, using GNSS_MODEL_UBLOX\n", (char *)buffer); } else { - LOG_INFO("UBlox GNSS probe succeeded, using UBlox GNSS Module\n"); + LOG_INFO("Generic Ublox detected, using GNSS_MODEL_UBLOX\n"); } } else if (!strncmp(info.extension[i], "PROTVER", 7)) { char *ptr = nullptr; @@ -1045,9 +1237,20 @@ GnssModel_t GPS::probe(int serialSpeed) } } } + if (strncmp(info.hwVersion, "00040007", 8) == 0) { + return GNSS_MODEL_UBLOX6; + } else if (strncmp(info.hwVersion, "00070000", 8) == 0) { + return GNSS_MODEL_UBLOX7; + } else if (strncmp(info.hwVersion, "00080000", 8) == 0) { + return GNSS_MODEL_UBLOX8; + } else if (strncmp(info.hwVersion, "00190000", 8) == 0) { + return GNSS_MODEL_UBLOX9; + } else if (strncmp(info.hwVersion, "000A0000", 8) == 0) { + return GNSS_MODEL_UBLOX10; + } } - return GNSS_MODEL_UBLOX; + return GNSS_MODEL_UNKNOWN; } GPS *GPS::createGps() @@ -1081,12 +1284,19 @@ GPS *GPS::createGps() GPS *new_gps = new GPS; new_gps->rx_gpio = _rx_gpio; new_gps->tx_gpio = _tx_gpio; - new_gps->en_gpio = _en_gpio; - if (_en_gpio != 0) { - LOG_DEBUG("Setting %d to output.\n", _en_gpio); - pinMode(_en_gpio, OUTPUT); - digitalWrite(_en_gpio, !GPS_EN_ACTIVE); + GpioVirtPin *virtPin = new GpioVirtPin(); + new_gps->enablePin = virtPin; // Always at least populate a virtual pin + if (_en_gpio) { + GpioPin *p = new GpioHwPin(_en_gpio); + + if (!GPS_EN_ACTIVE) { // Need to invert the pin before hardware + new GpioNotTransformer( + virtPin, p); // We just leave this created object on the heap so it can stay watching virtPin and driving en_gpio + } else { + new GpioUnaryTransformer( + virtPin, p); // We just leave this created object on the heap so it can stay watching virtPin and driving en_gpio + } } #ifdef PIN_GPS_PPS @@ -1103,7 +1313,8 @@ GPS *GPS::createGps() LOG_DEBUG("Using " NMEA_MSG_GXGSA " for 3DFIX and PDOP\n"); #endif - new_gps->setGPSPower(true, false, 0); + // Make sure the GPS is awake before performing any init. + new_gps->up(); #ifdef PIN_GPS_RESET pinMode(PIN_GPS_RESET, OUTPUT); @@ -1111,7 +1322,6 @@ GPS *GPS::createGps() delay(10); digitalWrite(PIN_GPS_RESET, !GPS_RESET_MODE); #endif - new_gps->setAwake(true); // Wake GPS power before doing any init if (_serial_gps) { #ifdef ARCH_ESP32 @@ -1124,17 +1334,12 @@ GPS *GPS::createGps() LOG_DEBUG("Using GPIO%d for GPS RX\n", new_gps->rx_gpio); LOG_DEBUG("Using GPIO%d for GPS TX\n", new_gps->tx_gpio); _serial_gps->begin(GPS_BAUDRATE, SERIAL_8N1, new_gps->rx_gpio, new_gps->tx_gpio); - +#elif defined(ARCH_RP2040) + _serial_gps->setFIFOSize(256); + _serial_gps->begin(GPS_BAUDRATE); #else _serial_gps->begin(GPS_BAUDRATE); #endif - - /* - * T-Beam-S3-Core will be preset to use gps Probe here, and other boards will not be changed first - */ -#if defined(GPS_UC6580) - _serial_gps->updateBaudRate(115200); -#endif } return new_gps; } @@ -1163,27 +1368,41 @@ bool GPS::factoryReset() 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0x1C, 0xA2}; _serial_gps->write(_message_reset1, sizeof(_message_reset1)); if (getACK(0x05, 0x01, 10000)) { - LOG_INFO("Get ack success!\n"); + LOG_INFO(ACK_SUCCESS_MESSAGE); } delay(100); byte _message_reset2[] = {0xB5, 0x62, 0x06, 0x09, 0x0D, 0x00, 0xFF, 0xFF, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x01, 0x1B, 0xA1}; _serial_gps->write(_message_reset2, sizeof(_message_reset2)); if (getACK(0x05, 0x01, 10000)) { - LOG_INFO("Get ack success!\n"); + LOG_INFO(ACK_SUCCESS_MESSAGE); } delay(100); byte _message_reset3[] = {0xB5, 0x62, 0x06, 0x09, 0x0D, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xFF, 0xFF, 0x00, 0x00, 0x03, 0x1D, 0xB3}; _serial_gps->write(_message_reset3, sizeof(_message_reset3)); if (getACK(0x05, 0x01, 10000)) { - LOG_INFO("Get ack success!\n"); + LOG_INFO(ACK_SUCCESS_MESSAGE); } // Reset device ram to COLDSTART state // byte _message_CFG_RST_COLDSTART[] = {0xB5, 0x62, 0x06, 0x04, 0x04, 0x00, 0xFF, 0xB9, 0x00, 0x00, 0xC6, 0x8B}; // _serial_gps->write(_message_CFG_RST_COLDSTART, sizeof(_message_CFG_RST_COLDSTART)); // delay(1000); + } else if (gnssModel == GNSS_MODEL_MTK) { + // send the CAS10 to perform a factory restart of the device (and other device that support PCAS statements) + LOG_INFO("GNSS Factory Reset via PCAS10,3\n"); + _serial_gps->write("$PCAS10,3*1F\r\n"); + delay(100); + } else if (gnssModel == GNSS_MODEL_ATGM336H) { + LOG_INFO("Factory Reset via CAS-CFG-RST\n"); + uint8_t msglen = makeCASPacket(0x06, 0x02, sizeof(_message_CAS_CFG_RST_FACTORY), _message_CAS_CFG_RST_FACTORY); + _serial_gps->write(UBXscratch, msglen); + delay(100); } else { + // fire this for good measure, if we have an L76B - won't harm other devices. + _serial_gps->write("$PMTK104*37\r\n"); + // No PMTK_ACK for this command. + delay(100); // send the UBLOX Factory Reset Command regardless of detect state, something is very wrong, just assume it's UBLOX. // Factory Reset byte _message_reset[] = {0xB5, 0x62, 0x06, 0x09, 0x0D, 0x00, 0xFF, 0xFB, 0x00, 0x00, 0x00, @@ -1202,6 +1421,24 @@ bool GPS::factoryReset() */ bool GPS::lookForTime() { + +#ifdef GNSS_AIROHA + uint8_t fix = reader.fixQuality(); + if (fix > 0) { + if (lastFixStartMsec > 0) { + if (Throttle::isWithinTimespanMs(lastFixStartMsec, GPS_FIX_HOLD_TIME)) { + return false; + } else { + clearBuffer(); + } + } else { + lastFixStartMsec = millis(); + return false; + } + } else { + return false; + } +#endif auto ti = reader.time; auto d = reader.date; if (ti.isValid() && d.isValid()) { // Note: we don't check for updated, because we'll only be called if needed @@ -1210,7 +1447,7 @@ The Unix epoch (or Unix time or POSIX time or Unix timestamp) is the number of s (midnight UTC/GMT), not counting leap seconds (in ISO 8601: 1970-01-01T00:00:00Z). */ struct tm t; - t.tm_sec = ti.second(); + t.tm_sec = ti.second() + round(ti.age() / 1000); t.tm_min = ti.minute(); t.tm_hour = ti.hour(); t.tm_mday = d.day(); @@ -1218,8 +1455,8 @@ The Unix epoch (or Unix time or POSIX time or Unix timestamp) is the number of s t.tm_year = d.year() - 1900; t.tm_isdst = false; if (t.tm_mon > -1) { - LOG_DEBUG("NMEA GPS time %02d-%02d-%02d %02d:%02d:%02d\n", d.year(), d.month(), t.tm_mday, t.tm_hour, t.tm_min, - t.tm_sec); + LOG_DEBUG("NMEA GPS time %02d-%02d-%02d %02d:%02d:%02d age %d\n", d.year(), d.month(), t.tm_mday, t.tm_hour, t.tm_min, + t.tm_sec, ti.age()); perhapsSetRTC(RTCQualityGPS, t); return true; } else @@ -1236,6 +1473,25 @@ The Unix epoch (or Unix time or POSIX time or Unix timestamp) is the number of s */ bool GPS::lookForLocation() { +#ifdef GNSS_AIROHA + if ((config.position.gps_update_interval * 1000) >= (GPS_FIX_HOLD_TIME * 2)) { + uint8_t fix = reader.fixQuality(); + if (fix > 0) { + if (lastFixStartMsec > 0) { + if (Throttle::isWithinTimespanMs(lastFixStartMsec, GPS_FIX_HOLD_TIME)) { + return false; + } else { + clearBuffer(); + } + } else { + lastFixStartMsec = millis(); + return false; + } + } else { + return false; + } + } +#endif // By default, TinyGPS++ does not parse GPGSA lines, which give us // the 2D/3D fixType (see NMEAGPS.h) // At a minimum, use the fixQuality indicator in GPGGA (FIXME?) @@ -1243,7 +1499,7 @@ bool GPS::lookForLocation() #ifndef TINYGPS_OPTION_NO_STATISTICS if (reader.failedChecksum() > lastChecksumFailCount) { - LOG_WARN("Warning, %u new GPS checksum failures, for a total of %u.\n", reader.failedChecksum() - lastChecksumFailCount, + LOG_WARN("%u new GPS checksum failures, for a total of %u.\n", reader.failedChecksum() - lastChecksumFailCount, reader.failedChecksum()); lastChecksumFailCount = reader.failedChecksum(); } @@ -1269,7 +1525,7 @@ bool GPS::lookForLocation() #endif // GPS_EXTRAVERBOSE // Is this a new point or are we re-reading the previous one? - if (!reader.location.isUpdated()) + if (!reader.location.isUpdated() && !reader.altitude.isUpdated()) return false; // check if a complete GPS solution set is available for reading @@ -1342,7 +1598,7 @@ bool GPS::lookForLocation() t.tm_mon = reader.date.month() - 1; t.tm_year = reader.date.year() - 1900; t.tm_isdst = false; - p.timestamp = mktime(&t); + p.timestamp = gm_mktime(&t); // Nice to have, if available if (reader.satellites.isUpdated()) { @@ -1384,13 +1640,13 @@ bool GPS::hasFlow() return reader.passedChecksum() > 0; } -bool GPS::whileIdle() +bool GPS::whileActive() { - int charsInBuf = 0; + unsigned int charsInBuf = 0; bool isValid = false; - if (!isAwake) { + if (powerState != GPS_ACTIVE) { clearBuffer(); - return isAwake; + return false; } #ifdef SERIAL_BUFFER_SIZE if (_serial_gps->available() >= SERIAL_BUFFER_SIZE - 1) { @@ -1421,16 +1677,21 @@ bool GPS::whileIdle() } void GPS::enable() { + // Clear the old scheduling info (reset the lock-time prediction) + scheduling.reset(); + enabled = true; setInterval(GPS_THREAD_INTERVAL); - setAwake(true); + + scheduling.informSearching(); + setPowerState(GPS_ACTIVE); } int32_t GPS::disable() { enabled = false; setInterval(INT32_MAX); - setAwake(false); + setPowerState(GPS_OFF); return INT32_MAX; } @@ -1439,11 +1700,18 @@ void GPS::toggleGpsMode() { if (config.position.gps_mode == meshtastic_Config_PositionConfig_GpsMode_ENABLED) { config.position.gps_mode = meshtastic_Config_PositionConfig_GpsMode_DISABLED; - LOG_DEBUG("Flag set to false for gps power. GpsMode: DISABLED\n"); + LOG_INFO("User toggled GpsMode. Now DISABLED.\n"); +#ifdef GNSS_AIROHA + if (powerState == GPS_ACTIVE) { + LOG_DEBUG("User power Off GPS\n"); + digitalWrite(PIN_GPS_EN, LOW); + } +#endif disable(); } else if (config.position.gps_mode == meshtastic_Config_PositionConfig_GpsMode_DISABLED) { config.position.gps_mode = meshtastic_Config_PositionConfig_GpsMode_ENABLED; - LOG_DEBUG("Flag set to true to restore power. GpsMode: ENABLED\n"); + LOG_INFO("User toggled GpsMode. Now ENABLED\n"); enable(); } -} \ No newline at end of file +} +#endif // Exclude GPS \ No newline at end of file diff --git a/src/gps/GPS.h b/src/gps/GPS.h index 77e1d8042..6222881bc 100644 --- a/src/gps/GPS.h +++ b/src/gps/GPS.h @@ -1,6 +1,9 @@ #pragma once +#include "configuration.h" +#if !MESHTASTIC_EXCLUDE_GPS #include "GPSStatus.h" +#include "GpioLogic.h" #include "Observer.h" #include "TinyGPS++.h" #include "concurrency/OSThread.h" @@ -21,10 +24,18 @@ struct uBloxGnssModelInfo { }; typedef enum { + GNSS_MODEL_ATGM336H, GNSS_MODEL_MTK, - GNSS_MODEL_UBLOX, + GNSS_MODEL_UBLOX6, + GNSS_MODEL_UBLOX7, + GNSS_MODEL_UBLOX8, + GNSS_MODEL_UBLOX9, + GNSS_MODEL_UBLOX10, GNSS_MODEL_UC6580, GNSS_MODEL_UNKNOWN, + GNSS_MODEL_MTK_L76B, + GNSS_MODEL_AG3335, + GNSS_MODEL_AG3352 } GnssModel_t; typedef enum { @@ -34,11 +45,19 @@ typedef enum { GNSS_RESPONSE_OK, } GPS_RESPONSE; +enum GPSPowerState : uint8_t { + GPS_ACTIVE, // Awake and want a position + GPS_IDLE, // Awake, but not wanting another position yet + GPS_SOFTSLEEP, // Physically powered on, but soft-sleeping + GPS_HARDSLEEP, // Physically powered off, but scheduled to wake + GPS_OFF // Powered off indefinitely +}; + // Generate a string representation of DOP const char *getDOPString(uint32_t dop); /** - * A gps class that only reads from the GPS periodically (and FIXME - eventually keeps the gps powered down except when reading) + * A gps class that only reads from the GPS periodically and keeps the gps powered down except when reading * * When new data is available it will notify observers. */ @@ -56,14 +75,10 @@ class GPS : private concurrency::OSThread uint8_t fixType = 0; // fix type from GPGSA #endif private: - uint32_t lastWakeStartMsec = 0, lastSleepStartMsec = 0; const int serialSpeeds[6] = {9600, 4800, 38400, 57600, 115200, 9600}; - + uint32_t lastWakeStartMsec = 0, lastSleepStartMsec = 0, lastFixStartMsec = 0; uint32_t rx_gpio = 0; uint32_t tx_gpio = 0; - uint32_t en_gpio = 0; - int32_t averageLockTime = 0; - uint32_t GPSCycles = 0; int speedSelect = 0; int probeTries = 2; @@ -74,8 +89,6 @@ class GPS : private concurrency::OSThread */ bool hasValidLocation = false; // default to false, until we complete our first read - bool isAwake = false; // true if we want a location right now - bool isInPowersave = false; bool shouldPublish = false; // If we've changed GPS state, this will force a publish the next loop() @@ -85,15 +98,19 @@ class GPS : private concurrency::OSThread bool GPSInitFinished = false; // Init thread finished? bool GPSInitStarted = false; // Init thread finished? + GPSPowerState powerState = GPS_OFF; // GPS_ACTIVE if we want a location right now + uint8_t numSatellites = 0; CallbackObserver notifyDeepSleepObserver = CallbackObserver(this, &GPS::prepareDeepSleep); - CallbackObserver notifyGPSSleepObserver = CallbackObserver(this, &GPS::prepareDeepSleep); public: /** If !NULL we will use this serial port to construct our GPS */ +#if defined(ARCH_RP2040) + static SerialUART *_serial_gps; +#else static HardwareSerial *_serial_gps; - +#endif static uint8_t _message_PMREQ[]; static uint8_t _message_PMREQ_10[]; static const uint8_t _message_CFG_RXM_PSM[]; @@ -117,6 +134,7 @@ class GPS : private concurrency::OSThread static const uint8_t _message_GGA[]; static const uint8_t _message_PMS[]; static const uint8_t _message_SAVE[]; + static const uint8_t _message_SAVE_10[]; // VALSET Commands for M10 static const uint8_t _message_VALSET_PM[]; @@ -133,8 +151,22 @@ class GPS : private concurrency::OSThread static const uint8_t _message_VALSET_DISABLE_SBAS_RAM[]; static const uint8_t _message_VALSET_DISABLE_SBAS_BBR[]; + // CASIC commands for ATGM336H + static const uint8_t _message_CAS_CFG_RST_FACTORY[]; + static const uint8_t _message_CAS_CFG_NAVX_CONF[]; + static const uint8_t _message_CAS_CFG_RATE_1HZ[]; + + const char *ACK_SUCCESS_MESSAGE = "Get ack success!\n"; + meshtastic_Position p = meshtastic_Position_init_default; + /** This is normally bound to config.position.gps_en_gpio but some rare boards (like heltec tracker) need more advanced + * implementations. Those boards will set this public variable to a custom implementation. + * + * Normally set by GPS::createGPS() + */ + GpioVirtPin *enablePin = NULL; + GPS() : concurrency::OSThread("GPS") {} virtual ~GPS(); @@ -156,7 +188,8 @@ class GPS : private concurrency::OSThread // toggle between enabled/disabled void toggleGpsMode(); - void setGPSPower(bool on, bool standbyOnly, uint32_t sleepTime); + // Change the power state of the GPS - for power saving / shutdown + void setPowerState(GPSPowerState newState, uint32_t sleepMs = 0); /// Returns true if we have acquired GPS lock. virtual bool hasLock(); @@ -174,6 +207,7 @@ class GPS : private concurrency::OSThread // Create a ublox packet for editing in memory uint8_t makeUBXPacket(uint8_t class_id, uint8_t msg_id, uint8_t payload_size, const uint8_t *msg); + uint8_t makeCASPacket(uint8_t class_id, uint8_t msg_id, uint8_t payload_size, const uint8_t *msg); // scratch space for creating ublox packets uint8_t UBXscratch[250] = {0}; @@ -184,18 +218,20 @@ class GPS : private concurrency::OSThread GPS_RESPONSE getACK(uint8_t c, uint8_t i, uint32_t waitMillis); GPS_RESPONSE getACK(const char *message, uint32_t waitMillis); - /** - * Switch the GPS into a mode where we are actively looking for a lock, or alternatively switch GPS into a low power mode - * - * calls sleep/wake - */ - void setAwake(bool on); + GPS_RESPONSE getACKCas(uint8_t class_id, uint8_t msg_id, uint32_t waitMillis); + virtual bool factoryReset(); // Creates an instance of the GPS class. // Returns the new instance or null if the GPS is not present. static GPS *createGps(); + // Wake the GPS hardware - ready for an update + void up(); + + // Let the GPS hardware save power between updates + void down(); + protected: /** * Perform any processing that should be done only while the GPS is awake and looking for a fix. @@ -218,7 +254,7 @@ class GPS : private concurrency::OSThread * * Return true if we received a valid message from the GPS */ - virtual bool whileIdle(); + virtual bool whileActive(); /** * Perform any processing that should be done only while the GPS is awake and looking for a fix. @@ -243,14 +279,23 @@ class GPS : private concurrency::OSThread // Calculate checksum void UBXChecksum(uint8_t *message, size_t length); + void CASChecksum(uint8_t *message, size_t length); - /** Get how long we should stay looking for each aquisition + /** Set power with EN pin, if relevant */ - uint32_t getWakeTime() const; + void writePinEN(bool on); - /** Get how long we should sleep between aqusition attempts + /** Set the value of the STANDBY pin, if relevant */ - uint32_t getSleepTime() const; + void writePinStandby(bool standby); + + /** Set GPS power with PMU, if relevant + */ + void setPowerPMU(bool on); + + /** Set UBLOX power, if relevant + */ + void setPowerUBLOX(bool on, uint32_t sleepMs = 0); /** * Tell users we have new GPS readings @@ -260,14 +305,16 @@ class GPS : private concurrency::OSThread virtual int32_t runOnce() override; // Get GNSS model - String getNMEA(); GnssModel_t probe(int serialSpeed); // delay counter to allow more sats before fixed position stops GPS thread uint8_t fixeddelayCtr = 0; + const char *powerStateToString(); + protected: GnssModel_t gnssModel = GNSS_MODEL_UNKNOWN; }; -extern GPS *gps; \ No newline at end of file +extern GPS *gps; +#endif // Exclude GPS \ No newline at end of file diff --git a/src/gps/GPSUpdateScheduling.cpp b/src/gps/GPSUpdateScheduling.cpp new file mode 100644 index 000000000..949ef6039 --- /dev/null +++ b/src/gps/GPSUpdateScheduling.cpp @@ -0,0 +1,118 @@ +#include "GPSUpdateScheduling.h" + +#include "Default.h" + +// Mark the time when searching for GPS position begins +void GPSUpdateScheduling::informSearching() +{ + searchStartedMs = millis(); +} + +// Mark the time when searching for GPS is complete, +// then update the predicted lock-time +void GPSUpdateScheduling::informGotLock() +{ + searchEndedMs = millis(); + LOG_DEBUG("Took %us to get lock\n", (searchEndedMs - searchStartedMs) / 1000); + updateLockTimePrediction(); +} + +// Clear old lock-time prediction data. +// When re-enabling GPS with user button. +void GPSUpdateScheduling::reset() +{ + searchStartedMs = 0; + searchEndedMs = 0; + searchCount = 0; + predictedMsToGetLock = 0; +} + +// How many milliseconds before we should next search for GPS position +// Used by GPS hardware directly, to enter timed hardware sleep +uint32_t GPSUpdateScheduling::msUntilNextSearch() +{ + uint32_t now = millis(); + + // Target interval (seconds), between GPS updates + uint32_t updateInterval = Default::getConfiguredOrDefaultMs(config.position.gps_update_interval, default_gps_update_interval); + + // Check how long until we should start searching, to hopefully hit our target interval + uint32_t dueAtMs = searchEndedMs + updateInterval; + uint32_t compensatedStart = dueAtMs - predictedMsToGetLock; + int32_t remainingMs = compensatedStart - now; + + // If we should have already started (negative value), start ASAP + if (remainingMs < 0) + remainingMs = 0; + + return (uint32_t)remainingMs; +} + +// How long have we already been searching? +// Used to abort a search in progress, if it runs unnaceptably long +uint32_t GPSUpdateScheduling::elapsedSearchMs() +{ + // If searching + if (searchStartedMs > searchEndedMs) + return millis() - searchStartedMs; + + // If not searching - 0ms. We shouldn't really consume this value + else + return 0; +} + +// Is it now time to begin searching for a GPS position? +bool GPSUpdateScheduling::isUpdateDue() +{ + return (msUntilNextSearch() == 0); +} + +// Have we been searching for a GPS position for too long? +bool GPSUpdateScheduling::searchedTooLong() +{ + uint32_t maxSearchMs = + Default::getConfiguredOrDefaultMs(config.position.position_broadcast_secs, default_broadcast_interval_secs); + + // If broadcast interval set to max, no such thing as "too long" + if (maxSearchMs == UINT32_MAX) + return false; + + // If we've been searching longer than our position broadcast interval: that's too long + else if (elapsedSearchMs() > maxSearchMs) + return true; + + // Otherwise, not too long yet! + else + return false; +} + +// Updates the predicted time-to-get-lock, by exponentially smoothing the latest observation +void GPSUpdateScheduling::updateLockTimePrediction() +{ + + // How long did it take to get GPS lock this time? + // Duration between down() calls + int32_t lockTime = searchEndedMs - searchStartedMs; + if (lockTime < 0) + lockTime = 0; + + // Ignore the first lock-time: likely to be long, will skew data + + // Second locktime: likely stable. Use to intialize the smoothing filter + if (searchCount == 1) + predictedMsToGetLock = lockTime; + + // Third locktime and after: predict using exponential smoothing. Respond slowly to changes + else if (searchCount > 1) + predictedMsToGetLock = (lockTime * weighting) + (predictedMsToGetLock * (1 - weighting)); + + searchCount++; // Only tracked so we can diregard initial lock-times + + LOG_DEBUG("Predicting %us to get next lock\n", predictedMsToGetLock / 1000); +} + +// How long do we expect to spend searching for a lock? +uint32_t GPSUpdateScheduling::predictedSearchDurationMs() +{ + return GPSUpdateScheduling::predictedMsToGetLock; +} \ No newline at end of file diff --git a/src/gps/GPSUpdateScheduling.h b/src/gps/GPSUpdateScheduling.h new file mode 100644 index 000000000..7e121c9b6 --- /dev/null +++ b/src/gps/GPSUpdateScheduling.h @@ -0,0 +1,29 @@ +#pragma once + +#include "configuration.h" + +// Encapsulates code responsible for the timing of GPS updates +class GPSUpdateScheduling +{ + public: + // Marks the time of these events, for calculation use + void informSearching(); + void informGotLock(); // Predicted lock-time is recalculated here + + void reset(); // Reset the prediction - after GPS::disable() / GPS::enable() + bool isUpdateDue(); // Is it time to begin searching for a GPS position? + bool searchedTooLong(); // Have we been searching for too long? + + uint32_t msUntilNextSearch(); // How long until we need to begin searching for a GPS? Info provided to GPS hardware for sleep + uint32_t elapsedSearchMs(); // How long have we been searching so far? + uint32_t predictedSearchDurationMs(); // How long do we expect to spend searching for a lock? + + private: + void updateLockTimePrediction(); // Called from informGotLock + uint32_t searchStartedMs = 0; + uint32_t searchEndedMs = 0; + uint32_t searchCount = 0; + uint32_t predictedMsToGetLock = 0; + + const float weighting = 0.2; // Controls exponential smoothing of lock-times prediction. 20% weighting of "latest lock-time". +}; \ No newline at end of file diff --git a/src/gps/GeoCoord.cpp b/src/gps/GeoCoord.cpp index 19a753c02..5abb25a06 100644 --- a/src/gps/GeoCoord.cpp +++ b/src/gps/GeoCoord.cpp @@ -376,14 +376,17 @@ void GeoCoord::convertWGS84ToOSGB36(const double lat, const double lon, double & } /// Ported from my old java code, returns distance in meters along the globe -/// surface (by magic?) +/// surface (by Haversine formula) float GeoCoord::latLongToMeter(double lat_a, double lng_a, double lat_b, double lng_b) { - double pk = (180 / 3.14169); - double a1 = lat_a / pk; - double a2 = lng_a / pk; - double b1 = lat_b / pk; - double b2 = lng_b / pk; + // Don't do math if the points are the same + if (lat_a == lat_b && lng_a == lng_b) + return 0.0; + + double a1 = lat_a / DEG_CONVERT; + double a2 = lng_a / DEG_CONVERT; + double b1 = lat_b / DEG_CONVERT; + double b2 = lng_b / DEG_CONVERT; double cos_b1 = cos(b1); double cos_a1 = cos(a1); double t1 = cos_a1 * cos(a2) * cos_b1 * cos(b2); @@ -483,3 +486,91 @@ std::shared_ptr GeoCoord::pointAtDistance(double bearing, double range return std::make_shared(double(lat), double(lon), this->getAltitude()); } + +/** + * Convert bearing to degrees + * @param bearing + * The bearing in string format + * @return Bearing in degrees + */ +unsigned int GeoCoord::bearingToDegrees(const char *bearing) +{ + if (strcmp(bearing, "N") == 0) + return 0; + else if (strcmp(bearing, "NNE") == 0) + return 22; + else if (strcmp(bearing, "NE") == 0) + return 45; + else if (strcmp(bearing, "ENE") == 0) + return 67; + else if (strcmp(bearing, "E") == 0) + return 90; + else if (strcmp(bearing, "ESE") == 0) + return 112; + else if (strcmp(bearing, "SE") == 0) + return 135; + else if (strcmp(bearing, "SSE") == 0) + return 157; + else if (strcmp(bearing, "S") == 0) + return 180; + else if (strcmp(bearing, "SSW") == 0) + return 202; + else if (strcmp(bearing, "SW") == 0) + return 225; + else if (strcmp(bearing, "WSW") == 0) + return 247; + else if (strcmp(bearing, "W") == 0) + return 270; + else if (strcmp(bearing, "WNW") == 0) + return 292; + else if (strcmp(bearing, "NW") == 0) + return 315; + else if (strcmp(bearing, "NNW") == 0) + return 337; + else + return 0; +} + +/** + * Convert bearing to string + * @param degrees + * The bearing in degrees + * @return Bearing in string format + */ +const char *GeoCoord::degreesToBearing(unsigned int degrees) +{ + if (degrees >= 348 || degrees < 11) + return "N"; + else if (degrees >= 11 && degrees < 34) + return "NNE"; + else if (degrees >= 34 && degrees < 56) + return "NE"; + else if (degrees >= 56 && degrees < 79) + return "ENE"; + else if (degrees >= 79 && degrees < 101) + return "E"; + else if (degrees >= 101 && degrees < 124) + return "ESE"; + else if (degrees >= 124 && degrees < 146) + return "SE"; + else if (degrees >= 146 && degrees < 169) + return "SSE"; + else if (degrees >= 169 && degrees < 191) + return "S"; + else if (degrees >= 191 && degrees < 214) + return "SSW"; + else if (degrees >= 214 && degrees < 236) + return "SW"; + else if (degrees >= 236 && degrees < 259) + return "WSW"; + else if (degrees >= 259 && degrees < 281) + return "W"; + else if (degrees >= 281 && degrees < 304) + return "WNW"; + else if (degrees >= 304 && degrees < 326) + return "NW"; + else if (degrees >= 326 && degrees < 348) + return "NNW"; + else + return "N"; +} diff --git a/src/gps/GeoCoord.h b/src/gps/GeoCoord.h index 06b11c3de..ecdaf0ec7 100644 --- a/src/gps/GeoCoord.h +++ b/src/gps/GeoCoord.h @@ -11,6 +11,7 @@ #define PI 3.1415926535897932384626433832795 #define OLC_CODE_LEN 11 +#define DEG_CONVERT (180 / PI) // Helper functions // Raises a number to an exponent, handling negative exponents. @@ -116,6 +117,8 @@ class GeoCoord static float bearing(double lat1, double lon1, double lat2, double lon2); static float rangeRadiansToMeters(double range_radians); static float rangeMetersToRadians(double range_meters); + static unsigned int bearingToDegrees(const char *bearing); + static const char *degreesToBearing(unsigned int degrees); // Point to point conversions int32_t distanceTo(const GeoCoord &pointB); diff --git a/src/gps/NMEAWPL.cpp b/src/gps/NMEAWPL.cpp index 9eff4d00e..f528c4607 100644 --- a/src/gps/NMEAWPL.cpp +++ b/src/gps/NMEAWPL.cpp @@ -1,3 +1,4 @@ +#if !MESHTASTIC_EXCLUDE_GPS #include "NMEAWPL.h" #include "GeoCoord.h" #include "RTC.h" @@ -74,10 +75,13 @@ uint32_t printWPL(char *buf, size_t bufsz, const meshtastic_Position &pos, const uint32_t printGGA(char *buf, size_t bufsz, const meshtastic_Position &pos) { GeoCoord geoCoord(pos.latitude_i, pos.longitude_i, pos.altitude); - tm *t = localtime((time_t *)&pos.timestamp); + time_t timestamp = pos.timestamp; + + tm *t = gmtime(×tamp); if (getRTCQuality() > 0) { // use the device clock if we got time from somewhere. If not, use the GPS timestamp. uint32_t rtc_sec = getValidTime(RTCQuality::RTCQualityDevice); - t = localtime((time_t *)&rtc_sec); + timestamp = rtc_sec; + t = gmtime(×tamp); } uint32_t len = snprintf( @@ -93,4 +97,6 @@ uint32_t printGGA(char *buf, size_t bufsz, const meshtastic_Position &pos) } len += snprintf(buf + len, bufsz - len, "*%02X\r\n", chk); return len; -} \ No newline at end of file +} + +#endif \ No newline at end of file diff --git a/src/gps/RTC.cpp b/src/gps/RTC.cpp index 10e9e0331..d9ac56b74 100644 --- a/src/gps/RTC.cpp +++ b/src/gps/RTC.cpp @@ -2,10 +2,12 @@ #include "configuration.h" #include "detect/ScanI2C.h" #include "main.h" +#include #include #include static RTCQuality currentQuality = RTCQualityNone; +uint32_t lastSetFromPhoneNtpOrGps = 0; RTCQuality getRTCQuality() { @@ -28,7 +30,7 @@ void readFromRTC() if (rtc_found.address == RV3028_RTC) { uint32_t now = millis(); Melopero_RV3028 rtc; -#ifdef I2C_SDA1 +#if WIRE_INTERFACES_COUNT == 2 rtc.initI2C(rtc_found.port == ScanI2C::I2CPort::WIRE1 ? Wire1 : Wire); #else rtc.initI2C(); @@ -40,9 +42,12 @@ void readFromRTC() t.tm_hour = rtc.getHour(); t.tm_min = rtc.getMinute(); t.tm_sec = rtc.getSecond(); - tv.tv_sec = mktime(&t); + tv.tv_sec = gm_mktime(&t); tv.tv_usec = 0; - LOG_DEBUG("Read RTC time from RV3028 as %ld\n", tv.tv_sec); + + uint32_t printableEpoch = tv.tv_sec; // Print lib only supports 32 bit but time_t can be 64 bit on some platforms + LOG_DEBUG("Read RTC time from RV3028 getTime as %02d-%02d-%02d %02d:%02d:%02d (%ld)\n", t.tm_year + 1900, t.tm_mon + 1, + t.tm_mday, t.tm_hour, t.tm_min, t.tm_sec, printableEpoch); timeStartMsec = now; zeroOffsetSecs = tv.tv_sec; if (currentQuality == RTCQualityNone) { @@ -54,7 +59,7 @@ void readFromRTC() uint32_t now = millis(); PCF8563_Class rtc; -#ifdef I2C_SDA1 +#if WIRE_INTERFACES_COUNT == 2 rtc.begin(rtc_found.port == ScanI2C::I2CPort::WIRE1 ? Wire1 : Wire); #else rtc.begin(); @@ -68,9 +73,12 @@ void readFromRTC() t.tm_hour = tc.hour; t.tm_min = tc.minute; t.tm_sec = tc.second; - tv.tv_sec = mktime(&t); + tv.tv_sec = gm_mktime(&t); tv.tv_usec = 0; - LOG_DEBUG("Read RTC time from PCF8563 as %ld\n", tv.tv_sec); + + uint32_t printableEpoch = tv.tv_sec; // Print lib only supports 32 bit but time_t can be 64 bit on some platforms + LOG_DEBUG("Read RTC time from PCF8563 getDateTime as %02d-%02d-%02d %02d:%02d:%02d (%ld)\n", t.tm_year + 1900, + t.tm_mon + 1, t.tm_mday, t.tm_hour, t.tm_min, t.tm_sec, printableEpoch); timeStartMsec = now; zeroOffsetSecs = tv.tv_sec; if (currentQuality == RTCQualityNone) { @@ -80,7 +88,8 @@ void readFromRTC() #else if (!gettimeofday(&tv, NULL)) { uint32_t now = millis(); - LOG_DEBUG("Read RTC time as %ld\n", tv.tv_sec); + uint32_t printableEpoch = tv.tv_sec; // Print lib only supports 32 bit but time_t can be 64 bit on some platforms + LOG_DEBUG("Read RTC time as %ld\n", printableEpoch); timeStartMsec = now; zeroOffsetSecs = tv.tv_sec; } @@ -96,25 +105,44 @@ void readFromRTC() * * If we haven't yet set our RTC this boot, set it from a GPS derived time */ -bool perhapsSetRTC(RTCQuality q, const struct timeval *tv) +bool perhapsSetRTC(RTCQuality q, const struct timeval *tv, bool forceUpdate) { static uint32_t lastSetMsec = 0; uint32_t now = millis(); + uint32_t printableEpoch = tv->tv_sec; // Print lib only supports 32 bit but time_t can be 64 bit on some platforms +#ifdef BUILD_EPOCH + if (tv->tv_sec < BUILD_EPOCH) { + LOG_WARN("Ignoring time (%ld) before build epoch (%ld)!\n", printableEpoch, BUILD_EPOCH); + return false; + } +#endif bool shouldSet; - if (q > currentQuality) { + if (forceUpdate) { shouldSet = true; - LOG_DEBUG("Upgrading time to quality %d\n", q); - } else if (q == RTCQualityGPS && (now - lastSetMsec) > (12 * 60 * 60 * 1000UL)) { - // Every 12 hrs we will slam in a new GPS time, to correct for local RTC clock drift + LOG_DEBUG("Overriding current RTC quality (%s) with incoming time of RTC quality of %s\n", RtcName(currentQuality), + RtcName(q)); + } else if (q > currentQuality) { shouldSet = true; - LOG_DEBUG("Reapplying external time to correct clock drift %ld secs\n", tv->tv_sec); - } else + LOG_DEBUG("Upgrading time to quality %s\n", RtcName(q)); + } else if (q == RTCQualityGPS) { + shouldSet = true; + LOG_DEBUG("Reapplying GPS time: %ld secs\n", printableEpoch); + } else if (q == RTCQualityNTP && !Throttle::isWithinTimespanMs(lastSetMsec, (12 * 60 * 60 * 1000UL))) { + // Every 12 hrs we will slam in a new NTP or Phone GPS / NTP time, to correct for local RTC clock drift + shouldSet = true; + LOG_DEBUG("Reapplying external time to correct clock drift %ld secs\n", printableEpoch); + } else { shouldSet = false; + LOG_DEBUG("Current RTC quality: %s. Ignoring time of RTC quality of %s\n", RtcName(currentQuality), RtcName(q)); + } if (shouldSet) { currentQuality = q; lastSetMsec = now; + if (currentQuality >= RTCQualityNTP) { + lastSetFromPhoneNtpOrGps = now; + } // This delta value works on all platforms timeStartMsec = now; @@ -123,29 +151,29 @@ bool perhapsSetRTC(RTCQuality q, const struct timeval *tv) #ifdef RV3028_RTC if (rtc_found.address == RV3028_RTC) { Melopero_RV3028 rtc; -#ifdef I2C_SDA1 +#if WIRE_INTERFACES_COUNT == 2 rtc.initI2C(rtc_found.port == ScanI2C::I2CPort::WIRE1 ? Wire1 : Wire); #else rtc.initI2C(); #endif - tm *t = localtime(&tv->tv_sec); + tm *t = gmtime(&tv->tv_sec); 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); - LOG_DEBUG("RV3028_RTC setTime %02d-%02d-%02d %02d:%02d:%02d %ld\n", t->tm_year + 1900, t->tm_mon + 1, t->tm_mday, - t->tm_hour, t->tm_min, t->tm_sec, tv->tv_sec); + LOG_DEBUG("RV3028_RTC setTime %02d-%02d-%02d %02d:%02d:%02d (%ld)\n", t->tm_year + 1900, t->tm_mon + 1, t->tm_mday, + t->tm_hour, t->tm_min, t->tm_sec, printableEpoch); } #elif defined(PCF8563_RTC) if (rtc_found.address == PCF8563_RTC) { PCF8563_Class rtc; -#ifdef I2C_SDA1 +#if WIRE_INTERFACES_COUNT == 2 rtc.begin(rtc_found.port == ScanI2C::I2CPort::WIRE1 ? Wire1 : Wire); #else rtc.begin(); #endif - tm *t = localtime(&tv->tv_sec); + tm *t = gmtime(&tv->tv_sec); rtc.setDateTime(t->tm_year + 1900, t->tm_mon + 1, t->tm_mday, t->tm_hour, t->tm_min, t->tm_sec); - LOG_DEBUG("PCF8563_RTC setDateTime %02d-%02d-%02d %02d:%02d:%02d %ld\n", t->tm_year + 1900, t->tm_mon + 1, t->tm_mday, - t->tm_hour, t->tm_min, t->tm_sec, tv->tv_sec); + LOG_DEBUG("PCF8563_RTC setDateTime %02d-%02d-%02d %02d:%02d:%02d (%ld)\n", t->tm_year + 1900, t->tm_mon + 1, + t->tm_mday, t->tm_hour, t->tm_min, t->tm_sec, printableEpoch); } #elif defined(ARCH_ESP32) settimeofday(tv, NULL); @@ -162,6 +190,24 @@ bool perhapsSetRTC(RTCQuality q, const struct timeval *tv) } } +const char *RtcName(RTCQuality quality) +{ + switch (quality) { + case RTCQualityNone: + return "None"; + case RTCQualityDevice: + return "Device"; + case RTCQualityFromNet: + return "Net"; + case RTCQualityNTP: + return "NTP"; + case RTCQualityGPS: + return "GPS"; + default: + return "Unknown"; + } +} + /** * Sets the RTC time if the provided time is of higher quality than the current RTC time. * @@ -175,7 +221,9 @@ bool perhapsSetRTC(RTCQuality q, struct tm &t) The Unix epoch (or Unix time or POSIX time or Unix timestamp) is the number of seconds that have elapsed since January 1, 1970 (midnight UTC/GMT), not counting leap seconds (in ISO 8601: 1970-01-01T00:00:00Z). */ - time_t res = mktime(&t); + // horrible hack to make mktime TZ agnostic - best practise according to + // https://www.gnu.org/software/libc/manual/html_node/Broken_002ddown-Time.html + time_t res = gm_mktime(&t); struct timeval tv; tv.tv_sec = res; tv.tv_usec = 0; // time.centisecond() * (10 / 1000); @@ -189,14 +237,32 @@ bool perhapsSetRTC(RTCQuality q, struct tm &t) } } +/** + * Returns the timezone offset in seconds. + * + * @return The timezone offset in seconds. + */ +int32_t getTZOffset() +{ + time_t now = getTime(false); + struct tm *gmt; + gmt = gmtime(&now); + gmt->tm_isdst = -1; + return (int32_t)difftime(now, mktime(gmt)); +} + /** * Returns the current time in seconds since the Unix epoch (January 1, 1970). * * @return The current time in seconds since the Unix epoch. */ -uint32_t getTime() +uint32_t getTime(bool local) { - return (((uint32_t)millis() - timeStartMsec) / 1000) + zeroOffsetSecs; + if (local) { + return (((uint32_t)millis() - timeStartMsec) / 1000) + zeroOffsetSecs + getTZOffset(); + } else { + return (((uint32_t)millis() - timeStartMsec) / 1000) + zeroOffsetSecs; + } } /** @@ -205,7 +271,23 @@ uint32_t getTime() * @param minQuality The minimum quality of the RTC time required for it to be considered valid. * @return The current time from the RTC if it meets the minimum quality requirement, or 0 if the time is not valid. */ -uint32_t getValidTime(RTCQuality minQuality) +uint32_t getValidTime(RTCQuality minQuality, bool local) { - return (currentQuality >= minQuality) ? getTime() : 0; + return (currentQuality >= minQuality) ? getTime(local) : 0; +} + +time_t gm_mktime(struct tm *tm) +{ +#if !MESHTASTIC_EXCLUDE_TZ + setenv("TZ", "GMT0", 1); + time_t res = mktime(tm); + if (*config.device.tzdef) { + setenv("TZ", config.device.tzdef, 1); + } else { + setenv("TZ", "UTC0", 1); + } + return res; +#else + return mktime(tm); +#endif } diff --git a/src/gps/RTC.h b/src/gps/RTC.h index 527b31f46..caa48dc06 100644 --- a/src/gps/RTC.h +++ b/src/gps/RTC.h @@ -24,18 +24,25 @@ enum RTCQuality { RTCQuality getRTCQuality(); +extern uint32_t lastSetFromPhoneNtpOrGps; + /// If we haven't yet set our RTC this boot, set it from a GPS derived time -bool perhapsSetRTC(RTCQuality q, const struct timeval *tv); +bool perhapsSetRTC(RTCQuality q, const struct timeval *tv, bool forceUpdate = false); bool perhapsSetRTC(RTCQuality q, struct tm &t); +/// Return a string name for the quality +const char *RtcName(RTCQuality quality); + /// Return time since 1970 in secs. While quality is RTCQualityNone we will be returning time based at zero -uint32_t getTime(); +uint32_t getTime(bool local = false); /// Return time since 1970 in secs. If quality is RTCQualityNone return zero -uint32_t getValidTime(RTCQuality minQuality); +uint32_t getValidTime(RTCQuality minQuality, bool local = false); void readFromRTC(); +time_t gm_mktime(struct tm *tm); + #define SEC_PER_DAY 86400 #define SEC_PER_HOUR 3600 -#define SEC_PER_MIN 60 \ No newline at end of file +#define SEC_PER_MIN 60 diff --git a/src/gps/cas.h b/src/gps/cas.h new file mode 100644 index 000000000..53d75cda9 --- /dev/null +++ b/src/gps/cas.h @@ -0,0 +1,63 @@ +#pragma once + +// CASIC binary message definitions +// Reference: https://www.icofchina.com/d/file/xiazai/2020-09-22/20f1b42b3a11ac52089caf3603b43fb5.pdf +// ATGM33H-5N: https://www.icofchina.com/pro/mokuai/2016-08-01/4.html +// (https://www.icofchina.com/d/file/xiazai/2016-12-05/b5c57074f4b1fcc62ba8c7868548d18a.pdf) + +// NEMA (Class ID - 0x4e) message IDs +#define CAS_NEMA_GGA 0x00 +#define CAS_NEMA_GLL 0x01 +#define CAS_NEMA_GSA 0x02 +#define CAS_NEMA_GSV 0x03 +#define CAS_NEMA_RMC 0x04 +#define CAS_NEMA_VTG 0x05 +#define CAS_NEMA_GST 0x07 +#define CAS_NEMA_ZDA 0x08 +#define CAS_NEMA_DHV 0x0D + +// Size of a CAS-ACK-(N)ACK message (14 bytes) +#define CAS_ACK_NACK_MSG_SIZE 0x0E + +// CFG-RST (0x06, 0x02) +// Factory reset +const uint8_t GPS::_message_CAS_CFG_RST_FACTORY[] = { + 0xFF, 0x03, // Fields to clear + 0x01, // Reset Mode: Controlled Software reset + 0x03 // Startup Mode: Factory +}; + +// CFG_RATE (0x06, 0x01) +// 1HZ update rate, this should always be the case after +// factory reset but update it regardless +const uint8_t GPS::_message_CAS_CFG_RATE_1HZ[] = { + 0xE8, 0x03, // Update Rate: 0x03E8 = 1000ms + 0x00, 0x00 // Reserved +}; + +// CFG-NAVX (0x06, 0x07) +// Initial ATGM33H-5N configuration, Updates for Dynamic Mode, Fix Mode, and SV system +// Qwirk: The ATGM33H-5N-31 should only support GPS+BDS, however it will happily enable +// and use GPS+BDS+GLONASS iff the correct CFG_NAVX command is used. +const uint8_t GPS::_message_CAS_CFG_NAVX_CONF[] = { + 0x03, 0x01, 0x00, 0x00, // Update Mask: Dynamic Mode, Fix Mode, Nav Settings + 0x03, // Dynamic Mode: Automotive + 0x03, // Fix Mode: Auto 2D/3D + 0x00, // Min SV + 0x00, // Max SVs + 0x00, // Min CNO + 0x00, // Reserved1 + 0x00, // Init 3D fix + 0x00, // Min Elevation + 0x00, // Dr Limit + 0x07, // Nav System: 2^0 = GPS, 2^1 = BDS 2^2 = GLONASS: 2^3 + // 3=GPS+BDS, 7=GPS+BDS+GLONASS + 0x00, 0x00, // Rollover Week + 0x00, 0x00, 0x00, 0x00, // Fix Altitude + 0x00, 0x00, 0x00, 0x00, // Fix Height Error + 0x00, 0x00, 0x00, 0x00, // PDOP Maximum + 0x00, 0x00, 0x00, 0x00, // TDOP Maximum + 0x00, 0x00, 0x00, 0x00, // Position Accuracy Max + 0x00, 0x00, 0x00, 0x00, // Time Accuracy Max + 0x00, 0x00, 0x00, 0x00 // Static Hold Threshold +}; \ No newline at end of file diff --git a/src/gps/ubx.h b/src/gps/ubx.h index 5b2cb24ce..b137d3349 100644 --- a/src/gps/ubx.h +++ b/src/gps/ubx.h @@ -1,3 +1,12 @@ +const char *failMessage = "Unable to %s\n"; + +#define SEND_UBX_PACKET(TYPE, ID, DATA, ERRMSG, TIMEOUT) \ + msglen = makeUBXPacket(TYPE, ID, sizeof(DATA), DATA); \ + _serial_gps->write(UBXscratch, msglen); \ + if (getACK(TYPE, ID, TIMEOUT) != GNSS_RESPONSE_OK) { \ + LOG_WARN(failMessage, #ERRMSG); \ + } + // Power Management uint8_t GPS::_message_PMREQ[] PROGMEM = { @@ -206,14 +215,14 @@ const uint8_t GPS::_message_GLL[] = { 0x00 // Reserved }; -// Enable GSA. GSA - GPS DOP and active satellites, used for detailing the satellites used in the positioning and +// Disable GSA. GSA - GPS DOP and active satellites, used for detailing the satellites used in the positioning and // the DOP (Dilution of Precision) const uint8_t GPS::_message_GSA[] = { 0xF0, 0x02, // NMEA ID for GSA 0x00, // Rate for DDC - 0x01, // Rate for UART1 + 0x00, // Rate for UART1 0x00, // Rate for UART2 - 0x01, // Rate for USB usefull for native linux + 0x00, // Rate for USB usefull for native linux 0x00, // Rate for SPI 0x00 // Reserved }; @@ -316,9 +325,18 @@ const uint8_t GPS::_message_SAVE[] = { 0x17 // deviceMask: BBR, Flash, EEPROM, and SPI Flash }; +const uint8_t GPS::_message_SAVE_10[] = { + 0x00, 0x00, 0x00, 0x00, // clearMask: no sections cleared + 0xFF, 0xFF, 0x00, 0x00, // saveMask: save all sections + 0x00, 0x00, 0x00, 0x00, // loadMask: no sections loaded + 0x01 // deviceMask: only save to BBR +}; + // As the M10 has no flash, the best we can do to preserve the config is to set it in RAM and BBR. // BBR will survive a restart, and power off for a while, but modules with small backup // batteries or super caps will not retain the config for a long power off time. +// for all configurations using sleep / low power modes, V_BCKP needs to be hooked to permanent power for fast aquisition after +// sleep // VALSET Commands for M10 // Please refer to the M10 Protocol Specification: @@ -327,25 +345,27 @@ const uint8_t GPS::_message_SAVE[] = { // and: // https://content.u-blox.com/sites/default/files/u-blox-M10-ROM-5.10_ReleaseNotes_UBX-22001426.pdf // for interesting insights. +// +// Integration manual: +// https://content.u-blox.com/sites/default/files/documents/SAM-M10Q_IntegrationManual_UBX-22020019.pdf +// has details on low-power modes + /* -CFG-PM2 has been replaced by many CFG-PM commands OPERATEMODE E1 2 (0 | 1 | 2) -POSUPDATEPERIOD U4 1000ms for M10 must be >= 5s try 5 -ACQPERIOD U4 10 seems ok for M10 def ok -GRIDOFFSET U4 0 seems ok for M10 def ok -ONTIME U2 1 will try 1 -MINACQTIME U1 0 will try 0 def ok -MAXACQTIME U1 stick with default of 0 def ok -DONOTENTEROFF L 1 stay at 1 -WAITTIMEFIX L 1 stay with 1 -UPDATEEPH L 1 changed to 1 for gps rework default is 1 +POSUPDATEPERIOD U4 5 +ACQPERIOD U4 10 +GRIDOFFSET U4 0 +ONTIME U2 1 +MINACQTIME U1 0 +MAXACQTIME U1 0 +DONOTENTEROFF L 1 +WAITTIMEFIX L 1 +UPDATEEPH L 1 EXTINTWAKE L 0 no ext ints EXTINTBACKUP L 0 no ext ints EXTINTINACTIVE L 0 no ext ints EXTINTACTIVITY U4 0 no ext ints -LIMITPEAKCURRENT L 1 stay with 1 -*/ -// CFG-PMS has been removed +LIMITPEAKCURRENT L 1 // Ram layer config message: // 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 @@ -354,7 +374,7 @@ LIMITPEAKCURRENT L 1 stay with 1 // BBR layer config message: // 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 // 10 01 8c 03 - +*/ const uint8_t GPS::_message_VALSET_PM_RAM[] = {0x00, 0x01, 0x00, 0x00, 0x01, 0x00, 0xd0, 0x20, 0x02, 0x02, 0x00, 0xd0, 0x40, 0x05, 0x00, 0x00, 0x00, 0x05, 0x00, 0xd0, 0x30, 0x01, 0x00, 0x08, 0x00, 0xd0, 0x10, 0x01, 0x09, 0x00, 0xd0, 0x10, 0x01, 0x10, 0x00, 0xd0, 0x10, 0x01}; @@ -402,23 +422,28 @@ const uint8_t GPS::_message_VALSET_DISABLE_NMEA_BBR[] = {0x00, 0x02, 0x00, 0x00, // BBR layer config message: // b5 62 06 8a 09 00 00 02 00 00 07 00 92 20 06 5a 58 -// Turn NMEA GSA, GGA, RMC messages on: -// Ram layer config message: -// b5 62 06 8a 13 00 00 01 00 00 c0 00 91 20 01 bb 00 91 20 01 ac 00 91 20 01 e1 3b - -// BBR layer config message: -// b5 62 06 8a 13 00 00 02 00 00 c0 00 91 20 01 bb 00 91 20 01 ac 00 91 20 01 e2 4d +// Turn NMEA GGA, RMC messages on: +// Layer config messages: +// RAM: +// b5 62 06 8a 0e 00 00 01 00 00 bb 00 91 20 01 ac 00 91 20 01 6a 8f +// BBR: +// b5 62 06 8a 0e 00 00 02 00 00 bb 00 91 20 01 ac 00 91 20 01 6b 9c +// FLASH: +// b5 62 06 8a 0e 00 00 04 00 00 bb 00 91 20 01 ac 00 91 20 01 6d b6 +// Doing this for the FLASH layer isn't really required since we save the config to flash later const uint8_t GPS::_message_VALSET_DISABLE_TXT_INFO_RAM[] = {0x00, 0x01, 0x00, 0x00, 0x07, 0x00, 0x92, 0x20, 0x03}; const uint8_t GPS::_message_VALSET_DISABLE_TXT_INFO_BBR[] = {0x00, 0x02, 0x00, 0x00, 0x07, 0x00, 0x92, 0x20, 0x03}; -const uint8_t GPS::_message_VALSET_ENABLE_NMEA_RAM[] = {0x00, 0x01, 0x00, 0x00, 0xc0, 0x00, 0x91, 0x20, 0x01, 0xbb, - 0x00, 0x91, 0x20, 0x01, 0xac, 0x00, 0x91, 0x20, 0x01}; -const uint8_t GPS::_message_VALSET_ENABLE_NMEA_BBR[] = {0x00, 0x02, 0x00, 0x00, 0xc0, 0x00, 0x91, 0x20, 0x01, 0xbb, - 0x00, 0x91, 0x20, 0x01, 0xac, 0x00, 0x91, 0x20, 0x01}; + +const uint8_t GPS::_message_VALSET_ENABLE_NMEA_RAM[] = {0x00, 0x01, 0x00, 0x00, 0xbb, 0x00, 0x91, + 0x20, 0x01, 0xac, 0x00, 0x91, 0x20, 0x01}; +const uint8_t GPS::_message_VALSET_ENABLE_NMEA_BBR[] = {0x00, 0x02, 0x00, 0x00, 0xbb, 0x00, 0x91, + 0x20, 0x01, 0xac, 0x00, 0x91, 0x20, 0x01}; const uint8_t GPS::_message_VALSET_DISABLE_SBAS_RAM[] = {0x00, 0x01, 0x00, 0x00, 0x20, 0x00, 0x31, 0x10, 0x00, 0x05, 0x00, 0x31, 0x10, 0x00}; const uint8_t GPS::_message_VALSET_DISABLE_SBAS_BBR[] = {0x00, 0x02, 0x00, 0x00, 0x20, 0x00, 0x31, 0x10, 0x00, 0x05, 0x00, 0x31, 0x10, 0x00}; + /* Operational issues with the M10: diff --git a/src/graphics/EInkDisplay2.cpp b/src/graphics/EInkDisplay2.cpp index f2642a56c..e0464b1b7 100644 --- a/src/graphics/EInkDisplay2.cpp +++ b/src/graphics/EInkDisplay2.cpp @@ -2,132 +2,50 @@ #ifdef USE_EINK #include "EInkDisplay2.h" -#include "GxEPD2_BW.h" #include "SPILock.h" #include "main.h" #include +/* + The macros EINK_DISPLAY_MODEL, EINK_WIDTH, and EINK_HEIGHT are defined as build_flags in a variant's platformio.ini + Previously, these macros were defined at the top of this file. -#if defined(HELTEC_WIRELESS_PAPER) || defined(HELTEC_WIRELESS_PAPER_V1_0) // || defined(LORA_TYPE) -SPIClass *hspi = NULL; -#endif + For archival reasons, note that the following configurations had also been tested during this period: + * ifdef RAK4631 + - 4.2 inch + EINK_DISPLAY_MODEL: GxEPD2_420_M01 + EINK_WIDTH: 300 + EINK_WIDTH: 400 -#define COLORED GxEPD_BLACK -#define UNCOLORED GxEPD_WHITE + - 2.9 inch + EINK_DISPLAY_MODEL: GxEPD2_290_T5D + EINK_WIDTH: 296 + EINK_HEIGHT: 128 -#if defined(TTGO_T_ECHO) -#define TECHO_DISPLAY_MODEL GxEPD2_154_D67 -#elif defined(RAK4630) + - 1.54 inch + EINK_DISPLAY_MODEL: GxEPD2_154_M09 + EINK_WIDTH: 200 + EINK_HEIGHT: 200 +*/ -// GxEPD2_213_BN - RAK14000 2.13 inch b/w 250x122 - changed from GxEPD2_213_B74 - which was not going to give partial update -// support -#define TECHO_DISPLAY_MODEL GxEPD2_213_BN - -// 4.2 inch 300x400 - GxEPD2_420_M01 -// #define TECHO_DISPLAY_MODEL GxEPD2_420_M01 - -// 2.9 inch 296x128 - GxEPD2_290_T5D -// #define TECHO_DISPLAY_MODEL GxEPD2_290_T5D - -// 1.54 inch 200x200 - GxEPD2_154_M09 -// #define TECHO_DISPLAY_MODEL GxEPD2_154_M09 - -#elif defined(MAKERPYTHON) -// 2.9 inch 296x128 - GxEPD2_290_T5D -#define TECHO_DISPLAY_MODEL GxEPD2_290_T5D - -#elif defined(PCA10059) - -// 4.2 inch 300x400 - GxEPD2_420_M01 -#define TECHO_DISPLAY_MODEL GxEPD2_420_M01 - -#elif defined(LORA_TYPE) -// 1.54 inch 200x200 - GxEPD2_154_M09 -#define TECHO_DISPLAY_MODEL GxEPD2_154_GDEY0154D67 - -#elif defined(M5_COREINK) -// M5Stack CoreInk -// 1.54 inch 200x200 - GxEPD2_154_M09 -#define TECHO_DISPLAY_MODEL GxEPD2_154_M09 - -#elif defined(HELTEC_WIRELESS_PAPER) -// #define TECHO_DISPLAY_MODEL GxEPD2_213_T5D -#define TECHO_DISPLAY_MODEL GxEPD2_213_FC1 - -#elif defined(HELTEC_WIRELESS_PAPER_V1_0) -// 2.13" 122x250 - DEPG0213BNS800 -#define TECHO_DISPLAY_MODEL GxEPD2_213_BN - -#endif - -GxEPD2_BW *adafruitDisplay; +// Constructor EInkDisplay::EInkDisplay(uint8_t address, int sda, int scl, OLEDDISPLAY_GEOMETRY geometry, HW_I2C i2cBus) { -#if defined(TTGO_T_ECHO) - setGeometry(GEOMETRY_RAWMODE, 200, 200); -#elif defined(RAK4630) - - // GxEPD2_213_BN - RAK14000 2.13 inch b/w 250x122 - setGeometry(GEOMETRY_RAWMODE, 250, 122); - this->displayBufferSize = 250 * (128 / 8); - // GxEPD2_420_M01 - // setGeometry(GEOMETRY_RAWMODE, 300, 400); - - // GxEPD2_290_T5D - // setGeometry(GEOMETRY_RAWMODE, 296, 128); - - // GxEPD2_154_M09 - // setGeometry(GEOMETRY_RAWMODE, 200, 200); - -#elif defined(HELTEC_WIRELESS_PAPER_V1_0) - - // The display's memory is actually 128px x 250px - // Setting the buffersize manually prevents 122/8 truncating to a 15 byte width - // (Or something like that..) - + // Set dimensions in OLEDDisplay base class this->geometry = GEOMETRY_RAWMODE; - this->displayWidth = 250; - this->displayHeight = 122; - this->displayBufferSize = 250 * (128 / 8); + this->displayWidth = EINK_WIDTH; + this->displayHeight = EINK_HEIGHT; -#elif defined(HELTEC_WIRELESS_PAPER) - // GxEPD2_213_BN - 2.13 inch b/w 250x122 - setGeometry(GEOMETRY_RAWMODE, 250, 122); -#elif defined(MAKERPYTHON) - // GxEPD2_290_T5D - setGeometry(GEOMETRY_RAWMODE, 296, 128); + // Round shortest side up to nearest byte, to prevent truncation causing an undersized buffer + uint16_t shortSide = min(EINK_WIDTH, EINK_HEIGHT); + uint16_t longSide = max(EINK_WIDTH, EINK_HEIGHT); + if (shortSide % 8 != 0) + shortSide = (shortSide | 7) + 1; -#elif defined(PCA10059) - - // GxEPD2_420_M01 - setGeometry(GEOMETRY_RAWMODE, 300, 400); - -#elif defined(M5_COREINK) - - // M5Stack_CoreInk 200x200 - // 1.54 inch 200x200 - GxEPD2_154_M09 - setGeometry(GEOMETRY_RAWMODE, EPD_HEIGHT, EPD_WIDTH); -#elif defined(my) - - // GxEPD2_290_T5D - setGeometry(GEOMETRY_RAWMODE, 296, 128); - LOG_DEBUG("GEOMETRY_RAWMODE, 296, 128\n"); - -#elif defined(ESP32_S3_PICO) - - // GxEPD2_290_T94_V2 - setGeometry(GEOMETRY_RAWMODE, EPD_WIDTH, EPD_HEIGHT); - LOG_DEBUG("GEOMETRY_RAWMODE, 296, 128\n"); - -#endif - // setGeometry(GEOMETRY_RAWMODE, 128, 64); // old resolution - // setGeometry(GEOMETRY_128_64); // We originally used this because I wasn't sure if rawmode worked - it does + this->displayBufferSize = longSide * (shortSide / 8); } -// FIXME quick hack to limit drawing to a very slow rate -uint32_t lastDrawMsec; - /** * Force a display update if we haven't drawn within the specified msecLimit */ @@ -136,13 +54,6 @@ bool EInkDisplay::forceDisplay(uint32_t msecLimit) // No need to grab this lock because we are on our own SPI bus // concurrency::LockGuard g(spiLock); -#if defined(USE_EINK_DYNAMIC_PARTIAL) - // Decide if update is partial or full - bool continueUpdate = determineRefreshMode(); - if (!continueUpdate) - return false; -#else - uint32_t now = millis(); uint32_t sinceLast = now - lastDrawMsec; @@ -151,56 +62,41 @@ bool EInkDisplay::forceDisplay(uint32_t msecLimit) else return false; -#endif - // FIXME - only draw bits have changed (use backbuf similar to the other displays) - // tft.drawBitmap(0, 0, buffer, 128, 64, TFT_YELLOW, TFT_BLACK); + const bool flipped = config.display.flip_screen; for (uint32_t y = 0; y < displayHeight; y++) { for (uint32_t x = 0; x < displayWidth; x++) { // get src pixel in the page based ordering the OLED lib uses FIXME, super inefficient auto b = buffer[x + (y / 8) * displayWidth]; auto isset = b & (1 << (y & 7)); - adafruitDisplay->drawPixel(x, y, isset ? COLORED : UNCOLORED); + + // Handle flip here, rather than with setRotation(), + // Avoids issues when display width is not a multiple of 8 + if (flipped) + adafruitDisplay->drawPixel((displayWidth - 1) - x, (displayHeight - 1) - y, isset ? GxEPD_BLACK : GxEPD_WHITE); + else + adafruitDisplay->drawPixel(x, y, isset ? GxEPD_BLACK : GxEPD_WHITE); } } + // Trigger the refresh in GxEPD2 LOG_DEBUG("Updating E-Paper... "); - -#if defined(TTGO_T_ECHO) - adafruitDisplay->nextPage(); -#elif defined(RAK4630) || defined(MAKERPYTHON) - - // RAK14000 2.13 inch b/w 250x122 actually now does support partial updates - - // Full update mode (slow) - // adafruitDisplay->display(false); // FIXME, use partial update mode - - // Only enable for e-Paper with support for partial updates and comment out above adafruitDisplay->display(false); - // 1.54 inch 200x200 - GxEPD2_154_M09 - // 2.13 inch 250x122 - GxEPD2_213_BN - // 2.9 inch 296x128 - GxEPD2_290_T5D - // 4.2 inch 300x400 - GxEPD2_420_M01 adafruitDisplay->nextPage(); -#elif defined(PCA10059) || defined(M5_COREINK) || defined(LORA_TYPE) - adafruitDisplay->nextPage(); -#elif defined(HELTEC_WIRELESS_PAPER_V1_0) - adafruitDisplay->nextPage(); -#elif defined(HELTEC_WIRELESS_PAPER) - adafruitDisplay->nextPage(); -#elif defined(ESP32_S3_PICO) - adafruitDisplay->nextPage(); -#elif defined(PRIVATE_HW) || defined(my) - adafruitDisplay->nextPage(); -#endif + // End the update process + endUpdate(); - // Put screen to sleep to save power (possibly not necessary because we already did poweroff inside of display) - adafruitDisplay->hibernate(); LOG_DEBUG("done\n"); - return true; } +// End the update process - virtual method, overriden in derived class +void EInkDisplay::endUpdate() +{ + // Power off display hardware, then deep-sleep (Except Wireless Paper V1.1, no deep-sleep) + adafruitDisplay->hibernate(); +} + // Write the buffer to the display memory void EInkDisplay::display(void) { @@ -208,15 +104,9 @@ void EInkDisplay::display(void) // at least one forceDisplay() keyframe. This prevents flashing when we should the critical // bootscreen (that we want to look nice) -#ifdef USE_EINK_DYNAMIC_PARTIAL - lowPriority(); - forceDisplay(); - highPriority(); -#else if (lastDrawMsec) { forceDisplay(slowUpdateMsec); // Show the first screen a few seconds after boot, then slower } -#endif } // Send a command to the display (low level function) @@ -231,16 +121,11 @@ void EInkDisplay::setDetected(uint8_t detected) (void)detected; } -// Connect to the display +// Connect to the display - variant specific bool EInkDisplay::connect() { LOG_INFO("Doing EInk init\n"); -#ifdef PIN_EINK_PWR_ON - pinMode(PIN_EINK_PWR_ON, OUTPUT); - digitalWrite(PIN_EINK_PWR_ON, HIGH); // If we need to assert a pin to power external peripherals -#endif - #ifdef PIN_EINK_EN // backlight power, HIGH is backlight on, LOW is off pinMode(PIN_EINK_EN, OUTPUT); @@ -249,9 +134,9 @@ bool EInkDisplay::connect() #if defined(TTGO_T_ECHO) { - auto lowLevel = new TECHO_DISPLAY_MODEL(PIN_EINK_CS, PIN_EINK_DC, PIN_EINK_RES, PIN_EINK_BUSY, SPI1); + auto lowLevel = new EINK_DISPLAY_MODEL(PIN_EINK_CS, PIN_EINK_DC, PIN_EINK_RES, PIN_EINK_BUSY, SPI1); - adafruitDisplay = new GxEPD2_BW(*lowLevel); + adafruitDisplay = new GxEPD2_BW(*lowLevel); adafruitDisplay->init(); adafruitDisplay->setRotation(3); adafruitDisplay->setPartialWindow(0, 0, displayWidth, displayHeight); @@ -259,12 +144,12 @@ bool EInkDisplay::connect() #elif defined(RAK4630) || defined(MAKERPYTHON) { if (eink_found) { - auto lowLevel = new TECHO_DISPLAY_MODEL(PIN_EINK_CS, PIN_EINK_DC, PIN_EINK_RES, PIN_EINK_BUSY); - adafruitDisplay = new GxEPD2_BW(*lowLevel); + auto lowLevel = new EINK_DISPLAY_MODEL(PIN_EINK_CS, PIN_EINK_DC, PIN_EINK_RES, PIN_EINK_BUSY); + adafruitDisplay = new GxEPD2_BW(*lowLevel); adafruitDisplay->init(115200, true, 10, false, SPI1, SPISettings(4000000, MSBFIRST, SPI_MODE0)); - // RAK14000 2.13 inch b/w 250x122 does actually now support partial updates + // RAK14000 2.13 inch b/w 250x122 does actually now support fast refresh adafruitDisplay->setRotation(3); - // Partial update support for 1.54, 2.13 RAK14000 b/w , 2.9 and 4.2 + // Fast refresh support for 1.54, 2.13 RAK14000 b/w , 2.9 and 4.2 // adafruitDisplay->setRotation(1); adafruitDisplay->setPartialWindow(0, 0, displayWidth, displayHeight); } else { @@ -272,62 +157,31 @@ bool EInkDisplay::connect() } } -#elif defined(HELTEC_WIRELESS_PAPER_V1_0) +#elif defined(HELTEC_WIRELESS_PAPER_V1_0) || defined(HELTEC_WIRELESS_PAPER) || defined(HELTEC_VISION_MASTER_E213) || \ + defined(HELTEC_VISION_MASTER_E290) || defined(TLORA_T3S3_EPAPER) { - // Is this a normal boot, or a wake from deep sleep? - esp_sleep_wakeup_cause_t wakeReason = esp_sleep_get_wakeup_cause(); - - // If waking from sleep, need to reverse rtc_gpio_isolate(), called in cpuDeepSleep() - // Otherwise, SPI won't work - if (wakeReason != ESP_SLEEP_WAKEUP_UNDEFINED) { - // HSPI + other display pins - rtc_gpio_hold_dis((gpio_num_t)PIN_EINK_SCLK); - rtc_gpio_hold_dis((gpio_num_t)PIN_EINK_DC); - rtc_gpio_hold_dis((gpio_num_t)PIN_EINK_RES); - rtc_gpio_hold_dis((gpio_num_t)PIN_EINK_BUSY); - rtc_gpio_hold_dis((gpio_num_t)PIN_EINK_CS); - rtc_gpio_hold_dis((gpio_num_t)PIN_EINK_MOSI); - } - // Start HSPI hspi = new SPIClass(HSPI); hspi->begin(PIN_EINK_SCLK, -1, PIN_EINK_MOSI, PIN_EINK_CS); // SCLK, MISO, MOSI, SS - // Enable VExt (ACTIVE LOW) - // Unsure if called elsewhere first? - delay(100); - pinMode(Vext, OUTPUT); - digitalWrite(Vext, LOW); - delay(100); + // VExt already enabled in setup() + // RTC GPIO hold disabled in setup() // Create GxEPD2 objects - auto lowLevel = new TECHO_DISPLAY_MODEL(PIN_EINK_CS, PIN_EINK_DC, PIN_EINK_RES, PIN_EINK_BUSY, *hspi); - adafruitDisplay = new GxEPD2_BW(*lowLevel); + auto lowLevel = new EINK_DISPLAY_MODEL(PIN_EINK_CS, PIN_EINK_DC, PIN_EINK_RES, PIN_EINK_BUSY, *hspi); + adafruitDisplay = new GxEPD2_BW(*lowLevel); // Init GxEPD2 adafruitDisplay->init(); adafruitDisplay->setRotation(3); } -#elif defined(HELTEC_WIRELESS_PAPER) +#elif defined(PCA10059) || defined(ME25LS01) { - hspi = new SPIClass(HSPI); - hspi->begin(PIN_EINK_SCLK, -1, PIN_EINK_MOSI, PIN_EINK_CS); // SCLK, MISO, MOSI, SS - delay(100); - pinMode(Vext, OUTPUT); - digitalWrite(Vext, LOW); - delay(100); - auto lowLevel = new TECHO_DISPLAY_MODEL(PIN_EINK_CS, PIN_EINK_DC, PIN_EINK_RES, PIN_EINK_BUSY, *hspi); - adafruitDisplay = new GxEPD2_BW(*lowLevel); - adafruitDisplay->init(); - adafruitDisplay->setRotation(3); - } -#elif defined(PCA10059) - { - auto lowLevel = new TECHO_DISPLAY_MODEL(PIN_EINK_CS, PIN_EINK_DC, PIN_EINK_RES, PIN_EINK_BUSY); - adafruitDisplay = new GxEPD2_BW(*lowLevel); - adafruitDisplay->init(115200, true, 10, false, SPI1, SPISettings(4000000, MSBFIRST, SPI_MODE0)); - adafruitDisplay->setRotation(3); - adafruitDisplay->setPartialWindow(0, 0, displayWidth, displayHeight); + auto lowLevel = new EINK_DISPLAY_MODEL(PIN_EINK_CS, PIN_EINK_DC, PIN_EINK_RES, PIN_EINK_BUSY); + adafruitDisplay = new GxEPD2_BW(*lowLevel); + adafruitDisplay->init(115200, true, 40, false, SPI1, SPISettings(4000000, MSBFIRST, SPI_MODE0)); + adafruitDisplay->setRotation(0); + adafruitDisplay->setPartialWindow(0, 0, EINK_WIDTH, EINK_HEIGHT); } #elif defined(LORA_TYPE) auto lowLevel = new TECHO_DISPLAY_MODEL(PIN_EINK_CS, PIN_EINK_DC, PIN_EINK_RES, PIN_EINK_BUSY); @@ -336,214 +190,22 @@ bool EInkDisplay::connect() adafruitDisplay->setRotation(3); adafruitDisplay->setPartialWindow(0, 0, EPD_WIDTH, EPD_HEIGHT); #elif defined(M5_COREINK) - auto lowLevel = new TECHO_DISPLAY_MODEL(PIN_EINK_CS, PIN_EINK_DC, PIN_EINK_RES, PIN_EINK_BUSY); - adafruitDisplay = new GxEPD2_BW(*lowLevel); + auto lowLevel = new EINK_DISPLAY_MODEL(PIN_EINK_CS, PIN_EINK_DC, PIN_EINK_RES, PIN_EINK_BUSY); + adafruitDisplay = new GxEPD2_BW(*lowLevel); adafruitDisplay->init(115200, true, 40, false, SPI, SPISettings(4000000, MSBFIRST, SPI_MODE0)); adafruitDisplay->setRotation(0); - adafruitDisplay->setPartialWindow(0, 0, EPD_WIDTH, EPD_HEIGHT); + adafruitDisplay->setPartialWindow(0, 0, EINK_WIDTH, EINK_HEIGHT); #elif defined(my) || defined(ESP32_S3_PICO) { - auto lowLevel = new TECHO_DISPLAY_MODEL(PIN_EINK_CS, PIN_EINK_DC, PIN_EINK_RES, PIN_EINK_BUSY); - adafruitDisplay = new GxEPD2_BW(*lowLevel); + auto lowLevel = new EINK_DISPLAY_MODEL(PIN_EINK_CS, PIN_EINK_DC, PIN_EINK_RES, PIN_EINK_BUSY); + adafruitDisplay = new GxEPD2_BW(*lowLevel); adafruitDisplay->init(115200, true, 40, false, SPI, SPISettings(4000000, MSBFIRST, SPI_MODE0)); adafruitDisplay->setRotation(1); - adafruitDisplay->setPartialWindow(0, 0, EPD_WIDTH, EPD_HEIGHT); + adafruitDisplay->setPartialWindow(0, 0, EINK_WIDTH, EINK_HEIGHT); } #endif - // adafruitDisplay->setFullWindow(); - // adafruitDisplay->fillScreen(UNCOLORED); - // adafruitDisplay->drawCircle(100, 100, 20, COLORED); - // adafruitDisplay->display(false); return true; } -// Use a mix of full and partial refreshes, to preserve display health -#if defined(USE_EINK_DYNAMIC_PARTIAL) - -// Suggest that subsequent updates should use partial-refresh -void EInkDisplay::highPriority() -{ - isHighPriority = true; -} - -// Suggest that subsequent updates should use full-refresh -void EInkDisplay::lowPriority() -{ - isHighPriority = false; -} - -// Full-refresh is explicitly requested for next one update - no skipping please -void EInkDisplay::demandFullRefresh() -{ - demandingFull = true; -} - -// configure display for partial-refresh -void EInkDisplay::configForPartialRefresh() -{ - // Display-specific code can go here -#if defined(PRIVATE_HW) -#else - // Otherwise: - adafruitDisplay->setPartialWindow(0, 0, adafruitDisplay->width(), adafruitDisplay->height()); -#endif -} - -// Configure display for full-refresh -void EInkDisplay::configForFullRefresh() -{ - // Display-specific code can go here -#if defined(PRIVATE_HW) -#else - // Otherwise: - adafruitDisplay->setFullWindow(); -#endif -} - -#ifdef EINK_PARTIAL_ERASURE_LIMIT -// Count black pixels in an image. Used for "erasure tracking" -int32_t EInkDisplay::countBlackPixels() -{ - int32_t blackCount = 0; // Signed, to avoid underflow when comparing - for (uint16_t b = 0; b < (displayWidth / 8) * displayHeight; b++) { - for (uint8_t i = 0; i < 7; i++) { - // Check if each bit is black or white - blackCount += (buffer[b] >> i) & 1; - } - } - return blackCount; -} - -// Evaluate the (rough) amount of black->white pixel change since last full refresh -bool EInkDisplay::tooManyErasures() -{ - // Ideally, we would compare the new and old buffers, to count *actual* white-to-black pixel changes - // but that would require substantially more "code tampering" - - // Get the black pixel stats for this image - int32_t blackCount = countBlackPixels(); - int32_t blackDifference = blackCount - prevBlackCount; - - // Update the running total of "erasures" - black pixels which have become white, since last full-refresh - if (blackDifference < 0) - erasedSinceFull -= blackDifference; - - // Store black pixel count for next time - prevBlackCount = blackCount; - - // Log the running total - help devs setup new boards - LOG_DEBUG("Dynamic Partial: erasedSinceFull=%hu, EINK_PARTIAL_ERASURE_LIMIT=%hu\n", erasedSinceFull, - EINK_PARTIAL_ERASURE_LIMIT); - - // Check if too many pixels have been erased - if (erasedSinceFull > EINK_PARTIAL_ERASURE_LIMIT) - return true; // Too many - else - return false; // Still okay -} -#endif // ifdef EINK_PARTIAL_BRIGHTEN_LIMIT_PX - -bool EInkDisplay::newImageMatchesOld() -{ - uint32_t newImageHash = 0; - - // Generate hash: sum all bytes in the image buffer - for (uint16_t b = 0; b < (displayWidth / 8) * displayHeight; b++) { - newImageHash += buffer[b]; - } - - // Compare hashes - bool hashMatches = (newImageHash == prevImageHash); - - // Update the cached hash - prevImageHash = newImageHash; - - // Return the comparison result - return hashMatches; -} - -// Change between partial and full refresh config, or skip update, balancing urgency and display health. -bool EInkDisplay::determineRefreshMode() -{ - uint32_t now = millis(); - uint32_t sinceLast = now - lastUpdateMsec; - - // If rate-limiting dropped a high-priority update: - // promote this update, so it runs ASAP - if (missedHighPriorityUpdate) { - isHighPriority = true; - missedHighPriorityUpdate = false; - } - - // Abort: if too soon for a new frame (unless demanding full) - if (!demandingFull && isHighPriority && partialRefreshCount > 0 && sinceLast < highPriorityLimitMsec) { - LOG_DEBUG("Dynamic Partial: update skipped. Exceeded EINK_HIGHPRIORITY_LIMIT_SECONDS\n"); - missedHighPriorityUpdate = true; - return false; - } - if (!demandingFull && !isHighPriority && !demandingFull && sinceLast < lowPriorityLimitMsec) { - return false; - } - - // If demanded full refresh: give it to them - if (demandingFull) - needsFull = true; - - // Check if old image (partial) should be redrawn (as full), for image quality - if (partialRefreshCount > 0 && !isHighPriority) - needsFull = true; - - // If too many partials, require a full-refresh (display health) - if (partialRefreshCount >= partialRefreshLimit) - needsFull = true; - -#ifdef EINK_PARTIAL_ERASURE_LIMIT - // Some displays struggle with erasing black pixels to white, during partial refresh - if (tooManyErasures()) - needsFull = true; -#endif - - // If image matches - // (Block must run, even if full already selected, to store hash for next time) - if (newImageMatchesOld()) { - // If low priority: limit rate - // otherwise, every loop() will run the hash method - if (!isHighPriority) - lastUpdateMsec = now; - - // If update is *not* for display health or image quality, skip it - if (!needsFull) - return false; - } - - // Conditions assessed - not skipping - load the appropriate config - - // If options require a full refresh - if (!isHighPriority || needsFull) { - if (partialRefreshCount > 0) - configForFullRefresh(); - - LOG_DEBUG("Dynamic Partial: conditions met for full-refresh\n"); - partialRefreshCount = 0; - needsFull = false; - demandingFull = false; - erasedSinceFull = 0; // Reset the count for EINK_PARTIAL_ERASURE_LIMIT - tracks ghosting buildup - } - - // If options allow a partial refresh - else { - if (partialRefreshCount == 0) - configForPartialRefresh(); - - LOG_DEBUG("Dynamic Partial: conditions met for partial-refresh\n"); - partialRefreshCount++; - } - - lastUpdateMsec = now; // Mark time for rate limiting - return true; // Instruct calling method to continue with update -} - -#endif // End USE_EINK_DYNAMIC_PARTIAL - #endif diff --git a/src/graphics/EInkDisplay2.h b/src/graphics/EInkDisplay2.h index aeaddee2d..af631150e 100644 --- a/src/graphics/EInkDisplay2.h +++ b/src/graphics/EInkDisplay2.h @@ -1,21 +1,22 @@ #pragma once -#include +#ifdef USE_EINK -#if defined(HELTEC_WIRELESS_PAPER_V1_0) -// Re-enable SPI after deep sleep: rtc_gpio_hold_dis() -#include "driver/rtc_io.h" -#endif +#include "GxEPD2_BW.h" +#include /** * An adapter class that allows using the GxEPD2 library as if it was an OLEDDisplay implementation. * + * Note: EInkDynamicDisplay derives from this class. + * * Remaining TODO: * optimize display() to only draw changed pixels (see other OLED subclasses for examples) * implement displayOn/displayOff to turn off the TFT device (and backlight) * Use the fast NRF52 SPI API rather than the slow standard arduino version * * turn radio back on - currently with both on spi bus is fucked? or are we leaving chip select asserted? + * Suggestion: perhaps similar to HELTEC_WIRELESS_PAPER issue, which resolved with rtc_gpio_hold_dis() */ class EInkDisplay : public OLEDDisplay { @@ -37,7 +38,14 @@ class EInkDisplay : public OLEDDisplay * * @return true if we did draw the screen */ - bool forceDisplay(uint32_t msecLimit = 1000); + virtual bool forceDisplay(uint32_t msecLimit = 1000); + + /** + * Run any code needed to complete an update, after the physical refresh has completed. + * Split from forceDisplay(), to enable async refresh in derived EInkDynamicDisplay class. + * + */ + virtual void endUpdate(); /** * shim to make the abstraction happy @@ -55,80 +63,18 @@ class EInkDisplay : public OLEDDisplay // Connect to the display virtual bool connect() override; -#if defined(USE_EINK_DYNAMIC_PARTIAL) - // Full, partial, or skip: balance urgency with display health + // AdafruitGFX display object - instantiated in connect(), variant specific + GxEPD2_BW *adafruitDisplay = NULL; - // Use partial refresh if EITHER: - // * highPriority() was set - // * a highPriority() update was previously skipped, for rate-limiting - (EINK_HIGHPRIORITY_LIMIT_SECONDS) - - // Use full refresh if EITHER: - // * lowPriority() was set - // * demandFullRefresh() was called - (single shot) - // * too many partial updates in a row: protect display - (EINK_PARTIAL_REPEAT_LIMIT) - // * no recent updates, and last update was partial: redraw for image quality (EINK_LOWPRIORITY_LIMIT_SECONDS) - // * (optional) too many "erasures" since full-refresh (black pixels cleared to white) - - // Rate limit if: - // * lowPriority() - (EINK_LOWPRIORITY_LIMIT_SECONDS) - // * highPriority(), if multiple partials have run back-to-back - (EINK_HIGHPRIORITY_LIMIT_SECONDS) - - // Skip update entirely if ALL criteria met: - // * new image matches old image - // * lowPriority() - // * no call to demandFullRefresh() - // * not redrawing for image quality - // * not refreshing for display health - - // ------------------------------------ - - // To implement for your E-Ink display: - // * edit configForPartialRefresh() - // * edit configForFullRefresh() - // * add macros to variant.h, and adjust to taste: - - /* - #define USE_EINK_DYNAMIC_PARTIAL - #define EINK_LOWPRIORITY_LIMIT_SECONDS 30 - #define EINK_HIGHPRIORITY_LIMIT_SECONDS 1 - #define EINK_PARTIAL_REPEAT_LIMIT 5 - #define EINK_PARTIAL_ERASURE_LIMIT 300 // optional - */ - - public: - void highPriority(); // Suggest partial refresh - void lowPriority(); // Suggest full refresh - void demandFullRefresh(); // For next update: explicitly request full refresh - - protected: - void configForPartialRefresh(); // Display specific code to select partial refresh mode - void configForFullRefresh(); // Display specific code to return to full refresh mode - bool newImageMatchesOld(); // Is the new update actually different to the last image? - bool determineRefreshMode(); // Called immediately before data written to display - choose refresh mode, or abort update -#ifdef EINK_PARTIAL_ERASURE_LIMIT - int32_t countBlackPixels(); // Calculate the number of black pixels in the new image - bool tooManyErasures(); // Has too much "ghosting" (black pixels erased to white) accumulated since last full-refresh? + // If display uses HSPI +#if defined(HELTEC_WIRELESS_PAPER) || defined(HELTEC_WIRELESS_PAPER_V1_0) || defined(HELTEC_VISION_MASTER_E213) || \ + defined(HELTEC_VISION_MASTER_E290) || defined(TLORA_T3S3_EPAPER) + SPIClass *hspi = NULL; #endif - bool isHighPriority = true; // Does the method calling update believe that this is urgent? - bool needsFull = false; // Is a full refresh forced? (display health) - bool demandingFull = false; // Was full refresh specifically requested? (splash screens, etc) - bool missedHighPriorityUpdate = false; // Was a high priority update skipped for rate-limiting? - uint16_t partialRefreshCount = 0; // How many partials have occurred since last full refresh? - uint32_t lastUpdateMsec = 0; // When did the last update occur? - uint32_t prevImageHash = 0; // Used to check if update will change screen image (skippable or not) - int32_t prevBlackCount = 0; // How many black pixels were in the previous image - uint32_t erasedSinceFull = 0; // How many black pixels have been set back to white since last full-refresh? (roughly) - - // Set in variant.h - const uint32_t lowPriorityLimitMsec = (uint32_t)1000 * EINK_LOWPRIORITY_LIMIT_SECONDS; // Max rate for partial refreshes - const uint32_t highPriorityLimitMsec = (uint32_t)1000 * EINK_HIGHPRIORITY_LIMIT_SECONDS; // Max rate for full refreshes - const uint32_t partialRefreshLimit = EINK_PARTIAL_REPEAT_LIMIT; // Max consecutive partials, before full is triggered - -#else // !USE_EINK_DYNAMIC_PARTIAL - // Tolerate calls to these methods anywhere, just to be safe - void highPriority() {} - void lowPriority() {} - void demandFullRefresh() {} -#endif + private: + // FIXME quick hack to limit drawing to a very slow rate + uint32_t lastDrawMsec = 0; }; + +#endif \ No newline at end of file diff --git a/src/graphics/EInkDynamicDisplay.cpp b/src/graphics/EInkDynamicDisplay.cpp new file mode 100644 index 000000000..ca994b2c9 --- /dev/null +++ b/src/graphics/EInkDynamicDisplay.cpp @@ -0,0 +1,556 @@ +#include "Throttle.h" +#include "configuration.h" + +#if defined(USE_EINK) && defined(USE_EINK_DYNAMICDISPLAY) +#include "EInkDynamicDisplay.h" + +// Constructor +EInkDynamicDisplay::EInkDynamicDisplay(uint8_t address, int sda, int scl, OLEDDISPLAY_GEOMETRY geometry, HW_I2C i2cBus) + : EInkDisplay(address, sda, scl, geometry, i2cBus), NotifiedWorkerThread("EInkDynamicDisplay") +{ + // If tracking ghost pixels, grab memory +#ifdef EINK_LIMIT_GHOSTING_PX + dirtyPixels = new uint8_t[EInkDisplay::displayBufferSize](); // Init with zeros +#endif +} + +// Destructor +EInkDynamicDisplay::~EInkDynamicDisplay() +{ + // If we were tracking ghost pixels, free the memory +#ifdef EINK_LIMIT_GHOSTING_PX + delete[] dirtyPixels; +#endif +} + +// Screen requests a BACKGROUND frame +void EInkDynamicDisplay::display() +{ + addFrameFlag(BACKGROUND); + update(); +} + +// Screen requests a RESPONSIVE frame +bool EInkDynamicDisplay::forceDisplay(uint32_t msecLimit) +{ + addFrameFlag(RESPONSIVE); + return update(); // (Unutilized) Base class promises to return true if update ran +} + +// Add flag for the next frame +void EInkDynamicDisplay::addFrameFlag(frameFlagTypes flag) +{ + // OR the new flag into the existing flags + this->frameFlags = (frameFlagTypes)(this->frameFlags | flag); +} + +// GxEPD2 code to set fast refresh +void EInkDynamicDisplay::configForFastRefresh() +{ + // Variant-specific code can go here +#if defined(PRIVATE_HW) +#else + // Otherwise: + adafruitDisplay->setPartialWindow(0, 0, adafruitDisplay->width(), adafruitDisplay->height()); +#endif +} + +// GxEPD2 code to set full refresh +void EInkDynamicDisplay::configForFullRefresh() +{ + // Variant-specific code can go here +#if defined(PRIVATE_HW) +#else + // Otherwise: + adafruitDisplay->setFullWindow(); +#endif +} + +// Run any relevant GxEPD2 code, so next update will use correct refresh type +void EInkDynamicDisplay::applyRefreshMode() +{ + // Change from FULL to FAST + if (currentConfig == FULL && refresh == FAST) { + configForFastRefresh(); + currentConfig = FAST; + } + + // Change from FAST back to FULL + else if (currentConfig == FAST && refresh == FULL) { + configForFullRefresh(); + currentConfig = FULL; + } +} + +// Update fastRefreshCount +void EInkDynamicDisplay::adjustRefreshCounters() +{ + if (refresh == FAST) + fastRefreshCount++; + + else if (refresh == FULL) + fastRefreshCount = 0; +} + +// Trigger the display update by calling base class +bool EInkDynamicDisplay::update() +{ + // Detemine the refresh mode to use, and start the update + bool refreshApproved = determineMode(); + if (refreshApproved) { + EInkDisplay::forceDisplay(0); // Bypass base class' own rate-limiting system + storeAndReset(); // Store the result of this loop for next time. Note: call *before* endOrDetach() + endOrDetach(); // endUpdate() right now, or set the async refresh flag (if FULL and HAS_EINK_ASYNCFULL) + } else + storeAndReset(); // No update, no post-update code, just store the results + + return refreshApproved; // (Unutilized) Base class promises to return true if update ran +} + +// Figure out who runs the post-update code +void EInkDynamicDisplay::endOrDetach() +{ + // If the GxEPD2 version reports that it has the async modifications +#ifdef HAS_EINK_ASYNCFULL + if (previousRefresh == FULL) { + asyncRefreshRunning = true; // Set the flag - checked in determineMode(); cleared by onNotify() + + if (previousFrameFlags & BLOCKING) + awaitRefresh(); + else { + // Async begins + LOG_DEBUG("Async full-refresh begins (dropping frames)\n"); + notifyLater(intervalPollAsyncRefresh, DUE_POLL_ASYNCREFRESH, true); // Hand-off to NotifiedWorkerThread + } + } + + // Fast Refresh + else if (previousRefresh == FAST) + EInkDisplay::endUpdate(); // Still block while updating, but EInkDisplay needs us to call endUpdate() ourselves. + + // Fallback - If using an unmodified version of GxEPD2 for some reason +#else + if (previousRefresh == FULL || previousRefresh == FAST) { // If refresh wasn't skipped (on unspecified..) + LOG_WARN( + "GxEPD2 version has not been modified to support async refresh; using fallback behavior. Please update lib_deps in " + "variant's platformio.ini file\n"); + EInkDisplay::endUpdate(); + } +#endif +} + +// Assess situation, pick a refresh type +bool EInkDynamicDisplay::determineMode() +{ + checkInitialized(); + checkForPromotion(); +#if defined(HAS_EINK_ASYNCFULL) + checkBusyAsyncRefresh(); +#endif + checkRateLimiting(); + + // If too soon for a new frame, or display busy, abort early + if (refresh == SKIPPED) + return false; // No refresh + + // -- New frame is due -- + + resetRateLimiting(); // Once determineMode() ends, will have to wait again + hashImage(); // Generate here, so we can still copy it to previousImageHash, even if we skip the comparison check + LOG_DEBUG("determineMode(): "); // Begin log entry + + // Once mode determined, any remaining checks will bypass + checkCosmetic(); + checkDemandingFast(); + checkFrameMatchesPrevious(); + checkConsecutiveFastRefreshes(); +#ifdef EINK_LIMIT_GHOSTING_PX + checkExcessiveGhosting(); +#endif + checkFastRequested(); + + if (refresh == UNSPECIFIED) + LOG_WARN("There was a flaw in the determineMode() logic.\n"); + + // -- Decision has been reached -- + applyRefreshMode(); + adjustRefreshCounters(); + +#ifdef EINK_LIMIT_GHOSTING_PX + // Full refresh clears any ghosting + if (refresh == FULL) + resetGhostPixelTracking(); +#endif + + // Return - call a refresh or not? + if (refresh == SKIPPED) + return false; // Don't trigger a refresh + else + return true; // Do trigger a refresh +} + +// Is this the very first frame? +void EInkDynamicDisplay::checkInitialized() +{ + if (!initialized) { + // Undo GxEPD2_BW::partialWindow(), if set by developer in EInkDisplay::connect() + configForFullRefresh(); + + // Clear any existing image, so we can draw logo with fast-refresh, but also to set GxEPD2_EPD::_initial_write + adafruitDisplay->clearScreen(); + + LOG_DEBUG("initialized, "); + initialized = true; + + // Use a fast-refresh for the next frame; no skipping or else blank screen when waking from deep sleep + addFrameFlag(DEMAND_FAST); + } +} + +// Was a frame skipped (rate, display busy) that should have been a FAST refresh? +void EInkDynamicDisplay::checkForPromotion() +{ + // If a frame was skipped (rate, display busy), then promote a BACKGROUND frame + // Because we DID want a RESPONSIVE/COSMETIC/DEMAND_FULL frame last time, we just didn't get it + + switch (previousReason) { + case ASYNC_REFRESH_BLOCKED_DEMANDFAST: + addFrameFlag(DEMAND_FAST); + break; + case ASYNC_REFRESH_BLOCKED_COSMETIC: + addFrameFlag(COSMETIC); + break; + case ASYNC_REFRESH_BLOCKED_RESPONSIVE: + case EXCEEDED_RATELIMIT_FAST: + addFrameFlag(RESPONSIVE); + break; + default: + break; + } +} + +// Is it too soon for another frame of this type? +void EInkDynamicDisplay::checkRateLimiting() +{ + // Sanity check: millis() overflow - just let the update run.. + if (previousRunMs > millis()) + return; + + // Skip update: too soon for BACKGROUND + if (frameFlags == BACKGROUND) { + if (Throttle::isWithinTimespanMs(previousRunMs, EINK_LIMIT_RATE_BACKGROUND_SEC * 1000)) { + refresh = SKIPPED; + reason = EXCEEDED_RATELIMIT_FULL; + return; + } + } + + // No rate-limit for these special cases + if (frameFlags & COSMETIC || frameFlags & DEMAND_FAST) + return; + + // Skip update: too soon for RESPONSIVE + if (frameFlags & RESPONSIVE) { + if (Throttle::isWithinTimespanMs(previousRunMs, EINK_LIMIT_RATE_RESPONSIVE_SEC * 1000)) { + refresh = SKIPPED; + reason = EXCEEDED_RATELIMIT_FAST; + LOG_DEBUG("refresh=SKIPPED, reason=EXCEEDED_RATELIMIT_FAST, frameFlags=0x%x\n", frameFlags); + return; + } + } +} + +// Is this frame COSMETIC (splash screens?) +void EInkDynamicDisplay::checkCosmetic() +{ + // If a decision was already reached, don't run the check + if (refresh != UNSPECIFIED) + return; + + // A full refresh is requested for cosmetic purposes: we have a decision + if (frameFlags & COSMETIC) { + refresh = FULL; + reason = FLAGGED_COSMETIC; + LOG_DEBUG("refresh=FULL, reason=FLAGGED_COSMETIC, frameFlags=0x%x\n", frameFlags); + } +} + +// Is this a one-off special circumstance, where we REALLY want a fast refresh? +void EInkDynamicDisplay::checkDemandingFast() +{ + // If a decision was already reached, don't run the check + if (refresh != UNSPECIFIED) + return; + + // A fast refresh is demanded: we have a decision + if (frameFlags & DEMAND_FAST) { + refresh = FAST; + reason = FLAGGED_DEMAND_FAST; + LOG_DEBUG("refresh=FAST, reason=FLAGGED_DEMAND_FAST, frameFlags=0x%x\n", frameFlags); + } +} + +// Does the new frame match the currently displayed image? +void EInkDynamicDisplay::checkFrameMatchesPrevious() +{ + // If a decision was already reached, don't run the check + if (refresh != UNSPECIFIED) + return; + + // If frame is *not* a duplicate, abort the check + if (imageHash != previousImageHash) + return; + +#if !defined(EINK_BACKGROUND_USES_FAST) + // If BACKGROUND, and last update was FAST: redraw the same image in FULL (for display health + image quality) + if (frameFlags == BACKGROUND && fastRefreshCount > 0) { + refresh = FULL; + reason = REDRAW_WITH_FULL; + LOG_DEBUG("refresh=FULL, reason=REDRAW_WITH_FULL, frameFlags=0x%x\n", frameFlags); + return; + } +#endif + + // Not redrawn, not COSMETIC, not DEMAND_FAST + refresh = SKIPPED; + reason = FRAME_MATCHED_PREVIOUS; + LOG_DEBUG("refresh=SKIPPED, reason=FRAME_MATCHED_PREVIOUS, frameFlags=0x%x\n", frameFlags); +} + +// Have too many fast-refreshes occured consecutively, since last full refresh? +void EInkDynamicDisplay::checkConsecutiveFastRefreshes() +{ + // If a decision was already reached, don't run the check + if (refresh != UNSPECIFIED) + return; + + // If too many FAST refreshes consecutively - force a FULL refresh + if (fastRefreshCount >= EINK_LIMIT_FASTREFRESH) { + refresh = FULL; + reason = EXCEEDED_LIMIT_FASTREFRESH; + LOG_DEBUG("refresh=FULL, reason=EXCEEDED_LIMIT_FASTREFRESH, frameFlags=0x%x\n", frameFlags); + } +} + +// No objections, we can perform fast-refresh, if desired +void EInkDynamicDisplay::checkFastRequested() +{ + if (refresh != UNSPECIFIED) + return; + + if (frameFlags == BACKGROUND) { +#ifdef EINK_BACKGROUND_USES_FAST + // If we want BACKGROUND to use fast. (FULL only when a limit is hit) + refresh = FAST; + reason = BACKGROUND_USES_FAST; + LOG_DEBUG("refresh=FAST, reason=BACKGROUND_USES_FAST, fastRefreshCount=%lu, frameFlags=0x%x\n", fastRefreshCount, + frameFlags); +#else + // If we do want to use FULL for BACKGROUND updates + refresh = FULL; + reason = FLAGGED_BACKGROUND; + LOG_DEBUG("refresh=FULL, reason=FLAGGED_BACKGROUND\n"); +#endif + } + + // Sanity: confirm that we did ask for a RESPONSIVE frame. + if (frameFlags & RESPONSIVE) { + refresh = FAST; + reason = NO_OBJECTIONS; + LOG_DEBUG("refresh=FAST, reason=NO_OBJECTIONS, fastRefreshCount=%lu, frameFlags=0x%x\n", fastRefreshCount, frameFlags); + } +} + +// Reset the timer used for rate-limiting +void EInkDynamicDisplay::resetRateLimiting() +{ + previousRunMs = millis(); +} + +// Generate a hash of this frame, to compare against previous update +void EInkDynamicDisplay::hashImage() +{ + imageHash = 0; + + // Sum all bytes of the image buffer together + for (uint16_t b = 0; b < (displayWidth / 8) * displayHeight; b++) { + imageHash ^= buffer[b] << b; + } +} + +// Store the results of determineMode() for future use, and reset for next call +void EInkDynamicDisplay::storeAndReset() +{ + previousFrameFlags = frameFlags; + previousRefresh = refresh; + previousReason = reason; + + // Only store image hash if the display will update + if (refresh != SKIPPED) { + previousImageHash = imageHash; + } + + frameFlags = BACKGROUND; + refresh = UNSPECIFIED; +} + +#ifdef EINK_LIMIT_GHOSTING_PX +// Count how many ghost pixels the new image will display +void EInkDynamicDisplay::countGhostPixels() +{ + // If a decision was already reached, don't run the check + if (refresh != UNSPECIFIED) + return; + + // Start a new count + ghostPixelCount = 0; + + // Check new image, bit by bit, for any white pixels at locations marked "dirty" + for (uint16_t i = 0; i < displayBufferSize; i++) { + for (uint8_t bit = 0; bit < 7; bit++) { + + const bool dirty = (dirtyPixels[i] >> bit) & 1; // Has pixel location been drawn to since full-refresh? + const bool shouldBeBlank = !((buffer[i] >> bit) & 1); // Is pixel location white in the new image? + + // If pixel is (or has been) black since last full-refresh, and now is white: ghosting + if (dirty && shouldBeBlank) + ghostPixelCount++; + + // Update the dirty status for this pixel - will this location become a ghost if set white in future? + if (!dirty && !shouldBeBlank) + dirtyPixels[i] |= (1 << bit); + } + } + + LOG_DEBUG("ghostPixels=%hu, ", ghostPixelCount); +} + +// Check if ghost pixel count exceeds the defined limit +void EInkDynamicDisplay::checkExcessiveGhosting() +{ + // If a decision was already reached, don't run the check + if (refresh != UNSPECIFIED) + return; + + countGhostPixels(); + + // If too many ghost pixels, select full refresh + if (ghostPixelCount > EINK_LIMIT_GHOSTING_PX) { + refresh = FULL; + reason = EXCEEDED_GHOSTINGLIMIT; + LOG_DEBUG("refresh=FULL, reason=EXCEEDED_GHOSTINGLIMIT, frameFlags=0x%x\n", frameFlags); + } +} + +// Clear the dirty pixels array. Call when full-refresh cleans the display. +void EInkDynamicDisplay::resetGhostPixelTracking() +{ + // Copy the current frame into dirtyPixels[] from the display buffer + memcpy(dirtyPixels, EInkDisplay::buffer, EInkDisplay::displayBufferSize); +} +#endif // EINK_LIMIT_GHOSTING_PX + +// Handle any asyc tasks +void EInkDynamicDisplay::onNotify(uint32_t notification) +{ + // Which task + switch (notification) { + case DUE_POLL_ASYNCREFRESH: + pollAsyncRefresh(); + break; + } +} + +#ifdef HAS_EINK_ASYNCFULL +// Public: wait for an refresh already in progress, then run the post-update code. See Screen::setScreensaverFrames() +void EInkDynamicDisplay::joinAsyncRefresh() +{ + // If no async refresh running, nothing to do + if (!asyncRefreshRunning) + return; + + LOG_DEBUG("Joining an async refresh in progress\n"); + + // Continually poll the BUSY pin + while (adafruitDisplay->epd2.isBusy()) + yield(); + + // If asyncRefreshRunning flag is still set, but display's BUSY pin reports the refresh is done + adafruitDisplay->endAsyncFull(); // Run the end of nextPage() code + EInkDisplay::endUpdate(); // Run base-class code to finish off update (NOT our derived class override) + asyncRefreshRunning = false; // Unset the flag + LOG_DEBUG("Refresh complete\n"); + + // Note: this code only works because of a modification to meshtastic/GxEPD2. + // It is only equipped to intercept calls to nextPage() +} + +// Called from NotifiedWorkerThread. Run the post-update code if the hardware is ready +void EInkDynamicDisplay::pollAsyncRefresh() +{ + // In theory, this condition should never be met + if (!asyncRefreshRunning) + return; + + // Still running, check back later + if (adafruitDisplay->epd2.isBusy()) { + // Schedule next call of pollAsyncRefresh() + NotifiedWorkerThread::notifyLater(intervalPollAsyncRefresh, DUE_POLL_ASYNCREFRESH, true); + return; + } + + // If asyncRefreshRunning flag is still set, but display's BUSY pin reports the refresh is done + adafruitDisplay->endAsyncFull(); // Run the end of nextPage() code + EInkDisplay::endUpdate(); // Run base-class code to finish off update (NOT our derived class override) + asyncRefreshRunning = false; // Unset the flag + LOG_DEBUG("Async full-refresh complete\n"); + + // Note: this code only works because of a modification to meshtastic/GxEPD2. + // It is only equipped to intercept calls to nextPage() +} + +// Check the status of "async full-refresh"; skip if running +void EInkDynamicDisplay::checkBusyAsyncRefresh() +{ + // No refresh taking place, continue with determineMode() + if (!asyncRefreshRunning) + return; + + // Full refresh still running + if (adafruitDisplay->epd2.isBusy()) { + // No refresh + refresh = SKIPPED; + + // Set the reason, marking what type of frame we're skipping + if (frameFlags & DEMAND_FAST) + reason = ASYNC_REFRESH_BLOCKED_DEMANDFAST; + else if (frameFlags & COSMETIC) + reason = ASYNC_REFRESH_BLOCKED_COSMETIC; + else if (frameFlags & RESPONSIVE) + reason = ASYNC_REFRESH_BLOCKED_RESPONSIVE; + else + reason = ASYNC_REFRESH_BLOCKED_BACKGROUND; + + return; + } + + // Async refresh appears to have stopped, but wasn't caught by onNotify() + else + pollAsyncRefresh(); // Check (and terminate) the async refresh manually +} + +// Hold control while an async refresh runs +void EInkDynamicDisplay::awaitRefresh() +{ + // Continually poll the BUSY pin + while (adafruitDisplay->epd2.isBusy()) + yield(); + + // End the full-refresh process + adafruitDisplay->endAsyncFull(); // Run the end of nextPage() code + EInkDisplay::endUpdate(); // Run base-class code to finish off update (NOT our derived class override) + asyncRefreshRunning = false; // Unset the flag +} +#endif // HAS_EINK_ASYNCFULL + +#endif // USE_EINK_DYNAMICDISPLAY \ No newline at end of file diff --git a/src/graphics/EInkDynamicDisplay.h b/src/graphics/EInkDynamicDisplay.h new file mode 100644 index 000000000..9e131dca7 --- /dev/null +++ b/src/graphics/EInkDynamicDisplay.h @@ -0,0 +1,149 @@ +#pragma once + +#include "configuration.h" + +#if defined(USE_EINK) && defined(USE_EINK_DYNAMICDISPLAY) + +#include "EInkDisplay2.h" +#include "GxEPD2_BW.h" +#include "concurrency/NotifiedWorkerThread.h" + +/* + Derives from the EInkDisplay adapter class. + Accepts suggestions from Screen class about frame type. + Determines which refresh type is most suitable. + (Full, Fast, Skip) +*/ + +class EInkDynamicDisplay : public EInkDisplay, protected concurrency::NotifiedWorkerThread +{ + public: + // Constructor + // ( Parameters unused, passed to EInkDisplay. Maintains compatibility OLEDDisplay class ) + EInkDynamicDisplay(uint8_t address, int sda, int scl, OLEDDISPLAY_GEOMETRY geometry, HW_I2C i2cBus); + ~EInkDynamicDisplay(); + + // What kind of frame is this + enum frameFlagTypes : uint8_t { + BACKGROUND = (1 << 0), // For frames via display() + RESPONSIVE = (1 << 1), // For frames via forceDisplay() + COSMETIC = (1 << 2), // For splashes + DEMAND_FAST = (1 << 3), // Special case only + BLOCKING = (1 << 4), // Modifier - block while refresh runs + }; + void addFrameFlag(frameFlagTypes flag); + + // Set the correct frame flag, then call universal "update()" method + void display() override; + bool forceDisplay(uint32_t msecLimit) override; // Shadows base class. Parameter and return val unused. + + protected: + enum refreshTypes : uint8_t { // Which refresh operation will be used + UNSPECIFIED, + FULL, + FAST, + SKIPPED, + }; + enum reasonTypes : uint8_t { // How was the decision reached + NO_OBJECTIONS, + ASYNC_REFRESH_BLOCKED_DEMANDFAST, + ASYNC_REFRESH_BLOCKED_COSMETIC, + ASYNC_REFRESH_BLOCKED_RESPONSIVE, + ASYNC_REFRESH_BLOCKED_BACKGROUND, + EXCEEDED_RATELIMIT_FAST, + EXCEEDED_RATELIMIT_FULL, + FLAGGED_COSMETIC, + FLAGGED_DEMAND_FAST, + EXCEEDED_LIMIT_FASTREFRESH, + EXCEEDED_GHOSTINGLIMIT, + FRAME_MATCHED_PREVIOUS, + BACKGROUND_USES_FAST, + FLAGGED_BACKGROUND, + REDRAW_WITH_FULL, + }; + + enum notificationTypes : uint8_t { // What was onNotify() called for + NONE = 0, // This behavior (NONE=0) is fixed by NotifiedWorkerThread class + DUE_POLL_ASYNCREFRESH = 1, + }; + const uint32_t intervalPollAsyncRefresh = 100; + + void onNotify(uint32_t notification) override; // Handle any async tasks - overrides NotifiedWorkerThread + void configForFastRefresh(); // GxEPD2 code to set fast-refresh + void configForFullRefresh(); // GxEPD2 code to set full-refresh + bool determineMode(); // Assess situation, pick a refresh type + void applyRefreshMode(); // Run any relevant GxEPD2 code, so next update will use correct refresh type + void adjustRefreshCounters(); // Update fastRefreshCount + bool update(); // Trigger the display update - determine mode, then call base class + void endOrDetach(); // Run the post-update code, or delegate it off to checkBusyAsyncRefresh() + + // Checks as part of determineMode() + void checkInitialized(); // Is this the very first frame? + void checkForPromotion(); // Was a frame skipped (rate, display busy) that should have been a FAST refresh? + void checkRateLimiting(); // Is this frame too soon? + void checkCosmetic(); // Was the COSMETIC flag set? + void checkDemandingFast(); // Was the DEMAND_FAST flag set? + void checkFrameMatchesPrevious(); // Does the new frame match the existing display image? + void checkConsecutiveFastRefreshes(); // Too many fast-refreshes consecutively? + void checkFastRequested(); // Was the flag set for RESPONSIVE, or only BACKGROUND? + + void resetRateLimiting(); // Set previousRunMs - this now counts as an update, for rate-limiting + void hashImage(); // Generate a hashed version of this frame, to compare against previous update + void storeAndReset(); // Keep results of determineMode() for later, tidy-up for next call + + // What we are determining for this frame + frameFlagTypes frameFlags = BACKGROUND; // Frame characteristics - determineMode() input + refreshTypes refresh = UNSPECIFIED; // Refresh type - determineMode() output + reasonTypes reason = NO_OBJECTIONS; // Reason - why was refresh type used + + // What happened last time determineMode() ran + frameFlagTypes previousFrameFlags = BACKGROUND; // (Previous) Frame flags + refreshTypes previousRefresh = UNSPECIFIED; // (Previous) Outcome + reasonTypes previousReason = NO_OBJECTIONS; // (Previous) Reason + + bool initialized = false; // Have we drawn at least one frame yet? + uint32_t previousRunMs = -1; // When did determineMode() last run (rather than rejecting for rate-limiting) + uint32_t imageHash = 0; // Hash of the current frame. Don't bother updating if nothing has changed! + uint32_t previousImageHash = 0; // Hash of the previous update's frame + uint32_t fastRefreshCount = 0; // How many fast-refreshes consecutively since last full refresh? + refreshTypes currentConfig = FULL; // Which refresh type is GxEPD2 currently configured for + + // Optional - track ghosting, pixel by pixel + // May 2024: no longer used by any display. Kept for possible future use. +#ifdef EINK_LIMIT_GHOSTING_PX + void countGhostPixels(); // Count any pixels which have moved from black to white since last full-refresh + void checkExcessiveGhosting(); // Check if ghosting exceeds defined limit + void resetGhostPixelTracking(); // Clear the dirty pixels array. Call when full-refresh cleans the display. + uint8_t *dirtyPixels; // Any pixels that have been black since last full-refresh (dynamically allocated mem) + uint32_t ghostPixelCount = 0; // Number of pixels with problematic ghosting. Retained here for LOG_DEBUG use +#endif + + // Conditional - async full refresh - only with modified meshtastic/GxEPD2 +#if defined(HAS_EINK_ASYNCFULL) + public: + void joinAsyncRefresh(); // Main thread joins an async refresh already in progress. Blocks, then runs post-update code + + protected: + void pollAsyncRefresh(); // Run the post-update code if the hardware is ready + void checkBusyAsyncRefresh(); // Check if display is busy running an async full-refresh (rejecting new frames) + void awaitRefresh(); // Hold control while an async refresh runs + void endUpdate() override {} // Disable base-class behavior of running post-update immediately after forceDisplay() + bool asyncRefreshRunning = false; // Flag, checked by checkBusyAsyncRefresh() +#else + public: + void joinAsyncRefresh() {} // Dummy method + + protected: + void pollAsyncRefresh() {} // Dummy method. In theory, not reachable +#endif +}; + +// Hide the ugly casts used in Screen.cpp +#define EINK_ADD_FRAMEFLAG(display, flag) static_cast(display)->addFrameFlag(EInkDynamicDisplay::flag) +#define EINK_JOIN_ASYNCREFRESH(display) static_cast(display)->joinAsyncRefresh() + +#else // !USE_EINK_DYNAMICDISPLAY +// Dummy-macro, removes the need for include guards +#define EINK_ADD_FRAMEFLAG(display, flag) +#define EINK_JOIN_ASYNCREFRESH(display) +#endif \ No newline at end of file diff --git a/src/graphics/NeoPixel.h b/src/graphics/NeoPixel.h new file mode 100644 index 000000000..dde74366e --- /dev/null +++ b/src/graphics/NeoPixel.h @@ -0,0 +1,4 @@ +#ifdef HAS_NEOPIXEL +#include +extern Adafruit_NeoPixel pixels; +#endif \ No newline at end of file diff --git a/src/graphics/PointStruct.h b/src/graphics/PointStruct.h new file mode 100644 index 000000000..218731978 --- /dev/null +++ b/src/graphics/PointStruct.h @@ -0,0 +1,4 @@ +struct PointStruct { + int x; + int y; +}; \ No newline at end of file diff --git a/src/graphics/Screen.cpp b/src/graphics/Screen.cpp index c0e55ea83..ad42fa979 100644 --- a/src/graphics/Screen.cpp +++ b/src/graphics/Screen.cpp @@ -20,26 +20,35 @@ along with this program. If not, see . */ #include "Screen.h" +#include "../userPrefs.h" +#include "PowerMon.h" +#include "Throttle.h" #include "configuration.h" #if HAS_SCREEN #include #include "DisplayFormatters.h" +#if !MESHTASTIC_EXCLUDE_GPS #include "GPS.h" +#endif #include "MeshService.h" #include "NodeDB.h" #include "error.h" #include "gps/GeoCoord.h" #include "gps/RTC.h" +#include "graphics/ScreenFonts.h" #include "graphics/images.h" +#include "input/ScanAndSelect.h" #include "input/TouchScreenImpl1.h" #include "main.h" #include "mesh-pb-constants.h" #include "mesh/Channels.h" #include "mesh/generated/meshtastic/deviceonly.pb.h" #include "meshUtils.h" +#include "modules/AdminModule.h" #include "modules/ExternalNotificationModule.h" #include "modules/TextMessageModule.h" +#include "modules/WaypointModule.h" #include "sleep.h" #include "target_specific.h" @@ -49,21 +58,14 @@ along with this program. If not, see . #ifdef ARCH_ESP32 #include "esp_task_wdt.h" -#include "modules/esp32/StoreForwardModule.h" +#include "modules/StoreForwardModule.h" #endif #if ARCH_PORTDUINO +#include "modules/StoreForwardModule.h" #include "platform/portduino/PortduinoGlue.h" #endif -#ifdef OLED_RU -#include "fonts/OLEDDisplayFontsRU.h" -#endif - -#ifdef OLED_UA -#include "fonts/OLEDDisplayFontsUA.h" -#endif - using namespace meshtastic; /** @todo remove */ namespace graphics @@ -78,9 +80,8 @@ namespace graphics // #define SHOW_REDRAWS // A text message frame + debug frame + all the node infos -static FrameCallback normalFrames[MAX_NUM_NODES + NUM_EXTRA_FRAMES]; +FrameCallback *normalFrames; static uint32_t targetFramerate = IDLE_FRAMERATE; -static char btPIN[16] = "888888"; uint32_t logo_timeout = 5000; // 4 seconds for EACH logo @@ -99,46 +100,54 @@ std::vector moduleFrames; // Stores the last 4 of our hardware ID, to make finding the device for pairing easier static char ourId[5]; +// vector where symbols (string) are displayed in bottom corner of display. +std::vector functionSymbals; +// string displayed in bottom right corner of display. Created from elements in functionSymbals vector +std::string functionSymbalString = ""; + +#if HAS_GPS // GeoCoord object for the screen GeoCoord geoCoord; +#endif #ifdef SHOW_REDRAWS static bool heartbeat = false; #endif -static uint16_t displayWidth, displayHeight; +// Quick access to screen dimensions from static drawing functions +// DEPRECATED. To-do: move static functions inside Screen class +#define SCREEN_WIDTH display->getWidth() +#define SCREEN_HEIGHT display->getHeight() -#define SCREEN_WIDTH displayWidth -#define SCREEN_HEIGHT displayHeight - -#if (defined(USE_EINK) || defined(ILI9341_DRIVER) || defined(ST7735_CS) || defined(ST7789_CS)) && \ - !defined(DISPLAY_FORCE_SMALL_FONTS) -// The screen is bigger so use bigger fonts -#define FONT_SMALL ArialMT_Plain_16 // Height: 19 -#define FONT_MEDIUM ArialMT_Plain_24 // Height: 28 -#define FONT_LARGE ArialMT_Plain_24 // Height: 28 -#else -#ifdef OLED_RU -#define FONT_SMALL ArialMT_Plain_10_RU -#else -#ifdef OLED_UA -#define FONT_SMALL ArialMT_Plain_10_UA -#else -#define FONT_SMALL ArialMT_Plain_10 // Height: 13 -#endif -#endif -#define FONT_MEDIUM ArialMT_Plain_16 // Height: 19 -#define FONT_LARGE ArialMT_Plain_24 // Height: 28 -#endif - -#define fontHeight(font) ((font)[1] + 1) // height is position 1 - -#define FONT_HEIGHT_SMALL fontHeight(FONT_SMALL) -#define FONT_HEIGHT_MEDIUM fontHeight(FONT_MEDIUM) -#define FONT_HEIGHT_LARGE fontHeight(FONT_LARGE) +#include "graphics/ScreenFonts.h" +#include #define getStringCenteredX(s) ((SCREEN_WIDTH - display->getStringWidth(s)) / 2) +/// Check if the display can render a string (detect special chars; emoji) +static bool haveGlyphs(const char *str) +{ +#if defined(OLED_PL) || defined(OLED_UA) || defined(OLED_RU) + // Don't want to make any assumptions about custom language support + return true; +#endif + + // Check each character with the lookup function for the OLED library + // We're not really meant to use this directly.. + bool have = true; + for (uint16_t i = 0; i < strlen(str); i++) { + uint8_t result = Screen::customFontTableLookup((uint8_t)str[i]); + // If font doesn't support a character, it is substituted for ¿ + if (result == 191 && (uint8_t)str[i] != 191) { + have = false; + break; + } + } + + LOG_DEBUG("haveGlyphs=%d\n", have); + return have; +} + /** * Draw the icon with extra info printed around the corners */ @@ -154,7 +163,11 @@ static void drawIconScreen(const char *upperMsg, OLEDDisplay *display, OLEDDispl display->setFont(FONT_MEDIUM); display->setTextAlignment(TEXT_ALIGN_LEFT); +#ifdef USERPREFS_SPLASH_TITLE + const char *title = USERPREFS_SPLASH_TITLE; +#else const char *title = "meshtastic.org"; +#endif display->drawString(x + getStringCenteredX(title), y + SCREEN_HEIGHT - FONT_HEIGHT_MEDIUM, title); display->setFont(FONT_SMALL); @@ -162,13 +175,15 @@ static void drawIconScreen(const char *upperMsg, OLEDDisplay *display, OLEDDispl if (upperMsg) display->drawString(x + 0, y + 0, upperMsg); - // Draw version in upper right - char buf[16]; - snprintf(buf, sizeof(buf), "%s", - xstr(APP_VERSION_SHORT)); // Note: we don't bother printing region or now, it makes the string too long - display->drawString(x + SCREEN_WIDTH - display->getStringWidth(buf), y + 0, buf); + // Draw version and short name in upper right + char buf[25]; + snprintf(buf, sizeof(buf), "%s\n%s", xstr(APP_VERSION_SHORT), haveGlyphs(owner.short_name) ? owner.short_name : ""); + + display->setTextAlignment(TEXT_ALIGN_RIGHT); + display->drawString(x + SCREEN_WIDTH, y + 0, buf); screen->forceDisplay(); - // FIXME - draw serial # somewhere? + + display->setTextAlignment(TEXT_ALIGN_LEFT); // Restore left align, just to be kind to any other unsuspecting code } static void drawOEMIconScreen(const char *upperMsg, OLEDDisplay *display, OLEDDisplayUiState *state, int16_t x, int16_t y) @@ -203,14 +218,15 @@ static void drawOEMIconScreen(const char *upperMsg, OLEDDisplay *display, OLEDDi if (upperMsg) display->drawString(x + 0, y + 0, upperMsg); - // Draw version in upper right - char buf[16]; - snprintf(buf, sizeof(buf), "%s", - xstr(APP_VERSION_SHORT)); // Note: we don't bother printing region or now, it makes the string too long - display->drawString(x + SCREEN_WIDTH - display->getStringWidth(buf), y + 0, buf); + // Draw version and shortname in upper right + char buf[25]; + snprintf(buf, sizeof(buf), "%s\n%s", xstr(APP_VERSION_SHORT), haveGlyphs(owner.short_name) ? owner.short_name : ""); + + display->setTextAlignment(TEXT_ALIGN_RIGHT); + display->drawString(x + SCREEN_WIDTH, y + 0, buf); screen->forceDisplay(); - // FIXME - draw serial # somewhere? + display->setTextAlignment(TEXT_ALIGN_LEFT); // Restore left align, just to be kind to any other unsuspecting code } static void drawOEMBootScreen(OLEDDisplay *display, OLEDDisplayUiState *state, int16_t x, int16_t y) @@ -220,7 +236,7 @@ static void drawOEMBootScreen(OLEDDisplay *display, OLEDDisplayUiState *state, i drawOEMIconScreen(region, display, state, x, y); } -static void drawFrameText(OLEDDisplay *display, OLEDDisplayUiState *state, int16_t x, int16_t y, const char *message) +void Screen::drawFrameText(OLEDDisplay *display, OLEDDisplayUiState *state, int16_t x, int16_t y, const char *message) { uint16_t x_offset = display->width() / 2; display->setTextAlignment(TEXT_ALIGN_CENTER); @@ -228,20 +244,6 @@ static void drawFrameText(OLEDDisplay *display, OLEDDisplayUiState *state, int16 display->drawString(x_offset + x, 26 + y, message); } -static void drawBootScreen(OLEDDisplay *display, OLEDDisplayUiState *state, int16_t x, int16_t y) -{ -#ifdef ARCH_ESP32 - if (wakeCause == ESP_SLEEP_WAKEUP_TIMER || wakeCause == ESP_SLEEP_WAKEUP_EXT1) { - drawFrameText(display, state, x, y, "Resuming..."); - } else -#endif - { - // Draw region in upper left - const char *region = myRegion ? myRegion->name : NULL; - drawIconScreen(region, display, state, x, y); - } -} - // Used on boot when a certificate is being created static void drawSSLScreen(OLEDDisplay *display, OLEDDisplayUiState *state, int16_t x, int16_t y) { @@ -274,7 +276,7 @@ static void drawWelcomeScreen(OLEDDisplay *display, OLEDDisplayUiState *state, i if ((millis() / 10000) % 2) { display->drawString(x, y + FONT_HEIGHT_SMALL * 2 - 3, "Set the region using the"); display->drawString(x, y + FONT_HEIGHT_SMALL * 3 - 3, "Meshtastic Android, iOS,"); - display->drawString(x, y + FONT_HEIGHT_SMALL * 4 - 3, "Flasher or CLI client."); + display->drawString(x, y + FONT_HEIGHT_SMALL * 4 - 3, "Web or CLI clients."); } else { display->drawString(x, y + FONT_HEIGHT_SMALL * 2 - 3, "Visit meshtastic.org"); display->drawString(x, y + FONT_HEIGHT_SMALL * 3 - 3, "for more information."); @@ -287,11 +289,84 @@ static void drawWelcomeScreen(OLEDDisplay *display, OLEDDisplayUiState *state, i #endif } +// draw overlay in bottom right corner of screen to show when notifications are muted or modifier key is active +static void drawFunctionOverlay(OLEDDisplay *display, OLEDDisplayUiState *state) +{ + // LOG_DEBUG("Drawing function overlay\n"); + if (functionSymbals.begin() != functionSymbals.end()) { + char buf[64]; + display->setFont(FONT_SMALL); + snprintf(buf, sizeof(buf), "%s", functionSymbalString.c_str()); + display->drawString(SCREEN_WIDTH - display->getStringWidth(buf), SCREEN_HEIGHT - FONT_HEIGHT_SMALL, buf); + } +} + #ifdef USE_EINK /// Used on eink displays while in deep sleep -static void drawSleepScreen(OLEDDisplay *display, OLEDDisplayUiState *state, int16_t x, int16_t y) +static void drawDeepSleepScreen(OLEDDisplay *display, OLEDDisplayUiState *state, int16_t x, int16_t y) { - drawIconScreen("Sleeping...", display, state, x, y); + + // Next frame should use full-refresh, and block while running, else device will sleep before async callback + EINK_ADD_FRAMEFLAG(display, COSMETIC); + EINK_ADD_FRAMEFLAG(display, BLOCKING); + + LOG_DEBUG("Drawing deep sleep screen\n"); + + // Display displayStr on the screen + drawIconScreen("Sleeping", display, state, x, y); +} + +/// Used on eink displays when screen updates are paused +static void drawScreensaverOverlay(OLEDDisplay *display, OLEDDisplayUiState *state) +{ + LOG_DEBUG("Drawing screensaver overlay\n"); + + EINK_ADD_FRAMEFLAG(display, COSMETIC); // Take the opportunity for a full-refresh + + // Config + display->setFont(FONT_SMALL); + display->setTextAlignment(TEXT_ALIGN_LEFT); + const char *pauseText = "Screen Paused"; + const char *idText = owner.short_name; + const bool useId = haveGlyphs(idText); // This bool is used to hide the idText box if we can't render the short name + constexpr uint16_t padding = 5; + constexpr uint8_t dividerGap = 1; + constexpr uint8_t imprecision = 5; // How far the box origins can drift from center. Combat burn-in. + + // Dimensions + const uint16_t idTextWidth = display->getStringWidth(idText, strlen(idText), true); // "true": handle utf8 chars + const uint16_t pauseTextWidth = display->getStringWidth(pauseText, strlen(pauseText)); + const uint16_t boxWidth = padding + (useId ? idTextWidth + padding + padding : 0) + pauseTextWidth + padding; + const uint16_t boxHeight = padding + FONT_HEIGHT_SMALL + padding; + + // Position + const int16_t boxLeft = (display->width() / 2) - (boxWidth / 2) + random(-imprecision, imprecision + 1); + // const int16_t boxRight = boxLeft + boxWidth - 1; + const int16_t boxTop = (display->height() / 2) - (boxHeight / 2 + random(-imprecision, imprecision + 1)); + const int16_t boxBottom = boxTop + boxHeight - 1; + const int16_t idTextLeft = boxLeft + padding; + const int16_t idTextTop = boxTop + padding; + const int16_t pauseTextLeft = boxLeft + (useId ? padding + idTextWidth + padding : 0) + padding; + const int16_t pauseTextTop = boxTop + padding; + const int16_t dividerX = boxLeft + padding + idTextWidth + padding; + const int16_t dividerTop = boxTop + 1 + dividerGap; + const int16_t dividerBottom = boxBottom - 1 - dividerGap; + + // Draw: box + display->setColor(EINK_WHITE); + display->fillRect(boxLeft - 1, boxTop - 1, boxWidth + 2, boxHeight + 2); // Clear a slightly oversized area for the box + display->setColor(EINK_BLACK); + display->drawRect(boxLeft, boxTop, boxWidth, boxHeight); + + // Draw: Text + if (useId) + display->drawString(idTextLeft, idTextTop, idText); + display->drawString(pauseTextLeft, pauseTextTop, pauseText); + display->drawString(pauseTextLeft + 1, pauseTextTop, pauseText); // Faux bold + + // Draw: divider + if (useId) + display->drawLine(dividerX, dividerTop, dividerX, dividerBottom); } #endif @@ -303,7 +378,7 @@ static void drawModuleFrame(OLEDDisplay *display, OLEDDisplayUiState *state, int // in the array of "drawScreen" functions; however, // the passed-state doesn't quite reflect the "current" // screen, so we have to detect it. - if (state->frameState == IN_TRANSITION && state->transitionFrameRelationship == INCOMING) { + if (state->frameState == IN_TRANSITION && state->transitionFrameRelationship == TransitionRelationship_INCOMING) { // if we're transitioning from the end of the frame list back around to the first // frame, then we want this to be `0` module_frame = state->transitionFrameTarget; @@ -317,31 +392,6 @@ static void drawModuleFrame(OLEDDisplay *display, OLEDDisplayUiState *state, int pi.drawFrame(display, state, x, y); } -static void drawFrameBluetooth(OLEDDisplay *display, OLEDDisplayUiState *state, int16_t x, int16_t y) -{ - int x_offset = display->width() / 2; - int y_offset = display->height() <= 80 ? 0 : 32; - display->setTextAlignment(TEXT_ALIGN_CENTER); - display->setFont(FONT_MEDIUM); - display->drawString(x_offset + x, y_offset + y, "Bluetooth"); - - display->setFont(FONT_SMALL); - y_offset = display->height() == 64 ? y_offset + FONT_HEIGHT_MEDIUM - 4 : y_offset + FONT_HEIGHT_MEDIUM + 5; - display->drawString(x_offset + x, y_offset + y, "Enter this code"); - - display->setFont(FONT_LARGE); - String displayPin(btPIN); - String pin = displayPin.substring(0, 3) + " " + displayPin.substring(3, 6); - y_offset = display->height() == 64 ? y_offset + FONT_HEIGHT_SMALL - 5 : y_offset + FONT_HEIGHT_SMALL + 5; - display->drawString(x_offset + x, y_offset + y, pin); - - display->setFont(FONT_SMALL); - String deviceName = "Name: "; - deviceName.concat(getDeviceName()); - y_offset = display->height() == 64 ? y_offset + FONT_HEIGHT_LARGE - 6 : y_offset + FONT_HEIGHT_LARGE + 5; - display->drawString(x_offset + x, y_offset + y, deviceName); -} - static void drawFrameFirmware(OLEDDisplay *display, OLEDDisplayUiState *state, int16_t x, int16_t y) { display->setTextAlignment(TEXT_ALIGN_CENTER); @@ -374,105 +424,6 @@ static bool shouldDrawMessage(const meshtastic_MeshPacket *packet) return packet->from != 0 && !moduleConfig.store_forward.enabled; } -/// Draw the last text message we received -static void drawTextMessageFrame(OLEDDisplay *display, OLEDDisplayUiState *state, int16_t x, int16_t y) -{ - // the max length of this buffer is much longer than we can possibly print - static char tempBuf[237]; - - const meshtastic_MeshPacket &mp = devicestate.rx_text_message; - meshtastic_NodeInfoLite *node = nodeDB.getMeshNode(getFrom(&mp)); - // LOG_DEBUG("drawing text message from 0x%x: %s\n", mp.from, - // mp.decoded.variant.data.decoded.bytes); - - // Demo for drawStringMaxWidth: - // with the third parameter you can define the width after which words will - // be wrapped. Currently only spaces and "-" are allowed for wrapping - display->setTextAlignment(TEXT_ALIGN_LEFT); - display->setFont(FONT_SMALL); - if (config.display.displaymode == meshtastic_Config_DisplayConfig_DisplayMode_INVERTED) { - display->fillRect(0 + x, 0 + y, x + display->getWidth(), y + FONT_HEIGHT_SMALL); - display->setColor(BLACK); - } - - uint32_t seconds = sinceReceived(&mp); - uint32_t minutes = seconds / 60; - uint32_t hours = minutes / 60; - uint32_t days = hours / 24; - - if (config.display.heading_bold) { - display->drawStringf(1 + x, 0 + y, tempBuf, "%s ago from %s", - screen->drawTimeDelta(days, hours, minutes, seconds).c_str(), - (node && node->has_user) ? node->user.short_name : "???"); - } - display->drawStringf(0 + x, 0 + y, tempBuf, "%s ago from %s", screen->drawTimeDelta(days, hours, minutes, seconds).c_str(), - (node && node->has_user) ? node->user.short_name : "???"); - - display->setColor(WHITE); - snprintf(tempBuf, sizeof(tempBuf), "%s", mp.decoded.payload.bytes); - display->drawStringMaxWidth(0 + x, 0 + y + FONT_HEIGHT_SMALL, x + display->getWidth(), tempBuf); -} - -/// Draw the last waypoint we received -static void drawWaypointFrame(OLEDDisplay *display, OLEDDisplayUiState *state, int16_t x, int16_t y) -{ - static char tempBuf[237]; - - meshtastic_MeshPacket &mp = devicestate.rx_waypoint; - meshtastic_NodeInfoLite *node = nodeDB.getMeshNode(getFrom(&mp)); - - display->setTextAlignment(TEXT_ALIGN_LEFT); - display->setFont(FONT_SMALL); - if (config.display.displaymode == meshtastic_Config_DisplayConfig_DisplayMode_INVERTED) { - display->fillRect(0 + x, 0 + y, x + display->getWidth(), y + FONT_HEIGHT_SMALL); - display->setColor(BLACK); - } - - uint32_t seconds = sinceReceived(&mp); - uint32_t minutes = seconds / 60; - uint32_t hours = minutes / 60; - uint32_t days = hours / 24; - - if (config.display.heading_bold) { - display->drawStringf(1 + x, 0 + y, tempBuf, "%s ago from %s", - screen->drawTimeDelta(days, hours, minutes, seconds).c_str(), - (node && node->has_user) ? node->user.short_name : "???"); - } - display->drawStringf(0 + x, 0 + y, tempBuf, "%s ago from %s", screen->drawTimeDelta(days, hours, minutes, seconds).c_str(), - (node && node->has_user) ? node->user.short_name : "???"); - - display->setColor(WHITE); - meshtastic_Waypoint scratch; - memset(&scratch, 0, sizeof(scratch)); - if (pb_decode_from_bytes(mp.decoded.payload.bytes, mp.decoded.payload.size, &meshtastic_Waypoint_msg, &scratch)) { - snprintf(tempBuf, sizeof(tempBuf), "Received waypoint: %s", scratch.name); - display->drawStringMaxWidth(0 + x, 0 + y + FONT_HEIGHT_SMALL, x + display->getWidth(), tempBuf); - } -} - -/// Draw a series of fields in a column, wrapping to multiple columns if needed -static void drawColumns(OLEDDisplay *display, int16_t x, int16_t y, const char **fields) -{ - // The coordinates define the left starting point of the text - display->setTextAlignment(TEXT_ALIGN_LEFT); - - const char **f = fields; - int xo = x, yo = y; - while (*f) { - display->drawString(xo, yo, *f); - if ((display->getColor() == BLACK) && config.display.heading_bold) - display->drawString(xo + 1, yo, *f); - - display->setColor(WHITE); - yo += FONT_HEIGHT_SMALL; - if (yo > SCREEN_HEIGHT - FONT_HEIGHT_SMALL) { - xo += SCREEN_WIDTH / 2; - yo = 0; - } - f++; - } -} - // Draw power bars or a charging indicator on an image of a battery, determined by battery charge voltage or percentage. static void drawBattery(OLEDDisplay *display, int16_t x, int16_t y, uint8_t *imgBuffer, const PowerStatus *powerStatus) { @@ -495,12 +446,659 @@ static void drawBattery(OLEDDisplay *display, int16_t x, int16_t y, uint8_t *img display->drawFastImage(x, y, 16, 8, imgBuffer); } +#ifdef T_WATCH_S3 + +void Screen::drawWatchFaceToggleButton(OLEDDisplay *display, int16_t x, int16_t y, bool digitalMode, float scale) +{ + uint16_t segmentWidth = SEGMENT_WIDTH * scale; + uint16_t segmentHeight = SEGMENT_HEIGHT * scale; + + if (digitalMode) { + uint16_t radius = (segmentWidth + (segmentHeight * 2) + 4) / 2; + uint16_t centerX = (x + segmentHeight + 2) + (radius / 2); + uint16_t centerY = (y + segmentHeight + 2) + (radius / 2); + + display->drawCircle(centerX, centerY, radius); + display->drawCircle(centerX, centerY, radius + 1); + display->drawLine(centerX, centerY, centerX, centerY - radius + 3); + display->drawLine(centerX, centerY, centerX + radius - 3, centerY); + } else { + uint16_t segmentOneX = x + segmentHeight + 2; + uint16_t segmentOneY = y; + + uint16_t segmentTwoX = segmentOneX + segmentWidth + 2; + uint16_t segmentTwoY = segmentOneY + segmentHeight + 2; + + uint16_t segmentThreeX = segmentOneX; + uint16_t segmentThreeY = segmentTwoY + segmentWidth + 2; + + uint16_t segmentFourX = x; + uint16_t segmentFourY = y + segmentHeight + 2; + + drawHorizontalSegment(display, segmentOneX, segmentOneY, segmentWidth, segmentHeight); + drawVerticalSegment(display, segmentTwoX, segmentTwoY, segmentWidth, segmentHeight); + drawHorizontalSegment(display, segmentThreeX, segmentThreeY, segmentWidth, segmentHeight); + drawVerticalSegment(display, segmentFourX, segmentFourY, segmentWidth, segmentHeight); + } +} + +// Draw a digital clock +void Screen::drawDigitalClockFrame(OLEDDisplay *display, OLEDDisplayUiState *state, int16_t x, int16_t y) +{ + display->setTextAlignment(TEXT_ALIGN_LEFT); + + drawBattery(display, x, y + 7, imgBattery, powerStatus); + + if (powerStatus->getHasBattery()) { + String batteryPercent = String(powerStatus->getBatteryChargePercent()) + "%"; + + display->setFont(FONT_SMALL); + + display->drawString(x + 20, y + 2, batteryPercent); + } + + if (nimbleBluetooth->isConnected()) { + drawBluetoothConnectedIcon(display, display->getWidth() - 18, y + 2); + } + + drawWatchFaceToggleButton(display, display->getWidth() - 36, display->getHeight() - 36, screen->digitalWatchFace, 1); + + display->setColor(OLEDDISPLAY_COLOR::WHITE); + + uint32_t rtc_sec = getValidTime(RTCQuality::RTCQualityDevice, true); // Display local timezone + if (rtc_sec > 0) { + long hms = rtc_sec % SEC_PER_DAY; + hms = (hms + SEC_PER_DAY) % SEC_PER_DAY; + + int hour = hms / SEC_PER_HOUR; + int minute = (hms % SEC_PER_HOUR) / SEC_PER_MIN; + int second = (hms % SEC_PER_HOUR) % SEC_PER_MIN; // or hms % SEC_PER_MIN + + hour = hour > 12 ? hour - 12 : hour; + + if (hour == 0) { + hour = 12; + } + + // hours string + String hourString = String(hour); + + // minutes string + String minuteString = minute < 10 ? "0" + String(minute) : String(minute); + + String timeString = hourString + ":" + minuteString; + + // seconds string + String secondString = second < 10 ? "0" + String(second) : String(second); + + float scale = 1.5; + + uint16_t segmentWidth = SEGMENT_WIDTH * scale; + uint16_t segmentHeight = SEGMENT_HEIGHT * scale; + + // calculate hours:minutes string width + uint16_t timeStringWidth = timeString.length() * 5; + + for (uint8_t i = 0; i < timeString.length(); i++) { + String character = String(timeString[i]); + + if (character == ":") { + timeStringWidth += segmentHeight; + } else { + timeStringWidth += segmentWidth + (segmentHeight * 2) + 4; + } + } + + // calculate seconds string width + uint16_t secondStringWidth = (secondString.length() * 12) + 4; + + // sum these to get total string width + uint16_t totalWidth = timeStringWidth + secondStringWidth; + + uint16_t hourMinuteTextX = (display->getWidth() / 2) - (totalWidth / 2); + + uint16_t startingHourMinuteTextX = hourMinuteTextX; + + uint16_t hourMinuteTextY = (display->getHeight() / 2) - (((segmentWidth * 2) + (segmentHeight * 3) + 8) / 2); + + // iterate over characters in hours:minutes string and draw segmented characters + for (uint8_t i = 0; i < timeString.length(); i++) { + String character = String(timeString[i]); + + if (character == ":") { + drawSegmentedDisplayColon(display, hourMinuteTextX, hourMinuteTextY, scale); + + hourMinuteTextX += segmentHeight + 6; + } else { + drawSegmentedDisplayCharacter(display, hourMinuteTextX, hourMinuteTextY, character.toInt(), scale); + + hourMinuteTextX += segmentWidth + (segmentHeight * 2) + 4; + } + + hourMinuteTextX += 5; + } + + // draw seconds string + display->setFont(FONT_MEDIUM); + display->drawString(startingHourMinuteTextX + timeStringWidth + 4, + (display->getHeight() - hourMinuteTextY) - FONT_HEIGHT_MEDIUM + 6, secondString); + } +} + +void Screen::drawSegmentedDisplayColon(OLEDDisplay *display, int x, int y, float scale) +{ + uint16_t segmentWidth = SEGMENT_WIDTH * scale; + uint16_t segmentHeight = SEGMENT_HEIGHT * scale; + + uint16_t cellHeight = (segmentWidth * 2) + (segmentHeight * 3) + 8; + + uint16_t topAndBottomX = x + (4 * scale); + + uint16_t quarterCellHeight = cellHeight / 4; + + uint16_t topY = y + quarterCellHeight; + uint16_t bottomY = y + (quarterCellHeight * 3); + + display->fillRect(topAndBottomX, topY, segmentHeight, segmentHeight); + display->fillRect(topAndBottomX, bottomY, segmentHeight, segmentHeight); +} + +void Screen::drawSegmentedDisplayCharacter(OLEDDisplay *display, int x, int y, uint8_t number, float scale) +{ + // the numbers 0-9, each expressed as an array of seven boolean (0|1) values encoding the on/off state of + // segment {innerIndex + 1} + // e.g., to display the numeral '0', segments 1-6 are on, and segment 7 is off. + uint8_t numbers[10][7] = { + {1, 1, 1, 1, 1, 1, 0}, // 0 Display segment key + {0, 1, 1, 0, 0, 0, 0}, // 1 1 + {1, 1, 0, 1, 1, 0, 1}, // 2 ___ + {1, 1, 1, 1, 0, 0, 1}, // 3 6 | | 2 + {0, 1, 1, 0, 0, 1, 1}, // 4 |_7̲_| + {1, 0, 1, 1, 0, 1, 1}, // 5 5 | | 3 + {1, 0, 1, 1, 1, 1, 1}, // 6 |___| + {1, 1, 1, 0, 0, 1, 0}, // 7 + {1, 1, 1, 1, 1, 1, 1}, // 8 4 + {1, 1, 1, 1, 0, 1, 1}, // 9 + }; + + // the width and height of each segment's central rectangle: + // _____________________ + // ⋰| (only this part, |⋱ + // ⋰ | not including | ⋱ + // ⋱ | the triangles | ⋰ + // ⋱| on the ends) |⋰ + // ‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾ + + uint16_t segmentWidth = SEGMENT_WIDTH * scale; + uint16_t segmentHeight = SEGMENT_HEIGHT * scale; + + // segment x and y coordinates + uint16_t segmentOneX = x + segmentHeight + 2; + uint16_t segmentOneY = y; + + uint16_t segmentTwoX = segmentOneX + segmentWidth + 2; + uint16_t segmentTwoY = segmentOneY + segmentHeight + 2; + + uint16_t segmentThreeX = segmentTwoX; + uint16_t segmentThreeY = segmentTwoY + segmentWidth + 2 + segmentHeight + 2; + + uint16_t segmentFourX = segmentOneX; + uint16_t segmentFourY = segmentThreeY + segmentWidth + 2; + + uint16_t segmentFiveX = x; + uint16_t segmentFiveY = segmentThreeY; + + uint16_t segmentSixX = x; + uint16_t segmentSixY = segmentTwoY; + + uint16_t segmentSevenX = segmentOneX; + uint16_t segmentSevenY = segmentTwoY + segmentWidth + 2; + + if (numbers[number][0]) { + drawHorizontalSegment(display, segmentOneX, segmentOneY, segmentWidth, segmentHeight); + } + + if (numbers[number][1]) { + drawVerticalSegment(display, segmentTwoX, segmentTwoY, segmentWidth, segmentHeight); + } + + if (numbers[number][2]) { + drawVerticalSegment(display, segmentThreeX, segmentThreeY, segmentWidth, segmentHeight); + } + + if (numbers[number][3]) { + drawHorizontalSegment(display, segmentFourX, segmentFourY, segmentWidth, segmentHeight); + } + + if (numbers[number][4]) { + drawVerticalSegment(display, segmentFiveX, segmentFiveY, segmentWidth, segmentHeight); + } + + if (numbers[number][5]) { + drawVerticalSegment(display, segmentSixX, segmentSixY, segmentWidth, segmentHeight); + } + + if (numbers[number][6]) { + drawHorizontalSegment(display, segmentSevenX, segmentSevenY, segmentWidth, segmentHeight); + } +} + +void Screen::drawHorizontalSegment(OLEDDisplay *display, int x, int y, int width, int height) +{ + int halfHeight = height / 2; + + // draw central rectangle + display->fillRect(x, y, width, height); + + // draw end triangles + display->fillTriangle(x, y, x, y + height - 1, x - halfHeight, y + halfHeight); + + display->fillTriangle(x + width, y, x + width + halfHeight, y + halfHeight, x + width, y + height - 1); +} + +void Screen::drawVerticalSegment(OLEDDisplay *display, int x, int y, int width, int height) +{ + int halfHeight = height / 2; + + // draw central rectangle + display->fillRect(x, y, height, width); + + // draw end triangles + display->fillTriangle(x + halfHeight, y - halfHeight, x + height - 1, y, x, y); + + display->fillTriangle(x, y + width, x + height - 1, y + width, x + halfHeight, y + width + halfHeight); +} + +void Screen::drawBluetoothConnectedIcon(OLEDDisplay *display, int16_t x, int16_t y) +{ + display->drawFastImage(x, y, 18, 14, bluetoothConnectedIcon); +} + +// Draw an analog clock +void Screen::drawAnalogClockFrame(OLEDDisplay *display, OLEDDisplayUiState *state, int16_t x, int16_t y) +{ + display->setTextAlignment(TEXT_ALIGN_LEFT); + + drawBattery(display, x, y + 7, imgBattery, powerStatus); + + if (powerStatus->getHasBattery()) { + String batteryPercent = String(powerStatus->getBatteryChargePercent()) + "%"; + + display->setFont(FONT_SMALL); + + display->drawString(x + 20, y + 2, batteryPercent); + } + + if (nimbleBluetooth->isConnected()) { + drawBluetoothConnectedIcon(display, display->getWidth() - 18, y + 2); + } + + drawWatchFaceToggleButton(display, display->getWidth() - 36, display->getHeight() - 36, screen->digitalWatchFace, 1); + + // clock face center coordinates + int16_t centerX = display->getWidth() / 2; + int16_t centerY = display->getHeight() / 2; + + // clock face radius + int16_t radius = (display->getWidth() / 2) * 0.8; + + // noon (0 deg) coordinates (outermost circle) + int16_t noonX = centerX; + int16_t noonY = centerY - radius; + + // second hand radius and y coordinate (outermost circle) + int16_t secondHandNoonY = noonY + 1; + + // tick mark outer y coordinate; (first nested circle) + int16_t tickMarkOuterNoonY = secondHandNoonY; + + // seconds tick mark inner y coordinate; (second nested circle) + double secondsTickMarkInnerNoonY = (double)noonY + 8; + + // hours tick mark inner y coordinate; (third nested circle) + double hoursTickMarkInnerNoonY = (double)noonY + 16; + + // minute hand y coordinate + int16_t minuteHandNoonY = secondsTickMarkInnerNoonY + 4; + + // hour string y coordinate + int16_t hourStringNoonY = minuteHandNoonY + 18; + + // hour hand radius and y coordinate + int16_t hourHandRadius = radius * 0.55; + int16_t hourHandNoonY = centerY - hourHandRadius; + + display->setColor(OLEDDISPLAY_COLOR::WHITE); + display->drawCircle(centerX, centerY, radius); + + uint32_t rtc_sec = getValidTime(RTCQuality::RTCQualityDevice, true); // Display local timezone + if (rtc_sec > 0) { + long hms = rtc_sec % SEC_PER_DAY; + hms = (hms + SEC_PER_DAY) % SEC_PER_DAY; + + // Tear apart hms into h:m:s + int hour = hms / SEC_PER_HOUR; + int minute = (hms % SEC_PER_HOUR) / SEC_PER_MIN; + int second = (hms % SEC_PER_HOUR) % SEC_PER_MIN; // or hms % SEC_PER_MIN + + hour = hour > 12 ? hour - 12 : hour; + + int16_t degreesPerHour = 30; + int16_t degreesPerMinuteOrSecond = 6; + + double hourBaseAngle = hour * degreesPerHour; + double hourAngleOffset = ((double)minute / 60) * degreesPerHour; + double hourAngle = radians(hourBaseAngle + hourAngleOffset); + + double minuteBaseAngle = minute * degreesPerMinuteOrSecond; + double minuteAngleOffset = ((double)second / 60) * degreesPerMinuteOrSecond; + double minuteAngle = radians(minuteBaseAngle + minuteAngleOffset); + + double secondAngle = radians(second * degreesPerMinuteOrSecond); + + double hourX = sin(-hourAngle) * (hourHandNoonY - centerY) + noonX; + double hourY = cos(-hourAngle) * (hourHandNoonY - centerY) + centerY; + + double minuteX = sin(-minuteAngle) * (minuteHandNoonY - centerY) + noonX; + double minuteY = cos(-minuteAngle) * (minuteHandNoonY - centerY) + centerY; + + double secondX = sin(-secondAngle) * (secondHandNoonY - centerY) + noonX; + double secondY = cos(-secondAngle) * (secondHandNoonY - centerY) + centerY; + + display->setFont(FONT_MEDIUM); + + // draw minute and hour tick marks and hour numbers + for (uint16_t angle = 0; angle < 360; angle += 6) { + double angleInRadians = radians(angle); + + double sineAngleInRadians = sin(-angleInRadians); + double cosineAngleInRadians = cos(-angleInRadians); + + double endX = sineAngleInRadians * (tickMarkOuterNoonY - centerY) + noonX; + double endY = cosineAngleInRadians * (tickMarkOuterNoonY - centerY) + centerY; + + if (angle % degreesPerHour == 0) { + double startX = sineAngleInRadians * (hoursTickMarkInnerNoonY - centerY) + noonX; + double startY = cosineAngleInRadians * (hoursTickMarkInnerNoonY - centerY) + centerY; + + // draw hour tick mark + display->drawLine(startX, startY, endX, endY); + + static char buffer[2]; + + uint8_t hourInt = (angle / 30); + + if (hourInt == 0) { + hourInt = 12; + } + + // hour number x offset needs to be adjusted for some cases + int8_t hourStringXOffset; + int8_t hourStringYOffset = 13; + + switch (hourInt) { + case 3: + hourStringXOffset = 5; + break; + case 9: + hourStringXOffset = 7; + break; + case 10: + case 11: + hourStringXOffset = 8; + break; + case 12: + hourStringXOffset = 13; + break; + default: + hourStringXOffset = 6; + break; + } + + double hourStringX = (sineAngleInRadians * (hourStringNoonY - centerY) + noonX) - hourStringXOffset; + double hourStringY = (cosineAngleInRadians * (hourStringNoonY - centerY) + centerY) - hourStringYOffset; + + // draw hour number + display->drawStringf(hourStringX, hourStringY, buffer, "%d", hourInt); + } + + if (angle % degreesPerMinuteOrSecond == 0) { + double startX = sineAngleInRadians * (secondsTickMarkInnerNoonY - centerY) + noonX; + double startY = cosineAngleInRadians * (secondsTickMarkInnerNoonY - centerY) + centerY; + + // draw minute tick mark + display->drawLine(startX, startY, endX, endY); + } + } + + // draw hour hand + display->drawLine(centerX, centerY, hourX, hourY); + + // draw minute hand + display->drawLine(centerX, centerY, minuteX, minuteY); + + // draw second hand + display->drawLine(centerX, centerY, secondX, secondY); + } +} + +#endif + +// Get an absolute time from "seconds ago" info. Returns false if no valid timestamp possible +bool deltaToTimestamp(uint32_t secondsAgo, uint8_t *hours, uint8_t *minutes, int32_t *daysAgo) +{ + // Cache the result - avoid frequent recalculation + static uint8_t hoursCached = 0, minutesCached = 0; + static uint32_t daysAgoCached = 0; + static uint32_t secondsAgoCached = 0; + static bool validCached = false; + + // Abort: if timezone not set + if (strlen(config.device.tzdef) == 0) { + validCached = false; + return validCached; + } + + // Abort: if invalid pointers passed + if (hours == nullptr || minutes == nullptr || daysAgo == nullptr) { + validCached = false; + return validCached; + } + + // Abort: if time seems invalid.. (> 6 months ago, probably seen before RTC set) + if (secondsAgo > SEC_PER_DAY * 30UL * 6) { + validCached = false; + return validCached; + } + + // If repeated request, don't bother recalculating + if (secondsAgo - secondsAgoCached < 60 && secondsAgoCached != 0) { + if (validCached) { + *hours = hoursCached; + *minutes = minutesCached; + *daysAgo = daysAgoCached; + } + return validCached; + } + + // Get local time + uint32_t secondsRTC = getValidTime(RTCQuality::RTCQualityDevice, true); // Get local time + + // Abort: if RTC not set + if (!secondsRTC) { + validCached = false; + return validCached; + } + + // Get absolute time when last seen + uint32_t secondsSeenAt = secondsRTC - secondsAgo; + + // Calculate daysAgo + *daysAgo = (secondsRTC / SEC_PER_DAY) - (secondsSeenAt / SEC_PER_DAY); // How many "midnights" have passed + + // Get seconds since midnight + uint32_t hms = (secondsRTC - secondsAgo) % SEC_PER_DAY; + hms = (hms + SEC_PER_DAY) % SEC_PER_DAY; + + // Tear apart hms into hours and minutes + *hours = hms / SEC_PER_HOUR; + *minutes = (hms % SEC_PER_HOUR) / SEC_PER_MIN; + + // Cache the result + daysAgoCached = *daysAgo; + hoursCached = *hours; + minutesCached = *minutes; + secondsAgoCached = secondsAgo; + + validCached = true; + return validCached; +} + +/// Draw the last text message we received +static void drawTextMessageFrame(OLEDDisplay *display, OLEDDisplayUiState *state, int16_t x, int16_t y) +{ + // the max length of this buffer is much longer than we can possibly print + static char tempBuf[237]; + + const meshtastic_MeshPacket &mp = devicestate.rx_text_message; + meshtastic_NodeInfoLite *node = nodeDB->getMeshNode(getFrom(&mp)); + // LOG_DEBUG("drawing text message from 0x%x: %s\n", mp.from, + // mp.decoded.variant.data.decoded.bytes); + + // Demo for drawStringMaxWidth: + // with the third parameter you can define the width after which words will + // be wrapped. Currently only spaces and "-" are allowed for wrapping + display->setTextAlignment(TEXT_ALIGN_LEFT); + display->setFont(FONT_SMALL); + if (config.display.displaymode == meshtastic_Config_DisplayConfig_DisplayMode_INVERTED) { + display->fillRect(0 + x, 0 + y, x + display->getWidth(), y + FONT_HEIGHT_SMALL); + display->setColor(BLACK); + } + + // For time delta + uint32_t seconds = sinceReceived(&mp); + uint32_t minutes = seconds / 60; + uint32_t hours = minutes / 60; + uint32_t days = hours / 24; + + // For timestamp + uint8_t timestampHours, timestampMinutes; + int32_t daysAgo; + bool useTimestamp = deltaToTimestamp(seconds, ×tampHours, ×tampMinutes, &daysAgo); + + // If bold, draw twice, shifting right by one pixel + for (uint8_t xOff = 0; xOff <= (config.display.heading_bold ? 1 : 0); xOff++) { + // Show a timestamp if received today, but longer than 15 minutes ago + if (useTimestamp && minutes >= 15 && daysAgo == 0) { + display->drawStringf(xOff + x, 0 + y, tempBuf, "At %02hu:%02hu from %s", timestampHours, timestampMinutes, + (node && node->has_user) ? node->user.short_name : "???"); + } + // Timestamp yesterday (if display is wide enough) + else if (useTimestamp && daysAgo == 1 && display->width() >= 200) { + display->drawStringf(xOff + x, 0 + y, tempBuf, "Yesterday %02hu:%02hu from %s", timestampHours, timestampMinutes, + (node && node->has_user) ? node->user.short_name : "???"); + } + // Otherwise, show a time delta + else { + display->drawStringf(xOff + x, 0 + y, tempBuf, "%s ago from %s", + screen->drawTimeDelta(days, hours, minutes, seconds).c_str(), + (node && node->has_user) ? node->user.short_name : "???"); + } + } + + display->setColor(WHITE); +#ifndef EXCLUDE_EMOJI + if (strcmp(reinterpret_cast(mp.decoded.payload.bytes), "\U0001F44D") == 0) { + display->drawXbm(x + (SCREEN_WIDTH - thumbs_width) / 2, + y + (SCREEN_HEIGHT - FONT_HEIGHT_MEDIUM - thumbs_height) / 2 + 2 + 5, thumbs_width, thumbs_height, + thumbup); + } else if (strcmp(reinterpret_cast(mp.decoded.payload.bytes), "\U0001F44E") == 0) { + display->drawXbm(x + (SCREEN_WIDTH - thumbs_width) / 2, + y + (SCREEN_HEIGHT - FONT_HEIGHT_MEDIUM - thumbs_height) / 2 + 2 + 5, thumbs_width, thumbs_height, + thumbdown); + } else if (strcmp(reinterpret_cast(mp.decoded.payload.bytes), "❓") == 0) { + display->drawXbm(x + (SCREEN_WIDTH - question_width) / 2, + y + (SCREEN_HEIGHT - FONT_HEIGHT_MEDIUM - question_height) / 2 + 2 + 5, question_width, question_height, + question); + } else if (strcmp(reinterpret_cast(mp.decoded.payload.bytes), "‼️") == 0) { + display->drawXbm(x + (SCREEN_WIDTH - bang_width) / 2, y + (SCREEN_HEIGHT - FONT_HEIGHT_MEDIUM - bang_height) / 2 + 2 + 5, + bang_width, bang_height, bang); + } else if (strcmp(reinterpret_cast(mp.decoded.payload.bytes), "\U0001F4A9") == 0) { + display->drawXbm(x + (SCREEN_WIDTH - poo_width) / 2, y + (SCREEN_HEIGHT - FONT_HEIGHT_MEDIUM - poo_height) / 2 + 2 + 5, + poo_width, poo_height, poo); + } else if (strcmp(reinterpret_cast(mp.decoded.payload.bytes), "\xf0\x9f\xa4\xa3") == 0) { + display->drawXbm(x + (SCREEN_WIDTH - haha_width) / 2, y + (SCREEN_HEIGHT - FONT_HEIGHT_MEDIUM - haha_height) / 2 + 2 + 5, + haha_width, haha_height, haha); + } else if (strcmp(reinterpret_cast(mp.decoded.payload.bytes), "\U0001F44B") == 0) { + display->drawXbm(x + (SCREEN_WIDTH - wave_icon_width) / 2, + y + (SCREEN_HEIGHT - FONT_HEIGHT_MEDIUM - wave_icon_height) / 2 + 2 + 5, wave_icon_width, + wave_icon_height, wave_icon); + } else if (strcmp(reinterpret_cast(mp.decoded.payload.bytes), "\U0001F920") == 0) { + display->drawXbm(x + (SCREEN_WIDTH - cowboy_width) / 2, + y + (SCREEN_HEIGHT - FONT_HEIGHT_MEDIUM - cowboy_height) / 2 + 2 + 5, cowboy_width, cowboy_height, + cowboy); + } else if (strcmp(reinterpret_cast(mp.decoded.payload.bytes), "\U0001F42D") == 0) { + display->drawXbm(x + (SCREEN_WIDTH - deadmau5_width) / 2, + y + (SCREEN_HEIGHT - FONT_HEIGHT_MEDIUM - deadmau5_height) / 2 + 2 + 5, deadmau5_width, deadmau5_height, + deadmau5); + } else if (strcmp(reinterpret_cast(mp.decoded.payload.bytes), "\xE2\x98\x80\xEF\xB8\x8F") == 0) { + display->drawXbm(x + (SCREEN_WIDTH - sun_width) / 2, y + (SCREEN_HEIGHT - FONT_HEIGHT_MEDIUM - sun_height) / 2 + 2 + 5, + sun_width, sun_height, sun); + } else if (strcmp(reinterpret_cast(mp.decoded.payload.bytes), "\u2614") == 0) { + display->drawXbm(x + (SCREEN_WIDTH - rain_width) / 2, y + (SCREEN_HEIGHT - FONT_HEIGHT_MEDIUM - rain_height) / 2 + 2 + 10, + rain_width, rain_height, rain); + } else if (strcmp(reinterpret_cast(mp.decoded.payload.bytes), "☁️") == 0) { + display->drawXbm(x + (SCREEN_WIDTH - cloud_width) / 2, + y + (SCREEN_HEIGHT - FONT_HEIGHT_MEDIUM - cloud_height) / 2 + 2 + 5, cloud_width, cloud_height, cloud); + } else if (strcmp(reinterpret_cast(mp.decoded.payload.bytes), "🌫️") == 0) { + display->drawXbm(x + (SCREEN_WIDTH - fog_width) / 2, y + (SCREEN_HEIGHT - FONT_HEIGHT_MEDIUM - fog_height) / 2 + 2 + 5, + fog_width, fog_height, fog); + } else if (strcmp(reinterpret_cast(mp.decoded.payload.bytes), "\xf0\x9f\x98\x88") == 0) { + display->drawXbm(x + (SCREEN_WIDTH - devil_width) / 2, + y + (SCREEN_HEIGHT - FONT_HEIGHT_MEDIUM - devil_height) / 2 + 2 + 5, devil_width, devil_height, devil); + } else if (strcmp(reinterpret_cast(mp.decoded.payload.bytes), "♥️") == 0) { + display->drawXbm(x + (SCREEN_WIDTH - heart_width) / 2, + y + (SCREEN_HEIGHT - FONT_HEIGHT_MEDIUM - heart_height) / 2 + 2 + 5, heart_width, heart_height, heart); + } else { + snprintf(tempBuf, sizeof(tempBuf), "%s", mp.decoded.payload.bytes); + display->drawStringMaxWidth(0 + x, 0 + y + FONT_HEIGHT_SMALL, x + display->getWidth(), tempBuf); + } +#else + snprintf(tempBuf, sizeof(tempBuf), "%s", mp.decoded.payload.bytes); + display->drawStringMaxWidth(0 + x, 0 + y + FONT_HEIGHT_SMALL, x + display->getWidth(), tempBuf); +#endif +} + +/// Draw a series of fields in a column, wrapping to multiple columns if needed +void Screen::drawColumns(OLEDDisplay *display, int16_t x, int16_t y, const char **fields) +{ + // The coordinates define the left starting point of the text + display->setTextAlignment(TEXT_ALIGN_LEFT); + + const char **f = fields; + int xo = x, yo = y; + while (*f) { + display->drawString(xo, yo, *f); + if ((display->getColor() == BLACK) && config.display.heading_bold) + display->drawString(xo + 1, yo, *f); + + display->setColor(WHITE); + yo += FONT_HEIGHT_SMALL; + if (yo > SCREEN_HEIGHT - FONT_HEIGHT_SMALL) { + xo += SCREEN_WIDTH / 2; + yo = 0; + } + f++; + } +} + // Draw nodes status static void drawNodes(OLEDDisplay *display, int16_t x, int16_t y, const NodeStatus *nodeStatus) { char usersString[20]; snprintf(usersString, sizeof(usersString), "%d/%d", nodeStatus->getNumOnline(), nodeStatus->getNumTotal()); -#if (defined(USE_EINK) || defined(ILI9341_DRIVER) || defined(ST7735_CS) || defined(ST7789_CS)) && \ +#if (defined(USE_EINK) || defined(ILI9341_DRIVER) || defined(ILI9342_DRIVER) || defined(ST7701_CS) || defined(ST7735_CS) || \ + defined(ST7789_CS) || defined(USE_ST7789) || defined(HX8357_CS)) && \ !defined(DISPLAY_FORCE_SMALL_FONTS) display->drawFastImage(x, y + 3, 8, 8, imgUser); #else @@ -510,7 +1108,7 @@ static void drawNodes(OLEDDisplay *display, int16_t x, int16_t y, const NodeStat if (config.display.heading_bold) display->drawString(x + 11, y - 2, usersString); } - +#if HAS_GPS // Draw GPS status summary static void drawGPS(OLEDDisplay *display, int16_t x, int16_t y, const GPSStatus *gps) { @@ -652,57 +1250,14 @@ static void drawGPScoordinates(OLEDDisplay *display, int16_t x, int16_t y, const } } } - -namespace -{ - -/// A basic 2D point class for drawing -class Point -{ - public: - float x, y; - - Point(float _x, float _y) : x(_x), y(_y) {} - - /// Apply a rotation around zero (standard rotation matrix math) - void rotate(float radian) - { - float cos = cosf(radian), sin = sinf(radian); - float rx = x * cos + y * sin, ry = -x * sin + y * cos; - - x = rx; - y = ry; - } - - void translate(int16_t dx, int dy) - { - x += dx; - y += dy; - } - - void scale(float f) - { - // We use -f here to counter the flip that happens - // on the y axis when drawing and rotating on screen - x *= f; - y *= -f; - } -}; - -} // namespace - -static void drawLine(OLEDDisplay *d, const Point &p1, const Point &p2) -{ - d->drawLine(p1.x, p1.y, p2.x, p2.y); -} - +#endif /** * Given a recent lat/lon return a guess of the heading the user is walking on. * * We keep a series of "after you've gone 10 meters, what is your heading since * the last reference point?" */ -static float estimatedHeading(double lat, double lon) +float Screen::estimatedHeading(double lat, double lon) { static double oldLat, oldLon; static float b; @@ -726,7 +1281,99 @@ static float estimatedHeading(double lat, double lon) return b; } -static uint16_t getCompassDiam(OLEDDisplay *display) +/// We will skip one node - the one for us, so we just blindly loop over all +/// nodes +static size_t nodeIndex; +static int8_t prevFrame = -1; + +// Draw the arrow pointing to a node's location +void Screen::drawNodeHeading(OLEDDisplay *display, int16_t compassX, int16_t compassY, uint16_t compassDiam, float headingRadian) +{ + Point tip(0.0f, 0.5f), tail(0.0f, -0.35f); // pointing up initially + float arrowOffsetX = 0.14f, arrowOffsetY = 1.0f; + Point leftArrow(tip.x - arrowOffsetX, tip.y - arrowOffsetY), rightArrow(tip.x + arrowOffsetX, tip.y - arrowOffsetY); + + Point *arrowPoints[] = {&tip, &tail, &leftArrow, &rightArrow}; + + for (int i = 0; i < 4; i++) { + arrowPoints[i]->rotate(headingRadian); + arrowPoints[i]->scale(compassDiam * 0.6); + arrowPoints[i]->translate(compassX, compassY); + } + /* Old arrow + display->drawLine(tip.x, tip.y, tail.x, tail.y); + display->drawLine(leftArrow.x, leftArrow.y, tip.x, tip.y); + display->drawLine(rightArrow.x, rightArrow.y, tip.x, tip.y); + display->drawLine(leftArrow.x, leftArrow.y, tail.x, tail.y); + display->drawLine(rightArrow.x, rightArrow.y, tail.x, tail.y); + */ +#ifdef USE_EINK + display->drawTriangle(tip.x, tip.y, rightArrow.x, rightArrow.y, tail.x, tail.y); +#else + display->fillTriangle(tip.x, tip.y, rightArrow.x, rightArrow.y, tail.x, tail.y); +#endif + display->drawTriangle(tip.x, tip.y, leftArrow.x, leftArrow.y, tail.x, tail.y); +} + +// Get a string representation of the time passed since something happened +void Screen::getTimeAgoStr(uint32_t agoSecs, char *timeStr, uint8_t maxLength) +{ + // Use an absolute timestamp in some cases. + // Particularly useful with E-Ink displays. Static UI, fewer refreshes. + uint8_t timestampHours, timestampMinutes; + int32_t daysAgo; + bool useTimestamp = deltaToTimestamp(agoSecs, ×tampHours, ×tampMinutes, &daysAgo); + + if (agoSecs < 120) // last 2 mins? + snprintf(timeStr, maxLength, "%u seconds ago", agoSecs); + // -- if suitable for timestamp -- + else if (useTimestamp && agoSecs < 15 * SECONDS_IN_MINUTE) // Last 15 minutes + snprintf(timeStr, maxLength, "%u minutes ago", agoSecs / SECONDS_IN_MINUTE); + else if (useTimestamp && daysAgo == 0) // Today + snprintf(timeStr, maxLength, "Last seen: %02u:%02u", (unsigned int)timestampHours, (unsigned int)timestampMinutes); + else if (useTimestamp && daysAgo == 1) // Yesterday + snprintf(timeStr, maxLength, "Seen yesterday"); + else if (useTimestamp && daysAgo > 1) // Last six months (capped by deltaToTimestamp method) + snprintf(timeStr, maxLength, "%li days ago", (long)daysAgo); + // -- if using time delta instead -- + else if (agoSecs < 120 * 60) // last 2 hrs + snprintf(timeStr, maxLength, "%u minutes ago", agoSecs / 60); + // Only show hours ago if it's been less than 6 months. Otherwise, we may have bad data. + else if ((agoSecs / 60 / 60) < (hours_in_month * 6)) + snprintf(timeStr, maxLength, "%u hours ago", agoSecs / 60 / 60); + else + snprintf(timeStr, maxLength, "unknown age"); +} + +void Screen::drawCompassNorth(OLEDDisplay *display, int16_t compassX, int16_t compassY, float myHeading) +{ + // If north is supposed to be at the top of the compass we want rotation to be +0 + if (config.display.compass_north_top) + myHeading = -0; + /* N sign points currently not deleted*/ + Point N1(-0.04f, 0.65f), N2(0.04f, 0.65f); // N sign points (N1-N4) + Point N3(-0.04f, 0.55f), N4(0.04f, 0.55f); + Point NC1(0.00f, 0.50f); // north circle center point + Point *rosePoints[] = {&N1, &N2, &N3, &N4, &NC1}; + + uint16_t compassDiam = Screen::getCompassDiam(SCREEN_WIDTH, SCREEN_HEIGHT); + + for (int i = 0; i < 5; i++) { + // North on compass will be negative of heading + rosePoints[i]->rotate(-myHeading); + rosePoints[i]->scale(compassDiam); + rosePoints[i]->translate(compassX, compassY); + } + + /* changed the N sign to a small circle on the compass circle. + display->drawLine(N1.x, N1.y, N3.x, N3.y); + display->drawLine(N2.x, N2.y, N4.x, N4.y); + display->drawLine(N1.x, N1.y, N4.x, N4.y); + */ + display->drawCircle(NC1.x, NC1.y, 4); // North sign circle, 4px radius is sufficient for all displays. +} + +uint16_t Screen::getCompassDiam(uint32_t displayWidth, uint32_t displayHeight) { uint16_t diam = 0; uint16_t offset = 0; @@ -735,71 +1382,22 @@ static uint16_t getCompassDiam(OLEDDisplay *display) offset = FONT_HEIGHT_SMALL; // get the smaller of the 2 dimensions and subtract 20 - if (display->getWidth() > (display->getHeight() - offset)) { - diam = display->getHeight() - offset; + if (displayWidth > (displayHeight - offset)) { + diam = displayHeight - offset; // if 2/3 of the other size would be smaller, use that - if (diam > (display->getWidth() * 2 / 3)) { - diam = display->getWidth() * 2 / 3; + if (diam > (displayWidth * 2 / 3)) { + diam = displayWidth * 2 / 3; } } else { - diam = display->getWidth(); - if (diam > ((display->getHeight() - offset) * 2 / 3)) { - diam = (display->getHeight() - offset) * 2 / 3; + diam = displayWidth; + if (diam > ((displayHeight - offset) * 2 / 3)) { + diam = (displayHeight - offset) * 2 / 3; } } return diam - 20; }; -/// We will skip one node - the one for us, so we just blindly loop over all -/// nodes -static size_t nodeIndex; -static int8_t prevFrame = -1; - -// Draw the arrow pointing to a node's location -static void drawNodeHeading(OLEDDisplay *display, int16_t compassX, int16_t compassY, float headingRadian) -{ - Point tip(0.0f, 0.5f), tail(0.0f, -0.5f); // pointing up initially - float arrowOffsetX = 0.2f, arrowOffsetY = 0.2f; - Point leftArrow(tip.x - arrowOffsetX, tip.y - arrowOffsetY), rightArrow(tip.x + arrowOffsetX, tip.y - arrowOffsetY); - - Point *arrowPoints[] = {&tip, &tail, &leftArrow, &rightArrow}; - - for (int i = 0; i < 4; i++) { - arrowPoints[i]->rotate(headingRadian); - arrowPoints[i]->scale(getCompassDiam(display) * 0.6); - arrowPoints[i]->translate(compassX, compassY); - } - drawLine(display, tip, tail); - drawLine(display, leftArrow, tip); - drawLine(display, rightArrow, tip); -} - -// Draw north -static void drawCompassNorth(OLEDDisplay *display, int16_t compassX, int16_t compassY, float myHeading) -{ - // If north is supposed to be at the top of the compass we want rotation to be +0 - if (config.display.compass_north_top) - myHeading = -0; - - Point N1(-0.04f, 0.65f), N2(0.04f, 0.65f); - Point N3(-0.04f, 0.55f), N4(0.04f, 0.55f); - Point *rosePoints[] = {&N1, &N2, &N3, &N4}; - - for (int i = 0; i < 4; i++) { - // North on compass will be negative of heading - rosePoints[i]->rotate(-myHeading); - rosePoints[i]->scale(getCompassDiam(display)); - rosePoints[i]->translate(compassX, compassY); - } - drawLine(display, N1, N3); - drawLine(display, N2, N4); - drawLine(display, N1, N4); -} - -/// Convert an integer GPS coords to a floating point -#define DegD(i) (i * 1e-7) - static void drawNodeInfo(OLEDDisplay *display, OLEDDisplayUiState *state, int16_t x, int16_t y) { // We only advance our nodeIndex if the frame # has changed - because @@ -807,16 +1405,16 @@ static void drawNodeInfo(OLEDDisplay *display, OLEDDisplayUiState *state, int16_ if (state->currentFrame != prevFrame) { prevFrame = state->currentFrame; - nodeIndex = (nodeIndex + 1) % nodeDB.getNumMeshNodes(); - meshtastic_NodeInfoLite *n = nodeDB.getMeshNodeByIndex(nodeIndex); - if (n->num == nodeDB.getNodeNum()) { + nodeIndex = (nodeIndex + 1) % nodeDB->getNumMeshNodes(); + meshtastic_NodeInfoLite *n = nodeDB->getMeshNodeByIndex(nodeIndex); + if (n->num == nodeDB->getNodeNum()) { // Don't show our node, just skip to next - nodeIndex = (nodeIndex + 1) % nodeDB.getNumMeshNodes(); - n = nodeDB.getMeshNodeByIndex(nodeIndex); + nodeIndex = (nodeIndex + 1) % nodeDB->getNumMeshNodes(); + n = nodeDB->getMeshNodeByIndex(nodeIndex); } } - meshtastic_NodeInfoLite *node = nodeDB.getMeshNodeByIndex(nodeIndex); + meshtastic_NodeInfoLite *node = nodeDB->getMeshNodeByIndex(nodeIndex); display->setFont(FONT_SMALL); @@ -830,48 +1428,46 @@ static void drawNodeInfo(OLEDDisplay *display, OLEDDisplayUiState *state, int16_ const char *username = node->has_user ? node->user.long_name : "Unknown Name"; static char signalStr[20]; - snprintf(signalStr, sizeof(signalStr), "Signal: %d%%", clamp((int)((node->snr + 10) * 5), 0, 100)); - uint32_t agoSecs = sinceLastSeen(node); - static char lastStr[20]; - if (agoSecs < 120) // last 2 mins? - snprintf(lastStr, sizeof(lastStr), "%u seconds ago", agoSecs); - else if (agoSecs < 120 * 60) // last 2 hrs - snprintf(lastStr, sizeof(lastStr), "%u minutes ago", agoSecs / 60); - else { - // Only show hours ago if it's been less than 6 months. Otherwise, we may have bad - // data. - if ((agoSecs / 60 / 60) < (hours_in_month * 6)) { - snprintf(lastStr, sizeof(lastStr), "%u hours ago", agoSecs / 60 / 60); - } else { - snprintf(lastStr, sizeof(lastStr), "unknown age"); - } + // section here to choose whether to display hops away rather than signal strength if more than 0 hops away. + if (node->hops_away > 0) { + snprintf(signalStr, sizeof(signalStr), "Hops Away: %d", node->hops_away); + } else { + snprintf(signalStr, sizeof(signalStr), "Signal: %d%%", clamp((int)((node->snr + 10) * 5), 0, 100)); } + static char lastStr[20]; + screen->getTimeAgoStr(sinceLastSeen(node), lastStr, sizeof(lastStr)); + static char distStr[20]; if (config.display.units == meshtastic_Config_DisplayConfig_DisplayUnits_IMPERIAL) { strncpy(distStr, "? mi", sizeof(distStr)); // might not have location data } else { strncpy(distStr, "? km", sizeof(distStr)); } - meshtastic_NodeInfoLite *ourNode = nodeDB.getMeshNode(nodeDB.getNodeNum()); - const char *fields[] = {username, distStr, signalStr, lastStr, NULL}; + meshtastic_NodeInfoLite *ourNode = nodeDB->getMeshNode(nodeDB->getNodeNum()); + const char *fields[] = {username, lastStr, signalStr, distStr, NULL}; int16_t compassX = 0, compassY = 0; + uint16_t compassDiam = Screen::getCompassDiam(SCREEN_WIDTH, SCREEN_HEIGHT); // coordinates for the center of the compass/circle if (config.display.displaymode == meshtastic_Config_DisplayConfig_DisplayMode_DEFAULT) { - compassX = x + SCREEN_WIDTH - getCompassDiam(display) / 2 - 5; + compassX = x + SCREEN_WIDTH - compassDiam / 2 - 5; compassY = y + SCREEN_HEIGHT / 2; } else { - compassX = x + SCREEN_WIDTH - getCompassDiam(display) / 2 - 5; + compassX = x + SCREEN_WIDTH - compassDiam / 2 - 5; compassY = y + FONT_HEIGHT_SMALL + (SCREEN_HEIGHT - FONT_HEIGHT_SMALL) / 2; } bool hasNodeHeading = false; - if (ourNode && hasValidPosition(ourNode)) { + if (ourNode && (hasValidPosition(ourNode) || screen->hasHeading())) { const meshtastic_PositionLite &op = ourNode->position; - float myHeading = estimatedHeading(DegD(op.latitude_i), DegD(op.longitude_i)); - drawCompassNorth(display, compassX, compassY, myHeading); + float myHeading; + if (screen->hasHeading()) + myHeading = (screen->getHeading()) * PI / 180; // gotta convert compass degrees to Radians + else + myHeading = screen->estimatedHeading(DegD(op.latitude_i), DegD(op.longitude_i)); + screen->drawCompassNorth(display, compassX, compassY, myHeading); if (hasValidPosition(node)) { // display direction toward node @@ -898,7 +1494,7 @@ static void drawNodeInfo(OLEDDisplay *display, OLEDDisplayUiState *state, int16_ // If the top of the compass is not a static north we need adjust bearingToOther based on heading if (!config.display.compass_north_top) bearingToOther -= myHeading; - drawNodeHeading(display, compassX, compassY, bearingToOther); + screen->drawNodeHeading(display, compassX, compassY, compassDiam, bearingToOther); } } if (!hasNodeHeading) { @@ -908,30 +1504,46 @@ static void drawNodeInfo(OLEDDisplay *display, OLEDDisplayUiState *state, int16_ // hasValidPosition(node)); display->drawString(compassX - FONT_HEIGHT_SMALL / 4, compassY - FONT_HEIGHT_SMALL / 2, "?"); } - display->drawCircle(compassX, compassY, getCompassDiam(display) / 2); + display->drawCircle(compassX, compassY, compassDiam / 2); if (config.display.displaymode == meshtastic_Config_DisplayConfig_DisplayMode_INVERTED) { display->setColor(BLACK); } // Must be after distStr is populated - drawColumns(display, x, y, fields); + screen->drawColumns(display, x, y, fields); } +#if defined(ESP_PLATFORM) && defined(USE_ST7789) +SPIClass SPI1(HSPI); +#endif + Screen::Screen(ScanI2C::DeviceAddress address, meshtastic_Config_DisplayConfig_OledType screenType, OLEDDISPLAY_GEOMETRY geometry) : concurrency::OSThread("Screen"), address_found(address), model(screenType), geometry(geometry), cmdQueue(32) { + graphics::normalFrames = new FrameCallback[MAX_NUM_NODES + NUM_EXTRA_FRAMES]; #if defined(USE_SH1106) || defined(USE_SH1107) || defined(USE_SH1107_128_64) dispdev = new SH1106Wire(address.address, -1, -1, geometry, (address.port == ScanI2C::I2CPort::WIRE1) ? HW_I2C::I2C_TWO : HW_I2C::I2C_ONE); +#elif defined(USE_ST7789) +#ifdef ESP_PLATFORM + dispdev = new ST7789Spi(&SPI1, ST7789_RESET, ST7789_RS, ST7789_NSS, GEOMETRY_RAWMODE, TFT_WIDTH, TFT_HEIGHT, ST7789_SDA, + ST7789_MISO, ST7789_SCK); +#else + dispdev = new ST7789Spi(&SPI1, ST7789_RESET, ST7789_RS, ST7789_NSS, GEOMETRY_RAWMODE, TFT_WIDTH, TFT_HEIGHT); +#endif #elif defined(USE_SSD1306) dispdev = new SSD1306Wire(address.address, -1, -1, geometry, (address.port == ScanI2C::I2CPort::WIRE1) ? HW_I2C::I2C_TWO : HW_I2C::I2C_ONE); -#elif defined(ST7735_CS) || defined(ILI9341_DRIVER) || defined(ST7789_CS) || defined(RAK14014) +#elif defined(ST7735_CS) || defined(ILI9341_DRIVER) || defined(ILI9342_DRIVER) || defined(ST7701_CS) || defined(ST7789_CS) || \ + defined(RAK14014) || defined(HX8357_CS) dispdev = new TFTDisplay(address.address, -1, -1, geometry, (address.port == ScanI2C::I2CPort::WIRE1) ? HW_I2C::I2C_TWO : HW_I2C::I2C_ONE); -#elif defined(USE_EINK) +#elif defined(USE_EINK) && !defined(USE_EINK_DYNAMICDISPLAY) dispdev = new EInkDisplay(address.address, -1, -1, geometry, (address.port == ScanI2C::I2CPort::WIRE1) ? HW_I2C::I2C_TWO : HW_I2C::I2C_ONE); +#elif defined(USE_EINK) && defined(USE_EINK_DYNAMICDISPLAY) + dispdev = new EInkDynamicDisplay(address.address, -1, -1, geometry, + (address.port == ScanI2C::I2CPort::WIRE1) ? HW_I2C::I2C_TWO : HW_I2C::I2C_ONE); #elif defined(USE_ST7567) dispdev = new ST7567Wire(address.address, -1, -1, geometry, (address.port == ScanI2C::I2CPort::WIRE1) ? HW_I2C::I2C_TWO : HW_I2C::I2C_ONE); @@ -955,6 +1567,11 @@ Screen::Screen(ScanI2C::DeviceAddress address, meshtastic_Config_DisplayConfig_O cmdQueue.setReader(this); } +Screen::~Screen() +{ + delete[] graphics::normalFrames; +} + /** * Prepare the display for the unit going to the lowest power mode possible. Most screens will just * poweroff, but eink screens will show a "I'm sleeping" graphic, possibly with a QR code @@ -962,15 +1579,17 @@ Screen::Screen(ScanI2C::DeviceAddress address, meshtastic_Config_DisplayConfig_O void Screen::doDeepSleep() { #ifdef USE_EINK - static FrameCallback sleepFrames[] = {drawSleepScreen}; - static const int sleepFrameCount = sizeof(sleepFrames) / sizeof(sleepFrames[0]); - ui->setFrames(sleepFrames, sleepFrameCount); - ui->update(); + setOn(false, drawDeepSleepScreen); +#ifdef PIN_EINK_EN + digitalWrite(PIN_EINK_EN, LOW); // power off backlight #endif +#else + // Without E-Ink display: setOn(false); +#endif } -void Screen::handleSetOn(bool on) +void Screen::handleSetOn(bool on, FrameCallback einkScreensaver) { if (!useDisplay) return; @@ -978,19 +1597,59 @@ void Screen::handleSetOn(bool on) if (on != screenOn) { if (on) { LOG_INFO("Turning on screen\n"); + powerMon->setState(meshtastic_PowerMon_State_Screen_On); #ifdef T_WATCH_S3 PMU->enablePowerOutput(XPOWERS_ALDO2); #endif #if !ARCH_PORTDUINO dispdev->displayOn(); #endif + +#if defined(ST7789_CS) && \ + !defined(M5STACK) // set display brightness when turning on screens. Just moved function from TFTDisplay to here. + static_cast(dispdev)->setDisplayBrightness(brightness); +#endif + dispdev->displayOn(); +#ifdef USE_ST7789 + pinMode(VTFT_CTRL, OUTPUT); + digitalWrite(VTFT_CTRL, LOW); + ui->init(); +#ifdef ESP_PLATFORM + analogWrite(VTFT_LEDA, BRIGHTNESS_DEFAULT); +#else + pinMode(VTFT_LEDA, OUTPUT); + digitalWrite(VTFT_LEDA, TFT_BACKLIGHT_ON); +#endif +#endif enabled = true; setInterval(0); // Draw ASAP runASAP = true; } else { + powerMon->clearState(meshtastic_PowerMon_State_Screen_On); +#ifdef USE_EINK + // eInkScreensaver parameter is usually NULL (default argument), default frame used instead + setScreensaverFrames(einkScreensaver); +#endif LOG_INFO("Turning off screen\n"); dispdev->displayOff(); +#ifdef USE_ST7789 + SPI1.end(); +#if defined(ARCH_ESP32) + pinMode(VTFT_LEDA, ANALOG); + pinMode(VTFT_CTRL, ANALOG); + pinMode(ST7789_RESET, ANALOG); + pinMode(ST7789_RS, ANALOG); + pinMode(ST7789_NSS, ANALOG); +#else + nrf_gpio_cfg_default(VTFT_LEDA); + nrf_gpio_cfg_default(VTFT_CTRL); + nrf_gpio_cfg_default(ST7789_RESET); + nrf_gpio_cfg_default(ST7789_RS); + nrf_gpio_cfg_default(ST7789_NSS); +#endif +#endif + #ifdef T_WATCH_S3 PMU->disablePowerOutput(XPOWERS_ALDO2); #endif @@ -1015,6 +1674,11 @@ void Screen::setup() static_cast(dispdev)->setSubtype(7); #endif +#if defined(USE_ST7789) && defined(TFT_MESH) + // Heltec T114 and T190: honor a custom text color, if defined in variant.h + static_cast(dispdev)->setRGB(TFT_MESH); +#endif + // Initialising the UI will init the display too. ui->init(); @@ -1039,9 +1703,20 @@ void Screen::setup() logo_timeout *= 2; // Add frames. - static FrameCallback bootFrames[] = {drawBootScreen}; - static const int bootFrameCount = sizeof(bootFrames) / sizeof(bootFrames[0]); - ui->setFrames(bootFrames, bootFrameCount); + EINK_ADD_FRAMEFLAG(dispdev, DEMAND_FAST); + alertFrames[0] = [this](OLEDDisplay *display, OLEDDisplayUiState *state, int16_t x, int16_t y) -> void { +#ifdef ARCH_ESP32 + if (wakeCause == ESP_SLEEP_WAKEUP_TIMER || wakeCause == ESP_SLEEP_WAKEUP_EXT1) { + drawFrameText(display, state, x, y, "Resuming..."); + } else +#endif + { + // Draw region in upper left + const char *region = myRegion ? myRegion->name : NULL; + drawIconScreen(region, display, state, x, y); + } + }; + ui->setFrames(alertFrames, 1); // No overlays. ui->setOverlays(nullptr, 0); @@ -1057,8 +1732,11 @@ void Screen::setup() // Standard behaviour is to FLIP the screen (needed on T-Beam). If this config item is set, unflip it, and thereby logically // flip it. If you have a headache now, you're welcome. if (!config.display.flip_screen) { -#if defined(ST7735_CS) || defined(ILI9341_DRIVER) || defined(ST7789_CS) || defined(RAK14014) +#if defined(ST7701_CS) || defined(ST7735_CS) || defined(ILI9341_DRIVER) || defined(ILI9342_DRIVER) || defined(ST7701_CS) || \ + defined(ST7789_CS) || defined(RAK14014) || defined(HX8357_CS) static_cast(dispdev)->flipScreenVertically(); +#elif defined(USE_ST7789) + static_cast(dispdev)->flipScreenVertically(); #else dispdev->flipScreenVertically(); #endif @@ -1100,6 +1778,7 @@ void Screen::setup() powerStatusObserver.observe(&powerStatus->onNewStatus); gpsStatusObserver.observe(&gpsStatus->onNewStatus); nodeStatusObserver.observe(&nodeStatus->onNewStatus); + adminMessageObserver.observe(adminModule); if (textMessageModule) textMessageObserver.observe(textMessageModule); if (inputBroker) @@ -1109,10 +1788,38 @@ void Screen::setup() MeshModule::observeUIEvents(&uiFrameEventObserver); } -void Screen::forceDisplay() +void Screen::forceDisplay(bool forceUiUpdate) { // Nasty hack to force epaper updates for 'key' frames. FIXME, cleanup. #ifdef USE_EINK + // If requested, make sure queued commands are run, and UI has rendered a new frame + if (forceUiUpdate) { + // Force a display refresh, in addition to the UI update + // Changing the GPS status bar icon apparently doesn't register as a change in image + // (False negative of the image hashing algorithm used to skip identical frames) + EINK_ADD_FRAMEFLAG(dispdev, DEMAND_FAST); + + // No delay between UI frame rendering + setFastFramerate(); + + // Make sure all CMDs have run first + while (!cmdQueue.isEmpty()) + runOnce(); + + // Ensure at least one frame has drawn + uint64_t startUpdate; + do { + startUpdate = millis(); // Handle impossibly unlikely corner case of a millis() overflow.. + delay(10); + ui->update(); + } while (ui->getUiState()->lastUpdate < startUpdate); + + // Return to normal frame rate + targetFramerate = IDLE_FRAMERATE; + ui->setTargetFPS(targetFramerate); + } + + // Tell EInk class to update the display static_cast(dispdev)->forceDisplay(); #endif } @@ -1127,6 +1834,10 @@ int32_t Screen::runOnce() return RUN_SAME; } + if (displayHeight == 0) { + displayHeight = dispdev->getHeight(); + } + // Show boot screen for first logo_timeout seconds, then switch to normal operation. // serialSinceMsec adjusts for additional serial wait time during nRF52 bootup static bool showingBootScreen = true; @@ -1173,13 +1884,7 @@ int32_t Screen::runOnce() handleSetOn(false); break; case Cmd::ON_PRESS: - // If a nag notification is running, stop it - if (moduleConfig.external_notification.enabled && (externalNotificationModule->nagCycleCutoff != UINT32_MAX)) { - externalNotificationModule->stopNow(); - } else { - // Don't advance the screen if we just wanted to switch off the nag notification - handleOnPress(); - } + handleOnPress(); break; case Cmd::SHOW_PREV_FRAME: handleShowPrevFrame(); @@ -1187,26 +1892,30 @@ int32_t Screen::runOnce() case Cmd::SHOW_NEXT_FRAME: handleShowNextFrame(); break; - case Cmd::START_BLUETOOTH_PIN_SCREEN: - handleStartBluetoothPinScreen(cmd.bluetooth_pin); + case Cmd::START_ALERT_FRAME: { + showingBootScreen = false; // this should avoid the edge case where an alert triggers before the boot screen goes away + showingNormalScreen = false; + alertFrames[0] = alertFrame; +#ifdef USE_EINK + EINK_ADD_FRAMEFLAG(dispdev, DEMAND_FAST); // Use fast-refresh for next frame, no skip please + EINK_ADD_FRAMEFLAG(dispdev, BLOCKING); // Edge case: if this frame is promoted to COSMETIC, wait for update + handleSetOn(true); // Ensure power-on to receive deep-sleep screensaver (PowerFSM should handle?) +#endif + setFrameImmediateDraw(alertFrames); break; + } case Cmd::START_FIRMWARE_UPDATE_SCREEN: handleStartFirmwareUpdateScreen(); break; - case Cmd::STOP_BLUETOOTH_PIN_SCREEN: + case Cmd::STOP_ALERT_FRAME: case Cmd::STOP_BOOT_SCREEN: + EINK_ADD_FRAMEFLAG(dispdev, COSMETIC); // E-Ink: Explicitly use full-refresh for next frame setFrames(); break; case Cmd::PRINT: handlePrint(cmd.print_text); free(cmd.print_text); break; - case Cmd::START_SHUTDOWN_SCREEN: - handleShutdownScreen(); - break; - case Cmd::START_REBOOT_SCREEN: - handleRebootScreen(); - break; default: LOG_ERROR("Invalid screen cmd\n"); } @@ -1238,7 +1947,14 @@ int32_t Screen::runOnce() if (showingNormalScreen) { // standard screen loop handling here if (config.display.auto_screen_carousel_secs > 0 && - (millis() - lastScreenTransition) > (config.display.auto_screen_carousel_secs * 1000)) { + !Throttle::isWithinTimespanMs(lastScreenTransition, config.display.auto_screen_carousel_secs * 1000)) { + +// If an E-Ink display struggles with fast refresh, force carousel to use full refresh instead +// Carousel is potentially a major source of E-Ink display wear +#if !defined(EINK_BACKGROUND_USES_FAST) + EINK_ADD_FRAMEFLAG(dispdev, COSMETIC); +#endif + LOG_DEBUG("LastScreenTransition exceeded %ums transitioning to next frame\n", (millis() - lastScreenTransition)); handleOnPress(); } @@ -1293,12 +2009,78 @@ void Screen::setWelcomeFrames() } } -// restore our regular frame list -void Screen::setFrames() +#ifdef USE_EINK +/// Determine which screensaver frame to use, then set the FrameCallback +void Screen::setScreensaverFrames(FrameCallback einkScreensaver) { + // Retain specified frame / overlay callback beyond scope of this method + static FrameCallback screensaverFrame; + static OverlayCallback screensaverOverlay; + +#if defined(HAS_EINK_ASYNCFULL) && defined(USE_EINK_DYNAMICDISPLAY) + // Join (await) a currently running async refresh, then run the post-update code. + // Avoid skipping of screensaver frame. Would otherwise be handled by NotifiedWorkerThread. + EINK_JOIN_ASYNCREFRESH(dispdev); +#endif + + // If: one-off screensaver frame passed as argument. Handles doDeepSleep() + if (einkScreensaver != NULL) { + screensaverFrame = einkScreensaver; + ui->setFrames(&screensaverFrame, 1); + } + + // Else, display the usual "overlay" screensaver + else { + screensaverOverlay = drawScreensaverOverlay; + ui->setOverlays(&screensaverOverlay, 1); + } + + // Request new frame, ASAP + setFastFramerate(); + uint64_t startUpdate; + do { + startUpdate = millis(); // Handle impossibly unlikely corner case of a millis() overflow.. + delay(1); + ui->update(); + } while (ui->getUiState()->lastUpdate < startUpdate); + + // Old EInkDisplay class +#if !defined(USE_EINK_DYNAMICDISPLAY) + static_cast(dispdev)->forceDisplay(0); // Screen::forceDisplay(), but override rate-limit +#endif + + // Prepare now for next frame, shown when display wakes + ui->setOverlays(NULL, 0); // Clear overlay + setFrames(FOCUS_PRESERVE); // Return to normal display updates, showing same frame as before screensaver, ideally + + // Pick a refresh method, for when display wakes +#ifdef EINK_HASQUIRK_GHOSTING + EINK_ADD_FRAMEFLAG(dispdev, COSMETIC); // Really ugly to see ghosting from "screen paused" +#else + EINK_ADD_FRAMEFLAG(dispdev, RESPONSIVE); // Really nice to wake screen with a fast-refresh +#endif +} +#endif + +// Regenerate the normal set of frames, focusing a specific frame if requested +// Called when a frame should be added / removed, or custom frames should be cleared +void Screen::setFrames(FrameFocus focus) +{ + uint8_t originalPosition = ui->getUiState()->currentFrame; + FramesetInfo fsi; // Location of specific frames, for applying focus parameter + LOG_DEBUG("showing standard frames\n"); showingNormalScreen = true; +#ifdef USE_EINK + // If user has disabled the screensaver, warn them after boot + static bool warnedScreensaverDisabled = false; + if (config.display.screen_on_secs == 0 && !warnedScreensaverDisabled) { + screen->print("Screensaver disabled\n"); + warnedScreensaverDisabled = true; + } +#endif + moduleFrames = MeshModule::GetMeshModulesWithUIFrames(); LOG_DEBUG("Showing %d module frames\n", moduleFrames.size()); #ifdef DEBUG_PORT @@ -1306,8 +2088,8 @@ void Screen::setFrames() LOG_DEBUG("Total frame count: %d\n", totalFrameCount); #endif - // We don't show the node info our our node (if we have it yet - we should) - size_t numMeshNodes = nodeDB.getNumMeshNodes(); + // We don't show the node info of our node (if we have it yet - we should) + size_t numMeshNodes = nodeDB->getNumMeshNodes(); if (numMeshNodes > 0) numMeshNodes--; @@ -1320,23 +2102,41 @@ void Screen::setFrames() // is the same offset into the moduleFrames vector // so that we can invoke the module's callback for (auto i = moduleFrames.begin(); i != moduleFrames.end(); ++i) { - normalFrames[numframes++] = drawModuleFrame; + // Draw the module frame, using the hack described above + normalFrames[numframes] = drawModuleFrame; + + // Check if the module being drawn has requested focus + // We will honor this request later, if setFrames was triggered by a UIFrameEvent + MeshModule *m = *i; + if (m->isRequestingFocus()) { + fsi.positions.focusedModule = numframes; + } + + // Identify the position of specific modules, if we need to know this later + if (m == waypointModule) + fsi.positions.waypoint = numframes; + + numframes++; } LOG_DEBUG("Added modules. numframes: %d\n", numframes); // If we have a critical fault, show it first - if (error_code) + fsi.positions.fault = numframes; + if (error_code) { normalFrames[numframes++] = drawCriticalFaultFrame; + focus = FOCUS_FAULT; // Change our "focus" parameter, to ensure we show the fault frame + } + +#ifdef T_WATCH_S3 + normalFrames[numframes++] = screen->digitalWatchFace ? &Screen::drawDigitalClockFrame : &Screen::drawAnalogClockFrame; +#endif // If we have a text message - show it next, unless it's a phone message and we aren't using any special modules if (devicestate.has_rx_text_message && shouldDrawMessage(&devicestate.rx_text_message)) { + fsi.positions.textMessage = numframes; normalFrames[numframes++] = drawTextMessageFrame; } - // If we have a waypoint - show it next, unless it's a phone message and we aren't using any special modules - if (devicestate.has_rx_waypoint && shouldDrawMessage(&devicestate.rx_waypoint)) { - normalFrames[numframes++] = drawWaypointFrame; - } // then all the nodes // We only show a few nodes in our scrolling list - because meshes with many nodes would have too many screens @@ -1348,11 +2148,14 @@ void Screen::setFrames() // // Since frames are basic function pointers, we have to use a helper to // call a method on debugInfo object. + fsi.positions.log = numframes; normalFrames[numframes++] = &Screen::drawDebugInfoTrampoline; // call a method on debugInfoScreen object (for more details) + fsi.positions.settings = numframes; normalFrames[numframes++] = &Screen::drawDebugInfoSettingsTrampoline; + fsi.positions.wifi = numframes; #if HAS_WIFI && !defined(ARCH_PORTDUINO) if (isWifiAvailable()) { // call a method on debugInfoScreen object (for more details) @@ -1360,27 +2163,72 @@ void Screen::setFrames() } #endif + fsi.frameCount = numframes; // Total framecount is used to apply FOCUS_PRESERVE LOG_DEBUG("Finished building frames. numframes: %d\n", numframes); ui->setFrames(normalFrames, numframes); ui->enableAllIndicators(); + // Add function overlay here. This can show when notifications muted, modifier key is active etc + static OverlayCallback functionOverlay[] = {drawFunctionOverlay}; + static const int functionOverlayCount = sizeof(functionOverlay) / sizeof(functionOverlay[0]); + ui->setOverlays(functionOverlay, functionOverlayCount); + prevFrame = -1; // Force drawNodeInfo to pick a new node (because our list // just changed) + // Focus on a specific frame, in the frame set we just created + switch (focus) { + case FOCUS_DEFAULT: + ui->switchToFrame(0); // First frame + break; + case FOCUS_FAULT: + ui->switchToFrame(fsi.positions.fault); + break; + case FOCUS_TEXTMESSAGE: + ui->switchToFrame(fsi.positions.textMessage); + break; + case FOCUS_MODULE: + // Whichever frame was marked by MeshModule::requestFocus(), if any + // If no module requested focus, will show the first frame instead + ui->switchToFrame(fsi.positions.focusedModule); + break; + + case FOCUS_PRESERVE: + // If we can identify which type of frame "originalPosition" was, can move directly to it in the new frameset + const FramesetInfo &oldFsi = this->framesetInfo; + if (originalPosition == oldFsi.positions.log) + ui->switchToFrame(fsi.positions.log); + else if (originalPosition == oldFsi.positions.settings) + ui->switchToFrame(fsi.positions.settings); + else if (originalPosition == oldFsi.positions.wifi) + ui->switchToFrame(fsi.positions.wifi); + + // If frame count has decreased + else if (fsi.frameCount < oldFsi.frameCount) { + uint8_t numDropped = oldFsi.frameCount - fsi.frameCount; + // Move n frames backwards + if (numDropped <= originalPosition) + ui->switchToFrame(originalPosition - numDropped); + // Unless that would put us "out of bounds" (< 0) + else + ui->switchToFrame(0); + } + + // If we're not sure exactly which frame we were on, at least return to the same frame number + // (node frames; module frames) + else + ui->switchToFrame(originalPosition); + + break; + } + + // Store the info about this frameset, for future setFrames calls + this->framesetInfo = fsi; + setFastFramerate(); // Draw ASAP } -void Screen::handleStartBluetoothPinScreen(uint32_t pin) -{ - LOG_DEBUG("showing bluetooth screen\n"); - showingNormalScreen = false; - - static FrameCallback frames[] = {drawFrameBluetooth}; - snprintf(btPIN, sizeof(btPIN), "%06u", pin); - setFrameImmediateDraw(frames); -} - void Screen::setFrameImmediateDraw(FrameCallback *drawFrames) { ui->disableAllIndicators(); @@ -1388,35 +2236,36 @@ void Screen::setFrameImmediateDraw(FrameCallback *drawFrames) setFastFramerate(); } -void Screen::handleShutdownScreen() +// Dismisses the currently displayed screen frame, if possible +// Relevant for text message, waypoint, others in future? +// Triggered with a CardKB keycombo +void Screen::dismissCurrentFrame() { - LOG_DEBUG("showing shutdown screen\n"); - showingNormalScreen = false; + uint8_t currentFrame = ui->getUiState()->currentFrame; + bool dismissed = false; - auto frame = [](OLEDDisplay *display, OLEDDisplayUiState *state, int16_t x, int16_t y) -> void { - drawFrameText(display, state, x, y, "Shutting down..."); - }; - static FrameCallback frames[] = {frame}; + if (currentFrame == framesetInfo.positions.textMessage && devicestate.has_rx_text_message) { + LOG_INFO("Dismissing Text Message\n"); + devicestate.has_rx_text_message = false; + dismissed = true; + } - setFrameImmediateDraw(frames); -} + else if (currentFrame == framesetInfo.positions.waypoint && devicestate.has_rx_waypoint) { + LOG_DEBUG("Dismissing Waypoint\n"); + devicestate.has_rx_waypoint = false; + dismissed = true; + } -void Screen::handleRebootScreen() -{ - LOG_DEBUG("showing reboot screen\n"); - showingNormalScreen = false; - - auto frame = [](OLEDDisplay *display, OLEDDisplayUiState *state, int16_t x, int16_t y) -> void { - drawFrameText(display, state, x, y, "Rebooting..."); - }; - static FrameCallback frames[] = {frame}; - setFrameImmediateDraw(frames); + // If we did make changes to dismiss, we now need to regenerate the frameset + if (dismissed) + setFrames(); } void Screen::handleStartFirmwareUpdateScreen() { LOG_DEBUG("showing firmware screen\n"); showingNormalScreen = false; + EINK_ADD_FRAMEFLAG(dispdev, DEMAND_FAST); // E-Ink: Explicitly use fast-refresh for next frame static FrameCallback frames[] = {drawFrameFirmware}; setFrameImmediateDraw(frames); @@ -1428,7 +2277,7 @@ void Screen::blink() uint8_t count = 10; dispdev->setBrightness(254); while (count > 0) { - dispdev->fillRect(0, 0, SCREEN_WIDTH, SCREEN_HEIGHT); + dispdev->fillRect(0, 0, dispdev->getWidth(), dispdev->getHeight()); dispdev->display(); delay(50); dispdev->clear(); @@ -1436,9 +2285,55 @@ void Screen::blink() delay(50); count = count - 1; } + // The dispdev->setBrightness does not work for t-deck display, it seems to run the setBrightness function in OLEDDisplay. dispdev->setBrightness(brightness); } +void Screen::increaseBrightness() +{ + brightness = ((brightness + 62) > 254) ? brightness : (brightness + 62); + +#if defined(ST7789_CS) + // run the setDisplayBrightness function. This works on t-decks + static_cast(dispdev)->setDisplayBrightness(brightness); +#endif + + /* TO DO: add little popup in center of screen saying what brightness level it is set to*/ +} + +void Screen::decreaseBrightness() +{ + brightness = (brightness < 70) ? brightness : (brightness - 62); + +#if defined(ST7789_CS) + static_cast(dispdev)->setDisplayBrightness(brightness); +#endif + + /* TO DO: add little popup in center of screen saying what brightness level it is set to*/ +} + +void Screen::setFunctionSymbal(std::string sym) +{ + if (std::find(functionSymbals.begin(), functionSymbals.end(), sym) == functionSymbals.end()) { + functionSymbals.push_back(sym); + functionSymbalString = ""; + for (auto symbol : functionSymbals) { + functionSymbalString = symbol + " " + functionSymbalString; + } + setFastFramerate(); + } +} + +void Screen::removeFunctionSymbal(std::string sym) +{ + functionSymbals.erase(std::remove(functionSymbals.begin(), functionSymbals.end(), sym), functionSymbals.end()); + functionSymbalString = ""; + for (auto symbol : functionSymbals) { + functionSymbalString = symbol + " " + functionSymbalString; + } + setFastFramerate(); +} + std::string Screen::drawTimeDelta(uint32_t days, uint32_t hours, uint32_t minutes, uint32_t seconds) { std::string uptime; @@ -1469,6 +2364,11 @@ void Screen::handlePrint(const char *text) void Screen::handleOnPress() { + // If Canned Messages is using the "Scan and Select" input, dismiss the canned message frame when user button is pressed + // Minimize impact as a courtesy, as "scan and select" may be used as default config for some boards + if (scanAndSelectInput != nullptr && scanAndSelectInput->dismissCannedMessageFrame()) + return; + // If screen was off, just wake it, otherwise advance to next frame // If we are in a transition, the press must have bounced, drop it. if (ui->getUiState()->frameState == FIXED) { @@ -1529,8 +2429,7 @@ void DebugInfo::drawFrame(OLEDDisplay *display, OLEDDisplayUiState *state, int16 char channelStr[20]; { concurrency::LockGuard guard(&lock); - auto chName = channels.getPrimaryName(); - snprintf(channelStr, sizeof(channelStr), "%s", chName); + snprintf(channelStr, sizeof(channelStr), "#%s", channels.getName(channels.getPrimaryIndex())); } // Display power status @@ -1553,6 +2452,7 @@ void DebugInfo::drawFrame(OLEDDisplay *display, OLEDDisplayUiState *state, int16 } else { drawNodes(display, x + (SCREEN_WIDTH * 0.25), y + 3, nodeStatus); } +#if HAS_GPS // Display GPS status if (config.position.gps_mode != meshtastic_Config_PositionConfig_GpsMode_ENABLED) { drawGPSpowerstat(display, x, y + 2, gpsStatus); @@ -1563,16 +2463,17 @@ void DebugInfo::drawFrame(OLEDDisplay *display, OLEDDisplayUiState *state, int16 drawGPS(display, x + (SCREEN_WIDTH * 0.63), y + 3, gpsStatus); } } - +#endif display->setColor(WHITE); // Draw the channel name display->drawString(x, y + FONT_HEIGHT_SMALL, channelStr); // Draw our hardware ID to assist with bluetooth pairing. Either prefix with Info or S&F Logo if (moduleConfig.store_forward.enabled) { #ifdef ARCH_ESP32 - if (millis() - storeForwardModule->lastHeartbeat > - (storeForwardModule->heartbeatInterval * 1200)) { // no heartbeat, overlap a bit -#if (defined(USE_EINK) || defined(ILI9341_DRIVER) || defined(ST7735_CS) || defined(ST7789_CS)) && \ + if (!Throttle::isWithinTimespanMs(storeForwardModule->lastHeartbeat, + (storeForwardModule->heartbeatInterval * 1200))) { // no heartbeat, overlap a bit +#if (defined(USE_EINK) || defined(ILI9341_DRIVER) || defined(ILI9342_DRIVER) || defined(ST7701_CS) || defined(ST7735_CS) || \ + defined(ST7789_CS) || defined(USE_ST7789) || defined(HX8357_CS) || ARCH_PORTDUINO) && \ !defined(DISPLAY_FORCE_SMALL_FONTS) display->drawFastImage(x + SCREEN_WIDTH - 14 - display->getStringWidth(ourId), y + 3 + FONT_HEIGHT_SMALL, 12, 8, imgQuestionL1); @@ -1583,7 +2484,8 @@ void DebugInfo::drawFrame(OLEDDisplay *display, OLEDDisplayUiState *state, int16 imgQuestion); #endif } else { -#if (defined(USE_EINK) || defined(ILI9341_DRIVER) || defined(ST7735_CS) || defined(ST7789_CS)) && \ +#if (defined(USE_EINK) || defined(ILI9341_DRIVER) || defined(ILI9342_DRIVER) || defined(ST7701_CS) || defined(ST7735_CS) || \ + defined(ST7789_CS) || defined(USE_ST7789) || defined(HX8357_CS)) && \ !defined(DISPLAY_FORCE_SMALL_FONTS) display->drawFastImage(x + SCREEN_WIDTH - 18 - display->getStringWidth(ourId), y + 3 + FONT_HEIGHT_SMALL, 16, 8, imgSFL1); @@ -1597,7 +2499,8 @@ void DebugInfo::drawFrame(OLEDDisplay *display, OLEDDisplayUiState *state, int16 #endif } else { // TODO: Raspberry Pi supports more than just the one screen size -#if (defined(USE_EINK) || defined(ILI9341_DRIVER) || defined(ST7735_CS) || defined(ST7789_CS) || ARCH_PORTDUINO) && \ +#if (defined(USE_EINK) || defined(ILI9341_DRIVER) || defined(ILI9342_DRIVER) || defined(ST7701_CS) || defined(ST7735_CS) || \ + defined(ST7789_CS) || defined(USE_ST7789) || defined(HX8357_CS) || ARCH_PORTDUINO) && \ !defined(DISPLAY_FORCE_SMALL_FONTS) display->drawFastImage(x + SCREEN_WIDTH - 14 - display->getStringWidth(ourId), y + 3 + FONT_HEIGHT_SMALL, 12, 8, imgInfoL1); @@ -1758,7 +2661,7 @@ void DebugInfo::drawFrameSettings(OLEDDisplay *display, OLEDDisplayUiState *stat // Show uptime as days, hours, minutes OR seconds std::string uptime = screen->drawTimeDelta(days, hours, minutes, seconds); - uint32_t rtc_sec = getValidTime(RTCQuality::RTCQualityDevice); + uint32_t rtc_sec = getValidTime(RTCQuality::RTCQualityDevice, true); // Display local timezone if (rtc_sec > 0) { long hms = rtc_sec % SEC_PER_DAY; // hms += tz.tz_dsttime * SEC_PER_HOUR; @@ -1782,6 +2685,7 @@ void DebugInfo::drawFrameSettings(OLEDDisplay *display, OLEDDisplayUiState *stat char chUtil[13]; snprintf(chUtil, sizeof(chUtil), "ChUtil %2.0f%%", airTime->channelUtilizationPercent()); display->drawString(x + SCREEN_WIDTH - display->getStringWidth(chUtil), y + FONT_HEIGHT_SMALL * 1, chUtil); +#if HAS_GPS if (config.position.gps_mode == meshtastic_Config_PositionConfig_GpsMode_ENABLED) { // Line 3 if (config.display.gps_format != @@ -1793,6 +2697,7 @@ void DebugInfo::drawFrameSettings(OLEDDisplay *display, OLEDDisplayUiState *stat } else { drawGPSpowerstat(display, x, y + FONT_HEIGHT_SMALL * 2, gpsStatus); } +#endif /* Display a heartbeat pixel that blinks every time the frame is redrawn */ #ifdef SHOW_REDRAWS if (heartbeat) @@ -1807,9 +2712,9 @@ int Screen::handleStatusUpdate(const meshtastic::Status *arg) switch (arg->getStatusType()) { case STATUS_TYPE_NODE: if (showingNormalScreen && nodeStatus->getLastNumTotal() != nodeStatus->getNumTotal()) { - setFrames(); // Regen the list of screens + setFrames(FOCUS_PRESERVE); // Regen the list of screen frames (returning to same frame, if possible) } - nodeDB.updateGUI = false; + nodeDB->updateGUI = false; break; } @@ -1819,23 +2724,33 @@ int Screen::handleStatusUpdate(const meshtastic::Status *arg) int Screen::handleTextMessage(const meshtastic_MeshPacket *packet) { if (showingNormalScreen) { - setFrames(); // Regen the list of screens (will show new text message) + // Outgoing message + if (packet->from == 0) + setFrames(FOCUS_PRESERVE); // Return to same frame (quietly hiding the rx text message frame) + + // Incoming message + else + setFrames(FOCUS_TEXTMESSAGE); // Focus on the new message } return 0; } +// Triggered by MeshModules int Screen::handleUIFrameEvent(const UIFrameEvent *event) { if (showingNormalScreen) { - if (event->frameChanged) { - setFrames(); // Regen the list of screens (will show new text message) - } else if (event->needRedraw) { + // Regenerate the frameset, potentially honoring a module's internal requestFocus() call + if (event->action == UIFrameEvent::Action::REGENERATE_FRAMESET) + setFrames(FOCUS_MODULE); + + // Regenerate the frameset, while attempting to maintain focus on the current frame + else if (event->action == UIFrameEvent::Action::REGENERATE_FRAMESET_BACKGROUND) + setFrames(FOCUS_PRESERVE); + + // Don't regenerate the frameset, just re-draw whatever is on screen ASAP + else if (event->action == UIFrameEvent::Action::REDRAW_ONLY) setFastFramerate(); - // TODO: We might also want switch to corresponding frame, - // but we don't know the exact frame number. - // ui->switchToFrame(0); - } } return 0; @@ -1843,18 +2758,62 @@ int Screen::handleUIFrameEvent(const UIFrameEvent *event) int Screen::handleInputEvent(const InputEvent *event) { - if (showingNormalScreen && moduleFrames.size() == 0) { - // LOG_DEBUG("Screen::handleInputEvent from %s\n", event->source); - if (event->inputEvent == static_cast(meshtastic_ModuleConfig_CannedMessageConfig_InputEventChar_LEFT)) { - showPrevFrame(); - } else if (event->inputEvent == static_cast(meshtastic_ModuleConfig_CannedMessageConfig_InputEventChar_RIGHT)) { - showNextFrame(); + +#ifdef T_WATCH_S3 + // For the T-Watch, intercept touches to the 'toggle digital/analog watch face' button + uint8_t watchFaceFrame = error_code ? 1 : 0; + + if (this->ui->getUiState()->currentFrame == watchFaceFrame && event->touchX >= 204 && event->touchX <= 240 && + event->touchY >= 204 && event->touchY <= 240) { + screen->digitalWatchFace = !screen->digitalWatchFace; + + setFrames(); + + return 0; + } +#endif + + // Use left or right input from a keyboard to move between frames, + // so long as a mesh module isn't using these events for some other purpose + if (showingNormalScreen) { + + // Ask any MeshModules if they're handling keyboard input right now + bool inputIntercepted = false; + for (MeshModule *module : moduleFrames) { + if (module->interceptingKeyboardInput()) + inputIntercepted = true; + } + + // If no modules are using the input, move between frames + if (!inputIntercepted) { + if (event->inputEvent == static_cast(meshtastic_ModuleConfig_CannedMessageConfig_InputEventChar_LEFT)) + showPrevFrame(); + else if (event->inputEvent == static_cast(meshtastic_ModuleConfig_CannedMessageConfig_InputEventChar_RIGHT)) + showNextFrame(); } } return 0; } +int Screen::handleAdminMessage(const meshtastic_AdminMessage *arg) +{ + // Note: only selected admin messages notify this observer + // If you wish to handle a new type of message, you should modify AdminModule.cpp first + + switch (arg->which_payload_variant) { + // Node removed manually (i.e. via app) + case meshtastic_AdminMessage_remove_by_nodenum_tag: + setFrames(FOCUS_PRESERVE); + break; + + // Default no-op, in case the admin message observable gets used by other classes in future + default: + break; + } + return 0; +} + } // namespace graphics #else graphics::Screen::Screen(ScanI2C::DeviceAddress, meshtastic_Config_DisplayConfig_OledType, OLEDDISPLAY_GEOMETRY) {} diff --git a/src/graphics/Screen.h b/src/graphics/Screen.h index baee4b140..b2e6e905b 100644 --- a/src/graphics/Screen.h +++ b/src/graphics/Screen.h @@ -20,12 +20,14 @@ class Screen void setOn(bool) {} void print(const char *) {} void doDeepSleep() {} - void forceDisplay() {} - void startBluetoothPinScreen(uint32_t pin) {} - void stopBluetoothPinScreen() {} - void startRebootScreen() {} - void startShutdownScreen() {} + void forceDisplay(bool forceUiUpdate = false) {} void startFirmwareUpdateScreen() {} + void increaseBrightness() {} + void decreaseBrightness() {} + void setFunctionSymbal(std::string) {} + void removeFunctionSymbal(std::string) {} + void startAlert(const char *) {} + void endAlert() {} }; } // namespace graphics #else @@ -34,6 +36,8 @@ class Screen #include #include "../configuration.h" +#include "gps/GeoCoord.h" +#include "graphics/ScreenFonts.h" #ifdef USE_ST7567 #include @@ -41,12 +45,16 @@ class Screen #include #elif defined(USE_SSD1306) #include +#elif defined(USE_ST7789) +#include #else // the SH1106/SSD1306 variant is auto-detected #include #endif #include "EInkDisplay2.h" +#include "EInkDynamicDisplay.h" +#include "PointStruct.h" #include "TFTDisplay.h" #include "TypedQueue.h" #include "commands.h" @@ -72,6 +80,54 @@ class Screen #define MILES_TO_FEET 5280 #endif +// Intuitive colors. E-Ink display is inverted from OLED(?) +#define EINK_BLACK OLEDDISPLAY_COLOR::WHITE +#define EINK_WHITE OLEDDISPLAY_COLOR::BLACK + +// Base segment dimensions for T-Watch segmented display +#define SEGMENT_WIDTH 16 +#define SEGMENT_HEIGHT 4 + +/// Convert an integer GPS coords to a floating point +#define DegD(i) (i * 1e-7) + +namespace +{ +/// A basic 2D point class for drawing +class Point +{ + public: + float x, y; + + Point(float _x, float _y) : x(_x), y(_y) {} + + /// Apply a rotation around zero (standard rotation matrix math) + void rotate(float radian) + { + float cos = cosf(radian), sin = sinf(radian); + float rx = x * cos + y * sin, ry = -x * sin + y * cos; + + x = rx; + y = ry; + } + + void translate(int16_t dx, int dy) + { + x += dx; + y += dy; + } + + void scale(float f) + { + // We use -f here to counter the flip that happens + // on the y axis when drawing and rotating on screen + x *= f; + y *= -f; + } +}; + +} // namespace + namespace graphics { @@ -117,13 +173,17 @@ class Screen : public concurrency::OSThread CallbackObserver textMessageObserver = CallbackObserver(this, &Screen::handleTextMessage); CallbackObserver uiFrameEventObserver = - CallbackObserver(this, &Screen::handleUIFrameEvent); + CallbackObserver(this, &Screen::handleUIFrameEvent); // Sent by Mesh Modules CallbackObserver inputObserver = CallbackObserver(this, &Screen::handleInputEvent); + CallbackObserver adminMessageObserver = + CallbackObserver(this, &Screen::handleAdminMessage); public: explicit Screen(ScanI2C::DeviceAddress, meshtastic_Config_DisplayConfig_OledType, OLEDDISPLAY_GEOMETRY); + ~Screen(); + Screen(const Screen &) = delete; Screen &operator=(const Screen &) = delete; @@ -136,14 +196,14 @@ class Screen : public concurrency::OSThread // Not thread safe - must be called before any other methods are called. void setup(); - /// Turns the screen on/off. - void setOn(bool on) + /// Turns the screen on/off. Optionally, pass a custom screensaver frame for E-Ink + void setOn(bool on, FrameCallback einkScreensaver = NULL) { if (!on) - handleSetOn( - false); // We handle off commands immediately, because they might be called because the CPU is shutting down + // We handle off commands immediately, because they might be called because the CPU is shutting down + handleSetOn(false, einkScreensaver); else - enqueueCmd(ScreenCmd{.cmd = on ? Cmd::SET_ON : Cmd::SET_OFF}); + enqueueCmd(ScreenCmd{.cmd = Cmd::SET_ON}); } /** @@ -154,23 +214,49 @@ class Screen : public concurrency::OSThread void blink(); + void drawFrameText(OLEDDisplay *, OLEDDisplayUiState *, int16_t, int16_t, const char *); + + void getTimeAgoStr(uint32_t agoSecs, char *timeStr, uint8_t maxLength); + + // Draw north + void drawCompassNorth(OLEDDisplay *display, int16_t compassX, int16_t compassY, float myHeading); + + static uint16_t getCompassDiam(uint32_t displayWidth, uint32_t displayHeight); + + float estimatedHeading(double lat, double lon); + + void drawNodeHeading(OLEDDisplay *display, int16_t compassX, int16_t compassY, uint16_t compassDiam, float headingRadian); + + void drawColumns(OLEDDisplay *display, int16_t x, int16_t y, const char **fields); + /// Handle button press, trackball or swipe action) void onPress() { enqueueCmd(ScreenCmd{.cmd = Cmd::ON_PRESS}); } void showPrevFrame() { enqueueCmd(ScreenCmd{.cmd = Cmd::SHOW_PREV_FRAME}); } void showNextFrame() { enqueueCmd(ScreenCmd{.cmd = Cmd::SHOW_NEXT_FRAME}); } - // Implementation to Adjust Brightness - uint8_t brightness = BRIGHTNESS_DEFAULT; + // generic alert start + void startAlert(FrameCallback _alertFrame) + { + alertFrame = _alertFrame; + ScreenCmd cmd; + cmd.cmd = Cmd::START_ALERT_FRAME; + enqueueCmd(cmd); + } - /// Starts showing the Bluetooth PIN screen. - // - // Switches over to a static frame showing the Bluetooth pairing screen - // with the PIN. - void startBluetoothPinScreen(uint32_t pin) + void startAlert(const char *_alertMessage) + { + startAlert([_alertMessage](OLEDDisplay *display, OLEDDisplayUiState *state, int16_t x, int16_t y) -> void { + uint16_t x_offset = display->width() / 2; + display->setTextAlignment(TEXT_ALIGN_CENTER); + display->setFont(FONT_MEDIUM); + display->drawString(x_offset + x, 26 + y, _alertMessage); + }); + } + + void endAlert() { ScreenCmd cmd; - cmd.cmd = Cmd::START_BLUETOOTH_PIN_SCREEN; - cmd.bluetooth_pin = pin; + cmd.cmd = Cmd::STOP_ALERT_FRAME; enqueueCmd(cmd); } @@ -181,22 +267,23 @@ class Screen : public concurrency::OSThread enqueueCmd(cmd); } - void startShutdownScreen() + // Function to allow the AccelerometerThread to set the heading if a sensor provides it + // Mutex needed? + void setHeading(long _heading) { - ScreenCmd cmd; - cmd.cmd = Cmd::START_SHUTDOWN_SCREEN; - enqueueCmd(cmd); + hasCompass = true; + compassHeading = _heading; } - void startRebootScreen() - { - ScreenCmd cmd; - cmd.cmd = Cmd::START_REBOOT_SCREEN; - enqueueCmd(cmd); - } + bool hasHeading() { return hasCompass; } - /// Stops showing the bluetooth PIN screen. - void stopBluetoothPinScreen() { enqueueCmd(ScreenCmd{.cmd = Cmd::STOP_BLUETOOTH_PIN_SCREEN}); } + long getHeading() { return compassHeading; } + // functions for display brightness + void increaseBrightness(); + void decreaseBrightness(); + + void setFunctionSymbal(std::string sym); + void removeFunctionSymbal(std::string sym); /// Stops showing the boot screen. void stopBootScreen() { enqueueCmd(ScreenCmd{.cmd = Cmd::STOP_BOOT_SCREEN}); } @@ -222,7 +309,7 @@ class Screen : public concurrency::OSThread static char customFontTableLookup(const uint8_t ch) { // UTF-8 to font table index converter - // Code form http://playground.arduino.cc/Main/Utf8ascii + // Code from http://playground.arduino.cc/Main/Utf8ascii static uint8_t LASTCHAR; static bool SKIPREST; // Only display a single unconvertable-character symbol per sequence of unconvertable characters @@ -235,11 +322,57 @@ class Screen : public concurrency::OSThread uint8_t last = LASTCHAR; // get last char LASTCHAR = ch; - switch (last) { // conversion depending on first UTF8-character + switch (last) { case 0xC2: { SKIPREST = false; return (uint8_t)ch; } + } + + // We want to strip out prefix chars for two-byte char formats + if (ch == 0xC2) + return (uint8_t)0; + +#if defined(OLED_PL) + + switch (last) { + case 0xC3: { + + if (ch == 147) + return (uint8_t)(ch); // Ó + else if (ch == 179) + return (uint8_t)(148); // ó + else + return (uint8_t)(ch | 0xC0); + break; + } + + case 0xC4: { + SKIPREST = false; + return (uint8_t)(ch); + } + + case 0xC5: { + SKIPREST = false; + if (ch == 132) + return (uint8_t)(136); // ń + else if (ch == 186) + return (uint8_t)(137); // ź + else + return (uint8_t)(ch); + break; + } + } + + // We want to strip out prefix chars for two-byte char formats + if (ch == 0xC2 || ch == 0xC3 || ch == 0xC4 || ch == 0xC5) + return (uint8_t)0; + +#endif + +#if defined(OLED_UA) || defined(OLED_RU) + + switch (last) { case 0xC3: { SKIPREST = false; return (uint8_t)(ch | 0xC0); @@ -289,6 +422,8 @@ class Screen : public concurrency::OSThread if (ch == 0xC2 || ch == 0xC3 || ch == 0x82 || ch == 0xD0 || ch == 0xD1) return (uint8_t)0; +#endif + // If we already returned an unconvertable-character symbol for this unconvertable-character sequence, return NULs for the // rest of it if (SKIPREST) @@ -309,15 +444,24 @@ class Screen : public concurrency::OSThread int handleTextMessage(const meshtastic_MeshPacket *arg); int handleUIFrameEvent(const UIFrameEvent *arg); int handleInputEvent(const InputEvent *arg); + int handleAdminMessage(const meshtastic_AdminMessage *arg); /// Used to force (super slow) eink displays to draw critical frames - void forceDisplay(); + void forceDisplay(bool forceUiUpdate = false); /// Draws our SSL cert screen during boot (called from WebServer) void setSSLFrames(); void setWelcomeFrames(); + // Dismiss the currently focussed frame, if possible (e.g. text message, waypoint) + void dismissCurrentFrame(); + +#ifdef USE_EINK + /// Draw an image to remain on E-Ink display after screen off + void setScreensaverFrames(FrameCallback einkScreensaver = NULL); +#endif + protected: /// Updates the UI. // @@ -326,7 +470,13 @@ class Screen : public concurrency::OSThread bool isAUTOOled = false; + // Screen dimensions (for convenience) + // Defined during Screen::setup + uint16_t displayWidth = 0; + uint16_t displayHeight = 0; + private: + FrameCallback alertFrames[1]; struct ScreenCmd { Cmd cmd; union { @@ -339,7 +489,7 @@ class Screen : public concurrency::OSThread bool enqueueCmd(const ScreenCmd &cmd) { if (!useDisplay) - return true; // claim success if our display is not in use + return false; // not enqueued if our display is not in use else { bool success = cmdQueue.enqueue(cmd, 0); enabled = true; // handle ASAP (we are the registered reader for cmdQueue, but might have been disabled) @@ -348,17 +498,43 @@ class Screen : public concurrency::OSThread } // Implementations of various commands, called from doTask(). - void handleSetOn(bool on); + void handleSetOn(bool on, FrameCallback einkScreensaver = NULL); void handleOnPress(); void handleShowNextFrame(); void handleShowPrevFrame(); - void handleStartBluetoothPinScreen(uint32_t pin); void handlePrint(const char *text); void handleStartFirmwareUpdateScreen(); - void handleShutdownScreen(); - void handleRebootScreen(); - /// Rebuilds our list of frames (screens) to default ones. - void setFrames(); + + // Info collected by setFrames method. + // Index location of specific frames. + // - Used to apply the FrameFocus parameter of setFrames + // - Used to dismiss the currently shown frame (txt; waypoint) by CardKB combo + struct FramesetInfo { + struct FramePositions { + uint8_t fault = 0; + uint8_t textMessage = 0; + uint8_t waypoint = 0; + uint8_t focusedModule = 0; + uint8_t log = 0; + uint8_t settings = 0; + uint8_t wifi = 0; + } positions; + + uint8_t frameCount = 0; + } framesetInfo; + + // Which frame we want to be displayed, after we regen the frameset by calling setFrames + enum FrameFocus : uint8_t { + FOCUS_DEFAULT, // No specific frame + FOCUS_PRESERVE, // Return to the previous frame + FOCUS_FAULT, + FOCUS_TEXTMESSAGE, + FOCUS_MODULE, // Note: target module should call requestFocus(), otherwise no info about which module to focus + }; + + // Regenerate the normal set of frames, focusing a specific frame if requested + // Call when a frame should be added / removed, or custom frames should be cleared + void setFrames(FrameFocus focus = FOCUS_DEFAULT); /// Try to start drawing ASAP void setFastFramerate(); @@ -373,6 +549,30 @@ class Screen : public concurrency::OSThread static void drawDebugInfoWiFiTrampoline(OLEDDisplay *display, OLEDDisplayUiState *state, int16_t x, int16_t y); +#ifdef T_WATCH_S3 + static void drawAnalogClockFrame(OLEDDisplay *display, OLEDDisplayUiState *state, int16_t x, int16_t y); + + static void drawDigitalClockFrame(OLEDDisplay *display, OLEDDisplayUiState *state, int16_t x, int16_t y); + + static void drawSegmentedDisplayCharacter(OLEDDisplay *display, int x, int y, uint8_t number, float scale = 1); + + static void drawHorizontalSegment(OLEDDisplay *display, int x, int y, int width, int height); + + static void drawVerticalSegment(OLEDDisplay *display, int x, int y, int width, int height); + + static void drawSegmentedDisplayColon(OLEDDisplay *display, int x, int y, float scale = 1); + + static void drawWatchFaceToggleButton(OLEDDisplay *display, int16_t x, int16_t y, bool digitalMode = true, float scale = 1); + + static void drawBluetoothConnectedIcon(OLEDDisplay *display, int16_t x, int16_t y); + + // Whether we are showing the digital watch face or the analog one + bool digitalWatchFace = true; +#endif + + /// callback for current alert frame + FrameCallback alertFrame; + /// Queue of commands to execute in doTask. TypedQueue cmdQueue; /// Whether we are using a display @@ -383,6 +583,11 @@ class Screen : public concurrency::OSThread // Bluetooth PIN screen) bool showingNormalScreen = false; + // Implementation to Adjust Brightness + uint8_t brightness = BRIGHTNESS_DEFAULT; // H = 254, MH = 192, ML = 130 L = 103 + + bool hasCompass = false; + float compassHeading; /// Holds state for debug information DebugInfo debugInfo; @@ -394,4 +599,5 @@ class Screen : public concurrency::OSThread }; } // namespace graphics + #endif \ No newline at end of file diff --git a/src/graphics/ScreenFonts.h b/src/graphics/ScreenFonts.h new file mode 100644 index 000000000..c9ce961fa --- /dev/null +++ b/src/graphics/ScreenFonts.h @@ -0,0 +1,44 @@ +#pragma once + +#ifdef OLED_PL +#include "graphics/fonts/OLEDDisplayFontsPL.h" +#endif + +#ifdef OLED_RU +#include "graphics/fonts/OLEDDisplayFontsRU.h" +#endif + +#ifdef OLED_UA +#include "graphics/fonts/OLEDDisplayFontsUA.h" +#endif + +#if (defined(USE_EINK) || defined(ILI9341_DRIVER) || defined(ILI9342_DRIVER) || defined(ST7701_CS) || defined(ST7735_CS) || \ + defined(ST7789_CS) || defined(USE_ST7789) || defined(HX8357_CS)) && \ + !defined(DISPLAY_FORCE_SMALL_FONTS) +// The screen is bigger so use bigger fonts +#define FONT_SMALL ArialMT_Plain_16 // Height: 19 +#define FONT_MEDIUM ArialMT_Plain_24 // Height: 28 +#define FONT_LARGE ArialMT_Plain_24 // Height: 28 +#else +#ifdef OLED_PL +#define FONT_SMALL ArialMT_Plain_10_PL +#else +#ifdef OLED_RU +#define FONT_SMALL ArialMT_Plain_10_RU +#else +#ifdef OLED_UA +#define FONT_SMALL ArialMT_Plain_10_UA +#else +#define FONT_SMALL ArialMT_Plain_10 // Height: 13 +#endif +#endif +#endif +#define FONT_MEDIUM ArialMT_Plain_16 // Height: 19 +#define FONT_LARGE ArialMT_Plain_24 // Height: 28 +#endif + +#define _fontHeight(font) ((font)[1] + 1) // height is position 1 + +#define FONT_HEIGHT_SMALL _fontHeight(FONT_SMALL) +#define FONT_HEIGHT_MEDIUM _fontHeight(FONT_MEDIUM) +#define FONT_HEIGHT_LARGE _fontHeight(FONT_LARGE) diff --git a/src/graphics/TFTDisplay.cpp b/src/graphics/TFTDisplay.cpp index 9475e0296..0c32a7c32 100644 --- a/src/graphics/TFTDisplay.cpp +++ b/src/graphics/TFTDisplay.cpp @@ -8,6 +8,12 @@ #define TFT_BACKLIGHT_ON HIGH #endif +#ifdef GPIO_EXTENDER +#include +#include +extern SX1509 gpioExtender; +#endif + #ifndef TFT_MESH #define TFT_MESH COLOR565(0x67, 0xEA, 0x94) #endif @@ -15,10 +21,6 @@ #if defined(ST7735S) #include // Graphics and font library for ST7735 driver chip -#if defined(ST7735_BACKLIGHT_EN) && !defined(TFT_BL) -#define TFT_BL ST7735_BACKLIGHT_EN -#endif - #ifndef TFT_INVERT #define TFT_INVERT true #endif @@ -85,24 +87,20 @@ class LGFX : public lgfx::LGFX_Device _panel_instance.config(cfg); } +#ifdef TFT_BL // Set the backlight control { auto cfg = _light_instance.config(); // Gets a structure for backlight settings. -#ifdef ST7735_BL_V03 - cfg.pin_bl = ST7735_BL_V03; -#elif defined(ST7735_BL_V05) - cfg.pin_bl = ST7735_BL_V05; -#else - cfg.pin_bl = ST7735_BL; // Pin number to which the backlight is connected -#endif - cfg.invert = true; // true to invert the brightness of the backlight + cfg.pin_bl = TFT_BL; // Pin number to which the backlight is connected + cfg.invert = true; // true to invert the brightness of the backlight // cfg.freq = 44100; // PWM frequency of backlight // cfg.pwm_channel = 1; // PWM channel number to use _light_instance.config(cfg); _panel_instance.setLight(&_light_instance); // Set the backlight on the panel. } +#endif setPanel(&_panel_instance); } @@ -111,16 +109,20 @@ class LGFX : public lgfx::LGFX_Device static LGFX *tft = nullptr; #elif defined(RAK14014) +#include #include TFT_eSPI *tft = nullptr; +FT6336U ft6336u; + +static uint8_t _rak14014_touch_int = false; // TP interrupt generation flag. +static void rak14014_tpIntHandle(void) +{ + _rak14014_touch_int = true; +} #elif defined(ST7789_CS) #include // Graphics and font library for ST7735 driver chip -#if defined(ST7789_BACKLIGHT_EN) && !defined(TFT_BL) -#define TFT_BL ST7789_BACKLIGHT_EN -#endif - class LGFX : public lgfx::LGFX_Device { lgfx::Panel_ST7789 _panel_instance; @@ -190,6 +192,7 @@ class LGFX : public lgfx::LGFX_Device _panel_instance.config(cfg); } +#ifdef ST7789_BL // Set the backlight control. (delete if not necessary) { auto cfg = _light_instance.config(); // Gets a structure for backlight settings. @@ -201,6 +204,7 @@ class LGFX : public lgfx::LGFX_Device _light_instance.config(cfg); _panel_instance.setLight(&_light_instance); // Set the backlight on the panel. } +#endif #if HAS_TOUCHSCREEN // Configure settings for touch screen control. @@ -240,9 +244,9 @@ class LGFX : public lgfx::LGFX_Device static LGFX *tft = nullptr; -#elif defined(ILI9341_DRIVER) +#elif defined(ILI9341_DRIVER) || defined(ILI9342_DRIVER) -#include // Graphics and font library for ILI9341 driver chip +#include // Graphics and font library for ILI9341/ILI9342 driver chip #if defined(ILI9341_BACKLIGHT_EN) && !defined(TFT_BL) #define TFT_BL ILI9341_BACKLIGHT_EN @@ -250,7 +254,11 @@ static LGFX *tft = nullptr; class LGFX : public lgfx::LGFX_Device { +#if defined(ILI9341_DRIVER) lgfx::Panel_ILI9341 _panel_instance; +#elif defined(ILI9342_DRIVER) + lgfx::Panel_ILI9342 _panel_instance; +#endif lgfx::Bus_SPI _bus_instance; lgfx::Light_PWM _light_instance; @@ -261,7 +269,11 @@ class LGFX : public lgfx::LGFX_Device auto cfg = _bus_instance.config(); // configure SPI +#if defined(ILI9341_DRIVER) cfg.spi_host = ILI9341_SPI_HOST; // ESP32-S2,S3,C3 : SPI2_HOST or SPI3_HOST / ESP32 : VSPI_HOST or HSPI_HOST +#elif defined(ILI9342_DRIVER) + cfg.spi_host = ILI9342_SPI_HOST; // ESP32-S2,S3,C3 : SPI2_HOST or SPI3_HOST / ESP32 : VSPI_HOST or HSPI_HOST +#endif cfg.spi_mode = 0; cfg.freq_write = SPI_FREQUENCY; // SPI clock for transmission (up to 80MHz, rounded to the value obtained by dividing // 80MHz by an integer) @@ -310,6 +322,7 @@ class LGFX : public lgfx::LGFX_Device _panel_instance.config(cfg); } +#ifdef TFT_BL // Set the backlight control { auto cfg = _light_instance.config(); // Gets a structure for backlight settings. @@ -322,6 +335,7 @@ class LGFX : public lgfx::LGFX_Device _light_instance.config(cfg); _panel_instance.setLight(&_light_instance); // Set the backlight on the panel. } +#endif setPanel(&_panel_instance); } @@ -330,10 +344,10 @@ class LGFX : public lgfx::LGFX_Device static LGFX *tft = nullptr; #elif defined(ST7735_CS) -#include // Graphics and font library for ILI9341 driver chip +#include // Graphics and font library for ILI9342 driver chip static TFT_eSPI *tft = nullptr; // Invoke library, pins defined in User_Setup.h -#elif ARCH_PORTDUINO +#elif ARCH_PORTDUINO && HAS_SCREEN != 0 #include // Graphics and font library for ST7735 driver chip class LGFX : public lgfx::LGFX_Device @@ -354,8 +368,11 @@ class LGFX : public lgfx::LGFX_Device _panel_instance = new lgfx::Panel_ST7735S; else if (settingsMap[displayPanel] == ili9341) _panel_instance = new lgfx::Panel_ILI9341; + else if (settingsMap[displayPanel] == ili9342) + _panel_instance = new lgfx::Panel_ILI9342; auto buscfg = _bus_instance.config(); buscfg.spi_mode = 0; + buscfg.spi_host = settingsMap[displayspidev]; buscfg.pin_dc = settingsMap[displayDC]; // Set SPI DC pin number (-1 = disable) @@ -381,6 +398,8 @@ class LGFX : public lgfx::LGFX_Device _touch_instance = new lgfx::Touch_XPT2046; } else if (settingsMap[touchscreenModule] == stmpe610) { _touch_instance = new lgfx::Touch_STMPE610; + } else if (settingsMap[touchscreenModule] == ft5x06) { + _touch_instance = new lgfx::Touch_FT5x06; } auto touch_cfg = _touch_instance->config(); @@ -392,6 +411,11 @@ class LGFX : public lgfx::LGFX_Device touch_cfg.pin_int = settingsMap[touchscreenIRQ]; touch_cfg.bus_shared = true; touch_cfg.offset_rotation = 1; + if (settingsMap[touchscreenI2CAddr] != -1) { + touch_cfg.i2c_addr = settingsMap[touchscreenI2CAddr]; + } else { + touch_cfg.spi_host = settingsMap[touchscreenspidev]; + } _touch_instance->config(touch_cfg); _panel_instance->setTouch(_touch_instance); @@ -402,16 +426,239 @@ class LGFX : public lgfx::LGFX_Device }; static LGFX *tft = nullptr; + +#elif defined(HX8357_CS) +#include // Graphics and font library for HX8357 driver chip + +class LGFX : public lgfx::LGFX_Device +{ + lgfx::Panel_HX8357D _panel_instance; + lgfx::Bus_SPI _bus_instance; +#if defined(USE_XPT2046) + lgfx::Touch_XPT2046 _touch_instance; #endif -#if defined(ST7735_CS) || defined(ST7789_CS) || defined(ILI9341_DRIVER) || defined(RAK14014) || ARCH_PORTDUINO + public: + LGFX(void) + { + // Panel_HX8357D + { + // configure SPI + auto cfg = _bus_instance.config(); + + cfg.spi_host = HX8357_SPI_HOST; + cfg.spi_mode = 0; + cfg.freq_write = SPI_FREQUENCY; // SPI clock for transmission (up to 80MHz, rounded to the value obtained by dividing + // 80MHz by an integer) + cfg.freq_read = SPI_READ_FREQUENCY; // SPI clock when receiving + cfg.spi_3wire = false; // Set to true if reception is done on the MOSI pin + cfg.use_lock = true; // Set to true to use transaction locking + cfg.dma_channel = SPI_DMA_CH_AUTO; // SPI_DMA_CH_AUTO; // Set DMA channel to use (0=not use DMA / 1=1ch / 2=ch / + // SPI_DMA_CH_AUTO=auto setting) + cfg.pin_sclk = HX8357_SCK; // Set SPI SCLK pin number + cfg.pin_mosi = HX8357_MOSI; // Set SPI MOSI pin number + cfg.pin_miso = HX8357_MISO; // Set SPI MISO pin number (-1 = disable) + cfg.pin_dc = HX8357_RS; // Set SPI DC pin number (-1 = disable) + + _bus_instance.config(cfg); // applies the set value to the bus. + _panel_instance.setBus(&_bus_instance); // set the bus on the panel. + } + { + // Set the display panel control. + auto cfg = _panel_instance.config(); // Gets a structure for display panel settings. + + cfg.pin_cs = HX8357_CS; // Pin number where CS is connected (-1 = disable) + cfg.pin_rst = HX8357_RESET; // Pin number where RST is connected (-1 = disable) + cfg.pin_busy = HX8357_BUSY; // Pin number where BUSY is connected (-1 = disable) + + cfg.panel_width = TFT_WIDTH; // actual displayable width + cfg.panel_height = TFT_HEIGHT; // actual displayable height + cfg.offset_x = TFT_OFFSET_X; // Panel offset amount in X direction + cfg.offset_y = TFT_OFFSET_Y; // Panel offset amount in Y direction + cfg.offset_rotation = TFT_OFFSET_ROTATION; // Rotation direction value offset 0~7 (4~7 is upside down) + cfg.dummy_read_pixel = 8; // Number of bits for dummy read before pixel readout + cfg.dummy_read_bits = 1; // Number of bits for dummy read before non-pixel data read + cfg.readable = true; // Set to true if data can be read + cfg.invert = TFT_INVERT; // Set to true if the light/darkness of the panel is reversed + cfg.rgb_order = false; // Set to true if the panel's red and blue are swapped + cfg.dlen_16bit = false; + cfg.bus_shared = true; // If the bus is shared with the SD card, set to true (bus control with drawJpgFile etc.) + + _panel_instance.config(cfg); + } +#if defined(USE_XPT2046) + { + // Configure settings for touch control. + auto touch_cfg = _touch_instance.config(); + + touch_cfg.pin_cs = TOUCH_CS; + touch_cfg.x_min = 0; + touch_cfg.x_max = TFT_HEIGHT - 1; + touch_cfg.y_min = 0; + touch_cfg.y_max = TFT_WIDTH - 1; + touch_cfg.pin_int = -1; + touch_cfg.bus_shared = true; + touch_cfg.offset_rotation = 1; + + _touch_instance.config(touch_cfg); + _panel_instance.setTouch(&_touch_instance); + } +#endif + setPanel(&_panel_instance); + } +}; + +static LGFX *tft = nullptr; + +#elif defined(ST7701_CS) +#include // Graphics and font library for ST7701 driver chip +#include +#include + +class LGFX : public lgfx::LGFX_Device +{ + lgfx::Panel_ST7701 _panel_instance; + lgfx::Bus_RGB _bus_instance; + lgfx::Light_PWM _light_instance; + lgfx::Touch_FT5x06 _touch_instance; + + public: + LGFX(void) + { + { + auto cfg = _panel_instance.config(); + cfg.memory_width = 800; + cfg.memory_height = 480; + cfg.panel_width = TFT_WIDTH; + cfg.panel_height = TFT_HEIGHT; + cfg.offset_x = TFT_OFFSET_X; + cfg.offset_y = TFT_OFFSET_Y; + _panel_instance.config(cfg); + } + + { + auto cfg = _panel_instance.config_detail(); + cfg.pin_cs = ST7701_CS; + cfg.pin_sclk = ST7701_SCK; + cfg.pin_mosi = ST7701_SDA; + // cfg.use_psram = 1; + _panel_instance.config_detail(cfg); + } + + { + auto cfg = _bus_instance.config(); + cfg.panel = &_panel_instance; +#ifdef SENSECAP_INDICATOR + cfg.pin_d0 = GPIO_NUM_15; // B0 + cfg.pin_d1 = GPIO_NUM_14; // B1 + cfg.pin_d2 = GPIO_NUM_13; // B2 + cfg.pin_d3 = GPIO_NUM_12; // B3 + cfg.pin_d4 = GPIO_NUM_11; // B4 + + cfg.pin_d5 = GPIO_NUM_10; // G0 + cfg.pin_d6 = GPIO_NUM_9; // G1 + cfg.pin_d7 = GPIO_NUM_8; // G2 + cfg.pin_d8 = GPIO_NUM_7; // G3 + cfg.pin_d9 = GPIO_NUM_6; // G4 + cfg.pin_d10 = GPIO_NUM_5; // G5 + + cfg.pin_d11 = GPIO_NUM_4; // R0 + cfg.pin_d12 = GPIO_NUM_3; // R1 + cfg.pin_d13 = GPIO_NUM_2; // R2 + cfg.pin_d14 = GPIO_NUM_1; // R3 + cfg.pin_d15 = GPIO_NUM_0; // R4 + + cfg.pin_henable = GPIO_NUM_18; + cfg.pin_vsync = GPIO_NUM_17; + cfg.pin_hsync = GPIO_NUM_16; + cfg.pin_pclk = GPIO_NUM_21; + cfg.freq_write = 12000000; + + cfg.hsync_polarity = 0; + cfg.hsync_front_porch = 10; + cfg.hsync_pulse_width = 8; + cfg.hsync_back_porch = 50; + + cfg.vsync_polarity = 0; + cfg.vsync_front_porch = 10; + cfg.vsync_pulse_width = 8; + cfg.vsync_back_porch = 20; + + cfg.pclk_active_neg = 0; + cfg.de_idle_high = 1; + cfg.pclk_idle_high = 0; +#endif + _bus_instance.config(cfg); + } + _panel_instance.setBus(&_bus_instance); + + { + auto cfg = _light_instance.config(); + cfg.pin_bl = ST7701_BL; + _light_instance.config(cfg); + } + _panel_instance.light(&_light_instance); + + { + auto cfg = _touch_instance.config(); + cfg.pin_cs = -1; + cfg.x_min = 0; + cfg.x_max = 479; + cfg.y_min = 0; + cfg.y_max = 479; + cfg.pin_int = -1; // don't use SCREEN_TOUCH_INT; + cfg.pin_rst = SCREEN_TOUCH_RST; + cfg.bus_shared = true; + cfg.offset_rotation = TFT_OFFSET_ROTATION; + + cfg.i2c_port = TOUCH_I2C_PORT; + cfg.i2c_addr = TOUCH_SLAVE_ADDRESS; + cfg.pin_sda = I2C_SDA; + cfg.pin_scl = I2C_SCL; + cfg.freq = 400000; + _touch_instance.config(cfg); + _panel_instance.setTouch(&_touch_instance); + } + + setPanel(&_panel_instance); + } +}; + +static LGFX *tft = nullptr; + +#endif + +#if defined(ST7701_CS) || defined(ST7735_CS) || defined(ST7789_CS) || defined(ILI9341_DRIVER) || defined(ILI9342_DRIVER) || \ + defined(RAK14014) || defined(HX8357_CS) || (ARCH_PORTDUINO && HAS_SCREEN != 0) #include "SPILock.h" #include "TFTDisplay.h" #include +#ifdef UNPHONE +#include "unPhone.h" +extern unPhone unphone; +#endif + +GpioPin *TFTDisplay::backlightEnable = NULL; + TFTDisplay::TFTDisplay(uint8_t address, int sda, int scl, OLEDDISPLAY_GEOMETRY geometry, HW_I2C i2cBus) { LOG_DEBUG("TFTDisplay!\n"); + +#ifdef TFT_BL + GpioPin *p = new GpioHwPin(TFT_BL); + + if (!TFT_BACKLIGHT_ON) { // Need to invert the pin before hardware + auto virtPin = new GpioVirtPin(); + new GpioNotTransformer( + virtPin, p); // We just leave this created object on the heap so it can stay watching virtPin and driving en_gpio + p = virtPin; + } +#else + GpioPin *p = new GpioVirtPin(); // Just simulate a pin +#endif + backlightEnable = p; + #if ARCH_PORTDUINO if (settingsMap[displayRotate]) { setGeometry(GEOMETRY_RAWMODE, settingsMap[configNames::displayHeight], settingsMap[configNames::displayWidth]); @@ -465,54 +712,47 @@ void TFTDisplay::sendCommand(uint8_t com) // handle display on/off directly switch (com) { case DISPLAYON: { + // LOG_DEBUG("Display on\n"); + backlightEnable->set(true); #if ARCH_PORTDUINO display(true); if (settingsMap[displayBacklight] > 0) digitalWrite(settingsMap[displayBacklight], TFT_BACKLIGHT_ON); -#elif defined(ST7735_BL_V03) - digitalWrite(ST7735_BL_V03, TFT_BACKLIGHT_ON); -#elif defined(ST7735_BL_V05) - pinMode(ST7735_BL_V05, OUTPUT); - digitalWrite(ST7735_BL_V05, TFT_BACKLIGHT_ON); -#endif -#if defined(TFT_BL) && defined(TFT_BACKLIGHT_ON) - digitalWrite(TFT_BL, TFT_BACKLIGHT_ON); -#endif - -#ifdef VTFT_CTRL_V03 - digitalWrite(VTFT_CTRL_V03, LOW); +#elif !defined(RAK14014) && !defined(M5STACK) && !defined(UNPHONE) + tft->wakeup(); + tft->powerSaveOff(); #endif #ifdef VTFT_CTRL digitalWrite(VTFT_CTRL, LOW); #endif - +#ifdef UNPHONE + unphone.backlight(true); // using unPhone library +#endif #ifdef RAK14014 -#elif !defined(M5STACK) +#elif !defined(M5STACK) && !defined(ST7789_CS) // T-Deck gets brightness set in Screen.cpp in the handleSetOn function tft->setBrightness(172); #endif break; } case DISPLAYOFF: { + // LOG_DEBUG("Display off\n"); + backlightEnable->set(false); #if ARCH_PORTDUINO tft->clear(); if (settingsMap[displayBacklight] > 0) digitalWrite(settingsMap[displayBacklight], !TFT_BACKLIGHT_ON); -#elif defined(ST7735_BL_V03) - digitalWrite(ST7735_BL_V03, !TFT_BACKLIGHT_ON); -#elif defined(ST7735_BL_V05) - pinMode(ST7735_BL_V05, OUTPUT); - digitalWrite(ST7735_BL_V05, !TFT_BACKLIGHT_ON); -#endif -#if defined(TFT_BL) && defined(TFT_BACKLIGHT_ON) - digitalWrite(TFT_BL, !TFT_BACKLIGHT_ON); -#endif -#ifdef VTFT_CTRL_V03 - digitalWrite(VTFT_CTRL_V03, HIGH); +#elif !defined(RAK14014) && !defined(M5STACK) && !defined(UNPHONE) + tft->sleep(); + tft->powerSaveOn(); #endif + #ifdef VTFT_CTRL digitalWrite(VTFT_CTRL, HIGH); #endif +#ifdef UNPHONE + unphone.backlight(false); // using unPhone library +#endif #ifdef RAK14014 #elif !defined(M5STACK) tft->setBrightness(0); @@ -526,6 +766,16 @@ void TFTDisplay::sendCommand(uint8_t com) // Drop all other commands to device (we just update the buffer) } +void TFTDisplay::setDisplayBrightness(uint8_t _brightness) +{ +#ifdef RAK14014 + // todo +#else + tft->setBrightness(_brightness); + LOG_DEBUG("Brightness is set to value: %i \n", _brightness); +#endif +} + void TFTDisplay::flipScreenVertically() { #if defined(T_WATCH_S3) @@ -537,6 +787,7 @@ void TFTDisplay::flipScreenVertically() bool TFTDisplay::hasTouch(void) { #ifdef RAK14014 + return true; #elif !defined(M5STACK) return tft->touch() != nullptr; #else @@ -547,6 +798,15 @@ bool TFTDisplay::hasTouch(void) bool TFTDisplay::getTouch(int16_t *x, int16_t *y) { #ifdef RAK14014 + if (_rak14014_touch_int) { + _rak14014_touch_int = false; + /* The X and Y axes have to be switched */ + *y = ft6336u.read_touch1_x(); + *x = TFT_HEIGHT - ft6336u.read_touch1_y(); + return true; + } else { + return false; + } #elif !defined(M5STACK) return tft->getTouch(x, y); #else @@ -570,19 +830,11 @@ bool TFTDisplay::connect() tft = new LGFX; #endif -#ifdef TFT_BL - pinMode(TFT_BL, OUTPUT); - digitalWrite(TFT_BL, TFT_BACKLIGHT_ON); - // pinMode(PIN_3V3_EN, OUTPUT); - // digitalWrite(PIN_3V3_EN, HIGH); + backlightEnable->set(true); LOG_INFO("Power to TFT Backlight\n"); -#endif -#ifdef ST7735_BL_V03 - digitalWrite(ST7735_BL_V03, TFT_BACKLIGHT_ON); -#elif defined(ST7735_BL_V05) - pinMode(ST7735_BL_V05, OUTPUT); - digitalWrite(ST7735_BL_V05, TFT_BACKLIGHT_ON); +#ifdef UNPHONE + unphone.backlight(true); // using unPhone library #endif tft->init(); @@ -592,10 +844,13 @@ bool TFTDisplay::connect() #elif defined(RAK14014) tft->setRotation(1); tft->setSwapBytes(true); -// tft->fillScreen(TFT_BLACK); + // tft->fillScreen(TFT_BLACK); + ft6336u.begin(); + pinMode(SCREEN_TOUCH_INT, INPUT_PULLUP); + attachInterrupt(digitalPinToInterrupt(SCREEN_TOUCH_INT), rak14014_tpIntHandle, FALLING); #elif defined(T_DECK) || defined(PICOMPUTER_S3) || defined(CHATTER_2) tft->setRotation(1); // T-Deck has the TFT in landscape -#elif defined(T_WATCH_S3) +#elif defined(T_WATCH_S3) || defined(SENSECAP_INDICATOR) tft->setRotation(2); // T-Watch S3 left-handed orientation #else tft->setRotation(3); // Orient horizontal and wide underneath the silkscreen name label @@ -605,4 +860,4 @@ bool TFTDisplay::connect() return true; } -#endif \ No newline at end of file +#endif diff --git a/src/graphics/TFTDisplay.h b/src/graphics/TFTDisplay.h index 3d6ea6cc6..38cd53ebb 100644 --- a/src/graphics/TFTDisplay.h +++ b/src/graphics/TFTDisplay.h @@ -1,5 +1,6 @@ #pragma once +#include #include /** @@ -30,12 +31,23 @@ class TFTDisplay : public OLEDDisplay static bool hasTouch(void); static bool getTouch(int16_t *x, int16_t *y); + // Functions for changing display brightness + void setDisplayBrightness(uint8_t); + /** * shim to make the abstraction happy * */ void setDetected(uint8_t detected); + /** + * This is normally managed entirely by TFTDisplay, but some rare applications (heltec tracker) might need to replace the + * default GPIO behavior with something a bit more complex. + * + * We (cruftily) make it static so that variant.cpp can access it without needing a ptr to the TFTDisplay instance. + */ + static GpioPin *backlightEnable; + protected: // the header size of the buffer used, e.g. for the SPI command header virtual int getBufferOffset(void) override { return 0; } diff --git a/src/graphics/fonts/OLEDDisplayFontsPL.cpp b/src/graphics/fonts/OLEDDisplayFontsPL.cpp new file mode 100644 index 000000000..03fdab5fa --- /dev/null +++ b/src/graphics/fonts/OLEDDisplayFontsPL.cpp @@ -0,0 +1,440 @@ +#include "OLEDDisplayFontsPL.h" + +// Font generated or edited with the glyphEditor +const uint8_t ArialMT_Plain_10_PL[] PROGMEM = { + 0x0A, // Width: 10 + 0x0D, // Height: 13 + 0x20, // First char: 32 + 0xE0, // Number of chars: 224 + + // Jump Table: + 0xFF, 0xFF, 0x00, 0x03, // 32:65535 + 0x00, 0x00, 0x04, 0x03, // 33 + 0x00, 0x04, 0x05, 0x04, // 34 + 0x00, 0x09, 0x09, 0x06, // 35 + 0x00, 0x12, 0x0A, 0x06, // 36 + 0x00, 0x1C, 0x10, 0x09, // 37 + 0x00, 0x2C, 0x0E, 0x08, // 38 + 0x00, 0x3A, 0x01, 0x02, // 39 + 0x00, 0x3B, 0x06, 0x04, // 40 + 0x00, 0x41, 0x06, 0x04, // 41 + 0x00, 0x47, 0x05, 0x04, // 42 + 0x00, 0x4C, 0x09, 0x06, // 43 + 0x00, 0x55, 0x04, 0x03, // 44 + 0x00, 0x59, 0x03, 0x03, // 45 + 0x00, 0x5C, 0x04, 0x03, // 46 + 0x00, 0x60, 0x05, 0x04, // 47 + 0x00, 0x65, 0x0A, 0x06, // 48 + 0x00, 0x6F, 0x08, 0x05, // 49 + 0x00, 0x77, 0x0A, 0x06, // 50 + 0x00, 0x81, 0x0A, 0x06, // 51 + 0x00, 0x8B, 0x0B, 0x07, // 52 + 0x00, 0x96, 0x0A, 0x06, // 53 + 0x00, 0xA0, 0x0A, 0x06, // 54 + 0x00, 0xAA, 0x09, 0x06, // 55 + 0x00, 0xB3, 0x0A, 0x06, // 56 + 0x00, 0xBD, 0x0A, 0x06, // 57 + 0x00, 0xC7, 0x04, 0x03, // 58 + 0x00, 0xCB, 0x04, 0x03, // 59 + 0x00, 0xCF, 0x0A, 0x06, // 60 + 0x00, 0xD9, 0x09, 0x06, // 61 + 0x00, 0xE2, 0x09, 0x06, // 62 + 0x00, 0xEB, 0x0B, 0x07, // 63 + 0x00, 0xF6, 0x14, 0x0B, // 64 + 0x01, 0x0A, 0x0E, 0x08, // 65 + 0x01, 0x18, 0x0C, 0x07, // 66 + 0x01, 0x24, 0x0C, 0x07, // 67 + 0x01, 0x30, 0x0B, 0x07, // 68 + 0x01, 0x3B, 0x0C, 0x07, // 69 + 0x01, 0x47, 0x09, 0x06, // 70 + 0x01, 0x50, 0x0D, 0x08, // 71 + 0x01, 0x5D, 0x0C, 0x07, // 72 + 0x01, 0x69, 0x04, 0x03, // 73 + 0x01, 0x6D, 0x08, 0x05, // 74 + 0x01, 0x75, 0x0E, 0x08, // 75 + 0x01, 0x83, 0x0C, 0x07, // 76 + 0x01, 0x8F, 0x10, 0x09, // 77 + 0x01, 0x9F, 0x0C, 0x07, // 78 + 0x01, 0xAB, 0x0E, 0x08, // 79 + 0x01, 0xB9, 0x0B, 0x07, // 80 + 0x01, 0xC4, 0x0E, 0x08, // 81 + 0x01, 0xD2, 0x0C, 0x07, // 82 + 0x01, 0xDE, 0x0C, 0x07, // 83 + 0x01, 0xEA, 0x0B, 0x07, // 84 + 0x01, 0xF5, 0x0C, 0x07, // 85 + 0x02, 0x01, 0x0D, 0x08, // 86 + 0x02, 0x0E, 0x11, 0x0A, // 87 + 0x02, 0x1F, 0x0E, 0x08, // 88 + 0x02, 0x2D, 0x0D, 0x08, // 89 + 0x02, 0x3A, 0x0C, 0x07, // 90 + 0x02, 0x46, 0x06, 0x04, // 91 + 0x02, 0x4C, 0x06, 0x04, // 92 + 0x02, 0x52, 0x04, 0x03, // 93 + 0x02, 0x56, 0x09, 0x06, // 94 + 0x02, 0x5F, 0x0C, 0x07, // 95 + 0x02, 0x6B, 0x03, 0x03, // 96 + 0x02, 0x6E, 0x0A, 0x06, // 97 + 0x02, 0x78, 0x0A, 0x06, // 98 + 0x02, 0x82, 0x0A, 0x06, // 99 + 0x02, 0x8C, 0x0A, 0x06, // 100 + 0x02, 0x96, 0x0A, 0x06, // 101 + 0x02, 0xA0, 0x05, 0x04, // 102 + 0x02, 0xA5, 0x0A, 0x06, // 103 + 0x02, 0xAF, 0x0A, 0x06, // 104 + 0x02, 0xB9, 0x04, 0x03, // 105 + 0x02, 0xBD, 0x04, 0x03, // 106 + 0x02, 0xC1, 0x08, 0x05, // 107 + 0x02, 0xC9, 0x04, 0x03, // 108 + 0x02, 0xCD, 0x10, 0x09, // 109 + 0x02, 0xDD, 0x0A, 0x06, // 110 + 0x02, 0xE7, 0x0A, 0x06, // 111 + 0x02, 0xF1, 0x0A, 0x06, // 112 + 0x02, 0xFB, 0x0A, 0x06, // 113 + 0x03, 0x05, 0x05, 0x04, // 114 + 0x03, 0x0A, 0x08, 0x05, // 115 + 0x03, 0x12, 0x06, 0x04, // 116 + 0x03, 0x18, 0x0A, 0x06, // 117 + 0x03, 0x22, 0x09, 0x06, // 118 + 0x03, 0x2B, 0x0E, 0x08, // 119 + 0x03, 0x39, 0x0A, 0x06, // 120 + 0x03, 0x43, 0x09, 0x06, // 121 + 0x03, 0x4C, 0x0A, 0x06, // 122 + 0x03, 0x56, 0x06, 0x04, // 123 + 0x03, 0x5C, 0x04, 0x03, // 124 + 0x03, 0x60, 0x05, 0x04, // 125 + 0x03, 0x65, 0x09, 0x06, // 126 + 0xFF, 0xFF, 0x00, 0x0A, // 127 + 0xFF, 0xFF, 0x00, 0x0A, // 128 + 0x03, 0x6E, 0x0C, 0x07, // 129 + 0x03, 0x7A, 0x05, 0x04, // 130 + 0x03, 0x7F, 0x0C, 0x07, // 131 + 0x03, 0x8B, 0x0E, 0x08, // 132 + 0x03, 0x99, 0x0C, 0x07, // 133 + 0x03, 0xA5, 0x0C, 0x07, // 134 + 0x03, 0xB1, 0x0A, 0x06, // 135 + 0x03, 0xBB, 0x0A, 0x06, // 136 + 0x03, 0xC5, 0x0A, 0x06, // 137 + 0xFF, 0xFF, 0x00, 0x0A, // 138 + 0xFF, 0xFF, 0x00, 0x0A, // 139 + 0xFF, 0xFF, 0x00, 0x0A, // 140 + 0xFF, 0xFF, 0x00, 0x0A, // 141 + 0xFF, 0xFF, 0x00, 0x0A, // 142 + 0xFF, 0xFF, 0x00, 0x0A, // 143 + 0xFF, 0xFF, 0x00, 0x0A, // 144 + 0xFF, 0xFF, 0x00, 0x0A, // 145 + 0xFF, 0xFF, 0x00, 0x0A, // 146 + 0x03, 0xCF, 0x0E, 0x08, // 147 + 0x03, 0xDD, 0x0A, 0x06, // 148 + 0xFF, 0xFF, 0x00, 0x0A, // 149 + 0xFF, 0xFF, 0x00, 0x0A, // 150 + 0xFF, 0xFF, 0x00, 0x0A, // 151 + 0x03, 0xE7, 0x0C, 0x07, // 152 + 0x03, 0xF3, 0x0C, 0x07, // 153 + 0x03, 0xFF, 0x0C, 0x07, // 154 + 0x04, 0x0B, 0x08, 0x05, // 155 + 0xFF, 0xFF, 0x00, 0x0A, // 156 + 0xFF, 0xFF, 0x00, 0x0A, // 157 + 0xFF, 0xFF, 0x00, 0x0A, // 158 + 0xFF, 0xFF, 0x00, 0x0A, // 159 + 0xFF, 0xFF, 0x00, 0x0A, // 160 + 0x04, 0x13, 0x04, 0x03, // 161 + 0x04, 0x17, 0x0A, 0x06, // 162 + 0x04, 0x21, 0x0C, 0x07, // 163 + 0x04, 0x2D, 0x0A, 0x06, // 164 + 0x04, 0x37, 0x0A, 0x06, // 165 + 0x04, 0x41, 0x04, 0x03, // 166 + 0x04, 0x45, 0x0A, 0x06, // 167 + 0x04, 0x4F, 0x05, 0x04, // 168 + 0x04, 0x54, 0x0D, 0x08, // 169 + 0x04, 0x61, 0x07, 0x05, // 170 + 0x04, 0x68, 0x0A, 0x06, // 171 + 0x04, 0x72, 0x09, 0x06, // 172 + 0x04, 0x7B, 0x03, 0x03, // 173 + 0x04, 0x7E, 0x0D, 0x08, // 174 + 0x04, 0x8B, 0x0B, 0x07, // 175 + 0x04, 0x96, 0x07, 0x05, // 176 + 0x04, 0x9D, 0x0A, 0x06, // 177 + 0x04, 0xA7, 0x05, 0x04, // 178 + 0x04, 0xAC, 0x05, 0x04, // 179 + 0x04, 0xB1, 0x05, 0x04, // 180 + 0x04, 0xB6, 0x0A, 0x06, // 181 + 0x04, 0xC0, 0x09, 0x06, // 182 + 0x04, 0xC9, 0x03, 0x03, // 183 + 0x04, 0xCC, 0x06, 0x04, // 184 + 0x04, 0xD2, 0x0C, 0x07, // 185 + 0x04, 0xDE, 0x07, 0x05, // 186 + 0x04, 0xE5, 0x0C, 0x07, // 187 + 0x04, 0xF1, 0x0A, 0x06, // 188 + 0x04, 0xFB, 0x10, 0x09, // 189 + 0x05, 0x0B, 0x10, 0x09, // 190 + 0x05, 0x1B, 0x0A, 0x06, // 191 + 0x05, 0x25, 0x0E, 0x08, // 192 + 0x05, 0x33, 0x0E, 0x08, // 193 + 0x05, 0x41, 0x0E, 0x08, // 194 + 0x05, 0x4F, 0x0E, 0x08, // 195 + 0x05, 0x5D, 0x0E, 0x08, // 196 + 0x05, 0x6B, 0x0E, 0x08, // 197 + 0x05, 0x79, 0x12, 0x0A, // 198 + 0x05, 0x8B, 0x0C, 0x07, // 199 + 0x05, 0x97, 0x0C, 0x07, // 200 + 0x05, 0xA3, 0x0C, 0x07, // 201 + 0x05, 0xAF, 0x0C, 0x07, // 202 + 0x05, 0xBB, 0x0C, 0x07, // 203 + 0x05, 0xC7, 0x05, 0x04, // 204 + 0x05, 0xCC, 0x04, 0x03, // 205 + 0x05, 0xD0, 0x04, 0x03, // 206 + 0x05, 0xD4, 0x05, 0x04, // 207 + 0x05, 0xD9, 0x0B, 0x07, // 208 + 0x05, 0xE4, 0x0C, 0x07, // 209 + 0x05, 0xF0, 0x0E, 0x08, // 210 + 0x05, 0xFE, 0x0E, 0x08, // 211 + 0x06, 0x0C, 0x0E, 0x08, // 212 + 0x06, 0x1A, 0x0E, 0x08, // 213 + 0x06, 0x28, 0x0E, 0x08, // 214 + 0x06, 0x36, 0x0A, 0x06, // 215 + 0x06, 0x40, 0x0D, 0x08, // 216 + 0x06, 0x4D, 0x0C, 0x07, // 217 + 0x06, 0x59, 0x0C, 0x07, // 218 + 0x06, 0x65, 0x0C, 0x07, // 219 + 0x06, 0x71, 0x0C, 0x07, // 220 + 0x06, 0x7D, 0x0D, 0x08, // 221 + 0x06, 0x8A, 0x0B, 0x07, // 222 + 0x06, 0x95, 0x0C, 0x07, // 223 + 0x06, 0xA1, 0x0A, 0x06, // 224 + 0x06, 0xAB, 0x0A, 0x06, // 225 + 0x06, 0xB5, 0x0A, 0x06, // 226 + 0x06, 0xBF, 0x0A, 0x06, // 227 + 0x06, 0xC9, 0x0A, 0x06, // 228 + 0x06, 0xD3, 0x0A, 0x06, // 229 + 0x06, 0xDD, 0x10, 0x09, // 230 + 0x06, 0xED, 0x0A, 0x06, // 231 + 0x06, 0xF7, 0x0A, 0x06, // 232 + 0x07, 0x01, 0x0A, 0x06, // 233 + 0x07, 0x0B, 0x0A, 0x06, // 234 + 0x07, 0x15, 0x0A, 0x06, // 235 + 0x07, 0x1F, 0x05, 0x04, // 236 + 0x07, 0x24, 0x04, 0x03, // 237 + 0x07, 0x28, 0x05, 0x04, // 238 + 0x07, 0x2D, 0x05, 0x04, // 239 + 0x07, 0x32, 0x0A, 0x06, // 240 + 0x07, 0x3C, 0x0A, 0x06, // 241 + 0x07, 0x46, 0x0A, 0x06, // 242 + 0x07, 0x50, 0x0A, 0x06, // 243 + 0x07, 0x5A, 0x0A, 0x06, // 244 + 0x07, 0x64, 0x0A, 0x06, // 245 + 0x07, 0x6E, 0x0A, 0x06, // 246 + 0x07, 0x78, 0x09, 0x06, // 247 + 0x07, 0x81, 0x0A, 0x06, // 248 + 0x07, 0x8B, 0x0A, 0x06, // 249 + 0x07, 0x95, 0x0A, 0x06, // 250 + 0x07, 0x9F, 0x0A, 0x06, // 251 + 0x07, 0xA9, 0x0A, 0x06, // 252 + 0x07, 0xB3, 0x09, 0x06, // 253 + 0x07, 0xBC, 0x0A, 0x06, // 254 + 0x07, 0xC6, 0x09, 0x06, // 255 + // Font Data: + 0x00, 0x00, 0xF8, 0x02, // 33 + 0x38, 0x00, 0x00, 0x00, 0x38, // 34 + 0xA0, 0x03, 0xE0, 0x00, 0xB8, 0x03, 0xE0, 0x00, 0xB8, // 35 + 0x30, 0x01, 0x28, 0x02, 0xF8, 0x07, 0x48, 0x02, 0x90, 0x01, // 36 + 0x00, 0x00, 0x30, 0x00, 0x48, 0x00, 0x30, 0x03, 0xC0, 0x00, 0xB0, 0x01, 0x48, 0x02, 0x80, 0x01, // 37 + 0x80, 0x01, 0x50, 0x02, 0x68, 0x02, 0xA8, 0x02, 0x18, 0x01, 0x80, 0x03, 0x80, 0x02, // 38 + 0x38, // 39 + 0xE0, 0x03, 0x10, 0x04, 0x08, 0x08, // 40 + 0x08, 0x08, 0x10, 0x04, 0xE0, 0x03, // 41 + 0x28, 0x00, 0x18, 0x00, 0x28, // 42 + 0x40, 0x00, 0x40, 0x00, 0xF0, 0x01, 0x40, 0x00, 0x40, // 43 + 0x00, 0x00, 0x00, 0x06, // 44 + 0x80, 0x00, 0x80, // 45 + 0x00, 0x00, 0x00, 0x02, // 46 + 0x00, 0x03, 0xE0, 0x00, 0x18, // 47 + 0xF0, 0x01, 0x08, 0x02, 0x08, 0x02, 0x08, 0x02, 0xF0, 0x01, // 48 + 0x00, 0x00, 0x20, 0x00, 0x10, 0x00, 0xF8, 0x03, // 49 + 0x10, 0x02, 0x08, 0x03, 0x88, 0x02, 0x48, 0x02, 0x30, 0x02, // 50 + 0x10, 0x01, 0x08, 0x02, 0x48, 0x02, 0x48, 0x02, 0xB0, 0x01, // 51 + 0xC0, 0x00, 0xA0, 0x00, 0x90, 0x00, 0x88, 0x00, 0xF8, 0x03, 0x80, // 52 + 0x60, 0x01, 0x38, 0x02, 0x28, 0x02, 0x28, 0x02, 0xC8, 0x01, // 53 + 0xF0, 0x01, 0x28, 0x02, 0x28, 0x02, 0x28, 0x02, 0xD0, 0x01, // 54 + 0x08, 0x00, 0x08, 0x03, 0xC8, 0x00, 0x38, 0x00, 0x08, // 55 + 0xB0, 0x01, 0x48, 0x02, 0x48, 0x02, 0x48, 0x02, 0xB0, 0x01, // 56 + 0x70, 0x01, 0x88, 0x02, 0x88, 0x02, 0x88, 0x02, 0xF0, 0x01, // 57 + 0x00, 0x00, 0x20, 0x02, // 58 + 0x00, 0x00, 0x20, 0x06, // 59 + 0x00, 0x00, 0x40, 0x00, 0xA0, 0x00, 0xA0, 0x00, 0x10, 0x01, // 60 + 0xA0, 0x00, 0xA0, 0x00, 0xA0, 0x00, 0xA0, 0x00, 0xA0, // 61 + 0x00, 0x00, 0x10, 0x01, 0xA0, 0x00, 0xA0, 0x00, 0x40, // 62 + 0x10, 0x00, 0x08, 0x00, 0x08, 0x00, 0xC8, 0x02, 0x48, 0x00, 0x30, // 63 + 0x00, 0x00, 0xC0, 0x03, 0x30, 0x04, 0xD0, 0x09, 0x28, 0x0A, 0x28, 0x0A, 0xC8, 0x0B, 0x68, 0x0A, 0x10, 0x05, 0xE0, 0x04, // 64 + 0x00, 0x02, 0xC0, 0x01, 0xB0, 0x00, 0x88, 0x00, 0xB0, 0x00, 0xC0, 0x01, 0x00, 0x02, // 65 + 0x00, 0x00, 0xF8, 0x03, 0x48, 0x02, 0x48, 0x02, 0x48, 0x02, 0xF0, 0x01, // 66 + 0x00, 0x00, 0xF0, 0x01, 0x08, 0x02, 0x08, 0x02, 0x08, 0x02, 0x10, 0x01, // 67 + 0x00, 0x00, 0xF8, 0x03, 0x08, 0x02, 0x08, 0x02, 0x10, 0x01, 0xE0, // 68 + 0x00, 0x00, 0xF8, 0x03, 0x48, 0x02, 0x48, 0x02, 0x48, 0x02, 0x48, 0x02, // 69 + 0x00, 0x00, 0xF8, 0x03, 0x48, 0x00, 0x48, 0x00, 0x08, // 70 + 0x00, 0x00, 0xE0, 0x00, 0x10, 0x01, 0x08, 0x02, 0x48, 0x02, 0x50, 0x01, 0xC0, // 71 + 0x00, 0x00, 0xF8, 0x03, 0x40, 0x00, 0x40, 0x00, 0x40, 0x00, 0xF8, 0x03, // 72 + 0x00, 0x00, 0xF8, 0x03, // 73 + 0x00, 0x03, 0x00, 0x02, 0x00, 0x02, 0xF8, 0x01, // 74 + 0x00, 0x00, 0xF8, 0x03, 0x80, 0x00, 0x60, 0x00, 0x90, 0x00, 0x08, 0x01, 0x00, 0x02, // 75 + 0x00, 0x00, 0xF8, 0x03, 0x00, 0x02, 0x00, 0x02, 0x00, 0x02, 0x00, 0x02, // 76 + 0x00, 0x00, 0xF8, 0x03, 0x30, 0x00, 0xC0, 0x01, 0x00, 0x02, 0xC0, 0x01, 0x30, 0x00, 0xF8, 0x03, // 77 + 0x00, 0x00, 0xF8, 0x03, 0x30, 0x00, 0x40, 0x00, 0x80, 0x01, 0xF8, 0x03, // 78 + 0x00, 0x00, 0xF0, 0x01, 0x08, 0x02, 0x08, 0x02, 0x08, 0x02, 0x08, 0x02, 0xF0, 0x01, // 79 + 0x00, 0x00, 0xF8, 0x03, 0x48, 0x00, 0x48, 0x00, 0x48, 0x00, 0x30, // 80 + 0x00, 0x00, 0xF0, 0x01, 0x08, 0x02, 0x08, 0x02, 0x08, 0x03, 0x08, 0x03, 0xF0, 0x02, // 81 + 0x00, 0x00, 0xF8, 0x03, 0x48, 0x00, 0x48, 0x00, 0xC8, 0x00, 0x30, 0x03, // 82 + 0x00, 0x00, 0x30, 0x01, 0x48, 0x02, 0x48, 0x02, 0x48, 0x02, 0x90, 0x01, // 83 + 0x00, 0x00, 0x08, 0x00, 0x08, 0x00, 0xF8, 0x03, 0x08, 0x00, 0x08, // 84 + 0x00, 0x00, 0xF8, 0x01, 0x00, 0x02, 0x00, 0x02, 0x00, 0x02, 0xF8, 0x01, // 85 + 0x08, 0x00, 0x70, 0x00, 0x80, 0x01, 0x00, 0x02, 0x80, 0x01, 0x70, 0x00, 0x08, // 86 + 0x18, 0x00, 0xE0, 0x01, 0x00, 0x02, 0xF0, 0x01, 0x08, 0x00, 0xF0, 0x01, 0x00, 0x02, 0xE0, 0x01, 0x18, // 87 + 0x00, 0x02, 0x08, 0x01, 0x90, 0x00, 0x60, 0x00, 0x90, 0x00, 0x08, 0x01, 0x00, 0x02, // 88 + 0x08, 0x00, 0x10, 0x00, 0x20, 0x00, 0xC0, 0x03, 0x20, 0x00, 0x10, 0x00, 0x08, // 89 + 0x08, 0x03, 0x88, 0x02, 0xC8, 0x02, 0x68, 0x02, 0x38, 0x02, 0x18, 0x02, // 90 + 0x00, 0x00, 0xF8, 0x0F, 0x08, 0x08, // 91 + 0x18, 0x00, 0xE0, 0x00, 0x00, 0x03, // 92 + 0x08, 0x08, 0xF8, 0x0F, // 93 + 0x40, 0x00, 0x30, 0x00, 0x08, 0x00, 0x30, 0x00, 0x40, // 94 + 0x00, 0x08, 0x00, 0x08, 0x00, 0x08, 0x00, 0x08, 0x00, 0x08, 0x00, 0x08, // 95 + 0x08, 0x00, 0x10, // 96 + 0x00, 0x00, 0x00, 0x03, 0xA0, 0x02, 0xA0, 0x02, 0xE0, 0x03, // 97 + 0x00, 0x00, 0xF8, 0x03, 0x20, 0x02, 0x20, 0x02, 0xC0, 0x01, // 98 + 0x00, 0x00, 0xC0, 0x01, 0x20, 0x02, 0x20, 0x02, 0x40, 0x01, // 99 + 0x00, 0x00, 0xC0, 0x01, 0x20, 0x02, 0x20, 0x02, 0xF8, 0x03, // 100 + 0x00, 0x00, 0xC0, 0x01, 0xA0, 0x02, 0xA0, 0x02, 0xC0, 0x02, // 101 + 0x20, 0x00, 0xF0, 0x03, 0x28, // 102 + 0x00, 0x00, 0xC0, 0x05, 0x20, 0x0A, 0x20, 0x0A, 0xE0, 0x07, // 103 + 0x00, 0x00, 0xF8, 0x03, 0x20, 0x00, 0x20, 0x00, 0xC0, 0x03, // 104 + 0x00, 0x00, 0xE8, 0x03, // 105 + 0x00, 0x08, 0xE8, 0x07, // 106 + 0xF8, 0x03, 0x80, 0x00, 0xC0, 0x01, 0x20, 0x02, // 107 + 0x00, 0x00, 0xF8, 0x03, // 108 + 0x00, 0x00, 0xE0, 0x03, 0x20, 0x00, 0x20, 0x00, 0xE0, 0x03, 0x20, 0x00, 0x20, 0x00, 0xC0, 0x03, // 109 + 0x00, 0x00, 0xE0, 0x03, 0x20, 0x00, 0x20, 0x00, 0xC0, 0x03, // 110 + 0x00, 0x00, 0xC0, 0x01, 0x20, 0x02, 0x20, 0x02, 0xC0, 0x01, // 111 + 0x00, 0x00, 0xE0, 0x0F, 0x20, 0x02, 0x20, 0x02, 0xC0, 0x01, // 112 + 0x00, 0x00, 0xC0, 0x01, 0x20, 0x02, 0x20, 0x02, 0xE0, 0x0F, // 113 + 0x00, 0x00, 0xE0, 0x03, 0x20, // 114 + 0x40, 0x02, 0xA0, 0x02, 0xA0, 0x02, 0x20, 0x01, // 115 + 0x20, 0x00, 0xF8, 0x03, 0x20, 0x02, // 116 + 0x00, 0x00, 0xE0, 0x01, 0x00, 0x02, 0x00, 0x02, 0xE0, 0x03, // 117 + 0x20, 0x00, 0xC0, 0x01, 0x00, 0x02, 0xC0, 0x01, 0x20, // 118 + 0xE0, 0x01, 0x00, 0x02, 0xC0, 0x01, 0x20, 0x00, 0xC0, 0x01, 0x00, 0x02, 0xE0, 0x01, // 119 + 0x20, 0x02, 0x40, 0x01, 0x80, 0x00, 0x40, 0x01, 0x20, 0x02, // 120 + 0x20, 0x00, 0xC0, 0x09, 0x00, 0x06, 0xC0, 0x01, 0x20, // 121 + 0x20, 0x02, 0x20, 0x03, 0xA0, 0x02, 0x60, 0x02, 0x20, 0x02, // 122 + 0x80, 0x00, 0x78, 0x0F, 0x08, 0x08, // 123 + 0x00, 0x00, 0xF8, 0x0F, // 124 + 0x08, 0x08, 0x78, 0x0F, 0x80, // 125 + 0xC0, 0x00, 0x40, 0x00, 0xC0, 0x00, 0x80, 0x00, 0xC0, // 126 + 0x00, 0x00, 0xF8, 0x03, 0x40, 0x02, 0x20, 0x02, 0x00, 0x02, 0x00, 0x02, // 129 + 0x40, 0x00, 0xF8, 0x03, 0x20, // 130 + 0x00, 0x00, 0xF8, 0x03, 0x30, 0x00, 0x44, 0x00, 0x82, 0x01, 0xF8, 0x03, // 131 + 0x00, 0x02, 0xC0, 0x01, 0xB0, 0x00, 0x88, 0x00, 0xB0, 0x00, 0xC0, 0x05, 0x00, 0x0A, // 132 + 0x00, 0x00, 0x00, 0x03, 0xA0, 0x02, 0xA0, 0x02, 0xE0, 0x07, 0x00, 0x08, // 133 + 0x00, 0x00, 0xF0, 0x01, 0x08, 0x02, 0x0A, 0x02, 0x09, 0x02, 0x10, 0x01, // 134 + 0x00, 0x00, 0xC0, 0x01, 0x20, 0x02, 0x28, 0x02, 0x44, 0x01, // 135 + 0x00, 0x00, 0xE0, 0x03, 0x20, 0x00, 0x28, 0x00, 0xC4, 0x03, // 136 + 0x20, 0x02, 0x20, 0x03, 0xA8, 0x02, 0x64, 0x02, 0x20, 0x02, // 137 + 0x00, 0x00, 0xF0, 0x01, 0x08, 0x02, 0x08, 0x02, 0x0A, 0x02, 0x09, 0x02, 0xF0, 0x01, // 147 + 0x00, 0x00, 0xC0, 0x01, 0x20, 0x02, 0x28, 0x02, 0xC4, 0x01, // 148 + 0x00, 0x00, 0xF8, 0x03, 0x48, 0x02, 0x48, 0x02, 0x48, 0x06, 0x48, 0x0A, // 152 + 0x00, 0x00, 0xC0, 0x01, 0xA0, 0x02, 0xA0, 0x02, 0xC0, 0x06, 0x00, 0x08, // 153 + 0x00, 0x00, 0x30, 0x01, 0x48, 0x02, 0x4A, 0x02, 0x49, 0x02, 0x90, 0x01, // 154 + 0x40, 0x02, 0xA0, 0x02, 0xA8, 0x02, 0x24, 0x01, // 155 + 0x00, 0x00, 0xA0, 0x0F, // 161 + 0x00, 0x00, 0xC0, 0x01, 0xA0, 0x0F, 0x78, 0x02, 0x40, 0x01, // 162 + 0x40, 0x02, 0x70, 0x03, 0xC8, 0x02, 0x48, 0x02, 0x08, 0x02, 0x10, 0x02, // 163 + 0x00, 0x00, 0xE0, 0x01, 0x20, 0x01, 0x20, 0x01, 0xE0, 0x01, // 164 + 0x48, 0x01, 0x70, 0x01, 0xC0, 0x03, 0x70, 0x01, 0x48, 0x01, // 165 + 0x00, 0x00, 0x38, 0x0F, // 166 + 0xD0, 0x04, 0x28, 0x09, 0x48, 0x09, 0x48, 0x0A, 0x90, 0x05, // 167 + 0x08, 0x00, 0x00, 0x00, 0x08, // 168 + 0xE0, 0x00, 0x10, 0x01, 0x48, 0x02, 0xA8, 0x02, 0xA8, 0x02, 0x10, 0x01, 0xE0, // 169 + 0x68, 0x00, 0x68, 0x00, 0x68, 0x00, 0x78, // 170 + 0x00, 0x00, 0x80, 0x01, 0x40, 0x02, 0x80, 0x01, 0x40, 0x02, // 171 + 0x20, 0x00, 0x20, 0x00, 0x20, 0x00, 0x20, 0x00, 0xE0, // 172 + 0x80, 0x00, 0x80, // 173 + 0xE0, 0x00, 0x10, 0x01, 0xE8, 0x02, 0x68, 0x02, 0xC8, 0x02, 0x10, 0x01, 0xE0, // 174 + 0x02, 0x00, 0x02, 0x00, 0x02, 0x00, 0x02, 0x00, 0x02, 0x00, 0x02, // 175 + 0x00, 0x00, 0x38, 0x00, 0x28, 0x00, 0x38, // 176 + 0x40, 0x02, 0x40, 0x02, 0xF0, 0x03, 0x40, 0x02, 0x40, 0x02, // 177 + 0x48, 0x00, 0x68, 0x00, 0x58, // 178 + 0x48, 0x00, 0x58, 0x00, 0x68, // 179 + 0x00, 0x00, 0x10, 0x00, 0x08, // 180 + 0x00, 0x00, 0xE0, 0x0F, 0x00, 0x02, 0x00, 0x02, 0xE0, 0x03, // 181 + 0x70, 0x00, 0xF8, 0x0F, 0x08, 0x00, 0xF8, 0x0F, 0x08, // 182 + 0x00, 0x00, 0x40, // 183 + 0x00, 0x00, 0x00, 0x14, 0x00, 0x18, // 184 + 0x08, 0x03, 0x88, 0x02, 0xCA, 0x02, 0x69, 0x02, 0x38, 0x02, 0x18, 0x02, // 185 + 0x30, 0x00, 0x48, 0x00, 0x48, 0x00, 0x30, // 186 + 0x08, 0x03, 0x88, 0x02, 0xC8, 0x02, 0x6A, 0x02, 0x38, 0x02, 0x18, 0x02, // 187 + 0x20, 0x02, 0x20, 0x03, 0xA8, 0x02, 0x60, 0x02, 0x20, 0x02, // 188 + 0x00, 0x00, 0x10, 0x02, 0x78, 0x01, 0x80, 0x00, 0x60, 0x00, 0x50, 0x02, 0x48, 0x03, 0xC0, 0x02, // 189 + 0x48, 0x00, 0x58, 0x00, 0x68, 0x03, 0x80, 0x00, 0x60, 0x01, 0x90, 0x01, 0xC8, 0x03, 0x00, 0x01, // 190 + 0x00, 0x00, 0x00, 0x06, 0x00, 0x09, 0xA0, 0x09, 0x00, 0x04, // 191 + 0x00, 0x02, 0xC0, 0x01, 0xB0, 0x00, 0x89, 0x00, 0xB2, 0x00, 0xC0, 0x01, 0x00, 0x02, // 192 + 0x00, 0x02, 0xC0, 0x01, 0xB0, 0x00, 0x8A, 0x00, 0xB1, 0x00, 0xC0, 0x01, 0x00, 0x02, // 193 + 0x00, 0x02, 0xC0, 0x01, 0xB2, 0x00, 0x89, 0x00, 0xB2, 0x00, 0xC0, 0x01, 0x00, 0x02, // 194 + 0x00, 0x02, 0xC2, 0x01, 0xB1, 0x00, 0x8A, 0x00, 0xB1, 0x00, 0xC0, 0x01, 0x00, 0x02, // 195 + 0x00, 0x02, 0xC0, 0x01, 0xB2, 0x00, 0x88, 0x00, 0xB2, 0x00, 0xC0, 0x01, 0x00, 0x02, // 196 + 0x00, 0x02, 0xC0, 0x01, 0xBE, 0x00, 0x8A, 0x00, 0xBE, 0x00, 0xC0, 0x01, 0x00, 0x02, // 197 + 0x00, 0x03, 0xC0, 0x00, 0xE0, 0x00, 0x98, 0x00, 0x88, 0x00, 0xF8, 0x03, 0x48, 0x02, 0x48, 0x02, 0x48, 0x02, // 198 + 0x00, 0x00, 0xF0, 0x01, 0x08, 0x02, 0x08, 0x16, 0x08, 0x1A, 0x10, 0x01, // 199 + 0x00, 0x00, 0xF8, 0x03, 0x49, 0x02, 0x4A, 0x02, 0x48, 0x02, 0x48, 0x02, // 200 + 0x00, 0x00, 0xF8, 0x03, 0x48, 0x02, 0x4A, 0x02, 0x49, 0x02, 0x48, 0x02, // 201 + 0x00, 0x00, 0xFA, 0x03, 0x49, 0x02, 0x4A, 0x02, 0x48, 0x02, 0x48, 0x02, // 202 + 0x00, 0x00, 0xF8, 0x03, 0x4A, 0x02, 0x48, 0x02, 0x4A, 0x02, 0x48, 0x02, // 203 + 0x00, 0x00, 0xF9, 0x03, 0x02, // 204 + 0x02, 0x00, 0xF9, 0x03, // 205 + 0x01, 0x00, 0xFA, 0x03, // 206 + 0x02, 0x00, 0xF8, 0x03, 0x02, // 207 + 0x40, 0x00, 0xF8, 0x03, 0x48, 0x02, 0x48, 0x02, 0x10, 0x01, 0xE0, // 208 + 0x00, 0x00, 0xFA, 0x03, 0x31, 0x00, 0x42, 0x00, 0x81, 0x01, 0xF8, 0x03, // 209 + 0x00, 0x00, 0xF0, 0x01, 0x08, 0x02, 0x09, 0x02, 0x0A, 0x02, 0x08, 0x02, 0xF0, 0x01, // 210 + 0x00, 0x00, 0xF0, 0x01, 0x08, 0x02, 0x0A, 0x02, 0x09, 0x02, 0x08, 0x02, 0xF0, 0x01, // 211 + 0x00, 0x00, 0xF0, 0x01, 0x08, 0x02, 0x0A, 0x02, 0x09, 0x02, 0x0A, 0x02, 0xF0, 0x01, // 212 + 0x00, 0x00, 0xF0, 0x01, 0x0A, 0x02, 0x09, 0x02, 0x0A, 0x02, 0x09, 0x02, 0xF0, 0x01, // 213 + 0x00, 0x00, 0xF0, 0x01, 0x0A, 0x02, 0x08, 0x02, 0x0A, 0x02, 0x08, 0x02, 0xF0, 0x01, // 214 + 0x10, 0x01, 0xA0, 0x00, 0xE0, 0x00, 0xA0, 0x00, 0x10, 0x01, // 215 + 0x00, 0x00, 0xF0, 0x02, 0x08, 0x03, 0xC8, 0x02, 0x28, 0x02, 0x18, 0x03, 0xE8, // 216 + 0x00, 0x00, 0xF8, 0x01, 0x01, 0x02, 0x02, 0x02, 0x00, 0x02, 0xF8, 0x01, // 217 + 0x00, 0x00, 0xF8, 0x01, 0x02, 0x02, 0x01, 0x02, 0x00, 0x02, 0xF8, 0x01, // 218 + 0x00, 0x00, 0xF8, 0x01, 0x02, 0x02, 0x01, 0x02, 0x02, 0x02, 0xF8, 0x01, // 219 + 0x00, 0x00, 0xF8, 0x01, 0x02, 0x02, 0x00, 0x02, 0x02, 0x02, 0xF8, 0x01, // 220 + 0x08, 0x00, 0x10, 0x00, 0x20, 0x00, 0xC2, 0x03, 0x21, 0x00, 0x10, 0x00, 0x08, // 221 + 0x00, 0x00, 0xF8, 0x03, 0x10, 0x01, 0x10, 0x01, 0x10, 0x01, 0xE0, // 222 + 0x00, 0x00, 0xF0, 0x03, 0x08, 0x01, 0x48, 0x02, 0xB0, 0x02, 0x80, 0x01, // 223 + 0x00, 0x00, 0x00, 0x03, 0xA4, 0x02, 0xA8, 0x02, 0xE0, 0x03, // 224 + 0x00, 0x00, 0x00, 0x03, 0xA8, 0x02, 0xA4, 0x02, 0xE0, 0x03, // 225 + 0x00, 0x00, 0x00, 0x03, 0xA8, 0x02, 0xA4, 0x02, 0xE8, 0x03, // 226 + 0x00, 0x00, 0x08, 0x03, 0xA4, 0x02, 0xA8, 0x02, 0xE4, 0x03, // 227 + 0x00, 0x00, 0x00, 0x03, 0xA8, 0x02, 0xA0, 0x02, 0xE8, 0x03, // 228 + 0x00, 0x00, 0x00, 0x03, 0xAE, 0x02, 0xAA, 0x02, 0xEE, 0x03, // 229 + 0x00, 0x00, 0x40, 0x03, 0xA0, 0x02, 0xA0, 0x02, 0xC0, 0x01, 0xA0, 0x02, 0xA0, 0x02, 0xC0, 0x02, // 230 + 0x00, 0x00, 0xC0, 0x01, 0x20, 0x16, 0x20, 0x1A, 0x40, 0x01, // 231 + 0x00, 0x00, 0xC0, 0x01, 0xA4, 0x02, 0xA8, 0x02, 0xC0, 0x02, // 232 + 0x00, 0x00, 0xC0, 0x01, 0xA8, 0x02, 0xA4, 0x02, 0xC0, 0x02, // 233 + 0x00, 0x00, 0xC0, 0x01, 0xA8, 0x02, 0xA4, 0x02, 0xC8, 0x02, // 234 + 0x00, 0x00, 0xC0, 0x01, 0xA8, 0x02, 0xA0, 0x02, 0xC8, 0x02, // 235 + 0x00, 0x00, 0xE4, 0x03, 0x08, // 236 + 0x08, 0x00, 0xE4, 0x03, // 237 + 0x08, 0x00, 0xE4, 0x03, 0x08, // 238 + 0x08, 0x00, 0xE0, 0x03, 0x08, // 239 + 0x00, 0x00, 0xC0, 0x01, 0x28, 0x02, 0x38, 0x02, 0xE0, 0x01, // 240 + 0x00, 0x00, 0xE8, 0x03, 0x24, 0x00, 0x28, 0x00, 0xC4, 0x03, // 241 + 0x00, 0x00, 0xC0, 0x01, 0x24, 0x02, 0x28, 0x02, 0xC0, 0x01, // 242 + 0x00, 0x00, 0xC0, 0x01, 0x28, 0x02, 0x24, 0x02, 0xC0, 0x01, // 243 + 0x00, 0x00, 0xC0, 0x01, 0x28, 0x02, 0x24, 0x02, 0xC8, 0x01, // 244 + 0x00, 0x00, 0xC8, 0x01, 0x24, 0x02, 0x28, 0x02, 0xC4, 0x01, // 245 + 0x00, 0x00, 0xC0, 0x01, 0x28, 0x02, 0x20, 0x02, 0xC8, 0x01, // 246 + 0x40, 0x00, 0x40, 0x00, 0x50, 0x01, 0x40, 0x00, 0x40, // 247 + 0x00, 0x00, 0xC0, 0x02, 0xA0, 0x03, 0x60, 0x02, 0xA0, 0x01, // 248 + 0x00, 0x00, 0xE0, 0x01, 0x04, 0x02, 0x08, 0x02, 0xE0, 0x03, // 249 + 0x00, 0x00, 0xE0, 0x01, 0x08, 0x02, 0x04, 0x02, 0xE0, 0x03, // 250 + 0x00, 0x00, 0xE8, 0x01, 0x04, 0x02, 0x08, 0x02, 0xE0, 0x03, // 251 + 0x00, 0x00, 0xE0, 0x01, 0x08, 0x02, 0x00, 0x02, 0xE8, 0x03, // 252 + 0x20, 0x00, 0xC0, 0x09, 0x08, 0x06, 0xC4, 0x01, 0x20, // 253 + 0x00, 0x00, 0xF8, 0x0F, 0x20, 0x02, 0x20, 0x02, 0xC0, 0x01, // 254 + 0x20, 0x00, 0xC8, 0x09, 0x00, 0x06, 0xC8, 0x01, 0x20, // 255 +}; \ No newline at end of file diff --git a/src/graphics/fonts/OLEDDisplayFontsPL.h b/src/graphics/fonts/OLEDDisplayFontsPL.h new file mode 100644 index 000000000..59dd92c41 --- /dev/null +++ b/src/graphics/fonts/OLEDDisplayFontsPL.h @@ -0,0 +1,11 @@ +#ifndef OLEDDISPLAYFONTSPL_h +#define OLEDDISPLAYFONTSPL_h + +#ifdef ARDUINO +#include +#elif __MBED__ +#define PROGMEM +#endif + +extern const uint8_t ArialMT_Plain_10_PL[] PROGMEM; +#endif \ No newline at end of file diff --git a/src/graphics/images.h b/src/graphics/images.h index 207fc3a86..2b0854a33 100644 --- a/src/graphics/images.h +++ b/src/graphics/images.h @@ -14,7 +14,14 @@ const uint8_t imgUser[] PROGMEM = {0x3C, 0x42, 0x99, 0xA5, 0xA5, 0x99, 0x42, 0x3 const uint8_t imgPositionEmpty[] PROGMEM = {0x20, 0x30, 0x28, 0x24, 0x42, 0xFF}; const uint8_t imgPositionSolid[] PROGMEM = {0x20, 0x30, 0x38, 0x3C, 0x7E, 0xFF}; -#if (defined(USE_EINK) || defined(ILI9341_DRIVER) || defined(ST7735_CS) || defined(ST7789_CS) || ARCH_PORTDUINO) && \ +#ifdef T_WATCH_S3 +const uint8_t bluetoothConnectedIcon[36] PROGMEM = {0xfe, 0x01, 0xff, 0x03, 0x03, 0x03, 0x03, 0x03, 0x03, 0x00, 0xe3, 0x1f, + 0xf3, 0x3f, 0x33, 0x30, 0x33, 0x33, 0x33, 0x33, 0x03, 0x33, 0xff, 0x33, + 0xfe, 0x31, 0x00, 0x30, 0x30, 0x30, 0x30, 0x30, 0xf0, 0x3f, 0xe0, 0x1f}; +#endif + +#if (defined(USE_EINK) || defined(ILI9341_DRIVER) || defined(ILI9342_DRIVER) || defined(ST7701_CS) || defined(ST7735_CS) || \ + defined(ST7789_CS) || defined(USE_ST7789) || defined(HX8357_CS) || ARCH_PORTDUINO) && \ !defined(DISPLAY_FORCE_SMALL_FONTS) const uint8_t imgQuestionL1[] PROGMEM = {0xff, 0x01, 0x01, 0x32, 0x7b, 0x49, 0x49, 0x6f, 0x26, 0x01, 0x01, 0xff}; const uint8_t imgQuestionL2[] PROGMEM = {0x0f, 0x08, 0x08, 0x08, 0x06, 0x0f, 0x0f, 0x06, 0x08, 0x08, 0x08, 0x0f}; @@ -30,4 +37,171 @@ const uint8_t imgQuestion[] PROGMEM = {0xbf, 0x41, 0xc0, 0x8b, 0xdb, 0x70, 0xa1, const uint8_t imgSF[] PROGMEM = {0xd2, 0xb7, 0xad, 0xbb, 0x92, 0x01, 0xfd, 0xfd, 0x15, 0x85, 0xf5}; #endif -#include "img/icon.xbm" \ No newline at end of file +#ifndef EXCLUDE_EMOJI +#define thumbs_height 25 +#define thumbs_width 25 +static unsigned char thumbup[] PROGMEM = { + 0x00, 0x1C, 0x00, 0x00, 0x00, 0x24, 0x00, 0x00, 0x00, 0x12, 0x00, 0x00, 0x00, 0x11, 0x00, 0x00, 0x80, 0x09, 0x00, 0x00, + 0xC0, 0x08, 0x00, 0x00, 0x40, 0x08, 0x00, 0x00, 0x20, 0x04, 0x00, 0x00, 0x10, 0x04, 0x00, 0x00, 0x18, 0x02, 0x00, 0x00, + 0x0C, 0xCE, 0x7F, 0x00, 0x04, 0x20, 0x80, 0x00, 0x02, 0x20, 0x80, 0x00, 0x02, 0x60, 0xC0, 0x00, 0x01, 0xF8, 0xFF, 0x01, + 0x01, 0x08, 0x00, 0x01, 0x01, 0x08, 0x00, 0x01, 0x01, 0xF8, 0xFF, 0x00, 0x01, 0x10, 0x80, 0x00, 0x01, 0x18, 0x80, 0x00, + 0x02, 0x30, 0xC0, 0x00, 0x06, 0xE0, 0x3F, 0x00, 0x0C, 0x20, 0x30, 0x00, 0x38, 0x20, 0x10, 0x00, 0xE0, 0xCF, 0x1F, 0x00, +}; + +static unsigned char thumbdown[] PROGMEM = { + 0xE0, 0xCF, 0x1F, 0x00, 0x38, 0x20, 0x10, 0x00, 0x0C, 0x20, 0x30, 0x00, 0x06, 0xE0, 0x3F, 0x00, 0x02, 0x30, 0xC0, 0x00, + 0x01, 0x18, 0x80, 0x00, 0x01, 0x10, 0x80, 0x00, 0x01, 0xF8, 0xFF, 0x00, 0x01, 0x08, 0x00, 0x01, 0x01, 0x08, 0x00, 0x01, + 0x01, 0xF8, 0xFF, 0x01, 0x02, 0x60, 0xC0, 0x00, 0x02, 0x20, 0x80, 0x00, 0x04, 0x20, 0x80, 0x00, 0x0C, 0xCE, 0x7F, 0x00, + 0x18, 0x02, 0x00, 0x00, 0x10, 0x04, 0x00, 0x00, 0x20, 0x04, 0x00, 0x00, 0x40, 0x08, 0x00, 0x00, 0xC0, 0x08, 0x00, 0x00, + 0x80, 0x09, 0x00, 0x00, 0x00, 0x11, 0x00, 0x00, 0x00, 0x12, 0x00, 0x00, 0x00, 0x24, 0x00, 0x00, 0x00, 0x1C, 0x00, 0x00, +}; + +#define question_height 25 +#define question_width 25 +static unsigned char question[] PROGMEM = { + 0x00, 0x00, 0x00, 0x00, 0x00, 0x3C, 0x00, 0x00, 0x80, 0xFF, 0x01, 0x00, 0xC0, 0xFF, 0x07, 0x00, 0xE0, 0xFF, 0x07, 0x00, + 0xE0, 0xC3, 0x0F, 0x00, 0xF0, 0x81, 0x0F, 0x00, 0xF0, 0x01, 0x0F, 0x00, 0x00, 0x00, 0x0F, 0x00, 0x00, 0x80, 0x0F, 0x00, + 0x00, 0xC0, 0x0F, 0x00, 0x00, 0xE0, 0x07, 0x00, 0x00, 0xF0, 0x03, 0x00, 0x00, 0xF8, 0x01, 0x00, 0x00, 0x7C, 0x00, 0x00, + 0x00, 0x3C, 0x00, 0x00, 0x00, 0x3E, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x3E, 0x00, 0x00, 0x00, 0x3E, 0x00, 0x00, 0x00, 0x3E, 0x00, 0x00, 0x00, 0x3E, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, +}; + +#define bang_height 30 +#define bang_width 30 +static unsigned char bang[] PROGMEM = { + 0xFF, 0x0F, 0xFC, 0x3F, 0xFF, 0x0F, 0xFC, 0x3F, 0xFF, 0x0F, 0xFC, 0x3F, 0xFF, 0x07, 0xF8, 0x3F, 0xFF, 0x07, 0xF8, 0x3F, + 0xFE, 0x07, 0xF8, 0x1F, 0xFE, 0x07, 0xF8, 0x1F, 0xFE, 0x07, 0xF8, 0x1F, 0xFE, 0x07, 0xF8, 0x1F, 0xFE, 0x07, 0xF8, 0x1F, + 0xFE, 0x03, 0xF0, 0x1F, 0xFE, 0x03, 0xF0, 0x1F, 0xFC, 0x03, 0xF0, 0x0F, 0xFC, 0x03, 0xF0, 0x0F, 0xFC, 0x03, 0xF0, 0x0F, + 0xFC, 0x03, 0xF0, 0x0F, 0xFC, 0x03, 0xF0, 0x0F, 0xFC, 0x03, 0xF0, 0x0F, 0xFC, 0x01, 0xE0, 0x0F, 0xFC, 0x01, 0xE0, 0x0F, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xF0, 0x00, 0xC0, 0x03, 0xFC, 0x03, 0xF0, 0x0F, 0xFE, 0x03, 0xF0, 0x1F, + 0xFE, 0x07, 0xF8, 0x1F, 0xFE, 0x07, 0xF8, 0x1F, 0xFE, 0x07, 0xF8, 0x1F, 0xFC, 0x03, 0xF0, 0x0F, 0xF8, 0x01, 0xE0, 0x07, +}; + +#define haha_height 30 +#define haha_width 30 +static unsigned char haha[] PROGMEM = { + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xE0, 0x01, 0x00, + 0x00, 0xFC, 0x0F, 0x00, 0x00, 0x1F, 0x3E, 0x00, 0x80, 0x03, 0x70, 0x00, 0xC0, 0x01, 0xE0, 0x00, 0xC0, 0x00, 0xC2, 0x00, + 0x60, 0x00, 0x03, 0x00, 0x60, 0x00, 0xC1, 0x1F, 0x60, 0x80, 0x8F, 0x31, 0x30, 0x0E, 0x80, 0x31, 0x30, 0x10, 0x30, 0x1F, + 0x30, 0x08, 0x58, 0x00, 0x30, 0x04, 0x6C, 0x03, 0x60, 0x00, 0xF3, 0x01, 0x60, 0xC0, 0xFC, 0x01, 0x80, 0x38, 0xBF, 0x01, + 0xE0, 0xC5, 0xDF, 0x00, 0xB0, 0xF9, 0xEF, 0x00, 0x30, 0xF1, 0x73, 0x00, 0xB0, 0x1D, 0x3E, 0x00, 0xF0, 0xFD, 0x0F, 0x00, + 0xE0, 0xE0, 0x01, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, +}; + +#define wave_icon_height 30 +#define wave_icon_width 30 +static unsigned char wave_icon[] PROGMEM = { + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x0C, 0x00, 0x00, 0x00, 0x70, 0x00, 0x00, 0x00, 0xC0, 0x00, + 0x00, 0x0C, 0x9C, 0x01, 0x80, 0x17, 0x20, 0x01, 0x80, 0x26, 0x46, 0x02, 0x80, 0x44, 0x88, 0x02, 0xC0, 0x89, 0x8A, 0x02, + 0x40, 0x93, 0x8B, 0x02, 0x40, 0x26, 0x13, 0x00, 0x80, 0x44, 0x16, 0x00, 0xC0, 0x89, 0x24, 0x00, 0x40, 0x93, 0x60, 0x00, + 0x40, 0x26, 0x40, 0x00, 0x80, 0x0C, 0x80, 0x00, 0x00, 0x09, 0x80, 0x00, 0x00, 0x02, 0x80, 0x00, 0x40, 0x06, 0x80, 0x00, + 0x50, 0x0C, 0x80, 0x00, 0x50, 0x08, 0x40, 0x00, 0x90, 0x10, 0x20, 0x00, 0xB0, 0x21, 0x10, 0x00, 0x20, 0x47, 0x18, 0x00, + 0x40, 0x80, 0x0F, 0x00, 0x80, 0x01, 0x00, 0x00, 0x00, 0x06, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, +}; + +#define cowboy_height 30 +#define cowboy_width 30 +static unsigned char cowboy[] PROGMEM = { + 0x00, 0xF0, 0x03, 0x00, 0x00, 0xFC, 0x0F, 0x00, 0x00, 0xFE, 0x1F, 0x00, 0x00, 0xFF, 0x3F, 0x00, 0x3C, 0xFE, 0x1F, 0x0F, + 0xFE, 0xFE, 0xDF, 0x1F, 0xFF, 0xFF, 0xFF, 0x3F, 0xFF, 0xFF, 0xFF, 0x3F, 0xFF, 0xFF, 0xFF, 0x3F, 0xFF, 0xFF, 0xFF, 0x3F, + 0x3E, 0xC0, 0x00, 0x1F, 0x1E, 0x00, 0x00, 0x1E, 0x0C, 0x0C, 0x0C, 0x0C, 0x08, 0x0E, 0x1C, 0x04, 0x00, 0x0E, 0x1C, 0x00, + 0x04, 0x0E, 0x1C, 0x08, 0x04, 0x0E, 0x1C, 0x08, 0x04, 0x04, 0x08, 0x08, 0x04, 0x00, 0x00, 0x08, 0x04, 0x00, 0x00, 0x08, + 0x8C, 0x07, 0x70, 0x0C, 0x88, 0xFC, 0x4F, 0x04, 0x88, 0x01, 0x40, 0x04, 0x90, 0xFF, 0x7F, 0x02, 0x30, 0x03, 0x30, 0x03, + 0x60, 0x0E, 0x9C, 0x01, 0xC0, 0xF8, 0xC7, 0x00, 0x80, 0x01, 0x60, 0x00, 0x00, 0x0E, 0x1C, 0x00, 0x00, 0xF8, 0x07, 0x00, +}; + +#define deadmau5_height 30 +#define deadmau5_width 60 +static unsigned char deadmau5[] PROGMEM = { + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xF8, 0x07, 0x00, + 0x00, 0xFC, 0x03, 0x00, 0x00, 0xFF, 0x3F, 0x00, 0x80, 0xFF, 0x0F, 0x00, 0xC0, 0xFF, 0xFF, 0x00, 0xE0, 0xFF, 0x3F, 0x00, + 0xE0, 0xFF, 0xFF, 0x01, 0xF0, 0xFF, 0x7F, 0x00, 0xF0, 0xFF, 0xFF, 0x03, 0xF8, 0xFF, 0xFF, 0x00, 0xF0, 0xFF, 0xFF, 0x07, + 0xFC, 0xFF, 0xFF, 0x00, 0xF0, 0xFF, 0xFF, 0x0F, 0xFC, 0xFF, 0xFF, 0x00, 0xF0, 0xFF, 0xFF, 0x0F, 0xFE, 0xFF, 0xFF, 0x00, + 0xF0, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0x00, 0xF0, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0x00, 0xE0, 0xFF, 0x3F, 0xFC, + 0x0F, 0xFF, 0x7F, 0x00, 0xC0, 0xFF, 0x1F, 0xF8, 0x0F, 0xFC, 0x3F, 0x00, 0x80, 0xFF, 0x0F, 0xF8, 0x1F, 0xFC, 0x1F, 0x00, + 0x00, 0xFF, 0x0F, 0xFC, 0x3F, 0xFC, 0x0F, 0x00, 0x00, 0xF8, 0x1F, 0xFF, 0xFF, 0xFE, 0x01, 0x00, 0x00, 0x00, 0xFC, 0xFF, + 0xFF, 0x07, 0x00, 0x00, 0x00, 0x00, 0xFC, 0xFF, 0xFF, 0x0F, 0x00, 0x00, 0x00, 0x00, 0x04, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x04, 0x00, 0x00, 0x04, 0x00, 0x00, 0x00, 0x00, 0x08, 0x00, 0x00, 0x04, 0x00, 0x00, 0x00, 0x00, 0x18, 0x00, + 0x00, 0x02, 0x00, 0x00, 0x00, 0x00, 0x30, 0x00, 0x00, 0x01, 0x00, 0x00, 0x00, 0x00, 0xE0, 0x00, 0xC0, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x80, 0x07, 0x38, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xFC, 0x0F, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, +}; + +#define sun_width 30 +#define sun_height 30 +static unsigned char sun[] PROGMEM = { + 0x00, 0xC0, 0x00, 0x00, 0x00, 0xE0, 0x01, 0x00, 0x00, 0xE0, 0x01, 0x00, 0x00, 0xE0, 0x01, 0x00, 0x30, 0xC0, 0x00, 0x03, + 0x70, 0x00, 0x80, 0x03, 0xF0, 0x00, 0xC0, 0x03, 0xF0, 0xF8, 0xC7, 0x03, 0xE0, 0xFC, 0xCF, 0x01, 0x00, 0xFE, 0x1F, 0x00, + 0x00, 0xFF, 0x3F, 0x00, 0x80, 0xFF, 0x7F, 0x00, 0x80, 0xFF, 0x7F, 0x00, 0x8E, 0xFF, 0x7F, 0x1C, 0x9F, 0xFF, 0x7F, 0x3E, + 0x9F, 0xFF, 0x7F, 0x3E, 0x8E, 0xFF, 0x7F, 0x1C, 0x80, 0xFF, 0x7F, 0x00, 0x80, 0xFF, 0x7F, 0x00, 0x00, 0xFF, 0x3F, 0x00, + 0x00, 0xFE, 0x1F, 0x00, 0x00, 0xFC, 0x0F, 0x00, 0xC0, 0xF9, 0xE7, 0x00, 0xE0, 0x01, 0xE0, 0x01, 0xF0, 0x01, 0xE0, 0x03, + 0xF0, 0xC0, 0xC0, 0x03, 0x00, 0xE0, 0x01, 0x00, 0x00, 0xE0, 0x01, 0x00, 0x00, 0xE0, 0x01, 0x00, 0x00, 0xC0, 0x00, 0x00, +}; + +#define rain_width 30 +#define rain_height 30 +static unsigned char rain[] PROGMEM = { + 0xC0, 0x0F, 0xC0, 0x00, 0x40, 0x00, 0x80, 0x00, 0x20, 0x00, 0x80, 0x00, 0x20, 0x00, 0x80, 0x03, 0x38, 0x00, + 0x00, 0x0E, 0x0C, 0x00, 0x00, 0x18, 0x02, 0x00, 0x00, 0x10, 0x03, 0x00, 0x00, 0x30, 0x01, 0x00, 0x00, 0x20, + 0x01, 0x00, 0x00, 0x20, 0x01, 0x00, 0x00, 0x20, 0x01, 0x00, 0x00, 0x20, 0x03, 0x00, 0x00, 0x30, 0x02, 0x00, + 0x00, 0x10, 0x06, 0x00, 0x00, 0x08, 0xFC, 0xFF, 0xFF, 0x07, 0xF0, 0xFF, 0xFF, 0x01, 0x80, 0x00, 0x01, 0x00, + 0xC0, 0xC0, 0x81, 0x03, 0xA0, 0x60, 0xC1, 0x03, 0x90, 0x20, 0x41, 0x01, 0xF0, 0xE0, 0xC0, 0x01, 0x60, 0x4C, + 0x98, 0x00, 0x00, 0x0E, 0x1C, 0x00, 0x00, 0x0B, 0x12, 0x00, 0x00, 0x09, 0x1A, 0x00, 0x00, 0x06, 0x0E, 0x00, +}; + +#define cloud_height 30 +#define cloud_width 30 +static unsigned char cloud[] PROGMEM = { + 0x00, 0x80, 0x07, 0x00, 0x00, 0xE0, 0x1F, 0x00, 0x00, 0x70, 0x30, 0x00, 0x00, 0x10, 0x60, 0x00, 0x80, 0x1F, 0x40, 0x00, + 0xC0, 0x0F, 0xC0, 0x00, 0xC0, 0x00, 0x80, 0x00, 0x60, 0x00, 0x80, 0x00, 0x20, 0x00, 0x80, 0x00, 0x20, 0x00, 0x80, 0x01, + 0x20, 0x00, 0x00, 0x07, 0x38, 0x00, 0x00, 0x0C, 0x0C, 0x00, 0x00, 0x08, 0x06, 0x00, 0x00, 0x18, 0x02, 0x00, 0x00, 0x10, + 0x02, 0x00, 0x00, 0x30, 0x03, 0x00, 0x00, 0x20, 0x01, 0x00, 0x00, 0x20, 0x01, 0x00, 0x00, 0x20, 0x01, 0x00, 0x00, 0x20, + 0x01, 0x00, 0x00, 0x20, 0x01, 0x00, 0x00, 0x20, 0x01, 0x00, 0x00, 0x20, 0x01, 0x00, 0x00, 0x30, 0x03, 0x00, 0x00, 0x10, + 0x02, 0x00, 0x00, 0x10, 0x06, 0x00, 0x00, 0x18, 0x0C, 0x00, 0x00, 0x0C, 0xFC, 0xFF, 0xFF, 0x07, 0xF0, 0xFF, 0xFF, 0x03, +}; + +#define fog_height 25 +#define fog_width 25 +static unsigned char fog[] PROGMEM = { + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x78, 0x00, 0x3C, 0x00, 0xFE, 0x01, 0xFF, 0x00, 0x87, 0xC7, 0xC3, 0x01, 0x03, 0xFE, 0x80, 0x01, + 0x00, 0x38, 0x00, 0x00, 0xFC, 0x00, 0x7E, 0x00, 0xFF, 0x83, 0xFF, 0x01, 0x03, 0xFF, 0x81, 0x01, 0x00, 0x7C, 0x00, 0x00, + 0xF8, 0x00, 0x3E, 0x00, 0xFE, 0x01, 0xFF, 0x00, 0x87, 0xC7, 0xC3, 0x01, 0x03, 0xFE, 0x80, 0x01, 0x00, 0x38, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, +}; + +#define devil_height 30 +#define devil_width 30 +static unsigned char devil[] PROGMEM = { + 0x00, 0x00, 0x00, 0x00, 0x03, 0x00, 0x00, 0x10, 0x03, 0xC0, 0x01, 0x38, 0x07, 0x7C, 0x0F, 0x38, 0x1F, 0x03, 0x30, 0x1E, + 0xFE, 0x01, 0xE0, 0x1F, 0x7E, 0x00, 0x80, 0x1F, 0x3C, 0x00, 0x00, 0x0F, 0x1C, 0x00, 0x00, 0x0E, 0x18, 0x00, 0x00, 0x06, + 0x08, 0x00, 0x00, 0x04, 0x0C, 0x00, 0x00, 0x0C, 0x0C, 0x00, 0x00, 0x0C, 0x0C, 0x00, 0x00, 0x0C, 0x0C, 0x0E, 0x1C, 0x0C, + 0x0C, 0x18, 0x06, 0x0C, 0x0C, 0x1C, 0x06, 0x0C, 0x0C, 0x1C, 0x0E, 0x0C, 0x0C, 0x1C, 0x0E, 0x0C, 0x0C, 0x0C, 0x06, 0x0C, + 0x08, 0x00, 0x00, 0x06, 0x18, 0x02, 0x10, 0x06, 0x10, 0x0C, 0x0C, 0x03, 0x30, 0xF8, 0x07, 0x03, 0x60, 0xE0, 0x80, 0x01, + 0xC0, 0x00, 0xC0, 0x00, 0x80, 0x01, 0x70, 0x00, 0x00, 0x06, 0x1C, 0x00, 0x00, 0xF0, 0x03, 0x00, 0x00, 0x00, 0x00, 0x00, +}; + +#define heart_height 30 +#define heart_width 30 +static unsigned char heart[] PROGMEM = { + 0x00, 0x00, 0x00, 0x00, 0xC0, 0x03, 0xF0, 0x00, 0xF8, 0x0F, 0xFC, 0x07, 0xFC, 0x1F, 0x06, 0x0E, 0xFE, 0x3F, 0x03, 0x18, + 0xFE, 0xFF, 0x7F, 0x10, 0xFF, 0xFF, 0xFF, 0x31, 0xFF, 0xFF, 0xFF, 0x33, 0xFF, 0xFF, 0xFF, 0x37, 0xFF, 0xFF, 0xFF, 0x37, + 0xFF, 0xFF, 0xFF, 0x3F, 0xFF, 0xFF, 0xFF, 0x3F, 0xFF, 0xFF, 0xFF, 0x3F, 0xFE, 0xFF, 0xFF, 0x1F, 0xFE, 0xFF, 0xFF, 0x1F, + 0xFC, 0xFF, 0xFF, 0x0F, 0xFC, 0xFF, 0xFF, 0x0F, 0xF8, 0xFF, 0xFF, 0x07, 0xF0, 0xFF, 0xFF, 0x03, 0xF0, 0xFF, 0xFF, 0x03, + 0xE0, 0xFF, 0xFF, 0x01, 0xC0, 0xFF, 0xFF, 0x00, 0x80, 0xFF, 0x7F, 0x00, 0x00, 0xFF, 0x3F, 0x00, 0x00, 0xFE, 0x1F, 0x00, + 0x00, 0xFC, 0x0F, 0x00, 0x00, 0xF8, 0x07, 0x00, 0x00, 0xF0, 0x03, 0x00, 0x00, 0xE0, 0x01, 0x00, 0x00, 0x80, 0x00, 0x00, +}; + +#define poo_width 30 +#define poo_height 30 +static unsigned char poo[] PROGMEM = { + 0x00, 0x1C, 0x00, 0x00, 0x00, 0x78, 0x00, 0x00, 0x00, 0xEC, 0x01, 0x00, 0x00, 0x8C, 0x07, 0x00, 0x00, 0x0C, 0x06, 0x00, + 0x00, 0x24, 0x0C, 0x00, 0x00, 0x34, 0x08, 0x00, 0x00, 0x1F, 0x08, 0x00, 0xC0, 0x0F, 0x08, 0x00, 0xC0, 0x00, 0x3C, 0x00, + 0x60, 0x00, 0x7C, 0x00, 0x60, 0x00, 0xC6, 0x00, 0x20, 0x00, 0xCB, 0x00, 0xA0, 0xC7, 0xFF, 0x00, 0xE0, 0x7F, 0xF7, 0x00, + 0xF0, 0x18, 0xE3, 0x03, 0x78, 0x18, 0x41, 0x03, 0x6C, 0x9B, 0x5D, 0x06, 0x64, 0x9B, 0x5D, 0x04, 0x44, 0x1A, 0x41, 0x04, + 0x4C, 0xD8, 0x63, 0x06, 0xF8, 0xFC, 0x36, 0x06, 0xFE, 0x0F, 0x9C, 0x1F, 0x07, 0x03, 0xC0, 0x30, 0x03, 0x00, 0x78, 0x20, + 0x01, 0x00, 0x1F, 0x20, 0x03, 0xE0, 0x03, 0x20, 0x07, 0x7E, 0x04, 0x30, 0xFE, 0x0F, 0xFC, 0x1F, 0xF0, 0x00, 0xF0, 0x0F, +}; +#endif + +#include "img/icon.xbm" diff --git a/src/graphics/img/icon.xbm b/src/graphics/img/icon.xbm index 297f31ed6..4e78ae8a1 100644 --- a/src/graphics/img/icon.xbm +++ b/src/graphics/img/icon.xbm @@ -1,3 +1,4 @@ +#ifndef USERPREFS_HAS_SPLASH #define icon_width 50 #define icon_height 28 static uint8_t icon_bits[] = { @@ -17,4 +18,5 @@ static uint8_t icon_bits[] = { 0xFE, 0x00, 0x00, 0xFC, 0x01, 0x7E, 0x00, 0x7F, 0x00, 0x00, 0xF8, 0x01, 0x7E, 0x00, 0x3E, 0x00, 0x00, 0xF8, 0x01, 0x38, 0x00, 0x3C, 0x00, 0x00, 0x70, 0x00, 0x10, 0x00, 0x10, 0x00, 0x00, 0x20, 0x00, 0x00, 0x00, 0x00, - 0x00, 0x00, 0x00, 0x00, }; \ No newline at end of file + 0x00, 0x00, 0x00, 0x00, }; +#endif \ No newline at end of file diff --git a/src/input/ExpressLRSFiveWay.cpp b/src/input/ExpressLRSFiveWay.cpp new file mode 100644 index 000000000..af4433dae --- /dev/null +++ b/src/input/ExpressLRSFiveWay.cpp @@ -0,0 +1,259 @@ +#include "ExpressLRSFiveWay.h" +#include "Throttle.h" + +#ifdef INPUTBROKER_EXPRESSLRSFIVEWAY_TYPE + +static const char inputSourceName[] = "ExpressLRS5Way"; // should match "allow input source" string + +/** + * @brief Calculate fuzz: half the distance to the next nearest neighbor for each joystick position. + * + * The goal is to avoid collisions between joystick positions while still maintaining + * the widest tolerance for the analog value. + * + * Example: {10,50,800,1000,300,1600} + * If we just choose the minimum difference for this array the value would + * be 40/2 = 20. + * + * 20 does not leave enough room for the joystick position using 1600 which + * could have a +-100 offset. + * + * Example Fuzz values: {20, 20, 100, 100, 125, 300} now the fuzz for the 1600 + * position is 300 instead of 20 + */ +void ExpressLRSFiveWay::calcFuzzValues() +{ + for (unsigned int i = 0; i < N_JOY_ADC_VALUES; i++) { + uint16_t closestDist = 0xffff; + uint16_t ival = joyAdcValues[i]; + // Find the closest value to ival + for (unsigned int j = 0; j < N_JOY_ADC_VALUES; j++) { + // Don't compare value with itself + if (j == i) + continue; + uint16_t jval = joyAdcValues[j]; + if (jval < ival && (ival - jval < closestDist)) + closestDist = ival - jval; + if (jval > ival && (jval - ival < closestDist)) + closestDist = jval - ival; + } // for j + + // And the fuzz is half the distance to the closest value + fuzzValues[i] = closestDist / 2; + // DBG("joy%u=%u f=%u, ", i, ival, fuzzValues[i]); + } // for i +} + +int ExpressLRSFiveWay::readKey() +{ + uint16_t value = analogRead(PIN_JOYSTICK); + + constexpr uint8_t IDX_TO_INPUT[N_JOY_ADC_VALUES - 1] = {UP, DOWN, LEFT, RIGHT, OK}; + for (unsigned int i = 0; i < N_JOY_ADC_VALUES - 1; ++i) { + if (value < (joyAdcValues[i] + fuzzValues[i]) && value > (joyAdcValues[i] - fuzzValues[i])) + return IDX_TO_INPUT[i]; + } + return NO_PRESS; +} + +ExpressLRSFiveWay::ExpressLRSFiveWay() : concurrency::OSThread(inputSourceName) +{ + // ExpressLRS: init values + isLongPressed = false; + keyInProcess = NO_PRESS; + keyDownStart = 0; + + // Express LRS: calculate the threshold for interpreting ADC values as various buttons + calcFuzzValues(); + + // Meshtastic: register with canned messages + inputBroker->registerSource(this); +} + +// ExpressLRS: interpret reading as key events +void ExpressLRSFiveWay::update(int *keyValue, bool *keyLongPressed) +{ + *keyValue = NO_PRESS; + + int newKey = readKey(); + if (keyInProcess == NO_PRESS) { + // New key down + if (newKey != NO_PRESS) { + keyDownStart = millis(); + // DBGLN("down=%u", newKey); + } + } else { + // if key released + if (newKey == NO_PRESS) { + // DBGLN("up=%u", keyInProcess); + if (!isLongPressed) { + if (!Throttle::isWithinTimespanMs(keyDownStart, KEY_DEBOUNCE_MS)) { + *keyValue = keyInProcess; + *keyLongPressed = false; + } + } + isLongPressed = false; + } + // else if the key has changed while down, reset state for next go-around + else if (newKey != keyInProcess) { + newKey = NO_PRESS; + } + // else still pressing, waiting for long if not already signaled + else if (!isLongPressed) { + if (!Throttle::isWithinTimespanMs(keyDownStart, KEY_LONG_PRESS_MS)) { + *keyValue = keyInProcess; + *keyLongPressed = true; + isLongPressed = true; + } + } + } // if keyInProcess != NO_PRESS + + keyInProcess = newKey; +} + +// Meshtastic: runs at regular intervals +int32_t ExpressLRSFiveWay::runOnce() +{ + uint32_t now = millis(); + + // Dismiss any alert frames after 2 seconds + // Feedback for GPS toggle / adhoc ping + if (alerting && now > alertingSinceMs + 2000) { + alerting = false; + screen->endAlert(); + } + + // Get key events from ExpressLRS code + int keyValue; + bool longPressed; + update(&keyValue, &longPressed); + + // Do something about this key press + determineAction((KeyType)keyValue, longPressed ? LONG : SHORT); + + // If there has been recent key activity, poll the joystick slightly more frequently + if (now < keyDownStart + (20 * 1000UL)) // Within last 20 seconds + return 100; + + // Otherwise, poll slightly less often + // Too many missed pressed if much slower than 250ms + return 250; +} + +// Determine what action to take when a button press is detected +// Written verbose for easier remapping by user +void ExpressLRSFiveWay::determineAction(KeyType key, PressLength length) +{ + switch (key) { + case LEFT: + if (inCannedMessageMenu()) // If in canned message menu + sendKey(CANCEL); // exit the menu (press imaginary cancel key) + else + sendKey(LEFT); + break; + + case RIGHT: + if (inCannedMessageMenu()) // If in canned message menu: + sendKey(CANCEL); // exit the menu (press imaginary cancel key) + else + sendKey(RIGHT); + break; + + case UP: + if (length == LONG) + toggleGPS(); + else + sendKey(UP); + break; + + case DOWN: + if (length == LONG) + sendAdhocPing(); + else + sendKey(DOWN); + break; + + case OK: + if (length == LONG) + shutdown(); + else + click(); // Use instead of sendKey(OK). Works better when canned message module disabled + break; + + default: + break; + } +} + +// Feed input to the canned messages module +void ExpressLRSFiveWay::sendKey(KeyType key) +{ + InputEvent e; + e.source = inputSourceName; + e.inputEvent = key; + notifyObservers(&e); +} + +// Enable or Disable a connected GPS +// Contained as one method for easier remapping of buttons by user +void ExpressLRSFiveWay::toggleGPS() +{ +#if HAS_GPS && !MESHTASTIC_EXCLUDE_GPS + if (!config.device.disable_triple_click && (gps != nullptr)) { + gps->toggleGpsMode(); + screen->startAlert("GPS Toggled"); + alerting = true; + alertingSinceMs = millis(); + } +#endif +} + +// Send either node-info or position, on demand +// Contained as one method for easier remapping of buttons by user +void ExpressLRSFiveWay::sendAdhocPing() +{ + service->refreshLocalMeshNode(); + bool sentPosition = service->trySendPosition(NODENUM_BROADCAST, true); + + // Show custom alert frame, with multi-line centering + screen->startAlert([sentPosition](OLEDDisplay *display, OLEDDisplayUiState *state, int16_t x, int16_t y) -> void { + uint16_t x_offset = display->width() / 2; + uint16_t y_offset = 26; // Same constant as the default startAlert frame + display->setTextAlignment(TEXT_ALIGN_CENTER); + display->setFont(FONT_MEDIUM); + display->drawString(x_offset + x, y_offset + y, "Sent ad-hoc"); + display->drawString(x_offset + x, y_offset + FONT_HEIGHT_MEDIUM + y, sentPosition ? "position" : "nodeinfo"); + }); + + alerting = true; + alertingSinceMs = millis(); +} + +// Shutdown the node (enter deep-sleep) +// Contained as one method for easier remapping of buttons by user +void ExpressLRSFiveWay::shutdown() +{ + LOG_INFO("Shutdown from long press\n"); + powerFSM.trigger(EVENT_PRESS); + screen->startAlert("Shutting down..."); + // Don't set alerting = true. We don't want to auto-dismiss this alert. + + playShutdownMelody(); // In case user adds a buzzer + + shutdownAtMsec = millis() + 3000; +} + +// Emulate user button, or canned message SELECT +// This is necessary as canned message module doesn't translate SELECT to user button presses if the module is disabled +// Contained as one method for easier remapping of buttons by user +void ExpressLRSFiveWay::click() +{ + if (!moduleConfig.canned_message.enabled) + powerFSM.trigger(EVENT_PRESS); + else + sendKey(OK); +} + +ExpressLRSFiveWay *expressLRSFiveWayInput = nullptr; + +#endif \ No newline at end of file diff --git a/src/input/ExpressLRSFiveWay.h b/src/input/ExpressLRSFiveWay.h new file mode 100644 index 000000000..c53aa9c09 --- /dev/null +++ b/src/input/ExpressLRSFiveWay.h @@ -0,0 +1,85 @@ +/* + Input source for Radio Master Bandit Nano, and similar hardware. + Devices have a 5-button "resistor ladder" style joystick, read by ADC. + These devices do not use the ADC to monitor input voltage. + + Much of this code taken directly from ExpressLRS FiveWayButton class: + https://github.com/ExpressLRS/ExpressLRS/tree/d9f56f8bd6f9f7144d5f01caaca766383e1e0950/src/lib/SCREEN/FiveWayButton +*/ + +#pragma once + +#include "configuration.h" + +#ifdef INPUTBROKER_EXPRESSLRSFIVEWAY_TYPE + +#include +#include + +#include "InputBroker.h" +#include "MeshService.h" // For adhoc ping action +#include "buzz.h" +#include "concurrency/OSThread.h" +#include "graphics/Screen.h" // Feedback for adhoc ping / toggle GPS +#include "main.h" +#include "modules/CannedMessageModule.h" + +#if HAS_GPS && !MESHTASTIC_EXCLUDE_GPS +#include "GPS.h" // For toggle GPS action +#endif + +class ExpressLRSFiveWay : public Observable, public concurrency::OSThread +{ + private: + // Number of values in JOY_ADC_VALUES, if defined + // These must be ADC readings for {UP, DOWN, LEFT, RIGHT, ENTER, IDLE} + static constexpr size_t N_JOY_ADC_VALUES = 6; + static constexpr uint32_t KEY_DEBOUNCE_MS = 25; + static constexpr uint32_t KEY_LONG_PRESS_MS = 3000; // How many milliseconds to hold key for a long press + + // This merged an enum used by the ExpressLRS code, with meshtastic canned message values + // Key names are kept simple, to allow user customizaton + typedef enum { + UP = meshtastic_ModuleConfig_CannedMessageConfig_InputEventChar_UP, + DOWN = meshtastic_ModuleConfig_CannedMessageConfig_InputEventChar_DOWN, + LEFT = meshtastic_ModuleConfig_CannedMessageConfig_InputEventChar_LEFT, + RIGHT = meshtastic_ModuleConfig_CannedMessageConfig_InputEventChar_RIGHT, + OK = meshtastic_ModuleConfig_CannedMessageConfig_InputEventChar_SELECT, + CANCEL = meshtastic_ModuleConfig_CannedMessageConfig_InputEventChar_CANCEL, + NO_PRESS = meshtastic_ModuleConfig_CannedMessageConfig_InputEventChar_NONE + } KeyType; + + typedef enum { SHORT, LONG } PressLength; + + // From ExpressLRS + int keyInProcess; + uint32_t keyDownStart; + bool isLongPressed; + const uint16_t joyAdcValues[N_JOY_ADC_VALUES] = {JOYSTICK_ADC_VALS}; + uint16_t fuzzValues[N_JOY_ADC_VALUES]; + void calcFuzzValues(); + int readKey(); + void update(int *keyValue, bool *keyLongPressed); + + // Meshtastic code + void determineAction(KeyType key, PressLength length); + void sendKey(KeyType key); + inline bool inCannedMessageMenu() { return cannedMessageModule->shouldDraw(); } + int32_t runOnce() override; + + // Simplified Meshtastic actions, for easier remapping by user + void toggleGPS(); + void sendAdhocPing(); + void shutdown(); + void click(); + + bool alerting = false; // Is the screen showing an alert frame? Feedback for GPS toggle / adhoc ping actions + uint32_t alertingSinceMs = 0; // When did screen begin showing an alert frame? Used to auto-dismiss + + public: + ExpressLRSFiveWay(); +}; + +extern ExpressLRSFiveWay *expressLRSFiveWayInput; + +#endif \ No newline at end of file diff --git a/src/input/InputBroker.cpp b/src/input/InputBroker.cpp index b06c7400f..cb73e32ba 100644 --- a/src/input/InputBroker.cpp +++ b/src/input/InputBroker.cpp @@ -1,7 +1,7 @@ #include "InputBroker.h" #include "PowerFSM.h" // needed for event trigger -InputBroker *inputBroker; +InputBroker *inputBroker = nullptr; InputBroker::InputBroker(){}; diff --git a/src/input/InputBroker.h b/src/input/InputBroker.h index d73e6657a..db7524bb0 100644 --- a/src/input/InputBroker.h +++ b/src/input/InputBroker.h @@ -4,10 +4,28 @@ #define ANYKEY 0xFF #define MATRIXKEY 0xFE +#define INPUT_BROKER_MSG_BRIGHTNESS_UP 0x11 +#define INPUT_BROKER_MSG_BRIGHTNESS_DOWN 0x12 +#define INPUT_BROKER_MSG_REBOOT 0x90 +#define INPUT_BROKER_MSG_SHUTDOWN 0x9b +#define INPUT_BROKER_MSG_GPS_TOGGLE 0x9e +#define INPUT_BROKER_MSG_MUTE_TOGGLE 0xac +#define INPUT_BROKER_MSG_SEND_PING 0xaf +#define INPUT_BROKER_MSG_DISMISS_FRAME 0x8b +#define INPUT_BROKER_MSG_LEFT 0xb4 +#define INPUT_BROKER_MSG_UP 0xb5 +#define INPUT_BROKER_MSG_DOWN 0xb6 +#define INPUT_BROKER_MSG_RIGHT 0xb7 +#define INPUT_BROKER_MSG_FN_SYMBOL_ON 0xf1 +#define INPUT_BROKER_MSG_FN_SYMBOL_OFF 0xf2 +#define INPUT_BROKER_MSG_BLUETOOTH_TOGGLE 0xAA + typedef struct _InputEvent { const char *source; char inputEvent; char kbchar; + uint16_t touchX; + uint16_t touchY; } InputEvent; class InputBroker : public Observable { diff --git a/src/input/LinuxInput.cpp b/src/input/LinuxInput.cpp index d2a94e94e..57a87b0ef 100644 --- a/src/input/LinuxInput.cpp +++ b/src/input/LinuxInput.cpp @@ -24,7 +24,8 @@ LinuxInput::LinuxInput(const char *name) : concurrency::OSThread(name) void LinuxInput::deInit() { - close(fd); + if (fd >= 0) + close(fd); } int32_t LinuxInput::runOnce() @@ -146,14 +147,17 @@ int32_t LinuxInput::runOnce() case KEY_LEFT: // Left e.inputEvent = meshtastic_ModuleConfig_CannedMessageConfig_InputEventChar_LEFT; break; - e.kbchar = 0xb4; + e.kbchar = INPUT_BROKER_MSG_LEFT; case KEY_RIGHT: // Right e.inputEvent = meshtastic_ModuleConfig_CannedMessageConfig_InputEventChar_RIGHT; break; - e.kbchar = 0xb7; + e.kbchar = INPUT_BROKER_MSG_RIGHT; case KEY_ENTER: // Enter e.inputEvent = meshtastic_ModuleConfig_CannedMessageConfig_InputEventChar_SELECT; break; + case KEY_POWER: + system("poweroff"); + break; default: // all other keys if (keymap[code]) { e.inputEvent = ANYKEY; diff --git a/src/input/LinuxInput.h b/src/input/LinuxInput.h index aa1e8e340..43d08493c 100644 --- a/src/input/LinuxInput.h +++ b/src/input/LinuxInput.h @@ -38,7 +38,7 @@ class LinuxInput : public Observable, public concurrency::OS int queue_progress = 0; struct epoll_event events[MAX_EVENTS]; - int fd; + int fd = -1; int ret; uint8_t report[8]; int epollfd; diff --git a/src/input/ScanAndSelect.cpp b/src/input/ScanAndSelect.cpp new file mode 100644 index 000000000..65ca7e332 --- /dev/null +++ b/src/input/ScanAndSelect.cpp @@ -0,0 +1,205 @@ +#include "configuration.h" + +// Normally these input methods are protected by guarding in setupModules +// In order to have the user button dismiss the canned message frame, this class lightly interacts with the Screen class +#if HAS_SCREEN + +#include "ScanAndSelect.h" +#include "modules/CannedMessageModule.h" +#include + +// Config +static const char name[] = "scanAndSelect"; // should match "allow input source" string +static constexpr uint32_t durationShortMs = 50; +static constexpr uint32_t durationLongMs = 1500; +static constexpr uint32_t durationAlertMs = 2000; + +// Constructor: init base class +ScanAndSelectInput::ScanAndSelectInput() : concurrency::OSThread(name) {} + +// Attempt to setup class; true if success. +// Called by setupModules method. Instance deleted if setup fails. +bool ScanAndSelectInput::init() +{ + // Short circuit: Canned messages enabled? + if (!moduleConfig.canned_message.enabled) + return false; + + // Short circuit: Using correct "input source"? + // Todo: protobuf enum instead of string? + if (strcasecmp(moduleConfig.canned_message.allow_input_source, name) != 0) + return false; + + // Use any available inputbroker pin as the button + if (moduleConfig.canned_message.inputbroker_pin_press) + pin = moduleConfig.canned_message.inputbroker_pin_press; + else if (moduleConfig.canned_message.inputbroker_pin_a) + pin = moduleConfig.canned_message.inputbroker_pin_a; + else if (moduleConfig.canned_message.inputbroker_pin_b) + pin = moduleConfig.canned_message.inputbroker_pin_b; + else + return false; // Short circuit: no button found + + // Set-up the button + pinMode(pin, INPUT_PULLUP); + attachInterrupt(pin, handleChangeInterrupt, CHANGE); + + // Connect our class to the canned message module + inputBroker->registerSource(this); + + LOG_INFO("Initialized 'Scan and Select' input for Canned Messages, using pin %d\n", pin); + return true; // Init succeded +} + +// Runs periodically, unless sleeping between presses +int32_t ScanAndSelectInput::runOnce() +{ + uint32_t now = millis(); + + // If: "no messages added" alert screen currently shown + if (alertingNoMessage) { + // Dismiss the alert screen several seconds after it appears + if (now > alertingSinceMs + durationAlertMs) { + alertingNoMessage = false; + screen->endAlert(); + } + } + + // If: Button is pressed + if (digitalRead(pin) == LOW) { + // New press + if (!held) { + downSinceMs = now; + } + + // Existing press + else { + // Duration enough for long press + // Long press not yet fired (prevent repeat firing while held) + if (!longPressFired && Throttle::isWithinTimespanMs(downSinceMs, durationLongMs)) { + longPressFired = true; + longPress(); + } + } + + // Record the change of state: button is down + held = true; + } + + // If: Button is not pressed + else { + // Button newly released + // Long press event didn't already fire + if (held && !longPressFired) { + // Duration enough for short press + if (!Throttle::isWithinTimespanMs(downSinceMs, durationShortMs)) { + shortPress(); + } + } + + // Record the change of state: button is up + held = false; + longPressFired = false; // Re-Arm: allow another long press + } + + // If thread's job is done, let it sleep + if (!held && !alertingNoMessage) { + Thread::canSleep = true; + return OSThread::disable(); + } + + // Run this method again is a few ms + return durationShortMs; +} + +void ScanAndSelectInput::longPress() +{ + // (If canned messages set) + if (cannedMessageModule->hasMessages()) { + // If module frame displayed already, send the current message + if (cannedMessageModule->shouldDraw()) + raiseEvent(meshtastic_ModuleConfig_CannedMessageConfig_InputEventChar_SELECT); + + // Otherwise, initial long press opens the module frame + else + raiseEvent(meshtastic_ModuleConfig_CannedMessageConfig_InputEventChar_DOWN); + } + + // (If canned messages not set) tell the user + else + alertNoMessage(); +} + +void ScanAndSelectInput::shortPress() +{ + // (If canned messages set) scroll to next message + if (cannedMessageModule->hasMessages()) + raiseEvent(meshtastic_ModuleConfig_CannedMessageConfig_InputEventChar_DOWN); + + // (If canned messages not yet set) tell the user + else + alertNoMessage(); +} + +// Begin running runOnce at regular intervals +// Called from pin change interrupt +void ScanAndSelectInput::enableThread() +{ + Thread::canSleep = false; + OSThread::enabled = true; + OSThread::setIntervalFromNow(0); +} + +// Inform user (screen) that no canned messages have been added +// Automatically dismissed after several seconds +void ScanAndSelectInput::alertNoMessage() +{ + alertingNoMessage = true; + alertingSinceMs = millis(); + + // Graphics code: the alert frame to show on screen + screen->startAlert([](OLEDDisplay *display, OLEDDisplayUiState *state, int16_t x, int16_t y) -> void { + display->setTextAlignment(TEXT_ALIGN_CENTER_BOTH); + display->setFont(FONT_SMALL); + int16_t textX = display->getWidth() / 2; + int16_t textY = display->getHeight() / 2; + display->drawString(textX + x, textY + y, "No Canned Messages"); + }); +} + +// Remove the canned message frame from screen +// Used to dismiss the module frame when user button pressed +// Returns true if the frame was previously displayed, and has now been closed +// Return value consumed by Screen class when determining how to handle user button +bool ScanAndSelectInput::dismissCannedMessageFrame() +{ + if (cannedMessageModule->shouldDraw()) { + raiseEvent(meshtastic_ModuleConfig_CannedMessageConfig_InputEventChar_CANCEL); + return true; + } + + return false; +} + +// Feed input to the canned messages module +void ScanAndSelectInput::raiseEvent(_meshtastic_ModuleConfig_CannedMessageConfig_InputEventChar key) +{ + InputEvent e; + e.source = name; + e.inputEvent = key; + notifyObservers(&e); +} + +// Pin change interrupt +void ScanAndSelectInput::handleChangeInterrupt() +{ + // Because we need to detect both press and release (rising and falling edge), the interrupt itself can't determine the + // action. Instead, we start up the thread and get it to read the button for us + + // The instance we're referring to here is created in setupModules() + scanAndSelectInput->enableThread(); +} + +ScanAndSelectInput *scanAndSelectInput = nullptr; // Instantiated in setupModules method. Deleted if unused, or init() fails + +#endif \ No newline at end of file diff --git a/src/input/ScanAndSelect.h b/src/input/ScanAndSelect.h new file mode 100644 index 000000000..0b3e2716e --- /dev/null +++ b/src/input/ScanAndSelect.h @@ -0,0 +1,50 @@ +/* + A "single button" input method for Canned Messages + + - Short press to cycle through messages + - Long Press to send + + To use: + - set "allow input source" to "scanAndSelect" + - set the single button's GPIO as either pin A, pin B, or pin Press + + Originally designed to make use of "extra" built-in button on some boards. + Non-intrusive; suitable for use as a default module config. +*/ + +#pragma once +#include "concurrency/OSThread.h" +#include "main.h" + +// Normally these input methods are protected by guarding in setupModules +// In order to have the user button dismiss the canned message frame, this class lightly interacts with the Screen class +#if HAS_SCREEN + +class ScanAndSelectInput : public Observable, public concurrency::OSThread +{ + public: + ScanAndSelectInput(); // No-op constructor, only initializes OSThread base class + bool init(); // Attempt to setup class; true if success. Instance deleted if setup fails + bool dismissCannedMessageFrame(); // Remove the canned message frame from screen. True if frame was open, and now closed. + void alertNoMessage(); // Inform user (screen) that no canned messages have been added + + protected: + int32_t runOnce() override; // Runs at regular intervals, when enabled + void enableThread(); // Begin running runOnce at regular intervals + static void handleChangeInterrupt(); // Calls enableThread from pin change interrupt + void shortPress(); // Code to run when short press fires + void longPress(); // Code to run when long press fires + void raiseEvent(_meshtastic_ModuleConfig_CannedMessageConfig_InputEventChar key); // Feed input to canned message module + + bool held = false; // Have we handled a change in button state? + bool longPressFired = false; // Long press fires while button still held. This bool ensures the release is no-op + uint32_t downSinceMs = 0; // Debouncing for short press, timing for long press + uint8_t pin = -1; // Read from cannned message config during init + + bool alertingNoMessage = false; // Is the "no canned messages" alert shown on screen? + uint32_t alertingSinceMs = 0; // Used to dismiss the "no canned message" alert several seconds +}; + +extern ScanAndSelectInput *scanAndSelectInput; // Instantiated in setupModules method. Deleted if unused, or init() fails + +#endif \ No newline at end of file diff --git a/src/input/SerialKeyboard.cpp b/src/input/SerialKeyboard.cpp new file mode 100644 index 000000000..4827e8995 --- /dev/null +++ b/src/input/SerialKeyboard.cpp @@ -0,0 +1,171 @@ +#include "SerialKeyboard.h" +#include "configuration.h" +#include + +#ifdef INPUTBROKER_SERIAL_TYPE +#define CANNED_MESSAGE_MODULE_ENABLE 1 // in case it's not set in the variant file + +#if INPUTBROKER_SERIAL_TYPE == 1 // It's a Chatter +// 3 SHIFT level (lower case, upper case, numbers), up to 4 repeated presses, button number +unsigned char KeyMap[3][4][10] = {{{'.', 'a', 'd', 'g', 'j', 'm', 'p', 't', 'w', ' '}, + {',', 'b', 'e', 'h', 'k', 'n', 'q', 'u', 'x', ' '}, + {'?', 'c', 'f', 'i', 'l', 'o', 'r', 'v', 'y', ' '}, + {'1', '2', '3', '4', '5', '6', 's', '8', 'z', ' '}}, // low case + {{'!', 'A', 'D', 'G', 'J', 'M', 'P', 'T', 'W', ' '}, + {'+', 'B', 'E', 'H', 'K', 'N', 'Q', 'U', 'X', ' '}, + {'-', 'C', 'F', 'I', 'L', 'O', 'R', 'V', 'Y', ' '}, + {'1', '2', '3', '4', '5', '6', 'S', '8', 'Z', ' '}}, // upper case + {{'1', '2', '3', '4', '5', '6', '7', '8', '9', '0'}, + {'1', '2', '3', '4', '5', '6', '7', '8', '9', '0'}, + {'1', '2', '3', '4', '5', '6', '7', '8', '9', '0'}, + {'1', '2', '3', '4', '5', '6', '7', '8', '9', '0'}}}; // numbers + +#endif + +SerialKeyboard::SerialKeyboard(const char *name) : concurrency::OSThread(name) +{ + this->_originName = name; +} + +void SerialKeyboard::erase() +{ + InputEvent e; + e.inputEvent = meshtastic_ModuleConfig_CannedMessageConfig_InputEventChar_BACK; + e.kbchar = 0x08; + e.source = this->_originName; + this->notifyObservers(&e); +} + +int32_t SerialKeyboard::runOnce() +{ + if (!INPUTBROKER_SERIAL_TYPE) { + // Input device is not requested. + return disable(); + } + + if (firstTime) { + // This is the first time the OSThread library has called this function, so do port setup + firstTime = 0; + pinMode(KB_LOAD, OUTPUT); + pinMode(KB_CLK, OUTPUT); + pinMode(KB_DATA, INPUT); + digitalWrite(KB_LOAD, HIGH); + digitalWrite(KB_CLK, LOW); + prevKeys = 0b1111111111111111; + LOG_DEBUG("Serial Keyboard setup\n"); + } + + if (INPUTBROKER_SERIAL_TYPE == 1) { // Chatter V1.0 & V2.0 keypads + // scan for keypresses + // Write pulse to load pin + digitalWrite(KB_LOAD, LOW); + delayMicroseconds(5); + digitalWrite(KB_LOAD, HIGH); + delayMicroseconds(5); + + // Get data from 74HC165 + byte shiftRegister1 = shiftIn(KB_DATA, KB_CLK, LSBFIRST); + byte shiftRegister2 = shiftIn(KB_DATA, KB_CLK, LSBFIRST); + + keys = (shiftRegister1 << 8) + shiftRegister2; + + // Print to serial monitor + // Serial.print (shiftRegister1, BIN); + // Serial.print ("X"); + // Serial.println (shiftRegister2, BIN); + + if (!Throttle::isWithinTimespanMs(lastPressTime, 500)) { + quickPress = 0; + } + + if (keys < prevKeys) { // a new key has been pressed (and not released), doesn't works for multiple presses at once but + // shouldn't be a limitation + InputEvent e; + e.inputEvent = meshtastic_ModuleConfig_CannedMessageConfig_InputEventChar_NONE; + e.source = this->_originName; + // SELECT OR SEND OR CANCEL EVENT + if (!(shiftRegister2 & (1 << 3))) { + e.inputEvent = meshtastic_ModuleConfig_CannedMessageConfig_InputEventChar_UP; + } else if (!(shiftRegister2 & (1 << 2))) { + e.inputEvent = meshtastic_ModuleConfig_CannedMessageConfig_InputEventChar_RIGHT; + e.kbchar = INPUT_BROKER_MSG_RIGHT; + } else if (!(shiftRegister2 & (1 << 1))) { + e.inputEvent = meshtastic_ModuleConfig_CannedMessageConfig_InputEventChar_SELECT; + } else if (!(shiftRegister2 & (1 << 0))) { + e.inputEvent = meshtastic_ModuleConfig_CannedMessageConfig_InputEventChar_CANCEL; + } + + // TEXT INPUT EVENT + else if (!(shiftRegister1 & (1 << 4))) { + keyPressed = 0; + } else if (!(shiftRegister1 & (1 << 3))) { + keyPressed = 1; + } else if (!(shiftRegister2 & (1 << 4))) { + keyPressed = 2; + } else if (!(shiftRegister1 & (1 << 5))) { + keyPressed = 3; + } else if (!(shiftRegister1 & (1 << 2))) { + keyPressed = 4; + } else if (!(shiftRegister2 & (1 << 5))) { + keyPressed = 5; + } else if (!(shiftRegister1 & (1 << 6))) { + keyPressed = 6; + } else if (!(shiftRegister1 & (1 << 1))) { + keyPressed = 7; + } else if (!(shiftRegister2 & (1 << 6))) { + keyPressed = 8; + } else if (!(shiftRegister1 & (1 << 0))) { + keyPressed = 9; + } + // BACKSPACE or TAB + else if (!(shiftRegister1 & (1 << 7))) { + if (shift == 0 || shift == 2) { // BACKSPACE + e.inputEvent = meshtastic_ModuleConfig_CannedMessageConfig_InputEventChar_BACK; + e.kbchar = 0x08; + } else { // shift = 1 => TAB + e.inputEvent = ANYKEY; + e.kbchar = 0x09; + } + } + // SHIFT + else if (!(shiftRegister2 & (1 << 7))) { + keyPressed = 10; + } + + if (keyPressed < 11) { + if (keyPressed == lastKeyPressed && millis() - lastPressTime < 500) { + quickPress += 1; + if (quickPress > 3) { + quickPress = 0; + } + } + if (keyPressed != lastKeyPressed) { + quickPress = 0; + } + if (keyPressed < 10) { // if it's a letter + if (keyPressed == lastKeyPressed && millis() - lastPressTime < 500) { + erase(); + } + e.inputEvent = ANYKEY; + e.kbchar = char(KeyMap[shift][quickPress][keyPressed]); + } else { // then it's shift + shift += 1; + if (shift > 2) { + shift = 0; + } + } + lastPressTime = millis(); + lastKeyPressed = keyPressed; + keyPressed = 13; + } + + if (e.inputEvent != meshtastic_ModuleConfig_CannedMessageConfig_InputEventChar_NONE) { + this->notifyObservers(&e); + } + } + prevKeys = keys; + } + return 50; +} + +#endif // INPUTBROKER_SERIAL_TYPE \ No newline at end of file diff --git a/src/input/SerialKeyboard.h b/src/input/SerialKeyboard.h new file mode 100644 index 000000000..1480c4d58 --- /dev/null +++ b/src/input/SerialKeyboard.h @@ -0,0 +1,25 @@ +#pragma once + +#include "InputBroker.h" +#include "concurrency/OSThread.h" + +class SerialKeyboard : public Observable, public concurrency::OSThread +{ + public: + explicit SerialKeyboard(const char *name); + + protected: + virtual int32_t runOnce() override; + void erase(); + + private: + const char *_originName; + bool firstTime = 1; + int prevKeys = 0; + int keys = 0; + int shift = 0; + int keyPressed = 13; + int lastKeyPressed = 13; + int quickPress = 0; + unsigned long lastPressTime = 0; +}; \ No newline at end of file diff --git a/src/input/SerialKeyboardImpl.cpp b/src/input/SerialKeyboardImpl.cpp new file mode 100644 index 000000000..249b76fe3 --- /dev/null +++ b/src/input/SerialKeyboardImpl.cpp @@ -0,0 +1,21 @@ +#include "SerialKeyboardImpl.h" +#include "InputBroker.h" +#include "configuration.h" + +#ifdef INPUTBROKER_SERIAL_TYPE + +SerialKeyboardImpl *aSerialKeyboardImpl; + +SerialKeyboardImpl::SerialKeyboardImpl() : SerialKeyboard("serialKB") {} + +void SerialKeyboardImpl::init() +{ + if (!INPUTBROKER_SERIAL_TYPE) { + disable(); + return; + } + + inputBroker->registerSource(this); +} + +#endif // INPUTBROKER_SERIAL_TYPE \ No newline at end of file diff --git a/src/input/SerialKeyboardImpl.h b/src/input/SerialKeyboardImpl.h new file mode 100644 index 000000000..7f62aa420 --- /dev/null +++ b/src/input/SerialKeyboardImpl.h @@ -0,0 +1,19 @@ +#pragma once +#include "SerialKeyboard.h" +#include "main.h" + +/** + * @brief The idea behind this class to have static methods for the event handlers. + * Check attachInterrupt() at RotaryEncoderInteruptBase.cpp + * Technically you can have as many rotary encoders hardver attached + * to your device as you wish, but you always need to have separate event + * handlers, thus you need to have a RotaryEncoderInterrupt implementation. + */ +class SerialKeyboardImpl : public SerialKeyboard +{ + public: + SerialKeyboardImpl(); + void init(); +}; + +extern SerialKeyboardImpl *aSerialKeyboardImpl; \ No newline at end of file diff --git a/src/input/TouchScreenBase.h b/src/input/TouchScreenBase.h index a68c23e99..0b2002551 100644 --- a/src/input/TouchScreenBase.h +++ b/src/input/TouchScreenBase.h @@ -3,6 +3,7 @@ #include "InputBroker.h" #include "concurrency/OSThread.h" #include "mesh/NodeDB.h" +#include "time.h" typedef struct _TouchEvent { const char *source; diff --git a/src/input/TouchScreenImpl1.cpp b/src/input/TouchScreenImpl1.cpp index 3e4ed4163..20196278d 100644 --- a/src/input/TouchScreenImpl1.cpp +++ b/src/input/TouchScreenImpl1.cpp @@ -4,7 +4,7 @@ #include "configuration.h" #include "modules/ExternalNotificationModule.h" -#ifdef ARCH_PORTDUINO +#if ARCH_PORTDUINO #include "platform/portduino/PortduinoGlue.h" #endif @@ -49,6 +49,10 @@ void TouchScreenImpl1::onEvent(const TouchEvent &event) { InputEvent e; e.source = event.source; + + e.touchX = event.x; + e.touchY = event.y; + switch (event.touchEvent) { case TOUCH_ACTION_LEFT: { e.inputEvent = static_cast(meshtastic_ModuleConfig_CannedMessageConfig_InputEventChar_RIGHT); diff --git a/src/input/UpDownInterruptBase.cpp b/src/input/UpDownInterruptBase.cpp index ecc3b944a..b1f83c56b 100644 --- a/src/input/UpDownInterruptBase.cpp +++ b/src/input/UpDownInterruptBase.cpp @@ -1,7 +1,7 @@ #include "UpDownInterruptBase.h" #include "configuration.h" -UpDownInterruptBase::UpDownInterruptBase(const char *name) +UpDownInterruptBase::UpDownInterruptBase(const char *name) : concurrency::OSThread(name) { this->_originName = name; } @@ -24,31 +24,48 @@ void UpDownInterruptBase::init(uint8_t pinDown, uint8_t pinUp, uint8_t pinPress, attachInterrupt(this->_pinUp, onIntUp, RISING); LOG_DEBUG("Up/down/press GPIO initialized (%d, %d, %d)\n", this->_pinUp, this->_pinDown, pinPress); + + this->setInterval(100); +} + +int32_t UpDownInterruptBase::runOnce() +{ + InputEvent e; + e.inputEvent = meshtastic_ModuleConfig_CannedMessageConfig_InputEventChar_NONE; + + if (this->action == UPDOWN_ACTION_PRESSED) { + LOG_DEBUG("GPIO event Press\n"); + e.inputEvent = this->_eventPressed; + } else if (this->action == UPDOWN_ACTION_UP) { + LOG_DEBUG("GPIO event Up\n"); + e.inputEvent = this->_eventUp; + } else if (this->action == UPDOWN_ACTION_DOWN) { + LOG_DEBUG("GPIO event Down\n"); + e.inputEvent = this->_eventDown; + } + + if (e.inputEvent != meshtastic_ModuleConfig_CannedMessageConfig_InputEventChar_NONE) { + e.source = this->_originName; + e.kbchar = meshtastic_ModuleConfig_CannedMessageConfig_InputEventChar_NONE; + this->notifyObservers(&e); + } + + this->action = UPDOWN_ACTION_NONE; + + return 100; } void UpDownInterruptBase::intPressHandler() { - InputEvent e; - e.source = this->_originName; - LOG_DEBUG("GPIO event Press\n"); - e.inputEvent = this->_eventPressed; - this->notifyObservers(&e); + this->action = UPDOWN_ACTION_PRESSED; } void UpDownInterruptBase::intDownHandler() { - InputEvent e; - e.source = this->_originName; - LOG_DEBUG("GPIO event Down\n"); - e.inputEvent = this->_eventDown; - this->notifyObservers(&e); + this->action = UPDOWN_ACTION_DOWN; } void UpDownInterruptBase::intUpHandler() { - InputEvent e; - e.source = this->_originName; - LOG_DEBUG("GPIO event Up\n"); - e.inputEvent = this->_eventUp; - this->notifyObservers(&e); + this->action = UPDOWN_ACTION_UP; } diff --git a/src/input/UpDownInterruptBase.h b/src/input/UpDownInterruptBase.h index afa64d28d..7060a0d80 100644 --- a/src/input/UpDownInterruptBase.h +++ b/src/input/UpDownInterruptBase.h @@ -3,7 +3,7 @@ #include "InputBroker.h" #include "mesh/NodeDB.h" -class UpDownInterruptBase : public Observable +class UpDownInterruptBase : public Observable, public concurrency::OSThread { public: explicit UpDownInterruptBase(const char *name); @@ -13,6 +13,13 @@ class UpDownInterruptBase : public Observable void intDownHandler(); void intUpHandler(); + int32_t runOnce() override; + + protected: + enum UpDownInterruptBaseActionType { UPDOWN_ACTION_NONE, UPDOWN_ACTION_PRESSED, UPDOWN_ACTION_UP, UPDOWN_ACTION_DOWN }; + + volatile UpDownInterruptBaseActionType action = UPDOWN_ACTION_NONE; + private: uint8_t _pinDown = 0; uint8_t _pinUp = 0; diff --git a/src/input/cardKbI2cImpl.cpp b/src/input/cardKbI2cImpl.cpp index e000f36eb..f1df6b137 100644 --- a/src/input/cardKbI2cImpl.cpp +++ b/src/input/cardKbI2cImpl.cpp @@ -1,5 +1,7 @@ #include "cardKbI2cImpl.h" #include "InputBroker.h" +#include "detect/ScanI2CTwoWire.h" +#include "main.h" CardKbI2cImpl *cardKbI2cImpl; @@ -7,10 +9,52 @@ CardKbI2cImpl::CardKbI2cImpl() : KbI2cBase("cardKB") {} void CardKbI2cImpl::init() { +#if !MESHTASTIC_EXCLUDE_I2C && !defined(ARCH_PORTDUINO) + if (cardkb_found.address == 0x00) { + LOG_DEBUG("Rescanning for I2C keyboard\n"); + uint8_t i2caddr_scan[] = {CARDKB_ADDR, TDECK_KB_ADDR, BBQ10_KB_ADDR}; + uint8_t i2caddr_asize = 3; + auto i2cScanner = std::unique_ptr(new ScanI2CTwoWire()); + +#if WIRE_INTERFACES_COUNT == 2 + i2cScanner->scanPort(ScanI2C::I2CPort::WIRE1, i2caddr_scan, i2caddr_asize); +#endif + i2cScanner->scanPort(ScanI2C::I2CPort::WIRE, i2caddr_scan, i2caddr_asize); + auto kb_info = i2cScanner->firstKeyboard(); + + if (kb_info.type != ScanI2C::DeviceType::NONE) { + cardkb_found = kb_info.address; + switch (kb_info.type) { + case ScanI2C::DeviceType::RAK14004: + kb_model = 0x02; + break; + case ScanI2C::DeviceType::CARDKB: + kb_model = 0x00; + break; + case ScanI2C::DeviceType::TDECKKB: + // assign an arbitrary value to distinguish from other models + kb_model = 0x10; + break; + case ScanI2C::DeviceType::BBQ10KB: + // assign an arbitrary value to distinguish from other models + kb_model = 0x11; + break; + default: + // use this as default since it's also just zero + LOG_WARN("kb_info.type is unknown(0x%02x), setting kb_model=0x00\n", kb_info.type); + kb_model = 0x00; + } + } + if (cardkb_found.address == 0x00) { + disable(); + return; + } + } +#else if (cardkb_found.address == 0x00) { disable(); return; } - +#endif inputBroker->registerSource(this); -} +} \ No newline at end of file diff --git a/src/input/cardKbI2cImpl.h b/src/input/cardKbI2cImpl.h index 1e6e87dfd..811a0558c 100644 --- a/src/input/cardKbI2cImpl.h +++ b/src/input/cardKbI2cImpl.h @@ -1,6 +1,5 @@ #pragma once #include "kbI2cBase.h" -#include "main.h" /** * @brief The idea behind this class to have static methods for the event handlers. diff --git a/src/input/kbI2cBase.cpp b/src/input/kbI2cBase.cpp index 1dba4e34d..8b201cd22 100644 --- a/src/input/kbI2cBase.cpp +++ b/src/input/kbI2cBase.cpp @@ -1,7 +1,7 @@ #include "kbI2cBase.h" - #include "configuration.h" #include "detect/ScanI2C.h" +#include "detect/ScanI2CTwoWire.h" extern ScanI2C::DeviceAddress cardkb_found; extern uint8_t kb_model; @@ -30,15 +30,10 @@ uint8_t read_from_14004(TwoWire *i2cBus, uint8_t reg, uint8_t *data, uint8_t len int32_t KbI2cBase::runOnce() { - if (cardkb_found.address == 0x00) { - // Input device is not detected. - return INT32_MAX; - } - if (!i2cBus) { switch (cardkb_found.port) { case ScanI2C::WIRE1: -#ifdef I2C_SDA1 +#if WIRE_INTERFACES_COUNT == 2 LOG_DEBUG("Using I2C Bus 1 (the second one)\n"); i2cBus = &Wire1; if (cardkb_found.address == BBQ10_KB_ADDR) { @@ -99,7 +94,7 @@ int32_t KbI2cBase::runOnce() case 'e': // sym e if (is_sym) { e.inputEvent = meshtastic_ModuleConfig_CannedMessageConfig_InputEventChar_UP; - e.kbchar = 0xb5; + e.kbchar = INPUT_BROKER_MSG_UP; is_sym = false; // reset sym state after second keypress } else { e.inputEvent = ANYKEY; @@ -109,7 +104,7 @@ int32_t KbI2cBase::runOnce() case 'x': // sym x if (is_sym) { e.inputEvent = meshtastic_ModuleConfig_CannedMessageConfig_InputEventChar_DOWN; - e.kbchar = 0xb6; + e.kbchar = INPUT_BROKER_MSG_DOWN; is_sym = false; // reset sym state after second keypress } else { e.inputEvent = ANYKEY; @@ -138,6 +133,9 @@ int32_t KbI2cBase::runOnce() break; case 0x13: // Code scanner says the SYM key is 0x13 is_sym = !is_sym; + e.inputEvent = ANYKEY; + e.kbchar = is_sym ? INPUT_BROKER_MSG_FN_SYMBOL_ON // send 0xf1 to tell CannedMessages to display that + : INPUT_BROKER_MSG_FN_SYMBOL_OFF; // the modifier key is active break; case 0x0a: // apparently Enter on Q10 is a line feed instead of carriage return e.inputEvent = meshtastic_ModuleConfig_CannedMessageConfig_InputEventChar_SELECT; @@ -193,6 +191,75 @@ int32_t KbI2cBase::runOnce() e.inputEvent = meshtastic_ModuleConfig_CannedMessageConfig_InputEventChar_NONE; e.source = this->_originName; switch (c) { + case 0x71: // This is the button q. If modifier and q pressed, it cancels the input + if (is_sym) { + is_sym = false; + e.inputEvent = meshtastic_ModuleConfig_CannedMessageConfig_InputEventChar_CANCEL; + } else { + e.inputEvent = ANYKEY; + e.kbchar = c; + } + break; + case 0x74: // letter t. if modifier and t pressed call 'tab' + if (is_sym) { + is_sym = false; + e.inputEvent = ANYKEY; + e.kbchar = 0x09; // TAB Scancode + } else { + e.inputEvent = ANYKEY; + e.kbchar = c; + } + break; + case 0x6d: // letter m. Modifier makes it mute notifications + if (is_sym) { + is_sym = false; + e.inputEvent = ANYKEY; + e.kbchar = INPUT_BROKER_MSG_MUTE_TOGGLE; // mute notifications + } else { + e.inputEvent = ANYKEY; + e.kbchar = c; + } + break; + case 0x6f: // letter o(+). Modifier makes screen increase in brightness + if (is_sym) { + is_sym = false; + e.inputEvent = ANYKEY; + e.kbchar = INPUT_BROKER_MSG_BRIGHTNESS_UP; // Increase Brightness code + } else { + e.inputEvent = ANYKEY; + e.kbchar = c; + } + break; + case 0x69: // letter i(-). Modifier makes screen decrease in brightness + if (is_sym) { + is_sym = false; + e.inputEvent = ANYKEY; + e.kbchar = INPUT_BROKER_MSG_BRIGHTNESS_DOWN; // Decrease Brightness code + } else { + e.inputEvent = ANYKEY; + e.kbchar = c; + } + break; + case 0x20: // Space. Send network ping like double press does + if (is_sym) { + is_sym = false; + e.inputEvent = ANYKEY; + e.kbchar = INPUT_BROKER_MSG_SEND_PING; // (fn + space) + } else { + e.inputEvent = ANYKEY; + e.kbchar = c; + } + break; + case 0x67: // letter g. toggle gps + if (is_sym) { + is_sym = false; + e.inputEvent = ANYKEY; + e.kbchar = INPUT_BROKER_MSG_GPS_TOGGLE; + } else { + e.inputEvent = ANYKEY; + e.kbchar = c; + } + break; case 0x1b: // ESC e.inputEvent = meshtastic_ModuleConfig_CannedMessageConfig_InputEventChar_CANCEL; break; @@ -202,19 +269,38 @@ int32_t KbI2cBase::runOnce() break; case 0xb5: // Up e.inputEvent = meshtastic_ModuleConfig_CannedMessageConfig_InputEventChar_UP; - e.kbchar = 0xb5; + e.kbchar = INPUT_BROKER_MSG_UP; break; case 0xb6: // Down e.inputEvent = meshtastic_ModuleConfig_CannedMessageConfig_InputEventChar_DOWN; - e.kbchar = 0xb6; + e.kbchar = INPUT_BROKER_MSG_DOWN; break; case 0xb4: // Left e.inputEvent = meshtastic_ModuleConfig_CannedMessageConfig_InputEventChar_LEFT; - e.kbchar = 0xb4; + e.kbchar = INPUT_BROKER_MSG_LEFT; break; case 0xb7: // Right e.inputEvent = meshtastic_ModuleConfig_CannedMessageConfig_InputEventChar_RIGHT; - e.kbchar = 0xb7; + e.kbchar = INPUT_BROKER_MSG_RIGHT; + break; + case 0xc: // Modifier key: 0xc is alt+c (Other options could be: 0xea = shift+mic button or 0x4 shift+$(speaker)) + // toggle moddifiers button. + is_sym = !is_sym; + e.inputEvent = ANYKEY; + e.kbchar = is_sym ? INPUT_BROKER_MSG_FN_SYMBOL_ON // send 0xf1 to tell CannedMessages to display that the + : INPUT_BROKER_MSG_FN_SYMBOL_OFF; // modifier key is active + break; + case 0x90: // fn+r INPUT_BROKER_MSG_REBOOT + case 0x91: // fn+t + case 0x9b: // fn+s INPUT_BROKER_MSG_SHUTDOWN + case 0xac: // fn+m INPUT_BROKER_MSG_MUTE_TOGGLE + case 0x9e: // fn+g INPUT_BROKER_MSG_GPS_TOGGLE + case 0xaf: // fn+space INPUT_BROKER_MSG_SEND_PING + case 0x8b: // fn+del INPUT_BROKEN_MSG_DISMISS_FRAME + case 0xAA: // fn+b INPUT_BROKER_MSG_BLUETOOTH_TOGGLE + // just pass those unmodified + e.inputEvent = ANYKEY; + e.kbchar = c; break; case 0x0d: // Enter e.inputEvent = meshtastic_ModuleConfig_CannedMessageConfig_InputEventChar_SELECT; @@ -229,6 +315,7 @@ int32_t KbI2cBase::runOnce() } e.inputEvent = ANYKEY; e.kbchar = c; + is_sym = false; break; } diff --git a/src/main.cpp b/src/main.cpp index de0516ccf..69738a07d 100644 --- a/src/main.cpp +++ b/src/main.cpp @@ -1,46 +1,59 @@ +#include "../userPrefs.h" +#include "configuration.h" +#if !MESHTASTIC_EXCLUDE_GPS #include "GPS.h" +#endif #include "MeshRadio.h" #include "MeshService.h" #include "NodeDB.h" #include "PowerFSM.h" +#include "PowerMon.h" #include "ReliableRouter.h" #include "airtime.h" #include "buzz.h" -#include "configuration.h" -#include "error.h" -#include "power.h" -// #include "debug.h" + #include "FSCommon.h" +#include "Led.h" #include "RTC.h" #include "SPILock.h" +#include "Throttle.h" #include "concurrency/OSThread.h" #include "concurrency/Periodic.h" #include "detect/ScanI2C.h" +#include "error.h" +#include "power.h" + +#if !MESHTASTIC_EXCLUDE_I2C #include "detect/ScanI2CTwoWire.h" +#include +#endif #include "detect/axpDebug.h" #include "detect/einkScan.h" #include "graphics/RAKled.h" #include "graphics/Screen.h" #include "main.h" #include "mesh/generated/meshtastic/config.pb.h" +#include "meshUtils.h" #include "modules/Modules.h" #include "shutdown.h" #include "sleep.h" #include "target_specific.h" -#include #include #include -// #include #ifdef ARCH_ESP32 +#if !MESHTASTIC_EXCLUDE_WEBSERVER #include "mesh/http/WebServer.h" +#endif +#if !MESHTASTIC_EXCLUDE_BLUETOOTH #include "nimble/NimbleBluetooth.h" -NimbleBluetooth *nimbleBluetooth; +NimbleBluetooth *nimbleBluetooth = nullptr; +#endif #endif #ifdef ARCH_NRF52 #include "NRF52Bluetooth.h" -NRF52Bluetooth *nrf52Bluetooth; +NRF52Bluetooth *nrf52Bluetooth = nullptr; #endif #if HAS_WIFI @@ -52,22 +65,32 @@ NRF52Bluetooth *nrf52Bluetooth; #include "mesh/api/ethServerAPI.h" #include "mesh/eth/ethClient.h" #endif + +#if !MESHTASTIC_EXCLUDE_MQTT #include "mqtt/MQTT.h" +#endif #include "LLCC68Interface.h" +#include "LR1110Interface.h" +#include "LR1120Interface.h" +#include "LR1121Interface.h" #include "RF95Interface.h" #include "SX1262Interface.h" #include "SX1268Interface.h" #include "SX1280Interface.h" +#include "detect/LoRaRadioType.h" + #ifdef ARCH_STM32WL #include "STM32WLE5JCInterface.h" #endif + #if !HAS_RADIO && defined(ARCH_PORTDUINO) #include "platform/portduino/SimRadio.h" #endif #ifdef ARCH_PORTDUINO #include "linux/LinuxHardwareI2C.h" +#include "mesh/raspihttp/PiWebServer.h" #include "platform/portduino/PortduinoGlue.h" #include #include @@ -77,22 +100,30 @@ NRF52Bluetooth *nrf52Bluetooth; #if HAS_BUTTON || defined(ARCH_PORTDUINO) #include "ButtonThread.h" #endif + +#include "AmbientLightingThread.h" #include "PowerFSMThread.h" -#if !defined(ARCH_PORTDUINO) && !defined(ARCH_STM32WL) -#include "AccelerometerThread.h" -#include "AmbientLightingThread.h" +#if !defined(ARCH_PORTDUINO) && !defined(ARCH_STM32WL) && !MESHTASTIC_EXCLUDE_I2C +#include "motion/AccelerometerThread.h" +AccelerometerThread *accelerometerThread = nullptr; #endif #ifdef HAS_I2S #include "AudioThread.h" -AudioThread *audioThread; +AudioThread *audioThread = nullptr; +#endif + +#if defined(TCXO_OPTIONAL) +float tcxoVoltage = SX126X_DIO3_TCXO_VOLTAGE; // if TCXO is optional, put this here so it can be changed further down. #endif using namespace concurrency; +volatile static const char slipstreamTZString[] = USERPREFS_TZ_STRING; + // We always create a screen object, but we only init it if we find the hardware -graphics::Screen *screen; +graphics::Screen *screen = nullptr; // Global power status meshtastic::PowerStatus *powerStatus = new meshtastic::PowerStatus(); @@ -128,16 +159,22 @@ ATECCX08A atecc; Adafruit_DRV2605 drv; #endif +// Global LoRa radio type +LoRaRadioType radioType = NO_RADIO; + bool isVibrating = false; bool eink_found = true; uint32_t serialSinceMsec; +bool pauseBluetoothLogging = false; bool pmu_found; +#if !MESHTASTIC_EXCLUDE_I2C // Array map of sensor types with i2c address and wire as we'll find in the i2c scan std::pair nodeTelemetrySensorsMap[_meshtastic_TelemetrySensorType_MAX + 1] = {}; +#endif Router *router = NULL; // Users of router don't care what sort of subclass implements that API @@ -151,7 +188,7 @@ const char *getDeviceName() static char name[20]; snprintf(name, sizeof(name), "%02x%02x", dmac[4], dmac[5]); // if the shortname exists and is NOT the new default of ab3c, use it for BLE name. - if ((owner.short_name != NULL) && (strcmp(owner.short_name, name) != 0)) { + if (strcmp(owner.short_name, name) != 0) { snprintf(name, sizeof(name), "%s_%02x%02x", owner.short_name, dmac[4], dmac[5]); } else { snprintf(name, sizeof(name), "Meshtastic_%02x%02x", dmac[4], dmac[5]); @@ -161,10 +198,15 @@ const char *getDeviceName() static int32_t ledBlinker() { + // Still set up the blinking (heartbeat) interval but skip code path below, so LED will blink if + // config.device.led_heartbeat_disabled is changed + if (config.device.led_heartbeat_disabled) + return 1000; + static bool ledOn; ledOn ^= 1; - setLed(ledOn); + ledBlink.set(ledOn); // have a very sparse duty cycle of LED being on, unless charging, then blink 0.5Hz square wave rate to indicate that return powerStatus->getIsCharging() ? 1000 : (ledOn ? 1 : 1000); @@ -174,12 +216,7 @@ uint32_t timeLastPowered = 0; static Periodic *ledPeriodic; static OSThread *powerFSMthread; -#if HAS_BUTTON || defined(ARCH_PORTDUINO) -static OSThread *buttonThread; -#endif -static OSThread *accelerometerThread; static OSThread *ambientLightingThread; -SPISettings spiSettings(4000000, MSBFIRST, SPI_MODE0); RadioInterface *rIf = NULL; @@ -191,14 +228,33 @@ __attribute__((weak, noinline)) bool loopCanSleep() return true; } +// Weak empty variant initialization function. +// May be redefined by variant files. +void lateInitVariant() __attribute__((weak)); +void lateInitVariant() {} + +/** + * Print info as a structured log message (for automated log processing) + */ +void printInfo() +{ + LOG_INFO("S:B:%d,%s\n", HW_VENDOR, optstr(APP_VERSION)); +} +#ifndef PIO_UNIT_TESTING void setup() { concurrency::hasBeenSetup = true; +#if ARCH_PORTDUINO + SPISettings spiSettings(settingsMap[spiSpeed], MSBFIRST, SPI_MODE0); +#else + SPISettings spiSettings(4000000, MSBFIRST, SPI_MODE0); +#endif + meshtastic_Config_DisplayConfig_OledType screen_model = meshtastic_Config_DisplayConfig_OledType::meshtastic_Config_DisplayConfig_OledType_OLED_AUTO; OLEDDISPLAY_GEOMETRY screen_geometry = GEOMETRY_128_64; -#ifdef SEGGER_STDOUT_CH +#ifdef USE_SEGGER auto mode = false ? SEGGER_RTT_MODE_BLOCK_IF_FIFO_FULL : SEGGER_RTT_MODE_NO_BLOCK_TRIM; #ifdef NRF52840_XXAA auto buflen = 4096; // this board has a fair amount of ram @@ -211,6 +267,13 @@ void setup() #ifdef DEBUG_PORT consoleInit(); // Set serial baud rate and init our mesh console #endif +#if ARCH_PORTDUINO + struct timeval tv; + tv.tv_sec = time(NULL); + tv.tv_usec = 0; + perhapsSetRTC(RTCQualityNTP, &tv); +#endif + powerMonInit(); serialSinceMsec = millis(); @@ -218,42 +281,26 @@ void setup() initDeepSleep(); - // Testing this fix für erratic T-Echo boot behaviour -#if defined(TTGO_T_ECHO) && defined(PIN_EINK_PWR_ON) - pinMode(PIN_EINK_PWR_ON, OUTPUT); - digitalWrite(PIN_EINK_PWR_ON, HIGH); + // power on peripherals +#if defined(PIN_POWER_EN) + pinMode(PIN_POWER_EN, OUTPUT); + digitalWrite(PIN_POWER_EN, HIGH); + // digitalWrite(PIN_POWER_EN1, INPUT); #endif -#if defined(VEXT_ENABLE_V03) - pinMode(VEXT_ENABLE_V03, OUTPUT); - pinMode(ST7735_BL_V03, OUTPUT); - digitalWrite(VEXT_ENABLE_V03, 0); // turn on the display power and antenna boost - digitalWrite(ST7735_BL_V03, 1); // display backligth on - LOG_DEBUG("HELTEC Detect Tracker V1.0\n"); -#elif defined(VEXT_ENABLE_V05) - pinMode(VEXT_ENABLE_V05, OUTPUT); - pinMode(ST7735_BL_V05, OUTPUT); - digitalWrite(VEXT_ENABLE_V05, 1); // turn on the lora antenna boost - digitalWrite(ST7735_BL_V05, 1); // turn on display backligth - LOG_DEBUG("HELTEC Detect Tracker V1.1\n"); -#elif defined(VEXT_ENABLE) +#if defined(LORA_TCXO_GPIO) + pinMode(LORA_TCXO_GPIO, OUTPUT); + digitalWrite(LORA_TCXO_GPIO, HIGH); +#endif + +#if defined(VEXT_ENABLE) pinMode(VEXT_ENABLE, OUTPUT); - digitalWrite(VEXT_ENABLE, 0); // turn on the display power + digitalWrite(VEXT_ENABLE, VEXT_ON_VALUE); // turn on the display power #endif -#if defined(VGNSS_CTRL_V03) - pinMode(VGNSS_CTRL_V03, OUTPUT); - digitalWrite(VGNSS_CTRL_V03, LOW); -#endif - -#if defined(VTFT_CTRL_V03) - pinMode(VTFT_CTRL_V03, OUTPUT); - digitalWrite(VTFT_CTRL_V03, LOW); -#endif - -#if defined(VGNSS_CTRL) - pinMode(VGNSS_CTRL, OUTPUT); - digitalWrite(VGNSS_CTRL, LOW); +#if defined(BIAS_T_ENABLE) + pinMode(BIAS_T_ENABLE, OUTPUT); + digitalWrite(BIAS_T_ENABLE, BIAS_T_VALUE); // turn on 5V for GPS Antenna #endif #if defined(VTFT_CTRL) @@ -266,18 +313,37 @@ void setup() digitalWrite(RESET_OLED, 1); #endif +#ifdef SENSOR_POWER_CTRL_PIN + pinMode(SENSOR_POWER_CTRL_PIN, OUTPUT); + digitalWrite(SENSOR_POWER_CTRL_PIN, SENSOR_POWER_ON); +#endif + +#ifdef SENSOR_GPS_CONFLICT + bool sensor_detected = false; +#endif +#ifdef PERIPHERAL_WARMUP_MS + // Some peripherals may require additional time to stabilize after power is connected + // e.g. I2C on Heltec Vision Master + LOG_INFO("Waiting for peripherals to stabilize\n"); + delay(PERIPHERAL_WARMUP_MS); +#endif + #ifdef BUTTON_PIN #ifdef ARCH_ESP32 - // If the button is connected to GPIO 12, don't enable the ability to use - // meshtasticAdmin on the device. - pinMode(config.device.button_gpio ? config.device.button_gpio : BUTTON_PIN, INPUT); - +#if ESP_ARDUINO_VERSION_MAJOR >= 3 +#ifdef BUTTON_NEED_PULLUP + pinMode(config.device.button_gpio ? config.device.button_gpio : BUTTON_PIN, INPUT_PULLUP); +#else + pinMode(config.device.button_gpio ? config.device.button_gpio : BUTTON_PIN, INPUT); // default to BUTTON_PIN +#endif +#else + pinMode(config.device.button_gpio ? config.device.button_gpio : BUTTON_PIN, INPUT); // default to BUTTON_PIN #ifdef BUTTON_NEED_PULLUP gpio_pullup_en((gpio_num_t)(config.device.button_gpio ? config.device.button_gpio : BUTTON_PIN)); delay(10); #endif - +#endif #endif #endif @@ -300,12 +366,15 @@ void setup() #endif +#if !MESHTASTIC_EXCLUDE_I2C #if defined(I2C_SDA1) && defined(ARCH_RP2040) Wire1.setSDA(I2C_SDA1); Wire1.setSCL(I2C_SCL1); Wire1.begin(); #elif defined(I2C_SDA1) && !defined(ARCH_RP2040) Wire1.begin(I2C_SDA1, I2C_SCL1); +#elif WIRE_INTERFACES_COUNT == 2 + Wire1.begin(); #endif #if defined(I2C_SDA) && defined(ARCH_RP2040) @@ -316,7 +385,7 @@ void setup() Wire.begin(I2C_SDA, I2C_SCL); #elif defined(ARCH_PORTDUINO) if (settingsStrings[i2cdev] != "") { - LOG_INFO("Using %s as I2C device.\n", settingsStrings[i2cdev]); + LOG_INFO("Using %s as I2C device.\n", settingsStrings[i2cdev].c_str()); Wire.begin(settingsStrings[i2cdev].c_str()); } else { LOG_INFO("No I2C device configured, skipping.\n"); @@ -324,6 +393,7 @@ void setup() #elif HAS_WIRE Wire.begin(); #endif +#endif #ifdef PIN_LCD_RESET // FIXME - move this someplace better, LCD is at address 0x3F @@ -334,18 +404,11 @@ void setup() delay(1); #endif -#ifdef RAK4630 -#ifdef PIN_3V3_EN - // We need to enable 3.3V periphery in order to scan it - pinMode(PIN_3V3_EN, OUTPUT); - digitalWrite(PIN_3V3_EN, HIGH); -#endif -#ifndef USE_EINK - // RAK-12039 set pin for Air quality sensor +#ifdef AQ_SET_PIN + // RAK-12039 set pin for Air quality sensor. Detectable on I2C after ~3 seconds, so we need to rescan later pinMode(AQ_SET_PIN, OUTPUT); digitalWrite(AQ_SET_PIN, HIGH); #endif -#endif #ifdef T_DECK // enable keyboard @@ -363,10 +426,11 @@ void setup() powerStatus->observe(&power->newStatus); power->setup(); // Must be after status handler is installed, so that handler gets notified of the initial configuration +#if !MESHTASTIC_EXCLUDE_I2C // We need to scan here to decide if we have a screen for nodeDB.init() and because power has been applied to // accessories auto i2cScanner = std::unique_ptr(new ScanI2CTwoWire()); -#ifdef HAS_WIRE +#if HAS_WIRE LOG_INFO("Scanning for i2c devices...\n"); #endif @@ -378,6 +442,8 @@ void setup() #elif defined(I2C_SDA1) && !defined(ARCH_RP2040) Wire1.begin(I2C_SDA1, I2C_SCL1); i2cScanner->scanPort(ScanI2C::I2CPort::WIRE1); +#elif defined(NRF52840_XXAA) && (WIRE_INTERFACES_COUNT == 2) + i2cScanner->scanPort(ScanI2C::I2CPort::WIRE1); #endif #if defined(I2C_SDA) && defined(ARCH_RP2040) @@ -400,12 +466,11 @@ void setup() auto i2cCount = i2cScanner->countDevices(); if (i2cCount == 0) { LOG_INFO("No I2C devices found\n"); - Wire.end(); -#ifdef I2C_SDA1 - Wire1.end(); -#endif } else { LOG_INFO("%i I2C devices found\n", i2cCount); +#ifdef SENSOR_GPS_CONFLICT + sensor_detected = true; +#endif } #ifdef ARCH_ESP32 @@ -478,6 +543,21 @@ void setup() rgb_found = i2cScanner->find(ScanI2C::DeviceType::NCP5623); #endif +#ifdef HAS_TPS65233 + // TPS65233 is a power management IC for satellite modems, used in the Dreamcatcher + // We are switching it off here since we don't use an LNB. + if (i2cScanner->exists(ScanI2C::DeviceType::TPS65233)) { + Wire.beginTransmission(TPS65233_ADDR); + Wire.write(0); // Register 0 + Wire.write(128); // Turn off the LNB power, keep I2C Control enabled + Wire.endTransmission(); + Wire.beginTransmission(TPS65233_ADDR); + Wire.write(1); // Register 1 + Wire.write(0); // Turn off Tone Generator 22kHz + Wire.endTransmission(); + } +#endif + #if !defined(ARCH_PORTDUINO) && !defined(ARCH_STM32WL) auto acc_info = i2cScanner->firstAccelerometer(); accelerometer_found = acc_info.type != ScanI2C::DeviceType::NONE ? acc_info.address : accelerometer_found; @@ -499,9 +579,12 @@ void setup() SCANNER_TO_SENSORS_MAP(ScanI2C::DeviceType::BME_680, meshtastic_TelemetrySensorType_BME680) SCANNER_TO_SENSORS_MAP(ScanI2C::DeviceType::BME_280, meshtastic_TelemetrySensorType_BME280) SCANNER_TO_SENSORS_MAP(ScanI2C::DeviceType::BMP_280, meshtastic_TelemetrySensorType_BMP280) + SCANNER_TO_SENSORS_MAP(ScanI2C::DeviceType::BMP_3XX, meshtastic_TelemetrySensorType_BMP3XX) + SCANNER_TO_SENSORS_MAP(ScanI2C::DeviceType::BMP_085, meshtastic_TelemetrySensorType_BMP085) SCANNER_TO_SENSORS_MAP(ScanI2C::DeviceType::INA260, meshtastic_TelemetrySensorType_INA260) SCANNER_TO_SENSORS_MAP(ScanI2C::DeviceType::INA219, meshtastic_TelemetrySensorType_INA219) SCANNER_TO_SENSORS_MAP(ScanI2C::DeviceType::INA3221, meshtastic_TelemetrySensorType_INA3221) + SCANNER_TO_SENSORS_MAP(ScanI2C::DeviceType::MAX17048, meshtastic_TelemetrySensorType_MAX17048) SCANNER_TO_SENSORS_MAP(ScanI2C::DeviceType::MCP9808, meshtastic_TelemetrySensorType_MCP9808) SCANNER_TO_SENSORS_MAP(ScanI2C::DeviceType::MCP9808, meshtastic_TelemetrySensorType_MCP9808) SCANNER_TO_SENSORS_MAP(ScanI2C::DeviceType::SHT31, meshtastic_TelemetrySensorType_SHT31) @@ -510,27 +593,39 @@ void setup() SCANNER_TO_SENSORS_MAP(ScanI2C::DeviceType::QMC6310, meshtastic_TelemetrySensorType_QMC6310) SCANNER_TO_SENSORS_MAP(ScanI2C::DeviceType::QMI8658, meshtastic_TelemetrySensorType_QMI8658) SCANNER_TO_SENSORS_MAP(ScanI2C::DeviceType::QMC5883L, meshtastic_TelemetrySensorType_QMC5883L) + SCANNER_TO_SENSORS_MAP(ScanI2C::DeviceType::HMC5883L, meshtastic_TelemetrySensorType_QMC5883L) SCANNER_TO_SENSORS_MAP(ScanI2C::DeviceType::PMSA0031, meshtastic_TelemetrySensorType_PMSA003I) + SCANNER_TO_SENSORS_MAP(ScanI2C::DeviceType::RCWL9620, meshtastic_TelemetrySensorType_RCWL9620) + SCANNER_TO_SENSORS_MAP(ScanI2C::DeviceType::VEML7700, meshtastic_TelemetrySensorType_VEML7700) + SCANNER_TO_SENSORS_MAP(ScanI2C::DeviceType::TSL2591, meshtastic_TelemetrySensorType_TSL25911FN) + SCANNER_TO_SENSORS_MAP(ScanI2C::DeviceType::OPT3001, meshtastic_TelemetrySensorType_OPT3001) + SCANNER_TO_SENSORS_MAP(ScanI2C::DeviceType::MLX90632, meshtastic_TelemetrySensorType_MLX90632) + SCANNER_TO_SENSORS_MAP(ScanI2C::DeviceType::MLX90614, meshtastic_TelemetrySensorType_MLX90614) + SCANNER_TO_SENSORS_MAP(ScanI2C::DeviceType::SHT4X, meshtastic_TelemetrySensorType_SHT4X) + SCANNER_TO_SENSORS_MAP(ScanI2C::DeviceType::AHT10, meshtastic_TelemetrySensorType_AHT10) + SCANNER_TO_SENSORS_MAP(ScanI2C::DeviceType::DFROBOT_LARK, meshtastic_TelemetrySensorType_DFROBOT_LARK) + SCANNER_TO_SENSORS_MAP(ScanI2C::DeviceType::ICM20948, meshtastic_TelemetrySensorType_ICM20948) + SCANNER_TO_SENSORS_MAP(ScanI2C::DeviceType::MAX30102, meshtastic_TelemetrySensorType_MAX30102) i2cScanner.reset(); +#endif #ifdef HAS_SDCARD setupSDCard(); #endif -#ifdef RAK4630 - // scanEInkDevice(); -#endif - // LED init #ifdef LED_PIN pinMode(LED_PIN, OUTPUT); - digitalWrite(LED_PIN, 1 ^ LED_INVERTED); // turn on for now + digitalWrite(LED_PIN, LED_STATE_ON); // turn on for now #endif // Hello - LOG_INFO("Meshtastic hwvendor=%d, swver=%s\n", HW_VENDOR, optstr(APP_VERSION)); + printInfo(); +#ifdef BUILD_EPOCH + LOG_INFO("Build timestamp: %ld\n", BUILD_EPOCH); +#endif #ifdef ARCH_ESP32 esp32Setup(); @@ -546,7 +641,7 @@ void setup() // We do this as early as possible because this loads preferences from flash // but we need to do this after main cpu init (esp32setup), because we need the random seed set - nodeDB.init(); + nodeDB = new NodeDB; // If we're taking on the repeater role, use flood router and turn off 3V3_S rail because peripherals are not needed if (config.device.role == meshtastic_Config_DeviceConfig_Role_REPEATER) { @@ -562,7 +657,13 @@ void setup() buttonThread = new ButtonThread(); #endif - playStartMelody(); + // only play start melody when role is not tracker or sensor + if (config.power.is_power_saving == true && + IS_ONE_OF(config.device.role, meshtastic_Config_DeviceConfig_Role_TRACKER, + meshtastic_Config_DeviceConfig_Role_TAK_TRACKER, meshtastic_Config_DeviceConfig_Role_SENSOR)) + LOG_DEBUG("Tracker/Sensor: Skipping start melody\n"); + else + playStartMelody(); // fixed screen override? if (config.display.oled != meshtastic_Config_DisplayConfig_OledType_OLED_AUTO) @@ -577,19 +678,21 @@ void setup() screen_model = meshtastic_Config_DisplayConfig_OledType_OLED_SH1107; // keep dimension of 128x64 #endif +#if !MESHTASTIC_EXCLUDE_I2C #if !defined(ARCH_PORTDUINO) && !defined(ARCH_STM32WL) if (acc_info.type != ScanI2C::DeviceType::NONE) { - config.display.wake_on_tap_or_motion = true; - moduleConfig.external_notification.enabled = true; accelerometerThread = new AccelerometerThread(acc_info.type); } #endif -#if !defined(ARCH_PORTDUINO) && !defined(ARCH_STM32WL) +#if defined(HAS_NEOPIXEL) || defined(UNPHONE) || defined(RGBLED_RED) + ambientLightingThread = new AmbientLightingThread(ScanI2C::DeviceType::NONE); +#elif !defined(ARCH_PORTDUINO) && !defined(ARCH_STM32WL) if (rgb_found.type != ScanI2C::DeviceType::NONE) { ambientLightingThread = new AmbientLightingThread(rgb_found.type); } #endif +#endif #ifdef T_WATCH_S3 drv.begin(); @@ -608,14 +711,12 @@ void setup() pinMode(LORA_CS, OUTPUT); digitalWrite(LORA_CS, HIGH); SPI1.begin(false); -#else // HW_SPI1_DEVICE +#else // HW_SPI1_DEVICE SPI.setSCK(LORA_SCK); SPI.setTX(LORA_MOSI); SPI.setRX(LORA_MISO); SPI.begin(false); -#endif // HW_SPI1_DEVICE -#elif ARCH_PORTDUINO - SPI.begin(settingsStrings[spidev].c_str()); +#endif // HW_SPI1_DEVICE #elif !defined(ARCH_ESP32) // ARCH_RP2040 SPI.begin(); #else @@ -625,7 +726,7 @@ void setup() LOG_WARN("SPI.begin(SCK=%d, MISO=15, MOSI=%d, NSS=%d)\n", PIN_EINK_SCLK, PIN_EINK_MOSI, PIN_EINK_CS); #else SPI.begin(LORA_SCK, LORA_MISO, LORA_MOSI, LORA_CS); - LOG_WARN("SPI.begin(SCK=%d, MISO=%d, MOSI=%d, NSS=%d)\n", LORA_SCK, LORA_MISO, LORA_MOSI, LORA_CS); + LOG_DEBUG("SPI.begin(SCK=%d, MISO=%d, MOSI=%d, NSS=%d)\n", LORA_SCK, LORA_MISO, LORA_MOSI, LORA_CS); #endif SPI.setFrequency(4000000); #endif @@ -633,39 +734,77 @@ void setup() // Initialize the screen first so we can show the logo while we start up everything else. screen = new graphics::Screen(screen_found, screen_model, screen_geometry); + // setup TZ prior to time actions. +#if !MESHTASTIC_EXCLUDE_TZ + LOG_DEBUG("Using compiled/slipstreamed %s\n", slipstreamTZString); // important, removing this clobbers our magic string + if (*config.device.tzdef && config.device.tzdef[0] != 0) { + LOG_DEBUG("Saved TZ: %s \n", config.device.tzdef); + setenv("TZ", config.device.tzdef, 1); + } else { + if (strncmp((const char *)slipstreamTZString, "tzpl", 4) == 0) { + setenv("TZ", "GMT0", 1); + } else { + setenv("TZ", (const char *)slipstreamTZString, 1); + strcpy(config.device.tzdef, (const char *)slipstreamTZString); + } + } + tzset(); + LOG_DEBUG("Set Timezone to %s\n", getenv("TZ")); +#endif + readFromRTC(); // read the main CPU RTC at first (in case we can't get GPS time) +#if !MESHTASTIC_EXCLUDE_GPS // If we're taking on the repeater role, ignore GPS - if (config.device.role != meshtastic_Config_DeviceConfig_Role_REPEATER && - config.position.gps_mode != meshtastic_Config_PositionConfig_GpsMode_NOT_PRESENT) { - gps = GPS::createGps(); +#ifdef SENSOR_GPS_CONFLICT + if (sensor_detected == false) { +#endif + if (HAS_GPS) { + if (config.device.role != meshtastic_Config_DeviceConfig_Role_REPEATER && + config.position.gps_mode != meshtastic_Config_PositionConfig_GpsMode_NOT_PRESENT) { + gps = GPS::createGps(); + if (gps) { + gpsStatus->observe(&gps->newStatus); + } else { + LOG_DEBUG("Running without GPS.\n"); + } + } + } +#ifdef SENSOR_GPS_CONFLICT } - if (gps) { - gpsStatus->observe(&gps->newStatus); - } else { - LOG_DEBUG("Running without GPS.\n"); - } - nodeStatus->observe(&nodeDB.newStatus); +#endif + +#endif + + nodeStatus->observe(&nodeDB->newStatus); #ifdef HAS_I2S LOG_DEBUG("Starting audio thread\n"); audioThread = new AudioThread(); #endif - - service.init(); + service = new MeshService(); + service->init(); // Now that the mesh service is created, create any modules setupModules(); +#ifdef LED_PIN + // Turn LED off after boot, if heartbeat by config + if (config.device.led_heartbeat_disabled) + digitalWrite(LED_PIN, HIGH ^ LED_STATE_ON); +#endif + // Do this after service.init (because that clears error_code) #ifdef HAS_PMU if (!pmu_found) RECORD_CRITICALERROR(meshtastic_CriticalErrorCode_NO_AXP192); // Record a hardware fault for missing hardware #endif +#if !MESHTASTIC_EXCLUDE_I2C // Don't call screen setup until after nodedb is setup (because we need // the current region name) -#if defined(ST7735_CS) || defined(USE_EINK) || defined(ILI9341_DRIVER) || defined(ST7789_CS) +#if defined(ST7701_CS) || defined(ST7735_CS) || defined(USE_EINK) || defined(ILI9341_DRIVER) || defined(ILI9342_DRIVER) || \ + defined(ST7789_CS) || defined(HX8357_CS) || defined(USE_ST7789) screen->setup(); #elif defined(ARCH_PORTDUINO) if (screen_found.port != ScanI2C::I2CPort::NO_I2C || settingsMap[displayPanel]) { @@ -674,21 +813,22 @@ void setup() #else if (screen_found.port != ScanI2C::I2CPort::NO_I2C) screen->setup(); +#endif #endif screen->print("Started...\n"); -#ifdef SX126X_ANT_SW - // make analog PA vs not PA switch on SX126x eval board work properly - pinMode(SX126X_ANT_SW, OUTPUT); - digitalWrite(SX126X_ANT_SW, 1); +#ifdef PIN_PWR_DELAY_MS + // This may be required to give the peripherals time to power up. + delay(PIN_PWR_DELAY_MS); #endif #ifdef ARCH_PORTDUINO if (settingsMap[use_sx1262]) { if (!rIf) { LOG_DEBUG("Attempting to activate sx1262 radio on SPI port %s\n", settingsStrings[spidev].c_str()); - LockingArduinoHal *RadioLibHAL = new LockingArduinoHal(SPI, spiSettings); + LockingArduinoHal *RadioLibHAL = + new LockingArduinoHal(SPI, spiSettings, (settingsMap[ch341Quirk] ? settingsMap[busy] : RADIOLIB_NC)); rIf = new SX1262Interface((LockingArduinoHal *)RadioLibHAL, settingsMap[cs], settingsMap[irq], settingsMap[reset], settingsMap[busy]); if (!rIf->init()) { @@ -702,7 +842,8 @@ void setup() } else if (settingsMap[use_rf95]) { if (!rIf) { LOG_DEBUG("Attempting to activate rf95 radio on SPI port %s\n", settingsStrings[spidev].c_str()); - LockingArduinoHal *RadioLibHAL = new LockingArduinoHal(SPI, spiSettings); + LockingArduinoHal *RadioLibHAL = + new LockingArduinoHal(SPI, spiSettings, (settingsMap[ch341Quirk] ? settingsMap[busy] : RADIOLIB_NC)); rIf = new RF95Interface((LockingArduinoHal *)RadioLibHAL, settingsMap[cs], settingsMap[irq], settingsMap[reset], settingsMap[busy]); if (!rIf->init()) { @@ -729,6 +870,21 @@ void setup() LOG_INFO("SX1280 Radio init succeeded, using SX1280 radio\n"); } } + } else if (settingsMap[use_sx1268]) { + if (!rIf) { + LOG_DEBUG("Attempting to activate sx1268 radio on SPI port %s\n", settingsStrings[spidev].c_str()); + LockingArduinoHal *RadioLibHAL = new LockingArduinoHal(SPI, spiSettings); + rIf = new SX1268Interface((LockingArduinoHal *)RadioLibHAL, settingsMap[cs], settingsMap[irq], settingsMap[reset], + settingsMap[busy]); + if (!rIf->init()) { + LOG_ERROR("Failed to find SX1268 radio\n"); + delete rIf; + rIf = NULL; + exit(EXIT_FAILURE); + } else { + LOG_INFO("SX1268 Radio init succeeded, using SX1268 radio\n"); + } + } } #elif defined(HW_SPI1_DEVICE) @@ -751,6 +907,7 @@ void setup() rIf = NULL; } else { LOG_INFO("STM32WL Radio init succeeded, using STM32WL radio\n"); + radioType = STM32WLx_RADIO; } } #endif @@ -764,12 +921,13 @@ void setup() rIf = NULL; } else { LOG_INFO("Using SIMULATED radio!\n"); + radioType = SIM_RADIO; } } #endif -#if defined(RF95_IRQ) - if (!rIf) { +#if defined(RF95_IRQ) && RADIOLIB_EXCLUDE_SX127X != 1 + if ((!rIf) && (config.lora.region != meshtastic_Config_LoRaConfig_RegionCode_LORA_24)) { rIf = new RF95Interface(RadioLibHAL, LORA_CS, RF95_IRQ, RF95_RESET, RF95_DIO1); if (!rIf->init()) { LOG_WARN("Failed to find RF95 radio\n"); @@ -777,12 +935,13 @@ void setup() rIf = NULL; } else { LOG_INFO("RF95 Radio init succeeded, using RF95 radio\n"); + radioType = RF95_RADIO; } } #endif -#if defined(USE_SX1262) && !defined(ARCH_PORTDUINO) - if (!rIf) { +#if defined(USE_SX1262) && !defined(ARCH_PORTDUINO) && !defined(TCXO_OPTIONAL) && RADIOLIB_EXCLUDE_SX126X != 1 + if ((!rIf) && (config.lora.region != meshtastic_Config_LoRaConfig_RegionCode_LORA_24)) { rIf = new SX1262Interface(RadioLibHAL, SX126X_CS, SX126X_DIO1, SX126X_RESET, SX126X_BUSY); if (!rIf->init()) { LOG_WARN("Failed to find SX1262 radio\n"); @@ -790,12 +949,47 @@ void setup() rIf = NULL; } else { LOG_INFO("SX1262 Radio init succeeded, using SX1262 radio\n"); + radioType = SX1262_RADIO; + } + } +#endif + +#if defined(USE_SX1262) && !defined(ARCH_PORTDUINO) && defined(TCXO_OPTIONAL) + if ((!rIf) && (config.lora.region != meshtastic_Config_LoRaConfig_RegionCode_LORA_24)) { + // Try using the specified TCXO voltage + rIf = new SX1262Interface(RadioLibHAL, SX126X_CS, SX126X_DIO1, SX126X_RESET, SX126X_BUSY); + if (!rIf->init()) { + LOG_WARN("Failed to find SX1262 radio with TCXO using DIO3 reference voltage at %f V\n", tcxoVoltage); + delete rIf; + rIf = NULL; + tcxoVoltage = 0; // if it fails, set the TCXO voltage to zero for the next attempt + } else { + LOG_INFO("SX1262 Radio init succeeded, using "); + LOG_WARN("SX1262 Radio with TCXO"); + LOG_INFO(", reference voltage at %f V\n", tcxoVoltage); + radioType = SX1262_RADIO; + } + } + + if ((!rIf) && (config.lora.region != meshtastic_Config_LoRaConfig_RegionCode_LORA_24)) { + // If specified TCXO voltage fails, attempt to use DIO3 as a reference instea + rIf = new SX1262Interface(RadioLibHAL, SX126X_CS, SX126X_DIO1, SX126X_RESET, SX126X_BUSY); + if (!rIf->init()) { + LOG_WARN("Failed to find SX1262 radio with XTAL using DIO3 reference voltage at %f V\n", tcxoVoltage); + delete rIf; + rIf = NULL; + tcxoVoltage = SX126X_DIO3_TCXO_VOLTAGE; // if it fails, set the TCXO voltage back for the next radio search + } else { + LOG_INFO("SX1262 Radio init succeeded, using "); + LOG_WARN("SX1262 Radio with XTAL"); + LOG_INFO(", reference voltage at %f V\n", tcxoVoltage); + radioType = SX1262_RADIO; } } #endif #if defined(USE_SX1268) - if (!rIf) { + if ((!rIf) && (config.lora.region != meshtastic_Config_LoRaConfig_RegionCode_LORA_24)) { rIf = new SX1268Interface(RadioLibHAL, SX126X_CS, SX126X_DIO1, SX126X_RESET, SX126X_BUSY); if (!rIf->init()) { LOG_WARN("Failed to find SX1268 radio\n"); @@ -803,12 +997,13 @@ void setup() rIf = NULL; } else { LOG_INFO("SX1268 Radio init succeeded, using SX1268 radio\n"); + radioType = SX1268_RADIO; } } #endif #if defined(USE_LLCC68) - if (!rIf) { + if ((!rIf) && (config.lora.region != meshtastic_Config_LoRaConfig_RegionCode_LORA_24)) { rIf = new LLCC68Interface(RadioLibHAL, SX126X_CS, SX126X_DIO1, SX126X_RESET, SX126X_BUSY); if (!rIf->init()) { LOG_WARN("Failed to find LLCC68 radio\n"); @@ -816,11 +1011,54 @@ void setup() rIf = NULL; } else { LOG_INFO("LLCC68 Radio init succeeded, using LLCC68 radio\n"); + radioType = LLCC68_RADIO; } } #endif -#if defined(USE_SX1280) +#if defined(USE_LR1110) && RADIOLIB_EXCLUDE_LR11X0 != 1 + if ((!rIf) && (config.lora.region != meshtastic_Config_LoRaConfig_RegionCode_LORA_24)) { + rIf = new LR1110Interface(RadioLibHAL, LR1110_SPI_NSS_PIN, LR1110_IRQ_PIN, LR1110_NRESET_PIN, LR1110_BUSY_PIN); + if (!rIf->init()) { + LOG_WARN("Failed to find LR1110 radio\n"); + delete rIf; + rIf = NULL; + } else { + LOG_INFO("LR1110 Radio init succeeded, using LR1110 radio\n"); + radioType = LR1110_RADIO; + } + } +#endif + +#if defined(USE_LR1120) && RADIOLIB_EXCLUDE_LR11X0 != 1 + if (!rIf) { + rIf = new LR1120Interface(RadioLibHAL, LR1120_SPI_NSS_PIN, LR1120_IRQ_PIN, LR1120_NRESET_PIN, LR1120_BUSY_PIN); + if (!rIf->init()) { + LOG_WARN("Failed to find LR1120 radio\n"); + delete rIf; + rIf = NULL; + } else { + LOG_INFO("LR1120 Radio init succeeded, using LR1120 radio\n"); + radioType = LR1120_RADIO; + } + } +#endif + +#if defined(USE_LR1121) && RADIOLIB_EXCLUDE_LR11X0 != 1 + if (!rIf) { + rIf = new LR1121Interface(RadioLibHAL, LR1121_SPI_NSS_PIN, LR1121_IRQ_PIN, LR1121_NRESET_PIN, LR1121_BUSY_PIN); + if (!rIf->init()) { + LOG_WARN("Failed to find LR1121 radio\n"); + delete rIf; + rIf = NULL; + } else { + LOG_INFO("LR1121 Radio init succeeded, using LR1121 radio\n"); + radioType = LR1121_RADIO; + } + } +#endif + +#if defined(USE_SX1280) && RADIOLIB_EXCLUDE_SX128X != 1 if (!rIf) { rIf = new SX1280Interface(RadioLibHAL, SX128X_CS, SX128X_DIO1, SX128X_RESET, SX128X_BUSY); if (!rIf->init()) { @@ -829,27 +1067,39 @@ void setup() rIf = NULL; } else { LOG_INFO("SX1280 Radio init succeeded, using SX1280 radio\n"); + radioType = SX1280_RADIO; } } #endif // check if the radio chip matches the selected region - if ((config.lora.region == meshtastic_Config_LoRaConfig_RegionCode_LORA_24) && (!rIf->wideLora())) { LOG_WARN("Radio chip does not support 2.4GHz LoRa. Reverting to unset.\n"); config.lora.region = meshtastic_Config_LoRaConfig_RegionCode_UNSET; - nodeDB.saveToDisk(SEGMENT_CONFIG); + nodeDB->saveToDisk(SEGMENT_CONFIG); if (!rIf->reconfigure()) { LOG_WARN("Reconfigure failed, rebooting\n"); - screen->startRebootScreen(); + screen->startAlert("Rebooting..."); rebootAtMsec = millis() + 5000; } } + lateInitVariant(); // Do board specific init (see extra_variants/README.md for documentation) + +#if !MESHTASTIC_EXCLUDE_MQTT mqttInit(); +#endif + +#ifdef RF95_FAN_EN + // Ability to disable FAN if PIN has been set with RF95_FAN_EN. + // Make sure LoRa has been started before disabling FAN. + if (config.lora.pa_fan_disabled) + digitalWrite(RF95_FAN_EN, LOW ^ 0); +#endif #ifndef ARCH_PORTDUINO - // Initialize Wifi + + // Initialize Wifi #if HAS_WIFI initWifi(); #endif @@ -860,12 +1110,17 @@ void setup() #endif #endif -#ifdef ARCH_ESP32 +#if defined(ARCH_ESP32) && !MESHTASTIC_EXCLUDE_WEBSERVER // Start web server thread. webServerThread = new WebServerThread(); #endif #ifdef ARCH_PORTDUINO +#if __has_include() + if (settingsMap[webserverport] != -1) { + piwebServerThread = new PiWebServerThread(); + } +#endif initApiServer(TCPPort); #endif @@ -888,7 +1143,7 @@ void setup() powerFSMthread = new PowerFSMThread(); setCPUFast(false); // 80MHz is fine for our slow peripherals } - +#endif uint32_t rebootAtMsec; // If not zero we will reboot at this time (used to reboot shortly after the update completes) uint32_t shutdownAtMsec; // If not zero we will shutdown at this time (used to shutdown from python or mobile client) @@ -909,17 +1164,16 @@ extern meshtastic_DeviceMetadata getDeviceMetadata() deviceMetadata.position_flags = config.position.position_flags; deviceMetadata.hw_model = HW_VENDOR; deviceMetadata.hasRemoteHardware = moduleConfig.remote_hardware.enabled; +#if !(MESHTASTIC_EXCLUDE_PKI) + deviceMetadata.hasPKC = true; +#endif return deviceMetadata; } - +#ifndef PIO_UNIT_TESTING void loop() { runASAP = false; - // axpDebugOutput.loop(); - - // heap_caps_check_integrity_all(true); // FIXME - disable this expensive check - #ifdef ARCH_ESP32 esp32Loop(); #endif @@ -928,32 +1182,21 @@ void loop() #endif powerCommandsCheck(); - // For debugging - // if (rIf) ((RadioLibInterface *)rIf)->isActivelyReceiving(); - #ifdef DEBUG_STACK static uint32_t lastPrint = 0; - if (millis() - lastPrint > 10 * 1000L) { + if (!Throttle::isWithinTimespanMs(lastPrint, 10 * 1000L)) { lastPrint = millis(); meshtastic::printThreadInfo("main"); } #endif - // TODO: This should go into a thread handled by FreeRTOS. - // handleWebResponse(); - - service.loop(); + service->loop(); long delayMsec = mainController.runOrDelay(); - /* if (mainController.nextThread && delayMsec) - LOG_DEBUG("Next %s in %ld\n", mainController.nextThread->ThreadName.c_str(), - mainController.nextThread->tillRun(millis())); */ - // We want to sleep as long as possible here - because it saves power if (!runASAP && loopCanSleep()) { - // if(delayMsec > 100) LOG_DEBUG("sleeping %ld\n", delayMsec); mainDelay.delay(delayMsec); } - // if (didWake) LOG_DEBUG("wake!\n"); -} \ No newline at end of file +} +#endif diff --git a/src/main.h b/src/main.h index 5af0b4082..5722f7cf0 100644 --- a/src/main.h +++ b/src/main.h @@ -22,6 +22,11 @@ extern NimbleBluetooth *nimbleBluetooth; extern NRF52Bluetooth *nrf52Bluetooth; #endif +#if ARCH_PORTDUINO +extern HardwareSPI *DisplaySPI; +extern HardwareSPI *LoraSPI; + +#endif extern ScanI2C::DeviceAddress screen_found; extern ScanI2C::DeviceAddress cardkb_found; extern uint8_t kb_model; @@ -48,18 +53,18 @@ extern Adafruit_DRV2605 drv; extern AudioThread *audioThread; #endif +// Global Screen singleton. +extern graphics::Screen *screen; + +#if !defined(ARCH_PORTDUINO) && !defined(ARCH_STM32WL) && !MESHTASTIC_EXCLUDE_I2C +#include "motion/AccelerometerThread.h" +extern AccelerometerThread *accelerometerThread; +#endif + extern bool isVibrating; extern int TCPPort; // set by Portduino -// Global Screen singleton. -extern graphics::Screen *screen; -// extern Observable newPowerStatus; //TODO: move this to main-esp32.cpp somehow or a helper class - -// extern meshtastic::PowerStatus *powerStatus; -// extern meshtastic::GPSStatus *gpsStatus; -// extern meshtastic::NodeStatusHandler *nodeStatusHandler; - // Return a human readable string of the form "Meshtastic_ab13" const char *getDeviceName(); @@ -74,9 +79,11 @@ extern uint32_t serialSinceMsec; // This will suppress the current delay and instead try to run ASAP. extern bool runASAP; +extern bool pauseBluetoothLogging; + void nrf52Setup(), esp32Setup(), nrf52Loop(), esp32Loop(), rp2040Setup(), clearBonds(), enterDfuMode(); meshtastic_DeviceMetadata getDeviceMetadata(); -// FIXME, we default to 4MHz SPI, SPI mode 0, check if the datasheet says it can really do that +// We default to 4MHz SPI, SPI mode 0 extern SPISettings spiSettings; \ No newline at end of file diff --git a/src/memGet.cpp b/src/memGet.cpp index 0575da279..ef1102f1e 100644 --- a/src/memGet.cpp +++ b/src/memGet.cpp @@ -22,6 +22,8 @@ uint32_t MemGet::getFreeHeap() return ESP.getFreeHeap(); #elif defined(ARCH_NRF52) return dbgHeapFree(); +#elif defined(ARCH_RP2040) + return rp2040.getFreeHeap(); #else // this platform does not have heap management function implemented return UINT32_MAX; @@ -38,6 +40,8 @@ uint32_t MemGet::getHeapSize() return ESP.getHeapSize(); #elif defined(ARCH_NRF52) return dbgHeapTotal(); +#elif defined(ARCH_RP2040) + return rp2040.getTotalHeap(); #else // this platform does not have heap management function implemented return UINT32_MAX; @@ -53,6 +57,8 @@ uint32_t MemGet::getFreePsram() { #ifdef ARCH_ESP32 return ESP.getFreePsram(); +#elif defined(ARCH_PORTDUINO) + return 4194252; #else return 0; #endif @@ -67,6 +73,8 @@ uint32_t MemGet::getPsramSize() { #ifdef ARCH_ESP32 return ESP.getPsramSize(); +#elif defined(ARCH_PORTDUINO) + return 4194252; #else return 0; #endif diff --git a/src/mesh/Channels.cpp b/src/mesh/Channels.cpp index fe1041d3d..bb30e501d 100644 --- a/src/mesh/Channels.cpp +++ b/src/mesh/Channels.cpp @@ -1,21 +1,26 @@ #include "Channels.h" +#include "../userPrefs.h" #include "CryptoEngine.h" +#include "Default.h" #include "DisplayFormatters.h" #include "NodeDB.h" +#include "RadioInterface.h" #include "configuration.h" #include -/// 16 bytes of random PSK for our _public_ default channel that all devices power up on (AES128) -static const uint8_t defaultpsk[] = {0xd4, 0xf1, 0xbb, 0x3a, 0x20, 0x29, 0x07, 0x59, - 0xf0, 0xbc, 0xff, 0xab, 0xcf, 0x4e, 0x69, 0x01}; +#if !MESHTASTIC_EXCLUDE_MQTT +#include "mqtt/MQTT.h" +#endif Channels channels; const char *Channels::adminChannel = "admin"; const char *Channels::gpioChannel = "gpio"; const char *Channels::serialChannel = "serial"; +#if !MESHTASTIC_EXCLUDE_MQTT const char *Channels::mqttChannel = "mqtt"; +#endif uint8_t xorHash(const uint8_t *p, size_t len) { @@ -71,6 +76,23 @@ meshtastic_Channel &Channels::fixupChannel(ChannelIndex chIndex) return ch; } +void Channels::initDefaultLoraConfig() +{ + meshtastic_Config_LoRaConfig &loraConfig = config.lora; + + loraConfig.modem_preset = meshtastic_Config_LoRaConfig_ModemPreset_LONG_FAST; // Default to Long Range & Fast + loraConfig.use_preset = true; + loraConfig.tx_power = 0; // default + loraConfig.channel_num = 0; + +#ifdef USERPREFS_LORACONFIG_MODEM_PRESET + loraConfig.modem_preset = USERPREFS_LORACONFIG_MODEM_PRESET; +#endif +#ifdef USERPREFS_LORACONFIG_CHANNEL_NUM + loraConfig.channel_num = USERPREFS_LORACONFIG_CHANNEL_NUM; +#endif +} + /** * Write a default channel to the specified channel index */ @@ -78,19 +100,63 @@ void Channels::initDefaultChannel(ChannelIndex chIndex) { meshtastic_Channel &ch = getByIndex(chIndex); meshtastic_ChannelSettings &channelSettings = ch.settings; - meshtastic_Config_LoRaConfig &loraConfig = config.lora; - loraConfig.modem_preset = meshtastic_Config_LoRaConfig_ModemPreset_LONG_FAST; // Default to Long Range & Fast - loraConfig.use_preset = true; - loraConfig.tx_power = 0; // default uint8_t defaultpskIndex = 1; channelSettings.psk.bytes[0] = defaultpskIndex; channelSettings.psk.size = 1; strncpy(channelSettings.name, "", sizeof(channelSettings.name)); - channelSettings.module_settings.position_precision = 32; // default to sending location on the primary channel + channelSettings.module_settings.position_precision = 13; // default to sending location on the primary channel + channelSettings.has_module_settings = true; ch.has_settings = true; - ch.role = meshtastic_Channel_Role_PRIMARY; + ch.role = chIndex == 0 ? meshtastic_Channel_Role_PRIMARY : meshtastic_Channel_Role_SECONDARY; + + switch (chIndex) { + case 0: +#ifdef USERPREFS_CHANNEL_0_PSK + static const uint8_t defaultpsk0[] = USERPREFS_CHANNEL_0_PSK; + memcpy(channelSettings.psk.bytes, defaultpsk0, sizeof(defaultpsk0)); + channelSettings.psk.size = sizeof(defaultpsk0); + +#endif +#ifdef USERPREFS_CHANNEL_0_NAME + strcpy(channelSettings.name, USERPREFS_CHANNEL_0_NAME); +#endif +#ifdef USERPREFS_CHANNEL_0_PRECISION + channelSettings.module_settings.position_precision = USERPREFS_CHANNEL_0_PRECISION; +#endif + break; + case 1: +#ifdef USERPREFS_CHANNEL_1_PSK + static const uint8_t defaultpsk1[] = USERPREFS_CHANNEL_1_PSK; + memcpy(channelSettings.psk.bytes, defaultpsk1, sizeof(defaultpsk1)); + channelSettings.psk.size = sizeof(defaultpsk1); + +#endif +#ifdef USERPREFS_CHANNEL_1_NAME + strcpy(channelSettings.name, USERPREFS_CHANNEL_1_NAME); +#endif +#ifdef USERPREFS_CHANNEL_1_PRECISION + channelSettings.module_settings.position_precision = USERPREFS_CHANNEL_1_PRECISION; +#endif + break; + case 2: +#ifdef USERPREFS_CHANNEL_2_PSK + static const uint8_t defaultpsk2[] = USERPREFS_CHANNEL_2_PSK; + memcpy(channelSettings.psk.bytes, defaultpsk2, sizeof(defaultpsk2)); + channelSettings.psk.size = sizeof(defaultpsk2); + +#endif +#ifdef USERPREFS_CHANNEL_2_NAME + strcpy(channelSettings.name, USERPREFS_CHANNEL_2_NAME); +#endif +#ifdef USERPREFS_CHANNEL_2_PRECISION + channelSettings.module_settings.position_precision = USERPREFS_CHANNEL_2_PRECISION; +#endif + break; + default: + break; + } } CryptoKey Channels::getKey(ChannelIndex chIndex) @@ -179,7 +245,15 @@ void Channels::initDefaults() channelFile.channels_count = MAX_NUM_CHANNELS; for (int i = 0; i < channelFile.channels_count; i++) fixupChannel(i); + initDefaultLoraConfig(); + +#ifdef USERPREFS_CHANNELS_TO_WRITE + for (int i = 0; i < USERPREFS_CHANNELS_TO_WRITE; i++) { + initDefaultChannel(i); + } +#else initDefaultChannel(0); +#endif } void Channels::onConfigChanged() @@ -191,6 +265,12 @@ void Channels::onConfigChanged() if (ch.role == meshtastic_Channel_Role_PRIMARY) primaryIndex = i; } +#if !MESHTASTIC_EXCLUDE_MQTT + if (channels.anyMqttEnabled() && mqtt && !mqtt->isEnabled()) { + LOG_DEBUG("MQTT is enabled on at least one channel, so set MQTT thread to run immediately\n"); + mqtt->start(); + } +#endif } meshtastic_Channel &Channels::getByIndex(ChannelIndex chIndex) @@ -235,6 +315,22 @@ void Channels::setChannel(const meshtastic_Channel &c) old = c; // slam in the new settings/role } +bool Channels::anyMqttEnabled() +{ +#if USERPREFS_EVENT_MODE + // Don't publish messages on the public MQTT broker if we are in event mode + if (strcmp(moduleConfig.mqtt.address, default_mqtt_address) == 0) { + return false; + } +#endif + for (int i = 0; i < getNumChannels(); i++) + if (channelFile.channels[i].role != meshtastic_Channel_Role_DISABLED && channelFile.channels[i].has_settings && + (channelFile.channels[i].settings.downlink_enabled || channelFile.channels[i].settings.uplink_enabled)) + return true; + + return false; +} + const char *Channels::getName(size_t chIndex) { // Convert the short "" representation for Default into a usable string @@ -253,38 +349,30 @@ const char *Channels::getName(size_t chIndex) return channelName; } -/** -* Generate a short suffix used to disambiguate channels that might have the same "name" entered by the human but different PSKs. -* The ideas is that the PSK changing should be visible to the user so that they see they probably messed up and that's why they -their nodes -* aren't talking to each other. -* -* This string is of the form "#name-X". -* -* Where X is either: -* (for custom PSKS) a letter from A to Z (base26), and formed by xoring all the bytes of the PSK together, -* -* This function will also need to be implemented in GUI apps that talk to the radio. -* -* https://github.com/meshtastic/firmware/issues/269 -*/ -const char *Channels::getPrimaryName() +bool Channels::isDefaultChannel(ChannelIndex chIndex) { - static char buf[32]; + const auto &ch = getByIndex(chIndex); + if (ch.settings.psk.size == 1 && ch.settings.psk.bytes[0] == 1) { + const char *name = getName(chIndex); + const char *presetName = DisplayFormatters::getModemPresetDisplayName(config.lora.modem_preset, false); + // Check if the name is the default derived from the modem preset + if (strcmp(name, presetName) == 0) + return true; + } + return false; +} - char suffix; - // auto channelSettings = getPrimary(); - // if (channelSettings.psk.size != 1) { - // We have a standard PSK, so generate a letter based hash. - uint8_t code = getHash(primaryIndex); - - suffix = 'A' + (code % 26); - /* } else { - suffix = '0' + channelSettings.psk.bytes[0]; - } */ - - snprintf(buf, sizeof(buf), "#%s-%c", getName(primaryIndex), suffix); - return buf; +bool Channels::hasDefaultChannel() +{ + // If we don't use a preset or the default frequency slot, or we override the frequency, we don't have a default channel + if (!config.lora.use_preset || !RadioInterface::uses_default_frequency_slot || config.lora.override_frequency) + return false; + // Check if any of the channels are using the default name and PSK + for (size_t i = 0; i < getNumChannels(); i++) { + if (isDefaultChannel(i)) + return true; + } + return false; } /** Given a channel hash setup crypto for decoding that channel (or the primary channel if that channel is unsecured) diff --git a/src/mesh/Channels.h b/src/mesh/Channels.h index 87a72e07b..b0c9b3d07 100644 --- a/src/mesh/Channels.h +++ b/src/mesh/Channels.h @@ -61,25 +61,6 @@ class Channels ChannelIndex getNumChannels() { return channelFile.channels_count; } - /** - * Generate a short suffix used to disambiguate channels that might have the same "name" entered by the human but different - PSKs. - * The ideas is that the PSK changing should be visible to the user so that they see they probably messed up and that's why - they their nodes - * aren't talking to each other. - * - * This string is of the form "#name-X". - * - * Where X is either: - * (for custom PSKS) a letter from A to Z (base26), and formed by xoring all the bytes of the PSK together, - * OR (for the standard minimially secure PSKs) a number from 0 to 9. - * - * This function will also need to be implemented in GUI apps that talk to the radio. - * - * https://github.com/meshtastic/firmware/issues/269 - */ - const char *getPrimaryName(); - /// Called by NodeDB on initial boot when the radio config settings are unset. Set a default single channel config. void initDefaults(); @@ -102,6 +83,15 @@ class Channels */ int16_t setActiveByIndex(ChannelIndex channelIndex); + // Returns true if the channel has the default name and PSK + bool isDefaultChannel(ChannelIndex chIndex); + + // Returns true if we can be reached via a channel with the default settings given a region and modem preset + bool hasDefaultChannel(); + + // Returns true if any of our channels have enabled MQTT uplink or downlink + bool anyMqttEnabled(); + private: /** Given a channel index, change to use the crypto key specified by that index * @@ -127,7 +117,12 @@ class Channels meshtastic_Channel &fixupChannel(ChannelIndex chIndex); /** - * Write a default channel to the specified channel index + * Writes the default lora config + */ + void initDefaultLoraConfig(); + + /** + * Write default channels defined in UserPrefs */ void initDefaultChannel(ChannelIndex chIndex); @@ -139,4 +134,12 @@ class Channels }; /// Singleton channel table -extern Channels channels; \ No newline at end of file +extern Channels channels; + +/// 16 bytes of random PSK for our _public_ default channel that all devices power up on (AES128) +static const uint8_t defaultpsk[] = {0xd4, 0xf1, 0xbb, 0x3a, 0x20, 0x29, 0x07, 0x59, + 0xf0, 0xbc, 0xff, 0xab, 0xcf, 0x4e, 0x69, 0x01}; + +static const uint8_t eventpsk[] = {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}; \ No newline at end of file diff --git a/src/mesh/CryptoEngine.cpp b/src/mesh/CryptoEngine.cpp index 1e44cb9b7..a875eb8b2 100644 --- a/src/mesh/CryptoEngine.cpp +++ b/src/mesh/CryptoEngine.cpp @@ -1,6 +1,220 @@ #include "CryptoEngine.h" +#include "NodeDB.h" +#include "RadioInterface.h" +#include "architecture.h" #include "configuration.h" +#if !(MESHTASTIC_EXCLUDE_PKI) +#include "aes-ccm.h" +#include "meshUtils.h" +#include +#include +#include +#if !(MESHTASTIC_EXCLUDE_PKI_KEYGEN) + +/** + * Create a public/private key pair with Curve25519. + * + * @param pubKey The destination for the public key. + * @param privKey The destination for the private key. + */ +void CryptoEngine::generateKeyPair(uint8_t *pubKey, uint8_t *privKey) +{ + LOG_DEBUG("Generating Curve25519 key pair...\n"); + Curve25519::dh1(public_key, private_key); + memcpy(pubKey, public_key, sizeof(public_key)); + memcpy(privKey, private_key, sizeof(private_key)); +} + +/** + * regenerate a public key with Curve25519. + * + * @param pubKey The destination for the public key. + * @param privKey The source for the private key. + */ +bool CryptoEngine::regeneratePublicKey(uint8_t *pubKey, uint8_t *privKey) +{ + if (!memfll(privKey, 0, sizeof(private_key))) { + Curve25519::eval(pubKey, privKey, 0); + if (Curve25519::isWeakPoint(pubKey)) { + LOG_ERROR("PKI key generation failed. Specified private key results in a weak\n"); + memset(pubKey, 0, 32); + return false; + } + memcpy(private_key, privKey, sizeof(private_key)); + memcpy(public_key, pubKey, sizeof(public_key)); + } else { + LOG_WARN("X25519 key generation failed due to blank private key\n"); + return false; + } + return true; +} +#endif +void CryptoEngine::clearKeys() +{ + memset(public_key, 0, sizeof(public_key)); + memset(private_key, 0, sizeof(private_key)); +} + +/** + * Encrypt a packet's payload using a key generated with Curve25519 and SHA256 + * for a specific node. + * + * @param bytes is updated in place + */ +bool CryptoEngine::encryptCurve25519(uint32_t toNode, uint32_t fromNode, uint64_t packetNum, size_t numBytes, uint8_t *bytes, + uint8_t *bytesOut) +{ + uint8_t *auth; + long extraNonceTmp = random(); + auth = bytesOut + numBytes; + memcpy((uint8_t *)(auth + 8), &extraNonceTmp, + sizeof(uint32_t)); // do not use dereference on potential non aligned pointers : *extraNonce = extraNonceTmp; + LOG_INFO("Random nonce value: %d\n", extraNonceTmp); + meshtastic_NodeInfoLite *node = nodeDB->getMeshNode(toNode); + if (node->num < 1 || node->user.public_key.size == 0) { + LOG_DEBUG("Node %d or their public_key not found\n", toNode); + return false; + } + if (!crypto->setDHKey(toNode)) { + return false; + } + initNonce(fromNode, packetNum, extraNonceTmp); + + // Calculate the shared secret with the destination node and encrypt + printBytes("Attempting encrypt using nonce: ", nonce, 13); + printBytes("Attempting encrypt using shared_key starting with: ", shared_key, 8); + aes_ccm_ae(shared_key, 32, nonce, 8, bytes, numBytes, nullptr, 0, bytesOut, + auth); // this can write up to 15 bytes longer than numbytes past bytesOut + memcpy((uint8_t *)(auth + 8), &extraNonceTmp, + sizeof(uint32_t)); // do not use dereference on potential non aligned pointers : *extraNonce = extraNonceTmp; + return true; +} + +/** + * Decrypt a packet's payload using a key generated with Curve25519 and SHA256 + * for a specific node. + * + * @param bytes is updated in place + */ +bool CryptoEngine::decryptCurve25519(uint32_t fromNode, uint64_t packetNum, size_t numBytes, uint8_t *bytes, uint8_t *bytesOut) +{ + uint8_t *auth; // set to last 8 bytes of text? + uint32_t extraNonce; // pointer was not really used + auth = bytes + numBytes - 12; + memcpy(&extraNonce, auth + 8, + sizeof(uint32_t)); // do not use dereference on potential non aligned pointers : (uint32_t *)(auth + 8); +#ifndef PIO_UNIT_TESTING + LOG_INFO("Random nonce value: %d\n", extraNonce); + meshtastic_NodeInfoLite *node = nodeDB->getMeshNode(fromNode); + + if (node == nullptr || node->num < 1 || node->user.public_key.size == 0) { + LOG_DEBUG("Node or its public key not found in database\n"); + return false; + } + + // Calculate the shared secret with the sending node and decrypt + if (!crypto->setDHKey(fromNode)) { + return false; + } +#endif + initNonce(fromNode, packetNum, extraNonce); + printBytes("Attempting decrypt using nonce: ", nonce, 13); + printBytes("Attempting decrypt using shared_key starting with: ", shared_key, 8); + return aes_ccm_ad(shared_key, 32, nonce, 8, bytes, numBytes - 12, nullptr, 0, auth, bytesOut); +} + +void CryptoEngine::setDHPrivateKey(uint8_t *_private_key) +{ + memcpy(private_key, _private_key, 32); +} +/** + * Set the PKI key used for encrypt, decrypt. + * + * @param nodeNum the node number of the node who's public key we want to use + */ +bool CryptoEngine::setDHKey(uint32_t nodeNum) +{ + meshtastic_NodeInfoLite *node = nodeDB->getMeshNode(nodeNum); + if (node->num < 1 || node->user.public_key.size == 0) { + LOG_DEBUG("Node %d or their public_key not found\n", nodeNum); + return false; + } + printBytes("Generating DH with remote pubkey: ", node->user.public_key.bytes, 32); + printBytes("And local pubkey: ", config.security.public_key.bytes, 32); + if (!setDHPublicKey(node->user.public_key.bytes)) + return false; + + // printBytes("DH Output: ", shared_key, 32); + + /** + * D.J. Bernstein reccomends hashing the shared key. We want to do this because there are + * at least 128 bits of entropy in the 256-bit output of the DH key exchange, but we don't + * really know where. If you extract, for instance, the first 128 bits with basic truncation, + * then you don't know if you got all of your 128 entropy bits, or less, possibly much less. + * + * No exploitable bias is really known at that point, but we know enough to be wary. + * Hashing the DH output is a simple and safe way to gather all the entropy and spread + * it around as needed. + */ + crypto->hash(shared_key, 32); + return true; +} + +/** + * Hash arbitrary data using SHA256. + * + * @param bytes + * @param numBytes + */ +void CryptoEngine::hash(uint8_t *bytes, size_t numBytes) +{ + SHA256 hash; + size_t posn; + uint8_t size = numBytes; + uint8_t inc = 16; + hash.reset(); + for (posn = 0; posn < size; posn += inc) { + size_t len = size - posn; + if (len > inc) + len = inc; + hash.update(bytes + posn, len); + } + hash.finalize(bytes, 32); +} + +void CryptoEngine::aesSetKey(const uint8_t *key_bytes, size_t key_len) +{ + if (aes) { + delete aes; + aes = nullptr; + } + if (key_len != 0) { + aes = new AESSmall256(); + aes->setKey(key_bytes, key_len); + } +} + +void CryptoEngine::aesEncrypt(uint8_t *in, uint8_t *out) +{ + aes->encryptBlock(out, in); +} + +bool CryptoEngine::setDHPublicKey(uint8_t *pubKey) +{ + uint8_t local_priv[32]; + memcpy(shared_key, pubKey, 32); + memcpy(local_priv, private_key, 32); + // Calculate the shared secret with the specified node's public key and our private key + // This includes an internal weak key check, which among other things looks for an all 0 public key and shared key. + if (!Curve25519::dh2(shared_key, local_priv)) { + LOG_WARN("Curve25519DH step 2 failed!\n"); + return false; + } + return true; +} + +#endif concurrency::Lock *cryptLock; void CryptoEngine::setKey(const CryptoKey &k) @@ -14,24 +228,59 @@ void CryptoEngine::setKey(const CryptoKey &k) * * @param bytes is updated in place */ -void CryptoEngine::encrypt(uint32_t fromNode, uint64_t packetId, size_t numBytes, uint8_t *bytes) +void CryptoEngine::encryptPacket(uint32_t fromNode, uint64_t packetId, size_t numBytes, uint8_t *bytes) { - LOG_WARN("noop encryption!\n"); + if (key.length > 0) { + initNonce(fromNode, packetId); + if (numBytes <= MAX_BLOCKSIZE) { + encryptAESCtr(key, nonce, numBytes, bytes); + } else { + LOG_ERROR("Packet too large for crypto engine: %d. noop encryption!\n", numBytes); + } + } } void CryptoEngine::decrypt(uint32_t fromNode, uint64_t packetId, size_t numBytes, uint8_t *bytes) { - LOG_WARN("noop decryption!\n"); + // For CTR, the implementation is the same + encryptPacket(fromNode, packetId, numBytes, bytes); +} + +// Generic implementation of AES-CTR encryption. +void CryptoEngine::encryptAESCtr(CryptoKey _key, uint8_t *_nonce, size_t numBytes, uint8_t *bytes) +{ + if (ctr) { + delete ctr; + ctr = nullptr; + } + if (_key.length == 16) + ctr = new CTR(); + else + ctr = new CTR(); + ctr->setKey(_key.bytes, _key.length); + static uint8_t scratch[MAX_BLOCKSIZE]; + memcpy(scratch, bytes, numBytes); + memset(scratch + numBytes, 0, + sizeof(scratch) - numBytes); // Fill rest of buffer with zero (in case cypher looks at it) + + ctr->setIV(_nonce, 16); + ctr->setCounterSize(4); + ctr->encrypt(bytes, scratch, numBytes); } /** * Init our 128 bit nonce for a new packet */ -void CryptoEngine::initNonce(uint32_t fromNode, uint64_t packetId) +void CryptoEngine::initNonce(uint32_t fromNode, uint64_t packetId, uint32_t extraNonce) { memset(nonce, 0, sizeof(nonce)); // use memcpy to avoid breaking strict-aliasing memcpy(nonce, &packetId, sizeof(uint64_t)); memcpy(nonce + sizeof(uint64_t), &fromNode, sizeof(uint32_t)); -} \ No newline at end of file + if (extraNonce) + memcpy(nonce + sizeof(uint32_t), &extraNonce, sizeof(uint32_t)); +} +#ifndef HAS_CUSTOM_CRYPTO_ENGINE +CryptoEngine *crypto = new CryptoEngine; +#endif \ No newline at end of file diff --git a/src/mesh/CryptoEngine.h b/src/mesh/CryptoEngine.h index 2737dab2d..4c2fc19d9 100644 --- a/src/mesh/CryptoEngine.h +++ b/src/mesh/CryptoEngine.h @@ -1,6 +1,9 @@ #pragma once - +#include "AES.h" +#include "CTR.h" #include "concurrency/LockGuard.h" +#include "configuration.h" +#include "mesh-pb-constants.h" #include extern concurrency::Lock *cryptLock; @@ -18,17 +21,37 @@ struct CryptoKey { */ #define MAX_BLOCKSIZE 256 +#define TEST_CURVE25519_FIELD_OPS // Exposes Curve25519::isWeakPoint() for testing keys class CryptoEngine { - protected: - /** Our per packet nonce */ - uint8_t nonce[16] = {0}; - - CryptoKey key = {}; - public: +#if !(MESHTASTIC_EXCLUDE_PKI) + uint8_t public_key[32] = {0}; +#endif + virtual ~CryptoEngine() {} +#if !(MESHTASTIC_EXCLUDE_PKI) +#if !(MESHTASTIC_EXCLUDE_PKI_KEYGEN) + virtual void generateKeyPair(uint8_t *pubKey, uint8_t *privKey); + virtual bool regeneratePublicKey(uint8_t *pubKey, uint8_t *privKey); + +#endif + void clearKeys(); + void setDHPrivateKey(uint8_t *_private_key); + virtual bool encryptCurve25519(uint32_t toNode, uint32_t fromNode, uint64_t packetNum, size_t numBytes, uint8_t *bytes, + uint8_t *bytesOut); + virtual bool decryptCurve25519(uint32_t fromNode, uint64_t packetNum, size_t numBytes, uint8_t *bytes, uint8_t *bytesOut); + bool setDHKey(uint32_t nodeNum); + virtual bool setDHPublicKey(uint8_t *publicKey); + virtual void hash(uint8_t *bytes, size_t numBytes); + + virtual void aesSetKey(const uint8_t *key, size_t key_len); + + virtual void aesEncrypt(uint8_t *in, uint8_t *out); + AESSmall256 *aes = NULL; + +#endif /** * Set the key used for encrypt, decrypt. @@ -46,10 +69,20 @@ class CryptoEngine * * @param bytes is updated in place */ - virtual void encrypt(uint32_t fromNode, uint64_t packetId, size_t numBytes, uint8_t *bytes); + virtual void encryptPacket(uint32_t fromNode, uint64_t packetId, size_t numBytes, uint8_t *bytes); virtual void decrypt(uint32_t fromNode, uint64_t packetId, size_t numBytes, uint8_t *bytes); - + virtual void encryptAESCtr(CryptoKey key, uint8_t *nonce, size_t numBytes, uint8_t *bytes); +#ifndef PIO_UNIT_TESTING protected: +#endif + /** Our per packet nonce */ + uint8_t nonce[16] = {0}; + CryptoKey key = {}; + CTRCommon *ctr = NULL; +#if !(MESHTASTIC_EXCLUDE_PKI) + uint8_t shared_key[32] = {0}; + uint8_t private_key[32] = {0}; +#endif /** * Init our 128 bit nonce for a new packet * @@ -58,7 +91,7 @@ class CryptoEngine * a 32 bit sending node number (stored in little endian order) * a 32 bit block counter (starts at zero) */ - void initNonce(uint32_t fromNode, uint64_t packetId); + void initNonce(uint32_t fromNode, uint64_t packetId, uint32_t extraNonce = 0); }; -extern CryptoEngine *crypto; +extern CryptoEngine *crypto; \ No newline at end of file diff --git a/src/mesh/Default.cpp b/src/mesh/Default.cpp new file mode 100644 index 000000000..0bedcfc91 --- /dev/null +++ b/src/mesh/Default.cpp @@ -0,0 +1,53 @@ +#include "Default.h" +#include "../userPrefs.h" + +uint32_t Default::getConfiguredOrDefaultMs(uint32_t configuredInterval, uint32_t defaultInterval) +{ + if (configuredInterval > 0) + return configuredInterval * 1000; + return defaultInterval * 1000; +} + +uint32_t Default::getConfiguredOrDefaultMs(uint32_t configuredInterval) +{ + if (configuredInterval > 0) + return configuredInterval * 1000; + return default_broadcast_interval_secs * 1000; +} + +uint32_t Default::getConfiguredOrDefault(uint32_t configured, uint32_t defaultValue) +{ + if (configured > 0) + return configured; + return defaultValue; +} +/** + * Calculates the scaled value of the configured or default value in ms based on the number of online nodes. + * + * For example a default of 30 minutes (1800 seconds * 1000) would yield: + * 45 nodes = 2475 * 1000 + * 60 nodes = 4500 * 1000 + * 75 nodes = 6525 * 1000 + * 90 nodes = 8550 * 1000 + * @param configured The configured value. + * @param defaultValue The default value. + * @param numOnlineNodes The number of online nodes. + * @return The scaled value of the configured or default value. + */ +uint32_t Default::getConfiguredOrDefaultMsScaled(uint32_t configured, uint32_t defaultValue, uint32_t numOnlineNodes) +{ + // If we are a router, we don't scale the value. It's already significantly higher. + if (config.device.role == meshtastic_Config_DeviceConfig_Role_ROUTER) + return getConfiguredOrDefaultMs(configured, defaultValue); + + return getConfiguredOrDefaultMs(configured, defaultValue) * congestionScalingCoefficient(numOnlineNodes); +} + +uint8_t Default::getConfiguredOrDefaultHopLimit(uint8_t configured) +{ +#if USERPREFS_EVENT_MODE + return (configured > HOP_RELIABLE) ? HOP_RELIABLE : config.lora.hop_limit; +#else + return (configured >= HOP_MAX) ? HOP_MAX : config.lora.hop_limit; +#endif +} \ No newline at end of file diff --git a/src/mesh/Default.h b/src/mesh/Default.h new file mode 100644 index 000000000..5641b5d25 --- /dev/null +++ b/src/mesh/Default.h @@ -0,0 +1,50 @@ +#pragma once +#include +#include +#define ONE_DAY 24 * 60 * 60 +#define ONE_MINUTE_MS 60 * 1000 +#define THIRTY_SECONDS_MS 30 * 1000 +#define FIVE_SECONDS_MS 5 * 1000 + +#define default_gps_update_interval IF_ROUTER(ONE_DAY, 2 * 60) +#define default_telemetry_broadcast_interval_secs IF_ROUTER(ONE_DAY / 2, 30 * 60) +#define default_broadcast_interval_secs IF_ROUTER(ONE_DAY / 2, 15 * 60) +#define default_wait_bluetooth_secs IF_ROUTER(1, 60) +#define default_sds_secs IF_ROUTER(ONE_DAY, UINT32_MAX) // Default to forever super deep sleep +#define default_ls_secs IF_ROUTER(ONE_DAY, 5 * 60) +#define default_min_wake_secs 10 +#define default_screen_on_secs IF_ROUTER(1, 60 * 10) +#define default_node_info_broadcast_secs 3 * 60 * 60 +#define default_neighbor_info_broadcast_secs 6 * 60 * 60 +#define min_node_info_broadcast_secs 60 * 60 // No regular broadcasts of more than once an hour +#define min_neighbor_info_broadcast_secs 2 * 60 * 60 + +#define default_mqtt_address "mqtt.meshtastic.org" +#define default_mqtt_username "meshdev" +#define default_mqtt_password "large4cats" +#define default_mqtt_root "msh" + +#define IF_ROUTER(routerVal, normalVal) \ + ((config.device.role == meshtastic_Config_DeviceConfig_Role_ROUTER) ? (routerVal) : (normalVal)) + +class Default +{ + public: + static uint32_t getConfiguredOrDefaultMs(uint32_t configuredInterval); + static uint32_t getConfiguredOrDefaultMs(uint32_t configuredInterval, uint32_t defaultInterval); + static uint32_t getConfiguredOrDefault(uint32_t configured, uint32_t defaultValue); + static uint32_t getConfiguredOrDefaultMsScaled(uint32_t configured, uint32_t defaultValue, uint32_t numOnlineNodes); + static uint8_t getConfiguredOrDefaultHopLimit(uint8_t configured); + + private: + static float congestionScalingCoefficient(int numOnlineNodes) + { + if (numOnlineNodes <= 40) { + return 1.0; // No scaling for 40 or fewer nodes + } else { + // Sscaling based on number of nodes over 40 + int nodesOverForty = (numOnlineNodes - 40); + return 1.0 + (nodesOverForty * 0.075); // Each number of online node scales by 0.075 + } + } +}; \ No newline at end of file diff --git a/src/mesh/FloodingRouter.cpp b/src/mesh/FloodingRouter.cpp index db3f3f35e..23f6b6f92 100644 --- a/src/mesh/FloodingRouter.cpp +++ b/src/mesh/FloodingRouter.cpp @@ -1,4 +1,5 @@ #include "FloodingRouter.h" +#include "../userPrefs.h" #include "configuration.h" #include "mesh-pb-constants.h" @@ -20,12 +21,13 @@ ErrorCode FloodingRouter::send(meshtastic_MeshPacket *p) bool FloodingRouter::shouldFilterReceived(const meshtastic_MeshPacket *p) { if (wasSeenRecently(p)) { // Note: this will also add a recent packet record - printPacket("Ignoring incoming msg, because we've already seen it", p); + printPacket("Ignoring dupe incoming msg", p); + rxDupe++; if (config.device.role != meshtastic_Config_DeviceConfig_Role_ROUTER && - config.device.role != meshtastic_Config_DeviceConfig_Role_ROUTER_CLIENT && config.device.role != meshtastic_Config_DeviceConfig_Role_REPEATER) { // cancel rebroadcast of this message *if* there was already one, unless we're a router/repeater! - Router::cancelSending(p->from, p->id); + if (Router::cancelSending(p->from, p->id)) + txRelayCanceled++; } return true; } @@ -35,30 +37,27 @@ bool FloodingRouter::shouldFilterReceived(const meshtastic_MeshPacket *p) void FloodingRouter::sniffReceived(const meshtastic_MeshPacket *p, const meshtastic_Routing *c) { - bool isAck = - ((c && c->error_reason == meshtastic_Routing_Error_NONE)); // consider only ROUTING_APP message without error as ACK - if (isAck && p->to != getNodeNum()) { - // do not flood direct message that is ACKed - LOG_DEBUG("Receiving an ACK not for me, but don't need to rebroadcast this direct message anymore.\n"); + bool isAckorReply = (p->which_payload_variant == meshtastic_MeshPacket_decoded_tag) && (p->decoded.request_id != 0); + if (isAckorReply && !isToUs(p) && p->to != NODENUM_BROADCAST) { + // do not flood direct message that is ACKed or replied to + 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 } - if ((p->to != getNodeNum()) && (p->hop_limit > 0) && (getFrom(p) != getNodeNum())) { + if (!isToUs(p) && (p->hop_limit > 0) && !isFromUs(p)) { if (p->id != 0) { if (config.device.role != meshtastic_Config_DeviceConfig_Role_CLIENT_MUTE) { meshtastic_MeshPacket *tosend = packetPool.allocCopy(*p); // keep a copy because we will be sending it tosend->hop_limit--; // bump down the hop count - - if (p->which_payload_variant == meshtastic_MeshPacket_decoded_tag) { - // If it is a traceRoute request, update the route that it went via me - if (traceRouteModule && traceRouteModule->wantPacket(p)) - traceRouteModule->updateRoute(tosend); - // If it is a neighborInfo packet, update last_sent_by_id - if (neighborInfoModule && neighborInfoModule->wantPacket(p)) - neighborInfoModule->updateLastSentById(tosend); +#if USERPREFS_EVENT_MODE + if (tosend->hop_limit > 2) { + // if we are "correcting" the hop_limit, "correct" the hop_start by the same amount to preserve hops away. + tosend->hop_start -= (tosend->hop_limit - 2); + tosend->hop_limit = 2; } +#endif - LOG_INFO("Rebroadcasting received floodmsg to neighbors\n"); + LOG_INFO("Rebroadcasting received floodmsg\n"); // Note: we are careful to resend using the original senders node id // We are careful not to call our hooked version of send() - because we don't want to check this again Router::send(tosend); @@ -66,7 +65,7 @@ void FloodingRouter::sniffReceived(const meshtastic_MeshPacket *p, const meshtas LOG_DEBUG("Not rebroadcasting. Role = Role_ClientMute\n"); } } else { - LOG_DEBUG("Ignoring a simple (0 id) broadcast\n"); + LOG_DEBUG("Ignoring 0 id broadcast\n"); } } // handle the packet as normal diff --git a/src/mesh/FloodingRouter.h b/src/mesh/FloodingRouter.h index 309035cb3..a3adfe70c 100644 --- a/src/mesh/FloodingRouter.h +++ b/src/mesh/FloodingRouter.h @@ -2,8 +2,6 @@ #include "PacketHistory.h" #include "Router.h" -#include "modules/NeighborInfoModule.h" -#include "modules/TraceRouteModule.h" /** * This is a mixin that extends Router with the ability to do Naive Flooding (in the standard mesh protocol sense) diff --git a/src/mesh/InterfacesTemplates.cpp b/src/mesh/InterfacesTemplates.cpp index c732829e9..2720e8525 100644 --- a/src/mesh/InterfacesTemplates.cpp +++ b/src/mesh/InterfacesTemplates.cpp @@ -1,3 +1,5 @@ +#include "LR11x0Interface.cpp" +#include "LR11x0Interface.h" #include "SX126xInterface.cpp" #include "SX126xInterface.h" #include "SX128xInterface.cpp" @@ -6,10 +8,19 @@ #include "api/ServerAPI.h" // We need this declaration for proper linking in derived classes +#if RADIOLIB_EXCLUDE_SX126X != 1 template class SX126xInterface; template class SX126xInterface; template class SX126xInterface; +#endif +#if RADIOLIB_EXCLUDE_SX128X != 1 template class SX128xInterface; +#endif +#if RADIOLIB_EXCLUDE_LR11X0 != 1 +template class LR11x0Interface; +template class LR11x0Interface; +template class LR11x0Interface; +#endif #ifdef ARCH_STM32WL template class SX126xInterface; #endif diff --git a/src/mesh/LLCC68Interface.cpp b/src/mesh/LLCC68Interface.cpp index 8109765a6..d92ea5450 100644 --- a/src/mesh/LLCC68Interface.cpp +++ b/src/mesh/LLCC68Interface.cpp @@ -1,3 +1,4 @@ +#if RADIOLIB_EXCLUDE_SX126X != 1 #include "LLCC68Interface.h" #include "configuration.h" #include "error.h" @@ -6,4 +7,5 @@ LLCC68Interface::LLCC68Interface(LockingArduinoHal *hal, RADIOLIB_PIN_TYPE cs, R RADIOLIB_PIN_TYPE busy) : SX126xInterface(hal, cs, irq, rst, busy) { -} \ No newline at end of file +} +#endif \ No newline at end of file diff --git a/src/mesh/LLCC68Interface.h b/src/mesh/LLCC68Interface.h index 7e0fa1439..1cd23e92b 100644 --- a/src/mesh/LLCC68Interface.h +++ b/src/mesh/LLCC68Interface.h @@ -1,5 +1,5 @@ #pragma once - +#if RADIOLIB_EXCLUDE_SX126X != 1 #include "SX126xInterface.h" /** @@ -15,4 +15,5 @@ class LLCC68Interface : public SX126xInterface public: LLCC68Interface(LockingArduinoHal *hal, RADIOLIB_PIN_TYPE cs, RADIOLIB_PIN_TYPE irq, RADIOLIB_PIN_TYPE rst, RADIOLIB_PIN_TYPE busy); -}; \ No newline at end of file +}; +#endif \ No newline at end of file diff --git a/src/mesh/LR1110Interface.cpp b/src/mesh/LR1110Interface.cpp new file mode 100644 index 000000000..5dbd3ff38 --- /dev/null +++ b/src/mesh/LR1110Interface.cpp @@ -0,0 +1,12 @@ +#if RADIOLIB_EXCLUDE_LR11X0 != 1 + +#include "LR1110Interface.h" +#include "configuration.h" +#include "error.h" + +LR1110Interface::LR1110Interface(LockingArduinoHal *hal, RADIOLIB_PIN_TYPE cs, RADIOLIB_PIN_TYPE irq, RADIOLIB_PIN_TYPE rst, + RADIOLIB_PIN_TYPE busy) + : LR11x0Interface(hal, cs, irq, rst, busy) +{ +} +#endif \ No newline at end of file diff --git a/src/mesh/LR1110Interface.h b/src/mesh/LR1110Interface.h new file mode 100644 index 000000000..2a2e6e861 --- /dev/null +++ b/src/mesh/LR1110Interface.h @@ -0,0 +1,14 @@ +#pragma once +#if RADIOLIB_EXCLUDE_LR11X0 != 1 +#include "LR11x0Interface.h" + +/** + * Our adapter for LR1110 radios + */ +class LR1110Interface : public LR11x0Interface +{ + public: + LR1110Interface(LockingArduinoHal *hal, RADIOLIB_PIN_TYPE cs, RADIOLIB_PIN_TYPE irq, RADIOLIB_PIN_TYPE rst, + RADIOLIB_PIN_TYPE busy); +}; +#endif \ No newline at end of file diff --git a/src/mesh/LR1120Interface.cpp b/src/mesh/LR1120Interface.cpp new file mode 100644 index 000000000..a17ac87ef --- /dev/null +++ b/src/mesh/LR1120Interface.cpp @@ -0,0 +1,17 @@ +#if RADIOLIB_EXCLUDE_LR11X0 != 1 + +#include "LR1120Interface.h" +#include "configuration.h" +#include "error.h" + +LR1120Interface::LR1120Interface(LockingArduinoHal *hal, RADIOLIB_PIN_TYPE cs, RADIOLIB_PIN_TYPE irq, RADIOLIB_PIN_TYPE rst, + RADIOLIB_PIN_TYPE busy) + : LR11x0Interface(hal, cs, irq, rst, busy) +{ +} + +bool LR1120Interface::wideLora() +{ + return true; +} +#endif \ No newline at end of file diff --git a/src/mesh/LR1120Interface.h b/src/mesh/LR1120Interface.h new file mode 100644 index 000000000..d81a480a9 --- /dev/null +++ b/src/mesh/LR1120Interface.h @@ -0,0 +1,15 @@ +#pragma once +#if RADIOLIB_EXCLUDE_LR11X0 != 1 + +#include "LR11x0Interface.h" +/** + * Our adapter for LR1120 wideband radios + */ +class LR1120Interface : public LR11x0Interface +{ + public: + LR1120Interface(LockingArduinoHal *hal, RADIOLIB_PIN_TYPE cs, RADIOLIB_PIN_TYPE irq, RADIOLIB_PIN_TYPE rst, + RADIOLIB_PIN_TYPE busy); + bool wideLora() override; +}; +#endif \ No newline at end of file diff --git a/src/mesh/LR1121Interface.cpp b/src/mesh/LR1121Interface.cpp new file mode 100644 index 000000000..29bd07d08 --- /dev/null +++ b/src/mesh/LR1121Interface.cpp @@ -0,0 +1,16 @@ +#if RADIOLIB_EXCLUDE_LR11X0 != 1 +#include "LR1121Interface.h" +#include "configuration.h" +#include "error.h" + +LR1121Interface::LR1121Interface(LockingArduinoHal *hal, RADIOLIB_PIN_TYPE cs, RADIOLIB_PIN_TYPE irq, RADIOLIB_PIN_TYPE rst, + RADIOLIB_PIN_TYPE busy) + : LR11x0Interface(hal, cs, irq, rst, busy) +{ +} + +bool LR1121Interface::wideLora() +{ + return true; +} +#endif \ No newline at end of file diff --git a/src/mesh/LR1121Interface.h b/src/mesh/LR1121Interface.h new file mode 100644 index 000000000..ebc5b59a9 --- /dev/null +++ b/src/mesh/LR1121Interface.h @@ -0,0 +1,16 @@ +#pragma once +#if RADIOLIB_EXCLUDE_LR11X0 != 1 + +#include "LR11x0Interface.h" + +/** + * Our adapter for LR1121 wideband radios + */ +class LR1121Interface : public LR11x0Interface +{ + public: + LR1121Interface(LockingArduinoHal *hal, RADIOLIB_PIN_TYPE cs, RADIOLIB_PIN_TYPE irq, RADIOLIB_PIN_TYPE rst, + RADIOLIB_PIN_TYPE busy); + bool wideLora() override; +}; +#endif \ No newline at end of file diff --git a/src/mesh/LR11x0Interface.cpp b/src/mesh/LR11x0Interface.cpp new file mode 100644 index 000000000..a985a9006 --- /dev/null +++ b/src/mesh/LR11x0Interface.cpp @@ -0,0 +1,301 @@ +#if RADIOLIB_EXCLUDE_LR11X0 != 1 +#include "LR11x0Interface.h" +#include "Throttle.h" +#include "configuration.h" +#include "error.h" +#include "mesh/NodeDB.h" +#ifdef LR11X0_DIO_AS_RF_SWITCH +#include "rfswitch.h" +#else +static const uint32_t rfswitch_dio_pins[] = {RADIOLIB_NC, RADIOLIB_NC, RADIOLIB_NC, RADIOLIB_NC, RADIOLIB_NC}; +static const Module::RfSwitchMode_t rfswitch_table[] = { + {LR11x0::MODE_STBY, {}}, {LR11x0::MODE_RX, {}}, {LR11x0::MODE_TX, {}}, {LR11x0::MODE_TX_HP, {}}, + {LR11x0::MODE_TX_HF, {}}, {LR11x0::MODE_GNSS, {}}, {LR11x0::MODE_WIFI, {}}, END_OF_MODE_TABLE, +}; +#endif + +#ifdef ARCH_PORTDUINO +#include "PortduinoGlue.h" +#endif + +// Particular boards might define a different max power based on what their hardware can do, default to max power output if not +// specified (may be dangerous if using external PA and LR11x0 power config forgotten) +#ifndef LR1110_MAX_POWER +#define LR1110_MAX_POWER 22 +#endif + +// the 2.4G part maxes at 13dBm + +#ifndef LR1120_MAX_POWER +#define LR1120_MAX_POWER 13 +#endif + +template +LR11x0Interface::LR11x0Interface(LockingArduinoHal *hal, RADIOLIB_PIN_TYPE cs, RADIOLIB_PIN_TYPE irq, RADIOLIB_PIN_TYPE rst, + RADIOLIB_PIN_TYPE busy) + : RadioLibInterface(hal, cs, irq, rst, busy, &lora), lora(&module) +{ + LOG_WARN("LR11x0Interface(cs=%d, irq=%d, rst=%d, busy=%d)\n", cs, irq, rst, busy); +} + +/// Initialise the Driver transport hardware and software. +/// Make sure the Driver is properly configured before calling init(). +/// \return true if initialisation succeeded. +template bool LR11x0Interface::init() +{ +#ifdef LR11X0_POWER_EN + pinMode(LR11X0_POWER_EN, OUTPUT); + digitalWrite(LR11X0_POWER_EN, HIGH); +#endif + +// FIXME: correct logic to default to not using TCXO if no voltage is specified for LR11x0_DIO3_TCXO_VOLTAGE +#if !defined(LR11X0_DIO3_TCXO_VOLTAGE) + float tcxoVoltage = + 0; // "TCXO reference voltage to be set on DIO3. Defaults to 1.6 V, set to 0 to skip." per + // https://github.com/jgromes/RadioLib/blob/690a050ebb46e6097c5d00c371e961c1caa3b52e/src/modules/LR11x0/LR11x0.h#L471C26-L471C104 + // (DIO3 is free to be used as an IRQ) + LOG_DEBUG("LR11X0_DIO3_TCXO_VOLTAGE not defined, not using DIO3 as TCXO reference voltage\n"); +#else + float tcxoVoltage = LR11X0_DIO3_TCXO_VOLTAGE; + LOG_DEBUG("LR11X0_DIO3_TCXO_VOLTAGE defined, using DIO3 as TCXO reference voltage at %f V\n", LR11X0_DIO3_TCXO_VOLTAGE); + // (DIO3 is not free to be used as an IRQ) +#endif + + RadioLibInterface::init(); + + if (power > LR1110_MAX_POWER) // Clamp power to maximum defined level + power = LR1110_MAX_POWER; + + if ((power > LR1120_MAX_POWER) && + (config.lora.region == meshtastic_Config_LoRaConfig_RegionCode_LORA_24)) // clamp again if wide freq range + power = LR1120_MAX_POWER; + + limitPower(); + +#ifdef LR11X0_RF_SWITCH_SUBGHZ + pinMode(LR11X0_RF_SWITCH_SUBGHZ, OUTPUT); + digitalWrite(LR11X0_RF_SWITCH_SUBGHZ, getFreq() < 1e9 ? HIGH : LOW); + LOG_DEBUG("Setting RF0 switch to %s\n", getFreq() < 1e9 ? "SubGHz" : "2.4GHz"); +#endif + +#ifdef LR11X0_RF_SWITCH_2_4GHZ + pinMode(LR11X0_RF_SWITCH_2_4GHZ, OUTPUT); + digitalWrite(LR11X0_RF_SWITCH_2_4GHZ, getFreq() < 1e9 ? LOW : HIGH); + LOG_DEBUG("Setting RF1 switch to %s\n", getFreq() < 1e9 ? "SubGHz" : "2.4GHz"); +#endif + + int res = lora.begin(getFreq(), bw, sf, cr, syncWord, power, preambleLength, tcxoVoltage); + // \todo Display actual typename of the adapter, not just `LR11x0` + LOG_INFO("LR11x0 init result %d\n", res); + if (res == RADIOLIB_ERR_CHIP_NOT_FOUND) + return false; + + LR11x0VersionInfo_t version; + res = lora.getVersionInfo(&version); + if (res == RADIOLIB_ERR_NONE) + LOG_DEBUG("LR11x0 Device %d, HW %d, FW %d.%d, WiFi %d.%d, GNSS %d.%d\n", version.device, version.hardware, + version.fwMajor, version.fwMinor, version.fwMajorWiFi, version.fwMinorWiFi, version.fwGNSS, + version.almanacGNSS); + + LOG_INFO("Frequency set to %f\n", getFreq()); + LOG_INFO("Bandwidth set to %f\n", bw); + LOG_INFO("Power output set to %d\n", power); + + if (res == RADIOLIB_ERR_NONE) + res = lora.setCRC(2); + + // FIXME: May want to set depending on a definition, currently all LR1110 variant files use the DC-DC regulator option + if (res == RADIOLIB_ERR_NONE) + res = lora.setRegulatorDCDC(); + +#ifdef LR11X0_DIO_AS_RF_SWITCH + bool dioAsRfSwitch = true; +#elif defined(ARCH_PORTDUINO) + bool dioAsRfSwitch = false; + if (settingsMap[dio2_as_rf_switch]) { + dioAsRfSwitch = true; + } +#else + bool dioAsRfSwitch = false; +#endif + + if (dioAsRfSwitch) { + lora.setRfSwitchTable(rfswitch_dio_pins, rfswitch_table); + LOG_DEBUG("Setting DIO RF switch\n", res); + } + + if (res == RADIOLIB_ERR_NONE) { + if (config.lora.sx126x_rx_boosted_gain) { // the name is unfortunate but historically accurate + res = lora.setRxBoostedGainMode(true); + LOG_INFO("Set RX gain to boosted mode; result: %d\n", res); + } else { + res = lora.setRxBoostedGainMode(false); + LOG_INFO("Set RX gain to power saving mode (boosted mode off); result: %d\n", res); + } + } + + if (res == RADIOLIB_ERR_NONE) + startReceive(); // start receiving + + return res == RADIOLIB_ERR_NONE; +} + +template bool LR11x0Interface::reconfigure() +{ + RadioLibInterface::reconfigure(); + + // set mode to standby + setStandby(); + + // configure publicly accessible settings + int err = lora.setSpreadingFactor(sf); + if (err != RADIOLIB_ERR_NONE) + RECORD_CRITICALERROR(meshtastic_CriticalErrorCode_INVALID_RADIO_SETTING); + + err = lora.setBandwidth(bw); + if (err != RADIOLIB_ERR_NONE) + RECORD_CRITICALERROR(meshtastic_CriticalErrorCode_INVALID_RADIO_SETTING); + + err = lora.setCodingRate(cr); + if (err != RADIOLIB_ERR_NONE) + RECORD_CRITICALERROR(meshtastic_CriticalErrorCode_INVALID_RADIO_SETTING); + + // Hmm - seems to lower SNR when the signal levels are high. Leaving off for now... + // TODO: Confirm gain registers are okay now + // err = lora.setRxGain(true); + // assert(err == RADIOLIB_ERR_NONE); + + err = lora.setSyncWord(syncWord); + assert(err == RADIOLIB_ERR_NONE); + + err = lora.setPreambleLength(preambleLength); + assert(err == RADIOLIB_ERR_NONE); + + err = lora.setFrequency(getFreq()); + if (err != RADIOLIB_ERR_NONE) + RECORD_CRITICALERROR(meshtastic_CriticalErrorCode_INVALID_RADIO_SETTING); + + if (power > LR1110_MAX_POWER) // This chip has lower power limits than some + power = LR1110_MAX_POWER; + if ((power > LR1120_MAX_POWER) && (config.lora.region == meshtastic_Config_LoRaConfig_RegionCode_LORA_24)) // 2.4G power limit + power = LR1120_MAX_POWER; + + err = lora.setOutputPower(power); + assert(err == RADIOLIB_ERR_NONE); + + startReceive(); // restart receiving + + return RADIOLIB_ERR_NONE; +} + +template void INTERRUPT_ATTR LR11x0Interface::disableInterrupt() +{ + lora.clearIrqAction(); +} + +template void LR11x0Interface::setStandby() +{ + checkNotification(); // handle any pending interrupts before we force standby + + int err = lora.standby(); + + if (err != RADIOLIB_ERR_NONE) { + LOG_DEBUG("LR11x0 standby failed with error %d\n", err); + } + + assert(err == RADIOLIB_ERR_NONE); + + isReceiving = false; // If we were receiving, not any more + activeReceiveStart = 0; + disableInterrupt(); + completeSending(); // If we were sending, not anymore + RadioLibInterface::setStandby(); +} + +/** + * Add SNR data to received messages + */ +template void LR11x0Interface::addReceiveMetadata(meshtastic_MeshPacket *mp) +{ + // LOG_DEBUG("PacketStatus %x\n", lora.getPacketStatus()); + mp->rx_snr = lora.getSNR(); + mp->rx_rssi = lround(lora.getRSSI()); +} + +/** We override to turn on transmitter power as needed. + */ +template void LR11x0Interface::configHardwareForSend() +{ + RadioLibInterface::configHardwareForSend(); +} + +// For power draw measurements, helpful to force radio to stay sleeping +// #define SLEEP_ONLY + +template void LR11x0Interface::startReceive() +{ +#ifdef SLEEP_ONLY + sleep(); +#else + + setStandby(); + + lora.setPreambleLength(preambleLength); // Solve RX ack fail after direct message sent. Not sure why this is needed. + + // We use a 16 bit preamble so this should save some power by letting radio sit in standby mostly. + // Furthermore, we need the PREAMBLE_DETECTED and HEADER_VALID IRQ flag to detect whether we are actively receiving + int err = lora.startReceive(RADIOLIB_LR11X0_RX_TIMEOUT_INF, RADIOLIB_IRQ_RX_DEFAULT_FLAGS, RADIOLIB_IRQ_RX_DEFAULT_MASK, 0); + assert(err == RADIOLIB_ERR_NONE); + + RadioLibInterface::startReceive(); + + // Must be done AFTER, starting transmit, because startTransmit clears (possibly stale) interrupt pending register bits + enableInterrupt(isrRxLevel0); +#endif +} + +/** Is the channel currently active? */ +template bool LR11x0Interface::isChannelActive() +{ + // check if we can detect a LoRa preamble on the current channel + int16_t result; + + setStandby(); + result = lora.scanChannel(); + if (result == RADIOLIB_LORA_DETECTED) + return true; + + assert(result != RADIOLIB_ERR_WRONG_MODEM); + + return false; +} + +/** Could we send right now (i.e. either not actively receiving or transmitting)? */ +template bool LR11x0Interface::isActivelyReceiving() +{ + // The IRQ status will be cleared when we start our read operation. Check if we've started a header, but haven't yet + // received and handled the interrupt for reading the packet/handling errors. + return receiveDetected(lora.getIrqStatus(), RADIOLIB_LR11X0_IRQ_SYNC_WORD_HEADER_VALID, + RADIOLIB_LR11X0_IRQ_PREAMBLE_DETECTED); +} + +template bool LR11x0Interface::sleep() +{ + // \todo Display actual typename of the adapter, not just `LR11x0` + LOG_DEBUG("LR11x0 entering sleep mode\n"); + setStandby(); // Stop any pending operations + + // turn off TCXO if it was powered + lora.setTCXO(0); + + // put chipset into sleep mode (we've already disabled interrupts by now) + bool keepConfig = false; + lora.sleep(keepConfig, 0); // Note: we do not keep the config, full reinit will be needed + +#ifdef LR11X0_POWER_EN + digitalWrite(LR11X0_POWER_EN, LOW); +#endif + + return true; +} +#endif \ No newline at end of file diff --git a/src/mesh/LR11x0Interface.h b/src/mesh/LR11x0Interface.h new file mode 100644 index 000000000..4829ddc1d --- /dev/null +++ b/src/mesh/LR11x0Interface.h @@ -0,0 +1,69 @@ +#pragma once +#if RADIOLIB_EXCLUDE_LR11X0 != 1 +#include "RadioLibInterface.h" + +/** + * \brief Adapter for LR11x0 radio family. Implements common logic for child classes. + * \tparam T RadioLib module type for LR11x0: SX1262, SX1268. + */ +template class LR11x0Interface : public RadioLibInterface +{ + public: + LR11x0Interface(LockingArduinoHal *hal, RADIOLIB_PIN_TYPE cs, RADIOLIB_PIN_TYPE irq, RADIOLIB_PIN_TYPE rst, + RADIOLIB_PIN_TYPE busy); + + /// Initialise the Driver transport hardware and software. + /// Make sure the Driver is properly configured before calling init(). + /// \return true if initialisation succeeded. + virtual bool init() override; + + /// Apply any radio provisioning changes + /// Make sure the Driver is properly configured before calling init(). + /// \return true if initialisation succeeded. + virtual bool reconfigure() override; + + /// Prepare hardware for sleep. Call this _only_ for deep sleep, not needed for light sleep. + virtual bool sleep() override; + + bool isIRQPending() override { return lora.getIrqFlags() != 0; } + + protected: + /** + * Specific module instance + */ + T lora; + + /** + * Glue functions called from ISR land + */ + virtual void disableInterrupt() override; + + /** + * Enable a particular ISR callback glue function + */ + virtual void enableInterrupt(void (*callback)()) { lora.setIrqAction(callback); } + + /** can we detect a LoRa preamble on the current channel? */ + virtual bool isChannelActive() override; + + /** are we actively receiving a packet (only called during receiving state) */ + virtual bool isActivelyReceiving() override; + + /** + * Start waiting to receive a message + */ + virtual void startReceive() override; + + /** + * We override to turn on transmitter power as needed. + */ + virtual void configHardwareForSend() override; + + /** + * Add SNR data to received messages + */ + virtual void addReceiveMetadata(meshtastic_MeshPacket *mp) override; + + virtual void setStandby() override; +}; +#endif \ No newline at end of file diff --git a/src/mesh/MeshModule.cpp b/src/mesh/MeshModule.cpp index 9c6ca78ee..c60404c98 100644 --- a/src/mesh/MeshModule.cpp +++ b/src/mesh/MeshModule.cpp @@ -12,7 +12,7 @@ const meshtastic_MeshPacket *MeshModule::currentRequest; /** * If any of the current chain of modules has already sent a reply, it will be here. This is useful to allow - * the RoutingPlugin to avoid sending redundant acks + * the RoutingModule to avoid sending redundant acks */ meshtastic_MeshPacket *MeshModule::currentReply; @@ -32,14 +32,15 @@ MeshModule::~MeshModule() assert(0); // FIXME - remove from list of modules once someone needs this feature } -meshtastic_MeshPacket *MeshModule::allocAckNak(meshtastic_Routing_Error err, NodeNum to, PacketId idFrom, ChannelIndex chIndex) +meshtastic_MeshPacket *MeshModule::allocAckNak(meshtastic_Routing_Error err, NodeNum to, PacketId idFrom, ChannelIndex chIndex, + uint8_t hopStart, uint8_t hopLimit) { meshtastic_Routing c = meshtastic_Routing_init_default; c.error_reason = err; c.which_variant = meshtastic_Routing_error_reason_tag; - // Now that we have moded sendAckNak up one level into the class hierarchy we can no longer assume we are a RoutingPlugin + // Now that we have moded sendAckNak up one level into the class hierarchy we can no longer assume we are a RoutingModule // So we manually call pb_encode_to_bytes and specify routing port number // auto p = allocDataProtobuf(c); meshtastic_MeshPacket *p = router->allocForSending(); @@ -49,25 +50,29 @@ meshtastic_MeshPacket *MeshModule::allocAckNak(meshtastic_Routing_Error err, Nod p->priority = meshtastic_MeshPacket_Priority_ACK; - p->hop_limit = config.lora.hop_limit; // Flood ACK back to original sender + p->hop_limit = routingModule->getHopLimitForResponse(hopStart, hopLimit); // Flood ACK back to original sender p->to = to; p->decoded.request_id = idFrom; p->channel = chIndex; - LOG_ERROR("Alloc an err=%d,to=0x%x,idFrom=0x%x,id=0x%x\n", err, to, idFrom, p->id); + if (err != meshtastic_Routing_Error_NONE) + LOG_WARN("Alloc an err=%d,to=0x%x,idFrom=0x%x,id=0x%x\n", err, to, idFrom, p->id); return p; } meshtastic_MeshPacket *MeshModule::allocErrorResponse(meshtastic_Routing_Error err, const meshtastic_MeshPacket *p) { - auto r = allocAckNak(err, getFrom(p), p->id, p->channel); + // If the original packet couldn't be decoded, use the primary channel + uint8_t channelIndex = + p->which_payload_variant == meshtastic_MeshPacket_decoded_tag ? p->channel : channels.getPrimaryIndex(); + auto r = allocAckNak(err, getFrom(p), p->id, channelIndex); setReplyTo(r, *p); return r; } -void MeshModule::callPlugins(meshtastic_MeshPacket &mp, RxSource src) +void MeshModule::callModules(meshtastic_MeshPacket &mp, RxSource src) { // LOG_DEBUG("In call modules\n"); bool moduleFound = false; @@ -80,8 +85,8 @@ void MeshModule::callPlugins(meshtastic_MeshPacket &mp, RxSource src) bool ignoreRequest = false; // No module asked to ignore the request yet // Was this message directed to us specifically? Will be false if we are sniffing someone elses packets - auto ourNodeNum = nodeDB.getNodeNum(); - bool toUs = mp.to == NODENUM_BROADCAST || mp.to == ourNodeNum; + auto ourNodeNum = nodeDB->getNodeNum(); + bool toUs = mp.to == NODENUM_BROADCAST || isToUs(&mp); for (auto i = modules->begin(); i != modules->end(); ++i) { auto &pi = **i; @@ -112,13 +117,13 @@ void MeshModule::callPlugins(meshtastic_MeshPacket &mp, RxSource src) /// Also: if a packet comes in on the local PC interface, we don't check for bound channels, because it is TRUSTED and /// it needs to to be able to fetch the initial admin packets without yet knowing any channels. - bool rxChannelOk = !pi.boundChannel || (mp.from == 0) || (strcasecmp(ch->settings.name, pi.boundChannel) == 0); + bool rxChannelOk = !pi.boundChannel || (mp.from == 0) || (ch && strcasecmp(ch->settings.name, pi.boundChannel) == 0); if (!rxChannelOk) { // no one should have already replied! assert(!currentReply); - if (mp.decoded.want_response) { + if (isDecoded && mp.decoded.want_response) { printPacket("packet on wrong channel, returning error", &mp); currentReply = pi.allocErrorResponse(meshtastic_Routing_Error_NOT_AUTHORIZED, &mp); } else @@ -136,7 +141,7 @@ void MeshModule::callPlugins(meshtastic_MeshPacket &mp, RxSource src) // because currently when the phone sends things, it sends things using the local node ID as the from address. A // better solution (FIXME) would be to let phones have their own distinct addresses and we 'route' to them like // any other node. - if (mp.decoded.want_response && toUs && (getFrom(&mp) != ourNodeNum || mp.to == ourNodeNum) && !currentReply) { + if (isDecoded && mp.decoded.want_response && toUs && (!isFromUs(&mp) || isToUs(&mp)) && !currentReply) { pi.sendResponse(mp); ignoreRequest = ignoreRequest || pi.ignoreRequest; // If at least one module asks it, we may ignore a request LOG_INFO("Asked module '%s' to send a response\n", pi.name); @@ -161,10 +166,10 @@ void MeshModule::callPlugins(meshtastic_MeshPacket &mp, RxSource src) pi.currentRequest = NULL; } - if (mp.decoded.want_response && toUs) { + if (isDecoded && mp.decoded.want_response && toUs) { if (currentReply) { printPacket("Sending response", currentReply); - service.sendToMesh(currentReply); + service->sendToMesh(currentReply); currentReply = NULL; } else if (mp.from != ourNodeNum && !ignoreRequest) { // Note: if the message started with the local node or a module asked to ignore the request, we don't want to send a @@ -176,11 +181,12 @@ void MeshModule::callPlugins(meshtastic_MeshPacket &mp, RxSource src) // SECURITY NOTE! I considered sending back a different error code if we didn't find the psk (i.e. !isDecoded) // but opted NOT TO. Because it is not a good idea to let remote nodes 'probe' to find out which PSKs were "good" vs // bad. - routingModule->sendAckNak(meshtastic_Routing_Error_NO_RESPONSE, getFrom(&mp), mp.id, mp.channel); + routingModule->sendAckNak(meshtastic_Routing_Error_NO_RESPONSE, getFrom(&mp), mp.id, mp.channel, mp.hop_start, + mp.hop_limit); } } - if (!moduleFound) { + if (!moduleFound && isDecoded) { LOG_DEBUG("No modules interested in portnum=%d, src=%s\n", mp.decoded.portnum, (src == RX_SRC_LOCAL) ? "LOCAL" : "REMOTE"); } @@ -217,6 +223,7 @@ void setReplyTo(meshtastic_MeshPacket *p, const meshtastic_MeshPacket &to) assert(p->which_payload_variant == meshtastic_MeshPacket_decoded_tag); // Should already be set by now p->to = getFrom(&to); // Make sure that if we are sending to the local node, we use our local node addr, not 0 p->channel = to.channel; // Use the same channel that the request came in on + p->hop_limit = routingModule->getHopLimitForResponse(to.hop_start, to.hop_limit); // No need for an ack if we are just delivering locally (it just generates an ignored ack) p->want_ack = (to.from != 0) ? to.want_ack : false; @@ -233,7 +240,7 @@ std::vector MeshModule::GetMeshModulesWithUIFrames() for (auto i = modules->begin(); i != modules->end(); ++i) { auto &pi = **i; if (pi.wantUIFrame()) { - LOG_DEBUG("Module wants a UI Frame\n"); + LOG_DEBUG("%s wants a UI Frame\n", pi.name); modulesWithUIFrames.push_back(&pi); } } @@ -248,14 +255,14 @@ void MeshModule::observeUIEvents(Observer *observer) auto &pi = **i; Observable *observable = pi.getUIFrameObservable(); if (observable != NULL) { - LOG_DEBUG("Module wants a UI Frame\n"); + LOG_DEBUG("%s wants a UI Frame\n", pi.name); observer->observe(observable); } } } } -AdminMessageHandleResult MeshModule::handleAdminMessageForAllPlugins(const meshtastic_MeshPacket &mp, +AdminMessageHandleResult MeshModule::handleAdminMessageForAllModules(const meshtastic_MeshPacket &mp, meshtastic_AdminMessage *request, meshtastic_AdminMessage *response) { @@ -277,3 +284,16 @@ AdminMessageHandleResult MeshModule::handleAdminMessageForAllPlugins(const mesht } return handled; } + +#if HAS_SCREEN +// Would our module like its frame to be focused after Screen::setFrames has regenerated the list of frames? +// Only considered if setFrames is triggered by a UIFrameEvent +bool MeshModule::isRequestingFocus() +{ + if (_requestingFocus) { + _requestingFocus = false; // Consume the request + return true; + } else + return false; +} +#endif diff --git a/src/mesh/MeshModule.h b/src/mesh/MeshModule.h index ebe3af1a0..7929ba972 100644 --- a/src/mesh/MeshModule.h +++ b/src/mesh/MeshModule.h @@ -35,10 +35,16 @@ enum class AdminMessageHandleResult { /* * This struct is used by Screen to figure out whether screen frame should be updated. */ -typedef struct _UIFrameEvent { - bool frameChanged; - bool needRedraw; -} UIFrameEvent; +struct UIFrameEvent { + // What do we actually want to happen? + enum Action { + REDRAW_ONLY, // Don't change which frames are show, just redraw, asap + REGENERATE_FRAMESET, // Regenerate (change? add? remove?) screen frames, honoring requestFocus() + REGENERATE_FRAMESET_BACKGROUND, // Regenerate screen frames, attempting to remain on the same frame throughout + } action = REDRAW_ONLY; + + // We might want to pass additional data inside this struct at some point +}; /** A baseclass for any mesh "module". * @@ -64,15 +70,17 @@ class MeshModule /** For use only by MeshService */ - static void callPlugins(meshtastic_MeshPacket &mp, RxSource src = RX_SRC_RADIO); + static void callModules(meshtastic_MeshPacket &mp, RxSource src = RX_SRC_RADIO); static std::vector GetMeshModulesWithUIFrames(); static void observeUIEvents(Observer *observer); - static AdminMessageHandleResult handleAdminMessageForAllPlugins(const meshtastic_MeshPacket &mp, + static AdminMessageHandleResult handleAdminMessageForAllModules(const meshtastic_MeshPacket &mp, meshtastic_AdminMessage *request, meshtastic_AdminMessage *response); #if HAS_SCREEN virtual void drawFrame(OLEDDisplay *display, OLEDDisplayUiState *state, int16_t x, int16_t y) { return; } + virtual bool isRequestingFocus(); // Checked by screen, when regenerating frameset + virtual bool interceptingKeyboardInput() { return false; } // Can screen use keyboard for nav, or is module handling input? #endif protected: const char *name; @@ -153,7 +161,8 @@ class MeshModule virtual bool wantUIFrame() { return false; } virtual Observable *getUIFrameObservable() { return NULL; } - meshtastic_MeshPacket *allocAckNak(meshtastic_Routing_Error err, NodeNum to, PacketId idFrom, ChannelIndex chIndex); + meshtastic_MeshPacket *allocAckNak(meshtastic_Routing_Error err, NodeNum to, PacketId idFrom, ChannelIndex chIndex, + uint8_t hopStart = 0, uint8_t hopLimit = 0); /// Send an error response for the specified packet. meshtastic_MeshPacket *allocErrorResponse(meshtastic_Routing_Error err, const meshtastic_MeshPacket *p); @@ -175,6 +184,19 @@ class MeshModule return AdminMessageHandleResult::NOT_HANDLED; }; +#if HAS_SCREEN + /** Request that our module's screen frame be focused when Screen::setFrames runs + * Only considered if Screen::setFrames is triggered via a UIFrameEvent + * + * Having this as a separate call, instead of part of the UIFrameEvent, allows the module to delay decision + * until drawFrame() is called. This required less restructuring. + */ + bool _requestingFocus = false; + void requestFocus() { _requestingFocus = true; } +#else + void requestFocus(){}; // No-op +#endif + private: /** * If any of the current chain of modules has already sent a reply, it will be here. This is useful to allow @@ -194,4 +216,4 @@ class MeshModule /** set the destination and packet parameters of packet p intended as a reply to a particular "to" packet * This ensures that if the request packet was sent reliably, the reply is sent that way as well. */ -void setReplyTo(meshtastic_MeshPacket *p, const meshtastic_MeshPacket &to); +void setReplyTo(meshtastic_MeshPacket *p, const meshtastic_MeshPacket &to); \ No newline at end of file diff --git a/src/mesh/MeshPacketQueue.cpp b/src/mesh/MeshPacketQueue.cpp index 24756fd2a..99ef41c1e 100644 --- a/src/mesh/MeshPacketQueue.cpp +++ b/src/mesh/MeshPacketQueue.cpp @@ -1,4 +1,5 @@ #include "MeshPacketQueue.h" +#include "NodeDB.h" #include "configuration.h" #include @@ -16,12 +17,9 @@ bool CompareMeshPacketFunc(const meshtastic_MeshPacket *p1, const meshtastic_Mes { assert(p1 && p2); auto p1p = getPriority(p1), p2p = getPriority(p2); - // If priorities differ, use that - // for equal priorities, order by id (older packets have higher priority - this will briefly be wrong when IDs roll over but - // no big deal) - return (p1p != p2p) ? (p1p < p2p) // prefer bigger priorities - : (p1->id >= p2->id); // prefer smaller packet ids + // for equal priorities, prefer packets already on mesh. + return (p1p != p2p) ? (p1p > p2p) : (!isFromUs(p1) && isFromUs(p2)); } MeshPacketQueue::MeshPacketQueue(size_t _maxLen) : maxLen(_maxLen) {} @@ -39,26 +37,38 @@ void fixPriority(meshtastic_MeshPacket *p) // We might receive acks from other nodes (and since generated remotely, they won't have priority assigned. Check for that // and fix it if (p->priority == meshtastic_MeshPacket_Priority_UNSET) { - // if acks give high priority // if a reliable message give a bit higher default priority - p->priority = (p->decoded.portnum == meshtastic_PortNum_ROUTING_APP) - ? meshtastic_MeshPacket_Priority_ACK - : (p->want_ack ? meshtastic_MeshPacket_Priority_RELIABLE : meshtastic_MeshPacket_Priority_DEFAULT); + p->priority = (p->want_ack ? meshtastic_MeshPacket_Priority_RELIABLE : meshtastic_MeshPacket_Priority_DEFAULT); + if (p->which_payload_variant == meshtastic_MeshPacket_decoded_tag) { + // if acks/naks give very high priority + if (p->decoded.portnum == meshtastic_PortNum_ROUTING_APP) { + p->priority = meshtastic_MeshPacket_Priority_ACK; + // if text or admin, give high priority + } else if (p->decoded.portnum == meshtastic_PortNum_TEXT_MESSAGE_APP || + p->decoded.portnum == meshtastic_PortNum_ADMIN_APP) { + p->priority = meshtastic_MeshPacket_Priority_HIGH; + // if it is a response, give higher priority to let it arrive early and stop the request being relayed + } else if (p->decoded.request_id != 0) { + p->priority = meshtastic_MeshPacket_Priority_RESPONSE; + // Also if we want a response, give a bit higher priority + } else if (p->decoded.want_response) { + p->priority = meshtastic_MeshPacket_Priority_RELIABLE; + } + } } } /** enqueue a packet, return false if full */ bool MeshPacketQueue::enqueue(meshtastic_MeshPacket *p) { - fixPriority(p); - // no space - try to replace a lower priority packet in the queue if (queue.size() >= maxLen) { return replaceLowerPriorityPacket(p); } - queue.push_back(p); - std::push_heap(queue.begin(), queue.end(), &CompareMeshPacketFunc); + // Find the correct position using upper_bound to maintain a stable order + auto it = std::upper_bound(queue.begin(), queue.end(), p, CompareMeshPacketFunc); + queue.insert(it, p); // Insert packet at the found position return true; } @@ -69,9 +79,7 @@ meshtastic_MeshPacket *MeshPacketQueue::dequeue() } auto *p = queue.front(); - std::pop_heap(queue.begin(), queue.end(), &CompareMeshPacketFunc); - queue.pop_back(); - + queue.erase(queue.begin()); // Remove the highest-priority packet return p; } @@ -92,7 +100,6 @@ meshtastic_MeshPacket *MeshPacketQueue::remove(NodeNum from, PacketId id) auto p = (*it); if (getFrom(p) == from && p->id == id) { queue.erase(it); - std::make_heap(queue.begin(), queue.end(), &CompareMeshPacketFunc); return p; } } @@ -103,28 +110,21 @@ meshtastic_MeshPacket *MeshPacketQueue::remove(NodeNum from, PacketId id) /** Attempt to find and remove a packet from this queue. Returns the packet which was removed from the queue */ bool MeshPacketQueue::replaceLowerPriorityPacket(meshtastic_MeshPacket *p) { - std::sort_heap(queue.begin(), queue.end(), &CompareMeshPacketFunc); // sort ascending based on priority (0 -> 127) - // find first packet which does not compare less (in priority) than parameter packet - auto low = std::lower_bound(queue.begin(), queue.end(), p, &CompareMeshPacketFunc); - - if (low == queue.begin()) { // if already at start, there are no packets with lower priority - return false; + if (queue.empty()) { + return false; // No packets to replace + } + // Check if the packet at the back has a lower priority than the new packet + auto &backPacket = queue.back(); + if (backPacket->priority < p->priority) { + // Remove the back packet + packetPool.release(backPacket); + queue.pop_back(); + // Insert the new packet in the correct order + enqueue(p); + return true; } - if (low == queue.end()) { - // all priorities in the vector are smaller than the incoming packet. Replace the lowest priority (first) element - low = queue.begin(); - } else { - // 'low' iterator points to first packet which does not compare less than parameter - --low; // iterate to lower priority packet - } - - if (getPriority(p) > getPriority(*low)) { - packetPool.release(*low); // deallocate and drop the packet we're replacing - *low = p; // replace low-pri packet at this position with incoming packet with higher priority - } - - std::make_heap(queue.begin(), queue.end(), &CompareMeshPacketFunc); - return true; -} + // If the back packet's priority is not lower, no replacement occurs + return false; +} \ No newline at end of file diff --git a/src/mesh/MeshService.cpp b/src/mesh/MeshService.cpp index db0dd88ec..655348bd5 100644 --- a/src/mesh/MeshService.cpp +++ b/src/mesh/MeshService.cpp @@ -1,10 +1,11 @@ #include "configuration.h" -#include -#include + +#if !MESHTASTIC_EXCLUDE_GPS +#include "GPS.h" +#endif #include "../concurrency/Periodic.h" #include "BluetoothCommon.h" // needed for updateBatteryLevel, FIXME, eventually when we pull mesh out into a lib we shouldn't be whacking bluetooth from here -#include "GPS.h" #include "MeshService.h" #include "NodeDB.h" #include "PowerFSM.h" @@ -15,9 +16,11 @@ #include "modules/NodeInfoModule.h" #include "modules/PositionModule.h" #include "power.h" +#include +#include -#ifdef ARCH_ESP32 -#include "nimble/NimbleBluetooth.h" +#if ARCH_PORTDUINO +#include "PortduinoGlue.h" #endif /* @@ -37,60 +40,56 @@ arbitrating to select a node number and keeping the current nodedb. The algorithm is as follows: * 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 the new node can build its node db) -* If a node ever receives a User (not just the first broadcast) message where the sender node number equals our node number, that -indicates a collision has occurred and the following steps should happen: - -If the receiving node (that was already in the mesh)'s macaddr is LOWER than the new User who just tried to sign in: it gets to -keep its nodenum. We send a broadcast message of OUR User (we use a broadcast so that the other node can receive our message, -considering we have the same id - it also serves to let observers correct their nodedb) - this case is rare so it should be okay. - -If any node receives a User where the macaddr is GTE than their local macaddr, they have been vetoed and should pick a new random -nodenum (filtering against whatever it knows about the nodedb) and rebroadcast their User. - -FIXME in the initial proof of concept we just skip the entire want/deny flow and just hand pick node numbers at first. */ -MeshService service; +MeshService *service; static MemoryDynamic staticMqttClientProxyMessagePool; static MemoryDynamic staticQueueStatusPool; +static MemoryDynamic staticClientNotificationPool; + Allocator &mqttClientProxyMessagePool = staticMqttClientProxyMessagePool; +Allocator &clientNotificationPool = staticClientNotificationPool; + Allocator &queueStatusPool = staticQueueStatusPool; #include "Router.h" MeshService::MeshService() - : toPhoneQueue(MAX_RX_TOPHONE), toPhoneQueueStatusQueue(MAX_RX_TOPHONE), toPhoneMqttProxyQueue(MAX_RX_TOPHONE) + : toPhoneQueue(MAX_RX_TOPHONE), toPhoneQueueStatusQueue(MAX_RX_TOPHONE), toPhoneMqttProxyQueue(MAX_RX_TOPHONE), + toPhoneClientNotificationQueue(MAX_RX_TOPHONE / 2) { lastQueueStatus = {0, 0, 16, 0}; } void MeshService::init() { - // moved much earlier in boot (called from setup()) - // nodeDB.init(); - +#if HAS_GPS if (gps) gpsObserver.observe(&gps->newStatus); +#endif } int MeshService::handleFromRadio(const meshtastic_MeshPacket *mp) { powerFSM.trigger(EVENT_PACKET_FOR_PHONE); // Possibly keep the node from sleeping - nodeDB.updateFrom(*mp); // update our DB state based off sniffing every RX packet from the radio + nodeDB->updateFrom(*mp); // update our DB state based off sniffing every RX packet from the radio if (mp->which_payload_variant == meshtastic_MeshPacket_decoded_tag && mp->decoded.portnum == meshtastic_PortNum_TELEMETRY_APP && mp->decoded.request_id > 0) { - LOG_DEBUG( - "Received telemetry response. Skip sending our NodeInfo because this potentially a Repeater which will ignore our " - "request for its NodeInfo.\n"); - } else if (mp->which_payload_variant == meshtastic_MeshPacket_decoded_tag && !nodeDB.getMeshNode(mp->from)->has_user && + LOG_DEBUG("Received telemetry response. Skip sending our NodeInfo.\n"); // because this potentially a Repeater which will + // ignore our request for its NodeInfo + } else if (mp->which_payload_variant == meshtastic_MeshPacket_decoded_tag && !nodeDB->getMeshNode(mp->from)->has_user && nodeInfoModule) { - LOG_INFO("Heard a node on channel %d we don't know, sending NodeInfo and asking for a response.\n", mp->channel); - nodeInfoModule->sendOurNodeInfo(mp->from, true, mp->channel); + LOG_INFO("Heard new node on channel %d, sending NodeInfo and asking for a response.\n", mp->channel); + if (airTime->isTxAllowedChannelUtil(true)) { + nodeInfoModule->sendOurNodeInfo(mp->from, true, mp->channel); + } else { + LOG_DEBUG("Skip sending NodeInfo due to > 25 percent channel util.\n"); + } } printPacket("Forwarding to phone", mp); @@ -120,10 +119,10 @@ bool MeshService::reloadConfig(int saveWhat) // If we can successfully set this radio to these settings, save them to disk // This will also update the region as needed - bool didReset = nodeDB.resetRadioConfig(); // Don't let the phone send us fatally bad settings + bool didReset = nodeDB->resetRadioConfig(); // Don't let the phone send us fatally bad settings configChanged.notifyObservers(NULL); // This will cause radio hardware to change freqs etc - nodeDB.saveToDisk(saveWhat); + nodeDB->saveToDisk(saveWhat); return didReset; } @@ -133,7 +132,7 @@ void MeshService::reloadOwner(bool shouldSave) { // LOG_DEBUG("reloadOwner()\n"); // update our local data directly - nodeDB.updateUser(nodeDB.getNodeNum(), owner); + nodeDB->updateUser(nodeDB->getNodeNum(), owner); assert(nodeInfoModule); // update everyone else and save to disk if (nodeInfoModule && shouldSave) { @@ -188,12 +187,7 @@ void MeshService::handleToRadio(meshtastic_MeshPacket &p) return; } #endif - if (p.from != 0) { // We don't let phones assign nodenums to their sent messages - LOG_WARN("phone tried to pick a nodenum, we don't allow that.\n"); - p.from = 0; - } else { - // p.from = nodeDB.getNodeNum(); - } + p.from = 0; // We don't let phones assign nodenums to their sent messages if (p.id == 0) p.id = generatePacketId(); // If the phone didn't supply one, then pick one @@ -217,7 +211,7 @@ void MeshService::handleToRadio(meshtastic_MeshPacket &p) /** Attempt to cancel a previously sent packet from this _local_ node. Returns true if a packet was found we could cancel */ bool MeshService::cancelSending(PacketId id) { - return router->cancelSending(nodeDB.getNodeNum(), id); + return router->cancelSending(nodeDB->getNodeNum(), id); } ErrorCode MeshService::sendQueueStatusToPhone(const meshtastic_QueueStatus &qs, ErrorCode res, uint32_t mesh_packet_id) @@ -228,7 +222,7 @@ ErrorCode MeshService::sendQueueStatusToPhone(const meshtastic_QueueStatus &qs, copied->mesh_packet_id = mesh_packet_id; if (toPhoneQueueStatusQueue.numFree() == 0) { - LOG_DEBUG("NOTE: tophone queue status queue is full, discarding oldest\n"); + LOG_INFO("tophone queue status queue is full, discarding oldest\n"); meshtastic_QueueStatus *d = toPhoneQueueStatusQueue.dequeuePtr(0); if (d) releaseQueueStatusToPool(d); @@ -245,7 +239,7 @@ ErrorCode MeshService::sendQueueStatusToPhone(const meshtastic_QueueStatus &qs, void MeshService::sendToMesh(meshtastic_MeshPacket *p, RxSource src, bool ccToPhone) { uint32_t mesh_packet_id = p->id; - nodeDB.updateFrom(*p); // update our local DB for this packet (because phone might have sent position packets etc...) + nodeDB->updateFrom(*p); // update our local DB for this packet (because phone might have sent position packets etc...) // Note: We might return !OK if our fifo was full, at that point the only option we have is to drop it ErrorCode res = router->sendLocal(p, src); @@ -258,34 +252,49 @@ void MeshService::sendToMesh(meshtastic_MeshPacket *p, RxSource src, bool ccToPh LOG_DEBUG("Can't send status to phone"); } - if (ccToPhone) { + if (res == ERRNO_OK && ccToPhone) { // Check if p is not released in case it couldn't be sent sendToPhone(packetPool.allocCopy(*p)); } } -void MeshService::sendNetworkPing(NodeNum dest, bool wantReplies) +bool MeshService::trySendPosition(NodeNum dest, bool wantReplies) { - meshtastic_NodeInfoLite *node = nodeDB.getMeshNode(nodeDB.getNodeNum()); + meshtastic_NodeInfoLite *node = nodeDB->getMeshNode(nodeDB->getNodeNum()); assert(node); if (hasValidPosition(node)) { +#if HAS_GPS && !MESHTASTIC_EXCLUDE_GPS if (positionModule) { LOG_INFO("Sending position ping to 0x%x, wantReplies=%d, channel=%d\n", dest, wantReplies, node->channel); positionModule->sendOurPosition(dest, wantReplies, node->channel); + return true; } } else { +#endif if (nodeInfoModule) { LOG_INFO("Sending nodeinfo ping to 0x%x, wantReplies=%d, channel=%d\n", dest, wantReplies, node->channel); nodeInfoModule->sendOurNodeInfo(dest, wantReplies, node->channel); } } + return false; } void MeshService::sendToPhone(meshtastic_MeshPacket *p) { perhapsDecode(p); +#ifdef ARCH_ESP32 +#if !MESHTASTIC_EXCLUDE_STOREFORWARD + if (moduleConfig.store_forward.enabled && storeForwardModule->isServer() && + p->decoded.portnum == meshtastic_PortNum_TEXT_MESSAGE_APP) { + releaseToPool(p); // Copy is already stored in StoreForward history + fromNum++; // Notify observers for packet from radio + return; + } +#endif +#endif + if (toPhoneQueue.numFree() == 0) { if (p->decoded.portnum == meshtastic_PortNum_TEXT_MESSAGE_APP || p->decoded.portnum == meshtastic_PortNum_RANGE_TEST_APP) { @@ -296,6 +305,7 @@ void MeshService::sendToPhone(meshtastic_MeshPacket *p) } else { LOG_WARN("ToPhone queue is full, dropping packet.\n"); releaseToPool(p); + fromNum++; // Make sure to notify observers in case they are reconnected so they can get the packets return; } } @@ -306,7 +316,7 @@ void MeshService::sendToPhone(meshtastic_MeshPacket *p) void MeshService::sendMqttMessageToClientProxy(meshtastic_MqttClientProxyMessage *m) { - LOG_DEBUG("Sending mqtt message on topic '%s' to client for proxying to server\n", m->topic); + LOG_DEBUG("Sending mqtt message on topic '%s' to client for proxy\n", m->topic); if (toPhoneMqttProxyQueue.numFree() == 0) { LOG_WARN("MqttClientProxyMessagePool queue is full, discarding oldest\n"); meshtastic_MqttClientProxyMessage *d = toPhoneMqttProxyQueue.dequeuePtr(0); @@ -318,9 +328,23 @@ void MeshService::sendMqttMessageToClientProxy(meshtastic_MqttClientProxyMessage fromNum++; } +void MeshService::sendClientNotification(meshtastic_ClientNotification *n) +{ + LOG_DEBUG("Sending client notification to phone\n"); + if (toPhoneClientNotificationQueue.numFree() == 0) { + LOG_WARN("ClientNotification queue is full, discarding oldest\n"); + meshtastic_ClientNotification *d = toPhoneClientNotificationQueue.dequeuePtr(0); + if (d) + releaseClientNotificationToPool(d); + } + + assert(toPhoneClientNotificationQueue.enqueue(n, 0)); + fromNum++; +} + meshtastic_NodeInfoLite *MeshService::refreshLocalMeshNode() { - meshtastic_NodeInfoLite *node = nodeDB.getMeshNode(nodeDB.getNodeNum()); + meshtastic_NodeInfoLite *node = nodeDB->getMeshNode(nodeDB->getNodeNum()); assert(node); // We might not have a position yet for our local node, in that case, at least try to send the time @@ -344,6 +368,7 @@ meshtastic_NodeInfoLite *MeshService::refreshLocalMeshNode() return node; } +#if HAS_GPS int MeshService::onGPSChanged(const meshtastic::GPSStatus *newStatus) { // Update our local node info with our position (even if we don't decide to update anyone else) @@ -359,7 +384,7 @@ int MeshService::onGPSChanged(const meshtastic::GPSStatus *newStatus) LOG_DEBUG("onGPSchanged() - lost validLocation\n"); #endif } - // Used fixed position if configured regalrdless of GPS lock + // Used fixed position if configured regardless of GPS lock if (config.position.fixed_position) { LOG_WARN("Using fixed position\n"); pos = TypeConversions::ConvertToPosition(node->position); @@ -369,16 +394,28 @@ int MeshService::onGPSChanged(const meshtastic::GPSStatus *newStatus) pos.time = getValidTime(RTCQualityFromNet); // In debug logs, identify position by @timestamp:stage (stage 4 = nodeDB) - LOG_DEBUG("onGPSChanged() pos@%x, time=%u, lat=%d, lon=%d, alt=%d\n", pos.timestamp, pos.time, pos.latitude_i, - pos.longitude_i, pos.altitude); + LOG_DEBUG("onGPSChanged() pos@%x time=%u lat=%d lon=%d alt=%d\n", pos.timestamp, pos.time, pos.latitude_i, pos.longitude_i, + pos.altitude); // Update our current position in the local DB - nodeDB.updatePosition(nodeDB.getNodeNum(), pos, RX_SRC_LOCAL); + nodeDB->updatePosition(nodeDB->getNodeNum(), pos, RX_SRC_LOCAL); return 0; } - +#endif bool MeshService::isToPhoneQueueEmpty() { return toPhoneQueue.isEmpty(); -} \ No newline at end of file +} + +uint32_t MeshService::GetTimeSinceMeshPacket(const meshtastic_MeshPacket *mp) +{ + uint32_t now = getTime(); + + uint32_t last_seen = mp->rx_time; + int delta = (int)(now - last_seen); + if (delta < 0) // our clock must be slightly off still - not set from GPS yet + delta = 0; + + return delta; +} diff --git a/src/mesh/MeshService.h b/src/mesh/MeshService.h index 68287efc2..1ccca4e6d 100644 --- a/src/mesh/MeshService.h +++ b/src/mesh/MeshService.h @@ -13,9 +13,15 @@ #if defined(ARCH_PORTDUINO) && !HAS_RADIO #include "../platform/portduino/SimRadio.h" #endif +#if defined(ARCH_ESP32) || defined(ARCH_PORTDUINO) +#if !MESHTASTIC_EXCLUDE_STOREFORWARD +#include "modules/StoreForwardModule.h" +#endif +#endif extern Allocator &queueStatusPool; extern Allocator &mqttClientProxyMessagePool; +extern Allocator &clientNotificationPool; /** * Top level app for this service. keeps the mesh, the radio config and the queue of received packets. @@ -23,9 +29,10 @@ extern Allocator &mqttClientProxyMessagePool; */ class MeshService { +#if HAS_GPS CallbackObserver gpsObserver = CallbackObserver(this, &MeshService::onGPSChanged); - +#endif /// received packets waiting for the phone to process them /// FIXME, change to a DropOldestQueue and keep a count of the number of dropped packets to ensure /// we never hang because android hasn't been there in a while @@ -38,6 +45,9 @@ class MeshService // keep list of MqttClientProxyMessages to be send to the client for delivery PointerQueue toPhoneMqttProxyQueue; + // keep list of ClientNotifications to be send to the client (phone) + PointerQueue toPhoneClientNotificationQueue; + // This holds the last QueueStatus send meshtastic_QueueStatus lastQueueStatus; @@ -82,6 +92,9 @@ class MeshService /// Return the next MqttClientProxyMessage packet destined to the phone. meshtastic_MqttClientProxyMessage *getMqttClientProxyMessageForPhone() { return toPhoneMqttProxyQueue.dequeuePtr(0); } + /// Return the next ClientNotification packet destined to the phone. + meshtastic_ClientNotification *getClientNotificationForPhone() { return toPhoneClientNotificationQueue.dequeuePtr(0); } + // search the queue for a request id and return the matching nodenum NodeNum getNodenumFromRequestId(uint32_t request_id); @@ -91,6 +104,9 @@ class MeshService // Release MqttClientProxyMessage packet to pool void releaseMqttClientProxyMessageToPool(meshtastic_MqttClientProxyMessage *p) { mqttClientProxyMessagePool.release(p); } + /// Release the next ClientNotification packet to pool. + void releaseClientNotificationToPool(meshtastic_ClientNotification *p) { clientNotificationPool.release(p); } + /** * Given a ToRadio buffer parse it and properly handle it (setup radio, owner or send packet into the mesh) * Called by PhoneAPI.handleToRadio. Note: p is a scratch buffer, this function is allowed to write to it but it can not keep @@ -107,8 +123,9 @@ class MeshService void reloadOwner(bool shouldSave = true); /// Called when the user wakes up our GUI, normally sends our latest location to the mesh (if we have it), otherwise at least - /// sends our owner - void sendNetworkPing(NodeNum dest, bool wantReplies = false); + /// sends our nodeinfo + /// returns true if we sent a position + bool trySendPosition(NodeNum dest, bool wantReplies = false); /// Send a packet into the mesh - note p must have been allocated from packetPool. We will return it to that pool after /// sending. This is the ONLY function you should use for sending messages into the mesh, because it also updates the nodedb @@ -127,19 +144,25 @@ class MeshService /// Send an MQTT message to the phone for client proxying void sendMqttMessageToClientProxy(meshtastic_MqttClientProxyMessage *m); + /// Send a ClientNotification to the phone + void sendClientNotification(meshtastic_ClientNotification *cn); + bool isToPhoneQueueEmpty(); ErrorCode sendQueueStatusToPhone(const meshtastic_QueueStatus &qs, ErrorCode res, uint32_t mesh_packet_id); + uint32_t GetTimeSinceMeshPacket(const meshtastic_MeshPacket *mp); + private: +#if HAS_GPS /// Called when our gps position has changed - updates nodedb and sends Location message out into the mesh /// returns 0 to allow further processing int onGPSChanged(const meshtastic::GPSStatus *arg); - - /// Handle a packet that just arrived from the radio. This method does _ReliableRouternot_ free the provided packet. If it +#endif + /// Handle a packet that just arrived from the radio. This method does _not_ free the provided packet. If it /// needs to keep the packet around it makes a copy int handleFromRadio(const meshtastic_MeshPacket *p); friend class RoutingModule; }; -extern MeshService service; \ No newline at end of file +extern MeshService *service; diff --git a/src/mesh/MeshTypes.h b/src/mesh/MeshTypes.h index 5b2cbd1b1..27d100fbe 100644 --- a/src/mesh/MeshTypes.h +++ b/src/mesh/MeshTypes.h @@ -10,10 +10,13 @@ typedef uint32_t NodeNum; typedef uint32_t PacketId; // A packet sequence number #define NODENUM_BROADCAST UINT32_MAX +#define NODENUM_BROADCAST_NO_LORA \ + 1 // Reserved to only deliver packets over high speed (non-lora) transports, such as MQTT or BLE mesh (not yet implemented) #define ERRNO_OK 0 #define ERRNO_NO_INTERFACES 33 -#define ERRNO_UNKNOWN 32 // pick something that doesn't conflict with RH_ROUTER_ERROR_UNABLE_TO_DELIVER -#define ERRNO_DISABLED 34 // the interface is disabled +#define ERRNO_UNKNOWN 32 // pick something that doesn't conflict with RH_ROUTER_ERROR_UNABLE_TO_DELIVER +#define ERRNO_DISABLED 34 // the interface is disabled +#define ID_COUNTER_MASK (UINT32_MAX >> 22) // mask to select the counter portion of the ID /* * Source of a received message @@ -45,4 +48,13 @@ extern Allocator &packetPool; * Most (but not always) of the time we want to treat packets 'from' the local phone (where from == 0), as if they originated on * the local node. If from is zero this function returns our node number instead */ -NodeNum getFrom(const meshtastic_MeshPacket *p); \ No newline at end of file +NodeNum getFrom(const meshtastic_MeshPacket *p); + +// Returns true if the packet originated from the local node +bool isFromUs(const meshtastic_MeshPacket *p); + +// Returns true if the packet is destined to us +bool isToUs(const meshtastic_MeshPacket *p); + +/* Some clients might not properly set priority, therefore we fix it here. */ +void fixPriority(meshtastic_MeshPacket *p); \ No newline at end of file diff --git a/src/mesh/NodeDB.cpp b/src/mesh/NodeDB.cpp index add1b1296..0d9605161 100644 --- a/src/mesh/NodeDB.cpp +++ b/src/mesh/NodeDB.cpp @@ -1,33 +1,44 @@ +#include "../userPrefs.h" #include "configuration.h" - +#if !MESHTASTIC_EXCLUDE_GPS +#include "GPS.h" +#endif #include "../detect/ScanI2C.h" #include "Channels.h" #include "CryptoEngine.h" +#include "Default.h" #include "FSCommon.h" -#include "GPS.h" #include "MeshRadio.h" #include "NodeDB.h" #include "PacketHistory.h" #include "PowerFSM.h" #include "RTC.h" #include "Router.h" +#include "SafeFile.h" #include "TypeConversions.h" #include "error.h" #include "main.h" #include "mesh-pb-constants.h" +#include "meshUtils.h" #include "modules/NeighborInfoModule.h" #include +#include +#include #include #include +#include #ifdef ARCH_ESP32 +#if HAS_WIFI #include "mesh/wifi/WiFiAPClient.h" -#include "modules/esp32/StoreForwardModule.h" +#endif +#include "modules/StoreForwardModule.h" #include #include #endif #ifdef ARCH_PORTDUINO +#include "modules/StoreForwardModule.h" #include "platform/portduino/PortduinoGlue.h" #endif @@ -36,15 +47,36 @@ #include #endif -NodeDB nodeDB; +NodeDB *nodeDB = nullptr; // we have plenty of ram so statically alloc this tempbuf (for now) -EXT_RAM_ATTR meshtastic_DeviceState devicestate; +EXT_RAM_BSS_ATTR meshtastic_DeviceState devicestate; meshtastic_MyNodeInfo &myNodeInfo = devicestate.my_node; meshtastic_LocalConfig config; meshtastic_LocalModuleConfig moduleConfig; meshtastic_ChannelFile channelFile; meshtastic_OEMStore oemStore; +static bool hasOemStore = false; + +bool meshtastic_DeviceState_callback(pb_istream_t *istream, pb_ostream_t *ostream, const pb_field_iter_t *field) +{ + if (ostream) { + std::vector const *vec = (std::vector *)field->pData; + for (auto item : *vec) { + if (!pb_encode_tag_for_field(ostream, field)) + return false; + pb_encode_submessage(ostream, meshtastic_NodeInfoLite_fields, &item); + } + } + if (istream) { + meshtastic_NodeInfoLite node; // this gets good data + std::vector *vec = (std::vector *)field->pData; + + if (istream->bytes_left && pb_decode(istream, meshtastic_NodeInfoLite_fields, &node)) + vec->push_back(node); + } + return true; +} /** The current change # for radio settings. Starts at 0 on boot and any time the radio settings * might have changed is incremented. Allows others to detect they might now be on a new channel. @@ -68,7 +100,92 @@ uint32_t error_address = 0; static uint8_t ourMacAddr[6]; -NodeDB::NodeDB() : meshNodes(devicestate.node_db_lite), numMeshNodes(&devicestate.node_db_lite_count) {} +NodeDB::NodeDB() +{ + LOG_INFO("Initializing NodeDB\n"); + loadFromDisk(); + cleanupMeshDB(); + + uint32_t devicestateCRC = crc32Buffer(&devicestate, sizeof(devicestate)); + uint32_t configCRC = crc32Buffer(&config, sizeof(config)); + uint32_t channelFileCRC = crc32Buffer(&channelFile, sizeof(channelFile)); + + int saveWhat = 0; + + // likewise - we always want the app requirements to come from the running appload + myNodeInfo.min_app_version = 30200; // format is Mmmss (where M is 1+the numeric major number. i.e. 30200 means 2.2.00 + // Note! We do this after loading saved settings, so that if somehow an invalid nodenum was stored in preferences we won't + // keep using that nodenum forever. Crummy guess at our nodenum (but we will check against the nodedb to avoid conflicts) + pickNewNodeNum(); + + // Set our board type so we can share it with others + owner.hw_model = HW_VENDOR; + // Ensure user (nodeinfo) role is set to whatever we're configured to + owner.role = config.device.role; + // Ensure macaddr is set to our macaddr as it will be copied in our info below + memcpy(owner.macaddr, ourMacAddr, sizeof(owner.macaddr)); + + // Include our owner in the node db under our nodenum + meshtastic_NodeInfoLite *info = getOrCreateMeshNode(getNodeNum()); + if (!config.has_security) { + config.has_security = true; + config.security.serial_enabled = config.device.serial_enabled; + config.security.is_managed = config.device.is_managed; + } + +#if !(MESHTASTIC_EXCLUDE_PKI_KEYGEN || MESHTASTIC_EXCLUDE_PKI) + bool keygenSuccess = false; + if (config.security.private_key.size == 32) { + if (crypto->regeneratePublicKey(config.security.public_key.bytes, config.security.private_key.bytes)) { + keygenSuccess = true; + } + } else { + LOG_INFO("Generating new PKI keys\n"); + crypto->generateKeyPair(config.security.public_key.bytes, config.security.private_key.bytes); + keygenSuccess = true; + } + if (keygenSuccess) { + config.security.public_key.size = 32; + config.security.private_key.size = 32; + owner.public_key.size = 32; + memcpy(owner.public_key.bytes, config.security.public_key.bytes, 32); + } +#elif !(MESHTASTIC_EXCLUDE_PKI) + // Calculate Curve25519 public and private keys + if (config.security.private_key.size == 32 && config.security.public_key.size == 32) { + owner.public_key.size = config.security.public_key.size; + memcpy(owner.public_key.bytes, config.security.public_key.bytes, config.security.public_key.size); + crypto->setDHPrivateKey(config.security.private_key.bytes); + } +#endif + + info->user = TypeConversions::ConvertToUserLite(owner); + info->has_user = true; + +#ifdef ARCH_ESP32 + Preferences preferences; + preferences.begin("meshtastic", false); + myNodeInfo.reboot_count = preferences.getUInt("rebootCounter", 0); + preferences.end(); + LOG_DEBUG("Number of Device Reboots: %d\n", myNodeInfo.reboot_count); +#endif + + resetRadioConfig(); // If bogus settings got saved, then fix them + // nodeDB->LOG_DEBUG("region=%d, NODENUM=0x%x, dbsize=%d\n", config.lora.region, myNodeInfo.my_node_num, numMeshNodes); + + if (devicestateCRC != crc32Buffer(&devicestate, sizeof(devicestate))) + saveWhat |= SEGMENT_DEVICESTATE; + if (configCRC != crc32Buffer(&config, sizeof(config))) + saveWhat |= SEGMENT_CONFIG; + if (channelFileCRC != crc32Buffer(&channelFile, sizeof(channelFile))) + saveWhat |= SEGMENT_CHANNELS; + + if (config.position.gps_enabled) { + config.position.gps_mode = meshtastic_Config_PositionConfig_GpsMode_ENABLED; + config.position.gps_enabled = 0; + } + saveToDisk(saveWhat); +} /** * Most (but not always) of the time we want to treat packets 'from' the local phone (where from == 0), as if they originated on @@ -76,7 +193,19 @@ NodeDB::NodeDB() : meshNodes(devicestate.node_db_lite), numMeshNodes(&devicestat */ NodeNum getFrom(const meshtastic_MeshPacket *p) { - return (p->from == 0) ? nodeDB.getNodeNum() : p->from; + return (p->from == 0) ? nodeDB->getNodeNum() : p->from; +} + +// Returns true if the packet originated from the local node +bool isFromUs(const meshtastic_MeshPacket *p) +{ + return p->from == 0 || p->from == nodeDB->getNodeNum(); +} + +// Returns true if the packet is destined to us +bool isToUs(const meshtastic_MeshPacket *p) +{ + return p->to == nodeDB->getNodeNum(); } bool NodeDB::resetRadioConfig(bool factory_reset) @@ -97,63 +226,60 @@ bool NodeDB::resetRadioConfig(bool factory_reset) channels.onConfigChanged(); - // temp hack for quicker testing - // devicestate.no_save = true; - if (devicestate.no_save) { - LOG_DEBUG("***** DEVELOPMENT MODE - DO NOT RELEASE *****\n"); - - // Sleep quite frequently to stress test the BLE comms, broadcast position every 6 mins - config.display.screen_on_secs = 10; - config.power.wait_bluetooth_secs = 10; - config.position.position_broadcast_secs = 6 * 60; - config.power.ls_secs = 60; - config.lora.region = meshtastic_Config_LoRaConfig_RegionCode_TW; - - // Enter super deep sleep soon and stay there not very long - // radioConfig.preferences.sds_secs = 60; - } - // Update the global myRegion initRegion(); if (didFactoryReset) { LOG_INFO("Rebooting due to factory reset"); - screen->startRebootScreen(); + screen->startAlert("Rebooting..."); rebootAtMsec = millis() + (5 * 1000); } return didFactoryReset; } -bool NodeDB::factoryReset() +bool NodeDB::factoryReset(bool eraseBleBonds) { LOG_INFO("Performing factory reset!\n"); // first, remove the "/prefs" (this removes most prefs) rmDir("/prefs"); +#ifdef FSCom + if (FSCom.exists("/static/rangetest.csv") && !FSCom.remove("/static/rangetest.csv")) { + LOG_ERROR("Could not remove rangetest.csv file\n"); + } +#endif // second, install default state (this will deal with the duplicate mac address issue) installDefaultDeviceState(); - installDefaultConfig(); + installDefaultConfig(!eraseBleBonds); // Also preserve the private key if we're not erasing BLE bonds installDefaultModuleConfig(); installDefaultChannels(); // third, write everything to disk saveToDisk(); + if (eraseBleBonds) { + LOG_INFO("Erasing BLE bonds\n"); #ifdef ARCH_ESP32 - // This will erase what's in NVS including ssl keys, persistent variables and ble pairing - nvs_flash_erase(); + // This will erase what's in NVS including ssl keys, persistent variables and ble pairing + nvs_flash_erase(); #endif #ifdef ARCH_NRF52 - Bluefruit.begin(); - LOG_INFO("Clearing bluetooth bonds!\n"); - bond_print_list(BLE_GAP_ROLE_PERIPH); - bond_print_list(BLE_GAP_ROLE_CENTRAL); - Bluefruit.Periph.clearBonds(); - Bluefruit.Central.clearBonds(); + Bluefruit.begin(); + LOG_INFO("Clearing bluetooth bonds!\n"); + bond_print_list(BLE_GAP_ROLE_PERIPH); + bond_print_list(BLE_GAP_ROLE_CENTRAL); + Bluefruit.Periph.clearBonds(); + Bluefruit.Central.clearBonds(); #endif + } return true; } -void NodeDB::installDefaultConfig() +void NodeDB::installDefaultConfig(bool preserveKey = false) { + uint8_t private_key_temp[32]; + bool shouldPreserveKey = preserveKey && config.has_security && config.security.private_key.size > 0; + if (shouldPreserveKey) { + memcpy(private_key_temp, config.security.private_key.bytes, config.security.private_key.size); + } LOG_INFO("Installing default LocalConfig\n"); memset(&config, 0, sizeof(meshtastic_LocalConfig)); config.version = DEVICESTATE_CUR_VER; @@ -163,17 +289,44 @@ void NodeDB::installDefaultConfig() config.has_position = true; config.has_power = true; config.has_network = true; - config.has_bluetooth = true; + config.has_bluetooth = (HAS_BLUETOOTH ? true : false); + config.has_security = true; config.device.rebroadcast_mode = meshtastic_Config_DeviceConfig_RebroadcastMode_ALL; config.lora.sx126x_rx_boosted_gain = true; config.lora.tx_enabled = true; // FIXME: maybe false in the future, and setting region to enable it. (unset region forces it off) config.lora.override_duty_cycle = false; + config.lora.config_ok_to_mqtt = false; +#ifdef USERPREFS_CONFIG_LORA_REGION + config.lora.region = USERPREFS_CONFIG_LORA_REGION; +#else config.lora.region = meshtastic_Config_LoRaConfig_RegionCode_UNSET; +#endif +#ifdef USERPREFS_LORACONFIG_MODEM_PRESET + config.lora.modem_preset = USERPREFS_LORACONFIG_MODEM_PRESET; +#else config.lora.modem_preset = meshtastic_Config_LoRaConfig_ModemPreset_LONG_FAST; +#endif config.lora.hop_limit = HOP_RELIABLE; +#ifdef USERPREFS_CONFIG_LORA_IGNORE_MQTT + config.lora.ignore_mqtt = USERPREFS_CONFIG_LORA_IGNORE_MQTT; +#else config.lora.ignore_mqtt = false; +#endif +#ifdef USERPREFS_USE_ADMIN_KEY + memcpy(config.security.admin_key[0].bytes, USERPREFS_ADMIN_KEY, 32); + config.security.admin_key[0].size = 32; + config.security.admin_key_count = 1; +#endif + if (shouldPreserveKey) { + config.security.private_key.size = 32; + memcpy(config.security.private_key.bytes, private_key_temp, config.security.private_key.size); + printBytes("Restored key", config.security.private_key.bytes, config.security.private_key.size); + } else { + config.security.private_key.size = 0; + } + config.security.public_key.size = 0; #ifdef PIN_GPS_EN config.position.gps_en_gpio = PIN_GPS_EN; #endif @@ -182,7 +335,9 @@ void NodeDB::installDefaultConfig() #else config.device.disable_triple_click = true; #endif -#if !HAS_GPS || defined(T_DECK) +#if defined(USERPREFS_CONFIG_GPS_MODE) + config.position.gps_mode = USERPREFS_CONFIG_GPS_MODE; +#elif !HAS_GPS || defined(T_DECK) || defined(TLORA_T3S3_EPAPER) config.position.gps_mode = meshtastic_Config_PositionConfig_GpsMode_NOT_PRESENT; #elif !defined(GPS_RX_PIN) if (config.position.rx_gpio == 0) @@ -196,14 +351,16 @@ void NodeDB::installDefaultConfig() config.position.broadcast_smart_minimum_distance = 100; config.position.broadcast_smart_minimum_interval_secs = 30; if (config.device.role != meshtastic_Config_DeviceConfig_Role_ROUTER) - config.device.node_info_broadcast_secs = 3 * 60 * 60; - config.device.serial_enabled = true; + config.device.node_info_broadcast_secs = default_node_info_broadcast_secs; + config.security.serial_enabled = true; + config.security.admin_channel_enabled = false; resetRadioConfig(); - strncpy(config.network.ntp_server, "0.pool.ntp.org", 32); + strncpy(config.network.ntp_server, "meshtastic.pool.ntp.org", 32); // FIXME: Default to bluetooth capability of platform as default config.bluetooth.enabled = true; config.bluetooth.fixed_pin = defaultBLEPin; -#if defined(ST7735_CS) || defined(USE_EINK) || defined(ILI9341_DRIVER) || defined(ST7789_CS) +#if defined(ST7735_CS) || defined(USE_EINK) || defined(ILI9341_DRIVER) || defined(ILI9342_DRIVER) || defined(ST7789_CS) || \ + defined(HX8357_CS) || defined(USE_ST7789) bool hasScreen = true; #elif ARCH_PORTDUINO bool hasScreen = false; @@ -222,10 +379,20 @@ void NodeDB::installDefaultConfig() meshtastic_Config_PositionConfig_PositionFlags_SPEED | meshtastic_Config_PositionConfig_PositionFlags_HEADING | meshtastic_Config_PositionConfig_PositionFlags_DOP | meshtastic_Config_PositionConfig_PositionFlags_SATINVIEW); +#ifdef DISPLAY_FLIP_SCREEN + config.display.flip_screen = true; +#endif +#ifdef RAK4630 + config.display.wake_on_tap_or_motion = true; +#endif #ifdef T_WATCH_S3 config.display.screen_on_secs = 30; config.display.wake_on_tap_or_motion = true; #endif +#ifdef HELTEC_VISION_MASTER_E290 + // Orient so that LoRa antenna faces up + config.display.flip_screen = true; +#endif initConfigIntervals(); } @@ -241,6 +408,12 @@ void NodeDB::initConfigIntervals() config.power.wait_bluetooth_secs = default_wait_bluetooth_secs; config.display.screen_on_secs = default_screen_on_secs; + +#if defined(T_WATCH_S3) || defined(T_DECK) + config.power.is_power_saving = true; + config.display.screen_on_secs = 30; + config.power.wait_bluetooth_secs = 30; +#endif } void NodeDB::installDefaultModuleConfig() @@ -255,6 +428,13 @@ void NodeDB::installDefaultModuleConfig() moduleConfig.has_store_forward = true; moduleConfig.has_telemetry = true; moduleConfig.has_external_notification = true; +#if defined(PIN_BUZZER) + moduleConfig.external_notification.enabled = true; + moduleConfig.external_notification.output_buzzer = PIN_BUZZER; + moduleConfig.external_notification.use_pwm = true; + moduleConfig.external_notification.alert_message_buzzer = true; + moduleConfig.external_notification.nag_timeout = 60; +#endif #if defined(RAK4630) || defined(RAK11310) // Default to RAK led pin 2 (blue) moduleConfig.external_notification.enabled = true; @@ -264,6 +444,7 @@ void NodeDB::installDefaultModuleConfig() moduleConfig.external_notification.output_ms = 1000; moduleConfig.external_notification.nag_timeout = 60; #endif + #ifdef HAS_I2S // Don't worry about the other settings for T-Watch, we'll also use the DRV2056 behavior for notifications moduleConfig.external_notification.enabled = true; @@ -277,6 +458,13 @@ void NodeDB::installDefaultModuleConfig() moduleConfig.external_notification.output_ms = 100; moduleConfig.external_notification.active = true; #endif +#ifdef BUTTON_SECONDARY_CANNEDMESSAGES + // Use a board's second built-in button as input source for canned messages + moduleConfig.canned_message.enabled = true; + moduleConfig.canned_message.inputbroker_pin_press = BUTTON_PIN_SECONDARY; + strcpy(moduleConfig.canned_message.allow_input_source, "scanAndSelect"); +#endif + moduleConfig.has_canned_message = true; strncpy(moduleConfig.mqtt.address, default_mqtt_address, sizeof(moduleConfig.mqtt.address)); @@ -290,7 +478,7 @@ void NodeDB::installDefaultModuleConfig() moduleConfig.has_detection_sensor = true; moduleConfig.detection_sensor.enabled = false; - moduleConfig.detection_sensor.detection_triggered_high = true; + moduleConfig.detection_sensor.detection_trigger_type = meshtastic_ModuleConfig_DetectionSensorConfig_TriggerType_LOGIC_HIGH; moduleConfig.detection_sensor.minimum_broadcast_secs = 45; moduleConfig.has_ambient_lighting = true; @@ -345,15 +533,20 @@ void NodeDB::installRoleDefaults(meshtastic_Config_DeviceConfig_Role role) moduleConfig.telemetry.device_update_interval = UINT32_MAX; moduleConfig.telemetry.environment_update_interval = UINT32_MAX; moduleConfig.telemetry.air_quality_interval = UINT32_MAX; + moduleConfig.telemetry.health_update_interval = UINT32_MAX; } } void NodeDB::initModuleConfigIntervals() { - moduleConfig.telemetry.device_update_interval = default_broadcast_interval_secs; - moduleConfig.telemetry.environment_update_interval = default_broadcast_interval_secs; - moduleConfig.telemetry.air_quality_interval = default_broadcast_interval_secs; - moduleConfig.neighbor_info.update_interval = default_broadcast_interval_secs; + // Zero out telemetry intervals so that they coalesce to defaults in Default.h + moduleConfig.telemetry.device_update_interval = 0; + moduleConfig.telemetry.environment_update_interval = 0; + moduleConfig.telemetry.air_quality_interval = 0; + moduleConfig.telemetry.power_update_interval = 0; + moduleConfig.telemetry.health_update_interval = 0; + moduleConfig.neighbor_info.update_interval = 0; + moduleConfig.paxcounter.paxcounter_update_interval = 0; } void NodeDB::installDefaultChannels() @@ -365,123 +558,96 @@ void NodeDB::installDefaultChannels() void NodeDB::resetNodes() { - devicestate.node_db_lite_count = 1; - std::fill(&devicestate.node_db_lite[1], &devicestate.node_db_lite[MAX_NUM_NODES - 1], meshtastic_NodeInfoLite()); + clearLocalPosition(); + numMeshNodes = 1; + std::fill(devicestate.node_db_lite.begin() + 1, devicestate.node_db_lite.end(), meshtastic_NodeInfoLite()); saveDeviceStateToDisk(); if (neighborInfoModule && moduleConfig.neighbor_info.enabled) neighborInfoModule->resetNeighbors(); } -void NodeDB::removeNodeByNum(uint nodeNum) +void NodeDB::removeNodeByNum(NodeNum nodeNum) { int newPos = 0, removed = 0; - for (int i = 0; i < *numMeshNodes; i++) { - if (meshNodes[i].num != nodeNum) - meshNodes[newPos++] = meshNodes[i]; + for (int i = 0; i < numMeshNodes; i++) { + if (meshNodes->at(i).num != nodeNum) + meshNodes->at(newPos++) = meshNodes->at(i); else removed++; } - *numMeshNodes -= removed; + numMeshNodes -= removed; + std::fill(devicestate.node_db_lite.begin() + numMeshNodes, devicestate.node_db_lite.begin() + numMeshNodes + 1, + meshtastic_NodeInfoLite()); LOG_DEBUG("NodeDB::removeNodeByNum purged %d entries. Saving changes...\n", removed); saveDeviceStateToDisk(); } +void NodeDB::clearLocalPosition() +{ + meshtastic_NodeInfoLite *node = getMeshNode(nodeDB->getNodeNum()); + node->position.latitude_i = 0; + node->position.longitude_i = 0; + node->position.altitude = 0; + node->position.time = 0; + setLocalPosition(meshtastic_Position_init_default); +} + void NodeDB::cleanupMeshDB() { int newPos = 0, removed = 0; - for (int i = 0; i < *numMeshNodes; i++) { - if (meshNodes[i].has_user) - meshNodes[newPos++] = meshNodes[i]; - else + for (int i = 0; i < numMeshNodes; i++) { + if (meshNodes->at(i).has_user) { + if (meshNodes->at(i).user.public_key.size > 0) { + if (memfll(meshNodes->at(i).user.public_key.bytes, 0, meshNodes->at(i).user.public_key.size)) { + meshNodes->at(i).user.public_key.size = 0; + } + } + meshNodes->at(newPos++) = meshNodes->at(i); + } else { removed++; + } } - *numMeshNodes -= removed; + numMeshNodes -= removed; + std::fill(devicestate.node_db_lite.begin() + numMeshNodes, devicestate.node_db_lite.begin() + numMeshNodes + removed, + meshtastic_NodeInfoLite()); LOG_DEBUG("cleanupMeshDB purged %d entries\n", removed); } void NodeDB::installDefaultDeviceState() { LOG_INFO("Installing default DeviceState\n"); - memset(&devicestate, 0, sizeof(meshtastic_DeviceState)); + // memset(&devicestate, 0, sizeof(meshtastic_DeviceState)); - *numMeshNodes = 0; + numMeshNodes = 0; + meshNodes = &devicestate.node_db_lite; // init our devicestate with valid flags so protobuf writing/reading will work devicestate.has_my_node = true; devicestate.has_owner = true; - devicestate.node_db_lite_count = 0; + // devicestate.node_db_lite_count = 0; devicestate.version = DEVICESTATE_CUR_VER; devicestate.receive_queue_count = 0; // Not yet implemented FIXME + devicestate.has_rx_waypoint = false; + devicestate.has_rx_text_message = false; generatePacketId(); // FIXME - ugly way to init current_packet_id; // Set default owner name pickNewNodeNum(); // based on macaddr now +#ifdef USERPREFS_CONFIG_OWNER_LONG_NAME + snprintf(owner.long_name, sizeof(owner.long_name), USERPREFS_CONFIG_OWNER_LONG_NAME); +#else snprintf(owner.long_name, sizeof(owner.long_name), "Meshtastic %02x%02x", ourMacAddr[4], ourMacAddr[5]); +#endif +#ifdef USERPREFS_CONFIG_OWNER_SHORT_NAME + snprintf(owner.short_name, sizeof(owner.short_name), USERPREFS_CONFIG_OWNER_SHORT_NAME); +#else snprintf(owner.short_name, sizeof(owner.short_name), "%02x%02x", ourMacAddr[4], ourMacAddr[5]); +#endif snprintf(owner.id, sizeof(owner.id), "!%08x", getNodeNum()); // Default node ID now based on nodenum memcpy(owner.macaddr, ourMacAddr, sizeof(owner.macaddr)); } -void NodeDB::init() -{ - LOG_INFO("Initializing NodeDB\n"); - loadFromDisk(); - cleanupMeshDB(); - - uint32_t devicestateCRC = crc32Buffer(&devicestate, sizeof(devicestate)); - uint32_t configCRC = crc32Buffer(&config, sizeof(config)); - uint32_t channelFileCRC = crc32Buffer(&channelFile, sizeof(channelFile)); - - int saveWhat = 0; - - // likewise - we always want the app requirements to come from the running appload - myNodeInfo.min_app_version = 30200; // format is Mmmss (where M is 1+the numeric major number. i.e. 30200 means 2.2.00 - // Note! We do this after loading saved settings, so that if somehow an invalid nodenum was stored in preferences we won't - // keep using that nodenum forever. Crummy guess at our nodenum (but we will check against the nodedb to avoid conflicts) - pickNewNodeNum(); - - // Set our board type so we can share it with others - owner.hw_model = HW_VENDOR; - // Ensure user (nodeinfo) role is set to whatever we're configured to - owner.role = config.device.role; - - // Include our owner in the node db under our nodenum - meshtastic_NodeInfoLite *info = getOrCreateMeshNode(getNodeNum()); - info->user = owner; - info->has_user = true; - -#ifdef ARCH_ESP32 - Preferences preferences; - preferences.begin("meshtastic", false); - myNodeInfo.reboot_count = preferences.getUInt("rebootCounter", 0); - preferences.end(); - LOG_DEBUG("Number of Device Reboots: %d\n", myNodeInfo.reboot_count); -#endif - - resetRadioConfig(); // If bogus settings got saved, then fix them - LOG_DEBUG("region=%d, NODENUM=0x%x, dbsize=%d\n", config.lora.region, myNodeInfo.my_node_num, *numMeshNodes); - - if (devicestateCRC != crc32Buffer(&devicestate, sizeof(devicestate))) - saveWhat |= SEGMENT_DEVICESTATE; - if (configCRC != crc32Buffer(&config, sizeof(config))) - saveWhat |= SEGMENT_CONFIG; - if (channelFileCRC != crc32Buffer(&channelFile, sizeof(channelFile))) - saveWhat |= SEGMENT_CHANNELS; - - if (!devicestate.node_remote_hardware_pins) { - meshtastic_NodeRemoteHardwarePin empty[12] = {meshtastic_RemoteHardwarePin_init_default}; - memcpy(devicestate.node_remote_hardware_pins, empty, sizeof(empty)); - } - - if (config.position.gps_enabled) { - config.position.gps_mode = meshtastic_Config_PositionConfig_GpsMode_ENABLED; - config.position.gps_enabled = 0; - } - - saveToDisk(saveWhat); -} - // We reserve a few nodenums for future use #define NUM_RESERVED 4 @@ -490,20 +656,24 @@ void NodeDB::init() */ void NodeDB::pickNewNodeNum() { - + NodeNum nodeNum = myNodeInfo.my_node_num; getMacAddr(ourMacAddr); // Make sure ourMacAddr is set - - // Pick an initial nodenum based on the macaddr - NodeNum nodeNum = (ourMacAddr[2] << 24) | (ourMacAddr[3] << 16) | (ourMacAddr[4] << 8) | ourMacAddr[5]; + if (nodeNum == 0) { + // Pick an initial nodenum based on the macaddr + nodeNum = (ourMacAddr[2] << 24) | (ourMacAddr[3] << 16) | (ourMacAddr[4] << 8) | ourMacAddr[5]; + } meshtastic_NodeInfoLite *found; - while ((nodeNum == NODENUM_BROADCAST || nodeNum < NUM_RESERVED) || - ((found = getMeshNode(nodeNum)) && memcmp(found->user.macaddr, owner.macaddr, sizeof(owner.macaddr)) != 0)) { + while (((found = getMeshNode(nodeNum)) && memcmp(found->user.macaddr, ourMacAddr, sizeof(ourMacAddr)) != 0) || + (nodeNum == NODENUM_BROADCAST || nodeNum < NUM_RESERVED)) { NodeNum candidate = random(NUM_RESERVED, LONG_MAX); // try a new random choice - LOG_WARN("NOTE! Our desired nodenum 0x%x is invalid or in use, so trying for 0x%x\n", nodeNum, candidate); + if (found) + 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 " + "trying for 0x%x\n", + nodeNum, found->user.macaddr[4], found->user.macaddr[5], ourMacAddr[4], ourMacAddr[5], candidate); nodeNum = candidate; } - LOG_WARN("Using nodenum 0x%x \n", nodeNum); + LOG_DEBUG("Using nodenum 0x%x \n", nodeNum); myNodeInfo.my_node_num = nodeNum; } @@ -514,12 +684,12 @@ static const char *moduleConfigFileName = "/prefs/module.proto"; static const char *channelFileName = "/prefs/channels.proto"; static const char *oemConfigFile = "/oem/oem.proto"; -/** Load a protobuf from a file, return true for success */ -bool NodeDB::loadProto(const char *filename, size_t protoSize, size_t objSize, const pb_msgdesc_t *fields, void *dest_struct) +/** Load a protobuf from a file, return LoadFileResult */ +LoadFileResult NodeDB::loadProto(const char *filename, size_t protoSize, size_t objSize, const pb_msgdesc_t *fields, + void *dest_struct) { - bool okay = false; + LoadFileResult state = LoadFileResult::OTHER_FAILURE; #ifdef FSCom - // static DeviceState scratch; We no longer read into a tempbuf because this structure is 15KB of valuable RAM auto f = FSCom.open(filename, FILE_O_READ); @@ -527,54 +697,70 @@ bool NodeDB::loadProto(const char *filename, size_t protoSize, size_t objSize, c LOG_INFO("Loading %s\n", filename); pb_istream_t stream = {&readcb, &f, protoSize}; - // LOG_DEBUG("Preload channel name=%s\n", channelSettings.name); - memset(dest_struct, 0, objSize); if (!pb_decode(&stream, fields, dest_struct)) { LOG_ERROR("Error: can't decode protobuf %s\n", PB_GET_ERROR(&stream)); + state = LoadFileResult::DECODE_FAILED; } else { - okay = true; + LOG_INFO("Loaded %s successfully\n", filename); + state = LoadFileResult::LOAD_SUCCESS; } - f.close(); } else { - LOG_INFO("No %s preferences found\n", filename); + LOG_ERROR("Could not open / read %s\n", filename); } #else LOG_ERROR("ERROR: Filesystem not implemented\n"); + state = LoadFileResult::NO_FILESYSTEM; #endif - return okay; + return state; } void NodeDB::loadFromDisk() { - // static DeviceState scratch; We no longer read into a tempbuf because this structure is 15KB of valuable RAM - if (!loadProto(prefFileName, meshtastic_DeviceState_size, sizeof(meshtastic_DeviceState), &meshtastic_DeviceState_msg, - &devicestate)) { - installDefaultDeviceState(); // Our in RAM copy might now be corrupt - } else { - if (devicestate.version < DEVICESTATE_MIN_VER) { - LOG_WARN("Devicestate %d is old, discarding\n", devicestate.version); - factoryReset(); - } else { - LOG_INFO("Loaded saved devicestate version %d\n", devicestate.version); - } - } + devicestate.version = + 0; // Mark the current device state as completely unusable, so that if we fail reading the entire file from + // disk we will still factoryReset to restore things. - if (!loadProto(configFileName, meshtastic_LocalConfig_size, sizeof(meshtastic_LocalConfig), &meshtastic_LocalConfig_msg, - &config)) { + // static DeviceState scratch; We no longer read into a tempbuf because this structure is 15KB of valuable RAM + auto state = loadProto(prefFileName, sizeof(meshtastic_DeviceState) + MAX_NUM_NODES * sizeof(meshtastic_NodeInfo), + sizeof(meshtastic_DeviceState), &meshtastic_DeviceState_msg, &devicestate); + + // See https://github.com/meshtastic/firmware/issues/4184#issuecomment-2269390786 + // It is very important to try and use the saved prefs even if we fail to read meshtastic_DeviceState. Because most of our + // critical config may still be valid (in the other files - loaded next). + // Also, if we did fail on reading we probably failed on the enormous (and non critical) nodeDB. So DO NOT install default + // device state. + // if (state != LoadFileResult::LOAD_SUCCESS) { + // installDefaultDeviceState(); // Our in RAM copy might now be corrupt + //} else { + if (devicestate.version < DEVICESTATE_MIN_VER) { + LOG_WARN("Devicestate %d is old, discarding\n", devicestate.version); + installDefaultDeviceState(); + } else { + LOG_INFO("Loaded saved devicestate version %d, with nodecount: %d\n", devicestate.version, + devicestate.node_db_lite.size()); + meshNodes = &devicestate.node_db_lite; + numMeshNodes = devicestate.node_db_lite.size(); + } + meshNodes->resize(MAX_NUM_NODES); + + state = loadProto(configFileName, meshtastic_LocalConfig_size, sizeof(meshtastic_LocalConfig), &meshtastic_LocalConfig_msg, + &config); + if (state != LoadFileResult::LOAD_SUCCESS) { installDefaultConfig(); // Our in RAM copy might now be corrupt } else { if (config.version < DEVICESTATE_MIN_VER) { LOG_WARN("config %d is old, discarding\n", config.version); - installDefaultConfig(); + installDefaultConfig(true); } else { LOG_INFO("Loaded saved config version %d\n", config.version); } } - if (!loadProto(moduleConfigFileName, meshtastic_LocalModuleConfig_size, sizeof(meshtastic_LocalModuleConfig), - &meshtastic_LocalModuleConfig_msg, &moduleConfig)) { + state = loadProto(moduleConfigFileName, meshtastic_LocalModuleConfig_size, sizeof(meshtastic_LocalModuleConfig), + &meshtastic_LocalModuleConfig_msg, &moduleConfig); + if (state != LoadFileResult::LOAD_SUCCESS) { installDefaultModuleConfig(); // Our in RAM copy might now be corrupt } else { if (moduleConfig.version < DEVICESTATE_MIN_VER) { @@ -585,8 +771,9 @@ void NodeDB::loadFromDisk() } } - if (!loadProto(channelFileName, meshtastic_ChannelFile_size, sizeof(meshtastic_ChannelFile), &meshtastic_ChannelFile_msg, - &channelFile)) { + state = loadProto(channelFileName, meshtastic_ChannelFile_size, sizeof(meshtastic_ChannelFile), &meshtastic_ChannelFile_msg, + &channelFile); + if (state != LoadFileResult::LOAD_SUCCESS) { installDefaultChannels(); // Our in RAM copy might now be corrupt } else { if (channelFile.version < DEVICESTATE_MIN_VER) { @@ -597,50 +784,54 @@ void NodeDB::loadFromDisk() } } - if (loadProto(oemConfigFile, meshtastic_OEMStore_size, sizeof(meshtastic_OEMStore), &meshtastic_OEMStore_msg, &oemStore)) { + state = loadProto(oemConfigFile, meshtastic_OEMStore_size, sizeof(meshtastic_OEMStore), &meshtastic_OEMStore_msg, &oemStore); + if (state == LoadFileResult::LOAD_SUCCESS) { LOG_INFO("Loaded OEMStore\n"); + hasOemStore = true; + } + + // 2.4.X - configuration migration to update new default intervals + if (moduleConfig.version < 23) { + LOG_DEBUG("ModuleConfig version %d is stale, upgrading to new default intervals\n", moduleConfig.version); + moduleConfig.version = DEVICESTATE_CUR_VER; + if (moduleConfig.telemetry.device_update_interval == 900) + moduleConfig.telemetry.device_update_interval = 0; + if (moduleConfig.telemetry.environment_update_interval == 900) + moduleConfig.telemetry.environment_update_interval = 0; + if (moduleConfig.telemetry.air_quality_interval == 900) + moduleConfig.telemetry.air_quality_interval = 0; + if (moduleConfig.telemetry.power_update_interval == 900) + moduleConfig.telemetry.power_update_interval = 0; + if (moduleConfig.neighbor_info.update_interval == 900) + moduleConfig.neighbor_info.update_interval = 0; + if (moduleConfig.paxcounter.paxcounter_update_interval == 900) + moduleConfig.paxcounter.paxcounter_update_interval = 0; + + saveToDisk(SEGMENT_MODULECONFIG); } } /** Save a protobuf from a file, return true for success */ -bool NodeDB::saveProto(const char *filename, size_t protoSize, const pb_msgdesc_t *fields, const void *dest_struct) +bool NodeDB::saveProto(const char *filename, size_t protoSize, const pb_msgdesc_t *fields, const void *dest_struct, + bool fullAtomic) { bool okay = false; #ifdef FSCom - // static DeviceState scratch; We no longer read into a tempbuf because this structure is 15KB of valuable RAM - String filenameTmp = filename; - filenameTmp += ".tmp"; - auto f = FSCom.open(filenameTmp.c_str(), FILE_O_WRITE); - if (f) { - LOG_INFO("Saving %s\n", filename); - pb_ostream_t stream = {&writecb, &f, protoSize}; + auto f = SafeFile(filename, fullAtomic); - if (!pb_encode(&stream, fields, dest_struct)) { - LOG_ERROR("Error: can't encode protobuf %s\n", PB_GET_ERROR(&stream)); - } else { - okay = true; - } - f.flush(); - f.close(); + LOG_INFO("Saving %s\n", filename); + pb_ostream_t stream = {&writecb, static_cast(&f), protoSize}; - // brief window of risk here ;-) - if (FSCom.exists(filename) && !FSCom.remove(filename)) { - LOG_WARN("Can't remove old pref file\n"); - } - if (!renameFile(filenameTmp.c_str(), filename)) { - LOG_ERROR("Error: can't rename new pref file\n"); - } + if (!pb_encode(&stream, fields, dest_struct)) { + LOG_ERROR("Error: can't encode protobuf %s\n", PB_GET_ERROR(&stream)); } else { - LOG_ERROR("Can't write prefs\n"); -#ifdef ARCH_NRF52 - static uint8_t failedCounter = 0; - failedCounter++; - if (failedCounter >= 2) { - FSCom.format(); - // After formatting, the device needs to be restarted - nodeDB.resetRadioConfig(true); - } -#endif + okay = true; + } + + bool writeSucceeded = f.close(); + + if (!okay || !writeSucceeded) { + LOG_ERROR("Can't write prefs!\n"); } #else LOG_ERROR("ERROR: Filesystem not implemented\n"); @@ -648,70 +839,104 @@ bool NodeDB::saveProto(const char *filename, size_t protoSize, const pb_msgdesc_ return okay; } -void NodeDB::saveChannelsToDisk() +bool NodeDB::saveChannelsToDisk() { - if (!devicestate.no_save) { #ifdef FSCom - FSCom.mkdir("/prefs"); + FSCom.mkdir("/prefs"); #endif - saveProto(channelFileName, meshtastic_ChannelFile_size, &meshtastic_ChannelFile_msg, &channelFile); - } + return saveProto(channelFileName, meshtastic_ChannelFile_size, &meshtastic_ChannelFile_msg, &channelFile); } -void NodeDB::saveDeviceStateToDisk() +bool NodeDB::saveDeviceStateToDisk() { - if (!devicestate.no_save) { #ifdef FSCom - FSCom.mkdir("/prefs"); + FSCom.mkdir("/prefs"); #endif - saveProto(prefFileName, meshtastic_DeviceState_size, &meshtastic_DeviceState_msg, &devicestate); - } + // Note: if MAX_NUM_NODES=100 and meshtastic_NodeInfoLite_size=166, so will be approximately 17KB + // Because so huge we _must_ not use fullAtomic, because the filesystem is probably too small to hold two copies of this + return saveProto(prefFileName, sizeof(devicestate) + numMeshNodes * meshtastic_NodeInfoLite_size, &meshtastic_DeviceState_msg, + &devicestate, false); } -void NodeDB::saveToDisk(int saveWhat) +bool NodeDB::saveToDiskNoRetry(int saveWhat) { - if (!devicestate.no_save) { + bool success = true; + #ifdef FSCom - FSCom.mkdir("/prefs"); + FSCom.mkdir("/prefs"); #endif - if (saveWhat & SEGMENT_DEVICESTATE) { - saveDeviceStateToDisk(); - } + if (saveWhat & SEGMENT_CONFIG) { + config.has_device = true; + config.has_display = true; + config.has_lora = true; + config.has_position = true; + config.has_power = true; + config.has_network = true; + config.has_bluetooth = true; + config.has_security = true; - if (saveWhat & SEGMENT_CONFIG) { - config.has_device = true; - config.has_display = true; - config.has_lora = true; - config.has_position = true; - config.has_power = true; - config.has_network = true; - config.has_bluetooth = true; - saveProto(configFileName, meshtastic_LocalConfig_size, &meshtastic_LocalConfig_msg, &config); - } + success &= saveProto(configFileName, meshtastic_LocalConfig_size, &meshtastic_LocalConfig_msg, &config); + } - if (saveWhat & SEGMENT_MODULECONFIG) { - moduleConfig.has_canned_message = true; - moduleConfig.has_external_notification = true; - moduleConfig.has_mqtt = true; - moduleConfig.has_range_test = true; - moduleConfig.has_serial = true; - moduleConfig.has_store_forward = true; - moduleConfig.has_telemetry = true; + if (saveWhat & SEGMENT_MODULECONFIG) { + moduleConfig.has_canned_message = true; + moduleConfig.has_external_notification = true; + moduleConfig.has_mqtt = true; + moduleConfig.has_range_test = true; + moduleConfig.has_serial = true; + moduleConfig.has_store_forward = true; + moduleConfig.has_telemetry = true; + moduleConfig.has_neighbor_info = true; + moduleConfig.has_detection_sensor = true; + moduleConfig.has_ambient_lighting = true; + moduleConfig.has_audio = true; + moduleConfig.has_paxcounter = true; + + success &= saveProto(moduleConfigFileName, meshtastic_LocalModuleConfig_size, &meshtastic_LocalModuleConfig_msg, &moduleConfig); - } - - if (saveWhat & SEGMENT_CHANNELS) { - saveChannelsToDisk(); - } - } else { - LOG_DEBUG("***** DEVELOPMENT MODE - DO NOT RELEASE - not saving to flash *****\n"); } + + // We might need to rewrite the OEM data if we are reformatting the FS + if ((saveWhat & SEGMENT_OEM) && hasOemStore) { + success &= saveProto(oemConfigFile, meshtastic_OEMStore_size, &meshtastic_OEMStore_msg, &oemStore); + } + + if (saveWhat & SEGMENT_CHANNELS) { + success &= saveChannelsToDisk(); + } + + if (saveWhat & SEGMENT_DEVICESTATE) { + success &= saveDeviceStateToDisk(); + } + + return success; +} + +bool NodeDB::saveToDisk(int saveWhat) +{ + bool success = saveToDiskNoRetry(saveWhat); + + if (!success) { + 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 + FSCom.format(); + + // We need to rewrite the OEM data if we are reformatting the FS + saveWhat |= SEGMENT_OEM; +#endif + success = saveToDiskNoRetry(saveWhat); + + RECORD_CRITICALERROR(success ? meshtastic_CriticalErrorCode_FLASH_CORRUPTION_RECOVERABLE + : meshtastic_CriticalErrorCode_FLASH_CORRUPTION_UNRECOVERABLE); + } + + return success; } const meshtastic_NodeInfoLite *NodeDB::readNextMeshNode(uint32_t &readIndex) { - if (readIndex < *numMeshNodes) - return &meshNodes[readIndex++]; + if (readIndex < numMeshNodes) + return &meshNodes->at(readIndex++); else return NULL; } @@ -741,19 +966,23 @@ uint32_t sinceReceived(const meshtastic_MeshPacket *p) #define NUM_ONLINE_SECS (60 * 60 * 2) // 2 hrs to consider someone offline -size_t NodeDB::getNumOnlineMeshNodes() +size_t NodeDB::getNumOnlineMeshNodes(bool localOnly) { size_t numseen = 0; // FIXME this implementation is kinda expensive - for (int i = 0; i < *numMeshNodes; i++) - if (sinceLastSeen(&meshNodes[i]) < NUM_ONLINE_SECS) + for (int i = 0; i < numMeshNodes; i++) { + if (localOnly && meshNodes->at(i).via_mqtt) + continue; + if (sinceLastSeen(&meshNodes->at(i)) < NUM_ONLINE_SECS) numseen++; + } return numseen; } #include "MeshModule.h" +#include "Throttle.h" /** Update position info for this node based on received position data */ @@ -766,8 +995,8 @@ void NodeDB::updatePosition(uint32_t nodeId, const meshtastic_Position &p, RxSou if (src == RX_SRC_LOCAL) { // Local packet, fully authoritative - LOG_INFO("updatePosition LOCAL pos@%x, time=%u, latI=%d, lonI=%d, alt=%d\n", p.timestamp, p.time, p.latitude_i, - p.longitude_i, p.altitude); + LOG_INFO("updatePosition LOCAL pos@%x time=%u lat=%d lon=%d alt=%d\n", p.timestamp, p.time, p.latitude_i, p.longitude_i, + p.altitude); setLocalPosition(p); info->position = TypeConversions::ConvertToPositionLite(p); @@ -782,7 +1011,7 @@ void NodeDB::updatePosition(uint32_t nodeId, const meshtastic_Position &p, RxSou // recorded based on the packet rxTime // // FIXME perhaps handle RX_SRC_USER separately? - LOG_INFO("updatePosition REMOTE node=0x%x time=%u, latI=%d, lonI=%d\n", nodeId, p.time, p.latitude_i, p.longitude_i); + LOG_INFO("updatePosition REMOTE node=0x%x time=%u lat=%d lon=%d\n", nodeId, p.time, p.latitude_i, p.longitude_i); // First, back up fields that we want to protect from overwrite uint32_t tmp_time = info->position.time; @@ -824,23 +1053,39 @@ void NodeDB::updateTelemetry(uint32_t nodeId, const meshtastic_Telemetry &t, RxS /** Update user info and channel for this node based on received user data */ -bool NodeDB::updateUser(uint32_t nodeId, const meshtastic_User &p, uint8_t channelIndex) +bool NodeDB::updateUser(uint32_t nodeId, meshtastic_User &p, uint8_t channelIndex) { meshtastic_NodeInfoLite *info = getOrCreateMeshNode(nodeId); if (!info) { return false; } - LOG_DEBUG("old user %s/%s/%s, channel=%d\n", info->user.id, info->user.long_name, info->user.short_name, info->channel); + LOG_DEBUG("old user %s/%s, channel=%d\n", info->user.long_name, info->user.short_name, info->channel); +#if !(MESHTASTIC_EXCLUDE_PKI) + if (p.public_key.size > 0) { + printBytes("Incoming Pubkey: ", p.public_key.bytes, 32); + if (info->user.public_key.size > 0) { // if we have a key for this user already, don't overwrite with a new one + LOG_INFO("Public Key set for node, not updating!\n"); + // we copy the key into the incoming packet, to prevent overwrite + memcpy(p.public_key.bytes, info->user.public_key.bytes, 32); + } else { + LOG_INFO("Updating Node Pubkey!\n"); + } + } +#endif // Both of info->user and p start as filled with zero so I think this is okay - bool changed = memcmp(&info->user, &p, sizeof(info->user)) || (info->channel != channelIndex); + auto lite = TypeConversions::ConvertToUserLite(p); + bool changed = memcmp(&info->user, &lite, sizeof(info->user)) || (info->channel != channelIndex); - info->user = p; + info->user = lite; + if (info->user.public_key.size == 32) { + printBytes("Saved Pubkey: ", info->user.public_key.bytes, 32); + } if (nodeId != getNodeNum()) info->channel = channelIndex; // Set channel we need to use to reach this node (but don't set our own channel) - LOG_DEBUG("updating changed=%d user %s/%s/%s, channel=%d\n", changed, info->user.id, info->user.long_name, - info->user.short_name, info->channel); + LOG_DEBUG("updating changed=%d user %s/%s, channel=%d\n", changed, info->user.long_name, info->user.short_name, + info->channel); info->has_user = true; if (changed) { @@ -848,8 +1093,10 @@ bool NodeDB::updateUser(uint32_t nodeId, const meshtastic_User &p, uint8_t chann powerFSM.trigger(EVENT_NODEDB_UPDATED); notifyObservers(true); // Force an update whether or not our node counts have changed - // We just changed something important about the user, store our DB - saveToDisk(SEGMENT_DEVICESTATE); + // We just changed something about the user, store our DB + Throttle::execute( + &lastNodeDbSave, ONE_MINUTE_MS, []() { nodeDB->saveToDisk(SEGMENT_DEVICESTATE); }, + []() { LOG_DEBUG("Deferring NodeDB saveToDisk for now\n"); }); // since we saved less than a minute ago } return changed; @@ -872,6 +1119,14 @@ void NodeDB::updateFrom(const meshtastic_MeshPacket &mp) if (mp.rx_snr) info->snr = mp.rx_snr; // keep the most recent SNR we received for this node. + + info->via_mqtt = mp.via_mqtt; // Store if we received this packet via MQTT + + // If hopStart was set and there wasn't someone messing with the limit in the middle, add hopsAway + if (mp.hop_start != 0 && mp.hop_limit <= mp.hop_start) { + info->has_hops_away = true; + info->hops_away = mp.hop_start - mp.hop_limit; + } } } @@ -888,9 +1143,9 @@ uint8_t NodeDB::getMeshNodeChannel(NodeNum n) /// NOTE: This function might be called from an ISR meshtastic_NodeInfoLite *NodeDB::getMeshNode(NodeNum n) { - for (int i = 0; i < *numMeshNodes; i++) - if (meshNodes[i].num == n) - return &meshNodes[i]; + for (int i = 0; i < numMeshNodes; i++) + if (meshNodes->at(i).num == n) + return &meshNodes->at(i); return NULL; } @@ -901,31 +1156,46 @@ meshtastic_NodeInfoLite *NodeDB::getOrCreateMeshNode(NodeNum n) meshtastic_NodeInfoLite *lite = getMeshNode(n); if (!lite) { - if ((*numMeshNodes >= MAX_NUM_NODES) || (memGet.getFreeHeap() < meshtastic_NodeInfoLite_size * 3)) { + if ((numMeshNodes >= MAX_NUM_NODES) || (memGet.getFreeHeap() < MINIMUM_SAFE_FREE_HEAP)) { if (screen) - screen->print("warning: node_db_lite full! erasing oldest entry\n"); - LOG_INFO("warning: node_db_lite full! erasing oldest entry\n"); + screen->print("Warn: node database full!\nErasing oldest entry\n"); + LOG_WARN("Node database full with %i nodes and %i bytes free! Erasing oldest entry\n", numMeshNodes, + memGet.getFreeHeap()); // look for oldest node and erase it uint32_t oldest = UINT32_MAX; + uint32_t oldestBoring = UINT32_MAX; int oldestIndex = -1; - for (int i = 1; i < *numMeshNodes; i++) { - if (meshNodes[i].last_heard < oldest) { - oldest = meshNodes[i].last_heard; + int oldestBoringIndex = -1; + for (int i = 1; i < numMeshNodes; i++) { + // Simply the oldest non-favorite node + if (!meshNodes->at(i).is_favorite && meshNodes->at(i).last_heard < oldest) { + oldest = meshNodes->at(i).last_heard; oldestIndex = i; } + // The oldest "boring" node + if (!meshNodes->at(i).is_favorite && meshNodes->at(i).user.public_key.size == 0 && + meshNodes->at(i).last_heard < oldestBoring) { + oldestBoring = meshNodes->at(i).last_heard; + oldestBoringIndex = i; + } + } + // if we found a "boring" node, evict it + if (oldestBoringIndex != -1) { + oldestIndex = oldestBoringIndex; } // Shove the remaining nodes down the chain - for (int i = oldestIndex; i < *numMeshNodes - 1; i++) { - meshNodes[i] = meshNodes[i + 1]; + for (int i = oldestIndex; i < numMeshNodes - 1; i++) { + meshNodes->at(i) = meshNodes->at(i + 1); } - (*numMeshNodes)--; + (numMeshNodes)--; } // add the node at the end - lite = &meshNodes[(*numMeshNodes)++]; + lite = &meshNodes->at((numMeshNodes)++); // everything is missing except the nodenum memset(lite, 0, sizeof(*lite)); lite->num = n; + LOG_INFO("Adding node to database with %i nodes and %i bytes free!\n", numMeshNodes, memGet.getFreeHeap()); } return lite; @@ -952,4 +1222,4 @@ void recordCriticalError(meshtastic_CriticalErrorCode code, uint32_t address, co LOG_ERROR("A critical failure occurred, portduino is exiting..."); exit(2); #endif -} \ No newline at end of file +} diff --git a/src/mesh/NodeDB.h b/src/mesh/NodeDB.h index e24a971c1..1be61759a 100644 --- a/src/mesh/NodeDB.h +++ b/src/mesh/NodeDB.h @@ -2,10 +2,13 @@ #include "Observer.h" #include +#include #include +#include #include "MeshTypes.h" #include "NodeStatus.h" +#include "configuration.h" #include "mesh-pb-constants.h" #include "mesh/generated/meshtastic/mesh.pb.h" // For CriticalErrorCode @@ -18,9 +21,10 @@ DeviceState versions used to be defined in the .proto file but really only this #define SEGMENT_MODULECONFIG 2 #define SEGMENT_DEVICESTATE 4 #define SEGMENT_CHANNELS 8 +#define SEGMENT_OEM 16 -#define DEVICESTATE_CUR_VER 22 -#define DEVICESTATE_MIN_VER DEVICESTATE_CUR_VER +#define DEVICESTATE_CUR_VER 23 +#define DEVICESTATE_MIN_VER 22 extern meshtastic_DeviceState devicestate; extern meshtastic_ChannelFile channelFile; @@ -37,6 +41,19 @@ uint32_t sinceLastSeen(const meshtastic_NodeInfoLite *n); /// Given a packet, return how many seconds in the past (vs now) it was received uint32_t sinceReceived(const meshtastic_MeshPacket *p); +enum LoadFileResult { + // Successfully opened the file + LOAD_SUCCESS = 1, + // File does not exist + NOT_FOUND = 2, + // Device does not have a filesystem + NO_FILESYSTEM = 3, + // File exists, but could not decode protobufs + DECODE_FAILED = 4, + // File exists, but open failed for some reason + OTHER_FAILURE = 5 +}; + class NodeDB { // NodeNum provisionalNodeNum; // if we are trying to find a node num this is our current attempt @@ -45,24 +62,21 @@ class NodeDB // Eventually use a smarter datastructure // HashMap nodes; // Note: these two references just point into our static array we serialize to/from disk - meshtastic_NodeInfoLite *meshNodes; - pb_size_t *numMeshNodes; public: + std::vector *meshNodes; bool updateGUI = false; // we think the gui should definitely be redrawn, screen will clear this once handled meshtastic_NodeInfoLite *updateGUIforNode = NULL; // if currently showing this node, we think you should update the GUI Observable newStatus; + pb_size_t numMeshNodes; /// don't do mesh based algorithm for node id assignment (initially) /// instead just store in flash - possibly even in the initial alpha release do this hack NodeDB(); - /// Called from service after app start, to do init which can only be done after OS load - void init(); - /// write to flash - void saveToDisk(int saveWhat = SEGMENT_CONFIG | SEGMENT_MODULECONFIG | SEGMENT_DEVICESTATE | SEGMENT_CHANNELS), - saveChannelsToDisk(), saveDeviceStateToDisk(); + /// @return true if the save was successful + bool saveToDisk(int saveWhat = SEGMENT_CONFIG | SEGMENT_MODULECONFIG | SEGMENT_DEVICESTATE | SEGMENT_CHANNELS); /** Reinit radio config if needed, because either: * a) sometimes a buggy android app might send us bogus settings or @@ -86,7 +100,7 @@ class NodeDB /** Update user info and channel for this node based on received user data */ - bool updateUser(uint32_t nodeId, const meshtastic_User &p, uint8_t channelIndex = 0); + bool updateUser(uint32_t nodeId, meshtastic_User &p, uint8_t channelIndex = 0); /// @return our node number NodeNum getNodeNum() { return myNodeInfo.my_node_num; } @@ -108,15 +122,19 @@ class NodeDB // get channel channel index we heard a nodeNum on, defaults to 0 if not found uint8_t getMeshNodeChannel(NodeNum n); - /// Return the number of nodes we've heard from recently (within the last 2 hrs?) - size_t getNumOnlineMeshNodes(); + /* Return the number of nodes we've heard from recently (within the last 2 hrs?) + * @param localOnly if true, ignore nodes heard via MQTT + */ + size_t getNumOnlineMeshNodes(bool localOnly = false); - void initConfigIntervals(), initModuleConfigIntervals(), resetNodes(), removeNodeByNum(uint nodeNum); + void initConfigIntervals(), initModuleConfigIntervals(), resetNodes(), removeNodeByNum(NodeNum nodeNum); - bool factoryReset(); + bool factoryReset(bool eraseBleBonds = false); - bool loadProto(const char *filename, size_t protoSize, size_t objSize, const pb_msgdesc_t *fields, void *dest_struct); - bool saveProto(const char *filename, size_t protoSize, const pb_msgdesc_t *fields, const void *dest_struct); + LoadFileResult loadProto(const char *filename, size_t protoSize, size_t objSize, const pb_msgdesc_t *fields, + void *dest_struct); + bool saveProto(const char *filename, size_t protoSize, const pb_msgdesc_t *fields, const void *dest_struct, + bool fullAtomic = true); void installRoleDefaults(meshtastic_Config_DeviceConfig_Role role); @@ -124,21 +142,30 @@ class NodeDB meshtastic_NodeInfoLite *getMeshNodeByIndex(size_t x) { - assert(x < *numMeshNodes); - return &meshNodes[x]; + assert(x < numMeshNodes); + return &meshNodes->at(x); } meshtastic_NodeInfoLite *getMeshNode(NodeNum n); - size_t getNumMeshNodes() { return *numMeshNodes; } + size_t getNumMeshNodes() { return numMeshNodes; } - void setLocalPosition(meshtastic_Position position) + void clearLocalPosition(); + + void setLocalPosition(meshtastic_Position position, bool timeOnly = false) { - LOG_DEBUG("Setting local position: latitude=%i, longitude=%i, time=%i\n", position.latitude_i, position.longitude_i, - position.time); + if (timeOnly) { + LOG_DEBUG("Setting local position time only: time=%u timestamp=%u\n", position.time, position.timestamp); + localPosition.time = position.time; + localPosition.timestamp = position.timestamp > 0 ? position.timestamp : position.time; + return; + } + LOG_DEBUG("Setting local position: lat=%i lon=%i time=%u timestamp=%u\n", position.latitude_i, position.longitude_i, + position.time, position.timestamp); localPosition = position; } private: + uint32_t lastNodeDbSave = 0; // when we last saved our db to flash /// Find a node in our DB, create an empty NodeInfoLite if missing meshtastic_NodeInfoLite *getOrCreateMeshNode(NodeNum n); @@ -157,10 +184,18 @@ class NodeDB void cleanupMeshDB(); /// Reinit device state from scratch (not loading from disk) - void installDefaultDeviceState(), installDefaultChannels(), installDefaultConfig(), installDefaultModuleConfig(); + void installDefaultDeviceState(), installDefaultChannels(), installDefaultConfig(bool preserveKey), + installDefaultModuleConfig(); + + /// write to flash + /// @return true if the save was successful + bool saveToDiskNoRetry(int saveWhat); + + bool saveChannelsToDisk(); + bool saveDeviceStateToDisk(); }; -extern NodeDB nodeDB; +extern NodeDB *nodeDB; /* If is_router is set, we use a number of different default values @@ -181,49 +216,6 @@ extern NodeDB nodeDB; prefs.is_power_saving = True */ -// Our delay functions check for this for times that should never expire -#define NODE_DELAY_FOREVER 0xffffffff - -#define IF_ROUTER(routerVal, normalVal) \ - ((config.device.role == meshtastic_Config_DeviceConfig_Role_ROUTER) ? (routerVal) : (normalVal)) - -#define ONE_DAY 24 * 60 * 60 - -#define default_gps_update_interval IF_ROUTER(ONE_DAY, 2 * 60) -#define default_broadcast_interval_secs IF_ROUTER(ONE_DAY / 2, 15 * 60) -#define default_wait_bluetooth_secs IF_ROUTER(1, 60) -#define default_sds_secs IF_ROUTER(ONE_DAY, UINT32_MAX) // Default to forever super deep sleep -#define default_ls_secs IF_ROUTER(ONE_DAY, 5 * 60) -#define default_min_wake_secs 10 -#define default_screen_on_secs IF_ROUTER(1, 60 * 10) - -#define default_mqtt_address "mqtt.meshtastic.org" -#define default_mqtt_username "meshdev" -#define default_mqtt_password "large4cats" -#define default_mqtt_root "msh" - -inline uint32_t getConfiguredOrDefaultMs(uint32_t configuredInterval) -{ - if (configuredInterval > 0) - return configuredInterval * 1000; - return default_broadcast_interval_secs * 1000; -} - -inline uint32_t getConfiguredOrDefaultMs(uint32_t configuredInterval, uint32_t defaultInterval) -{ - if (configuredInterval > 0) - return configuredInterval * 1000; - return defaultInterval * 1000; -} - -inline uint32_t getConfiguredOrDefault(uint32_t configured, uint32_t defaultValue) -{ - if (configured > 0) - return configured; - - return defaultValue; -} - /// Sometimes we will have Position objects that only have a time, so check for /// valid lat/lon static inline bool hasValidPosition(const meshtastic_NodeInfoLite *n) @@ -247,3 +239,5 @@ extern uint32_t error_address; (ModuleConfig_CannedMessageConfig_size + ModuleConfig_ExternalNotificationConfig_size + ModuleConfig_MQTTConfig_size + \ ModuleConfig_RangeTestConfig_size + ModuleConfig_SerialConfig_size + ModuleConfig_StoreForwardConfig_size + \ ModuleConfig_TelemetryConfig_size + ModuleConfig_size) + +// Please do not remove this comment, it makes trunk and compiler happy at the same time. \ No newline at end of file diff --git a/src/mesh/PacketHistory.cpp b/src/mesh/PacketHistory.cpp index 9ecad47cd..ed1c3c59c 100644 --- a/src/mesh/PacketHistory.cpp +++ b/src/mesh/PacketHistory.cpp @@ -2,6 +2,11 @@ #include "configuration.h" #include "mesh-pb-constants.h" +#ifdef ARCH_PORTDUINO +#include "platform/portduino/PortduinoGlue.h" +#endif +#include "Throttle.h" + PacketHistory::PacketHistory() { recentPackets.reserve(MAX_NUM_NODES); // Prealloc the worst case # of records - to prevent heap fragmentation @@ -18,18 +23,17 @@ bool PacketHistory::wasSeenRecently(const meshtastic_MeshPacket *p, bool withUpd return false; // Not a floodable message ID, so we don't care } - uint32_t now = millis(); - PacketRecord r; r.id = p->id; r.sender = getFrom(p); - r.rxTimeMsec = now; + r.rxTimeMsec = millis(); auto found = recentPackets.find(r); bool seenRecently = (found != recentPackets.end()); // found not equal to .end() means packet was seen recently - if (seenRecently && (now - found->rxTimeMsec) >= FLOOD_EXPIRE_TIME) { // Check whether found packet has already expired - recentPackets.erase(found); // Erase and pretend packet has not been seen recently + if (seenRecently && + !Throttle::isWithinTimespanMs(found->rxTimeMsec, FLOOD_EXPIRE_TIME)) { // Check whether found packet has already expired + recentPackets.erase(found); // Erase and pretend packet has not been seen recently found = recentPackets.end(); seenRecently = false; } @@ -60,12 +64,10 @@ bool PacketHistory::wasSeenRecently(const meshtastic_MeshPacket *p, bool withUpd */ void PacketHistory::clearExpiredRecentPackets() { - uint32_t now = millis(); - LOG_DEBUG("recentPackets size=%ld\n", recentPackets.size()); for (auto it = recentPackets.begin(); it != recentPackets.end();) { - if ((now - it->rxTimeMsec) >= FLOOD_EXPIRE_TIME) { + if (!Throttle::isWithinTimespanMs(it->rxTimeMsec, FLOOD_EXPIRE_TIME)) { it = recentPackets.erase(it); // erase returns iterator pointing to element immediately following the one erased } else { ++it; diff --git a/src/mesh/PhoneAPI.cpp b/src/mesh/PhoneAPI.cpp index 270bf613f..ad4a1f33d 100644 --- a/src/mesh/PhoneAPI.cpp +++ b/src/mesh/PhoneAPI.cpp @@ -1,12 +1,18 @@ -#include "PhoneAPI.h" -#include "Channels.h" +#include "configuration.h" +#if !MESHTASTIC_EXCLUDE_GPS #include "GPS.h" +#endif + +#include "Channels.h" +#include "Default.h" +#include "FSCommon.h" #include "MeshService.h" #include "NodeDB.h" +#include "PacketHistory.h" +#include "PhoneAPI.h" #include "PowerFSM.h" #include "RadioInterface.h" #include "TypeConversions.h" -#include "configuration.h" #include "main.h" #include "xmodem.h" @@ -17,12 +23,16 @@ #if ToRadio_size > MAX_TO_FROM_RADIO_SIZE #error ToRadio is too big #endif - +#if !MESHTASTIC_EXCLUDE_MQTT #include "mqtt/MQTT.h" +#endif +#include "Throttle.h" +#include PhoneAPI::PhoneAPI() { lastContactMsec = millis(); + std::fill(std::begin(recentToRadioPacketIds), std::end(recentToRadioPacketIds), 0); } PhoneAPI::~PhoneAPI() @@ -35,12 +45,17 @@ void PhoneAPI::handleStartConfig() // Must be before setting state (because state is how we know !connected) if (!isConnected()) { onConnectionChanged(true); - observe(&service.fromNumChanged); + observe(&service->fromNumChanged); +#ifdef FSCom observe(&xModem.packetReady); +#endif } // even if we were already connected - restart our state machine state = STATE_SEND_MY_INFO; + pauseBluetoothLogging = true; + filesManifest = getFiles("/", 10); + LOG_DEBUG("Got %d files in manifest\n", filesManifest.size()); LOG_INFO("Starting API client config\n"); nodeInfoForPhone.num = 0; // Don't keep returning old nodeinfos @@ -49,16 +64,29 @@ void PhoneAPI::handleStartConfig() void PhoneAPI::close() { + LOG_INFO("PhoneAPI::close()\n"); + if (state != STATE_SEND_NOTHING) { state = STATE_SEND_NOTHING; - - unobserve(&service.fromNumChanged); + resetReadIndex(); + unobserve(&service->fromNumChanged); +#ifdef FSCom unobserve(&xModem.packetReady); +#endif releasePhonePacket(); // Don't leak phone packets on shutdown releaseQueueStatusPhonePacket(); releaseMqttClientProxyPhonePacket(); - + releaseClientNotification(); onConnectionChanged(false); + fromRadioScratch = {}; + toRadioScratch = {}; + nodeInfoForPhone = {}; + packetForPhone = NULL; + filesManifest.clear(); + fromRadioNum = 0; + config_nonce = 0; + config_state = 0; + pauseBluetoothLogging = false; } } @@ -83,8 +111,6 @@ bool PhoneAPI::handleToRadio(const uint8_t *buf, size_t bufLength) powerFSM.trigger(EVENT_CONTACT_FROM_PHONE); // As long as the phone keeps talking to us, don't let the radio go to sleep lastContactMsec = millis(); - // return (lastContactMsec != 0) && - memset(&toRadioScratch, 0, sizeof(toRadioScratch)); if (pb_decode_from_bytes(buf, bufLength, &meshtastic_ToRadio_msg, &toRadioScratch)) { switch (toRadioScratch.which_payload_variant) { @@ -101,14 +127,25 @@ bool PhoneAPI::handleToRadio(const uint8_t *buf, size_t bufLength) break; case meshtastic_ToRadio_xmodemPacket_tag: LOG_INFO("Got xmodem packet\n"); +#ifdef FSCom xModem.handlePacket(toRadioScratch.xmodemPacket); +#endif break; +#if !MESHTASTIC_EXCLUDE_MQTT case meshtastic_ToRadio_mqttClientProxyMessage_tag: LOG_INFO("Got MqttClientProxy message\n"); - if (mqtt && moduleConfig.mqtt.proxy_to_client_enabled) { + if (mqtt && moduleConfig.mqtt.proxy_to_client_enabled && moduleConfig.mqtt.enabled && + (channels.anyMqttEnabled() || moduleConfig.mqtt.map_reporting_enabled)) { mqtt->onClientProxyReceive(toRadioScratch.mqttClientProxyMessage); + } else { + LOG_WARN("MqttClientProxy received but proxy is not enabled, no channels have up/downlink, or map reporting " + "not enabled\n"); } break; +#endif + case meshtastic_ToRadio_heartbeat_tag: + LOG_DEBUG("Got client heartbeat\n"); + break; default: // Ignore nop messages // LOG_DEBUG("Error: unexpected ToRadio variant\n"); @@ -126,16 +163,19 @@ bool PhoneAPI::handleToRadio(const uint8_t *buf, size_t bufLength) * * We assume buf is at least FromRadio_size bytes long. * - * Our sending states progress in the following sequence (the client app ASSUMES THIS SEQUENCE, DO NOT CHANGE IT): - * STATE_SEND_MY_INFO, // send our my info record - * STATE_SEND_CHANNELS - * STATE_SEND_NODEINFO, // states progress in this order as the device sends to the client - STATE_SEND_CONFIG, - STATE_SEND_MODULE_CONFIG, - STATE_SEND_METADATA, - STATE_SEND_COMPLETE_ID, - STATE_SEND_PACKETS // send packets or debug strings + * Our sending states progress in the following sequence (the client apps ASSUME THIS SEQUENCE, DO NOT CHANGE IT): + STATE_SEND_MY_INFO, // send our my info record + STATE_SEND_OWN_NODEINFO, + STATE_SEND_METADATA, + STATE_SEND_CHANNELS + STATE_SEND_CONFIG, + STATE_SEND_MODULE_CONFIG, + STATE_SEND_OTHER_NODEINFOS, // states progress in this order as the device sends to the client + STATE_SEND_FILEMANIFEST, + STATE_SEND_COMPLETE_ID, + STATE_SEND_PACKETS // send packets or debug strings */ + size_t PhoneAPI::getFromRadio(uint8_t *buf) { if (!available()) { @@ -157,37 +197,34 @@ size_t PhoneAPI::getFromRadio(uint8_t *buf) // app not to send locations on our behalf. fromRadioScratch.which_payload_variant = meshtastic_FromRadio_my_info_tag; fromRadioScratch.my_info = myNodeInfo; - state = STATE_SEND_METADATA; + state = STATE_SEND_OWN_NODEINFO; - service.refreshLocalMeshNode(); // Update my NodeInfo because the client will be asking for it soon. + service->refreshLocalMeshNode(); // Update my NodeInfo because the client will be asking for it soon. break; + case STATE_SEND_OWN_NODEINFO: { + LOG_INFO("getFromRadio=STATE_SEND_OWN_NODEINFO\n"); + auto us = nodeDB->readNextMeshNode(readIndex); + if (us) { + nodeInfoForPhone = TypeConversions::ConvertToNodeInfo(us); + nodeInfoForPhone.has_hops_away = false; + nodeInfoForPhone.is_favorite = true; + fromRadioScratch.which_payload_variant = meshtastic_FromRadio_node_info_tag; + fromRadioScratch.node_info = nodeInfoForPhone; + // Should allow us to resume sending NodeInfo in STATE_SEND_OTHER_NODEINFOS + nodeInfoForPhone.num = 0; + } + state = STATE_SEND_METADATA; + break; + } + case STATE_SEND_METADATA: LOG_INFO("getFromRadio=STATE_SEND_METADATA\n"); fromRadioScratch.which_payload_variant = meshtastic_FromRadio_metadata_tag; fromRadioScratch.metadata = getDeviceMetadata(); - state = STATE_SEND_NODEINFO; + state = STATE_SEND_CHANNELS; break; - case STATE_SEND_NODEINFO: { - LOG_INFO("getFromRadio=STATE_SEND_NODEINFO\n"); - - if (nodeInfoForPhone.num != 0) { - LOG_INFO("nodeinfo: num=0x%x, lastseen=%u, id=%s, name=%s\n", nodeInfoForPhone.num, nodeInfoForPhone.last_heard, - nodeInfoForPhone.user.id, nodeInfoForPhone.user.long_name); - fromRadioScratch.which_payload_variant = meshtastic_FromRadio_node_info_tag; - fromRadioScratch.node_info = nodeInfoForPhone; - // Stay in current state until done sending nodeinfos - nodeInfoForPhone.num = 0; // We just consumed a nodeinfo, will need a new one next time - } else { - LOG_INFO("Done sending nodeinfos\n"); - state = STATE_SEND_CHANNELS; - // Go ahead and send that ID right now - return getFromRadio(buf); - } - break; - } - case STATE_SEND_CHANNELS: LOG_INFO("getFromRadio=STATE_SEND_CHANNELS\n"); fromRadioScratch.which_payload_variant = meshtastic_FromRadio_channel_tag; @@ -233,6 +270,13 @@ size_t PhoneAPI::getFromRadio(uint8_t *buf) fromRadioScratch.config.which_payload_variant = meshtastic_Config_bluetooth_tag; fromRadioScratch.config.payload_variant.bluetooth = config.bluetooth; break; + case meshtastic_Config_security_tag: + fromRadioScratch.config.which_payload_variant = meshtastic_Config_security_tag; + fromRadioScratch.config.payload_variant.security = config.security; + break; + case meshtastic_Config_sessionkey_tag: + fromRadioScratch.config.which_payload_variant = meshtastic_Config_sessionkey_tag; + break; default: LOG_ERROR("Unknown config type %d\n", config_state); } @@ -311,20 +355,53 @@ size_t PhoneAPI::getFromRadio(uint8_t *buf) config_state++; // Advance when we have sent all of our ModuleConfig objects if (config_state > (_meshtastic_AdminMessage_ModuleConfigType_MAX + 1)) { - state = STATE_SEND_COMPLETE_ID; + // Clients sending special nonce don't want to see other nodeinfos + state = config_nonce == SPECIAL_NONCE ? STATE_SEND_FILEMANIFEST : STATE_SEND_OTHER_NODEINFOS; config_state = 0; } break; + case STATE_SEND_OTHER_NODEINFOS: { + LOG_INFO("getFromRadio=STATE_SEND_OTHER_NODEINFOS\n"); + if (nodeInfoForPhone.num != 0) { + LOG_INFO("nodeinfo: num=0x%x, lastseen=%u, id=%s, name=%s\n", nodeInfoForPhone.num, nodeInfoForPhone.last_heard, + nodeInfoForPhone.user.id, nodeInfoForPhone.user.long_name); + fromRadioScratch.which_payload_variant = meshtastic_FromRadio_node_info_tag; + fromRadioScratch.node_info = nodeInfoForPhone; + // Stay in current state until done sending nodeinfos + nodeInfoForPhone.num = 0; // We just consumed a nodeinfo, will need a new one next time + } else { + LOG_INFO("Done sending nodeinfos\n"); + state = STATE_SEND_FILEMANIFEST; + // Go ahead and send that ID right now + return getFromRadio(buf); + } + break; + } + + case STATE_SEND_FILEMANIFEST: { + LOG_INFO("getFromRadio=STATE_SEND_FILEMANIFEST\n"); + // last element + if (config_state == filesManifest.size()) { // also handles an empty filesManifest + config_state = 0; + filesManifest.clear(); + // Skip to complete packet + sendConfigComplete(); + } else { + fromRadioScratch.which_payload_variant = meshtastic_FromRadio_fileInfo_tag; + fromRadioScratch.fileInfo = filesManifest.at(config_state); + LOG_DEBUG("File: %s (%d) bytes\n", fromRadioScratch.fileInfo.file_name, fromRadioScratch.fileInfo.size_bytes); + config_state++; + } + break; + } + case STATE_SEND_COMPLETE_ID: - LOG_INFO("getFromRadio=STATE_SEND_COMPLETE_ID\n"); - fromRadioScratch.which_payload_variant = meshtastic_FromRadio_config_complete_id_tag; - fromRadioScratch.config_complete_id = config_nonce; - config_nonce = 0; - state = STATE_SEND_PACKETS; + sendConfigComplete(); break; case STATE_SEND_PACKETS: + pauseBluetoothLogging = false; // Do we have a message from the mesh or packet from the local device? LOG_INFO("getFromRadio=STATE_SEND_PACKETS\n"); if (queueStatusPacketForPhone) { @@ -339,6 +416,10 @@ size_t PhoneAPI::getFromRadio(uint8_t *buf) fromRadioScratch.which_payload_variant = meshtastic_FromRadio_xmodemPacket_tag; fromRadioScratch.xmodemPacket = xmodemPacketForPhone; xmodemPacketForPhone = meshtastic_XModem_init_zero; + } else if (clientNotification) { + fromRadioScratch.which_payload_variant = meshtastic_FromRadio_clientNotification_tag; + fromRadioScratch.clientNotification = *clientNotification; + releaseClientNotification(); } else if (packetForPhone) { printPacket("phone downloaded packet", packetForPhone); @@ -358,7 +439,9 @@ size_t PhoneAPI::getFromRadio(uint8_t *buf) // Encapsulate as a FromRadio packet size_t numbytes = pb_encode_to_bytes(buf, meshtastic_FromRadio_size, &meshtastic_FromRadio_msg, &fromRadioScratch); - LOG_DEBUG("encoding toPhone packet to phone variant=%d, %d bytes\n", fromRadioScratch.which_payload_variant, numbytes); + // VERY IMPORTANT to not print debug messages while writing to fromRadioScratch - because we use that same buffer + // for logging (when we are encapsulating with protobufs) + // LOG_DEBUG("encoding toPhone packet to phone variant=%d, %d bytes\n", fromRadioScratch.which_payload_variant, numbytes); return numbytes; } @@ -366,15 +449,20 @@ size_t PhoneAPI::getFromRadio(uint8_t *buf) return 0; } -void PhoneAPI::handleDisconnect() +void PhoneAPI::sendConfigComplete() { - LOG_INFO("PhoneAPI disconnect\n"); + LOG_INFO("getFromRadio=STATE_SEND_COMPLETE_ID\n"); + fromRadioScratch.which_payload_variant = meshtastic_FromRadio_config_complete_id_tag; + fromRadioScratch.config_complete_id = config_nonce; + config_nonce = 0; + state = STATE_SEND_PACKETS; + pauseBluetoothLogging = false; } void PhoneAPI::releasePhonePacket() { if (packetForPhone) { - service.releaseToPool(packetForPhone); // we just copied the bytes, so don't need this buffer anymore + service->releaseToPool(packetForPhone); // we just copied the bytes, so don't need this buffer anymore packetForPhone = NULL; } } @@ -382,7 +470,7 @@ void PhoneAPI::releasePhonePacket() void PhoneAPI::releaseQueueStatusPhonePacket() { if (queueStatusPacketForPhone) { - service.releaseQueueStatusToPool(queueStatusPacketForPhone); + service->releaseQueueStatusToPool(queueStatusPacketForPhone); queueStatusPacketForPhone = NULL; } } @@ -390,11 +478,19 @@ void PhoneAPI::releaseQueueStatusPhonePacket() void PhoneAPI::releaseMqttClientProxyPhonePacket() { if (mqttClientProxyMessageForPhone) { - service.releaseMqttClientProxyMessageToPool(mqttClientProxyMessageForPhone); + service->releaseMqttClientProxyMessageToPool(mqttClientProxyMessageForPhone); mqttClientProxyMessageForPhone = NULL; } } +void PhoneAPI::releaseClientNotification() +{ + if (clientNotification) { + service->releaseClientNotificationToPool(clientNotification); + clientNotification = NULL; + } +} + /** * Return true if we have data available to send to the phone */ @@ -408,36 +504,52 @@ bool PhoneAPI::available() case STATE_SEND_CONFIG: case STATE_SEND_MODULECONFIG: case STATE_SEND_METADATA: + case STATE_SEND_OWN_NODEINFO: + case STATE_SEND_FILEMANIFEST: case STATE_SEND_COMPLETE_ID: return true; - case STATE_SEND_NODEINFO: + case STATE_SEND_OTHER_NODEINFOS: if (nodeInfoForPhone.num == 0) { - auto nextNode = nodeDB.readNextMeshNode(readIndex); + auto nextNode = nodeDB->readNextMeshNode(readIndex); if (nextNode) { nodeInfoForPhone = TypeConversions::ConvertToNodeInfo(nextNode); + nodeInfoForPhone.hops_away = nodeInfoForPhone.num == nodeDB->getNodeNum() ? 0 : nodeInfoForPhone.hops_away; + nodeInfoForPhone.is_favorite = + nodeInfoForPhone.is_favorite || nodeInfoForPhone.num == nodeDB->getNodeNum(); // Our node is always a favorite } } return true; // Always say we have something, because we might need to advance our state machine - case STATE_SEND_PACKETS: { if (!queueStatusPacketForPhone) - queueStatusPacketForPhone = service.getQueueStatusForPhone(); + queueStatusPacketForPhone = service->getQueueStatusForPhone(); if (!mqttClientProxyMessageForPhone) - mqttClientProxyMessageForPhone = service.getMqttClientProxyMessageForPhone(); - bool hasPacket = !!queueStatusPacketForPhone || !!mqttClientProxyMessageForPhone; + mqttClientProxyMessageForPhone = service->getMqttClientProxyMessageForPhone(); + if (!clientNotification) + clientNotification = service->getClientNotificationForPhone(); + bool hasPacket = !!queueStatusPacketForPhone || !!mqttClientProxyMessageForPhone || !!clientNotification; if (hasPacket) return true; +#ifdef FSCom if (xmodemPacketForPhone.control == meshtastic_XModem_Control_NUL) xmodemPacketForPhone = xModem.getForPhone(); if (xmodemPacketForPhone.control != meshtastic_XModem_Control_NUL) { xModem.resetForPhone(); return true; } +#endif + +#ifdef ARCH_ESP32 +#if !MESHTASTIC_EXCLUDE_STOREFORWARD + // Check if StoreForward has packets stored for us. + if (!packetForPhone && storeForwardModule) + packetForPhone = storeForwardModule->getForPhone(); +#endif +#endif if (!packetForPhone) - packetForPhone = service.getForPhone(); + packetForPhone = service->getForPhone(); hasPacket = !!packetForPhone; // LOG_DEBUG("available hasPacket=%d\n", hasPacket); return hasPacket; @@ -449,14 +561,64 @@ bool PhoneAPI::available() return false; } +void PhoneAPI::sendNotification(meshtastic_LogRecord_Level level, uint32_t replyId, const char *message) +{ + meshtastic_ClientNotification *cn = clientNotificationPool.allocZeroed(); + cn->has_reply_id = true; + cn->reply_id = replyId; + cn->level = meshtastic_LogRecord_Level_WARNING; + cn->time = getValidTime(RTCQualityFromNet); + strncpy(cn->message, message, sizeof(cn->message)); + service->sendClientNotification(cn); +} + +bool PhoneAPI::wasSeenRecently(uint32_t id) +{ + for (int i = 0; i < 20; i++) { + if (recentToRadioPacketIds[i] == id) { + return true; + } + if (recentToRadioPacketIds[i] == 0) { + recentToRadioPacketIds[i] = id; + return false; + } + } + // If the array is full, shift all elements to the left and add the new id at the end + memmove(recentToRadioPacketIds, recentToRadioPacketIds + 1, (19) * sizeof(uint32_t)); + recentToRadioPacketIds[19] = id; + return false; +} + /** * Handle a packet that the phone wants us to send. It is our responsibility to free the packet to the pool */ bool PhoneAPI::handleToRadioPacket(meshtastic_MeshPacket &p) { printPacket("PACKET FROM PHONE", &p); - service.handleToRadio(p); + if (p.id > 0 && wasSeenRecently(p.id)) { + LOG_DEBUG("Ignoring packet from phone, already seen recently\n"); + return false; + } + + if (p.decoded.portnum == meshtastic_PortNum_TRACEROUTE_APP && lastPortNumToRadio[p.decoded.portnum] && + Throttle::isWithinTimespanMs(lastPortNumToRadio[p.decoded.portnum], THIRTY_SECONDS_MS)) { + LOG_WARN("Rate limiting portnum %d\n", p.decoded.portnum); + sendNotification(meshtastic_LogRecord_Level_WARNING, p.id, "TraceRoute can only be sent once every 30 seconds"); + meshtastic_QueueStatus qs = router->getQueueStatus(); + service->sendQueueStatusToPhone(qs, 0, p.id); + return false; + } else if (p.decoded.portnum == meshtastic_PortNum_POSITION_APP && lastPortNumToRadio[p.decoded.portnum] && + Throttle::isWithinTimespanMs(lastPortNumToRadio[p.decoded.portnum], FIVE_SECONDS_MS)) { + LOG_WARN("Rate limiting portnum %d\n", p.decoded.portnum); + meshtastic_QueueStatus qs = router->getQueueStatus(); + service->sendQueueStatusToPhone(qs, 0, p.id); + // FIXME: Figure out why this continues to happen + // sendNotification(meshtastic_LogRecord_Level_WARNING, p.id, "Position can only be sent once every 5 seconds"); + return false; + } + lastPortNumToRadio[p.decoded.portnum] = millis(); + service->handleToRadio(p); return true; } diff --git a/src/mesh/PhoneAPI.h b/src/mesh/PhoneAPI.h index 450649d7b..3247fee5c 100644 --- a/src/mesh/PhoneAPI.h +++ b/src/mesh/PhoneAPI.h @@ -2,11 +2,24 @@ #include "Observer.h" #include "mesh-pb-constants.h" +#include "meshtastic/portnums.pb.h" +#include #include +#include +#include // Make sure that we never let our packets grow too large for one BLE packet #define MAX_TO_FROM_RADIO_SIZE 512 +#if meshtastic_FromRadio_size > MAX_TO_FROM_RADIO_SIZE +#error "meshtastic_FromRadio_size is too large for our BLE packets" +#endif +#if meshtastic_ToRadio_size > MAX_TO_FROM_RADIO_SIZE +#error "meshtastic_ToRadio_size is too large for our BLE packets" +#endif + +#define SPECIAL_NONCE 69420 + /** * Provides our protobuf based API which phone/PC clients can use to talk to our device * over UDP, bluetooth or serial. @@ -20,13 +33,15 @@ class PhoneAPI : public Observer // FIXME, we shouldn't be inheriting from Observer, instead use CallbackObserver as a member { enum State { - STATE_SEND_NOTHING, // Initial state, don't send anything until the client starts asking for config - STATE_SEND_MY_INFO, // send our my info record - STATE_SEND_NODEINFO, // states progress in this order as the device sends to to the client - STATE_SEND_CHANNELS, // Send all channels - STATE_SEND_CONFIG, // Replacement for the old Radioconfig - STATE_SEND_MODULECONFIG, // Send Module specific config + STATE_SEND_NOTHING, // Initial state, don't send anything until the client starts asking for config + STATE_SEND_MY_INFO, // send our my info record + STATE_SEND_OWN_NODEINFO, STATE_SEND_METADATA, + STATE_SEND_CHANNELS, // Send all channels + STATE_SEND_CONFIG, // Replacement for the old Radioconfig + STATE_SEND_MODULECONFIG, // Send Module specific config + STATE_SEND_OTHER_NODEINFOS, // states progress in this order as the device sends to to the client + STATE_SEND_FILEMANIFEST, // Send file manifest STATE_SEND_COMPLETE_ID, STATE_SEND_PACKETS // send packets or debug strings }; @@ -35,6 +50,10 @@ class PhoneAPI uint8_t config_state = 0; + // Hashmap of timestamps for last time we received a packet on the API per portnum + std::unordered_map lastPortNumToRadio; + uint32_t recentToRadioPacketIds[20]; // Last 20 ToRadio MeshPacket IDs we have seen + /** * Each packet sent to the phone has an incrementing count */ @@ -53,6 +72,9 @@ class PhoneAPI // Keep MqttClientProxyMessage packet just as packetForPhone meshtastic_MqttClientProxyMessage *mqttClientProxyMessageForPhone = NULL; + // Keep ClientNotification packet just as packetForPhone + meshtastic_ClientNotification *clientNotification = NULL; + /// We temporarily keep the nodeInfo here between the call to available and getFromRadio meshtastic_NodeInfo nodeInfoForPhone = meshtastic_NodeInfo_init_default; @@ -63,6 +85,8 @@ class PhoneAPI uint32_t config_nonce = 0; uint32_t readIndex = 0; + std::vector filesManifest = {}; + void resetReadIndex() { readIndex = 0; } public: @@ -81,6 +105,11 @@ class PhoneAPI */ virtual bool handleToRadio(const uint8_t *buf, size_t len); + /** + * Send a (client)notification to the phone + */ + virtual void sendNotification(meshtastic_LogRecord_Level level, uint32_t replyId, const char *message); + /** * Get the next packet we want to send to the phone * @@ -89,6 +118,8 @@ class PhoneAPI */ size_t getFromRadio(uint8_t *buf); + void sendConfigComplete(); + /** * Return true if we have data available to send to the phone */ @@ -96,8 +127,6 @@ class PhoneAPI bool isConnected() { return state != STATE_SEND_NOTHING; } - void setInitialState() { state = STATE_SEND_MY_INFO; } - protected: /// Our fromradio packet while it is being assembled meshtastic_FromRadio fromRadioScratch = {}; @@ -119,11 +148,6 @@ class PhoneAPI */ virtual void onNowHasData(uint32_t fromRadioNum) {} - /** - * Subclasses can use this to find out when a client drops the link - */ - virtual void handleDisconnect(); - private: void releasePhonePacket(); @@ -131,9 +155,13 @@ class PhoneAPI void releaseMqttClientProxyPhonePacket(); + void releaseClientNotification(); + /// begin a new connection void handleStartConfig(); + bool wasSeenRecently(uint32_t packetId); + /** * Handle a packet that the phone wants us to send. We can write to it but can not keep a reference to it * @return true true if a packet was queued for sending diff --git a/src/mesh/ProtobufModule.h b/src/mesh/ProtobufModule.h index d87bb47c3..e4d4e5c09 100644 --- a/src/mesh/ProtobufModule.h +++ b/src/mesh/ProtobufModule.h @@ -13,6 +13,7 @@ template class ProtobufModule : protected SinglePortModule const pb_msgdesc_t *fields; public: + uint8_t numOnlineNodes = 0; /** Constructor * name is for debugging output */ @@ -37,7 +38,7 @@ template class ProtobufModule : protected SinglePortModule /** * Return a mesh packet which has been preinited with a particular protobuf data payload and port number. * You can then send this packet (after customizing any of the payload fields you might need) with - * service.sendToMesh() + * service->sendToMesh() */ meshtastic_MeshPacket *allocDataProtobuf(const T &payload) { @@ -56,11 +57,19 @@ template class ProtobufModule : protected SinglePortModule */ const char *getSenderShortName(const meshtastic_MeshPacket &mp) { - auto node = nodeDB.getMeshNode(getFrom(&mp)); + auto node = nodeDB->getMeshNode(getFrom(&mp)); const char *sender = (node) ? node->user.short_name : "???"; return sender; } + int handleStatusUpdate(const meshtastic::Status *arg) + { + if (arg->getStatusType() == STATUS_TYPE_NODE) { + numOnlineNodes = nodeStatus->getNumOnline(); + } + return 0; + } + private: /** Called to handle a particular incoming message @@ -95,12 +104,11 @@ template class ProtobufModule : protected SinglePortModule */ virtual void alterReceived(meshtastic_MeshPacket &mp) override { - auto &p = mp.decoded; - T scratch; T *decoded = NULL; if (mp.which_payload_variant == meshtastic_MeshPacket_decoded_tag && mp.decoded.portnum == ourPortNum) { memset(&scratch, 0, sizeof(scratch)); + const meshtastic_Data &p = mp.decoded; if (pb_decode_from_bytes(p.payload.bytes, p.payload.size, fields, &scratch)) { decoded = &scratch; } else { @@ -108,8 +116,8 @@ template class ProtobufModule : protected SinglePortModule // if we can't decode it, nobody can process it! return; } - } - return alterReceivedProtobuf(mp, decoded); + return alterReceivedProtobuf(mp, decoded); + } } }; \ No newline at end of file diff --git a/src/mesh/RF95Interface.cpp b/src/mesh/RF95Interface.cpp index 72e0f823f..581fd9034 100644 --- a/src/mesh/RF95Interface.cpp +++ b/src/mesh/RF95Interface.cpp @@ -1,3 +1,4 @@ +#if RADIOLIB_EXCLUDE_SX127X != 1 #include "RF95Interface.h" #include "MeshRadio.h" // kinda yucky, but we need to know which region we are in #include "RadioLibRF95.h" @@ -8,18 +9,80 @@ #include "PortduinoGlue.h" #endif -#define MAX_POWER 20 +#ifndef RF95_MAX_POWER +#define RF95_MAX_POWER 20 +#endif + // if we use 20 we are limited to 1% duty cycle or hw might overheat. For continuous operation set a limit of 17 // 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 // if you set power to something higher than 17 or 20 you might fry your board. -#define POWER_DEFAULT 17 // How much power to use if the user hasn't set a power level +#if defined(RADIOMASTER_900_BANDIT_NANO) || defined(RADIOMASTER_900_BANDIT) +// Structure to hold DAC and DB values +typedef struct { + uint8_t dac; + uint8_t db; +} DACDB; + +// Interpolation function +DACDB interpolate(uint8_t dbm, uint8_t dbm1, uint8_t dbm2, DACDB val1, DACDB val2) +{ + DACDB result; + double fraction = (double)(dbm - dbm1) / (dbm2 - dbm1); + result.dac = (uint8_t)(val1.dac + fraction * (val2.dac - val1.dac)); + result.db = (uint8_t)(val1.db + fraction * (val2.db - val1.db)); + return result; +} + +// Function to find the correct DAC and DB values based on dBm using interpolation +DACDB getDACandDB(uint8_t dbm) +{ + // Predefined values + static const struct { + uint8_t dbm; + DACDB values; + } +#ifdef RADIOMASTER_900_BANDIT_NANO + dbmToDACDB[] = { + {20, {168, 2}}, // 100mW + {24, {148, 6}}, // 250mW + {27, {128, 9}}, // 500mW + {30, {90, 12}} // 1000mW + }; +#endif +#ifdef RADIOMASTER_900_BANDIT + dbmToDACDB[] = { + {20, {165, 2}}, // 100mW + {24, {155, 6}}, // 250mW + {27, {142, 9}}, // 500mW + {30, {110, 10}} // 1000mW + }; +#endif + const int numValues = sizeof(dbmToDACDB) / sizeof(dbmToDACDB[0]); + + // Find the interval dbm falls within and interpolate + for (int i = 0; i < numValues - 1; i++) { + if (dbm >= dbmToDACDB[i].dbm && dbm <= dbmToDACDB[i + 1].dbm) { + return interpolate(dbm, dbmToDACDB[i].dbm, dbmToDACDB[i + 1].dbm, dbmToDACDB[i].values, dbmToDACDB[i + 1].values); + } + } + + // Return a default value if no match is found and default to 100mW +#ifdef RADIOMASTER_900_BANDIT_NANO + DACDB defaultValue = {168, 2}; +#endif +#ifdef RADIOMASTER_900_BANDIT + DACDB defaultValue = {165, 2}; +#endif + return defaultValue; +} +#endif RF95Interface::RF95Interface(LockingArduinoHal *hal, RADIOLIB_PIN_TYPE cs, RADIOLIB_PIN_TYPE irq, RADIOLIB_PIN_TYPE rst, RADIOLIB_PIN_TYPE busy) : RadioLibInterface(hal, cs, irq, rst, busy) { - LOG_WARN("RF95Interface(cs=%d, irq=%d, rst=%d, busy=%d)\n", cs, irq, rst, busy); + LOG_DEBUG("RF95Interface(cs=%d, irq=%d, rst=%d, busy=%d)\n", cs, irq, rst, busy); } /** Some boards require GPIO control of tx vs rx paths */ @@ -49,8 +112,15 @@ bool RF95Interface::init() { RadioLibInterface::init(); - if (power > MAX_POWER) // This chip has lower power limits than some - power = MAX_POWER; +#if defined(RADIOMASTER_900_BANDIT_NANO) || defined(RADIOMASTER_900_BANDIT) + // DAC and DB values based on dBm using interpolation + DACDB dacDbValues = getDACandDB(power); + int8_t powerDAC = dacDbValues.dac; + power = dacDbValues.db; +#endif + + if (power > RF95_MAX_POWER) // This chip has lower power limits than some + power = RF95_MAX_POWER; limitPower(); @@ -61,6 +131,19 @@ bool RF95Interface::init() digitalWrite(RF95_TCXO, 1); #endif + // enable PA +#ifdef RF95_PA_EN +#if defined(RF95_PA_DAC_EN) +#if defined(RADIOMASTER_900_BANDIT_NANO) || defined(RADIOMASTER_900_BANDIT) + // Use calculated DAC value + dacWrite(RF95_PA_EN, powerDAC); +#else + // Use Value set in /*/variant.h + dacWrite(RF95_PA_EN, RF95_PA_LEVEL); +#endif +#endif +#endif + /* #define RF95_TXEN (22) // If defined, this pin should be set high prior to transmit (controls an external analog switch) #define RF95_RXEN (23) // If defined, this pin should be set high prior to receive (controls an external analog switch) @@ -71,6 +154,11 @@ bool RF95Interface::init() digitalWrite(RF95_TXEN, 0); #endif +#ifdef RF95_FAN_EN + pinMode(RF95_FAN_EN, OUTPUT); + digitalWrite(RF95_FAN_EN, 1); +#endif + #ifdef RF95_RXEN pinMode(RF95_RXEN, OUTPUT); digitalWrite(RF95_RXEN, 1); @@ -92,6 +180,9 @@ bool RF95Interface::init() LOG_INFO("Frequency set to %f\n", getFreq()); LOG_INFO("Bandwidth set to %f\n", bw); LOG_INFO("Power output set to %d\n", power); +#if defined(RADIOMASTER_900_BANDIT_NANO) || defined(RADIOMASTER_900_BANDIT) + LOG_INFO("DAC output set to %d\n", powerDAC); +#endif if (res == RADIOLIB_ERR_NONE) res = lora->setCRC(RADIOLIB_SX126X_LORA_CRC_ON); @@ -128,22 +219,32 @@ bool RF95Interface::reconfigure() RECORD_CRITICALERROR(meshtastic_CriticalErrorCode_INVALID_RADIO_SETTING); err = lora->setSyncWord(syncWord); + if (err != RADIOLIB_ERR_NONE) + LOG_ERROR("RF95 setSyncWord %s%d\n", radioLibErr, err); assert(err == RADIOLIB_ERR_NONE); err = lora->setCurrentLimit(currentLimit); + if (err != RADIOLIB_ERR_NONE) + LOG_ERROR("RF95 setCurrentLimit %s%d\n", radioLibErr, err); assert(err == RADIOLIB_ERR_NONE); err = lora->setPreambleLength(preambleLength); + if (err != RADIOLIB_ERR_NONE) + LOG_ERROR(" RF95 setPreambleLength %s%d\n", radioLibErr, err); assert(err == RADIOLIB_ERR_NONE); err = lora->setFrequency(getFreq()); if (err != RADIOLIB_ERR_NONE) RECORD_CRITICALERROR(meshtastic_CriticalErrorCode_INVALID_RADIO_SETTING); - if (power > MAX_POWER) // This chip has lower power limits than some - power = MAX_POWER; + if (power > RF95_MAX_POWER) // This chip has lower power limits than some + power = RF95_MAX_POWER; +#ifdef USE_RF95_RFO + err = lora->setOutputPower(power, true); +#else err = lora->setOutputPower(power); +#endif if (err != RADIOLIB_ERR_NONE) RECORD_CRITICALERROR(meshtastic_CriticalErrorCode_INVALID_RADIO_SETTING); @@ -164,11 +265,14 @@ void RF95Interface::addReceiveMetadata(meshtastic_MeshPacket *mp) void RF95Interface::setStandby() { int err = lora->standby(); + if (err != RADIOLIB_ERR_NONE) + LOG_ERROR("RF95 standby %s%d\n", radioLibErr, err); assert(err == RADIOLIB_ERR_NONE); isReceiving = false; // If we were receiving, not any more disableInterrupt(); completeSending(); // If we were sending, not anymore + RadioLibInterface::setStandby(); } /** We override to turn on transmitter power as needed. @@ -185,6 +289,8 @@ void RF95Interface::startReceive() setTransmitEnable(false); setStandby(); int err = lora->startReceive(); + if (err != RADIOLIB_ERR_NONE) + LOG_ERROR("RF95 startReceive %s%d\n", radioLibErr, err); assert(err == RADIOLIB_ERR_NONE); isReceiving = true; @@ -205,6 +311,8 @@ bool RF95Interface::isChannelActive() // LOG_DEBUG("Channel is busy!\n"); return true; } + if (result != RADIOLIB_CHANNEL_FREE) + LOG_ERROR("RF95 isChannelActive %s%d\n", radioLibErr, result); assert(result != RADIOLIB_ERR_WRONG_MODEM); // LOG_DEBUG("Channel is free!\n"); @@ -223,5 +331,10 @@ bool RF95Interface::sleep() setStandby(); // First cancel any active receiving/sending lora->sleep(); +#ifdef RF95_FAN_EN + digitalWrite(RF95_FAN_EN, 0); +#endif + return true; -} \ No newline at end of file +} +#endif \ No newline at end of file diff --git a/src/mesh/RF95Interface.h b/src/mesh/RF95Interface.h index a50cf93a2..327e57900 100644 --- a/src/mesh/RF95Interface.h +++ b/src/mesh/RF95Interface.h @@ -1,5 +1,5 @@ #pragma once - +#if RADIOLIB_EXCLUDE_SX127X != 1 #include "MeshRadio.h" // kinda yucky, but we need to know which region we are in #include "RadioLibInterface.h" #include "RadioLibRF95.h" @@ -69,3 +69,4 @@ class RF95Interface : public RadioLibInterface /** Some boards require GPIO control of tx vs rx paths */ void setTransmitEnable(bool txon); }; +#endif \ No newline at end of file diff --git a/src/mesh/RadioInterface.cpp b/src/mesh/RadioInterface.cpp index cea3968ce..7501852f2 100644 --- a/src/mesh/RadioInterface.cpp +++ b/src/mesh/RadioInterface.cpp @@ -1,5 +1,6 @@ #include "RadioInterface.h" #include "Channels.h" +#include "DisplayFormatters.h" #include "MeshRadio.h" #include "MeshService.h" #include "NodeDB.h" @@ -30,18 +31,18 @@ const RegionInfo regions[] = { RDEF(EU_433, 433.0f, 434.0f, 10, 0, 12, true, false, false), /* - https://www.thethingsnetwork.org/docs/lorawan/duty-cycle/ - https://www.thethingsnetwork.org/docs/lorawan/regional-parameters/ - https://www.legislation.gov.uk/uksi/1999/930/schedule/6/part/III/made/data.xht?view=snippet&wrap=true + https://www.thethingsnetwork.org/docs/lorawan/duty-cycle/ + https://www.thethingsnetwork.org/docs/lorawan/regional-parameters/ + https://www.legislation.gov.uk/uksi/1999/930/schedule/6/part/III/made/data.xht?view=snippet&wrap=true - audio_permitted = false per regulation + audio_permitted = false per regulation - Special Note: - The link above describes LoRaWAN's band plan, stating a power limit of 16 dBm. This is their own suggested specification, - we do not need to follow it. The European Union regulations clearly state that the power limit for this frequency range is - 500 mW, or 27 dBm. It also states that we can use interference avoidance and spectrum access techniques to avoid a duty - cycle. (Please refer to section 4.21 in the following document) - https://ec.europa.eu/growth/tools-databases/tris/index.cfm/ro/search/?trisaction=search.detail&year=2021&num=528&dLang=EN + Special Note: + The link above describes LoRaWAN's band plan, stating a power limit of 16 dBm. This is their own suggested specification, + we do not need to follow it. The European Union regulations clearly state that the power limit for this frequency range is + 500 mW, or 27 dBm. It also states that we can use interference avoidance and spectrum access techniques (such as LBT + + AFA) to avoid a duty cycle. (Please refer to line P page 22 of this document.) + https://www.etsi.org/deliver/etsi_en/300200_300299/30022002/03.01.01_60/en_30022002v030101p.pdf */ RDEF(EU_868, 869.4f, 869.65f, 10, 0, 27, false, false, false), @@ -52,8 +53,10 @@ const RegionInfo regions[] = { /* https://lora-alliance.org/wp-content/uploads/2020/11/lorawan_regional_parameters_v1.0.3reva_0.pdf + https://www.arib.or.jp/english/html/overview/doc/5-STD-T108v1_5-E1.pdf + https://qiita.com/ammo0613/items/d952154f1195b64dc29f */ - RDEF(JP, 920.8f, 927.8f, 100, 0, 16, true, false, false), + RDEF(JP, 920.5f, 923.5f, 100, 0, 13, true, false, false), /* https://www.iot.org.au/wp/wp-content/uploads/2016/12/IoTSpectrumFactSheet.pdf @@ -75,9 +78,12 @@ const RegionInfo regions[] = { RDEF(KR, 920.0f, 923.0f, 100, 0, 0, true, false, false), /* - ??? + Taiwan, 920-925Mhz, limited to 0.5W indoor or coastal, 1.0W outdoor. + 5.8.1 in the Low-power Radio-frequency Devices Technical Regulations + https://www.ncc.gov.tw/english/files/23070/102_5190_230703_1_doc_C.PDF + https://gazette.nat.gov.tw/egFront/e_detail.do?metaid=147283 */ - RDEF(TW, 920.0f, 925.0f, 100, 0, 0, true, false, false), + RDEF(TW, 920.0f, 925.0f, 100, 0, 27, true, false, false), /* https://lora-alliance.org/wp-content/uploads/2020/11/lorawan_regional_parameters_v1.0.3reva_0.pdf @@ -130,6 +136,17 @@ const RegionInfo regions[] = { */ RDEF(SG_923, 917.0f, 925.0f, 100, 0, 20, true, false, false), + /* + Philippines + 433 - 434.7 MHz <10 mW erp, NTC approved device required + 868 - 869.4 MHz <25 mW erp, NTC approved device required + 915 - 918 MHz <250 mW EIRP, no external antennna allowed + https://github.com/meshtastic/firmware/issues/4948#issuecomment-2394926135 + */ + + RDEF(PH_433, 433.0f, 434.7f, 100, 0, 10, true, false, false), RDEF(PH_868, 868.0f, 869.4f, 100, 0, 14, true, false, false), + RDEF(PH_915, 915.0f, 918.0f, 100, 0, 24, true, false, false), + /* 2.4 GHZ WLAN Band equivalent. Only for SX128x chips. */ @@ -143,16 +160,23 @@ const RegionInfo regions[] = { }; const RegionInfo *myRegion; +bool RadioInterface::uses_default_frequency_slot = true; -static uint8_t bytes[MAX_RHPACKETLEN]; +static uint8_t bytes[MAX_LORA_PAYLOAD_LEN + 1]; void initRegion() { const RegionInfo *r = regions; +#ifdef REGULATORY_LORA_REGIONCODE + for (; r->code != meshtastic_Config_LoRaConfig_RegionCode_UNSET && r->code != REGULATORY_LORA_REGIONCODE; r++) + ; + LOG_INFO("Wanted region %d, regulatory override to %s\n", config.lora.region, r->name); +#else for (; r->code != meshtastic_Config_LoRaConfig_RegionCode_UNSET && r->code != config.lora.region; r++) ; - myRegion = r; LOG_INFO("Wanted region %d, using %s\n", config.lora.region, r->name); +#endif + myRegion = r; } /** @@ -166,9 +190,6 @@ The band is from 902 to 928 MHz. It mentions channel number and its respective c separated by 2.16 MHz with respect to the adjacent channels. Channel zero starts at 903.08 MHz center frequency. */ -// 1kb was too small -#define RADIO_STACK_SIZE 4096 - /** * Calculate airtime per * https://www.rs-online.com/designspark/rel-assets/ds-assets/uploads/knowledge-items/application-notes-for-the-internet-of-things/LoRa%20Design%20Guide.pdf @@ -192,8 +213,6 @@ uint32_t RadioInterface::getPacketTime(uint32_t pl) uint32_t msecs = tPacket * 1000; - LOG_DEBUG("(bw=%d, sf=%d, cr=4/%d) packet symLen=%d ms, payloadSize=%u, time %d ms\n", (int)bw, sf, cr, (int)(tSym * 1000), - pl, msecs); return msecs; } @@ -250,7 +269,6 @@ uint32_t RadioInterface::getTxDelayMsecWeighted(float snr) uint8_t CWsize = map(snr, SNR_MIN, SNR_MAX, CWmin, CWmax); // LOG_DEBUG("rx_snr of %f so setting CWsize to:%d\n", snr, CWsize); if (config.device.role == meshtastic_Config_DeviceConfig_Role_ROUTER || - config.device.role == meshtastic_Config_DeviceConfig_Role_ROUTER_CLIENT || config.device.role == meshtastic_Config_DeviceConfig_Role_REPEATER) { delay = random(0, 2 * CWsize) * slotTimeMsec; LOG_DEBUG("rx_snr found in packet. As a router, setting tx delay:%d\n", delay); @@ -276,6 +294,9 @@ void printPacket(const char *prefix, const meshtastic_MeshPacket *p) if (s.want_response) out += DEBUG_PORT.mt_sprintf(" WANTRESP"); + if (p->pki_encrypted) + out += DEBUG_PORT.mt_sprintf(" PKI"); + if (s.source != 0) out += DEBUG_PORT.mt_sprintf(" source=%08x", s.source); @@ -302,6 +323,8 @@ void printPacket(const char *prefix, const meshtastic_MeshPacket *p) out += DEBUG_PORT.mt_sprintf(" rxRSSI=%i", p->rx_rssi); if (p->via_mqtt != 0) out += DEBUG_PORT.mt_sprintf(" via MQTT"); + if (p->hop_start != 0) + out += DEBUG_PORT.mt_sprintf(" hopStart=%d", p->hop_start); if (p->priority != 0) out += DEBUG_PORT.mt_sprintf(" priority=%d", p->priority); @@ -312,7 +335,7 @@ void printPacket(const char *prefix, const meshtastic_MeshPacket *p) RadioInterface::RadioInterface() { - assert(sizeof(PacketHeader) == 16); // make sure the compiler did what we expected + assert(sizeof(PacketHeader) == MESHTASTIC_HEADER_LENGTH); // make sure the compiler did what we expected } bool RadioInterface::reconfigure() @@ -325,13 +348,13 @@ bool RadioInterface::init() { LOG_INFO("Starting meshradio init...\n"); - configChangedObserver.observe(&service.configChanged); + configChangedObserver.observe(&service->configChanged); preflightSleepObserver.observe(&preflightSleep); notifyDeepSleepObserver.observe(¬ifyDeepSleep); // we now expect interfaces to operate in promiscuous mode - // radioIf.setThisAddress(nodeDB.getNodeNum()); // Note: we must do this here, because the nodenum isn't inited at constructor - // time. + // radioIf.setThisAddress(nodeDB->getNodeNum()); // Note: we must do this here, because the nodenum isn't inited at + // constructor time. applyModemConfig(); @@ -400,73 +423,99 @@ void RadioInterface::applyModemConfig() // Set up default configuration // No Sync Words in LORA mode meshtastic_Config_LoRaConfig &loraConfig = config.lora; - if (loraConfig.use_preset) { + bool validConfig = false; // We need to check for a valid configuration + while (!validConfig) { + if (loraConfig.use_preset) { - switch (loraConfig.modem_preset) { - case meshtastic_Config_LoRaConfig_ModemPreset_SHORT_FAST: - bw = (myRegion->wideLora) ? 812.5 : 250; - cr = 5; - sf = 7; - break; - case meshtastic_Config_LoRaConfig_ModemPreset_SHORT_SLOW: - bw = (myRegion->wideLora) ? 812.5 : 250; - cr = 5; - sf = 8; - break; - case meshtastic_Config_LoRaConfig_ModemPreset_MEDIUM_FAST: - bw = (myRegion->wideLora) ? 812.5 : 250; - cr = 5; - sf = 9; - break; - case meshtastic_Config_LoRaConfig_ModemPreset_MEDIUM_SLOW: - bw = (myRegion->wideLora) ? 812.5 : 250; - cr = 5; - sf = 10; - break; - default: // Config_LoRaConfig_ModemPreset_LONG_FAST is default. Gracefully use this is preset is something illegal. - bw = (myRegion->wideLora) ? 812.5 : 250; - cr = 5; - sf = 11; - break; - case meshtastic_Config_LoRaConfig_ModemPreset_LONG_MODERATE: - bw = (myRegion->wideLora) ? 406.25 : 125; - cr = 8; - sf = 11; - break; - case meshtastic_Config_LoRaConfig_ModemPreset_LONG_SLOW: - bw = (myRegion->wideLora) ? 406.25 : 125; - cr = 8; - sf = 12; - break; - case meshtastic_Config_LoRaConfig_ModemPreset_VERY_LONG_SLOW: - bw = (myRegion->wideLora) ? 203.125 : 62.5; - cr = 8; - sf = 12; - break; + switch (loraConfig.modem_preset) { + case meshtastic_Config_LoRaConfig_ModemPreset_SHORT_TURBO: + bw = (myRegion->wideLora) ? 1625.0 : 500; + cr = 5; + sf = 7; + break; + case meshtastic_Config_LoRaConfig_ModemPreset_SHORT_FAST: + bw = (myRegion->wideLora) ? 812.5 : 250; + cr = 5; + sf = 7; + break; + case meshtastic_Config_LoRaConfig_ModemPreset_SHORT_SLOW: + bw = (myRegion->wideLora) ? 812.5 : 250; + cr = 5; + sf = 8; + break; + case meshtastic_Config_LoRaConfig_ModemPreset_MEDIUM_FAST: + bw = (myRegion->wideLora) ? 812.5 : 250; + cr = 5; + sf = 9; + break; + case meshtastic_Config_LoRaConfig_ModemPreset_MEDIUM_SLOW: + bw = (myRegion->wideLora) ? 812.5 : 250; + cr = 5; + sf = 10; + break; + default: // Config_LoRaConfig_ModemPreset_LONG_FAST is default. Gracefully use this is preset is something illegal. + bw = (myRegion->wideLora) ? 812.5 : 250; + cr = 5; + sf = 11; + break; + case meshtastic_Config_LoRaConfig_ModemPreset_LONG_MODERATE: + bw = (myRegion->wideLora) ? 406.25 : 125; + cr = 8; + sf = 11; + break; + case meshtastic_Config_LoRaConfig_ModemPreset_LONG_SLOW: + bw = (myRegion->wideLora) ? 406.25 : 125; + cr = 8; + sf = 12; + break; + case meshtastic_Config_LoRaConfig_ModemPreset_VERY_LONG_SLOW: + bw = (myRegion->wideLora) ? 203.125 : 62.5; + cr = 8; + sf = 12; + break; + } + } else { + sf = loraConfig.spread_factor; + cr = loraConfig.coding_rate; + bw = loraConfig.bandwidth; + + if (bw == 31) // This parameter is not an integer + bw = 31.25; + if (bw == 62) // Fix for 62.5Khz bandwidth + bw = 62.5; + if (bw == 200) + bw = 203.125; + if (bw == 400) + bw = 406.25; + if (bw == 800) + bw = 812.5; + if (bw == 1600) + bw = 1625.0; } - } else { - sf = loraConfig.spread_factor; - cr = loraConfig.coding_rate; - bw = loraConfig.bandwidth; - if (bw == 31) // This parameter is not an integer - bw = 31.25; - if (bw == 62) // Fix for 62.5Khz bandwidth - bw = 62.5; - if (bw == 200) - bw = 203.125; - if (bw == 400) - bw = 406.25; - if (bw == 800) - bw = 812.5; - if (bw == 1600) - bw = 1625.0; + if ((myRegion->freqEnd - myRegion->freqStart) < bw / 1000) { + static const char *err_string = + "Regional frequency range is smaller than bandwidth. Falling back to default preset.\n"; + LOG_ERROR(err_string); + RECORD_CRITICALERROR(meshtastic_CriticalErrorCode_INVALID_RADIO_SETTING); + + meshtastic_ClientNotification *cn = clientNotificationPool.allocZeroed(); + cn->level = meshtastic_LogRecord_Level_ERROR; + sprintf(cn->message, err_string); + service->sendClientNotification(cn); + + // Set to default modem preset + loraConfig.use_preset = true; + loraConfig.modem_preset = meshtastic_Config_LoRaConfig_ModemPreset_LONG_FAST; + } else { + validConfig = true; + } } power = loraConfig.tx_power; - if ((power == 0) || ((power > myRegion->powerLimit) && !devicestate.owner.is_licensed)) - power = myRegion->powerLimit; + if ((power == 0) || ((power + REGULATORY_GAIN_LORA > myRegion->powerLimit) && !devicestate.owner.is_licensed)) + power = myRegion->powerLimit - REGULATORY_GAIN_LORA; if (power == 0) power = 17; // Default to this power level if we don't have a valid regional power limit (powerLimit of myRegion defaults @@ -482,7 +531,11 @@ void RadioInterface::applyModemConfig() // If user has manually specified a channel num, then use that, otherwise generate one by hashing the name const char *channelName = channels.getName(channels.getPrimaryIndex()); // channel_num is actually (channel_num - 1), since modulus (%) returns values from 0 to (numChannels - 1) - int channel_num = (loraConfig.channel_num ? loraConfig.channel_num - 1 : hash(channelName)) % numChannels; + uint32_t channel_num = (loraConfig.channel_num ? loraConfig.channel_num - 1 : hash(channelName)) % numChannels; + + // Check if we use the default frequency slot + RadioInterface::uses_default_frequency_slot = + channel_num == hash(DisplayFormatters::getModemPresetDisplayName(config.lora.modem_preset, false)) % numChannels; // Old frequency selection formula // float freq = myRegion->freqStart + ((((myRegion->freqEnd - myRegion->freqStart) / numChannels) / 2) * channel_num); @@ -499,17 +552,18 @@ void RadioInterface::applyModemConfig() saveChannelNum(channel_num); saveFreq(freq + loraConfig.frequency_offset); + slotTimeMsec = computeSlotTimeMsec(bw, sf); preambleTimeMsec = getPacketTime((uint32_t)0); maxPacketTimeMsec = getPacketTime(meshtastic_Constants_DATA_PAYLOAD_LEN + sizeof(PacketHeader)); LOG_INFO("Radio freq=%.3f, config.lora.frequency_offset=%.3f\n", freq, loraConfig.frequency_offset); LOG_INFO("Set radio: region=%s, name=%s, config=%u, ch=%d, power=%d\n", myRegion->name, channelName, loraConfig.modem_preset, channel_num, power); - LOG_INFO("Radio myRegion->freqStart -> myRegion->freqEnd: %f -> %f (%f mhz)\n", myRegion->freqStart, myRegion->freqEnd, + LOG_INFO("myRegion->freqStart -> myRegion->freqEnd: %f -> %f (%f MHz)\n", myRegion->freqStart, myRegion->freqEnd, myRegion->freqEnd - myRegion->freqStart); - LOG_INFO("Radio myRegion->numChannels: %d x %.3fkHz\n", numChannels, bw); - LOG_INFO("Radio channel_num: %d\n", channel_num + 1); - LOG_INFO("Radio frequency: %f\n", getFreq()); + LOG_INFO("numChannels: %d x %.3fkHz\n", numChannels, bw); + LOG_INFO("channel_num: %d\n", channel_num + 1); + LOG_INFO("frequency: %f\n", getFreq()); LOG_INFO("Slot time: %u msec\n", slotTimeMsec); } @@ -550,22 +604,24 @@ size_t RadioInterface::beginSending(meshtastic_MeshPacket *p) lastTxStart = millis(); - PacketHeader *h = (PacketHeader *)radiobuf; - - h->from = p->from; - h->to = p->to; - h->id = p->id; - h->channel = p->channel; + radioBuffer.header.from = p->from; + radioBuffer.header.to = p->to; + radioBuffer.header.id = p->id; + radioBuffer.header.channel = p->channel; + radioBuffer.header.next_hop = 0; // *** For future use *** + radioBuffer.header.relay_node = 0; // *** For future use *** if (p->hop_limit > HOP_MAX) { LOG_WARN("hop limit %d is too high, setting to %d\n", p->hop_limit, HOP_RELIABLE); p->hop_limit = HOP_RELIABLE; } - h->flags = p->hop_limit | (p->want_ack ? PACKET_FLAGS_WANT_ACK_MASK : 0) | (p->via_mqtt ? PACKET_FLAGS_VIA_MQTT_MASK : 0); + radioBuffer.header.flags = + p->hop_limit | (p->want_ack ? PACKET_FLAGS_WANT_ACK_MASK : 0) | (p->via_mqtt ? PACKET_FLAGS_VIA_MQTT_MASK : 0); + radioBuffer.header.flags |= (p->hop_start << PACKET_FLAGS_HOP_START_SHIFT) & PACKET_FLAGS_HOP_START_MASK; // if the sender nodenum is zero, that means uninitialized - assert(h->from); + assert(radioBuffer.header.from); - memcpy(radiobuf + sizeof(PacketHeader), p->encrypted.bytes, p->encrypted.size); + memcpy(radioBuffer.payload, p->encrypted.bytes, p->encrypted.size); sendingPacket = p; return p->encrypted.size + sizeof(PacketHeader); diff --git a/src/mesh/RadioInterface.h b/src/mesh/RadioInterface.h index 83c5dae64..89a4c7087 100644 --- a/src/mesh/RadioInterface.h +++ b/src/mesh/RadioInterface.h @@ -5,14 +5,19 @@ #include "Observer.h" #include "PointerQueue.h" #include "airtime.h" +#include "error.h" #define MAX_TX_QUEUE 16 // max number of packets which can be waiting for transmission -#define MAX_RHPACKETLEN 256 +#define MAX_LORA_PAYLOAD_LEN 255 // max length of 255 per Semtech's datasheets on SX12xx +#define MESHTASTIC_HEADER_LENGTH 16 +#define MESHTASTIC_PKC_OVERHEAD 12 -#define PACKET_FLAGS_HOP_MASK 0x07 +#define PACKET_FLAGS_HOP_LIMIT_MASK 0x07 #define PACKET_FLAGS_WANT_ACK_MASK 0x08 #define PACKET_FLAGS_VIA_MQTT_MASK 0x10 +#define PACKET_FLAGS_HOP_START_MASK 0xE0 +#define PACKET_FLAGS_HOP_START_SHIFT 5 /** * This structure has to exactly match the wire layout when sent over the radio link. Used to keep compatibility @@ -32,8 +37,28 @@ typedef struct { /** The channel hash - used as a hint for the decoder to limit which channels we consider */ uint8_t channel; + + // ***For future use*** Last byte of the NodeNum of the next-hop for this packet + uint8_t next_hop; + + // ***For future use*** Last byte of the NodeNum of the node that will relay/relayed this packet + uint8_t relay_node; } PacketHeader; +/** + * This structure represent the structured buffer : a PacketHeader then the payload. The whole is + * MAX_LORA_PAYLOAD_LEN + 1 length + * It makes the use of its data easier, and avoids manipulating pointers (and potential non aligned accesses) + */ +typedef struct { + /** The header, as defined just before */ + PacketHeader header; + + /** The payload, of maximum length minus the header, aligned just to be sure */ + uint8_t payload[MAX_LORA_PAYLOAD_LEN + 1 - sizeof(PacketHeader)] __attribute__((__aligned__)); + +} RadioBuffer; + /** * Basic operations all radio chipsets must implement. * @@ -63,23 +88,24 @@ class RadioInterface - roundtrip air propagation time (assuming max. 30km between nodes); - Tx/Rx turnaround time (maximum of SX126x and SX127x); - MAC processing time (measured on T-beam) */ - uint32_t slotTimeMsec = 8.5 * pow(2, sf) / bw + 0.2 + 0.4 + 7; + uint32_t slotTimeMsec = computeSlotTimeMsec(bw, sf); uint16_t preambleLength = 16; // 8 is default, but we use longer to increase the amount of sleep time when receiving uint32_t preambleTimeMsec = 165; // calculated on startup, this is the default for LongFast uint32_t maxPacketTimeMsec = 3246; // calculated on startup, this is the default for LongFast const uint32_t PROCESSING_TIME_MSEC = 4500; // time to construct, process and construct a packet again (empirically determined) const uint8_t CWmin = 2; // minimum CWsize - const uint8_t CWmax = 8; // maximum CWsize + const uint8_t CWmax = 7; // maximum CWsize meshtastic_MeshPacket *sendingPacket = NULL; // The packet we are currently sending uint32_t lastTxStart = 0L; + uint32_t computeSlotTimeMsec(float bw, float sf) { return 8.5 * pow(2, sf) / bw + 0.2 + 0.4 + 7; } + /** * A temporary buffer used for sending/receiving packets, sized to hold the biggest buffer we might need * */ - uint8_t radiobuf[MAX_RHPACKETLEN]; - + RadioBuffer radioBuffer __attribute__((__aligned__)); /** * Enqueue a received packet for the registered receiver */ @@ -173,6 +199,9 @@ class RadioInterface /// Some boards (1st gen Pinetab Lora module) have broken IRQ wires, so we need to poll via i2c registers virtual bool isIRQPending() { return false; } + // Whether we use the default frequency slot given our LoRa config (region and modem preset) + static bool uses_default_frequency_slot; + protected: int8_t power = 17; // Set by applyModemConfig() @@ -224,4 +253,4 @@ class RadioInterface }; /// Debug printing for packets -void printPacket(const char *prefix, const meshtastic_MeshPacket *p); +void printPacket(const char *prefix, const meshtastic_MeshPacket *p); \ No newline at end of file diff --git a/src/mesh/RadioLibInterface.cpp b/src/mesh/RadioLibInterface.cpp index 8a2bc53e5..818826018 100644 --- a/src/mesh/RadioLibInterface.cpp +++ b/src/mesh/RadioLibInterface.cpp @@ -1,7 +1,9 @@ #include "RadioLibInterface.h" #include "MeshTypes.h" #include "NodeDB.h" +#include "PowerMon.h" #include "SPILock.h" +#include "Throttle.h" #include "configuration.h" #include "error.h" #include "main.h" @@ -22,6 +24,36 @@ void LockingArduinoHal::spiEndTransaction() ArduinoHal::spiEndTransaction(); } +#if ARCH_PORTDUINO +void LockingArduinoHal::spiTransfer(uint8_t *out, size_t len, uint8_t *in) +{ + if (busy == RADIOLIB_NC) { + spi->transfer(out, in, len); + } else { + uint16_t offset = 0; + + while (len) { + uint8_t block_size = (len < 20 ? len : 20); + spi->transfer((out != NULL ? out + offset : NULL), (in != NULL ? in + offset : NULL), block_size); + if (block_size == len) + return; + + // ensure GPIO is low + + uint32_t start = millis(); + while (digitalRead(busy)) { + if (!Throttle::isWithinTimespanMs(start, 2000)) { + LOG_ERROR("GPIO mid-transfer timeout, is it connected?"); + return; + } + } + + offset += block_size; + len -= block_size; + } + } +} +#endif RadioLibInterface::RadioLibInterface(LockingArduinoHal *hal, RADIOLIB_PIN_TYPE cs, RADIOLIB_PIN_TYPE irq, RADIOLIB_PIN_TYPE rst, RADIOLIB_PIN_TYPE busy, PhysicalLayer *_iface) @@ -83,7 +115,7 @@ bool RadioLibInterface::canSendImmediately() } // If we've been trying to send the same packet more than one minute and we haven't gotten a // TX IRQ from the radio, the radio is probably broken. - if (busyTx && (millis() - lastTxStart > 60000)) { + if (busyTx && !Throttle::isWithinTimespanMs(lastTxStart, 60000)) { LOG_ERROR("Hardware Failure! busyTx for more than 60s\n"); RECORD_CRITICALERROR(meshtastic_CriticalErrorCode_TRANSMIT_FAILED); // reboot in 5 seconds when this condition occurs. @@ -97,6 +129,28 @@ bool RadioLibInterface::canSendImmediately() return true; } +bool RadioLibInterface::receiveDetected(uint16_t irq, ulong syncWordHeaderValidFlag, ulong preambleDetectedFlag) +{ + bool detected = (irq & (syncWordHeaderValidFlag | preambleDetectedFlag)); + // Handle false detections + if (detected) { + if (!activeReceiveStart) { + activeReceiveStart = millis(); + } else if (!Throttle::isWithinTimespanMs(activeReceiveStart, 2 * preambleTimeMsec) && !(irq & syncWordHeaderValidFlag)) { + // The HEADER_VALID flag should be set by now if it was really a packet, so ignore PREAMBLE_DETECTED flag + activeReceiveStart = 0; + LOG_DEBUG("Ignore false preamble detection.\n"); + return false; + } else if (!Throttle::isWithinTimespanMs(activeReceiveStart, maxPacketTimeMsec)) { + // We should have gotten an RX_DONE IRQ by now if it was really a packet, so ignore HEADER_VALID flag + activeReceiveStart = 0; + LOG_DEBUG("Ignore false header detection.\n"); + return false; + } + } + return detected; +} + /// Send a packet (possibly by enquing in a private fifo). This routine will /// later free() the packet to pool. This routine is not allowed to stall because it is called from /// bluetooth comms code. If the txmit queue is empty it might return an error @@ -113,7 +167,7 @@ ErrorCode RadioLibInterface::send(meshtastic_MeshPacket *p) } } else { - LOG_WARN("send - lora tx disable because RegionCode_Unset\n"); + LOG_WARN("send - lora tx disabled because RegionCode_Unset\n"); packetPool.release(p); return ERRNO_DISABLED; } @@ -132,7 +186,7 @@ ErrorCode RadioLibInterface::send(meshtastic_MeshPacket *p) #ifndef LORA_DISABLE_SENDING printPacket("enqueuing for send", p); - LOG_DEBUG("txGood=%d,rxGood=%d,rxBad=%d\n", txGood, rxGood, rxBad); + LOG_DEBUG("txGood=%d,txRelay=%d,rxGood=%d,rxBad=%d\n", txGood, txRelay, rxGood, rxBad); ErrorCode res = txQueue.enqueue(p) ? ERRNO_OK : ERRNO_UNKNOWN; if (res != ERRNO_OK) { // we weren't able to queue it, so we must drop it to prevent leaks @@ -287,6 +341,7 @@ void RadioLibInterface::handleTransmitInterrupt() // ignore the transmit interrupt if (sendingPacket) completeSending(); + powerMon->clearState(meshtastic_PowerMon_State_Lora_TXOn); // But our transmitter is deffinitely off now } void RadioLibInterface::completeSending() @@ -298,6 +353,8 @@ void RadioLibInterface::completeSending() if (p) { txGood++; + if (!isFromUs(p)) + txRelay++; printPacket("Completed sending", p); // We are done sending that packet, release it @@ -313,7 +370,7 @@ void RadioLibInterface::handleReceiveInterrupt() // when this is called, we should be in receive mode - if we are not, just jump out instead of bombing. Possible Race // Condition? if (!isReceiving) { - LOG_DEBUG("*** WAS_ASSERT *** handleReceiveInterrupt called when not in receive mode\n"); + LOG_ERROR("handleReceiveInterrupt called when not in receive mode, which shouldn't happen.\n"); return; } @@ -324,7 +381,15 @@ void RadioLibInterface::handleReceiveInterrupt() xmitMsec = getPacketTime(length); - int state = iface->readData(radiobuf, length); +#ifndef DISABLE_WELCOME_UNSET + if (config.lora.region == meshtastic_Config_LoRaConfig_RegionCode_UNSET) { + LOG_WARN("recv - lora rx disabled because RegionCode_Unset\n"); + airTime->logAirtime(RX_ALL_LOG, xmitMsec); + return; + } +#endif + + int state = iface->readData((uint8_t *)&radioBuffer, length); if (state != RADIOLIB_ERR_NONE) { LOG_ERROR("ignoring received packet due to error=%d\n", state); rxBad++; @@ -334,7 +399,6 @@ void RadioLibInterface::handleReceiveInterrupt() } else { // Skip the 4 headers that are at the beginning of the rxBuf int32_t payloadLen = length - sizeof(PacketHeader); - const uint8_t *payload = radiobuf + sizeof(PacketHeader); // check for short packets if (payloadLen < 0) { @@ -342,10 +406,9 @@ void RadioLibInterface::handleReceiveInterrupt() rxBad++; airTime->logAirtime(RX_ALL_LOG, xmitMsec); } else { - const PacketHeader *h = (PacketHeader *)radiobuf; rxGood++; // altered packet with "from == 0" can do Remote Node Administration without permission - if (h->from == 0) { + if (radioBuffer.header.from == 0) { LOG_WARN("ignoring received packet without sender\n"); return; } @@ -355,21 +418,22 @@ void RadioLibInterface::handleReceiveInterrupt() // nodes. meshtastic_MeshPacket *mp = packetPool.allocZeroed(); - mp->from = h->from; - mp->to = h->to; - mp->id = h->id; - mp->channel = h->channel; - assert(HOP_MAX <= PACKET_FLAGS_HOP_MASK); // If hopmax changes, carefully check this code - mp->hop_limit = h->flags & PACKET_FLAGS_HOP_MASK; - mp->want_ack = !!(h->flags & PACKET_FLAGS_WANT_ACK_MASK); - mp->via_mqtt = !!(h->flags & PACKET_FLAGS_VIA_MQTT_MASK); + mp->from = radioBuffer.header.from; + mp->to = radioBuffer.header.to; + mp->id = radioBuffer.header.id; + mp->channel = radioBuffer.header.channel; + assert(HOP_MAX <= PACKET_FLAGS_HOP_LIMIT_MASK); // If hopmax changes, carefully check this code + mp->hop_limit = radioBuffer.header.flags & PACKET_FLAGS_HOP_LIMIT_MASK; + mp->hop_start = (radioBuffer.header.flags & PACKET_FLAGS_HOP_START_MASK) >> PACKET_FLAGS_HOP_START_SHIFT; + mp->want_ack = !!(radioBuffer.header.flags & PACKET_FLAGS_WANT_ACK_MASK); + mp->via_mqtt = !!(radioBuffer.header.flags & PACKET_FLAGS_VIA_MQTT_MASK); addReceiveMetadata(mp); mp->which_payload_variant = meshtastic_MeshPacket_encrypted_tag; // Mark that the payload is still encrypted at this point assert(((uint32_t)payloadLen) <= sizeof(mp->encrypted.bytes)); - memcpy(mp->encrypted.bytes, payload, payloadLen); + memcpy(mp->encrypted.bytes, radioBuffer.payload, payloadLen); mp->encrypted.size = payloadLen; printPacket("Lora RX", mp); @@ -381,25 +445,44 @@ void RadioLibInterface::handleReceiveInterrupt() } } +void RadioLibInterface::startReceive() +{ + isReceiving = true; + powerMon->setState(meshtastic_PowerMon_State_Lora_RXOn); +} + +void RadioLibInterface::configHardwareForSend() +{ + powerMon->setState(meshtastic_PowerMon_State_Lora_TXOn); +} + +void RadioLibInterface::setStandby() +{ + // neither sending nor receiving + powerMon->clearState(meshtastic_PowerMon_State_Lora_RXOn); + powerMon->clearState(meshtastic_PowerMon_State_Lora_TXOn); +} + /** start an immediate transmit */ void RadioLibInterface::startSend(meshtastic_MeshPacket *txp) { printPacket("Starting low level send", txp); if (disabled || !config.lora.tx_enabled) { - LOG_WARN("startSend is dropping tx packet because we are disabled\n"); + LOG_WARN("Drop Tx packet because LoRa Tx disabled\n"); packetPool.release(txp); } else { configHardwareForSend(); // must be after setStandby size_t numbytes = beginSending(txp); - int res = iface->startTransmit(radiobuf, numbytes); + int res = iface->startTransmit((uint8_t *)&radioBuffer, numbytes); if (res != RADIOLIB_ERR_NONE) { LOG_ERROR("startTransmit failed, error=%d\n", res); RECORD_CRITICALERROR(meshtastic_CriticalErrorCode_RADIO_SPI_BUG); // This send failed, but make sure to 'complete' it properly completeSending(); + powerMon->clearState(meshtastic_PowerMon_State_Lora_TXOn); // Transmitter off now startReceive(); // Restart receive mode (because startTransmit failed to put us in xmit mode) } @@ -407,4 +490,4 @@ void RadioLibInterface::startSend(meshtastic_MeshPacket *txp) // bits enableInterrupt(isrTxLevel0); } -} +} \ No newline at end of file diff --git a/src/mesh/RadioLibInterface.h b/src/mesh/RadioLibInterface.h index 4634ca7ee..673f53a32 100644 --- a/src/mesh/RadioLibInterface.h +++ b/src/mesh/RadioLibInterface.h @@ -21,10 +21,21 @@ class LockingArduinoHal : public ArduinoHal { public: - LockingArduinoHal(SPIClass &spi, SPISettings spiSettings) : ArduinoHal(spi, spiSettings){}; + LockingArduinoHal(SPIClass &spi, SPISettings spiSettings, RADIOLIB_PIN_TYPE _busy = RADIOLIB_NC) + : ArduinoHal(spi, spiSettings) + { +#if ARCH_PORTDUINO + busy = _busy; +#endif + }; void spiBeginTransaction() override; void spiEndTransaction() override; +#if ARCH_PORTDUINO + RADIOLIB_PIN_TYPE busy; + void spiTransfer(uint8_t *out, size_t len, uint8_t *in) override; + +#endif }; #if defined(USE_STM32WLx) @@ -50,11 +61,6 @@ class RadioLibInterface : public RadioInterface, protected concurrency::Notified */ static void isrTxLevel0(), isrLevel0Common(PendingISR code); - /** - * Debugging counts - */ - uint32_t rxBad = 0, rxGood = 0, txGood = 0; - MeshPacketQueue txQueue = MeshPacketQueue(MAX_TX_QUEUE); protected: @@ -98,6 +104,11 @@ class RadioLibInterface : public RadioInterface, protected concurrency::Notified */ virtual void enableInterrupt(void (*)()) = 0; + /** + * Debugging counts + */ + uint32_t rxBad = 0, rxGood = 0, txGood = 0, txRelay = 0; + public: RadioLibInterface(LockingArduinoHal *hal, RADIOLIB_PIN_TYPE cs, RADIOLIB_PIN_TYPE irq, RADIOLIB_PIN_TYPE rst, RADIOLIB_PIN_TYPE busy, PhysicalLayer *iface = NULL); @@ -115,8 +126,9 @@ class RadioLibInterface : public RadioInterface, protected concurrency::Notified * Start waiting to receive a message * * External functions can call this method to wake the device from sleep. + * Subclasses must override and call this base method */ - virtual void startReceive() = 0; + virtual void startReceive(); /** can we detect a LoRa preamble on the current channel? */ virtual bool isChannelActive() = 0; @@ -155,8 +167,13 @@ class RadioLibInterface : public RadioInterface, protected concurrency::Notified meshtastic_QueueStatus getQueueStatus(); protected: - /** Do any hardware setup needed on entry into send configuration for the radio. Subclasses can customize */ - virtual void configHardwareForSend() {} + uint32_t activeReceiveStart = 0; + + bool receiveDetected(uint16_t irq, ulong syncWordHeaderValidFlag, ulong preambleDetectedFlag); + + /** Do any hardware setup needed on entry into send configuration for the radio. + * Subclasses can customize, but must also call this base method */ + virtual void configHardwareForSend(); /** Could we send right now (i.e. either not actively receiving or transmitting)? */ virtual bool canSendImmediately(); @@ -175,5 +192,10 @@ class RadioLibInterface : public RadioInterface, protected concurrency::Notified */ virtual void addReceiveMetadata(meshtastic_MeshPacket *mp) = 0; - virtual void setStandby() = 0; -}; + /** + * Subclasses must override, implement and then call into this base class implementation + */ + virtual void setStandby(); + + const char *radioLibErr = "RadioLib err=\n"; +}; \ No newline at end of file diff --git a/src/mesh/RadioLibRF95.cpp b/src/mesh/RadioLibRF95.cpp index 1fe7869a3..fe9bbdc93 100644 --- a/src/mesh/RadioLibRF95.cpp +++ b/src/mesh/RadioLibRF95.cpp @@ -1,3 +1,4 @@ +#if RADIOLIB_EXCLUDE_SX127X != 1 #include "RadioLibRF95.h" #include "configuration.h" @@ -42,7 +43,11 @@ int16_t RadioLibRF95::begin(float freq, float bw, uint8_t sf, uint8_t cr, uint8_ state = setCodingRate(cr); RADIOLIB_ASSERT(state); +#ifdef USE_RF95_RFO + state = setOutputPower(power, true); +#else state = setOutputPower(power); +#endif RADIOLIB_ASSERT(state); state = setGain(gain); @@ -77,4 +82,5 @@ uint8_t RadioLibRF95::readReg(uint8_t addr) { Module *mod = this->getMod(); return mod->SPIreadRegister(addr); -} \ No newline at end of file +} +#endif \ No newline at end of file diff --git a/src/mesh/RadioLibRF95.h b/src/mesh/RadioLibRF95.h index 3bdb794f2..916a33234 100644 --- a/src/mesh/RadioLibRF95.h +++ b/src/mesh/RadioLibRF95.h @@ -1,4 +1,5 @@ #pragma once +#if RADIOLIB_EXCLUDE_SX127X != 1 #include /*! @@ -69,3 +70,4 @@ class RadioLibRF95 : public SX1278 // use the previous value float currentLimit = 100; }; +#endif \ No newline at end of file diff --git a/src/mesh/ReliableRouter.cpp b/src/mesh/ReliableRouter.cpp index a1e9f281d..fa05e7973 100644 --- a/src/mesh/ReliableRouter.cpp +++ b/src/mesh/ReliableRouter.cpp @@ -1,8 +1,10 @@ #include "ReliableRouter.h" +#include "Default.h" #include "MeshModule.h" #include "MeshTypes.h" #include "configuration.h" #include "mesh-pb-constants.h" +#include "modules/NodeInfoModule.h" // ReliableRouter::ReliableRouter() {} @@ -17,7 +19,7 @@ ErrorCode ReliableRouter::send(meshtastic_MeshPacket *p) // message will rebroadcast. But asking for hop_limit 0 in that context means the client app has no preference on hop // counts and we want this message to get through the whole mesh, so use the default. if (p->hop_limit == 0) { - p->hop_limit = (config.lora.hop_limit >= HOP_MAX) ? HOP_MAX : config.lora.hop_limit; + p->hop_limit = Default::getConfiguredOrDefaultHopLimit(config.lora.hop_limit); } auto copy = packetPool.allocCopy(*p); @@ -71,12 +73,12 @@ bool ReliableRouter::shouldFilterReceived(const meshtastic_MeshPacket *p) i->second.nextTxMsec += iface->getPacketTime(p); } - /* Resend implicit ACKs for repeated packets (assuming the original packet was sent with HOP_RELIABLE) + /* Resend implicit ACKs for repeated packets (hopStart equals hopLimit); * this way if an implicit ACK is dropped and a packet is resent we'll rebroadcast again. * Resending real ACKs is omitted, as you might receive a packet multiple times due to flooding and * flooding this ACK back to the original sender already adds redundancy. */ - if (wasSeenRecently(p, false) && p->hop_limit == HOP_RELIABLE && !MeshModule::currentReply && p->to != nodeDB.getNodeNum()) { - // retransmission on broadcast has hop_limit still equal to HOP_RELIABLE + bool isRepeated = p->hop_start == 0 ? (p->hop_limit == HOP_RELIABLE) : (p->hop_start == p->hop_limit); + if (wasSeenRecently(p, false) && isRepeated && !MeshModule::currentReply && !isToUs(p)) { LOG_DEBUG("Resending implicit ack for a repeated floodmsg\n"); meshtastic_MeshPacket *tosend = packetPool.allocCopy(*p); tosend->hop_limit--; // bump down the hop count @@ -100,20 +102,30 @@ bool ReliableRouter::shouldFilterReceived(const meshtastic_MeshPacket *p) */ void ReliableRouter::sniffReceived(const meshtastic_MeshPacket *p, const meshtastic_Routing *c) { - NodeNum ourNode = getNodeNum(); - - if (p->to == ourNode) { // ignore ack/nak/want_ack packets that are not address to us (we only handle 0 hop reliability) + if (isToUs(p)) { // ignore ack/nak/want_ack packets that are not address to us (we only handle 0 hop reliability) if (p->want_ack) { if (MeshModule::currentReply) { - LOG_DEBUG("Some other module has replied to this message, no need for a 2nd ack\n"); + LOG_DEBUG("Another module replied to this message, no need for 2nd ack\n"); } else if (p->which_payload_variant == meshtastic_MeshPacket_decoded_tag) { - sendAckNak(meshtastic_Routing_Error_NONE, getFrom(p), p->id, p->channel); + sendAckNak(meshtastic_Routing_Error_NONE, getFrom(p), p->id, p->channel, p->hop_start, p->hop_limit); + } else if (p->which_payload_variant == meshtastic_MeshPacket_encrypted_tag && p->channel == 0 && + (nodeDB->getMeshNode(p->from) == nullptr || nodeDB->getMeshNode(p->from)->user.public_key.size == 0)) { + 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(), + p->hop_start, p->hop_limit); } else { // Send a 'NO_CHANNEL' error on the primary channel if want_ack packet destined for us cannot be decoded - sendAckNak(meshtastic_Routing_Error_NO_CHANNEL, getFrom(p), p->id, channels.getPrimaryIndex()); + sendAckNak(meshtastic_Routing_Error_NO_CHANNEL, getFrom(p), p->id, channels.getPrimaryIndex(), p->hop_start, + p->hop_limit); + } + } + if (p->which_payload_variant == meshtastic_MeshPacket_decoded_tag && c && + c->error_reason == meshtastic_Routing_Error_PKI_UNKNOWN_PUBKEY) { + if (owner.public_key.size == 32) { + LOG_INFO("PKI decrypt failure, send a NodeInfo"); + nodeInfoModule->sendOurNodeInfo(p->from, false, p->channel, true); } } - // We consider an ack to be either a !routing packet with a request ID or a routing packet with !error PacketId ackId = ((c && c->error_reason == meshtastic_Routing_Error_NONE) || !c) ? p->decoded.request_id : 0; @@ -122,11 +134,10 @@ void ReliableRouter::sniffReceived(const meshtastic_MeshPacket *p, const meshtas // We intentionally don't check wasSeenRecently, because it is harmless to delete non existent retransmission records if (ackId || nakId) { + LOG_DEBUG("Received a %s for 0x%x, stopping retransmissions\n", ackId ? "ACK" : "NAK", ackId); if (ackId) { - LOG_DEBUG("Received an ack for 0x%x, stopping retransmissions\n", ackId); stopRetransmission(p->to, ackId); } else { - LOG_DEBUG("Received a nak for 0x%x, stopping retransmissions\n", nakId); stopRetransmission(p->to, nakId); } } @@ -166,8 +177,6 @@ bool ReliableRouter::stopRetransmission(GlobalPacketId key) auto old = findPendingPacket(key); if (old) { auto p = old->packet; - auto numErased = pending.erase(key); - assert(numErased == 1); /* Only when we already transmitted a packet via LoRa, we will cancel the packet in the Tx queue to avoid canceling a transmission if it was ACKed super fast via MQTT */ if (old->numRetransmissions < NUM_RETRANSMISSIONS - 1) { @@ -176,6 +185,8 @@ bool ReliableRouter::stopRetransmission(GlobalPacketId key) // now free the pooled copy for retransmission too packetPool.release(p); } + auto numErased = pending.erase(key); + assert(numErased == 1); return true; } else return false; @@ -255,4 +266,4 @@ void ReliableRouter::setNextTx(PendingPacket *pending) LOG_DEBUG("Setting next retransmission in %u msecs: ", d); printPacket("", pending->packet); setReceivedMessage(); // Run ASAP, so we can figure out our correct sleep time -} +} \ No newline at end of file diff --git a/src/mesh/Router.cpp b/src/mesh/Router.cpp index 4a6dc9007..b5732dee9 100644 --- a/src/mesh/Router.cpp +++ b/src/mesh/Router.cpp @@ -2,26 +2,25 @@ #include "Channels.h" #include "CryptoEngine.h" #include "MeshRadio.h" +#include "MeshService.h" #include "NodeDB.h" #include "RTC.h" #include "configuration.h" #include "main.h" #include "mesh-pb-constants.h" +#include "meshUtils.h" #include "modules/RoutingModule.h" -extern "C" { -#include "mesh/compression/unishox2.h" -} - +#if !MESHTASTIC_EXCLUDE_MQTT #include "mqtt/MQTT.h" - -/** - * Router todo - * - * DONE: Implement basic interface and use it elsewhere in app - * Add naive flooding mixin (& drop duplicate rx broadcasts), add tools for sending broadcasts with incrementing sequence #s - * Add an optional adjacent node only 'send with ack' mixin. If we timeout waiting for the ack, call handleAckTimeout(packet) - * - **/ +#endif +#include "Default.h" +#if ARCH_PORTDUINO +#include "platform/portduino/PortduinoGlue.h" +#endif +#if ENABLE_JSON_LOGGING || ARCH_PORTDUINO +#include "serialization/MeshPacketSerializer.h" +#endif +#include "../userPrefs.h" #define MAX_RX_FROMRADIO \ 4 // max number of packets destined to our queue, we dispatch packets quickly so it doesn't need to be big @@ -37,7 +36,8 @@ static MemoryDynamic staticPool; Allocator &packetPool = staticPool; -static uint8_t bytes[MAX_RHPACKETLEN]; +static uint8_t bytes[MAX_LORA_PAYLOAD_LEN + 1] __attribute__((__aligned__)); +static uint8_t ScratchEncrypted[MAX_LORA_PAYLOAD_LEN + 1] __attribute__((__aligned__)); /** * Constructor @@ -95,22 +95,23 @@ void Router::enqueueReceivedMessage(meshtastic_MeshPacket *p) // FIXME, move this someplace better PacketId generatePacketId() { - static uint32_t i; // Note: trying to keep this in noinit didn't help for working across reboots + static uint32_t rollingPacketId; // Note: trying to keep this in noinit didn't help for working across reboots static bool didInit = false; - uint32_t numPacketId = UINT32_MAX; - if (!didInit) { didInit = true; // pick a random initial sequence number at boot (to prevent repeated reboots always starting at 0) // Note: we mask the high order bit to ensure that we never pass a 'negative' number to random - i = random(numPacketId & 0x7fffffff); - LOG_DEBUG("Initial packet id %u, numPacketId %u\n", i, numPacketId); + rollingPacketId = random(UINT32_MAX & 0x7fffffff); + LOG_DEBUG("Initial packet id %u\n", rollingPacketId); } - i++; - PacketId id = (i % numPacketId) + 1; // return number between 1 and numPacketId (ie - never zero) + rollingPacketId++; + + rollingPacketId &= ID_COUNTER_MASK; // Mask out the top 22 bits + PacketId id = rollingPacketId | random(UINT32_MAX & 0x7fffffff) << 10; // top 22 bits + LOG_DEBUG("Partially randomized packet id %u\n", id); return id; } @@ -119,9 +120,9 @@ meshtastic_MeshPacket *Router::allocForSending() meshtastic_MeshPacket *p = packetPool.allocZeroed(); p->which_payload_variant = meshtastic_MeshPacket_decoded_tag; // Assume payload is decoded at start. - p->from = nodeDB.getNodeNum(); + p->from = nodeDB->getNodeNum(); p->to = NODENUM_BROADCAST; - p->hop_limit = (config.lora.hop_limit >= HOP_MAX) ? HOP_MAX : config.lora.hop_limit; + p->hop_limit = Default::getConfiguredOrDefaultHopLimit(config.lora.hop_limit); p->id = generatePacketId(); p->rx_time = getValidTime(RTCQualityFromNet); // Just in case we process the packet locally - make sure it has a valid timestamp @@ -132,9 +133,10 @@ meshtastic_MeshPacket *Router::allocForSending() /** * Send an ack or a nak packet back towards whoever sent idFrom */ -void Router::sendAckNak(meshtastic_Routing_Error err, NodeNum to, PacketId idFrom, ChannelIndex chIndex) +void Router::sendAckNak(meshtastic_Routing_Error err, NodeNum to, PacketId idFrom, ChannelIndex chIndex, uint8_t hopStart, + uint8_t hopLimit) { - routingModule->sendAckNak(err, to, idFrom, chIndex); + routingModule->sendAckNak(err, to, idFrom, chIndex, hopStart, hopLimit); } void Router::abortSendAndNak(meshtastic_Routing_Error err, meshtastic_MeshPacket *p) @@ -163,8 +165,11 @@ meshtastic_QueueStatus Router::getQueueStatus() ErrorCode Router::sendLocal(meshtastic_MeshPacket *p, RxSource src) { + if (p->to == 0) { + LOG_ERROR("Packet received with to: of 0!\n"); + } // No need to deliver externally if the destination is the local node - if (p->to == nodeDB.getNodeNum()) { + if (isToUs(p)) { printPacket("Enqueued local", p); enqueueReceivedMessage(p); return ERRNO_OK; @@ -180,23 +185,18 @@ ErrorCode Router::sendLocal(meshtastic_MeshPacket *p, RxSource src) handleReceived(p, src); } - if (!p->channel) { // don't override if a channel was requested - p->channel = nodeDB.getMeshNodeChannel(p->to); - LOG_DEBUG("localSend to channel %d\n", p->channel); + if (!p->channel && !p->pki_encrypted) { // don't override if a channel was requested + meshtastic_NodeInfoLite *node = nodeDB->getMeshNode(p->to); + if (node && node->user.public_key.size == 0) { + p->channel = node->channel; + LOG_DEBUG("localSend to channel %d\n", p->channel); + } } return send(p); } } -void printBytes(const char *label, const uint8_t *p, size_t numbytes) -{ - LOG_DEBUG("%s: ", label); - for (size_t i = 0; i < numbytes; i++) - LOG_DEBUG("%02x ", p[i]); - LOG_DEBUG("\n"); -} - /** * Send a packet on a suitable interface. This routine will * later free() the packet to pool. This routine is not allowed to stall. @@ -204,7 +204,7 @@ void printBytes(const char *label, const uint8_t *p, size_t numbytes) */ ErrorCode Router::send(meshtastic_MeshPacket *p) { - if (p->to == nodeDB.getNodeNum()) { + if (isToUs(p)) { LOG_ERROR("BUG! send() called with packet destined for local node!\n"); packetPool.release(p); return meshtastic_Routing_Error_BAD_REQUEST; @@ -217,9 +217,16 @@ ErrorCode Router::send(meshtastic_MeshPacket *p) #ifdef DEBUG_PORT uint8_t silentMinutes = airTime->getSilentMinutes(hourlyTxPercent, myRegion->dutyCycle); LOG_WARN("Duty cycle limit exceeded. Aborting send for now, you can send again in %d minutes.\n", silentMinutes); + meshtastic_ClientNotification *cn = clientNotificationPool.allocZeroed(); + cn->has_reply_id = true; + cn->reply_id = p->id; + cn->level = meshtastic_LogRecord_Level_WARNING; + cn->time = getValidTime(RTCQualityFromNet); + sprintf(cn->message, "Duty cycle limit exceeded. You can send again in %d minutes.", silentMinutes); + service->sendClientNotification(cn); #endif meshtastic_Routing_Error err = meshtastic_Routing_Error_DUTY_CYCLE_LIMIT; - if (getFrom(p) == nodeDB.getNodeNum()) { // only send NAK to API, not to the mesh + if (isFromUs(p)) { // only send NAK to API, not to the mesh abortSendAndNak(err, p); } else { packetPool.release(p); @@ -240,10 +247,18 @@ ErrorCode Router::send(meshtastic_MeshPacket *p) // the lora we need to make sure we have replaced it with our local address p->from = getFrom(p); + // If we are the original transmitter, set the hop limit with which we start + if (isFromUs(p)) + p->hop_start = p->hop_limit; + // If the packet hasn't yet been encrypted, do so now (it might already be encrypted if we are just forwarding it) - assert(p->which_payload_variant == meshtastic_MeshPacket_encrypted_tag || - p->which_payload_variant == meshtastic_MeshPacket_decoded_tag); // I _think_ all packets should have a payload by now + if (!(p->which_payload_variant == meshtastic_MeshPacket_encrypted_tag || + p->which_payload_variant == meshtastic_MeshPacket_decoded_tag)) { + return meshtastic_Routing_Error_BAD_REQUEST; + } + + fixPriority(p); // Before encryption, fix the priority if it's unset // If the packet is not yet encrypted, do so now if (p->which_payload_variant == meshtastic_MeshPacket_decoded_tag) { @@ -256,11 +271,12 @@ ErrorCode Router::send(meshtastic_MeshPacket *p) abortSendAndNak(encodeResult, p); return encodeResult; // FIXME - this isn't a valid ErrorCode } - +#if !MESHTASTIC_EXCLUDE_MQTT // Only publish to MQTT if we're the original transmitter of the packet - if (moduleConfig.mqtt.enabled && p->from == nodeDB.getNodeNum() && mqtt) { + if (moduleConfig.mqtt.enabled && isFromUs(p) && mqtt) { mqtt->onSend(*p, *p_decoded, chIndex); } +#endif packetPool.release(p_decoded); } @@ -292,67 +308,118 @@ bool perhapsDecode(meshtastic_MeshPacket *p) return false; if (config.device.rebroadcast_mode == meshtastic_Config_DeviceConfig_RebroadcastMode_KNOWN_ONLY && - !nodeDB.getMeshNode(p->from)->has_user) { - LOG_DEBUG("Node 0x%x not in NodeDB. Rebroadcast mode KNOWN_ONLY will ignore packet\n", p->from); + (nodeDB->getMeshNode(p->from) == NULL || !nodeDB->getMeshNode(p->from)->has_user)) { + LOG_DEBUG("Node 0x%x not in nodeDB-> Rebroadcast mode KNOWN_ONLY will ignore packet\n", p->from); return false; } if (p->which_payload_variant == meshtastic_MeshPacket_decoded_tag) return true; // If packet was already decoded just return - // assert(p->which_payloadVariant == MeshPacket_encrypted_tag); + size_t rawSize = p->encrypted.size; + if (rawSize > sizeof(bytes)) { + LOG_ERROR("Packet too large to attempt decryption! (rawSize=%d > 256)\n", rawSize); + return false; + } + bool decrypted = false; + ChannelIndex chIndex = 0; + memcpy(bytes, p->encrypted.bytes, + rawSize); // we have to copy into a scratch buffer, because these bytes are a union with the decoded protobuf + memcpy(ScratchEncrypted, p->encrypted.bytes, rawSize); +#if !(MESHTASTIC_EXCLUDE_PKI) + // Attempt PKI decryption first + if (p->channel == 0 && isToUs(p) && p->to > 0 && p->to != NODENUM_BROADCAST && nodeDB->getMeshNode(p->from) != nullptr && + nodeDB->getMeshNode(p->from)->user.public_key.size > 0 && nodeDB->getMeshNode(p->to)->user.public_key.size > 0 && + rawSize > MESHTASTIC_PKC_OVERHEAD) { + LOG_DEBUG("Attempting PKI decryption\n"); - // Try to find a channel that works with this hash - for (ChannelIndex chIndex = 0; chIndex < channels.getNumChannels(); chIndex++) { - // Try to use this hash/channel pair - if (channels.decryptForHash(chIndex, p->channel)) { - // Try to decrypt the packet if we can - size_t rawSize = p->encrypted.size; - assert(rawSize <= sizeof(bytes)); - memcpy(bytes, p->encrypted.bytes, - rawSize); // we have to copy into a scratch buffer, because these bytes are a union with the decoded protobuf - crypto->decrypt(p->from, p->id, rawSize, bytes); - - // printBytes("plaintext", bytes, p->encrypted.size); - - // Take those raw bytes and convert them back into a well structured protobuf we can understand + if (crypto->decryptCurve25519(p->from, p->id, rawSize, ScratchEncrypted, bytes)) { + LOG_INFO("PKI Decryption worked!\n"); memset(&p->decoded, 0, sizeof(p->decoded)); - if (!pb_decode_from_bytes(bytes, rawSize, &meshtastic_Data_msg, &p->decoded)) { - LOG_ERROR("Invalid protobufs in received mesh packet (bad psk?)!\n"); - } else if (p->decoded.portnum == meshtastic_PortNum_UNKNOWN_APP) { - LOG_ERROR("Invalid portnum (bad psk?)!\n"); + rawSize -= MESHTASTIC_PKC_OVERHEAD; + if (pb_decode_from_bytes(bytes, rawSize, &meshtastic_Data_msg, &p->decoded) && + p->decoded.portnum != meshtastic_PortNum_UNKNOWN_APP) { + decrypted = true; + LOG_INFO("Packet decrypted using PKI!\n"); + p->pki_encrypted = true; + memcpy(&p->public_key.bytes, nodeDB->getMeshNode(p->from)->user.public_key.bytes, 32); + p->public_key.size = 32; + // memcpy(bytes, ScratchEncrypted, rawSize); // TODO: Rename the bytes buffers + // chIndex = 8; } else { - // parsing was successful - p->which_payload_variant = meshtastic_MeshPacket_decoded_tag; // change type to decoded - p->channel = chIndex; // change to store the index instead of the hash + LOG_ERROR("PKC Decrypted, but pb_decode failed!\n"); + return false; + } + } else { + LOG_WARN("PKC decrypt attempted but failed!\n"); + } + } +#endif - // Decompress if needed. jm - if (p->decoded.portnum == meshtastic_PortNum_TEXT_MESSAGE_COMPRESSED_APP) { - // Decompress the payload - char compressed_in[meshtastic_Constants_DATA_PAYLOAD_LEN] = {}; - char decompressed_out[meshtastic_Constants_DATA_PAYLOAD_LEN] = {}; - int decompressed_len; + // assert(p->which_payloadVariant == MeshPacket_encrypted_tag); + if (!decrypted) { + // Try to find a channel that works with this hash + for (chIndex = 0; chIndex < channels.getNumChannels(); chIndex++) { + // Try to use this hash/channel pair + if (channels.decryptForHash(chIndex, p->channel)) { + // Try to decrypt the packet if we can + crypto->decrypt(p->from, p->id, rawSize, bytes); - memcpy(compressed_in, p->decoded.payload.bytes, p->decoded.payload.size); + // printBytes("plaintext", bytes, p->encrypted.size); - decompressed_len = unishox2_decompress_simple(compressed_in, p->decoded.payload.size, decompressed_out); - - // LOG_DEBUG("\n\n**\n\nDecompressed length - %d \n", decompressed_len); - - memcpy(p->decoded.payload.bytes, decompressed_out, decompressed_len); - - // Switch the port from PortNum_TEXT_MESSAGE_COMPRESSED_APP to PortNum_TEXT_MESSAGE_APP - p->decoded.portnum = meshtastic_PortNum_TEXT_MESSAGE_APP; + // Take those raw bytes and convert them back into a well structured protobuf we can understand + memset(&p->decoded, 0, sizeof(p->decoded)); + if (!pb_decode_from_bytes(bytes, rawSize, &meshtastic_Data_msg, &p->decoded)) { + LOG_ERROR("Invalid protobufs in received mesh packet id=0x%08x (bad psk?)!\n", p->id); + } else if (p->decoded.portnum == meshtastic_PortNum_UNKNOWN_APP) { + LOG_ERROR("Invalid portnum (bad psk?)!\n"); + } else { + decrypted = true; + break; } - - printPacket("decoded message", p); - return true; } } } + if (decrypted) { + // parsing was successful + p->which_payload_variant = meshtastic_MeshPacket_decoded_tag; // change type to decoded + p->channel = chIndex; // change to store the index instead of the hash + if (p->decoded.has_bitfield) + p->decoded.want_response |= p->decoded.bitfield & BITFIELD_WANT_RESPONSE_MASK; - LOG_WARN("No suitable channel found for decoding, hash was 0x%x!\n", p->channel); - return false; + /* Not actually ever used. + // Decompress if needed. jm + if (p->decoded.portnum == meshtastic_PortNum_TEXT_MESSAGE_COMPRESSED_APP) { + // Decompress the payload + char compressed_in[meshtastic_Constants_DATA_PAYLOAD_LEN] = {}; + char decompressed_out[meshtastic_Constants_DATA_PAYLOAD_LEN] = {}; + int decompressed_len; + + memcpy(compressed_in, p->decoded.payload.bytes, p->decoded.payload.size); + + decompressed_len = unishox2_decompress_simple(compressed_in, p->decoded.payload.size, decompressed_out); + + // LOG_DEBUG("\n\n**\n\nDecompressed length - %d \n", decompressed_len); + + memcpy(p->decoded.payload.bytes, decompressed_out, decompressed_len); + + // Switch the port from PortNum_TEXT_MESSAGE_COMPRESSED_APP to PortNum_TEXT_MESSAGE_APP + p->decoded.portnum = meshtastic_PortNum_TEXT_MESSAGE_APP; + } */ + + printPacket("decoded message", p); +#if ENABLE_JSON_LOGGING + LOG_TRACE("%s\n", MeshPacketSerializer::JsonSerialize(p, false).c_str()); +#elif ARCH_PORTDUINO + if (settingsStrings[traceFilename] != "" || settingsMap[logoutputlevel] == level_trace) { + LOG_TRACE("%s\n", MeshPacketSerializer::JsonSerialize(p, false).c_str()); + } +#endif + return true; + } else { + LOG_WARN("No suitable channel found for decoding, hash was 0x%x!\n", p->channel); + return false; + } } /** Return 0 for success or a Routing_Errror code for failure @@ -361,11 +428,19 @@ meshtastic_Routing_Error perhapsEncode(meshtastic_MeshPacket *p) { concurrency::LockGuard g(cryptLock); + int16_t hash; + // If the packet is not yet encrypted, do so now if (p->which_payload_variant == meshtastic_MeshPacket_decoded_tag) { + if (isFromUs(p)) { + p->decoded.has_bitfield = true; + p->decoded.bitfield |= (config.lora.config_ok_to_mqtt << BITFIELD_OK_TO_MQTT_SHIFT); + p->decoded.bitfield |= (p->decoded.want_response << BITFIELD_WANT_RESPONSE_SHIFT); + } + size_t numbytes = pb_encode_to_bytes(bytes, sizeof(bytes), &meshtastic_Data_msg, &p->decoded); - // Only allow encryption on the text message app. + /* Not actually used, so save the cycles // TODO: Allow modules to opt into compression. if (p->decoded.portnum == meshtastic_PortNum_TEXT_MESSAGE_APP) { @@ -398,25 +473,79 @@ meshtastic_Routing_Error perhapsEncode(meshtastic_MeshPacket *p) p->decoded.portnum = meshtastic_PortNum_TEXT_MESSAGE_COMPRESSED_APP; } - } + } */ - if (numbytes > MAX_RHPACKETLEN) + if (numbytes + MESHTASTIC_HEADER_LENGTH > MAX_LORA_PAYLOAD_LEN) return meshtastic_Routing_Error_TOO_LARGE; // printBytes("plaintext", bytes, numbytes); ChannelIndex chIndex = p->channel; // keep as a local because we are about to change it - auto hash = channels.setActiveByIndex(chIndex); - if (hash < 0) - // No suitable channel could be found for sending - return meshtastic_Routing_Error_NO_CHANNEL; + +#if !(MESHTASTIC_EXCLUDE_PKI) + meshtastic_NodeInfoLite *node = nodeDB->getMeshNode(p->to); + // 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 + // is not in the local nodedb + if ( + // Don't use PKC with Ham mode + !owner.is_licensed && + // Don't use PKC if it's not explicitly requested and a non-primary channel is requested + !(p->pki_encrypted != true && p->channel > 0) && + // Check for valid keys and single node destination + config.security.private_key.size == 32 && p->to != NODENUM_BROADCAST && node != nullptr && + // Check for a known public key for the destination + (node->user.public_key.size == 32) && + // Some portnums either make no sense to send with PKC + p->decoded.portnum != meshtastic_PortNum_TRACEROUTE_APP && p->decoded.portnum != meshtastic_PortNum_NODEINFO_APP && + p->decoded.portnum != meshtastic_PortNum_ROUTING_APP && p->decoded.portnum != meshtastic_PortNum_POSITION_APP) { + LOG_DEBUG("Using PKI!\n"); + if (numbytes + MESHTASTIC_HEADER_LENGTH + MESHTASTIC_PKC_OVERHEAD > MAX_LORA_PAYLOAD_LEN) + return meshtastic_Routing_Error_TOO_LARGE; + if (p->pki_encrypted && !memfll(p->public_key.bytes, 0, 32) && + memcmp(p->public_key.bytes, node->user.public_key.bytes, 32) != 0) { + LOG_WARN("Client public key differs from requested: 0x%02x, stored key begins 0x%02x\n", *p->public_key.bytes, + *node->user.public_key.bytes); + return meshtastic_Routing_Error_PKI_FAILED; + } + crypto->encryptCurve25519(p->to, getFrom(p), p->id, numbytes, bytes, ScratchEncrypted); + numbytes += MESHTASTIC_PKC_OVERHEAD; + memcpy(p->encrypted.bytes, ScratchEncrypted, numbytes); + p->channel = 0; + p->pki_encrypted = true; + } else { + if (p->pki_encrypted == true) { + // Client specifically requested PKI encryption + return meshtastic_Routing_Error_PKI_FAILED; + } + hash = channels.setActiveByIndex(chIndex); + + // Now that we are encrypting the packet channel should be the hash (no longer the index) + p->channel = hash; + if (hash < 0) { + // No suitable channel could be found for sending + return meshtastic_Routing_Error_NO_CHANNEL; + } + crypto->encryptPacket(getFrom(p), p->id, numbytes, bytes); + memcpy(p->encrypted.bytes, bytes, numbytes); + } +#else + if (p->pki_encrypted == true) { + // Client specifically requested PKI encryption + return meshtastic_Routing_Error_PKI_FAILED; + } + hash = channels.setActiveByIndex(chIndex); // Now that we are encrypting the packet channel should be the hash (no longer the index) p->channel = hash; - crypto->encrypt(getFrom(p), p->id, numbytes, bytes); + if (hash < 0) { + // No suitable channel could be found for sending + return meshtastic_Routing_Error_NO_CHANNEL; + } + crypto->encryptPacket(getFrom(p), p->id, numbytes, bytes); + memcpy(p->encrypted.bytes, bytes, numbytes); +#endif // Copy back into the packet and set the variant type - memcpy(p->encrypted.bytes, bytes, numbytes); p->encrypted.size = numbytes; p->which_payload_variant = meshtastic_MeshPacket_encrypted_tag; } @@ -426,7 +555,7 @@ meshtastic_Routing_Error perhapsEncode(meshtastic_MeshPacket *p) NodeNum Router::getNodeNum() { - return nodeDB.getNodeNum(); + return nodeDB->getNodeNum(); } /** @@ -435,6 +564,7 @@ NodeNum Router::getNodeNum() */ void Router::handleReceived(meshtastic_MeshPacket *p, RxSource src) { + bool skipHandle = false; // Also, we should set the time from the ISR and it should have msec level resolution p->rx_time = getValidTime(RTCQualityFromNet); // store the arrival timestamp for the phone // Store a copy of encrypted packet for MQTT @@ -451,34 +581,80 @@ void Router::handleReceived(meshtastic_MeshPacket *p, RxSource src) else printPacket("handleReceived(REMOTE)", p); - // Publish received message to MQTT if we're not the original transmitter of the packet - if (moduleConfig.mqtt.enabled && getFrom(p) != nodeDB.getNodeNum() && mqtt) - mqtt->onSend(*p_encrypted, *p, p->channel); + // Neighbor info module is disabled, ignore expensive neighbor info packets + if (p->which_payload_variant == meshtastic_MeshPacket_decoded_tag && + p->decoded.portnum == meshtastic_PortNum_NEIGHBORINFO_APP && + (!moduleConfig.has_neighbor_info || !moduleConfig.neighbor_info.enabled)) { + LOG_DEBUG("Neighbor info module is disabled, ignoring neighbor packet\n"); + cancelSending(p->from, p->id); + skipHandle = true; + } + +#if USERPREFS_EVENT_MODE + if (p->which_payload_variant == meshtastic_MeshPacket_decoded_tag && + (p->decoded.portnum == meshtastic_PortNum_ATAK_FORWARDER || p->decoded.portnum == meshtastic_PortNum_ATAK_PLUGIN || + p->decoded.portnum == meshtastic_PortNum_PAXCOUNTER_APP || p->decoded.portnum == meshtastic_PortNum_IP_TUNNEL_APP || + p->decoded.portnum == meshtastic_PortNum_AUDIO_APP || p->decoded.portnum == meshtastic_PortNum_PRIVATE_APP || + p->decoded.portnum == meshtastic_PortNum_DETECTION_SENSOR_APP || + p->decoded.portnum == meshtastic_PortNum_RANGE_TEST_APP || + p->decoded.portnum == meshtastic_PortNum_REMOTE_HARDWARE_APP)) { + LOG_DEBUG("Ignoring packet on blacklisted portnum during event\n"); + cancelSending(p->from, p->id); + skipHandle = true; + } +#endif } else { printPacket("packet decoding failed or skipped (no PSK?)", p); } - packetPool.release(p_encrypted); // Release the encrypted packet - // call modules here - MeshModule::callPlugins(*p, src); + if (!skipHandle) { + MeshModule::callModules(*p, src); + +#if !MESHTASTIC_EXCLUDE_MQTT + // After potentially altering it, publish received message to MQTT if we're not the original transmitter of the packet + if (decoded && moduleConfig.mqtt.enabled && !isFromUs(p) && mqtt) + mqtt->onSend(*p_encrypted, *p, p->channel); +#endif + } + + packetPool.release(p_encrypted); // Release the encrypted packet } void Router::perhapsHandleReceived(meshtastic_MeshPacket *p) { +#if ENABLE_JSON_LOGGING + // Even ignored packets get logged in the trace + p->rx_time = getValidTime(RTCQualityFromNet); // store the arrival timestamp for the phone + LOG_TRACE("%s\n", MeshPacketSerializer::JsonSerializeEncrypted(p).c_str()); +#elif ARCH_PORTDUINO + // Even ignored packets get logged in the trace + if (settingsStrings[traceFilename] != "" || settingsMap[logoutputlevel] == level_trace) { + p->rx_time = getValidTime(RTCQualityFromNet); // store the arrival timestamp for the phone + LOG_TRACE("%s\n", MeshPacketSerializer::JsonSerializeEncrypted(p).c_str()); + } +#endif // assert(radioConfig.has_preferences); - bool ignore = is_in_repeated(config.lora.ignore_incoming, p->from) || (config.lora.ignore_mqtt && p->via_mqtt); + if (is_in_repeated(config.lora.ignore_incoming, p->from)) { + LOG_DEBUG("Ignoring incoming message, 0x%x is in our ignore list\n", p->from); + packetPool.release(p); + return; + } - if (ignore) { - LOG_DEBUG("Ignoring incoming message, 0x%x is in our ignore list or came via MQTT\n", p->from); - } else if (ignore |= shouldFilterReceived(p)) { - LOG_DEBUG("Incoming message was filtered 0x%x\n", p->from); + if (config.lora.ignore_mqtt && p->via_mqtt) { + LOG_DEBUG("Message came in via MQTT from 0x%x\n", p->from); + packetPool.release(p); + return; + } + + if (shouldFilterReceived(p)) { + LOG_DEBUG("Incoming message was filtered from 0x%x\n", p->from); + packetPool.release(p); + return; } // Note: we avoid calling shouldFilterReceived if we are supposed to ignore certain nodes - because some overrides might // cache/learn of the existence of nodes (i.e. FloodRouter) that they should not - if (!ignore) - handleReceived(p); - + handleReceived(p); packetPool.release(p); } \ No newline at end of file diff --git a/src/mesh/Router.h b/src/mesh/Router.h index db810e42e..8ebc1a3e5 100644 --- a/src/mesh/Router.h +++ b/src/mesh/Router.h @@ -82,6 +82,10 @@ class Router : protected concurrency::OSThread */ virtual ErrorCode send(meshtastic_MeshPacket *p); + /* Statistics for the amount of duplicate received packets and the amount of times we cancel a relay because someone did it + before us */ + uint32_t rxDupe = 0, txRelayCanceled = 0; + protected: friend class RoutingModule; @@ -104,7 +108,8 @@ class Router : protected concurrency::OSThread /** * Send an ack or a nak packet back towards whoever sent idFrom */ - void sendAckNak(meshtastic_Routing_Error err, NodeNum to, PacketId idFrom, ChannelIndex chIndex); + void sendAckNak(meshtastic_Routing_Error err, NodeNum to, PacketId idFrom, ChannelIndex chIndex, uint8_t hopStart = 0, + uint8_t hopLimit = 0); private: /** @@ -147,3 +152,8 @@ extern Router *router; /// Generate a unique packet id // FIXME, move this someplace better PacketId generatePacketId(); + +#define BITFIELD_WANT_RESPONSE_SHIFT 1 +#define BITFIELD_OK_TO_MQTT_SHIFT 0 +#define BITFIELD_WANT_RESPONSE_MASK (1 << BITFIELD_WANT_RESPONSE_SHIFT) +#define BITFIELD_OK_TO_MQTT_MASK (1 << BITFIELD_OK_TO_MQTT_SHIFT) \ No newline at end of file diff --git a/src/mesh/STM32WLE5JCInterface.h b/src/mesh/STM32WLE5JCInterface.h index 73d53d92f..fad793332 100644 --- a/src/mesh/STM32WLE5JCInterface.h +++ b/src/mesh/STM32WLE5JCInterface.h @@ -23,7 +23,7 @@ static const float tcxoVoltage = 1.7; * Wio-E5 module ONLY transmits through RFO_HP * Receive: PA4=1, PA5=0 * Transmit(high output power, SMPS mode): PA4=0, PA5=1 */ -static const RADIOLIB_PIN_TYPE rfswitch_pins[3] = {PA4, PA5, RADIOLIB_NC}; +static const RADIOLIB_PIN_TYPE rfswitch_pins[5] = {PA4, PA5, RADIOLIB_NC, RADIOLIB_NC, RADIOLIB_NC}; static const Module::RfSwitchMode_t rfswitch_table[4] = { {STM32WLx::MODE_IDLE, {LOW, LOW}}, {STM32WLx::MODE_RX, {HIGH, LOW}}, {STM32WLx::MODE_TX_HP, {LOW, HIGH}}, END_OF_MODE_TABLE}; diff --git a/src/mesh/SX1262Interface.cpp b/src/mesh/SX1262Interface.cpp index e96e72b71..4c0dea00b 100644 --- a/src/mesh/SX1262Interface.cpp +++ b/src/mesh/SX1262Interface.cpp @@ -1,3 +1,4 @@ +#if RADIOLIB_EXCLUDE_SX126X != 1 #include "SX1262Interface.h" #include "configuration.h" #include "error.h" @@ -6,4 +7,5 @@ SX1262Interface::SX1262Interface(LockingArduinoHal *hal, RADIOLIB_PIN_TYPE cs, R RADIOLIB_PIN_TYPE busy) : SX126xInterface(hal, cs, irq, rst, busy) { -} \ No newline at end of file +} +#endif \ No newline at end of file diff --git a/src/mesh/SX1262Interface.h b/src/mesh/SX1262Interface.h index 31a12ae90..6e4616c8b 100644 --- a/src/mesh/SX1262Interface.h +++ b/src/mesh/SX1262Interface.h @@ -1,3 +1,4 @@ +#if RADIOLIB_EXCLUDE_SX126X != 1 #pragma once #include "SX126xInterface.h" @@ -10,4 +11,5 @@ class SX1262Interface : public SX126xInterface public: SX1262Interface(LockingArduinoHal *hal, RADIOLIB_PIN_TYPE cs, RADIOLIB_PIN_TYPE irq, RADIOLIB_PIN_TYPE rst, RADIOLIB_PIN_TYPE busy); -}; \ No newline at end of file +}; +#endif \ No newline at end of file diff --git a/src/mesh/SX1268Interface.cpp b/src/mesh/SX1268Interface.cpp index ea299fce5..fe6e9af89 100644 --- a/src/mesh/SX1268Interface.cpp +++ b/src/mesh/SX1268Interface.cpp @@ -1,3 +1,4 @@ +#if RADIOLIB_EXCLUDE_SX126X != 1 #include "SX1268Interface.h" #include "configuration.h" #include "error.h" @@ -15,4 +16,5 @@ float SX1268Interface::getFreq() return 433.125f; else return savedFreq; -} \ No newline at end of file +} +#endif \ No newline at end of file diff --git a/src/mesh/SX1268Interface.h b/src/mesh/SX1268Interface.h index c8bcf20a7..cc6dd3534 100644 --- a/src/mesh/SX1268Interface.h +++ b/src/mesh/SX1268Interface.h @@ -1,4 +1,5 @@ #pragma once +#if RADIOLIB_EXCLUDE_SX126X != 1 #include "SX126xInterface.h" @@ -13,3 +14,4 @@ class SX1268Interface : public SX126xInterface SX1268Interface(LockingArduinoHal *hal, RADIOLIB_PIN_TYPE cs, RADIOLIB_PIN_TYPE irq, RADIOLIB_PIN_TYPE rst, RADIOLIB_PIN_TYPE busy); }; +#endif \ No newline at end of file diff --git a/src/mesh/SX126xInterface.cpp b/src/mesh/SX126xInterface.cpp index 7220dd3e5..924cdfa9f 100644 --- a/src/mesh/SX126xInterface.cpp +++ b/src/mesh/SX126xInterface.cpp @@ -1,3 +1,4 @@ +#if RADIOLIB_EXCLUDE_SX126X != 1 #include "SX126xInterface.h" #include "configuration.h" #include "error.h" @@ -6,6 +7,8 @@ #include "PortduinoGlue.h" #endif +#include "Throttle.h" + // Particular boards might define a different max power based on what their hardware can do, default to max power output if not // specified (may be dangerous if using external PA and SX126x power config forgotten) #ifndef SX126X_MAX_POWER @@ -17,7 +20,7 @@ SX126xInterface::SX126xInterface(LockingArduinoHal *hal, RADIOLIB_PIN_TYPE cs RADIOLIB_PIN_TYPE busy) : RadioLibInterface(hal, cs, irq, rst, busy, &lora), lora(&module) { - LOG_WARN("SX126xInterface(cs=%d, irq=%d, rst=%d, busy=%d)\n", cs, irq, rst, busy); + LOG_DEBUG("SX126xInterface(cs=%d, irq=%d, rst=%d, busy=%d)\n", cs, irq, rst, busy); } /// Initialise the Driver transport hardware and software. @@ -25,22 +28,42 @@ SX126xInterface::SX126xInterface(LockingArduinoHal *hal, RADIOLIB_PIN_TYPE cs /// \return true if initialisation succeeded. template bool SX126xInterface::init() { -#ifdef SX126X_POWER_EN - pinMode(SX126X_POWER_EN, OUTPUT); + +// Typically, the RF switch on SX126x boards is controlled by two signals, which are negations of each other (switched RFIO +// paths). The negation is usually performed in hardware, or (suboptimal design) TXEN and RXEN are the two inputs to this style of +// RF switch. On some boards, there is no hardware negation between CTRL and ¬CTRL, but CTRL is internally connected to DIO2, and +// 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 +// to set ¬CTRL as SX126X_TXEN or SX126X_RXEN, but they may already be used for another purpose, such as controlling another +// 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 +// ¬CTRL=1, this depends on the RF switch, but it seems this usually works. Better hardware design, which is done most the time, +// means this workaround is not necessary. +#ifdef SX126X_ANT_SW // Perhaps add RADIOLIB_NC check, and beforehand define as such if it is undefined, but it is not commonly + // used and not part of the 'default' set of pin definitions. + digitalWrite(SX126X_ANT_SW, HIGH); + pinMode(SX126X_ANT_SW, OUTPUT); +#endif + +#ifdef SX126X_POWER_EN // Perhaps add RADIOLIB_NC check, and beforehand define as such if it is undefined, but it is not commonly + // used and not part of the 'default' set of pin definitions. digitalWrite(SX126X_POWER_EN, HIGH); + pinMode(SX126X_POWER_EN, OUTPUT); #endif #if ARCH_PORTDUINO float tcxoVoltage = 0; if (settingsMap[dio3_tcxo_voltage]) tcxoVoltage = 1.8; + if (settingsMap[sx126x_ant_sw] != RADIOLIB_NC) { + digitalWrite(settingsMap[sx126x_ant_sw], HIGH); + pinMode(settingsMap[sx126x_ant_sw], OUTPUT); + } // FIXME: correct logic to default to not using TCXO if no voltage is specified for SX126X_DIO3_TCXO_VOLTAGE #elif !defined(SX126X_DIO3_TCXO_VOLTAGE) float tcxoVoltage = 0; // "TCXO reference voltage to be set on DIO3. Defaults to 1.6 V, set to 0 to skip." per // https://github.com/jgromes/RadioLib/blob/690a050ebb46e6097c5d00c371e961c1caa3b52e/src/modules/SX126x/SX126x.h#L471C26-L471C104 // (DIO3 is free to be used as an IRQ) -#else +#elif !defined(TCXO_OPTIONAL) float tcxoVoltage = SX126X_DIO3_TCXO_VOLTAGE; // (DIO3 is not free to be used as an IRQ) #endif @@ -81,21 +104,19 @@ template bool SX126xInterface::init() LOG_DEBUG("Current limit set to %f\n", currentLimit); LOG_DEBUG("Current limit set result %d\n", res); -#ifdef SX126X_DIO2_AS_RF_SWITCH - LOG_DEBUG("Setting DIO2 as RF switch\n"); - bool dio2AsRfSwitch = true; -#elif defined(ARCH_PORTDUINO) - bool dio2AsRfSwitch = false; - if (settingsMap[dio2_as_rf_switch]) { - LOG_DEBUG("Setting DIO2 as RF switch\n"); - dio2AsRfSwitch = true; - } -#else - LOG_DEBUG("Setting DIO2 as not RF switch\n"); - bool dio2AsRfSwitch = false; -#endif if (res == RADIOLIB_ERR_NONE) { +#ifdef SX126X_DIO2_AS_RF_SWITCH + bool dio2AsRfSwitch = true; +#elif defined(ARCH_PORTDUINO) + bool dio2AsRfSwitch = false; + if (settingsMap[dio2_as_rf_switch]) { + dio2AsRfSwitch = true; + } +#else + bool dio2AsRfSwitch = false; +#endif res = lora.setDio2AsRfSwitch(dio2AsRfSwitch); + LOG_DEBUG("Set DIO2 as %sRF switch, result: %d\n", dio2AsRfSwitch ? "" : "not ", res); } // 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 @@ -181,12 +202,18 @@ template bool SX126xInterface::reconfigure() RECORD_CRITICALERROR(meshtastic_CriticalErrorCode_INVALID_RADIO_SETTING); err = lora.setSyncWord(syncWord); + if (err != RADIOLIB_ERR_NONE) + LOG_ERROR("SX126X setSyncWord %s%d\n", radioLibErr, err); assert(err == RADIOLIB_ERR_NONE); err = lora.setCurrentLimit(currentLimit); + if (err != RADIOLIB_ERR_NONE) + LOG_ERROR("SX126X setCurrentLimit %s%d\n", radioLibErr, err); assert(err == RADIOLIB_ERR_NONE); err = lora.setPreambleLength(preambleLength); + if (err != RADIOLIB_ERR_NONE) + LOG_ERROR("SX126X setPreambleLength %s%d\n", radioLibErr, err); assert(err == RADIOLIB_ERR_NONE); err = lora.setFrequency(getFreq()); @@ -197,6 +224,8 @@ template bool SX126xInterface::reconfigure() power = SX126X_MAX_POWER; err = lora.setOutputPower(power); + if (err != RADIOLIB_ERR_NONE) + LOG_ERROR("SX126X setOutputPower %s%d\n", radioLibErr, err); assert(err == RADIOLIB_ERR_NONE); startReceive(); // restart receiving @@ -215,16 +244,15 @@ template void SX126xInterface::setStandby() int err = lora.standby(); - if (err != RADIOLIB_ERR_NONE) { - LOG_DEBUG("SX126x standby failed with error %d\n", err); - } - + if (err != RADIOLIB_ERR_NONE) + LOG_DEBUG("SX126x standby %s%d\n", radioLibErr, err); assert(err == RADIOLIB_ERR_NONE); isReceiving = false; // If we were receiving, not any more activeReceiveStart = 0; disableInterrupt(); completeSending(); // If we were sending, not anymore + RadioLibInterface::setStandby(); } /** @@ -257,12 +285,12 @@ template void SX126xInterface::startReceive() // We use a 16 bit preamble so this should save some power by letting radio sit in standby mostly. // Furthermore, we need the PREAMBLE_DETECTED and HEADER_VALID IRQ flag to detect whether we are actively receiving - int err = lora.startReceiveDutyCycleAuto(preambleLength, 8, - RADIOLIB_SX126X_IRQ_RX_DEFAULT | RADIOLIB_SX126X_IRQ_PREAMBLE_DETECTED | - RADIOLIB_SX126X_IRQ_HEADER_VALID); + int err = lora.startReceiveDutyCycleAuto(preambleLength, 8, RADIOLIB_IRQ_RX_DEFAULT_FLAGS | RADIOLIB_IRQ_PREAMBLE_DETECTED); + if (err != RADIOLIB_ERR_NONE) + LOG_ERROR("SX126X startReceiveDutyCycleAuto %s%d\n", radioLibErr, err); assert(err == RADIOLIB_ERR_NONE); - isReceiving = true; + RadioLibInterface::startReceive(); // Must be done AFTER, starting transmit, because startTransmit clears (possibly stale) interrupt pending register bits enableInterrupt(isrRxLevel0); @@ -279,7 +307,8 @@ template bool SX126xInterface::isChannelActive() result = lora.scanChannel(); if (result == RADIOLIB_LORA_DETECTED) return true; - + if (result != RADIOLIB_CHANNEL_FREE) + LOG_ERROR("SX126X scanChannel %s%d\n", radioLibErr, result); assert(result != RADIOLIB_ERR_WRONG_MODEM); return false; @@ -290,37 +319,15 @@ template bool SX126xInterface::isActivelyReceiving() { // The IRQ status will be cleared when we start our read operation. Check if we've started a header, but haven't yet // received and handled the interrupt for reading the packet/handling errors. - - uint16_t irq = lora.getIrqStatus(); - bool detected = (irq & (RADIOLIB_SX126X_IRQ_HEADER_VALID | RADIOLIB_SX126X_IRQ_PREAMBLE_DETECTED)); - // Handle false detections - if (detected) { - uint32_t now = millis(); - if (!activeReceiveStart) { - activeReceiveStart = now; - } else if ((now - activeReceiveStart > 2 * preambleTimeMsec) && !(irq & RADIOLIB_SX126X_IRQ_HEADER_VALID)) { - // The HEADER_VALID flag should be set by now if it was really a packet, so ignore PREAMBLE_DETECTED flag - activeReceiveStart = 0; - LOG_DEBUG("Ignore false preamble detection.\n"); - return false; - } else if (now - activeReceiveStart > maxPacketTimeMsec) { - // We should have gotten an RX_DONE IRQ by now if it was really a packet, so ignore HEADER_VALID flag - activeReceiveStart = 0; - LOG_DEBUG("Ignore false header detection.\n"); - return false; - } - } - - // if (detected) LOG_DEBUG("rx detected\n"); - return detected; + return receiveDetected(lora.getIrqFlags(), RADIOLIB_SX126X_IRQ_HEADER_VALID, RADIOLIB_SX126X_IRQ_PREAMBLE_DETECTED); } template bool SX126xInterface::sleep() { // Not keeping config is busted - next time nrf52 board boots lora sending fails tcxo related? - see datasheet // \todo Display actual typename of the adapter, not just `SX126x` - LOG_DEBUG("SX126x entering sleep mode (FIXME, don't keep config)\n"); - setStandby(); // Stop any pending operations + LOG_DEBUG("SX126x entering sleep mode\n"); // (FIXME, don't keep config) + setStandby(); // Stop any pending operations // turn off TCXO if it was powered // FIXME - this isn't correct @@ -335,4 +342,5 @@ template bool SX126xInterface::sleep() #endif return true; -} \ No newline at end of file +} +#endif \ No newline at end of file diff --git a/src/mesh/SX126xInterface.h b/src/mesh/SX126xInterface.h index f2c861743..45b39a68a 100644 --- a/src/mesh/SX126xInterface.h +++ b/src/mesh/SX126xInterface.h @@ -1,4 +1,5 @@ #pragma once +#if RADIOLIB_EXCLUDE_SX126X != 1 #include "RadioLibInterface.h" @@ -25,7 +26,7 @@ template class SX126xInterface : public RadioLibInterface /// Prepare hardware for sleep. Call this _only_ for deep sleep, not needed for light sleep. virtual bool sleep() override; - bool isIRQPending() override { return lora.getIrqStatus() != 0; } + bool isIRQPending() override { return lora.getIrqFlags() != 0; } protected: float currentLimit = 140; // Higher OCP limit for SX126x PA @@ -67,7 +68,5 @@ template class SX126xInterface : public RadioLibInterface virtual void addReceiveMetadata(meshtastic_MeshPacket *mp) override; virtual void setStandby() override; - - private: - uint32_t activeReceiveStart = 0; }; +#endif \ No newline at end of file diff --git a/src/mesh/SX1280Interface.cpp b/src/mesh/SX1280Interface.cpp index 3287f141f..9e0d42122 100644 --- a/src/mesh/SX1280Interface.cpp +++ b/src/mesh/SX1280Interface.cpp @@ -1,3 +1,4 @@ +#if RADIOLIB_EXCLUDE_SX128X != 1 #include "SX1280Interface.h" #include "configuration.h" #include "error.h" @@ -7,3 +8,4 @@ SX1280Interface::SX1280Interface(LockingArduinoHal *hal, RADIOLIB_PIN_TYPE cs, R : SX128xInterface(hal, cs, irq, rst, busy) { } +#endif \ No newline at end of file diff --git a/src/mesh/SX1280Interface.h b/src/mesh/SX1280Interface.h index 8f2c4ec2e..534dd8084 100644 --- a/src/mesh/SX1280Interface.h +++ b/src/mesh/SX1280Interface.h @@ -1,5 +1,5 @@ #pragma once - +#if RADIOLIB_EXCLUDE_SX128X != 1 #include "SX128xInterface.h" /** @@ -12,3 +12,4 @@ class SX1280Interface : public SX128xInterface SX1280Interface(LockingArduinoHal *hal, RADIOLIB_PIN_TYPE cs, RADIOLIB_PIN_TYPE irq, RADIOLIB_PIN_TYPE rst, RADIOLIB_PIN_TYPE busy); }; +#endif diff --git a/src/mesh/SX128xInterface.cpp b/src/mesh/SX128xInterface.cpp index d0103ec29..d379f26e6 100644 --- a/src/mesh/SX128xInterface.cpp +++ b/src/mesh/SX128xInterface.cpp @@ -1,4 +1,6 @@ +#if RADIOLIB_EXCLUDE_SX128X != 1 #include "SX128xInterface.h" +#include "Throttle.h" #include "configuration.h" #include "error.h" #include "mesh/NodeDB.h" @@ -17,7 +19,7 @@ SX128xInterface::SX128xInterface(LockingArduinoHal *hal, RADIOLIB_PIN_TYPE cs RADIOLIB_PIN_TYPE busy) : RadioLibInterface(hal, cs, irq, rst, busy, &lora), lora(&module) { - LOG_WARN("SX128xInterface(cs=%d, irq=%d, rst=%d, busy=%d)\n", cs, irq, rst, busy); + LOG_DEBUG("SX128xInterface(cs=%d, irq=%d, rst=%d, busy=%d)\n", cs, irq, rst, busy); } /// Initialise the Driver transport hardware and software. @@ -71,7 +73,7 @@ template bool SX128xInterface::init() if ((config.lora.region != meshtastic_Config_LoRaConfig_RegionCode_LORA_24) && (res == RADIOLIB_ERR_INVALID_FREQUENCY)) { LOG_WARN("Radio chip only supports 2.4GHz LoRa. Adjusting Region and rebooting.\n"); config.lora.region = meshtastic_Config_LoRaConfig_RegionCode_LORA_24; - nodeDB.saveToDisk(SEGMENT_CONFIG); + nodeDB->saveToDisk(SEGMENT_CONFIG); delay(2000); #if defined(ARCH_ESP32) ESP.restart(); @@ -126,9 +128,13 @@ template bool SX128xInterface::reconfigure() RECORD_CRITICALERROR(meshtastic_CriticalErrorCode_INVALID_RADIO_SETTING); err = lora.setSyncWord(syncWord); + if (err != RADIOLIB_ERR_NONE) + LOG_ERROR("SX128X setSyncWord %s%d\n", radioLibErr, err); assert(err == RADIOLIB_ERR_NONE); err = lora.setPreambleLength(preambleLength); + if (err != RADIOLIB_ERR_NONE) + LOG_ERROR("SX128X setPreambleLength %s%d\n", radioLibErr, err); assert(err == RADIOLIB_ERR_NONE); err = lora.setFrequency(getFreq()); @@ -139,6 +145,8 @@ template bool SX128xInterface::reconfigure() power = SX128X_MAX_POWER; err = lora.setOutputPower(power); + if (err != RADIOLIB_ERR_NONE) + LOG_ERROR("SX128X setOutputPower %s%d\n", radioLibErr, err); assert(err == RADIOLIB_ERR_NONE); startReceive(); // restart receiving @@ -162,10 +170,8 @@ template void SX128xInterface::setStandby() int err = lora.standby(); - if (err != RADIOLIB_ERR_NONE) { - LOG_ERROR("SX128x standby failed with error %d\n", err); - } - + if (err != RADIOLIB_ERR_NONE) + LOG_ERROR("SX128x standby %s%d\n", radioLibErr, err); assert(err == RADIOLIB_ERR_NONE); #if ARCH_PORTDUINO if (settingsMap[rxen] != RADIOLIB_NC) { @@ -186,6 +192,7 @@ template void SX128xInterface::setStandby() activeReceiveStart = 0; disableInterrupt(); completeSending(); // If we were sending, not anymore + RadioLibInterface::setStandby(); } /** @@ -251,13 +258,13 @@ template void SX128xInterface::startReceive() #endif // We use the PREAMBLE_DETECTED and HEADER_VALID IRQ flag to detect whether we are actively receiving - int err = lora.startReceive(RADIOLIB_SX128X_RX_TIMEOUT_INF, RADIOLIB_SX128X_IRQ_RX_DEFAULT | - RADIOLIB_SX128X_IRQ_PREAMBLE_DETECTED | - RADIOLIB_SX128X_IRQ_HEADER_VALID); + int err = lora.startReceive(RADIOLIB_SX128X_RX_TIMEOUT_INF, RADIOLIB_IRQ_RX_DEFAULT_FLAGS | RADIOLIB_IRQ_PREAMBLE_DETECTED); + if (err != RADIOLIB_ERR_NONE) + LOG_ERROR("SX128X startReceive %s%d\n", radioLibErr, err); assert(err == RADIOLIB_ERR_NONE); - isReceiving = true; + RadioLibInterface::startReceive(); // Must be done AFTER, starting transmit, because startTransmit clears (possibly stale) interrupt pending register bits enableInterrupt(isrRxLevel0); @@ -274,7 +281,8 @@ template bool SX128xInterface::isChannelActive() result = lora.scanChannel(); if (result == RADIOLIB_LORA_DETECTED) return true; - + if (result != RADIOLIB_CHANNEL_FREE) + LOG_ERROR("SX128X scanChannel %s%d\n", radioLibErr, result); assert(result != RADIOLIB_ERR_WRONG_MODEM); return false; @@ -283,36 +291,15 @@ template bool SX128xInterface::isChannelActive() /** Could we send right now (i.e. either not actively receiving or transmitting)? */ template bool SX128xInterface::isActivelyReceiving() { - uint16_t irq = lora.getIrqStatus(); - bool detected = (irq & (RADIOLIB_SX128X_IRQ_HEADER_VALID | RADIOLIB_SX128X_IRQ_PREAMBLE_DETECTED)); - - // Handle false detections - if (detected) { - uint32_t now = millis(); - if (!activeReceiveStart) { - activeReceiveStart = now; - } else if ((now - activeReceiveStart > 2 * preambleTimeMsec) && !(irq & RADIOLIB_SX128X_IRQ_HEADER_VALID)) { - // The HEADER_VALID flag should be set by now if it was really a packet, so ignore PREAMBLE_DETECTED flag - activeReceiveStart = 0; - LOG_DEBUG("Ignore false preamble detection.\n"); - return false; - } else if (now - activeReceiveStart > maxPacketTimeMsec) { - // We should have gotten an RX_DONE IRQ by now if it was really a packet, so ignore HEADER_VALID flag - activeReceiveStart = 0; - LOG_DEBUG("Ignore false header detection.\n"); - return false; - } - } - - return detected; + return receiveDetected(lora.getIrqStatus(), RADIOLIB_SX128X_IRQ_HEADER_VALID, RADIOLIB_SX128X_IRQ_PREAMBLE_DETECTED); } template bool SX128xInterface::sleep() { // Not keeping config is busted - next time nrf52 board boots lora sending fails tcxo related? - see datasheet // \todo Display actual typename of the adapter, not just `SX128x` - LOG_DEBUG("SX128x entering sleep mode (FIXME, don't keep config)\n"); - setStandby(); // Stop any pending operations + LOG_DEBUG("SX128x entering sleep mode\n"); // (FIXME, don't keep config) + setStandby(); // Stop any pending operations // turn off TCXO if it was powered // FIXME - this isn't correct @@ -328,3 +315,4 @@ template bool SX128xInterface::sleep() return true; } +#endif \ No newline at end of file diff --git a/src/mesh/SX128xInterface.h b/src/mesh/SX128xInterface.h index 3aaf31b1c..bba31dab4 100644 --- a/src/mesh/SX128xInterface.h +++ b/src/mesh/SX128xInterface.h @@ -27,7 +27,7 @@ template class SX128xInterface : public RadioLibInterface /// Prepare hardware for sleep. Call this _only_ for deep sleep, not needed for light sleep. virtual bool sleep() override; - bool isIRQPending() override { return lora.getIrqStatus() != 0; } + bool isIRQPending() override { return lora.getIrqFlags() != 0; } protected: /** @@ -67,7 +67,4 @@ template class SX128xInterface : public RadioLibInterface virtual void addReceiveMetadata(meshtastic_MeshPacket *mp) override; virtual void setStandby() override; - - private: - uint32_t activeReceiveStart = 0; }; diff --git a/src/mesh/SinglePortModule.h b/src/mesh/SinglePortModule.h index a5aaa2582..e43de09d1 100644 --- a/src/mesh/SinglePortModule.h +++ b/src/mesh/SinglePortModule.h @@ -26,7 +26,7 @@ class SinglePortModule : public MeshModule /** * Return a mesh packet which has been preinited as a data packet with a particular port number. * You can then send this packet (after customizing any of the payload fields you might need) with - * service.sendToMesh() + * service->sendToMesh() */ meshtastic_MeshPacket *allocDataPacket() { @@ -36,4 +36,4 @@ class SinglePortModule : public MeshModule return p; } -}; +}; \ No newline at end of file diff --git a/src/mesh/StreamAPI.cpp b/src/mesh/StreamAPI.cpp index 4d04dffe4..c3d85ed33 100644 --- a/src/mesh/StreamAPI.cpp +++ b/src/mesh/StreamAPI.cpp @@ -1,5 +1,7 @@ #include "StreamAPI.h" #include "PowerFSM.h" +#include "RTC.h" +#include "Throttle.h" #include "configuration.h" #define START1 0x94 @@ -19,10 +21,9 @@ int32_t StreamAPI::runOncePart() */ int32_t StreamAPI::readStream() { - uint32_t now = millis(); if (!stream->available()) { // Nothing available this time, if the computer has talked to us recently, poll often, otherwise let CPU sleep a long time - bool recentRx = (now - lastRxMsec) < 2000; + bool recentRx = Throttle::isWithinTimespanMs(lastRxMsec, 2000); return recentRx ? 5 : 250; } else { while (stream->available()) { // Currently we never want to block @@ -70,7 +71,7 @@ int32_t StreamAPI::readStream() } // we had bytes available this time, so assume we might have them next time also - lastRxMsec = now; + lastRxMsec = millis(); return 0; } } @@ -96,7 +97,6 @@ void StreamAPI::writeStream() void StreamAPI::emitTxBuffer(size_t len) { if (len != 0) { - // LOG_DEBUG("emit tx %d\n", len); txBuf[0] = START1; txBuf[1] = START2; txBuf[2] = (len >> 8) & 0xff; @@ -119,6 +119,25 @@ void StreamAPI::emitRebooted() emitTxBuffer(pb_encode_to_bytes(txBuf + HEADER_LEN, meshtastic_FromRadio_size, &meshtastic_FromRadio_msg, &fromRadioScratch)); } +void StreamAPI::emitLogRecord(meshtastic_LogRecord_Level level, const char *src, const char *format, va_list arg) +{ + // In case we send a FromRadio packet + memset(&fromRadioScratch, 0, sizeof(fromRadioScratch)); + fromRadioScratch.which_payload_variant = meshtastic_FromRadio_log_record_tag; + fromRadioScratch.log_record.level = level; + + uint32_t rtc_sec = getValidTime(RTCQuality::RTCQualityDevice, true); + fromRadioScratch.log_record.time = rtc_sec; + strncpy(fromRadioScratch.log_record.source, src, sizeof(fromRadioScratch.log_record.source) - 1); + + auto num_printed = + vsnprintf(fromRadioScratch.log_record.message, sizeof(fromRadioScratch.log_record.message) - 1, format, arg); + if (num_printed > 0 && fromRadioScratch.log_record.message[num_printed - 1] == + '\n') // Strip any ending newline, because we have records for framing instead. + fromRadioScratch.log_record.message[num_printed - 1] = '\0'; + emitTxBuffer(pb_encode_to_bytes(txBuf + HEADER_LEN, meshtastic_FromRadio_size, &meshtastic_FromRadio_msg, &fromRadioScratch)); +} + /// Hookable to find out when connection changes void StreamAPI::onConnectionChanged(bool connected) { @@ -131,4 +150,4 @@ void StreamAPI::onConnectionChanged(bool connected) // received a packet in a while powerFSM.trigger(EVENT_SERIAL_DISCONNECTED); } -} +} \ No newline at end of file diff --git a/src/mesh/StreamAPI.h b/src/mesh/StreamAPI.h index 3196e96f8..45cbb231c 100644 --- a/src/mesh/StreamAPI.h +++ b/src/mesh/StreamAPI.h @@ -82,4 +82,7 @@ class StreamAPI : public PhoneAPI /// Subclasses can use this scratch buffer if they wish uint8_t txBuf[MAX_STREAM_BUF_SIZE] = {0}; -}; + + /// Low level function to emit a protobuf encapsulated log record + void emitLogRecord(meshtastic_LogRecord_Level level, const char *src, const char *format, va_list arg); +}; \ No newline at end of file diff --git a/src/mesh/Throttle.cpp b/src/mesh/Throttle.cpp new file mode 100644 index 000000000..f278cc843 --- /dev/null +++ b/src/mesh/Throttle.cpp @@ -0,0 +1,35 @@ +#include "Throttle.h" +#include + +/// @brief Execute a function throttled to a minimum interval +/// @param lastExecutionMs Pointer to the last execution time in milliseconds +/// @param minumumIntervalMs Minimum execution interval in milliseconds +/// @param throttleFunc Function to execute if the execution is not deferred +/// @param onDefer Default to NULL, execute the function if the execution is deferred +/// @return true if the function was executed, false if it was deferred +bool Throttle::execute(uint32_t *lastExecutionMs, uint32_t minumumIntervalMs, void (*throttleFunc)(void), void (*onDefer)(void)) +{ + if (*lastExecutionMs == 0) { + *lastExecutionMs = millis(); + throttleFunc(); + return true; + } + uint32_t now = millis(); + + if ((now - *lastExecutionMs) >= minumumIntervalMs) { + throttleFunc(); + *lastExecutionMs = now; + return true; + } else if (onDefer != NULL) { + onDefer(); + } + return false; +} + +/// @brief Check if the last execution time is within the interval +/// @param lastExecutionMs The last execution time in milliseconds +/// @param timeSpanMs The interval in milliseconds of the timespan +bool Throttle::isWithinTimespanMs(uint32_t lastExecutionMs, uint32_t timeSpanMs) +{ + return (millis() - lastExecutionMs) < timeSpanMs; +} \ No newline at end of file diff --git a/src/mesh/Throttle.h b/src/mesh/Throttle.h new file mode 100644 index 000000000..8b4bb5d30 --- /dev/null +++ b/src/mesh/Throttle.h @@ -0,0 +1,10 @@ +#pragma once +#include +#include + +class Throttle +{ + public: + static bool execute(uint32_t *lastExecutionMs, uint32_t minumumIntervalMs, void (*func)(void), void (*onDefer)(void) = NULL); + static bool isWithinTimespanMs(uint32_t lastExecutionMs, uint32_t intervalMs); +}; \ No newline at end of file diff --git a/src/mesh/TypeConversions.cpp b/src/mesh/TypeConversions.cpp index 4e0fdd385..550f87021 100644 --- a/src/mesh/TypeConversions.cpp +++ b/src/mesh/TypeConversions.cpp @@ -10,18 +10,31 @@ meshtastic_NodeInfo TypeConversions::ConvertToNodeInfo(const meshtastic_NodeInfo info.snr = lite->snr; info.last_heard = lite->last_heard; info.channel = lite->channel; + info.via_mqtt = lite->via_mqtt; + info.is_favorite = lite->is_favorite; + + if (lite->has_hops_away) { + info.has_hops_away = true; + info.hops_away = lite->hops_away; + } if (lite->has_position) { info.has_position = true; + if (lite->position.latitude_i != 0) + info.position.has_latitude_i = true; info.position.latitude_i = lite->position.latitude_i; + if (lite->position.longitude_i != 0) + info.position.has_longitude_i = true; info.position.longitude_i = lite->position.longitude_i; + if (lite->position.altitude != 0) + info.position.has_altitude = true; info.position.altitude = lite->position.altitude; info.position.location_source = lite->position.location_source; info.position.time = lite->position.time; } if (lite->has_user) { info.has_user = true; - info.user = lite->user; + info.user = ConvertToUser(lite->num, lite->user); } if (lite->has_device_metrics) { info.has_device_metrics = true; @@ -45,11 +58,49 @@ meshtastic_PositionLite TypeConversions::ConvertToPositionLite(meshtastic_Positi meshtastic_Position TypeConversions::ConvertToPosition(meshtastic_PositionLite lite) { meshtastic_Position position = meshtastic_Position_init_default; + if (lite.latitude_i != 0) + position.has_latitude_i = true; position.latitude_i = lite.latitude_i; + if (lite.longitude_i != 0) + position.has_longitude_i = true; position.longitude_i = lite.longitude_i; + if (lite.altitude != 0) + position.has_altitude = true; position.altitude = lite.altitude; position.location_source = lite.location_source; position.time = lite.time; return position; +} + +meshtastic_UserLite TypeConversions::ConvertToUserLite(meshtastic_User user) +{ + meshtastic_UserLite lite = meshtastic_UserLite_init_default; + + strncpy(lite.long_name, user.long_name, sizeof(lite.long_name)); + strncpy(lite.short_name, user.short_name, sizeof(lite.short_name)); + lite.hw_model = user.hw_model; + lite.role = user.role; + lite.is_licensed = user.is_licensed; + memcpy(lite.macaddr, user.macaddr, sizeof(lite.macaddr)); + memcpy(lite.public_key.bytes, user.public_key.bytes, sizeof(lite.public_key.bytes)); + lite.public_key.size = user.public_key.size; + return lite; +} + +meshtastic_User TypeConversions::ConvertToUser(uint32_t nodeNum, meshtastic_UserLite lite) +{ + meshtastic_User user = meshtastic_User_init_default; + + snprintf(user.id, sizeof(user.id), "!%08x", nodeNum); + strncpy(user.long_name, lite.long_name, sizeof(user.long_name)); + strncpy(user.short_name, lite.short_name, sizeof(user.short_name)); + user.hw_model = lite.hw_model; + user.role = lite.role; + user.is_licensed = lite.is_licensed; + memcpy(user.macaddr, lite.macaddr, sizeof(user.macaddr)); + memcpy(user.public_key.bytes, lite.public_key.bytes, sizeof(user.public_key.bytes)); + user.public_key.size = lite.public_key.size; + + return user; } \ No newline at end of file diff --git a/src/mesh/TypeConversions.h b/src/mesh/TypeConversions.h index ffc3c12a7..19e471f98 100644 --- a/src/mesh/TypeConversions.h +++ b/src/mesh/TypeConversions.h @@ -10,4 +10,6 @@ class TypeConversions static meshtastic_NodeInfo ConvertToNodeInfo(const meshtastic_NodeInfoLite *lite); static meshtastic_PositionLite ConvertToPositionLite(meshtastic_Position position); static meshtastic_Position ConvertToPosition(meshtastic_PositionLite lite); + static meshtastic_UserLite ConvertToUserLite(meshtastic_User user); + static meshtastic_User ConvertToUser(uint32_t nodeNum, meshtastic_UserLite lite); }; diff --git a/src/mesh/TypedQueue.h b/src/mesh/TypedQueue.h index c96edae8e..f7d016f10 100644 --- a/src/mesh/TypedQueue.h +++ b/src/mesh/TypedQueue.h @@ -14,7 +14,7 @@ */ template class TypedQueue { - static_assert(std::is_pod::value, "T must be pod"); + static_assert(std::is_standard_layout::value, "T must be standard layout"); QueueHandle_t h; concurrency::OSThread *reader = NULL; diff --git a/src/mesh/aes-ccm.cpp b/src/mesh/aes-ccm.cpp new file mode 100644 index 000000000..b9af14fdb --- /dev/null +++ b/src/mesh/aes-ccm.cpp @@ -0,0 +1,157 @@ +/* + * Counter with CBC-MAC (CCM) with AES + * + * Copyright (c) 2010-2012, Jouni Malinen + * + * This software may be distributed under the terms of the BSD license. + * See README for more details. + */ +#define AES_BLOCK_SIZE 16 +#include "aes-ccm.h" +#if !MESHTASTIC_EXCLUDE_PKI + +static inline void WPA_PUT_BE16(uint8_t *a, uint16_t val) +{ + a[0] = val >> 8; + a[1] = val & 0xff; +} + +static void xor_aes_block(uint8_t *dst, const uint8_t *src) +{ + uint32_t *d = (uint32_t *)dst; + uint32_t *s = (uint32_t *)src; + *d++ ^= *s++; + *d++ ^= *s++; + *d++ ^= *s++; + *d++ ^= *s++; +} +static 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, + uint8_t *x) +{ + uint8_t aad_buf[2 * AES_BLOCK_SIZE]; + uint8_t b[AES_BLOCK_SIZE]; + /* Authentication */ + /* B_0: Flags | Nonce N | l(m) */ + b[0] = aad_len ? 0x40 : 0 /* Adata */; + b[0] |= (((M - 2) / 2) /* M' */ << 3); + b[0] |= (L - 1) /* L' */; + memcpy(&b[1], nonce, 15 - L); + WPA_PUT_BE16(&b[AES_BLOCK_SIZE - L], plain_len); + crypto->aesEncrypt(b, x); /* X_1 = E(K, B_0) */ + if (!aad_len) + return; + WPA_PUT_BE16(aad_buf, aad_len); + memcpy(aad_buf + 2, aad, aad_len); + memset(aad_buf + 2 + aad_len, 0, sizeof(aad_buf) - 2 - aad_len); + xor_aes_block(aad_buf, x); + crypto->aesEncrypt(aad_buf, x); /* X_2 = E(K, X_1 XOR B_1) */ + if (aad_len > AES_BLOCK_SIZE - 2) { + xor_aes_block(&aad_buf[AES_BLOCK_SIZE], x); + /* X_3 = E(K, X_2 XOR B_2) */ + crypto->aesEncrypt(&aad_buf[AES_BLOCK_SIZE], x); + } +} +static void aes_ccm_auth(const uint8_t *data, size_t len, uint8_t *x) +{ + size_t last = len % AES_BLOCK_SIZE; + size_t i; + for (i = 0; i < len / AES_BLOCK_SIZE; i++) { + /* X_i+1 = E(K, X_i XOR B_i) */ + xor_aes_block(x, data); + data += AES_BLOCK_SIZE; + crypto->aesEncrypt(x, x); + } + if (last) { + /* XOR zero-padded last block */ + for (i = 0; i < last; i++) + x[i] ^= *data++; + crypto->aesEncrypt(x, x); + } +} +static void aes_ccm_encr_start(size_t L, const uint8_t *nonce, uint8_t *a) +{ + /* A_i = Flags | Nonce N | Counter i */ + a[0] = L - 1; /* Flags = L' */ + memcpy(&a[1], nonce, 15 - L); +} +static void aes_ccm_encr(size_t L, const uint8_t *in, size_t len, uint8_t *out, uint8_t *a) +{ + size_t last = len % AES_BLOCK_SIZE; + size_t i; + /* crypt = msg XOR (S_1 | S_2 | ... | S_n) */ + for (i = 1; i <= len / AES_BLOCK_SIZE; i++) { + WPA_PUT_BE16(&a[AES_BLOCK_SIZE - 2], i); + /* S_i = E(K, A_i) */ + crypto->aesEncrypt(a, out); + xor_aes_block(out, in); + out += AES_BLOCK_SIZE; + in += AES_BLOCK_SIZE; + } + if (last) { + WPA_PUT_BE16(&a[AES_BLOCK_SIZE - 2], i); + crypto->aesEncrypt(a, out); + /* XOR zero-padded last block */ + for (i = 0; i < last; i++) + *out++ ^= *in++; + } +} +static void aes_ccm_encr_auth(size_t M, const uint8_t *x, uint8_t *a, uint8_t *auth) +{ + size_t i; + uint8_t tmp[AES_BLOCK_SIZE]; + /* U = T XOR S_0; S_0 = E(K, A_0) */ + WPA_PUT_BE16(&a[AES_BLOCK_SIZE - 2], 0); + crypto->aesEncrypt(a, tmp); + for (i = 0; i < M; i++) + auth[i] = x[i] ^ tmp[i]; +} +static void aes_ccm_decr_auth(size_t M, uint8_t *a, const uint8_t *auth, uint8_t *t) +{ + size_t i; + uint8_t tmp[AES_BLOCK_SIZE]; + /* U = T XOR S_0; S_0 = E(K, A_0) */ + WPA_PUT_BE16(&a[AES_BLOCK_SIZE - 2], 0); + crypto->aesEncrypt(a, tmp); + for (i = 0; i < M; i++) + t[i] = auth[i] ^ tmp[i]; +} +/* AES-CCM with fixed L=2 and aad_len <= 30 assumption */ +int 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, + const uint8_t *aad, size_t aad_len, uint8_t *crypt, uint8_t *auth) +{ + const size_t L = 2; + uint8_t x[AES_BLOCK_SIZE], a[AES_BLOCK_SIZE]; + if (aad_len > 30 || M > AES_BLOCK_SIZE) + return -1; + crypto->aesSetKey(key, key_len); + aes_ccm_auth_start(M, L, nonce, aad, aad_len, plain_len, x); + aes_ccm_auth(plain, plain_len, x); + /* Encryption */ + aes_ccm_encr_start(L, nonce, a); + aes_ccm_encr(L, plain, plain_len, crypt, a); + aes_ccm_encr_auth(M, x, a, auth); + return 0; +} +/* AES-CCM with fixed L=2 and aad_len <= 30 assumption */ +bool 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, + const uint8_t *aad, size_t aad_len, const uint8_t *auth, uint8_t *plain) +{ + const size_t L = 2; + uint8_t x[AES_BLOCK_SIZE], a[AES_BLOCK_SIZE]; + uint8_t t[AES_BLOCK_SIZE]; + if (aad_len > 30 || M > AES_BLOCK_SIZE) + return false; + crypto->aesSetKey(key, key_len); + /* Decryption */ + aes_ccm_encr_start(L, nonce, a); + aes_ccm_decr_auth(M, a, auth, t); + /* plaintext = msg XOR (S_1 | S_2 | ... | S_n) */ + aes_ccm_encr(L, crypt, crypt_len, plain, a); + aes_ccm_auth_start(M, L, nonce, aad, aad_len, crypt_len, x); + aes_ccm_auth(plain, crypt_len, x); + if (memcmp(x, t, M) != 0) { // FIXME make const comp + return false; + } + return true; +} +#endif \ No newline at end of file diff --git a/src/mesh/aes-ccm.h b/src/mesh/aes-ccm.h new file mode 100644 index 000000000..6b8edcde4 --- /dev/null +++ b/src/mesh/aes-ccm.h @@ -0,0 +1,10 @@ +#pragma once +#include "CryptoEngine.h" +#if !MESHTASTIC_EXCLUDE_PKI + +int 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, + const uint8_t *aad, size_t aad_len, uint8_t *crypt, uint8_t *auth); + +bool 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, + const uint8_t *aad, size_t aad_len, const uint8_t *auth, uint8_t *plain); +#endif \ No newline at end of file diff --git a/src/mesh/api/ServerAPI.cpp b/src/mesh/api/ServerAPI.cpp index 140567ad2..42217428d 100644 --- a/src/mesh/api/ServerAPI.cpp +++ b/src/mesh/api/ServerAPI.cpp @@ -5,7 +5,7 @@ template ServerAPI::ServerAPI(T &_client) : StreamAPI(&client), concurrency::OSThread("ServerAPI"), client(_client) { - LOG_INFO("Incoming wifi connection\n"); + LOG_INFO("Incoming API connection\n"); } template ServerAPI::~ServerAPI() @@ -45,10 +45,28 @@ template void APIServerPort::init() template int32_t APIServerPort::runOnce() { +#ifdef ARCH_ESP32 +#if ESP_ARDUINO_VERSION >= ESP_ARDUINO_VERSION_VAL(3, 0, 0) + auto client = U::accept(); +#else auto client = U::available(); +#endif +#else + auto client = U::available(); +#endif if (client) { // Close any previous connection (see FIXME in header file) if (openAPI) { +#if RAK_4631 + // RAK13800 Ethernet requests periodically take more time + // This backoff addresses most cases keeping max wait < 1s + // Reconnections are delayed by full wait time + if (waitTime < 400) { + waitTime *= 2; + LOG_INFO("Previous TCP connection still open, trying again in %dms\n", waitTime); + return waitTime; + } +#endif LOG_INFO("Force closing previous TCP connection\n"); delete openAPI; } @@ -56,5 +74,8 @@ template int32_t APIServerPort::runOnce() openAPI = new T(client); } +#if RAK_4631 + waitTime = 100; +#endif return 100; // only check occasionally for incoming connections } diff --git a/src/mesh/api/ServerAPI.h b/src/mesh/api/ServerAPI.h index dd2a767c9..5b84fddd7 100644 --- a/src/mesh/api/ServerAPI.h +++ b/src/mesh/api/ServerAPI.h @@ -31,7 +31,7 @@ template class ServerAPI : public StreamAPI, private concurrency::OSTh }; /** - * Listens for incoming connections and does accepts and creates instances of WiFiServerAPI as needed + * Listens for incoming connections and does accepts and creates instances of ServerAPI as needed */ template class APIServerPort : public U, private concurrency::OSThread { @@ -41,6 +41,10 @@ template class APIServerPort : public U, private concurrency: * delegate to the worker. Once coroutines are implemented we can relax this restriction. */ T *openAPI = NULL; +#if RAK_4631 + // Track wait time for RAK13800 Ethernet requests + int32_t waitTime = 100; +#endif public: explicit APIServerPort(int port); diff --git a/src/mesh/api/ethServerAPI.h b/src/mesh/api/ethServerAPI.h index 59673a684..6f214c75a 100644 --- a/src/mesh/api/ethServerAPI.h +++ b/src/mesh/api/ethServerAPI.h @@ -14,7 +14,7 @@ class ethServerAPI : public ServerAPI }; /** - * Listens for incoming connections and does accepts and creates instances of WiFiServerAPI as needed + * Listens for incoming connections and does accepts and creates instances of EthernetServerAPI as needed */ class ethServerPort : public APIServerPort { diff --git a/src/mesh/compression/unishox2.c b/src/mesh/compression/unishox2.cpp similarity index 98% rename from src/mesh/compression/unishox2.c rename to src/mesh/compression/unishox2.cpp index 99c62f659..9fc012a76 100644 --- a/src/mesh/compression/unishox2.c +++ b/src/mesh/compression/unishox2.cpp @@ -15,6 +15,7 @@ * * @author Arundale Ramanathan * + * Port for Particle (particle.io) / Aruino - Jonathan Greenblatt */ /** * @file unishox2.c @@ -36,6 +37,14 @@ /// uint8_t is unsigned char typedef unsigned char uint8_t; +const char *USX_FREQ_SEQ_DFLT[] = {"\": \"", "\": ", ""}; +const char *USX_FREQ_SEQ_XML[] = {"", "= strlen(cur_line->data)) + if ((size_t)dist >= strlen(cur_line->data)) return -1; memmove(out + ol, cur_line->data + dist, min_of(left, dict_len)); if (left < dict_len) @@ -1280,7 +1289,7 @@ int unishox2_decompress_lines(const char *in, int len, UNISHOX_API_OUT_AND_LEN(c if (usx_templates[idx] == NULL) break; size_t tlen = strlen(usx_templates[idx]); - if (rem > tlen) + if ((size_t)rem > tlen) break; rem = tlen - rem; int eof = 0; @@ -1420,4 +1429,4 @@ int unishox2_decompress(const char *in, int len, UNISHOX_API_OUT_AND_LEN(char *o int unishox2_decompress_simple(const char *in, int len, char *out) { return unishox2_decompress(in, len, UNISHOX_API_OUT_AND_LEN(out, INT_MAX - 1), USX_PSET_DFLT); -} +} \ No newline at end of file diff --git a/src/mesh/compression/unishox2.h b/src/mesh/compression/unishox2.h index a5117a5de..5e2cc8b4c 100644 --- a/src/mesh/compression/unishox2.h +++ b/src/mesh/compression/unishox2.h @@ -15,12 +15,7 @@ * * @author Arundale Ramanathan * - */ - -/** - * @file unishox2.h - * @author Arundale Ramanathan, James Z. M. Gao - * @brief API for Unishox2 Compression and Decompression + * Port for Particle (particle.io) / Aruino - Jonathan Greenblatt * * This file describes each function of the Unishox2 API \n * For finding out how this API can be used in your program, \n @@ -45,7 +40,7 @@ * The simple api, i.e. unishox2_(de)compress_simple will always omit the buffer length */ #ifndef UNISHOX_API_WITH_OUTPUT_LEN -#define UNISHOX_API_WITH_OUTPUT_LEN 0 +#define UNISHOX_API_WITH_OUTPUT_LEN 1 #endif /// Upto 8 bits of initial magic bit sequence can be included. Bit count can be specified with UNISHOX_MAGIC_BIT_LEN @@ -156,8 +151,8 @@ 3, 1, 3, 3, 3 \ } -//#define USX_HCODES_FAVOR_UMLAUT {0x00, 0x40, 0xE0, 0xC0, 0x80} -//#define USX_HCODE_LENS_FAVOR_UMLAUT {2, 2, 3, 3, 2} +// #define USX_HCODES_FAVOR_UMLAUT {0x00, 0x40, 0xE0, 0xC0, 0x80} +// #define USX_HCODE_LENS_FAVOR_UMLAUT {2, 2, 3, 3, 2} /// Horizontal codes preset favouring umlaut letters #define USX_HCODES_FAVOR_UMLAUT \ @@ -198,50 +193,13 @@ 2, 2, 2, 2, 0 \ } -/// Default frequently occurring sequences. When composition of text is know beforehand, the other sequences in this section can -/// be used to achieve more compression. -#define USX_FREQ_SEQ_DFLT \ - (const char *[]) \ - { \ - "\": \"", "\": ", "" \ - } -/// Frequently occurring sequences in XML content -#define USX_FREQ_SEQ_XML \ - (const char *[]) \ - { \ - "", " #include +#if HAS_NETWORKING + #ifndef DISABLE_NTP #include @@ -33,7 +38,7 @@ static int32_t reconnectETH() Ethernet.maintain(); if (!ethStartupComplete) { // Start web server - LOG_INFO("... Starting network services\n"); + LOG_INFO("Starting Ethernet network services\n"); #ifndef DISABLE_NTP LOG_INFO("Starting NTP time client\n"); @@ -66,11 +71,12 @@ static int32_t reconnectETH() ethStartupComplete = true; } - +#if !MESHTASTIC_EXCLUDE_MQTT // FIXME this is kinda yucky, instead we should just have an observable for 'wifireconnected' if (mqtt && !moduleConfig.mqtt.proxy_to_client_enabled && !mqtt->isConnectedDirectly()) { mqtt->reconnect(); } +#endif } #ifndef DISABLE_NTP @@ -125,7 +131,8 @@ bool initEthernet() status = Ethernet.begin(mac); } else if (config.network.address_mode == meshtastic_Config_NetworkConfig_AddressMode_STATIC) { LOG_INFO("starting Ethernet Static\n"); - Ethernet.begin(mac, config.network.ipv4_config.ip, config.network.ipv4_config.dns, config.network.ipv4_config.subnet); + Ethernet.begin(mac, config.network.ipv4_config.ip, config.network.ipv4_config.dns, config.network.ipv4_config.gateway, + config.network.ipv4_config.subnet); status = 1; } else { LOG_INFO("Ethernet Disabled\n"); @@ -179,3 +186,5 @@ bool isEthernetAvailable() return true; } } + +#endif diff --git a/src/mesh/generated/meshtastic/admin.pb.c b/src/mesh/generated/meshtastic/admin.pb.cpp similarity index 92% rename from src/mesh/generated/meshtastic/admin.pb.c rename to src/mesh/generated/meshtastic/admin.pb.cpp index 92835c89c..8b3fd3d1b 100644 --- a/src/mesh/generated/meshtastic/admin.pb.c +++ b/src/mesh/generated/meshtastic/admin.pb.cpp @@ -1,5 +1,5 @@ /* Automatically generated nanopb constant definitions */ -/* Generated by nanopb-0.4.7 */ +/* Generated by nanopb-0.4.9 */ #include "meshtastic/admin.pb.h" #if PB_PROTO_HEADER_VERSION != 40 @@ -18,3 +18,5 @@ PB_BIND(meshtastic_NodeRemoteHardwarePinsResponse, meshtastic_NodeRemoteHardware + + diff --git a/src/mesh/generated/meshtastic/admin.pb.h b/src/mesh/generated/meshtastic/admin.pb.h index 28bda429d..bf81269b4 100644 --- a/src/mesh/generated/meshtastic/admin.pb.h +++ b/src/mesh/generated/meshtastic/admin.pb.h @@ -1,5 +1,5 @@ /* Automatically generated nanopb header */ -/* Generated by nanopb-0.4.7 */ +/* Generated by nanopb-0.4.9 */ #ifndef PB_MESHTASTIC_MESHTASTIC_ADMIN_PB_H_INCLUDED #define PB_MESHTASTIC_MESHTASTIC_ADMIN_PB_H_INCLUDED @@ -7,7 +7,6 @@ #include "meshtastic/channel.pb.h" #include "meshtastic/config.pb.h" #include "meshtastic/connection_status.pb.h" -#include "meshtastic/deviceonly.pb.h" #include "meshtastic/mesh.pb.h" #include "meshtastic/module_config.pb.h" @@ -31,7 +30,11 @@ typedef enum _meshtastic_AdminMessage_ConfigType { /* TODO: REPLACE */ meshtastic_AdminMessage_ConfigType_LORA_CONFIG = 5, /* TODO: REPLACE */ - meshtastic_AdminMessage_ConfigType_BLUETOOTH_CONFIG = 6 + meshtastic_AdminMessage_ConfigType_BLUETOOTH_CONFIG = 6, + /* TODO: REPLACE */ + meshtastic_AdminMessage_ConfigType_SECURITY_CONFIG = 7, + /* */ + meshtastic_AdminMessage_ConfigType_SESSIONKEY_CONFIG = 8 } meshtastic_AdminMessage_ConfigType; /* TODO: REPLACE */ @@ -76,7 +79,7 @@ typedef struct _meshtastic_HamParameters { Ensure your radio is capable of operating of the selected frequency before setting this. */ float frequency; /* Optional short name of user */ - char short_name[6]; + char short_name[5]; } meshtastic_HamParameters; /* Response envelope for node_remote_hardware_pins */ @@ -86,6 +89,7 @@ typedef struct _meshtastic_NodeRemoteHardwarePinsResponse { meshtastic_NodeRemoteHardwarePin node_remote_hardware_pins[16]; } meshtastic_NodeRemoteHardwarePinsResponse; +typedef PB_BYTES_ARRAY_T(8) meshtastic_AdminMessage_session_passkey_t; /* This message is handled by the Admin module and is responsible for all settings/channel read/write operations. This message is used to do settings operations to both remote AND local nodes. (Prior to 1.2 these operations were done via special ToRadio operations) */ @@ -136,6 +140,8 @@ typedef struct _meshtastic_AdminMessage { bool enter_dfu_mode_request; /* Delete the file by the specified path from the device */ char delete_file_request[201]; + /* Set zero and offset for scale chips */ + uint32_t set_scale; /* Set the owner for this node */ meshtastic_User set_owner; /* Set channels (using the new API). @@ -154,11 +160,24 @@ typedef struct _meshtastic_AdminMessage { char set_ringtone_message[231]; /* Remove the node by the specified node-num from the NodeDB on the device */ uint32_t remove_by_nodenum; + /* Set specified node-num to be favorited on the NodeDB on the device */ + uint32_t set_favorite_node; + /* Set specified node-num to be un-favorited on the NodeDB on the device */ + uint32_t remove_favorite_node; + /* Set fixed position data on the node and then set the position.fixed_position = true */ + meshtastic_Position set_fixed_position; + /* Clear fixed position coordinates and then set position.fixed_position = false */ + bool remove_fixed_position; + /* Set time only on the node + Convenience method to set the time on the node (as Net quality) without any other position data */ + uint32_t set_time_only; /* Begins an edit transaction for config, module config, owner, and channel settings changes This will delay the standard *implicit* save to the file system and subsequent reboot behavior until committed (commit_edit_settings) */ bool begin_edit_settings; /* Commits an open transaction for any edits made to config, module config, owner, and channel settings */ bool commit_edit_settings; + /* 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. */ + int32_t factory_reset_device; /* Tell the node to reboot into the OTA Firmware in this many seconds (or <0 to cancel reboot) Only Implemented for ESP32 Devices. This needs to be issued to send a new main firmware via bluetooth. */ int32_t reboot_ota_seconds; @@ -169,11 +188,15 @@ typedef struct _meshtastic_AdminMessage { int32_t reboot_seconds; /* Tell the node to shutdown in this many seconds (or <0 to cancel shutdown) */ int32_t shutdown_seconds; - /* Tell the node to factory reset, all device settings will be returned to factory defaults. */ - int32_t factory_reset; + /* Tell the node to factory reset config; all device state and configuration will be returned to factory defaults; BLE bonds will be preserved. */ + int32_t factory_reset_config; /* Tell the node to reset the nodedb. */ int32_t nodedb_reset; }; + /* The node generates this key and sends it with any get_x_response packets. + The client MUST include the same key with any set_x commands. Key expires after 300 seconds. + Prevents replay attacks for admin messages. */ + meshtastic_AdminMessage_session_passkey_t session_passkey; } meshtastic_AdminMessage; @@ -183,8 +206,8 @@ extern "C" { /* Helper constants for enums */ #define _meshtastic_AdminMessage_ConfigType_MIN meshtastic_AdminMessage_ConfigType_DEVICE_CONFIG -#define _meshtastic_AdminMessage_ConfigType_MAX meshtastic_AdminMessage_ConfigType_BLUETOOTH_CONFIG -#define _meshtastic_AdminMessage_ConfigType_ARRAYSIZE ((meshtastic_AdminMessage_ConfigType)(meshtastic_AdminMessage_ConfigType_BLUETOOTH_CONFIG+1)) +#define _meshtastic_AdminMessage_ConfigType_MAX meshtastic_AdminMessage_ConfigType_SESSIONKEY_CONFIG +#define _meshtastic_AdminMessage_ConfigType_ARRAYSIZE ((meshtastic_AdminMessage_ConfigType)(meshtastic_AdminMessage_ConfigType_SESSIONKEY_CONFIG+1)) #define _meshtastic_AdminMessage_ModuleConfigType_MIN meshtastic_AdminMessage_ModuleConfigType_MQTT_CONFIG #define _meshtastic_AdminMessage_ModuleConfigType_MAX meshtastic_AdminMessage_ModuleConfigType_PAXCOUNTER_CONFIG @@ -197,10 +220,10 @@ extern "C" { /* Initializer values for message structs */ -#define meshtastic_AdminMessage_init_default {0, {0}} +#define meshtastic_AdminMessage_init_default {0, {0}, {0, {0}}} #define meshtastic_HamParameters_init_default {"", 0, 0, ""} #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}} -#define meshtastic_AdminMessage_init_zero {0, {0}} +#define meshtastic_AdminMessage_init_zero {0, {0}, {0, {0}}} #define meshtastic_HamParameters_init_zero {"", 0, 0, ""} #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}} @@ -231,6 +254,7 @@ extern "C" { #define meshtastic_AdminMessage_get_node_remote_hardware_pins_response_tag 20 #define meshtastic_AdminMessage_enter_dfu_mode_request_tag 21 #define meshtastic_AdminMessage_delete_file_request_tag 22 +#define meshtastic_AdminMessage_set_scale_tag 23 #define meshtastic_AdminMessage_set_owner_tag 32 #define meshtastic_AdminMessage_set_channel_tag 33 #define meshtastic_AdminMessage_set_config_tag 34 @@ -238,14 +262,21 @@ extern "C" { #define meshtastic_AdminMessage_set_canned_message_module_messages_tag 36 #define meshtastic_AdminMessage_set_ringtone_message_tag 37 #define meshtastic_AdminMessage_remove_by_nodenum_tag 38 +#define meshtastic_AdminMessage_set_favorite_node_tag 39 +#define meshtastic_AdminMessage_remove_favorite_node_tag 40 +#define meshtastic_AdminMessage_set_fixed_position_tag 41 +#define meshtastic_AdminMessage_remove_fixed_position_tag 42 +#define meshtastic_AdminMessage_set_time_only_tag 43 #define meshtastic_AdminMessage_begin_edit_settings_tag 64 #define meshtastic_AdminMessage_commit_edit_settings_tag 65 +#define meshtastic_AdminMessage_factory_reset_device_tag 94 #define meshtastic_AdminMessage_reboot_ota_seconds_tag 95 #define meshtastic_AdminMessage_exit_simulator_tag 96 #define meshtastic_AdminMessage_reboot_seconds_tag 97 #define meshtastic_AdminMessage_shutdown_seconds_tag 98 -#define meshtastic_AdminMessage_factory_reset_tag 99 +#define meshtastic_AdminMessage_factory_reset_config_tag 99 #define meshtastic_AdminMessage_nodedb_reset_tag 100 +#define meshtastic_AdminMessage_session_passkey_tag 101 /* Struct field encoding specification for nanopb */ #define meshtastic_AdminMessage_FIELDLIST(X, a) \ @@ -270,6 +301,7 @@ X(a, STATIC, ONEOF, BOOL, (payload_variant,get_node_remote_hardware_pin X(a, STATIC, ONEOF, MESSAGE, (payload_variant,get_node_remote_hardware_pins_response,get_node_remote_hardware_pins_response), 20) \ X(a, STATIC, ONEOF, BOOL, (payload_variant,enter_dfu_mode_request,enter_dfu_mode_request), 21) \ X(a, STATIC, ONEOF, STRING, (payload_variant,delete_file_request,delete_file_request), 22) \ +X(a, STATIC, ONEOF, UINT32, (payload_variant,set_scale,set_scale), 23) \ X(a, STATIC, ONEOF, MESSAGE, (payload_variant,set_owner,set_owner), 32) \ X(a, STATIC, ONEOF, MESSAGE, (payload_variant,set_channel,set_channel), 33) \ X(a, STATIC, ONEOF, MESSAGE, (payload_variant,set_config,set_config), 34) \ @@ -277,14 +309,21 @@ X(a, STATIC, ONEOF, MESSAGE, (payload_variant,set_module_config,set_module X(a, STATIC, ONEOF, STRING, (payload_variant,set_canned_message_module_messages,set_canned_message_module_messages), 36) \ X(a, STATIC, ONEOF, STRING, (payload_variant,set_ringtone_message,set_ringtone_message), 37) \ X(a, STATIC, ONEOF, UINT32, (payload_variant,remove_by_nodenum,remove_by_nodenum), 38) \ +X(a, STATIC, ONEOF, UINT32, (payload_variant,set_favorite_node,set_favorite_node), 39) \ +X(a, STATIC, ONEOF, UINT32, (payload_variant,remove_favorite_node,remove_favorite_node), 40) \ +X(a, STATIC, ONEOF, MESSAGE, (payload_variant,set_fixed_position,set_fixed_position), 41) \ +X(a, STATIC, ONEOF, BOOL, (payload_variant,remove_fixed_position,remove_fixed_position), 42) \ +X(a, STATIC, ONEOF, FIXED32, (payload_variant,set_time_only,set_time_only), 43) \ X(a, STATIC, ONEOF, BOOL, (payload_variant,begin_edit_settings,begin_edit_settings), 64) \ X(a, STATIC, ONEOF, BOOL, (payload_variant,commit_edit_settings,commit_edit_settings), 65) \ +X(a, STATIC, ONEOF, INT32, (payload_variant,factory_reset_device,factory_reset_device), 94) \ X(a, STATIC, ONEOF, INT32, (payload_variant,reboot_ota_seconds,reboot_ota_seconds), 95) \ X(a, STATIC, ONEOF, BOOL, (payload_variant,exit_simulator,exit_simulator), 96) \ X(a, STATIC, ONEOF, INT32, (payload_variant,reboot_seconds,reboot_seconds), 97) \ X(a, STATIC, ONEOF, INT32, (payload_variant,shutdown_seconds,shutdown_seconds), 98) \ -X(a, STATIC, ONEOF, INT32, (payload_variant,factory_reset,factory_reset), 99) \ -X(a, STATIC, ONEOF, INT32, (payload_variant,nodedb_reset,nodedb_reset), 100) +X(a, STATIC, ONEOF, INT32, (payload_variant,factory_reset_config,factory_reset_config), 99) \ +X(a, STATIC, ONEOF, INT32, (payload_variant,nodedb_reset,nodedb_reset), 100) \ +X(a, STATIC, SINGULAR, BYTES, session_passkey, 101) #define meshtastic_AdminMessage_CALLBACK NULL #define meshtastic_AdminMessage_DEFAULT NULL #define meshtastic_AdminMessage_payload_variant_get_channel_response_MSGTYPE meshtastic_Channel @@ -299,6 +338,7 @@ X(a, STATIC, ONEOF, INT32, (payload_variant,nodedb_reset,nodedb_reset), #define meshtastic_AdminMessage_payload_variant_set_channel_MSGTYPE meshtastic_Channel #define meshtastic_AdminMessage_payload_variant_set_config_MSGTYPE meshtastic_Config #define meshtastic_AdminMessage_payload_variant_set_module_config_MSGTYPE meshtastic_ModuleConfig +#define meshtastic_AdminMessage_payload_variant_set_fixed_position_MSGTYPE meshtastic_Position #define meshtastic_HamParameters_FIELDLIST(X, a) \ X(a, STATIC, SINGULAR, STRING, call_sign, 1) \ @@ -324,8 +364,9 @@ extern const pb_msgdesc_t meshtastic_NodeRemoteHardwarePinsResponse_msg; #define meshtastic_NodeRemoteHardwarePinsResponse_fields &meshtastic_NodeRemoteHardwarePinsResponse_msg /* Maximum encoded size of messages (where known) */ -#define meshtastic_AdminMessage_size 500 -#define meshtastic_HamParameters_size 32 +#define MESHTASTIC_MESHTASTIC_ADMIN_PB_H_MAX_SIZE meshtastic_AdminMessage_size +#define meshtastic_AdminMessage_size 511 +#define meshtastic_HamParameters_size 31 #define meshtastic_NodeRemoteHardwarePinsResponse_size 496 #ifdef __cplusplus diff --git a/src/mesh/generated/meshtastic/apponly.pb.c b/src/mesh/generated/meshtastic/apponly.pb.cpp similarity index 89% rename from src/mesh/generated/meshtastic/apponly.pb.c rename to src/mesh/generated/meshtastic/apponly.pb.cpp index 8c3801ed7..64d43b7ee 100644 --- a/src/mesh/generated/meshtastic/apponly.pb.c +++ b/src/mesh/generated/meshtastic/apponly.pb.cpp @@ -1,5 +1,5 @@ /* Automatically generated nanopb constant definitions */ -/* Generated by nanopb-0.4.7 */ +/* Generated by nanopb-0.4.9 */ #include "meshtastic/apponly.pb.h" #if PB_PROTO_HEADER_VERSION != 40 diff --git a/src/mesh/generated/meshtastic/apponly.pb.h b/src/mesh/generated/meshtastic/apponly.pb.h index 253fdd8ef..dc08d9ff3 100644 --- a/src/mesh/generated/meshtastic/apponly.pb.h +++ b/src/mesh/generated/meshtastic/apponly.pb.h @@ -1,5 +1,5 @@ /* Automatically generated nanopb header */ -/* Generated by nanopb-0.4.7 */ +/* Generated by nanopb-0.4.9 */ #ifndef PB_MESHTASTIC_MESHTASTIC_APPONLY_PB_H_INCLUDED #define PB_MESHTASTIC_MESHTASTIC_APPONLY_PB_H_INCLUDED @@ -54,7 +54,8 @@ extern const pb_msgdesc_t meshtastic_ChannelSet_msg; #define meshtastic_ChannelSet_fields &meshtastic_ChannelSet_msg /* Maximum encoded size of messages (where known) */ -#define meshtastic_ChannelSet_size 658 +#define MESHTASTIC_MESHTASTIC_APPONLY_PB_H_MAX_SIZE meshtastic_ChannelSet_size +#define meshtastic_ChannelSet_size 679 #ifdef __cplusplus } /* extern "C" */ diff --git a/src/mesh/generated/meshtastic/atak.pb.c b/src/mesh/generated/meshtastic/atak.pb.cpp similarity index 93% rename from src/mesh/generated/meshtastic/atak.pb.c rename to src/mesh/generated/meshtastic/atak.pb.cpp index 1413b748e..6dbc69fb4 100644 --- a/src/mesh/generated/meshtastic/atak.pb.c +++ b/src/mesh/generated/meshtastic/atak.pb.cpp @@ -1,5 +1,5 @@ /* Automatically generated nanopb constant definitions */ -/* Generated by nanopb-0.4.7 */ +/* Generated by nanopb-0.4.9 */ #include "meshtastic/atak.pb.h" #if PB_PROTO_HEADER_VERSION != 40 @@ -27,3 +27,5 @@ PB_BIND(meshtastic_PLI, meshtastic_PLI, AUTO) + + diff --git a/src/mesh/generated/meshtastic/atak.pb.h b/src/mesh/generated/meshtastic/atak.pb.h index 17d3cd3b9..15a86788b 100644 --- a/src/mesh/generated/meshtastic/atak.pb.h +++ b/src/mesh/generated/meshtastic/atak.pb.h @@ -1,5 +1,5 @@ /* Automatically generated nanopb header */ -/* Generated by nanopb-0.4.7 */ +/* Generated by nanopb-0.4.9 */ #ifndef PB_MESHTASTIC_MESHTASTIC_ATAK_PB_H_INCLUDED #define PB_MESHTASTIC_MESHTASTIC_ATAK_PB_H_INCLUDED @@ -73,6 +73,9 @@ typedef struct _meshtastic_GeoChat { /* Uid recipient of the message */ bool has_to; char to[120]; + /* Callsign of the recipient for the message */ + bool has_to_callsign; + char to_callsign[120]; } meshtastic_GeoChat; /* ATAK Group @@ -117,6 +120,7 @@ typedef struct _meshtastic_PLI { uint16_t course; } meshtastic_PLI; +typedef PB_BYTES_ARRAY_T(220) meshtastic_TAKPacket_detail_t; /* Packets for the official ATAK Plugin */ typedef struct _meshtastic_TAKPacket { /* Are the payloads strings compressed for LoRA transport? */ @@ -136,6 +140,9 @@ typedef struct _meshtastic_TAKPacket { meshtastic_PLI pli; /* ATAK GeoChat message */ meshtastic_GeoChat chat; + /* Generic CoT detail XML + May be compressed / truncated by the sender (EUD) */ + meshtastic_TAKPacket_detail_t detail; } payload_variant; } meshtastic_TAKPacket; @@ -164,13 +171,13 @@ extern "C" { /* Initializer values for message structs */ #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}} -#define meshtastic_GeoChat_init_default {"", false, ""} +#define meshtastic_GeoChat_init_default {"", false, "", false, ""} #define meshtastic_Group_init_default {_meshtastic_MemberRole_MIN, _meshtastic_Team_MIN} #define meshtastic_Status_init_default {0} #define meshtastic_Contact_init_default {"", ""} #define meshtastic_PLI_init_default {0, 0, 0, 0, 0} #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}} -#define meshtastic_GeoChat_init_zero {"", false, ""} +#define meshtastic_GeoChat_init_zero {"", false, "", false, ""} #define meshtastic_Group_init_zero {_meshtastic_MemberRole_MIN, _meshtastic_Team_MIN} #define meshtastic_Status_init_zero {0} #define meshtastic_Contact_init_zero {"", ""} @@ -179,6 +186,7 @@ extern "C" { /* Field tags (for use in manual encoding/decoding) */ #define meshtastic_GeoChat_message_tag 1 #define meshtastic_GeoChat_to_tag 2 +#define meshtastic_GeoChat_to_callsign_tag 3 #define meshtastic_Group_role_tag 1 #define meshtastic_Group_team_tag 2 #define meshtastic_Status_battery_tag 1 @@ -195,6 +203,7 @@ extern "C" { #define meshtastic_TAKPacket_status_tag 4 #define meshtastic_TAKPacket_pli_tag 5 #define meshtastic_TAKPacket_chat_tag 6 +#define meshtastic_TAKPacket_detail_tag 7 /* Struct field encoding specification for nanopb */ #define meshtastic_TAKPacket_FIELDLIST(X, a) \ @@ -203,7 +212,8 @@ X(a, STATIC, OPTIONAL, MESSAGE, contact, 2) \ X(a, STATIC, OPTIONAL, MESSAGE, group, 3) \ X(a, STATIC, OPTIONAL, MESSAGE, status, 4) \ X(a, STATIC, ONEOF, MESSAGE, (payload_variant,pli,payload_variant.pli), 5) \ -X(a, STATIC, ONEOF, MESSAGE, (payload_variant,chat,payload_variant.chat), 6) +X(a, STATIC, ONEOF, MESSAGE, (payload_variant,chat,payload_variant.chat), 6) \ +X(a, STATIC, ONEOF, BYTES, (payload_variant,detail,payload_variant.detail), 7) #define meshtastic_TAKPacket_CALLBACK NULL #define meshtastic_TAKPacket_DEFAULT NULL #define meshtastic_TAKPacket_contact_MSGTYPE meshtastic_Contact @@ -214,7 +224,8 @@ X(a, STATIC, ONEOF, MESSAGE, (payload_variant,chat,payload_variant.chat), #define meshtastic_GeoChat_FIELDLIST(X, a) \ X(a, STATIC, SINGULAR, STRING, message, 1) \ -X(a, STATIC, OPTIONAL, STRING, to, 2) +X(a, STATIC, OPTIONAL, STRING, to, 2) \ +X(a, STATIC, OPTIONAL, STRING, to_callsign, 3) #define meshtastic_GeoChat_CALLBACK NULL #define meshtastic_GeoChat_DEFAULT NULL @@ -260,12 +271,13 @@ extern const pb_msgdesc_t meshtastic_PLI_msg; #define meshtastic_PLI_fields &meshtastic_PLI_msg /* Maximum encoded size of messages (where known) */ +#define MESHTASTIC_MESHTASTIC_ATAK_PB_H_MAX_SIZE meshtastic_TAKPacket_size #define meshtastic_Contact_size 242 -#define meshtastic_GeoChat_size 323 +#define meshtastic_GeoChat_size 444 #define meshtastic_Group_size 4 #define meshtastic_PLI_size 31 #define meshtastic_Status_size 3 -#define meshtastic_TAKPacket_size 584 +#define meshtastic_TAKPacket_size 705 #ifdef __cplusplus } /* extern "C" */ diff --git a/src/mesh/generated/meshtastic/cannedmessages.pb.c b/src/mesh/generated/meshtastic/cannedmessages.pb.cpp similarity index 90% rename from src/mesh/generated/meshtastic/cannedmessages.pb.c rename to src/mesh/generated/meshtastic/cannedmessages.pb.cpp index fffa3fdf9..9f51e9634 100644 --- a/src/mesh/generated/meshtastic/cannedmessages.pb.c +++ b/src/mesh/generated/meshtastic/cannedmessages.pb.cpp @@ -1,5 +1,5 @@ /* Automatically generated nanopb constant definitions */ -/* Generated by nanopb-0.4.7 */ +/* Generated by nanopb-0.4.9 */ #include "meshtastic/cannedmessages.pb.h" #if PB_PROTO_HEADER_VERSION != 40 diff --git a/src/mesh/generated/meshtastic/cannedmessages.pb.h b/src/mesh/generated/meshtastic/cannedmessages.pb.h index b81f65d0d..06d14b98f 100644 --- a/src/mesh/generated/meshtastic/cannedmessages.pb.h +++ b/src/mesh/generated/meshtastic/cannedmessages.pb.h @@ -1,5 +1,5 @@ /* Automatically generated nanopb header */ -/* Generated by nanopb-0.4.7 */ +/* Generated by nanopb-0.4.9 */ #ifndef PB_MESHTASTIC_MESHTASTIC_CANNEDMESSAGES_PB_H_INCLUDED #define PB_MESHTASTIC_MESHTASTIC_CANNEDMESSAGES_PB_H_INCLUDED @@ -40,6 +40,7 @@ extern const pb_msgdesc_t meshtastic_CannedMessageModuleConfig_msg; #define meshtastic_CannedMessageModuleConfig_fields &meshtastic_CannedMessageModuleConfig_msg /* Maximum encoded size of messages (where known) */ +#define MESHTASTIC_MESHTASTIC_CANNEDMESSAGES_PB_H_MAX_SIZE meshtastic_CannedMessageModuleConfig_size #define meshtastic_CannedMessageModuleConfig_size 203 #ifdef __cplusplus diff --git a/src/mesh/generated/meshtastic/channel.pb.c b/src/mesh/generated/meshtastic/channel.pb.cpp similarity index 92% rename from src/mesh/generated/meshtastic/channel.pb.c rename to src/mesh/generated/meshtastic/channel.pb.cpp index f604f64e9..52f923b13 100644 --- a/src/mesh/generated/meshtastic/channel.pb.c +++ b/src/mesh/generated/meshtastic/channel.pb.cpp @@ -1,5 +1,5 @@ /* Automatically generated nanopb constant definitions */ -/* Generated by nanopb-0.4.7 */ +/* Generated by nanopb-0.4.9 */ #include "meshtastic/channel.pb.h" #if PB_PROTO_HEADER_VERSION != 40 @@ -17,3 +17,4 @@ PB_BIND(meshtastic_Channel, meshtastic_Channel, AUTO) + diff --git a/src/mesh/generated/meshtastic/channel.pb.h b/src/mesh/generated/meshtastic/channel.pb.h index 1587483c0..3d617ae39 100644 --- a/src/mesh/generated/meshtastic/channel.pb.h +++ b/src/mesh/generated/meshtastic/channel.pb.h @@ -1,5 +1,5 @@ /* Automatically generated nanopb header */ -/* Generated by nanopb-0.4.7 */ +/* Generated by nanopb-0.4.9 */ #ifndef PB_MESHTASTIC_MESHTASTIC_CHANNEL_PB_H_INCLUDED #define PB_MESHTASTIC_MESHTASTIC_CHANNEL_PB_H_INCLUDED @@ -34,6 +34,9 @@ typedef enum _meshtastic_Channel_Role { typedef struct _meshtastic_ModuleSettings { /* Bits of precision for the location sent in position packets. */ uint32_t position_precision; + /* Controls whether or not the phone / clients should mute the current channel + Useful for noisy public channels you don't necessarily want to disable */ + bool is_client_muted; } meshtastic_ModuleSettings; typedef PB_BYTES_ARRAY_T(32) meshtastic_ChannelSettings_psk_t; @@ -126,14 +129,15 @@ extern "C" { /* Initializer values for message structs */ #define meshtastic_ChannelSettings_init_default {0, {0, {0}}, "", 0, 0, 0, false, meshtastic_ModuleSettings_init_default} -#define meshtastic_ModuleSettings_init_default {0} +#define meshtastic_ModuleSettings_init_default {0, 0} #define meshtastic_Channel_init_default {0, false, meshtastic_ChannelSettings_init_default, _meshtastic_Channel_Role_MIN} #define meshtastic_ChannelSettings_init_zero {0, {0, {0}}, "", 0, 0, 0, false, meshtastic_ModuleSettings_init_zero} -#define meshtastic_ModuleSettings_init_zero {0} +#define meshtastic_ModuleSettings_init_zero {0, 0} #define meshtastic_Channel_init_zero {0, false, meshtastic_ChannelSettings_init_zero, _meshtastic_Channel_Role_MIN} /* Field tags (for use in manual encoding/decoding) */ #define meshtastic_ModuleSettings_position_precision_tag 1 +#define meshtastic_ModuleSettings_is_client_muted_tag 2 #define meshtastic_ChannelSettings_channel_num_tag 1 #define meshtastic_ChannelSettings_psk_tag 2 #define meshtastic_ChannelSettings_name_tag 3 @@ -159,7 +163,8 @@ X(a, STATIC, OPTIONAL, MESSAGE, module_settings, 7) #define meshtastic_ChannelSettings_module_settings_MSGTYPE meshtastic_ModuleSettings #define meshtastic_ModuleSettings_FIELDLIST(X, a) \ -X(a, STATIC, SINGULAR, UINT32, position_precision, 1) +X(a, STATIC, SINGULAR, UINT32, position_precision, 1) \ +X(a, STATIC, SINGULAR, BOOL, is_client_muted, 2) #define meshtastic_ModuleSettings_CALLBACK NULL #define meshtastic_ModuleSettings_DEFAULT NULL @@ -181,9 +186,10 @@ extern const pb_msgdesc_t meshtastic_Channel_msg; #define meshtastic_Channel_fields &meshtastic_Channel_msg /* Maximum encoded size of messages (where known) */ -#define meshtastic_ChannelSettings_size 70 -#define meshtastic_Channel_size 85 -#define meshtastic_ModuleSettings_size 6 +#define MESHTASTIC_MESHTASTIC_CHANNEL_PB_H_MAX_SIZE meshtastic_Channel_size +#define meshtastic_ChannelSettings_size 72 +#define meshtastic_Channel_size 87 +#define meshtastic_ModuleSettings_size 8 #ifdef __cplusplus } /* extern "C" */ diff --git a/src/mesh/generated/meshtastic/clientonly.pb.c b/src/mesh/generated/meshtastic/clientonly.pb.cpp similarity index 89% rename from src/mesh/generated/meshtastic/clientonly.pb.c rename to src/mesh/generated/meshtastic/clientonly.pb.cpp index ebc2ffabc..d99af8cf5 100644 --- a/src/mesh/generated/meshtastic/clientonly.pb.c +++ b/src/mesh/generated/meshtastic/clientonly.pb.cpp @@ -1,5 +1,5 @@ /* Automatically generated nanopb constant definitions */ -/* Generated by nanopb-0.4.7 */ +/* Generated by nanopb-0.4.9 */ #include "meshtastic/clientonly.pb.h" #if PB_PROTO_HEADER_VERSION != 40 diff --git a/src/mesh/generated/meshtastic/clientonly.pb.h b/src/mesh/generated/meshtastic/clientonly.pb.h index 0f70e09c6..bf32d7875 100644 --- a/src/mesh/generated/meshtastic/clientonly.pb.h +++ b/src/mesh/generated/meshtastic/clientonly.pb.h @@ -1,10 +1,11 @@ /* Automatically generated nanopb header */ -/* Generated by nanopb-0.4.7 */ +/* Generated by nanopb-0.4.9 */ #ifndef PB_MESHTASTIC_MESHTASTIC_CLIENTONLY_PB_H_INCLUDED #define PB_MESHTASTIC_MESHTASTIC_CLIENTONLY_PB_H_INCLUDED #include #include "meshtastic/localonly.pb.h" +#include "meshtastic/mesh.pb.h" #if PB_PROTO_HEADER_VERSION != 40 #error Regenerate this file with the current version of nanopb generator. @@ -28,6 +29,15 @@ typedef struct _meshtastic_DeviceProfile { /* The ModuleConfig of the node */ bool has_module_config; meshtastic_LocalModuleConfig module_config; + /* Fixed position data */ + bool has_fixed_position; + meshtastic_Position fixed_position; + /* Ringtone for ExternalNotification */ + bool has_ringtone; + char ringtone[231]; + /* Predefined messages for CannedMessage */ + bool has_canned_messages; + char canned_messages[201]; } meshtastic_DeviceProfile; @@ -36,8 +46,8 @@ extern "C" { #endif /* Initializer values for message structs */ -#define meshtastic_DeviceProfile_init_default {false, "", false, "", {{NULL}, NULL}, false, meshtastic_LocalConfig_init_default, false, meshtastic_LocalModuleConfig_init_default} -#define meshtastic_DeviceProfile_init_zero {false, "", false, "", {{NULL}, NULL}, false, meshtastic_LocalConfig_init_zero, false, meshtastic_LocalModuleConfig_init_zero} +#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, ""} +#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, ""} /* Field tags (for use in manual encoding/decoding) */ #define meshtastic_DeviceProfile_long_name_tag 1 @@ -45,6 +55,9 @@ extern "C" { #define meshtastic_DeviceProfile_channel_url_tag 3 #define meshtastic_DeviceProfile_config_tag 4 #define meshtastic_DeviceProfile_module_config_tag 5 +#define meshtastic_DeviceProfile_fixed_position_tag 6 +#define meshtastic_DeviceProfile_ringtone_tag 7 +#define meshtastic_DeviceProfile_canned_messages_tag 8 /* Struct field encoding specification for nanopb */ #define meshtastic_DeviceProfile_FIELDLIST(X, a) \ @@ -52,11 +65,15 @@ X(a, STATIC, OPTIONAL, STRING, long_name, 1) \ X(a, STATIC, OPTIONAL, STRING, short_name, 2) \ X(a, CALLBACK, OPTIONAL, STRING, channel_url, 3) \ X(a, STATIC, OPTIONAL, MESSAGE, config, 4) \ -X(a, STATIC, OPTIONAL, MESSAGE, module_config, 5) +X(a, STATIC, OPTIONAL, MESSAGE, module_config, 5) \ +X(a, STATIC, OPTIONAL, MESSAGE, fixed_position, 6) \ +X(a, STATIC, OPTIONAL, STRING, ringtone, 7) \ +X(a, STATIC, OPTIONAL, STRING, canned_messages, 8) #define meshtastic_DeviceProfile_CALLBACK pb_default_field_callback #define meshtastic_DeviceProfile_DEFAULT NULL #define meshtastic_DeviceProfile_config_MSGTYPE meshtastic_LocalConfig #define meshtastic_DeviceProfile_module_config_MSGTYPE meshtastic_LocalModuleConfig +#define meshtastic_DeviceProfile_fixed_position_MSGTYPE meshtastic_Position extern const pb_msgdesc_t meshtastic_DeviceProfile_msg; diff --git a/src/mesh/generated/meshtastic/config.pb.c b/src/mesh/generated/meshtastic/config.pb.cpp similarity index 81% rename from src/mesh/generated/meshtastic/config.pb.c rename to src/mesh/generated/meshtastic/config.pb.cpp index 0fa8ba588..23f4d542b 100644 --- a/src/mesh/generated/meshtastic/config.pb.c +++ b/src/mesh/generated/meshtastic/config.pb.cpp @@ -1,5 +1,5 @@ /* Automatically generated nanopb constant definitions */ -/* Generated by nanopb-0.4.7 */ +/* Generated by nanopb-0.4.9 */ #include "meshtastic/config.pb.h" #if PB_PROTO_HEADER_VERSION != 40 @@ -33,6 +33,26 @@ PB_BIND(meshtastic_Config_LoRaConfig, meshtastic_Config_LoRaConfig, 2) PB_BIND(meshtastic_Config_BluetoothConfig, meshtastic_Config_BluetoothConfig, AUTO) +PB_BIND(meshtastic_Config_SecurityConfig, meshtastic_Config_SecurityConfig, AUTO) + + +PB_BIND(meshtastic_Config_SessionkeyConfig, meshtastic_Config_SessionkeyConfig, AUTO) + + + + + + + + + + + + + + + + diff --git a/src/mesh/generated/meshtastic/config.pb.h b/src/mesh/generated/meshtastic/config.pb.h index c56cf65a0..988f852ff 100644 --- a/src/mesh/generated/meshtastic/config.pb.h +++ b/src/mesh/generated/meshtastic/config.pb.h @@ -1,5 +1,5 @@ /* Automatically generated nanopb header */ -/* Generated by nanopb-0.4.7 */ +/* Generated by nanopb-0.4.9 */ #ifndef PB_MESHTASTIC_MESHTASTIC_CONFIG_PB_H_INCLUDED #define PB_MESHTASTIC_MESHTASTIC_CONFIG_PB_H_INCLUDED @@ -22,7 +22,6 @@ typedef enum _meshtastic_Config_DeviceConfig_Role { The wifi radio and the oled screen will be put to sleep. This mode may still potentially have higher power usage due to it's preference in message rebroadcasting on the mesh. */ meshtastic_Config_DeviceConfig_Role_ROUTER = 2, - /* Description: Combination of both ROUTER and CLIENT. Not for mobile devices. */ meshtastic_Config_DeviceConfig_Role_ROUTER_CLIENT = 3, /* Description: Infrastructure node for extending network coverage by relaying messages with minimal overhead. Not visible in Nodes list. Technical Details: Mesh packets will simply be rebroadcasted over this node. Nodes configured with this role will not originate NodeInfo, Position, Telemetry @@ -30,12 +29,12 @@ typedef enum _meshtastic_Config_DeviceConfig_Role { meshtastic_Config_DeviceConfig_Role_REPEATER = 4, /* Description: Broadcasts GPS position packets as priority. Technical Details: Position Mesh packets will be prioritized higher and sent more frequently by default. - When used in conjunction with power.is_power_saving = true, nodes will wake up, + When used in conjunction with power.is_power_saving = true, nodes will wake up, send position, and then sleep for position.position_broadcast_secs seconds. */ meshtastic_Config_DeviceConfig_Role_TRACKER = 5, /* Description: Broadcasts telemetry packets as priority. Technical Details: Telemetry Mesh packets will be prioritized higher and sent more frequently by default. - When used in conjunction with power.is_power_saving = true, nodes will wake up, + When used in conjunction with power.is_power_saving = true, nodes will wake up, send environment telemetry, and then sleep for telemetry.environment_update_interval seconds. */ meshtastic_Config_DeviceConfig_Role_SENSOR = 6, /* Description: Optimized for ATAK system communication and reduces routine broadcasts. @@ -50,7 +49,7 @@ typedef enum _meshtastic_Config_DeviceConfig_Role { Can be used for clandestine operation or to dramatically reduce airtime / power consumption */ meshtastic_Config_DeviceConfig_Role_CLIENT_HIDDEN = 8, /* Description: Broadcasts location as message to default channel regularly for to assist with device recovery. - Technical Details: Used to automatically send a text message to the mesh + Technical Details: Used to automatically send a text message to the mesh with the current position of the device on a frequent interval: "I'm lost! Position: lat / long" */ meshtastic_Config_DeviceConfig_Role_LOST_AND_FOUND = 9, @@ -182,6 +181,25 @@ typedef enum _meshtastic_Config_DisplayConfig_DisplayMode { meshtastic_Config_DisplayConfig_DisplayMode_COLOR = 3 } meshtastic_Config_DisplayConfig_DisplayMode; +typedef enum _meshtastic_Config_DisplayConfig_CompassOrientation { + /* The compass and the display are in the same orientation. */ + meshtastic_Config_DisplayConfig_CompassOrientation_DEGREES_0 = 0, + /* Rotate the compass by 90 degrees. */ + meshtastic_Config_DisplayConfig_CompassOrientation_DEGREES_90 = 1, + /* Rotate the compass by 180 degrees. */ + meshtastic_Config_DisplayConfig_CompassOrientation_DEGREES_180 = 2, + /* Rotate the compass by 270 degrees. */ + meshtastic_Config_DisplayConfig_CompassOrientation_DEGREES_270 = 3, + /* Don't rotate the compass, but invert the result. */ + meshtastic_Config_DisplayConfig_CompassOrientation_DEGREES_0_INVERTED = 4, + /* Rotate the compass by 90 degrees and invert. */ + meshtastic_Config_DisplayConfig_CompassOrientation_DEGREES_90_INVERTED = 5, + /* Rotate the compass by 180 degrees and invert. */ + meshtastic_Config_DisplayConfig_CompassOrientation_DEGREES_180_INVERTED = 6, + /* Rotate the compass by 270 degrees and invert. */ + meshtastic_Config_DisplayConfig_CompassOrientation_DEGREES_270_INVERTED = 7 +} meshtastic_Config_DisplayConfig_CompassOrientation; + typedef enum _meshtastic_Config_LoRaConfig_RegionCode { /* Region is not set */ meshtastic_Config_LoRaConfig_RegionCode_UNSET = 0, @@ -220,7 +238,13 @@ typedef enum _meshtastic_Config_LoRaConfig_RegionCode { /* Malaysia 919mhz */ meshtastic_Config_LoRaConfig_RegionCode_MY_919 = 17, /* Singapore 923mhz */ - meshtastic_Config_LoRaConfig_RegionCode_SG_923 = 18 + meshtastic_Config_LoRaConfig_RegionCode_SG_923 = 18, + /* Philippines 433mhz */ + meshtastic_Config_LoRaConfig_RegionCode_PH_433 = 19, + /* Philippines 868mhz */ + meshtastic_Config_LoRaConfig_RegionCode_PH_868 = 20, + /* Philippines 915mhz */ + meshtastic_Config_LoRaConfig_RegionCode_PH_915 = 21 } meshtastic_Config_LoRaConfig_RegionCode; /* Standard predefined channel settings @@ -230,7 +254,8 @@ typedef enum _meshtastic_Config_LoRaConfig_ModemPreset { meshtastic_Config_LoRaConfig_ModemPreset_LONG_FAST = 0, /* Long Range - Slow */ meshtastic_Config_LoRaConfig_ModemPreset_LONG_SLOW = 1, - /* Very Long Range - Slow */ + /* Very Long Range - Slow + Deprecated in 2.5: Works only with txco and is unusably slow */ meshtastic_Config_LoRaConfig_ModemPreset_VERY_LONG_SLOW = 2, /* Medium Range - Slow */ meshtastic_Config_LoRaConfig_ModemPreset_MEDIUM_SLOW = 3, @@ -241,7 +266,11 @@ typedef enum _meshtastic_Config_LoRaConfig_ModemPreset { /* Short Range - Fast */ meshtastic_Config_LoRaConfig_ModemPreset_SHORT_FAST = 6, /* Long Range - Moderately Fast */ - meshtastic_Config_LoRaConfig_ModemPreset_LONG_MODERATE = 7 + meshtastic_Config_LoRaConfig_ModemPreset_LONG_MODERATE = 7, + /* Short Range - Turbo + This is the fastest preset and the only one with 500kHz bandwidth. + It is not legal to use in all regions due to this wider bandwidth. */ + meshtastic_Config_LoRaConfig_ModemPreset_SHORT_TURBO = 8 } meshtastic_Config_LoRaConfig_ModemPreset; typedef enum _meshtastic_Config_BluetoothConfig_PairingMode { @@ -258,11 +287,9 @@ typedef enum _meshtastic_Config_BluetoothConfig_PairingMode { typedef struct _meshtastic_Config_DeviceConfig { /* Sets the role of node */ meshtastic_Config_DeviceConfig_Role role; - /* Disabling this will disable the SerialConsole by not initilizing the StreamAPI */ + /* Disabling this will disable the SerialConsole by not initilizing the StreamAPI + Moved to SecurityConfig */ bool serial_enabled; - /* By default we turn off logging as soon as an API client connects (to keep shared serial link quiet). - Set this to true to leave the debug log outputting even when API is active. */ - bool debug_log_enabled; /* For boards without a hard wired button, this is the pin number that will be used Boards that have more than one button can swap the function with this one. defaults to BUTTON_PIN if defined. */ uint32_t button_gpio; @@ -277,10 +304,15 @@ typedef struct _meshtastic_Config_DeviceConfig { /* Treat double tap interrupt on supported accelerometers as a button press if set to true */ bool double_tap_as_button_press; /* If true, device is considered to be "managed" by a mesh administrator - Clients should then limit available configuration and administrative options inside the user interface */ + Clients should then limit available configuration and administrative options inside the user interface + Moved to SecurityConfig */ bool is_managed; /* Disables the triple-press of user button to enable or disable GPS */ bool disable_triple_click; + /* POSIX Timezone definition string from https://github.com/nayarsystems/posix_tz_db/blob/master/zones.csv. */ + char tzdef[65]; + /* If true, disable the default blinking LED (LED_PIN) behavior on the device */ + bool led_heartbeat_disabled; } meshtastic_Config_DeviceConfig; /* Position Config */ @@ -322,38 +354,36 @@ typedef struct _meshtastic_Config_PositionConfig { /* Power Config\ See [Power Config](/docs/settings/config/power) for additional power config details. */ typedef struct _meshtastic_Config_PowerConfig { - /* If set, we are powered from a low-current source (i.e. solar), so even if it looks like we have power flowing in - we should try to minimize power consumption as much as possible. - YOU DO NOT NEED TO SET THIS IF YOU'VE set is_router (it is implied in that case). - Advanced Option */ + /* Description: Will sleep everything as much as possible, for the tracker and sensor role this will also include the lora radio. + 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. + Technical Details: Works for ESP32 devices and NRF52 devices in the Sensor or Tracker roles */ bool is_power_saving; - /* If non-zero, the device will fully power off this many seconds after external power is removed. */ + /* Description: If non-zero, the device will fully power off this many seconds after external power is removed. */ uint32_t on_battery_shutdown_after_secs; /* Ratio of voltage divider for battery pin eg. 3.20 (R1=100k, R2=220k) Overrides the ADC_MULTIPLIER defined in variant for battery voltage calculation. - Should be set to floating point value between 2 and 4 - Fixes issues on Heltec v2 */ + https://meshtastic.org/docs/configuration/radio/power/#adc-multiplier-override + Should be set to floating point value between 2 and 6 */ float adc_multiplier_override; - /* Wait Bluetooth Seconds - The number of seconds for to wait before turning off BLE in No Bluetooth states - 0 for default of 1 minute */ + /* Description: The number of seconds for to wait before turning off BLE in No Bluetooth states + Technical Details: ESP32 Only 0 for default of 1 minute */ uint32_t wait_bluetooth_secs; /* Super Deep Sleep Seconds While in Light Sleep if mesh_sds_timeout_secs is exceeded we will lower into super deep sleep for this value (default 1 year) or a button press 0 for default of one year */ uint32_t sds_secs; - /* Light Sleep Seconds - In light sleep the CPU is suspended, LoRa radio is on, BLE is off an GPS is on - ESP32 Only - 0 for default of 300 */ + /* Description: In light sleep the CPU is suspended, LoRa radio is on, BLE is off an GPS is on + Technical Details: ESP32 Only 0 for default of 300 */ uint32_t ls_secs; - /* Minimum Wake Seconds - 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 - 0 for default of 10 seconds */ + /* 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 + Technical Details: ESP32 Only 0 for default of 10 seconds */ uint32_t min_wake_secs; /* I2C address of INA_2XX to use for reading device battery voltage */ uint8_t device_battery_ina_address; + /* If non-zero, we want powermon log outputs. With the particular (bitfield) sources enabled. + Note: we picked an ID of 32 so that lower more efficient IDs can be used for more frequently used options. */ + uint64_t powermon_enables; } meshtastic_Config_PowerConfig; typedef struct _meshtastic_Config_NetworkConfig_IpV4Config { @@ -414,6 +444,8 @@ typedef struct _meshtastic_Config_DisplayConfig { bool heading_bold; /* Should we wake the screen up on accelerometer detected motion or tap */ bool wake_on_tap_or_motion; + /* Indicates how to rotate or invert the compass output to accurate display on the display. */ + meshtastic_Config_DisplayConfig_CompassOrientation compass_orientation; } meshtastic_Config_DisplayConfig; /* Lora Config */ @@ -475,6 +507,8 @@ typedef struct _meshtastic_Config_LoRaConfig { Please respect your local laws and regulations. If you are a HAM, make sure you enable HAM mode and turn off encryption. */ float override_frequency; + /* If true, disable the build-in PA FAN using pin define in RF95_FAN_EN. */ + bool pa_fan_disabled; /* For testing it is useful sometimes to force a node to never listen to particular other nodes (simulating radio out of range). All nodenums listed in ignore_incoming will have packets they send dropped on receive (by router.cpp) */ @@ -482,6 +516,8 @@ typedef struct _meshtastic_Config_LoRaConfig { uint32_t ignore_incoming[3]; /* If true, the device will not process any packets received via LoRa that passed via MQTT anywhere on the path towards it. */ bool ignore_mqtt; + /* Sets the ok_to_mqtt bit on outgoing packets */ + bool config_ok_to_mqtt; } meshtastic_Config_LoRaConfig; typedef struct _meshtastic_Config_BluetoothConfig { @@ -493,6 +529,36 @@ typedef struct _meshtastic_Config_BluetoothConfig { uint32_t fixed_pin; } meshtastic_Config_BluetoothConfig; +typedef PB_BYTES_ARRAY_T(32) meshtastic_Config_SecurityConfig_public_key_t; +typedef PB_BYTES_ARRAY_T(32) meshtastic_Config_SecurityConfig_private_key_t; +typedef PB_BYTES_ARRAY_T(32) meshtastic_Config_SecurityConfig_admin_key_t; +typedef struct _meshtastic_Config_SecurityConfig { + /* The public key of the user's device. + Sent out to other nodes on the mesh to allow them to compute a shared secret key. */ + meshtastic_Config_SecurityConfig_public_key_t public_key; + /* The private key of the device. + Used to create a shared key with a remote device. */ + meshtastic_Config_SecurityConfig_private_key_t private_key; + /* The public key authorized to send admin messages to this node. */ + pb_size_t admin_key_count; + meshtastic_Config_SecurityConfig_admin_key_t admin_key[3]; + /* If true, device is considered to be "managed" by a mesh administrator via admin messages + Device is managed by a mesh administrator. */ + bool is_managed; + /* Serial Console over the Stream API." */ + bool serial_enabled; + /* By default we turn off logging as soon as an API client connects (to keep shared serial link quiet). + Output live debug logging over serial or bluetooth is set to true. */ + bool debug_log_api_enabled; + /* Allow incoming device control over the insecure legacy admin channel. */ + bool admin_channel_enabled; +} meshtastic_Config_SecurityConfig; + +/* Blank config request, strictly for getting the session key */ +typedef struct _meshtastic_Config_SessionkeyConfig { + char dummy_field; +} meshtastic_Config_SessionkeyConfig; + typedef struct _meshtastic_Config { pb_size_t which_payload_variant; union { @@ -503,6 +569,8 @@ typedef struct _meshtastic_Config { meshtastic_Config_DisplayConfig display; meshtastic_Config_LoRaConfig lora; meshtastic_Config_BluetoothConfig bluetooth; + meshtastic_Config_SecurityConfig security; + meshtastic_Config_SessionkeyConfig sessionkey; } payload_variant; } meshtastic_Config; @@ -548,13 +616,17 @@ extern "C" { #define _meshtastic_Config_DisplayConfig_DisplayMode_MAX meshtastic_Config_DisplayConfig_DisplayMode_COLOR #define _meshtastic_Config_DisplayConfig_DisplayMode_ARRAYSIZE ((meshtastic_Config_DisplayConfig_DisplayMode)(meshtastic_Config_DisplayConfig_DisplayMode_COLOR+1)) +#define _meshtastic_Config_DisplayConfig_CompassOrientation_MIN meshtastic_Config_DisplayConfig_CompassOrientation_DEGREES_0 +#define _meshtastic_Config_DisplayConfig_CompassOrientation_MAX meshtastic_Config_DisplayConfig_CompassOrientation_DEGREES_270_INVERTED +#define _meshtastic_Config_DisplayConfig_CompassOrientation_ARRAYSIZE ((meshtastic_Config_DisplayConfig_CompassOrientation)(meshtastic_Config_DisplayConfig_CompassOrientation_DEGREES_270_INVERTED+1)) + #define _meshtastic_Config_LoRaConfig_RegionCode_MIN meshtastic_Config_LoRaConfig_RegionCode_UNSET -#define _meshtastic_Config_LoRaConfig_RegionCode_MAX meshtastic_Config_LoRaConfig_RegionCode_SG_923 -#define _meshtastic_Config_LoRaConfig_RegionCode_ARRAYSIZE ((meshtastic_Config_LoRaConfig_RegionCode)(meshtastic_Config_LoRaConfig_RegionCode_SG_923+1)) +#define _meshtastic_Config_LoRaConfig_RegionCode_MAX meshtastic_Config_LoRaConfig_RegionCode_PH_915 +#define _meshtastic_Config_LoRaConfig_RegionCode_ARRAYSIZE ((meshtastic_Config_LoRaConfig_RegionCode)(meshtastic_Config_LoRaConfig_RegionCode_PH_915+1)) #define _meshtastic_Config_LoRaConfig_ModemPreset_MIN meshtastic_Config_LoRaConfig_ModemPreset_LONG_FAST -#define _meshtastic_Config_LoRaConfig_ModemPreset_MAX meshtastic_Config_LoRaConfig_ModemPreset_LONG_MODERATE -#define _meshtastic_Config_LoRaConfig_ModemPreset_ARRAYSIZE ((meshtastic_Config_LoRaConfig_ModemPreset)(meshtastic_Config_LoRaConfig_ModemPreset_LONG_MODERATE+1)) +#define _meshtastic_Config_LoRaConfig_ModemPreset_MAX meshtastic_Config_LoRaConfig_ModemPreset_SHORT_TURBO +#define _meshtastic_Config_LoRaConfig_ModemPreset_ARRAYSIZE ((meshtastic_Config_LoRaConfig_ModemPreset)(meshtastic_Config_LoRaConfig_ModemPreset_SHORT_TURBO+1)) #define _meshtastic_Config_BluetoothConfig_PairingMode_MIN meshtastic_Config_BluetoothConfig_PairingMode_RANDOM_PIN #define _meshtastic_Config_BluetoothConfig_PairingMode_MAX meshtastic_Config_BluetoothConfig_PairingMode_NO_PIN @@ -574,6 +646,7 @@ extern "C" { #define meshtastic_Config_DisplayConfig_units_ENUMTYPE meshtastic_Config_DisplayConfig_DisplayUnits #define meshtastic_Config_DisplayConfig_oled_ENUMTYPE meshtastic_Config_DisplayConfig_OledType #define meshtastic_Config_DisplayConfig_displaymode_ENUMTYPE meshtastic_Config_DisplayConfig_DisplayMode +#define meshtastic_Config_DisplayConfig_compass_orientation_ENUMTYPE meshtastic_Config_DisplayConfig_CompassOrientation #define meshtastic_Config_LoRaConfig_modem_preset_ENUMTYPE meshtastic_Config_LoRaConfig_ModemPreset #define meshtastic_Config_LoRaConfig_region_ENUMTYPE meshtastic_Config_LoRaConfig_RegionCode @@ -581,30 +654,35 @@ extern "C" { #define meshtastic_Config_BluetoothConfig_mode_ENUMTYPE meshtastic_Config_BluetoothConfig_PairingMode + + /* Initializer values for message structs */ #define meshtastic_Config_init_default {0, {meshtastic_Config_DeviceConfig_init_default}} -#define meshtastic_Config_DeviceConfig_init_default {_meshtastic_Config_DeviceConfig_Role_MIN, 0, 0, 0, 0, _meshtastic_Config_DeviceConfig_RebroadcastMode_MIN, 0, 0, 0, 0} +#define meshtastic_Config_DeviceConfig_init_default {_meshtastic_Config_DeviceConfig_Role_MIN, 0, 0, 0, _meshtastic_Config_DeviceConfig_RebroadcastMode_MIN, 0, 0, 0, 0, "", 0} #define meshtastic_Config_PositionConfig_init_default {0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, _meshtastic_Config_PositionConfig_GpsMode_MIN} -#define meshtastic_Config_PowerConfig_init_default {0, 0, 0, 0, 0, 0, 0, 0} +#define meshtastic_Config_PowerConfig_init_default {0, 0, 0, 0, 0, 0, 0, 0, 0} #define meshtastic_Config_NetworkConfig_init_default {0, "", "", "", 0, _meshtastic_Config_NetworkConfig_AddressMode_MIN, false, meshtastic_Config_NetworkConfig_IpV4Config_init_default, ""} #define meshtastic_Config_NetworkConfig_IpV4Config_init_default {0, 0, 0, 0} -#define meshtastic_Config_DisplayConfig_init_default {0, _meshtastic_Config_DisplayConfig_GpsCoordinateFormat_MIN, 0, 0, 0, _meshtastic_Config_DisplayConfig_DisplayUnits_MIN, _meshtastic_Config_DisplayConfig_OledType_MIN, _meshtastic_Config_DisplayConfig_DisplayMode_MIN, 0, 0} -#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} +#define meshtastic_Config_DisplayConfig_init_default {0, _meshtastic_Config_DisplayConfig_GpsCoordinateFormat_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} +#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} #define meshtastic_Config_BluetoothConfig_init_default {0, _meshtastic_Config_BluetoothConfig_PairingMode_MIN, 0} +#define meshtastic_Config_SecurityConfig_init_default {{0, {0}}, {0, {0}}, 0, {{0, {0}}, {0, {0}}, {0, {0}}}, 0, 0, 0, 0} +#define meshtastic_Config_SessionkeyConfig_init_default {0} #define meshtastic_Config_init_zero {0, {meshtastic_Config_DeviceConfig_init_zero}} -#define meshtastic_Config_DeviceConfig_init_zero {_meshtastic_Config_DeviceConfig_Role_MIN, 0, 0, 0, 0, _meshtastic_Config_DeviceConfig_RebroadcastMode_MIN, 0, 0, 0, 0} +#define meshtastic_Config_DeviceConfig_init_zero {_meshtastic_Config_DeviceConfig_Role_MIN, 0, 0, 0, _meshtastic_Config_DeviceConfig_RebroadcastMode_MIN, 0, 0, 0, 0, "", 0} #define meshtastic_Config_PositionConfig_init_zero {0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, _meshtastic_Config_PositionConfig_GpsMode_MIN} -#define meshtastic_Config_PowerConfig_init_zero {0, 0, 0, 0, 0, 0, 0, 0} +#define meshtastic_Config_PowerConfig_init_zero {0, 0, 0, 0, 0, 0, 0, 0, 0} #define meshtastic_Config_NetworkConfig_init_zero {0, "", "", "", 0, _meshtastic_Config_NetworkConfig_AddressMode_MIN, false, meshtastic_Config_NetworkConfig_IpV4Config_init_zero, ""} #define meshtastic_Config_NetworkConfig_IpV4Config_init_zero {0, 0, 0, 0} -#define meshtastic_Config_DisplayConfig_init_zero {0, _meshtastic_Config_DisplayConfig_GpsCoordinateFormat_MIN, 0, 0, 0, _meshtastic_Config_DisplayConfig_DisplayUnits_MIN, _meshtastic_Config_DisplayConfig_OledType_MIN, _meshtastic_Config_DisplayConfig_DisplayMode_MIN, 0, 0} -#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} +#define meshtastic_Config_DisplayConfig_init_zero {0, _meshtastic_Config_DisplayConfig_GpsCoordinateFormat_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} +#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} #define meshtastic_Config_BluetoothConfig_init_zero {0, _meshtastic_Config_BluetoothConfig_PairingMode_MIN, 0} +#define meshtastic_Config_SecurityConfig_init_zero {{0, {0}}, {0, {0}}, 0, {{0, {0}}, {0, {0}}, {0, {0}}}, 0, 0, 0, 0} +#define meshtastic_Config_SessionkeyConfig_init_zero {0} /* Field tags (for use in manual encoding/decoding) */ #define meshtastic_Config_DeviceConfig_role_tag 1 #define meshtastic_Config_DeviceConfig_serial_enabled_tag 2 -#define meshtastic_Config_DeviceConfig_debug_log_enabled_tag 3 #define meshtastic_Config_DeviceConfig_button_gpio_tag 4 #define meshtastic_Config_DeviceConfig_buzzer_gpio_tag 5 #define meshtastic_Config_DeviceConfig_rebroadcast_mode_tag 6 @@ -612,6 +690,8 @@ extern "C" { #define meshtastic_Config_DeviceConfig_double_tap_as_button_press_tag 8 #define meshtastic_Config_DeviceConfig_is_managed_tag 9 #define meshtastic_Config_DeviceConfig_disable_triple_click_tag 10 +#define meshtastic_Config_DeviceConfig_tzdef_tag 11 +#define meshtastic_Config_DeviceConfig_led_heartbeat_disabled_tag 12 #define meshtastic_Config_PositionConfig_position_broadcast_secs_tag 1 #define meshtastic_Config_PositionConfig_position_broadcast_smart_enabled_tag 2 #define meshtastic_Config_PositionConfig_fixed_position_tag 3 @@ -633,6 +713,7 @@ extern "C" { #define meshtastic_Config_PowerConfig_ls_secs_tag 7 #define meshtastic_Config_PowerConfig_min_wake_secs_tag 8 #define meshtastic_Config_PowerConfig_device_battery_ina_address_tag 9 +#define meshtastic_Config_PowerConfig_powermon_enables_tag 32 #define meshtastic_Config_NetworkConfig_IpV4Config_ip_tag 1 #define meshtastic_Config_NetworkConfig_IpV4Config_gateway_tag 2 #define meshtastic_Config_NetworkConfig_IpV4Config_subnet_tag 3 @@ -655,6 +736,7 @@ extern "C" { #define meshtastic_Config_DisplayConfig_displaymode_tag 8 #define meshtastic_Config_DisplayConfig_heading_bold_tag 9 #define meshtastic_Config_DisplayConfig_wake_on_tap_or_motion_tag 10 +#define meshtastic_Config_DisplayConfig_compass_orientation_tag 11 #define meshtastic_Config_LoRaConfig_use_preset_tag 1 #define meshtastic_Config_LoRaConfig_modem_preset_tag 2 #define meshtastic_Config_LoRaConfig_bandwidth_tag 3 @@ -669,11 +751,20 @@ extern "C" { #define meshtastic_Config_LoRaConfig_override_duty_cycle_tag 12 #define meshtastic_Config_LoRaConfig_sx126x_rx_boosted_gain_tag 13 #define meshtastic_Config_LoRaConfig_override_frequency_tag 14 +#define meshtastic_Config_LoRaConfig_pa_fan_disabled_tag 15 #define meshtastic_Config_LoRaConfig_ignore_incoming_tag 103 #define meshtastic_Config_LoRaConfig_ignore_mqtt_tag 104 +#define meshtastic_Config_LoRaConfig_config_ok_to_mqtt_tag 105 #define meshtastic_Config_BluetoothConfig_enabled_tag 1 #define meshtastic_Config_BluetoothConfig_mode_tag 2 #define meshtastic_Config_BluetoothConfig_fixed_pin_tag 3 +#define meshtastic_Config_SecurityConfig_public_key_tag 1 +#define meshtastic_Config_SecurityConfig_private_key_tag 2 +#define meshtastic_Config_SecurityConfig_admin_key_tag 3 +#define meshtastic_Config_SecurityConfig_is_managed_tag 4 +#define meshtastic_Config_SecurityConfig_serial_enabled_tag 5 +#define meshtastic_Config_SecurityConfig_debug_log_api_enabled_tag 6 +#define meshtastic_Config_SecurityConfig_admin_channel_enabled_tag 8 #define meshtastic_Config_device_tag 1 #define meshtastic_Config_position_tag 2 #define meshtastic_Config_power_tag 3 @@ -681,6 +772,8 @@ extern "C" { #define meshtastic_Config_display_tag 5 #define meshtastic_Config_lora_tag 6 #define meshtastic_Config_bluetooth_tag 7 +#define meshtastic_Config_security_tag 8 +#define meshtastic_Config_sessionkey_tag 9 /* Struct field encoding specification for nanopb */ #define meshtastic_Config_FIELDLIST(X, a) \ @@ -690,7 +783,9 @@ X(a, STATIC, ONEOF, MESSAGE, (payload_variant,power,payload_variant.power) X(a, STATIC, ONEOF, MESSAGE, (payload_variant,network,payload_variant.network), 4) \ X(a, STATIC, ONEOF, MESSAGE, (payload_variant,display,payload_variant.display), 5) \ X(a, STATIC, ONEOF, MESSAGE, (payload_variant,lora,payload_variant.lora), 6) \ -X(a, STATIC, ONEOF, MESSAGE, (payload_variant,bluetooth,payload_variant.bluetooth), 7) +X(a, STATIC, ONEOF, MESSAGE, (payload_variant,bluetooth,payload_variant.bluetooth), 7) \ +X(a, STATIC, ONEOF, MESSAGE, (payload_variant,security,payload_variant.security), 8) \ +X(a, STATIC, ONEOF, MESSAGE, (payload_variant,sessionkey,payload_variant.sessionkey), 9) #define meshtastic_Config_CALLBACK NULL #define meshtastic_Config_DEFAULT NULL #define meshtastic_Config_payload_variant_device_MSGTYPE meshtastic_Config_DeviceConfig @@ -700,18 +795,21 @@ X(a, STATIC, ONEOF, MESSAGE, (payload_variant,bluetooth,payload_variant.bl #define meshtastic_Config_payload_variant_display_MSGTYPE meshtastic_Config_DisplayConfig #define meshtastic_Config_payload_variant_lora_MSGTYPE meshtastic_Config_LoRaConfig #define meshtastic_Config_payload_variant_bluetooth_MSGTYPE meshtastic_Config_BluetoothConfig +#define meshtastic_Config_payload_variant_security_MSGTYPE meshtastic_Config_SecurityConfig +#define meshtastic_Config_payload_variant_sessionkey_MSGTYPE meshtastic_Config_SessionkeyConfig #define meshtastic_Config_DeviceConfig_FIELDLIST(X, a) \ X(a, STATIC, SINGULAR, UENUM, role, 1) \ X(a, STATIC, SINGULAR, BOOL, serial_enabled, 2) \ -X(a, STATIC, SINGULAR, BOOL, debug_log_enabled, 3) \ X(a, STATIC, SINGULAR, UINT32, button_gpio, 4) \ X(a, STATIC, SINGULAR, UINT32, buzzer_gpio, 5) \ X(a, STATIC, SINGULAR, UENUM, rebroadcast_mode, 6) \ X(a, STATIC, SINGULAR, UINT32, node_info_broadcast_secs, 7) \ X(a, STATIC, SINGULAR, BOOL, double_tap_as_button_press, 8) \ X(a, STATIC, SINGULAR, BOOL, is_managed, 9) \ -X(a, STATIC, SINGULAR, BOOL, disable_triple_click, 10) +X(a, STATIC, SINGULAR, BOOL, disable_triple_click, 10) \ +X(a, STATIC, SINGULAR, STRING, tzdef, 11) \ +X(a, STATIC, SINGULAR, BOOL, led_heartbeat_disabled, 12) #define meshtastic_Config_DeviceConfig_CALLBACK NULL #define meshtastic_Config_DeviceConfig_DEFAULT NULL @@ -740,7 +838,8 @@ X(a, STATIC, SINGULAR, UINT32, wait_bluetooth_secs, 4) \ X(a, STATIC, SINGULAR, UINT32, sds_secs, 6) \ X(a, STATIC, SINGULAR, UINT32, ls_secs, 7) \ X(a, STATIC, SINGULAR, UINT32, min_wake_secs, 8) \ -X(a, STATIC, SINGULAR, UINT32, device_battery_ina_address, 9) +X(a, STATIC, SINGULAR, UINT32, device_battery_ina_address, 9) \ +X(a, STATIC, SINGULAR, UINT64, powermon_enables, 32) #define meshtastic_Config_PowerConfig_CALLBACK NULL #define meshtastic_Config_PowerConfig_DEFAULT NULL @@ -775,7 +874,8 @@ X(a, STATIC, SINGULAR, UENUM, units, 6) \ X(a, STATIC, SINGULAR, UENUM, oled, 7) \ X(a, STATIC, SINGULAR, UENUM, displaymode, 8) \ X(a, STATIC, SINGULAR, BOOL, heading_bold, 9) \ -X(a, STATIC, SINGULAR, BOOL, wake_on_tap_or_motion, 10) +X(a, STATIC, SINGULAR, BOOL, wake_on_tap_or_motion, 10) \ +X(a, STATIC, SINGULAR, UENUM, compass_orientation, 11) #define meshtastic_Config_DisplayConfig_CALLBACK NULL #define meshtastic_Config_DisplayConfig_DEFAULT NULL @@ -794,8 +894,10 @@ X(a, STATIC, SINGULAR, UINT32, channel_num, 11) \ X(a, STATIC, SINGULAR, BOOL, override_duty_cycle, 12) \ X(a, STATIC, SINGULAR, BOOL, sx126x_rx_boosted_gain, 13) \ X(a, STATIC, SINGULAR, FLOAT, override_frequency, 14) \ +X(a, STATIC, SINGULAR, BOOL, pa_fan_disabled, 15) \ X(a, STATIC, REPEATED, UINT32, ignore_incoming, 103) \ -X(a, STATIC, SINGULAR, BOOL, ignore_mqtt, 104) +X(a, STATIC, SINGULAR, BOOL, ignore_mqtt, 104) \ +X(a, STATIC, SINGULAR, BOOL, config_ok_to_mqtt, 105) #define meshtastic_Config_LoRaConfig_CALLBACK NULL #define meshtastic_Config_LoRaConfig_DEFAULT NULL @@ -806,6 +908,22 @@ X(a, STATIC, SINGULAR, UINT32, fixed_pin, 3) #define meshtastic_Config_BluetoothConfig_CALLBACK NULL #define meshtastic_Config_BluetoothConfig_DEFAULT NULL +#define meshtastic_Config_SecurityConfig_FIELDLIST(X, a) \ +X(a, STATIC, SINGULAR, BYTES, public_key, 1) \ +X(a, STATIC, SINGULAR, BYTES, private_key, 2) \ +X(a, STATIC, REPEATED, BYTES, admin_key, 3) \ +X(a, STATIC, SINGULAR, BOOL, is_managed, 4) \ +X(a, STATIC, SINGULAR, BOOL, serial_enabled, 5) \ +X(a, STATIC, SINGULAR, BOOL, debug_log_api_enabled, 6) \ +X(a, STATIC, SINGULAR, BOOL, admin_channel_enabled, 8) +#define meshtastic_Config_SecurityConfig_CALLBACK NULL +#define meshtastic_Config_SecurityConfig_DEFAULT NULL + +#define meshtastic_Config_SessionkeyConfig_FIELDLIST(X, a) \ + +#define meshtastic_Config_SessionkeyConfig_CALLBACK NULL +#define meshtastic_Config_SessionkeyConfig_DEFAULT NULL + extern const pb_msgdesc_t meshtastic_Config_msg; extern const pb_msgdesc_t meshtastic_Config_DeviceConfig_msg; extern const pb_msgdesc_t meshtastic_Config_PositionConfig_msg; @@ -815,6 +933,8 @@ extern const pb_msgdesc_t meshtastic_Config_NetworkConfig_IpV4Config_msg; extern const pb_msgdesc_t meshtastic_Config_DisplayConfig_msg; extern const pb_msgdesc_t meshtastic_Config_LoRaConfig_msg; extern const pb_msgdesc_t meshtastic_Config_BluetoothConfig_msg; +extern const pb_msgdesc_t meshtastic_Config_SecurityConfig_msg; +extern const pb_msgdesc_t meshtastic_Config_SessionkeyConfig_msg; /* Defines for backwards compatibility with code written before nanopb-0.4.0 */ #define meshtastic_Config_fields &meshtastic_Config_msg @@ -826,16 +946,21 @@ extern const pb_msgdesc_t meshtastic_Config_BluetoothConfig_msg; #define meshtastic_Config_DisplayConfig_fields &meshtastic_Config_DisplayConfig_msg #define meshtastic_Config_LoRaConfig_fields &meshtastic_Config_LoRaConfig_msg #define meshtastic_Config_BluetoothConfig_fields &meshtastic_Config_BluetoothConfig_msg +#define meshtastic_Config_SecurityConfig_fields &meshtastic_Config_SecurityConfig_msg +#define meshtastic_Config_SessionkeyConfig_fields &meshtastic_Config_SessionkeyConfig_msg /* Maximum encoded size of messages (where known) */ +#define MESHTASTIC_MESHTASTIC_CONFIG_PB_H_MAX_SIZE meshtastic_Config_size #define meshtastic_Config_BluetoothConfig_size 10 -#define meshtastic_Config_DeviceConfig_size 32 -#define meshtastic_Config_DisplayConfig_size 28 -#define meshtastic_Config_LoRaConfig_size 80 +#define meshtastic_Config_DeviceConfig_size 98 +#define meshtastic_Config_DisplayConfig_size 30 +#define meshtastic_Config_LoRaConfig_size 85 #define meshtastic_Config_NetworkConfig_IpV4Config_size 20 #define meshtastic_Config_NetworkConfig_size 196 #define meshtastic_Config_PositionConfig_size 62 -#define meshtastic_Config_PowerConfig_size 40 +#define meshtastic_Config_PowerConfig_size 52 +#define meshtastic_Config_SecurityConfig_size 178 +#define meshtastic_Config_SessionkeyConfig_size 0 #define meshtastic_Config_size 199 #ifdef __cplusplus diff --git a/src/mesh/generated/meshtastic/connection_status.pb.c b/src/mesh/generated/meshtastic/connection_status.pb.cpp similarity index 95% rename from src/mesh/generated/meshtastic/connection_status.pb.c rename to src/mesh/generated/meshtastic/connection_status.pb.cpp index 0675bc815..d1495bb83 100644 --- a/src/mesh/generated/meshtastic/connection_status.pb.c +++ b/src/mesh/generated/meshtastic/connection_status.pb.cpp @@ -1,5 +1,5 @@ /* Automatically generated nanopb constant definitions */ -/* Generated by nanopb-0.4.7 */ +/* Generated by nanopb-0.4.9 */ #include "meshtastic/connection_status.pb.h" #if PB_PROTO_HEADER_VERSION != 40 diff --git a/src/mesh/generated/meshtastic/connection_status.pb.h b/src/mesh/generated/meshtastic/connection_status.pb.h index 19ed69455..c433e370b 100644 --- a/src/mesh/generated/meshtastic/connection_status.pb.h +++ b/src/mesh/generated/meshtastic/connection_status.pb.h @@ -1,5 +1,5 @@ /* Automatically generated nanopb header */ -/* Generated by nanopb-0.4.7 */ +/* Generated by nanopb-0.4.9 */ #ifndef PB_MESHTASTIC_MESHTASTIC_CONNECTION_STATUS_PB_H_INCLUDED #define PB_MESHTASTIC_MESHTASTIC_CONNECTION_STATUS_PB_H_INCLUDED @@ -175,6 +175,7 @@ extern const pb_msgdesc_t meshtastic_SerialConnectionStatus_msg; #define meshtastic_SerialConnectionStatus_fields &meshtastic_SerialConnectionStatus_msg /* Maximum encoded size of messages (where known) */ +#define MESHTASTIC_MESHTASTIC_CONNECTION_STATUS_PB_H_MAX_SIZE meshtastic_DeviceConnectionStatus_size #define meshtastic_BluetoothConnectionStatus_size 19 #define meshtastic_DeviceConnectionStatus_size 106 #define meshtastic_EthernetConnectionStatus_size 13 diff --git a/src/mesh/generated/meshtastic/deviceonly.pb.c b/src/mesh/generated/meshtastic/deviceonly.pb.cpp similarity index 72% rename from src/mesh/generated/meshtastic/deviceonly.pb.c rename to src/mesh/generated/meshtastic/deviceonly.pb.cpp index 82c3fc44c..135634762 100644 --- a/src/mesh/generated/meshtastic/deviceonly.pb.c +++ b/src/mesh/generated/meshtastic/deviceonly.pb.cpp @@ -1,18 +1,21 @@ /* Automatically generated nanopb constant definitions */ -/* Generated by nanopb-0.4.7 */ +/* Generated by nanopb-0.4.9 */ #include "meshtastic/deviceonly.pb.h" #if PB_PROTO_HEADER_VERSION != 40 #error Regenerate this file with the current version of nanopb generator. #endif -PB_BIND(meshtastic_DeviceState, meshtastic_DeviceState, 4) +PB_BIND(meshtastic_PositionLite, meshtastic_PositionLite, AUTO) + + +PB_BIND(meshtastic_UserLite, meshtastic_UserLite, AUTO) PB_BIND(meshtastic_NodeInfoLite, meshtastic_NodeInfoLite, AUTO) -PB_BIND(meshtastic_PositionLite, meshtastic_PositionLite, AUTO) +PB_BIND(meshtastic_DeviceState, meshtastic_DeviceState, 2) PB_BIND(meshtastic_ChannelFile, meshtastic_ChannelFile, 2) @@ -21,8 +24,6 @@ PB_BIND(meshtastic_ChannelFile, meshtastic_ChannelFile, 2) PB_BIND(meshtastic_OEMStore, meshtastic_OEMStore, 2) -PB_BIND(meshtastic_NodeRemoteHardwarePin, meshtastic_NodeRemoteHardwarePin, AUTO) - diff --git a/src/mesh/generated/meshtastic/deviceonly.pb.h b/src/mesh/generated/meshtastic/deviceonly.pb.h index 735644c47..2aa8fda8e 100644 --- a/src/mesh/generated/meshtastic/deviceonly.pb.h +++ b/src/mesh/generated/meshtastic/deviceonly.pb.h @@ -1,21 +1,22 @@ /* Automatically generated nanopb header */ -/* Generated by nanopb-0.4.7 */ +/* Generated by nanopb-0.4.9 */ #ifndef PB_MESHTASTIC_MESHTASTIC_DEVICEONLY_PB_H_INCLUDED #define PB_MESHTASTIC_MESHTASTIC_DEVICEONLY_PB_H_INCLUDED #include +#include #include "meshtastic/channel.pb.h" #include "meshtastic/localonly.pb.h" #include "meshtastic/mesh.pb.h" #include "meshtastic/telemetry.pb.h" -#include "meshtastic/module_config.pb.h" +#include "meshtastic/config.pb.h" #if PB_PROTO_HEADER_VERSION != 40 #error Regenerate this file with the current version of nanopb generator. #endif /* Enum definitions */ -/* TODO: REPLACE */ +/* Font sizes for the device screen */ typedef enum _meshtastic_ScreenFonts { /* TODO: REPLACE */ meshtastic_ScreenFonts_FONT_SMALL = 0, @@ -45,12 +46,37 @@ typedef struct _meshtastic_PositionLite { meshtastic_Position_LocSource location_source; } meshtastic_PositionLite; +typedef PB_BYTES_ARRAY_T(32) meshtastic_UserLite_public_key_t; +typedef struct _meshtastic_UserLite { + /* This is the addr of the radio. */ + pb_byte_t macaddr[6]; + /* A full name for this user, i.e. "Kevin Hester" */ + char long_name[40]; + /* A VERY short name, ideally two characters. + Suitable for a tiny OLED screen */ + char short_name[5]; + /* TBEAM, HELTEC, etc... + Starting in 1.2.11 moved to hw_model enum in the NodeInfo object. + Apps will still need the string here for older builds + (so OTA update can find the right image), but if the enum is available it will be used instead. */ + meshtastic_HardwareModel hw_model; + /* In some regions Ham radio operators have different bandwidth limitations than others. + If this user is a licensed operator, set this flag. + Also, "long_name" should be their licence number. */ + bool is_licensed; + /* Indicates that the user's role in the mesh */ + meshtastic_Config_DeviceConfig_Role role; + /* The public key of the user's device. + This is sent out to other nodes on the mesh to allow them to compute a shared secret key. */ + meshtastic_UserLite_public_key_t public_key; +} meshtastic_UserLite; + typedef struct _meshtastic_NodeInfoLite { /* The node number */ uint32_t num; /* The user info for this node */ bool has_user; - meshtastic_User user; + meshtastic_UserLite user; /* 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. Position.time now indicates the last time we received a POSITION from that node. */ bool has_position; @@ -65,8 +91,58 @@ typedef struct _meshtastic_NodeInfoLite { meshtastic_DeviceMetrics device_metrics; /* local channel index we heard that node on. Only populated if its not the default channel. */ uint8_t channel; + /* True if we witnessed the node over MQTT instead of LoRA transport */ + bool via_mqtt; + /* Number of hops away from us this node is (0 if adjacent) */ + bool has_hops_away; + uint8_t hops_away; + /* True if node is in our favorites list + Persists between NodeDB internal clean ups */ + bool is_favorite; } meshtastic_NodeInfoLite; +/* This message is never sent over the wire, but it is used for serializing DB + state to flash in the device code + FIXME, since we write this each time we enter deep sleep (and have infinite + flash) it would be better to use some sort of append only data structure for + the receive queue and use the preferences store for the other stuff */ +typedef struct _meshtastic_DeviceState { + /* Read only settings/info about this node */ + bool has_my_node; + meshtastic_MyNodeInfo my_node; + /* My owner info */ + bool has_owner; + meshtastic_User owner; + /* Received packets saved for delivery to the phone */ + pb_size_t receive_queue_count; + meshtastic_MeshPacket receive_queue[1]; + /* We keep the last received text message (only) stored in the device flash, + so we can show it on the screen. + Might be null */ + bool has_rx_text_message; + meshtastic_MeshPacket rx_text_message; + /* A version integer used to invalidate old save files when we make + incompatible changes This integer is set at build time and is private to + NodeDB.cpp in the device code. */ + uint32_t version; + /* Used only during development. + Indicates developer is testing and changes should never be saved to flash. + Deprecated in 2.3.1 */ + bool no_save; + /* Some GPS receivers seem to have bogus settings from the factory, so we always do one factory reset. */ + bool did_gps_reset; + /* We keep the last received waypoint stored in the device flash, + so we can show it on the screen. + Might be null */ + bool has_rx_waypoint; + meshtastic_MeshPacket rx_waypoint; + /* The mesh's nodes with their available gpio pins for RemoteHardware module */ + pb_size_t node_remote_hardware_pins_count; + meshtastic_NodeRemoteHardwarePin node_remote_hardware_pins[12]; + /* New lite version of NodeDB to decrease memory footprint */ + std::vector node_db_lite; +} meshtastic_DeviceState; + /* The on-disk saved channels */ typedef struct _meshtastic_ChannelFile { /* The channels our node knows about */ @@ -103,57 +179,6 @@ typedef struct _meshtastic_OEMStore { meshtastic_LocalModuleConfig oem_local_module_config; } meshtastic_OEMStore; -/* RemoteHardwarePins associated with a node */ -typedef struct _meshtastic_NodeRemoteHardwarePin { - /* The node_num exposing the available gpio pin */ - uint32_t node_num; - /* The the available gpio pin for usage with RemoteHardware module */ - bool has_pin; - meshtastic_RemoteHardwarePin pin; -} meshtastic_NodeRemoteHardwarePin; - -/* This message is never sent over the wire, but it is used for serializing DB - state to flash in the device code - FIXME, since we write this each time we enter deep sleep (and have infinite - flash) it would be better to use some sort of append only data structure for - the receive queue and use the preferences store for the other stuff */ -typedef struct _meshtastic_DeviceState { - /* Read only settings/info about this node */ - bool has_my_node; - meshtastic_MyNodeInfo my_node; - /* My owner info */ - bool has_owner; - meshtastic_User owner; - /* Received packets saved for delivery to the phone */ - pb_size_t receive_queue_count; - meshtastic_MeshPacket receive_queue[1]; - /* We keep the last received text message (only) stored in the device flash, - so we can show it on the screen. - Might be null */ - bool has_rx_text_message; - meshtastic_MeshPacket rx_text_message; - /* A version integer used to invalidate old save files when we make - incompatible changes This integer is set at build time and is private to - NodeDB.cpp in the device code. */ - uint32_t version; - /* Used only during development. - Indicates developer is testing and changes should never be saved to flash. */ - bool no_save; - /* Some GPS receivers seem to have bogus settings from the factory, so we always do one factory reset. */ - bool did_gps_reset; - /* We keep the last received waypoint stored in the device flash, - so we can show it on the screen. - Might be null */ - bool has_rx_waypoint; - meshtastic_MeshPacket rx_waypoint; - /* The mesh's nodes with their available gpio pins for RemoteHardware module */ - pb_size_t node_remote_hardware_pins_count; - meshtastic_NodeRemoteHardwarePin node_remote_hardware_pins[12]; - /* New lite version of NodeDB to decrease memory footprint */ - pb_size_t node_db_lite_count; - meshtastic_NodeInfoLite node_db_lite[100]; -} meshtastic_DeviceState; - #ifdef __cplusplus extern "C" { @@ -164,28 +189,30 @@ extern "C" { #define _meshtastic_ScreenFonts_MAX meshtastic_ScreenFonts_FONT_LARGE #define _meshtastic_ScreenFonts_ARRAYSIZE ((meshtastic_ScreenFonts)(meshtastic_ScreenFonts_FONT_LARGE+1)) - - #define meshtastic_PositionLite_location_source_ENUMTYPE meshtastic_Position_LocSource +#define meshtastic_UserLite_hw_model_ENUMTYPE meshtastic_HardwareModel +#define meshtastic_UserLite_role_ENUMTYPE meshtastic_Config_DeviceConfig_Role + + + #define meshtastic_OEMStore_oem_font_ENUMTYPE meshtastic_ScreenFonts - /* Initializer values for message structs */ -#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}, 0, {meshtastic_NodeInfoLite_init_default, meshtastic_NodeInfoLite_init_default, meshtastic_NodeInfoLite_init_default, meshtastic_NodeInfoLite_init_default, meshtastic_NodeInfoLite_init_default, meshtastic_NodeInfoLite_init_default, meshtastic_NodeInfoLite_init_default, meshtastic_NodeInfoLite_init_default, meshtastic_NodeInfoLite_init_default, meshtastic_NodeInfoLite_init_default, meshtastic_NodeInfoLite_init_default, meshtastic_NodeInfoLite_init_default, meshtastic_NodeInfoLite_init_default, meshtastic_NodeInfoLite_init_default, meshtastic_NodeInfoLite_init_default, meshtastic_NodeInfoLite_init_default, meshtastic_NodeInfoLite_init_default, meshtastic_NodeInfoLite_init_default, meshtastic_NodeInfoLite_init_default, meshtastic_NodeInfoLite_init_default, meshtastic_NodeInfoLite_init_default, meshtastic_NodeInfoLite_init_default, meshtastic_NodeInfoLite_init_default, meshtastic_NodeInfoLite_init_default, meshtastic_NodeInfoLite_init_default, meshtastic_NodeInfoLite_init_default, meshtastic_NodeInfoLite_init_default, meshtastic_NodeInfoLite_init_default, meshtastic_NodeInfoLite_init_default, meshtastic_NodeInfoLite_init_default, meshtastic_NodeInfoLite_init_default, meshtastic_NodeInfoLite_init_default, meshtastic_NodeInfoLite_init_default, meshtastic_NodeInfoLite_init_default, meshtastic_NodeInfoLite_init_default, meshtastic_NodeInfoLite_init_default, meshtastic_NodeInfoLite_init_default, meshtastic_NodeInfoLite_init_default, meshtastic_NodeInfoLite_init_default, meshtastic_NodeInfoLite_init_default, meshtastic_NodeInfoLite_init_default, meshtastic_NodeInfoLite_init_default, meshtastic_NodeInfoLite_init_default, meshtastic_NodeInfoLite_init_default, meshtastic_NodeInfoLite_init_default, meshtastic_NodeInfoLite_init_default, meshtastic_NodeInfoLite_init_default, meshtastic_NodeInfoLite_init_default, meshtastic_NodeInfoLite_init_default, meshtastic_NodeInfoLite_init_default, meshtastic_NodeInfoLite_init_default, meshtastic_NodeInfoLite_init_default, meshtastic_NodeInfoLite_init_default, meshtastic_NodeInfoLite_init_default, meshtastic_NodeInfoLite_init_default, meshtastic_NodeInfoLite_init_default, meshtastic_NodeInfoLite_init_default, meshtastic_NodeInfoLite_init_default, meshtastic_NodeInfoLite_init_default, meshtastic_NodeInfoLite_init_default, meshtastic_NodeInfoLite_init_default, meshtastic_NodeInfoLite_init_default, meshtastic_NodeInfoLite_init_default, meshtastic_NodeInfoLite_init_default, meshtastic_NodeInfoLite_init_default, meshtastic_NodeInfoLite_init_default, meshtastic_NodeInfoLite_init_default, meshtastic_NodeInfoLite_init_default, meshtastic_NodeInfoLite_init_default, meshtastic_NodeInfoLite_init_default, meshtastic_NodeInfoLite_init_default, meshtastic_NodeInfoLite_init_default, meshtastic_NodeInfoLite_init_default, meshtastic_NodeInfoLite_init_default, meshtastic_NodeInfoLite_init_default, meshtastic_NodeInfoLite_init_default, meshtastic_NodeInfoLite_init_default, meshtastic_NodeInfoLite_init_default, meshtastic_NodeInfoLite_init_default, meshtastic_NodeInfoLite_init_default, meshtastic_NodeInfoLite_init_default, meshtastic_NodeInfoLite_init_default, meshtastic_NodeInfoLite_init_default, meshtastic_NodeInfoLite_init_default, meshtastic_NodeInfoLite_init_default, meshtastic_NodeInfoLite_init_default, meshtastic_NodeInfoLite_init_default, meshtastic_NodeInfoLite_init_default, meshtastic_NodeInfoLite_init_default, meshtastic_NodeInfoLite_init_default, meshtastic_NodeInfoLite_init_default, meshtastic_NodeInfoLite_init_default, meshtastic_NodeInfoLite_init_default, meshtastic_NodeInfoLite_init_default, meshtastic_NodeInfoLite_init_default, meshtastic_NodeInfoLite_init_default, meshtastic_NodeInfoLite_init_default, meshtastic_NodeInfoLite_init_default, meshtastic_NodeInfoLite_init_default, meshtastic_NodeInfoLite_init_default}} -#define meshtastic_NodeInfoLite_init_default {0, false, meshtastic_User_init_default, false, meshtastic_PositionLite_init_default, 0, 0, false, meshtastic_DeviceMetrics_init_default, 0} #define meshtastic_PositionLite_init_default {0, 0, 0, 0, _meshtastic_Position_LocSource_MIN} +#define meshtastic_UserLite_init_default {{0}, "", "", _meshtastic_HardwareModel_MIN, 0, _meshtastic_Config_DeviceConfig_Role_MIN, {0, {0}}} +#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} +#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}, {0}} #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} #define meshtastic_OEMStore_init_default {0, 0, {0, {0}}, _meshtastic_ScreenFonts_MIN, "", {0, {0}}, false, meshtastic_LocalConfig_init_default, false, meshtastic_LocalModuleConfig_init_default} -#define meshtastic_NodeRemoteHardwarePin_init_default {0, false, meshtastic_RemoteHardwarePin_init_default} -#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}, 0, {meshtastic_NodeInfoLite_init_zero, meshtastic_NodeInfoLite_init_zero, meshtastic_NodeInfoLite_init_zero, meshtastic_NodeInfoLite_init_zero, meshtastic_NodeInfoLite_init_zero, meshtastic_NodeInfoLite_init_zero, meshtastic_NodeInfoLite_init_zero, meshtastic_NodeInfoLite_init_zero, meshtastic_NodeInfoLite_init_zero, meshtastic_NodeInfoLite_init_zero, meshtastic_NodeInfoLite_init_zero, meshtastic_NodeInfoLite_init_zero, meshtastic_NodeInfoLite_init_zero, meshtastic_NodeInfoLite_init_zero, meshtastic_NodeInfoLite_init_zero, meshtastic_NodeInfoLite_init_zero, meshtastic_NodeInfoLite_init_zero, meshtastic_NodeInfoLite_init_zero, meshtastic_NodeInfoLite_init_zero, meshtastic_NodeInfoLite_init_zero, meshtastic_NodeInfoLite_init_zero, meshtastic_NodeInfoLite_init_zero, meshtastic_NodeInfoLite_init_zero, meshtastic_NodeInfoLite_init_zero, meshtastic_NodeInfoLite_init_zero, meshtastic_NodeInfoLite_init_zero, meshtastic_NodeInfoLite_init_zero, meshtastic_NodeInfoLite_init_zero, meshtastic_NodeInfoLite_init_zero, meshtastic_NodeInfoLite_init_zero, meshtastic_NodeInfoLite_init_zero, meshtastic_NodeInfoLite_init_zero, meshtastic_NodeInfoLite_init_zero, meshtastic_NodeInfoLite_init_zero, meshtastic_NodeInfoLite_init_zero, meshtastic_NodeInfoLite_init_zero, meshtastic_NodeInfoLite_init_zero, meshtastic_NodeInfoLite_init_zero, meshtastic_NodeInfoLite_init_zero, meshtastic_NodeInfoLite_init_zero, meshtastic_NodeInfoLite_init_zero, meshtastic_NodeInfoLite_init_zero, meshtastic_NodeInfoLite_init_zero, meshtastic_NodeInfoLite_init_zero, meshtastic_NodeInfoLite_init_zero, meshtastic_NodeInfoLite_init_zero, meshtastic_NodeInfoLite_init_zero, meshtastic_NodeInfoLite_init_zero, meshtastic_NodeInfoLite_init_zero, meshtastic_NodeInfoLite_init_zero, meshtastic_NodeInfoLite_init_zero, meshtastic_NodeInfoLite_init_zero, meshtastic_NodeInfoLite_init_zero, meshtastic_NodeInfoLite_init_zero, meshtastic_NodeInfoLite_init_zero, meshtastic_NodeInfoLite_init_zero, meshtastic_NodeInfoLite_init_zero, meshtastic_NodeInfoLite_init_zero, meshtastic_NodeInfoLite_init_zero, meshtastic_NodeInfoLite_init_zero, meshtastic_NodeInfoLite_init_zero, meshtastic_NodeInfoLite_init_zero, meshtastic_NodeInfoLite_init_zero, meshtastic_NodeInfoLite_init_zero, meshtastic_NodeInfoLite_init_zero, meshtastic_NodeInfoLite_init_zero, meshtastic_NodeInfoLite_init_zero, meshtastic_NodeInfoLite_init_zero, meshtastic_NodeInfoLite_init_zero, meshtastic_NodeInfoLite_init_zero, meshtastic_NodeInfoLite_init_zero, meshtastic_NodeInfoLite_init_zero, meshtastic_NodeInfoLite_init_zero, meshtastic_NodeInfoLite_init_zero, meshtastic_NodeInfoLite_init_zero, meshtastic_NodeInfoLite_init_zero, meshtastic_NodeInfoLite_init_zero, meshtastic_NodeInfoLite_init_zero, meshtastic_NodeInfoLite_init_zero, meshtastic_NodeInfoLite_init_zero, meshtastic_NodeInfoLite_init_zero, meshtastic_NodeInfoLite_init_zero, meshtastic_NodeInfoLite_init_zero, meshtastic_NodeInfoLite_init_zero, meshtastic_NodeInfoLite_init_zero, meshtastic_NodeInfoLite_init_zero, meshtastic_NodeInfoLite_init_zero, meshtastic_NodeInfoLite_init_zero, meshtastic_NodeInfoLite_init_zero, meshtastic_NodeInfoLite_init_zero, meshtastic_NodeInfoLite_init_zero, meshtastic_NodeInfoLite_init_zero, meshtastic_NodeInfoLite_init_zero, meshtastic_NodeInfoLite_init_zero, meshtastic_NodeInfoLite_init_zero, meshtastic_NodeInfoLite_init_zero, meshtastic_NodeInfoLite_init_zero, meshtastic_NodeInfoLite_init_zero, meshtastic_NodeInfoLite_init_zero, meshtastic_NodeInfoLite_init_zero}} -#define meshtastic_NodeInfoLite_init_zero {0, false, meshtastic_User_init_zero, false, meshtastic_PositionLite_init_zero, 0, 0, false, meshtastic_DeviceMetrics_init_zero, 0} #define meshtastic_PositionLite_init_zero {0, 0, 0, 0, _meshtastic_Position_LocSource_MIN} +#define meshtastic_UserLite_init_zero {{0}, "", "", _meshtastic_HardwareModel_MIN, 0, _meshtastic_Config_DeviceConfig_Role_MIN, {0, {0}}} +#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} +#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}, {0}} #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} #define meshtastic_OEMStore_init_zero {0, 0, {0, {0}}, _meshtastic_ScreenFonts_MIN, "", {0, {0}}, false, meshtastic_LocalConfig_init_zero, false, meshtastic_LocalModuleConfig_init_zero} -#define meshtastic_NodeRemoteHardwarePin_init_zero {0, false, meshtastic_RemoteHardwarePin_init_zero} /* Field tags (for use in manual encoding/decoding) */ #define meshtastic_PositionLite_latitude_i_tag 1 @@ -193,6 +220,13 @@ extern "C" { #define meshtastic_PositionLite_altitude_tag 3 #define meshtastic_PositionLite_time_tag 4 #define meshtastic_PositionLite_location_source_tag 5 +#define meshtastic_UserLite_macaddr_tag 1 +#define meshtastic_UserLite_long_name_tag 2 +#define meshtastic_UserLite_short_name_tag 3 +#define meshtastic_UserLite_hw_model_tag 4 +#define meshtastic_UserLite_is_licensed_tag 5 +#define meshtastic_UserLite_role_tag 6 +#define meshtastic_UserLite_public_key_tag 7 #define meshtastic_NodeInfoLite_num_tag 1 #define meshtastic_NodeInfoLite_user_tag 2 #define meshtastic_NodeInfoLite_position_tag 3 @@ -200,18 +234,9 @@ extern "C" { #define meshtastic_NodeInfoLite_last_heard_tag 5 #define meshtastic_NodeInfoLite_device_metrics_tag 6 #define meshtastic_NodeInfoLite_channel_tag 7 -#define meshtastic_ChannelFile_channels_tag 1 -#define meshtastic_ChannelFile_version_tag 2 -#define meshtastic_OEMStore_oem_icon_width_tag 1 -#define meshtastic_OEMStore_oem_icon_height_tag 2 -#define meshtastic_OEMStore_oem_icon_bits_tag 3 -#define meshtastic_OEMStore_oem_font_tag 4 -#define meshtastic_OEMStore_oem_text_tag 5 -#define meshtastic_OEMStore_oem_aes_key_tag 6 -#define meshtastic_OEMStore_oem_local_config_tag 7 -#define meshtastic_OEMStore_oem_local_module_config_tag 8 -#define meshtastic_NodeRemoteHardwarePin_node_num_tag 1 -#define meshtastic_NodeRemoteHardwarePin_pin_tag 2 +#define meshtastic_NodeInfoLite_via_mqtt_tag 8 +#define meshtastic_NodeInfoLite_hops_away_tag 9 +#define meshtastic_NodeInfoLite_is_favorite_tag 10 #define meshtastic_DeviceState_my_node_tag 2 #define meshtastic_DeviceState_owner_tag 3 #define meshtastic_DeviceState_receive_queue_tag 5 @@ -222,8 +247,55 @@ extern "C" { #define meshtastic_DeviceState_rx_waypoint_tag 12 #define meshtastic_DeviceState_node_remote_hardware_pins_tag 13 #define meshtastic_DeviceState_node_db_lite_tag 14 +#define meshtastic_ChannelFile_channels_tag 1 +#define meshtastic_ChannelFile_version_tag 2 +#define meshtastic_OEMStore_oem_icon_width_tag 1 +#define meshtastic_OEMStore_oem_icon_height_tag 2 +#define meshtastic_OEMStore_oem_icon_bits_tag 3 +#define meshtastic_OEMStore_oem_font_tag 4 +#define meshtastic_OEMStore_oem_text_tag 5 +#define meshtastic_OEMStore_oem_aes_key_tag 6 +#define meshtastic_OEMStore_oem_local_config_tag 7 +#define meshtastic_OEMStore_oem_local_module_config_tag 8 /* Struct field encoding specification for nanopb */ +#define meshtastic_PositionLite_FIELDLIST(X, a) \ +X(a, STATIC, SINGULAR, SFIXED32, latitude_i, 1) \ +X(a, STATIC, SINGULAR, SFIXED32, longitude_i, 2) \ +X(a, STATIC, SINGULAR, INT32, altitude, 3) \ +X(a, STATIC, SINGULAR, FIXED32, time, 4) \ +X(a, STATIC, SINGULAR, UENUM, location_source, 5) +#define meshtastic_PositionLite_CALLBACK NULL +#define meshtastic_PositionLite_DEFAULT NULL + +#define meshtastic_UserLite_FIELDLIST(X, a) \ +X(a, STATIC, SINGULAR, FIXED_LENGTH_BYTES, macaddr, 1) \ +X(a, STATIC, SINGULAR, STRING, long_name, 2) \ +X(a, STATIC, SINGULAR, STRING, short_name, 3) \ +X(a, STATIC, SINGULAR, UENUM, hw_model, 4) \ +X(a, STATIC, SINGULAR, BOOL, is_licensed, 5) \ +X(a, STATIC, SINGULAR, UENUM, role, 6) \ +X(a, STATIC, SINGULAR, BYTES, public_key, 7) +#define meshtastic_UserLite_CALLBACK NULL +#define meshtastic_UserLite_DEFAULT NULL + +#define meshtastic_NodeInfoLite_FIELDLIST(X, a) \ +X(a, STATIC, SINGULAR, UINT32, num, 1) \ +X(a, STATIC, OPTIONAL, MESSAGE, user, 2) \ +X(a, STATIC, OPTIONAL, MESSAGE, position, 3) \ +X(a, STATIC, SINGULAR, FLOAT, snr, 4) \ +X(a, STATIC, SINGULAR, FIXED32, last_heard, 5) \ +X(a, STATIC, OPTIONAL, MESSAGE, device_metrics, 6) \ +X(a, STATIC, SINGULAR, UINT32, channel, 7) \ +X(a, STATIC, SINGULAR, BOOL, via_mqtt, 8) \ +X(a, STATIC, OPTIONAL, UINT32, hops_away, 9) \ +X(a, STATIC, SINGULAR, BOOL, is_favorite, 10) +#define meshtastic_NodeInfoLite_CALLBACK NULL +#define meshtastic_NodeInfoLite_DEFAULT NULL +#define meshtastic_NodeInfoLite_user_MSGTYPE meshtastic_UserLite +#define meshtastic_NodeInfoLite_position_MSGTYPE meshtastic_PositionLite +#define meshtastic_NodeInfoLite_device_metrics_MSGTYPE meshtastic_DeviceMetrics + #define meshtastic_DeviceState_FIELDLIST(X, a) \ X(a, STATIC, OPTIONAL, MESSAGE, my_node, 2) \ X(a, STATIC, OPTIONAL, MESSAGE, owner, 3) \ @@ -234,8 +306,9 @@ X(a, STATIC, SINGULAR, BOOL, no_save, 9) \ X(a, STATIC, SINGULAR, BOOL, did_gps_reset, 11) \ X(a, STATIC, OPTIONAL, MESSAGE, rx_waypoint, 12) \ X(a, STATIC, REPEATED, MESSAGE, node_remote_hardware_pins, 13) \ -X(a, STATIC, REPEATED, MESSAGE, node_db_lite, 14) -#define meshtastic_DeviceState_CALLBACK NULL +X(a, CALLBACK, REPEATED, MESSAGE, node_db_lite, 14) +extern bool meshtastic_DeviceState_callback(pb_istream_t *istream, pb_ostream_t *ostream, const pb_field_t *field); +#define meshtastic_DeviceState_CALLBACK meshtastic_DeviceState_callback #define meshtastic_DeviceState_DEFAULT NULL #define meshtastic_DeviceState_my_node_MSGTYPE meshtastic_MyNodeInfo #define meshtastic_DeviceState_owner_MSGTYPE meshtastic_User @@ -245,29 +318,6 @@ X(a, STATIC, REPEATED, MESSAGE, node_db_lite, 14) #define meshtastic_DeviceState_node_remote_hardware_pins_MSGTYPE meshtastic_NodeRemoteHardwarePin #define meshtastic_DeviceState_node_db_lite_MSGTYPE meshtastic_NodeInfoLite -#define meshtastic_NodeInfoLite_FIELDLIST(X, a) \ -X(a, STATIC, SINGULAR, UINT32, num, 1) \ -X(a, STATIC, OPTIONAL, MESSAGE, user, 2) \ -X(a, STATIC, OPTIONAL, MESSAGE, position, 3) \ -X(a, STATIC, SINGULAR, FLOAT, snr, 4) \ -X(a, STATIC, SINGULAR, FIXED32, last_heard, 5) \ -X(a, STATIC, OPTIONAL, MESSAGE, device_metrics, 6) \ -X(a, STATIC, SINGULAR, UINT32, channel, 7) -#define meshtastic_NodeInfoLite_CALLBACK NULL -#define meshtastic_NodeInfoLite_DEFAULT NULL -#define meshtastic_NodeInfoLite_user_MSGTYPE meshtastic_User -#define meshtastic_NodeInfoLite_position_MSGTYPE meshtastic_PositionLite -#define meshtastic_NodeInfoLite_device_metrics_MSGTYPE meshtastic_DeviceMetrics - -#define meshtastic_PositionLite_FIELDLIST(X, a) \ -X(a, STATIC, SINGULAR, SFIXED32, latitude_i, 1) \ -X(a, STATIC, SINGULAR, SFIXED32, longitude_i, 2) \ -X(a, STATIC, SINGULAR, INT32, altitude, 3) \ -X(a, STATIC, SINGULAR, FIXED32, time, 4) \ -X(a, STATIC, SINGULAR, UENUM, location_source, 5) -#define meshtastic_PositionLite_CALLBACK NULL -#define meshtastic_PositionLite_DEFAULT NULL - #define meshtastic_ChannelFile_FIELDLIST(X, a) \ X(a, STATIC, REPEATED, MESSAGE, channels, 1) \ X(a, STATIC, SINGULAR, UINT32, version, 2) @@ -289,35 +339,29 @@ X(a, STATIC, OPTIONAL, MESSAGE, oem_local_module_config, 8) #define meshtastic_OEMStore_oem_local_config_MSGTYPE meshtastic_LocalConfig #define meshtastic_OEMStore_oem_local_module_config_MSGTYPE meshtastic_LocalModuleConfig -#define meshtastic_NodeRemoteHardwarePin_FIELDLIST(X, a) \ -X(a, STATIC, SINGULAR, UINT32, node_num, 1) \ -X(a, STATIC, OPTIONAL, MESSAGE, pin, 2) -#define meshtastic_NodeRemoteHardwarePin_CALLBACK NULL -#define meshtastic_NodeRemoteHardwarePin_DEFAULT NULL -#define meshtastic_NodeRemoteHardwarePin_pin_MSGTYPE meshtastic_RemoteHardwarePin - -extern const pb_msgdesc_t meshtastic_DeviceState_msg; -extern const pb_msgdesc_t meshtastic_NodeInfoLite_msg; extern const pb_msgdesc_t meshtastic_PositionLite_msg; +extern const pb_msgdesc_t meshtastic_UserLite_msg; +extern const pb_msgdesc_t meshtastic_NodeInfoLite_msg; +extern const pb_msgdesc_t meshtastic_DeviceState_msg; extern const pb_msgdesc_t meshtastic_ChannelFile_msg; extern const pb_msgdesc_t meshtastic_OEMStore_msg; -extern const pb_msgdesc_t meshtastic_NodeRemoteHardwarePin_msg; /* Defines for backwards compatibility with code written before nanopb-0.4.0 */ -#define meshtastic_DeviceState_fields &meshtastic_DeviceState_msg -#define meshtastic_NodeInfoLite_fields &meshtastic_NodeInfoLite_msg #define meshtastic_PositionLite_fields &meshtastic_PositionLite_msg +#define meshtastic_UserLite_fields &meshtastic_UserLite_msg +#define meshtastic_NodeInfoLite_fields &meshtastic_NodeInfoLite_msg +#define meshtastic_DeviceState_fields &meshtastic_DeviceState_msg #define meshtastic_ChannelFile_fields &meshtastic_ChannelFile_msg #define meshtastic_OEMStore_fields &meshtastic_OEMStore_msg -#define meshtastic_NodeRemoteHardwarePin_fields &meshtastic_NodeRemoteHardwarePin_msg /* Maximum encoded size of messages (where known) */ -#define meshtastic_ChannelFile_size 702 -#define meshtastic_DeviceState_size 17062 -#define meshtastic_NodeInfoLite_size 153 -#define meshtastic_NodeRemoteHardwarePin_size 29 -#define meshtastic_OEMStore_size 3246 +/* meshtastic_DeviceState_size depends on runtime parameters */ +#define MESHTASTIC_MESHTASTIC_DEVICEONLY_PB_H_MAX_SIZE meshtastic_OEMStore_size +#define meshtastic_ChannelFile_size 718 +#define meshtastic_NodeInfoLite_size 183 +#define meshtastic_OEMStore_size 3578 #define meshtastic_PositionLite_size 28 +#define meshtastic_UserLite_size 96 #ifdef __cplusplus } /* extern "C" */ diff --git a/src/mesh/generated/meshtastic/localonly.pb.c b/src/mesh/generated/meshtastic/localonly.pb.cpp similarity index 91% rename from src/mesh/generated/meshtastic/localonly.pb.c rename to src/mesh/generated/meshtastic/localonly.pb.cpp index 8fc3f1139..0a752a5a8 100644 --- a/src/mesh/generated/meshtastic/localonly.pb.c +++ b/src/mesh/generated/meshtastic/localonly.pb.cpp @@ -1,5 +1,5 @@ /* Automatically generated nanopb constant definitions */ -/* Generated by nanopb-0.4.7 */ +/* Generated by nanopb-0.4.9 */ #include "meshtastic/localonly.pb.h" #if PB_PROTO_HEADER_VERSION != 40 diff --git a/src/mesh/generated/meshtastic/localonly.pb.h b/src/mesh/generated/meshtastic/localonly.pb.h index 7d39da01f..6409aef74 100644 --- a/src/mesh/generated/meshtastic/localonly.pb.h +++ b/src/mesh/generated/meshtastic/localonly.pb.h @@ -1,5 +1,5 @@ /* Automatically generated nanopb header */ -/* Generated by nanopb-0.4.7 */ +/* Generated by nanopb-0.4.9 */ #ifndef PB_MESHTASTIC_MESHTASTIC_LOCALONLY_PB_H_INCLUDED #define PB_MESHTASTIC_MESHTASTIC_LOCALONLY_PB_H_INCLUDED @@ -38,6 +38,9 @@ typedef struct _meshtastic_LocalConfig { incompatible changes This integer is set at build time and is private to NodeDB.cpp in the device code. */ uint32_t version; + /* The part of the config that is specific to Security settings */ + bool has_security; + meshtastic_Config_SecurityConfig security; } meshtastic_LocalConfig; typedef struct _meshtastic_LocalModuleConfig { @@ -92,9 +95,9 @@ extern "C" { #endif /* Initializer values for message structs */ -#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} +#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} #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} -#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} +#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} #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} /* Field tags (for use in manual encoding/decoding) */ @@ -106,6 +109,7 @@ extern "C" { #define meshtastic_LocalConfig_lora_tag 6 #define meshtastic_LocalConfig_bluetooth_tag 7 #define meshtastic_LocalConfig_version_tag 8 +#define meshtastic_LocalConfig_security_tag 9 #define meshtastic_LocalModuleConfig_mqtt_tag 1 #define meshtastic_LocalModuleConfig_serial_tag 2 #define meshtastic_LocalModuleConfig_external_notification_tag 3 @@ -130,7 +134,8 @@ X(a, STATIC, OPTIONAL, MESSAGE, network, 4) \ X(a, STATIC, OPTIONAL, MESSAGE, display, 5) \ X(a, STATIC, OPTIONAL, MESSAGE, lora, 6) \ X(a, STATIC, OPTIONAL, MESSAGE, bluetooth, 7) \ -X(a, STATIC, SINGULAR, UINT32, version, 8) +X(a, STATIC, SINGULAR, UINT32, version, 8) \ +X(a, STATIC, OPTIONAL, MESSAGE, security, 9) #define meshtastic_LocalConfig_CALLBACK NULL #define meshtastic_LocalConfig_DEFAULT NULL #define meshtastic_LocalConfig_device_MSGTYPE meshtastic_Config_DeviceConfig @@ -140,6 +145,7 @@ X(a, STATIC, SINGULAR, UINT32, version, 8) #define meshtastic_LocalConfig_display_MSGTYPE meshtastic_Config_DisplayConfig #define meshtastic_LocalConfig_lora_MSGTYPE meshtastic_Config_LoRaConfig #define meshtastic_LocalConfig_bluetooth_MSGTYPE meshtastic_Config_BluetoothConfig +#define meshtastic_LocalConfig_security_MSGTYPE meshtastic_Config_SecurityConfig #define meshtastic_LocalModuleConfig_FIELDLIST(X, a) \ X(a, STATIC, OPTIONAL, MESSAGE, mqtt, 1) \ @@ -180,8 +186,9 @@ extern const pb_msgdesc_t meshtastic_LocalModuleConfig_msg; #define meshtastic_LocalModuleConfig_fields &meshtastic_LocalModuleConfig_msg /* Maximum encoded size of messages (where known) */ -#define meshtastic_LocalConfig_size 469 -#define meshtastic_LocalModuleConfig_size 631 +#define MESHTASTIC_MESHTASTIC_LOCALONLY_PB_H_MAX_SIZE meshtastic_LocalConfig_size +#define meshtastic_LocalConfig_size 735 +#define meshtastic_LocalModuleConfig_size 697 #ifdef __cplusplus } /* extern "C" */ diff --git a/src/mesh/generated/meshtastic/mesh.pb.c b/src/mesh/generated/meshtastic/mesh.pb.cpp similarity index 64% rename from src/mesh/generated/meshtastic/mesh.pb.c rename to src/mesh/generated/meshtastic/mesh.pb.cpp index 790f8be2d..a0c1e2e73 100644 --- a/src/mesh/generated/meshtastic/mesh.pb.c +++ b/src/mesh/generated/meshtastic/mesh.pb.cpp @@ -1,5 +1,5 @@ /* Automatically generated nanopb constant definitions */ -/* Generated by nanopb-0.4.7 */ +/* Generated by nanopb-0.4.9 */ #include "meshtastic/mesh.pb.h" #if PB_PROTO_HEADER_VERSION != 40 @@ -30,13 +30,13 @@ PB_BIND(meshtastic_MqttClientProxyMessage, meshtastic_MqttClientProxyMessage, 2) PB_BIND(meshtastic_MeshPacket, meshtastic_MeshPacket, 2) -PB_BIND(meshtastic_NodeInfo, meshtastic_NodeInfo, AUTO) +PB_BIND(meshtastic_NodeInfo, meshtastic_NodeInfo, 2) PB_BIND(meshtastic_MyNodeInfo, meshtastic_MyNodeInfo, AUTO) -PB_BIND(meshtastic_LogRecord, meshtastic_LogRecord, AUTO) +PB_BIND(meshtastic_LogRecord, meshtastic_LogRecord, 2) PB_BIND(meshtastic_QueueStatus, meshtastic_QueueStatus, AUTO) @@ -45,6 +45,12 @@ PB_BIND(meshtastic_QueueStatus, meshtastic_QueueStatus, AUTO) PB_BIND(meshtastic_FromRadio, meshtastic_FromRadio, 2) +PB_BIND(meshtastic_ClientNotification, meshtastic_ClientNotification, 2) + + +PB_BIND(meshtastic_FileInfo, meshtastic_FileInfo, AUTO) + + PB_BIND(meshtastic_ToRadio, meshtastic_ToRadio, 2) @@ -60,6 +66,30 @@ PB_BIND(meshtastic_Neighbor, meshtastic_Neighbor, AUTO) PB_BIND(meshtastic_DeviceMetadata, meshtastic_DeviceMetadata, AUTO) +PB_BIND(meshtastic_Heartbeat, meshtastic_Heartbeat, AUTO) + + +PB_BIND(meshtastic_NodeRemoteHardwarePin, meshtastic_NodeRemoteHardwarePin, AUTO) + + +PB_BIND(meshtastic_ChunkedPayload, meshtastic_ChunkedPayload, AUTO) + + +PB_BIND(meshtastic_resend_chunks, meshtastic_resend_chunks, AUTO) + + +PB_BIND(meshtastic_ChunkedPayloadResponse, meshtastic_ChunkedPayloadResponse, AUTO) + + + + + + + + + + + diff --git a/src/mesh/generated/meshtastic/mesh.pb.h b/src/mesh/generated/meshtastic/mesh.pb.h index e8a27d43f..fb154e9d5 100644 --- a/src/mesh/generated/meshtastic/mesh.pb.h +++ b/src/mesh/generated/meshtastic/mesh.pb.h @@ -1,5 +1,5 @@ /* Automatically generated nanopb header */ -/* Generated by nanopb-0.4.7 */ +/* Generated by nanopb-0.4.9 */ #ifndef PB_MESHTASTIC_MESHTASTIC_MESH_PB_H_INCLUDED #define PB_MESHTASTIC_MESHTASTIC_MESH_PB_H_INCLUDED @@ -63,6 +63,16 @@ typedef enum _meshtastic_HardwareModel { meshtastic_HardwareModel_NANO_G2_ULTRA = 18, /* LoRAType device: https://loratype.org/ */ meshtastic_HardwareModel_LORA_TYPE = 19, + /* wiphone https://www.wiphone.io/ */ + meshtastic_HardwareModel_WIPHONE = 20, + /* WIO Tracker WM1110 family from Seeed Studio. Includes wio-1110-tracker and wio-1110-sdk */ + meshtastic_HardwareModel_WIO_WM1110 = 21, + /* RAK2560 Solar base station based on RAK4630 */ + meshtastic_HardwareModel_RAK2560 = 22, + /* Heltec HRU-3601: https://heltec.org/project/hru-3601/ */ + meshtastic_HardwareModel_HELTEC_HRU_3601 = 23, + /* Heltec Wireless Bridge */ + meshtastic_HardwareModel_HELTEC_WIRELESS_BRIDGE = 24, /* B&Q Consulting Station Edition G1: https://uniteng.com/wiki/doku.php?id=meshtastic:station */ meshtastic_HardwareModel_STATION_G1 = 25, /* RAK11310 (RP2040 + SX1262) */ @@ -75,6 +85,8 @@ typedef enum _meshtastic_HardwareModel { meshtastic_HardwareModel_CANARYONE = 29, /* Waveshare RP2040 LoRa - https://www.waveshare.com/rp2040-lora.htm */ meshtastic_HardwareModel_RP2040_LORA = 30, + /* B&Q Consulting Station G2: https://wiki.uniteng.com/en/meshtastic/station-g2 */ + meshtastic_HardwareModel_STATION_G2 = 31, /* --------------------------------------------------------------------------- Less common/prototype boards listed here (needs one more byte over the air) --------------------------------------------------------------------------- */ @@ -97,7 +109,7 @@ typedef enum _meshtastic_HardwareModel { meshtastic_HardwareModel_NRF52840_PCA10059 = 40, /* Custom Disaster Radio esp32 v3 device https://github.com/sudomesh/disaster-radio/tree/master/hardware/board_esp32_v3 */ meshtastic_HardwareModel_DR_DEV = 41, - /* M5 esp32 based MCU modules with enclosure, TFT and LORA Shields. All Variants (Basic, Core, Fire, Core2, Paper) https://m5stack.com/ */ + /* M5 esp32 based MCU modules with enclosure, TFT and LORA Shields. All Variants (Basic, Core, Fire, Core2, CoreS3, Paper) https://m5stack.com/ */ meshtastic_HardwareModel_M5STACK = 42, /* New Heltec LoRA32 with ESP32-S3 CPU */ meshtastic_HardwareModel_HELTEC_V3 = 43, @@ -139,6 +151,66 @@ typedef enum _meshtastic_HardwareModel { /* Heltec Wireless Tracker with ESP32-S3 CPU, built-in GPS, and TFT Older "V1.0" Variant */ meshtastic_HardwareModel_HELTEC_WIRELESS_TRACKER_V1_0 = 58, + /* unPhone with ESP32-S3, TFT touchscreen, LSM6DS3TR-C accelerometer and gyroscope */ + meshtastic_HardwareModel_UNPHONE = 59, + /* Teledatics TD-LORAC NRF52840 based M.2 LoRA module + Compatible with the TD-WRLS development board */ + meshtastic_HardwareModel_TD_LORAC = 60, + /* CDEBYTE EoRa-S3 board using their own MM modules, clone of LILYGO T3S3 */ + meshtastic_HardwareModel_CDEBYTE_EORA_S3 = 61, + /* TWC_MESH_V4 + Adafruit NRF52840 feather express with SX1262, SSD1306 OLED and NEO6M GPS */ + meshtastic_HardwareModel_TWC_MESH_V4 = 62, + /* NRF52_PROMICRO_DIY + Promicro NRF52840 with SX1262/LLCC68, SSD1306 OLED and NEO6M GPS */ + meshtastic_HardwareModel_NRF52_PROMICRO_DIY = 63, + /* RadioMaster 900 Bandit Nano, https://www.radiomasterrc.com/products/bandit-nano-expresslrs-rf-module + ESP32-D0WDQ6 With SX1276/SKY66122, SSD1306 OLED and No GPS */ + meshtastic_HardwareModel_RADIOMASTER_900_BANDIT_NANO = 64, + /* Heltec Capsule Sensor V3 with ESP32-S3 CPU, Portable LoRa device that can replace GNSS modules or sensors */ + meshtastic_HardwareModel_HELTEC_CAPSULE_SENSOR_V3 = 65, + /* Heltec Vision Master T190 with ESP32-S3 CPU, and a 1.90 inch TFT display */ + meshtastic_HardwareModel_HELTEC_VISION_MASTER_T190 = 66, + /* Heltec Vision Master E213 with ESP32-S3 CPU, and a 2.13 inch E-Ink display */ + meshtastic_HardwareModel_HELTEC_VISION_MASTER_E213 = 67, + /* Heltec Vision Master E290 with ESP32-S3 CPU, and a 2.9 inch E-Ink display */ + meshtastic_HardwareModel_HELTEC_VISION_MASTER_E290 = 68, + /* Heltec Mesh Node T114 board with nRF52840 CPU, and a 1.14 inch TFT display, Ultimate low-power design, + specifically adapted for the Meshtatic project */ + meshtastic_HardwareModel_HELTEC_MESH_NODE_T114 = 69, + /* Sensecap Indicator from Seeed Studio. ESP32-S3 device with TFT and RP2040 coprocessor */ + meshtastic_HardwareModel_SENSECAP_INDICATOR = 70, + /* Seeed studio T1000-E tracker card. NRF52840 w/ LR1110 radio, GPS, button, buzzer, and sensors. */ + meshtastic_HardwareModel_TRACKER_T1000_E = 71, + /* RAK3172 STM32WLE5 Module (https://store.rakwireless.com/products/wisduo-lpwan-module-rak3172) */ + meshtastic_HardwareModel_RAK3172 = 72, + /* Seeed Studio Wio-E5 (either mini or Dev kit) using STM32WL chip. */ + meshtastic_HardwareModel_WIO_E5 = 73, + /* RadioMaster 900 Bandit, https://www.radiomasterrc.com/products/bandit-expresslrs-rf-module + SSD1306 OLED and No GPS */ + meshtastic_HardwareModel_RADIOMASTER_900_BANDIT = 74, + /* Minewsemi ME25LS01 (ME25LE01_V1.0). NRF52840 w/ LR1110 radio, buttons and leds and pins. */ + meshtastic_HardwareModel_ME25LS01_4Y10TD = 75, + /* RP2040_FEATHER_RFM95 + Adafruit Feather RP2040 with RFM95 LoRa Radio RFM95 with SX1272, SSD1306 OLED + https://www.adafruit.com/product/5714 + https://www.adafruit.com/product/326 + https://www.adafruit.com/product/938 + ^^^ short A0 to switch to I2C address 0x3C */ + meshtastic_HardwareModel_RP2040_FEATHER_RFM95 = 76, + /* M5 esp32 based MCU modules with enclosure, TFT and LORA Shields. All Variants (Basic, Core, Fire, Core2, CoreS3, Paper) https://m5stack.com/ */ + meshtastic_HardwareModel_M5STACK_COREBASIC = 77, + meshtastic_HardwareModel_M5STACK_CORE2 = 78, + /* Pico2 with Waveshare Hat, same as Pico */ + meshtastic_HardwareModel_RPI_PICO2 = 79, + /* M5 esp32 based MCU modules with enclosure, TFT and LORA Shields. All Variants (Basic, Core, Fire, Core2, CoreS3, Paper) https://m5stack.com/ */ + meshtastic_HardwareModel_M5STACK_CORES3 = 80, + /* Seeed XIAO S3 DK */ + meshtastic_HardwareModel_SEEED_XIAO_S3 = 81, + /* Nordic nRF52840+Semtech SX1262 LoRa BLE Combo Module. nRF52840+SX1262 MS24SF1 */ + meshtastic_HardwareModel_MS24SF1 = 82, + /* Lilygo TLora-C6 with the new ESP32-C6 MCU */ + meshtastic_HardwareModel_TLORA_C6 = 83, /* ------------------------------------------------------------------------------------------------------------------------------------------ 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. ------------------------------------------------------------------------------------------------------------------------------------------ */ @@ -187,7 +259,14 @@ typedef enum _meshtastic_CriticalErrorCode { meshtastic_CriticalErrorCode_SX1262_FAILURE = 10, /* A (likely software but possibly hardware) failure was detected while trying to send packets. 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 */ - meshtastic_CriticalErrorCode_RADIO_SPI_BUG = 11 + meshtastic_CriticalErrorCode_RADIO_SPI_BUG = 11, + /* Corruption was detected on the flash filesystem but we were able to repair things. + 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. */ + meshtastic_CriticalErrorCode_FLASH_CORRUPTION_RECOVERABLE = 12, + /* Corruption was detected on the flash filesystem but we were unable to repair things. + NOTE: Your node will probably need to be reconfigured the next time it reboots (it will lose the region code etc...) + 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. */ + meshtastic_CriticalErrorCode_FLASH_CORRUPTION_UNRECOVERABLE = 13 } meshtastic_CriticalErrorCode; /* How the location was acquired: manual, onboard GPS, external (EUD) GPS */ @@ -245,7 +324,15 @@ typedef enum _meshtastic_Routing_Error { meshtastic_Routing_Error_BAD_REQUEST = 32, /* The application layer service on the remote node received your request, but considered your request not authorized (i.e you did not send the request on the required bound channel) */ - meshtastic_Routing_Error_NOT_AUTHORIZED = 33 + meshtastic_Routing_Error_NOT_AUTHORIZED = 33, + /* 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) */ + meshtastic_Routing_Error_PKI_FAILED = 34, + /* The receiving node does not have a Public Key to decode with */ + meshtastic_Routing_Error_PKI_UNKNOWN_PUBKEY = 35, + /* Admin packet otherwise checks out, but uses a bogus or expired session key */ + meshtastic_Routing_Error_ADMIN_BAD_SESSION_KEY = 36, + /* Admin packet sent using PKC, but not from a public key on the admin key list */ + meshtastic_Routing_Error_ADMIN_PUBLIC_KEY_UNAUTHORIZED = 37 } meshtastic_Routing_Error; /* The priority of this message for sending. @@ -279,6 +366,11 @@ typedef enum _meshtastic_MeshPacket_Priority { /* If priority is unset but the message is marked as want_ack, assume it is important and use a slightly higher priority */ meshtastic_MeshPacket_Priority_RELIABLE = 70, + /* If priority is unset but the packet is a response to a request, we want it to get there relatively quickly. + Furthermore, responses stop relaying packets directed to a node early. */ + meshtastic_MeshPacket_Priority_RESPONSE = 80, + /* Higher priority for specific message types (portnums) to distinguish between other reliable packets. */ + meshtastic_MeshPacket_Priority_HIGH = 100, /* Ack/naks are sent with very high priority to ensure that retransmission stops as soon as possible */ meshtastic_MeshPacket_Priority_ACK = 120, @@ -319,10 +411,13 @@ typedef enum _meshtastic_LogRecord_Level { typedef struct _meshtastic_Position { /* The new preferred location encoding, multiply by 1e-7 to get degrees in floating point */ + bool has_latitude_i; int32_t latitude_i; /* TODO: REPLACE */ + bool has_longitude_i; int32_t longitude_i; /* In meters above MSL (but see issue #359) */ + bool has_altitude; int32_t altitude; /* This is usually not sent over the mesh (to save space), but it is sent from the phone so that the local device can set its time if it is sent over @@ -338,8 +433,10 @@ typedef struct _meshtastic_Position { /* Pos. timestamp milliseconds adjustment (rarely available or required) */ int32_t timestamp_millis_adjust; /* HAE altitude in meters - can be used instead of MSL altitude */ + bool has_altitude_hae; int32_t altitude_hae; /* Geoidal separation in meters */ + bool has_altitude_geoidal_separation; int32_t altitude_geoidal_separation; /* Horizontal, Vertical and Position Dilution of Precision, in 1/100 units - PDOP is sufficient for most cases @@ -361,8 +458,10 @@ typedef struct _meshtastic_Position { - "heading" is where the fuselage points (measured in horizontal plane) - "yaw" indicates a relative rotation about the vertical axis TODO: REMOVE/INTEGRATE */ + bool has_ground_speed; uint32_t ground_speed; /* TODO: REPLACE */ + bool has_ground_track; uint32_t ground_track; /* GPS fix quality (from NMEA GxGGA statement or similar) */ uint32_t fix_quality; @@ -384,6 +483,7 @@ typedef struct _meshtastic_Position { uint32_t precision_bits; } meshtastic_Position; +typedef PB_BYTES_ARRAY_T(32) meshtastic_User_public_key_t; /* Broadcast when a newly powered mesh node wants to find a node num it can use Sent from the phone over bluetooth to set the user id for the owner of this node. Also sent from nodes to each other when a new node signs on (so all clients can have this info) @@ -430,13 +530,25 @@ typedef struct _meshtastic_User { bool is_licensed; /* Indicates that the user's role in the mesh */ meshtastic_Config_DeviceConfig_Role role; + /* The public key of the user's device. + This is sent out to other nodes on the mesh to allow them to compute a shared secret key. */ + meshtastic_User_public_key_t public_key; } meshtastic_User; -/* A message used in our Dynamic Source Routing protocol (RFC 4728 based) */ +/* A message used in a traceroute */ typedef struct _meshtastic_RouteDiscovery { - /* The list of nodenums this packet has visited so far */ + /* The list of nodenums this packet has visited so far to the destination. */ pb_size_t route_count; uint32_t route[8]; + /* The list of SNRs (in dB, scaled by 4) in the route towards the destination. */ + pb_size_t snr_towards_count; + int8_t snr_towards[8]; + /* The list of nodenums the packet has visited on the way back from the destination. */ + pb_size_t route_back_count; + uint32_t route_back[8]; + /* The list of SNRs (in dB, scaled by 4) in the route back from the destination. */ + pb_size_t snr_back_count; + int8_t snr_back[8]; } meshtastic_RouteDiscovery; /* A Routing control Data packet handled by the routing module */ @@ -484,6 +596,9 @@ typedef struct _meshtastic_Data { /* Defaults to false. If true, then what is in the payload should be treated as an emoji like giving a message a heart or poop emoji. */ uint32_t emoji; + /* Bitfield for extra flags. First use is to indicate that user approves the packet being uploaded to MQTT. */ + bool has_bitfield; + uint8_t bitfield; } meshtastic_Data; /* Waypoint message, used to share arbitrary locations across the mesh */ @@ -491,8 +606,10 @@ typedef struct _meshtastic_Waypoint { /* Id of the waypoint */ uint32_t id; /* latitude_i */ + bool has_latitude_i; int32_t latitude_i; /* longitude_i */ + bool has_longitude_i; int32_t longitude_i; /* Time the waypoint is to expire (epoch) */ uint32_t expire; @@ -524,17 +641,16 @@ typedef struct _meshtastic_MqttClientProxyMessage { } meshtastic_MqttClientProxyMessage; typedef PB_BYTES_ARRAY_T(256) meshtastic_MeshPacket_encrypted_t; +typedef PB_BYTES_ARRAY_T(32) meshtastic_MeshPacket_public_key_t; /* A packet envelope sent/received over the mesh only payload_variant is sent in the payload portion of the LORA packet. The other fields are either not sent at all, or sent in the special 16 byte LORA header. */ typedef struct _meshtastic_MeshPacket { /* The sending node number. Note: Our crypto implementation uses this field as well. - See [crypto](/docs/overview/encryption) for details. - FIXME - really should be fixed32 instead, this encoding only hurts the ble link though. */ + See [crypto](/docs/overview/encryption) for details. */ uint32_t from; - /* The (immediatSee Priority description for more details.y should be fixed32 instead, this encoding only - hurts the ble link though. */ + /* The (immediate) destination for this packet */ uint32_t to; /* (Usually) If set, this indicates the index in the secondary_channels table that this packet was sent/received on. If unset, packet was on the primary channel. @@ -558,9 +674,7 @@ typedef struct _meshtastic_MeshPacket { needs to be unique for a few minutes (long enough to last for the length of any ACK or the completion of a mesh broadcast flood). Note: Our crypto implementation uses this id as well. - See [crypto](/docs/overview/encryption) for details. - FIXME - really should be fixed32 instead, this encoding only - hurts the ble link though. */ + See [crypto](/docs/overview/encryption) for details. */ uint32_t id; /* The time this message was received by the esp32 (secs since 1970). Note: this field is _never_ sent on the radio link itself (to save space) Times @@ -595,6 +709,13 @@ typedef struct _meshtastic_MeshPacket { meshtastic_MeshPacket_Delayed delayed; /* Describes whether this packet passed via MQTT somewhere along the path it currently took. */ bool via_mqtt; + /* Hop limit with which the original packet started. Sent via LoRa using three bits in the unencrypted header. + When receiving a packet, the difference between hop_start and hop_limit gives how many hops it traveled. */ + uint8_t hop_start; + /* Records the public key the packet was encrypted with, if applicable. */ + meshtastic_MeshPacket_public_key_t public_key; + /* Indicates whether the packet was en/decrypted using PKI */ + bool pki_encrypted; } meshtastic_MeshPacket; /* The bluetooth to device link: @@ -633,6 +754,14 @@ typedef struct _meshtastic_NodeInfo { meshtastic_DeviceMetrics device_metrics; /* local channel index we heard that node on. Only populated if its not the default channel. */ uint8_t channel; + /* True if we witnessed the node over MQTT instead of LoRA transport */ + bool via_mqtt; + /* Number of hops away from us this node is (0 if adjacent) */ + bool has_hops_away; + uint8_t hops_away; + /* True if node is in our favorites list + Persists between NodeDB internal clean ups */ + bool is_favorite; } meshtastic_NodeInfo; /* Unique local debugging info for this node @@ -657,11 +786,11 @@ typedef struct _meshtastic_MyNodeInfo { and then extend as needed by emitting multiple records. */ typedef struct _meshtastic_LogRecord { /* Log levels, chosen to match python logging conventions. */ - char message[64]; + char message[384]; /* Seconds since 1970 - or 0 for unknown/unset */ uint32_t time; /* Usually based on thread name - if known */ - char source[8]; + char source[32]; /* Not yet set */ meshtastic_LogRecord_Level level; } meshtastic_LogRecord; @@ -677,31 +806,29 @@ typedef struct _meshtastic_QueueStatus { uint32_t mesh_packet_id; } meshtastic_QueueStatus; -/* Packets/commands to the radio will be written (reliably) to the toRadio characteristic. - Once the write completes the phone can assume it is handled. */ -typedef struct _meshtastic_ToRadio { - pb_size_t which_payload_variant; - union { - /* Send this packet on the mesh */ - meshtastic_MeshPacket packet; - /* Phone wants radio to send full node db to the phone, This is - typically the first packet sent to the radio when the phone gets a - bluetooth connection. The radio will respond by sending back a - MyNodeInfo, a owner, a radio config and a series of - FromRadio.node_infos, and config_complete - the integer you write into this field will be reported back in the - config_complete_id response this allows clients to never be confused by - a stale old partially sent config. */ - uint32_t want_config_id; - /* Tell API server we are disconnecting now. - This is useful for serial links where there is no hardware/protocol based notification that the client has dropped the link. - (Sending this message is optional for clients) */ - bool disconnect; - meshtastic_XModem xmodemPacket; - /* MQTT Client Proxy Message (for client / phone subscribed to MQTT sending to device) */ - meshtastic_MqttClientProxyMessage mqttClientProxyMessage; - }; -} meshtastic_ToRadio; +/* A notification message from the device to the client + To be used for important messages that should to be displayed to the user + in the form of push notifications or validation messages when saving + invalid configuration. */ +typedef struct _meshtastic_ClientNotification { + /* The id of the packet we're notifying in response to */ + bool has_reply_id; + uint32_t reply_id; + /* Seconds since 1970 - or 0 for unknown/unset */ + uint32_t time; + /* The level type of notification */ + meshtastic_LogRecord_Level level; + /* The message body of the notification */ + char message[400]; +} meshtastic_ClientNotification; + +/* Individual File info for the device */ +typedef struct _meshtastic_FileInfo { + /* The fully qualified path of the file */ + char file_name[228]; + /* The size of the file in bytes */ + uint32_t size_bytes; +} meshtastic_FileInfo; typedef PB_BYTES_ARRAY_T(237) meshtastic_Compressed_data_t; /* Compressed message payload */ @@ -761,6 +888,8 @@ typedef struct _meshtastic_DeviceMetadata { meshtastic_HardwareModel hw_model; /* Has Remote Hardware enabled */ bool hasRemoteHardware; + /* Has PKC capabilities */ + bool hasPKC; } meshtastic_DeviceMetadata; /* Packets from the radio to the phone will appear on the fromRadio characteristic. @@ -807,9 +936,88 @@ typedef struct _meshtastic_FromRadio { meshtastic_DeviceMetadata metadata; /* MQTT Client Proxy Message (device sending to client / phone for publishing to MQTT) */ meshtastic_MqttClientProxyMessage mqttClientProxyMessage; + /* File system manifest messages */ + meshtastic_FileInfo fileInfo; + /* Notification message to the client */ + meshtastic_ClientNotification clientNotification; }; } meshtastic_FromRadio; +/* A heartbeat message is sent to the node from the client to keep the connection alive. + This is currently only needed to keep serial connections alive, but can be used by any PhoneAPI. */ +typedef struct _meshtastic_Heartbeat { + char dummy_field; +} meshtastic_Heartbeat; + +/* Packets/commands to the radio will be written (reliably) to the toRadio characteristic. + Once the write completes the phone can assume it is handled. */ +typedef struct _meshtastic_ToRadio { + pb_size_t which_payload_variant; + union { + /* Send this packet on the mesh */ + meshtastic_MeshPacket packet; + /* Phone wants radio to send full node db to the phone, This is + typically the first packet sent to the radio when the phone gets a + bluetooth connection. The radio will respond by sending back a + MyNodeInfo, a owner, a radio config and a series of + FromRadio.node_infos, and config_complete + the integer you write into this field will be reported back in the + config_complete_id response this allows clients to never be confused by + a stale old partially sent config. */ + uint32_t want_config_id; + /* Tell API server we are disconnecting now. + This is useful for serial links where there is no hardware/protocol based notification that the client has dropped the link. + (Sending this message is optional for clients) */ + bool disconnect; + meshtastic_XModem xmodemPacket; + /* MQTT Client Proxy Message (for client / phone subscribed to MQTT sending to device) */ + meshtastic_MqttClientProxyMessage mqttClientProxyMessage; + /* Heartbeat message (used to keep the device connection awake on serial) */ + meshtastic_Heartbeat heartbeat; + }; +} meshtastic_ToRadio; + +/* RemoteHardwarePins associated with a node */ +typedef struct _meshtastic_NodeRemoteHardwarePin { + /* The node_num exposing the available gpio pin */ + uint32_t node_num; + /* The the available gpio pin for usage with RemoteHardware module */ + bool has_pin; + meshtastic_RemoteHardwarePin pin; +} meshtastic_NodeRemoteHardwarePin; + +typedef PB_BYTES_ARRAY_T(228) meshtastic_ChunkedPayload_payload_chunk_t; +typedef struct _meshtastic_ChunkedPayload { + /* The ID of the entire payload */ + uint32_t payload_id; + /* The total number of chunks in the payload */ + uint16_t chunk_count; + /* The current chunk index in the total */ + uint16_t chunk_index; + /* The binary data of the current chunk */ + meshtastic_ChunkedPayload_payload_chunk_t payload_chunk; +} meshtastic_ChunkedPayload; + +/* Wrapper message for broken repeated oneof support */ +typedef struct _meshtastic_resend_chunks { + pb_callback_t chunks; +} meshtastic_resend_chunks; + +/* Responses to a ChunkedPayload request */ +typedef struct _meshtastic_ChunkedPayloadResponse { + /* The ID of the entire payload */ + uint32_t payload_id; + pb_size_t which_payload_variant; + union { + /* Request to transfer chunked payload */ + bool request_transfer; + /* Accept the transfer chunked payload */ + bool accept_transfer; + /* Request missing indexes in the chunked payload */ + meshtastic_resend_chunks resend_chunks; + } payload_variant; +} meshtastic_ChunkedPayloadResponse; + #ifdef __cplusplus extern "C" { @@ -825,8 +1033,8 @@ extern "C" { #define _meshtastic_Constants_ARRAYSIZE ((meshtastic_Constants)(meshtastic_Constants_DATA_PAYLOAD_LEN+1)) #define _meshtastic_CriticalErrorCode_MIN meshtastic_CriticalErrorCode_NONE -#define _meshtastic_CriticalErrorCode_MAX meshtastic_CriticalErrorCode_RADIO_SPI_BUG -#define _meshtastic_CriticalErrorCode_ARRAYSIZE ((meshtastic_CriticalErrorCode)(meshtastic_CriticalErrorCode_RADIO_SPI_BUG+1)) +#define _meshtastic_CriticalErrorCode_MAX meshtastic_CriticalErrorCode_FLASH_CORRUPTION_UNRECOVERABLE +#define _meshtastic_CriticalErrorCode_ARRAYSIZE ((meshtastic_CriticalErrorCode)(meshtastic_CriticalErrorCode_FLASH_CORRUPTION_UNRECOVERABLE+1)) #define _meshtastic_Position_LocSource_MIN meshtastic_Position_LocSource_LOC_UNSET #define _meshtastic_Position_LocSource_MAX meshtastic_Position_LocSource_LOC_EXTERNAL @@ -837,8 +1045,8 @@ extern "C" { #define _meshtastic_Position_AltSource_ARRAYSIZE ((meshtastic_Position_AltSource)(meshtastic_Position_AltSource_ALT_BAROMETRIC+1)) #define _meshtastic_Routing_Error_MIN meshtastic_Routing_Error_NONE -#define _meshtastic_Routing_Error_MAX meshtastic_Routing_Error_NOT_AUTHORIZED -#define _meshtastic_Routing_Error_ARRAYSIZE ((meshtastic_Routing_Error)(meshtastic_Routing_Error_NOT_AUTHORIZED+1)) +#define _meshtastic_Routing_Error_MAX meshtastic_Routing_Error_ADMIN_PUBLIC_KEY_UNAUTHORIZED +#define _meshtastic_Routing_Error_ARRAYSIZE ((meshtastic_Routing_Error)(meshtastic_Routing_Error_ADMIN_PUBLIC_KEY_UNAUTHORIZED+1)) #define _meshtastic_MeshPacket_Priority_MIN meshtastic_MeshPacket_Priority_UNSET #define _meshtastic_MeshPacket_Priority_MAX meshtastic_MeshPacket_Priority_MAX @@ -874,6 +1082,9 @@ extern "C" { +#define meshtastic_ClientNotification_level_ENUMTYPE meshtastic_LogRecord_Level + + #define meshtastic_Compressed_portnum_ENUMTYPE meshtastic_PortNum @@ -883,43 +1094,62 @@ extern "C" { #define meshtastic_DeviceMetadata_hw_model_ENUMTYPE meshtastic_HardwareModel + + + + + /* Initializer values for message structs */ -#define meshtastic_Position_init_default {0, 0, 0, 0, _meshtastic_Position_LocSource_MIN, _meshtastic_Position_AltSource_MIN, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0} -#define meshtastic_User_init_default {"", "", "", {0}, _meshtastic_HardwareModel_MIN, 0, _meshtastic_Config_DeviceConfig_Role_MIN} -#define meshtastic_RouteDiscovery_init_default {0, {0, 0, 0, 0, 0, 0, 0, 0}} +#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} +#define meshtastic_User_init_default {"", "", "", {0}, _meshtastic_HardwareModel_MIN, 0, _meshtastic_Config_DeviceConfig_Role_MIN, {0, {0}}} +#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}} #define meshtastic_Routing_init_default {0, {meshtastic_RouteDiscovery_init_default}} -#define meshtastic_Data_init_default {_meshtastic_PortNum_MIN, {0, {0}}, 0, 0, 0, 0, 0, 0} -#define meshtastic_Waypoint_init_default {0, 0, 0, 0, 0, "", "", 0} +#define meshtastic_Data_init_default {_meshtastic_PortNum_MIN, {0, {0}}, 0, 0, 0, 0, 0, 0, false, 0} +#define meshtastic_Waypoint_init_default {0, false, 0, false, 0, 0, 0, "", "", 0} #define meshtastic_MqttClientProxyMessage_init_default {"", 0, {{0, {0}}}, 0} -#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} -#define meshtastic_NodeInfo_init_default {0, false, meshtastic_User_init_default, false, meshtastic_Position_init_default, 0, 0, false, meshtastic_DeviceMetrics_init_default, 0} +#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} +#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} #define meshtastic_MyNodeInfo_init_default {0, 0, 0} #define meshtastic_LogRecord_init_default {"", 0, "", _meshtastic_LogRecord_Level_MIN} #define meshtastic_QueueStatus_init_default {0, 0, 0, 0} #define meshtastic_FromRadio_init_default {0, 0, {meshtastic_MeshPacket_init_default}} +#define meshtastic_ClientNotification_init_default {false, 0, 0, _meshtastic_LogRecord_Level_MIN, ""} +#define meshtastic_FileInfo_init_default {"", 0} #define meshtastic_ToRadio_init_default {0, {meshtastic_MeshPacket_init_default}} #define meshtastic_Compressed_init_default {_meshtastic_PortNum_MIN, {0, {0}}} #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}} #define meshtastic_Neighbor_init_default {0, 0, 0, 0} -#define meshtastic_DeviceMetadata_init_default {"", 0, 0, 0, 0, 0, _meshtastic_Config_DeviceConfig_Role_MIN, 0, _meshtastic_HardwareModel_MIN, 0} -#define meshtastic_Position_init_zero {0, 0, 0, 0, _meshtastic_Position_LocSource_MIN, _meshtastic_Position_AltSource_MIN, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0} -#define meshtastic_User_init_zero {"", "", "", {0}, _meshtastic_HardwareModel_MIN, 0, _meshtastic_Config_DeviceConfig_Role_MIN} -#define meshtastic_RouteDiscovery_init_zero {0, {0, 0, 0, 0, 0, 0, 0, 0}} +#define meshtastic_DeviceMetadata_init_default {"", 0, 0, 0, 0, 0, _meshtastic_Config_DeviceConfig_Role_MIN, 0, _meshtastic_HardwareModel_MIN, 0, 0} +#define meshtastic_Heartbeat_init_default {0} +#define meshtastic_NodeRemoteHardwarePin_init_default {0, false, meshtastic_RemoteHardwarePin_init_default} +#define meshtastic_ChunkedPayload_init_default {0, 0, 0, {0, {0}}} +#define meshtastic_resend_chunks_init_default {{{NULL}, NULL}} +#define meshtastic_ChunkedPayloadResponse_init_default {0, 0, {0}} +#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} +#define meshtastic_User_init_zero {"", "", "", {0}, _meshtastic_HardwareModel_MIN, 0, _meshtastic_Config_DeviceConfig_Role_MIN, {0, {0}}} +#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}} #define meshtastic_Routing_init_zero {0, {meshtastic_RouteDiscovery_init_zero}} -#define meshtastic_Data_init_zero {_meshtastic_PortNum_MIN, {0, {0}}, 0, 0, 0, 0, 0, 0} -#define meshtastic_Waypoint_init_zero {0, 0, 0, 0, 0, "", "", 0} +#define meshtastic_Data_init_zero {_meshtastic_PortNum_MIN, {0, {0}}, 0, 0, 0, 0, 0, 0, false, 0} +#define meshtastic_Waypoint_init_zero {0, false, 0, false, 0, 0, 0, "", "", 0} #define meshtastic_MqttClientProxyMessage_init_zero {"", 0, {{0, {0}}}, 0} -#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} -#define meshtastic_NodeInfo_init_zero {0, false, meshtastic_User_init_zero, false, meshtastic_Position_init_zero, 0, 0, false, meshtastic_DeviceMetrics_init_zero, 0} +#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} +#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} #define meshtastic_MyNodeInfo_init_zero {0, 0, 0} #define meshtastic_LogRecord_init_zero {"", 0, "", _meshtastic_LogRecord_Level_MIN} #define meshtastic_QueueStatus_init_zero {0, 0, 0, 0} #define meshtastic_FromRadio_init_zero {0, 0, {meshtastic_MeshPacket_init_zero}} +#define meshtastic_ClientNotification_init_zero {false, 0, 0, _meshtastic_LogRecord_Level_MIN, ""} +#define meshtastic_FileInfo_init_zero {"", 0} #define meshtastic_ToRadio_init_zero {0, {meshtastic_MeshPacket_init_zero}} #define meshtastic_Compressed_init_zero {_meshtastic_PortNum_MIN, {0, {0}}} #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}} #define meshtastic_Neighbor_init_zero {0, 0, 0, 0} -#define meshtastic_DeviceMetadata_init_zero {"", 0, 0, 0, 0, 0, _meshtastic_Config_DeviceConfig_Role_MIN, 0, _meshtastic_HardwareModel_MIN, 0} +#define meshtastic_DeviceMetadata_init_zero {"", 0, 0, 0, 0, 0, _meshtastic_Config_DeviceConfig_Role_MIN, 0, _meshtastic_HardwareModel_MIN, 0, 0} +#define meshtastic_Heartbeat_init_zero {0} +#define meshtastic_NodeRemoteHardwarePin_init_zero {0, false, meshtastic_RemoteHardwarePin_init_zero} +#define meshtastic_ChunkedPayload_init_zero {0, 0, 0, {0, {0}}} +#define meshtastic_resend_chunks_init_zero {{{NULL}, NULL}} +#define meshtastic_ChunkedPayloadResponse_init_zero {0, 0, {0}} /* Field tags (for use in manual encoding/decoding) */ #define meshtastic_Position_latitude_i_tag 1 @@ -952,7 +1182,11 @@ extern "C" { #define meshtastic_User_hw_model_tag 5 #define meshtastic_User_is_licensed_tag 6 #define meshtastic_User_role_tag 7 +#define meshtastic_User_public_key_tag 8 #define meshtastic_RouteDiscovery_route_tag 1 +#define meshtastic_RouteDiscovery_snr_towards_tag 2 +#define meshtastic_RouteDiscovery_route_back_tag 3 +#define meshtastic_RouteDiscovery_snr_back_tag 4 #define meshtastic_Routing_route_request_tag 1 #define meshtastic_Routing_route_reply_tag 2 #define meshtastic_Routing_error_reason_tag 3 @@ -964,6 +1198,7 @@ extern "C" { #define meshtastic_Data_request_id_tag 6 #define meshtastic_Data_reply_id_tag 7 #define meshtastic_Data_emoji_tag 8 +#define meshtastic_Data_bitfield_tag 9 #define meshtastic_Waypoint_id_tag 1 #define meshtastic_Waypoint_latitude_i_tag 2 #define meshtastic_Waypoint_longitude_i_tag 3 @@ -990,6 +1225,9 @@ extern "C" { #define meshtastic_MeshPacket_rx_rssi_tag 12 #define meshtastic_MeshPacket_delayed_tag 13 #define meshtastic_MeshPacket_via_mqtt_tag 14 +#define meshtastic_MeshPacket_hop_start_tag 15 +#define meshtastic_MeshPacket_public_key_tag 16 +#define meshtastic_MeshPacket_pki_encrypted_tag 17 #define meshtastic_NodeInfo_num_tag 1 #define meshtastic_NodeInfo_user_tag 2 #define meshtastic_NodeInfo_position_tag 3 @@ -997,6 +1235,9 @@ extern "C" { #define meshtastic_NodeInfo_last_heard_tag 5 #define meshtastic_NodeInfo_device_metrics_tag 6 #define meshtastic_NodeInfo_channel_tag 7 +#define meshtastic_NodeInfo_via_mqtt_tag 8 +#define meshtastic_NodeInfo_hops_away_tag 9 +#define meshtastic_NodeInfo_is_favorite_tag 10 #define meshtastic_MyNodeInfo_my_node_num_tag 1 #define meshtastic_MyNodeInfo_reboot_count_tag 8 #define meshtastic_MyNodeInfo_min_app_version_tag 11 @@ -1008,11 +1249,12 @@ extern "C" { #define meshtastic_QueueStatus_free_tag 2 #define meshtastic_QueueStatus_maxlen_tag 3 #define meshtastic_QueueStatus_mesh_packet_id_tag 4 -#define meshtastic_ToRadio_packet_tag 1 -#define meshtastic_ToRadio_want_config_id_tag 3 -#define meshtastic_ToRadio_disconnect_tag 4 -#define meshtastic_ToRadio_xmodemPacket_tag 5 -#define meshtastic_ToRadio_mqttClientProxyMessage_tag 6 +#define meshtastic_ClientNotification_reply_id_tag 1 +#define meshtastic_ClientNotification_time_tag 2 +#define meshtastic_ClientNotification_level_tag 3 +#define meshtastic_ClientNotification_message_tag 4 +#define meshtastic_FileInfo_file_name_tag 1 +#define meshtastic_FileInfo_size_bytes_tag 2 #define meshtastic_Compressed_portnum_tag 1 #define meshtastic_Compressed_data_tag 2 #define meshtastic_Neighbor_node_id_tag 1 @@ -1033,6 +1275,7 @@ extern "C" { #define meshtastic_DeviceMetadata_position_flags_tag 8 #define meshtastic_DeviceMetadata_hw_model_tag 9 #define meshtastic_DeviceMetadata_hasRemoteHardware_tag 10 +#define meshtastic_DeviceMetadata_hasPKC_tag 11 #define meshtastic_FromRadio_id_tag 1 #define meshtastic_FromRadio_packet_tag 2 #define meshtastic_FromRadio_my_info_tag 3 @@ -1047,25 +1290,44 @@ extern "C" { #define meshtastic_FromRadio_xmodemPacket_tag 12 #define meshtastic_FromRadio_metadata_tag 13 #define meshtastic_FromRadio_mqttClientProxyMessage_tag 14 +#define meshtastic_FromRadio_fileInfo_tag 15 +#define meshtastic_FromRadio_clientNotification_tag 16 +#define meshtastic_ToRadio_packet_tag 1 +#define meshtastic_ToRadio_want_config_id_tag 3 +#define meshtastic_ToRadio_disconnect_tag 4 +#define meshtastic_ToRadio_xmodemPacket_tag 5 +#define meshtastic_ToRadio_mqttClientProxyMessage_tag 6 +#define meshtastic_ToRadio_heartbeat_tag 7 +#define meshtastic_NodeRemoteHardwarePin_node_num_tag 1 +#define meshtastic_NodeRemoteHardwarePin_pin_tag 2 +#define meshtastic_ChunkedPayload_payload_id_tag 1 +#define meshtastic_ChunkedPayload_chunk_count_tag 2 +#define meshtastic_ChunkedPayload_chunk_index_tag 3 +#define meshtastic_ChunkedPayload_payload_chunk_tag 4 +#define meshtastic_resend_chunks_chunks_tag 1 +#define meshtastic_ChunkedPayloadResponse_payload_id_tag 1 +#define meshtastic_ChunkedPayloadResponse_request_transfer_tag 2 +#define meshtastic_ChunkedPayloadResponse_accept_transfer_tag 3 +#define meshtastic_ChunkedPayloadResponse_resend_chunks_tag 4 /* Struct field encoding specification for nanopb */ #define meshtastic_Position_FIELDLIST(X, a) \ -X(a, STATIC, SINGULAR, SFIXED32, latitude_i, 1) \ -X(a, STATIC, SINGULAR, SFIXED32, longitude_i, 2) \ -X(a, STATIC, SINGULAR, INT32, altitude, 3) \ +X(a, STATIC, OPTIONAL, SFIXED32, latitude_i, 1) \ +X(a, STATIC, OPTIONAL, SFIXED32, longitude_i, 2) \ +X(a, STATIC, OPTIONAL, INT32, altitude, 3) \ X(a, STATIC, SINGULAR, FIXED32, time, 4) \ X(a, STATIC, SINGULAR, UENUM, location_source, 5) \ X(a, STATIC, SINGULAR, UENUM, altitude_source, 6) \ X(a, STATIC, SINGULAR, FIXED32, timestamp, 7) \ X(a, STATIC, SINGULAR, INT32, timestamp_millis_adjust, 8) \ -X(a, STATIC, SINGULAR, SINT32, altitude_hae, 9) \ -X(a, STATIC, SINGULAR, SINT32, altitude_geoidal_separation, 10) \ +X(a, STATIC, OPTIONAL, SINT32, altitude_hae, 9) \ +X(a, STATIC, OPTIONAL, SINT32, altitude_geoidal_separation, 10) \ X(a, STATIC, SINGULAR, UINT32, PDOP, 11) \ X(a, STATIC, SINGULAR, UINT32, HDOP, 12) \ X(a, STATIC, SINGULAR, UINT32, VDOP, 13) \ X(a, STATIC, SINGULAR, UINT32, gps_accuracy, 14) \ -X(a, STATIC, SINGULAR, UINT32, ground_speed, 15) \ -X(a, STATIC, SINGULAR, UINT32, ground_track, 16) \ +X(a, STATIC, OPTIONAL, UINT32, ground_speed, 15) \ +X(a, STATIC, OPTIONAL, UINT32, ground_track, 16) \ X(a, STATIC, SINGULAR, UINT32, fix_quality, 17) \ X(a, STATIC, SINGULAR, UINT32, fix_type, 18) \ X(a, STATIC, SINGULAR, UINT32, sats_in_view, 19) \ @@ -1083,12 +1345,16 @@ X(a, STATIC, SINGULAR, STRING, short_name, 3) \ X(a, STATIC, SINGULAR, FIXED_LENGTH_BYTES, macaddr, 4) \ X(a, STATIC, SINGULAR, UENUM, hw_model, 5) \ X(a, STATIC, SINGULAR, BOOL, is_licensed, 6) \ -X(a, STATIC, SINGULAR, UENUM, role, 7) +X(a, STATIC, SINGULAR, UENUM, role, 7) \ +X(a, STATIC, SINGULAR, BYTES, public_key, 8) #define meshtastic_User_CALLBACK NULL #define meshtastic_User_DEFAULT NULL #define meshtastic_RouteDiscovery_FIELDLIST(X, a) \ -X(a, STATIC, REPEATED, FIXED32, route, 1) +X(a, STATIC, REPEATED, FIXED32, route, 1) \ +X(a, STATIC, REPEATED, INT32, snr_towards, 2) \ +X(a, STATIC, REPEATED, FIXED32, route_back, 3) \ +X(a, STATIC, REPEATED, INT32, snr_back, 4) #define meshtastic_RouteDiscovery_CALLBACK NULL #define meshtastic_RouteDiscovery_DEFAULT NULL @@ -1109,14 +1375,15 @@ X(a, STATIC, SINGULAR, FIXED32, dest, 4) \ X(a, STATIC, SINGULAR, FIXED32, source, 5) \ X(a, STATIC, SINGULAR, FIXED32, request_id, 6) \ X(a, STATIC, SINGULAR, FIXED32, reply_id, 7) \ -X(a, STATIC, SINGULAR, FIXED32, emoji, 8) +X(a, STATIC, SINGULAR, FIXED32, emoji, 8) \ +X(a, STATIC, OPTIONAL, UINT32, bitfield, 9) #define meshtastic_Data_CALLBACK NULL #define meshtastic_Data_DEFAULT NULL #define meshtastic_Waypoint_FIELDLIST(X, a) \ X(a, STATIC, SINGULAR, UINT32, id, 1) \ -X(a, STATIC, SINGULAR, SFIXED32, latitude_i, 2) \ -X(a, STATIC, SINGULAR, SFIXED32, longitude_i, 3) \ +X(a, STATIC, OPTIONAL, SFIXED32, latitude_i, 2) \ +X(a, STATIC, OPTIONAL, SFIXED32, longitude_i, 3) \ X(a, STATIC, SINGULAR, UINT32, expire, 4) \ X(a, STATIC, SINGULAR, UINT32, locked_to, 5) \ X(a, STATIC, SINGULAR, STRING, name, 6) \ @@ -1147,7 +1414,10 @@ X(a, STATIC, SINGULAR, BOOL, want_ack, 10) \ X(a, STATIC, SINGULAR, UENUM, priority, 11) \ X(a, STATIC, SINGULAR, INT32, rx_rssi, 12) \ X(a, STATIC, SINGULAR, UENUM, delayed, 13) \ -X(a, STATIC, SINGULAR, BOOL, via_mqtt, 14) +X(a, STATIC, SINGULAR, BOOL, via_mqtt, 14) \ +X(a, STATIC, SINGULAR, UINT32, hop_start, 15) \ +X(a, STATIC, SINGULAR, BYTES, public_key, 16) \ +X(a, STATIC, SINGULAR, BOOL, pki_encrypted, 17) #define meshtastic_MeshPacket_CALLBACK NULL #define meshtastic_MeshPacket_DEFAULT NULL #define meshtastic_MeshPacket_payload_variant_decoded_MSGTYPE meshtastic_Data @@ -1159,7 +1429,10 @@ X(a, STATIC, OPTIONAL, MESSAGE, position, 3) \ X(a, STATIC, SINGULAR, FLOAT, snr, 4) \ X(a, STATIC, SINGULAR, FIXED32, last_heard, 5) \ X(a, STATIC, OPTIONAL, MESSAGE, device_metrics, 6) \ -X(a, STATIC, SINGULAR, UINT32, channel, 7) +X(a, STATIC, SINGULAR, UINT32, channel, 7) \ +X(a, STATIC, SINGULAR, BOOL, via_mqtt, 8) \ +X(a, STATIC, OPTIONAL, UINT32, hops_away, 9) \ +X(a, STATIC, SINGULAR, BOOL, is_favorite, 10) #define meshtastic_NodeInfo_CALLBACK NULL #define meshtastic_NodeInfo_DEFAULT NULL #define meshtastic_NodeInfo_user_MSGTYPE meshtastic_User @@ -1203,7 +1476,9 @@ X(a, STATIC, ONEOF, MESSAGE, (payload_variant,channel,channel), 10) \ X(a, STATIC, ONEOF, MESSAGE, (payload_variant,queueStatus,queueStatus), 11) \ X(a, STATIC, ONEOF, MESSAGE, (payload_variant,xmodemPacket,xmodemPacket), 12) \ X(a, STATIC, ONEOF, MESSAGE, (payload_variant,metadata,metadata), 13) \ -X(a, STATIC, ONEOF, MESSAGE, (payload_variant,mqttClientProxyMessage,mqttClientProxyMessage), 14) +X(a, STATIC, ONEOF, MESSAGE, (payload_variant,mqttClientProxyMessage,mqttClientProxyMessage), 14) \ +X(a, STATIC, ONEOF, MESSAGE, (payload_variant,fileInfo,fileInfo), 15) \ +X(a, STATIC, ONEOF, MESSAGE, (payload_variant,clientNotification,clientNotification), 16) #define meshtastic_FromRadio_CALLBACK NULL #define meshtastic_FromRadio_DEFAULT NULL #define meshtastic_FromRadio_payload_variant_packet_MSGTYPE meshtastic_MeshPacket @@ -1217,18 +1492,36 @@ X(a, STATIC, ONEOF, MESSAGE, (payload_variant,mqttClientProxyMessage,mqttC #define meshtastic_FromRadio_payload_variant_xmodemPacket_MSGTYPE meshtastic_XModem #define meshtastic_FromRadio_payload_variant_metadata_MSGTYPE meshtastic_DeviceMetadata #define meshtastic_FromRadio_payload_variant_mqttClientProxyMessage_MSGTYPE meshtastic_MqttClientProxyMessage +#define meshtastic_FromRadio_payload_variant_fileInfo_MSGTYPE meshtastic_FileInfo +#define meshtastic_FromRadio_payload_variant_clientNotification_MSGTYPE meshtastic_ClientNotification + +#define meshtastic_ClientNotification_FIELDLIST(X, a) \ +X(a, STATIC, OPTIONAL, UINT32, reply_id, 1) \ +X(a, STATIC, SINGULAR, FIXED32, time, 2) \ +X(a, STATIC, SINGULAR, UENUM, level, 3) \ +X(a, STATIC, SINGULAR, STRING, message, 4) +#define meshtastic_ClientNotification_CALLBACK NULL +#define meshtastic_ClientNotification_DEFAULT NULL + +#define meshtastic_FileInfo_FIELDLIST(X, a) \ +X(a, STATIC, SINGULAR, STRING, file_name, 1) \ +X(a, STATIC, SINGULAR, UINT32, size_bytes, 2) +#define meshtastic_FileInfo_CALLBACK NULL +#define meshtastic_FileInfo_DEFAULT NULL #define meshtastic_ToRadio_FIELDLIST(X, a) \ X(a, STATIC, ONEOF, MESSAGE, (payload_variant,packet,packet), 1) \ X(a, STATIC, ONEOF, UINT32, (payload_variant,want_config_id,want_config_id), 3) \ X(a, STATIC, ONEOF, BOOL, (payload_variant,disconnect,disconnect), 4) \ X(a, STATIC, ONEOF, MESSAGE, (payload_variant,xmodemPacket,xmodemPacket), 5) \ -X(a, STATIC, ONEOF, MESSAGE, (payload_variant,mqttClientProxyMessage,mqttClientProxyMessage), 6) +X(a, STATIC, ONEOF, MESSAGE, (payload_variant,mqttClientProxyMessage,mqttClientProxyMessage), 6) \ +X(a, STATIC, ONEOF, MESSAGE, (payload_variant,heartbeat,heartbeat), 7) #define meshtastic_ToRadio_CALLBACK NULL #define meshtastic_ToRadio_DEFAULT NULL #define meshtastic_ToRadio_payload_variant_packet_MSGTYPE meshtastic_MeshPacket #define meshtastic_ToRadio_payload_variant_xmodemPacket_MSGTYPE meshtastic_XModem #define meshtastic_ToRadio_payload_variant_mqttClientProxyMessage_MSGTYPE meshtastic_MqttClientProxyMessage +#define meshtastic_ToRadio_payload_variant_heartbeat_MSGTYPE meshtastic_Heartbeat #define meshtastic_Compressed_FIELDLIST(X, a) \ X(a, STATIC, SINGULAR, UENUM, portnum, 1) \ @@ -1263,10 +1556,45 @@ X(a, STATIC, SINGULAR, BOOL, hasEthernet, 6) \ X(a, STATIC, SINGULAR, UENUM, role, 7) \ X(a, STATIC, SINGULAR, UINT32, position_flags, 8) \ X(a, STATIC, SINGULAR, UENUM, hw_model, 9) \ -X(a, STATIC, SINGULAR, BOOL, hasRemoteHardware, 10) +X(a, STATIC, SINGULAR, BOOL, hasRemoteHardware, 10) \ +X(a, STATIC, SINGULAR, BOOL, hasPKC, 11) #define meshtastic_DeviceMetadata_CALLBACK NULL #define meshtastic_DeviceMetadata_DEFAULT NULL +#define meshtastic_Heartbeat_FIELDLIST(X, a) \ + +#define meshtastic_Heartbeat_CALLBACK NULL +#define meshtastic_Heartbeat_DEFAULT NULL + +#define meshtastic_NodeRemoteHardwarePin_FIELDLIST(X, a) \ +X(a, STATIC, SINGULAR, UINT32, node_num, 1) \ +X(a, STATIC, OPTIONAL, MESSAGE, pin, 2) +#define meshtastic_NodeRemoteHardwarePin_CALLBACK NULL +#define meshtastic_NodeRemoteHardwarePin_DEFAULT NULL +#define meshtastic_NodeRemoteHardwarePin_pin_MSGTYPE meshtastic_RemoteHardwarePin + +#define meshtastic_ChunkedPayload_FIELDLIST(X, a) \ +X(a, STATIC, SINGULAR, UINT32, payload_id, 1) \ +X(a, STATIC, SINGULAR, UINT32, chunk_count, 2) \ +X(a, STATIC, SINGULAR, UINT32, chunk_index, 3) \ +X(a, STATIC, SINGULAR, BYTES, payload_chunk, 4) +#define meshtastic_ChunkedPayload_CALLBACK NULL +#define meshtastic_ChunkedPayload_DEFAULT NULL + +#define meshtastic_resend_chunks_FIELDLIST(X, a) \ +X(a, CALLBACK, REPEATED, UINT32, chunks, 1) +#define meshtastic_resend_chunks_CALLBACK pb_default_field_callback +#define meshtastic_resend_chunks_DEFAULT NULL + +#define meshtastic_ChunkedPayloadResponse_FIELDLIST(X, a) \ +X(a, STATIC, SINGULAR, UINT32, payload_id, 1) \ +X(a, STATIC, ONEOF, BOOL, (payload_variant,request_transfer,payload_variant.request_transfer), 2) \ +X(a, STATIC, ONEOF, BOOL, (payload_variant,accept_transfer,payload_variant.accept_transfer), 3) \ +X(a, STATIC, ONEOF, MESSAGE, (payload_variant,resend_chunks,payload_variant.resend_chunks), 4) +#define meshtastic_ChunkedPayloadResponse_CALLBACK NULL +#define meshtastic_ChunkedPayloadResponse_DEFAULT NULL +#define meshtastic_ChunkedPayloadResponse_payload_variant_resend_chunks_MSGTYPE meshtastic_resend_chunks + extern const pb_msgdesc_t meshtastic_Position_msg; extern const pb_msgdesc_t meshtastic_User_msg; extern const pb_msgdesc_t meshtastic_RouteDiscovery_msg; @@ -1280,11 +1608,18 @@ extern const pb_msgdesc_t meshtastic_MyNodeInfo_msg; extern const pb_msgdesc_t meshtastic_LogRecord_msg; extern const pb_msgdesc_t meshtastic_QueueStatus_msg; extern const pb_msgdesc_t meshtastic_FromRadio_msg; +extern const pb_msgdesc_t meshtastic_ClientNotification_msg; +extern const pb_msgdesc_t meshtastic_FileInfo_msg; extern const pb_msgdesc_t meshtastic_ToRadio_msg; extern const pb_msgdesc_t meshtastic_Compressed_msg; extern const pb_msgdesc_t meshtastic_NeighborInfo_msg; extern const pb_msgdesc_t meshtastic_Neighbor_msg; extern const pb_msgdesc_t meshtastic_DeviceMetadata_msg; +extern const pb_msgdesc_t meshtastic_Heartbeat_msg; +extern const pb_msgdesc_t meshtastic_NodeRemoteHardwarePin_msg; +extern const pb_msgdesc_t meshtastic_ChunkedPayload_msg; +extern const pb_msgdesc_t meshtastic_resend_chunks_msg; +extern const pb_msgdesc_t meshtastic_ChunkedPayloadResponse_msg; /* Defines for backwards compatibility with code written before nanopb-0.4.0 */ #define meshtastic_Position_fields &meshtastic_Position_msg @@ -1300,30 +1635,45 @@ extern const pb_msgdesc_t meshtastic_DeviceMetadata_msg; #define meshtastic_LogRecord_fields &meshtastic_LogRecord_msg #define meshtastic_QueueStatus_fields &meshtastic_QueueStatus_msg #define meshtastic_FromRadio_fields &meshtastic_FromRadio_msg +#define meshtastic_ClientNotification_fields &meshtastic_ClientNotification_msg +#define meshtastic_FileInfo_fields &meshtastic_FileInfo_msg #define meshtastic_ToRadio_fields &meshtastic_ToRadio_msg #define meshtastic_Compressed_fields &meshtastic_Compressed_msg #define meshtastic_NeighborInfo_fields &meshtastic_NeighborInfo_msg #define meshtastic_Neighbor_fields &meshtastic_Neighbor_msg #define meshtastic_DeviceMetadata_fields &meshtastic_DeviceMetadata_msg +#define meshtastic_Heartbeat_fields &meshtastic_Heartbeat_msg +#define meshtastic_NodeRemoteHardwarePin_fields &meshtastic_NodeRemoteHardwarePin_msg +#define meshtastic_ChunkedPayload_fields &meshtastic_ChunkedPayload_msg +#define meshtastic_resend_chunks_fields &meshtastic_resend_chunks_msg +#define meshtastic_ChunkedPayloadResponse_fields &meshtastic_ChunkedPayloadResponse_msg /* Maximum encoded size of messages (where known) */ +/* meshtastic_resend_chunks_size depends on runtime parameters */ +/* meshtastic_ChunkedPayloadResponse_size depends on runtime parameters */ +#define MESHTASTIC_MESHTASTIC_MESH_PB_H_MAX_SIZE meshtastic_FromRadio_size +#define meshtastic_ChunkedPayload_size 245 +#define meshtastic_ClientNotification_size 415 #define meshtastic_Compressed_size 243 -#define meshtastic_Data_size 270 -#define meshtastic_DeviceMetadata_size 46 +#define meshtastic_Data_size 273 +#define meshtastic_DeviceMetadata_size 48 +#define meshtastic_FileInfo_size 236 #define meshtastic_FromRadio_size 510 -#define meshtastic_LogRecord_size 81 -#define meshtastic_MeshPacket_size 323 +#define meshtastic_Heartbeat_size 0 +#define meshtastic_LogRecord_size 426 +#define meshtastic_MeshPacket_size 367 #define meshtastic_MqttClientProxyMessage_size 501 #define meshtastic_MyNodeInfo_size 18 #define meshtastic_NeighborInfo_size 258 #define meshtastic_Neighbor_size 22 -#define meshtastic_NodeInfo_size 270 +#define meshtastic_NodeInfo_size 317 +#define meshtastic_NodeRemoteHardwarePin_size 29 #define meshtastic_Position_size 144 #define meshtastic_QueueStatus_size 23 -#define meshtastic_RouteDiscovery_size 40 -#define meshtastic_Routing_size 42 +#define meshtastic_RouteDiscovery_size 256 +#define meshtastic_Routing_size 259 #define meshtastic_ToRadio_size 504 -#define meshtastic_User_size 79 +#define meshtastic_User_size 113 #define meshtastic_Waypoint_size 165 #ifdef __cplusplus diff --git a/src/mesh/generated/meshtastic/module_config.pb.c b/src/mesh/generated/meshtastic/module_config.pb.cpp similarity index 87% rename from src/mesh/generated/meshtastic/module_config.pb.c rename to src/mesh/generated/meshtastic/module_config.pb.cpp index 38965f3e2..c40041eab 100644 --- a/src/mesh/generated/meshtastic/module_config.pb.c +++ b/src/mesh/generated/meshtastic/module_config.pb.cpp @@ -1,15 +1,18 @@ /* Automatically generated nanopb constant definitions */ -/* Generated by nanopb-0.4.7 */ +/* Generated by nanopb-0.4.9 */ #include "meshtastic/module_config.pb.h" #if PB_PROTO_HEADER_VERSION != 40 #error Regenerate this file with the current version of nanopb generator. #endif -PB_BIND(meshtastic_ModuleConfig, meshtastic_ModuleConfig, AUTO) +PB_BIND(meshtastic_ModuleConfig, meshtastic_ModuleConfig, 2) -PB_BIND(meshtastic_ModuleConfig_MQTTConfig, meshtastic_ModuleConfig_MQTTConfig, AUTO) +PB_BIND(meshtastic_ModuleConfig_MQTTConfig, meshtastic_ModuleConfig_MQTTConfig, 2) + + +PB_BIND(meshtastic_ModuleConfig_MapReportSettings, meshtastic_ModuleConfig_MapReportSettings, AUTO) PB_BIND(meshtastic_ModuleConfig_RemoteHardwareConfig, meshtastic_ModuleConfig_RemoteHardwareConfig, AUTO) @@ -57,3 +60,10 @@ PB_BIND(meshtastic_RemoteHardwarePin, meshtastic_RemoteHardwarePin, AUTO) + + + + + + + diff --git a/src/mesh/generated/meshtastic/module_config.pb.h b/src/mesh/generated/meshtastic/module_config.pb.h index edfd56e4c..32d5ded23 100644 --- a/src/mesh/generated/meshtastic/module_config.pb.h +++ b/src/mesh/generated/meshtastic/module_config.pb.h @@ -1,5 +1,5 @@ /* Automatically generated nanopb header */ -/* Generated by nanopb-0.4.7 */ +/* Generated by nanopb-0.4.9 */ #ifndef PB_MESHTASTIC_MESHTASTIC_MODULE_CONFIG_PB_H_INCLUDED #define PB_MESHTASTIC_MESHTASTIC_MODULE_CONFIG_PB_H_INCLUDED @@ -19,6 +19,23 @@ typedef enum _meshtastic_RemoteHardwarePinType { meshtastic_RemoteHardwarePinType_DIGITAL_WRITE = 2 } meshtastic_RemoteHardwarePinType; +typedef enum _meshtastic_ModuleConfig_DetectionSensorConfig_TriggerType { + /* Event is triggered if pin is low */ + meshtastic_ModuleConfig_DetectionSensorConfig_TriggerType_LOGIC_LOW = 0, + /* Event is triggered if pin is high */ + meshtastic_ModuleConfig_DetectionSensorConfig_TriggerType_LOGIC_HIGH = 1, + /* Event is triggered when pin goes high to low */ + meshtastic_ModuleConfig_DetectionSensorConfig_TriggerType_FALLING_EDGE = 2, + /* Event is triggered when pin goes low to high */ + meshtastic_ModuleConfig_DetectionSensorConfig_TriggerType_RISING_EDGE = 3, + /* Event is triggered on every pin state change, low is considered to be + "active" */ + meshtastic_ModuleConfig_DetectionSensorConfig_TriggerType_EITHER_EDGE_ACTIVE_LOW = 4, + /* Event is triggered on every pin state change, high is considered to be + "active" */ + meshtastic_ModuleConfig_DetectionSensorConfig_TriggerType_EITHER_EDGE_ACTIVE_HIGH = 5 +} meshtastic_ModuleConfig_DetectionSensorConfig_TriggerType; + /* Baudrate for codec2 voice */ typedef enum _meshtastic_ModuleConfig_AudioConfig_Audio_Baud { meshtastic_ModuleConfig_AudioConfig_Audio_Baud_CODEC2_DEFAULT = 0, @@ -60,7 +77,9 @@ typedef enum _meshtastic_ModuleConfig_SerialConfig_Serial_Mode { meshtastic_ModuleConfig_SerialConfig_Serial_Mode_TEXTMSG = 3, meshtastic_ModuleConfig_SerialConfig_Serial_Mode_NMEA = 4, /* NMEA messages specifically tailored for CalTopo */ - meshtastic_ModuleConfig_SerialConfig_Serial_Mode_CALTOPO = 5 + meshtastic_ModuleConfig_SerialConfig_Serial_Mode_CALTOPO = 5, + /* Ecowitt WS85 weather station */ + meshtastic_ModuleConfig_SerialConfig_Serial_Mode_WS85 = 6 } meshtastic_ModuleConfig_SerialConfig_Serial_Mode; /* TODO: REPLACE */ @@ -84,6 +103,14 @@ typedef enum _meshtastic_ModuleConfig_CannedMessageConfig_InputEventChar { } meshtastic_ModuleConfig_CannedMessageConfig_InputEventChar; /* Struct definitions */ +/* Settings for reporting unencrypted information about our node to a map via MQTT */ +typedef struct _meshtastic_ModuleConfig_MapReportSettings { + /* How often we should report our info to the map (in seconds) */ + uint32_t publish_interval_secs; + /* Bits of precision for the location sent (default of 32 is full precision). */ + uint32_t position_precision; +} meshtastic_ModuleConfig_MapReportSettings; + /* MQTT Client Config */ typedef struct _meshtastic_ModuleConfig_MQTTConfig { /* If a meshtastic node is able to reach the internet it will normally attempt to gateway any channels that are marked as @@ -111,9 +138,14 @@ typedef struct _meshtastic_ModuleConfig_MQTTConfig { bool tls_enabled; /* The root topic to use for MQTT messages. Default is "msh". This is useful if you want to use a single MQTT server for multiple meshtastic networks and separate them via ACLs */ - char root[16]; + char root[32]; /* If true, we can use the connected phone / client to proxy messages to MQTT instead of a direct connection */ bool proxy_to_client_enabled; + /* If true, we will periodically report unencrypted information about our node to a map via MQTT */ + bool map_reporting_enabled; + /* Settings for reporting information about our node to a map via MQTT */ + bool has_map_report_settings; + meshtastic_ModuleConfig_MapReportSettings map_report_settings; } meshtastic_ModuleConfig_MQTTConfig; /* NeighborInfoModule Config */ @@ -129,11 +161,13 @@ typedef struct _meshtastic_ModuleConfig_NeighborInfoConfig { typedef struct _meshtastic_ModuleConfig_DetectionSensorConfig { /* Whether the Module is enabled */ bool enabled; - /* Interval in seconds of how often we can send a message to the mesh when a state change is detected */ + /* Interval in seconds of how often we can send a message to the mesh when a + trigger event is detected */ uint32_t minimum_broadcast_secs; - /* Interval in seconds of how often we should send a message to the mesh with the current state regardless of changes - When set to 0, only state changes will be broadcasted - Works as a sort of status heartbeat for peace of mind */ + /* Interval in seconds of how often we should send a message to the mesh + with the current state regardless of trigger events When set to 0, only + trigger events will be broadcasted Works as a sort of status heartbeat + for peace of mind */ uint32_t state_broadcast_secs; /* Send ASCII bell with alert message Useful for triggering ext. notification on bell */ @@ -144,9 +178,8 @@ typedef struct _meshtastic_ModuleConfig_DetectionSensorConfig { char name[20]; /* GPIO pin to monitor for state changes */ uint8_t monitor_pin; - /* Whether or not the GPIO pin state detection is triggered on HIGH (1) - Otherwise LOW (0) */ - bool detection_triggered_high; + /* The type of trigger event to be used */ + meshtastic_ModuleConfig_DetectionSensorConfig_TriggerType detection_trigger_type; /* Whether or not use INPUT_PULLUP mode for GPIO pin Only applicable if the board uses pull-up resistors on the pin */ bool use_pullup; @@ -175,6 +208,10 @@ typedef struct _meshtastic_ModuleConfig_PaxcounterConfig { /* Enable the Paxcounter Module */ bool enabled; uint32_t paxcounter_update_interval; + /* WiFi RSSI threshold. Defaults to -80 */ + int32_t wifi_threshold; + /* BLE RSSI threshold. Defaults to -80 */ + int32_t ble_threshold; } meshtastic_ModuleConfig_PaxcounterConfig; /* Serial Config */ @@ -256,6 +293,8 @@ typedef struct _meshtastic_ModuleConfig_StoreForwardConfig { uint32_t history_return_max; /* TODO: REPLACE */ uint32_t history_return_window; + /* Set to true to let this node act as a server that stores received messages and resends them upon request. */ + bool is_server; } meshtastic_ModuleConfig_StoreForwardConfig; /* Preferences for the RangeTestModule */ @@ -288,15 +327,21 @@ typedef struct _meshtastic_ModuleConfig_TelemetryConfig { /* Interval in seconds of how often we should try to send our air quality metrics to the mesh */ uint32_t air_quality_interval; - /* Interval in seconds of how often we should try to send our - air quality metrics to the mesh */ + /* Enable/disable Power metrics */ bool power_measurement_enabled; /* Interval in seconds of how often we should try to send our - air quality metrics to the mesh */ + power metrics to the mesh */ uint32_t power_update_interval; - /* Interval in seconds of how often we should try to send our - air quality metrics to the mesh */ + /* Enable/Disable the power measurement module on-device display */ bool power_screen_enabled; + /* Preferences for the (Health) Telemetry Module + Enable/Disable the telemetry measurement module measurement collection */ + bool health_measurement_enabled; + /* Interval in seconds of how often we should try to send our + health metrics to the mesh */ + uint32_t health_update_interval; + /* Enable/Disable the health telemetry module on-device display */ + bool health_screen_enabled; } meshtastic_ModuleConfig_TelemetryConfig; /* TODO: REPLACE */ @@ -320,7 +365,7 @@ typedef struct _meshtastic_ModuleConfig_CannedMessageConfig { /* Enable/disable CannedMessageModule. */ bool enabled; /* Input event origin accepted by the canned message module. - Can be e.g. "rotEnc1", "upDownEnc1" or keyword "_any" */ + Can be e.g. "rotEnc1", "upDownEnc1", "scanAndSelect", "cardkb", "serialkb", or keyword "_any" */ char allow_input_source[16]; /* CannedMessageModule also sends a bell character with the messages. ExternalNotificationModule can benefit from this feature. */ @@ -406,6 +451,10 @@ extern "C" { #define _meshtastic_RemoteHardwarePinType_MAX meshtastic_RemoteHardwarePinType_DIGITAL_WRITE #define _meshtastic_RemoteHardwarePinType_ARRAYSIZE ((meshtastic_RemoteHardwarePinType)(meshtastic_RemoteHardwarePinType_DIGITAL_WRITE+1)) +#define _meshtastic_ModuleConfig_DetectionSensorConfig_TriggerType_MIN meshtastic_ModuleConfig_DetectionSensorConfig_TriggerType_LOGIC_LOW +#define _meshtastic_ModuleConfig_DetectionSensorConfig_TriggerType_MAX meshtastic_ModuleConfig_DetectionSensorConfig_TriggerType_EITHER_EDGE_ACTIVE_HIGH +#define _meshtastic_ModuleConfig_DetectionSensorConfig_TriggerType_ARRAYSIZE ((meshtastic_ModuleConfig_DetectionSensorConfig_TriggerType)(meshtastic_ModuleConfig_DetectionSensorConfig_TriggerType_EITHER_EDGE_ACTIVE_HIGH+1)) + #define _meshtastic_ModuleConfig_AudioConfig_Audio_Baud_MIN meshtastic_ModuleConfig_AudioConfig_Audio_Baud_CODEC2_DEFAULT #define _meshtastic_ModuleConfig_AudioConfig_Audio_Baud_MAX meshtastic_ModuleConfig_AudioConfig_Audio_Baud_CODEC2_700B #define _meshtastic_ModuleConfig_AudioConfig_Audio_Baud_ARRAYSIZE ((meshtastic_ModuleConfig_AudioConfig_Audio_Baud)(meshtastic_ModuleConfig_AudioConfig_Audio_Baud_CODEC2_700B+1)) @@ -415,8 +464,8 @@ extern "C" { #define _meshtastic_ModuleConfig_SerialConfig_Serial_Baud_ARRAYSIZE ((meshtastic_ModuleConfig_SerialConfig_Serial_Baud)(meshtastic_ModuleConfig_SerialConfig_Serial_Baud_BAUD_921600+1)) #define _meshtastic_ModuleConfig_SerialConfig_Serial_Mode_MIN meshtastic_ModuleConfig_SerialConfig_Serial_Mode_DEFAULT -#define _meshtastic_ModuleConfig_SerialConfig_Serial_Mode_MAX meshtastic_ModuleConfig_SerialConfig_Serial_Mode_CALTOPO -#define _meshtastic_ModuleConfig_SerialConfig_Serial_Mode_ARRAYSIZE ((meshtastic_ModuleConfig_SerialConfig_Serial_Mode)(meshtastic_ModuleConfig_SerialConfig_Serial_Mode_CALTOPO+1)) +#define _meshtastic_ModuleConfig_SerialConfig_Serial_Mode_MAX meshtastic_ModuleConfig_SerialConfig_Serial_Mode_WS85 +#define _meshtastic_ModuleConfig_SerialConfig_Serial_Mode_ARRAYSIZE ((meshtastic_ModuleConfig_SerialConfig_Serial_Mode)(meshtastic_ModuleConfig_SerialConfig_Serial_Mode_WS85+1)) #define _meshtastic_ModuleConfig_CannedMessageConfig_InputEventChar_MIN meshtastic_ModuleConfig_CannedMessageConfig_InputEventChar_NONE #define _meshtastic_ModuleConfig_CannedMessageConfig_InputEventChar_MAX meshtastic_ModuleConfig_CannedMessageConfig_InputEventChar_BACK @@ -427,6 +476,8 @@ extern "C" { +#define meshtastic_ModuleConfig_DetectionSensorConfig_detection_trigger_type_ENUMTYPE meshtastic_ModuleConfig_DetectionSensorConfig_TriggerType + #define meshtastic_ModuleConfig_AudioConfig_bitrate_ENUMTYPE meshtastic_ModuleConfig_AudioConfig_Audio_Baud @@ -447,37 +498,41 @@ extern "C" { /* Initializer values for message structs */ #define meshtastic_ModuleConfig_init_default {0, {meshtastic_ModuleConfig_MQTTConfig_init_default}} -#define meshtastic_ModuleConfig_MQTTConfig_init_default {0, "", "", "", 0, 0, 0, "", 0} +#define meshtastic_ModuleConfig_MQTTConfig_init_default {0, "", "", "", 0, 0, 0, "", 0, 0, false, meshtastic_ModuleConfig_MapReportSettings_init_default} +#define meshtastic_ModuleConfig_MapReportSettings_init_default {0, 0} #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}} #define meshtastic_ModuleConfig_NeighborInfoConfig_init_default {0, 0} -#define meshtastic_ModuleConfig_DetectionSensorConfig_init_default {0, 0, 0, 0, "", 0, 0, 0} +#define meshtastic_ModuleConfig_DetectionSensorConfig_init_default {0, 0, 0, 0, "", 0, _meshtastic_ModuleConfig_DetectionSensorConfig_TriggerType_MIN, 0} #define meshtastic_ModuleConfig_AudioConfig_init_default {0, 0, _meshtastic_ModuleConfig_AudioConfig_Audio_Baud_MIN, 0, 0, 0, 0} -#define meshtastic_ModuleConfig_PaxcounterConfig_init_default {0, 0} +#define meshtastic_ModuleConfig_PaxcounterConfig_init_default {0, 0, 0, 0} #define meshtastic_ModuleConfig_SerialConfig_init_default {0, 0, 0, 0, _meshtastic_ModuleConfig_SerialConfig_Serial_Baud_MIN, 0, _meshtastic_ModuleConfig_SerialConfig_Serial_Mode_MIN, 0} #define meshtastic_ModuleConfig_ExternalNotificationConfig_init_default {0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0} -#define meshtastic_ModuleConfig_StoreForwardConfig_init_default {0, 0, 0, 0, 0} +#define meshtastic_ModuleConfig_StoreForwardConfig_init_default {0, 0, 0, 0, 0, 0} #define meshtastic_ModuleConfig_RangeTestConfig_init_default {0, 0, 0} -#define meshtastic_ModuleConfig_TelemetryConfig_init_default {0, 0, 0, 0, 0, 0, 0, 0, 0, 0} +#define meshtastic_ModuleConfig_TelemetryConfig_init_default {0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0} #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} #define meshtastic_ModuleConfig_AmbientLightingConfig_init_default {0, 0, 0, 0, 0} #define meshtastic_RemoteHardwarePin_init_default {0, "", _meshtastic_RemoteHardwarePinType_MIN} #define meshtastic_ModuleConfig_init_zero {0, {meshtastic_ModuleConfig_MQTTConfig_init_zero}} -#define meshtastic_ModuleConfig_MQTTConfig_init_zero {0, "", "", "", 0, 0, 0, "", 0} +#define meshtastic_ModuleConfig_MQTTConfig_init_zero {0, "", "", "", 0, 0, 0, "", 0, 0, false, meshtastic_ModuleConfig_MapReportSettings_init_zero} +#define meshtastic_ModuleConfig_MapReportSettings_init_zero {0, 0} #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}} #define meshtastic_ModuleConfig_NeighborInfoConfig_init_zero {0, 0} -#define meshtastic_ModuleConfig_DetectionSensorConfig_init_zero {0, 0, 0, 0, "", 0, 0, 0} +#define meshtastic_ModuleConfig_DetectionSensorConfig_init_zero {0, 0, 0, 0, "", 0, _meshtastic_ModuleConfig_DetectionSensorConfig_TriggerType_MIN, 0} #define meshtastic_ModuleConfig_AudioConfig_init_zero {0, 0, _meshtastic_ModuleConfig_AudioConfig_Audio_Baud_MIN, 0, 0, 0, 0} -#define meshtastic_ModuleConfig_PaxcounterConfig_init_zero {0, 0} +#define meshtastic_ModuleConfig_PaxcounterConfig_init_zero {0, 0, 0, 0} #define meshtastic_ModuleConfig_SerialConfig_init_zero {0, 0, 0, 0, _meshtastic_ModuleConfig_SerialConfig_Serial_Baud_MIN, 0, _meshtastic_ModuleConfig_SerialConfig_Serial_Mode_MIN, 0} #define meshtastic_ModuleConfig_ExternalNotificationConfig_init_zero {0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0} -#define meshtastic_ModuleConfig_StoreForwardConfig_init_zero {0, 0, 0, 0, 0} +#define meshtastic_ModuleConfig_StoreForwardConfig_init_zero {0, 0, 0, 0, 0, 0} #define meshtastic_ModuleConfig_RangeTestConfig_init_zero {0, 0, 0} -#define meshtastic_ModuleConfig_TelemetryConfig_init_zero {0, 0, 0, 0, 0, 0, 0, 0, 0, 0} +#define meshtastic_ModuleConfig_TelemetryConfig_init_zero {0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0} #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} #define meshtastic_ModuleConfig_AmbientLightingConfig_init_zero {0, 0, 0, 0, 0} #define meshtastic_RemoteHardwarePin_init_zero {0, "", _meshtastic_RemoteHardwarePinType_MIN} /* Field tags (for use in manual encoding/decoding) */ +#define meshtastic_ModuleConfig_MapReportSettings_publish_interval_secs_tag 1 +#define meshtastic_ModuleConfig_MapReportSettings_position_precision_tag 2 #define meshtastic_ModuleConfig_MQTTConfig_enabled_tag 1 #define meshtastic_ModuleConfig_MQTTConfig_address_tag 2 #define meshtastic_ModuleConfig_MQTTConfig_username_tag 3 @@ -487,6 +542,8 @@ extern "C" { #define meshtastic_ModuleConfig_MQTTConfig_tls_enabled_tag 7 #define meshtastic_ModuleConfig_MQTTConfig_root_tag 8 #define meshtastic_ModuleConfig_MQTTConfig_proxy_to_client_enabled_tag 9 +#define meshtastic_ModuleConfig_MQTTConfig_map_reporting_enabled_tag 10 +#define meshtastic_ModuleConfig_MQTTConfig_map_report_settings_tag 11 #define meshtastic_ModuleConfig_NeighborInfoConfig_enabled_tag 1 #define meshtastic_ModuleConfig_NeighborInfoConfig_update_interval_tag 2 #define meshtastic_ModuleConfig_DetectionSensorConfig_enabled_tag 1 @@ -495,7 +552,7 @@ extern "C" { #define meshtastic_ModuleConfig_DetectionSensorConfig_send_bell_tag 4 #define meshtastic_ModuleConfig_DetectionSensorConfig_name_tag 5 #define meshtastic_ModuleConfig_DetectionSensorConfig_monitor_pin_tag 6 -#define meshtastic_ModuleConfig_DetectionSensorConfig_detection_triggered_high_tag 7 +#define meshtastic_ModuleConfig_DetectionSensorConfig_detection_trigger_type_tag 7 #define meshtastic_ModuleConfig_DetectionSensorConfig_use_pullup_tag 8 #define meshtastic_ModuleConfig_AudioConfig_codec2_enabled_tag 1 #define meshtastic_ModuleConfig_AudioConfig_ptt_pin_tag 2 @@ -506,6 +563,8 @@ extern "C" { #define meshtastic_ModuleConfig_AudioConfig_i2s_sck_tag 7 #define meshtastic_ModuleConfig_PaxcounterConfig_enabled_tag 1 #define meshtastic_ModuleConfig_PaxcounterConfig_paxcounter_update_interval_tag 2 +#define meshtastic_ModuleConfig_PaxcounterConfig_wifi_threshold_tag 3 +#define meshtastic_ModuleConfig_PaxcounterConfig_ble_threshold_tag 4 #define meshtastic_ModuleConfig_SerialConfig_enabled_tag 1 #define meshtastic_ModuleConfig_SerialConfig_echo_tag 2 #define meshtastic_ModuleConfig_SerialConfig_rxd_tag 3 @@ -534,6 +593,7 @@ extern "C" { #define meshtastic_ModuleConfig_StoreForwardConfig_records_tag 3 #define meshtastic_ModuleConfig_StoreForwardConfig_history_return_max_tag 4 #define meshtastic_ModuleConfig_StoreForwardConfig_history_return_window_tag 5 +#define meshtastic_ModuleConfig_StoreForwardConfig_is_server_tag 6 #define meshtastic_ModuleConfig_RangeTestConfig_enabled_tag 1 #define meshtastic_ModuleConfig_RangeTestConfig_sender_tag 2 #define meshtastic_ModuleConfig_RangeTestConfig_save_tag 3 @@ -547,6 +607,9 @@ extern "C" { #define meshtastic_ModuleConfig_TelemetryConfig_power_measurement_enabled_tag 8 #define meshtastic_ModuleConfig_TelemetryConfig_power_update_interval_tag 9 #define meshtastic_ModuleConfig_TelemetryConfig_power_screen_enabled_tag 10 +#define meshtastic_ModuleConfig_TelemetryConfig_health_measurement_enabled_tag 11 +#define meshtastic_ModuleConfig_TelemetryConfig_health_update_interval_tag 12 +#define meshtastic_ModuleConfig_TelemetryConfig_health_screen_enabled_tag 13 #define meshtastic_ModuleConfig_CannedMessageConfig_rotary1_enabled_tag 1 #define meshtastic_ModuleConfig_CannedMessageConfig_inputbroker_pin_a_tag 2 #define meshtastic_ModuleConfig_CannedMessageConfig_inputbroker_pin_b_tag 3 @@ -623,9 +686,18 @@ X(a, STATIC, SINGULAR, BOOL, encryption_enabled, 5) \ X(a, STATIC, SINGULAR, BOOL, json_enabled, 6) \ X(a, STATIC, SINGULAR, BOOL, tls_enabled, 7) \ X(a, STATIC, SINGULAR, STRING, root, 8) \ -X(a, STATIC, SINGULAR, BOOL, proxy_to_client_enabled, 9) +X(a, STATIC, SINGULAR, BOOL, proxy_to_client_enabled, 9) \ +X(a, STATIC, SINGULAR, BOOL, map_reporting_enabled, 10) \ +X(a, STATIC, OPTIONAL, MESSAGE, map_report_settings, 11) #define meshtastic_ModuleConfig_MQTTConfig_CALLBACK NULL #define meshtastic_ModuleConfig_MQTTConfig_DEFAULT NULL +#define meshtastic_ModuleConfig_MQTTConfig_map_report_settings_MSGTYPE meshtastic_ModuleConfig_MapReportSettings + +#define meshtastic_ModuleConfig_MapReportSettings_FIELDLIST(X, a) \ +X(a, STATIC, SINGULAR, UINT32, publish_interval_secs, 1) \ +X(a, STATIC, SINGULAR, UINT32, position_precision, 2) +#define meshtastic_ModuleConfig_MapReportSettings_CALLBACK NULL +#define meshtastic_ModuleConfig_MapReportSettings_DEFAULT NULL #define meshtastic_ModuleConfig_RemoteHardwareConfig_FIELDLIST(X, a) \ X(a, STATIC, SINGULAR, BOOL, enabled, 1) \ @@ -648,7 +720,7 @@ X(a, STATIC, SINGULAR, UINT32, state_broadcast_secs, 3) \ X(a, STATIC, SINGULAR, BOOL, send_bell, 4) \ X(a, STATIC, SINGULAR, STRING, name, 5) \ X(a, STATIC, SINGULAR, UINT32, monitor_pin, 6) \ -X(a, STATIC, SINGULAR, BOOL, detection_triggered_high, 7) \ +X(a, STATIC, SINGULAR, UENUM, detection_trigger_type, 7) \ X(a, STATIC, SINGULAR, BOOL, use_pullup, 8) #define meshtastic_ModuleConfig_DetectionSensorConfig_CALLBACK NULL #define meshtastic_ModuleConfig_DetectionSensorConfig_DEFAULT NULL @@ -666,7 +738,9 @@ X(a, STATIC, SINGULAR, UINT32, i2s_sck, 7) #define meshtastic_ModuleConfig_PaxcounterConfig_FIELDLIST(X, a) \ X(a, STATIC, SINGULAR, BOOL, enabled, 1) \ -X(a, STATIC, SINGULAR, UINT32, paxcounter_update_interval, 2) +X(a, STATIC, SINGULAR, UINT32, paxcounter_update_interval, 2) \ +X(a, STATIC, SINGULAR, INT32, wifi_threshold, 3) \ +X(a, STATIC, SINGULAR, INT32, ble_threshold, 4) #define meshtastic_ModuleConfig_PaxcounterConfig_CALLBACK NULL #define meshtastic_ModuleConfig_PaxcounterConfig_DEFAULT NULL @@ -706,7 +780,8 @@ X(a, STATIC, SINGULAR, BOOL, enabled, 1) \ X(a, STATIC, SINGULAR, BOOL, heartbeat, 2) \ X(a, STATIC, SINGULAR, UINT32, records, 3) \ X(a, STATIC, SINGULAR, UINT32, history_return_max, 4) \ -X(a, STATIC, SINGULAR, UINT32, history_return_window, 5) +X(a, STATIC, SINGULAR, UINT32, history_return_window, 5) \ +X(a, STATIC, SINGULAR, BOOL, is_server, 6) #define meshtastic_ModuleConfig_StoreForwardConfig_CALLBACK NULL #define meshtastic_ModuleConfig_StoreForwardConfig_DEFAULT NULL @@ -727,7 +802,10 @@ X(a, STATIC, SINGULAR, BOOL, air_quality_enabled, 6) \ X(a, STATIC, SINGULAR, UINT32, air_quality_interval, 7) \ X(a, STATIC, SINGULAR, BOOL, power_measurement_enabled, 8) \ X(a, STATIC, SINGULAR, UINT32, power_update_interval, 9) \ -X(a, STATIC, SINGULAR, BOOL, power_screen_enabled, 10) +X(a, STATIC, SINGULAR, BOOL, power_screen_enabled, 10) \ +X(a, STATIC, SINGULAR, BOOL, health_measurement_enabled, 11) \ +X(a, STATIC, SINGULAR, UINT32, health_update_interval, 12) \ +X(a, STATIC, SINGULAR, BOOL, health_screen_enabled, 13) #define meshtastic_ModuleConfig_TelemetryConfig_CALLBACK NULL #define meshtastic_ModuleConfig_TelemetryConfig_DEFAULT NULL @@ -764,6 +842,7 @@ X(a, STATIC, SINGULAR, UENUM, type, 3) extern const pb_msgdesc_t meshtastic_ModuleConfig_msg; extern const pb_msgdesc_t meshtastic_ModuleConfig_MQTTConfig_msg; +extern const pb_msgdesc_t meshtastic_ModuleConfig_MapReportSettings_msg; extern const pb_msgdesc_t meshtastic_ModuleConfig_RemoteHardwareConfig_msg; extern const pb_msgdesc_t meshtastic_ModuleConfig_NeighborInfoConfig_msg; extern const pb_msgdesc_t meshtastic_ModuleConfig_DetectionSensorConfig_msg; @@ -781,6 +860,7 @@ extern const pb_msgdesc_t meshtastic_RemoteHardwarePin_msg; /* Defines for backwards compatibility with code written before nanopb-0.4.0 */ #define meshtastic_ModuleConfig_fields &meshtastic_ModuleConfig_msg #define meshtastic_ModuleConfig_MQTTConfig_fields &meshtastic_ModuleConfig_MQTTConfig_msg +#define meshtastic_ModuleConfig_MapReportSettings_fields &meshtastic_ModuleConfig_MapReportSettings_msg #define meshtastic_ModuleConfig_RemoteHardwareConfig_fields &meshtastic_ModuleConfig_RemoteHardwareConfig_msg #define meshtastic_ModuleConfig_NeighborInfoConfig_fields &meshtastic_ModuleConfig_NeighborInfoConfig_msg #define meshtastic_ModuleConfig_DetectionSensorConfig_fields &meshtastic_ModuleConfig_DetectionSensorConfig_msg @@ -796,20 +876,22 @@ extern const pb_msgdesc_t meshtastic_RemoteHardwarePin_msg; #define meshtastic_RemoteHardwarePin_fields &meshtastic_RemoteHardwarePin_msg /* Maximum encoded size of messages (where known) */ +#define MESHTASTIC_MESHTASTIC_MODULE_CONFIG_PB_H_MAX_SIZE meshtastic_ModuleConfig_size #define meshtastic_ModuleConfig_AmbientLightingConfig_size 14 #define meshtastic_ModuleConfig_AudioConfig_size 19 #define meshtastic_ModuleConfig_CannedMessageConfig_size 49 #define meshtastic_ModuleConfig_DetectionSensorConfig_size 44 #define meshtastic_ModuleConfig_ExternalNotificationConfig_size 42 -#define meshtastic_ModuleConfig_MQTTConfig_size 222 +#define meshtastic_ModuleConfig_MQTTConfig_size 254 +#define meshtastic_ModuleConfig_MapReportSettings_size 12 #define meshtastic_ModuleConfig_NeighborInfoConfig_size 8 -#define meshtastic_ModuleConfig_PaxcounterConfig_size 8 +#define meshtastic_ModuleConfig_PaxcounterConfig_size 30 #define meshtastic_ModuleConfig_RangeTestConfig_size 10 #define meshtastic_ModuleConfig_RemoteHardwareConfig_size 96 #define meshtastic_ModuleConfig_SerialConfig_size 28 -#define meshtastic_ModuleConfig_StoreForwardConfig_size 22 -#define meshtastic_ModuleConfig_TelemetryConfig_size 36 -#define meshtastic_ModuleConfig_size 225 +#define meshtastic_ModuleConfig_StoreForwardConfig_size 24 +#define meshtastic_ModuleConfig_TelemetryConfig_size 46 +#define meshtastic_ModuleConfig_size 257 #define meshtastic_RemoteHardwarePin_size 21 #ifdef __cplusplus diff --git a/src/mesh/generated/meshtastic/mqtt.pb.c b/src/mesh/generated/meshtastic/mqtt.pb.cpp similarity index 75% rename from src/mesh/generated/meshtastic/mqtt.pb.c rename to src/mesh/generated/meshtastic/mqtt.pb.cpp index 3046e6109..74536cb79 100644 --- a/src/mesh/generated/meshtastic/mqtt.pb.c +++ b/src/mesh/generated/meshtastic/mqtt.pb.cpp @@ -1,5 +1,5 @@ /* Automatically generated nanopb constant definitions */ -/* Generated by nanopb-0.4.7 */ +/* Generated by nanopb-0.4.9 */ #include "meshtastic/mqtt.pb.h" #if PB_PROTO_HEADER_VERSION != 40 @@ -9,4 +9,7 @@ PB_BIND(meshtastic_ServiceEnvelope, meshtastic_ServiceEnvelope, AUTO) +PB_BIND(meshtastic_MapReport, meshtastic_MapReport, AUTO) + + diff --git a/src/mesh/generated/meshtastic/mqtt.pb.h b/src/mesh/generated/meshtastic/mqtt.pb.h index 12e83c724..4d1027374 100644 --- a/src/mesh/generated/meshtastic/mqtt.pb.h +++ b/src/mesh/generated/meshtastic/mqtt.pb.h @@ -1,9 +1,10 @@ /* Automatically generated nanopb header */ -/* Generated by nanopb-0.4.7 */ +/* Generated by nanopb-0.4.9 */ #ifndef PB_MESHTASTIC_MESHTASTIC_MQTT_PB_H_INCLUDED #define PB_MESHTASTIC_MESHTASTIC_MQTT_PB_H_INCLUDED #include +#include "meshtastic/config.pb.h" #include "meshtastic/mesh.pb.h" #if PB_PROTO_HEADER_VERSION != 40 @@ -23,6 +24,38 @@ typedef struct _meshtastic_ServiceEnvelope { char *gateway_id; } meshtastic_ServiceEnvelope; +/* Information about a node intended to be reported unencrypted to a map using MQTT. */ +typedef struct _meshtastic_MapReport { + /* A full name for this user, i.e. "Kevin Hester" */ + char long_name[40]; + /* A VERY short name, ideally two characters. + Suitable for a tiny OLED screen */ + char short_name[5]; + /* Role of the node that applies specific settings for a particular use-case */ + meshtastic_Config_DeviceConfig_Role role; + /* Hardware model of the node, i.e. T-Beam, Heltec V3, etc... */ + meshtastic_HardwareModel hw_model; + /* Device firmware version string */ + char firmware_version[18]; + /* The region code for the radio (US, CN, EU433, etc...) */ + meshtastic_Config_LoRaConfig_RegionCode region; + /* Modem preset used by the radio (LongFast, MediumSlow, etc...) */ + meshtastic_Config_LoRaConfig_ModemPreset modem_preset; + /* Whether the node has a channel with default PSK and name (LongFast, MediumSlow, etc...) + and it uses the default frequency slot given the region and modem preset. */ + bool has_default_channel; + /* Latitude: multiply by 1e-7 to get degrees in floating point */ + int32_t latitude_i; + /* Longitude: multiply by 1e-7 to get degrees in floating point */ + int32_t longitude_i; + /* Altitude in meters above MSL */ + int32_t altitude; + /* Indicates the bits of precision for latitude and longitude set by the sending node */ + uint32_t position_precision; + /* Number of online nodes (heard in the last 2 hours) this node has in its list that were received locally (not via MQTT) */ + uint16_t num_online_local_nodes; +} meshtastic_MapReport; + #ifdef __cplusplus extern "C" { @@ -30,12 +63,27 @@ extern "C" { /* Initializer values for message structs */ #define meshtastic_ServiceEnvelope_init_default {NULL, NULL, NULL} +#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} #define meshtastic_ServiceEnvelope_init_zero {NULL, NULL, NULL} +#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} /* Field tags (for use in manual encoding/decoding) */ #define meshtastic_ServiceEnvelope_packet_tag 1 #define meshtastic_ServiceEnvelope_channel_id_tag 2 #define meshtastic_ServiceEnvelope_gateway_id_tag 3 +#define meshtastic_MapReport_long_name_tag 1 +#define meshtastic_MapReport_short_name_tag 2 +#define meshtastic_MapReport_role_tag 3 +#define meshtastic_MapReport_hw_model_tag 4 +#define meshtastic_MapReport_firmware_version_tag 5 +#define meshtastic_MapReport_region_tag 6 +#define meshtastic_MapReport_modem_preset_tag 7 +#define meshtastic_MapReport_has_default_channel_tag 8 +#define meshtastic_MapReport_latitude_i_tag 9 +#define meshtastic_MapReport_longitude_i_tag 10 +#define meshtastic_MapReport_altitude_tag 11 +#define meshtastic_MapReport_position_precision_tag 12 +#define meshtastic_MapReport_num_online_local_nodes_tag 13 /* Struct field encoding specification for nanopb */ #define meshtastic_ServiceEnvelope_FIELDLIST(X, a) \ @@ -46,13 +94,34 @@ X(a, POINTER, SINGULAR, STRING, gateway_id, 3) #define meshtastic_ServiceEnvelope_DEFAULT NULL #define meshtastic_ServiceEnvelope_packet_MSGTYPE meshtastic_MeshPacket +#define meshtastic_MapReport_FIELDLIST(X, a) \ +X(a, STATIC, SINGULAR, STRING, long_name, 1) \ +X(a, STATIC, SINGULAR, STRING, short_name, 2) \ +X(a, STATIC, SINGULAR, UENUM, role, 3) \ +X(a, STATIC, SINGULAR, UENUM, hw_model, 4) \ +X(a, STATIC, SINGULAR, STRING, firmware_version, 5) \ +X(a, STATIC, SINGULAR, UENUM, region, 6) \ +X(a, STATIC, SINGULAR, UENUM, modem_preset, 7) \ +X(a, STATIC, SINGULAR, BOOL, has_default_channel, 8) \ +X(a, STATIC, SINGULAR, SFIXED32, latitude_i, 9) \ +X(a, STATIC, SINGULAR, SFIXED32, longitude_i, 10) \ +X(a, STATIC, SINGULAR, INT32, altitude, 11) \ +X(a, STATIC, SINGULAR, UINT32, position_precision, 12) \ +X(a, STATIC, SINGULAR, UINT32, num_online_local_nodes, 13) +#define meshtastic_MapReport_CALLBACK NULL +#define meshtastic_MapReport_DEFAULT NULL + extern const pb_msgdesc_t meshtastic_ServiceEnvelope_msg; +extern const pb_msgdesc_t meshtastic_MapReport_msg; /* Defines for backwards compatibility with code written before nanopb-0.4.0 */ #define meshtastic_ServiceEnvelope_fields &meshtastic_ServiceEnvelope_msg +#define meshtastic_MapReport_fields &meshtastic_MapReport_msg /* Maximum encoded size of messages (where known) */ /* meshtastic_ServiceEnvelope_size depends on runtime parameters */ +#define MESHTASTIC_MESHTASTIC_MQTT_PB_H_MAX_SIZE meshtastic_MapReport_size +#define meshtastic_MapReport_size 108 #ifdef __cplusplus } /* extern "C" */ diff --git a/src/mesh/generated/meshtastic/paxcount.pb.c b/src/mesh/generated/meshtastic/paxcount.pb.cpp similarity index 89% rename from src/mesh/generated/meshtastic/paxcount.pb.c rename to src/mesh/generated/meshtastic/paxcount.pb.cpp index 57d5f5be9..403288147 100644 --- a/src/mesh/generated/meshtastic/paxcount.pb.c +++ b/src/mesh/generated/meshtastic/paxcount.pb.cpp @@ -1,5 +1,5 @@ /* Automatically generated nanopb constant definitions */ -/* Generated by nanopb-0.4.7 */ +/* Generated by nanopb-0.4.9 */ #include "meshtastic/paxcount.pb.h" #if PB_PROTO_HEADER_VERSION != 40 diff --git a/src/mesh/generated/meshtastic/paxcount.pb.h b/src/mesh/generated/meshtastic/paxcount.pb.h index 4b643293c..b6b51fdd5 100644 --- a/src/mesh/generated/meshtastic/paxcount.pb.h +++ b/src/mesh/generated/meshtastic/paxcount.pb.h @@ -1,5 +1,5 @@ /* Automatically generated nanopb header */ -/* Generated by nanopb-0.4.7 */ +/* Generated by nanopb-0.4.9 */ #ifndef PB_MESHTASTIC_MESHTASTIC_PAXCOUNT_PB_H_INCLUDED #define PB_MESHTASTIC_MESHTASTIC_PAXCOUNT_PB_H_INCLUDED @@ -48,6 +48,7 @@ extern const pb_msgdesc_t meshtastic_Paxcount_msg; #define meshtastic_Paxcount_fields &meshtastic_Paxcount_msg /* Maximum encoded size of messages (where known) */ +#define MESHTASTIC_MESHTASTIC_PAXCOUNT_PB_H_MAX_SIZE meshtastic_Paxcount_size #define meshtastic_Paxcount_size 18 #ifdef __cplusplus diff --git a/src/mesh/generated/meshtastic/portnums.pb.c b/src/mesh/generated/meshtastic/portnums.pb.cpp similarity index 86% rename from src/mesh/generated/meshtastic/portnums.pb.c rename to src/mesh/generated/meshtastic/portnums.pb.cpp index dd0d00e20..8fca9af79 100644 --- a/src/mesh/generated/meshtastic/portnums.pb.c +++ b/src/mesh/generated/meshtastic/portnums.pb.cpp @@ -1,5 +1,5 @@ /* Automatically generated nanopb constant definitions */ -/* Generated by nanopb-0.4.7 */ +/* Generated by nanopb-0.4.9 */ #include "meshtastic/portnums.pb.h" #if PB_PROTO_HEADER_VERSION != 40 @@ -8,3 +8,4 @@ + diff --git a/src/mesh/generated/meshtastic/portnums.pb.h b/src/mesh/generated/meshtastic/portnums.pb.h index 88342e5dc..df6cf32c2 100644 --- a/src/mesh/generated/meshtastic/portnums.pb.h +++ b/src/mesh/generated/meshtastic/portnums.pb.h @@ -1,5 +1,5 @@ /* Automatically generated nanopb header */ -/* Generated by nanopb-0.4.7 */ +/* Generated by nanopb-0.4.9 */ #ifndef PB_MESHTASTIC_MESHTASTIC_PORTNUMS_PB_H_INCLUDED #define PB_MESHTASTIC_MESHTASTIC_PORTNUMS_PB_H_INCLUDED @@ -38,19 +38,19 @@ typedef enum _meshtastic_PortNum { ENCODING: Protobuf */ meshtastic_PortNum_REMOTE_HARDWARE_APP = 2, /* The built-in position messaging app. - Payload is a [Position](/docs/developers/protobufs/api#position) message + Payload is a Position message. ENCODING: Protobuf */ meshtastic_PortNum_POSITION_APP = 3, /* The built-in user info app. - Payload is a [User](/docs/developers/protobufs/api#user) message + Payload is a User message. ENCODING: Protobuf */ meshtastic_PortNum_NODEINFO_APP = 4, /* Protocol control packets for mesh protocol use. - Payload is a [Routing](/docs/developers/protobufs/api#routing) message + Payload is a Routing message. ENCODING: Protobuf */ meshtastic_PortNum_ROUTING_APP = 5, /* Admin control packets. - Payload is a [AdminMessage](/docs/developers/protobufs/api#adminmessage) message + Payload is a AdminMessage message. ENCODING: Protobuf */ meshtastic_PortNum_ADMIN_APP = 6, /* Compressed TEXT_MESSAGE payloads. @@ -60,7 +60,7 @@ typedef enum _meshtastic_PortNum { any incoming TEXT_MESSAGE_COMPRESSED_APP payload and convert to TEXT_MESSAGE_APP. */ meshtastic_PortNum_TEXT_MESSAGE_COMPRESSED_APP = 7, /* Waypoint payloads. - Payload is a [Waypoint](/docs/developers/protobufs/api#waypoint) message + Payload is a Waypoint message. ENCODING: Protobuf */ meshtastic_PortNum_WAYPOINT_APP = 8, /* Audio Payloads. @@ -113,7 +113,7 @@ typedef enum _meshtastic_PortNum { ENCODING: Protobuf (?) */ meshtastic_PortNum_SIMULATOR_APP = 69, /* Provides a traceroute functionality to show the route a packet towards - a certain destination would take on the mesh. + a certain destination would take on the mesh. Contains a RouteDiscovery message as payload. ENCODING: Protobuf */ meshtastic_PortNum_TRACEROUTE_APP = 70, /* Aggregates edge info for the network by sending out a list of each node's neighbors @@ -122,6 +122,10 @@ typedef enum _meshtastic_PortNum { /* ATAK Plugin Portnum for payloads from the official Meshtastic ATAK plugin */ meshtastic_PortNum_ATAK_PLUGIN = 72, + /* Provides unencrypted information about a node for consumption by a map via MQTT */ + meshtastic_PortNum_MAP_REPORT_APP = 73, + /* PowerStress based monitoring support (for automated power consumption testing) */ + meshtastic_PortNum_POWERSTRESS_APP = 74, /* Private applications should use portnums >= 256. To simplify initial development and testing you can use "PRIVATE_APP" in your code without needing to rebuild protobuf files (via [regen-protos.sh](https://github.com/meshtastic/firmware/blob/master/bin/regen-protos.sh)) */ diff --git a/src/mesh/generated/meshtastic/powermon.pb.cpp b/src/mesh/generated/meshtastic/powermon.pb.cpp new file mode 100644 index 000000000..6a9b7551a --- /dev/null +++ b/src/mesh/generated/meshtastic/powermon.pb.cpp @@ -0,0 +1,19 @@ +/* Automatically generated nanopb constant definitions */ +/* Generated by nanopb-0.4.9 */ + +#include "meshtastic/powermon.pb.h" +#if PB_PROTO_HEADER_VERSION != 40 +#error Regenerate this file with the current version of nanopb generator. +#endif + +PB_BIND(meshtastic_PowerMon, meshtastic_PowerMon, AUTO) + + +PB_BIND(meshtastic_PowerStressMessage, meshtastic_PowerStressMessage, AUTO) + + + + + + + diff --git a/src/mesh/generated/meshtastic/powermon.pb.h b/src/mesh/generated/meshtastic/powermon.pb.h new file mode 100644 index 000000000..5add85b85 --- /dev/null +++ b/src/mesh/generated/meshtastic/powermon.pb.h @@ -0,0 +1,138 @@ +/* Automatically generated nanopb header */ +/* Generated by nanopb-0.4.9 */ + +#ifndef PB_MESHTASTIC_MESHTASTIC_POWERMON_PB_H_INCLUDED +#define PB_MESHTASTIC_MESHTASTIC_POWERMON_PB_H_INCLUDED +#include + +#if PB_PROTO_HEADER_VERSION != 40 +#error Regenerate this file with the current version of nanopb generator. +#endif + +/* Enum definitions */ +/* Any significant power changing event in meshtastic should be tagged with a powermon state transition. +If you are making new meshtastic features feel free to add new entries at the end of this definition. */ +typedef enum _meshtastic_PowerMon_State { + meshtastic_PowerMon_State_None = 0, + meshtastic_PowerMon_State_CPU_DeepSleep = 1, + meshtastic_PowerMon_State_CPU_LightSleep = 2, + /* The external Vext1 power is on. Many boards have auxillary power rails that the CPU turns on only +occasionally. In cases where that rail has multiple devices on it we usually want to have logging on +the state of that rail as an independent record. +For instance on the Heltec Tracker 1.1 board, this rail is the power source for the GPS and screen. + +The log messages will be short and complete (see PowerMon.Event in the protobufs for details). +something like "S:PM:C,0x00001234,REASON" where the hex number is the bitmask of all current states. +(We use a bitmask for states so that if a log message gets lost it won't be fatal) */ + meshtastic_PowerMon_State_Vext1_On = 4, + meshtastic_PowerMon_State_Lora_RXOn = 8, + meshtastic_PowerMon_State_Lora_TXOn = 16, + meshtastic_PowerMon_State_Lora_RXActive = 32, + meshtastic_PowerMon_State_BT_On = 64, + meshtastic_PowerMon_State_LED_On = 128, + meshtastic_PowerMon_State_Screen_On = 256, + meshtastic_PowerMon_State_Screen_Drawing = 512, + meshtastic_PowerMon_State_Wifi_On = 1024, + /* GPS is actively trying to find our location +See GPSPowerState for more details */ + meshtastic_PowerMon_State_GPS_Active = 2048 +} meshtastic_PowerMon_State; + +/* What operation would we like the UUT to perform. +note: senders should probably set want_response in their request packets, so that they can know when the state +machine has started processing their request */ +typedef enum _meshtastic_PowerStressMessage_Opcode { + /* Unset/unused */ + meshtastic_PowerStressMessage_Opcode_UNSET = 0, + meshtastic_PowerStressMessage_Opcode_PRINT_INFO = 1, /* Print board version slog and send an ack that we are alive and ready to process commands */ + 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) */ + meshtastic_PowerStressMessage_Opcode_END_QUIET = 3, /* Stop powerstress processing - probably by just rebooting the board */ + meshtastic_PowerStressMessage_Opcode_SCREEN_ON = 16, /* Turn the screen on */ + meshtastic_PowerStressMessage_Opcode_SCREEN_OFF = 17, /* Turn the screen off */ + meshtastic_PowerStressMessage_Opcode_CPU_IDLE = 32, /* Let the CPU run but we assume mostly idling for num_seconds */ + meshtastic_PowerStressMessage_Opcode_CPU_DEEPSLEEP = 33, /* Force deep sleep for FIXME seconds */ + meshtastic_PowerStressMessage_Opcode_CPU_FULLON = 34, /* Spin the CPU as fast as possible for num_seconds */ + meshtastic_PowerStressMessage_Opcode_LED_ON = 48, /* Turn the LED on for num_seconds (and leave it on - for baseline power measurement purposes) */ + meshtastic_PowerStressMessage_Opcode_LED_OFF = 49, /* Force the LED off for num_seconds */ + meshtastic_PowerStressMessage_Opcode_LORA_OFF = 64, /* Completely turn off the LORA radio for num_seconds */ + meshtastic_PowerStressMessage_Opcode_LORA_TX = 65, /* Send Lora packets for num_seconds */ + 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) */ + meshtastic_PowerStressMessage_Opcode_BT_OFF = 80, /* Turn off the BT radio for num_seconds */ + meshtastic_PowerStressMessage_Opcode_BT_ON = 81, /* Turn on the BT radio for num_seconds */ + meshtastic_PowerStressMessage_Opcode_WIFI_OFF = 96, /* Turn off the WIFI radio for num_seconds */ + meshtastic_PowerStressMessage_Opcode_WIFI_ON = 97, /* Turn on the WIFI radio for num_seconds */ + meshtastic_PowerStressMessage_Opcode_GPS_OFF = 112, /* Turn off the GPS radio for num_seconds */ + meshtastic_PowerStressMessage_Opcode_GPS_ON = 113 /* Turn on the GPS radio for num_seconds */ +} meshtastic_PowerStressMessage_Opcode; + +/* Struct definitions */ +/* Note: There are no 'PowerMon' messages normally in use (PowerMons are sent only as structured logs - slogs). +But we wrap our State enum in this message to effectively nest a namespace (without our linter yelling at us) */ +typedef struct _meshtastic_PowerMon { + char dummy_field; +} meshtastic_PowerMon; + +/* PowerStress testing support via the C++ PowerStress module */ +typedef struct _meshtastic_PowerStressMessage { + /* What type of HardwareMessage is this? */ + meshtastic_PowerStressMessage_Opcode cmd; + float num_seconds; +} meshtastic_PowerStressMessage; + + +#ifdef __cplusplus +extern "C" { +#endif + +/* Helper constants for enums */ +#define _meshtastic_PowerMon_State_MIN meshtastic_PowerMon_State_None +#define _meshtastic_PowerMon_State_MAX meshtastic_PowerMon_State_GPS_Active +#define _meshtastic_PowerMon_State_ARRAYSIZE ((meshtastic_PowerMon_State)(meshtastic_PowerMon_State_GPS_Active+1)) + +#define _meshtastic_PowerStressMessage_Opcode_MIN meshtastic_PowerStressMessage_Opcode_UNSET +#define _meshtastic_PowerStressMessage_Opcode_MAX meshtastic_PowerStressMessage_Opcode_GPS_ON +#define _meshtastic_PowerStressMessage_Opcode_ARRAYSIZE ((meshtastic_PowerStressMessage_Opcode)(meshtastic_PowerStressMessage_Opcode_GPS_ON+1)) + + +#define meshtastic_PowerStressMessage_cmd_ENUMTYPE meshtastic_PowerStressMessage_Opcode + + +/* Initializer values for message structs */ +#define meshtastic_PowerMon_init_default {0} +#define meshtastic_PowerStressMessage_init_default {_meshtastic_PowerStressMessage_Opcode_MIN, 0} +#define meshtastic_PowerMon_init_zero {0} +#define meshtastic_PowerStressMessage_init_zero {_meshtastic_PowerStressMessage_Opcode_MIN, 0} + +/* Field tags (for use in manual encoding/decoding) */ +#define meshtastic_PowerStressMessage_cmd_tag 1 +#define meshtastic_PowerStressMessage_num_seconds_tag 2 + +/* Struct field encoding specification for nanopb */ +#define meshtastic_PowerMon_FIELDLIST(X, a) \ + +#define meshtastic_PowerMon_CALLBACK NULL +#define meshtastic_PowerMon_DEFAULT NULL + +#define meshtastic_PowerStressMessage_FIELDLIST(X, a) \ +X(a, STATIC, SINGULAR, UENUM, cmd, 1) \ +X(a, STATIC, SINGULAR, FLOAT, num_seconds, 2) +#define meshtastic_PowerStressMessage_CALLBACK NULL +#define meshtastic_PowerStressMessage_DEFAULT NULL + +extern const pb_msgdesc_t meshtastic_PowerMon_msg; +extern const pb_msgdesc_t meshtastic_PowerStressMessage_msg; + +/* Defines for backwards compatibility with code written before nanopb-0.4.0 */ +#define meshtastic_PowerMon_fields &meshtastic_PowerMon_msg +#define meshtastic_PowerStressMessage_fields &meshtastic_PowerStressMessage_msg + +/* Maximum encoded size of messages (where known) */ +#define MESHTASTIC_MESHTASTIC_POWERMON_PB_H_MAX_SIZE meshtastic_PowerStressMessage_size +#define meshtastic_PowerMon_size 0 +#define meshtastic_PowerStressMessage_size 7 + +#ifdef __cplusplus +} /* extern "C" */ +#endif + +#endif diff --git a/src/mesh/generated/meshtastic/remote_hardware.pb.c b/src/mesh/generated/meshtastic/remote_hardware.pb.cpp similarity index 89% rename from src/mesh/generated/meshtastic/remote_hardware.pb.c rename to src/mesh/generated/meshtastic/remote_hardware.pb.cpp index f368ec1ef..239950e7e 100644 --- a/src/mesh/generated/meshtastic/remote_hardware.pb.c +++ b/src/mesh/generated/meshtastic/remote_hardware.pb.cpp @@ -1,5 +1,5 @@ /* Automatically generated nanopb constant definitions */ -/* Generated by nanopb-0.4.7 */ +/* Generated by nanopb-0.4.9 */ #include "meshtastic/remote_hardware.pb.h" #if PB_PROTO_HEADER_VERSION != 40 @@ -11,3 +11,4 @@ PB_BIND(meshtastic_HardwareMessage, meshtastic_HardwareMessage, AUTO) + diff --git a/src/mesh/generated/meshtastic/remote_hardware.pb.h b/src/mesh/generated/meshtastic/remote_hardware.pb.h index 26df97616..ade250e93 100644 --- a/src/mesh/generated/meshtastic/remote_hardware.pb.h +++ b/src/mesh/generated/meshtastic/remote_hardware.pb.h @@ -1,5 +1,5 @@ /* Automatically generated nanopb header */ -/* Generated by nanopb-0.4.7 */ +/* Generated by nanopb-0.4.9 */ #ifndef PB_MESHTASTIC_MESHTASTIC_REMOTE_HARDWARE_PB_H_INCLUDED #define PB_MESHTASTIC_MESHTASTIC_REMOTE_HARDWARE_PB_H_INCLUDED @@ -84,6 +84,7 @@ extern const pb_msgdesc_t meshtastic_HardwareMessage_msg; #define meshtastic_HardwareMessage_fields &meshtastic_HardwareMessage_msg /* Maximum encoded size of messages (where known) */ +#define MESHTASTIC_MESHTASTIC_REMOTE_HARDWARE_PB_H_MAX_SIZE meshtastic_HardwareMessage_size #define meshtastic_HardwareMessage_size 24 #ifdef __cplusplus diff --git a/src/mesh/generated/meshtastic/rtttl.pb.c b/src/mesh/generated/meshtastic/rtttl.pb.cpp similarity index 89% rename from src/mesh/generated/meshtastic/rtttl.pb.c rename to src/mesh/generated/meshtastic/rtttl.pb.cpp index 685bbde45..61ad8b73f 100644 --- a/src/mesh/generated/meshtastic/rtttl.pb.c +++ b/src/mesh/generated/meshtastic/rtttl.pb.cpp @@ -1,5 +1,5 @@ /* Automatically generated nanopb constant definitions */ -/* Generated by nanopb-0.4.7 */ +/* Generated by nanopb-0.4.9 */ #include "meshtastic/rtttl.pb.h" #if PB_PROTO_HEADER_VERSION != 40 diff --git a/src/mesh/generated/meshtastic/rtttl.pb.h b/src/mesh/generated/meshtastic/rtttl.pb.h index aa55d0b7d..2b7e35f11 100644 --- a/src/mesh/generated/meshtastic/rtttl.pb.h +++ b/src/mesh/generated/meshtastic/rtttl.pb.h @@ -1,5 +1,5 @@ /* Automatically generated nanopb header */ -/* Generated by nanopb-0.4.7 */ +/* Generated by nanopb-0.4.9 */ #ifndef PB_MESHTASTIC_MESHTASTIC_RTTTL_PB_H_INCLUDED #define PB_MESHTASTIC_MESHTASTIC_RTTTL_PB_H_INCLUDED @@ -40,6 +40,7 @@ extern const pb_msgdesc_t meshtastic_RTTTLConfig_msg; #define meshtastic_RTTTLConfig_fields &meshtastic_RTTTLConfig_msg /* Maximum encoded size of messages (where known) */ +#define MESHTASTIC_MESHTASTIC_RTTTL_PB_H_MAX_SIZE meshtastic_RTTTLConfig_size #define meshtastic_RTTTLConfig_size 232 #ifdef __cplusplus diff --git a/src/mesh/generated/meshtastic/storeforward.pb.c b/src/mesh/generated/meshtastic/storeforward.pb.cpp similarity index 94% rename from src/mesh/generated/meshtastic/storeforward.pb.c rename to src/mesh/generated/meshtastic/storeforward.pb.cpp index 44a1c70c1..71a232bf6 100644 --- a/src/mesh/generated/meshtastic/storeforward.pb.c +++ b/src/mesh/generated/meshtastic/storeforward.pb.cpp @@ -1,5 +1,5 @@ /* Automatically generated nanopb constant definitions */ -/* Generated by nanopb-0.4.7 */ +/* Generated by nanopb-0.4.9 */ #include "meshtastic/storeforward.pb.h" #if PB_PROTO_HEADER_VERSION != 40 @@ -20,3 +20,4 @@ PB_BIND(meshtastic_StoreAndForward_Heartbeat, meshtastic_StoreAndForward_Heartbe + diff --git a/src/mesh/generated/meshtastic/storeforward.pb.h b/src/mesh/generated/meshtastic/storeforward.pb.h index 55ab0b510..71f2fcad5 100644 --- a/src/mesh/generated/meshtastic/storeforward.pb.h +++ b/src/mesh/generated/meshtastic/storeforward.pb.h @@ -1,5 +1,5 @@ /* Automatically generated nanopb header */ -/* Generated by nanopb-0.4.7 */ +/* Generated by nanopb-0.4.9 */ #ifndef PB_MESHTASTIC_MESHTASTIC_STOREFORWARD_PB_H_INCLUDED #define PB_MESHTASTIC_MESHTASTIC_STOREFORWARD_PB_H_INCLUDED @@ -207,6 +207,7 @@ extern const pb_msgdesc_t meshtastic_StoreAndForward_Heartbeat_msg; #define meshtastic_StoreAndForward_Heartbeat_fields &meshtastic_StoreAndForward_Heartbeat_msg /* Maximum encoded size of messages (where known) */ +#define MESHTASTIC_MESHTASTIC_STOREFORWARD_PB_H_MAX_SIZE meshtastic_StoreAndForward_size #define meshtastic_StoreAndForward_Heartbeat_size 12 #define meshtastic_StoreAndForward_History_size 18 #define meshtastic_StoreAndForward_Statistics_size 50 diff --git a/src/mesh/generated/meshtastic/telemetry.pb.c b/src/mesh/generated/meshtastic/telemetry.pb.cpp similarity index 70% rename from src/mesh/generated/meshtastic/telemetry.pb.c rename to src/mesh/generated/meshtastic/telemetry.pb.cpp index 046998ae9..f6d39da6e 100644 --- a/src/mesh/generated/meshtastic/telemetry.pb.c +++ b/src/mesh/generated/meshtastic/telemetry.pb.cpp @@ -1,5 +1,5 @@ /* Automatically generated nanopb constant definitions */ -/* Generated by nanopb-0.4.7 */ +/* Generated by nanopb-0.4.9 */ #include "meshtastic/telemetry.pb.h" #if PB_PROTO_HEADER_VERSION != 40 @@ -18,8 +18,18 @@ PB_BIND(meshtastic_PowerMetrics, meshtastic_PowerMetrics, AUTO) PB_BIND(meshtastic_AirQualityMetrics, meshtastic_AirQualityMetrics, AUTO) +PB_BIND(meshtastic_LocalStats, meshtastic_LocalStats, AUTO) + + +PB_BIND(meshtastic_HealthMetrics, meshtastic_HealthMetrics, AUTO) + + PB_BIND(meshtastic_Telemetry, meshtastic_Telemetry, AUTO) +PB_BIND(meshtastic_Nau7802Config, meshtastic_Nau7802Config, AUTO) + + + diff --git a/src/mesh/generated/meshtastic/telemetry.pb.h b/src/mesh/generated/meshtastic/telemetry.pb.h index fc2780a96..a33988129 100644 --- a/src/mesh/generated/meshtastic/telemetry.pb.h +++ b/src/mesh/generated/meshtastic/telemetry.pb.h @@ -1,5 +1,5 @@ /* Automatically generated nanopb header */ -/* Generated by nanopb-0.4.7 */ +/* Generated by nanopb-0.4.9 */ #ifndef PB_MESHTASTIC_MESHTASTIC_TELEMETRY_PB_H_INCLUDED #define PB_MESHTASTIC_MESHTASTIC_TELEMETRY_PB_H_INCLUDED @@ -41,82 +41,223 @@ typedef enum _meshtastic_TelemetrySensorType { /* PM2.5 air quality sensor */ meshtastic_TelemetrySensorType_PMSA003I = 13, /* INA3221 3 Channel Voltage / Current Sensor */ - meshtastic_TelemetrySensorType_INA3221 = 14 + meshtastic_TelemetrySensorType_INA3221 = 14, + /* BMP085/BMP180 High accuracy temperature and pressure (older Version of BMP280) */ + meshtastic_TelemetrySensorType_BMP085 = 15, + /* RCWL-9620 Doppler Radar Distance Sensor, used for water level detection */ + meshtastic_TelemetrySensorType_RCWL9620 = 16, + /* Sensirion High accuracy temperature and humidity */ + meshtastic_TelemetrySensorType_SHT4X = 17, + /* VEML7700 high accuracy ambient light(Lux) digital 16-bit resolution sensor. */ + meshtastic_TelemetrySensorType_VEML7700 = 18, + /* MLX90632 non-contact IR temperature sensor. */ + meshtastic_TelemetrySensorType_MLX90632 = 19, + /* TI OPT3001 Ambient Light Sensor */ + meshtastic_TelemetrySensorType_OPT3001 = 20, + /* Lite On LTR-390UV-01 UV Light Sensor */ + meshtastic_TelemetrySensorType_LTR390UV = 21, + /* AMS TSL25911FN RGB Light Sensor */ + meshtastic_TelemetrySensorType_TSL25911FN = 22, + /* AHT10 Integrated temperature and humidity sensor */ + meshtastic_TelemetrySensorType_AHT10 = 23, + /* DFRobot Lark Weather station (temperature, humidity, pressure, wind speed and direction) */ + meshtastic_TelemetrySensorType_DFROBOT_LARK = 24, + /* NAU7802 Scale Chip or compatible */ + meshtastic_TelemetrySensorType_NAU7802 = 25, + /* BMP3XX High accuracy temperature and pressure */ + meshtastic_TelemetrySensorType_BMP3XX = 26, + /* ICM-20948 9-Axis digital motion processor */ + meshtastic_TelemetrySensorType_ICM20948 = 27, + /* MAX17048 1S lipo battery sensor (voltage, state of charge, time to go) */ + meshtastic_TelemetrySensorType_MAX17048 = 28, + /* Custom I2C sensor implementation based on https://github.com/meshtastic/i2c-sensor */ + meshtastic_TelemetrySensorType_CUSTOM_SENSOR = 29, + /* MAX30102 Pulse Oximeter and Heart-Rate Sensor */ + meshtastic_TelemetrySensorType_MAX30102 = 30, + /* MLX90614 non-contact IR temperature sensor. */ + meshtastic_TelemetrySensorType_MLX90614 = 31 } meshtastic_TelemetrySensorType; /* Struct definitions */ /* Key native device metrics such as battery level */ typedef struct _meshtastic_DeviceMetrics { /* 0-100 (>100 means powered) */ + bool has_battery_level; uint32_t battery_level; /* Voltage measured */ + bool has_voltage; float voltage; /* Utilization for the current channel, including well formed TX, RX and malformed RX (aka noise). */ + bool has_channel_utilization; float channel_utilization; /* Percent of airtime for transmission used within the last hour. */ + bool has_air_util_tx; float air_util_tx; + /* How long the device has been running since the last reboot (in seconds) */ + bool has_uptime_seconds; + uint32_t uptime_seconds; } meshtastic_DeviceMetrics; /* Weather station or other environmental metrics */ typedef struct _meshtastic_EnvironmentMetrics { /* Temperature measured */ + bool has_temperature; float temperature; /* Relative humidity percent measured */ + bool has_relative_humidity; float relative_humidity; /* Barometric pressure in hPA measured */ + bool has_barometric_pressure; float barometric_pressure; /* Gas resistance in MOhm measured */ + bool has_gas_resistance; float gas_resistance; /* Voltage measured (To be depreciated in favor of PowerMetrics in Meshtastic 3.x) */ + bool has_voltage; float voltage; /* Current measured (To be depreciated in favor of PowerMetrics in Meshtastic 3.x) */ + bool has_current; float current; + /* relative scale IAQ value as measured by Bosch BME680 . value 0-500. + Belongs to Air Quality but is not particle but VOC measurement. Other VOC values can also be put in here. */ + bool has_iaq; + uint16_t iaq; + /* RCWL9620 Doppler Radar Distance Sensor, used for water level detection. Float value in mm. */ + bool has_distance; + float distance; + /* VEML7700 high accuracy ambient light(Lux) digital 16-bit resolution sensor. */ + bool has_lux; + float lux; + /* VEML7700 high accuracy white light(irradiance) not calibrated digital 16-bit resolution sensor. */ + bool has_white_lux; + float white_lux; + /* Infrared lux */ + bool has_ir_lux; + float ir_lux; + /* Ultraviolet lux */ + bool has_uv_lux; + float uv_lux; + /* Wind direction in degrees + 0 degrees = North, 90 = East, etc... */ + bool has_wind_direction; + uint16_t wind_direction; + /* Wind speed in m/s */ + bool has_wind_speed; + float wind_speed; + /* Weight in KG */ + bool has_weight; + float weight; + /* Wind gust in m/s */ + bool has_wind_gust; + float wind_gust; + /* Wind lull in m/s */ + bool has_wind_lull; + float wind_lull; } meshtastic_EnvironmentMetrics; /* Power Metrics (voltage / current / etc) */ typedef struct _meshtastic_PowerMetrics { /* Voltage (Ch1) */ + bool has_ch1_voltage; float ch1_voltage; /* Current (Ch1) */ + bool has_ch1_current; float ch1_current; /* Voltage (Ch2) */ + bool has_ch2_voltage; float ch2_voltage; /* Current (Ch2) */ + bool has_ch2_current; float ch2_current; /* Voltage (Ch3) */ + bool has_ch3_voltage; float ch3_voltage; /* Current (Ch3) */ + bool has_ch3_current; float ch3_current; } meshtastic_PowerMetrics; /* Air quality metrics */ typedef struct _meshtastic_AirQualityMetrics { /* Concentration Units Standard PM1.0 */ + bool has_pm10_standard; uint32_t pm10_standard; /* Concentration Units Standard PM2.5 */ + bool has_pm25_standard; uint32_t pm25_standard; /* Concentration Units Standard PM10.0 */ + bool has_pm100_standard; uint32_t pm100_standard; /* Concentration Units Environmental PM1.0 */ + bool has_pm10_environmental; uint32_t pm10_environmental; /* Concentration Units Environmental PM2.5 */ + bool has_pm25_environmental; uint32_t pm25_environmental; /* Concentration Units Environmental PM10.0 */ + bool has_pm100_environmental; uint32_t pm100_environmental; /* 0.3um Particle Count */ + bool has_particles_03um; uint32_t particles_03um; /* 0.5um Particle Count */ + bool has_particles_05um; uint32_t particles_05um; /* 1.0um Particle Count */ + bool has_particles_10um; uint32_t particles_10um; /* 2.5um Particle Count */ + bool has_particles_25um; uint32_t particles_25um; /* 5.0um Particle Count */ + bool has_particles_50um; uint32_t particles_50um; /* 10.0um Particle Count */ + bool has_particles_100um; uint32_t particles_100um; } meshtastic_AirQualityMetrics; +/* Local device mesh statistics */ +typedef struct _meshtastic_LocalStats { + /* How long the device has been running since the last reboot (in seconds) */ + uint32_t uptime_seconds; + /* Utilization for the current channel, including well formed TX, RX and malformed RX (aka noise). */ + float channel_utilization; + /* Percent of airtime for transmission used within the last hour. */ + float air_util_tx; + /* Number of packets sent */ + uint32_t num_packets_tx; + /* Number of packets received (both good and bad) */ + uint32_t num_packets_rx; + /* Number of packets received that are malformed or violate the protocol */ + uint32_t num_packets_rx_bad; + /* Number of nodes online (in the past 2 hours) */ + uint16_t num_online_nodes; + /* Number of nodes total */ + uint16_t num_total_nodes; + /* Number of received packets that were duplicates (due to multiple nodes relaying). + 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. */ + uint32_t num_rx_dupe; + /* Number of packets we transmitted that were a relay for others (not originating from ourselves). */ + uint32_t num_tx_relay; + /* Number of times we canceled a packet to be relayed, because someone else did it before us. + This will always be zero for ROUTERs/REPEATERs. If this number is high, some other node(s) is/are relaying faster than you. */ + uint32_t num_tx_relay_canceled; +} meshtastic_LocalStats; + +/* Health telemetry metrics */ +typedef struct _meshtastic_HealthMetrics { + /* Heart rate (beats per minute) */ + bool has_heart_bpm; + uint8_t heart_bpm; + /* SpO2 (blood oxygen saturation) level */ + bool has_spO2; + uint8_t spO2; + /* Body temperature in degrees Celsius */ + bool has_temperature; + float temperature; +} meshtastic_HealthMetrics; + /* Types of Measurements the telemetry module is equipped to handle */ typedef struct _meshtastic_Telemetry { /* Seconds since 1970 - or 0 for unknown/unset */ @@ -131,9 +272,21 @@ typedef struct _meshtastic_Telemetry { meshtastic_AirQualityMetrics air_quality_metrics; /* Power Metrics */ meshtastic_PowerMetrics power_metrics; + /* Local device mesh statistics */ + meshtastic_LocalStats local_stats; + /* Health telemetry metrics */ + meshtastic_HealthMetrics health_metrics; } variant; } meshtastic_Telemetry; +/* NAU7802 Telemetry configuration, for saving to flash */ +typedef struct _meshtastic_Nau7802Config { + /* The offset setting for the NAU7802 */ + int32_t zeroOffset; + /* The calibration factor for the NAU7802 */ + float calibrationFactor; +} meshtastic_Nau7802Config; + #ifdef __cplusplus extern "C" { @@ -141,8 +294,11 @@ extern "C" { /* Helper constants for enums */ #define _meshtastic_TelemetrySensorType_MIN meshtastic_TelemetrySensorType_SENSOR_UNSET -#define _meshtastic_TelemetrySensorType_MAX meshtastic_TelemetrySensorType_INA3221 -#define _meshtastic_TelemetrySensorType_ARRAYSIZE ((meshtastic_TelemetrySensorType)(meshtastic_TelemetrySensorType_INA3221+1)) +#define _meshtastic_TelemetrySensorType_MAX meshtastic_TelemetrySensorType_MLX90614 +#define _meshtastic_TelemetrySensorType_ARRAYSIZE ((meshtastic_TelemetrySensorType)(meshtastic_TelemetrySensorType_MLX90614+1)) + + + @@ -151,28 +307,46 @@ extern "C" { /* Initializer values for message structs */ -#define meshtastic_DeviceMetrics_init_default {0, 0, 0, 0} -#define meshtastic_EnvironmentMetrics_init_default {0, 0, 0, 0, 0, 0} -#define meshtastic_PowerMetrics_init_default {0, 0, 0, 0, 0, 0} -#define meshtastic_AirQualityMetrics_init_default {0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0} +#define meshtastic_DeviceMetrics_init_default {false, 0, false, 0, false, 0, false, 0, false, 0} +#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} +#define meshtastic_PowerMetrics_init_default {false, 0, false, 0, false, 0, false, 0, false, 0, false, 0} +#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} +#define meshtastic_LocalStats_init_default {0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0} +#define meshtastic_HealthMetrics_init_default {false, 0, false, 0, false, 0} #define meshtastic_Telemetry_init_default {0, 0, {meshtastic_DeviceMetrics_init_default}} -#define meshtastic_DeviceMetrics_init_zero {0, 0, 0, 0} -#define meshtastic_EnvironmentMetrics_init_zero {0, 0, 0, 0, 0, 0} -#define meshtastic_PowerMetrics_init_zero {0, 0, 0, 0, 0, 0} -#define meshtastic_AirQualityMetrics_init_zero {0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0} +#define meshtastic_Nau7802Config_init_default {0, 0} +#define meshtastic_DeviceMetrics_init_zero {false, 0, false, 0, false, 0, false, 0, false, 0} +#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} +#define meshtastic_PowerMetrics_init_zero {false, 0, false, 0, false, 0, false, 0, false, 0, false, 0} +#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} +#define meshtastic_LocalStats_init_zero {0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0} +#define meshtastic_HealthMetrics_init_zero {false, 0, false, 0, false, 0} #define meshtastic_Telemetry_init_zero {0, 0, {meshtastic_DeviceMetrics_init_zero}} +#define meshtastic_Nau7802Config_init_zero {0, 0} /* Field tags (for use in manual encoding/decoding) */ #define meshtastic_DeviceMetrics_battery_level_tag 1 #define meshtastic_DeviceMetrics_voltage_tag 2 #define meshtastic_DeviceMetrics_channel_utilization_tag 3 #define meshtastic_DeviceMetrics_air_util_tx_tag 4 +#define meshtastic_DeviceMetrics_uptime_seconds_tag 5 #define meshtastic_EnvironmentMetrics_temperature_tag 1 #define meshtastic_EnvironmentMetrics_relative_humidity_tag 2 #define meshtastic_EnvironmentMetrics_barometric_pressure_tag 3 #define meshtastic_EnvironmentMetrics_gas_resistance_tag 4 #define meshtastic_EnvironmentMetrics_voltage_tag 5 #define meshtastic_EnvironmentMetrics_current_tag 6 +#define meshtastic_EnvironmentMetrics_iaq_tag 7 +#define meshtastic_EnvironmentMetrics_distance_tag 8 +#define meshtastic_EnvironmentMetrics_lux_tag 9 +#define meshtastic_EnvironmentMetrics_white_lux_tag 10 +#define meshtastic_EnvironmentMetrics_ir_lux_tag 11 +#define meshtastic_EnvironmentMetrics_uv_lux_tag 12 +#define meshtastic_EnvironmentMetrics_wind_direction_tag 13 +#define meshtastic_EnvironmentMetrics_wind_speed_tag 14 +#define meshtastic_EnvironmentMetrics_weight_tag 15 +#define meshtastic_EnvironmentMetrics_wind_gust_tag 16 +#define meshtastic_EnvironmentMetrics_wind_lull_tag 17 #define meshtastic_PowerMetrics_ch1_voltage_tag 1 #define meshtastic_PowerMetrics_ch1_current_tag 2 #define meshtastic_PowerMetrics_ch2_voltage_tag 3 @@ -191,89 +365,161 @@ extern "C" { #define meshtastic_AirQualityMetrics_particles_25um_tag 10 #define meshtastic_AirQualityMetrics_particles_50um_tag 11 #define meshtastic_AirQualityMetrics_particles_100um_tag 12 +#define meshtastic_LocalStats_uptime_seconds_tag 1 +#define meshtastic_LocalStats_channel_utilization_tag 2 +#define meshtastic_LocalStats_air_util_tx_tag 3 +#define meshtastic_LocalStats_num_packets_tx_tag 4 +#define meshtastic_LocalStats_num_packets_rx_tag 5 +#define meshtastic_LocalStats_num_packets_rx_bad_tag 6 +#define meshtastic_LocalStats_num_online_nodes_tag 7 +#define meshtastic_LocalStats_num_total_nodes_tag 8 +#define meshtastic_LocalStats_num_rx_dupe_tag 9 +#define meshtastic_LocalStats_num_tx_relay_tag 10 +#define meshtastic_LocalStats_num_tx_relay_canceled_tag 11 +#define meshtastic_HealthMetrics_heart_bpm_tag 1 +#define meshtastic_HealthMetrics_spO2_tag 2 +#define meshtastic_HealthMetrics_temperature_tag 3 #define meshtastic_Telemetry_time_tag 1 #define meshtastic_Telemetry_device_metrics_tag 2 #define meshtastic_Telemetry_environment_metrics_tag 3 #define meshtastic_Telemetry_air_quality_metrics_tag 4 #define meshtastic_Telemetry_power_metrics_tag 5 +#define meshtastic_Telemetry_local_stats_tag 6 +#define meshtastic_Telemetry_health_metrics_tag 7 +#define meshtastic_Nau7802Config_zeroOffset_tag 1 +#define meshtastic_Nau7802Config_calibrationFactor_tag 2 /* Struct field encoding specification for nanopb */ #define meshtastic_DeviceMetrics_FIELDLIST(X, a) \ -X(a, STATIC, SINGULAR, UINT32, battery_level, 1) \ -X(a, STATIC, SINGULAR, FLOAT, voltage, 2) \ -X(a, STATIC, SINGULAR, FLOAT, channel_utilization, 3) \ -X(a, STATIC, SINGULAR, FLOAT, air_util_tx, 4) +X(a, STATIC, OPTIONAL, UINT32, battery_level, 1) \ +X(a, STATIC, OPTIONAL, FLOAT, voltage, 2) \ +X(a, STATIC, OPTIONAL, FLOAT, channel_utilization, 3) \ +X(a, STATIC, OPTIONAL, FLOAT, air_util_tx, 4) \ +X(a, STATIC, OPTIONAL, UINT32, uptime_seconds, 5) #define meshtastic_DeviceMetrics_CALLBACK NULL #define meshtastic_DeviceMetrics_DEFAULT NULL #define meshtastic_EnvironmentMetrics_FIELDLIST(X, a) \ -X(a, STATIC, SINGULAR, FLOAT, temperature, 1) \ -X(a, STATIC, SINGULAR, FLOAT, relative_humidity, 2) \ -X(a, STATIC, SINGULAR, FLOAT, barometric_pressure, 3) \ -X(a, STATIC, SINGULAR, FLOAT, gas_resistance, 4) \ -X(a, STATIC, SINGULAR, FLOAT, voltage, 5) \ -X(a, STATIC, SINGULAR, FLOAT, current, 6) +X(a, STATIC, OPTIONAL, FLOAT, temperature, 1) \ +X(a, STATIC, OPTIONAL, FLOAT, relative_humidity, 2) \ +X(a, STATIC, OPTIONAL, FLOAT, barometric_pressure, 3) \ +X(a, STATIC, OPTIONAL, FLOAT, gas_resistance, 4) \ +X(a, STATIC, OPTIONAL, FLOAT, voltage, 5) \ +X(a, STATIC, OPTIONAL, FLOAT, current, 6) \ +X(a, STATIC, OPTIONAL, UINT32, iaq, 7) \ +X(a, STATIC, OPTIONAL, FLOAT, distance, 8) \ +X(a, STATIC, OPTIONAL, FLOAT, lux, 9) \ +X(a, STATIC, OPTIONAL, FLOAT, white_lux, 10) \ +X(a, STATIC, OPTIONAL, FLOAT, ir_lux, 11) \ +X(a, STATIC, OPTIONAL, FLOAT, uv_lux, 12) \ +X(a, STATIC, OPTIONAL, UINT32, wind_direction, 13) \ +X(a, STATIC, OPTIONAL, FLOAT, wind_speed, 14) \ +X(a, STATIC, OPTIONAL, FLOAT, weight, 15) \ +X(a, STATIC, OPTIONAL, FLOAT, wind_gust, 16) \ +X(a, STATIC, OPTIONAL, FLOAT, wind_lull, 17) #define meshtastic_EnvironmentMetrics_CALLBACK NULL #define meshtastic_EnvironmentMetrics_DEFAULT NULL #define meshtastic_PowerMetrics_FIELDLIST(X, a) \ -X(a, STATIC, SINGULAR, FLOAT, ch1_voltage, 1) \ -X(a, STATIC, SINGULAR, FLOAT, ch1_current, 2) \ -X(a, STATIC, SINGULAR, FLOAT, ch2_voltage, 3) \ -X(a, STATIC, SINGULAR, FLOAT, ch2_current, 4) \ -X(a, STATIC, SINGULAR, FLOAT, ch3_voltage, 5) \ -X(a, STATIC, SINGULAR, FLOAT, ch3_current, 6) +X(a, STATIC, OPTIONAL, FLOAT, ch1_voltage, 1) \ +X(a, STATIC, OPTIONAL, FLOAT, ch1_current, 2) \ +X(a, STATIC, OPTIONAL, FLOAT, ch2_voltage, 3) \ +X(a, STATIC, OPTIONAL, FLOAT, ch2_current, 4) \ +X(a, STATIC, OPTIONAL, FLOAT, ch3_voltage, 5) \ +X(a, STATIC, OPTIONAL, FLOAT, ch3_current, 6) #define meshtastic_PowerMetrics_CALLBACK NULL #define meshtastic_PowerMetrics_DEFAULT NULL #define meshtastic_AirQualityMetrics_FIELDLIST(X, a) \ -X(a, STATIC, SINGULAR, UINT32, pm10_standard, 1) \ -X(a, STATIC, SINGULAR, UINT32, pm25_standard, 2) \ -X(a, STATIC, SINGULAR, UINT32, pm100_standard, 3) \ -X(a, STATIC, SINGULAR, UINT32, pm10_environmental, 4) \ -X(a, STATIC, SINGULAR, UINT32, pm25_environmental, 5) \ -X(a, STATIC, SINGULAR, UINT32, pm100_environmental, 6) \ -X(a, STATIC, SINGULAR, UINT32, particles_03um, 7) \ -X(a, STATIC, SINGULAR, UINT32, particles_05um, 8) \ -X(a, STATIC, SINGULAR, UINT32, particles_10um, 9) \ -X(a, STATIC, SINGULAR, UINT32, particles_25um, 10) \ -X(a, STATIC, SINGULAR, UINT32, particles_50um, 11) \ -X(a, STATIC, SINGULAR, UINT32, particles_100um, 12) +X(a, STATIC, OPTIONAL, UINT32, pm10_standard, 1) \ +X(a, STATIC, OPTIONAL, UINT32, pm25_standard, 2) \ +X(a, STATIC, OPTIONAL, UINT32, pm100_standard, 3) \ +X(a, STATIC, OPTIONAL, UINT32, pm10_environmental, 4) \ +X(a, STATIC, OPTIONAL, UINT32, pm25_environmental, 5) \ +X(a, STATIC, OPTIONAL, UINT32, pm100_environmental, 6) \ +X(a, STATIC, OPTIONAL, UINT32, particles_03um, 7) \ +X(a, STATIC, OPTIONAL, UINT32, particles_05um, 8) \ +X(a, STATIC, OPTIONAL, UINT32, particles_10um, 9) \ +X(a, STATIC, OPTIONAL, UINT32, particles_25um, 10) \ +X(a, STATIC, OPTIONAL, UINT32, particles_50um, 11) \ +X(a, STATIC, OPTIONAL, UINT32, particles_100um, 12) #define meshtastic_AirQualityMetrics_CALLBACK NULL #define meshtastic_AirQualityMetrics_DEFAULT NULL +#define meshtastic_LocalStats_FIELDLIST(X, a) \ +X(a, STATIC, SINGULAR, UINT32, uptime_seconds, 1) \ +X(a, STATIC, SINGULAR, FLOAT, channel_utilization, 2) \ +X(a, STATIC, SINGULAR, FLOAT, air_util_tx, 3) \ +X(a, STATIC, SINGULAR, UINT32, num_packets_tx, 4) \ +X(a, STATIC, SINGULAR, UINT32, num_packets_rx, 5) \ +X(a, STATIC, SINGULAR, UINT32, num_packets_rx_bad, 6) \ +X(a, STATIC, SINGULAR, UINT32, num_online_nodes, 7) \ +X(a, STATIC, SINGULAR, UINT32, num_total_nodes, 8) \ +X(a, STATIC, SINGULAR, UINT32, num_rx_dupe, 9) \ +X(a, STATIC, SINGULAR, UINT32, num_tx_relay, 10) \ +X(a, STATIC, SINGULAR, UINT32, num_tx_relay_canceled, 11) +#define meshtastic_LocalStats_CALLBACK NULL +#define meshtastic_LocalStats_DEFAULT NULL + +#define meshtastic_HealthMetrics_FIELDLIST(X, a) \ +X(a, STATIC, OPTIONAL, UINT32, heart_bpm, 1) \ +X(a, STATIC, OPTIONAL, UINT32, spO2, 2) \ +X(a, STATIC, OPTIONAL, FLOAT, temperature, 3) +#define meshtastic_HealthMetrics_CALLBACK NULL +#define meshtastic_HealthMetrics_DEFAULT NULL + #define meshtastic_Telemetry_FIELDLIST(X, a) \ X(a, STATIC, SINGULAR, FIXED32, time, 1) \ X(a, STATIC, ONEOF, MESSAGE, (variant,device_metrics,variant.device_metrics), 2) \ X(a, STATIC, ONEOF, MESSAGE, (variant,environment_metrics,variant.environment_metrics), 3) \ X(a, STATIC, ONEOF, MESSAGE, (variant,air_quality_metrics,variant.air_quality_metrics), 4) \ -X(a, STATIC, ONEOF, MESSAGE, (variant,power_metrics,variant.power_metrics), 5) +X(a, STATIC, ONEOF, MESSAGE, (variant,power_metrics,variant.power_metrics), 5) \ +X(a, STATIC, ONEOF, MESSAGE, (variant,local_stats,variant.local_stats), 6) \ +X(a, STATIC, ONEOF, MESSAGE, (variant,health_metrics,variant.health_metrics), 7) #define meshtastic_Telemetry_CALLBACK NULL #define meshtastic_Telemetry_DEFAULT NULL #define meshtastic_Telemetry_variant_device_metrics_MSGTYPE meshtastic_DeviceMetrics #define meshtastic_Telemetry_variant_environment_metrics_MSGTYPE meshtastic_EnvironmentMetrics #define meshtastic_Telemetry_variant_air_quality_metrics_MSGTYPE meshtastic_AirQualityMetrics #define meshtastic_Telemetry_variant_power_metrics_MSGTYPE meshtastic_PowerMetrics +#define meshtastic_Telemetry_variant_local_stats_MSGTYPE meshtastic_LocalStats +#define meshtastic_Telemetry_variant_health_metrics_MSGTYPE meshtastic_HealthMetrics + +#define meshtastic_Nau7802Config_FIELDLIST(X, a) \ +X(a, STATIC, SINGULAR, INT32, zeroOffset, 1) \ +X(a, STATIC, SINGULAR, FLOAT, calibrationFactor, 2) +#define meshtastic_Nau7802Config_CALLBACK NULL +#define meshtastic_Nau7802Config_DEFAULT NULL extern const pb_msgdesc_t meshtastic_DeviceMetrics_msg; extern const pb_msgdesc_t meshtastic_EnvironmentMetrics_msg; extern const pb_msgdesc_t meshtastic_PowerMetrics_msg; extern const pb_msgdesc_t meshtastic_AirQualityMetrics_msg; +extern const pb_msgdesc_t meshtastic_LocalStats_msg; +extern const pb_msgdesc_t meshtastic_HealthMetrics_msg; extern const pb_msgdesc_t meshtastic_Telemetry_msg; +extern const pb_msgdesc_t meshtastic_Nau7802Config_msg; /* Defines for backwards compatibility with code written before nanopb-0.4.0 */ #define meshtastic_DeviceMetrics_fields &meshtastic_DeviceMetrics_msg #define meshtastic_EnvironmentMetrics_fields &meshtastic_EnvironmentMetrics_msg #define meshtastic_PowerMetrics_fields &meshtastic_PowerMetrics_msg #define meshtastic_AirQualityMetrics_fields &meshtastic_AirQualityMetrics_msg +#define meshtastic_LocalStats_fields &meshtastic_LocalStats_msg +#define meshtastic_HealthMetrics_fields &meshtastic_HealthMetrics_msg #define meshtastic_Telemetry_fields &meshtastic_Telemetry_msg +#define meshtastic_Nau7802Config_fields &meshtastic_Nau7802Config_msg /* Maximum encoded size of messages (where known) */ +#define MESHTASTIC_MESHTASTIC_TELEMETRY_PB_H_MAX_SIZE meshtastic_Telemetry_size #define meshtastic_AirQualityMetrics_size 72 -#define meshtastic_DeviceMetrics_size 21 -#define meshtastic_EnvironmentMetrics_size 30 +#define meshtastic_DeviceMetrics_size 27 +#define meshtastic_EnvironmentMetrics_size 85 +#define meshtastic_HealthMetrics_size 11 +#define meshtastic_LocalStats_size 60 +#define meshtastic_Nau7802Config_size 16 #define meshtastic_PowerMetrics_size 30 -#define meshtastic_Telemetry_size 79 +#define meshtastic_Telemetry_size 92 #ifdef __cplusplus } /* extern "C" */ diff --git a/src/mesh/generated/meshtastic/xmodem.pb.c b/src/mesh/generated/meshtastic/xmodem.pb.cpp similarity index 88% rename from src/mesh/generated/meshtastic/xmodem.pb.c rename to src/mesh/generated/meshtastic/xmodem.pb.cpp index 9692a5eb4..3960ccdaa 100644 --- a/src/mesh/generated/meshtastic/xmodem.pb.c +++ b/src/mesh/generated/meshtastic/xmodem.pb.cpp @@ -1,5 +1,5 @@ /* Automatically generated nanopb constant definitions */ -/* Generated by nanopb-0.4.7 */ +/* Generated by nanopb-0.4.9 */ #include "meshtastic/xmodem.pb.h" #if PB_PROTO_HEADER_VERSION != 40 @@ -11,3 +11,4 @@ PB_BIND(meshtastic_XModem, meshtastic_XModem, AUTO) + diff --git a/src/mesh/generated/meshtastic/xmodem.pb.h b/src/mesh/generated/meshtastic/xmodem.pb.h index 48d5aa5cd..76edc0df6 100644 --- a/src/mesh/generated/meshtastic/xmodem.pb.h +++ b/src/mesh/generated/meshtastic/xmodem.pb.h @@ -1,5 +1,5 @@ /* Automatically generated nanopb header */ -/* Generated by nanopb-0.4.7 */ +/* Generated by nanopb-0.4.9 */ #ifndef PB_MESHTASTIC_MESHTASTIC_XMODEM_PB_H_INCLUDED #define PB_MESHTASTIC_MESHTASTIC_XMODEM_PB_H_INCLUDED @@ -68,6 +68,7 @@ extern const pb_msgdesc_t meshtastic_XModem_msg; #define meshtastic_XModem_fields &meshtastic_XModem_msg /* Maximum encoded size of messages (where known) */ +#define MESHTASTIC_MESHTASTIC_XMODEM_PB_H_MAX_SIZE meshtastic_XModem_size #define meshtastic_XModem_size 141 #ifdef __cplusplus diff --git a/src/mesh/http/ContentHandler.cpp b/src/mesh/http/ContentHandler.cpp index 7640e879c..c5ea86429 100644 --- a/src/mesh/http/ContentHandler.cpp +++ b/src/mesh/http/ContentHandler.cpp @@ -1,3 +1,4 @@ +#if !MESHTASTIC_EXCLUDE_WEBSERVER #include "NodeDB.h" #include "PowerFSM.h" #include "RadioLibInterface.h" @@ -5,10 +6,12 @@ #include "main.h" #include "mesh/http/ContentHelper.h" #include "mesh/http/WebServer.h" +#if HAS_WIFI #include "mesh/wifi/WiFiAPClient.h" -#include "mqtt/JSON.h" +#endif +#include "Led.h" #include "power.h" -#include "sleep.h" +#include "serialization/JSON.h" #include #include #include @@ -158,7 +161,7 @@ void handleAPIv1FromRadio(HTTPRequest *req, HTTPResponse *res) res->setHeader("Content-Type", "application/x-protobuf"); res->setHeader("Access-Control-Allow-Origin", "*"); res->setHeader("Access-Control-Allow-Methods", "GET"); - res->setHeader("X-Protobuf-Schema", "https://raw.githubusercontent.com/meshtastic/protobufs/master/mesh.proto"); + res->setHeader("X-Protobuf-Schema", "https://raw.githubusercontent.com/meshtastic/protobufs/master/meshtastic/mesh.proto"); uint8_t txBuf[MAX_STREAM_BUF_SIZE]; uint32_t len = 1; @@ -202,7 +205,7 @@ void handleAPIv1ToRadio(HTTPRequest *req, HTTPResponse *res) res->setHeader("Access-Control-Allow-Headers", "Content-Type"); res->setHeader("Access-Control-Allow-Origin", "*"); res->setHeader("Access-Control-Allow-Methods", "PUT, OPTIONS"); - res->setHeader("X-Protobuf-Schema", "https://raw.githubusercontent.com/meshtastic/protobufs/master/mesh.proto"); + res->setHeader("X-Protobuf-Schema", "https://raw.githubusercontent.com/meshtastic/protobufs/master/meshtastic/mesh.proto"); if (req->getMethod() == "OPTIONS") { res->setStatusCode(204); // Success with no content @@ -773,7 +776,7 @@ void handleRestart(HTTPRequest *req, HTTPResponse *res) res->println("

Meshtastic

\n"); res->println("Restarting"); - LOG_DEBUG("***** Restarted on HTTP(s) Request *****\n"); + LOG_DEBUG("Restarted on HTTP(s) Request\n"); webServerThread->requestRestart = (millis() / 1000) + 5; } @@ -795,9 +798,9 @@ void handleBlinkLED(HTTPRequest *req, HTTPResponse *res) if (blink_target == "LED") { uint8_t count = 10; while (count > 0) { - setLed(true); + ledBlink.set(true); delay(50); - setLed(false); + ledBlink.set(false); delay(50); count = count - 1; } @@ -855,3 +858,4 @@ void handleScanNetworks(HTTPRequest *req, HTTPResponse *res) res->print(value->Stringify().c_str()); delete value; } +#endif \ No newline at end of file diff --git a/src/mesh/http/WebServer.cpp b/src/mesh/http/WebServer.cpp index 7814f2c29..fc8535257 100644 --- a/src/mesh/http/WebServer.cpp +++ b/src/mesh/http/WebServer.cpp @@ -1,13 +1,14 @@ -#include "mesh/http/WebServer.h" +#include "configuration.h" +#if !MESHTASTIC_EXCLUDE_WEBSERVER #include "NodeDB.h" #include "graphics/Screen.h" #include "main.h" +#include "mesh/http/WebServer.h" #include "mesh/wifi/WiFiAPClient.h" #include "sleep.h" #include #include #include - #include #include @@ -92,7 +93,6 @@ static void taskCreateCert(void *parameter) LOG_DEBUG("Retrieved Private Key: %d Bytes\n", cert->getPKLength()); LOG_DEBUG("Retrieved Certificate: %d Bytes\n", cert->getCertLength()); - } else { LOG_INFO("Creating the certificate. This may take a while. Please wait...\n"); @@ -105,7 +105,6 @@ static void taskCreateCert(void *parameter) if (createCertResult != 0) { LOG_ERROR("Creating the certificate failed\n"); - } else { LOG_INFO("Creating the certificate was successful\n"); @@ -210,4 +209,5 @@ void initWebServer() } else { LOG_ERROR("Web Servers Failed! ;-( \n"); } -} \ No newline at end of file +} +#endif \ No newline at end of file diff --git a/src/mesh/mesh-pb-constants.cpp b/src/mesh/mesh-pb-constants.cpp index 93dbf0178..5b5d669cc 100644 --- a/src/mesh/mesh-pb-constants.cpp +++ b/src/mesh/mesh-pb-constants.cpp @@ -1,6 +1,7 @@ -#include "mesh-pb-constants.h" -#include "FSCommon.h" #include "configuration.h" + +#include "FSCommon.h" +#include "mesh-pb-constants.h" #include #include #include @@ -15,6 +16,7 @@ size_t pb_encode_to_bytes(uint8_t *destbuf, size_t destbufsize, const pb_msgdesc LOG_ERROR("Panic: can't encode protobuf reason='%s'\n", PB_GET_ERROR(&stream)); assert( 0); // If this assert fails it probably means you made a field too large for the max limits specified in mesh.options + return 0; } else { return stream.bytes_written; } @@ -56,7 +58,7 @@ bool readcb(pb_istream_t *stream, uint8_t *buf, size_t count) /// Write to an arduino file bool writecb(pb_ostream_t *stream, const uint8_t *buf, size_t count) { - File *file = (File *)stream->state; + auto file = (Print *)stream->state; // LOG_DEBUG("writing %d bytes to protobuf file\n", count); return file->write(buf, count) == count; } @@ -69,4 +71,4 @@ bool is_in_helper(uint32_t n, const uint32_t *array, pb_size_t count) return true; return false; -} +} \ No newline at end of file diff --git a/src/mesh/mesh-pb-constants.h b/src/mesh/mesh-pb-constants.h index 22a80c8e3..f91c48560 100644 --- a/src/mesh/mesh-pb-constants.h +++ b/src/mesh/mesh-pb-constants.h @@ -1,4 +1,5 @@ #pragma once +#include #include "mesh/generated/meshtastic/admin.pb.h" #include "mesh/generated/meshtastic/deviceonly.pb.h" @@ -13,10 +14,14 @@ /// max number of packets which can be waiting for delivery to android - note, this value comes from mesh.options protobuf // FIXME - max_count is actually 32 but we save/load this as one long string of preencoded MeshPacket bytes - not a big array in // RAM #define MAX_RX_TOPHONE (member_size(DeviceState, receive_queue) / member_size(DeviceState, receive_queue[0])) +#ifndef MAX_RX_TOPHONE #define MAX_RX_TOPHONE 32 +#endif /// max number of nodes allowed in the mesh -#define MAX_NUM_NODES (member_size(meshtastic_DeviceState, node_db_lite) / member_size(meshtastic_DeviceState, node_db_lite[0])) +#ifndef MAX_NUM_NODES +#define MAX_NUM_NODES 100 +#endif /// Max number of channels allowed #define MAX_NUM_CHANNELS (member_size(meshtastic_ChannelFile, channels) / member_size(meshtastic_ChannelFile, channels[0])) diff --git a/src/mesh/raspihttp/PiWebServer.cpp b/src/mesh/raspihttp/PiWebServer.cpp new file mode 100644 index 000000000..d7e596759 --- /dev/null +++ b/src/mesh/raspihttp/PiWebServer.cpp @@ -0,0 +1,530 @@ +/* +Adds a WebServer and WebService callbacks to meshtastic as Linux Version. The WebServer & Webservices +runs in a real linux thread beside the portdunio threading emulation. It replaces the complete ESP32 +Webserver libs including generation of SSL certifcicates, because the use ESP specific details in +the lib that can't be emulated. + +The WebServices adapt to the two major phoneapi functions "handleAPIv1FromRadio,handleAPIv1ToRadio" +The WebServer just adds basaic support to deliver WebContent, so it can be used to +deliver the WebGui definded by the WebClient Project. + +Steps to get it running: +1.) Add these Linux Libs to the compile and target machine: + + sudo apt update && \ + apt -y install openssl libssl-dev libopenssl libsdl2-dev \ + libulfius-dev liborcania-dev + +2.) Configure the root directory of the web Content in the config.yaml file. + The followinng tags should be included and set at your needs + + Example entry in the config.yaml + Webserver: + Port: 9001 # Port for Webserver & Webservices + RootPath: /home/marc/web # Root Dir of WebServer + +3.) Checkout the web project + https://github.com/meshtastic/web.git + + Build it and copy the content of the folder web/dist/* to the folder you did set as "RootPath" + +!!!The WebServer should not be used as production system or exposed to the Internet. Its a raw basic version!!! + +Author: Marc Philipp Hammermann +mail: marchammermann@googlemail.com + +*/ +#ifdef PORTDUINO_LINUX_HARDWARE +#if __has_include() +#include "PiWebServer.h" +#include "NodeDB.h" +#include "PhoneAPI.h" +#include "PowerFSM.h" +#include "RadioLibInterface.h" +#include "airtime.h" +#include "graphics/Screen.h" +#include "main.h" +#include "mesh/wifi/WiFiAPClient.h" +#include "sleep.h" +#include +#include +#include +#include +#include +#include +#include +#include +#include + +#include +#include + +#include "PortduinoFS.h" +#include "platform/portduino/PortduinoGlue.h" + +#define DEFAULT_REALM "default_realm" +#define PREFIX "" + +struct _file_config configWeb; + +// We need to specify some content-type mapping, so the resources get delivered with the +// right content type and are displayed correctly in the browser +char contentTypes[][2][32] = {{".txt", "text/plain"}, {".html", "text/html"}, + {".js", "text/javascript"}, {".png", "image/png"}, + {".jpg", "image/jpg"}, {".gz", "application/gzip"}, + {".gif", "image/gif"}, {".json", "application/json"}, + {".css", "text/css"}, {".ico", "image/vnd.microsoft.icon"}, + {".svg", "image/svg+xml"}, {".ts", "text/javascript"}, + {".tsx", "text/javascript"}, {"", ""}}; + +#undef str + +volatile bool isWebServerReady; +volatile bool isCertReady; + +HttpAPI webAPI; + +PiWebServerThread *piwebServerThread; + +/** + * Return the filename extension + */ +const char *get_filename_ext(const char *path) +{ + const char *dot = strrchr(path, '.'); + if (!dot || dot == path) + return "*"; + if (strchr(dot, '?') != NULL) { + //*strchr(dot, '?') = '\0'; + const char *empty = "\0"; + return empty; + } + return dot; +} + +/** + * Streaming callback function to ease sending large files + */ +static ssize_t callback_static_file_stream(void *cls, uint64_t pos, char *buf, size_t max) +{ + (void)(pos); + if (cls != NULL) { + return fread(buf, 1, max, (FILE *)cls); + } else { + return U_STREAM_END; + } +} + +/** + * Cleanup FILE* structure when streaming is complete + */ +static void callback_static_file_stream_free(void *cls) +{ + if (cls != NULL) { + fclose((FILE *)cls); + } +} + +/** + * static file callback endpoint that delivers the content for WebServer calls + */ +int callback_static_file(const struct _u_request *request, struct _u_response *response, void *user_data) +{ + size_t length; + FILE *f; + char *file_requested, *file_path, *url_dup_save, *real_path = NULL; + const char *content_type; + + /* + * Comment this if statement if you don't access static files url from root dir, like /app + */ + if (request->callback_position > 0) { + return U_CALLBACK_CONTINUE; + } else if (user_data != NULL && (configWeb.files_path != NULL)) { + file_requested = o_strdup(request->http_url); + url_dup_save = file_requested; + + while (file_requested[0] == '/') { + file_requested++; + } + file_requested += o_strlen(configWeb.url_prefix); + while (file_requested[0] == '/') { + file_requested++; + } + + if (strchr(file_requested, '#') != NULL) { + *strchr(file_requested, '#') = '\0'; + } + + if (strchr(file_requested, '?') != NULL) { + *strchr(file_requested, '?') = '\0'; + } + + if (file_requested == NULL || o_strlen(file_requested) == 0 || 0 == o_strcmp("/", file_requested)) { + o_free(url_dup_save); + url_dup_save = file_requested = o_strdup("index.html"); + } + + file_path = msprintf("%s/%s", configWeb.files_path, file_requested); + real_path = realpath(file_path, NULL); + if (0 == o_strncmp(configWeb.files_path, real_path, o_strlen(configWeb.files_path))) { + if (access(file_path, F_OK) != -1) { + f = fopen(file_path, "rb"); + if (f) { + fseek(f, 0, SEEK_END); + length = ftell(f); + fseek(f, 0, SEEK_SET); + + content_type = u_map_get_case(&configWeb.mime_types, get_filename_ext(file_requested)); + if (content_type == NULL) { + content_type = u_map_get(&configWeb.mime_types, "*"); + LOG_DEBUG("Static File Server - Unknown mime type for extension %s \n", get_filename_ext(file_requested)); + } + u_map_put(response->map_header, "Content-Type", content_type); + u_map_copy_into(response->map_header, &configWeb.map_header); + + if (ulfius_set_stream_response(response, 200, callback_static_file_stream, callback_static_file_stream_free, + length, STATIC_FILE_CHUNK, f) != U_OK) { + LOG_DEBUG("callback_static_file - Error ulfius_set_stream_response\n "); + } + } + } else { + if (configWeb.redirect_on_404 == NULL) { + ulfius_set_string_body_response(response, 404, "File not found"); + } else { + ulfius_add_header_to_response(response, "Location", configWeb.redirect_on_404); + response->status = 302; + } + } + } else { + if (configWeb.redirect_on_404 == NULL) { + ulfius_set_string_body_response(response, 404, "File not found"); + } else { + ulfius_add_header_to_response(response, "Location", configWeb.redirect_on_404); + response->status = 302; + } + } + + o_free(file_path); + o_free(url_dup_save); + free(real_path); // realpath uses malloc + return U_CALLBACK_CONTINUE; + } else { + LOG_DEBUG("Static File Server - Error, user_data is NULL or inconsistent\n"); + return U_CALLBACK_ERROR; + } +} + +static void handleWebResponse() {} + +/* + * Adapt the radioapi to the Webservice handleAPIv1ToRadio + * Trigger : WebGui(SAVE)->WebServcice->phoneApi + */ +int handleAPIv1ToRadio(const struct _u_request *req, struct _u_response *res, void *user_data) +{ + LOG_DEBUG("handleAPIv1ToRadio web -> radio \n"); + + ulfius_add_header_to_response(res, "Content-Type", "application/x-protobuf"); + ulfius_add_header_to_response(res, "Access-Control-Allow-Headers", "Content-Type"); + ulfius_add_header_to_response(res, "Access-Control-Allow-Origin", "*"); + ulfius_add_header_to_response(res, "Access-Control-Allow-Methods", "PUT, OPTIONS"); + ulfius_add_header_to_response(res, "X-Protobuf-Schema", + "https://raw.githubusercontent.com/meshtastic/protobufs/master/meshtastic/mesh.proto"); + + if (req->http_verb == "OPTIONS") { + ulfius_set_response_properties(res, U_OPT_STATUS, 204); + return U_CALLBACK_CONTINUE; + } + + byte buffer[MAX_TO_FROM_RADIO_SIZE]; + size_t s = req->binary_body_length; + + memcpy(buffer, req->binary_body, MAX_TO_FROM_RADIO_SIZE); + + // FIXME* Problem with portdunio loosing mountpoint maybe because of running in a real sep. thread + + portduinoVFS->mountpoint(configWeb.rootPath); + + LOG_DEBUG("Received %d bytes from PUT request\n", s); + webAPI.handleToRadio(buffer, s); + LOG_DEBUG("end web->radio \n"); + return U_CALLBACK_COMPLETE; +} + +/* + * Adapt the radioapi to the Webservice handleAPIv1FromRadio + * Trigger : WebGui(POLL)->handleAPIv1FromRadio->phoneapi->Meshtastic(Radio) events + */ +int handleAPIv1FromRadio(const struct _u_request *req, struct _u_response *res, void *user_data) +{ + + // LOG_DEBUG("handleAPIv1FromRadio radio -> web\n"); + std::string valueAll; + + // Status code is 200 OK by default. + ulfius_add_header_to_response(res, "Content-Type", "application/x-protobuf"); + ulfius_add_header_to_response(res, "Access-Control-Allow-Origin", "*"); + ulfius_add_header_to_response(res, "Access-Control-Allow-Methods", "GET"); + ulfius_add_header_to_response(res, "X-Protobuf-Schema", + "https://raw.githubusercontent.com/meshtastic/protobufs/master/meshtastic/mesh.proto"); + + uint8_t txBuf[MAX_STREAM_BUF_SIZE]; + uint32_t len = 1; + + if (valueAll == "true") { + while (len) { + len = webAPI.getFromRadio(txBuf); + ulfius_set_response_properties(res, U_OPT_STATUS, 200, U_OPT_BINARY_BODY, txBuf, len); + const char *tmpa = (const char *)txBuf; + ulfius_set_string_body_response(res, 200, tmpa); + // LOG_DEBUG("\n----webAPI response all:----\n"); + // LOG_DEBUG(tmpa); + // LOG_DEBUG("\n"); + } + // Otherwise, just return one protobuf + } else { + len = webAPI.getFromRadio(txBuf); + const char *tmpa = (const char *)txBuf; + ulfius_set_binary_body_response(res, 200, tmpa, len); + // LOG_DEBUG("\n----webAPI response:\n"); + // LOG_DEBUG(tmpa); + // LOG_DEBUG("\n"); + } + + // LOG_DEBUG("end radio->web\n", len); + return U_CALLBACK_COMPLETE; +} + +/* +OpenSSL RSA Key Gen +*/ +int generate_rsa_key(EVP_PKEY **pkey) +{ + EVP_PKEY_CTX *pkey_ctx = EVP_PKEY_CTX_new_id(EVP_PKEY_RSA, NULL); + if (!pkey_ctx) + return -1; + if (EVP_PKEY_keygen_init(pkey_ctx) <= 0) + return -1; + if (EVP_PKEY_CTX_set_rsa_keygen_bits(pkey_ctx, 2048) <= 0) + return -1; + if (EVP_PKEY_keygen(pkey_ctx, pkey) <= 0) + return -1; + EVP_PKEY_CTX_free(pkey_ctx); + return 0; // SUCCESS +} + +int generate_self_signed_x509(EVP_PKEY *pkey, X509 **x509) +{ + *x509 = X509_new(); + if (!*x509) + return -1; + if (X509_set_version(*x509, 2) != 1) + return -1; + ASN1_INTEGER_set(X509_get_serialNumber(*x509), 1); + X509_gmtime_adj(X509_get_notBefore(*x509), 0); + X509_gmtime_adj(X509_get_notAfter(*x509), 31536000L); // 1 YEAR ACCESS + + X509_set_pubkey(*x509, pkey); + + // SET Subject Name + X509_NAME *name = X509_get_subject_name(*x509); + X509_NAME_add_entry_by_txt(name, "C", MBSTRING_ASC, (unsigned char *)"DE", -1, -1, 0); + X509_NAME_add_entry_by_txt(name, "O", MBSTRING_ASC, (unsigned char *)"Meshtastic", -1, -1, 0); + X509_NAME_add_entry_by_txt(name, "CN", MBSTRING_ASC, (unsigned char *)"meshtastic.local", -1, -1, 0); + // Selfsigned, Issuer = Subject + X509_set_issuer_name(*x509, name); + + // Certificate signed with our privte key + if (X509_sign(*x509, pkey, EVP_sha256()) <= 0) + return -1; + + return 0; +} + +char *read_file_into_string(const char *filename) +{ + FILE *file = fopen(filename, "rb"); + if (file == NULL) { + LOG_ERROR("Error reading File : %s \n", filename); + return NULL; + } + + // Size of file + fseek(file, 0, SEEK_END); + long filesize = ftell(file); + rewind(file); + + // reserve mem for file + 1 byte + char *buffer = (char *)malloc(filesize + 1); + if (buffer == NULL) { + LOG_ERROR("Malloc of mem failed for file : %s \n", filename); + fclose(file); + return NULL; + } + + // read content + size_t readSize = fread(buffer, 1, filesize, file); + if (readSize != filesize) { + LOG_ERROR("Error reading file into buffer\n"); + free(buffer); + fclose(file); + return NULL; + } + + // add terminator sign at the end + buffer[filesize] = '\0'; + fclose(file); + return buffer; // return pointer +} + +int PiWebServerThread::CheckSSLandLoad() +{ + // read certificate + cert_pem = read_file_into_string("certificate.pem"); + if (cert_pem == NULL) { + LOG_ERROR("ERROR SSL Certificate File can't be loaded or is missing\n"); + return 1; + } + // read private key + key_pem = read_file_into_string("private_key.pem"); + if (key_pem == NULL) { + LOG_ERROR("ERROR file private_key can't be loaded or is missing\n"); + return 2; + } + + return 0; +} + +int PiWebServerThread::CreateSSLCertificate() +{ + + EVP_PKEY *pkey = NULL; + X509 *x509 = NULL; + + if (generate_rsa_key(&pkey) != 0) { + LOG_ERROR("Error generating RSA-Key.\n"); + return 1; + } + + if (generate_self_signed_x509(pkey, &x509) != 0) { + LOG_ERROR("Error generating of X509-Certificat.\n"); + return 2; + } + + // Ope file to write private key file + FILE *pkey_file = fopen("private_key.pem", "wb"); + if (!pkey_file) { + LOG_ERROR("Error opening private key file.\n"); + return 3; + } + // write private key file + PEM_write_PrivateKey(pkey_file, pkey, NULL, NULL, 0, NULL, NULL); + fclose(pkey_file); + + // open Certificate file + FILE *x509_file = fopen("certificate.pem", "wb"); + if (!x509_file) { + LOG_ERROR("Error opening certificate.\n"); + return 4; + } + // write cirtificate + PEM_write_X509(x509_file, x509); + fclose(x509_file); + + EVP_PKEY_free(pkey); + X509_free(x509); + LOG_INFO("Create SSL Certifictate -certificate.pem- succesfull \n"); + return 0; +} + +void initWebServer() {} + +PiWebServerThread::PiWebServerThread() +{ + int ret, retssl, webservport; + + if (CheckSSLandLoad() != 0) { + CreateSSLCertificate(); + if (CheckSSLandLoad() != 0) { + LOG_ERROR("Major Error Gen & Read SSL Certificate\n"); + } + } + + if (settingsMap[webserverport] != 0) { + webservport = settingsMap[webserverport]; + LOG_INFO("Using webserver port from yaml config. %i \n", webservport); + } else { + LOG_INFO("Webserver port in yaml config set to 0, so defaulting to port 443.\n"); + webservport = 443; + } + + // Web Content Service Instance + if (ulfius_init_instance(&instanceWeb, webservport, NULL, DEFAULT_REALM) != U_OK) { + LOG_ERROR("Webserver couldn't be started, abort execution\n"); + } else { + + LOG_INFO("Webserver started ....\n"); + u_map_init(&configWeb.mime_types); + u_map_put(&configWeb.mime_types, "*", "application/octet-stream"); + u_map_put(&configWeb.mime_types, ".html", "text/html"); + u_map_put(&configWeb.mime_types, ".htm", "text/html"); + u_map_put(&configWeb.mime_types, ".tsx", "application/javascript"); + u_map_put(&configWeb.mime_types, ".ts", "application/javascript"); + u_map_put(&configWeb.mime_types, ".css", "text/css"); + u_map_put(&configWeb.mime_types, ".js", "application/javascript"); + u_map_put(&configWeb.mime_types, ".json", "application/json"); + u_map_put(&configWeb.mime_types, ".png", "image/png"); + u_map_put(&configWeb.mime_types, ".gif", "image/gif"); + u_map_put(&configWeb.mime_types, ".jpeg", "image/jpeg"); + u_map_put(&configWeb.mime_types, ".jpg", "image/jpeg"); + u_map_put(&configWeb.mime_types, ".ttf", "font/ttf"); + u_map_put(&configWeb.mime_types, ".woff", "font/woff"); + u_map_put(&configWeb.mime_types, ".ico", "image/x-icon"); + u_map_put(&configWeb.mime_types, ".svg", "image/svg+xml"); + + webrootpath = settingsStrings[webserverrootpath]; + + configWeb.files_path = (char *)webrootpath.c_str(); + configWeb.url_prefix = ""; + configWeb.rootPath = strdup(portduinoVFS->mountpoint()); + + u_map_put(instanceWeb.default_headers, "Access-Control-Allow-Origin", "*"); + // Maximum body size sent by the client is 1 Kb + instanceWeb.max_post_body_size = 1024; + ulfius_add_endpoint_by_val(&instanceWeb, "GET", PREFIX, "/api/v1/fromradio/*", 1, &handleAPIv1FromRadio, NULL); + ulfius_add_endpoint_by_val(&instanceWeb, "PUT", PREFIX, "/api/v1/toradio/*", 1, &handleAPIv1ToRadio, configWeb.rootPath); + + // Add callback function to all endpoints for the Web Server + ulfius_add_endpoint_by_val(&instanceWeb, "GET", NULL, "/*", 2, &callback_static_file, &configWeb); + + // thats for serving without SSL + // retssl = ulfius_start_framework(&instanceWeb); + + // thats for serving with SSL + retssl = ulfius_start_secure_framework(&instanceWeb, key_pem, cert_pem); + + if (retssl == U_OK) { + LOG_INFO("Web Server framework started on port: %i \n", webservport); + LOG_INFO("Web Server root %s\n", (char *)webrootpath.c_str()); + } else { + LOG_ERROR("Error starting Web Server framework, error number: %d\n", retssl); + } + } +} + +PiWebServerThread::~PiWebServerThread() +{ + u_map_clean(&configWeb.mime_types); + + ulfius_stop_framework(&instanceWeb); + ulfius_stop_framework(&instanceWeb); + free(configWeb.rootPath); + ulfius_clean_instance(&instanceService); + ulfius_clean_instance(&instanceService); + free(cert_pem); + LOG_INFO("End framework"); +} + +#endif +#endif \ No newline at end of file diff --git a/src/mesh/raspihttp/PiWebServer.h b/src/mesh/raspihttp/PiWebServer.h new file mode 100644 index 000000000..c4c49e919 --- /dev/null +++ b/src/mesh/raspihttp/PiWebServer.h @@ -0,0 +1,61 @@ +#pragma once +#ifdef PORTDUINO_LINUX_HARDWARE +#if __has_include() +#include "PhoneAPI.h" +#include "ulfius-cfg.h" +#include "ulfius.h" +#include +#include + +#define STATIC_FILE_CHUNK 256 + +void initWebServer(); +void createSSLCert(); +int callback_static_file(const struct _u_request *request, struct _u_response *response, void *user_data); +const char *get_filename_ext(const char *path); + +struct _file_config { + char *files_path; + char *url_prefix; + struct _u_map mime_types; + struct _u_map map_header; + char *redirect_on_404; + char *rootPath; +}; + +class PiWebServerThread +{ + private: + char *key_pem = NULL; + char *cert_pem = NULL; + // struct _u_map mime_types; + std::string webrootpath; + + public: + PiWebServerThread(); + ~PiWebServerThread(); + int CreateSSLCertificate(); + int CheckSSLandLoad(); + uint32_t requestRestart = 0; + struct _u_instance instanceWeb; + struct _u_instance instanceService; +}; + +class HttpAPI : public PhoneAPI +{ + + public: + // Nothing here yet + + private: + // Nothing here yet + + protected: + /// Check the current underlying physical link to see if the client is currently connected + virtual bool checkIsConnected() override { return true; } // FIXME, be smarter about this +}; + +extern PiWebServerThread *piwebServerThread; + +#endif +#endif \ No newline at end of file diff --git a/src/mesh/wifi/WiFiAPClient.cpp b/src/mesh/wifi/WiFiAPClient.cpp index b0b033ba0..c835878d3 100644 --- a/src/mesh/wifi/WiFiAPClient.cpp +++ b/src/mesh/wifi/WiFiAPClient.cpp @@ -1,22 +1,29 @@ -#include "mesh/wifi/WiFiAPClient.h" +#include "configuration.h" +#if HAS_WIFI #include "NodeDB.h" #include "RTC.h" #include "concurrency/Periodic.h" -#include "configuration.h" +#include "mesh/wifi/WiFiAPClient.h" + #include "main.h" #include "mesh/api/WiFiServerAPI.h" +#if !MESHTASTIC_EXCLUDE_MQTT #include "mqtt/MQTT.h" +#endif #include "target_specific.h" #include #include #ifdef ARCH_ESP32 +#if !MESHTASTIC_EXCLUDE_WEBSERVER #include "mesh/http/WebServer.h" +#endif #include #include static void WiFiEvent(WiFiEvent_t event); #endif #ifndef DISABLE_NTP +#include "Throttle.h" #include #endif @@ -50,7 +57,7 @@ static void onNetworkConnected() { if (!APStartupComplete) { // Start web server - LOG_INFO("Starting network services\n"); + LOG_INFO("Starting WiFi network services\n"); #ifdef ARCH_ESP32 // start mdns @@ -92,17 +99,18 @@ static void onNetworkConnected() syslog.enable(); } -#ifdef ARCH_ESP32 +#if defined(ARCH_ESP32) && !MESHTASTIC_EXCLUDE_WEBSERVER initWebServer(); #endif initApiServer(); - APStartupComplete = true; } // FIXME this is kinda yucky, instead we should just have an observable for 'wifireconnected' +#ifndef MESHTASTIC_EXCLUDE_MQTT if (mqtt) mqtt->reconnect(); +#endif } static int32_t reconnectWiFi() @@ -135,7 +143,7 @@ static int32_t reconnectWiFi() } #ifndef DISABLE_NTP - if (WiFi.isConnected() && (((millis() - lastrun_ntp) > 43200000) || (lastrun_ntp == 0))) { // every 12 hours + if (WiFi.isConnected() && (!Throttle::isWithinTimespanMs(lastrun_ntp, 43200000) || (lastrun_ntp == 0))) { // every 12 hours LOG_DEBUG("Updating NTP time from %s\n", config.network.ntp_server); if (timeClient.update()) { LOG_DEBUG("NTP Request Success - Setting RTCQualityNTP if needed\n"); @@ -146,7 +154,6 @@ static int32_t reconnectWiFi() perhapsSetRTC(RTCQualityNTP, &tv); lastrun_ntp = millis(); - } else { LOG_DEBUG("NTP Update failed\n"); } @@ -204,7 +211,9 @@ bool initWifi() const char *wifiPsw = config.network.wifi_psk; #ifndef ARCH_RP2040 - createSSLCert(); // For WebServer +#if !MESHTASTIC_EXCLUDE_WEBSERVER + createSSLCert(); // For WebServer +#endif esp_wifi_set_storage(WIFI_STORAGE_RAM); // Disable flash storage for WiFi credentials #endif if (!*wifiPsw) // Treat empty password as no password @@ -217,10 +226,16 @@ bool initWifi() WiFi.mode(WIFI_STA); WiFi.setHostname(ourHost); + if (config.network.address_mode == meshtastic_Config_NetworkConfig_AddressMode_STATIC && config.network.ipv4_config.ip != 0) { +#ifndef ARCH_RP2040 WiFi.config(config.network.ipv4_config.ip, config.network.ipv4_config.gateway, config.network.ipv4_config.subnet, config.network.ipv4_config.dns); +#else + WiFi.config(config.network.ipv4_config.ip, config.network.ipv4_config.dns, config.network.ipv4_config.gateway, + config.network.ipv4_config.subnet); +#endif } #ifndef ARCH_RP2040 WiFi.onEvent(WiFiEvent); @@ -295,7 +310,12 @@ static void WiFiEvent(WiFiEvent_t event) onNetworkConnected(); break; case ARDUINO_EVENT_WIFI_STA_GOT_IP6: +#if ESP_ARDUINO_VERSION >= ESP_ARDUINO_VERSION_VAL(3, 0, 0) + LOG_INFO("Obtained Local IP6 address: %s\n", WiFi.linkLocalIPv6().toString().c_str()); + LOG_INFO("Obtained GlobalIP6 address: %s\n", WiFi.globalIPv6().toString().c_str()); +#else LOG_INFO("Obtained IP6 address: %s\n", WiFi.localIPv6().toString().c_str()); +#endif break; case ARDUINO_EVENT_WIFI_STA_LOST_IP: LOG_INFO("Lost IP address and IP address is reset to 0\n"); @@ -405,4 +425,5 @@ static void WiFiEvent(WiFiEvent_t event) uint8_t getWifiDisconnectReason() { return wifiDisconnectReason; -} \ No newline at end of file +} +#endif \ No newline at end of file diff --git a/src/mesh/wifi/WiFiAPClient.h b/src/mesh/wifi/WiFiAPClient.h index 6625d3e46..5f4e2f5c9 100644 --- a/src/mesh/wifi/WiFiAPClient.h +++ b/src/mesh/wifi/WiFiAPClient.h @@ -5,7 +5,7 @@ #include #include -#if defined(HAS_WIFI) && !defined(ARCH_PORTDUINO) +#if HAS_WIFI && !defined(ARCH_PORTDUINO) #include #endif diff --git a/src/meshUtils.cpp b/src/meshUtils.cpp index 59d4e6714..e98a6f1ce 100644 --- a/src/meshUtils.cpp +++ b/src/meshUtils.cpp @@ -56,4 +56,42 @@ char *strnstr(const char *s, const char *find, size_t slen) s--; } return ((char *)s); +} + +void printBytes(const char *label, const uint8_t *p, size_t numbytes) +{ + int labelSize = strlen(label); + if (labelSize < 100 && numbytes < 64) { + char *messageBuffer = new char[labelSize + (numbytes * 3) + 2]; + strncpy(messageBuffer, label, labelSize); + for (size_t i = 0; i < numbytes; i++) + snprintf(messageBuffer + labelSize + i * 3, 4, " %02x", p[i]); + strcpy(messageBuffer + labelSize + numbytes * 3, "\n"); + LOG_DEBUG(messageBuffer); + delete[] messageBuffer; + } +} + +bool memfll(const uint8_t *mem, uint8_t find, size_t numbytes) +{ + for (uint8_t i = 0; i < numbytes; i++) { + if (mem[i] != find) + return false; + } + return true; +} + +bool isOneOf(int item, int count, ...) +{ + va_list args; + va_start(args, count); + bool found = false; + for (int i = 0; i < count; ++i) { + if (item == va_arg(args, int)) { + found = true; + break; + } + } + va_end(args); + return found; } \ No newline at end of file diff --git a/src/meshUtils.h b/src/meshUtils.h index e32ef230a..aff3976f4 100644 --- a/src/meshUtils.h +++ b/src/meshUtils.h @@ -1,4 +1,9 @@ #pragma once +#include "DebugConfiguration.h" +#include +#include +#include +#include /// C++ v17+ clamp function, limits a given value to a range defined by lo and hi template constexpr const T &clamp(const T &v, const T &lo, const T &hi) @@ -10,4 +15,13 @@ template constexpr const T &clamp(const T &v, const T &lo, const T &hi #define STRNSTR #include char *strnstr(const char *s, const char *find, size_t slen); -#endif \ No newline at end of file +#endif + +void printBytes(const char *label, const uint8_t *p, size_t numbytes); + +// is the memory region filled with a single character? +bool memfll(const uint8_t *mem, uint8_t find, size_t numbytes); + +bool isOneOf(int item, int count, ...); + +#define IS_ONE_OF(item, ...) isOneOf(item, sizeof((int[]){__VA_ARGS__}) / sizeof(int), __VA_ARGS__) diff --git a/src/modules/AdminModule.cpp b/src/modules/AdminModule.cpp index 94df601d8..01ef038e8 100644 --- a/src/modules/AdminModule.cpp +++ b/src/modules/AdminModule.cpp @@ -3,8 +3,10 @@ #include "MeshService.h" #include "NodeDB.h" #include "PowerFSM.h" +#include "RTC.h" +#include "meshUtils.h" #include -#ifdef ARCH_ESP32 +#if defined(ARCH_ESP32) && !MESHTASTIC_EXCLUDE_BLUETOOTH #include "BleOta.h" #endif #include "Router.h" @@ -16,10 +18,25 @@ #ifdef ARCH_PORTDUINO #include "unistd.h" #endif +#include "../userPrefs.h" +#include "Default.h" +#include "TypeConversions.h" +#if !MESHTASTIC_EXCLUDE_MQTT #include "mqtt/MQTT.h" +#endif -#define DEFAULT_REBOOT_SECONDS 7 +#if !MESHTASTIC_EXCLUDE_GPS +#include "GPS.h" +#endif + +#if MESHTASTIC_EXCLUDE_GPS +#include "modules/PositionModule.h" +#endif + +#if !defined(ARCH_PORTDUINO) && !defined(ARCH_STM32WL) && !MESHTASTIC_EXCLUDE_I2C +#include "motion/AccelerometerThread.h" +#endif AdminModule *adminModule; bool hasOpenEditTransaction; @@ -49,8 +66,56 @@ bool AdminModule::handleReceivedProtobuf(const meshtastic_MeshPacket &mp, meshta // if handled == false, then let others look at this message also if they want bool handled = false; assert(r); - bool fromOthers = mp.from != 0 && mp.from != nodeDB.getNodeNum(); + bool fromOthers = !isFromUs(&mp); + if (mp.which_payload_variant != meshtastic_MeshPacket_decoded_tag) { + return handled; + } + meshtastic_Channel *ch = &channels.getByIndex(mp.channel); + // Could tighten this up further by tracking the last public_key we went an AdminMessage request to + // and only allowing responses from that remote. + if (messageIsResponse(r)) { + LOG_DEBUG("Allowing admin response message\n"); + } else if (mp.from == 0) { + if (config.security.is_managed) { + LOG_INFO("Ignoring local admin payload because is_managed.\n"); + return handled; + } + } else if (strcasecmp(ch->settings.name, Channels::adminChannel) == 0) { + if (!config.security.admin_channel_enabled) { + LOG_INFO("Ignoring admin channel, as legacy admin is disabled.\n"); + myReply = allocErrorResponse(meshtastic_Routing_Error_NOT_AUTHORIZED, &mp); + return handled; + } + } else if (mp.pki_encrypted) { + if ((config.security.admin_key[0].size == 32 && + memcmp(mp.public_key.bytes, config.security.admin_key[0].bytes, 32) == 0) || + (config.security.admin_key[1].size == 32 && + memcmp(mp.public_key.bytes, config.security.admin_key[1].bytes, 32) == 0) || + (config.security.admin_key[2].size == 32 && + memcmp(mp.public_key.bytes, config.security.admin_key[2].bytes, 32) == 0)) { + LOG_INFO("PKC admin payload with authorized sender key.\n"); + } else { + myReply = allocErrorResponse(meshtastic_Routing_Error_ADMIN_PUBLIC_KEY_UNAUTHORIZED, &mp); + LOG_INFO("Received PKC admin payload, but the sender public key does not match the admin authorized key!\n"); + return handled; + } + } else { + LOG_INFO("Ignoring unauthorized admin payload %i\n", r->which_payload_variant); + myReply = allocErrorResponse(meshtastic_Routing_Error_NOT_AUTHORIZED, &mp); + return handled; + } + LOG_INFO("Handling admin payload %i\n", r->which_payload_variant); + + // all of the get and set messages, including those for other modules, flow through here first. + // any message that changes state, we want to check the passkey for + if (mp.from != 0 && !messageIsRequest(r) && !messageIsResponse(r)) { + if (!checkPassKey(r)) { + LOG_WARN("Admin message without session_key!\n"); + myReply = allocErrorResponse(meshtastic_Routing_Error_ADMIN_BAD_SESSION_KEY, &mp); + return handled; + } + } switch (r->which_payload_variant) { /** @@ -120,10 +185,10 @@ bool AdminModule::handleReceivedProtobuf(const meshtastic_MeshPacket &mp, meshta } case meshtastic_AdminMessage_reboot_ota_seconds_tag: { int32_t s = r->reboot_ota_seconds; -#ifdef ARCH_ESP32 +#if defined(ARCH_ESP32) && !MESHTASTIC_EXCLUDE_BLUETOOTH if (BleOta::getOtaAppVersion().isEmpty()) { LOG_INFO("No OTA firmware available, scheduling regular reboot in %d seconds\n", s); - screen->startRebootScreen(); + screen->startAlert("Rebooting..."); } else { screen->startFirmwareUpdateScreen(); BleOta::switchToOtaApp(); @@ -131,7 +196,7 @@ bool AdminModule::handleReceivedProtobuf(const meshtastic_MeshPacket &mp, meshta } #else LOG_INFO("Not on ESP32, scheduling regular reboot in %d seconds\n", s); - screen->startRebootScreen(); + screen->startAlert("Rebooting..."); #endif rebootAtMsec = (s < 0) ? 0 : (millis() + s * 1000); break; @@ -147,15 +212,25 @@ bool AdminModule::handleReceivedProtobuf(const meshtastic_MeshPacket &mp, meshta handleGetDeviceMetadata(mp); break; } - case meshtastic_AdminMessage_factory_reset_tag: { - LOG_INFO("Initiating factory reset\n"); - nodeDB.factoryReset(); + case meshtastic_AdminMessage_factory_reset_config_tag: { + disableBluetooth(); + LOG_INFO("Initiating factory config reset\n"); + nodeDB->factoryReset(); + LOG_INFO("Factory config reset finished, rebooting soon.\n"); + reboot(DEFAULT_REBOOT_SECONDS); + break; + } + case meshtastic_AdminMessage_factory_reset_device_tag: { + disableBluetooth(); + LOG_INFO("Initiating full factory reset\n"); + nodeDB->factoryReset(true); reboot(DEFAULT_REBOOT_SECONDS); break; } case meshtastic_AdminMessage_nodedb_reset_tag: { + disableBluetooth(); LOG_INFO("Initiating node-db reset\n"); - nodeDB.resetNodes(); + nodeDB->resetNodes(); reboot(DEFAULT_REBOOT_SECONDS); break; } @@ -165,6 +240,7 @@ bool AdminModule::handleReceivedProtobuf(const meshtastic_MeshPacket &mp, meshta break; } case meshtastic_AdminMessage_commit_edit_settings_tag: { + disableBluetooth(); LOG_INFO("Committing transaction for edited settings\n"); hasOpenEditTransaction = false; saveChanges(SEGMENT_CONFIG | SEGMENT_MODULECONFIG | SEGMENT_DEVICESTATE | SEGMENT_CHANNELS); @@ -185,7 +261,58 @@ bool AdminModule::handleReceivedProtobuf(const meshtastic_MeshPacket &mp, meshta } case meshtastic_AdminMessage_remove_by_nodenum_tag: { LOG_INFO("Client is receiving a remove_nodenum command.\n"); - nodeDB.removeNodeByNum(r->remove_by_nodenum); + nodeDB->removeNodeByNum(r->remove_by_nodenum); + this->notifyObservers(r); // Observed by screen + break; + } + case meshtastic_AdminMessage_set_favorite_node_tag: { + LOG_INFO("Client is receiving a set_favorite_node command.\n"); + meshtastic_NodeInfoLite *node = nodeDB->getMeshNode(r->set_favorite_node); + if (node != NULL) { + node->is_favorite = true; + saveChanges(SEGMENT_DEVICESTATE, false); + } + break; + } + case meshtastic_AdminMessage_remove_favorite_node_tag: { + LOG_INFO("Client is receiving a remove_favorite_node command.\n"); + meshtastic_NodeInfoLite *node = nodeDB->getMeshNode(r->remove_favorite_node); + if (node != NULL) { + node->is_favorite = false; + saveChanges(SEGMENT_DEVICESTATE, false); + } + break; + } + case meshtastic_AdminMessage_set_fixed_position_tag: { + LOG_INFO("Client is receiving a set_fixed_position command.\n"); + meshtastic_NodeInfoLite *node = nodeDB->getMeshNode(nodeDB->getNodeNum()); + node->has_position = true; + node->position = TypeConversions::ConvertToPositionLite(r->set_fixed_position); + nodeDB->setLocalPosition(r->set_fixed_position); + config.position.fixed_position = true; + saveChanges(SEGMENT_DEVICESTATE | SEGMENT_CONFIG, false); +#if !MESHTASTIC_EXCLUDE_GPS + if (gps != nullptr) + gps->enable(); + // Send our new fixed position to the mesh for good measure + positionModule->sendOurPosition(); +#endif + break; + } + case meshtastic_AdminMessage_remove_fixed_position_tag: { + LOG_INFO("Client is receiving a remove_fixed_position command.\n"); + nodeDB->clearLocalPosition(); + config.position.fixed_position = false; + saveChanges(SEGMENT_DEVICESTATE | SEGMENT_CONFIG, false); + break; + } + case meshtastic_AdminMessage_set_time_only_tag: { + LOG_INFO("Client is receiving a set_time_only command.\n"); + struct timeval tv; + tv.tv_sec = r->set_time_only; + tv.tv_usec = 0; + + perhapsSetRTC(RTCQualityNTP, &tv, false); break; } case meshtastic_AdminMessage_enter_dfu_mode_request_tag: { @@ -197,11 +324,13 @@ bool AdminModule::handleReceivedProtobuf(const meshtastic_MeshPacket &mp, meshta } case meshtastic_AdminMessage_delete_file_request_tag: { LOG_DEBUG("Client is requesting to delete file: %s\n", r->delete_file_request); +#ifdef FSCom if (FSCom.remove(r->delete_file_request)) { LOG_DEBUG("Successfully deleted file\n"); } else { LOG_DEBUG("Failed to delete file\n"); } +#endif break; } #ifdef ARCH_PORTDUINO @@ -213,9 +342,10 @@ bool AdminModule::handleReceivedProtobuf(const meshtastic_MeshPacket &mp, meshta default: meshtastic_AdminMessage res = meshtastic_AdminMessage_init_default; - AdminMessageHandleResult handleResult = MeshModule::handleAdminMessageForAllPlugins(mp, r, &res); + AdminMessageHandleResult handleResult = MeshModule::handleAdminMessageForAllModules(mp, r, &res); if (handleResult == AdminMessageHandleResult::HANDLED_WITH_RESPONSE) { + setPassKey(&res); myReply = allocDataProtobuf(res); } else if (mp.decoded.want_response) { LOG_DEBUG("We did not responded to a request that wanted a respond. req.variant=%d\n", r->which_payload_variant); @@ -238,15 +368,15 @@ void AdminModule::handleGetModuleConfigResponse(const meshtastic_MeshPacket &mp, { // Skip if it's disabled or no pins are exposed if (!r->get_module_config_response.payload_variant.remote_hardware.enabled || - !r->get_module_config_response.payload_variant.remote_hardware.available_pins) { - LOG_DEBUG("Remote hardware module disabled or no vailable_pins. Skipping...\n"); + r->get_module_config_response.payload_variant.remote_hardware.available_pins_count == 0) { + LOG_DEBUG("Remote hardware module disabled or no available_pins. Skipping...\n"); return; } for (uint8_t i = 0; i < devicestate.node_remote_hardware_pins_count; i++) { if (devicestate.node_remote_hardware_pins[i].node_num == 0 || !devicestate.node_remote_hardware_pins[i].has_pin) { continue; } - for (uint8_t j = 0; j < sizeof(r->get_module_config_response.payload_variant.remote_hardware.available_pins); j++) { + for (uint8_t j = 0; j < r->get_module_config_response.payload_variant.remote_hardware.available_pins_count; j++) { auto availablePin = r->get_module_config_response.payload_variant.remote_hardware.available_pins[j]; if (i < devicestate.node_remote_hardware_pins_count) { devicestate.node_remote_hardware_pins[i].node_num = mp.from; @@ -283,7 +413,7 @@ void AdminModule::handleSetOwner(const meshtastic_User &o) } if (changed) { // If nothing really changed, don't broadcast on the network or write to flash - service.reloadOwner(!hasOpenEditTransaction); + service->reloadOwner(!hasOpenEditTransaction); saveChanges(SEGMENT_DEVICESTATE); } } @@ -293,15 +423,57 @@ void AdminModule::handleSetConfig(const meshtastic_Config &c) auto changes = SEGMENT_CONFIG; auto existingRole = config.device.role; bool isRegionUnset = (config.lora.region == meshtastic_Config_LoRaConfig_RegionCode_UNSET); + bool requiresReboot = true; switch (c.which_payload_variant) { case meshtastic_Config_device_tag: LOG_INFO("Setting config: Device\n"); config.has_device = true; +#if !defined(ARCH_PORTDUINO) && !defined(ARCH_STM32WL) && !MESHTASTIC_EXCLUDE_ENVIRONMENTAL_SENSOR + if (config.device.double_tap_as_button_press == false && c.payload_variant.device.double_tap_as_button_press == true && + accelerometerThread->enabled == false) { + config.device.double_tap_as_button_press = c.payload_variant.device.double_tap_as_button_press; + accelerometerThread->enabled = true; + accelerometerThread->start(); + } +#endif +#ifdef LED_PIN + // Turn LED off if heartbeat by config + if (c.payload_variant.device.led_heartbeat_disabled) { + digitalWrite(LED_PIN, HIGH ^ LED_STATE_ON); + } +#endif + if (config.device.button_gpio == c.payload_variant.device.button_gpio && + config.device.buzzer_gpio == c.payload_variant.device.buzzer_gpio && + config.device.role == c.payload_variant.device.role && + config.device.disable_triple_click == c.payload_variant.device.disable_triple_click && + config.device.rebroadcast_mode == c.payload_variant.device.rebroadcast_mode) { + requiresReboot = false; + } config.device = c.payload_variant.device; // If we're setting router role for the first time, install its intervals if (existingRole != c.payload_variant.device.role) - nodeDB.installRoleDefaults(c.payload_variant.device.role); + nodeDB->installRoleDefaults(c.payload_variant.device.role); + if (config.device.node_info_broadcast_secs < min_node_info_broadcast_secs) { + LOG_DEBUG("Tried to set node_info_broadcast_secs too low, setting to %d\n", min_node_info_broadcast_secs); + config.device.node_info_broadcast_secs = min_node_info_broadcast_secs; + } + // Router Client is deprecated; Set it to client + if (c.payload_variant.device.role == meshtastic_Config_DeviceConfig_Role_ROUTER_CLIENT) { + config.device.role = meshtastic_Config_DeviceConfig_Role_CLIENT; + if (moduleConfig.store_forward.enabled && !moduleConfig.store_forward.is_server) { + moduleConfig.store_forward.is_server = true; + changes |= SEGMENT_MODULECONFIG; + requiresReboot = true; + } + } +#if USERPREFS_EVENT_MODE + // If we're in event mode, nobody is a Router or Repeater + if (config.device.role == meshtastic_Config_DeviceConfig_Role_ROUTER || + config.device.role == meshtastic_Config_DeviceConfig_Role_REPEATER) { + config.device.role = meshtastic_Config_DeviceConfig_Role_CLIENT; + } +#endif break; case meshtastic_Config_position_tag: LOG_INFO("Setting config: Position\n"); @@ -313,6 +485,16 @@ void AdminModule::handleSetConfig(const meshtastic_Config &c) case meshtastic_Config_power_tag: LOG_INFO("Setting config: Power\n"); config.has_power = true; + // Really just the adc override is the only thing that can change without a reboot + if (config.power.device_battery_ina_address == c.payload_variant.power.device_battery_ina_address && + config.power.is_power_saving == c.payload_variant.power.is_power_saving && + config.power.ls_secs == c.payload_variant.power.ls_secs && + config.power.min_wake_secs == c.payload_variant.power.min_wake_secs && + config.power.on_battery_shutdown_after_secs == c.payload_variant.power.on_battery_shutdown_after_secs && + config.power.sds_secs == c.payload_variant.power.sds_secs && + config.power.wait_bluetooth_secs == c.payload_variant.power.wait_bluetooth_secs) { + requiresReboot = false; + } config.power = c.payload_variant.power; break; case meshtastic_Config_network_tag: @@ -323,15 +505,54 @@ void AdminModule::handleSetConfig(const meshtastic_Config &c) case meshtastic_Config_display_tag: LOG_INFO("Setting config: Display\n"); config.has_display = true; + if (config.display.screen_on_secs == c.payload_variant.display.screen_on_secs && + config.display.flip_screen == c.payload_variant.display.flip_screen && + config.display.oled == c.payload_variant.display.oled) { + requiresReboot = false; + } +#if !defined(ARCH_PORTDUINO) && !defined(ARCH_STM32WL) && !MESHTASTIC_EXCLUDE_ENVIRONMENTAL_SENSOR + if (config.display.wake_on_tap_or_motion == false && c.payload_variant.display.wake_on_tap_or_motion == true && + accelerometerThread->enabled == false) { + config.display.wake_on_tap_or_motion = c.payload_variant.display.wake_on_tap_or_motion; + accelerometerThread->enabled = true; + accelerometerThread->start(); + } +#endif config.display = c.payload_variant.display; break; case meshtastic_Config_lora_tag: LOG_INFO("Setting config: LoRa\n"); config.has_lora = true; + // If no lora radio parameters change, don't need to reboot + if (config.lora.use_preset == c.payload_variant.lora.use_preset && config.lora.region == c.payload_variant.lora.region && + config.lora.modem_preset == c.payload_variant.lora.modem_preset && + config.lora.bandwidth == c.payload_variant.lora.bandwidth && + config.lora.spread_factor == c.payload_variant.lora.spread_factor && + config.lora.coding_rate == c.payload_variant.lora.coding_rate && + config.lora.tx_power == c.payload_variant.lora.tx_power && + config.lora.frequency_offset == c.payload_variant.lora.frequency_offset && + config.lora.override_frequency == c.payload_variant.lora.override_frequency && + config.lora.channel_num == c.payload_variant.lora.channel_num && + config.lora.sx126x_rx_boosted_gain == c.payload_variant.lora.sx126x_rx_boosted_gain) { + requiresReboot = false; + } + +#ifdef RF95_FAN_EN + // Turn PA off if disabled by config + if (c.payload_variant.lora.pa_fan_disabled) { + digitalWrite(RF95_FAN_EN, LOW ^ 0); + } else { + digitalWrite(RF95_FAN_EN, HIGH ^ 0); + } +#endif config.lora = c.payload_variant.lora; + // If we're setting region for the first time, init the region if (isRegionUnset && config.lora.region > meshtastic_Config_LoRaConfig_RegionCode_UNSET) { config.lora.tx_enabled = true; initRegion(); + if (myRegion->dutyCycle < 100) { + config.lora.ignore_mqtt = true; // Ignore MQTT by default if region has a duty cycle limit + } if (strcmp(moduleConfig.mqtt.root, default_mqtt_root) == 0) { sprintf(moduleConfig.mqtt.root, "%s/%s", default_mqtt_root, myRegion->name); changes = SEGMENT_CONFIG | SEGMENT_MODULECONFIG; @@ -343,13 +564,40 @@ void AdminModule::handleSetConfig(const meshtastic_Config &c) config.has_bluetooth = true; config.bluetooth = c.payload_variant.bluetooth; break; + case meshtastic_Config_security_tag: + LOG_INFO("Setting config: Security\n"); + config.security = c.payload_variant.security; +#if !(MESHTASTIC_EXCLUDE_PKI_KEYGEN) && !(MESHTASTIC_EXCLUDE_PKI) + // We check for a potentially valid private key, and a blank public key, and regen the public key if needed. + if (config.security.private_key.size == 32 && !memfll(config.security.private_key.bytes, 0, 32) && + (config.security.public_key.size == 0 || memfll(config.security.public_key.bytes, 0, 32))) { + if (crypto->regeneratePublicKey(config.security.public_key.bytes, config.security.private_key.bytes)) { + config.security.public_key.size = 32; + } + } +#endif + owner.public_key.size = config.security.public_key.size; + memcpy(owner.public_key.bytes, config.security.public_key.bytes, config.security.public_key.size); +#if !MESHTASTIC_EXCLUDE_PKI + crypto->setDHPrivateKey(config.security.private_key.bytes); +#endif + if (config.security.debug_log_api_enabled == c.payload_variant.security.debug_log_api_enabled && + config.security.serial_enabled == c.payload_variant.security.serial_enabled) + requiresReboot = false; + + break; + } + if (requiresReboot && !hasOpenEditTransaction) { + disableBluetooth(); } - saveChanges(changes); + saveChanges(changes, requiresReboot); } void AdminModule::handleSetModuleConfig(const meshtastic_ModuleConfig &c) { + if (!hasOpenEditTransaction) + disableBluetooth(); switch (c.which_payload_variant) { case meshtastic_ModuleConfig_mqtt_tag: LOG_INFO("Setting module config: MQTT\n"); @@ -399,6 +647,10 @@ void AdminModule::handleSetModuleConfig(const meshtastic_ModuleConfig &c) case meshtastic_ModuleConfig_neighbor_info_tag: LOG_INFO("Setting module config: Neighbor Info\n"); moduleConfig.has_neighbor_info = true; + if (moduleConfig.neighbor_info.update_interval < min_neighbor_info_broadcast_secs) { + LOG_DEBUG("Tried to set update_interval too low, setting to %d\n", default_neighbor_info_broadcast_secs); + moduleConfig.neighbor_info.update_interval = default_neighbor_info_broadcast_secs; + } moduleConfig.neighbor_info = c.payload_variant.neighbor_info; break; case meshtastic_ModuleConfig_detection_sensor_tag: @@ -417,7 +669,6 @@ void AdminModule::handleSetModuleConfig(const meshtastic_ModuleConfig &c) moduleConfig.paxcounter = c.payload_variant.paxcounter; break; } - saveChanges(SEGMENT_MODULECONFIG); } @@ -440,6 +691,7 @@ void AdminModule::handleGetOwner(const meshtastic_MeshPacket &req) res.get_owner_response = owner; res.which_payload_variant = meshtastic_AdminMessage_get_owner_response_tag; + setPassKey(&res); myReply = allocDataProtobuf(res); } } @@ -487,6 +739,15 @@ void AdminModule::handleGetConfig(const meshtastic_MeshPacket &req, const uint32 res.get_config_response.which_payload_variant = meshtastic_Config_bluetooth_tag; res.get_config_response.payload_variant.bluetooth = config.bluetooth; break; + case meshtastic_AdminMessage_ConfigType_SECURITY_CONFIG: + LOG_INFO("Getting config: Security\n"); + res.get_config_response.which_payload_variant = meshtastic_Config_security_tag; + res.get_config_response.payload_variant.security = config.security; + break; + case meshtastic_AdminMessage_ConfigType_SESSIONKEY_CONFIG: + LOG_INFO("Getting config: Sessionkey\n"); + res.get_config_response.which_payload_variant = meshtastic_Config_sessionkey_tag; + break; } // NOTE: The phone app needs to know the ls_secs value so it can properly expect sleep behavior. // So even if we internally use 0 to represent 'use default' we still need to send the value we are @@ -496,6 +757,7 @@ void AdminModule::handleGetConfig(const meshtastic_MeshPacket &req, const uint32 // and useful for users to know current provisioning) hideSecret(r.get_radio_response.preferences.wifi_password); // r.get_config_response.which_payloadVariant = Config_ModuleConfig_telemetry_tag; res.which_payload_variant = meshtastic_AdminMessage_get_config_response_tag; + setPassKey(&res); myReply = allocDataProtobuf(res); } } @@ -581,6 +843,7 @@ void AdminModule::handleGetModuleConfig(const meshtastic_MeshPacket &req, const // and useful for users to know current provisioning) hideSecret(r.get_radio_response.preferences.wifi_password); // r.get_config_response.which_payloadVariant = Config_ModuleConfig_telemetry_tag; res.which_payload_variant = meshtastic_AdminMessage_get_module_config_response_tag; + setPassKey(&res); myReply = allocDataProtobuf(res); } } @@ -600,10 +863,11 @@ void AdminModule::handleGetNodeRemoteHardwarePins(const meshtastic_MeshPacket &r continue; } meshtastic_NodeRemoteHardwarePin nodePin = meshtastic_NodeRemoteHardwarePin_init_default; - nodePin.node_num = nodeDB.getNodeNum(); + nodePin.node_num = nodeDB->getNodeNum(); nodePin.pin = moduleConfig.remote_hardware.available_pins[i]; r.get_node_remote_hardware_pins_response.node_remote_hardware_pins[i + 12] = nodePin; } + setPassKey(&r); myReply = allocDataProtobuf(r); } @@ -612,6 +876,7 @@ void AdminModule::handleGetDeviceMetadata(const meshtastic_MeshPacket &req) meshtastic_AdminMessage r = meshtastic_AdminMessage_init_default; r.get_device_metadata_response = getDeviceMetadata(); r.which_payload_variant = meshtastic_AdminMessage_get_device_metadata_response_tag; + setPassKey(&r); myReply = allocDataProtobuf(r); } @@ -633,7 +898,9 @@ void AdminModule::handleGetDeviceConnectionStatus(const meshtastic_MeshPacket &r if (conn.wifi.status.is_connected) { conn.wifi.rssi = WiFi.RSSI(); conn.wifi.status.ip_address = WiFi.localIP(); +#ifndef MESHTASTIC_EXCLUDE_MQTT conn.wifi.status.is_mqtt_connected = mqtt && mqtt->isConnectedDirectly(); +#endif conn.wifi.status.is_syslog_connected = false; // FIXME wire this up } #endif @@ -644,7 +911,9 @@ void AdminModule::handleGetDeviceConnectionStatus(const meshtastic_MeshPacket &r if (Ethernet.linkStatus() == LinkON) { conn.ethernet.status.is_connected = true; conn.ethernet.status.ip_address = Ethernet.localIP(); +#if !MESHTASTIC_EXCLUDE_MQTT conn.ethernet.status.is_mqtt_connected = mqtt && mqtt->isConnectedDirectly(); +#endif conn.ethernet.status.is_syslog_connected = false; // FIXME wire this up } else { conn.ethernet.status.is_connected = false; @@ -662,11 +931,16 @@ void AdminModule::handleGetDeviceConnectionStatus(const meshtastic_MeshPacket &r #endif #endif conn.has_serial = true; // No serial-less devices +#if !EXCLUDE_POWER_FSM conn.serial.is_connected = powerFSM.getState() == &stateSERIAL; +#else + conn.serial.is_connected = powerFSM.getState(); +#endif conn.serial.baud = SERIAL_BAUD; r.get_device_connection_status_response = conn; r.which_payload_variant = meshtastic_AdminMessage_get_device_connection_status_response_tag; + setPassKey(&r); myReply = allocDataProtobuf(r); } @@ -677,6 +951,7 @@ void AdminModule::handleGetChannel(const meshtastic_MeshPacket &req, uint32_t ch meshtastic_AdminMessage r = meshtastic_AdminMessage_init_default; r.get_channel_response = channels.getByIndex(channelIndex); r.which_payload_variant = meshtastic_AdminMessage_get_channel_response_tag; + setPassKey(&r); myReply = allocDataProtobuf(r); } } @@ -684,7 +959,7 @@ void AdminModule::handleGetChannel(const meshtastic_MeshPacket &req, uint32_t ch void AdminModule::reboot(int32_t seconds) { LOG_INFO("Rebooting in %d seconds\n", seconds); - screen->startRebootScreen(); + screen->startAlert("Rebooting..."); rebootAtMsec = (seconds < 0) ? 0 : (millis() + seconds * 1000); } @@ -692,11 +967,11 @@ void AdminModule::saveChanges(int saveWhat, bool shouldReboot) { if (!hasOpenEditTransaction) { LOG_INFO("Saving changes to disk\n"); - service.reloadConfig(saveWhat); // Calls saveToDisk among other things + service->reloadConfig(saveWhat); // Calls saveToDisk among other things } else { LOG_INFO("Delaying save of changes to disk until the open transaction is committed\n"); } - if (shouldReboot) { + if (shouldReboot && !hasOpenEditTransaction) { reboot(DEFAULT_REBOOT_SECONDS); } } @@ -723,12 +998,81 @@ void AdminModule::handleSetHamMode(const meshtastic_HamParameters &p) channels.setChannel(primaryChannel); channels.onConfigChanged(); - service.reloadOwner(false); + service->reloadOwner(false); saveChanges(SEGMENT_CONFIG | SEGMENT_DEVICESTATE | SEGMENT_CHANNELS); } AdminModule::AdminModule() : ProtobufModule("Admin", meshtastic_PortNum_ADMIN_APP, &meshtastic_AdminMessage_msg) { // restrict to the admin channel for rx - boundChannel = Channels::adminChannel; + // boundChannel = Channels::adminChannel; +} + +void AdminModule::setPassKey(meshtastic_AdminMessage *res) +{ + if (session_time == 0 || millis() / 1000 > session_time + 150) { + for (int i = 0; i < 8; i++) { + session_passkey[i] = random(); + } + session_time = millis() / 1000; + } + memcpy(res->session_passkey.bytes, session_passkey, 8); + res->session_passkey.size = 8; + printBytes("Setting admin key to ", res->session_passkey.bytes, 8); + // if halfway to session_expire, regenerate session_passkey, reset the timeout + // set the key in the packet +} + +bool AdminModule::checkPassKey(meshtastic_AdminMessage *res) +{ // check that the key in the packet is still valid + printBytes("Incoming session key: ", res->session_passkey.bytes, 8); + printBytes("Expected session key: ", session_passkey, 8); + return (session_time + 300 > millis() / 1000 && res->session_passkey.size == 8 && + memcmp(res->session_passkey.bytes, session_passkey, 8) == 0); +} + +bool AdminModule::messageIsResponse(const meshtastic_AdminMessage *r) +{ + if (r->which_payload_variant == meshtastic_AdminMessage_get_channel_response_tag || + r->which_payload_variant == meshtastic_AdminMessage_get_owner_response_tag || + r->which_payload_variant == meshtastic_AdminMessage_get_config_response_tag || + r->which_payload_variant == meshtastic_AdminMessage_get_module_config_response_tag || + r->which_payload_variant == meshtastic_AdminMessage_get_canned_message_module_messages_response_tag || + r->which_payload_variant == meshtastic_AdminMessage_get_device_metadata_response_tag || + r->which_payload_variant == meshtastic_AdminMessage_get_ringtone_response_tag || + r->which_payload_variant == meshtastic_AdminMessage_get_device_connection_status_response_tag || + r->which_payload_variant == meshtastic_AdminMessage_get_node_remote_hardware_pins_response_tag || + r->which_payload_variant == meshtastic_NodeRemoteHardwarePinsResponse_node_remote_hardware_pins_tag) + return true; + else + return false; +} + +bool AdminModule::messageIsRequest(const meshtastic_AdminMessage *r) +{ + if (r->which_payload_variant == meshtastic_AdminMessage_get_channel_request_tag || + r->which_payload_variant == meshtastic_AdminMessage_get_owner_request_tag || + r->which_payload_variant == meshtastic_AdminMessage_get_config_request_tag || + r->which_payload_variant == meshtastic_AdminMessage_get_module_config_request_tag || + r->which_payload_variant == meshtastic_AdminMessage_get_canned_message_module_messages_request_tag || + r->which_payload_variant == meshtastic_AdminMessage_get_device_metadata_request_tag || + r->which_payload_variant == meshtastic_AdminMessage_get_ringtone_request_tag || + r->which_payload_variant == meshtastic_AdminMessage_get_device_connection_status_request_tag || + r->which_payload_variant == meshtastic_AdminMessage_get_node_remote_hardware_pins_request_tag) + return true; + else + return false; +} + +void disableBluetooth() +{ +#if HAS_BLUETOOTH +#ifdef ARCH_ESP32 + if (nimbleBluetooth) + nimbleBluetooth->deinit(); +#elif defined(ARCH_NRF52) + if (nrf52Bluetooth) + nrf52Bluetooth->shutdown(); +#endif +#endif } \ No newline at end of file diff --git a/src/modules/AdminModule.h b/src/modules/AdminModule.h index 6ecc88829..d6c0a7343 100644 --- a/src/modules/AdminModule.h +++ b/src/modules/AdminModule.h @@ -7,7 +7,7 @@ /** * Admin module for admin messages */ -class AdminModule : public ProtobufModule +class AdminModule : public ProtobufModule, public Observable { public: /** Constructor @@ -25,6 +25,9 @@ class AdminModule : public ProtobufModule private: bool hasOpenEditTransaction = false; + uint8_t session_passkey[8] = {0}; + uint session_time = 0; + void saveChanges(int saveWhat, bool shouldReboot = true); /** @@ -48,6 +51,14 @@ class AdminModule : public ProtobufModule void handleSetChannel(); void handleSetHamMode(const meshtastic_HamParameters &req); void reboot(int32_t seconds); + + void setPassKey(meshtastic_AdminMessage *res); + bool checkPassKey(meshtastic_AdminMessage *res); + + bool messageIsResponse(const meshtastic_AdminMessage *r); + bool messageIsRequest(const meshtastic_AdminMessage *r); }; -extern AdminModule *adminModule; \ No newline at end of file +extern AdminModule *adminModule; + +void disableBluetooth(); \ No newline at end of file diff --git a/src/modules/AtakPluginModule.cpp b/src/modules/AtakPluginModule.cpp index ffc4fe68a..72d069619 100644 --- a/src/modules/AtakPluginModule.cpp +++ b/src/modules/AtakPluginModule.cpp @@ -1,14 +1,12 @@ #include "AtakPluginModule.h" +#include "Default.h" #include "MeshService.h" #include "NodeDB.h" #include "PowerFSM.h" #include "configuration.h" #include "main.h" -#include "meshtastic/atak.pb.h" - -extern "C" { #include "mesh/compression/unishox2.h" -} +#include "meshtastic/atak.pb.h" AtakPluginModule *atakPluginModule; @@ -54,6 +52,10 @@ meshtastic_TAKPacket AtakPluginModule::cloneTAKPacketData(meshtastic_TAKPacket * } else if (t->which_payload_variant == meshtastic_TAKPacket_chat_tag) { clone.which_payload_variant = meshtastic_TAKPacket_chat_tag; clone.payload_variant.chat = {0}; + } else if (t->which_payload_variant == meshtastic_TAKPacket_detail_tag) { + clone.which_payload_variant = meshtastic_TAKPacket_detail_tag; + clone.payload_variant.detail.size = t->payload_variant.detail.size; + memcpy(clone.payload_variant.detail.bytes, t->payload_variant.detail.bytes, t->payload_variant.detail.size); } return clone; @@ -63,44 +65,68 @@ void AtakPluginModule::alterReceivedProtobuf(meshtastic_MeshPacket &mp, meshtast { // From Phone (EUD) if (mp.from == 0) { - LOG_DEBUG("Received uncompressed TAK payload from phone with %d bytes\n", mp.decoded.payload.size); + LOG_DEBUG("Received uncompressed TAK payload from phone: %d bytes\n", mp.decoded.payload.size); // Compress for LoRA transport auto compressed = cloneTAKPacketData(t); compressed.is_compressed = true; if (t->has_contact) { - auto length = unishox2_compress_simple(t->contact.callsign, strlen(t->contact.callsign), compressed.contact.callsign); - LOG_DEBUG("Uncompressed callsign '%s' - %d bytes\n", t->contact.callsign, strlen(t->contact.callsign)); - LOG_DEBUG("Compressed callsign '%s' - %d bytes\n", t->contact.callsign, length); - - length = unishox2_compress_simple(t->contact.device_callsign, strlen(t->contact.device_callsign), - compressed.contact.device_callsign); - LOG_DEBUG("Uncompressed device_callsign '%s' - %d bytes\n", t->contact.device_callsign, - strlen(t->contact.device_callsign)); - LOG_DEBUG("Compressed device_callsign '%s' - %d bytes\n", compressed.contact.device_callsign, length); + auto length = unishox2_compress_lines(t->contact.callsign, strlen(t->contact.callsign), compressed.contact.callsign, + sizeof(compressed.contact.callsign) - 1, USX_PSET_DFLT, NULL); + if (length < 0) { + LOG_WARN("Compression overflowed contact.callsign. Reverting to uncompressed packet\n"); + return; + } + LOG_DEBUG("Compressed callsign: %d bytes\n", length); + length = unishox2_compress_lines(t->contact.device_callsign, strlen(t->contact.device_callsign), + compressed.contact.device_callsign, sizeof(compressed.contact.device_callsign) - 1, + USX_PSET_DFLT, NULL); + if (length < 0) { + LOG_WARN("Compression overflowed contact.device_callsign. Reverting to uncompressed packet\n"); + return; + } + LOG_DEBUG("Compressed device_callsign: %d bytes\n", length); } if (t->which_payload_variant == meshtastic_TAKPacket_chat_tag) { - auto length = unishox2_compress_simple(t->payload_variant.chat.message, strlen(t->payload_variant.chat.message), - compressed.payload_variant.chat.message); - LOG_DEBUG("Uncompressed chat message '%s' - %d bytes\n", t->payload_variant.chat.message, - strlen(t->payload_variant.chat.message)); - LOG_DEBUG("Compressed chat message '%s' - %d bytes\n", compressed.payload_variant.chat.message, length); + auto length = unishox2_compress_lines(t->payload_variant.chat.message, strlen(t->payload_variant.chat.message), + compressed.payload_variant.chat.message, + sizeof(compressed.payload_variant.chat.message) - 1, USX_PSET_DFLT, NULL); + if (length < 0) { + LOG_WARN("Compression overflowed chat.message. Reverting to uncompressed packet\n"); + return; + } + LOG_DEBUG("Compressed chat message: %d bytes\n", length); if (t->payload_variant.chat.has_to) { compressed.payload_variant.chat.has_to = true; - length = unishox2_compress_simple(t->payload_variant.chat.to, strlen(t->payload_variant.chat.to), - compressed.payload_variant.chat.to); - LOG_DEBUG("Uncompressed chat to '%s' - %d bytes\n", t->payload_variant.chat.to, - strlen(t->payload_variant.chat.to)); - LOG_DEBUG("Compressed chat to '%s' - %d bytes\n", compressed.payload_variant.chat.to, length); + length = unishox2_compress_lines(t->payload_variant.chat.to, strlen(t->payload_variant.chat.to), + compressed.payload_variant.chat.to, + sizeof(compressed.payload_variant.chat.to) - 1, USX_PSET_DFLT, NULL); + if (length < 0) { + LOG_WARN("Compression overflowed chat.to. Reverting to uncompressed packet\n"); + return; + } + LOG_DEBUG("Compressed chat to: %d bytes\n", length); + } + + if (t->payload_variant.chat.has_to_callsign) { + compressed.payload_variant.chat.has_to_callsign = true; + length = unishox2_compress_lines(t->payload_variant.chat.to_callsign, strlen(t->payload_variant.chat.to_callsign), + compressed.payload_variant.chat.to_callsign, + sizeof(compressed.payload_variant.chat.to_callsign) - 1, USX_PSET_DFLT, NULL); + if (length < 0) { + LOG_WARN("Compression overflowed chat.to_callsign. Reverting to uncompressed packet\n"); + return; + } + LOG_DEBUG("Compressed chat to_callsign: %d bytes\n", length); } } mp.decoded.payload.size = pb_encode_to_bytes(mp.decoded.payload.bytes, sizeof(mp.decoded.payload.bytes), meshtastic_TAKPacket_fields, &compressed); - LOG_DEBUG("Final payload size of %d bytes\n", mp.decoded.payload.size); + LOG_DEBUG("Final payload: %d bytes\n", mp.decoded.payload.size); } else { if (!t->is_compressed) { // Not compressed. Something is wrong - LOG_ERROR("Received uncompressed TAKPacket over radio!\n"); + LOG_WARN("Received uncompressed TAKPacket over radio! Skipping\n"); return; } @@ -110,36 +136,63 @@ void AtakPluginModule::alterReceivedProtobuf(meshtastic_MeshPacket &mp, meshtast uncompressed.is_compressed = false; if (t->has_contact) { auto length = - unishox2_decompress_simple(t->contact.callsign, strlen(t->contact.callsign), uncompressed.contact.callsign); + unishox2_decompress_lines(t->contact.callsign, strlen(t->contact.callsign), uncompressed.contact.callsign, + sizeof(uncompressed.contact.callsign) - 1, USX_PSET_DFLT, NULL); + if (length < 0) { + LOG_WARN("Decompression overflowed contact.callsign. Bailing out\n"); + return; + } + LOG_DEBUG("Decompressed callsign: %d bytes\n", length); - LOG_DEBUG("Compressed callsign: %d bytes\n", strlen(t->contact.callsign)); - LOG_DEBUG("Decompressed callsign: '%s' @ %d bytes\n", uncompressed.contact.callsign, length); - - length = unishox2_decompress_simple(t->contact.device_callsign, strlen(t->contact.device_callsign), - uncompressed.contact.device_callsign); - - LOG_DEBUG("Compressed device_callsign: %d bytes\n", strlen(t->contact.device_callsign)); - LOG_DEBUG("Decompressed device_callsign: '%s' @ %d bytes\n", uncompressed.contact.device_callsign, length); + length = unishox2_decompress_lines(t->contact.device_callsign, strlen(t->contact.device_callsign), + uncompressed.contact.device_callsign, + sizeof(uncompressed.contact.device_callsign) - 1, USX_PSET_DFLT, NULL); + if (length < 0) { + LOG_WARN("Decompression overflowed contact.device_callsign. Bailing out\n"); + return; + } + LOG_DEBUG("Decompressed device_callsign: %d bytes\n", length); } if (uncompressed.which_payload_variant == meshtastic_TAKPacket_chat_tag) { - auto length = unishox2_decompress_simple(t->payload_variant.chat.message, strlen(t->payload_variant.chat.message), - uncompressed.payload_variant.chat.message); - LOG_DEBUG("Compressed chat message: %d bytes\n", strlen(t->payload_variant.chat.message)); - LOG_DEBUG("Decompressed chat message: '%s' @ %d bytes\n", uncompressed.payload_variant.chat.message, length); + auto length = unishox2_decompress_lines(t->payload_variant.chat.message, strlen(t->payload_variant.chat.message), + uncompressed.payload_variant.chat.message, + sizeof(uncompressed.payload_variant.chat.message) - 1, USX_PSET_DFLT, NULL); + if (length < 0) { + LOG_WARN("Decompression overflowed chat.message. Bailing out\n"); + return; + } + LOG_DEBUG("Decompressed chat message: %d bytes\n", length); if (t->payload_variant.chat.has_to) { uncompressed.payload_variant.chat.has_to = true; - length = unishox2_decompress_simple(t->payload_variant.chat.to, strlen(t->payload_variant.chat.to), - uncompressed.payload_variant.chat.to); - LOG_DEBUG("Compressed chat to: %d bytes\n", strlen(t->payload_variant.chat.to)); - LOG_DEBUG("Decompressed chat to: '%s' @ %d bytes\n", uncompressed.payload_variant.chat.to, length); + length = unishox2_decompress_lines(t->payload_variant.chat.to, strlen(t->payload_variant.chat.to), + uncompressed.payload_variant.chat.to, + sizeof(uncompressed.payload_variant.chat.to) - 1, USX_PSET_DFLT, NULL); + if (length < 0) { + LOG_WARN("Decompression overflowed chat.to. Bailing out\n"); + return; + } + LOG_DEBUG("Decompressed chat to: %d bytes\n", length); + } + + if (t->payload_variant.chat.has_to_callsign) { + uncompressed.payload_variant.chat.has_to_callsign = true; + length = + unishox2_decompress_lines(t->payload_variant.chat.to_callsign, strlen(t->payload_variant.chat.to_callsign), + uncompressed.payload_variant.chat.to_callsign, + sizeof(uncompressed.payload_variant.chat.to_callsign) - 1, USX_PSET_DFLT, NULL); + if (length < 0) { + LOG_WARN("Decompression overflowed chat.to_callsign. Bailing out\n"); + return; + } + LOG_DEBUG("Decompressed chat to_callsign: %d bytes\n", length); } } decompressedCopy->decoded.payload.size = pb_encode_to_bytes(decompressedCopy->decoded.payload.bytes, sizeof(decompressedCopy->decoded.payload), meshtastic_TAKPacket_fields, &uncompressed); - service.sendToPhone(decompressedCopy); + service->sendToPhone(decompressedCopy); } return; } \ No newline at end of file diff --git a/src/modules/CannedMessageModule.cpp b/src/modules/CannedMessageModule.cpp index 3127b0986..ed0dce25f 100644 --- a/src/modules/CannedMessageModule.cpp +++ b/src/modules/CannedMessageModule.cpp @@ -10,48 +10,25 @@ #include "NodeDB.h" #include "PowerFSM.h" // needed for button bypass #include "detect/ScanI2C.h" +#include "input/ScanAndSelect.h" #include "mesh/generated/meshtastic/cannedmessages.pb.h" +#include "modules/AdminModule.h" -#include "main.h" // for cardkb_found +#include "main.h" // for cardkb_found +#include "modules/ExternalNotificationModule.h" // for buzzer control +#if !MESHTASTIC_EXCLUDE_GPS +#include "GPS.h" +#endif +#if defined(USE_EINK) && defined(USE_EINK_DYNAMICDISPLAY) +#include "graphics/EInkDynamicDisplay.h" // To select between full and fast refresh on E-Ink displays +#endif #ifndef INPUTBROKER_MATRIX_TYPE #define INPUTBROKER_MATRIX_TYPE 0 #endif -#ifdef OLED_RU -#include "graphics/fonts/OLEDDisplayFontsRU.h" -#endif - -#ifdef OLED_UA -#include "graphics/fonts/OLEDDisplayFontsUA.h" -#endif - -#if (defined(USE_EINK) || defined(ILI9341_DRIVER) || defined(ST7735_CS) || defined(ST7789_CS)) && \ - !defined(DISPLAY_FORCE_SMALL_FONTS) - -// The screen is bigger so use bigger fonts -#define FONT_SMALL ArialMT_Plain_16 -#define FONT_MEDIUM ArialMT_Plain_24 -#define FONT_LARGE ArialMT_Plain_24 -#else -#ifdef OLED_RU -#define FONT_SMALL ArialMT_Plain_10_RU -#else -#ifdef OLED_UA -#define FONT_SMALL ArialMT_Plain_10_UA -#else -#define FONT_SMALL ArialMT_Plain_10 -#endif -#endif -#define FONT_MEDIUM ArialMT_Plain_16 -#define FONT_LARGE ArialMT_Plain_24 -#endif - -#define fontHeight(font) ((font)[1] + 1) // height is position 1 - -#define FONT_HEIGHT_SMALL fontHeight(FONT_SMALL) -#define FONT_HEIGHT_MEDIUM fontHeight(FONT_MEDIUM) -#define FONT_HEIGHT_LARGE fontHeight(FONT_LARGE) +#include "graphics/ScreenFonts.h" +#include // Remove Canned message screen if no action is taken for some milliseconds #define INACTIVATE_AFTER_MS 20000 @@ -76,6 +53,12 @@ CannedMessageModule::CannedMessageModule() disable(); } else { LOG_INFO("CannedMessageModule is enabled\n"); + + // T-Watch interface currently has no way to select destination type, so default to 'node' +#if defined(T_WATCH_S3) || defined(RAK14014) + this->destSelect = CANNED_MESSAGE_DESTINATION_TYPE_NODE; +#endif + this->inputObserver.observe(inputBroker); } } else { @@ -96,8 +79,16 @@ int CannedMessageModule::splitConfiguredMessages() int messageIndex = 0; int i = 0; + String canned_messages = cannedMessageModuleConfig.messages; + +#if defined(T_WATCH_S3) || defined(RAK14014) + String separator = canned_messages.length() ? "|" : ""; + + canned_messages = "[---- Free Text ----]" + separator + canned_messages; +#endif + // collect all the message parts - strncpy(this->messageStore, cannedMessageModuleConfig.messages, sizeof(this->messageStore)); + strncpy(this->messageStore, canned_messages.c_str(), sizeof(this->messageStore)); // The first message points to the beginning of the store. this->messages[messageIndex++] = this->messageStore; @@ -107,7 +98,6 @@ int CannedMessageModule::splitConfiguredMessages() if (this->messageStore[i] == '|') { // Message ending found, replace it with string-end character. this->messageStore[i] = '\0'; - LOG_DEBUG("CannedMessage %d is: '%s'\n", messageIndex - 1, this->messages[messageIndex - 1]); // hit our max messages, bail if (messageIndex >= CANNED_MESSAGE_MODULE_MESSAGE_MAX_COUNT) { @@ -148,20 +138,31 @@ int CannedMessageModule::handleInputEvent(const InputEvent *event) bool validEvent = false; if (event->inputEvent == static_cast(meshtastic_ModuleConfig_CannedMessageConfig_InputEventChar_UP)) { if (this->messagesCount > 0) { - // LOG_DEBUG("Canned message event UP\n"); this->runState = CANNED_MESSAGE_RUN_STATE_ACTION_UP; validEvent = true; } } if (event->inputEvent == static_cast(meshtastic_ModuleConfig_CannedMessageConfig_InputEventChar_DOWN)) { if (this->messagesCount > 0) { - // LOG_DEBUG("Canned message event DOWN\n"); this->runState = CANNED_MESSAGE_RUN_STATE_ACTION_DOWN; validEvent = true; } } if (event->inputEvent == static_cast(meshtastic_ModuleConfig_CannedMessageConfig_InputEventChar_SELECT)) { - LOG_DEBUG("Canned message event Select\n"); + +#if defined(T_WATCH_S3) || defined(RAK14014) + if (this->currentMessageIndex == 0) { + this->runState = CANNED_MESSAGE_RUN_STATE_FREETEXT; + + requestFocus(); // Tell Screen::setFrames to move to our module's frame, next time it runs + UIFrameEvent e; + e.action = UIFrameEvent::Action::REGENERATE_FRAMESET; // We want to change the list of frames shown on-screen + this->notifyObservers(&e); + + return 0; + } +#endif + // when inactive, call the onebutton shortpress instead. Activate Module only on up/down if ((this->runState == CANNED_MESSAGE_RUN_STATE_INACTIVE) || (this->runState == CANNED_MESSAGE_RUN_STATE_DISABLED)) { powerFSM.trigger(EVENT_PRESS); @@ -172,51 +173,206 @@ int CannedMessageModule::handleInputEvent(const InputEvent *event) } } if (event->inputEvent == static_cast(meshtastic_ModuleConfig_CannedMessageConfig_InputEventChar_CANCEL)) { - LOG_DEBUG("Canned message event Cancel\n"); - UIFrameEvent e = {false, true}; - e.frameChanged = true; + UIFrameEvent e; + e.action = UIFrameEvent::Action::REGENERATE_FRAMESET; // We want to change the list of frames shown on-screen this->currentMessageIndex = -1; + +#if !defined(T_WATCH_S3) && !defined(RAK14014) this->freetext = ""; // clear freetext this->cursor = 0; this->destSelect = CANNED_MESSAGE_DESTINATION_TYPE_NONE; +#endif + this->runState = CANNED_MESSAGE_RUN_STATE_INACTIVE; this->notifyObservers(&e); } if ((event->inputEvent == static_cast(meshtastic_ModuleConfig_CannedMessageConfig_InputEventChar_BACK)) || (event->inputEvent == static_cast(meshtastic_ModuleConfig_CannedMessageConfig_InputEventChar_LEFT)) || (event->inputEvent == static_cast(meshtastic_ModuleConfig_CannedMessageConfig_InputEventChar_RIGHT))) { - // LOG_DEBUG("Canned message event (%x)\n", event->kbchar); + +#if defined(T_WATCH_S3) || defined(RAK14014) + if (event->inputEvent == static_cast(meshtastic_ModuleConfig_CannedMessageConfig_InputEventChar_LEFT)) { + this->payload = INPUT_BROKER_MSG_LEFT; + } else if (event->inputEvent == static_cast(meshtastic_ModuleConfig_CannedMessageConfig_InputEventChar_RIGHT)) { + this->payload = INPUT_BROKER_MSG_RIGHT; + } +#else // tweak for left/right events generated via trackball/touch with empty kbchar if (!event->kbchar) { if (event->inputEvent == static_cast(meshtastic_ModuleConfig_CannedMessageConfig_InputEventChar_LEFT)) { - this->payload = 0xb4; - this->destSelect = CANNED_MESSAGE_DESTINATION_TYPE_NODE; + this->payload = INPUT_BROKER_MSG_LEFT; } else if (event->inputEvent == static_cast(meshtastic_ModuleConfig_CannedMessageConfig_InputEventChar_RIGHT)) { - this->payload = 0xb7; - this->destSelect = CANNED_MESSAGE_DESTINATION_TYPE_NODE; + this->payload = INPUT_BROKER_MSG_RIGHT; } } else { // pass the pressed key this->payload = event->kbchar; } +#endif + this->lastTouchMillis = millis(); validEvent = true; } if (event->inputEvent == static_cast(ANYKEY)) { - LOG_DEBUG("Canned message event any key pressed\n"); // when inactive, this will switch to the freetext mode if ((this->runState == CANNED_MESSAGE_RUN_STATE_INACTIVE) || (this->runState == CANNED_MESSAGE_RUN_STATE_ACTIVE) || (this->runState == CANNED_MESSAGE_RUN_STATE_DISABLED)) { this->runState = CANNED_MESSAGE_RUN_STATE_FREETEXT; } - // pass the pressed key - // LOG_DEBUG("Canned message ANYKEY (%x)\n", event->kbchar); - this->payload = event->kbchar; - this->lastTouchMillis = millis(); - validEvent = true; + + validEvent = false; // If key is normal than it will be set to true. + + // Run modifier key code below, (doesnt inturrupt typing or reset to start screen page) + switch (event->kbchar) { + case INPUT_BROKER_MSG_BRIGHTNESS_UP: // make screen brighter + if (screen) + screen->increaseBrightness(); + LOG_DEBUG("increasing Screen Brightness\n"); + break; + case INPUT_BROKER_MSG_BRIGHTNESS_DOWN: // make screen dimmer + if (screen) + screen->decreaseBrightness(); + LOG_DEBUG("Decreasing Screen Brightness\n"); + break; + case INPUT_BROKER_MSG_FN_SYMBOL_ON: // draw modifier (function) symbal + if (screen) + screen->setFunctionSymbal("Fn"); + break; + case INPUT_BROKER_MSG_FN_SYMBOL_OFF: // remove modifier (function) symbal + if (screen) + screen->removeFunctionSymbal("Fn"); + break; + // mute (switch off/toggle) external notifications on fn+m + case INPUT_BROKER_MSG_MUTE_TOGGLE: + if (moduleConfig.external_notification.enabled == true) { + if (externalNotificationModule->getMute()) { + externalNotificationModule->setMute(false); + showTemporaryMessage("Notifications \nEnabled"); + if (screen) + screen->removeFunctionSymbal("M"); // remove the mute symbol from the bottom right corner + } else { + externalNotificationModule->stopNow(); // this will turn off all GPIO and sounds and idle the loop + externalNotificationModule->setMute(true); + showTemporaryMessage("Notifications \nDisabled"); + if (screen) + screen->setFunctionSymbal("M"); // add the mute symbol to the bottom right corner + } + } + break; + case INPUT_BROKER_MSG_GPS_TOGGLE: // toggle GPS like triple press does +#if !MESHTASTIC_EXCLUDE_GPS + if (gps != nullptr) { + gps->toggleGpsMode(); + } + if (screen) + screen->forceDisplay(); + showTemporaryMessage("GPS Toggled"); +#endif + break; + case INPUT_BROKER_MSG_BLUETOOTH_TOGGLE: // toggle Bluetooth on/off + if (config.bluetooth.enabled == true) { + config.bluetooth.enabled = false; + LOG_INFO("User toggled Bluetooth"); + nodeDB->saveToDisk(); + disableBluetooth(); + showTemporaryMessage("Bluetooth OFF"); + } else if (config.bluetooth.enabled == false) { + config.bluetooth.enabled = true; + LOG_INFO("User toggled Bluetooth"); + nodeDB->saveToDisk(); + rebootAtMsec = millis() + 2000; + showTemporaryMessage("Bluetooth ON\nReboot"); + } + break; + case INPUT_BROKER_MSG_SEND_PING: // fn+space send network ping like double press does + service->refreshLocalMeshNode(); + if (service->trySendPosition(NODENUM_BROADCAST, true)) { + showTemporaryMessage("Position \nUpdate Sent"); + } else { + showTemporaryMessage("Node Info \nUpdate Sent"); + } + break; + case INPUT_BROKER_MSG_DISMISS_FRAME: // fn+del: dismiss screen frames like text or waypoint + // Avoid opening the canned message screen frame + // We're only handling the keypress here by convention, this has nothing to do with canned messages + this->runState = CANNED_MESSAGE_RUN_STATE_INACTIVE; + // Attempt to close whatever frame is currently shown on display + screen->dismissCurrentFrame(); + return 0; + default: + // pass the pressed key + // LOG_DEBUG("Canned message ANYKEY (%x)\n", event->kbchar); + this->payload = event->kbchar; + this->lastTouchMillis = millis(); + validEvent = true; + break; + } + if (screen && (event->kbchar != INPUT_BROKER_MSG_FN_SYMBOL_ON)) { + screen->removeFunctionSymbal("Fn"); // remove modifier (function) symbal + } } + +#if defined(T_WATCH_S3) || defined(RAK14014) + if (this->runState == CANNED_MESSAGE_RUN_STATE_FREETEXT) { + String keyTapped = keyForCoordinates(event->touchX, event->touchY); + + if (keyTapped == "⇧") { + this->highlight = -1; + + this->payload = 0x00; + + validEvent = true; + + this->shift = !this->shift; + } else if (keyTapped == "⌫") { + this->highlight = keyTapped[0]; + + this->payload = 0x08; + + validEvent = true; + + this->shift = false; + } else if (keyTapped == "123" || keyTapped == "ABC") { + this->highlight = -1; + + this->payload = 0x00; + + this->charSet = this->charSet == 0 ? 1 : 0; + + validEvent = true; + } else if (keyTapped == " ") { + this->highlight = keyTapped[0]; + + this->payload = keyTapped[0]; + + validEvent = true; + + this->shift = false; + } else if (keyTapped == "↵") { + this->highlight = 0x00; + + this->runState = CANNED_MESSAGE_RUN_STATE_ACTION_SELECT; + + this->payload = CANNED_MESSAGE_RUN_STATE_FREETEXT; + + this->currentMessageIndex = event->kbchar - 1; + + validEvent = true; + + this->shift = false; + } else if (keyTapped != "") { + this->highlight = keyTapped[0]; + + this->payload = this->shift ? keyTapped[0] : std::tolower(keyTapped[0]); + + validEvent = true; + + this->shift = false; + } + } +#endif + if (event->inputEvent == static_cast(MATRIXKEY)) { - LOG_DEBUG("Canned message event Matrix key pressed\n"); // this will send the text immediately on matrix press this->runState = CANNED_MESSAGE_RUN_STATE_ACTION_SELECT; this->payload = MATRIXKEY; @@ -226,6 +382,8 @@ int CannedMessageModule::handleInputEvent(const InputEvent *event) } if (validEvent) { + requestFocus(); // Tell Screen::setFrames to move to our module's frame, next time it runs + // Let runOnce to be called immediately. if (this->runState == CANNED_MESSAGE_RUN_STATE_ACTION_SELECT) { setIntervalFromNow(0); // on fast keypresses, this isn't fast enough. @@ -251,9 +409,14 @@ void CannedMessageModule::sendText(NodeNum dest, ChannelIndex channel, const cha p->decoded.payload.size++; } + // Only receive routing messages when expecting ACK for a canned message + // Prevents the canned message module from regenerating the screen's frameset at unexpected times, + // or raising a UIFrameEvent before another module has the chance + this->waitingForAck = true; + LOG_INFO("Sending message id=%d, dest=%x, msg=%.*s\n", p->id, p->to, p->decoded.payload.size, p->decoded.payload.bytes); - service.sendToMesh( + service->sendToMesh( p, RX_SRC_LOCAL, true); // send to mesh, cc to phone. Even if there's no phone connected, this stores the message to match ACKs } @@ -262,29 +425,38 @@ int32_t CannedMessageModule::runOnce() { if (((!moduleConfig.canned_message.enabled) && !CANNED_MESSAGE_MODULE_ENABLE) || (this->runState == CANNED_MESSAGE_RUN_STATE_DISABLED) || (this->runState == CANNED_MESSAGE_RUN_STATE_INACTIVE)) { + temporaryMessage = ""; return INT32_MAX; } // LOG_DEBUG("Check status\n"); - UIFrameEvent e = {false, true}; + UIFrameEvent e; if ((this->runState == CANNED_MESSAGE_RUN_STATE_SENDING_ACTIVE) || - (this->runState == CANNED_MESSAGE_RUN_STATE_ACK_NACK_RECEIVED)) { - // TODO: might have some feedback of sendig state + (this->runState == CANNED_MESSAGE_RUN_STATE_ACK_NACK_RECEIVED) || (this->runState == CANNED_MESSAGE_RUN_STATE_MESSAGE)) { + // TODO: might have some feedback of sending state this->runState = CANNED_MESSAGE_RUN_STATE_INACTIVE; - e.frameChanged = true; + temporaryMessage = ""; + e.action = UIFrameEvent::Action::REGENERATE_FRAMESET; // We want to change the list of frames shown on-screen this->currentMessageIndex = -1; this->freetext = ""; // clear freetext this->cursor = 0; + +#if !defined(T_WATCH_S3) && !defined(RAK14014) this->destSelect = CANNED_MESSAGE_DESTINATION_TYPE_NONE; +#endif + this->notifyObservers(&e); } else if (((this->runState == CANNED_MESSAGE_RUN_STATE_ACTIVE) || (this->runState == CANNED_MESSAGE_RUN_STATE_FREETEXT)) && - ((millis() - this->lastTouchMillis) > INACTIVATE_AFTER_MS)) { + !Throttle::isWithinTimespanMs(this->lastTouchMillis, INACTIVATE_AFTER_MS)) { // Reset module - LOG_DEBUG("Reset due to lack of activity.\n"); - e.frameChanged = true; + e.action = UIFrameEvent::Action::REGENERATE_FRAMESET; // We want to change the list of frames shown on-screen this->currentMessageIndex = -1; this->freetext = ""; // clear freetext this->cursor = 0; + +#if !defined(T_WATCH_S3) && !defined(RAK14014) this->destSelect = CANNED_MESSAGE_DESTINATION_TYPE_NONE; +#endif + this->runState = CANNED_MESSAGE_RUN_STATE_INACTIVE; this->notifyObservers(&e); } else if (this->runState == CANNED_MESSAGE_RUN_STATE_ACTION_SELECT) { @@ -293,7 +465,6 @@ int32_t CannedMessageModule::runOnce() sendText(this->dest, indexChannels[this->channel], this->freetext.c_str(), true); this->runState = CANNED_MESSAGE_RUN_STATE_SENDING_ACTIVE; } else { - LOG_DEBUG("Reset message is empty.\n"); this->runState = CANNED_MESSAGE_RUN_STATE_INACTIVE; } } else { @@ -302,32 +473,44 @@ int32_t CannedMessageModule::runOnce() powerFSM.trigger(EVENT_PRESS); return INT32_MAX; } else { +#if defined(T_WATCH_S3) || defined(RAK14014) + sendText(this->dest, indexChannels[this->channel], this->messages[this->currentMessageIndex], true); +#else sendText(NODENUM_BROADCAST, channels.getPrimaryIndex(), this->messages[this->currentMessageIndex], true); +#endif } this->runState = CANNED_MESSAGE_RUN_STATE_SENDING_ACTIVE; } else { - LOG_DEBUG("Reset message is empty.\n"); + // LOG_DEBUG("Reset message is empty.\n"); this->runState = CANNED_MESSAGE_RUN_STATE_INACTIVE; } } - e.frameChanged = true; + e.action = UIFrameEvent::Action::REGENERATE_FRAMESET; // We want to change the list of frames shown on-screen this->currentMessageIndex = -1; this->freetext = ""; // clear freetext this->cursor = 0; + +#if !defined(T_WATCH_S3) && !defined(RAK14014) this->destSelect = CANNED_MESSAGE_DESTINATION_TYPE_NONE; +#endif + this->notifyObservers(&e); return 2000; } else if ((this->runState != CANNED_MESSAGE_RUN_STATE_FREETEXT) && (this->currentMessageIndex == -1)) { this->currentMessageIndex = 0; LOG_DEBUG("First touch (%d):%s\n", this->currentMessageIndex, this->getCurrentMessage()); - e.frameChanged = true; + e.action = UIFrameEvent::Action::REGENERATE_FRAMESET; // We want to change the list of frames shown on-screen this->runState = CANNED_MESSAGE_RUN_STATE_ACTIVE; } else if (this->runState == CANNED_MESSAGE_RUN_STATE_ACTION_UP) { if (this->messagesCount > 0) { this->currentMessageIndex = getPrevIndex(); this->freetext = ""; // clear freetext this->cursor = 0; + +#if !defined(T_WATCH_S3) && !defined(RAK14014) this->destSelect = CANNED_MESSAGE_DESTINATION_TYPE_NONE; +#endif + this->runState = CANNED_MESSAGE_RUN_STATE_ACTIVE; LOG_DEBUG("MOVE UP (%d):%s\n", this->currentMessageIndex, this->getCurrentMessage()); } @@ -336,26 +519,30 @@ int32_t CannedMessageModule::runOnce() this->currentMessageIndex = this->getNextIndex(); this->freetext = ""; // clear freetext this->cursor = 0; + +#if !defined(T_WATCH_S3) && !defined(RAK14014) this->destSelect = CANNED_MESSAGE_DESTINATION_TYPE_NONE; +#endif + this->runState = CANNED_MESSAGE_RUN_STATE_ACTIVE; LOG_DEBUG("MOVE DOWN (%d):%s\n", this->currentMessageIndex, this->getCurrentMessage()); } } else if (this->runState == CANNED_MESSAGE_RUN_STATE_FREETEXT || this->runState == CANNED_MESSAGE_RUN_STATE_ACTIVE) { switch (this->payload) { - case 0xb4: // left + case INPUT_BROKER_MSG_LEFT: if (this->destSelect == CANNED_MESSAGE_DESTINATION_TYPE_NODE) { - size_t numMeshNodes = nodeDB.getNumMeshNodes(); + size_t numMeshNodes = nodeDB->getNumMeshNodes(); if (this->dest == NODENUM_BROADCAST) { - this->dest = nodeDB.getNodeNum(); + this->dest = nodeDB->getNodeNum(); } for (unsigned int i = 0; i < numMeshNodes; i++) { - if (nodeDB.getMeshNodeByIndex(i)->num == this->dest) { + if (nodeDB->getMeshNodeByIndex(i)->num == this->dest) { this->dest = - (i > 0) ? nodeDB.getMeshNodeByIndex(i - 1)->num : nodeDB.getMeshNodeByIndex(numMeshNodes - 1)->num; + (i > 0) ? nodeDB->getMeshNodeByIndex(i - 1)->num : nodeDB->getMeshNodeByIndex(numMeshNodes - 1)->num; break; } } - if (this->dest == nodeDB.getNodeNum()) { + if (this->dest == nodeDB->getNodeNum()) { this->dest = NODENUM_BROADCAST; } } else if (this->destSelect == CANNED_MESSAGE_DESTINATION_TYPE_CHANNEL) { @@ -377,20 +564,20 @@ int32_t CannedMessageModule::runOnce() } } break; - case 0xb7: // right + case INPUT_BROKER_MSG_RIGHT: if (this->destSelect == CANNED_MESSAGE_DESTINATION_TYPE_NODE) { - size_t numMeshNodes = nodeDB.getNumMeshNodes(); + size_t numMeshNodes = nodeDB->getNumMeshNodes(); if (this->dest == NODENUM_BROADCAST) { - this->dest = nodeDB.getNodeNum(); + this->dest = nodeDB->getNodeNum(); } for (unsigned int i = 0; i < numMeshNodes; i++) { - if (nodeDB.getMeshNodeByIndex(i)->num == this->dest) { + if (nodeDB->getMeshNodeByIndex(i)->num == this->dest) { this->dest = - (i < numMeshNodes - 1) ? nodeDB.getMeshNodeByIndex(i + 1)->num : nodeDB.getMeshNodeByIndex(0)->num; + (i < numMeshNodes - 1) ? nodeDB->getMeshNodeByIndex(i + 1)->num : nodeDB->getMeshNodeByIndex(0)->num; break; } } - if (this->dest == nodeDB.getNodeNum()) { + if (this->dest == nodeDB->getNodeNum()) { this->dest = NODENUM_BROADCAST; } } else if (this->destSelect == CANNED_MESSAGE_DESTINATION_TYPE_CHANNEL) { @@ -416,10 +603,11 @@ int32_t CannedMessageModule::runOnce() break; } if (this->runState == CANNED_MESSAGE_RUN_STATE_FREETEXT) { - e.frameChanged = true; - switch (this->payload) { - case 0x08: // backspace - if (this->freetext.length() > 0) { + e.action = UIFrameEvent::Action::REGENERATE_FRAMESET; // We want to change the list of frames shown on-screen + switch (this->payload) { // code below all trigger the freetext window (where you type to send a message) or reset the + // display back to the default window + case 0x08: // backspace + if (this->freetext.length() > 0 && this->highlight == 0x00) { if (this->cursor == this->freetext.length()) { this->freetext = this->freetext.substring(0, this->freetext.length() - 1); } else { @@ -438,18 +626,38 @@ int32_t CannedMessageModule::runOnce() this->destSelect = CANNED_MESSAGE_DESTINATION_TYPE_NODE; } break; - case 0xb4: // left - case 0xb7: // right + case INPUT_BROKER_MSG_LEFT: + case INPUT_BROKER_MSG_RIGHT: // already handled above break; + // handle fn+s for shutdown + case INPUT_BROKER_MSG_SHUTDOWN: + if (screen) + screen->startAlert("Shutting down..."); + shutdownAtMsec = millis() + DEFAULT_SHUTDOWN_SECONDS * 1000; + runState = CANNED_MESSAGE_RUN_STATE_INACTIVE; + break; + // and fn+r for reboot + case INPUT_BROKER_MSG_REBOOT: + if (screen) + screen->startAlert("Rebooting..."); + rebootAtMsec = millis() + DEFAULT_REBOOT_SECONDS * 1000; + runState = CANNED_MESSAGE_RUN_STATE_INACTIVE; + break; default: + if (this->highlight != 0x00) { + break; + } + if (this->cursor == this->freetext.length()) { this->freetext += this->payload; } else { this->freetext = this->freetext.substring(0, this->cursor) + this->payload + this->freetext.substring(this->cursor); } + this->cursor += 1; + uint16_t maxChars = meshtastic_Constants_DATA_PAYLOAD_LEN - (moduleConfig.canned_message.send_bell ? 1 : 0); if (this->freetext.length() > maxChars) { this->cursor = maxChars; @@ -457,6 +665,8 @@ int32_t CannedMessageModule::runOnce() } break; } + if (screen) + screen->removeFunctionSymbal("Fn"); } this->lastTouchMillis = millis(); @@ -495,7 +705,7 @@ const char *CannedMessageModule::getNodeName(NodeNum node) if (node == NODENUM_BROADCAST) { return "Broadcast"; } else { - meshtastic_NodeInfoLite *info = nodeDB.getMeshNode(node); + meshtastic_NodeInfoLite *info = nodeDB->getMeshNode(node); if (info != NULL) { return info->user.long_name; } else { @@ -509,9 +719,22 @@ bool CannedMessageModule::shouldDraw() if (!moduleConfig.canned_message.enabled && !CANNED_MESSAGE_MODULE_ENABLE) { return false; } + + // If using "scan and select" input, don't draw the module frame just to say "disabled" + // The scanAndSelectInput class will draw its own temporary alert for user, when the input button is pressed + else if (scanAndSelectInput != nullptr && !hasMessages()) + return false; + return (currentMessageIndex != -1) || (this->runState != CANNED_MESSAGE_RUN_STATE_INACTIVE); } +// Has the user defined any canned messages? +// Expose publicly whether canned message module is ready for use +bool CannedMessageModule::hasMessages() +{ + return (this->messagesCount > 0); +} + int CannedMessageModule::getNextIndex() { if (this->currentMessageIndex >= (this->messagesCount - 1)) { @@ -529,15 +752,247 @@ int CannedMessageModule::getPrevIndex() return this->currentMessageIndex - 1; } } +void CannedMessageModule::showTemporaryMessage(const String &message) +{ + temporaryMessage = message; + UIFrameEvent e; + e.action = UIFrameEvent::Action::REGENERATE_FRAMESET; // We want to change the list of frames shown on-screen + notifyObservers(&e); + runState = CANNED_MESSAGE_RUN_STATE_MESSAGE; + // run this loop again in 2 seconds, next iteration will clear the display + setIntervalFromNow(2000); +} + +#if defined(T_WATCH_S3) || defined(RAK14014) + +String CannedMessageModule::keyForCoordinates(uint x, uint y) +{ + int outerSize = *(&this->keyboard[this->charSet] + 1) - this->keyboard[this->charSet]; + + for (int8_t outerIndex = 0; outerIndex < outerSize; outerIndex++) { + int innerSize = *(&this->keyboard[this->charSet][outerIndex] + 1) - this->keyboard[this->charSet][outerIndex]; + + for (int8_t innerIndex = 0; innerIndex < innerSize; innerIndex++) { + Letter letter = this->keyboard[this->charSet][outerIndex][innerIndex]; + + if (x > letter.rectX && x < (letter.rectX + letter.rectWidth) && y > letter.rectY && + y < (letter.rectY + letter.rectHeight)) { + return letter.character; + } + } + } + + return ""; +} + +void CannedMessageModule::drawKeyboard(OLEDDisplay *display, OLEDDisplayUiState *state, int16_t x, int16_t y) +{ + int outerSize = *(&this->keyboard[this->charSet] + 1) - this->keyboard[this->charSet]; + + int xOffset = 0; + + int yOffset = 56; + + display->setTextAlignment(TEXT_ALIGN_LEFT); + + display->setFont(FONT_SMALL); + + display->setColor(OLEDDISPLAY_COLOR::WHITE); + + display->drawStringMaxWidth(0, 0, display->getWidth(), + cannedMessageModule->drawWithCursor(cannedMessageModule->freetext, cannedMessageModule->cursor)); + + display->setFont(FONT_MEDIUM); + + int cellHeight = round((display->height() - 64) / outerSize); + + int yCorrection = 8; + + for (int8_t outerIndex = 0; outerIndex < outerSize; outerIndex++) { + yOffset += outerIndex > 0 ? cellHeight : 0; + + int innerSizeBound = *(&this->keyboard[this->charSet][outerIndex] + 1) - this->keyboard[this->charSet][outerIndex]; + + int innerSize = 0; + + for (int8_t innerIndex = 0; innerIndex < innerSizeBound; innerIndex++) { + if (this->keyboard[this->charSet][outerIndex][innerIndex].character != "") { + innerSize++; + } + } + + int cellWidth = display->width() / innerSize; + + for (int8_t innerIndex = 0; innerIndex < innerSize; innerIndex++) { + xOffset += innerIndex > 0 ? cellWidth : 0; + + Letter letter = this->keyboard[this->charSet][outerIndex][innerIndex]; + + Letter updatedLetter = {letter.character, letter.width, xOffset, yOffset, cellWidth, cellHeight}; + + this->keyboard[this->charSet][outerIndex][innerIndex] = updatedLetter; + + float characterOffset = ((cellWidth / 2) - (letter.width / 2)); + + if (letter.character == "⇧") { + if (this->shift) { + display->fillRect(xOffset, yOffset, cellWidth, cellHeight); + + display->setColor(OLEDDISPLAY_COLOR::BLACK); + + drawShiftIcon(display, xOffset + characterOffset, yOffset + yCorrection + 5, 1.2); + + display->setColor(OLEDDISPLAY_COLOR::WHITE); + } else { + display->drawRect(xOffset, yOffset, cellWidth, cellHeight); + + drawShiftIcon(display, xOffset + characterOffset, yOffset + yCorrection + 5, 1.2); + } + } else if (letter.character == "⌫") { + if (this->highlight == letter.character[0]) { + display->fillRect(xOffset, yOffset, cellWidth, cellHeight); + + display->setColor(OLEDDISPLAY_COLOR::BLACK); + + drawBackspaceIcon(display, xOffset + characterOffset, yOffset + yCorrection + 5, 1.2); + + display->setColor(OLEDDISPLAY_COLOR::WHITE); + + setIntervalFromNow(0); + } else { + display->drawRect(xOffset, yOffset, cellWidth, cellHeight); + + drawBackspaceIcon(display, xOffset + characterOffset, yOffset + yCorrection + 5, 1.2); + } + } else if (letter.character == "↵") { + display->drawRect(xOffset, yOffset, cellWidth, cellHeight); + + drawEnterIcon(display, xOffset + characterOffset, yOffset + yCorrection + 5, 1.7); + } else { + if (this->highlight == letter.character[0]) { + display->fillRect(xOffset, yOffset, cellWidth, cellHeight); + + display->setColor(OLEDDISPLAY_COLOR::BLACK); + + display->drawString(xOffset + characterOffset, yOffset + yCorrection, + letter.character == " " ? "space" : letter.character); + + display->setColor(OLEDDISPLAY_COLOR::WHITE); + + setIntervalFromNow(0); + } else { + display->drawRect(xOffset, yOffset, cellWidth, cellHeight); + + display->drawString(xOffset + characterOffset, yOffset + yCorrection, + letter.character == " " ? "space" : letter.character); + } + } + } + + xOffset = 0; + } + + this->highlight = 0x00; +} + +void CannedMessageModule::drawShiftIcon(OLEDDisplay *display, int x, int y, float scale) +{ + PointStruct shiftIcon[10] = {{8, 0}, {15, 7}, {15, 8}, {12, 8}, {12, 12}, {4, 12}, {4, 8}, {1, 8}, {1, 7}, {8, 0}}; + + int size = 10; + + for (int i = 0; i < size - 1; i++) { + int x0 = x + (shiftIcon[i].x * scale); + int y0 = y + (shiftIcon[i].y * scale); + int x1 = x + (shiftIcon[i + 1].x * scale); + int y1 = y + (shiftIcon[i + 1].y * scale); + + display->drawLine(x0, y0, x1, y1); + } +} + +void CannedMessageModule::drawBackspaceIcon(OLEDDisplay *display, int x, int y, float scale) +{ + PointStruct backspaceIcon[6] = {{0, 7}, {5, 2}, {15, 2}, {15, 12}, {5, 12}, {0, 7}}; + + int size = 6; + + for (int i = 0; i < size - 1; i++) { + int x0 = x + (backspaceIcon[i].x * scale); + int y0 = y + (backspaceIcon[i].y * scale); + int x1 = x + (backspaceIcon[i + 1].x * scale); + int y1 = y + (backspaceIcon[i + 1].y * scale); + + display->drawLine(x0, y0, x1, y1); + } + + PointStruct backspaceIconX[4] = {{7, 4}, {13, 10}, {7, 10}, {13, 4}}; + + size = 4; + + for (int i = 0; i < size - 1; i++) { + int x0 = x + (backspaceIconX[i].x * scale); + int y0 = y + (backspaceIconX[i].y * scale); + int x1 = x + (backspaceIconX[i + 1].x * scale); + int y1 = y + (backspaceIconX[i + 1].y * scale); + + display->drawLine(x0, y0, x1, y1); + } +} + +void CannedMessageModule::drawEnterIcon(OLEDDisplay *display, int x, int y, float scale) +{ + PointStruct enterIcon[6] = {{0, 7}, {4, 3}, {4, 11}, {0, 7}, {15, 7}, {15, 0}}; + + int size = 6; + + for (int i = 0; i < size - 1; i++) { + int x0 = x + (enterIcon[i].x * scale); + int y0 = y + (enterIcon[i].y * scale); + int x1 = x + (enterIcon[i + 1].x * scale); + int y1 = y + (enterIcon[i + 1].y * scale); + + display->drawLine(x0, y0, x1, y1); + } +} + +#endif + +// Indicate to screen class that module is handling keyboard input specially (at certain times) +// This prevents the left & right keys being used for nav. between screen frames during text entry. +bool CannedMessageModule::interceptingKeyboardInput() +{ + switch (runState) { + case CANNED_MESSAGE_RUN_STATE_DISABLED: + case CANNED_MESSAGE_RUN_STATE_INACTIVE: + return false; + default: + return true; + } +} void CannedMessageModule::drawFrame(OLEDDisplay *display, OLEDDisplayUiState *state, int16_t x, int16_t y) { char buffer[50]; - if (cannedMessageModule->runState == CANNED_MESSAGE_RUN_STATE_ACK_NACK_RECEIVED) { + if (temporaryMessage.length() != 0) { + requestFocus(); // Tell Screen::setFrames to move to our module's frame + LOG_DEBUG("Drawing temporary message: %s", temporaryMessage.c_str()); display->setTextAlignment(TEXT_ALIGN_CENTER); display->setFont(FONT_MEDIUM); + display->drawString(display->getWidth() / 2 + x, 0 + y + 12, temporaryMessage); + } else if (cannedMessageModule->runState == CANNED_MESSAGE_RUN_STATE_ACK_NACK_RECEIVED) { + requestFocus(); // Tell Screen::setFrames to move to our module's frame + EINK_ADD_FRAMEFLAG(display, COSMETIC); // Clean after this popup. Layout makes ghosting particularly obvious + +#ifdef USE_EINK + display->setFont(FONT_SMALL); // No chunky text +#else + display->setFont(FONT_MEDIUM); // Chunky text +#endif + String displayString; + display->setTextAlignment(TEXT_ALIGN_CENTER); if (this->ack) { displayString = "Delivered to\n%s"; } else { @@ -545,15 +1000,54 @@ void CannedMessageModule::drawFrame(OLEDDisplay *display, OLEDDisplayUiState *st } display->drawStringf(display->getWidth() / 2 + x, 0 + y + 12, buffer, displayString, cannedMessageModule->getNodeName(this->incoming)); + + display->setFont(FONT_SMALL); + + String snrString = "Last Rx SNR: %f"; + String rssiString = "Last Rx RSSI: %d"; + + // Don't bother drawing snr and rssi for tiny displays + if (display->getHeight() > 100) { + + // Original implementation used constants of y = 100 and y = 130. Shrink this if screen is *slightly* small + int16_t snrY = 100; + int16_t rssiY = 130; + + // If dislay is *slighly* too small for the original consants, squish up a bit + if (display->getHeight() < rssiY + FONT_HEIGHT_SMALL) { + snrY = display->getHeight() - ((1.5) * FONT_HEIGHT_SMALL); + rssiY = display->getHeight() - ((2.5) * FONT_HEIGHT_SMALL); + } + + if (this->ack) { + display->drawStringf(display->getWidth() / 2 + x, snrY + y, buffer, snrString, this->lastRxSnr); + display->drawStringf(display->getWidth() / 2 + x, rssiY + y, buffer, rssiString, this->lastRxRssi); + } + } } else if (cannedMessageModule->runState == CANNED_MESSAGE_RUN_STATE_SENDING_ACTIVE) { + // E-Ink: clean the screen *after* this pop-up + EINK_ADD_FRAMEFLAG(display, COSMETIC); + + requestFocus(); // Tell Screen::setFrames to move to our module's frame + +#ifdef USE_EINK + display->setFont(FONT_SMALL); // No chunky text +#else + display->setFont(FONT_MEDIUM); // Chunky text +#endif + display->setTextAlignment(TEXT_ALIGN_CENTER); - display->setFont(FONT_MEDIUM); display->drawString(display->getWidth() / 2 + x, 0 + y + 12, "Sending..."); } else if (cannedMessageModule->runState == CANNED_MESSAGE_RUN_STATE_DISABLED) { display->setTextAlignment(TEXT_ALIGN_LEFT); display->setFont(FONT_SMALL); display->drawString(10 + x, 0 + y + FONT_HEIGHT_SMALL, "Canned Message\nModule disabled."); } else if (cannedMessageModule->runState == CANNED_MESSAGE_RUN_STATE_FREETEXT) { + requestFocus(); // Tell Screen::setFrames to move to our module's frame +#if defined(T_WATCH_S3) || defined(RAK14014) + drawKeyboard(display, state, 0, 0); +#else + display->setTextAlignment(TEXT_ALIGN_LEFT); display->setFont(FONT_SMALL); if (this->destSelect != CANNED_MESSAGE_DESTINATION_TYPE_NONE) { @@ -594,6 +1088,7 @@ void CannedMessageModule::drawFrame(OLEDDisplay *display, OLEDDisplayUiState *st display->drawStringMaxWidth( 0 + x, 0 + y + FONT_HEIGHT_SMALL, x + display->getWidth(), cannedMessageModule->drawWithCursor(cannedMessageModule->freetext, cannedMessageModule->cursor)); +#endif } else { if (this->messagesCount > 0) { display->setTextAlignment(TEXT_ALIGN_LEFT); @@ -613,11 +1108,18 @@ void CannedMessageModule::drawFrame(OLEDDisplay *display, OLEDDisplayUiState *st int topMsg = (messagesCount > lines && currentMessageIndex >= lines - 1) ? currentMessageIndex - lines + 2 : 0; for (int i = 0; i < std::min(messagesCount, lines); i++) { if (i == currentMessageIndex - topMsg) { +#ifdef USE_EINK + // Avoid drawing solid black with fillRect: harder to clear for E-Ink + display->drawString(0 + x, 0 + y + FONT_HEIGHT_SMALL * (i + 1), ">"); + display->drawString(12 + x, 0 + y + FONT_HEIGHT_SMALL * (i + 1), + cannedMessageModule->getCurrentMessage()); +#else display->fillRect(0 + x, 0 + y + FONT_HEIGHT_SMALL * (i + 1), x + display->getWidth(), y + FONT_HEIGHT_SMALL); display->setColor(BLACK); display->drawString(0 + x, 0 + y + FONT_HEIGHT_SMALL * (i + 1), cannedMessageModule->getCurrentMessage()); display->setColor(WHITE); +#endif } else { display->drawString(0 + x, 0 + y + FONT_HEIGHT_SMALL * (i + 1), cannedMessageModule->getMessageByIndex(topMsg + i)); @@ -630,16 +1132,18 @@ void CannedMessageModule::drawFrame(OLEDDisplay *display, OLEDDisplayUiState *st ProcessMessage CannedMessageModule::handleReceived(const meshtastic_MeshPacket &mp) { - if (mp.decoded.portnum == meshtastic_PortNum_ROUTING_APP) { + if (mp.decoded.portnum == meshtastic_PortNum_ROUTING_APP && waitingForAck) { // look for a request_id if (mp.decoded.request_id != 0) { - UIFrameEvent e = {false, true}; - e.frameChanged = true; + UIFrameEvent e; + e.action = UIFrameEvent::Action::REGENERATE_FRAMESET; // We want to change the list of frames shown on-screen + requestFocus(); // Tell Screen::setFrames that our module's frame should be shown, even if not "first" in the frameset this->runState = CANNED_MESSAGE_RUN_STATE_ACK_NACK_RECEIVED; - this->incoming = service.getNodenumFromRequestId(mp.decoded.request_id); + this->incoming = service->getNodenumFromRequestId(mp.decoded.request_id); meshtastic_Routing decoded = meshtastic_Routing_init_default; pb_decode_from_bytes(mp.decoded.payload.bytes, mp.decoded.payload.size, meshtastic_Routing_fields, &decoded); this->ack = decoded.error_reason == meshtastic_Routing_Error_NONE; + waitingForAck = false; // No longer want routing packets this->notifyObservers(&e); // run the next time 2 seconds later setIntervalFromNow(2000); @@ -651,13 +1155,12 @@ ProcessMessage CannedMessageModule::handleReceived(const meshtastic_MeshPacket & void CannedMessageModule::loadProtoForModule() { - if (!nodeDB.loadProto(cannedMessagesConfigFile, meshtastic_CannedMessageModuleConfig_size, + if (nodeDB->loadProto(cannedMessagesConfigFile, meshtastic_CannedMessageModuleConfig_size, sizeof(meshtastic_CannedMessageModuleConfig), &meshtastic_CannedMessageModuleConfig_msg, - &cannedMessageModuleConfig)) { + &cannedMessageModuleConfig) != LoadFileResult::LOAD_SUCCESS) { installDefaultCannedMessageModuleConfig(); } } - /** * @brief Save the module config to file. * @@ -672,8 +1175,8 @@ bool CannedMessageModule::saveProtoForModule() FS.mkdir("/prefs"); #endif - okay &= nodeDB.saveProto(cannedMessagesConfigFile, meshtastic_CannedMessageModuleConfig_size, - &meshtastic_CannedMessageModuleConfig_msg, &cannedMessageModuleConfig); + okay &= nodeDB->saveProto(cannedMessagesConfigFile, meshtastic_CannedMessageModuleConfig_size, + &meshtastic_CannedMessageModuleConfig_msg, &cannedMessageModuleConfig); return okay; } diff --git a/src/modules/CannedMessageModule.h b/src/modules/CannedMessageModule.h index 4802be078..e9dc2bda0 100644 --- a/src/modules/CannedMessageModule.h +++ b/src/modules/CannedMessageModule.h @@ -10,6 +10,7 @@ enum cannedMessageModuleRunState { CANNED_MESSAGE_RUN_STATE_FREETEXT, CANNED_MESSAGE_RUN_STATE_SENDING_ACTIVE, CANNED_MESSAGE_RUN_STATE_ACK_NACK_RECEIVED, + CANNED_MESSAGE_RUN_STATE_MESSAGE, CANNED_MESSAGE_RUN_STATE_ACTION_SELECT, CANNED_MESSAGE_RUN_STATE_ACTION_UP, CANNED_MESSAGE_RUN_STATE_ACTION_DOWN, @@ -21,6 +22,17 @@ enum cannedMessageDestinationType { CANNED_MESSAGE_DESTINATION_TYPE_CHANNEL }; +enum CannedMessageModuleIconType { shift, backspace, space, enter }; + +struct Letter { + String character; + float width; + int rectX; + int rectY; + int rectWidth; + int rectHeight; +}; + #define CANNED_MESSAGE_MODULE_MESSAGE_MAX_COUNT 50 /** * Sum of CannedMessageModuleConfig part sizes. @@ -44,6 +56,7 @@ class CannedMessageModule : public SinglePortModule, public Observablerx_rssi != 0) { + this->lastRxRssi = p->rx_rssi; + } + + if (p->rx_snr > 0) { + this->lastRxSnr = p->rx_snr; + } + switch (p->decoded.portnum) { - case meshtastic_PortNum_TEXT_MESSAGE_APP: case meshtastic_PortNum_ROUTING_APP: - return true; + return waitingForAck; default: return false; } @@ -76,10 +98,23 @@ class CannedMessageModule : public SinglePortModule, public ObservableshouldDraw(); } virtual Observable *getUIFrameObservable() override { return this; } virtual void drawFrame(OLEDDisplay *display, OLEDDisplayUiState *state, int16_t x, int16_t y) override; + virtual bool interceptingKeyboardInput() override; virtual AdminMessageHandleResult handleAdminMessageForModule(const meshtastic_MeshPacket &mp, meshtastic_AdminMessage *request, meshtastic_AdminMessage *response) override; @@ -106,12 +141,86 @@ class CannedMessageModule : public SinglePortModule, public Observable DetectionSensorModule *detectionSensorModule; #define GPIO_POLLING_INTERVAL 100 #define DELAYED_INTERVAL 1000 +typedef enum { + DetectionSensorVerdictDetected, + DetectionSensorVerdictSendState, + DetectionSensorVerdictNoop, +} DetectionSensorTriggerVerdict; + +typedef DetectionSensorTriggerVerdict (*DetectionSensorTriggerHandler)(bool prev, bool current); + +static DetectionSensorTriggerVerdict detection_trigger_logic_level(bool prev, bool current) +{ + return current ? DetectionSensorVerdictDetected : DetectionSensorVerdictNoop; +} + +static DetectionSensorTriggerVerdict detection_trigger_single_edge(bool prev, bool current) +{ + return (!prev && current) ? DetectionSensorVerdictDetected : DetectionSensorVerdictNoop; +} + +static DetectionSensorTriggerVerdict detection_trigger_either_edge(bool prev, bool current) +{ + if (prev == current) { + return DetectionSensorVerdictNoop; + } + return current ? DetectionSensorVerdictDetected : DetectionSensorVerdictSendState; +} + +const static DetectionSensorTriggerHandler handlers[_meshtastic_ModuleConfig_DetectionSensorConfig_TriggerType_MAX + 1] = { + [meshtastic_ModuleConfig_DetectionSensorConfig_TriggerType_LOGIC_LOW] = detection_trigger_logic_level, + [meshtastic_ModuleConfig_DetectionSensorConfig_TriggerType_LOGIC_HIGH] = detection_trigger_logic_level, + [meshtastic_ModuleConfig_DetectionSensorConfig_TriggerType_FALLING_EDGE] = detection_trigger_single_edge, + [meshtastic_ModuleConfig_DetectionSensorConfig_TriggerType_RISING_EDGE] = detection_trigger_single_edge, + [meshtastic_ModuleConfig_DetectionSensorConfig_TriggerType_EITHER_EDGE_ACTIVE_LOW] = detection_trigger_either_edge, + [meshtastic_ModuleConfig_DetectionSensorConfig_TriggerType_EITHER_EDGE_ACTIVE_HIGH] = detection_trigger_either_edge, +}; + int32_t DetectionSensorModule::runOnce() { /* @@ -21,7 +57,8 @@ int32_t DetectionSensorModule::runOnce() // moduleConfig.detection_sensor.monitor_pin = 21; // WisBlock RAK12013 Radar IO6 // moduleConfig.detection_sensor.minimum_broadcast_secs = 30; // moduleConfig.detection_sensor.state_broadcast_secs = 120; - // moduleConfig.detection_sensor.detection_triggered_high = true; + // moduleConfig.detection_sensor.detection_trigger_type = + // meshtastic_ModuleConfig_DetectionSensorConfig_TriggerType_LOGIC_HIGH; // strcpy(moduleConfig.detection_sensor.name, "Motion"); if (moduleConfig.detection_sensor.enabled == false) @@ -49,17 +86,31 @@ int32_t DetectionSensorModule::runOnce() // LOG_DEBUG("Detection Sensor Module: Current pin state: %i\n", digitalRead(moduleConfig.detection_sensor.monitor_pin)); - if ((millis() - lastSentToMesh) >= getConfiguredOrDefaultMs(moduleConfig.detection_sensor.minimum_broadcast_secs) && - hasDetectionEvent()) { - sendDetectionMessage(); - return DELAYED_INTERVAL; + if (!Throttle::isWithinTimespanMs(lastSentToMesh, + Default::getConfiguredOrDefaultMs(moduleConfig.detection_sensor.minimum_broadcast_secs))) { + bool isDetected = hasDetectionEvent(); + DetectionSensorTriggerVerdict verdict = + handlers[moduleConfig.detection_sensor.detection_trigger_type](wasDetected, isDetected); + wasDetected = isDetected; + switch (verdict) { + case DetectionSensorVerdictDetected: + sendDetectionMessage(); + return DELAYED_INTERVAL; + case DetectionSensorVerdictSendState: + sendCurrentStateMessage(isDetected); + return DELAYED_INTERVAL; + case DetectionSensorVerdictNoop: + break; + } } // Even if we haven't detected an event, broadcast our current state to the mesh on the scheduled interval as a sort // of heartbeat. We only do this if the minimum broadcast interval is greater than zero, otherwise we'll only broadcast state // change detections. - else if (moduleConfig.detection_sensor.state_broadcast_secs > 0 && - (millis() - lastSentToMesh) >= getConfiguredOrDefaultMs(moduleConfig.detection_sensor.state_broadcast_secs)) { - sendCurrentStateMessage(); + if (moduleConfig.detection_sensor.state_broadcast_secs > 0 && + !Throttle::isWithinTimespanMs(lastSentToMesh, + Default::getConfiguredOrDefaultMs(moduleConfig.detection_sensor.state_broadcast_secs, + default_telemetry_broadcast_interval_secs))) { + sendCurrentStateMessage(hasDetectionEvent()); return DELAYED_INTERVAL; } return GPIO_POLLING_INTERVAL; @@ -81,14 +132,14 @@ void DetectionSensorModule::sendDetectionMessage() } LOG_INFO("Sending message id=%d, dest=%x, msg=%.*s\n", p->id, p->to, p->decoded.payload.size, p->decoded.payload.bytes); lastSentToMesh = millis(); - service.sendToMesh(p); + service->sendToMesh(p); delete[] message; } -void DetectionSensorModule::sendCurrentStateMessage() +void DetectionSensorModule::sendCurrentStateMessage(bool state) { char *message = new char[40]; - sprintf(message, "%s state: %i", moduleConfig.detection_sensor.name, hasDetectionEvent()); + sprintf(message, "%s state: %i", moduleConfig.detection_sensor.name, state); meshtastic_MeshPacket *p = allocDataPacket(); p->want_ack = false; @@ -96,7 +147,7 @@ void DetectionSensorModule::sendCurrentStateMessage() memcpy(p->decoded.payload.bytes, message, p->decoded.payload.size); LOG_INFO("Sending message id=%d, dest=%x, msg=%.*s\n", p->id, p->to, p->decoded.payload.size, p->decoded.payload.bytes); lastSentToMesh = millis(); - service.sendToMesh(p); + service->sendToMesh(p); delete[] message; } @@ -104,5 +155,5 @@ bool DetectionSensorModule::hasDetectionEvent() { bool currentState = digitalRead(moduleConfig.detection_sensor.monitor_pin); // LOG_DEBUG("Detection Sensor Module: Current state: %i\n", currentState); - return moduleConfig.detection_sensor.detection_triggered_high ? currentState : !currentState; + return (moduleConfig.detection_sensor.detection_trigger_type & 1) ? currentState : !currentState; } \ No newline at end of file diff --git a/src/modules/DetectionSensorModule.h b/src/modules/DetectionSensorModule.h index ed6cddda5..b960c8744 100644 --- a/src/modules/DetectionSensorModule.h +++ b/src/modules/DetectionSensorModule.h @@ -15,8 +15,9 @@ class DetectionSensorModule : public SinglePortModule, private concurrency::OSTh private: bool firstTime = true; uint32_t lastSentToMesh = 0; + bool wasDetected = false; void sendDetectionMessage(); - void sendCurrentStateMessage(); + void sendCurrentStateMessage(bool state); bool hasDetectionEvent(); }; diff --git a/src/modules/DropzoneModule.cpp b/src/modules/DropzoneModule.cpp new file mode 100644 index 000000000..b1ca2af81 --- /dev/null +++ b/src/modules/DropzoneModule.cpp @@ -0,0 +1,95 @@ +#if !MESHTASTIC_EXCLUDE_DROPZONE + +#include "DropzoneModule.h" +#include "Meshservice->h" +#include "configuration.h" +#include "gps/GeoCoord.h" +#include "gps/RTC.h" +#include "main.h" + +#include + +#include "modules/Telemetry/Sensor/DFRobotLarkSensor.h" +#include "modules/Telemetry/UnitConversions.h" + +#include + +DropzoneModule *dropzoneModule; + +int32_t DropzoneModule::runOnce() +{ + // Send on a 5 second delay from receiving the matching request + if (startSendConditions != 0 && (startSendConditions + 5000U) < millis()) { + service->sendToMesh(sendConditions(), RX_SRC_LOCAL); + startSendConditions = 0; + } + // Run every second to check if we need to send conditions + return 1000; +} + +ProcessMessage DropzoneModule::handleReceived(const meshtastic_MeshPacket &mp) +{ + auto &p = mp.decoded; + char matchCompare[54]; + auto incomingMessage = reinterpret_cast(p.payload.bytes); + sprintf(matchCompare, "%s conditions", owner.short_name); + if (strncasecmp(incomingMessage, matchCompare, strlen(matchCompare)) == 0) { + LOG_DEBUG("Received dropzone conditions request\n"); + startSendConditions = millis(); + } + + sprintf(matchCompare, "%s conditions", owner.long_name); + if (strncasecmp(incomingMessage, matchCompare, strlen(matchCompare)) == 0) { + LOG_DEBUG("Received dropzone conditions request\n"); + startSendConditions = millis(); + } + return ProcessMessage::CONTINUE; +} + +meshtastic_MeshPacket *DropzoneModule::sendConditions() +{ + char replyStr[200]; + /* + CLOSED @ {HH:MM:SS}z + Wind 2 kts @ 125° + 29.25 inHg 72°C + */ + uint32_t rtc_sec = getValidTime(RTCQuality::RTCQualityDevice, true); + int hour = 0, min = 0, sec = 0; + if (rtc_sec > 0) { + long hms = rtc_sec % SEC_PER_DAY; + hms = (hms + SEC_PER_DAY) % SEC_PER_DAY; + + hour = hms / SEC_PER_HOUR; + min = (hms % SEC_PER_HOUR) / SEC_PER_MIN; + sec = (hms % SEC_PER_HOUR) % SEC_PER_MIN; + } + + // Check if the dropzone is open or closed by reading the analog pin + // If pin is connected to GND (below 100 should be lower than floating voltage), + // the dropzone is open + auto dropzoneStatus = analogRead(A1) < 100 ? "OPEN" : "CLOSED"; + auto reply = allocDataPacket(); + + auto node = nodeDB->getMeshNode(nodeDB->getNodeNum()); + if (sensor.hasSensor()) { + meshtastic_Telemetry telemetry = meshtastic_Telemetry_init_zero; + sensor.getMetrics(&telemetry); + auto windSpeed = UnitConversions::MetersPerSecondToKnots(telemetry.variant.environment_metrics.wind_speed); + auto windDirection = telemetry.variant.environment_metrics.wind_direction; + auto temp = telemetry.variant.environment_metrics.temperature; + auto baro = UnitConversions::HectoPascalToInchesOfMercury(telemetry.variant.environment_metrics.barometric_pressure); + sprintf(replyStr, "%s @ %02d:%02d:%02dz\nWind %.2f kts @ %d°\nBaro %.2f inHg %.2f°C", dropzoneStatus, hour, min, sec, + windSpeed, windDirection, baro, temp); + } else { + LOG_ERROR("No sensor found\n"); + sprintf(replyStr, "%s @ %02d:%02d:%02d\nNo sensor found", dropzoneStatus, hour, min, sec); + } + LOG_DEBUG("Conditions reply: %s\n", replyStr); + reply->decoded.payload.size = strlen(replyStr); // You must specify how many bytes are in the reply + memcpy(reply->decoded.payload.bytes, replyStr, reply->decoded.payload.size); + + return reply; +} + +#endif \ No newline at end of file diff --git a/src/modules/DropzoneModule.h b/src/modules/DropzoneModule.h new file mode 100644 index 000000000..28f54ee0f --- /dev/null +++ b/src/modules/DropzoneModule.h @@ -0,0 +1,37 @@ +#pragma once +#if !MESHTASTIC_EXCLUDE_DROPZONE +#include "SinglePortModule.h" +#include "modules/Telemetry/Sensor/DFRobotLarkSensor.h" + +/** + * An example module that replies to a message with the current conditions + * and status at the dropzone when it receives a text message mentioning it's name followed by "conditions" + */ +class DropzoneModule : public SinglePortModule, private concurrency::OSThread +{ + DFRobotLarkSensor sensor; + + public: + /** Constructor + * name is for debugging output + */ + DropzoneModule() : SinglePortModule("dropzone", meshtastic_PortNum_TEXT_MESSAGE_APP), concurrency::OSThread("DropzoneModule") + { + // Set up the analog pin for reading the dropzone status + pinMode(PIN_A1, INPUT); + } + + virtual int32_t runOnce() override; + + protected: + /** Called to handle a particular incoming message + */ + virtual ProcessMessage handleReceived(const meshtastic_MeshPacket &mp) override; + + private: + meshtastic_MeshPacket *sendConditions(); + uint32_t startSendConditions = 0; +}; + +extern DropzoneModule *dropzoneModule; +#endif \ No newline at end of file diff --git a/src/modules/ExternalNotificationModule.cpp b/src/modules/ExternalNotificationModule.cpp index 9af1f9e00..8abc386ec 100644 --- a/src/modules/ExternalNotificationModule.cpp +++ b/src/modules/ExternalNotificationModule.cpp @@ -26,7 +26,18 @@ #ifdef HAS_NCP5623 #include +#endif +#ifdef HAS_NEOPIXEL +#include +#endif + +#ifdef UNPHONE +#include "unPhone.h" +extern unPhone unphone; +#endif + +#if defined(HAS_NCP5623) || defined(RGBLED_RED) || defined(HAS_NEOPIXEL) || defined(UNPHONE) uint8_t red = 0; uint8_t green = 0; uint8_t blue = 0; @@ -81,7 +92,7 @@ int32_t ExternalNotificationModule::runOnce() // let the song finish if we reach timeout nagCycleCutoff = UINT32_MAX; LOG_INFO("Turning off external notification: "); - for (int i = 0; i < 2; i++) { + for (int i = 0; i < 3; i++) { setExternalOff(i); externalTurnedOn[i] = 0; LOG_INFO("%d ", i); @@ -108,27 +119,44 @@ int32_t ExternalNotificationModule::runOnce() millis()) { getExternal(2) ? setExternalOff(2) : setExternalOn(2); } +#if defined(HAS_NCP5623) || defined(RGBLED_RED) || defined(HAS_NEOPIXEL) || defined(UNPHONE) + red = (colorState & 4) ? brightnessValues[brightnessIndex] : 0; // Red enabled on colorState = 4,5,6,7 + green = (colorState & 2) ? brightnessValues[brightnessIndex] : 0; // Green enabled on colorState = 2,3,6,7 + blue = (colorState & 1) ? (brightnessValues[brightnessIndex] * 1.5) : 0; // Blue enabled on colorState = 1,3,5,7 #ifdef HAS_NCP5623 if (rgb_found.type == ScanI2C::NCP5623) { - red = (colorState & 4) ? brightnessValues[brightnessIndex] : 0; // Red enabled on colorState = 4,5,6,7 - green = (colorState & 2) ? brightnessValues[brightnessIndex] : 0; // Green enabled on colorState = 2,3,6,7 - blue = (colorState & 1) ? (brightnessValues[brightnessIndex] * 1.5) : 0; // Blue enabled on colorState = 1,3,5,7 rgb.setColor(red, green, blue); - - if (ascending) { // fade in - brightnessIndex++; - if (brightnessIndex == (sizeof(brightnessValues) - 1)) { - ascending = false; - } - } else { - brightnessIndex--; // fade out + } +#endif +#ifdef RGBLED_CA + analogWrite(RGBLED_RED, 255 - red); // CA type needs reverse logic + analogWrite(RGBLED_GREEN, 255 - green); + analogWrite(RGBLED_BLUE, 255 - blue); +#elif defined(RGBLED_RED) + analogWrite(RGBLED_RED, red); + analogWrite(RGBLED_GREEN, green); + analogWrite(RGBLED_BLUE, blue); +#endif +#ifdef HAS_NEOPIXEL + pixels.fill(pixels.Color(red, green, blue), 0, NEOPIXEL_COUNT); + pixels.show(); +#endif +#ifdef UNPHONE + unphone.rgb(red, green, blue); +#endif + if (ascending) { // fade in + brightnessIndex++; + if (brightnessIndex == (sizeof(brightnessValues) - 1)) { + ascending = false; } - if (brightnessIndex == 0) { - ascending = true; - colorState++; // next color - if (colorState > 7) { - colorState = 1; - } + } else { + brightnessIndex--; // fade out + } + if (brightnessIndex == 0) { + ascending = true; + colorState++; // next color + if (colorState > 7) { + colorState = 1; } } #endif @@ -179,6 +207,9 @@ void ExternalNotificationModule::setExternalOn(uint8_t index) switch (index) { case 1: +#ifdef UNPHONE + unphone.vibe(true); // the unPhone's vibration motor is on a i2c GPIO expander +#endif if (moduleConfig.external_notification.output_vibra) digitalWrite(moduleConfig.external_notification.output_vibra, true); break; @@ -197,6 +228,22 @@ void ExternalNotificationModule::setExternalOn(uint8_t index) rgb.setColor(red, green, blue); } #endif +#ifdef RGBLED_CA + analogWrite(RGBLED_RED, 255 - red); // CA type needs reverse logic + analogWrite(RGBLED_GREEN, 255 - green); + analogWrite(RGBLED_BLUE, 255 - blue); +#elif defined(RGBLED_RED) + analogWrite(RGBLED_RED, red); + analogWrite(RGBLED_GREEN, green); + analogWrite(RGBLED_BLUE, blue); +#endif +#ifdef HAS_NEOPIXEL + pixels.fill(pixels.Color(red, green, blue), 0, NEOPIXEL_COUNT); + pixels.show(); +#endif +#ifdef UNPHONE + unphone.rgb(red, green, blue); +#endif #ifdef T_WATCH_S3 drv.go(); #endif @@ -209,6 +256,9 @@ void ExternalNotificationModule::setExternalOff(uint8_t index) switch (index) { case 1: +#ifdef UNPHONE + unphone.vibe(false); // the unPhone's vibration motor is on a i2c GPIO expander +#endif if (moduleConfig.external_notification.output_vibra) digitalWrite(moduleConfig.external_notification.output_vibra, false); break; @@ -222,14 +272,33 @@ void ExternalNotificationModule::setExternalOff(uint8_t index) break; } +#if defined(HAS_NCP5623) || defined(RGBLED_RED) || defined(HAS_NEOPIXEL) || defined(UNPHONE) + red = 0; + green = 0; + blue = 0; #ifdef HAS_NCP5623 if (rgb_found.type == ScanI2C::NCP5623) { - red = 0; - green = 0; - blue = 0; rgb.setColor(red, green, blue); } #endif +#ifdef RGBLED_CA + analogWrite(RGBLED_RED, 255 - red); // CA type needs reverse logic + analogWrite(RGBLED_GREEN, 255 - green); + analogWrite(RGBLED_BLUE, 255 - blue); +#elif defined(RGBLED_RED) + analogWrite(RGBLED_RED, red); + analogWrite(RGBLED_GREEN, green); + analogWrite(RGBLED_BLUE, blue); +#endif +#ifdef HAS_NEOPIXEL + pixels.fill(pixels.Color(red, green, blue), 0, NEOPIXEL_COUNT); + pixels.show(); +#endif +#ifdef UNPHONE + unphone.rgb(red, green, blue); +#endif +#endif + #ifdef T_WATCH_S3 drv.stop(); #endif @@ -244,7 +313,8 @@ void ExternalNotificationModule::stopNow() { rtttl::stop(); #ifdef HAS_I2S - audioThread->stop(); + if (audioThread->isPlaying()) + audioThread->stop(); #endif nagCycleCutoff = 1; // small value isNagging = false; @@ -284,8 +354,8 @@ ExternalNotificationModule::ExternalNotificationModule() // moduleConfig.external_notification.alert_message_buzzer = true; if (moduleConfig.external_notification.enabled) { - if (!nodeDB.loadProto(rtttlConfigFile, meshtastic_RTTTLConfig_size, sizeof(meshtastic_RTTTLConfig), - &meshtastic_RTTTLConfig_msg, &rtttlConfig)) { + if (nodeDB->loadProto(rtttlConfigFile, meshtastic_RTTTLConfig_size, sizeof(meshtastic_RTTTLConfig), + &meshtastic_RTTTLConfig_msg, &rtttlConfig) != LoadFileResult::LOAD_SUCCESS) { memset(rtttlConfig.ringtone, 0, sizeof(rtttlConfig.ringtone)); strncpy(rtttlConfig.ringtone, "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", @@ -327,6 +397,21 @@ ExternalNotificationModule::ExternalNotificationModule() rgb.begin(); rgb.setCurrent(10); } +#endif +#ifdef RGBLED_RED + pinMode(RGBLED_RED, OUTPUT); // set up the RGB led pins + pinMode(RGBLED_GREEN, OUTPUT); + pinMode(RGBLED_BLUE, OUTPUT); +#endif +#ifdef RGBLED_CA + analogWrite(RGBLED_RED, 255); // with a common anode type, logic is reversed + analogWrite(RGBLED_GREEN, 255); // so we want to initialise with lights off + analogWrite(RGBLED_BLUE, 255); +#endif +#ifdef HAS_NEOPIXEL + pixels.begin(); // Initialise the pixel(s) + pixels.clear(); // Set all pixel colors to 'off' + pixels.setBrightness(moduleConfig.ambient_lighting.current); #endif } else { LOG_INFO("External Notification Module Disabled\n"); @@ -336,14 +421,14 @@ ExternalNotificationModule::ExternalNotificationModule() ProcessMessage ExternalNotificationModule::handleReceived(const meshtastic_MeshPacket &mp) { - if (moduleConfig.external_notification.enabled) { + if (moduleConfig.external_notification.enabled && !isMuted) { #ifdef T_WATCH_S3 drv.setWaveform(0, 75); drv.setWaveform(1, 56); drv.setWaveform(2, 0); drv.go(); #endif - if (getFrom(&mp) != nodeDB.getNodeNum()) { + if (!isFromUs(&mp)) { // Check if the message contains a bell character. Don't do this loop for every pin, just once. auto &p = mp.decoded; bool containsBell = false; @@ -445,7 +530,7 @@ ProcessMessage ExternalNotificationModule::handleReceived(const meshtastic_MeshP setIntervalFromNow(0); // run once so we know if we should do something } } else { - LOG_INFO("External Notification Module Disabled\n"); + LOG_INFO("External Notification Module Disabled or muted\n"); } return ProcessMessage::CONTINUE; // Let others look at this message also if they want @@ -506,6 +591,6 @@ void ExternalNotificationModule::handleSetRingtone(const char *from_msg) } if (changed) { - nodeDB.saveProto(rtttlConfigFile, meshtastic_RTTTLConfig_size, &meshtastic_RTTTLConfig_msg, &rtttlConfig); + nodeDB->saveProto(rtttlConfigFile, meshtastic_RTTTLConfig_size, &meshtastic_RTTTLConfig_msg, &rtttlConfig); } } \ No newline at end of file diff --git a/src/modules/ExternalNotificationModule.h b/src/modules/ExternalNotificationModule.h index 3331ec428..a5dff3651 100644 --- a/src/modules/ExternalNotificationModule.h +++ b/src/modules/ExternalNotificationModule.h @@ -3,7 +3,7 @@ #include "SinglePortModule.h" #include "concurrency/OSThread.h" #include "configuration.h" -#if !defined(ARCH_PORTDUINO) && !defined(ARCH_STM32WL) +#if !defined(ARCH_PORTDUINO) && !defined(ARCH_STM32WL) && !defined(CONFIG_IDF_TARGET_ESP32C6) #include #else // Noop class for portduino. @@ -38,6 +38,9 @@ class ExternalNotificationModule : public SinglePortModule, private concurrency: void setExternalOff(uint8_t index = 0); bool getExternal(uint8_t index = 0); + void setMute(bool mute) { isMuted = mute; } + bool getMute() { return isMuted; } + void stopNow(); void handleGetRingtone(const meshtastic_MeshPacket &req, meshtastic_AdminMessage *response); @@ -56,6 +59,8 @@ class ExternalNotificationModule : public SinglePortModule, private concurrency: bool isNagging = false; + bool isMuted = false; + virtual AdminMessageHandleResult handleAdminMessageForModule(const meshtastic_MeshPacket &mp, meshtastic_AdminMessage *request, meshtastic_AdminMessage *response) override; diff --git a/src/modules/Modules.cpp b/src/modules/Modules.cpp index fd109b765..ad3f0ace4 100644 --- a/src/modules/Modules.cpp +++ b/src/modules/Modules.cpp @@ -1,74 +1,147 @@ #include "configuration.h" +#if !MESHTASTIC_EXCLUDE_INPUTBROKER +#include "input/ExpressLRSFiveWay.h" #include "input/InputBroker.h" #include "input/RotaryEncoderInterruptImpl1.h" +#include "input/ScanAndSelect.h" +#include "input/SerialKeyboardImpl.h" #include "input/TrackballInterruptImpl1.h" #include "input/UpDownInterruptImpl1.h" #include "input/cardKbI2cImpl.h" #include "input/kbMatrixImpl.h" +#endif +#if !MESHTASTIC_EXCLUDE_ADMIN #include "modules/AdminModule.h" +#endif +#if !MESHTASTIC_EXCLUDE_ATAK #include "modules/AtakPluginModule.h" +#endif +#if !MESHTASTIC_EXCLUDE_CANNEDMESSAGES #include "modules/CannedMessageModule.h" +#endif +#if !MESHTASTIC_EXCLUDE_DETECTIONSENSOR #include "modules/DetectionSensorModule.h" +#endif +#if !MESHTASTIC_EXCLUDE_NEIGHBORINFO #include "modules/NeighborInfoModule.h" +#endif +#if !MESHTASTIC_EXCLUDE_NODEINFO #include "modules/NodeInfoModule.h" +#endif +#if !MESHTASTIC_EXCLUDE_GPS #include "modules/PositionModule.h" +#endif +#if !MESHTASTIC_EXCLUDE_REMOTEHARDWARE #include "modules/RemoteHardwareModule.h" -#include "modules/ReplyModule.h" +#endif +#if !MESHTASTIC_EXCLUDE_POWERSTRESS +#include "modules/PowerStressModule.h" +#endif #include "modules/RoutingModule.h" #include "modules/TextMessageModule.h" +#if !MESHTASTIC_EXCLUDE_TRACEROUTE #include "modules/TraceRouteModule.h" +#endif +#if !MESHTASTIC_EXCLUDE_WAYPOINT #include "modules/WaypointModule.h" +#endif #if ARCH_PORTDUINO #include "input/LinuxInputImpl.h" +#if !MESHTASTIC_EXCLUDE_STOREFORWARD +#include "modules/StoreForwardModule.h" +#endif #endif #if HAS_TELEMETRY #include "modules/Telemetry/DeviceTelemetry.h" #endif -#if HAS_SENSOR +#if HAS_SENSOR && !MESHTASTIC_EXCLUDE_ENVIRONMENTAL_SENSOR +#include "main.h" #include "modules/Telemetry/AirQualityTelemetry.h" #include "modules/Telemetry/EnvironmentTelemetry.h" +#include "modules/Telemetry/HealthTelemetry.h" #endif -#if HAS_TELEMETRY && !defined(ARCH_PORTDUINO) +#if HAS_TELEMETRY && !MESHTASTIC_EXCLUDE_POWER_TELEMETRY #include "modules/Telemetry/PowerTelemetry.h" #endif #ifdef ARCH_ESP32 -#ifdef USE_SX1280 +#if defined(USE_SX1280) && !MESHTASTIC_EXCLUDE_AUDIO #include "modules/esp32/AudioModule.h" #endif +#if !MESHTASTIC_EXCLUDE_PAXCOUNTER #include "modules/esp32/PaxcounterModule.h" -#include "modules/esp32/StoreForwardModule.h" +#endif +#if !MESHTASTIC_EXCLUDE_STOREFORWARD +#include "modules/StoreForwardModule.h" +#endif #endif #if defined(ARCH_ESP32) || defined(ARCH_NRF52) || defined(ARCH_RP2040) +#if !MESHTASTIC_EXCLUDE_EXTERNALNOTIFICATION #include "modules/ExternalNotificationModule.h" +#endif +#if !MESHTASTIC_EXCLUDE_RANGETEST && !MESHTASTIC_EXCLUDE_GPS #include "modules/RangeTestModule.h" -#if (defined(ARCH_ESP32) || defined(ARCH_NRF52) || defined(ARCH_RP2040)) && !defined(CONFIG_IDF_TARGET_ESP32S2) +#endif +#if !defined(CONFIG_IDF_TARGET_ESP32S2) && !MESHTASTIC_EXCLUDE_SERIAL #include "modules/SerialModule.h" #endif #endif + +#if !MESHTASTIC_EXCLUDE_DROPZONE +#include "modules/DropzoneModule.h" +#endif + /** * Create module instances here. If you are adding a new module, you must 'new' it here (or somewhere else) */ void setupModules() { if (config.device.role != meshtastic_Config_DeviceConfig_Role_REPEATER) { -#if HAS_BUTTON || ARCH_PORTDUINO +#if (HAS_BUTTON || ARCH_PORTDUINO) && !MESHTASTIC_EXCLUDE_INPUTBROKER inputBroker = new InputBroker(); #endif +#if !MESHTASTIC_EXCLUDE_ADMIN adminModule = new AdminModule(); +#endif +#if !MESHTASTIC_EXCLUDE_NODEINFO nodeInfoModule = new NodeInfoModule(); +#endif +#if !MESHTASTIC_EXCLUDE_GPS positionModule = new PositionModule(); +#endif +#if !MESHTASTIC_EXCLUDE_WAYPOINT waypointModule = new WaypointModule(); +#endif +#if !MESHTASTIC_EXCLUDE_TEXTMESSAGE textMessageModule = new TextMessageModule(); +#endif +#if !MESHTASTIC_EXCLUDE_TRACEROUTE traceRouteModule = new TraceRouteModule(); +#endif +#if !MESHTASTIC_EXCLUDE_NEIGHBORINFO neighborInfoModule = new NeighborInfoModule(); +#endif +#if !MESHTASTIC_EXCLUDE_DETECTIONSENSOR detectionSensorModule = new DetectionSensorModule(); +#endif +#if !MESHTASTIC_EXCLUDE_ATAK atakPluginModule = new AtakPluginModule(); +#endif + +#if !MESHTASTIC_EXCLUDE_DROPZONE + dropzoneModule = new DropzoneModule(); +#endif // Note: if the rest of meshtastic doesn't need to explicitly use your module, you do not need to assign the instance // to a global variable. +#if !MESHTASTIC_EXCLUDE_REMOTEHARDWARE new RemoteHardwareModule(); - new ReplyModule(); -#if HAS_BUTTON || ARCH_PORTDUINO +#endif +#if !MESHTASTIC_EXCLUDE_POWERSTRESS + new PowerStressModule(); +#endif + // Example: Put your module here + // new ReplyModule(); +#if (HAS_BUTTON || ARCH_PORTDUINO) && !MESHTASTIC_EXCLUDE_INPUTBROKER rotaryEncoderInterruptImpl1 = new RotaryEncoderInterruptImpl1(); if (!rotaryEncoderInterruptImpl1->init()) { delete rotaryEncoderInterruptImpl1; @@ -79,58 +152,95 @@ void setupModules() delete upDownInterruptImpl1; upDownInterruptImpl1 = nullptr; } + +#if HAS_SCREEN + // In order to have the user button dismiss the canned message frame, this class lightly interacts with the Screen class + scanAndSelectInput = new ScanAndSelectInput(); + if (!scanAndSelectInput->init()) { + delete scanAndSelectInput; + scanAndSelectInput = nullptr; + } +#endif + cardKbI2cImpl = new CardKbI2cImpl(); cardKbI2cImpl->init(); #ifdef INPUTBROKER_MATRIX_TYPE kbMatrixImpl = new KbMatrixImpl(); kbMatrixImpl->init(); #endif // INPUTBROKER_MATRIX_TYPE +#ifdef INPUTBROKER_SERIAL_TYPE + aSerialKeyboardImpl = new SerialKeyboardImpl(); + aSerialKeyboardImpl->init(); +#endif // INPUTBROKER_MATRIX_TYPE #endif // HAS_BUTTON #if ARCH_PORTDUINO aLinuxInputImpl = new LinuxInputImpl(); aLinuxInputImpl->init(); #endif -#if HAS_TRACKBALL +#if HAS_TRACKBALL && !MESHTASTIC_EXCLUDE_INPUTBROKER trackballInterruptImpl1 = new TrackballInterruptImpl1(); trackballInterruptImpl1->init(); #endif -#if HAS_SCREEN +#ifdef INPUTBROKER_EXPRESSLRSFIVEWAY_TYPE + expressLRSFiveWayInput = new ExpressLRSFiveWay(); +#endif +#if HAS_SCREEN && !MESHTASTIC_EXCLUDE_CANNEDMESSAGES cannedMessageModule = new CannedMessageModule(); #endif #if HAS_TELEMETRY new DeviceTelemetryModule(); #endif -#if HAS_SENSOR +#if HAS_SENSOR && !MESHTASTIC_EXCLUDE_ENVIRONMENTAL_SENSOR new EnvironmentTelemetryModule(); if (nodeTelemetrySensorsMap[meshtastic_TelemetrySensorType_PMSA003I].first > 0) { new AirQualityTelemetryModule(); } + if (nodeTelemetrySensorsMap[meshtastic_TelemetrySensorType_MAX30102].first > 0 || + nodeTelemetrySensorsMap[meshtastic_TelemetrySensorType_MLX90614].first > 0) { + new HealthTelemetryModule(); + } #endif -#if HAS_TELEMETRY && !defined(ARCH_PORTDUINO) +#if HAS_TELEMETRY && !MESHTASTIC_EXCLUDE_POWER_TELEMETRY && !MESHTASTIC_EXCLUDE_ENVIRONMENTAL_SENSOR new PowerTelemetryModule(); #endif #if (defined(ARCH_ESP32) || defined(ARCH_NRF52) || defined(ARCH_RP2040)) && !defined(CONFIG_IDF_TARGET_ESP32S2) && \ !defined(CONFIG_IDF_TARGET_ESP32C3) +#if !MESHTASTIC_EXCLUDE_SERIAL new SerialModule(); #endif +#endif #ifdef ARCH_ESP32 // Only run on an esp32 based device. -#ifdef USE_SX1280 +#if defined(USE_SX1280) && !MESHTASTIC_EXCLUDE_AUDIO audioModule = new AudioModule(); #endif - storeForwardModule = new StoreForwardModule(); +#if !MESHTASTIC_EXCLUDE_PAXCOUNTER paxcounterModule = new PaxcounterModule(); #endif +#endif +#if defined(ARCH_ESP32) || defined(ARCH_PORTDUINO) +#if !MESHTASTIC_EXCLUDE_STOREFORWARD + storeForwardModule = new StoreForwardModule(); +#endif +#endif #if defined(ARCH_ESP32) || defined(ARCH_NRF52) || defined(ARCH_RP2040) +#if !MESHTASTIC_EXCLUDE_EXTERNALNOTIFICATION externalNotificationModule = new ExternalNotificationModule(); +#endif +#if !MESHTASTIC_EXCLUDE_RANGETEST && !MESHTASTIC_EXCLUDE_GPS new RangeTestModule(); +#endif #endif } else { +#if !MESHTASTIC_EXCLUDE_ADMIN adminModule = new AdminModule(); +#endif #if HAS_TELEMETRY new DeviceTelemetryModule(); #endif +#if !MESHTASTIC_EXCLUDE_TRACEROUTE traceRouteModule = new TraceRouteModule(); +#endif } // NOTE! This module must be added LAST because it likes to check for replies from other modules and avoid sending extra // acks diff --git a/src/modules/NeighborInfoModule.cpp b/src/modules/NeighborInfoModule.cpp index 4541958fa..e4c9b44bd 100644 --- a/src/modules/NeighborInfoModule.cpp +++ b/src/modules/NeighborInfoModule.cpp @@ -1,13 +1,12 @@ #include "NeighborInfoModule.h" +#include "Default.h" #include "MeshService.h" #include "NodeDB.h" #include "RTC.h" +#include -#define MAX_NUM_NEIGHBORS 10 // also defined in NeighborInfo protobuf options NeighborInfoModule *neighborInfoModule; -static const char *neighborInfoConfigFile = "/prefs/neighbors.proto"; - /* Prints a single neighbor info packet and associated neighbors Uses LOG_DEBUG, which equates to Console.log @@ -16,87 +15,37 @@ NOTE: For debugging only void NeighborInfoModule::printNeighborInfo(const char *header, const meshtastic_NeighborInfo *np) { LOG_DEBUG("%s NEIGHBORINFO PACKET from Node 0x%x to Node 0x%x (last sent by 0x%x)\n", header, np->node_id, - nodeDB.getNodeNum(), np->last_sent_by_id); - LOG_DEBUG("----------------\n"); + nodeDB->getNodeNum(), np->last_sent_by_id); LOG_DEBUG("Packet contains %d neighbors\n", np->neighbors_count); for (int i = 0; i < np->neighbors_count; i++) { LOG_DEBUG("Neighbor %d: node_id=0x%x, snr=%.2f\n", i, np->neighbors[i].node_id, np->neighbors[i].snr); } - LOG_DEBUG("----------------\n"); -} -/* -Prints the nodeDB nodes so we can see whose nodeInfo we have -NOTE: for debugging only -*/ -void NeighborInfoModule::printNodeDBNodes(const char *header) -{ - int num_nodes = nodeDB.getNumMeshNodes(); - LOG_DEBUG("%s NODEDB SELECTION from Node 0x%x:\n", header, nodeDB.getNodeNum()); - LOG_DEBUG("----------------\n"); - LOG_DEBUG("DB contains %d nodes\n", num_nodes); - for (int i = 0; i < num_nodes; i++) { - const meshtastic_NodeInfoLite *dbEntry = nodeDB.getMeshNodeByIndex(i); - LOG_DEBUG(" Node %d: node_id=0x%x, snr=%.2f\n", i, dbEntry->num, dbEntry->snr); - } - LOG_DEBUG("----------------\n"); } /* Prints the nodeDB neighbors NOTE: for debugging only */ -void NeighborInfoModule::printNodeDBNeighbors(const char *header) +void NeighborInfoModule::printNodeDBNeighbors() { - int num_neighbors = getNumNeighbors(); - LOG_DEBUG("%s NODEDB SELECTION from Node 0x%x:\n", header, nodeDB.getNodeNum()); - LOG_DEBUG("----------------\n"); - LOG_DEBUG("DB contains %d neighbors\n", num_neighbors); - for (int i = 0; i < num_neighbors; i++) { - const meshtastic_Neighbor *dbEntry = getNeighborByIndex(i); - LOG_DEBUG(" Node %d: node_id=0x%x, snr=%.2f\n", i, dbEntry->node_id, dbEntry->snr); + LOG_DEBUG("Our NodeDB contains %d neighbors\n", neighbors.size()); + for (size_t i = 0; i < neighbors.size(); i++) { + LOG_DEBUG("Node %d: node_id=0x%x, snr=%.2f\n", i, neighbors[i].node_id, neighbors[i].snr); } - LOG_DEBUG("----------------\n"); -} - -/* -Prints the nodeDB with selectors for the neighbors we've chosen to send (inefficiently) -Uses LOG_DEBUG, which equates to Console.log -NOTE: For debugging only -*/ -void NeighborInfoModule::printNodeDBSelection(const char *header, const meshtastic_NeighborInfo *np) -{ - int num_neighbors = getNumNeighbors(); - LOG_DEBUG("%s NODEDB SELECTION from Node 0x%x:\n", header, nodeDB.getNodeNum()); - LOG_DEBUG("----------------\n"); - LOG_DEBUG("Selected %d neighbors of %d DB neighbors\n", np->neighbors_count, num_neighbors); - for (int i = 0; i < num_neighbors; i++) { - meshtastic_Neighbor *dbEntry = getNeighborByIndex(i); - bool chosen = false; - for (int j = 0; j < np->neighbors_count; j++) { - if (np->neighbors[j].node_id == dbEntry->node_id) { - chosen = true; - } - } - if (!chosen) { - LOG_DEBUG(" Node %d: neighbor=0x%x, snr=%.2f\n", i, dbEntry->node_id, dbEntry->snr); - } else { - LOG_DEBUG("---> Node %d: neighbor=0x%x, snr=%.2f\n", i, dbEntry->node_id, dbEntry->snr); - } - } - LOG_DEBUG("----------------\n"); } /* Send our initial owner announcement 35 seconds after we start (to give network time to setup) */ NeighborInfoModule::NeighborInfoModule() : ProtobufModule("neighborinfo", meshtastic_PortNum_NEIGHBORINFO_APP, &meshtastic_NeighborInfo_msg), - concurrency::OSThread("NeighborInfoModule"), neighbors(neighborState.neighbors), - numNeighbors(&neighborState.neighbors_count) + concurrency::OSThread("NeighborInfoModule") { ourPortNum = meshtastic_PortNum_NEIGHBORINFO_APP; + nodeStatusObserver.observe(&nodeStatus->onNewStatus); if (moduleConfig.neighbor_info.enabled) { - this->loadProtoForModule(); - setIntervalFromNow(35 * 1000); + isPromiscuous = true; // Update neighbors from all packets + setIntervalFromNow(Default::getConfiguredOrDefaultMs(moduleConfig.neighbor_info.update_interval, + default_telemetry_broadcast_interval_secs)); } else { LOG_DEBUG("NeighborInfoModule is disabled\n"); disable(); @@ -110,65 +59,45 @@ Assumes that the neighborInfo packet has been allocated */ uint32_t NeighborInfoModule::collectNeighborInfo(meshtastic_NeighborInfo *neighborInfo) { - uint my_node_id = nodeDB.getNodeNum(); + NodeNum my_node_id = nodeDB->getNodeNum(); neighborInfo->node_id = my_node_id; neighborInfo->last_sent_by_id = my_node_id; - neighborInfo->node_broadcast_interval_secs = moduleConfig.neighbor_info.update_interval; + neighborInfo->node_broadcast_interval_secs = + Default::getConfiguredOrDefault(moduleConfig.neighbor_info.update_interval, default_telemetry_broadcast_interval_secs); - int num_neighbors = cleanUpNeighbors(); + cleanUpNeighbors(); - for (int i = 0; i < num_neighbors; i++) { - const meshtastic_Neighbor *dbEntry = getNeighborByIndex(i); - if ((neighborInfo->neighbors_count < MAX_NUM_NEIGHBORS) && (dbEntry->node_id != my_node_id)) { - neighborInfo->neighbors[neighborInfo->neighbors_count].node_id = dbEntry->node_id; - neighborInfo->neighbors[neighborInfo->neighbors_count].snr = dbEntry->snr; + for (auto nbr : neighbors) { + if ((neighborInfo->neighbors_count < MAX_NUM_NEIGHBORS) && (nbr.node_id != my_node_id)) { + neighborInfo->neighbors[neighborInfo->neighbors_count].node_id = nbr.node_id; + neighborInfo->neighbors[neighborInfo->neighbors_count].snr = nbr.snr; // Note: we don't set the last_rx_time and node_broadcast_intervals_secs here, because we don't want to send this over // the mesh neighborInfo->neighbors_count++; } } - printNodeDBNodes("DBSTATE"); - printNodeDBNeighbors("NEIGHBORS"); - printNodeDBSelection("COLLECTED", neighborInfo); + printNodeDBNeighbors(); return neighborInfo->neighbors_count; } /* -Remove neighbors from the database that we haven't heard from in a while -@returns new number of neighbors + Remove neighbors from the database that we haven't heard from in a while */ -size_t NeighborInfoModule::cleanUpNeighbors() +void NeighborInfoModule::cleanUpNeighbors() { uint32_t now = getTime(); - int num_neighbors = getNumNeighbors(); - NodeNum my_node_id = nodeDB.getNodeNum(); - - // Find neighbors to remove - std::vector indices_to_remove; - for (int i = 0; i < num_neighbors; i++) { - const meshtastic_Neighbor *dbEntry = getNeighborByIndex(i); + NodeNum my_node_id = nodeDB->getNodeNum(); + for (auto it = neighbors.rbegin(); it != neighbors.rend();) { // We will remove a neighbor if we haven't heard from them in twice the broadcast interval - if ((now - dbEntry->last_rx_time > dbEntry->node_broadcast_interval_secs * 2) && (dbEntry->node_id != my_node_id)) { - indices_to_remove.push_back(i); + // cannot use isWithinTimespanMs() as it->last_rx_time is seconds since 1970 + if ((now - it->last_rx_time > it->node_broadcast_interval_secs * 2) && (it->node_id != my_node_id)) { + LOG_DEBUG("Removing neighbor with node ID 0x%x\n", it->node_id); + it = std::vector::reverse_iterator( + neighbors.erase(std::next(it).base())); // Erase the element and update the iterator + } else { + ++it; } } - - // Update the neighbor list - for (uint i = 0; i < indices_to_remove.size(); i++) { - int index = indices_to_remove[i]; - LOG_DEBUG("Removing neighbor with node ID 0x%x\n", neighbors[index].node_id); - for (int j = index; j < num_neighbors - 1; j++) { - neighbors[j] = neighbors[j + 1]; - } - (*numNeighbors)--; - } - - // Save the neighbor list if we removed any neighbors - if (indices_to_remove.size() > 0) { - saveProtoForModule(); - } - - return *numNeighbors; } /* Send neighbor info to the mesh */ @@ -181,8 +110,9 @@ void NeighborInfoModule::sendNeighborInfo(NodeNum dest, bool wantReplies) // because we want to get neighbors for the next cycle p->to = dest; p->decoded.want_response = wantReplies; + p->priority = meshtastic_MeshPacket_Priority_BACKGROUND; printNeighborInfo("SENDING", &neighborInfo); - service.sendToMesh(p, RX_SRC_LOCAL, true); + service->sendToMesh(p, RX_SRC_LOCAL, true); } /* @@ -191,9 +121,10 @@ Will be used for broadcast. */ int32_t NeighborInfoModule::runOnce() { - bool requestReplies = false; - sendNeighborInfo(NODENUM_BROADCAST, requestReplies); - return getConfiguredOrDefaultMs(moduleConfig.neighbor_info.update_interval, default_broadcast_interval_secs); + if (airTime->isTxAllowedChannelUtil(true) && airTime->isTxAllowedAirUtil()) { + sendNeighborInfo(NODENUM_BROADCAST, false); + } + return Default::getConfiguredOrDefaultMs(moduleConfig.neighbor_info.update_interval, default_neighbor_info_broadcast_secs); } /* @@ -202,9 +133,12 @@ Pass it to an upper client; do not persist this data on the mesh */ bool NeighborInfoModule::handleReceivedProtobuf(const meshtastic_MeshPacket &mp, meshtastic_NeighborInfo *np) { - if (enabled) { + if (np) { printNeighborInfo("RECEIVED", np); updateNeighbors(mp, np); + } else if (mp.hop_start != 0 && mp.hop_start == mp.hop_limit) { + // If the hopLimit is the same as hopStart, then it is a neighbor + getOrCreateNeighbor(mp.from, mp.from, 0, mp.rx_snr); // Set the broadcast interval to 0, as we don't know it } // Allow others to handle this packet return false; @@ -213,28 +147,18 @@ bool NeighborInfoModule::handleReceivedProtobuf(const meshtastic_MeshPacket &mp, /* Copy the content of a current NeighborInfo packet into a new one and update the last_sent_by_id to our NodeNum */ -void NeighborInfoModule::updateLastSentById(meshtastic_MeshPacket *p) +void NeighborInfoModule::alterReceivedProtobuf(meshtastic_MeshPacket &p, meshtastic_NeighborInfo *n) { - auto &incoming = p->decoded; - meshtastic_NeighborInfo scratch; - meshtastic_NeighborInfo *updated = NULL; - memset(&scratch, 0, sizeof(scratch)); - pb_decode_from_bytes(incoming.payload.bytes, incoming.payload.size, &meshtastic_NeighborInfo_msg, &scratch); - updated = &scratch; - - updated->last_sent_by_id = nodeDB.getNodeNum(); + n->last_sent_by_id = nodeDB->getNodeNum(); // Set updated last_sent_by_id to the payload of the to be flooded packet - p->decoded.payload.size = - pb_encode_to_bytes(p->decoded.payload.bytes, sizeof(p->decoded.payload.bytes), &meshtastic_NeighborInfo_msg, updated); + p.decoded.payload.size = + pb_encode_to_bytes(p.decoded.payload.bytes, sizeof(p.decoded.payload.bytes), &meshtastic_NeighborInfo_msg, n); } void NeighborInfoModule::resetNeighbors() { - *numNeighbors = 0; - neighborState.neighbors_count = 0; - memset(neighborState.neighbors, 0, sizeof(neighborState.neighbors)); - saveProtoForModule(); + neighbors.clear(); } void NeighborInfoModule::updateNeighbors(const meshtastic_MeshPacket &mp, const meshtastic_NeighborInfo *np) @@ -251,61 +175,39 @@ meshtastic_Neighbor *NeighborInfoModule::getOrCreateNeighbor(NodeNum originalSen { // our node and the phone are the same node (not neighbors) if (n == 0) { - n = nodeDB.getNodeNum(); + n = nodeDB->getNodeNum(); } // look for one in the existing list - for (int i = 0; i < (*numNeighbors); i++) { - meshtastic_Neighbor *nbr = &neighbors[i]; - if (nbr->node_id == n) { + for (size_t i = 0; i < neighbors.size(); i++) { + if (neighbors[i].node_id == n) { // if found, update it - nbr->snr = snr; - nbr->last_rx_time = getTime(); + neighbors[i].snr = snr; + neighbors[i].last_rx_time = getTime(); // Only if this is the original sender, the broadcast interval corresponds to it - if (originalSender == n) - nbr->node_broadcast_interval_secs = node_broadcast_interval_secs; - saveProtoForModule(); // Save the updated neighbor - return nbr; + if (originalSender == n && node_broadcast_interval_secs != 0) + neighbors[i].node_broadcast_interval_secs = node_broadcast_interval_secs; + return &neighbors[i]; } } // otherwise, allocate one and assign data to it - // TODO: max memory for the database should take neighbors into account, but currently doesn't - if (*numNeighbors < MAX_NUM_NEIGHBORS) { - (*numNeighbors)++; - } - meshtastic_Neighbor *new_nbr = &neighbors[((*numNeighbors) - 1)]; - new_nbr->node_id = n; - new_nbr->snr = snr; - new_nbr->last_rx_time = getTime(); + + meshtastic_Neighbor new_nbr = meshtastic_Neighbor_init_zero; + new_nbr.node_id = n; + new_nbr.snr = snr; + new_nbr.last_rx_time = getTime(); // Only if this is the original sender, the broadcast interval corresponds to it - if (originalSender == n) - new_nbr->node_broadcast_interval_secs = node_broadcast_interval_secs; - saveProtoForModule(); // Save the new neighbor - return new_nbr; -} + if (originalSender == n && node_broadcast_interval_secs != 0) + new_nbr.node_broadcast_interval_secs = node_broadcast_interval_secs; + else // Assume the same broadcast interval as us for the neighbor if we don't know it + new_nbr.node_broadcast_interval_secs = moduleConfig.neighbor_info.update_interval; -void NeighborInfoModule::loadProtoForModule() -{ - if (!nodeDB.loadProto(neighborInfoConfigFile, meshtastic_NeighborInfo_size, sizeof(meshtastic_NeighborInfo), - &meshtastic_NeighborInfo_msg, &neighborState)) { - neighborState = meshtastic_NeighborInfo_init_zero; + if (neighbors.size() < MAX_NUM_NEIGHBORS) { + neighbors.push_back(new_nbr); + } else { + // If we have too many neighbors, replace the oldest one + LOG_WARN("Neighbor DB is full, replacing oldest neighbor\n"); + neighbors.erase(neighbors.begin()); + neighbors.push_back(new_nbr); } -} - -/** - * @brief Save the module config to file. - * - * @return true On success. - * @return false On error. - */ -bool NeighborInfoModule::saveProtoForModule() -{ - bool okay = true; - -#ifdef FS - FS.mkdir("/prefs"); -#endif - - okay &= nodeDB.saveProto(neighborInfoConfigFile, meshtastic_NeighborInfo_size, &meshtastic_NeighborInfo_msg, &neighborState); - - return okay; + return &neighbors.back(); } \ No newline at end of file diff --git a/src/modules/NeighborInfoModule.h b/src/modules/NeighborInfoModule.h index 0e3ec09ca..aa76a2187 100644 --- a/src/modules/NeighborInfoModule.h +++ b/src/modules/NeighborInfoModule.h @@ -1,13 +1,16 @@ #pragma once #include "ProtobufModule.h" +#define MAX_NUM_NEIGHBORS 10 // also defined in NeighborInfo protobuf options /* * Neighborinfo module for sending info on each node's 0-hop neighbors to the mesh */ class NeighborInfoModule : public ProtobufModule, private concurrency::OSThread { - meshtastic_Neighbor *neighbors; - pb_size_t *numNeighbors; + CallbackObserver nodeStatusObserver = + CallbackObserver(this, &NeighborInfoModule::handleStatusUpdate); + + std::vector neighbors; public: /* @@ -18,15 +21,7 @@ class NeighborInfoModule : public ProtobufModule, priva /* Reset neighbor info after clearing nodeDB*/ void resetNeighbors(); - bool saveProtoForModule(); - - // Let FloodingRouter call updateLastSentById upon rebroadcasting a NeighborInfo packet - friend class FloodingRouter; - protected: - // Note: this holds our local info. - meshtastic_NeighborInfo neighborState; - /* * Called to handle a particular incoming message * @return true if you've guaranteed you've handled this message and no other handlers should be considered for it @@ -40,10 +35,9 @@ class NeighborInfoModule : public ProtobufModule, priva uint32_t collectNeighborInfo(meshtastic_NeighborInfo *neighborInfo); /* - Remove neighbors from the database that we haven't heard from in a while - @returns new number of neighbors + Remove neighbors from the database that we haven't heard from in a while */ - size_t cleanUpNeighbors(); + void cleanUpNeighbors(); /* Allocate a new NeighborInfo packet */ meshtastic_NeighborInfo *allocateNeighborInfoPacket(); @@ -56,29 +50,21 @@ class NeighborInfoModule : public ProtobufModule, priva */ void sendNeighborInfo(NodeNum dest = NODENUM_BROADCAST, bool wantReplies = false); - size_t getNumNeighbors() { return *numNeighbors; } - - meshtastic_Neighbor *getNeighborByIndex(size_t x) - { - assert(x < *numNeighbors); - return &neighbors[x]; - } - /* update neighbors with subpacket sniffed from network */ void updateNeighbors(const meshtastic_MeshPacket &mp, const meshtastic_NeighborInfo *np); /* update a NeighborInfo packet with our NodeNum as last_sent_by_id */ - void updateLastSentById(meshtastic_MeshPacket *p); - - void loadProtoForModule(); + void alterReceivedProtobuf(meshtastic_MeshPacket &p, meshtastic_NeighborInfo *n) override; /* Does our periodic broadcast */ int32_t runOnce() override; + /* Override wantPacket to say we want to see all packets when enabled, not just those for our port number. + Exception is when the packet came via MQTT */ + virtual bool wantPacket(const meshtastic_MeshPacket *p) override { return enabled && !p->via_mqtt; } + /* These are for debugging only */ void printNeighborInfo(const char *header, const meshtastic_NeighborInfo *np); - void printNodeDBNodes(const char *header); - void printNodeDBNeighbors(const char *header); - void printNodeDBSelection(const char *header, const meshtastic_NeighborInfo *np); + void printNodeDBNeighbors(); }; extern NeighborInfoModule *neighborInfoModule; \ No newline at end of file diff --git a/src/modules/NodeInfoModule.cpp b/src/modules/NodeInfoModule.cpp index b0b4bbdcd..61ec375cc 100644 --- a/src/modules/NodeInfoModule.cpp +++ b/src/modules/NodeInfoModule.cpp @@ -1,10 +1,12 @@ #include "NodeInfoModule.h" +#include "Default.h" #include "MeshService.h" #include "NodeDB.h" #include "RTC.h" #include "Router.h" #include "configuration.h" #include "main.h" +#include NodeInfoModule *nodeInfoModule; @@ -12,7 +14,7 @@ bool NodeInfoModule::handleReceivedProtobuf(const meshtastic_MeshPacket &mp, mes { auto p = *pptr; - bool hasChanged = nodeDB.updateUser(getFrom(&mp), p, mp.channel); + bool hasChanged = nodeDB->updateUser(getFrom(&mp), p, mp.channel); bool wasBroadcast = mp.to == NODENUM_BROADCAST; @@ -24,26 +26,29 @@ bool NodeInfoModule::handleReceivedProtobuf(const meshtastic_MeshPacket &mp, mes } // if user has changed while packet was not for us, inform phone - if (hasChanged && !wasBroadcast && mp.to != nodeDB.getNodeNum()) - service.sendToPhone(packetPool.allocCopy(mp)); + if (hasChanged && !wasBroadcast && !isToUs(&mp)) + service->sendToPhone(packetPool.allocCopy(mp)); // LOG_DEBUG("did handleReceived\n"); return false; // Let others look at this message also if they want } -void NodeInfoModule::sendOurNodeInfo(NodeNum dest, bool wantReplies, uint8_t channel) +void NodeInfoModule::sendOurNodeInfo(NodeNum dest, bool wantReplies, uint8_t channel, bool _shorterTimeout) { // cancel any not yet sent (now stale) position packets if (prevPacketId) // if we wrap around to zero, we'll simply fail to cancel in that rare case (no big deal) - service.cancelSending(prevPacketId); - + service->cancelSending(prevPacketId); + shorterTimeout = _shorterTimeout; meshtastic_MeshPacket *p = allocReply(); if (p) { // Check whether we didn't ignore it p->to = dest; p->decoded.want_response = (config.device.role != meshtastic_Config_DeviceConfig_Role_TRACKER && config.device.role != meshtastic_Config_DeviceConfig_Role_SENSOR) && wantReplies; - p->priority = meshtastic_MeshPacket_Priority_BACKGROUND; + if (_shorterTimeout) + p->priority = meshtastic_MeshPacket_Priority_DEFAULT; + else + p->priority = meshtastic_MeshPacket_Priority_BACKGROUND; if (channel > 0) { LOG_DEBUG("sending ourNodeInfo to channel %d\n", channel); p->channel = channel; @@ -51,16 +56,25 @@ void NodeInfoModule::sendOurNodeInfo(NodeNum dest, bool wantReplies, uint8_t cha prevPacketId = p->id; - service.sendToMesh(p); + service->sendToMesh(p); + shorterTimeout = false; } } meshtastic_MeshPacket *NodeInfoModule::allocReply() { - uint32_t now = millis(); - // If we sent our NodeInfo less than 1 min. ago, don't send it again as it may be still underway. - if (lastSentToMesh && (now - lastSentToMesh) < 60 * 1000) { - LOG_DEBUG("Sending NodeInfo will be ignored since we just sent it.\n"); + if (!airTime->isTxAllowedChannelUtil(false)) { + ignoreRequest = true; // Mark it as ignored for MeshModule + LOG_DEBUG("Skip sending NodeInfo due to > 40 percent channel util.\n"); + return NULL; + } + // If we sent our NodeInfo less than 5 min. ago, don't send it again as it may be still underway. + if (!shorterTimeout && lastSentToMesh && Throttle::isWithinTimespanMs(lastSentToMesh, 5 * 60 * 1000)) { + LOG_DEBUG("Skip sending NodeInfo since we just sent it less than 5 minutes ago.\n"); + ignoreRequest = true; // Mark it as ignored for MeshModule + return NULL; + } else if (shorterTimeout && lastSentToMesh && Throttle::isWithinTimespanMs(lastSentToMesh, 60 * 1000)) { + LOG_DEBUG("Skip sending actively requested NodeInfo since we just sent it less than 60 seconds ago.\n"); ignoreRequest = true; // Mark it as ignored for MeshModule return NULL; } else { @@ -68,7 +82,7 @@ meshtastic_MeshPacket *NodeInfoModule::allocReply() meshtastic_User &u = owner; LOG_INFO("sending owner %s/%s/%s\n", u.id, u.long_name, u.short_name); - lastSentToMesh = now; + lastSentToMesh = millis(); return allocDataProtobuf(u); } } @@ -91,6 +105,5 @@ int32_t NodeInfoModule::runOnce() LOG_INFO("Sending our nodeinfo to mesh (wantReplies=%d)\n", requestReplies); sendOurNodeInfo(NODENUM_BROADCAST, requestReplies); // Send our info (don't request replies) } - - return getConfiguredOrDefaultMs(config.device.node_info_broadcast_secs, default_broadcast_interval_secs); -} + return Default::getConfiguredOrDefaultMs(config.device.node_info_broadcast_secs, default_node_info_broadcast_secs); +} \ No newline at end of file diff --git a/src/modules/NodeInfoModule.h b/src/modules/NodeInfoModule.h index b10cccdf1..c1fb9ccce 100644 --- a/src/modules/NodeInfoModule.h +++ b/src/modules/NodeInfoModule.h @@ -20,7 +20,8 @@ class NodeInfoModule : public ProtobufModule, private concurren /** * Send our NodeInfo into the mesh */ - void sendOurNodeInfo(NodeNum dest = NODENUM_BROADCAST, bool wantReplies = false, uint8_t channel = 0); + void sendOurNodeInfo(NodeNum dest = NODENUM_BROADCAST, bool wantReplies = false, uint8_t channel = 0, + bool _shorterTimeout = false); protected: /** Called to handle a particular incoming message @@ -38,6 +39,7 @@ class NodeInfoModule : public ProtobufModule, private concurren private: uint32_t lastSentToMesh = 0; // Last time we sent our NodeInfo to the mesh + bool shorterTimeout = false; }; extern NodeInfoModule *nodeInfoModule; diff --git a/src/modules/PositionModule.cpp b/src/modules/PositionModule.cpp index 7ef539b1e..6ad30f927 100644 --- a/src/modules/PositionModule.cpp +++ b/src/modules/PositionModule.cpp @@ -1,4 +1,6 @@ +#if !MESHTASTIC_EXCLUDE_GPS #include "PositionModule.h" +#include "Default.h" #include "GPS.h" #include "MeshService.h" #include "NodeDB.h" @@ -9,12 +11,14 @@ #include "configuration.h" #include "gps/GeoCoord.h" #include "main.h" +#include "mesh/compression/unishox2.h" +#include "meshUtils.h" #include "meshtastic/atak.pb.h" #include "sleep.h" #include "target_specific.h" extern "C" { -#include "mesh/compression/unishox2.h" +#include } PositionModule *positionModule; @@ -25,6 +29,8 @@ PositionModule::PositionModule() { precision = 0; // safe starting value isPromiscuous = true; // We always want to update our nodedb, even if we are sniffing on others + nodeStatusObserver.observe(&nodeStatus->onNewStatus); + if (config.device.role != meshtastic_Config_DeviceConfig_Role_TRACKER && config.device.role != meshtastic_Config_DeviceConfig_Role_TAK_TRACKER) setIntervalFromNow(60 * 1000); @@ -33,21 +39,11 @@ PositionModule::PositionModule() if ((config.device.role == meshtastic_Config_DeviceConfig_Role_TRACKER || config.device.role == meshtastic_Config_DeviceConfig_Role_TAK_TRACKER) && config.power.is_power_saving) { - clearPosition(); + LOG_DEBUG("Clearing position on startup for sleepy tracker (ー。ー) zzz\n"); + nodeDB->clearLocalPosition(); } } -void PositionModule::clearPosition() -{ - LOG_DEBUG("Clearing position on startup for sleepy tracker (ー。ー) zzz\n"); - meshtastic_NodeInfoLite *node = nodeDB.getMeshNode(nodeDB.getNodeNum()); - node->position.latitude_i = 0; - node->position.longitude_i = 0; - node->position.altitude = 0; - node->position.time = 0; - nodeDB.setLocalPosition(meshtastic_Position_init_default); -} - bool PositionModule::handleReceivedProtobuf(const meshtastic_MeshPacket &mp, meshtastic_Position *pptr) { auto p = *pptr; @@ -58,35 +54,107 @@ bool PositionModule::handleReceivedProtobuf(const meshtastic_MeshPacket &mp, mes // FIXME this can in fact happen with packets sent from EUD (src=RX_SRC_USER) // to set fixed location, EUD-GPS location or just the time (see also issue #900) bool isLocal = false; - if (nodeDB.getNodeNum() == getFrom(&mp)) { - LOG_DEBUG("Incoming update from MYSELF\n"); + if (isFromUs(&mp)) { isLocal = true; - nodeDB.setLocalPosition(p); + if (config.position.fixed_position) { + LOG_DEBUG("Ignore incoming position update from myself except for time, because position.fixed_position is true\n"); + +#ifdef T_WATCH_S3 + // Since we return early if position.fixed_position is true, set the T-Watch's RTC to the time received from the + // client device here + if (p.time && channels.getByIndex(mp.channel).role == meshtastic_Channel_Role_PRIMARY) { + trySetRtc(p, isLocal, true); + } +#endif + + nodeDB->setLocalPosition(p, true); + return false; + } else { + LOG_DEBUG("Incoming update from MYSELF\n"); + nodeDB->setLocalPosition(p); + } } // Log packet size and data fields - LOG_INFO("POSITION node=%08x l=%d latI=%d lonI=%d msl=%d hae=%d geo=%d pdop=%d hdop=%d vdop=%d siv=%d fxq=%d fxt=%d pts=%d " - "time=%d\n", - getFrom(&mp), mp.decoded.payload.size, p.latitude_i, p.longitude_i, p.altitude, p.altitude_hae, - p.altitude_geoidal_separation, p.PDOP, p.HDOP, p.VDOP, p.sats_in_view, p.fix_quality, p.fix_type, p.timestamp, - p.time); + 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 " + "time=%d\n", + getFrom(&mp), mp.decoded.payload.size, p.latitude_i, p.longitude_i, p.altitude, p.altitude_hae, + p.altitude_geoidal_separation, p.PDOP, p.HDOP, p.VDOP, p.sats_in_view, p.fix_quality, p.fix_type, p.timestamp, + p.time); if (p.time && channels.getByIndex(mp.channel).role == meshtastic_Channel_Role_PRIMARY) { - struct timeval tv; - uint32_t secs = p.time; - - tv.tv_sec = secs; - tv.tv_usec = 0; + bool force = false; +#ifdef T_WATCH_S3 + // 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 + // it was shut down. So we need to force the update here, since otherwise RTC::perhapsSetRTC will ignore it because it + // will always be an equivalent or lesser RTCQuality (RTCQualityNTP or RTCQualityNet). + force = true; +#endif // Set from phone RTC Quality to RTCQualityNTP since it should be approximately so - perhapsSetRTC(isLocal ? RTCQualityNTP : RTCQualityFromNet, &tv); + trySetRtc(p, isLocal, force); } - nodeDB.updatePosition(getFrom(&mp), p); + nodeDB->updatePosition(getFrom(&mp), p); + if (channels.getByIndex(mp.channel).settings.has_module_settings) { + precision = channels.getByIndex(mp.channel).settings.module_settings.position_precision; + } else if (channels.getByIndex(mp.channel).role == meshtastic_Channel_Role_PRIMARY) { + precision = 32; + } else { + precision = 0; + } return false; // Let others look at this message also if they want } +void PositionModule::alterReceivedProtobuf(meshtastic_MeshPacket &mp, meshtastic_Position *p) +{ + // Phone position packets need to be truncated to the channel precision + if (isFromUs(&mp) && (precision < 32 && precision > 0)) { + LOG_DEBUG("Truncating phone position to channel precision %i\n", precision); + p->latitude_i = p->latitude_i & (UINT32_MAX << (32 - precision)); + p->longitude_i = p->longitude_i & (UINT32_MAX << (32 - precision)); + + // We want the imprecise position to be the middle of the possible location, not + p->latitude_i += (1 << (31 - precision)); + p->longitude_i += (1 << (31 - precision)); + + mp.decoded.payload.size = + pb_encode_to_bytes(mp.decoded.payload.bytes, sizeof(mp.decoded.payload.bytes), &meshtastic_Position_msg, p); + } +} + +void PositionModule::trySetRtc(meshtastic_Position p, bool isLocal, bool forceUpdate) +{ + if (hasQualityTimesource() && !isLocal) { + LOG_DEBUG("Ignoring time from mesh because we have a GPS, RTC, or Phone/NTP time source in the past day\n"); + return; + } + if (!isLocal && p.location_source < meshtastic_Position_LocSource_LOC_INTERNAL) { + LOG_DEBUG("Ignoring time from mesh because it has a unknown or manual source\n"); + return; + } + struct timeval tv; + uint32_t secs = p.time; + + tv.tv_sec = secs; + tv.tv_usec = 0; + + perhapsSetRTC(isLocal ? RTCQualityNTP : RTCQualityFromNet, &tv, forceUpdate); +} + +bool PositionModule::hasQualityTimesource() +{ + bool setFromPhoneOrNtpToday = + lastSetFromPhoneNtpOrGps == 0 ? false : Throttle::isWithinTimespanMs(lastSetFromPhoneNtpOrGps, SEC_PER_DAY * 1000UL); +#if MESHTASTIC_EXCLUDE_GPS + bool hasGpsOrRtc = (rtc_found.address != ScanI2C::ADDRESS_NONE.address); +#else + bool hasGpsOrRtc = (gps && gps->isConnected()) || (rtc_found.address != ScanI2C::ADDRESS_NONE.address); +#endif + return hasGpsOrRtc || setFromPhoneOrNtpToday; +} + meshtastic_MeshPacket *PositionModule::allocReply() { if (precision == 0) { @@ -94,7 +162,7 @@ meshtastic_MeshPacket *PositionModule::allocReply() return nullptr; } - meshtastic_NodeInfoLite *node = service.refreshLocalMeshNode(); // should guarantee there is now a position + meshtastic_NodeInfoLite *node = service->refreshLocalMeshNode(); // should guarantee there is now a position assert(node->has_position); // configuration of POSITION packet @@ -105,25 +173,50 @@ meshtastic_MeshPacket *PositionModule::allocReply() meshtastic_Position p = meshtastic_Position_init_default; // Start with an empty structure // if localPosition is totally empty, put our last saved position (lite) in there if (localPosition.latitude_i == 0 && localPosition.longitude_i == 0) { - nodeDB.setLocalPosition(TypeConversions::ConvertToPosition(node->position)); + nodeDB->setLocalPosition(TypeConversions::ConvertToPosition(node->position)); } localPosition.seq_number++; + if (localPosition.latitude_i == 0 && localPosition.longitude_i == 0) { + LOG_WARN("Skipping position send because lat/lon are zero!\n"); + return nullptr; + } + // lat/lon are unconditionally included - IF AVAILABLE! LOG_DEBUG("Sending location with precision %i\n", precision); - p.latitude_i = localPosition.latitude_i & (INT32_MAX << (32 - precision)); - p.longitude_i = localPosition.longitude_i & (INT32_MAX << (32 - precision)); + if (precision < 32 && precision > 0) { + p.latitude_i = localPosition.latitude_i & (UINT32_MAX << (32 - precision)); + p.longitude_i = localPosition.longitude_i & (UINT32_MAX << (32 - precision)); + + // We want the imprecise position to be the middle of the possible location, not + p.latitude_i += (1 << (31 - precision)); + p.longitude_i += (1 << (31 - precision)); + } else { + p.latitude_i = localPosition.latitude_i; + p.longitude_i = localPosition.longitude_i; + } p.precision_bits = precision; - p.time = localPosition.time; + p.has_latitude_i = true; + p.has_longitude_i = true; + p.time = getValidTime(RTCQualityNTP) > 0 ? getValidTime(RTCQualityNTP) : localPosition.time; + + if (config.position.fixed_position) { + p.location_source = meshtastic_Position_LocSource_LOC_MANUAL; + } if (pos_flags & meshtastic_Config_PositionConfig_PositionFlags_ALTITUDE) { - if (pos_flags & meshtastic_Config_PositionConfig_PositionFlags_ALTITUDE_MSL) + if (pos_flags & meshtastic_Config_PositionConfig_PositionFlags_ALTITUDE_MSL) { p.altitude = localPosition.altitude; - else + p.has_altitude = true; + } else { p.altitude_hae = localPosition.altitude_hae; + p.has_altitude_hae = true; + } - if (pos_flags & meshtastic_Config_PositionConfig_PositionFlags_GEOIDAL_SEPARATION) + if (pos_flags & meshtastic_Config_PositionConfig_PositionFlags_GEOIDAL_SEPARATION) { p.altitude_geoidal_separation = localPosition.altitude_geoidal_separation; + p.has_altitude_geoidal_separation = true; + } } if (pos_flags & meshtastic_Config_PositionConfig_PositionFlags_DOP) { @@ -143,24 +236,28 @@ meshtastic_MeshPacket *PositionModule::allocReply() if (pos_flags & meshtastic_Config_PositionConfig_PositionFlags_SEQ_NO) p.seq_number = localPosition.seq_number; - if (pos_flags & meshtastic_Config_PositionConfig_PositionFlags_HEADING) + if (pos_flags & meshtastic_Config_PositionConfig_PositionFlags_HEADING) { p.ground_track = localPosition.ground_track; + p.has_ground_track = true; + } - if (pos_flags & meshtastic_Config_PositionConfig_PositionFlags_SPEED) + if (pos_flags & meshtastic_Config_PositionConfig_PositionFlags_SPEED) { p.ground_speed = localPosition.ground_speed; + p.has_ground_speed = true; + } // Strip out any time information before sending packets to other nodes - to keep the wire size small (and because other - // nodes shouldn't trust it anyways) Note: we allow a device with a local GPS to include the time, so that gpsless - // devices can get time. - if (getRTCQuality() < RTCQualityDevice) { + // nodes shouldn't trust it anyways) Note: we allow a device with a local GPS or NTP to include the time, so that devices + // without can get time. + if (getRTCQuality() < RTCQualityNTP) { LOG_INFO("Stripping time %u from position send\n", p.time); p.time = 0; } else { - p.time = getValidTime(RTCQualityDevice); + p.time = getValidTime(RTCQualityNTP); LOG_INFO("Providing time to mesh %u\n", p.time); } - LOG_INFO("Position reply: time=%i, latI=%i, lonI=%i\n", p.time, p.latitude_i, p.longitude_i); + LOG_INFO("Position reply: time=%i lat=%i lon=%i\n", p.time, p.latitude_i, p.longitude_i); // TAK Tracker devices should send their position in a TAK packet over the ATAK port if (config.device.role == meshtastic_Config_DeviceConfig_Role_TAK_TRACKER) @@ -177,7 +274,7 @@ meshtastic_MeshPacket *PositionModule::allocAtakPli() meshtastic_TAKPacket takPacket = {.is_compressed = true, .has_contact = true, - .contact = {0}, + .contact = meshtastic_Contact_init_default, .has_group = true, .group = {meshtastic_MemberRole_TeamMember, meshtastic_Team_Cyan}, .has_status = true, @@ -186,31 +283,50 @@ meshtastic_MeshPacket *PositionModule::allocAtakPli() .battery = powerStatus->getBatteryChargePercent(), }, .which_payload_variant = meshtastic_TAKPacket_pli_tag, - {.pli = { - .latitude_i = localPosition.latitude_i, - .longitude_i = localPosition.longitude_i, - .altitude = localPosition.altitude_hae, - .speed = localPosition.ground_speed, - .course = static_cast(localPosition.ground_track), - }}}; + .payload_variant = {.pli = { + .latitude_i = localPosition.latitude_i, + .longitude_i = localPosition.longitude_i, + .altitude = localPosition.altitude_hae, + .speed = localPosition.ground_speed, + .course = static_cast(localPosition.ground_track), + }}}; - auto length = unishox2_compress_simple(owner.long_name, strlen(owner.long_name), takPacket.contact.device_callsign); + auto length = unishox2_compress_lines(owner.long_name, strlen(owner.long_name), takPacket.contact.device_callsign, + sizeof(takPacket.contact.device_callsign) - 1, USX_PSET_DFLT, NULL); LOG_DEBUG("Uncompressed device_callsign '%s' - %d bytes\n", owner.long_name, strlen(owner.long_name)); LOG_DEBUG("Compressed device_callsign '%s' - %d bytes\n", takPacket.contact.device_callsign, length); - length = unishox2_compress_simple(owner.long_name, strlen(owner.long_name), takPacket.contact.callsign); + length = unishox2_compress_lines(owner.long_name, strlen(owner.long_name), takPacket.contact.callsign, + sizeof(takPacket.contact.callsign) - 1, USX_PSET_DFLT, NULL); mp->decoded.payload.size = pb_encode_to_bytes(mp->decoded.payload.bytes, sizeof(mp->decoded.payload.bytes), &meshtastic_TAKPacket_msg, &takPacket); return mp; } +void PositionModule::sendOurPosition() +{ + bool requestReplies = currentGeneration != radioGeneration; + currentGeneration = radioGeneration; + + // If we changed channels, ask everyone else for their latest info + LOG_INFO("Sending pos@%x:6 to mesh (wantReplies=%d)\n", localPosition.timestamp, requestReplies); + sendOurPosition(NODENUM_BROADCAST, requestReplies); +} + void PositionModule::sendOurPosition(NodeNum dest, bool wantReplies, uint8_t channel) { // cancel any not yet sent (now stale) position packets if (prevPacketId) // if we wrap around to zero, we'll simply fail to cancel in that rare case (no big deal) - service.cancelSending(prevPacketId); + service->cancelSending(prevPacketId); // Set's the class precision value for this particular packet - precision = channels.getByIndex(channel).settings.module_settings.position_precision; + if (channels.getByIndex(channel).settings.has_module_settings) { + precision = channels.getByIndex(channel).settings.module_settings.position_precision; + } else if (channels.getByIndex(channel).role == meshtastic_Channel_Role_PRIMARY) { + // backwards compatibility for Primary channels created before position_precision was set by default + precision = 13; + } else { + precision = 0; + } meshtastic_MeshPacket *p = allocReply(); if (p == nullptr) { @@ -230,10 +346,10 @@ void PositionModule::sendOurPosition(NodeNum dest, bool wantReplies, uint8_t cha if (channel > 0) p->channel = channel; - service.sendToMesh(p, RX_SRC_LOCAL, true); + service->sendToMesh(p, RX_SRC_LOCAL, true); - if ((config.device.role == meshtastic_Config_DeviceConfig_Role_TRACKER || - config.device.role == meshtastic_Config_DeviceConfig_Role_TAK_TRACKER) && + if (IS_ONE_OF(config.device.role, meshtastic_Config_DeviceConfig_Role_TRACKER, + meshtastic_Config_DeviceConfig_Role_TAK_TRACKER) && config.power.is_power_saving) { LOG_DEBUG("Starting next execution in 5 seconds and then going to sleep.\n"); sleepOnNextExecution = true; @@ -247,18 +363,19 @@ int32_t PositionModule::runOnce() { if (sleepOnNextExecution == true) { sleepOnNextExecution = false; - uint32_t nightyNightMs = getConfiguredOrDefaultMs(config.position.position_broadcast_secs); + uint32_t nightyNightMs = Default::getConfiguredOrDefaultMs(config.position.position_broadcast_secs); LOG_DEBUG("Sleeping for %ims, then awaking to send position again.\n", nightyNightMs); doDeepSleep(nightyNightMs, false); } - meshtastic_NodeInfoLite *node = nodeDB.getMeshNode(nodeDB.getNodeNum()); + meshtastic_NodeInfoLite *node = nodeDB->getMeshNode(nodeDB->getNodeNum()); if (node == nullptr) return RUNONCE_INTERVAL; // We limit our GPS broadcasts to a max rate uint32_t now = millis(); - uint32_t intervalMs = getConfiguredOrDefaultMs(config.position.position_broadcast_secs, default_broadcast_interval_secs); + uint32_t intervalMs = Default::getConfiguredOrDefaultMsScaled(config.position.position_broadcast_secs, + default_broadcast_interval_secs, numOnlineNodes); uint32_t msSinceLastSend = now - lastGpsSend; // Only send packets if the channel util. is less than 25% utilized or we're a tracker with less than 40% utilized. if (!airTime->isTxAllowedChannelUtil(config.device.role != meshtastic_Config_DeviceConfig_Role_TRACKER && @@ -273,44 +390,33 @@ int32_t PositionModule::runOnce() lastGpsLatitude = node->position.latitude_i; lastGpsLongitude = node->position.longitude_i; - // If we changed channels, ask everyone else for their latest info - bool requestReplies = currentGeneration != radioGeneration; - currentGeneration = radioGeneration; - - LOG_INFO("Sending pos@%x:6 to mesh (wantReplies=%d)\n", localPosition.timestamp, requestReplies); - sendOurPosition(NODENUM_BROADCAST, requestReplies); + sendOurPosition(); if (config.device.role == meshtastic_Config_DeviceConfig_Role_LOST_AND_FOUND) { sendLostAndFoundText(); } } } else if (config.position.position_broadcast_smart_enabled) { - const meshtastic_NodeInfoLite *node2 = service.refreshLocalMeshNode(); // should guarantee there is now a position + const meshtastic_NodeInfoLite *node2 = service->refreshLocalMeshNode(); // should guarantee there is now a position if (hasValidPosition(node2)) { // The minimum time (in seconds) that would pass before we are able to send a new position packet. - const uint32_t minimumTimeThreshold = - getConfiguredOrDefaultMs(config.position.broadcast_smart_minimum_interval_secs, 30); auto smartPosition = getDistanceTraveledSinceLastSend(node->position); + msSinceLastSend = now - lastGpsSend; - if (smartPosition.hasTraveledOverThreshold && msSinceLastSend >= minimumTimeThreshold) { - bool requestReplies = currentGeneration != radioGeneration; - currentGeneration = radioGeneration; + if (smartPosition.hasTraveledOverThreshold && + Throttle::execute( + &lastGpsSend, minimumTimeThreshold, []() { positionModule->sendOurPosition(); }, + []() { LOG_DEBUG("Skipping send smart broadcast due to time throttling\n"); })) { - LOG_INFO("Sending smart pos@%x:6 to mesh (distanceTraveled=%fm, minDistanceThreshold=%im, timeElapsed=%ims, " - "minTimeInterval=%ims)\n", - localPosition.timestamp, smartPosition.distanceTraveled, smartPosition.distanceThreshold, - msSinceLastSend, minimumTimeThreshold); - sendOurPosition(NODENUM_BROADCAST, requestReplies); + LOG_DEBUG("Sent smart pos@%x:6 to mesh (distanceTraveled=%fm, minDistanceThreshold=%im, timeElapsed=%ims, " + "minTimeInterval=%ims)\n", + localPosition.timestamp, smartPosition.distanceTraveled, smartPosition.distanceThreshold, + msSinceLastSend, minimumTimeThreshold); // Set the current coords as our last ones, after we've compared distance with current and decided to send lastGpsLatitude = node->position.latitude_i; lastGpsLongitude = node->position.longitude_i; - - /* Update lastGpsSend to now. This means if the device is stationary, then - getPref_position_broadcast_secs will still apply. - */ - lastGpsSend = now; } } } @@ -329,14 +435,15 @@ void PositionModule::sendLostAndFoundText() p->decoded.payload.size = strlen(message); memcpy(p->decoded.payload.bytes, message, p->decoded.payload.size); - service.sendToMesh(p, RX_SRC_LOCAL, true); + service->sendToMesh(p, RX_SRC_LOCAL, true); delete[] message; } struct SmartPosition PositionModule::getDistanceTraveledSinceLastSend(meshtastic_PositionLite currentPosition) { // The minimum distance to travel before we are able to send a new position packet. - const uint32_t distanceTravelThreshold = getConfiguredOrDefault(config.position.broadcast_smart_minimum_distance, 100); + const uint32_t distanceTravelThreshold = + Default::getConfiguredOrDefault(config.position.broadcast_smart_minimum_distance, 100); // Determine the distance in meters between two points on the globe float distanceTraveledSinceLastSend = GeoCoord::latLongToMeter( @@ -350,7 +457,7 @@ struct SmartPosition PositionModule::getDistanceTraveledSinceLastSend(meshtastic LOG_DEBUG("currentPosition.latitude_i=%i, currentPosition.longitude_i=%i\n", lastGpsLatitude, lastGpsLongitude); LOG_DEBUG("--------SMART POSITION-----------------------------------\n"); - LOG_DEBUG("hasTraveledOverThreshold=%i, distanceTraveled=%d, distanceThreshold=% u\n", + LOG_DEBUG("hasTraveledOverThreshold=%i, distanceTraveled=%f, distanceThreshold=%f\n", abs(distanceTraveledSinceLastSend) >= distanceTravelThreshold, abs(distanceTraveledSinceLastSend), distanceTravelThreshold); @@ -366,30 +473,26 @@ struct SmartPosition PositionModule::getDistanceTraveledSinceLastSend(meshtastic void PositionModule::handleNewPosition() { - meshtastic_NodeInfoLite *node = nodeDB.getMeshNode(nodeDB.getNodeNum()); - const meshtastic_NodeInfoLite *node2 = service.refreshLocalMeshNode(); // should guarantee there is now a position + meshtastic_NodeInfoLite *node = nodeDB->getMeshNode(nodeDB->getNodeNum()); + const meshtastic_NodeInfoLite *node2 = service->refreshLocalMeshNode(); // should guarantee there is now a position // We limit our GPS broadcasts to a max rate - uint32_t now = millis(); - uint32_t msSinceLastSend = now - lastGpsSend; - if (hasValidPosition(node2)) { auto smartPosition = getDistanceTraveledSinceLastSend(node->position); - if (smartPosition.hasTraveledOverThreshold) { - bool requestReplies = currentGeneration != radioGeneration; - currentGeneration = radioGeneration; - - LOG_INFO("Sending smart pos@%x:6 to mesh (distanceTraveled=%fm, minDistanceThreshold=%im, timeElapsed=%ims)\n", - localPosition.timestamp, smartPosition.distanceTraveled, smartPosition.distanceThreshold, msSinceLastSend); - sendOurPosition(NODENUM_BROADCAST, requestReplies); + uint32_t msSinceLastSend = millis() - lastGpsSend; + if (smartPosition.hasTraveledOverThreshold && + Throttle::execute( + &lastGpsSend, minimumTimeThreshold, []() { positionModule->sendOurPosition(); }, + []() { LOG_DEBUG("Skipping send smart broadcast due to time throttling\n"); })) { + LOG_DEBUG("Sent smart pos@%x:6 to mesh (distanceTraveled=%fm, minDistanceThreshold=%im, timeElapsed=%ims, " + "minTimeInterval=%ims)\n", + localPosition.timestamp, smartPosition.distanceTraveled, smartPosition.distanceThreshold, msSinceLastSend, + minimumTimeThreshold); // Set the current coords as our last ones, after we've compared distance with current and decided to send lastGpsLatitude = node->position.latitude_i; lastGpsLongitude = node->position.longitude_i; - - /* Update lastGpsSend to now. This means if the device is stationary, then - getPref_position_broadcast_secs will still apply. - */ - lastGpsSend = now; } } -} \ No newline at end of file +} + +#endif \ No newline at end of file diff --git a/src/modules/PositionModule.h b/src/modules/PositionModule.h index fddafef6f..41b86b795 100644 --- a/src/modules/PositionModule.h +++ b/src/modules/PositionModule.h @@ -1,4 +1,5 @@ #pragma once +#include "Default.h" #include "ProtobufModule.h" #include "concurrency/OSThread.h" @@ -7,6 +8,9 @@ */ class PositionModule : public ProtobufModule, private concurrency::OSThread { + CallbackObserver nodeStatusObserver = + CallbackObserver(this, &PositionModule::handleStatusUpdate); + /// The id of the last packet we sent, to allow us to cancel it if we make something fresher PacketId prevPacketId = 0; @@ -29,7 +33,8 @@ class PositionModule : public ProtobufModule, private concu /** * Send our position into the mesh */ - void sendOurPosition(NodeNum dest = NODENUM_BROADCAST, bool wantReplies = false, uint8_t channel = 0); + void sendOurPosition(NodeNum dest, bool wantReplies = false, uint8_t channel = 0); + void sendOurPosition(); void handleNewPosition(); @@ -40,6 +45,8 @@ class PositionModule : public ProtobufModule, private concu */ virtual bool handleReceivedProtobuf(const meshtastic_MeshPacket &mp, meshtastic_Position *p) override; + virtual void alterReceivedProtobuf(meshtastic_MeshPacket &mp, meshtastic_Position *p) override; + /** Messages can be received that have the want_response bit set. If set, this callback will be invoked * so that subclasses can (optionally) send a response back to the original sender. */ virtual meshtastic_MeshPacket *allocReply() override; @@ -50,11 +57,13 @@ class PositionModule : public ProtobufModule, private concu private: struct SmartPosition getDistanceTraveledSinceLastSend(meshtastic_PositionLite currentPosition); meshtastic_MeshPacket *allocAtakPli(); + void trySetRtc(meshtastic_Position p, bool isLocal, bool forceUpdate = false); uint32_t precision; - - /** Only used in power saving trackers for now */ - void clearPosition(); void sendLostAndFoundText(); + bool hasQualityTimesource(); + + const uint32_t minimumTimeThreshold = + Default::getConfiguredOrDefaultMs(config.position.broadcast_smart_minimum_interval_secs, 30); }; struct SmartPosition { diff --git a/src/modules/PowerStressModule.cpp b/src/modules/PowerStressModule.cpp new file mode 100644 index 000000000..48159ba54 --- /dev/null +++ b/src/modules/PowerStressModule.cpp @@ -0,0 +1,134 @@ +#include "PowerStressModule.h" +#include "Led.h" +#include "MeshService.h" +#include "NodeDB.h" +#include "PowerMon.h" +#include "RTC.h" +#include "Router.h" +#include "configuration.h" +#include "main.h" +#include "sleep.h" +#include "target_specific.h" +#include + +extern void printInfo(); + +PowerStressModule::PowerStressModule() + : ProtobufModule("powerstress", meshtastic_PortNum_POWERSTRESS_APP, &meshtastic_PowerStressMessage_msg), + concurrency::OSThread("PowerStressModule") +{ +} + +bool PowerStressModule::handleReceivedProtobuf(const meshtastic_MeshPacket &req, meshtastic_PowerStressMessage *pptr) +{ + // We only respond to messages if powermon debugging is already on + if (config.power.powermon_enables) { + auto p = *pptr; + LOG_INFO("Received PowerStress cmd=%d\n", p.cmd); + + // Some commands we can handle immediately, anything else gets deferred to be handled by our thread + switch (p.cmd) { + case meshtastic_PowerStressMessage_Opcode_UNSET: + LOG_ERROR("PowerStress operation unset\n"); + break; + + case meshtastic_PowerStressMessage_Opcode_PRINT_INFO: + printInfo(); + + // Now that we know we are actually doing power stress testing, go ahead and turn on all enables (so the log is fully + // detailed) + powerMon->force_enabled = true; + break; + + default: + if (currentMessage.cmd != meshtastic_PowerStressMessage_Opcode_UNSET) + LOG_ERROR("PowerStress operation %d already in progress! Can't start new command\n", currentMessage.cmd); + else + currentMessage = p; // copy for use by thread (the message provided to us will be getting freed) + break; + } + } + return true; +} + +int32_t PowerStressModule::runOnce() +{ + if (!config.power.powermon_enables) { + // Powermon not enabled - stop using CPU/stop this thread + return disable(); + } + + int32_t sleep_msec = 10; // when not active check for new messages every 10ms + + auto &p = currentMessage; + + if (isRunningCommand) { + // Done with the previous command - our sleep must have finished + p.cmd = meshtastic_PowerStressMessage_Opcode_UNSET; + p.num_seconds = 0; + isRunningCommand = false; + LOG_INFO("S:PS:%u\n", p.cmd); + } else { + if (p.cmd != meshtastic_PowerStressMessage_Opcode_UNSET) { + sleep_msec = (int32_t)(p.num_seconds * 1000); + isRunningCommand = !!sleep_msec; // if the command wants us to sleep, make sure to mark that we have something running + LOG_INFO( + "S:PS:%u\n", + p.cmd); // Emit a structured log saying we are starting a powerstress state (to make it easier to parse later) + + switch (p.cmd) { + case meshtastic_PowerStressMessage_Opcode_LED_ON: + ledForceOn.set(true); + break; + case meshtastic_PowerStressMessage_Opcode_LED_OFF: + ledForceOn.set(false); + break; + case meshtastic_PowerStressMessage_Opcode_GPS_ON: + // FIXME - implement + break; + case meshtastic_PowerStressMessage_Opcode_GPS_OFF: + // FIXME - implement + break; + case meshtastic_PowerStressMessage_Opcode_LORA_OFF: + // FIXME - implement + break; + case meshtastic_PowerStressMessage_Opcode_LORA_RX: + // FIXME - implement + break; + case meshtastic_PowerStressMessage_Opcode_LORA_TX: + // FIXME - implement + break; + case meshtastic_PowerStressMessage_Opcode_SCREEN_OFF: + // FIXME - implement + break; + case meshtastic_PowerStressMessage_Opcode_SCREEN_ON: + // FIXME - implement + break; + case meshtastic_PowerStressMessage_Opcode_BT_OFF: + setBluetoothEnable(false); + break; + case meshtastic_PowerStressMessage_Opcode_BT_ON: + setBluetoothEnable(true); + break; + case meshtastic_PowerStressMessage_Opcode_CPU_DEEPSLEEP: + doDeepSleep(sleep_msec, true); + break; + case meshtastic_PowerStressMessage_Opcode_CPU_FULLON: { + uint32_t start_msec = millis(); + while (Throttle::isWithinTimespanMs(start_msec, sleep_msec)) + ; // Don't let CPU idle at all + sleep_msec = 0; // we already slept + break; + } + case meshtastic_PowerStressMessage_Opcode_CPU_IDLE: + // FIXME - implement + break; + default: + LOG_ERROR("PowerStress operation %d not yet implemented!\n", p.cmd); + sleep_msec = 0; // Don't do whatever sleep was requested... + break; + } + } + } + return sleep_msec; +} \ No newline at end of file diff --git a/src/modules/PowerStressModule.h b/src/modules/PowerStressModule.h new file mode 100644 index 000000000..2d449f690 --- /dev/null +++ b/src/modules/PowerStressModule.h @@ -0,0 +1,38 @@ +#pragma once +#include "ProtobufModule.h" +#include "concurrency/OSThread.h" +#include "mesh/generated/meshtastic/powermon.pb.h" + +/** + * A module that provides easy low-level remote access to device hardware. + */ +class PowerStressModule : public ProtobufModule, private concurrency::OSThread +{ + meshtastic_PowerStressMessage currentMessage = meshtastic_PowerStressMessage_init_default; + bool isRunningCommand = false; + + public: + /** Constructor + * name is for debugging output + */ + PowerStressModule(); + + protected: + /** Called to handle a particular incoming message + + @return true if you've guaranteed you've handled this message and no other handlers should be considered for it + */ + virtual bool handleReceivedProtobuf(const meshtastic_MeshPacket &mp, meshtastic_PowerStressMessage *p) override; + + /** + * Periodically read the gpios we have been asked to WATCH, if they have changed, + * broadcast a message with the change information. + * + * The method that will be called each time our thread gets a chance to run + * + * Returns desired period for next invocation (or RUN_SAME for no change) + */ + virtual int32_t runOnce() override; +}; + +extern PowerStressModule powerStressModule; \ No newline at end of file diff --git a/src/modules/RangeTestModule.cpp b/src/modules/RangeTestModule.cpp index ecf4b70c7..e78b4e68d 100644 --- a/src/modules/RangeTestModule.cpp +++ b/src/modules/RangeTestModule.cpp @@ -19,6 +19,7 @@ #include "configuration.h" #include "gps/GeoCoord.h" #include +#include RangeTestModule *rangeTestModule; RangeTestModuleRadio *rangeTestModuleRadio; @@ -27,10 +28,6 @@ RangeTestModule::RangeTestModule() : concurrency::OSThread("RangeTestModule") {} uint32_t packetSequence = 0; -#define SEC_PER_DAY 86400 -#define SEC_PER_HOUR 3600 -#define SEC_PER_MIN 60 - int32_t RangeTestModule::runOnce() { #if defined(ARCH_ESP32) || defined(ARCH_NRF52) @@ -83,7 +80,7 @@ int32_t RangeTestModule::runOnce() } // If we have been running for more than 8 hours, turn module back off - if (millis() - started > 28800000) { + if (!Throttle::isWithinTimespanMs(started, 28800000)) { LOG_INFO("Range Test Module - Disabling after 8 hours\n"); return disable(); } else { @@ -113,18 +110,18 @@ void RangeTestModuleRadio::sendPayload(NodeNum dest, bool wantReplies) meshtastic_MeshPacket *p = allocDataPacket(); p->to = dest; p->decoded.want_response = wantReplies; - - p->want_ack = true; + p->hop_limit = 0; + p->want_ack = false; packetSequence++; - static char heartbeatString[MAX_RHPACKETLEN]; + static char heartbeatString[MAX_LORA_PAYLOAD_LEN + 1]; snprintf(heartbeatString, sizeof(heartbeatString), "seq %u", packetSequence); p->decoded.payload.size = strlen(heartbeatString); // You must specify how many bytes are in the reply memcpy(p->decoded.payload.bytes, heartbeatString, p->decoded.payload.size); - service.sendToMesh(p); + service->sendToMesh(p); // TODO: Handle this better. We want to keep the phone awake otherwise it stops sending. powerFSM.trigger(EVENT_CONTACT_FROM_PHONE); @@ -142,14 +139,14 @@ ProcessMessage RangeTestModuleRadio::handleReceived(const meshtastic_MeshPacket LOG_INFO.getNodeNum(), mp.from, mp.to, mp.id, p.payload.size, p.payload.bytes); */ - if (getFrom(&mp) != nodeDB.getNodeNum()) { + if (!isFromUs(&mp)) { if (moduleConfig.range_test.save) { appendFile(mp); } /* - NodeInfoLite *n = nodeDB.getMeshNode(getFrom(&mp)); + NodeInfoLite *n = nodeDB->getMeshNode(getFrom(&mp)); LOG_DEBUG("-----------------------------------------\n"); LOG_DEBUG("p.payload.bytes \"%s\"\n", p.payload.bytes); @@ -188,7 +185,7 @@ bool RangeTestModuleRadio::appendFile(const meshtastic_MeshPacket &mp) #ifdef ARCH_ESP32 auto &p = mp.decoded; - meshtastic_NodeInfoLite *n = nodeDB.getMeshNode(getFrom(&mp)); + meshtastic_NodeInfoLite *n = nodeDB->getMeshNode(getFrom(&mp)); /* LOG_DEBUG("-----------------------------------------\n"); LOG_DEBUG("p.payload.bytes \"%s\"\n", p.payload.bytes); diff --git a/src/modules/RemoteHardwareModule.cpp b/src/modules/RemoteHardwareModule.cpp index 8e64b9a9c..43612e450 100644 --- a/src/modules/RemoteHardwareModule.cpp +++ b/src/modules/RemoteHardwareModule.cpp @@ -5,6 +5,7 @@ #include "Router.h" #include "configuration.h" #include "main.h" +#include #define NUM_GPIOS 64 @@ -14,26 +15,44 @@ // a max of one change per 30 seconds #define WATCH_INTERVAL_MSEC (30 * 1000) +// Tests for access to read from or write to a specified GPIO pin +static bool pinAccessAllowed(uint64_t mask, uint8_t pin) +{ + // If undefined pin access is allowed, don't check the pin and just return true + if (moduleConfig.remote_hardware.allow_undefined_pin_access) { + return true; + } + + // Test to see if the pin is in the list of allowed pins and return true if found + if (mask & (1ULL << pin)) { + return true; + } + + return false; +} + /// Set pin modes for every set bit in a mask -static void pinModes(uint64_t mask, uint8_t mode) +static void pinModes(uint64_t mask, uint8_t mode, uint64_t maskAvailable) { for (uint64_t i = 0; i < NUM_GPIOS; i++) { if (mask & (1ULL << i)) { - pinMode(i, mode); + if (pinAccessAllowed(maskAvailable, i)) { + pinMode(i, mode); + } } } } /// Read all the pins mentioned in a mask -static uint64_t digitalReads(uint64_t mask) +static uint64_t digitalReads(uint64_t mask, uint64_t maskAvailable) { uint64_t res = 0; - pinModes(mask, INPUT_PULLUP); + pinModes(mask, INPUT_PULLUP, maskAvailable); for (uint64_t i = 0; i < NUM_GPIOS; i++) { uint64_t m = 1ULL << i; - if (mask & m) { + if (mask & m && pinAccessAllowed(maskAvailable, i)) { if (digitalRead(i)) { res |= m; } @@ -47,6 +66,13 @@ RemoteHardwareModule::RemoteHardwareModule() : ProtobufModule("remotehardware", meshtastic_PortNum_REMOTE_HARDWARE_APP, &meshtastic_HardwareMessage_msg), concurrency::OSThread("RemoteHardwareModule") { + // restrict to the gpio channel for rx + boundChannel = Channels::gpioChannel; + + // Pull available pin allowlist from config and build a bitmask out of it for fast comparisons later + for (uint8_t i = 0; i < 4; i++) { + availablePins += 1ULL << moduleConfig.remote_hardware.available_pins[i].gpio_pin; + } } bool RemoteHardwareModule::handleReceivedProtobuf(const meshtastic_MeshPacket &req, meshtastic_HardwareMessage *pptr) @@ -60,13 +86,13 @@ bool RemoteHardwareModule::handleReceivedProtobuf(const meshtastic_MeshPacket &r // Print notification to LCD screen screen->print("Write GPIOs\n"); + pinModes(p.gpio_mask, OUTPUT, availablePins); for (uint8_t i = 0; i < NUM_GPIOS; i++) { uint64_t mask = 1ULL << i; - if (p.gpio_mask & mask) { + if (p.gpio_mask & mask && pinAccessAllowed(availablePins, i)) { digitalWrite(i, (p.gpio_value & mask) ? 1 : 0); } } - pinModes(p.gpio_mask, OUTPUT); break; } @@ -76,7 +102,7 @@ bool RemoteHardwareModule::handleReceivedProtobuf(const meshtastic_MeshPacket &r if (screen) screen->print("Read GPIOs\n"); - uint64_t res = digitalReads(p.gpio_mask); + uint64_t res = digitalReads(p.gpio_mask, availablePins); // Send the reply meshtastic_HardwareMessage r = meshtastic_HardwareMessage_init_default; @@ -116,11 +142,10 @@ bool RemoteHardwareModule::handleReceivedProtobuf(const meshtastic_MeshPacket &r int32_t RemoteHardwareModule::runOnce() { if (moduleConfig.remote_hardware.enabled && watchGpios) { - uint32_t now = millis(); - if (now - lastWatchMsec >= WATCH_INTERVAL_MSEC) { - uint64_t curVal = digitalReads(watchGpios); - lastWatchMsec = now; + if (!Throttle::isWithinTimespanMs(lastWatchMsec, WATCH_INTERVAL_MSEC)) { + uint64_t curVal = digitalReads(watchGpios, availablePins); + lastWatchMsec = millis(); if (curVal != previousWatch) { previousWatch = curVal; @@ -131,7 +156,7 @@ int32_t RemoteHardwareModule::runOnce() r.type = meshtastic_HardwareMessage_Type_GPIOS_CHANGED; r.gpio_value = curVal; meshtastic_MeshPacket *p = allocDataProtobuf(r); - service.sendToMesh(p); + service->sendToMesh(p); } } } else { diff --git a/src/modules/RemoteHardwareModule.h b/src/modules/RemoteHardwareModule.h index dd39f5b69..4dc31d405 100644 --- a/src/modules/RemoteHardwareModule.h +++ b/src/modules/RemoteHardwareModule.h @@ -17,6 +17,9 @@ class RemoteHardwareModule : public ProtobufModule, /// The timestamp of our last watch event (we throttle watches to 1 change every 30 seconds) uint32_t lastWatchMsec = 0; + /// A bitmask of GPIOs that are exposed to the mesh if undefined access is not enabled + uint64_t availablePins = 0; + public: /** Constructor * name is for debugging output diff --git a/src/modules/RoutingModule.cpp b/src/modules/RoutingModule.cpp index edeb1fb86..3b7be1ab7 100644 --- a/src/modules/RoutingModule.cpp +++ b/src/modules/RoutingModule.cpp @@ -1,4 +1,5 @@ #include "RoutingModule.h" +#include "Default.h" #include "MeshService.h" #include "NodeDB.h" #include "Router.h" @@ -12,11 +13,24 @@ bool RoutingModule::handleReceivedProtobuf(const meshtastic_MeshPacket &mp, mesh printPacket("Routing sniffing", &mp); router->sniffReceived(&mp, r); + bool maybePKI = + mp.which_payload_variant == meshtastic_MeshPacket_encrypted_tag && mp.channel == 0 && mp.to != NODENUM_BROADCAST; + // Beginning of logic whether to drop the packet based on Rebroadcast mode + if (mp.which_payload_variant == meshtastic_MeshPacket_encrypted_tag && + (config.device.rebroadcast_mode == meshtastic_Config_DeviceConfig_RebroadcastMode_LOCAL_ONLY || + config.device.rebroadcast_mode == meshtastic_Config_DeviceConfig_RebroadcastMode_KNOWN_ONLY)) { + if (!maybePKI) + return false; + if ((nodeDB->getMeshNode(mp.from) == NULL || !nodeDB->getMeshNode(mp.from)->has_user) && + (nodeDB->getMeshNode(mp.to) == NULL || !nodeDB->getMeshNode(mp.to)->has_user)) + return false; + } + // FIXME - move this to a non promsicious PhoneAPI module? // Note: we are careful not to send back packets that started with the phone back to the phone - if ((mp.to == NODENUM_BROADCAST || mp.to == nodeDB.getNodeNum()) && (mp.from != 0)) { + if ((mp.to == NODENUM_BROADCAST || isToUs(&mp)) && (mp.from != 0)) { printPacket("Delivering rx packet", &mp); - service.handleFromRadio(&mp); + service->handleFromRadio(&mp); } return false; // Let others look at this message also if they want @@ -36,16 +50,37 @@ meshtastic_MeshPacket *RoutingModule::allocReply() return NULL; } -void RoutingModule::sendAckNak(meshtastic_Routing_Error err, NodeNum to, PacketId idFrom, ChannelIndex chIndex) +void RoutingModule::sendAckNak(meshtastic_Routing_Error err, NodeNum to, PacketId idFrom, ChannelIndex chIndex, uint8_t hopStart, + uint8_t hopLimit) { - auto p = allocAckNak(err, to, idFrom, chIndex); + auto p = allocAckNak(err, to, idFrom, chIndex, hopStart, hopLimit); router->sendLocal(p); // we sometimes send directly to the local node } +uint8_t RoutingModule::getHopLimitForResponse(uint8_t hopStart, uint8_t hopLimit) +{ + if (hopStart != 0) { + // Hops used by the request. If somebody in between running modified firmware modified it, ignore it + uint8_t hopsUsed = hopStart < hopLimit ? config.lora.hop_limit : hopStart - hopLimit; + if (hopsUsed > config.lora.hop_limit) { +// In event mode, we never want to send packets with more than our default 3 hops. +#if !(EVENTMODE) // This falls through to the default. + return hopsUsed; // If the request used more hops than the limit, use the same amount of hops +#endif + } else if ((uint8_t)(hopsUsed + 2) < config.lora.hop_limit) { + return hopsUsed + 2; // Use only the amount of hops needed with some margin as the way back may be different + } + } + return Default::getConfiguredOrDefaultHopLimit(config.lora.hop_limit); // Use the default hop limit +} + RoutingModule::RoutingModule() : ProtobufModule("routing", meshtastic_PortNum_ROUTING_APP, &meshtastic_Routing_msg) { isPromiscuous = true; - encryptedOk = config.device.rebroadcast_mode != meshtastic_Config_DeviceConfig_RebroadcastMode_LOCAL_ONLY && - config.device.rebroadcast_mode != meshtastic_Config_DeviceConfig_RebroadcastMode_KNOWN_ONLY; -} + + // moved the ReboradcastMode logic into handleReceivedProtobuf + // LocalOnly requires either the from or to to be a known node + // knownOnly specifically requires the from to be a known node. + encryptedOk = true; +} \ No newline at end of file diff --git a/src/modules/RoutingModule.h b/src/modules/RoutingModule.h index 06e76cfb4..f085b307b 100644 --- a/src/modules/RoutingModule.h +++ b/src/modules/RoutingModule.h @@ -13,7 +13,11 @@ class RoutingModule : public ProtobufModule */ RoutingModule(); - void sendAckNak(meshtastic_Routing_Error err, NodeNum to, PacketId idFrom, ChannelIndex chIndex); + void sendAckNak(meshtastic_Routing_Error err, NodeNum to, PacketId idFrom, ChannelIndex chIndex, uint8_t hopStart = 0, + uint8_t hopLimit = 0); + + // Given the hopStart and hopLimit upon reception of a request, return the hop limit to use for the response + uint8_t getHopLimitForResponse(uint8_t hopStart, uint8_t hopLimit); protected: friend class Router; diff --git a/src/modules/SerialModule.cpp b/src/modules/SerialModule.cpp index 820e1fb62..d40b59345 100644 --- a/src/modules/SerialModule.cpp +++ b/src/modules/SerialModule.cpp @@ -1,4 +1,5 @@ #include "SerialModule.h" +#include "GeoCoord.h" #include "MeshService.h" #include "NMEAWPL.h" #include "NodeDB.h" @@ -6,6 +7,7 @@ #include "Router.h" #include "configuration.h" #include +#include /* SerialModule @@ -61,12 +63,15 @@ SerialModuleRadio *serialModuleRadio; #if defined(TTGO_T_ECHO) || defined(CANARYONE) SerialModule::SerialModule() : StreamAPI(&Serial), concurrency::OSThread("SerialModule") {} static Print *serialPrint = &Serial; +#elif defined(CONFIG_IDF_TARGET_ESP32C6) +SerialModule::SerialModule() : StreamAPI(&Serial1), concurrency::OSThread("SerialModule") {} +static Print *serialPrint = &Serial1; #else SerialModule::SerialModule() : StreamAPI(&Serial2), concurrency::OSThread("SerialModule") {} static Print *serialPrint = &Serial2; #endif -char serialBytes[meshtastic_Constants_DATA_PAYLOAD_LEN]; +char serialBytes[512]; size_t serialPayloadSize; SerialModuleRadio::SerialModuleRadio() : MeshModule("SerialModuleRadio") @@ -96,8 +101,7 @@ SerialModuleRadio::SerialModuleRadio() : MeshModule("SerialModuleRadio") */ bool SerialModule::checkIsConnected() { - uint32_t now = millis(); - return (now - lastContactMsec) < SERIAL_CONNECTION_TIMEOUT; + return Throttle::isWithinTimespanMs(lastContactMsec, SERIAL_CONNECTION_TIMEOUT); } int32_t SerialModule::runOnce() @@ -126,12 +130,26 @@ int32_t SerialModule::runOnce() uint32_t baud = getBaudRate(); if (moduleConfig.serial.override_console_serial_port) { +#ifdef RP2040_SLOW_CLOCK + Serial2.flush(); + serialPrint = &Serial2; +#else Serial.flush(); serialPrint = &Serial; +#endif // Give it a chance to flush out 💩 delay(10); } -#ifdef ARCH_ESP32 +#if defined(CONFIG_IDF_TARGET_ESP32C6) + if (moduleConfig.serial.rxd && moduleConfig.serial.txd) { + Serial1.setRxBufferSize(RX_BUFFER); + Serial1.begin(baud, SERIAL_8N1, moduleConfig.serial.rxd, moduleConfig.serial.txd); + } else { + Serial.begin(baud); + Serial.setTimeout(moduleConfig.serial.timeout > 0 ? moduleConfig.serial.timeout : TIMEOUT); + } + +#elif defined(ARCH_ESP32) if (moduleConfig.serial.rxd && moduleConfig.serial.txd) { Serial2.setRxBufferSize(RX_BUFFER); @@ -151,8 +169,13 @@ int32_t SerialModule::runOnce() Serial2.begin(baud, SERIAL_8N1); Serial2.setTimeout(moduleConfig.serial.timeout > 0 ? moduleConfig.serial.timeout : TIMEOUT); } else { +#ifdef RP2040_SLOW_CLOCK + Serial2.begin(baud, SERIAL_8N1); + Serial2.setTimeout(moduleConfig.serial.timeout > 0 ? moduleConfig.serial.timeout : TIMEOUT); +#else Serial.begin(baud, SERIAL_8N1); Serial.setTimeout(moduleConfig.serial.timeout > 0 ? moduleConfig.serial.timeout : TIMEOUT); +#endif } #else Serial.begin(baud, SERIAL_8N1); @@ -169,29 +192,38 @@ int32_t SerialModule::runOnce() } else { if (moduleConfig.serial.mode == meshtastic_ModuleConfig_SerialConfig_Serial_Mode_PROTO) { return runOncePart(); - } else if (moduleConfig.serial.mode == meshtastic_ModuleConfig_SerialConfig_Serial_Mode_NMEA) { + } else if ((moduleConfig.serial.mode == meshtastic_ModuleConfig_SerialConfig_Serial_Mode_NMEA) && HAS_GPS) { // in NMEA mode send out GGA every 2 seconds, Don't read from Port - if (millis() - lastNmeaTime > 2000) { + if (!Throttle::isWithinTimespanMs(lastNmeaTime, 2000)) { lastNmeaTime = millis(); printGGA(outbuf, sizeof(outbuf), localPosition); serialPrint->printf("%s", outbuf); } - } else if (moduleConfig.serial.mode == meshtastic_ModuleConfig_SerialConfig_Serial_Mode_CALTOPO) { - if (millis() - lastNmeaTime > 10000) { + } else if ((moduleConfig.serial.mode == meshtastic_ModuleConfig_SerialConfig_Serial_Mode_CALTOPO) && HAS_GPS) { + if (!Throttle::isWithinTimespanMs(lastNmeaTime, 10000)) { lastNmeaTime = millis(); uint32_t readIndex = 0; - const meshtastic_NodeInfoLite *tempNodeInfo = nodeDB.readNextMeshNode(readIndex); + const meshtastic_NodeInfoLite *tempNodeInfo = nodeDB->readNextMeshNode(readIndex); while (tempNodeInfo != NULL && tempNodeInfo->has_user && hasValidPosition(tempNodeInfo)) { printWPL(outbuf, sizeof(outbuf), tempNodeInfo->position, tempNodeInfo->user.long_name, true); serialPrint->printf("%s", outbuf); - tempNodeInfo = nodeDB.readNextMeshNode(readIndex); + tempNodeInfo = nodeDB->readNextMeshNode(readIndex); } } } + #if !defined(TTGO_T_ECHO) && !defined(CANARYONE) - else { + else if ((moduleConfig.serial.mode == meshtastic_ModuleConfig_SerialConfig_Serial_Mode_WS85)) { + processWXSerial(); + + } else { +#if defined(CONFIG_IDF_TARGET_ESP32C6) + while (Serial1.available()) { + serialPayloadSize = Serial1.readBytes(serialBytes, meshtastic_Constants_DATA_PAYLOAD_LEN); +#else while (Serial2.available()) { serialPayloadSize = Serial2.readBytes(serialBytes, meshtastic_Constants_DATA_PAYLOAD_LEN); +#endif serialModuleRadio->sendPayload(); } } @@ -203,6 +235,27 @@ int32_t SerialModule::runOnce() } } +/** + * Sends telemetry packet over the mesh network. + * + * @param m The telemetry data to be sent + * + * @return void + * + * @throws None + */ +void SerialModule::sendTelemetry(meshtastic_Telemetry m) +{ + meshtastic_MeshPacket *p = router->allocForSending(); + p->decoded.portnum = meshtastic_PortNum_TELEMETRY_APP; + p->decoded.payload.size = + pb_encode_to_bytes(p->decoded.payload.bytes, sizeof(p->decoded.payload.bytes), &meshtastic_Telemetry_msg, &m); + p->to = NODENUM_BROADCAST; + p->decoded.want_response = false; + p->priority = meshtastic_MeshPacket_Priority_RELIABLE; + service->sendToMesh(p, RX_SRC_LOCAL, true); +} + /** * Allocates a new mesh packet for use as a reply to a received packet. * @@ -236,7 +289,7 @@ void SerialModuleRadio::sendPayload(NodeNum dest, bool wantReplies) p->decoded.payload.size = serialPayloadSize; // You must specify how many bytes are in the reply memcpy(p->decoded.payload.bytes, serialBytes, p->decoded.payload.size); - service.sendToMesh(p); + service->sendToMesh(p); } /** @@ -255,9 +308,9 @@ ProcessMessage SerialModuleRadio::handleReceived(const meshtastic_MeshPacket &mp auto &p = mp.decoded; // 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); + // nodeDB->getNodeNum(), mp.from, mp.to, mp.id, p.payload.size, p.payload.bytes); - if (getFrom(&mp) == nodeDB.getNodeNum()) { + if (!isFromUs(&mp)) { /* * If moduleConfig.serial.echo is true, then echo the packets that are sent out @@ -280,13 +333,14 @@ ProcessMessage SerialModuleRadio::handleReceived(const meshtastic_MeshPacket &mp moduleConfig.serial.mode == meshtastic_ModuleConfig_SerialConfig_Serial_Mode_SIMPLE) { serialPrint->write(p.payload.bytes, p.payload.size); } else if (moduleConfig.serial.mode == meshtastic_ModuleConfig_SerialConfig_Serial_Mode_TEXTMSG) { - meshtastic_NodeInfoLite *node = nodeDB.getMeshNode(getFrom(&mp)); + meshtastic_NodeInfoLite *node = nodeDB->getMeshNode(getFrom(&mp)); String sender = (node && node->has_user) ? node->user.short_name : "???"; serialPrint->println(); serialPrint->printf("%s: %s", sender, p.payload.bytes); serialPrint->println(); - } else if (moduleConfig.serial.mode == meshtastic_ModuleConfig_SerialConfig_Serial_Mode_NMEA || - moduleConfig.serial.mode == meshtastic_ModuleConfig_SerialConfig_Serial_Mode_CALTOPO) { + } else if ((moduleConfig.serial.mode == meshtastic_ModuleConfig_SerialConfig_Serial_Mode_NMEA || + moduleConfig.serial.mode == meshtastic_ModuleConfig_SerialConfig_Serial_Mode_CALTOPO) && + HAS_GPS) { // Decode the Payload some more meshtastic_Position scratch; meshtastic_Position *decoded = NULL; @@ -296,7 +350,7 @@ ProcessMessage SerialModuleRadio::handleReceived(const meshtastic_MeshPacket &mp decoded = &scratch; } // send position packet as WPL to the serial port - printWPL(outbuf, sizeof(outbuf), *decoded, nodeDB.getMeshNode(getFrom(&mp))->user.long_name, + printWPL(outbuf, sizeof(outbuf), *decoded, nodeDB->getMeshNode(getFrom(&mp))->user.long_name, moduleConfig.serial.mode == meshtastic_ModuleConfig_SerialConfig_Serial_Mode_CALTOPO); serialPrint->printf("%s", outbuf); } @@ -346,4 +400,162 @@ uint32_t SerialModule::getBaudRate() } return BAUD; } + +/** + * Process the received weather station serial data, extract wind, voltage, and temperature information, + * calculate averages and send telemetry data over the mesh network. + * + * @return void + */ +void SerialModule::processWXSerial() +{ +#if !defined(TTGO_T_ECHO) && !defined(CANARYONE) && !defined(CONFIG_IDF_TARGET_ESP32C6) + static unsigned int lastAveraged = 0; + static unsigned int averageIntervalMillis = 300000; // 5 minutes hard coded. + static double dir_sum_sin = 0; + static double dir_sum_cos = 0; + static float velSum = 0; + static float gust = 0; + static float lull = -1; + static int velCount = 0; + static int dirCount = 0; + static char windDir[4] = "xxx"; // Assuming windDir is 3 characters long + null terminator + static char windVel[5] = "xx.x"; // Assuming windVel is 4 characters long + null terminator + static char windGust[5] = "xx.x"; // Assuming windGust is 4 characters long + null terminator + static char batVoltage[5] = "0.0V"; + static char capVoltage[5] = "0.0V"; + static float batVoltageF = 0; + static float capVoltageF = 0; + bool gotwind = false; + + while (Serial2.available()) { + // clear serialBytes buffer + memset(serialBytes, '\0', sizeof(serialBytes)); + // memset(formattedString, '\0', sizeof(formattedString)); + serialPayloadSize = Serial2.readBytes(serialBytes, 512); + // check for a strings we care about + // example output of serial data fields from the WS85 + // WindDir = 79 + // WindSpeed = 0.5 + // WindGust = 0.6 + // GXTS04Temp = 24.4 + if (serialPayloadSize > 0) { + // Define variables for line processing + int lineStart = 0; + int lineEnd = -1; + + // Process each byte in the received data + for (size_t i = 0; i < serialPayloadSize; i++) { + // go until we hit the end of line and then process the line + if (serialBytes[i] == '\n') { + lineEnd = i; + // Extract the current line + char line[meshtastic_Constants_DATA_PAYLOAD_LEN]; + memset(line, '\0', sizeof(line)); + memcpy(line, &serialBytes[lineStart], lineEnd - lineStart); + + if (strstr(line, "Wind") != NULL) // we have a wind line + { + gotwind = true; + // Find the positions of "=" signs in the line + char *windDirPos = strstr(line, "WindDir = "); + char *windSpeedPos = strstr(line, "WindSpeed = "); + char *windGustPos = strstr(line, "WindGust = "); + + if (windDirPos != NULL) { + // Extract data after "=" for WindDir + strcpy(windDir, windDirPos + 15); // Add 15 to skip "WindDir = " + double radians = toRadians(strtof(windDir, nullptr)); + dir_sum_sin += sin(radians); + dir_sum_cos += cos(radians); + dirCount++; + } else if (windSpeedPos != NULL) { + // Extract data after "=" for WindSpeed + strcpy(windVel, windSpeedPos + 15); // Add 15 to skip "WindSpeed = " + float newv = strtof(windVel, nullptr); + velSum += newv; + velCount++; + if (newv < lull || lull == -1) + lull = newv; + + } else if (windGustPos != NULL) { + strcpy(windGust, windGustPos + 15); // Add 15 to skip "WindSpeed = " + float newg = strtof(windGust, nullptr); + if (newg > gust) + gust = newg; + } + + // these are also voltage data we care about possibly + } else if (strstr(line, "BatVoltage") != NULL) { // we have a battVoltage line + char *batVoltagePos = strstr(line, "BatVoltage = "); + if (batVoltagePos != NULL) { + strcpy(batVoltage, batVoltagePos + 17); // 18 for ws 80, 17 for ws85 + batVoltageF = strtof(batVoltage, nullptr); + break; // last possible data we want so break + } + } else if (strstr(line, "CapVoltage") != NULL) { // we have a cappVoltage line + char *capVoltagePos = strstr(line, "CapVoltage = "); + if (capVoltagePos != NULL) { + strcpy(capVoltage, capVoltagePos + 17); // 18 for ws 80, 17 for ws85 + capVoltageF = strtof(capVoltage, nullptr); + } + } + + // Update lineStart for the next line + lineStart = lineEnd + 1; + } + } + break; + // clear the input buffer + while (Serial2.available() > 0) { + Serial2.read(); // Read and discard the bytes in the input buffer + } + } + } + if (gotwind) { + + LOG_INFO("WS85 : %i %.1fg%.1f %.1fv %.1fv\n", atoi(windDir), strtof(windVel, nullptr), strtof(windGust, nullptr), + batVoltageF, capVoltageF); + } + if (gotwind && !Throttle::isWithinTimespanMs(lastAveraged, averageIntervalMillis)) { + // calulate averages and send to the mesh + float velAvg = 1.0 * velSum / velCount; + + double avgSin = dir_sum_sin / dirCount; + double avgCos = dir_sum_cos / dirCount; + + double avgRadians = atan2(avgSin, avgCos); + float dirAvg = toDegrees(avgRadians); + + if (dirAvg < 0) { + dirAvg += 360.0; + } + lastAveraged = millis(); + + // make a telemetry packet with the data + meshtastic_Telemetry m = meshtastic_Telemetry_init_zero; + m.which_variant = meshtastic_Telemetry_environment_metrics_tag; + m.variant.environment_metrics.wind_speed = velAvg; + m.variant.environment_metrics.wind_direction = dirAvg; + m.variant.environment_metrics.wind_gust = gust; + m.variant.environment_metrics.wind_lull = lull; + m.variant.environment_metrics.voltage = + capVoltageF > batVoltageF ? capVoltageF : batVoltageF; // send the larger of the two voltage values. + + LOG_INFO("WS85 Transmit speed=%fm/s, direction=%d , lull=%f, gust=%f, voltage=%f\n", + m.variant.environment_metrics.wind_speed, m.variant.environment_metrics.wind_direction, + m.variant.environment_metrics.wind_lull, m.variant.environment_metrics.wind_gust, + m.variant.environment_metrics.voltage); + + sendTelemetry(m); + + // reset counters and gust/lull + velSum = velCount = dirCount = 0; + dir_sum_sin = dir_sum_cos = 0; + gust = 0; + lull = -1; + } +#endif + return; +} #endif \ No newline at end of file diff --git a/src/modules/SerialModule.h b/src/modules/SerialModule.h index 18ad8a1ba..fa86db28f 100644 --- a/src/modules/SerialModule.h +++ b/src/modules/SerialModule.h @@ -28,6 +28,8 @@ class SerialModule : public StreamAPI, private concurrency::OSThread private: uint32_t getBaudRate(); + void sendTelemetry(meshtastic_Telemetry m); + void processWXSerial(); }; extern SerialModule *serialModule; diff --git a/src/modules/esp32/StoreForwardModule.cpp b/src/modules/StoreForwardModule.cpp similarity index 52% rename from src/modules/esp32/StoreForwardModule.cpp rename to src/modules/StoreForwardModule.cpp index cb1552521..e0092839f 100644 --- a/src/modules/esp32/StoreForwardModule.cpp +++ b/src/modules/StoreForwardModule.cpp @@ -17,6 +17,7 @@ #include "NodeDB.h" #include "RTC.h" #include "Router.h" +#include "Throttle.h" #include "airtime.h" #include "configuration.h" #include "memGet.h" @@ -31,23 +32,21 @@ StoreForwardModule *storeForwardModule; int32_t StoreForwardModule::runOnce() { -#ifdef ARCH_ESP32 +#if defined(ARCH_ESP32) || defined(ARCH_PORTDUINO) if (moduleConfig.store_forward.enabled && is_server) { // Send out the message queue. if (this->busy) { - // Only send packets if the channel is less than 25% utilized. - if (airTime->isTxAllowedChannelUtil(true)) { - storeForwardModule->sendPayload(this->busyTo, this->packetHistoryTXQueue_index); - if (this->packetHistoryTXQueue_index < packetHistoryTXQueue_size - 1) { - this->packetHistoryTXQueue_index++; - } else { - this->packetHistoryTXQueue_index = 0; + // Only send packets if the channel is less than 25% utilized and until historyReturnMax + if (airTime->isTxAllowedChannelUtil(true) && this->requestCount < this->historyReturnMax) { + if (!storeForwardModule->sendPayload(this->busyTo, this->last_time)) { + this->requestCount = 0; this->busy = false; } } - } else if ((millis() - lastHeartbeat > (heartbeatInterval * 1000)) && airTime->isTxAllowedChannelUtil(true)) { + } else if (this->heartbeat && (!Throttle::isWithinTimespanMs(lastHeartbeat, heartbeatInterval * 1000)) && + airTime->isTxAllowedChannelUtil(true)) { lastHeartbeat = millis(); - LOG_INFO("*** Sending heartbeat\n"); + LOG_INFO("Sending heartbeat\n"); meshtastic_StoreAndForward sf = meshtastic_StoreAndForward_init_zero; sf.rr = meshtastic_StoreAndForward_RequestResponse_ROUTER_HEARTBEAT; sf.which_variant = meshtastic_StoreAndForward_heartbeat_tag; @@ -71,11 +70,8 @@ void StoreForwardModule::populatePSRAM() https://learn.upesy.com/en/programmation/psram.html#psram-tab */ - LOG_DEBUG("*** Before PSRAM initialization: heap %d/%d PSRAM %d/%d\n", memGet.getFreeHeap(), memGet.getHeapSize(), - memGet.getFreePsram(), memGet.getPsramSize()); - - this->packetHistoryTXQueue = - static_cast(ps_calloc(this->historyReturnMax, sizeof(PacketHistoryStruct))); + LOG_DEBUG("Before PSRAM init: heap %d/%d PSRAM %d/%d\n", memGet.getFreeHeap(), memGet.getHeapSize(), memGet.getFreePsram(), + memGet.getPsramSize()); /* Use a maximum of 2/3 the available PSRAM unless otherwise specified. Note: This needs to be done after every thing that would use PSRAM @@ -83,86 +79,102 @@ void StoreForwardModule::populatePSRAM() uint32_t numberOfPackets = (this->records ? this->records : (((memGet.getFreePsram() / 3) * 2) / sizeof(PacketHistoryStruct))); this->records = numberOfPackets; - +#if defined(ARCH_ESP32) this->packetHistory = static_cast(ps_calloc(numberOfPackets, sizeof(PacketHistoryStruct))); +#elif defined(ARCH_PORTDUINO) + this->packetHistory = static_cast(calloc(numberOfPackets, sizeof(PacketHistoryStruct))); - LOG_DEBUG("*** After PSRAM initialization: heap %d/%d PSRAM %d/%d\n", memGet.getFreeHeap(), memGet.getHeapSize(), - memGet.getFreePsram(), memGet.getPsramSize()); - LOG_DEBUG("*** numberOfPackets for packetHistory - %u\n", numberOfPackets); +#endif + + LOG_DEBUG("After PSRAM init: heap %d/%d PSRAM %d/%d\n", memGet.getFreeHeap(), memGet.getHeapSize(), memGet.getFreePsram(), + memGet.getPsramSize()); + LOG_DEBUG("numberOfPackets for packetHistory - %u\n", numberOfPackets); } /** * Sends messages from the message history to the specified recipient. * - * @param msAgo The number of milliseconds ago from which to start sending messages. + * @param sAgo The number of seconds ago from which to start sending messages. * @param to The recipient ID to send the messages to. */ -void StoreForwardModule::historySend(uint32_t msAgo, uint32_t to) +void StoreForwardModule::historySend(uint32_t secAgo, uint32_t to) { - uint32_t lastIndex = lastRequest.find(to) != lastRequest.end() ? lastRequest[to] : 0; - uint32_t queueSize = storeForwardModule->historyQueueCreate(msAgo, to, &lastIndex); + this->last_time = getTime() < secAgo ? 0 : getTime() - secAgo; + uint32_t queueSize = getNumAvailablePackets(to, last_time); + if (queueSize > this->historyReturnMax) + queueSize = this->historyReturnMax; if (queueSize) { - LOG_INFO("*** S&F - Sending %u message(s)\n", queueSize); + LOG_INFO("S&F - Sending %u message(s)\n", queueSize); this->busy = true; // runOnce() will pickup the next steps once busy = true. this->busyTo = to; } else { - LOG_INFO("*** S&F - No history to send\n"); + LOG_INFO("S&F - No history\n"); } meshtastic_StoreAndForward sf = meshtastic_StoreAndForward_init_zero; sf.rr = meshtastic_StoreAndForward_RequestResponse_ROUTER_HISTORY; sf.which_variant = meshtastic_StoreAndForward_history_tag; sf.variant.history.history_messages = queueSize; - sf.variant.history.window = msAgo; - sf.variant.history.last_request = lastIndex; - lastRequest[to] = lastIndex; + sf.variant.history.window = secAgo * 1000; + sf.variant.history.last_request = lastRequest[to]; storeForwardModule->sendMessage(to, sf); + setIntervalFromNow(this->packetTimeMax); // Delay start of sending payloads } /** - * Creates a new history queue with messages that were received within the specified time frame. + * Returns the number of available packets in the message history for a specified destination node. * - * @param msAgo The number of milliseconds ago to start the history queue. - * @param to The NodeNum of the recipient. - * @param last_request_index The index in the packet history of the last request from this node. - * @return The ID of the newly created history queue. + * @param dest The destination node number. + * @param last_time The relative time to start counting messages from. + * @return The number of available packets in the message history. */ -uint32_t StoreForwardModule::historyQueueCreate(uint32_t msAgo, uint32_t to, uint32_t *last_request_index) +uint32_t StoreForwardModule::getNumAvailablePackets(NodeNum dest, uint32_t last_time) { - - this->packetHistoryTXQueue_size = 0; - // If our history was cleared, ignore the last request index - uint32_t last_index = *last_request_index > this->packetHistoryCurrent ? 0 : *last_request_index; - - for (uint32_t i = last_index; i < this->packetHistoryCurrent; i++) { - /* - LOG_DEBUG("SF historyQueueCreate\n"); - LOG_DEBUG("SF historyQueueCreate - time %d\n", this->packetHistory[i].time); - LOG_DEBUG("SF historyQueueCreate - millis %d\n", millis()); - LOG_DEBUG("SF historyQueueCreate - math %d\n", (millis() - msAgo)); - */ - if (this->packetHistory[i].time && (this->packetHistory[i].time < (millis() - msAgo))) { - /* Copy the messages that were received by the router in the last msAgo - to the packetHistoryTXQueue structure. - Client not interested in packets from itself and only in broadcast packets or packets towards it. */ - if (this->packetHistory[i].from != to && - (this->packetHistory[i].to == NODENUM_BROADCAST || this->packetHistory[i].to == to)) { - this->packetHistoryTXQueue[this->packetHistoryTXQueue_size].time = this->packetHistory[i].time; - this->packetHistoryTXQueue[this->packetHistoryTXQueue_size].to = this->packetHistory[i].to; - this->packetHistoryTXQueue[this->packetHistoryTXQueue_size].from = this->packetHistory[i].from; - this->packetHistoryTXQueue[this->packetHistoryTXQueue_size].channel = this->packetHistory[i].channel; - this->packetHistoryTXQueue[this->packetHistoryTXQueue_size].payload_size = this->packetHistory[i].payload_size; - memcpy(this->packetHistoryTXQueue[this->packetHistoryTXQueue_size].payload, this->packetHistory[i].payload, - meshtastic_Constants_DATA_PAYLOAD_LEN); - this->packetHistoryTXQueue_size++; - *last_request_index = i + 1; // Set to one higher such that we don't send the same message again - - LOG_DEBUG("*** PacketHistoryStruct time=%d, msg=%s\n", this->packetHistory[i].time, - this->packetHistory[i].payload); + uint32_t count = 0; + if (lastRequest.find(dest) == lastRequest.end()) { + lastRequest.emplace(dest, 0); + } + for (uint32_t i = lastRequest[dest]; i < this->packetHistoryTotalCount; i++) { + if (this->packetHistory[i].time && (this->packetHistory[i].time > last_time)) { + // Client is only interested in packets not from itself and only in broadcast packets or packets towards it. + if (this->packetHistory[i].from != dest && + (this->packetHistory[i].to == NODENUM_BROADCAST || this->packetHistory[i].to == dest)) { + count++; } } } - return this->packetHistoryTXQueue_size; + return count; +} + +/** + * Allocates a mesh packet for sending to the phone. + * + * @return A pointer to the allocated mesh packet or nullptr if none is available. + */ +meshtastic_MeshPacket *StoreForwardModule::getForPhone() +{ + if (moduleConfig.store_forward.enabled && is_server) { + NodeNum to = nodeDB->getNodeNum(); + if (!this->busy) { + // Get number of packets we're going to send in this loop + uint32_t histSize = getNumAvailablePackets(to, 0); // No time limit + if (histSize) { + this->busy = true; + this->busyTo = to; + } else { + return nullptr; + } + } + + // We're busy with sending to us until no payload is available anymore + if (this->busy && this->busyTo == to) { + meshtastic_MeshPacket *p = preparePayload(to, 0, true); // No time limit + if (!p) // No more messages to send + this->busy = false; + return p; + } + } + return nullptr; } /** @@ -174,62 +186,97 @@ void StoreForwardModule::historyAdd(const meshtastic_MeshPacket &mp) { const auto &p = mp.decoded; - if (this->packetHistoryCurrent < this->records) { - this->packetHistory[this->packetHistoryCurrent].time = millis(); - this->packetHistory[this->packetHistoryCurrent].to = mp.to; - this->packetHistory[this->packetHistoryCurrent].channel = mp.channel; - this->packetHistory[this->packetHistoryCurrent].from = mp.from; - this->packetHistory[this->packetHistoryCurrent].payload_size = p.payload.size; - memcpy(this->packetHistory[this->packetHistoryCurrent].payload, p.payload.bytes, meshtastic_Constants_DATA_PAYLOAD_LEN); - - this->packetHistoryCurrent++; - this->packetHistoryMax++; - } else { - // TODO: Overwrite the oldest message in the history buffer when it is full. - LOG_WARN("*** S&F - PSRAM Full. Packet is not added to the history.\n"); + if (this->packetHistoryTotalCount == this->records) { + LOG_WARN("S&F - PSRAM Full. Starting overwrite.\n"); + this->packetHistoryTotalCount = 0; + for (auto &i : lastRequest) { + i.second = 0; // Clear the last request index for each client device + } } -} -meshtastic_MeshPacket *StoreForwardModule::allocReply() -{ - auto reply = allocDataPacket(); // Allocate a packet for sending - return reply; + this->packetHistory[this->packetHistoryTotalCount].time = getTime(); + this->packetHistory[this->packetHistoryTotalCount].to = mp.to; + this->packetHistory[this->packetHistoryTotalCount].channel = mp.channel; + this->packetHistory[this->packetHistoryTotalCount].from = getFrom(&mp); + this->packetHistory[this->packetHistoryTotalCount].payload_size = p.payload.size; + memcpy(this->packetHistory[this->packetHistoryTotalCount].payload, p.payload.bytes, meshtastic_Constants_DATA_PAYLOAD_LEN); + + this->packetHistoryTotalCount++; } /** * Sends a payload to a specified destination node using the store and forward mechanism. * * @param dest The destination node number. - * @param packetHistory_index The index of the packet in the packet history buffer. + * @param last_time The relative time to start sending messages from. + * @return True if a packet was successfully sent, false otherwise. */ -void StoreForwardModule::sendPayload(NodeNum dest, uint32_t packetHistory_index) +bool StoreForwardModule::sendPayload(NodeNum dest, uint32_t last_time) { - LOG_INFO("*** Sending S&F Payload\n"); - meshtastic_MeshPacket *p = allocReply(); - - p->to = dest; - p->from = this->packetHistoryTXQueue[packetHistory_index].from; - p->channel = this->packetHistoryTXQueue[packetHistory_index].channel; - - // Let's assume that if the router received the S&F request that the client is in range. - // TODO: Make this configurable. - p->want_ack = false; - - meshtastic_StoreAndForward sf = meshtastic_StoreAndForward_init_zero; - sf.which_variant = meshtastic_StoreAndForward_text_tag; - sf.variant.text.size = this->packetHistoryTXQueue[packetHistory_index].payload_size; - memcpy(sf.variant.text.bytes, this->packetHistoryTXQueue[packetHistory_index].payload, - this->packetHistoryTXQueue[packetHistory_index].payload_size); - if (this->packetHistoryTXQueue[packetHistory_index].to == NODENUM_BROADCAST) { - sf.rr = meshtastic_StoreAndForward_RequestResponse_ROUTER_TEXT_BROADCAST; - } else { - sf.rr = meshtastic_StoreAndForward_RequestResponse_ROUTER_TEXT_DIRECT; + meshtastic_MeshPacket *p = preparePayload(dest, last_time); + if (p) { + LOG_INFO("Sending S&F Payload\n"); + service->sendToMesh(p); + this->requestCount++; + return true; } + return false; +} - p->decoded.payload.size = - pb_encode_to_bytes(p->decoded.payload.bytes, sizeof(p->decoded.payload.bytes), &meshtastic_StoreAndForward_msg, &sf); +/** + * Prepares a payload to be sent to a specified destination node from the S&F packet history. + * + * @param dest The destination node number. + * @param last_time The relative time to start sending messages from. + * @return A pointer to the prepared mesh packet or nullptr if none is available. + */ +meshtastic_MeshPacket *StoreForwardModule::preparePayload(NodeNum dest, uint32_t last_time, bool local) +{ + for (uint32_t i = lastRequest[dest]; i < this->packetHistoryTotalCount; i++) { + if (this->packetHistory[i].time && (this->packetHistory[i].time > last_time)) { + /* Copy the messages that were received by the server in the last msAgo + to the packetHistoryTXQueue structure. + Client not interested in packets from itself and only in broadcast packets or packets towards it. */ + if (this->packetHistory[i].from != dest && + (this->packetHistory[i].to == NODENUM_BROADCAST || this->packetHistory[i].to == dest)) { - service.sendToMesh(p); + meshtastic_MeshPacket *p = allocDataPacket(); + + p->to = local ? this->packetHistory[i].to : dest; // PhoneAPI can handle original `to` + p->from = this->packetHistory[i].from; + p->channel = this->packetHistory[i].channel; + p->rx_time = this->packetHistory[i].time; + + // Let's assume that if the server received the S&F request that the client is in range. + // TODO: Make this configurable. + p->want_ack = false; + + if (local) { // PhoneAPI gets normal TEXT_MESSAGE_APP + p->decoded.portnum = meshtastic_PortNum_TEXT_MESSAGE_APP; + memcpy(p->decoded.payload.bytes, this->packetHistory[i].payload, this->packetHistory[i].payload_size); + p->decoded.payload.size = this->packetHistory[i].payload_size; + } else { + meshtastic_StoreAndForward sf = meshtastic_StoreAndForward_init_zero; + sf.which_variant = meshtastic_StoreAndForward_text_tag; + sf.variant.text.size = this->packetHistory[i].payload_size; + memcpy(sf.variant.text.bytes, this->packetHistory[i].payload, this->packetHistory[i].payload_size); + if (this->packetHistory[i].to == NODENUM_BROADCAST) { + sf.rr = meshtastic_StoreAndForward_RequestResponse_ROUTER_TEXT_BROADCAST; + } else { + sf.rr = meshtastic_StoreAndForward_RequestResponse_ROUTER_TEXT_DIRECT; + } + + p->decoded.payload.size = pb_encode_to_bytes(p->decoded.payload.bytes, sizeof(p->decoded.payload.bytes), + &meshtastic_StoreAndForward_msg, &sf); + } + + lastRequest[dest] = i + 1; // Update the last request index for the client device + + return p; + } + } + } + return nullptr; } /** @@ -244,18 +291,14 @@ void StoreForwardModule::sendMessage(NodeNum dest, const meshtastic_StoreAndForw p->to = dest; - p->priority = meshtastic_MeshPacket_Priority_MIN; + p->priority = meshtastic_MeshPacket_Priority_BACKGROUND; - // FIXME - Determine if the delayed packet is broadcast or delayed. For now, assume - // everything is broadcast. - p->delayed = meshtastic_MeshPacket_Delayed_DELAYED_BROADCAST; - - // Let's assume that if the router received the S&F request that the client is in range. + // Let's assume that if the server received the S&F request that the client is in range. // TODO: Make this configurable. p->want_ack = false; p->decoded.want_response = false; - service.sendToMesh(p); + service->sendToMesh(p); } /** @@ -272,6 +315,35 @@ void StoreForwardModule::sendMessage(NodeNum dest, meshtastic_StoreAndForward_Re storeForwardModule->sendMessage(dest, sf); } +/** + * Sends a text message with an error (busy or channel not available) to the specified destination node. + * + * @param dest The destination node number. + * @param want_response True if the original message requested a response, false otherwise. + */ +void StoreForwardModule::sendErrorTextMessage(NodeNum dest, bool want_response) +{ + meshtastic_MeshPacket *pr = allocDataPacket(); + pr->to = dest; + pr->priority = meshtastic_MeshPacket_Priority_BACKGROUND; + pr->want_ack = false; + pr->decoded.want_response = false; + pr->decoded.portnum = meshtastic_PortNum_TEXT_MESSAGE_APP; + const char *str; + if (this->busy) { + str = "S&F - Busy. Try again shortly."; + } else { + str = "S&F not permitted on the public channel."; + } + LOG_WARN("%s\n", str); + memcpy(pr->decoded.payload.bytes, str, strlen(str)); + pr->decoded.payload.size = strlen(str); + if (want_response) { + ignoreRequest = true; // This text message counts as response. + } + service->sendToMesh(pr); +} + /** * Sends statistics about the store and forward module to the specified node. * @@ -283,8 +355,8 @@ void StoreForwardModule::statsSend(uint32_t to) sf.rr = meshtastic_StoreAndForward_RequestResponse_ROUTER_STATS; sf.which_variant = meshtastic_StoreAndForward_stats_tag; - sf.variant.stats.messages_total = this->packetHistoryMax; - sf.variant.stats.messages_saved = this->packetHistoryCurrent; + sf.variant.stats.messages_total = this->records; + sf.variant.stats.messages_saved = this->packetHistoryTotalCount; sf.variant.stats.messages_max = this->records; sf.variant.stats.up_time = millis() / 1000; sf.variant.stats.requests = this->requests; @@ -293,7 +365,7 @@ void StoreForwardModule::statsSend(uint32_t to) sf.variant.stats.return_max = this->historyReturnMax; sf.variant.stats.return_window = this->historyReturnWindow; - LOG_DEBUG("*** Sending S&F Stats\n"); + LOG_DEBUG("Sending S&F Stats\n"); storeForwardModule->sendMessage(to, sf); } @@ -305,53 +377,39 @@ void StoreForwardModule::statsSend(uint32_t to) */ ProcessMessage StoreForwardModule::handleReceived(const meshtastic_MeshPacket &mp) { -#ifdef ARCH_ESP32 +#if defined(ARCH_ESP32) || defined(ARCH_PORTDUINO) if (moduleConfig.store_forward.enabled) { - // The router node should not be sending messages as a client. Unless he is a ROUTER_CLIENT - if ((getFrom(&mp) != nodeDB.getNodeNum()) || (config.device.role == meshtastic_Config_DeviceConfig_Role_ROUTER_CLIENT)) { + if ((mp.decoded.portnum == meshtastic_PortNum_TEXT_MESSAGE_APP) && is_server) { + auto &p = mp.decoded; + if (isToUs(&mp) && (p.payload.bytes[0] == 'S') && (p.payload.bytes[1] == 'F') && (p.payload.bytes[2] == 0x00)) { + LOG_DEBUG("Legacy Request to send\n"); - if ((mp.decoded.portnum == meshtastic_PortNum_TEXT_MESSAGE_APP) && is_server) { - auto &p = mp.decoded; - if ((p.payload.bytes[0] == 'S') && (p.payload.bytes[1] == 'F') && (p.payload.bytes[2] == 0x00)) { - LOG_DEBUG("*** Legacy Request to send\n"); - - // Send the last 60 minutes of messages. - if (this->busy) { - storeForwardModule->sendMessage(getFrom(&mp), meshtastic_StoreAndForward_RequestResponse_ROUTER_BUSY); - LOG_INFO("*** S&F - Busy. Try again shortly.\n"); - meshtastic_MeshPacket *pr = allocReply(); - pr->to = getFrom(&mp); - pr->priority = meshtastic_MeshPacket_Priority_MIN; - pr->want_ack = false; - pr->decoded.want_response = false; - pr->decoded.portnum = meshtastic_PortNum_TEXT_MESSAGE_APP; - memcpy(pr->decoded.payload.bytes, "** S&F - Busy. Try again shortly.", 34); - pr->decoded.payload.size = 34; - service.sendToMesh(pr); - } else { - storeForwardModule->historySend(historyReturnWindow * 60000, getFrom(&mp)); - } + // Send the last 60 minutes of messages. + if (this->busy || channels.isDefaultChannel(mp.channel)) { + sendErrorTextMessage(getFrom(&mp), mp.decoded.want_response); } else { - storeForwardModule->historyAdd(mp); - LOG_INFO("*** S&F stored. Message history contains %u records now.\n", this->packetHistoryCurrent); + storeForwardModule->historySend(historyReturnWindow * 60, getFrom(&mp)); } - } else if (mp.decoded.portnum == meshtastic_PortNum_STORE_FORWARD_APP) { - auto &p = mp.decoded; - meshtastic_StoreAndForward scratch; - meshtastic_StoreAndForward *decoded = NULL; - if (mp.which_payload_variant == meshtastic_MeshPacket_decoded_tag) { - if (pb_decode_from_bytes(p.payload.bytes, p.payload.size, &meshtastic_StoreAndForward_msg, &scratch)) { - decoded = &scratch; - } else { - LOG_ERROR("Error decoding protobuf module!\n"); - // if we can't decode it, nobody can process it! - return ProcessMessage::STOP; - } - return handleReceivedProtobuf(mp, decoded) ? ProcessMessage::STOP : ProcessMessage::CONTINUE; + } else { + storeForwardModule->historyAdd(mp); + LOG_INFO("S&F stored. Message history contains %u records now.\n", this->packetHistoryTotalCount); + } + } else if (!isFromUs(&mp) && mp.decoded.portnum == meshtastic_PortNum_STORE_FORWARD_APP) { + auto &p = mp.decoded; + meshtastic_StoreAndForward scratch; + meshtastic_StoreAndForward *decoded = NULL; + if (mp.which_payload_variant == meshtastic_MeshPacket_decoded_tag) { + if (pb_decode_from_bytes(p.payload.bytes, p.payload.size, &meshtastic_StoreAndForward_msg, &scratch)) { + decoded = &scratch; + } else { + LOG_ERROR("Error decoding protobuf module!\n"); + // if we can't decode it, nobody can process it! + return ProcessMessage::STOP; } - } // all others are irrelevant - } + return handleReceivedProtobuf(mp, decoded) ? ProcessMessage::STOP : ProcessMessage::CONTINUE; + } + } // all others are irrelevant } #endif @@ -381,8 +439,8 @@ bool StoreForwardModule::handleReceivedProtobuf(const meshtastic_MeshPacket &mp, if (is_server) { // stop sending stuff, the client wants to abort or has another error if ((this->busy) && (this->busyTo == getFrom(&mp))) { - LOG_ERROR("*** Client in ERROR or ABORT requested\n"); - this->packetHistoryTXQueue_index = 0; + LOG_ERROR("Client in ERROR or ABORT requested\n"); + this->requestCount = 0; this->busy = false; } } @@ -391,17 +449,16 @@ bool StoreForwardModule::handleReceivedProtobuf(const meshtastic_MeshPacket &mp, case meshtastic_StoreAndForward_RequestResponse_CLIENT_HISTORY: if (is_server) { requests_history++; - LOG_INFO("*** Client Request to send HISTORY\n"); + LOG_INFO("Client Request to send HISTORY\n"); // Send the last 60 minutes of messages. - if (this->busy) { - storeForwardModule->sendMessage(getFrom(&mp), meshtastic_StoreAndForward_RequestResponse_ROUTER_BUSY); - LOG_INFO("*** S&F - Busy. Try again shortly.\n"); + if (this->busy || channels.isDefaultChannel(mp.channel)) { + sendErrorTextMessage(getFrom(&mp), mp.decoded.want_response); } else { if ((p->which_variant == meshtastic_StoreAndForward_history_tag) && (p->variant.history.window > 0)) { // window is in minutes - storeForwardModule->historySend(p->variant.history.window * 60000, getFrom(&mp)); + storeForwardModule->historySend(p->variant.history.window * 60, getFrom(&mp)); } else { - storeForwardModule->historySend(historyReturnWindow * 60000, getFrom(&mp)); // defaults to 4 hours + storeForwardModule->historySend(historyReturnWindow * 60, getFrom(&mp)); // defaults to 4 hours } } } @@ -409,7 +466,6 @@ bool StoreForwardModule::handleReceivedProtobuf(const meshtastic_MeshPacket &mp, case meshtastic_StoreAndForward_RequestResponse_CLIENT_PING: if (is_server) { - LOG_INFO("*** StoreAndForward_RequestResponse_CLIENT_PING\n"); // respond with a ROUTER PONG storeForwardModule->sendMessage(getFrom(&mp), meshtastic_StoreAndForward_RequestResponse_ROUTER_PONG); } @@ -417,17 +473,16 @@ bool StoreForwardModule::handleReceivedProtobuf(const meshtastic_MeshPacket &mp, case meshtastic_StoreAndForward_RequestResponse_CLIENT_PONG: if (is_server) { - LOG_INFO("*** StoreAndForward_RequestResponse_CLIENT_PONG\n"); // NodeDB is already updated } break; case meshtastic_StoreAndForward_RequestResponse_CLIENT_STATS: if (is_server) { - LOG_INFO("*** Client Request to send STATS\n"); + LOG_INFO("Client Request to send STATS\n"); if (this->busy) { storeForwardModule->sendMessage(getFrom(&mp), meshtastic_StoreAndForward_RequestResponse_ROUTER_BUSY); - LOG_INFO("*** S&F - Busy. Try again shortly.\n"); + LOG_INFO("S&F - Busy. Try again shortly.\n"); } else { storeForwardModule->statsSend(getFrom(&mp)); } @@ -437,9 +492,9 @@ bool StoreForwardModule::handleReceivedProtobuf(const meshtastic_MeshPacket &mp, case meshtastic_StoreAndForward_RequestResponse_ROUTER_ERROR: case meshtastic_StoreAndForward_RequestResponse_ROUTER_BUSY: if (is_client) { - LOG_DEBUG("*** StoreAndForward_RequestResponse_ROUTER_BUSY\n"); + LOG_DEBUG("StoreAndForward_RequestResponse_ROUTER_BUSY\n"); // retry in messages_saved * packetTimeMax ms - retry_delay = millis() + packetHistoryCurrent * packetTimeMax * + retry_delay = millis() + getNumAvailablePackets(this->busyTo, this->last_time) * packetTimeMax * (meshtastic_StoreAndForward_RequestResponse_ROUTER_ERROR ? 2 : 1); } break; @@ -453,13 +508,12 @@ bool StoreForwardModule::handleReceivedProtobuf(const meshtastic_MeshPacket &mp, heartbeatInterval = p->variant.heartbeat.period; } lastHeartbeat = millis(); - LOG_INFO("*** StoreAndForward Heartbeat received\n"); + LOG_INFO("StoreAndForward Heartbeat received\n"); } break; case meshtastic_StoreAndForward_RequestResponse_ROUTER_PING: if (is_client) { - LOG_DEBUG("*** StoreAndForward_RequestResponse_ROUTER_PING\n"); // respond with a CLIENT PONG storeForwardModule->sendMessage(getFrom(&mp), meshtastic_StoreAndForward_RequestResponse_CLIENT_PONG); } @@ -467,11 +521,9 @@ bool StoreForwardModule::handleReceivedProtobuf(const meshtastic_MeshPacket &mp, case meshtastic_StoreAndForward_RequestResponse_ROUTER_STATS: if (is_client) { - LOG_DEBUG("*** Router Response STATS\n"); + LOG_DEBUG("Router Response STATS\n"); // These fields only have informational purpose on a client. Fill them to consume later. if (p->which_variant == meshtastic_StoreAndForward_stats_tag) { - this->packetHistoryMax = p->variant.stats.messages_total; - this->packetHistoryCurrent = p->variant.stats.messages_saved; this->records = p->variant.stats.messages_max; this->requests = p->variant.stats.requests; this->requests_history = p->variant.stats.requests_history; @@ -487,16 +539,16 @@ bool StoreForwardModule::handleReceivedProtobuf(const meshtastic_MeshPacket &mp, // These fields only have informational purpose on a client. Fill them to consume later. if (p->which_variant == meshtastic_StoreAndForward_history_tag) { this->historyReturnWindow = p->variant.history.window / 60000; - LOG_INFO("*** Router Response HISTORY - Sending %d messages from last %d minutes\n", + LOG_INFO("Router Response HISTORY - Sending %d messages from last %d minutes\n", p->variant.history.history_messages, this->historyReturnWindow); } } break; default: - assert(0); // unexpected state + break; // no need to do anything } - return true; // There's no need for others to look at this message. + return false; // RoutingModule sends it to the phone } StoreForwardModule::StoreForwardModule() @@ -504,7 +556,7 @@ StoreForwardModule::StoreForwardModule() ProtobufModule("StoreForward", meshtastic_PortNum_STORE_FORWARD_APP, &meshtastic_StoreAndForward_msg) { -#ifdef ARCH_ESP32 +#if defined(ARCH_ESP32) || defined(ARCH_PORTDUINO) isPromiscuous = true; // Brown chicken brown cow @@ -520,9 +572,8 @@ StoreForwardModule::StoreForwardModule() if (moduleConfig.store_forward.enabled) { // Router - if ((config.device.role == meshtastic_Config_DeviceConfig_Role_ROUTER) || - (config.device.role == meshtastic_Config_DeviceConfig_Role_ROUTER_CLIENT)) { - LOG_INFO("*** Initializing Store & Forward Module in Router mode\n"); + if ((config.device.role == meshtastic_Config_DeviceConfig_Role_ROUTER || moduleConfig.store_forward.is_server)) { + LOG_INFO("Initializing Store & Forward Module in Server mode\n"); if (memGet.getPsramSize() > 0) { if (memGet.getFreePsram() >= 1024 * 1024) { @@ -543,23 +594,24 @@ StoreForwardModule::StoreForwardModule() // send heartbeat advertising? if (moduleConfig.store_forward.heartbeat) this->heartbeat = moduleConfig.store_forward.heartbeat; + else + this->heartbeat = false; // Popupate PSRAM with our data structures. this->populatePSRAM(); is_server = true; } else { - LOG_INFO("*** Device has less than 1M of PSRAM free.\n"); - LOG_INFO("*** Store & Forward Module - disabling server.\n"); + LOG_INFO(".\n"); + LOG_INFO("S&F: not enough PSRAM free, disabling.\n"); } } else { - LOG_INFO("*** Device doesn't have PSRAM.\n"); - LOG_INFO("*** Store & Forward Module - disabling server.\n"); + LOG_INFO("S&F: device doesn't have PSRAM, disabling.\n"); } // Client } else { is_client = true; - LOG_INFO("*** Initializing Store & Forward Module in Client mode\n"); + LOG_INFO("Initializing Store & Forward Module in Client mode\n"); } } else { disable(); diff --git a/src/modules/esp32/StoreForwardModule.h b/src/modules/StoreForwardModule.h similarity index 82% rename from src/modules/esp32/StoreForwardModule.h rename to src/modules/StoreForwardModule.h index cfa9945d5..e3273470b 100644 --- a/src/modules/esp32/StoreForwardModule.h +++ b/src/modules/StoreForwardModule.h @@ -25,12 +25,9 @@ class StoreForwardModule : private concurrency::OSThread, public ProtobufModule< char routerMessage[meshtastic_Constants_DATA_PAYLOAD_LEN] = {0}; PacketHistoryStruct *packetHistory = 0; - uint32_t packetHistoryCurrent = 0; - uint32_t packetHistoryMax = 0; - - PacketHistoryStruct *packetHistoryTXQueue = 0; - uint32_t packetHistoryTXQueue_size = 0; - uint32_t packetHistoryTXQueue_index = 0; + uint32_t packetHistoryTotalCount = 0; + uint32_t last_time = 0; + uint32_t requestCount = 0; uint32_t packetTimeMax = 5000; // Interval between sending history packets as a server. @@ -44,7 +41,7 @@ class StoreForwardModule : private concurrency::OSThread, public ProtobufModule< StoreForwardModule(); unsigned long lastHeartbeat = 0; - uint32_t heartbeatInterval = default_broadcast_interval_secs; + uint32_t heartbeatInterval = 900; /** Update our local reference of when we last saw that node. @@ -52,18 +49,21 @@ class StoreForwardModule : private concurrency::OSThread, public ProtobufModule< */ void historyAdd(const meshtastic_MeshPacket &mp); void statsSend(uint32_t to); - void historySend(uint32_t msAgo, uint32_t to); - - uint32_t historyQueueCreate(uint32_t msAgo, uint32_t to, uint32_t *last_request_index); + void historySend(uint32_t secAgo, uint32_t to); + uint32_t getNumAvailablePackets(NodeNum dest, uint32_t last_time); /** * Send our payload into the mesh */ - void sendPayload(NodeNum dest = NODENUM_BROADCAST, uint32_t packetHistory_index = 0); + bool sendPayload(NodeNum dest = NODENUM_BROADCAST, uint32_t packetHistory_index = 0); + meshtastic_MeshPacket *preparePayload(NodeNum dest, uint32_t packetHistory_index, bool local = false); void sendMessage(NodeNum dest, const meshtastic_StoreAndForward &payload); void sendMessage(NodeNum dest, meshtastic_StoreAndForward_RequestResponse rr); + void sendErrorTextMessage(NodeNum dest, bool want_response); + meshtastic_MeshPacket *getForPhone(); + // Returns true if we are configured as server AND we could allocate PSRAM. + bool isServer() { return is_server; } - virtual meshtastic_MeshPacket *allocReply() override; /* -Override the wantPacket method. */ diff --git a/src/modules/Telemetry/AirQualityTelemetry.cpp b/src/modules/Telemetry/AirQualityTelemetry.cpp index f87ea504b..0b6be1b7e 100644 --- a/src/modules/Telemetry/AirQualityTelemetry.cpp +++ b/src/modules/Telemetry/AirQualityTelemetry.cpp @@ -1,16 +1,21 @@ -#include "AirQualityTelemetry.h" +#include "configuration.h" + +#if !MESHTASTIC_EXCLUDE_ENVIRONMENTAL_SENSOR + #include "../mesh/generated/meshtastic/telemetry.pb.h" +#include "AirQualityTelemetry.h" +#include "Default.h" #include "MeshService.h" #include "NodeDB.h" #include "PowerFSM.h" #include "RTC.h" #include "Router.h" -#include "configuration.h" +#include "detect/ScanI2CTwoWire.h" #include "main.h" +#include int32_t AirQualityTelemetryModule::runOnce() { - int32_t result = INT32_MAX; /* Uncomment the preferences below if you want to use the module without having to configure it from the PythonAPI or WebUI. @@ -25,29 +30,46 @@ int32_t AirQualityTelemetryModule::runOnce() if (firstTime) { // This is the first time the OSThread library has called this function, so do some setup - firstTime = 0; + firstTime = false; if (moduleConfig.telemetry.air_quality_enabled) { LOG_INFO("Air quality Telemetry: Initializing\n"); if (!aqi.begin_I2C()) { - LOG_WARN("Could not establish i2c connection to AQI sensor\n"); + LOG_WARN("Could not establish i2c connection to AQI sensor. Rescanning...\n"); + // rescan for late arriving sensors. AQI Module starts about 10 seconds into the boot so this is plenty. + uint8_t i2caddr_scan[] = {PMSA0031_ADDR}; + uint8_t i2caddr_asize = 1; + auto i2cScanner = std::unique_ptr(new ScanI2CTwoWire()); +#if defined(I2C_SDA1) + i2cScanner->scanPort(ScanI2C::I2CPort::WIRE1, i2caddr_scan, i2caddr_asize); +#endif + i2cScanner->scanPort(ScanI2C::I2CPort::WIRE, i2caddr_scan, i2caddr_asize); + auto found = i2cScanner->find(ScanI2C::DeviceType::PMSA0031); + if (found.type != ScanI2C::DeviceType::NONE) { + nodeTelemetrySensorsMap[meshtastic_TelemetrySensorType_PMSA003I].first = found.address.address; + nodeTelemetrySensorsMap[meshtastic_TelemetrySensorType_PMSA003I].second = + i2cScanner->fetchI2CBus(found.address); + return 1000; + } return disable(); } return 1000; } - return result; + return disable(); } else { // if we somehow got to a second run of this module with measurement disabled, then just wait forever if (!moduleConfig.telemetry.air_quality_enabled) - return result; + return disable(); - uint32_t now = millis(); if (((lastSentToMesh == 0) || - ((now - lastSentToMesh) >= getConfiguredOrDefaultMs(moduleConfig.telemetry.air_quality_interval))) && + !Throttle::isWithinTimespanMs(lastSentToMesh, Default::getConfiguredOrDefaultMsScaled( + moduleConfig.telemetry.air_quality_interval, + default_telemetry_broadcast_interval_secs, numOnlineNodes))) && + airTime->isTxAllowedChannelUtil(config.device.role != meshtastic_Config_DeviceConfig_Role_SENSOR) && airTime->isTxAllowedAirUtil()) { sendTelemetry(); - lastSentToMesh = now; - } else if (service.isToPhoneQueueEmpty()) { + lastSentToMesh = millis(); + } else if (service->isToPhoneQueueEmpty()) { // Just send to phone when it's not our time to send to mesh yet // Only send while queue is empty (phone assumed connected) sendTelemetry(NODENUM_BROADCAST, true); @@ -80,51 +102,90 @@ bool AirQualityTelemetryModule::handleReceivedProtobuf(const meshtastic_MeshPack return false; // Let others look at this message also if they want } -bool AirQualityTelemetryModule::sendTelemetry(NodeNum dest, bool phoneOnly) +bool AirQualityTelemetryModule::getAirQualityTelemetry(meshtastic_Telemetry *m) { if (!aqi.read(&data)) { LOG_WARN("Skipping send measurements. Could not read AQIn\n"); return false; } - meshtastic_Telemetry m; - m.time = getTime(); - m.which_variant = meshtastic_Telemetry_air_quality_metrics_tag; - m.variant.air_quality_metrics.pm10_standard = data.pm10_standard; - m.variant.air_quality_metrics.pm25_standard = data.pm25_standard; - m.variant.air_quality_metrics.pm100_standard = data.pm100_standard; + m->time = getTime(); + m->which_variant = meshtastic_Telemetry_air_quality_metrics_tag; + m->variant.air_quality_metrics.pm10_standard = data.pm10_standard; + m->variant.air_quality_metrics.pm25_standard = data.pm25_standard; + m->variant.air_quality_metrics.pm100_standard = data.pm100_standard; - m.variant.air_quality_metrics.pm10_environmental = data.pm10_env; - m.variant.air_quality_metrics.pm25_environmental = data.pm25_env; - m.variant.air_quality_metrics.pm100_environmental = data.pm100_env; + m->variant.air_quality_metrics.pm10_environmental = data.pm10_env; + m->variant.air_quality_metrics.pm25_environmental = data.pm25_env; + m->variant.air_quality_metrics.pm100_environmental = data.pm100_env; LOG_INFO("(Sending): PM1.0(Standard)=%i, PM2.5(Standard)=%i, PM10.0(Standard)=%i\n", - m.variant.air_quality_metrics.pm10_standard, m.variant.air_quality_metrics.pm25_standard, - m.variant.air_quality_metrics.pm100_standard); + m->variant.air_quality_metrics.pm10_standard, m->variant.air_quality_metrics.pm25_standard, + m->variant.air_quality_metrics.pm100_standard); LOG_INFO(" | PM1.0(Environmental)=%i, PM2.5(Environmental)=%i, PM10.0(Environmental)=%i\n", - m.variant.air_quality_metrics.pm10_environmental, m.variant.air_quality_metrics.pm25_environmental, - m.variant.air_quality_metrics.pm100_environmental); + m->variant.air_quality_metrics.pm10_environmental, m->variant.air_quality_metrics.pm25_environmental, + m->variant.air_quality_metrics.pm100_environmental); - meshtastic_MeshPacket *p = allocDataProtobuf(m); - p->to = dest; - p->decoded.want_response = false; - if (config.device.role == meshtastic_Config_DeviceConfig_Role_SENSOR) - p->priority = meshtastic_MeshPacket_Priority_RELIABLE; - else - p->priority = meshtastic_MeshPacket_Priority_MIN; - - // release previous packet before occupying a new spot - if (lastMeasurementPacket != nullptr) - packetPool.release(lastMeasurementPacket); - - lastMeasurementPacket = packetPool.allocCopy(*p); - if (phoneOnly) { - LOG_INFO("Sending packet to phone\n"); - service.sendToPhone(p); - } else { - LOG_INFO("Sending packet to mesh\n"); - service.sendToMesh(p, RX_SRC_LOCAL, true); - } return true; } + +meshtastic_MeshPacket *AirQualityTelemetryModule::allocReply() +{ + if (currentRequest) { + auto req = *currentRequest; + const auto &p = req.decoded; + meshtastic_Telemetry scratch; + meshtastic_Telemetry *decoded = NULL; + memset(&scratch, 0, sizeof(scratch)); + if (pb_decode_from_bytes(p.payload.bytes, p.payload.size, &meshtastic_Telemetry_msg, &scratch)) { + decoded = &scratch; + } else { + LOG_ERROR("Error decoding AirQualityTelemetry module!\n"); + return NULL; + } + // Check for a request for air quality metrics + if (decoded->which_variant == meshtastic_Telemetry_air_quality_metrics_tag) { + meshtastic_Telemetry m = meshtastic_Telemetry_init_zero; + if (getAirQualityTelemetry(&m)) { + LOG_INFO("Air quality telemetry replying to request\n"); + return allocDataProtobuf(m); + } else { + return NULL; + } + } + } + return NULL; +} + +bool AirQualityTelemetryModule::sendTelemetry(NodeNum dest, bool phoneOnly) +{ + meshtastic_Telemetry m = meshtastic_Telemetry_init_zero; + if (getAirQualityTelemetry(&m)) { + meshtastic_MeshPacket *p = allocDataProtobuf(m); + p->to = dest; + p->decoded.want_response = false; + if (config.device.role == meshtastic_Config_DeviceConfig_Role_SENSOR) + p->priority = meshtastic_MeshPacket_Priority_RELIABLE; + else + p->priority = meshtastic_MeshPacket_Priority_BACKGROUND; + + // release previous packet before occupying a new spot + if (lastMeasurementPacket != nullptr) + packetPool.release(lastMeasurementPacket); + + lastMeasurementPacket = packetPool.allocCopy(*p); + if (phoneOnly) { + LOG_INFO("Sending packet to phone\n"); + service->sendToPhone(p); + } else { + LOG_INFO("Sending packet to mesh\n"); + service->sendToMesh(p, RX_SRC_LOCAL, true); + } + return true; + } + + return false; +} + +#endif \ No newline at end of file diff --git a/src/modules/Telemetry/AirQualityTelemetry.h b/src/modules/Telemetry/AirQualityTelemetry.h index ab77d61e7..fb8edd07e 100644 --- a/src/modules/Telemetry/AirQualityTelemetry.h +++ b/src/modules/Telemetry/AirQualityTelemetry.h @@ -1,3 +1,7 @@ +#include "configuration.h" + +#if !MESHTASTIC_EXCLUDE_ENVIRONMENTAL_SENSOR + #pragma once #include "../mesh/generated/meshtastic/telemetry.pb.h" #include "Adafruit_PM25AQI.h" @@ -6,6 +10,10 @@ class AirQualityTelemetryModule : private concurrency::OSThread, public ProtobufModule { + CallbackObserver nodeStatusObserver = + CallbackObserver(this, + &AirQualityTelemetryModule::handleStatusUpdate); + public: AirQualityTelemetryModule() : concurrency::OSThread("AirQualityTelemetryModule"), @@ -14,6 +22,7 @@ class AirQualityTelemetryModule : private concurrency::OSThread, public Protobuf lastMeasurementPacket = nullptr; setIntervalFromNow(10 * 1000); aqi = Adafruit_PM25AQI(); + nodeStatusObserver.observe(&nodeStatus->onNewStatus); } protected: @@ -22,6 +31,11 @@ class AirQualityTelemetryModule : private concurrency::OSThread, public Protobuf */ virtual bool handleReceivedProtobuf(const meshtastic_MeshPacket &mp, meshtastic_Telemetry *p) override; virtual int32_t runOnce() override; + /** Called to get current Air Quality data + @return true if it contains valid data + */ + bool getAirQualityTelemetry(meshtastic_Telemetry *m); + virtual meshtastic_MeshPacket *allocReply() override; /** * Send our Telemetry into the mesh */ @@ -30,8 +44,10 @@ class AirQualityTelemetryModule : private concurrency::OSThread, public Protobuf private: Adafruit_PM25AQI aqi; PM25_AQI_Data data = {0}; - bool firstTime = 1; + bool firstTime = true; meshtastic_MeshPacket *lastMeasurementPacket; uint32_t sendToPhoneIntervalMs = SECONDS_IN_MINUTE * 1000; // Send to phone every minute uint32_t lastSentToMesh = 0; }; + +#endif \ No newline at end of file diff --git a/src/modules/Telemetry/DeviceTelemetry.cpp b/src/modules/Telemetry/DeviceTelemetry.cpp index a6eecda80..eb3f67e96 100644 --- a/src/modules/Telemetry/DeviceTelemetry.cpp +++ b/src/modules/Telemetry/DeviceTelemetry.cpp @@ -1,31 +1,42 @@ #include "DeviceTelemetry.h" #include "../mesh/generated/meshtastic/telemetry.pb.h" +#include "Default.h" #include "MeshService.h" #include "NodeDB.h" #include "PowerFSM.h" #include "RTC.h" +#include "RadioLibInterface.h" #include "Router.h" #include "configuration.h" #include "main.h" #include #include +#include #define MAGIC_USB_BATTERY_LEVEL 101 int32_t DeviceTelemetryModule::runOnce() { - uint32_t now = millis(); + refreshUptime(); + bool isImpoliteRole = + IS_ONE_OF(config.device.role, meshtastic_Config_DeviceConfig_Role_SENSOR, meshtastic_Config_DeviceConfig_Role_ROUTER); if (((lastSentToMesh == 0) || - ((now - lastSentToMesh) >= getConfiguredOrDefaultMs(moduleConfig.telemetry.device_update_interval))) && - airTime->isTxAllowedChannelUtil() && airTime->isTxAllowedAirUtil() && + ((uptimeLastMs - lastSentToMesh) >= + Default::getConfiguredOrDefaultMsScaled(moduleConfig.telemetry.device_update_interval, + default_telemetry_broadcast_interval_secs, numOnlineNodes))) && + airTime->isTxAllowedChannelUtil(!isImpoliteRole) && airTime->isTxAllowedAirUtil() && config.device.role != meshtastic_Config_DeviceConfig_Role_REPEATER && config.device.role != meshtastic_Config_DeviceConfig_Role_CLIENT_HIDDEN) { sendTelemetry(); - lastSentToMesh = now; - } else if (service.isToPhoneQueueEmpty()) { + lastSentToMesh = uptimeLastMs; + } else if (service->isToPhoneQueueEmpty()) { // Just send to phone when it's not our time to send to mesh yet // Only send while queue is empty (phone assumed connected) sendTelemetry(NODENUM_BROADCAST, true); + if (lastSentStatsToPhone == 0 || (uptimeLastMs - lastSentStatsToPhone) >= sendStatsToPhoneIntervalMs) { + sendLocalStatsToPhone(); + lastSentStatsToPhone = uptimeLastMs; + } } return sendToPhoneIntervalMs; } @@ -44,62 +55,122 @@ bool DeviceTelemetryModule::handleReceivedProtobuf(const meshtastic_MeshPacket & t->variant.device_metrics.air_util_tx, t->variant.device_metrics.channel_utilization, t->variant.device_metrics.battery_level, t->variant.device_metrics.voltage); #endif - nodeDB.updateTelemetry(getFrom(&mp), *t, RX_SRC_RADIO); + nodeDB->updateTelemetry(getFrom(&mp), *t, RX_SRC_RADIO); } return false; // Let others look at this message also if they want } meshtastic_MeshPacket *DeviceTelemetryModule::allocReply() { - if (ignoreRequest) { - return NULL; + if (currentRequest) { + auto req = *currentRequest; + const auto &p = req.decoded; + meshtastic_Telemetry scratch; + meshtastic_Telemetry *decoded = NULL; + memset(&scratch, 0, sizeof(scratch)); + if (pb_decode_from_bytes(p.payload.bytes, p.payload.size, &meshtastic_Telemetry_msg, &scratch)) { + decoded = &scratch; + } else { + LOG_ERROR("Error decoding DeviceTelemetry module!\n"); + return NULL; + } + // Check for a request for device metrics + if (decoded->which_variant == meshtastic_Telemetry_device_metrics_tag) { + LOG_INFO("Device telemetry replying to request\n"); + + meshtastic_Telemetry telemetry = getDeviceTelemetry(); + return allocDataProtobuf(telemetry); + } } - - LOG_INFO("Device telemetry replying to request\n"); - - meshtastic_Telemetry telemetry = getDeviceTelemetry(); - return allocDataProtobuf(telemetry); + return NULL; } meshtastic_Telemetry DeviceTelemetryModule::getDeviceTelemetry() { - meshtastic_Telemetry t; - - t.time = getTime(); + meshtastic_Telemetry t = meshtastic_Telemetry_init_zero; t.which_variant = meshtastic_Telemetry_device_metrics_tag; + t.time = getTime(); + t.variant.device_metrics = meshtastic_DeviceMetrics_init_zero; + t.variant.device_metrics.has_air_util_tx = true; + t.variant.device_metrics.has_battery_level = true; + t.variant.device_metrics.has_channel_utilization = true; + t.variant.device_metrics.has_voltage = true; + t.variant.device_metrics.has_uptime_seconds = true; t.variant.device_metrics.air_util_tx = airTime->utilizationTXPercent(); - if (powerStatus->getIsCharging()) { - t.variant.device_metrics.battery_level = MAGIC_USB_BATTERY_LEVEL; - } else { - t.variant.device_metrics.battery_level = powerStatus->getBatteryChargePercent(); - } - +#if ARCH_PORTDUINO + t.variant.device_metrics.battery_level = MAGIC_USB_BATTERY_LEVEL; +#else + t.variant.device_metrics.battery_level = (!powerStatus->getHasBattery() || powerStatus->getIsCharging()) + ? MAGIC_USB_BATTERY_LEVEL + : powerStatus->getBatteryChargePercent(); +#endif t.variant.device_metrics.channel_utilization = airTime->channelUtilizationPercent(); t.variant.device_metrics.voltage = powerStatus->getBatteryVoltageMv() / 1000.0; + t.variant.device_metrics.uptime_seconds = getUptimeSeconds(); return t; } +void DeviceTelemetryModule::sendLocalStatsToPhone() +{ + meshtastic_Telemetry telemetry = meshtastic_Telemetry_init_zero; + telemetry.which_variant = meshtastic_Telemetry_local_stats_tag; + telemetry.variant.local_stats = meshtastic_LocalStats_init_zero; + telemetry.time = getTime(); + telemetry.variant.local_stats.uptime_seconds = getUptimeSeconds(); + telemetry.variant.local_stats.channel_utilization = airTime->channelUtilizationPercent(); + telemetry.variant.local_stats.air_util_tx = airTime->utilizationTXPercent(); + telemetry.variant.local_stats.num_online_nodes = numOnlineNodes; + telemetry.variant.local_stats.num_total_nodes = nodeDB->getNumMeshNodes(); + if (RadioLibInterface::instance) { + telemetry.variant.local_stats.num_packets_tx = RadioLibInterface::instance->txGood; + telemetry.variant.local_stats.num_packets_rx = RadioLibInterface::instance->rxGood + RadioLibInterface::instance->rxBad; + telemetry.variant.local_stats.num_packets_rx_bad = RadioLibInterface::instance->rxBad; + telemetry.variant.local_stats.num_tx_relay = RadioLibInterface::instance->txRelay; + } + if (router) { + telemetry.variant.local_stats.num_rx_dupe = router->rxDupe; + telemetry.variant.local_stats.num_tx_relay_canceled = router->txRelayCanceled; + } + + 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, + telemetry.variant.local_stats.air_util_tx, telemetry.variant.local_stats.num_online_nodes, + telemetry.variant.local_stats.num_total_nodes); + + LOG_INFO("num_packets_tx=%i, num_packets_rx=%i, num_packets_rx_bad=%i\n", telemetry.variant.local_stats.num_packets_tx, + telemetry.variant.local_stats.num_packets_rx, telemetry.variant.local_stats.num_packets_rx_bad); + + meshtastic_MeshPacket *p = allocDataProtobuf(telemetry); + p->to = NODENUM_BROADCAST; + p->decoded.want_response = false; + p->priority = meshtastic_MeshPacket_Priority_BACKGROUND; + + service->sendToPhone(p); +} + bool DeviceTelemetryModule::sendTelemetry(NodeNum dest, bool phoneOnly) { meshtastic_Telemetry telemetry = getDeviceTelemetry(); - LOG_INFO("(Sending): air_util_tx=%f, channel_utilization=%f, battery_level=%i, voltage=%f\n", + LOG_INFO("(Sending): 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, - telemetry.variant.device_metrics.battery_level, telemetry.variant.device_metrics.voltage); + telemetry.variant.device_metrics.battery_level, telemetry.variant.device_metrics.voltage, + telemetry.variant.device_metrics.uptime_seconds); meshtastic_MeshPacket *p = allocDataProtobuf(telemetry); p->to = dest; p->decoded.want_response = false; - p->priority = meshtastic_MeshPacket_Priority_MIN; + p->priority = meshtastic_MeshPacket_Priority_BACKGROUND; - nodeDB.updateTelemetry(nodeDB.getNodeNum(), telemetry, RX_SRC_LOCAL); + nodeDB->updateTelemetry(nodeDB->getNodeNum(), telemetry, RX_SRC_LOCAL); if (phoneOnly) { LOG_INFO("Sending packet to phone\n"); - service.sendToPhone(p); + service->sendToPhone(p); } else { LOG_INFO("Sending packet to mesh\n"); - service.sendToMesh(p, RX_SRC_LOCAL, true); + service->sendToMesh(p, RX_SRC_LOCAL, true); } return true; } \ No newline at end of file diff --git a/src/modules/Telemetry/DeviceTelemetry.h b/src/modules/Telemetry/DeviceTelemetry.h index 81f83ce0a..6d7f69891 100644 --- a/src/modules/Telemetry/DeviceTelemetry.h +++ b/src/modules/Telemetry/DeviceTelemetry.h @@ -7,11 +7,17 @@ class DeviceTelemetryModule : private concurrency::OSThread, public ProtobufModule { + CallbackObserver nodeStatusObserver = + CallbackObserver(this, &DeviceTelemetryModule::handleStatusUpdate); + public: DeviceTelemetryModule() : concurrency::OSThread("DeviceTelemetryModule"), ProtobufModule("DeviceTelemetry", meshtastic_PortNum_TELEMETRY_APP, &meshtastic_Telemetry_msg) { + uptimeWrapCount = 0; + uptimeLastMs = millis(); + nodeStatusObserver.observe(&nodeStatus->onNewStatus); setIntervalFromNow(45 * 1000); // Wait until NodeInfo is sent } virtual bool wantUIFrame() { return false; } @@ -28,8 +34,30 @@ class DeviceTelemetryModule : private concurrency::OSThread, public ProtobufModu */ bool sendTelemetry(NodeNum dest = NODENUM_BROADCAST, bool phoneOnly = false); + /** + * Get the uptime in seconds + * Loses some accuracy after 49 days, but that's fine + */ + uint32_t getUptimeSeconds() { return (0xFFFFFFFF / 1000) * uptimeWrapCount + (uptimeLastMs / 1000); } + private: meshtastic_Telemetry getDeviceTelemetry(); - uint32_t sendToPhoneIntervalMs = SECONDS_IN_MINUTE * 1000; // Send to phone every minute + void sendLocalStatsToPhone(); + uint32_t sendToPhoneIntervalMs = SECONDS_IN_MINUTE * 1000; // Send to phone every minute + uint32_t sendStatsToPhoneIntervalMs = 15 * SECONDS_IN_MINUTE * 1000; // Send stats to phone every 15 minutes + uint32_t lastSentStatsToPhone = 0; uint32_t lastSentToMesh = 0; + + void refreshUptime() + { + auto now = millis(); + // If we wrapped around (~49 days), increment the wrap count + if (now < uptimeLastMs) + uptimeWrapCount++; + + uptimeLastMs = now; + } + + uint32_t uptimeWrapCount; + uint32_t uptimeLastMs; }; diff --git a/src/modules/Telemetry/EnvironmentTelemetry.cpp b/src/modules/Telemetry/EnvironmentTelemetry.cpp index 9c7b406e9..1ccdedeb7 100644 --- a/src/modules/Telemetry/EnvironmentTelemetry.cpp +++ b/src/modules/Telemetry/EnvironmentTelemetry.cpp @@ -1,11 +1,16 @@ -#include "EnvironmentTelemetry.h" +#include "configuration.h" + +#if !MESHTASTIC_EXCLUDE_ENVIRONMENTAL_SENSOR + #include "../mesh/generated/meshtastic/telemetry.pb.h" +#include "Default.h" +#include "EnvironmentTelemetry.h" #include "MeshService.h" #include "NodeDB.h" #include "PowerFSM.h" #include "RTC.h" #include "Router.h" -#include "configuration.h" +#include "UnitConversions.h" #include "main.h" #include "power.h" #include "sleep.h" @@ -14,14 +19,27 @@ #include // Sensors +#include "Sensor/AHT10.h" #include "Sensor/BME280Sensor.h" #include "Sensor/BME680Sensor.h" +#include "Sensor/BMP085Sensor.h" #include "Sensor/BMP280Sensor.h" +#include "Sensor/BMP3XXSensor.h" +#include "Sensor/DFRobotLarkSensor.h" #include "Sensor/LPS22HBSensor.h" #include "Sensor/MCP9808Sensor.h" +#include "Sensor/MLX90632Sensor.h" +#include "Sensor/NAU7802Sensor.h" +#include "Sensor/OPT3001Sensor.h" +#include "Sensor/RCWL9620Sensor.h" #include "Sensor/SHT31Sensor.h" +#include "Sensor/SHT4XSensor.h" #include "Sensor/SHTC3Sensor.h" +#include "Sensor/T1000xSensor.h" +#include "Sensor/TSL2591Sensor.h" +#include "Sensor/VEML7700Sensor.h" +BMP085Sensor bmp085Sensor; BMP280Sensor bmp280Sensor; BME280Sensor bme280Sensor; BME680Sensor bme680Sensor; @@ -29,33 +47,32 @@ MCP9808Sensor mcp9808Sensor; SHTC3Sensor shtc3Sensor; LPS22HBSensor lps22hbSensor; SHT31Sensor sht31Sensor; +VEML7700Sensor veml7700Sensor; +TSL2591Sensor tsl2591Sensor; +OPT3001Sensor opt3001Sensor; +SHT4XSensor sht4xSensor; +RCWL9620Sensor rcwl9620Sensor; +AHT10Sensor aht10Sensor; +MLX90632Sensor mlx90632Sensor; +DFRobotLarkSensor dfRobotLarkSensor; +NAU7802Sensor nau7802Sensor; +BMP3XXSensor bmp3xxSensor; +#ifdef T1000X_SENSOR_EN +T1000xSensor t1000xSensor; +#endif #define FAILED_STATE_SENSOR_READ_MULTIPLIER 10 #define DISPLAY_RECEIVEID_MEASUREMENTS_ON_SCREEN true -#if (defined(USE_EINK) || defined(ILI9341_DRIVER) || defined(ST7735_CS) || defined(ST7789_CS)) && \ - !defined(DISPLAY_FORCE_SMALL_FONTS) - -// The screen is bigger so use bigger fonts -#define FONT_SMALL ArialMT_Plain_16 -#define FONT_MEDIUM ArialMT_Plain_24 -#define FONT_LARGE ArialMT_Plain_24 -#else -#define FONT_SMALL ArialMT_Plain_10 -#define FONT_MEDIUM ArialMT_Plain_16 -#define FONT_LARGE ArialMT_Plain_24 -#endif - -#define fontHeight(font) ((font)[1] + 1) // height is position 1 - -#define FONT_HEIGHT_SMALL fontHeight(FONT_SMALL) -#define FONT_HEIGHT_MEDIUM fontHeight(FONT_MEDIUM) +#include "graphics/ScreenFonts.h" +#include int32_t EnvironmentTelemetryModule::runOnce() { if (sleepOnNextExecution == true) { sleepOnNextExecution = false; - uint32_t nightyNightMs = getConfiguredOrDefaultMs(moduleConfig.telemetry.environment_update_interval); + uint32_t nightyNightMs = Default::getConfiguredOrDefaultMs(moduleConfig.telemetry.environment_update_interval, + default_telemetry_broadcast_interval_secs); LOG_DEBUG("Sleeping for %ims, then awaking to send metrics again.\n", nightyNightMs); doDeepSleep(nightyNightMs, true); } @@ -68,7 +85,7 @@ int32_t EnvironmentTelemetryModule::runOnce() // moduleConfig.telemetry.environment_measurement_enabled = 1; // moduleConfig.telemetry.environment_screen_enabled = 1; - // moduleConfig.telemetry.environment_update_interval = 45; + // moduleConfig.telemetry.environment_update_interval = 15; if (!(moduleConfig.telemetry.environment_measurement_enabled || moduleConfig.telemetry.environment_screen_enabled)) { // If this module is not enabled, and the user doesn't want the display screen don't waste any OSThread time on it @@ -83,10 +100,19 @@ int32_t EnvironmentTelemetryModule::runOnce() LOG_INFO("Environment Telemetry: Initializing\n"); // it's possible to have this module enabled, only for displaying values on the screen. // therefore, we should only enable the sensor loop if measurement is also enabled +#ifdef T1000X_SENSOR_EN + result = t1000xSensor.runOnce(); +#else + if (dfRobotLarkSensor.hasSensor()) + result = dfRobotLarkSensor.runOnce(); + if (bmp085Sensor.hasSensor()) + result = bmp085Sensor.runOnce(); if (bmp280Sensor.hasSensor()) result = bmp280Sensor.runOnce(); if (bme280Sensor.hasSensor()) result = bme280Sensor.runOnce(); + if (bmp3xxSensor.hasSensor()) + result = bmp3xxSensor.runOnce(); if (bme680Sensor.hasSensor()) result = bme680Sensor.runOnce(); if (mcp9808Sensor.hasSensor()) @@ -97,10 +123,31 @@ int32_t EnvironmentTelemetryModule::runOnce() result = lps22hbSensor.runOnce(); if (sht31Sensor.hasSensor()) result = sht31Sensor.runOnce(); + if (sht4xSensor.hasSensor()) + result = sht4xSensor.runOnce(); if (ina219Sensor.hasSensor()) result = ina219Sensor.runOnce(); if (ina260Sensor.hasSensor()) result = ina260Sensor.runOnce(); + if (ina3221Sensor.hasSensor()) + result = ina3221Sensor.runOnce(); + if (veml7700Sensor.hasSensor()) + result = veml7700Sensor.runOnce(); + if (tsl2591Sensor.hasSensor()) + result = tsl2591Sensor.runOnce(); + if (opt3001Sensor.hasSensor()) + result = opt3001Sensor.runOnce(); + if (rcwl9620Sensor.hasSensor()) + result = rcwl9620Sensor.runOnce(); + if (aht10Sensor.hasSensor()) + result = aht10Sensor.runOnce(); + if (mlx90632Sensor.hasSensor()) + result = mlx90632Sensor.runOnce(); + if (nau7802Sensor.hasSensor()) + result = nau7802Sensor.runOnce(); + if (max17048Sensor.hasSensor()) + result = max17048Sensor.runOnce(); +#endif } return result; } else { @@ -112,18 +159,20 @@ int32_t EnvironmentTelemetryModule::runOnce() result = bme680Sensor.runTrigger(); } - uint32_t now = millis(); if (((lastSentToMesh == 0) || - ((now - lastSentToMesh) >= getConfiguredOrDefaultMs(moduleConfig.telemetry.environment_update_interval))) && + !Throttle::isWithinTimespanMs(lastSentToMesh, Default::getConfiguredOrDefaultMsScaled( + moduleConfig.telemetry.environment_update_interval, + default_telemetry_broadcast_interval_secs, numOnlineNodes))) && + airTime->isTxAllowedChannelUtil(config.device.role != meshtastic_Config_DeviceConfig_Role_SENSOR) && airTime->isTxAllowedAirUtil()) { sendTelemetry(); - lastSentToMesh = now; - } else if (((lastSentToPhone == 0) || ((now - lastSentToPhone) >= sendToPhoneIntervalMs)) && - (service.isToPhoneQueueEmpty())) { + lastSentToMesh = millis(); + } else if (((lastSentToPhone == 0) || !Throttle::isWithinTimespanMs(lastSentToPhone, sendToPhoneIntervalMs)) && + (service->isToPhoneQueueEmpty())) { // Just send to phone when it's not our time to send to mesh yet // Only send while queue is empty (phone assumed connected) sendTelemetry(NODENUM_BROADCAST, true); - lastSentToPhone = now; + lastSentToPhone = millis(); } } return min(sendToPhoneIntervalMs, result); @@ -134,63 +183,66 @@ bool EnvironmentTelemetryModule::wantUIFrame() return moduleConfig.telemetry.environment_screen_enabled; } -float EnvironmentTelemetryModule::CelsiusToFahrenheit(float c) -{ - return (c * 9) / 5 + 32; -} - -uint32_t GetTimeSinceMeshPacket(const meshtastic_MeshPacket *mp) -{ - uint32_t now = getTime(); - - uint32_t last_seen = mp->rx_time; - int delta = (int)(now - last_seen); - if (delta < 0) // our clock must be slightly off still - not set from GPS yet - delta = 0; - - return delta; -} - void EnvironmentTelemetryModule::drawFrame(OLEDDisplay *display, OLEDDisplayUiState *state, int16_t x, int16_t y) { display->setTextAlignment(TEXT_ALIGN_LEFT); - display->setFont(FONT_MEDIUM); - display->drawString(x, y, "Environment"); + display->setFont(FONT_SMALL); + if (lastMeasurementPacket == nullptr) { - display->setFont(FONT_SMALL); - display->drawString(x, y += fontHeight(FONT_MEDIUM), "No measurement"); + // If there's no valid packet, display "Environment" + display->drawString(x, y, "Environment"); + display->drawString(x, y += _fontHeight(FONT_SMALL), "No measurement"); return; } + // Decode the last measurement packet meshtastic_Telemetry lastMeasurement; - - uint32_t agoSecs = GetTimeSinceMeshPacket(lastMeasurementPacket); + uint32_t agoSecs = service->GetTimeSinceMeshPacket(lastMeasurementPacket); const char *lastSender = getSenderShortName(*lastMeasurementPacket); - auto &p = lastMeasurementPacket->decoded; + const meshtastic_Data &p = lastMeasurementPacket->decoded; if (!pb_decode_from_bytes(p.payload.bytes, p.payload.size, &meshtastic_Telemetry_msg, &lastMeasurement)) { - display->setFont(FONT_SMALL); - display->drawString(x, y += fontHeight(FONT_MEDIUM), "Measurement Error"); + display->drawString(x, y, "Measurement Error"); LOG_ERROR("Unable to decode last packet"); return; } - display->setFont(FONT_SMALL); + // Display "Env. From: ..." on its own + display->drawString(x, y, "Env. From: " + String(lastSender) + "(" + String(agoSecs) + "s)"); + String last_temp = String(lastMeasurement.variant.environment_metrics.temperature, 0) + "°C"; if (moduleConfig.telemetry.environment_display_fahrenheit) { - last_temp = String(CelsiusToFahrenheit(lastMeasurement.variant.environment_metrics.temperature), 0) + "°F"; + last_temp = + String(UnitConversions::CelsiusToFahrenheit(lastMeasurement.variant.environment_metrics.temperature), 0) + "°F"; } - display->drawString(x, y += fontHeight(FONT_MEDIUM) - 2, "From: " + String(lastSender) + "(" + String(agoSecs) + "s)"); - display->drawString(x, y += fontHeight(FONT_SMALL) - 2, + + // Continue with the remaining details + display->drawString(x, y += _fontHeight(FONT_SMALL), "Temp/Hum: " + last_temp + " / " + String(lastMeasurement.variant.environment_metrics.relative_humidity, 0) + "%"); - if (lastMeasurement.variant.environment_metrics.barometric_pressure != 0) - display->drawString(x, y += fontHeight(FONT_SMALL), + + if (lastMeasurement.variant.environment_metrics.barometric_pressure != 0) { + display->drawString(x, y += _fontHeight(FONT_SMALL), "Press: " + String(lastMeasurement.variant.environment_metrics.barometric_pressure, 0) + "hPA"); - if (lastMeasurement.variant.environment_metrics.voltage != 0) - display->drawString(x, y += fontHeight(FONT_SMALL), + } + + if (lastMeasurement.variant.environment_metrics.voltage != 0) { + display->drawString(x, y += _fontHeight(FONT_SMALL), "Volt/Cur: " + String(lastMeasurement.variant.environment_metrics.voltage, 0) + "V / " + String(lastMeasurement.variant.environment_metrics.current, 0) + "mA"); + } + + if (lastMeasurement.variant.environment_metrics.iaq != 0) { + display->drawString(x, y += _fontHeight(FONT_SMALL), "IAQ: " + String(lastMeasurement.variant.environment_metrics.iaq)); + } + + if (lastMeasurement.variant.environment_metrics.distance != 0) + display->drawString(x, y += _fontHeight(FONT_SMALL), + "Water Level: " + String(lastMeasurement.variant.environment_metrics.distance, 0) + "mm"); + + if (lastMeasurement.variant.environment_metrics.weight != 0) + display->drawString(x, y += _fontHeight(FONT_SMALL), + "Weight: " + String(lastMeasurement.variant.environment_metrics.weight, 0) + "kg"); } bool EnvironmentTelemetryModule::handleReceivedProtobuf(const meshtastic_MeshPacket &mp, meshtastic_Telemetry *t) @@ -200,10 +252,17 @@ bool EnvironmentTelemetryModule::handleReceivedProtobuf(const meshtastic_MeshPac const char *sender = getSenderShortName(mp); LOG_INFO("(Received from %s): barometric_pressure=%f, current=%f, gas_resistance=%f, relative_humidity=%f, " - "temperature=%f, voltage=%f\n", + "temperature=%f\n", sender, t->variant.environment_metrics.barometric_pressure, t->variant.environment_metrics.current, t->variant.environment_metrics.gas_resistance, t->variant.environment_metrics.relative_humidity, - t->variant.environment_metrics.temperature, t->variant.environment_metrics.voltage); + t->variant.environment_metrics.temperature); + LOG_INFO("(Received from %s): voltage=%f, IAQ=%d, distance=%f, lux=%f\n", sender, t->variant.environment_metrics.voltage, + t->variant.environment_metrics.iaq, t->variant.environment_metrics.distance, t->variant.environment_metrics.lux); + + LOG_INFO("(Received from %s): wind speed=%fm/s, direction=%d degrees, weight=%fkg\n", sender, + t->variant.environment_metrics.wind_speed, t->variant.environment_metrics.wind_direction, + t->variant.environment_metrics.weight); + #endif // release previous packet before occupying a new spot if (lastMeasurementPacket != nullptr) @@ -215,45 +274,172 @@ bool EnvironmentTelemetryModule::handleReceivedProtobuf(const meshtastic_MeshPac return false; // Let others look at this message also if they want } +bool EnvironmentTelemetryModule::getEnvironmentTelemetry(meshtastic_Telemetry *m) +{ + bool valid = true; + bool hasSensor = false; + m->time = getTime(); + m->which_variant = meshtastic_Telemetry_environment_metrics_tag; + m->variant.environment_metrics = meshtastic_EnvironmentMetrics_init_zero; + +#ifdef T1000X_SENSOR_EN // add by WayenWeng + valid = valid && t1000xSensor.getMetrics(m); + hasSensor = true; +#else + if (dfRobotLarkSensor.hasSensor()) { + valid = valid && dfRobotLarkSensor.getMetrics(m); + hasSensor = true; + } + if (sht31Sensor.hasSensor()) { + valid = valid && sht31Sensor.getMetrics(m); + hasSensor = true; + } + if (sht4xSensor.hasSensor()) { + valid = valid && sht4xSensor.getMetrics(m); + hasSensor = true; + } + if (lps22hbSensor.hasSensor()) { + valid = valid && lps22hbSensor.getMetrics(m); + hasSensor = true; + } + if (shtc3Sensor.hasSensor()) { + valid = valid && shtc3Sensor.getMetrics(m); + hasSensor = true; + } + if (bmp085Sensor.hasSensor()) { + valid = valid && bmp085Sensor.getMetrics(m); + hasSensor = true; + } + if (bmp280Sensor.hasSensor()) { + valid = valid && bmp280Sensor.getMetrics(m); + hasSensor = true; + } + if (bme280Sensor.hasSensor()) { + valid = valid && bme280Sensor.getMetrics(m); + hasSensor = true; + } + if (bmp3xxSensor.hasSensor()) { + valid = valid && bmp3xxSensor.getMetrics(m); + hasSensor = true; + } + if (bme680Sensor.hasSensor()) { + valid = valid && bme680Sensor.getMetrics(m); + hasSensor = true; + } + if (mcp9808Sensor.hasSensor()) { + valid = valid && mcp9808Sensor.getMetrics(m); + hasSensor = true; + } + if (ina219Sensor.hasSensor()) { + valid = valid && ina219Sensor.getMetrics(m); + hasSensor = true; + } + if (ina260Sensor.hasSensor()) { + valid = valid && ina260Sensor.getMetrics(m); + hasSensor = true; + } + if (ina3221Sensor.hasSensor()) { + valid = valid && ina3221Sensor.getMetrics(m); + hasSensor = true; + } + if (veml7700Sensor.hasSensor()) { + valid = valid && veml7700Sensor.getMetrics(m); + hasSensor = true; + } + if (tsl2591Sensor.hasSensor()) { + valid = valid && tsl2591Sensor.getMetrics(m); + hasSensor = true; + } + if (opt3001Sensor.hasSensor()) { + valid = valid && opt3001Sensor.getMetrics(m); + hasSensor = true; + } + if (mlx90632Sensor.hasSensor()) { + valid = valid && mlx90632Sensor.getMetrics(m); + hasSensor = true; + } + if (rcwl9620Sensor.hasSensor()) { + valid = valid && rcwl9620Sensor.getMetrics(m); + hasSensor = true; + } + if (nau7802Sensor.hasSensor()) { + valid = valid && nau7802Sensor.getMetrics(m); + hasSensor = true; + } + if (aht10Sensor.hasSensor()) { + if (!bmp280Sensor.hasSensor() && !bmp3xxSensor.hasSensor()) { + valid = valid && aht10Sensor.getMetrics(m); + hasSensor = true; + } else if (bmp280Sensor.hasSensor()) { + // prefer bmp280 temp if both sensors are present, fetch only humidity + meshtastic_Telemetry m_ahtx = meshtastic_Telemetry_init_zero; + LOG_INFO("AHTX0+BMP280 module detected: using temp from BMP280 and humy from AHTX0\n"); + aht10Sensor.getMetrics(&m_ahtx); + m->variant.environment_metrics.relative_humidity = m_ahtx.variant.environment_metrics.relative_humidity; + } else { + // prefer bmp3xx temp if both sensors are present, fetch only humidity + meshtastic_Telemetry m_ahtx = meshtastic_Telemetry_init_zero; + LOG_INFO("AHTX0+BMP3XX module detected: using temp from BMP3XX and humy from AHTX0\n"); + aht10Sensor.getMetrics(&m_ahtx); + m->variant.environment_metrics.relative_humidity = m_ahtx.variant.environment_metrics.relative_humidity; + } + } + if (max17048Sensor.hasSensor()) { + valid = valid && max17048Sensor.getMetrics(m); + hasSensor = true; + } + +#endif + return valid && hasSensor; +} + +meshtastic_MeshPacket *EnvironmentTelemetryModule::allocReply() +{ + if (currentRequest) { + auto req = *currentRequest; + const auto &p = req.decoded; + meshtastic_Telemetry scratch; + meshtastic_Telemetry *decoded = NULL; + memset(&scratch, 0, sizeof(scratch)); + if (pb_decode_from_bytes(p.payload.bytes, p.payload.size, &meshtastic_Telemetry_msg, &scratch)) { + decoded = &scratch; + } else { + LOG_ERROR("Error decoding EnvironmentTelemetry module!\n"); + return NULL; + } + // Check for a request for environment metrics + if (decoded->which_variant == meshtastic_Telemetry_environment_metrics_tag) { + meshtastic_Telemetry m = meshtastic_Telemetry_init_zero; + if (getEnvironmentTelemetry(&m)) { + LOG_INFO("Environment telemetry replying to request\n"); + return allocDataProtobuf(m); + } else { + return NULL; + } + } + } + return NULL; +} + bool EnvironmentTelemetryModule::sendTelemetry(NodeNum dest, bool phoneOnly) { - meshtastic_Telemetry m; - bool valid = false; - m.time = getTime(); + meshtastic_Telemetry m = meshtastic_Telemetry_init_zero; m.which_variant = meshtastic_Telemetry_environment_metrics_tag; - - m.variant.environment_metrics.barometric_pressure = 0; - m.variant.environment_metrics.current = 0; - m.variant.environment_metrics.gas_resistance = 0; - m.variant.environment_metrics.relative_humidity = 0; - m.variant.environment_metrics.temperature = 0; - m.variant.environment_metrics.voltage = 0; - - if (sht31Sensor.hasSensor()) - valid = sht31Sensor.getMetrics(&m); - if (lps22hbSensor.hasSensor()) - valid = lps22hbSensor.getMetrics(&m); - if (shtc3Sensor.hasSensor()) - valid = shtc3Sensor.getMetrics(&m); - if (bmp280Sensor.hasSensor()) - valid = bmp280Sensor.getMetrics(&m); - if (bme280Sensor.hasSensor()) - valid = bme280Sensor.getMetrics(&m); - if (bme680Sensor.hasSensor()) - valid = bme680Sensor.getMetrics(&m); - if (mcp9808Sensor.hasSensor()) - valid = mcp9808Sensor.getMetrics(&m); - if (ina219Sensor.hasSensor()) - valid = ina219Sensor.getMetrics(&m); - if (ina260Sensor.hasSensor()) - valid = ina260Sensor.getMetrics(&m); - - if (valid) { - LOG_INFO("(Sending): barometric_pressure=%f, current=%f, gas_resistance=%f, relative_humidity=%f, temperature=%f, " - "voltage=%f\n", + m.time = getTime(); +#ifdef T1000X_SENSOR_EN + if (t1000xSensor.getMetrics(&m)) { +#else + if (getEnvironmentTelemetry(&m)) { +#endif + LOG_INFO("(Sending): 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, m.variant.environment_metrics.gas_resistance, m.variant.environment_metrics.relative_humidity, - m.variant.environment_metrics.temperature, m.variant.environment_metrics.voltage); + m.variant.environment_metrics.temperature); + LOG_INFO("(Sending): voltage=%f, IAQ=%d, distance=%f, lux=%f\n", m.variant.environment_metrics.voltage, + m.variant.environment_metrics.iaq, m.variant.environment_metrics.distance, m.variant.environment_metrics.lux); + + LOG_INFO("(Sending): wind speed=%fm/s, direction=%d degrees, weight=%fkg\n", m.variant.environment_metrics.wind_speed, + m.variant.environment_metrics.wind_direction, m.variant.environment_metrics.weight); sensor_read_error_count = 0; @@ -263,7 +449,7 @@ bool EnvironmentTelemetryModule::sendTelemetry(NodeNum dest, bool phoneOnly) if (config.device.role == meshtastic_Config_DeviceConfig_Role_SENSOR) p->priority = meshtastic_MeshPacket_Priority_RELIABLE; else - p->priority = meshtastic_MeshPacket_Priority_MIN; + p->priority = meshtastic_MeshPacket_Priority_BACKGROUND; // release previous packet before occupying a new spot if (lastMeasurementPacket != nullptr) packetPool.release(lastMeasurementPacket); @@ -271,10 +457,10 @@ bool EnvironmentTelemetryModule::sendTelemetry(NodeNum dest, bool phoneOnly) lastMeasurementPacket = packetPool.allocCopy(*p); if (phoneOnly) { LOG_INFO("Sending packet to phone\n"); - service.sendToPhone(p); + service->sendToPhone(p); } else { LOG_INFO("Sending packet to mesh\n"); - service.sendToMesh(p, RX_SRC_LOCAL, true); + service->sendToMesh(p, RX_SRC_LOCAL, true); if (config.device.role == meshtastic_Config_DeviceConfig_Role_SENSOR && config.power.is_power_saving) { LOG_DEBUG("Starting next execution in 5 seconds and then going to sleep.\n"); @@ -282,6 +468,122 @@ bool EnvironmentTelemetryModule::sendTelemetry(NodeNum dest, bool phoneOnly) setIntervalFromNow(5000); } } + return true; } - return valid; -} \ No newline at end of file + return false; +} + +AdminMessageHandleResult EnvironmentTelemetryModule::handleAdminMessageForModule(const meshtastic_MeshPacket &mp, + meshtastic_AdminMessage *request, + meshtastic_AdminMessage *response) +{ + AdminMessageHandleResult result = AdminMessageHandleResult::NOT_HANDLED; + if (dfRobotLarkSensor.hasSensor()) { + result = dfRobotLarkSensor.handleAdminMessage(mp, request, response); + if (result != AdminMessageHandleResult::NOT_HANDLED) + return result; + } + if (sht31Sensor.hasSensor()) { + result = sht31Sensor.handleAdminMessage(mp, request, response); + if (result != AdminMessageHandleResult::NOT_HANDLED) + return result; + } + if (lps22hbSensor.hasSensor()) { + result = lps22hbSensor.handleAdminMessage(mp, request, response); + if (result != AdminMessageHandleResult::NOT_HANDLED) + return result; + } + if (shtc3Sensor.hasSensor()) { + result = shtc3Sensor.handleAdminMessage(mp, request, response); + if (result != AdminMessageHandleResult::NOT_HANDLED) + return result; + } + if (bmp085Sensor.hasSensor()) { + result = bmp085Sensor.handleAdminMessage(mp, request, response); + if (result != AdminMessageHandleResult::NOT_HANDLED) + return result; + } + if (bmp280Sensor.hasSensor()) { + result = bmp280Sensor.handleAdminMessage(mp, request, response); + if (result != AdminMessageHandleResult::NOT_HANDLED) + return result; + } + if (bme280Sensor.hasSensor()) { + result = bme280Sensor.handleAdminMessage(mp, request, response); + if (result != AdminMessageHandleResult::NOT_HANDLED) + return result; + } + if (bmp3xxSensor.hasSensor()) { + result = bmp3xxSensor.handleAdminMessage(mp, request, response); + if (result != AdminMessageHandleResult::NOT_HANDLED) + return result; + } + if (bme680Sensor.hasSensor()) { + result = bme680Sensor.handleAdminMessage(mp, request, response); + if (result != AdminMessageHandleResult::NOT_HANDLED) + return result; + } + if (mcp9808Sensor.hasSensor()) { + result = mcp9808Sensor.handleAdminMessage(mp, request, response); + if (result != AdminMessageHandleResult::NOT_HANDLED) + return result; + } + if (ina219Sensor.hasSensor()) { + result = ina219Sensor.handleAdminMessage(mp, request, response); + if (result != AdminMessageHandleResult::NOT_HANDLED) + return result; + } + if (ina260Sensor.hasSensor()) { + result = ina260Sensor.handleAdminMessage(mp, request, response); + if (result != AdminMessageHandleResult::NOT_HANDLED) + return result; + } + if (ina3221Sensor.hasSensor()) { + result = ina3221Sensor.handleAdminMessage(mp, request, response); + if (result != AdminMessageHandleResult::NOT_HANDLED) + return result; + } + if (veml7700Sensor.hasSensor()) { + result = veml7700Sensor.handleAdminMessage(mp, request, response); + if (result != AdminMessageHandleResult::NOT_HANDLED) + return result; + } + if (tsl2591Sensor.hasSensor()) { + result = tsl2591Sensor.handleAdminMessage(mp, request, response); + if (result != AdminMessageHandleResult::NOT_HANDLED) + return result; + } + if (opt3001Sensor.hasSensor()) { + result = opt3001Sensor.handleAdminMessage(mp, request, response); + if (result != AdminMessageHandleResult::NOT_HANDLED) + return result; + } + if (mlx90632Sensor.hasSensor()) { + result = mlx90632Sensor.handleAdminMessage(mp, request, response); + if (result != AdminMessageHandleResult::NOT_HANDLED) + return result; + } + if (rcwl9620Sensor.hasSensor()) { + result = rcwl9620Sensor.handleAdminMessage(mp, request, response); + if (result != AdminMessageHandleResult::NOT_HANDLED) + return result; + } + if (nau7802Sensor.hasSensor()) { + result = nau7802Sensor.handleAdminMessage(mp, request, response); + if (result != AdminMessageHandleResult::NOT_HANDLED) + return result; + } + if (aht10Sensor.hasSensor()) { + result = aht10Sensor.handleAdminMessage(mp, request, response); + if (result != AdminMessageHandleResult::NOT_HANDLED) + return result; + } + if (max17048Sensor.hasSensor()) { + result = max17048Sensor.handleAdminMessage(mp, request, response); + if (result != AdminMessageHandleResult::NOT_HANDLED) + return result; + } + return result; +} + +#endif \ No newline at end of file diff --git a/src/modules/Telemetry/EnvironmentTelemetry.h b/src/modules/Telemetry/EnvironmentTelemetry.h index d6cd2137f..e680d8bbd 100644 --- a/src/modules/Telemetry/EnvironmentTelemetry.h +++ b/src/modules/Telemetry/EnvironmentTelemetry.h @@ -1,3 +1,7 @@ +#include "configuration.h" + +#if !MESHTASTIC_EXCLUDE_ENVIRONMENTAL_SENSOR + #pragma once #include "../mesh/generated/meshtastic/telemetry.pb.h" #include "NodeDB.h" @@ -7,12 +11,17 @@ class EnvironmentTelemetryModule : private concurrency::OSThread, public ProtobufModule { + CallbackObserver nodeStatusObserver = + CallbackObserver(this, + &EnvironmentTelemetryModule::handleStatusUpdate); + public: EnvironmentTelemetryModule() : concurrency::OSThread("EnvironmentTelemetryModule"), ProtobufModule("EnvironmentTelemetry", meshtastic_PortNum_TELEMETRY_APP, &meshtastic_Telemetry_msg) { lastMeasurementPacket = nullptr; + nodeStatusObserver.observe(&nodeStatus->onNewStatus); setIntervalFromNow(10 * 1000); } virtual bool wantUIFrame() override; @@ -28,13 +37,21 @@ class EnvironmentTelemetryModule : private concurrency::OSThread, public Protobu */ virtual bool handleReceivedProtobuf(const meshtastic_MeshPacket &mp, meshtastic_Telemetry *p) override; virtual int32_t runOnce() override; + /** Called to get current Environment telemetry data + @return true if it contains valid data + */ + bool getEnvironmentTelemetry(meshtastic_Telemetry *m); + virtual meshtastic_MeshPacket *allocReply() override; /** * Send our Telemetry into the mesh */ bool sendTelemetry(NodeNum dest = NODENUM_BROADCAST, bool wantReplies = false); + virtual AdminMessageHandleResult handleAdminMessageForModule(const meshtastic_MeshPacket &mp, + meshtastic_AdminMessage *request, + meshtastic_AdminMessage *response) override; + private: - float CelsiusToFahrenheit(float c); bool firstTime = 1; meshtastic_MeshPacket *lastMeasurementPacket; uint32_t sendToPhoneIntervalMs = SECONDS_IN_MINUTE * 1000; // Send to phone every minute @@ -42,3 +59,5 @@ class EnvironmentTelemetryModule : private concurrency::OSThread, public Protobu uint32_t lastSentToPhone = 0; uint32_t sensor_read_error_count = 0; }; + +#endif \ No newline at end of file diff --git a/src/modules/Telemetry/HealthTelemetry.cpp b/src/modules/Telemetry/HealthTelemetry.cpp new file mode 100644 index 000000000..bcf9d9d57 --- /dev/null +++ b/src/modules/Telemetry/HealthTelemetry.cpp @@ -0,0 +1,249 @@ +#include "configuration.h" + +#if !MESHTASTIC_EXCLUDE_ENVIRONMENTAL_SENSOR && !defined(ARCH_PORTDUINO) + +#include "../mesh/generated/meshtastic/telemetry.pb.h" +#include "Default.h" +#include "HealthTelemetry.h" +#include "MeshService.h" +#include "NodeDB.h" +#include "PowerFSM.h" +#include "RTC.h" +#include "Router.h" +#include "UnitConversions.h" +#include "main.h" +#include "power.h" +#include "sleep.h" +#include "target_specific.h" +#include +#include + +// Sensors +#include "Sensor/MAX30102Sensor.h" +#include "Sensor/MLX90614Sensor.h" + +MAX30102Sensor max30102Sensor; +MLX90614Sensor mlx90614Sensor; + +#define FAILED_STATE_SENSOR_READ_MULTIPLIER 10 +#define DISPLAY_RECEIVEID_MEASUREMENTS_ON_SCREEN true + +#if (HAS_SCREEN) +#include "graphics/ScreenFonts.h" +#endif +#include + +int32_t HealthTelemetryModule::runOnce() +{ + if (sleepOnNextExecution == true) { + sleepOnNextExecution = false; + uint32_t nightyNightMs = Default::getConfiguredOrDefaultMs(moduleConfig.telemetry.health_update_interval, + default_telemetry_broadcast_interval_secs); + LOG_DEBUG("Sleeping for %ims, then awaking to send metrics again.\n", nightyNightMs); + doDeepSleep(nightyNightMs, true); + } + + uint32_t result = UINT32_MAX; + + if (!(moduleConfig.telemetry.health_measurement_enabled || moduleConfig.telemetry.health_screen_enabled)) { + // If this module is not enabled, and the user doesn't want the display screen don't waste any OSThread time on it + return disable(); + } + + if (firstTime) { + // This is the first time the OSThread library has called this function, so do some setup + firstTime = false; + + if (moduleConfig.telemetry.health_measurement_enabled) { + LOG_INFO("Health Telemetry: Initializing\n"); + // Initialize sensors + if (mlx90614Sensor.hasSensor()) + result = mlx90614Sensor.runOnce(); + if (max30102Sensor.hasSensor()) + result = max30102Sensor.runOnce(); + } + return result; + } else { + // if we somehow got to a second run of this module with measurement disabled, then just wait forever + if (!moduleConfig.telemetry.health_measurement_enabled) { + return disable(); + } + + if (((lastSentToMesh == 0) || + !Throttle::isWithinTimespanMs(lastSentToMesh, Default::getConfiguredOrDefaultMsScaled( + moduleConfig.telemetry.health_update_interval, + default_telemetry_broadcast_interval_secs, numOnlineNodes))) && + airTime->isTxAllowedChannelUtil(config.device.role != meshtastic_Config_DeviceConfig_Role_SENSOR) && + airTime->isTxAllowedAirUtil()) { + sendTelemetry(); + lastSentToMesh = millis(); + } else if (((lastSentToPhone == 0) || !Throttle::isWithinTimespanMs(lastSentToPhone, sendToPhoneIntervalMs)) && + (service->isToPhoneQueueEmpty())) { + // Just send to phone when it's not our time to send to mesh yet + // Only send while queue is empty (phone assumed connected) + sendTelemetry(NODENUM_BROADCAST, true); + lastSentToPhone = millis(); + } + } + return min(sendToPhoneIntervalMs, result); +} + +bool HealthTelemetryModule::wantUIFrame() +{ + return moduleConfig.telemetry.health_screen_enabled; +} + +void HealthTelemetryModule::drawFrame(OLEDDisplay *display, OLEDDisplayUiState *state, int16_t x, int16_t y) +{ + display->setTextAlignment(TEXT_ALIGN_LEFT); + display->setFont(FONT_SMALL); + + if (lastMeasurementPacket == nullptr) { + // If there's no valid packet, display "Health" + display->drawString(x, y, "Health"); + display->drawString(x, y += _fontHeight(FONT_SMALL), "No measurement"); + return; + } + + // Decode the last measurement packet + meshtastic_Telemetry lastMeasurement; + uint32_t agoSecs = service->GetTimeSinceMeshPacket(lastMeasurementPacket); + const char *lastSender = getSenderShortName(*lastMeasurementPacket); + + const meshtastic_Data &p = lastMeasurementPacket->decoded; + if (!pb_decode_from_bytes(p.payload.bytes, p.payload.size, &meshtastic_Telemetry_msg, &lastMeasurement)) { + display->drawString(x, y, "Measurement Error"); + LOG_ERROR("Unable to decode last packet"); + return; + } + + // Display "Health From: ..." on its own + display->drawString(x, y, "Health From: " + String(lastSender) + "(" + String(agoSecs) + "s)"); + + String last_temp = String(lastMeasurement.variant.health_metrics.temperature, 0) + "°C"; + if (moduleConfig.telemetry.environment_display_fahrenheit) { + last_temp = String(UnitConversions::CelsiusToFahrenheit(lastMeasurement.variant.health_metrics.temperature), 0) + "°F"; + } + + // Continue with the remaining details + display->drawString(x, y += _fontHeight(FONT_SMALL), "Temp: " + last_temp); + if (lastMeasurement.variant.health_metrics.has_heart_bpm) { + display->drawString(x, y += _fontHeight(FONT_SMALL), + "Heart Rate: " + String(lastMeasurement.variant.health_metrics.heart_bpm, 0) + " bpm"); + } + if (lastMeasurement.variant.health_metrics.has_spO2) { + display->drawString(x, y += _fontHeight(FONT_SMALL), + "spO2: " + String(lastMeasurement.variant.health_metrics.spO2, 0) + " %"); + } +} + +bool HealthTelemetryModule::handleReceivedProtobuf(const meshtastic_MeshPacket &mp, meshtastic_Telemetry *t) +{ + if (t->which_variant == meshtastic_Telemetry_health_metrics_tag) { +#ifdef DEBUG_PORT + const char *sender = getSenderShortName(mp); + + LOG_INFO("(Received from %s): temperature=%f, heart_bpm=%d, spO2=%d,\n", sender, t->variant.health_metrics.temperature, + t->variant.health_metrics.heart_bpm, t->variant.health_metrics.spO2); + +#endif + // release previous packet before occupying a new spot + if (lastMeasurementPacket != nullptr) + packetPool.release(lastMeasurementPacket); + + lastMeasurementPacket = packetPool.allocCopy(mp); + } + + return false; // Let others look at this message also if they want +} + +bool HealthTelemetryModule::getHealthTelemetry(meshtastic_Telemetry *m) +{ + bool valid = true; + bool hasSensor = false; + m->time = getTime(); + m->which_variant = meshtastic_Telemetry_health_metrics_tag; + m->variant.health_metrics = meshtastic_HealthMetrics_init_zero; + + if (max30102Sensor.hasSensor()) { + valid = valid && max30102Sensor.getMetrics(m); + hasSensor = true; + } + if (mlx90614Sensor.hasSensor()) { + valid = valid && mlx90614Sensor.getMetrics(m); + hasSensor = true; + } + + return valid && hasSensor; +} + +meshtastic_MeshPacket *HealthTelemetryModule::allocReply() +{ + if (currentRequest) { + auto req = *currentRequest; + const auto &p = req.decoded; + meshtastic_Telemetry scratch; + meshtastic_Telemetry *decoded = NULL; + memset(&scratch, 0, sizeof(scratch)); + if (pb_decode_from_bytes(p.payload.bytes, p.payload.size, &meshtastic_Telemetry_msg, &scratch)) { + decoded = &scratch; + } else { + LOG_ERROR("Error decoding HealthTelemetry module!\n"); + return NULL; + } + // Check for a request for health metrics + if (decoded->which_variant == meshtastic_Telemetry_health_metrics_tag) { + meshtastic_Telemetry m = meshtastic_Telemetry_init_zero; + if (getHealthTelemetry(&m)) { + LOG_INFO("Health telemetry replying to request\n"); + return allocDataProtobuf(m); + } else { + return NULL; + } + } + } + return NULL; +} + +bool HealthTelemetryModule::sendTelemetry(NodeNum dest, bool phoneOnly) +{ + meshtastic_Telemetry m = meshtastic_Telemetry_init_zero; + m.which_variant = meshtastic_Telemetry_health_metrics_tag; + m.time = getTime(); + if (getHealthTelemetry(&m)) { + LOG_INFO("(Sending): temperature=%f, heart_bpm=%d, spO2=%d\n", m.variant.health_metrics.temperature, + m.variant.health_metrics.heart_bpm, m.variant.health_metrics.spO2); + + sensor_read_error_count = 0; + + meshtastic_MeshPacket *p = allocDataProtobuf(m); + p->to = dest; + p->decoded.want_response = false; + if (config.device.role == meshtastic_Config_DeviceConfig_Role_SENSOR) + p->priority = meshtastic_MeshPacket_Priority_RELIABLE; + else + p->priority = meshtastic_MeshPacket_Priority_BACKGROUND; + // release previous packet before occupying a new spot + if (lastMeasurementPacket != nullptr) + packetPool.release(lastMeasurementPacket); + + lastMeasurementPacket = packetPool.allocCopy(*p); + if (phoneOnly) { + LOG_INFO("Sending packet to phone\n"); + service->sendToPhone(p); + } else { + LOG_INFO("Sending packet to mesh\n"); + service->sendToMesh(p, RX_SRC_LOCAL, true); + + if (config.device.role == meshtastic_Config_DeviceConfig_Role_SENSOR && config.power.is_power_saving) { + LOG_DEBUG("Starting next execution in 5 seconds and then going to sleep.\n"); + sleepOnNextExecution = true; + setIntervalFromNow(5000); + } + } + return true; + } + return false; +} + +#endif diff --git a/src/modules/Telemetry/HealthTelemetry.h b/src/modules/Telemetry/HealthTelemetry.h new file mode 100644 index 000000000..4ad0da838 --- /dev/null +++ b/src/modules/Telemetry/HealthTelemetry.h @@ -0,0 +1,60 @@ +#include "configuration.h" + +#if !MESHTASTIC_EXCLUDE_ENVIRONMENTAL_SENSOR && !defined(ARCH_PORTDUINO) + +#pragma once +#include "../mesh/generated/meshtastic/telemetry.pb.h" +#include "NodeDB.h" +#include "ProtobufModule.h" +#include +#include + +class HealthTelemetryModule : private concurrency::OSThread, public ProtobufModule +{ + CallbackObserver nodeStatusObserver = + CallbackObserver(this, &HealthTelemetryModule::handleStatusUpdate); + + public: + HealthTelemetryModule() + : concurrency::OSThread("HealthTelemetryModule"), + ProtobufModule("HealthTelemetry", meshtastic_PortNum_TELEMETRY_APP, &meshtastic_Telemetry_msg) + { + lastMeasurementPacket = nullptr; + nodeStatusObserver.observe(&nodeStatus->onNewStatus); + setIntervalFromNow(10 * 1000); + } + +#if !HAS_SCREEN + void drawFrame(OLEDDisplay *display, OLEDDisplayUiState *state, int16_t x, int16_t y); +#else + virtual void drawFrame(OLEDDisplay *display, OLEDDisplayUiState *state, int16_t x, int16_t y) override; +#endif + + virtual bool wantUIFrame() override; + + protected: + /** Called to handle a particular incoming message + @return true if you've guaranteed you've handled this message and no other handlers should be considered for it + */ + virtual bool handleReceivedProtobuf(const meshtastic_MeshPacket &mp, meshtastic_Telemetry *p) override; + virtual int32_t runOnce() override; + /** Called to get current Health telemetry data + @return true if it contains valid data + */ + bool getHealthTelemetry(meshtastic_Telemetry *m); + virtual meshtastic_MeshPacket *allocReply() override; + /** + * Send our Telemetry into the mesh + */ + bool sendTelemetry(NodeNum dest = NODENUM_BROADCAST, bool wantReplies = false); + + private: + bool firstTime = 1; + meshtastic_MeshPacket *lastMeasurementPacket; + uint32_t sendToPhoneIntervalMs = SECONDS_IN_MINUTE * 1000; // Send to phone every minute + uint32_t lastSentToMesh = 0; + uint32_t lastSentToPhone = 0; + uint32_t sensor_read_error_count = 0; +}; + +#endif diff --git a/src/modules/Telemetry/PowerTelemetry.cpp b/src/modules/Telemetry/PowerTelemetry.cpp index 032d7fc27..be3048998 100644 --- a/src/modules/Telemetry/PowerTelemetry.cpp +++ b/src/modules/Telemetry/PowerTelemetry.cpp @@ -1,11 +1,15 @@ -#include "PowerTelemetry.h" +#include "configuration.h" + +#if !MESHTASTIC_EXCLUDE_ENVIRONMENTAL_SENSOR + #include "../mesh/generated/meshtastic/telemetry.pb.h" +#include "Default.h" #include "MeshService.h" #include "NodeDB.h" #include "PowerFSM.h" +#include "PowerTelemetry.h" #include "RTC.h" #include "Router.h" -#include "configuration.h" #include "main.h" #include "power.h" #include "sleep.h" @@ -14,29 +18,15 @@ #define FAILED_STATE_SENSOR_READ_MULTIPLIER 10 #define DISPLAY_RECEIVEID_MEASUREMENTS_ON_SCREEN true -#if (defined(USE_EINK) || defined(ILI9341_DRIVER) || defined(ST7735_CS) || defined(ST7789_CS)) && \ - !defined(DISPLAY_FORCE_SMALL_FONTS) - -// The screen is bigger so use bigger fonts -#define FONT_SMALL ArialMT_Plain_16 -#define FONT_MEDIUM ArialMT_Plain_24 -#define FONT_LARGE ArialMT_Plain_24 -#else -#define FONT_SMALL ArialMT_Plain_10 -#define FONT_MEDIUM ArialMT_Plain_16 -#define FONT_LARGE ArialMT_Plain_24 -#endif - -#define fontHeight(font) ((font)[1] + 1) // height is position 1 - -#define FONT_HEIGHT_SMALL fontHeight(FONT_SMALL) -#define FONT_HEIGHT_MEDIUM fontHeight(FONT_MEDIUM) +#include "graphics/ScreenFonts.h" +#include int32_t PowerTelemetryModule::runOnce() { if (sleepOnNextExecution == true) { sleepOnNextExecution = false; - uint32_t nightyNightMs = getConfiguredOrDefaultMs(moduleConfig.telemetry.power_update_interval); + uint32_t nightyNightMs = Default::getConfiguredOrDefaultMs(moduleConfig.telemetry.power_update_interval, + default_telemetry_broadcast_interval_secs); LOG_DEBUG("Sleeping for %ims, then awaking to send metrics again.\n", nightyNightMs); doDeepSleep(nightyNightMs, true); } @@ -70,6 +60,8 @@ int32_t PowerTelemetryModule::runOnce() result = ina260Sensor.runOnce(); if (ina3221Sensor.hasSensor() && !ina3221Sensor.isInitialized()) result = ina3221Sensor.runOnce(); + if (max17048Sensor.hasSensor() && !max17048Sensor.isInitialized()) + result = max17048Sensor.runOnce(); } return result; #else @@ -80,18 +72,19 @@ int32_t PowerTelemetryModule::runOnce() if (!moduleConfig.telemetry.power_measurement_enabled) return disable(); - uint32_t now = millis(); if (((lastSentToMesh == 0) || - ((now - lastSentToMesh) >= getConfiguredOrDefaultMs(moduleConfig.telemetry.power_update_interval))) && + !Throttle::isWithinTimespanMs(lastSentToMesh, Default::getConfiguredOrDefaultMsScaled( + moduleConfig.telemetry.power_update_interval, + default_telemetry_broadcast_interval_secs, numOnlineNodes))) && airTime->isTxAllowedAirUtil()) { sendTelemetry(); - lastSentToMesh = now; - } else if (((lastSentToPhone == 0) || ((now - lastSentToPhone) >= sendToPhoneIntervalMs)) && - (service.isToPhoneQueueEmpty())) { + lastSentToMesh = millis(); + } else if (((lastSentToPhone == 0) || !Throttle::isWithinTimespanMs(lastSentToPhone, sendToPhoneIntervalMs)) && + (service->isToPhoneQueueEmpty())) { // Just send to phone when it's not our time to send to mesh yet // Only send while queue is empty (phone assumed connected) sendTelemetry(NODENUM_BROADCAST, true); - lastSentToPhone = now; + lastSentToPhone = millis(); } } return min(sendToPhoneIntervalMs, result); @@ -101,18 +94,6 @@ bool PowerTelemetryModule::wantUIFrame() return moduleConfig.telemetry.power_screen_enabled; } -uint32_t GetTimeyWimeySinceMeshPacket(const meshtastic_MeshPacket *mp) -{ - uint32_t now = getTime(); - - uint32_t last_seen = mp->rx_time; - int delta = (int)(now - last_seen); - if (delta < 0) // our clock must be slightly off still - not set from GPS yet - delta = 0; - - return delta; -} - void PowerTelemetryModule::drawFrame(OLEDDisplay *display, OLEDDisplayUiState *state, int16_t x, int16_t y) { display->setTextAlignment(TEXT_ALIGN_LEFT); @@ -120,36 +101,40 @@ void PowerTelemetryModule::drawFrame(OLEDDisplay *display, OLEDDisplayUiState *s display->drawString(x, y, "Power Telemetry"); if (lastMeasurementPacket == nullptr) { display->setFont(FONT_SMALL); - display->drawString(x, y += fontHeight(FONT_MEDIUM), "No measurement"); + display->drawString(x, y += _fontHeight(FONT_MEDIUM), "No measurement"); return; } meshtastic_Telemetry lastMeasurement; - uint32_t agoSecs = GetTimeyWimeySinceMeshPacket(lastMeasurementPacket); + uint32_t agoSecs = service->GetTimeSinceMeshPacket(lastMeasurementPacket); const char *lastSender = getSenderShortName(*lastMeasurementPacket); - auto &p = lastMeasurementPacket->decoded; + const meshtastic_Data &p = lastMeasurementPacket->decoded; if (!pb_decode_from_bytes(p.payload.bytes, p.payload.size, &meshtastic_Telemetry_msg, &lastMeasurement)) { display->setFont(FONT_SMALL); - display->drawString(x, y += fontHeight(FONT_MEDIUM), "Measurement Error"); + display->drawString(x, y += _fontHeight(FONT_MEDIUM), "Measurement Error"); LOG_ERROR("Unable to decode last packet"); return; } + // Display current and voltage based on ...power_metrics.has_[channel/voltage/current]... flags display->setFont(FONT_SMALL); - String last_temp = String(lastMeasurement.variant.environment_metrics.temperature, 0) + "°C"; - display->drawString(x, y += fontHeight(FONT_MEDIUM) - 2, "From: " + String(lastSender) + "(" + String(agoSecs) + "s)"); - if (lastMeasurement.variant.power_metrics.ch1_voltage != 0) { - display->drawString(x, y += fontHeight(FONT_SMALL), - "Ch 1 Volt/Cur: " + String(lastMeasurement.variant.power_metrics.ch1_voltage, 0) + "V / " + - String(lastMeasurement.variant.power_metrics.ch1_current, 0) + "mA"); - display->drawString(x, y += fontHeight(FONT_SMALL), - "Ch 2 Volt/Cur: " + String(lastMeasurement.variant.power_metrics.ch2_voltage, 0) + "V / " + - String(lastMeasurement.variant.power_metrics.ch2_current, 0) + "mA"); - display->drawString(x, y += fontHeight(FONT_SMALL), - "Ch 3 Volt/Cur: " + String(lastMeasurement.variant.power_metrics.ch3_voltage, 0) + "V / " + - String(lastMeasurement.variant.power_metrics.ch3_current, 0) + "mA"); + display->drawString(x, y += _fontHeight(FONT_MEDIUM) - 2, "From: " + String(lastSender) + "(" + String(agoSecs) + "s)"); + if (lastMeasurement.variant.power_metrics.has_ch1_voltage || lastMeasurement.variant.power_metrics.has_ch1_current) { + display->drawString(x, y += _fontHeight(FONT_SMALL), + "Ch1 Volt: " + String(lastMeasurement.variant.power_metrics.ch1_voltage, 2) + + "V / Curr: " + String(lastMeasurement.variant.power_metrics.ch1_current, 0) + "mA"); + } + if (lastMeasurement.variant.power_metrics.has_ch2_voltage || lastMeasurement.variant.power_metrics.has_ch2_current) { + display->drawString(x, y += _fontHeight(FONT_SMALL), + "Ch2 Volt: " + String(lastMeasurement.variant.power_metrics.ch2_voltage, 2) + + "V / Curr: " + String(lastMeasurement.variant.power_metrics.ch2_current, 0) + "mA"); + } + if (lastMeasurement.variant.power_metrics.has_ch3_voltage || lastMeasurement.variant.power_metrics.has_ch3_current) { + display->drawString(x, y += _fontHeight(FONT_SMALL), + "Ch3 Volt: " + String(lastMeasurement.variant.power_metrics.ch3_voltage, 2) + + "V / Curr: " + String(lastMeasurement.variant.power_metrics.ch3_current, 0) + "mA"); } } @@ -159,8 +144,8 @@ bool PowerTelemetryModule::handleReceivedProtobuf(const meshtastic_MeshPacket &m #ifdef DEBUG_PORT const char *sender = getSenderShortName(mp); - LOG_INFO("(Received from %s): ch1_voltage=%f, ch1_current=%f, ch2_voltage=%f, ch2_current=%f, " - "ch3_voltage=%f, ch3_current=%f\n", + LOG_INFO("(Received from %s): ch1_voltage=%.1f, ch1_current=%.1f, ch2_voltage=%.1f, ch2_current=%.1f, " + "ch3_voltage=%.1f, ch3_current=%.1f\n", sender, t->variant.power_metrics.ch1_voltage, t->variant.power_metrics.ch1_current, t->variant.power_metrics.ch2_voltage, t->variant.power_metrics.ch2_current, t->variant.power_metrics.ch3_voltage, t->variant.power_metrics.ch3_current); @@ -175,29 +160,62 @@ bool PowerTelemetryModule::handleReceivedProtobuf(const meshtastic_MeshPacket &m return false; // Let others look at this message also if they want } -bool PowerTelemetryModule::sendTelemetry(NodeNum dest, bool phoneOnly) +bool PowerTelemetryModule::getPowerTelemetry(meshtastic_Telemetry *m) { - meshtastic_Telemetry m; bool valid = false; - m.time = getTime(); - m.which_variant = meshtastic_Telemetry_power_metrics_tag; + m->time = getTime(); + m->which_variant = meshtastic_Telemetry_power_metrics_tag; - m.variant.power_metrics.ch1_voltage = 0; - m.variant.power_metrics.ch1_current = 0; - m.variant.power_metrics.ch2_voltage = 0; - m.variant.power_metrics.ch2_current = 0; - m.variant.power_metrics.ch3_voltage = 0; - m.variant.power_metrics.ch3_current = 0; + m->variant.power_metrics = meshtastic_PowerMetrics_init_zero; #if HAS_TELEMETRY && !defined(ARCH_PORTDUINO) if (ina219Sensor.hasSensor()) - valid = ina219Sensor.getMetrics(&m); + valid = ina219Sensor.getMetrics(m); if (ina260Sensor.hasSensor()) - valid = ina260Sensor.getMetrics(&m); + valid = ina260Sensor.getMetrics(m); if (ina3221Sensor.hasSensor()) - valid = ina3221Sensor.getMetrics(&m); + valid = ina3221Sensor.getMetrics(m); + if (max17048Sensor.hasSensor()) + valid = max17048Sensor.getMetrics(m); #endif - if (valid) { + return valid; +} + +meshtastic_MeshPacket *PowerTelemetryModule::allocReply() +{ + if (currentRequest) { + auto req = *currentRequest; + const auto &p = req.decoded; + meshtastic_Telemetry scratch; + meshtastic_Telemetry *decoded = NULL; + memset(&scratch, 0, sizeof(scratch)); + if (pb_decode_from_bytes(p.payload.bytes, p.payload.size, &meshtastic_Telemetry_msg, &scratch)) { + decoded = &scratch; + } else { + LOG_ERROR("Error decoding PowerTelemetry module!\n"); + return NULL; + } + // Check for a request for power metrics + if (decoded->which_variant == meshtastic_Telemetry_power_metrics_tag) { + meshtastic_Telemetry m = meshtastic_Telemetry_init_zero; + if (getPowerTelemetry(&m)) { + LOG_INFO("Power telemetry replying to request\n"); + return allocDataProtobuf(m); + } else { + return NULL; + } + } + } + + return NULL; +} + +bool PowerTelemetryModule::sendTelemetry(NodeNum dest, bool phoneOnly) +{ + meshtastic_Telemetry m = meshtastic_Telemetry_init_zero; + m.which_variant = meshtastic_Telemetry_power_metrics_tag; + m.time = getTime(); + if (getPowerTelemetry(&m)) { LOG_INFO("(Sending): ch1_voltage=%f, ch1_current=%f, ch2_voltage=%f, ch2_current=%f, " "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, @@ -211,7 +229,7 @@ bool PowerTelemetryModule::sendTelemetry(NodeNum dest, bool phoneOnly) if (config.device.role == meshtastic_Config_DeviceConfig_Role_SENSOR) p->priority = meshtastic_MeshPacket_Priority_RELIABLE; else - p->priority = meshtastic_MeshPacket_Priority_MIN; + p->priority = meshtastic_MeshPacket_Priority_BACKGROUND; // release previous packet before occupying a new spot if (lastMeasurementPacket != nullptr) packetPool.release(lastMeasurementPacket); @@ -219,17 +237,20 @@ bool PowerTelemetryModule::sendTelemetry(NodeNum dest, bool phoneOnly) lastMeasurementPacket = packetPool.allocCopy(*p); if (phoneOnly) { LOG_INFO("Sending packet to phone\n"); - service.sendToPhone(p); + service->sendToPhone(p); } else { LOG_INFO("Sending packet to mesh\n"); - service.sendToMesh(p, RX_SRC_LOCAL, true); + service->sendToMesh(p, RX_SRC_LOCAL, true); if (config.device.role == meshtastic_Config_DeviceConfig_Role_SENSOR && config.power.is_power_saving) { - LOG_DEBUG("Starting next execution in 5 seconds and then going to sleep.\n"); + LOG_DEBUG("Starting next execution in 5s then going to sleep.\n"); sleepOnNextExecution = true; setIntervalFromNow(5000); } } + return true; } - return valid; -} \ No newline at end of file + return false; +} + +#endif diff --git a/src/modules/Telemetry/PowerTelemetry.h b/src/modules/Telemetry/PowerTelemetry.h index fc5b98875..f8248304e 100644 --- a/src/modules/Telemetry/PowerTelemetry.h +++ b/src/modules/Telemetry/PowerTelemetry.h @@ -1,4 +1,9 @@ #pragma once + +#include "configuration.h" + +#if !MESHTASTIC_EXCLUDE_ENVIRONMENTAL_SENSOR + #include "../mesh/generated/meshtastic/telemetry.pb.h" #include "NodeDB.h" #include "ProtobufModule.h" @@ -7,12 +12,16 @@ class PowerTelemetryModule : private concurrency::OSThread, public ProtobufModule { + CallbackObserver nodeStatusObserver = + CallbackObserver(this, &PowerTelemetryModule::handleStatusUpdate); + public: PowerTelemetryModule() : concurrency::OSThread("PowerTelemetryModule"), ProtobufModule("PowerTelemetry", meshtastic_PortNum_TELEMETRY_APP, &meshtastic_Telemetry_msg) { lastMeasurementPacket = nullptr; + nodeStatusObserver.observe(&nodeStatus->onNewStatus); setIntervalFromNow(10 * 1000); } virtual bool wantUIFrame() override; @@ -28,6 +37,11 @@ class PowerTelemetryModule : private concurrency::OSThread, public ProtobufModul */ virtual bool handleReceivedProtobuf(const meshtastic_MeshPacket &mp, meshtastic_Telemetry *p) override; virtual int32_t runOnce() override; + /** Called to get current Power telemetry data + @return true if it contains valid data + */ + bool getPowerTelemetry(meshtastic_Telemetry *m); + virtual meshtastic_MeshPacket *allocReply() override; /** * Send our Telemetry into the mesh */ @@ -41,3 +55,5 @@ class PowerTelemetryModule : private concurrency::OSThread, public ProtobufModul uint32_t lastSentToPhone = 0; uint32_t sensor_read_error_count = 0; }; + +#endif \ No newline at end of file diff --git a/src/modules/Telemetry/Sensor/AHT10.cpp b/src/modules/Telemetry/Sensor/AHT10.cpp new file mode 100644 index 000000000..f9e8ba18a --- /dev/null +++ b/src/modules/Telemetry/Sensor/AHT10.cpp @@ -0,0 +1,44 @@ +#include "configuration.h" + +#if !MESHTASTIC_EXCLUDE_ENVIRONMENTAL_SENSOR + +#include "../mesh/generated/meshtastic/telemetry.pb.h" +#include "AHT10.h" +#include "TelemetrySensor.h" + +#include +#include + +AHT10Sensor::AHT10Sensor() : TelemetrySensor(meshtastic_TelemetrySensorType_AHT10, "AHT10") {} + +int32_t AHT10Sensor::runOnce() +{ + LOG_INFO("Init sensor: %s\n", sensorName); + if (!hasSensor()) { + return DEFAULT_SENSOR_MINIMUM_WAIT_TIME_BETWEEN_READS; + } + aht10 = Adafruit_AHTX0(); + status = aht10.begin(nodeTelemetrySensorsMap[sensorType].second, 0, nodeTelemetrySensorsMap[sensorType].first); + + return initI2CSensor(); +} + +void AHT10Sensor::setup() {} + +bool AHT10Sensor::getMetrics(meshtastic_Telemetry *measurement) +{ + LOG_DEBUG("AHT10Sensor::getMetrics\n"); + + sensors_event_t humidity, temp; + aht10.getEvent(&humidity, &temp); + + measurement->variant.environment_metrics.has_temperature = true; + measurement->variant.environment_metrics.has_relative_humidity = true; + + measurement->variant.environment_metrics.temperature = temp.temperature; + measurement->variant.environment_metrics.relative_humidity = humidity.relative_humidity; + + return true; +} + +#endif \ No newline at end of file diff --git a/src/modules/Telemetry/Sensor/AHT10.h b/src/modules/Telemetry/Sensor/AHT10.h new file mode 100644 index 000000000..d9a133402 --- /dev/null +++ b/src/modules/Telemetry/Sensor/AHT10.h @@ -0,0 +1,23 @@ +#include "configuration.h" + +#if !MESHTASTIC_EXCLUDE_ENVIRONMENTAL_SENSOR + +#include "../mesh/generated/meshtastic/telemetry.pb.h" +#include "TelemetrySensor.h" +#include + +class AHT10Sensor : public TelemetrySensor +{ + private: + Adafruit_AHTX0 aht10; + + protected: + virtual void setup() override; + + public: + AHT10Sensor(); + virtual int32_t runOnce() override; + virtual bool getMetrics(meshtastic_Telemetry *measurement) override; +}; + +#endif \ No newline at end of file diff --git a/src/modules/Telemetry/Sensor/BME280Sensor.cpp b/src/modules/Telemetry/Sensor/BME280Sensor.cpp index a30614123..55bc16744 100644 --- a/src/modules/Telemetry/Sensor/BME280Sensor.cpp +++ b/src/modules/Telemetry/Sensor/BME280Sensor.cpp @@ -1,7 +1,10 @@ -#include "BME280Sensor.h" -#include "../mesh/generated/meshtastic/telemetry.pb.h" -#include "TelemetrySensor.h" #include "configuration.h" + +#if !MESHTASTIC_EXCLUDE_ENVIRONMENTAL_SENSOR + +#include "../mesh/generated/meshtastic/telemetry.pb.h" +#include "BME280Sensor.h" +#include "TelemetrySensor.h" #include #include @@ -28,6 +31,10 @@ void BME280Sensor::setup() {} bool BME280Sensor::getMetrics(meshtastic_Telemetry *measurement) { + measurement->variant.environment_metrics.has_temperature = true; + measurement->variant.environment_metrics.has_relative_humidity = true; + measurement->variant.environment_metrics.has_barometric_pressure = true; + LOG_DEBUG("BME280Sensor::getMetrics\n"); bme280.takeForcedMeasurement(); measurement->variant.environment_metrics.temperature = bme280.readTemperature(); @@ -35,4 +42,5 @@ bool BME280Sensor::getMetrics(meshtastic_Telemetry *measurement) measurement->variant.environment_metrics.barometric_pressure = bme280.readPressure() / 100.0F; return true; -} \ No newline at end of file +} +#endif \ No newline at end of file diff --git a/src/modules/Telemetry/Sensor/BME280Sensor.h b/src/modules/Telemetry/Sensor/BME280Sensor.h index 2034c0a82..eb78f79f7 100644 --- a/src/modules/Telemetry/Sensor/BME280Sensor.h +++ b/src/modules/Telemetry/Sensor/BME280Sensor.h @@ -1,3 +1,7 @@ +#include "configuration.h" + +#if !MESHTASTIC_EXCLUDE_ENVIRONMENTAL_SENSOR + #include "../mesh/generated/meshtastic/telemetry.pb.h" #include "TelemetrySensor.h" #include @@ -14,4 +18,6 @@ class BME280Sensor : public TelemetrySensor BME280Sensor(); virtual int32_t runOnce() override; virtual bool getMetrics(meshtastic_Telemetry *measurement) override; -}; \ No newline at end of file +}; + +#endif \ No newline at end of file diff --git a/src/modules/Telemetry/Sensor/BME680Sensor.cpp b/src/modules/Telemetry/Sensor/BME680Sensor.cpp index 323dce31f..328ec827d 100644 --- a/src/modules/Telemetry/Sensor/BME680Sensor.cpp +++ b/src/modules/Telemetry/Sensor/BME680Sensor.cpp @@ -1,8 +1,11 @@ -#include "BME680Sensor.h" +#include "configuration.h" + +#if !MESHTASTIC_EXCLUDE_ENVIRONMENTAL_SENSOR + #include "../mesh/generated/meshtastic/telemetry.pb.h" +#include "BME680Sensor.h" #include "FSCommon.h" #include "TelemetrySensor.h" -#include "configuration.h" BME680Sensor::BME680Sensor() : TelemetrySensor(meshtastic_TelemetrySensorType_BME680, "BME680") {} @@ -25,7 +28,7 @@ int32_t BME680Sensor::runOnce() if (bme680.status == BSEC_OK) { status = 1; - if (!bme680.setConfig(bsec_config_iaq)) { + if (!bme680.setConfig(bsec_config)) { checkStatus("setConfig"); status = 0; } @@ -51,12 +54,20 @@ bool BME680Sensor::getMetrics(meshtastic_Telemetry *measurement) { if (bme680.getData(BSEC_OUTPUT_RAW_PRESSURE).signal == 0) return false; + + measurement->variant.environment_metrics.has_temperature = true; + measurement->variant.environment_metrics.has_relative_humidity = true; + measurement->variant.environment_metrics.has_barometric_pressure = true; + measurement->variant.environment_metrics.has_gas_resistance = true; + measurement->variant.environment_metrics.has_iaq = true; + measurement->variant.environment_metrics.temperature = bme680.getData(BSEC_OUTPUT_SENSOR_HEAT_COMPENSATED_TEMPERATURE).signal; measurement->variant.environment_metrics.relative_humidity = bme680.getData(BSEC_OUTPUT_SENSOR_HEAT_COMPENSATED_HUMIDITY).signal; - measurement->variant.environment_metrics.barometric_pressure = bme680.getData(BSEC_OUTPUT_RAW_PRESSURE).signal / 100.0F; + measurement->variant.environment_metrics.barometric_pressure = bme680.getData(BSEC_OUTPUT_RAW_PRESSURE).signal; measurement->variant.environment_metrics.gas_resistance = bme680.getData(BSEC_OUTPUT_RAW_GAS).signal / 1000.0; // Check if we need to save state to filesystem (every STATE_SAVE_PERIOD ms) + measurement->variant.environment_metrics.iaq = bme680.getData(BSEC_OUTPUT_IAQ).signal; updateState(); return true; } @@ -85,17 +96,17 @@ void BME680Sensor::updateState() if (stateUpdateCounter == 0) { /* First state update when IAQ accuracy is >= 3 */ accuracy = bme680.getData(BSEC_OUTPUT_IAQ).accuracy; - if (accuracy >= 3) { - LOG_DEBUG("%s state update IAQ accuracy %u >= 3\n", sensorName, accuracy); + if (accuracy >= 2) { + LOG_DEBUG("%s state update IAQ accuracy %u >= 2\n", sensorName, accuracy); update = true; stateUpdateCounter++; } else { - LOG_DEBUG("%s not updated, IAQ accuracy is %u >= 3\n", sensorName, accuracy); + LOG_DEBUG("%s not updated, IAQ accuracy is %u < 2\n", sensorName, accuracy); } } else { /* Update every STATE_SAVE_PERIOD minutes */ if ((stateUpdateCounter * STATE_SAVE_PERIOD) < millis()) { - LOG_DEBUG("%s state update every %d minutes\n", sensorName, STATE_SAVE_PERIOD); + LOG_DEBUG("%s state update every %d minutes\n", sensorName, STATE_SAVE_PERIOD / 60000); update = true; stateUpdateCounter++; } @@ -103,22 +114,15 @@ void BME680Sensor::updateState() if (update) { bme680.getState(bsecState); - std::string filenameTmp = bsecConfigFileName; - filenameTmp += ".tmp"; + if (FSCom.exists(bsecConfigFileName) && !FSCom.remove(bsecConfigFileName)) { + LOG_WARN("Can't remove old state file\n"); + } auto file = FSCom.open(bsecConfigFileName, FILE_O_WRITE); if (file) { LOG_INFO("%s state write to %s.\n", sensorName, bsecConfigFileName); file.write((uint8_t *)&bsecState, BSEC_MAX_STATE_BLOB_SIZE); file.flush(); file.close(); - // brief window of risk here ;-) - if (FSCom.exists(bsecConfigFileName) && !FSCom.remove(bsecConfigFileName)) { - LOG_WARN("Can't remove old state file\n"); - } - if (!renameFile(filenameTmp.c_str(), bsecConfigFileName)) { - LOG_ERROR("Error: can't rename new state file\n"); - } - } else { LOG_INFO("Can't write %s state (File: %s).\n", sensorName, bsecConfigFileName); } @@ -140,3 +144,5 @@ void BME680Sensor::checkStatus(String functionName) else if (bme680.sensor.status > BME68X_OK) LOG_WARN("%s BME68X code: %s\n", functionName.c_str(), String(bme680.sensor.status).c_str()); } + +#endif \ No newline at end of file diff --git a/src/modules/Telemetry/Sensor/BME680Sensor.h b/src/modules/Telemetry/Sensor/BME680Sensor.h index 4b7f84cf0..a5d2b5a48 100644 --- a/src/modules/Telemetry/Sensor/BME680Sensor.h +++ b/src/modules/Telemetry/Sensor/BME680Sensor.h @@ -1,10 +1,16 @@ +#include "configuration.h" + +#if !MESHTASTIC_EXCLUDE_ENVIRONMENTAL_SENSOR + #include "../mesh/generated/meshtastic/telemetry.pb.h" #include "TelemetrySensor.h" #include #define STATE_SAVE_PERIOD UINT32_C(360 * 60 * 1000) // That's 6 hours worth of millis() -#include "bme680_iaq_33v_3s_4d/bsec_iaq.h" +const uint8_t bsec_config[] = { +#include "config/bme680/bme680_iaq_33v_3s_4d/bsec_iaq.txt" +}; class BME680Sensor : public TelemetrySensor { @@ -35,4 +41,6 @@ class BME680Sensor : public TelemetrySensor int32_t runTrigger(); virtual int32_t runOnce() override; virtual bool getMetrics(meshtastic_Telemetry *measurement) override; -}; \ No newline at end of file +}; + +#endif \ No newline at end of file diff --git a/src/modules/Telemetry/Sensor/BMP085Sensor.cpp b/src/modules/Telemetry/Sensor/BMP085Sensor.cpp new file mode 100644 index 000000000..15951126f --- /dev/null +++ b/src/modules/Telemetry/Sensor/BMP085Sensor.cpp @@ -0,0 +1,39 @@ +#include "configuration.h" + +#if !MESHTASTIC_EXCLUDE_ENVIRONMENTAL_SENSOR + +#include "../mesh/generated/meshtastic/telemetry.pb.h" +#include "BMP085Sensor.h" +#include "TelemetrySensor.h" +#include +#include + +BMP085Sensor::BMP085Sensor() : TelemetrySensor(meshtastic_TelemetrySensorType_BMP085, "BMP085") {} + +int32_t BMP085Sensor::runOnce() +{ + LOG_INFO("Init sensor: %s\n", sensorName); + if (!hasSensor()) { + return DEFAULT_SENSOR_MINIMUM_WAIT_TIME_BETWEEN_READS; + } + bmp085 = Adafruit_BMP085(); + status = bmp085.begin(nodeTelemetrySensorsMap[sensorType].first, nodeTelemetrySensorsMap[sensorType].second); + + return initI2CSensor(); +} + +void BMP085Sensor::setup() {} + +bool BMP085Sensor::getMetrics(meshtastic_Telemetry *measurement) +{ + measurement->variant.environment_metrics.has_temperature = true; + measurement->variant.environment_metrics.has_barometric_pressure = true; + + LOG_DEBUG("BMP085Sensor::getMetrics\n"); + measurement->variant.environment_metrics.temperature = bmp085.readTemperature(); + measurement->variant.environment_metrics.barometric_pressure = bmp085.readPressure() / 100.0F; + + return true; +} + +#endif \ No newline at end of file diff --git a/src/modules/Telemetry/Sensor/BMP085Sensor.h b/src/modules/Telemetry/Sensor/BMP085Sensor.h new file mode 100644 index 000000000..4ba8c5af1 --- /dev/null +++ b/src/modules/Telemetry/Sensor/BMP085Sensor.h @@ -0,0 +1,23 @@ +#include "configuration.h" + +#if !MESHTASTIC_EXCLUDE_ENVIRONMENTAL_SENSOR + +#include "../mesh/generated/meshtastic/telemetry.pb.h" +#include "TelemetrySensor.h" +#include + +class BMP085Sensor : public TelemetrySensor +{ + private: + Adafruit_BMP085 bmp085; + + protected: + virtual void setup() override; + + public: + BMP085Sensor(); + virtual int32_t runOnce() override; + virtual bool getMetrics(meshtastic_Telemetry *measurement) override; +}; + +#endif \ No newline at end of file diff --git a/src/modules/Telemetry/Sensor/BMP280Sensor.cpp b/src/modules/Telemetry/Sensor/BMP280Sensor.cpp index 408532388..6b0743d75 100644 --- a/src/modules/Telemetry/Sensor/BMP280Sensor.cpp +++ b/src/modules/Telemetry/Sensor/BMP280Sensor.cpp @@ -1,7 +1,10 @@ -#include "BMP280Sensor.h" -#include "../mesh/generated/meshtastic/telemetry.pb.h" -#include "TelemetrySensor.h" #include "configuration.h" + +#if !MESHTASTIC_EXCLUDE_ENVIRONMENTAL_SENSOR + +#include "../mesh/generated/meshtastic/telemetry.pb.h" +#include "BMP280Sensor.h" +#include "TelemetrySensor.h" #include #include @@ -28,6 +31,9 @@ void BMP280Sensor::setup() {} bool BMP280Sensor::getMetrics(meshtastic_Telemetry *measurement) { + measurement->variant.environment_metrics.has_temperature = true; + measurement->variant.environment_metrics.has_barometric_pressure = true; + LOG_DEBUG("BMP280Sensor::getMetrics\n"); bmp280.takeForcedMeasurement(); measurement->variant.environment_metrics.temperature = bmp280.readTemperature(); @@ -35,3 +41,5 @@ bool BMP280Sensor::getMetrics(meshtastic_Telemetry *measurement) return true; } + +#endif \ No newline at end of file diff --git a/src/modules/Telemetry/Sensor/BMP280Sensor.h b/src/modules/Telemetry/Sensor/BMP280Sensor.h index 48581df8f..da85fdc1d 100644 --- a/src/modules/Telemetry/Sensor/BMP280Sensor.h +++ b/src/modules/Telemetry/Sensor/BMP280Sensor.h @@ -1,3 +1,7 @@ +#include "configuration.h" + +#if !MESHTASTIC_EXCLUDE_ENVIRONMENTAL_SENSOR + #include "../mesh/generated/meshtastic/telemetry.pb.h" #include "TelemetrySensor.h" #include @@ -14,4 +18,6 @@ class BMP280Sensor : public TelemetrySensor BMP280Sensor(); virtual int32_t runOnce() override; virtual bool getMetrics(meshtastic_Telemetry *measurement) override; -}; \ No newline at end of file +}; + +#endif \ No newline at end of file diff --git a/src/modules/Telemetry/Sensor/BMP3XXSensor.cpp b/src/modules/Telemetry/Sensor/BMP3XXSensor.cpp new file mode 100644 index 000000000..399610613 --- /dev/null +++ b/src/modules/Telemetry/Sensor/BMP3XXSensor.cpp @@ -0,0 +1,89 @@ +#include "configuration.h" + +#if !MESHTASTIC_EXCLUDE_ENVIRONMENTAL_SENSOR + +#include "BMP3XXSensor.h" + +BMP3XXSensor::BMP3XXSensor() : TelemetrySensor(meshtastic_TelemetrySensorType_BMP3XX, "BMP3XX") {} + +void BMP3XXSensor::setup() {} + +int32_t BMP3XXSensor::runOnce() +{ + LOG_INFO("Init sensor: %s\n", sensorName); + if (!hasSensor()) { + return DEFAULT_SENSOR_MINIMUM_WAIT_TIME_BETWEEN_READS; + } + + // Get a singleton instance and initialise the bmp3xx + if (bmp3xx == nullptr) { + bmp3xx = BMP3XXSingleton::GetInstance(); + } + status = bmp3xx->begin_I2C(nodeTelemetrySensorsMap[sensorType].first, nodeTelemetrySensorsMap[sensorType].second); + + // set up oversampling and filter initialization + bmp3xx->setTemperatureOversampling(BMP3_OVERSAMPLING_4X); + bmp3xx->setPressureOversampling(BMP3_OVERSAMPLING_8X); + bmp3xx->setIIRFilterCoeff(BMP3_IIR_FILTER_COEFF_3); + bmp3xx->setOutputDataRate(BMP3_ODR_25_HZ); + + // take a couple of initial readings to settle the sensor filters + for (int i = 0; i < 3; i++) { + bmp3xx->performReading(); + } + return initI2CSensor(); +} + +bool BMP3XXSensor::getMetrics(meshtastic_Telemetry *measurement) +{ + if (bmp3xx == nullptr) { + bmp3xx = BMP3XXSingleton::GetInstance(); + } + if ((int)measurement->which_variant == meshtastic_Telemetry_environment_metrics_tag) { + bmp3xx->performReading(); + + measurement->variant.environment_metrics.has_temperature = true; + measurement->variant.environment_metrics.has_barometric_pressure = true; + measurement->variant.environment_metrics.has_relative_humidity = false; + + measurement->variant.environment_metrics.temperature = static_cast(bmp3xx->temperature); + measurement->variant.environment_metrics.barometric_pressure = static_cast(bmp3xx->pressure) / 100.0F; + measurement->variant.environment_metrics.relative_humidity = 0.0f; + + LOG_DEBUG("BMP3XXSensor::getMetrics id: %i temp: %.1f press %.1f\n", measurement->which_variant, + measurement->variant.environment_metrics.temperature, + measurement->variant.environment_metrics.barometric_pressure); + } else { + LOG_DEBUG("BMP3XXSensor::getMetrics id: %i\n", measurement->which_variant); + } + return true; +} + +// Get a singleton wrapper for an Adafruit_bmp3xx +BMP3XXSingleton *BMP3XXSingleton::GetInstance() +{ + if (pinstance == nullptr) { + pinstance = new BMP3XXSingleton(); + } + return pinstance; +} + +BMP3XXSingleton::BMP3XXSingleton() {} + +BMP3XXSingleton::~BMP3XXSingleton() {} + +BMP3XXSingleton *BMP3XXSingleton::pinstance{nullptr}; + +bool BMP3XXSingleton::performReading() +{ + bool result = Adafruit_BMP3XX::performReading(); + if (result) { + double atmospheric = this->pressure / 100.0; + altitudeAmslMetres = 44330.0 * (1.0 - pow(atmospheric / SEAL_LEVEL_HPA, 0.1903)); + } else { + altitudeAmslMetres = 0.0; + } + return result; +} + +#endif \ No newline at end of file diff --git a/src/modules/Telemetry/Sensor/BMP3XXSensor.h b/src/modules/Telemetry/Sensor/BMP3XXSensor.h new file mode 100644 index 000000000..79939c8d8 --- /dev/null +++ b/src/modules/Telemetry/Sensor/BMP3XXSensor.h @@ -0,0 +1,56 @@ +#include "configuration.h" + +#if !MESHTASTIC_EXCLUDE_ENVIRONMENTAL_SENSOR + +#ifndef _BMP3XX_SENSOR_H +#define _BMP3XX_SENSOR_H + +#define SEAL_LEVEL_HPA 1013.2f + +#include "TelemetrySensor.h" +#include +#include + +// Singleton wrapper for the Adafruit_BMP3XX class +class BMP3XXSingleton : public Adafruit_BMP3XX +{ + private: + static BMP3XXSingleton *pinstance; + + protected: + BMP3XXSingleton(); + ~BMP3XXSingleton(); + + public: + // Create a singleton instance (not thread safe) + static BMP3XXSingleton *GetInstance(); + + // Singletons should not be cloneable. + BMP3XXSingleton(BMP3XXSingleton &other) = delete; + + // Singletons should not be assignable. + void operator=(const BMP3XXSingleton &) = delete; + + // Performs a full reading of all sensors in the BMP3XX. Assigns + // the internal temperature, pressure and altitudeAmsl variables + bool performReading(); + + // Altitude in metres above mean sea level, assigned after calling performReading() + double altitudeAmslMetres = 0.0f; +}; + +class BMP3XXSensor : public TelemetrySensor +{ + protected: + BMP3XXSingleton *bmp3xx = nullptr; + virtual void setup() override; + + public: + BMP3XXSensor(); + virtual int32_t runOnce() override; + virtual bool getMetrics(meshtastic_Telemetry *measurement) override; +}; + +#endif + +#endif \ No newline at end of file diff --git a/src/modules/Telemetry/Sensor/DFRobotLarkSensor.cpp b/src/modules/Telemetry/Sensor/DFRobotLarkSensor.cpp new file mode 100644 index 000000000..4b01eb444 --- /dev/null +++ b/src/modules/Telemetry/Sensor/DFRobotLarkSensor.cpp @@ -0,0 +1,59 @@ +#include "configuration.h" + +#if !MESHTASTIC_EXCLUDE_ENVIRONMENTAL_SENSOR + +#include "../mesh/generated/meshtastic/telemetry.pb.h" +#include "DFRobotLarkSensor.h" +#include "TelemetrySensor.h" +#include "gps/GeoCoord.h" +#include +#include + +DFRobotLarkSensor::DFRobotLarkSensor() : TelemetrySensor(meshtastic_TelemetrySensorType_DFROBOT_LARK, "DFROBOT_LARK") {} + +int32_t DFRobotLarkSensor::runOnce() +{ + LOG_INFO("Init sensor: %s\n", sensorName); + if (!hasSensor()) { + return DEFAULT_SENSOR_MINIMUM_WAIT_TIME_BETWEEN_READS; + } + + lark = DFRobot_LarkWeatherStation_I2C(nodeTelemetrySensorsMap[sensorType].first, nodeTelemetrySensorsMap[sensorType].second); + + if (lark.begin() == 0) // DFRobotLarkSensor init + { + LOG_DEBUG("DFRobotLarkSensor Init Succeed\n"); + status = true; + } else { + LOG_ERROR("DFRobotLarkSensor Init Failed\n"); + status = false; + } + return initI2CSensor(); +} + +void DFRobotLarkSensor::setup() {} + +bool DFRobotLarkSensor::getMetrics(meshtastic_Telemetry *measurement) +{ + measurement->variant.environment_metrics.has_temperature = true; + measurement->variant.environment_metrics.has_relative_humidity = true; + measurement->variant.environment_metrics.has_wind_speed = true; + measurement->variant.environment_metrics.has_wind_direction = true; + measurement->variant.environment_metrics.has_barometric_pressure = true; + + measurement->variant.environment_metrics.temperature = lark.getValue("Temp").toFloat(); + measurement->variant.environment_metrics.relative_humidity = lark.getValue("Humi").toFloat(); + measurement->variant.environment_metrics.wind_speed = lark.getValue("Speed").toFloat(); + measurement->variant.environment_metrics.wind_direction = GeoCoord::bearingToDegrees(lark.getValue("Dir").c_str()); + measurement->variant.environment_metrics.barometric_pressure = lark.getValue("Pressure").toFloat(); + + LOG_INFO("Temperature: %f\n", measurement->variant.environment_metrics.temperature); + LOG_INFO("Humidity: %f\n", measurement->variant.environment_metrics.relative_humidity); + LOG_INFO("Wind Speed: %f\n", measurement->variant.environment_metrics.wind_speed); + LOG_INFO("Wind Direction: %d\n", measurement->variant.environment_metrics.wind_direction); + LOG_INFO("Barometric Pressure: %f\n", measurement->variant.environment_metrics.barometric_pressure); + + return true; +} + +#endif \ No newline at end of file diff --git a/src/modules/Telemetry/Sensor/DFRobotLarkSensor.h b/src/modules/Telemetry/Sensor/DFRobotLarkSensor.h new file mode 100644 index 000000000..7a988e84a --- /dev/null +++ b/src/modules/Telemetry/Sensor/DFRobotLarkSensor.h @@ -0,0 +1,29 @@ +#pragma once + +#ifndef _MT_DFROBOTLARKSENSOR_H +#define _MT_DFROBOTLARKSENSOR_H +#include "configuration.h" + +#if !MESHTASTIC_EXCLUDE_ENVIRONMENTAL_SENSOR + +#include "../mesh/generated/meshtastic/telemetry.pb.h" +#include "TelemetrySensor.h" +#include +#include + +class DFRobotLarkSensor : public TelemetrySensor +{ + private: + DFRobot_LarkWeatherStation_I2C lark = DFRobot_LarkWeatherStation_I2C(); + + protected: + virtual void setup() override; + + public: + DFRobotLarkSensor(); + virtual int32_t runOnce() override; + virtual bool getMetrics(meshtastic_Telemetry *measurement) override; +}; + +#endif +#endif \ No newline at end of file diff --git a/src/modules/Telemetry/Sensor/INA219Sensor.cpp b/src/modules/Telemetry/Sensor/INA219Sensor.cpp index 5a1faa99f..f70d3705e 100644 --- a/src/modules/Telemetry/Sensor/INA219Sensor.cpp +++ b/src/modules/Telemetry/Sensor/INA219Sensor.cpp @@ -1,9 +1,16 @@ -#include "INA219Sensor.h" -#include "../mesh/generated/meshtastic/telemetry.pb.h" -#include "TelemetrySensor.h" #include "configuration.h" + +#if HAS_TELEMETRY && !MESHTASTIC_EXCLUDE_ENVIRONMENTAL_SENSOR + +#include "../mesh/generated/meshtastic/telemetry.pb.h" +#include "INA219Sensor.h" +#include "TelemetrySensor.h" #include +#ifndef INA219_MULTIPLIER +#define INA219_MULTIPLIER 1.0f +#endif + INA219Sensor::INA219Sensor() : TelemetrySensor(meshtastic_TelemetrySensorType_INA219, "INA219") {} int32_t INA219Sensor::runOnce() @@ -25,12 +32,17 @@ void INA219Sensor::setup() {} bool INA219Sensor::getMetrics(meshtastic_Telemetry *measurement) { + measurement->variant.environment_metrics.has_voltage = true; + measurement->variant.environment_metrics.has_current = true; + measurement->variant.environment_metrics.voltage = ina219.getBusVoltage_V(); - measurement->variant.environment_metrics.current = ina219.getCurrent_mA(); + measurement->variant.environment_metrics.current = ina219.getCurrent_mA() * INA219_MULTIPLIER; return true; } uint16_t INA219Sensor::getBusVoltageMv() { return lround(ina219.getBusVoltage_V() * 1000); -} \ No newline at end of file +} + +#endif \ No newline at end of file diff --git a/src/modules/Telemetry/Sensor/INA219Sensor.h b/src/modules/Telemetry/Sensor/INA219Sensor.h index 76f4613db..9dded067b 100644 --- a/src/modules/Telemetry/Sensor/INA219Sensor.h +++ b/src/modules/Telemetry/Sensor/INA219Sensor.h @@ -1,3 +1,7 @@ +#include "configuration.h" + +#if HAS_TELEMETRY && !MESHTASTIC_EXCLUDE_ENVIRONMENTAL_SENSOR + #include "../mesh/generated/meshtastic/telemetry.pb.h" #include "TelemetrySensor.h" #include "VoltageSensor.h" @@ -16,4 +20,6 @@ class INA219Sensor : public TelemetrySensor, VoltageSensor virtual int32_t runOnce() override; virtual bool getMetrics(meshtastic_Telemetry *measurement) override; virtual uint16_t getBusVoltageMv() override; -}; \ No newline at end of file +}; + +#endif \ No newline at end of file diff --git a/src/modules/Telemetry/Sensor/INA260Sensor.cpp b/src/modules/Telemetry/Sensor/INA260Sensor.cpp index 89b7580d2..751608c82 100644 --- a/src/modules/Telemetry/Sensor/INA260Sensor.cpp +++ b/src/modules/Telemetry/Sensor/INA260Sensor.cpp @@ -1,7 +1,10 @@ -#include "INA260Sensor.h" -#include "../mesh/generated/meshtastic/telemetry.pb.h" -#include "TelemetrySensor.h" #include "configuration.h" + +#if HAS_TELEMETRY && !MESHTASTIC_EXCLUDE_ENVIRONMENTAL_SENSOR + +#include "../mesh/generated/meshtastic/telemetry.pb.h" +#include "INA260Sensor.h" +#include "TelemetrySensor.h" #include INA260Sensor::INA260Sensor() : TelemetrySensor(meshtastic_TelemetrySensorType_INA260, "INA260") {} @@ -23,6 +26,9 @@ void INA260Sensor::setup() {} bool INA260Sensor::getMetrics(meshtastic_Telemetry *measurement) { + measurement->variant.environment_metrics.has_voltage = true; + measurement->variant.environment_metrics.has_current = true; + // mV conversion to V measurement->variant.environment_metrics.voltage = ina260.readBusVoltage() / 1000; measurement->variant.environment_metrics.current = ina260.readCurrent(); @@ -32,4 +38,6 @@ bool INA260Sensor::getMetrics(meshtastic_Telemetry *measurement) uint16_t INA260Sensor::getBusVoltageMv() { return lround(ina260.readBusVoltage()); -} \ No newline at end of file +} + +#endif \ No newline at end of file diff --git a/src/modules/Telemetry/Sensor/INA260Sensor.h b/src/modules/Telemetry/Sensor/INA260Sensor.h index 28e8944bf..f436b8f38 100644 --- a/src/modules/Telemetry/Sensor/INA260Sensor.h +++ b/src/modules/Telemetry/Sensor/INA260Sensor.h @@ -1,3 +1,7 @@ +#include "configuration.h" + +#if HAS_TELEMETRY && !MESHTASTIC_EXCLUDE_ENVIRONMENTAL_SENSOR + #include "../mesh/generated/meshtastic/telemetry.pb.h" #include "TelemetrySensor.h" #include "VoltageSensor.h" @@ -16,4 +20,6 @@ class INA260Sensor : public TelemetrySensor, VoltageSensor virtual int32_t runOnce() override; virtual bool getMetrics(meshtastic_Telemetry *measurement) override; virtual uint16_t getBusVoltageMv() override; -}; \ No newline at end of file +}; + +#endif \ No newline at end of file diff --git a/src/modules/Telemetry/Sensor/INA3221Sensor.cpp b/src/modules/Telemetry/Sensor/INA3221Sensor.cpp index 3269ba47a..549346d72 100644 --- a/src/modules/Telemetry/Sensor/INA3221Sensor.cpp +++ b/src/modules/Telemetry/Sensor/INA3221Sensor.cpp @@ -1,7 +1,10 @@ -#include "INA3221Sensor.h" -#include "../mesh/generated/meshtastic/telemetry.pb.h" -#include "TelemetrySensor.h" #include "configuration.h" + +#if HAS_TELEMETRY && !MESHTASTIC_EXCLUDE_ENVIRONMENTAL_SENSOR + +#include "../mesh/generated/meshtastic/telemetry.pb.h" +#include "INA3221Sensor.h" +#include "TelemetrySensor.h" #include INA3221Sensor::INA3221Sensor() : TelemetrySensor(meshtastic_TelemetrySensorType_INA3221, "INA3221"){}; @@ -13,8 +16,7 @@ int32_t INA3221Sensor::runOnce() return DEFAULT_SENSOR_MINIMUM_WAIT_TIME_BETWEEN_READS; } if (!status) { - ina3221.setAddr(INA3221_ADDR42_SDA); // i2c address 0x42 - ina3221.begin(); + ina3221.begin(nodeTelemetrySensorsMap[sensorType].second); ina3221.setShuntRes(100, 100, 100); // 0.1 Ohm shunt resistors status = true; } else { @@ -25,20 +27,79 @@ int32_t INA3221Sensor::runOnce() void INA3221Sensor::setup() {} +struct _INA3221Measurement INA3221Sensor::getMeasurement(ina3221_ch_t ch) +{ + struct _INA3221Measurement measurement; + + measurement.voltage = ina3221.getVoltage(ch); + measurement.current = ina3221.getCurrent(ch); + + return measurement; +} + +struct _INA3221Measurements INA3221Sensor::getMeasurements() +{ + struct _INA3221Measurements measurements; + + // INA3221 has 3 channels starting from 0 + for (int i = 0; i < 3; i++) { + measurements.measurements[i] = getMeasurement((ina3221_ch_t)i); + } + + return measurements; +} + bool INA3221Sensor::getMetrics(meshtastic_Telemetry *measurement) { - measurement->variant.environment_metrics.voltage = ina3221.getVoltage(INA3221_CH1); - measurement->variant.environment_metrics.current = ina3221.getCurrent(INA3221_CH1); - measurement->variant.power_metrics.ch1_voltage = ina3221.getVoltage(INA3221_CH1); - measurement->variant.power_metrics.ch1_current = ina3221.getCurrent(INA3221_CH1); - measurement->variant.power_metrics.ch2_voltage = ina3221.getVoltage(INA3221_CH2); - measurement->variant.power_metrics.ch2_current = ina3221.getCurrent(INA3221_CH2); - measurement->variant.power_metrics.ch3_voltage = ina3221.getVoltage(INA3221_CH3); - measurement->variant.power_metrics.ch3_current = ina3221.getCurrent(INA3221_CH3); + switch (measurement->which_variant) { + case meshtastic_Telemetry_environment_metrics_tag: + return getEnvironmentMetrics(measurement); + + case meshtastic_Telemetry_power_metrics_tag: + return getPowerMetrics(measurement); + } + + // unsupported metric + return false; +} + +bool INA3221Sensor::getEnvironmentMetrics(meshtastic_Telemetry *measurement) +{ + struct _INA3221Measurement m = getMeasurement(ENV_CH); + + measurement->variant.environment_metrics.has_voltage = true; + measurement->variant.environment_metrics.has_current = true; + + measurement->variant.environment_metrics.voltage = m.voltage; + measurement->variant.environment_metrics.current = m.current; + + return true; +} + +bool INA3221Sensor::getPowerMetrics(meshtastic_Telemetry *measurement) +{ + struct _INA3221Measurements m = getMeasurements(); + + measurement->variant.power_metrics.has_ch1_voltage = true; + measurement->variant.power_metrics.has_ch1_current = true; + measurement->variant.power_metrics.has_ch2_voltage = true; + measurement->variant.power_metrics.has_ch2_current = true; + measurement->variant.power_metrics.has_ch3_voltage = true; + measurement->variant.power_metrics.has_ch3_current = true; + + measurement->variant.power_metrics.ch1_voltage = m.measurements[INA3221_CH1].voltage; + measurement->variant.power_metrics.ch1_current = m.measurements[INA3221_CH1].current; + measurement->variant.power_metrics.ch2_voltage = m.measurements[INA3221_CH2].voltage; + measurement->variant.power_metrics.ch2_current = m.measurements[INA3221_CH2].current; + measurement->variant.power_metrics.ch3_voltage = m.measurements[INA3221_CH3].voltage; + measurement->variant.power_metrics.ch3_current = m.measurements[INA3221_CH3].current; + return true; } uint16_t INA3221Sensor::getBusVoltageMv() { - return lround(ina3221.getVoltage(INA3221_CH1) * 1000); -} \ No newline at end of file + return lround(ina3221.getVoltage(BAT_CH) * 1000); +} + +#endif \ No newline at end of file diff --git a/src/modules/Telemetry/Sensor/INA3221Sensor.h b/src/modules/Telemetry/Sensor/INA3221Sensor.h index 4c82fc34d..d5121aab6 100644 --- a/src/modules/Telemetry/Sensor/INA3221Sensor.h +++ b/src/modules/Telemetry/Sensor/INA3221Sensor.h @@ -1,3 +1,7 @@ +#include "configuration.h" + +#if HAS_TELEMETRY && !MESHTASTIC_EXCLUDE_ENVIRONMENTAL_SENSOR + #include "../mesh/generated/meshtastic/telemetry.pb.h" #include "TelemetrySensor.h" #include "VoltageSensor.h" @@ -8,6 +12,21 @@ class INA3221Sensor : public TelemetrySensor, VoltageSensor private: INA3221 ina3221 = INA3221(INA3221_ADDR42_SDA); + // channel to report voltage/current for environment metrics + ina3221_ch_t ENV_CH = INA3221_CH1; + + // channel to report battery voltage for device_battery_ina_address + ina3221_ch_t BAT_CH = INA3221_CH1; + + // get a single measurement for a channel + struct _INA3221Measurement getMeasurement(ina3221_ch_t ch); + + // get all measurements for all channels + struct _INA3221Measurements getMeasurements(); + + bool getEnvironmentMetrics(meshtastic_Telemetry *measurement); + bool getPowerMetrics(meshtastic_Telemetry *measurement); + protected: void setup() override; @@ -16,4 +35,16 @@ class INA3221Sensor : public TelemetrySensor, VoltageSensor int32_t runOnce() override; bool getMetrics(meshtastic_Telemetry *measurement) override; virtual uint16_t getBusVoltageMv() override; -}; \ No newline at end of file +}; + +struct _INA3221Measurement { + float voltage; + float current; +}; + +struct _INA3221Measurements { + // INA3221 has 3 channels + struct _INA3221Measurement measurements[3]; +}; + +#endif \ No newline at end of file diff --git a/src/modules/Telemetry/Sensor/LPS22HBSensor.cpp b/src/modules/Telemetry/Sensor/LPS22HBSensor.cpp index 6e30113cd..111d86d1a 100644 --- a/src/modules/Telemetry/Sensor/LPS22HBSensor.cpp +++ b/src/modules/Telemetry/Sensor/LPS22HBSensor.cpp @@ -1,7 +1,10 @@ -#include "LPS22HBSensor.h" -#include "../mesh/generated/meshtastic/telemetry.pb.h" -#include "TelemetrySensor.h" #include "configuration.h" + +#if !MESHTASTIC_EXCLUDE_ENVIRONMENTAL_SENSOR + +#include "../mesh/generated/meshtastic/telemetry.pb.h" +#include "LPS22HBSensor.h" +#include "TelemetrySensor.h" #include #include @@ -24,6 +27,9 @@ void LPS22HBSensor::setup() bool LPS22HBSensor::getMetrics(meshtastic_Telemetry *measurement) { + measurement->variant.environment_metrics.has_temperature = true; + measurement->variant.environment_metrics.has_barometric_pressure = true; + sensors_event_t temp; sensors_event_t pressure; lps22hb.getEvent(&pressure, &temp); @@ -32,4 +38,6 @@ bool LPS22HBSensor::getMetrics(meshtastic_Telemetry *measurement) measurement->variant.environment_metrics.barometric_pressure = pressure.pressure; return true; -} \ No newline at end of file +} + +#endif \ No newline at end of file diff --git a/src/modules/Telemetry/Sensor/LPS22HBSensor.h b/src/modules/Telemetry/Sensor/LPS22HBSensor.h index 5b86539b1..955f2a1e5 100644 --- a/src/modules/Telemetry/Sensor/LPS22HBSensor.h +++ b/src/modules/Telemetry/Sensor/LPS22HBSensor.h @@ -1,3 +1,7 @@ +#include "configuration.h" + +#if !MESHTASTIC_EXCLUDE_ENVIRONMENTAL_SENSOR + #include "../mesh/generated/meshtastic/telemetry.pb.h" #include "TelemetrySensor.h" #include @@ -15,4 +19,6 @@ class LPS22HBSensor : public TelemetrySensor LPS22HBSensor(); virtual int32_t runOnce() override; virtual bool getMetrics(meshtastic_Telemetry *measurement) override; -}; \ No newline at end of file +}; + +#endif \ No newline at end of file diff --git a/src/modules/Telemetry/Sensor/MAX17048Sensor.cpp b/src/modules/Telemetry/Sensor/MAX17048Sensor.cpp new file mode 100644 index 000000000..96dd5ae80 --- /dev/null +++ b/src/modules/Telemetry/Sensor/MAX17048Sensor.cpp @@ -0,0 +1,176 @@ +#include "MAX17048Sensor.h" + +#if !MESHTASTIC_EXCLUDE_I2C && !defined(ARCH_PORTDUINO) && !defined(ARCH_STM32WL) + +MAX17048Singleton *MAX17048Singleton::GetInstance() +{ + if (pinstance == nullptr) { + pinstance = new MAX17048Singleton(); + } + return pinstance; +} + +MAX17048Singleton::MAX17048Singleton() {} + +MAX17048Singleton::~MAX17048Singleton() {} + +MAX17048Singleton *MAX17048Singleton::pinstance{nullptr}; + +bool MAX17048Singleton::runOnce(TwoWire *theWire) +{ + initialized = begin(theWire); + LOG_DEBUG("%s::runOnce %s\n", sensorStr, initialized ? "began ok" : "begin failed"); + return initialized; +} + +bool MAX17048Singleton::isBatteryCharging() +{ + float volts = cellVoltage(); + if (isnan(volts)) { + LOG_DEBUG("%s::isBatteryCharging is not connected\n", sensorStr); + return 0; + } + + MAX17048ChargeSample sample; + sample.chargeRate = chargeRate(); // charge/discharge rate in percent/hr + sample.cellPercent = cellPercent(); // state of charge in percent 0 to 100 + chargeSamples.push(sample); // save a sample into a fifo buffer + + // Keep the fifo buffer trimmed + while (chargeSamples.size() > MAX17048_CHARGING_SAMPLES) + chargeSamples.pop(); + + // Based on the past n samples, is the lipo charging, discharging or idle + if (chargeSamples.front().chargeRate > MAX17048_CHARGING_MINIMUM_RATE && + chargeSamples.back().chargeRate > MAX17048_CHARGING_MINIMUM_RATE) { + if (chargeSamples.front().cellPercent > chargeSamples.back().cellPercent) + chargeState = MAX17048ChargeState::EXPORT; + else if (chargeSamples.front().cellPercent < chargeSamples.back().cellPercent) + chargeState = MAX17048ChargeState::IMPORT; + else + chargeState = MAX17048ChargeState::IDLE; + } else { + chargeState = MAX17048ChargeState::IDLE; + } + + LOG_DEBUG("%s::isBatteryCharging %s volts: %.3f soc: %.3f rate: %.3f\n", sensorStr, chargeLabels[chargeState], volts, + sample.cellPercent, sample.chargeRate); + return chargeState == MAX17048ChargeState::IMPORT; +} + +uint16_t MAX17048Singleton::getBusVoltageMv() +{ + float volts = cellVoltage(); + if (isnan(volts)) { + LOG_DEBUG("%s::getBusVoltageMv is not connected\n", sensorStr); + return 0; + } + LOG_DEBUG("%s::getBusVoltageMv %.3fmV\n", sensorStr, volts); + return (uint16_t)(volts * 1000.0f); +} + +uint8_t MAX17048Singleton::getBusBatteryPercent() +{ + float soc = cellPercent(); + LOG_DEBUG("%s::getBusBatteryPercent %.1f%%\n", sensorStr, soc); + return clamp(static_cast(round(soc)), static_cast(0), static_cast(100)); +} + +uint16_t MAX17048Singleton::getTimeToGoSecs() +{ + float rate = chargeRate(); // charge/discharge rate in percent/hr + float soc = cellPercent(); // state of charge in percent 0 to 100 + soc = clamp(soc, 0.0f, 100.0f); // clamp soc between 0 and 100% + float ttg = ((100.0f - soc) / rate) * 3600.0f; // calculate seconds to charge/discharge + LOG_DEBUG("%s::getTimeToGoSecs %.0f seconds\n", sensorStr, ttg); + return (uint16_t)ttg; +} + +bool MAX17048Singleton::isBatteryConnected() +{ + float volts = cellVoltage(); + if (isnan(volts)) { + LOG_DEBUG("%s::isBatteryConnected is not connected\n", sensorStr); + return false; + } + + // if a valid voltage is returned, then battery must be connected + return true; +} + +bool MAX17048Singleton::isExternallyPowered() +{ + float volts = cellVoltage(); + if (isnan(volts)) { + // if the battery is not connected then there must be external power + LOG_DEBUG("%s::isExternallyPowered battery is\n", sensorStr); + return true; + } + // if the bus voltage is over MAX17048_BUS_POWER_VOLTS, then the external power + // is assumed to be connected + LOG_DEBUG("%s::isExternallyPowered %s connected\n", sensorStr, volts >= MAX17048_BUS_POWER_VOLTS ? "is" : "is not"); + return volts >= MAX17048_BUS_POWER_VOLTS; +} + +#if (HAS_TELEMETRY && (!MESHTASTIC_EXCLUDE_ENVIRONMENTAL_SENSOR || !MESHTASTIC_EXCLUDE_POWER_TELEMETRY)) + +MAX17048Sensor::MAX17048Sensor() : TelemetrySensor(meshtastic_TelemetrySensorType_MAX17048, "MAX17048") {} + +int32_t MAX17048Sensor::runOnce() +{ + if (isInitialized()) { + LOG_INFO("Init sensor: %s is already initialised\n", sensorName); + return true; + } + + LOG_INFO("Init sensor: %s\n", sensorName); + if (!hasSensor()) { + return DEFAULT_SENSOR_MINIMUM_WAIT_TIME_BETWEEN_READS; + } + + // Get a singleton instance and initialise the max17048 + if (max17048 == nullptr) { + max17048 = MAX17048Singleton::GetInstance(); + } + status = max17048->runOnce(nodeTelemetrySensorsMap[sensorType].second); + return initI2CSensor(); +} + +void MAX17048Sensor::setup() {} + +bool MAX17048Sensor::getMetrics(meshtastic_Telemetry *measurement) +{ + LOG_DEBUG("MAX17048Sensor::getMetrics id: %i\n", measurement->which_variant); + + float volts = max17048->cellVoltage(); + if (isnan(volts)) { + LOG_DEBUG("MAX17048Sensor::getMetrics battery is not connected\n"); + return false; + } + + float rate = max17048->chargeRate(); // charge/discharge rate in percent/hr + float soc = max17048->cellPercent(); // state of charge in percent 0 to 100 + soc = clamp(soc, 0.0f, 100.0f); // clamp soc between 0 and 100% + float ttg = (100.0f - soc) / rate; // calculate hours to charge/discharge + + LOG_DEBUG("MAX17048Sensor::getMetrics volts: %.3fV soc: %.1f%% ttg: %.1f hours\n", volts, soc, ttg); + if ((int)measurement->which_variant == meshtastic_Telemetry_power_metrics_tag) { + measurement->variant.power_metrics.has_ch1_voltage = true; + measurement->variant.power_metrics.ch1_voltage = volts; + } else if ((int)measurement->which_variant == meshtastic_Telemetry_device_metrics_tag) { + measurement->variant.device_metrics.has_battery_level = true; + measurement->variant.device_metrics.has_voltage = true; + measurement->variant.device_metrics.battery_level = static_cast(round(soc)); + measurement->variant.device_metrics.voltage = volts; + } + return true; +} + +uint16_t MAX17048Sensor::getBusVoltageMv() +{ + return max17048->getBusVoltageMv(); +}; + +#endif + +#endif \ No newline at end of file diff --git a/src/modules/Telemetry/Sensor/MAX17048Sensor.h b/src/modules/Telemetry/Sensor/MAX17048Sensor.h new file mode 100644 index 000000000..bd109cbb1 --- /dev/null +++ b/src/modules/Telemetry/Sensor/MAX17048Sensor.h @@ -0,0 +1,111 @@ +#pragma once + +#ifndef MAX17048_SENSOR_H +#define MAX17048_SENSOR_H + +#include "configuration.h" + +#if !MESHTASTIC_EXCLUDE_I2C && !defined(ARCH_PORTDUINO) && !defined(ARCH_STM32WL) + +// Samples to store in a buffer to determine if the battery is charging or discharging +#define MAX17048_CHARGING_SAMPLES 3 + +// Threshold to determine if the battery is on charge, in percent/hour +#define MAX17048_CHARGING_MINIMUM_RATE 1.0f + +// Threshold to determine if the board has bus power +#define MAX17048_BUS_POWER_VOLTS 4.195f + +#include "../mesh/generated/meshtastic/telemetry.pb.h" +#include "TelemetrySensor.h" +#include "VoltageSensor.h" + +#include "meshUtils.h" +#include +#include + +struct MAX17048ChargeSample { + float cellPercent; + float chargeRate; +}; + +enum MAX17048ChargeState { IDLE, EXPORT, IMPORT }; + +// Singleton wrapper for the Adafruit_MAX17048 class +class MAX17048Singleton : public Adafruit_MAX17048 +{ + private: + static MAX17048Singleton *pinstance; + bool initialized = false; + std::queue chargeSamples; + MAX17048ChargeState chargeState = IDLE; + const String chargeLabels[3] = {F("idle"), F("export"), F("import")}; + const char *sensorStr = "MAX17048Sensor"; + + protected: + MAX17048Singleton(); + ~MAX17048Singleton(); + + public: + // Create a singleton instance (not thread safe) + static MAX17048Singleton *GetInstance(); + + // Singletons should not be cloneable. + MAX17048Singleton(MAX17048Singleton &other) = delete; + + // Singletons should not be assignable. + void operator=(const MAX17048Singleton &) = delete; + + // Initialise the sensor (not thread safe) + virtual bool runOnce(TwoWire *theWire = &Wire); + + // Get the current bus voltage + uint16_t getBusVoltageMv(); + + // Get the state of charge in percent 0 to 100 + uint8_t getBusBatteryPercent(); + + // Calculate the seconds to charge/discharge + uint16_t getTimeToGoSecs(); + + // Returns true if the battery sensor has started + inline virtual bool isInitialised() { return initialized; }; + + // Returns true if the battery is currently on charge (not thread safe) + bool isBatteryCharging(); + + // Returns true if a battery is actually connected + bool isBatteryConnected(); + + // Returns true if there is bus or external power connected + bool isExternallyPowered(); +}; + +#if (HAS_TELEMETRY && (!MESHTASTIC_EXCLUDE_ENVIRONMENTAL_SENSOR || !MESHTASTIC_EXCLUDE_POWER_TELEMETRY)) + +class MAX17048Sensor : public TelemetrySensor, VoltageSensor +{ + private: + MAX17048Singleton *max17048 = nullptr; + + protected: + virtual void setup() override; + + public: + MAX17048Sensor(); + + // Initialise the sensor + virtual int32_t runOnce() override; + + // Get the current bus voltage and state of charge + virtual bool getMetrics(meshtastic_Telemetry *measurement) override; + + // Get the current bus voltage + virtual uint16_t getBusVoltageMv() override; +}; + +#endif + +#endif + +#endif \ No newline at end of file diff --git a/src/modules/Telemetry/Sensor/MAX30102Sensor.cpp b/src/modules/Telemetry/Sensor/MAX30102Sensor.cpp new file mode 100644 index 000000000..b3b20e5f2 --- /dev/null +++ b/src/modules/Telemetry/Sensor/MAX30102Sensor.cpp @@ -0,0 +1,83 @@ +#include "configuration.h" + +#if !MESHTASTIC_EXCLUDE_ENVIRONMENTAL_SENSOR && !defined(ARCH_PORTDUINO) + +#include "../mesh/generated/meshtastic/telemetry.pb.h" +#include "MAX30102Sensor.h" +#include "TelemetrySensor.h" +#include + +MAX30102Sensor::MAX30102Sensor() : TelemetrySensor(meshtastic_TelemetrySensorType_MAX30102, "MAX30102") {} + +int32_t MAX30102Sensor::runOnce() +{ + LOG_INFO("Init sensor: %s\n", sensorName); + if (!hasSensor()) { + return DEFAULT_SENSOR_MINIMUM_WAIT_TIME_BETWEEN_READS; + } + + if (max30102.begin(*nodeTelemetrySensorsMap[sensorType].second, _speed, nodeTelemetrySensorsMap[sensorType].first) == + true) // MAX30102 init + { + byte brightness = 60; // 0=Off to 255=50mA + byte sampleAverage = 4; // 1, 2, 4, 8, 16, 32 + byte leds = 2; // 1 = Red only, 2 = Red + IR + byte sampleRate = 100; // 50, 100, 200, 400, 800, 1000, 1600, 3200 + int pulseWidth = 411; // 69, 118, 215, 411 + int adcRange = 4096; // 2048, 4096, 8192, 16384 + + max30102.enableDIETEMPRDY(); // Enable the temperature ready interrupt + max30102.setup(brightness, sampleAverage, leds, sampleRate, pulseWidth, adcRange); + LOG_DEBUG("MAX30102 Init Succeed\n"); + status = true; + } else { + LOG_ERROR("MAX30102 Init Failed\n"); + status = false; + } + return initI2CSensor(); +} + +void MAX30102Sensor::setup() {} + +bool MAX30102Sensor::getMetrics(meshtastic_Telemetry *measurement) +{ + uint32_t ir_buff[MAX30102_BUFFER_LEN]; + uint32_t red_buff[MAX30102_BUFFER_LEN]; + int32_t spo2; + int8_t spo2_valid; + int32_t heart_rate; + int8_t heart_rate_valid; + float temp = max30102.readTemperature(); + + measurement->variant.environment_metrics.temperature = temp; + measurement->variant.environment_metrics.has_temperature = true; + measurement->variant.health_metrics.temperature = temp; + measurement->variant.health_metrics.has_temperature = true; + for (byte i = 0; i < MAX30102_BUFFER_LEN; i++) { + while (max30102.available() == false) + max30102.check(); + + red_buff[i] = max30102.getRed(); + ir_buff[i] = max30102.getIR(); + max30102.nextSample(); + } + + maxim_heart_rate_and_oxygen_saturation(ir_buff, MAX30102_BUFFER_LEN, red_buff, &spo2, &spo2_valid, &heart_rate, + &heart_rate_valid); + LOG_DEBUG("heart_rate=%d(%d), sp02=%d(%d)", heart_rate, heart_rate_valid, spo2, spo2_valid); + if (heart_rate_valid) { + measurement->variant.health_metrics.has_heart_bpm = true; + measurement->variant.health_metrics.heart_bpm = heart_rate; + } else { + measurement->variant.health_metrics.has_heart_bpm = false; + } + if (spo2_valid) { + measurement->variant.health_metrics.has_spO2 = true; + measurement->variant.health_metrics.spO2 = spo2; + } else { + measurement->variant.health_metrics.has_spO2 = true; + } + return true; +} + +#endif diff --git a/src/modules/Telemetry/Sensor/MAX30102Sensor.h b/src/modules/Telemetry/Sensor/MAX30102Sensor.h new file mode 100644 index 000000000..426d9d365 --- /dev/null +++ b/src/modules/Telemetry/Sensor/MAX30102Sensor.h @@ -0,0 +1,26 @@ +#include "configuration.h" + +#if !MESHTASTIC_EXCLUDE_ENVIRONMENTAL_SENSOR && !defined(ARCH_PORTDUINO) + +#include "../mesh/generated/meshtastic/telemetry.pb.h" +#include "TelemetrySensor.h" +#include + +#define MAX30102_BUFFER_LEN 100 + +class MAX30102Sensor : public TelemetrySensor +{ + private: + MAX30105 max30102 = MAX30105(); + uint32_t _speed = 200000UL; + + protected: + virtual void setup() override; + + public: + MAX30102Sensor(); + virtual int32_t runOnce() override; + virtual bool getMetrics(meshtastic_Telemetry *measurement) override; +}; + +#endif diff --git a/src/modules/Telemetry/Sensor/MCP9808Sensor.cpp b/src/modules/Telemetry/Sensor/MCP9808Sensor.cpp index c1d9bfa71..c1cda7227 100644 --- a/src/modules/Telemetry/Sensor/MCP9808Sensor.cpp +++ b/src/modules/Telemetry/Sensor/MCP9808Sensor.cpp @@ -1,7 +1,10 @@ -#include "MCP9808Sensor.h" -#include "../mesh/generated/meshtastic/telemetry.pb.h" -#include "TelemetrySensor.h" #include "configuration.h" + +#if !MESHTASTIC_EXCLUDE_ENVIRONMENTAL_SENSOR + +#include "../mesh/generated/meshtastic/telemetry.pb.h" +#include "MCP9808Sensor.h" +#include "TelemetrySensor.h" #include MCP9808Sensor::MCP9808Sensor() : TelemetrySensor(meshtastic_TelemetrySensorType_MCP9808, "MCP9808") {} @@ -23,7 +26,11 @@ void MCP9808Sensor::setup() bool MCP9808Sensor::getMetrics(meshtastic_Telemetry *measurement) { + measurement->variant.environment_metrics.has_temperature = true; + LOG_DEBUG("MCP9808Sensor::getMetrics\n"); measurement->variant.environment_metrics.temperature = mcp9808.readTempC(); return true; -} \ No newline at end of file +} + +#endif \ No newline at end of file diff --git a/src/modules/Telemetry/Sensor/MCP9808Sensor.h b/src/modules/Telemetry/Sensor/MCP9808Sensor.h index c1029f8a7..05bdabf3f 100644 --- a/src/modules/Telemetry/Sensor/MCP9808Sensor.h +++ b/src/modules/Telemetry/Sensor/MCP9808Sensor.h @@ -1,3 +1,7 @@ +#include "configuration.h" + +#if !MESHTASTIC_EXCLUDE_ENVIRONMENTAL_SENSOR + #include "../mesh/generated/meshtastic/telemetry.pb.h" #include "TelemetrySensor.h" #include @@ -14,4 +18,6 @@ class MCP9808Sensor : public TelemetrySensor MCP9808Sensor(); virtual int32_t runOnce() override; virtual bool getMetrics(meshtastic_Telemetry *measurement) override; -}; \ No newline at end of file +}; + +#endif \ No newline at end of file diff --git a/src/modules/Telemetry/Sensor/MLX90614Sensor.cpp b/src/modules/Telemetry/Sensor/MLX90614Sensor.cpp new file mode 100644 index 000000000..92c22bf21 --- /dev/null +++ b/src/modules/Telemetry/Sensor/MLX90614Sensor.cpp @@ -0,0 +1,44 @@ +#include "configuration.h" + +#if !MESHTASTIC_EXCLUDE_ENVIRONMENTAL_SENSOR && !defined(ARCH_PORTDUINO) + +#include "../mesh/generated/meshtastic/telemetry.pb.h" +#include "MLX90614Sensor.h" +#include "TelemetrySensor.h" +MLX90614Sensor::MLX90614Sensor() : TelemetrySensor(meshtastic_TelemetrySensorType_MLX90614, "MLX90614") {} + +int32_t MLX90614Sensor::runOnce() +{ + LOG_INFO("Init sensor: %s\n", sensorName); + if (!hasSensor()) { + return DEFAULT_SENSOR_MINIMUM_WAIT_TIME_BETWEEN_READS; + } + + if (mlx.begin(nodeTelemetrySensorsMap[sensorType].first, nodeTelemetrySensorsMap[sensorType].second) == true) // MLX90614 init + { + LOG_DEBUG("MLX90614 emissivity: %f", mlx.readEmissivity()); + if (fabs(MLX90614_EMISSIVITY - mlx.readEmissivity()) > 0.001) { + mlx.writeEmissivity(MLX90614_EMISSIVITY); + LOG_INFO("MLX90614 emissivity updated. In case of weird data, power cycle."); + } + LOG_DEBUG("MLX90614 Init Succeed\n"); + status = true; + } else { + LOG_ERROR("MLX90614 Init Failed\n"); + status = false; + } + return initI2CSensor(); +} + +void MLX90614Sensor::setup() {} + +bool MLX90614Sensor::getMetrics(meshtastic_Telemetry *measurement) +{ + measurement->variant.environment_metrics.temperature = mlx.readAmbientTempC(); + measurement->variant.environment_metrics.has_temperature = true; + measurement->variant.health_metrics.temperature = mlx.readObjectTempC(); + measurement->variant.health_metrics.has_temperature = true; + return true; +} + +#endif diff --git a/src/modules/Telemetry/Sensor/MLX90614Sensor.h b/src/modules/Telemetry/Sensor/MLX90614Sensor.h new file mode 100644 index 000000000..00f63449e --- /dev/null +++ b/src/modules/Telemetry/Sensor/MLX90614Sensor.h @@ -0,0 +1,24 @@ +#include "configuration.h" + +#if !MESHTASTIC_EXCLUDE_ENVIRONMENTAL_SENSOR && !defined(ARCH_PORTDUINO) +#include "../mesh/generated/meshtastic/telemetry.pb.h" +#include "TelemetrySensor.h" +#include + +#define MLX90614_EMISSIVITY 0.98 // human skin + +class MLX90614Sensor : public TelemetrySensor +{ + private: + Adafruit_MLX90614 mlx = Adafruit_MLX90614(); + + protected: + virtual void setup() override; + + public: + MLX90614Sensor(); + virtual int32_t runOnce() override; + virtual bool getMetrics(meshtastic_Telemetry *measurement) override; +}; + +#endif diff --git a/src/modules/Telemetry/Sensor/MLX90632Sensor.cpp b/src/modules/Telemetry/Sensor/MLX90632Sensor.cpp new file mode 100644 index 000000000..0568a4652 --- /dev/null +++ b/src/modules/Telemetry/Sensor/MLX90632Sensor.cpp @@ -0,0 +1,41 @@ +#include "configuration.h" + +#if !MESHTASTIC_EXCLUDE_ENVIRONMENTAL_SENSOR + +#include "../mesh/generated/meshtastic/telemetry.pb.h" +#include "MLX90632Sensor.h" +#include "TelemetrySensor.h" + +MLX90632Sensor::MLX90632Sensor() : TelemetrySensor(meshtastic_TelemetrySensorType_MLX90632, "MLX90632") {} + +int32_t MLX90632Sensor::runOnce() +{ + LOG_INFO("Init sensor: %s\n", sensorName); + if (!hasSensor()) { + return DEFAULT_SENSOR_MINIMUM_WAIT_TIME_BETWEEN_READS; + } + + MLX90632::status returnError; + if (mlx.begin(nodeTelemetrySensorsMap[sensorType].first, *nodeTelemetrySensorsMap[sensorType].second, returnError) == + true) // MLX90632 init + { + LOG_DEBUG("MLX90632 Init Succeed\n"); + status = true; + } else { + LOG_ERROR("MLX90632 Init Failed\n"); + status = false; + } + return initI2CSensor(); +} + +void MLX90632Sensor::setup() {} + +bool MLX90632Sensor::getMetrics(meshtastic_Telemetry *measurement) +{ + measurement->variant.environment_metrics.has_temperature = true; + measurement->variant.environment_metrics.temperature = mlx.getObjectTemp(); // Get the object temperature in Fahrenheit + + return true; +} + +#endif \ No newline at end of file diff --git a/src/modules/Telemetry/Sensor/MLX90632Sensor.h b/src/modules/Telemetry/Sensor/MLX90632Sensor.h new file mode 100644 index 000000000..7b36c44cd --- /dev/null +++ b/src/modules/Telemetry/Sensor/MLX90632Sensor.h @@ -0,0 +1,23 @@ +#include "configuration.h" + +#if !MESHTASTIC_EXCLUDE_ENVIRONMENTAL_SENSOR + +#include "../mesh/generated/meshtastic/telemetry.pb.h" +#include "TelemetrySensor.h" +#include + +class MLX90632Sensor : public TelemetrySensor +{ + private: + MLX90632 mlx = MLX90632(); + + protected: + virtual void setup() override; + + public: + MLX90632Sensor(); + virtual int32_t runOnce() override; + virtual bool getMetrics(meshtastic_Telemetry *measurement) override; +}; + +#endif \ No newline at end of file diff --git a/src/modules/Telemetry/Sensor/NAU7802Sensor.cpp b/src/modules/Telemetry/Sensor/NAU7802Sensor.cpp new file mode 100644 index 000000000..59f310a24 --- /dev/null +++ b/src/modules/Telemetry/Sensor/NAU7802Sensor.cpp @@ -0,0 +1,140 @@ +#include "configuration.h" + +#if !MESHTASTIC_EXCLUDE_ENVIRONMENTAL_SENSOR + +#include "../mesh/generated/meshtastic/telemetry.pb.h" +#include "FSCommon.h" +#include "NAU7802Sensor.h" +#include "SafeFile.h" +#include "TelemetrySensor.h" +#include +#include +#include + +meshtastic_Nau7802Config nau7802config = meshtastic_Nau7802Config_init_zero; + +NAU7802Sensor::NAU7802Sensor() : TelemetrySensor(meshtastic_TelemetrySensorType_NAU7802, "NAU7802") {} + +int32_t NAU7802Sensor::runOnce() +{ + LOG_INFO("Init sensor: %s\n", sensorName); + if (!hasSensor()) { + return DEFAULT_SENSOR_MINIMUM_WAIT_TIME_BETWEEN_READS; + } + status = nau7802.begin(*nodeTelemetrySensorsMap[sensorType].second); + nau7802.setSampleRate(NAU7802_SPS_320); + if (!loadCalibrationData()) { + LOG_ERROR("Failed to load calibration data\n"); + } + nau7802.calibrateAFE(); + LOG_INFO("Offset: %d, Calibration factor: %.2f\n", nau7802.getZeroOffset(), nau7802.getCalibrationFactor()); + return initI2CSensor(); +} + +void NAU7802Sensor::setup() {} + +bool NAU7802Sensor::getMetrics(meshtastic_Telemetry *measurement) +{ + LOG_DEBUG("NAU7802Sensor::getMetrics\n"); + nau7802.powerUp(); + // Wait for the sensor to become ready for one second max + uint32_t start = millis(); + while (!nau7802.available()) { + delay(100); + if (!Throttle::isWithinTimespanMs(start, 1000)) { + nau7802.powerDown(); + return false; + } + } + measurement->variant.environment_metrics.has_weight = true; + // Check if we have correct calibration values after powerup + LOG_DEBUG("Offset: %d, Calibration factor: %.2f\n", nau7802.getZeroOffset(), nau7802.getCalibrationFactor()); + measurement->variant.environment_metrics.weight = nau7802.getWeight() / 1000; // sample is in kg + nau7802.powerDown(); + return true; +} + +void NAU7802Sensor::calibrate(float weight) +{ + nau7802.calculateCalibrationFactor(weight * 1000, 64); // internal sample is in grams + if (!saveCalibrationData()) { + LOG_WARN("Failed to save calibration data\n"); + } + LOG_INFO("Offset: %d, Calibration factor: %.2f\n", nau7802.getZeroOffset(), nau7802.getCalibrationFactor()); +} + +AdminMessageHandleResult NAU7802Sensor::handleAdminMessage(const meshtastic_MeshPacket &mp, meshtastic_AdminMessage *request, + meshtastic_AdminMessage *response) +{ + AdminMessageHandleResult result; + + switch (request->which_payload_variant) { + case meshtastic_AdminMessage_set_scale_tag: + if (request->set_scale == 0) { + this->tare(); + LOG_DEBUG("Client requested to tare scale\n"); + } else { + this->calibrate(request->set_scale); + LOG_DEBUG("Client requested to calibrate to %d kg\n", request->set_scale); + } + result = AdminMessageHandleResult::HANDLED; + break; + + default: + result = AdminMessageHandleResult::NOT_HANDLED; + } + + return result; +} + +void NAU7802Sensor::tare() +{ + nau7802.calculateZeroOffset(64); + if (!saveCalibrationData()) { + LOG_WARN("Failed to save calibration data\n"); + } + LOG_INFO("Offset: %d, Calibration factor: %.2f\n", nau7802.getZeroOffset(), nau7802.getCalibrationFactor()); +} + +bool NAU7802Sensor::saveCalibrationData() +{ + auto file = SafeFile(nau7802ConfigFileName); + nau7802config.zeroOffset = nau7802.getZeroOffset(); + nau7802config.calibrationFactor = nau7802.getCalibrationFactor(); + bool okay = false; + + LOG_INFO("%s state write to %s.\n", sensorName, nau7802ConfigFileName); + pb_ostream_t stream = {&writecb, static_cast(&file), meshtastic_Nau7802Config_size}; + + if (!pb_encode(&stream, &meshtastic_Nau7802Config_msg, &nau7802config)) { + LOG_ERROR("Error: can't encode protobuf %s\n", PB_GET_ERROR(&stream)); + } else { + okay = true; + } + okay &= file.close(); + + return okay; +} + +bool NAU7802Sensor::loadCalibrationData() +{ + auto file = FSCom.open(nau7802ConfigFileName, FILE_O_READ); + bool okay = false; + if (file) { + LOG_INFO("%s state read from %s.\n", sensorName, nau7802ConfigFileName); + pb_istream_t stream = {&readcb, &file, meshtastic_Nau7802Config_size}; + if (!pb_decode(&stream, &meshtastic_Nau7802Config_msg, &nau7802config)) { + LOG_ERROR("Error: can't decode protobuf %s\n", PB_GET_ERROR(&stream)); + } else { + nau7802.setZeroOffset(nau7802config.zeroOffset); + nau7802.setCalibrationFactor(nau7802config.calibrationFactor); + okay = true; + } + file.close(); + } else { + LOG_INFO("No %s state found (File: %s).\n", sensorName, nau7802ConfigFileName); + } + return okay; +} + +#endif \ No newline at end of file diff --git a/src/modules/Telemetry/Sensor/NAU7802Sensor.h b/src/modules/Telemetry/Sensor/NAU7802Sensor.h new file mode 100644 index 000000000..c53a3b31a --- /dev/null +++ b/src/modules/Telemetry/Sensor/NAU7802Sensor.h @@ -0,0 +1,31 @@ +#include "MeshModule.h" +#include "configuration.h" + +#if !MESHTASTIC_EXCLUDE_ENVIRONMENTAL_SENSOR + +#include "../mesh/generated/meshtastic/telemetry.pb.h" +#include "TelemetrySensor.h" +#include + +class NAU7802Sensor : public TelemetrySensor +{ + private: + NAU7802 nau7802; + + protected: + virtual void setup() override; + const char *nau7802ConfigFileName = "/prefs/nau7802.dat"; + bool saveCalibrationData(); + bool loadCalibrationData(); + + public: + NAU7802Sensor(); + virtual int32_t runOnce() override; + virtual bool getMetrics(meshtastic_Telemetry *measurement) override; + void tare(); + void calibrate(float weight); + AdminMessageHandleResult handleAdminMessage(const meshtastic_MeshPacket &mp, meshtastic_AdminMessage *request, + meshtastic_AdminMessage *response) override; +}; + +#endif \ No newline at end of file diff --git a/src/modules/Telemetry/Sensor/OPT3001Sensor.cpp b/src/modules/Telemetry/Sensor/OPT3001Sensor.cpp new file mode 100644 index 000000000..3e4376d55 --- /dev/null +++ b/src/modules/Telemetry/Sensor/OPT3001Sensor.cpp @@ -0,0 +1,50 @@ +#include "configuration.h" + +#if !MESHTASTIC_EXCLUDE_ENVIRONMENTAL_SENSOR + +#include "../mesh/generated/meshtastic/telemetry.pb.h" +#include "OPT3001Sensor.h" +#include "TelemetrySensor.h" +#include + +OPT3001Sensor::OPT3001Sensor() : TelemetrySensor(meshtastic_TelemetrySensorType_OPT3001, "OPT3001") {} + +int32_t OPT3001Sensor::runOnce() +{ + LOG_INFO("Init sensor: %s\n", sensorName); + if (!hasSensor()) { + return DEFAULT_SENSOR_MINIMUM_WAIT_TIME_BETWEEN_READS; + } + auto errorCode = opt3001.begin(nodeTelemetrySensorsMap[sensorType].first); + status = errorCode == NO_ERROR; + + return initI2CSensor(); +} + +void OPT3001Sensor::setup() +{ + OPT3001_Config newConfig; + + newConfig.RangeNumber = 0b1100; + newConfig.ConvertionTime = 0b0; + newConfig.Latch = 0b1; + newConfig.ModeOfConversionOperation = 0b11; + + OPT3001_ErrorCode errorConfig = opt3001.writeConfig(newConfig); + if (errorConfig != NO_ERROR) { + LOG_ERROR("OPT3001 configuration error #%d", errorConfig); + } +} + +bool OPT3001Sensor::getMetrics(meshtastic_Telemetry *measurement) +{ + measurement->variant.environment_metrics.has_lux = true; + OPT3001 result = opt3001.readResult(); + + measurement->variant.environment_metrics.lux = result.lux; + LOG_INFO("Lux: %f\n", measurement->variant.environment_metrics.lux); + + return true; +} + +#endif \ No newline at end of file diff --git a/src/modules/Telemetry/Sensor/OPT3001Sensor.h b/src/modules/Telemetry/Sensor/OPT3001Sensor.h new file mode 100644 index 000000000..2ac149319 --- /dev/null +++ b/src/modules/Telemetry/Sensor/OPT3001Sensor.h @@ -0,0 +1,24 @@ +#pragma once +#include "configuration.h" + +#if !MESHTASTIC_EXCLUDE_ENVIRONMENTAL_SENSOR + +#include "../mesh/generated/meshtastic/telemetry.pb.h" +#include "TelemetrySensor.h" +#include + +class OPT3001Sensor : public TelemetrySensor +{ + private: + ClosedCube_OPT3001 opt3001; + + protected: + virtual void setup() override; + + public: + OPT3001Sensor(); + virtual int32_t runOnce() override; + virtual bool getMetrics(meshtastic_Telemetry *measurement) override; +}; + +#endif \ No newline at end of file diff --git a/src/modules/Telemetry/Sensor/RCWL9620Sensor.cpp b/src/modules/Telemetry/Sensor/RCWL9620Sensor.cpp new file mode 100644 index 000000000..b9a29ab7d --- /dev/null +++ b/src/modules/Telemetry/Sensor/RCWL9620Sensor.cpp @@ -0,0 +1,66 @@ +#include "configuration.h" + +#if !MESHTASTIC_EXCLUDE_ENVIRONMENTAL_SENSOR + +#include "../mesh/generated/meshtastic/telemetry.pb.h" +#include "RCWL9620Sensor.h" +#include "TelemetrySensor.h" + +RCWL9620Sensor::RCWL9620Sensor() : TelemetrySensor(meshtastic_TelemetrySensorType_RCWL9620, "RCWL9620") {} + +int32_t RCWL9620Sensor::runOnce() +{ + LOG_INFO("Init sensor: %s\n", sensorName); + if (!hasSensor()) { + return DEFAULT_SENSOR_MINIMUM_WAIT_TIME_BETWEEN_READS; + } + status = 1; + begin(nodeTelemetrySensorsMap[sensorType].second, nodeTelemetrySensorsMap[sensorType].first); + return initI2CSensor(); +} + +void RCWL9620Sensor::setup() {} + +bool RCWL9620Sensor::getMetrics(meshtastic_Telemetry *measurement) +{ + measurement->variant.environment_metrics.has_distance = true; + LOG_DEBUG("RCWL9620Sensor::getMetrics\n"); + measurement->variant.environment_metrics.distance = getDistance(); + return true; +} + +void RCWL9620Sensor::begin(TwoWire *wire, uint8_t addr, uint8_t sda, uint8_t scl, uint32_t speed) +{ + _wire = wire; + _addr = addr; + _sda = sda; + _scl = scl; + _speed = speed; + _wire->begin(); +} + +float RCWL9620Sensor::getDistance() +{ + uint32_t data; + _wire->beginTransmission(_addr); // Transfer data to addr. + _wire->write(0x01); + _wire->endTransmission(); // Stop data transmission with the Ultrasonic + // Unit. + + _wire->requestFrom(_addr, + (uint8_t)3); // Request 3 bytes from Ultrasonic Unit. + + data = _wire->read(); + data <<= 8; + data |= _wire->read(); + data <<= 8; + data |= _wire->read(); + float Distance = float(data) / 1000; + if (Distance > 4500.00) { + return 4500.00; + } else { + return Distance; + } +} + +#endif \ No newline at end of file diff --git a/src/modules/Telemetry/Sensor/RCWL9620Sensor.h b/src/modules/Telemetry/Sensor/RCWL9620Sensor.h new file mode 100644 index 000000000..7f9486d25 --- /dev/null +++ b/src/modules/Telemetry/Sensor/RCWL9620Sensor.h @@ -0,0 +1,29 @@ +#include "configuration.h" + +#if !MESHTASTIC_EXCLUDE_ENVIRONMENTAL_SENSOR + +#include "../mesh/generated/meshtastic/telemetry.pb.h" +#include "TelemetrySensor.h" +#include + +class RCWL9620Sensor : public TelemetrySensor +{ + private: + uint8_t _addr = 0x57; + TwoWire *_wire = &Wire; + uint8_t _scl = -1; + uint8_t _sda = -1; + uint32_t _speed = 200000UL; + + protected: + virtual void setup() override; + void begin(TwoWire *wire = &Wire, uint8_t addr = 0x57, uint8_t sda = -1, uint8_t scl = -1, uint32_t speed = 200000UL); + float getDistance(); + + public: + RCWL9620Sensor(); + virtual int32_t runOnce() override; + virtual bool getMetrics(meshtastic_Telemetry *measurement) override; +}; + +#endif \ No newline at end of file diff --git a/src/modules/Telemetry/Sensor/SHT31Sensor.cpp b/src/modules/Telemetry/Sensor/SHT31Sensor.cpp index 7ffb68254..c372f7986 100644 --- a/src/modules/Telemetry/Sensor/SHT31Sensor.cpp +++ b/src/modules/Telemetry/Sensor/SHT31Sensor.cpp @@ -1,7 +1,10 @@ -#include "SHT31Sensor.h" -#include "../mesh/generated/meshtastic/telemetry.pb.h" -#include "TelemetrySensor.h" #include "configuration.h" + +#if !MESHTASTIC_EXCLUDE_ENVIRONMENTAL_SENSOR + +#include "../mesh/generated/meshtastic/telemetry.pb.h" +#include "SHT31Sensor.h" +#include "TelemetrySensor.h" #include SHT31Sensor::SHT31Sensor() : TelemetrySensor(meshtastic_TelemetrySensorType_SHT31, "SHT31") {} @@ -12,7 +15,8 @@ int32_t SHT31Sensor::runOnce() if (!hasSensor()) { return DEFAULT_SENSOR_MINIMUM_WAIT_TIME_BETWEEN_READS; } - status = sht31.begin(); + sht31 = Adafruit_SHT31(nodeTelemetrySensorsMap[sensorType].second); + status = sht31.begin(nodeTelemetrySensorsMap[sensorType].first); return initI2CSensor(); } @@ -23,8 +27,12 @@ void SHT31Sensor::setup() bool SHT31Sensor::getMetrics(meshtastic_Telemetry *measurement) { + measurement->variant.environment_metrics.has_temperature = true; + measurement->variant.environment_metrics.has_relative_humidity = true; measurement->variant.environment_metrics.temperature = sht31.readTemperature(); measurement->variant.environment_metrics.relative_humidity = sht31.readHumidity(); return true; } + +#endif \ No newline at end of file diff --git a/src/modules/Telemetry/Sensor/SHT31Sensor.h b/src/modules/Telemetry/Sensor/SHT31Sensor.h index 940361325..560b22436 100644 --- a/src/modules/Telemetry/Sensor/SHT31Sensor.h +++ b/src/modules/Telemetry/Sensor/SHT31Sensor.h @@ -1,3 +1,7 @@ +#include "configuration.h" + +#if !MESHTASTIC_EXCLUDE_ENVIRONMENTAL_SENSOR + #include "../mesh/generated/meshtastic/telemetry.pb.h" #include "TelemetrySensor.h" #include @@ -5,7 +9,7 @@ class SHT31Sensor : public TelemetrySensor { private: - Adafruit_SHT31 sht31 = Adafruit_SHT31(); + Adafruit_SHT31 sht31; protected: virtual void setup() override; @@ -15,3 +19,5 @@ class SHT31Sensor : public TelemetrySensor virtual int32_t runOnce() override; virtual bool getMetrics(meshtastic_Telemetry *measurement) override; }; + +#endif \ No newline at end of file diff --git a/src/modules/Telemetry/Sensor/SHT4XSensor.cpp b/src/modules/Telemetry/Sensor/SHT4XSensor.cpp new file mode 100644 index 000000000..94367cba4 --- /dev/null +++ b/src/modules/Telemetry/Sensor/SHT4XSensor.cpp @@ -0,0 +1,52 @@ +#include "configuration.h" + +#if !MESHTASTIC_EXCLUDE_ENVIRONMENTAL_SENSOR + +#include "../mesh/generated/meshtastic/telemetry.pb.h" +#include "SHT4XSensor.h" +#include "TelemetrySensor.h" +#include + +SHT4XSensor::SHT4XSensor() : TelemetrySensor(meshtastic_TelemetrySensorType_SHT4X, "SHT4X") {} + +int32_t SHT4XSensor::runOnce() +{ + LOG_INFO("Init sensor: %s\n", sensorName); + if (!hasSensor()) { + return DEFAULT_SENSOR_MINIMUM_WAIT_TIME_BETWEEN_READS; + } + + uint32_t serialNumber = 0; + + sht4x.begin(nodeTelemetrySensorsMap[sensorType].second); + + serialNumber = sht4x.readSerial(); + if (serialNumber != 0) { + LOG_DEBUG("serialNumber : %x\n", serialNumber); + status = 1; + } else { + LOG_DEBUG("Error trying to execute readSerial(): "); + status = 0; + } + + return initI2CSensor(); +} + +void SHT4XSensor::setup() +{ + // Set up oversampling and filter initialization +} + +bool SHT4XSensor::getMetrics(meshtastic_Telemetry *measurement) +{ + measurement->variant.environment_metrics.has_temperature = true; + measurement->variant.environment_metrics.has_relative_humidity = true; + + sensors_event_t humidity, temp; + sht4x.getEvent(&humidity, &temp); + measurement->variant.environment_metrics.temperature = temp.temperature; + measurement->variant.environment_metrics.relative_humidity = humidity.relative_humidity; + return true; +} + +#endif \ No newline at end of file diff --git a/src/modules/Telemetry/Sensor/SHT4XSensor.h b/src/modules/Telemetry/Sensor/SHT4XSensor.h new file mode 100644 index 000000000..62a5cefeb --- /dev/null +++ b/src/modules/Telemetry/Sensor/SHT4XSensor.h @@ -0,0 +1,23 @@ +#include "configuration.h" + +#if !MESHTASTIC_EXCLUDE_ENVIRONMENTAL_SENSOR + +#include "../mesh/generated/meshtastic/telemetry.pb.h" +#include "TelemetrySensor.h" +#include + +class SHT4XSensor : public TelemetrySensor +{ + private: + Adafruit_SHT4x sht4x = Adafruit_SHT4x(); + + protected: + virtual void setup() override; + + public: + SHT4XSensor(); + virtual int32_t runOnce() override; + virtual bool getMetrics(meshtastic_Telemetry *measurement) override; +}; + +#endif \ No newline at end of file diff --git a/src/modules/Telemetry/Sensor/SHTC3Sensor.cpp b/src/modules/Telemetry/Sensor/SHTC3Sensor.cpp index b0b5d37dc..64ebfb472 100644 --- a/src/modules/Telemetry/Sensor/SHTC3Sensor.cpp +++ b/src/modules/Telemetry/Sensor/SHTC3Sensor.cpp @@ -1,7 +1,10 @@ -#include "SHTC3Sensor.h" -#include "../mesh/generated/meshtastic/telemetry.pb.h" -#include "TelemetrySensor.h" #include "configuration.h" + +#if !MESHTASTIC_EXCLUDE_ENVIRONMENTAL_SENSOR + +#include "../mesh/generated/meshtastic/telemetry.pb.h" +#include "SHTC3Sensor.h" +#include "TelemetrySensor.h" #include SHTC3Sensor::SHTC3Sensor() : TelemetrySensor(meshtastic_TelemetrySensorType_SHTC3, "SHTC3") {} @@ -23,6 +26,9 @@ void SHTC3Sensor::setup() bool SHTC3Sensor::getMetrics(meshtastic_Telemetry *measurement) { + measurement->variant.environment_metrics.has_temperature = true; + measurement->variant.environment_metrics.has_relative_humidity = true; + sensors_event_t humidity, temp; shtc3.getEvent(&humidity, &temp); @@ -30,4 +36,6 @@ bool SHTC3Sensor::getMetrics(meshtastic_Telemetry *measurement) measurement->variant.environment_metrics.relative_humidity = humidity.relative_humidity; return true; -} \ No newline at end of file +} + +#endif \ No newline at end of file diff --git a/src/modules/Telemetry/Sensor/SHTC3Sensor.h b/src/modules/Telemetry/Sensor/SHTC3Sensor.h index e5db417f5..7a760292f 100644 --- a/src/modules/Telemetry/Sensor/SHTC3Sensor.h +++ b/src/modules/Telemetry/Sensor/SHTC3Sensor.h @@ -1,3 +1,7 @@ +#include "configuration.h" + +#if !MESHTASTIC_EXCLUDE_ENVIRONMENTAL_SENSOR + #include "../mesh/generated/meshtastic/telemetry.pb.h" #include "TelemetrySensor.h" #include @@ -14,4 +18,6 @@ class SHTC3Sensor : public TelemetrySensor SHTC3Sensor(); virtual int32_t runOnce() override; virtual bool getMetrics(meshtastic_Telemetry *measurement) override; -}; \ No newline at end of file +}; + +#endif \ No newline at end of file diff --git a/src/modules/Telemetry/Sensor/T1000xSensor.cpp b/src/modules/Telemetry/Sensor/T1000xSensor.cpp new file mode 100644 index 000000000..4772aeb9e --- /dev/null +++ b/src/modules/Telemetry/Sensor/T1000xSensor.cpp @@ -0,0 +1,119 @@ +#include "configuration.h" + +#if !MESHTASTIC_EXCLUDE_ENVIRONMENTAL_SENSOR && defined(T1000X_SENSOR_EN) + +#include "../mesh/generated/meshtastic/telemetry.pb.h" +#include "T1000xSensor.h" +#include "TelemetrySensor.h" +#include + +#define T1000X_SENSE_SAMPLES 15 +#define T1000X_LIGHT_REF_VCC 2400 + +#define HEATER_NTC_BX 4250 // thermistor coefficient B +#define HEATER_NTC_RP 8250 // ohm, series resistance to thermistor +#define HEATER_NTC_KA 273.15 // 25 Celsius at Kelvin +#define NTC_REF_VCC 3000 // mV, output voltage of LDO + +// ntc res table +uint32_t ntc_res2[136] = { + 113347, 107565, 102116, 96978, 92132, 87559, 83242, 79166, 75316, 71677, 68237, 64991, 61919, 59011, 56258, 53650, 51178, + 48835, 46613, 44506, 42506, 40600, 38791, 37073, 35442, 33892, 32420, 31020, 29689, 28423, 27219, 26076, 24988, 23951, + 22963, 22021, 21123, 20267, 19450, 18670, 17926, 17214, 16534, 15886, 15266, 14674, 14108, 13566, 13049, 12554, 12081, + 11628, 11195, 10780, 10382, 10000, 9634, 9284, 8947, 8624, 8315, 8018, 7734, 7461, 7199, 6948, 6707, 6475, + 6253, 6039, 5834, 5636, 5445, 5262, 5086, 4917, 4754, 4597, 4446, 4301, 4161, 4026, 3896, 3771, 3651, + 3535, 3423, 3315, 3211, 3111, 3014, 2922, 2834, 2748, 2666, 2586, 2509, 2435, 2364, 2294, 2228, 2163, + 2100, 2040, 1981, 1925, 1870, 1817, 1766, 1716, 1669, 1622, 1578, 1535, 1493, 1452, 1413, 1375, 1338, + 1303, 1268, 1234, 1202, 1170, 1139, 1110, 1081, 1053, 1026, 999, 974, 949, 925, 902, 880, 858, +}; + +int8_t ntc_temp2[136] = { + -30, -29, -28, -27, -26, -25, -24, -23, -22, -21, -20, -19, -18, -17, -16, -15, -14, -13, -12, -11, -10, -9, -8, + -7, -6, -5, -4, -3, -2, -1, 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, 32, 33, 34, 35, 36, 37, 38, + 39, 40, 41, 42, 43, 44, 45, 46, 47, 48, 49, 50, 51, 52, 53, 54, 55, 56, 57, 58, 59, 60, 61, + 62, 63, 64, 65, 66, 67, 68, 69, 70, 71, 72, 73, 74, 75, 76, 77, 78, 79, 80, 81, 82, 83, 84, + 85, 86, 87, 88, 89, 90, 91, 92, 93, 94, 95, 96, 97, 98, 99, 100, 101, 102, 103, 104, 105, +}; + +T1000xSensor::T1000xSensor() : TelemetrySensor(meshtastic_TelemetrySensorType_SENSOR_UNSET, "T1000x") {} + +int32_t T1000xSensor::runOnce() +{ + LOG_INFO("Init sensor: %s\n", sensorName); + if (!hasSensor()) { + return DEFAULT_SENSOR_MINIMUM_WAIT_TIME_BETWEEN_READS; + } + return DEFAULT_SENSOR_MINIMUM_WAIT_TIME_BETWEEN_READS; +} + +void T1000xSensor::setup() +{ + // Set up oversampling and filter initialization +} + +float T1000xSensor::getLux() +{ + uint32_t lux_vot = 0; + float lux_level = 0; + + for (uint32_t i = 0; i < T1000X_SENSE_SAMPLES; i++) { + lux_vot += analogRead(T1000X_LUX_PIN); + } + lux_vot = lux_vot / T1000X_SENSE_SAMPLES; + lux_vot = ((1000 * AREF_VOLTAGE) / pow(2, BATTERY_SENSE_RESOLUTION_BITS)) * lux_vot; + + if (lux_vot <= 80) + lux_level = 0; + else if (lux_vot >= 2480) + lux_level = 100; + else + lux_level = 100 * (lux_vot - 80) / T1000X_LIGHT_REF_VCC; + + return lux_level; +} + +float T1000xSensor::getTemp() +{ + uint32_t vcc_vot = 0, ntc_vot = 0; + + uint8_t u8i = 0; + float Vout = 0, Rt = 0, temp = 0; + float Temp = 0; + + for (uint32_t i = 0; i < T1000X_SENSE_SAMPLES; i++) { + vcc_vot += analogRead(T1000X_VCC_PIN); + } + vcc_vot = vcc_vot / T1000X_SENSE_SAMPLES; + vcc_vot = 2 * ((1000 * AREF_VOLTAGE) / pow(2, BATTERY_SENSE_RESOLUTION_BITS)) * vcc_vot; + + for (uint32_t i = 0; i < T1000X_SENSE_SAMPLES; i++) { + ntc_vot += analogRead(T1000X_NTC_PIN); + } + ntc_vot = ntc_vot / T1000X_SENSE_SAMPLES; + ntc_vot = ((1000 * AREF_VOLTAGE) / pow(2, BATTERY_SENSE_RESOLUTION_BITS)) * ntc_vot; + + Vout = ntc_vot; + Rt = (HEATER_NTC_RP * vcc_vot) / Vout - HEATER_NTC_RP; + for (u8i = 0; u8i < 135; u8i++) { + if (Rt >= ntc_res2[u8i]) { + break; + } + } + temp = ntc_temp2[u8i - 1] + 1 * (ntc_res2[u8i - 1] - Rt) / (float)(ntc_res2[u8i - 1] - ntc_res2[u8i]); + Temp = (temp * 100 + 5) / 100; // half adjust + + return Temp; +} + +bool T1000xSensor::getMetrics(meshtastic_Telemetry *measurement) +{ + measurement->variant.environment_metrics.has_temperature = true; + measurement->variant.environment_metrics.has_lux = true; + + measurement->variant.environment_metrics.temperature = getTemp(); + measurement->variant.environment_metrics.lux = getLux(); + return true; +} + +#endif \ No newline at end of file diff --git a/src/modules/Telemetry/Sensor/T1000xSensor.h b/src/modules/Telemetry/Sensor/T1000xSensor.h new file mode 100644 index 000000000..a1c771cfa --- /dev/null +++ b/src/modules/Telemetry/Sensor/T1000xSensor.h @@ -0,0 +1,21 @@ +#include "configuration.h" + +#if !MESHTASTIC_EXCLUDE_ENVIRONMENTAL_SENSOR + +#include "../mesh/generated/meshtastic/telemetry.pb.h" +#include "TelemetrySensor.h" + +class T1000xSensor : public TelemetrySensor +{ + protected: + virtual void setup() override; + + public: + T1000xSensor(); + virtual int32_t runOnce() override; + virtual bool getMetrics(meshtastic_Telemetry *measurement) override; + virtual float getLux(); + virtual float getTemp(); +}; + +#endif \ No newline at end of file diff --git a/src/modules/Telemetry/Sensor/TSL2591Sensor.cpp b/src/modules/Telemetry/Sensor/TSL2591Sensor.cpp new file mode 100644 index 000000000..9002874b3 --- /dev/null +++ b/src/modules/Telemetry/Sensor/TSL2591Sensor.cpp @@ -0,0 +1,44 @@ +#include "configuration.h" + +#if !MESHTASTIC_EXCLUDE_ENVIRONMENTAL_SENSOR + +#include "../mesh/generated/meshtastic/telemetry.pb.h" +#include "TSL2591Sensor.h" +#include "TelemetrySensor.h" +#include +#include + +TSL2591Sensor::TSL2591Sensor() : TelemetrySensor(meshtastic_TelemetrySensorType_TSL25911FN, "TSL2591") {} + +int32_t TSL2591Sensor::runOnce() +{ + LOG_INFO("Init sensor: %s\n", sensorName); + if (!hasSensor()) { + return DEFAULT_SENSOR_MINIMUM_WAIT_TIME_BETWEEN_READS; + } + status = tsl.begin(nodeTelemetrySensorsMap[sensorType].second); + + return initI2CSensor(); +} + +void TSL2591Sensor::setup() +{ + tsl.setGain(TSL2591_GAIN_MED); // 25x gain + tsl.setTiming(TSL2591_INTEGRATIONTIME_300MS); +} + +bool TSL2591Sensor::getMetrics(meshtastic_Telemetry *measurement) +{ + measurement->variant.environment_metrics.has_lux = true; + uint32_t lum = tsl.getFullLuminosity(); + uint16_t ir, full; + ir = lum >> 16; + full = lum & 0xFFFF; + + measurement->variant.environment_metrics.lux = tsl.calculateLux(full, ir); + LOG_INFO("Lux: %f\n", measurement->variant.environment_metrics.lux); + + return true; +} + +#endif \ No newline at end of file diff --git a/src/modules/Telemetry/Sensor/TSL2591Sensor.h b/src/modules/Telemetry/Sensor/TSL2591Sensor.h new file mode 100644 index 000000000..27bebdfe5 --- /dev/null +++ b/src/modules/Telemetry/Sensor/TSL2591Sensor.h @@ -0,0 +1,22 @@ +#include "configuration.h" + +#if !MESHTASTIC_EXCLUDE_ENVIRONMENTAL_SENSOR + +#include "../mesh/generated/meshtastic/telemetry.pb.h" +#include "TelemetrySensor.h" +#include + +class TSL2591Sensor : public TelemetrySensor +{ + private: + Adafruit_TSL2591 tsl; + + protected: + virtual void setup() override; + + public: + TSL2591Sensor(); + virtual int32_t runOnce() override; + virtual bool getMetrics(meshtastic_Telemetry *measurement) override; +}; +#endif \ No newline at end of file diff --git a/src/modules/Telemetry/Sensor/TelemetrySensor.cpp b/src/modules/Telemetry/Sensor/TelemetrySensor.cpp index cd8fe2566..d6e7d1fac 100644 --- a/src/modules/Telemetry/Sensor/TelemetrySensor.cpp +++ b/src/modules/Telemetry/Sensor/TelemetrySensor.cpp @@ -1,4 +1,10 @@ -#include "TelemetrySensor.h" +#include "configuration.h" + +#if !MESHTASTIC_EXCLUDE_ENVIRONMENTAL_SENSOR + #include "../mesh/generated/meshtastic/telemetry.pb.h" #include "NodeDB.h" +#include "TelemetrySensor.h" #include "main.h" + +#endif \ No newline at end of file diff --git a/src/modules/Telemetry/Sensor/TelemetrySensor.h b/src/modules/Telemetry/Sensor/TelemetrySensor.h index 7282e6dfa..da376ad31 100644 --- a/src/modules/Telemetry/Sensor/TelemetrySensor.h +++ b/src/modules/Telemetry/Sensor/TelemetrySensor.h @@ -1,5 +1,10 @@ +#include "configuration.h" + +#if !MESHTASTIC_EXCLUDE_ENVIRONMENTAL_SENSOR + #pragma once #include "../mesh/generated/meshtastic/telemetry.pb.h" +#include "MeshModule.h" #include "NodeDB.h" #include @@ -38,6 +43,12 @@ class TelemetrySensor virtual void setup(); public: + virtual AdminMessageHandleResult handleAdminMessage(const meshtastic_MeshPacket &mp, meshtastic_AdminMessage *request, + meshtastic_AdminMessage *response) + { + return AdminMessageHandleResult::NOT_HANDLED; + } + bool hasSensor() { return nodeTelemetrySensorsMap[sensorType].first > 0; } virtual int32_t runOnce() = 0; @@ -45,4 +56,6 @@ class TelemetrySensor virtual bool isRunning() { return status > 0; } virtual bool getMetrics(meshtastic_Telemetry *measurement) = 0; -}; \ No newline at end of file +}; + +#endif \ No newline at end of file diff --git a/src/modules/Telemetry/Sensor/VEML7700Sensor.cpp b/src/modules/Telemetry/Sensor/VEML7700Sensor.cpp new file mode 100644 index 000000000..c176ed21b --- /dev/null +++ b/src/modules/Telemetry/Sensor/VEML7700Sensor.cpp @@ -0,0 +1,68 @@ +#include "configuration.h" + +#if !MESHTASTIC_EXCLUDE_ENVIRONMENTAL_SENSOR + +#include "../mesh/generated/meshtastic/telemetry.pb.h" +#include "TelemetrySensor.h" +#include "VEML7700Sensor.h" + +#include +#include + +VEML7700Sensor::VEML7700Sensor() : TelemetrySensor(meshtastic_TelemetrySensorType_VEML7700, "VEML7700") {} + +int32_t VEML7700Sensor::runOnce() +{ + LOG_INFO("Init sensor: %s\n", sensorName); + if (!hasSensor()) { + return DEFAULT_SENSOR_MINIMUM_WAIT_TIME_BETWEEN_READS; + } + status = veml7700.begin(nodeTelemetrySensorsMap[sensorType].second); + + veml7700.setLowThreshold(10000); + veml7700.setHighThreshold(20000); + veml7700.interruptEnable(true); + + return initI2CSensor(); +} + +void VEML7700Sensor::setup() {} + +/*! + * @brief Copmute lux from ALS reading. + * @param rawALS raw ALS register value + * @param corrected if true, apply non-linear correction + * @return lux value + */ +float VEML7700Sensor::computeLux(uint16_t rawALS, bool corrected) +{ + float lux = getResolution() * rawALS; + if (corrected) + lux = (((6.0135e-13 * lux - 9.3924e-9) * lux + 8.1488e-5) * lux + 1.0023) * lux; + return lux; +} + +/*! + * @brief Determines resolution for current gain and integration time + * settings. + */ +float VEML7700Sensor::getResolution(void) +{ + return MAX_RES * (IT_MAX / veml7700.getIntegrationTimeValue()) * (GAIN_MAX / veml7700.getGainValue()); +} + +bool VEML7700Sensor::getMetrics(meshtastic_Telemetry *measurement) +{ + measurement->variant.environment_metrics.has_lux = true; + measurement->variant.environment_metrics.has_white_lux = true; + + int16_t white; + measurement->variant.environment_metrics.lux = veml7700.readLux(VEML_LUX_AUTO); + white = veml7700.readWhite(true); + measurement->variant.environment_metrics.white_lux = computeLux(white, white > 100); + LOG_INFO("white lux %f, als lux %f\n", measurement->variant.environment_metrics.white_lux, + measurement->variant.environment_metrics.lux); + + return true; +} +#endif \ No newline at end of file diff --git a/src/modules/Telemetry/Sensor/VEML7700Sensor.h b/src/modules/Telemetry/Sensor/VEML7700Sensor.h new file mode 100644 index 000000000..97e57334c --- /dev/null +++ b/src/modules/Telemetry/Sensor/VEML7700Sensor.h @@ -0,0 +1,27 @@ +#include "configuration.h" + +#if !MESHTASTIC_EXCLUDE_ENVIRONMENTAL_SENSOR + +#include "../mesh/generated/meshtastic/telemetry.pb.h" +#include "TelemetrySensor.h" +#include + +class VEML7700Sensor : public TelemetrySensor +{ + private: + const float MAX_RES = 0.0036; + const float GAIN_MAX = 2; + const float IT_MAX = 800; + Adafruit_VEML7700 veml7700; + float computeLux(uint16_t rawALS, bool corrected); + float getResolution(void); + + protected: + virtual void setup() override; + + public: + VEML7700Sensor(); + virtual int32_t runOnce() override; + virtual bool getMetrics(meshtastic_Telemetry *measurement) override; +}; +#endif \ No newline at end of file diff --git a/src/modules/Telemetry/Sensor/VoltageSensor.h b/src/modules/Telemetry/Sensor/VoltageSensor.h index f2f28fb06..767ffd246 100644 --- a/src/modules/Telemetry/Sensor/VoltageSensor.h +++ b/src/modules/Telemetry/Sensor/VoltageSensor.h @@ -1,7 +1,13 @@ +#include "configuration.h" + +#if !MESHTASTIC_EXCLUDE_ENVIRONMENTAL_SENSOR + #pragma once class VoltageSensor { public: virtual uint16_t getBusVoltageMv() = 0; -}; \ No newline at end of file +}; + +#endif \ No newline at end of file diff --git a/src/modules/Telemetry/Sensor/bme680_iaq_33v_3s_4d/bsec_iaq.c b/src/modules/Telemetry/Sensor/bme680_iaq_33v_3s_4d/bsec_iaq.c deleted file mode 100644 index 1f27e6c69..000000000 --- a/src/modules/Telemetry/Sensor/bme680_iaq_33v_3s_4d/bsec_iaq.c +++ /dev/null @@ -1,82 +0,0 @@ -#include "bsec_iaq.h" - -const uint8_t bsec_config_iaq[1974] = { - 0, 0, 4, 2, 189, 1, 0, 0, 0, 0, 0, 0, 158, 7, 0, 0, 176, 0, 1, 0, 0, 192, 168, 71, 64, - 49, 119, 76, 0, 0, 97, 69, 0, 0, 97, 69, 137, 65, 0, 191, 205, 204, 204, 190, 0, 0, 64, 191, 225, 122, - 148, 190, 10, 0, 3, 0, 0, 0, 96, 64, 23, 183, 209, 56, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 205, 204, 204, 189, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 128, 63, 0, 0, 0, 0, 0, 0, 128, 63, - 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 128, 63, 0, 0, 0, 0, 0, 0, 128, 63, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 128, 63, 0, 0, 0, 0, 0, 0, 128, 63, 82, 73, 157, 188, 95, 41, 203, 61, 118, 224, - 108, 63, 155, 230, 125, 63, 191, 14, 124, 63, 0, 0, 160, 65, 0, 0, 32, 66, 0, 0, 160, 65, 0, 0, 32, - 66, 0, 0, 32, 66, 0, 0, 160, 65, 0, 0, 32, 66, 0, 0, 160, 65, 8, 0, 2, 0, 236, 81, 133, 66, - 16, 0, 3, 0, 10, 215, 163, 60, 10, 215, 35, 59, 10, 215, 35, 59, 13, 0, 5, 0, 0, 0, 0, 0, 100, - 35, 41, 29, 86, 88, 0, 9, 0, 229, 208, 34, 62, 0, 0, 0, 0, 0, 0, 0, 0, 218, 27, 156, 62, 225, - 11, 67, 64, 0, 0, 160, 64, 0, 0, 0, 0, 0, 0, 0, 0, 94, 75, 72, 189, 93, 254, 159, 64, 66, 62, - 160, 191, 0, 0, 0, 0, 0, 0, 0, 0, 33, 31, 180, 190, 138, 176, 97, 64, 65, 241, 99, 190, 0, 0, 0, - 0, 0, 0, 0, 0, 167, 121, 71, 61, 165, 189, 41, 192, 184, 30, 189, 64, 12, 0, 10, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 13, 5, 11, 0, 1, 1, 2, 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, 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, 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, 128, 63, 0, 0, 128, 63, 0, 0, 128, 63, 0, 0, 128, 63, 0, 0, - 128, 63, 0, 0, 128, 63, 0, 0, 128, 63, 0, 0, 128, 63, 0, 0, 128, 63, 0, 0, 128, 63, 0, 0, 128, - 63, 0, 0, 128, 63, 0, 0, 128, 63, 0, 0, 128, 63, 0, 0, 128, 63, 0, 0, 128, 63, 0, 0, 128, 63, - 0, 0, 128, 63, 0, 0, 128, 63, 0, 0, 128, 63, 0, 0, 128, 63, 0, 0, 128, 63, 0, 0, 128, 63, 0, - 0, 128, 63, 0, 0, 128, 63, 0, 0, 128, 63, 0, 0, 128, 63, 0, 0, 128, 63, 0, 0, 128, 63, 0, 0, - 128, 63, 0, 0, 128, 63, 0, 0, 128, 63, 0, 0, 128, 63, 0, 0, 128, 63, 0, 0, 128, 63, 0, 0, 128, - 63, 0, 0, 128, 63, 0, 0, 128, 63, 0, 0, 128, 63, 0, 0, 128, 63, 0, 0, 128, 63, 0, 0, 128, 63, - 0, 0, 128, 63, 0, 0, 128, 63, 0, 0, 128, 63, 0, 0, 128, 63, 0, 0, 128, 63, 0, 0, 128, 63, 0, - 0, 128, 63, 0, 0, 128, 63, 0, 0, 128, 63, 0, 0, 128, 63, 0, 0, 128, 63, 0, 0, 128, 63, 0, 0, - 128, 63, 0, 0, 128, 63, 0, 0, 128, 63, 0, 0, 128, 63, 0, 0, 128, 63, 0, 0, 128, 63, 0, 0, 128, - 63, 0, 0, 128, 63, 0, 0, 128, 63, 0, 0, 128, 63, 0, 0, 128, 63, 0, 0, 128, 63, 0, 0, 128, 63, - 0, 0, 128, 63, 0, 0, 128, 63, 0, 0, 128, 63, 0, 0, 128, 63, 0, 0, 128, 63, 0, 0, 128, 63, 0, - 0, 128, 63, 0, 0, 128, 63, 0, 0, 128, 63, 0, 0, 128, 63, 0, 0, 128, 63, 0, 0, 128, 63, 0, 0, - 128, 63, 0, 0, 128, 63, 0, 0, 128, 63, 0, 0, 128, 63, 0, 0, 128, 63, 0, 0, 128, 63, 0, 0, 128, - 63, 0, 0, 128, 63, 0, 0, 128, 63, 0, 0, 128, 63, 0, 0, 128, 63, 0, 0, 128, 63, 0, 0, 128, 63, - 0, 0, 128, 63, 0, 0, 128, 63, 0, 0, 128, 63, 0, 0, 128, 63, 0, 0, 128, 63, 0, 0, 128, 63, 0, - 0, 128, 63, 0, 0, 128, 63, 0, 0, 128, 63, 0, 0, 128, 63, 0, 0, 128, 63, 0, 0, 128, 63, 0, 0, - 128, 63, 0, 0, 128, 63, 0, 0, 128, 63, 0, 0, 128, 63, 0, 0, 128, 63, 0, 0, 128, 63, 0, 0, 128, - 63, 0, 0, 128, 63, 0, 0, 128, 63, 0, 0, 128, 63, 0, 0, 128, 63, 0, 0, 128, 63, 0, 0, 128, 63, - 0, 0, 128, 63, 0, 0, 128, 63, 0, 0, 128, 63, 0, 0, 128, 63, 0, 0, 128, 63, 0, 0, 128, 63, 0, - 0, 128, 63, 0, 0, 128, 63, 0, 0, 128, 63, 0, 0, 128, 63, 0, 0, 128, 63, 0, 0, 128, 63, 0, 0, - 128, 63, 0, 0, 128, 63, 0, 0, 128, 63, 0, 0, 128, 63, 0, 0, 128, 63, 0, 0, 128, 63, 0, 0, 128, - 63, 0, 0, 128, 63, 0, 0, 128, 63, 0, 0, 128, 63, 0, 0, 128, 63, 0, 0, 128, 63, 0, 0, 128, 63, - 0, 0, 128, 63, 0, 0, 128, 63, 0, 0, 128, 63, 0, 0, 128, 63, 0, 0, 128, 63, 0, 0, 128, 63, 0, - 0, 128, 63, 0, 0, 128, 63, 0, 0, 128, 63, 0, 0, 128, 63, 0, 0, 128, 63, 0, 0, 128, 63, 0, 0, - 128, 63, 0, 0, 128, 63, 0, 0, 128, 63, 0, 0, 128, 63, 0, 0, 128, 63, 0, 0, 128, 63, 0, 0, 128, - 63, 0, 0, 128, 63, 0, 0, 128, 63, 0, 0, 128, 63, 0, 0, 128, 63, 0, 0, 128, 63, 0, 0, 128, 63, - 0, 0, 128, 63, 0, 0, 128, 63, 0, 0, 128, 63, 0, 0, 128, 63, 0, 0, 128, 63, 0, 0, 128, 63, 0, - 0, 128, 63, 0, 0, 128, 63, 0, 0, 128, 63, 0, 0, 128, 63, 0, 0, 128, 63, 0, 0, 128, 63, 0, 0, - 128, 63, 0, 0, 128, 63, 0, 0, 128, 63, 0, 0, 128, 63, 0, 0, 128, 63, 0, 0, 128, 63, 0, 0, 128, - 63, 0, 0, 128, 63, 0, 0, 128, 63, 0, 0, 128, 63, 0, 0, 128, 63, 0, 0, 128, 63, 0, 0, 128, 63, - 0, 0, 128, 63, 0, 0, 128, 63, 0, 0, 128, 63, 0, 0, 128, 63, 0, 0, 128, 63, 0, 0, 128, 63, 0, - 0, 128, 63, 0, 0, 128, 63, 0, 0, 128, 63, 0, 0, 128, 63, 0, 0, 128, 63, 0, 0, 128, 63, 0, 0, - 128, 63, 0, 0, 128, 63, 0, 0, 128, 63, 0, 0, 128, 63, 0, 0, 128, 63, 0, 0, 128, 63, 0, 0, 128, - 63, 0, 0, 128, 63, 0, 0, 128, 63, 0, 0, 128, 63, 0, 0, 128, 63, 0, 0, 128, 63, 0, 0, 128, 63, - 0, 0, 128, 63, 0, 0, 128, 63, 0, 0, 128, 63, 0, 0, 128, 63, 0, 0, 128, 63, 0, 0, 128, 63, 0, - 0, 128, 63, 0, 0, 128, 63, 0, 0, 128, 63, 0, 0, 128, 63, 0, 0, 128, 63, 0, 0, 128, 63, 0, 0, - 128, 63, 0, 0, 128, 63, 0, 0, 128, 63, 0, 0, 128, 63, 0, 0, 128, 63, 0, 0, 128, 63, 0, 0, 128, - 63, 0, 0, 128, 63, 0, 0, 128, 63, 0, 0, 128, 63, 0, 0, 128, 63, 0, 0, 128, 63, 0, 0, 128, 63, - 0, 0, 128, 63, 0, 0, 128, 63, 0, 0, 128, 63, 0, 0, 128, 63, 0, 0, 128, 63, 0, 0, 128, 63, 0, - 0, 128, 63, 0, 0, 128, 63, 0, 0, 128, 63, 0, 0, 128, 63, 0, 0, 128, 63, 0, 0, 128, 63, 0, 0, - 128, 63, 0, 0, 128, 63, 0, 0, 128, 63, 0, 0, 128, 63, 0, 0, 128, 63, 0, 0, 128, 63, 0, 0, 128, - 63, 0, 0, 128, 63, 0, 0, 128, 63, 0, 0, 128, 63, 0, 0, 128, 63, 0, 0, 128, 63, 0, 0, 128, 63, - 0, 0, 128, 63, 0, 0, 128, 63, 0, 0, 128, 63, 10, 10, 4, 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, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 128, 63, 0, 0, 128, 63, - 0, 0, 128, 63, 0, 0, 128, 63, 0, 0, 128, 63, 0, 0, 128, 63, 0, 0, 128, 63, 0, 0, 128, 63, 0, - 0, 128, 63, 0, 0, 128, 63, 0, 0, 128, 63, 0, 0, 128, 63, 0, 0, 128, 63, 0, 0, 0, 88, 1, 254, - 0, 2, 1, 5, 48, 117, 100, 0, 44, 1, 112, 23, 151, 7, 132, 3, 197, 0, 92, 4, 144, 1, 64, 1, 64, - 1, 144, 1, 48, 117, 48, 117, 48, 117, 48, 117, 100, 0, 100, 0, 100, 0, 48, 117, 48, 117, 48, 117, 100, 0, - 100, 0, 48, 117, 48, 117, 8, 7, 8, 7, 8, 7, 8, 7, 8, 7, 100, 0, 100, 0, 100, 0, 100, 0, 48, - 117, 48, 117, 48, 117, 100, 0, 100, 0, 100, 0, 48, 117, 48, 117, 100, 0, 100, 0, 255, 255, 255, 255, 255, 255, - 255, 255, 255, 255, 44, 1, 44, 1, 44, 1, 44, 1, 44, 1, 44, 1, 44, 1, 44, 1, 44, 1, 44, 1, 44, - 1, 44, 1, 44, 1, 44, 1, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 112, 23, 112, 23, 112, 23, 112, 23, - 8, 7, 8, 7, 8, 7, 8, 7, 112, 23, 112, 23, 112, 23, 112, 23, 112, 23, 112, 23, 255, 255, 255, 255, 255, - 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 112, 23, 112, 23, 112, 23, 112, 23, 255, 255, 255, 255, - 220, 5, 220, 5, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, - 255, 220, 5, 220, 5, 220, 5, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, - 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, - 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 44, 1, 0, 5, 10, 5, - 0, 2, 0, 10, 0, 30, 0, 5, 0, 5, 0, 5, 0, 5, 0, 5, 0, 5, 0, 64, 1, 100, 0, 100, 0, - 100, 0, 200, 0, 200, 0, 200, 0, 64, 1, 64, 1, 64, 1, 10, 0, 0, 0, 0, 0, 21, 122, 0, 0}; diff --git a/src/modules/Telemetry/Sensor/bme680_iaq_33v_3s_4d/bsec_iaq.h b/src/modules/Telemetry/Sensor/bme680_iaq_33v_3s_4d/bsec_iaq.h deleted file mode 100644 index cdd209ae5..000000000 --- a/src/modules/Telemetry/Sensor/bme680_iaq_33v_3s_4d/bsec_iaq.h +++ /dev/null @@ -1,3 +0,0 @@ -#include - -extern const uint8_t bsec_config_iaq[1974]; diff --git a/src/modules/Telemetry/UnitConversions.cpp b/src/modules/Telemetry/UnitConversions.cpp new file mode 100644 index 000000000..9f40de40f --- /dev/null +++ b/src/modules/Telemetry/UnitConversions.cpp @@ -0,0 +1,21 @@ +#include "UnitConversions.h" + +float UnitConversions::CelsiusToFahrenheit(float celcius) +{ + return (celcius * 9) / 5 + 32; +} + +float UnitConversions::MetersPerSecondToKnots(float metersPerSecond) +{ + return metersPerSecond * 1.94384; +} + +float UnitConversions::MetersPerSecondToMilesPerHour(float metersPerSecond) +{ + return metersPerSecond * 2.23694; +} + +float UnitConversions::HectoPascalToInchesOfMercury(float hectoPascal) +{ + return hectoPascal * 0.029529983071445; +} diff --git a/src/modules/Telemetry/UnitConversions.h b/src/modules/Telemetry/UnitConversions.h new file mode 100644 index 000000000..60f9b664a --- /dev/null +++ b/src/modules/Telemetry/UnitConversions.h @@ -0,0 +1,10 @@ +#pragma once + +class UnitConversions +{ + public: + static float CelsiusToFahrenheit(float celcius); + static float MetersPerSecondToKnots(float metersPerSecond); + static float MetersPerSecondToMilesPerHour(float metersPerSecond); + static float HectoPascalToInchesOfMercury(float hectoPascal); +}; diff --git a/src/modules/TextMessageModule.cpp b/src/modules/TextMessageModule.cpp index 0f86a6470..2933718af 100644 --- a/src/modules/TextMessageModule.cpp +++ b/src/modules/TextMessageModule.cpp @@ -2,8 +2,8 @@ #include "MeshService.h" #include "NodeDB.h" #include "PowerFSM.h" +#include "buzz.h" #include "configuration.h" - TextMessageModule *textMessageModule; ProcessMessage TextMessageModule::handleReceived(const meshtastic_MeshPacket &mp) @@ -12,7 +12,6 @@ ProcessMessage TextMessageModule::handleReceived(const meshtastic_MeshPacket &mp auto &p = mp.decoded; LOG_INFO("Received text msg from=0x%0x, id=0x%x, msg=%.*s\n", mp.from, mp.id, p.payload.size, p.payload.bytes); #endif - // We only store/display messages destined for us. // Keep a copy of the most recent text message. devicestate.rx_text_message = mp; diff --git a/src/modules/TraceRouteModule.cpp b/src/modules/TraceRouteModule.cpp index 311e211f3..955098c28 100644 --- a/src/modules/TraceRouteModule.cpp +++ b/src/modules/TraceRouteModule.cpp @@ -1,62 +1,145 @@ #include "TraceRouteModule.h" -#include "FloodingRouter.h" #include "MeshService.h" TraceRouteModule *traceRouteModule; bool TraceRouteModule::handleReceivedProtobuf(const meshtastic_MeshPacket &mp, meshtastic_RouteDiscovery *r) { - // Only handle a response - if (mp.decoded.request_id) { - printRoute(r, mp.to, mp.from); - } - + // We only alter the packet in alterReceivedProtobuf() return false; // let it be handled by RoutingModule } -void TraceRouteModule::updateRoute(meshtastic_MeshPacket *p) +void TraceRouteModule::alterReceivedProtobuf(meshtastic_MeshPacket &p, meshtastic_RouteDiscovery *r) { - auto &incoming = p->decoded; - // Only append an ID for the request (one way) - if (!incoming.request_id) { - meshtastic_RouteDiscovery scratch; - meshtastic_RouteDiscovery *updated = NULL; - memset(&scratch, 0, sizeof(scratch)); - pb_decode_from_bytes(incoming.payload.bytes, incoming.payload.size, &meshtastic_RouteDiscovery_msg, &scratch); - updated = &scratch; + const meshtastic_Data &incoming = p.decoded; - appendMyID(updated); - printRoute(updated, p->from, NODENUM_BROADCAST); + // Insert unknown hops if necessary + insertUnknownHops(p, r, !incoming.request_id); - // Set updated route to the payload of the to be flooded packet - p->decoded.payload.size = pb_encode_to_bytes(p->decoded.payload.bytes, sizeof(p->decoded.payload.bytes), - &meshtastic_RouteDiscovery_msg, updated); - } + // Append ID and SNR. If the last hop is to us, we only need to append the SNR + appendMyIDandSNR(r, p.rx_snr, !incoming.request_id, isToUs(&p)); + if (!incoming.request_id) + printRoute(r, p.from, p.to, true); + else + printRoute(r, p.to, p.from, false); + + // Set updated route to the payload of the to be flooded packet + p.decoded.payload.size = + pb_encode_to_bytes(p.decoded.payload.bytes, sizeof(p.decoded.payload.bytes), &meshtastic_RouteDiscovery_msg, r); } -void TraceRouteModule::appendMyID(meshtastic_RouteDiscovery *updated) +void TraceRouteModule::insertUnknownHops(meshtastic_MeshPacket &p, meshtastic_RouteDiscovery *r, bool isTowardsDestination) { - // Length of route array can normally not be exceeded due to the max. hop_limit of 7 - if (updated->route_count < sizeof(updated->route) / sizeof(updated->route[0])) { - updated->route[updated->route_count] = myNodeInfo.my_node_num; - updated->route_count += 1; + pb_size_t *route_count; + uint32_t *route; + pb_size_t *snr_count; + int8_t *snr_list; + + // Pick the correct route array and SNR list + if (isTowardsDestination) { + route_count = &r->route_count; + route = r->route; + snr_count = &r->snr_towards_count; + snr_list = r->snr_towards; } else { - LOG_WARN("Route exceeded maximum hop limit, are you bridging networks?\n"); + route_count = &r->route_back_count; + route = r->route_back; + snr_count = &r->snr_back_count; + snr_list = r->snr_back; + } + + // Only insert unknown hops if hop_start is valid + if (p.hop_start != 0 && p.hop_limit <= p.hop_start) { + uint8_t hopsTaken = p.hop_start - p.hop_limit; + int8_t diff = hopsTaken - *route_count; + for (uint8_t i = 0; i < diff; i++) { + if (*route_count < ROUTE_SIZE) { + route[*route_count] = NODENUM_BROADCAST; // This will represent an unknown hop + *route_count += 1; + } + } + // Add unknown SNR values if necessary + diff = *route_count - *snr_count; + for (uint8_t i = 0; i < diff; i++) { + if (*snr_count < ROUTE_SIZE) { + snr_list[*snr_count] = INT8_MIN; // This will represent an unknown SNR + *snr_count += 1; + } + } } } -void TraceRouteModule::printRoute(meshtastic_RouteDiscovery *r, uint32_t origin, uint32_t dest) +void TraceRouteModule::appendMyIDandSNR(meshtastic_RouteDiscovery *updated, float snr, bool isTowardsDestination, bool SNRonly) +{ + pb_size_t *route_count; + uint32_t *route; + pb_size_t *snr_count; + int8_t *snr_list; + + // Pick the correct route array and SNR list + if (isTowardsDestination) { + route_count = &updated->route_count; + route = updated->route; + snr_count = &updated->snr_towards_count; + snr_list = updated->snr_towards; + } else { + route_count = &updated->route_back_count; + route = updated->route_back; + snr_count = &updated->snr_back_count; + snr_list = updated->snr_back; + } + + if (*snr_count < ROUTE_SIZE) { + snr_list[*snr_count] = (int8_t)(snr * 4); // Convert SNR to 1 byte + *snr_count += 1; + } + if (SNRonly) + return; + + // Length of route array can normally not be exceeded due to the max. hop_limit of 7 + if (*route_count < ROUTE_SIZE) { + route[*route_count] = myNodeInfo.my_node_num; + *route_count += 1; + } else { + LOG_WARN("Route exceeded maximum hop limit!\n"); // Are you bridging networks? + } +} + +void TraceRouteModule::printRoute(meshtastic_RouteDiscovery *r, uint32_t origin, uint32_t dest, bool isTowardsDestination) { #ifdef DEBUG_PORT LOG_INFO("Route traced:\n"); LOG_INFO("0x%x --> ", origin); for (uint8_t i = 0; i < r->route_count; i++) { - LOG_INFO("0x%x --> ", r->route[i]); + if (i < r->snr_towards_count && r->snr_towards[i] != INT8_MIN) + LOG_INFO("0x%x (%.2fdB) --> ", r->route[i], (float)r->snr_towards[i] / 4); + else + LOG_INFO("0x%x (?dB) --> ", r->route[i]); } - if (dest != NODENUM_BROADCAST) - LOG_INFO("0x%x\n", dest); - else + // If we are the destination, or it has already reached the destination, print it + if (dest == nodeDB->getNodeNum() || !isTowardsDestination) { + if (r->snr_towards_count > 0 && r->snr_towards[r->snr_towards_count - 1] != INT8_MIN) + LOG_INFO("0x%x (%.2fdB)\n", dest, (float)r->snr_towards[r->snr_towards_count - 1] / 4); + else + LOG_INFO("0x%x (?dB)\n", dest); + } else LOG_INFO("...\n"); + + // If there's a route back (or we are the destination as then the route is complete), print it + if (r->route_back_count > 0 || origin == nodeDB->getNodeNum()) { + if (r->snr_towards_count > 0 && origin == nodeDB->getNodeNum()) + LOG_INFO("(%.2fdB) 0x%x <-- ", (float)r->snr_back[r->snr_back_count - 1] / 4, origin); + else + LOG_INFO("..."); + + for (int8_t i = r->route_back_count - 1; i >= 0; i--) { + if (i < r->snr_back_count && r->snr_back[i] != INT8_MIN) + LOG_INFO("(%.2fdB) 0x%x <-- ", (float)r->snr_back[i] / 4, r->route_back[i]); + else + LOG_INFO("(?dB) 0x%x <-- ", r->route_back[i]); + } + LOG_INFO("0x%x\n", dest); + } #endif } @@ -73,8 +156,6 @@ meshtastic_MeshPacket *TraceRouteModule::allocReply() pb_decode_from_bytes(p.payload.bytes, p.payload.size, &meshtastic_RouteDiscovery_msg, &scratch); updated = &scratch; - printRoute(updated, req.from, req.to); - // Create a MeshPacket with this payload and set it as the reply meshtastic_MeshPacket *reply = allocDataProtobuf(*updated); @@ -85,4 +166,5 @@ TraceRouteModule::TraceRouteModule() : ProtobufModule("traceroute", meshtastic_PortNum_TRACEROUTE_APP, &meshtastic_RouteDiscovery_msg) { ourPortNum = meshtastic_PortNum_TRACEROUTE_APP; + isPromiscuous = true; // We need to update the route even if it is not destined to us } \ No newline at end of file diff --git a/src/modules/TraceRouteModule.h b/src/modules/TraceRouteModule.h index 674846ef1..afe2b3871 100644 --- a/src/modules/TraceRouteModule.h +++ b/src/modules/TraceRouteModule.h @@ -1,6 +1,8 @@ #pragma once #include "ProtobufModule.h" +#define ROUTE_SIZE sizeof(((meshtastic_RouteDiscovery *)0)->route) / sizeof(((meshtastic_RouteDiscovery *)0)->route[0]) + /** * A module that traces the route to a certain destination node */ @@ -9,26 +11,26 @@ class TraceRouteModule : public ProtobufModule public: TraceRouteModule(); - // Let FloodingRouter call updateRoute upon rebroadcasting a TraceRoute request - friend class FloodingRouter; - protected: bool handleReceivedProtobuf(const meshtastic_MeshPacket &mp, meshtastic_RouteDiscovery *r) override; virtual meshtastic_MeshPacket *allocReply() override; - /* Call before rebroadcasting a RouteDiscovery payload in order to update + /* Called before rebroadcasting a RouteDiscovery payload in order to update the route array containing the IDs of nodes this packet went through */ - void updateRoute(meshtastic_MeshPacket *p); + void alterReceivedProtobuf(meshtastic_MeshPacket &p, meshtastic_RouteDiscovery *r) override; private: + // Call to add unknown hops (e.g. when a node couldn't decrypt it) to the route based on hopStart and current hopLimit + void insertUnknownHops(meshtastic_MeshPacket &p, meshtastic_RouteDiscovery *r, bool isTowardsDestination); + // Call to add your ID to the route array of a RouteDiscovery message - void appendMyID(meshtastic_RouteDiscovery *r); + void appendMyIDandSNR(meshtastic_RouteDiscovery *r, float snr, bool isTowardsDestination, bool SNRonly); /* Call to print the route array of a RouteDiscovery message. Set origin to where the request came from. Set dest to the ID of its destination, or NODENUM_BROADCAST if it has not yet arrived there. */ - void printRoute(meshtastic_RouteDiscovery *r, uint32_t origin, uint32_t dest); + void printRoute(meshtastic_RouteDiscovery *r, uint32_t origin, uint32_t dest, bool isTowardsDestination); }; extern TraceRouteModule *traceRouteModule; \ No newline at end of file diff --git a/src/modules/WaypointModule.cpp b/src/modules/WaypointModule.cpp index 83485c8ee..a4611e780 100644 --- a/src/modules/WaypointModule.cpp +++ b/src/modules/WaypointModule.cpp @@ -2,6 +2,11 @@ #include "NodeDB.h" #include "PowerFSM.h" #include "configuration.h" +#if HAS_SCREEN +#include "gps/RTC.h" +#include "graphics/Screen.h" +#include "main.h" +#endif WaypointModule *waypointModule; @@ -11,14 +16,171 @@ ProcessMessage WaypointModule::handleReceived(const meshtastic_MeshPacket &mp) auto &p = mp.decoded; LOG_INFO("Received waypoint msg from=0x%0x, id=0x%x, msg=%.*s\n", mp.from, mp.id, p.payload.size, p.payload.bytes); #endif - // We only store/display messages destined for us. // Keep a copy of the most recent text message. devicestate.rx_waypoint = mp; devicestate.has_rx_waypoint = true; powerFSM.trigger(EVENT_RECEIVED_MSG); - notifyObservers(&mp); + +#if HAS_SCREEN + + UIFrameEvent e; + + // New or updated waypoint: focus on this frame next time Screen::setFrames runs + if (shouldDraw()) { + requestFocus(); + e.action = UIFrameEvent::Action::REGENERATE_FRAMESET; + } + + // Deleting an old waypoint: remove the frame quietly, don't change frame position if possible + else + e.action = UIFrameEvent::Action::REGENERATE_FRAMESET_BACKGROUND; + + notifyObservers(&e); + +#endif return ProcessMessage::CONTINUE; // Let others look at this message also if they want } + +#if HAS_SCREEN +bool WaypointModule::shouldDraw() +{ +#if !MESHTASTIC_EXCLUDE_WAYPOINT + // If no waypoint to show + if (!devicestate.has_rx_waypoint) + return false; + + // Decode the message, to find the expiration time (is waypoint still valid) + // This handles "deletion" as well as expiration + meshtastic_Waypoint wp; + memset(&wp, 0, sizeof(wp)); + if (pb_decode_from_bytes(devicestate.rx_waypoint.decoded.payload.bytes, devicestate.rx_waypoint.decoded.payload.size, + &meshtastic_Waypoint_msg, &wp)) { + // Valid waypoint + if (wp.expire > getTime()) + return devicestate.has_rx_waypoint = true; + + // Expired, or deleted + else + return devicestate.has_rx_waypoint = false; + } + + // If decoding failed + LOG_ERROR("Failed to decode waypoint\n"); + devicestate.has_rx_waypoint = false; + return false; +#else + return false; +#endif +} + +/// Draw the last waypoint we received +void WaypointModule::drawFrame(OLEDDisplay *display, OLEDDisplayUiState *state, int16_t x, int16_t y) +{ + // Prepare to draw + display->setFont(FONT_SMALL); + display->setTextAlignment(TEXT_ALIGN_LEFT); + + // Handle inverted display + // Unsure of expected behavior: for now, copy drawNodeInfo + if (config.display.displaymode == meshtastic_Config_DisplayConfig_DisplayMode_INVERTED) + display->fillRect(0 + x, 0 + y, x + display->getWidth(), y + FONT_HEIGHT_SMALL); + + // Decode the waypoint + const meshtastic_MeshPacket &mp = devicestate.rx_waypoint; + meshtastic_Waypoint wp; + memset(&wp, 0, sizeof(wp)); + if (!pb_decode_from_bytes(mp.decoded.payload.bytes, mp.decoded.payload.size, &meshtastic_Waypoint_msg, &wp)) { + // This *should* be caught by shouldDrawWaypoint, but we'll short-circuit here just in case + display->drawStringMaxWidth(0 + x, 0 + y, x + display->getWidth(), "Couldn't decode waypoint"); + devicestate.has_rx_waypoint = false; + return; + } + + // Get timestamp info. Will pass as a field to drawColumns + static char lastStr[20]; + screen->getTimeAgoStr(sinceReceived(&mp), lastStr, sizeof(lastStr)); + + // Will contain distance information, passed as a field to drawColumns + static char distStr[20]; + + // Get our node, to use our own position + meshtastic_NodeInfoLite *ourNode = nodeDB->getMeshNode(nodeDB->getNodeNum()); + + // Text fields to draw (left of compass) + // Last element must be NULL. This signals the end of the char*[] to drawColumns + const char *fields[] = {"Waypoint", lastStr, wp.name, distStr, NULL}; + + // Dimensions / co-ordinates for the compass/circle + int16_t compassX = 0, compassY = 0; + uint16_t compassDiam = graphics::Screen::getCompassDiam(display->getWidth(), display->getHeight()); + + if (config.display.displaymode == meshtastic_Config_DisplayConfig_DisplayMode_DEFAULT) { + compassX = x + display->getWidth() - compassDiam / 2 - 5; + compassY = y + display->getHeight() / 2; + } else { + compassX = x + display->getWidth() - compassDiam / 2 - 5; + compassY = y + FONT_HEIGHT_SMALL + (display->getHeight() - FONT_HEIGHT_SMALL) / 2; + } + + // If our node has a position: + if (ourNode && (hasValidPosition(ourNode) || screen->hasHeading())) { + const meshtastic_PositionLite &op = ourNode->position; + float myHeading; + if (screen->hasHeading()) + myHeading = (screen->getHeading()) * PI / 180; // gotta convert compass degrees to Radians + else + myHeading = screen->estimatedHeading(DegD(op.latitude_i), DegD(op.longitude_i)); + screen->drawCompassNorth(display, compassX, compassY, myHeading); + + // Distance to Waypoint + float d = GeoCoord::latLongToMeter(DegD(wp.latitude_i), DegD(wp.longitude_i), DegD(op.latitude_i), DegD(op.longitude_i)); + if (config.display.units == meshtastic_Config_DisplayConfig_DisplayUnits_IMPERIAL) { + if (d < (2 * MILES_TO_FEET)) + snprintf(distStr, sizeof(distStr), "%.0f ft", d * METERS_TO_FEET); + else + snprintf(distStr, sizeof(distStr), "%.1f mi", d * METERS_TO_FEET / MILES_TO_FEET); + } else { + if (d < 2000) + snprintf(distStr, sizeof(distStr), "%.0f m", d); + else + snprintf(distStr, sizeof(distStr), "%.1f km", d / 1000); + } + + // Compass bearing to waypoint + float bearingToOther = + GeoCoord::bearing(DegD(op.latitude_i), DegD(op.longitude_i), DegD(wp.latitude_i), DegD(wp.longitude_i)); + // If the top of the compass is a static north then bearingToOther can be drawn on the compass directly + // If the top of the compass is not a static north we need adjust bearingToOther based on heading + if (!config.display.compass_north_top) + bearingToOther -= myHeading; + screen->drawNodeHeading(display, compassX, compassY, compassDiam, bearingToOther); + } + + // If our node doesn't have position + else { + // ? in the compass + display->drawString(compassX - FONT_HEIGHT_SMALL / 4, compassY - FONT_HEIGHT_SMALL / 2, "?"); + + // ? in the distance field + if (config.display.units == meshtastic_Config_DisplayConfig_DisplayUnits_IMPERIAL) + strncpy(distStr, "? mi", sizeof(distStr)); + else + strncpy(distStr, "? km", sizeof(distStr)); + } + + // Draw compass circle + display->drawCircle(compassX, compassY, compassDiam / 2); + + // Undo color-inversion, if set prior to drawing header + // Unsure of expected behavior? For now: copy drawNodeInfo + if (config.display.displaymode == meshtastic_Config_DisplayConfig_DisplayMode_INVERTED) { + display->setColor(BLACK); + } + + // Must be after distStr is populated + screen->drawColumns(display, x, y, fields); +} +#endif diff --git a/src/modules/WaypointModule.h b/src/modules/WaypointModule.h index ddbabf4de..4c9c7b86b 100644 --- a/src/modules/WaypointModule.h +++ b/src/modules/WaypointModule.h @@ -5,21 +5,29 @@ /** * Waypoint message handling for meshtastic */ -class WaypointModule : public SinglePortModule, public Observable +class WaypointModule : public SinglePortModule, public Observable { public: /** Constructor * name is for debugging output */ WaypointModule() : SinglePortModule("waypoint", meshtastic_PortNum_WAYPOINT_APP) {} - +#if HAS_SCREEN + bool shouldDraw(); +#endif protected: /** Called to handle a particular incoming message @return ProcessMessage::STOP if you've guaranteed you've handled this message and no other handlers should be considered for it */ + + virtual Observable *getUIFrameObservable() override { return this; } +#if HAS_SCREEN + virtual bool wantUIFrame() override { return this->shouldDraw(); } + virtual void drawFrame(OLEDDisplay *display, OLEDDisplayUiState *state, int16_t x, int16_t y) override; +#endif virtual ProcessMessage handleReceived(const meshtastic_MeshPacket &mp) override; }; -extern WaypointModule *waypointModule; +extern WaypointModule *waypointModule; \ No newline at end of file diff --git a/src/modules/esp32/AudioModule.cpp b/src/modules/esp32/AudioModule.cpp index bc104df11..89e4b4e25 100644 --- a/src/modules/esp32/AudioModule.cpp +++ b/src/modules/esp32/AudioModule.cpp @@ -1,4 +1,3 @@ - #include "configuration.h" #if defined(ARCH_ESP32) && defined(USE_SX1280) #include "AudioModule.h" @@ -8,14 +7,6 @@ #include "RTC.h" #include "Router.h" -#ifdef OLED_RU -#include "graphics/fonts/OLEDDisplayFontsRU.h" -#endif - -#ifdef OLED_UA -#include "graphics/fonts/OLEDDisplayFontsUA.h" -#endif - /* AudioModule A interface to send raw codec2 audio data over the mesh network. Based on the example code from the ESP32_codec2 project. @@ -48,32 +39,7 @@ AudioModule *audioModule; #define YIELD_FROM_ISR(x) portYIELD_FROM_ISR(x) #endif -#if (defined(USE_EINK) || defined(ILI9341_DRIVER) || defined(ST7735_CS) || defined(ST7789_CS)) && \ - !defined(DISPLAY_FORCE_SMALL_FONTS) - -// The screen is bigger so use bigger fonts -#define FONT_SMALL ArialMT_Plain_16 -#define FONT_MEDIUM ArialMT_Plain_24 -#define FONT_LARGE ArialMT_Plain_24 -#else -#ifdef OLED_RU -#define FONT_SMALL ArialMT_Plain_10_RU -#else -#ifdef OLED_UA -#define FONT_SMALL ArialMT_Plain_10_UA -#else -#define FONT_SMALL ArialMT_Plain_10 -#endif -#endif -#define FONT_MEDIUM ArialMT_Plain_16 -#define FONT_LARGE ArialMT_Plain_24 -#endif - -#define fontHeight(font) ((font)[1] + 1) // height is position 1 - -#define FONT_HEIGHT_SMALL fontHeight(FONT_SMALL) -#define FONT_HEIGHT_MEDIUM fontHeight(FONT_MEDIUM) -#define FONT_HEIGHT_LARGE fontHeight(FONT_LARGE) +#include "graphics/ScreenFonts.h" void run_codec2(void *parameter) { @@ -224,13 +190,13 @@ int32_t AudioModule::runOnce() firstTime = false; } else { - UIFrameEvent e = {false, true}; + UIFrameEvent e; // Check if PTT is pressed. TODO hook that into Onebutton/Interrupt drive. if (digitalRead(moduleConfig.audio.ptt_pin ? moduleConfig.audio.ptt_pin : PTT_PIN) == HIGH) { if (radio_state == RadioState::rx) { LOG_INFO("PTT pressed, switching to TX\n"); radio_state = RadioState::tx; - e.frameChanged = true; + e.action = UIFrameEvent::Action::REGENERATE_FRAMESET; // We want to change the list of frames shown on-screen this->notifyObservers(&e); } } else { @@ -243,7 +209,7 @@ int32_t AudioModule::runOnce() } tx_encode_frame_index = sizeof(tx_header); radio_state = RadioState::rx; - e.frameChanged = true; + e.action = UIFrameEvent::Action::REGENERATE_FRAMESET; // We want to change the list of frames shown on-screen this->notifyObservers(&e); } } @@ -300,14 +266,14 @@ void AudioModule::sendPayload(NodeNum dest, bool wantReplies) p->decoded.payload.size = tx_encode_frame_index; memcpy(p->decoded.payload.bytes, tx_encode_frame, p->decoded.payload.size); - service.sendToMesh(p); + service->sendToMesh(p); } ProcessMessage AudioModule::handleReceived(const meshtastic_MeshPacket &mp) { if ((moduleConfig.audio.codec2_enabled) && (myRegion->audioPermitted)) { auto &p = mp.decoded; - if (getFrom(&mp) != nodeDB.getNodeNum()) { + if (!isFromUs(&mp)) { memcpy(rx_encode_frame, p.payload.bytes, p.payload.size); radio_state = RadioState::rx; rx_encode_frame_index = p.payload.size; diff --git a/src/modules/esp32/PaxcounterModule.cpp b/src/modules/esp32/PaxcounterModule.cpp index f3df7ffdf..71810df07 100644 --- a/src/modules/esp32/PaxcounterModule.cpp +++ b/src/modules/esp32/PaxcounterModule.cpp @@ -1,15 +1,25 @@ #include "configuration.h" -#if defined(ARCH_ESP32) +#if defined(ARCH_ESP32) && !MESHTASTIC_EXCLUDE_PAXCOUNTER +#include "Default.h" #include "MeshService.h" #include "PaxcounterModule.h" - #include PaxcounterModule *paxcounterModule; -void NullFunc(){}; - -// paxcounterModule->sendInfo(NODENUM_BROADCAST); +/** + * Callback function for libpax. + * We only clear our sent flag here, since this function is called from another thread, so we + * cannot send to the mesh directly. + */ +void PaxcounterModule::handlePaxCounterReportRequest() +{ + // The libpax library already updated our data structure, just before invoking this callback. + 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); + paxcounterModule->reportedDataSent = false; + paxcounterModule->setIntervalFromNow(0); +} PaxcounterModule::PaxcounterModule() : concurrency::OSThread("PaxcounterModule"), @@ -17,11 +27,20 @@ PaxcounterModule::PaxcounterModule() { } +/** + * Send the Pax information to the mesh if we got new data from libpax. + * This is called periodically from our runOnce() method and will actually send the data to the mesh + * if libpax updated it since the last transmission through the callback. + * @param dest - destination node (usually NODENUM_BROADCAST) + * @return false if sending is unnecessary, true if information was sent + */ bool PaxcounterModule::sendInfo(NodeNum dest) { - libpax_counter_count(&count_from_libpax); - LOG_INFO("(Sending): pax: wifi=%d; ble=%d; uptime=%d\n", count_from_libpax.wifi_count, count_from_libpax.ble_count, - millis() / 1000); + if (paxcounterModule->reportedDataSent) + return false; + + LOG_INFO("PaxcounterModule: sending pax info wifi=%d; ble=%d; uptime=%lu\n", count_from_libpax.wifi_count, + count_from_libpax.ble_count, millis() / 1000); meshtastic_Paxcount pl = meshtastic_Paxcount_init_default; pl.wifi = count_from_libpax.wifi_count; @@ -31,9 +50,12 @@ bool PaxcounterModule::sendInfo(NodeNum dest) meshtastic_MeshPacket *p = allocDataProtobuf(pl); p->to = dest; p->decoded.want_response = false; - p->priority = meshtastic_MeshPacket_Priority_MIN; + p->priority = meshtastic_MeshPacket_Priority_BACKGROUND; + + service->sendToMesh(p, RX_SRC_LOCAL, true); + + paxcounterModule->reportedDataSent = true; - service.sendToMesh(p, RX_SRC_LOCAL, true); return true; } @@ -44,10 +66,6 @@ bool PaxcounterModule::handleReceivedProtobuf(const meshtastic_MeshPacket &mp, m meshtastic_MeshPacket *PaxcounterModule::allocReply() { - if (ignoreRequest) { - return NULL; - } - meshtastic_Paxcount pl = meshtastic_Paxcount_init_default; pl.wifi = count_from_libpax.wifi_count; pl.ble = count_from_libpax.ble_count; @@ -57,34 +75,56 @@ meshtastic_MeshPacket *PaxcounterModule::allocReply() int32_t PaxcounterModule::runOnce() { - if (moduleConfig.paxcounter.enabled && !config.bluetooth.enabled && !config.network.wifi_enabled) { + if (isActive()) { if (firstTime) { firstTime = false; - LOG_DEBUG( - "Paxcounter starting up with interval of %d seconds\n", - getConfiguredOrDefault(moduleConfig.paxcounter.paxcounter_update_interval, default_broadcast_interval_secs)); + LOG_DEBUG("Paxcounter starting up with interval of %d seconds\n", + Default::getConfiguredOrDefault(moduleConfig.paxcounter.paxcounter_update_interval, + default_telemetry_broadcast_interval_secs)); struct libpax_config_t configuration; libpax_default_config(&configuration); configuration.blecounter = 1; - configuration.blescantime = 0; // infinit + configuration.blescantime = 0; // infinite configuration.wificounter = 1; configuration.wifi_channel_map = WIFI_CHANNEL_ALL; configuration.wifi_channel_switch_interval = 50; - configuration.wifi_rssi_threshold = -80; - configuration.ble_rssi_threshold = -80; + configuration.wifi_rssi_threshold = Default::getConfiguredOrDefault(moduleConfig.paxcounter.wifi_threshold, -80); + configuration.ble_rssi_threshold = Default::getConfiguredOrDefault(moduleConfig.paxcounter.ble_threshold, -80); libpax_update_config(&configuration); // internal processing initialization - libpax_counter_init(NullFunc, &count_from_libpax, UINT16_MAX, 1); + libpax_counter_init(handlePaxCounterReportRequest, &count_from_libpax, + moduleConfig.paxcounter.paxcounter_update_interval, 0); libpax_counter_start(); } else { sendInfo(NODENUM_BROADCAST); } - return getConfiguredOrDefaultMs(moduleConfig.paxcounter.paxcounter_update_interval, default_broadcast_interval_secs); + return Default::getConfiguredOrDefaultMsScaled(moduleConfig.paxcounter.paxcounter_update_interval, + default_telemetry_broadcast_interval_secs, numOnlineNodes); } else { return disable(); } } +#if HAS_SCREEN + +#include "graphics/ScreenFonts.h" + +void PaxcounterModule::drawFrame(OLEDDisplay *display, OLEDDisplayUiState *state, int16_t x, int16_t y) +{ + char buffer[50]; + display->setTextAlignment(TEXT_ALIGN_LEFT); + display->setFont(FONT_SMALL); + display->drawString(x + 0, y + 0, "PAX"); + + libpax_counter_count(&count_from_libpax); + + display->setTextAlignment(TEXT_ALIGN_CENTER); + display->setFont(FONT_SMALL); + display->drawStringf(display->getWidth() / 2 + x, 0 + y + 12, buffer, "WiFi: %d\nBLE: %d\nuptime: %ds", + count_from_libpax.wifi_count, count_from_libpax.ble_count, millis() / 1000); +} +#endif // HAS_SCREEN + #endif \ No newline at end of file diff --git a/src/modules/esp32/PaxcounterModule.h b/src/modules/esp32/PaxcounterModule.h index 0aa9be68d..ebd6e7191 100644 --- a/src/modules/esp32/PaxcounterModule.h +++ b/src/modules/esp32/PaxcounterModule.h @@ -8,11 +8,15 @@ #include /** - * A simple example module that just replies with "Message received" to any message it receives. + * Wrapper module for the estimate passenger (PAX) count library (https://github.com/dbinfrago/libpax) which + * implements the core functionality of the ESP32 Paxcounter project (https://github.com/cyberman54/ESP32-Paxcounter) */ class PaxcounterModule : private concurrency::OSThread, public ProtobufModule { bool firstTime = true; + bool reportedDataSent = true; + + static void handlePaxCounterReportRequest(); public: PaxcounterModule(); @@ -23,6 +27,11 @@ class PaxcounterModule : private concurrency::OSThread, public ProtobufModulerunOnce(); + + return MOTION_SENSOR_CHECK_INTERVAL_MS; + } + + private: + ScanI2C::FoundDevice device; + + void init() + { + if (isInitialised) + return; + + if (device.address.port == ScanI2C::I2CPort::NO_I2C || device.address.address == 0 || device.type == ScanI2C::NONE) { + LOG_DEBUG("AccelerometerThread disabling due to no sensors found\n"); + disable(); + return; + } + +#ifndef RAK_4631 + if (!config.display.wake_on_tap_or_motion && !config.device.double_tap_as_button_press) { + LOG_DEBUG("AccelerometerThread disabling due to no interested configurations\n"); + disable(); + return; + } +#endif + + switch (device.type) { + case ScanI2C::DeviceType::BMA423: + sensor = new BMA423Sensor(device); + break; + case ScanI2C::DeviceType::MPU6050: + sensor = new MPU6050Sensor(device); + break; + case ScanI2C::DeviceType::BMX160: + sensor = new BMX160Sensor(device); + break; + case ScanI2C::DeviceType::LIS3DH: + sensor = new LIS3DHSensor(device); + break; + case ScanI2C::DeviceType::LSM6DS3: + sensor = new LSM6DS3Sensor(device); + break; + case ScanI2C::DeviceType::STK8BAXX: + sensor = new STK8XXXSensor(device); + break; + case ScanI2C::DeviceType::ICM20948: + sensor = new ICM20948Sensor(device); + break; + default: + disable(); + return; + } + + isInitialised = sensor->init(); + if (!isInitialised) { + clean(); + } + LOG_DEBUG("AccelerometerThread::init %s\n", isInitialised ? "ok" : "failed"); + } + + // Copy constructor (not implemented / included to avoid cppcheck warnings) + AccelerometerThread(const AccelerometerThread &other) : OSThread::OSThread("AccelerometerThread") { this->copy(other); } + + // Destructor (included to avoid cppcheck warnings) + virtual ~AccelerometerThread() { clean(); } + + // Copy assignment (not implemented / included to avoid cppcheck warnings) + AccelerometerThread &operator=(const AccelerometerThread &other) + { + this->copy(other); + return *this; + } + + // Take a very shallow copy (does not copy OSThread state nor the sensor object) + // If for some reason this is ever used, make sure to call init() after any copy + void copy(const AccelerometerThread &other) + { + if (this != &other) { + clean(); + this->device = ScanI2C::FoundDevice(other.device.type, + ScanI2C::DeviceAddress(other.device.address.port, other.device.address.address)); + } + } + + // Cleanup resources + void clean() + { + isInitialised = false; + if (sensor != nullptr) { + delete sensor; + sensor = nullptr; + } + } +}; + +#endif + +#endif \ No newline at end of file diff --git a/src/motion/BMA423Sensor.cpp b/src/motion/BMA423Sensor.cpp new file mode 100755 index 000000000..ec07b7c40 --- /dev/null +++ b/src/motion/BMA423Sensor.cpp @@ -0,0 +1,62 @@ +#include "BMA423Sensor.h" + +#if !defined(ARCH_PORTDUINO) && !defined(ARCH_STM32WL) && !MESHTASTIC_EXCLUDE_I2C + +using namespace MotionSensorI2C; + +BMA423Sensor::BMA423Sensor(ScanI2C::FoundDevice foundDevice) : MotionSensor::MotionSensor(foundDevice) {} + +bool BMA423Sensor::init() +{ + if (sensor.begin(deviceAddress(), &MotionSensorI2C::readRegister, &MotionSensorI2C::writeRegister)) { + sensor.configAccelerometer(sensor.RANGE_2G, sensor.ODR_100HZ, sensor.BW_NORMAL_AVG4, sensor.PERF_CONTINUOUS_MODE); + sensor.enableAccelerometer(); + sensor.configInterrupt(BMA4_LEVEL_TRIGGER, BMA4_ACTIVE_HIGH, BMA4_PUSH_PULL, BMA4_OUTPUT_ENABLE, BMA4_INPUT_DISABLE); + +#ifdef BMA423_INT + pinMode(BMA4XX_INT, INPUT); + attachInterrupt( + BMA4XX_INT, + [] { + // Set interrupt to set irq value to true + BMA_IRQ = true; + }, + RISING); // Select the interrupt mode according to the actual circuit +#endif + +#ifdef T_WATCH_S3 + // Need to raise the wrist function, need to set the correct axis + sensor.setReampAxes(sensor.REMAP_TOP_LAYER_RIGHT_CORNER); +#else + sensor.setReampAxes(sensor.REMAP_BOTTOM_LAYER_BOTTOM_LEFT_CORNER); +#endif + // sensor.enableFeature(sensor.FEATURE_STEP_CNTR, true); + sensor.enableFeature(sensor.FEATURE_TILT, true); + sensor.enableFeature(sensor.FEATURE_WAKEUP, true); + // sensor.resetPedometer(); + + // Turn on feature interrupt + sensor.enablePedometerIRQ(); + sensor.enableTiltIRQ(); + + // It corresponds to isDoubleClick interrupt + sensor.enableWakeupIRQ(); + LOG_DEBUG("BMA423Sensor::init ok\n"); + return true; + } + LOG_DEBUG("BMA423Sensor::init failed\n"); + return false; +} + +int32_t BMA423Sensor::runOnce() +{ + if (sensor.readIrqStatus() != DEV_WIRE_NONE) { + if (sensor.isTilt() || sensor.isDoubleTap()) { + wakeScreen(); + return 500; + } + } + return MOTION_SENSOR_CHECK_INTERVAL_MS; +} + +#endif \ No newline at end of file diff --git a/src/motion/BMA423Sensor.h b/src/motion/BMA423Sensor.h new file mode 100755 index 000000000..0bc0ddf8c --- /dev/null +++ b/src/motion/BMA423Sensor.h @@ -0,0 +1,26 @@ +#pragma once +#ifndef _BMA423_SENSOR_H_ +#define _BMA423_SENSOR_H_ + +#include "MotionSensor.h" + +#if !defined(ARCH_PORTDUINO) && !defined(ARCH_STM32WL) && !MESHTASTIC_EXCLUDE_I2C + +#include +#include + +class BMA423Sensor : public MotionSensor +{ + private: + SensorBMA423 sensor; + volatile bool BMA_IRQ = false; + + public: + explicit BMA423Sensor(ScanI2C::FoundDevice foundDevice); + virtual bool init() override; + virtual int32_t runOnce() override; +}; + +#endif + +#endif \ No newline at end of file diff --git a/src/motion/BMX160Sensor.cpp b/src/motion/BMX160Sensor.cpp new file mode 100755 index 000000000..3f68a4a25 --- /dev/null +++ b/src/motion/BMX160Sensor.cpp @@ -0,0 +1,104 @@ +#include "BMX160Sensor.h" + +#if !defined(ARCH_PORTDUINO) && !defined(ARCH_STM32WL) && !MESHTASTIC_EXCLUDE_I2C + +BMX160Sensor::BMX160Sensor(ScanI2C::FoundDevice foundDevice) : MotionSensor::MotionSensor(foundDevice) {} + +#ifdef RAK_4631 +#if !defined(MESHTASTIC_EXCLUDE_SCREEN) + +// screen is defined in main.cpp +extern graphics::Screen *screen; +#endif + +bool BMX160Sensor::init() +{ + if (sensor.begin()) { + // set output data rate + sensor.ODR_Config(BMX160_ACCEL_ODR_100HZ, BMX160_GYRO_ODR_100HZ); + LOG_DEBUG("BMX160Sensor::init ok\n"); + return true; + } + LOG_DEBUG("BMX160Sensor::init failed\n"); + return false; +} + +int32_t BMX160Sensor::runOnce() +{ + sBmx160SensorData_t magAccel; + sBmx160SensorData_t gAccel; + + /* Get a new sensor event */ + sensor.getAllData(&magAccel, NULL, &gAccel); + +#if !defined(MESHTASTIC_EXCLUDE_SCREEN) + // experimental calibrate routine. Limited to between 10 and 30 seconds after boot + if (millis() > 12 * 1000 && millis() < 30 * 1000) { + if (!showingScreen) { + showingScreen = true; + screen->startAlert((FrameCallback)drawFrameCalibration); + } + if (magAccel.x > highestX) + highestX = magAccel.x; + if (magAccel.x < lowestX) + lowestX = magAccel.x; + if (magAccel.y > highestY) + highestY = magAccel.y; + if (magAccel.y < lowestY) + lowestY = magAccel.y; + if (magAccel.z > highestZ) + highestZ = magAccel.z; + if (magAccel.z < lowestZ) + lowestZ = magAccel.z; + } else if (showingScreen && millis() >= 30 * 1000) { + showingScreen = false; + screen->endAlert(); + } + + int highestRealX = highestX - (highestX + lowestX) / 2; + + magAccel.x -= (highestX + lowestX) / 2; + magAccel.y -= (highestY + lowestY) / 2; + magAccel.z -= (highestZ + lowestZ) / 2; + FusionVector ga, ma; + ga.axis.x = -gAccel.x; // default location for the BMX160 is on the rear of the board + ga.axis.y = -gAccel.y; + ga.axis.z = gAccel.z; + ma.axis.x = -magAccel.x; + ma.axis.y = -magAccel.y; + ma.axis.z = magAccel.z * 3; + + // If we're set to one of the inverted positions + if (config.display.compass_orientation > meshtastic_Config_DisplayConfig_CompassOrientation_DEGREES_270) { + ma = FusionAxesSwap(ma, FusionAxesAlignmentNXNYPZ); + ga = FusionAxesSwap(ga, FusionAxesAlignmentNXNYPZ); + } + + float heading = FusionCompassCalculateHeading(FusionConventionNed, ga, ma); + + switch (config.display.compass_orientation) { + case meshtastic_Config_DisplayConfig_CompassOrientation_DEGREES_0_INVERTED: + case meshtastic_Config_DisplayConfig_CompassOrientation_DEGREES_0: + break; + case meshtastic_Config_DisplayConfig_CompassOrientation_DEGREES_90: + case meshtastic_Config_DisplayConfig_CompassOrientation_DEGREES_90_INVERTED: + heading += 90; + break; + case meshtastic_Config_DisplayConfig_CompassOrientation_DEGREES_180: + case meshtastic_Config_DisplayConfig_CompassOrientation_DEGREES_180_INVERTED: + heading += 180; + break; + case meshtastic_Config_DisplayConfig_CompassOrientation_DEGREES_270: + case meshtastic_Config_DisplayConfig_CompassOrientation_DEGREES_270_INVERTED: + heading += 270; + break; + } + screen->setHeading(heading); +#endif + + return MOTION_SENSOR_CHECK_INTERVAL_MS; +} + +#endif + +#endif \ No newline at end of file diff --git a/src/motion/BMX160Sensor.h b/src/motion/BMX160Sensor.h new file mode 100755 index 000000000..26f477271 --- /dev/null +++ b/src/motion/BMX160Sensor.h @@ -0,0 +1,41 @@ +#pragma once + +#ifndef _BMX160_SENSOR_H_ +#define _BMX160_SENSOR_H_ + +#include "MotionSensor.h" + +#if !defined(ARCH_PORTDUINO) && !defined(ARCH_STM32WL) && !MESHTASTIC_EXCLUDE_I2C + +#ifdef RAK_4631 + +#include "Fusion/Fusion.h" +#include + +class BMX160Sensor : public MotionSensor +{ + private: + RAK_BMX160 sensor; + bool showingScreen = false; + float highestX = 0, lowestX = 0, highestY = 0, lowestY = 0, highestZ = 0, lowestZ = 0; + + public: + explicit BMX160Sensor(ScanI2C::FoundDevice foundDevice); + virtual bool init() override; + virtual int32_t runOnce() override; +}; + +#else + +// Stub +class BMX160Sensor : public MotionSensor +{ + public: + explicit BMX160Sensor(ScanI2C::FoundDevice foundDevice); +}; + +#endif + +#endif + +#endif \ No newline at end of file diff --git a/src/motion/ICM20948Sensor.cpp b/src/motion/ICM20948Sensor.cpp new file mode 100755 index 000000000..d16968e06 --- /dev/null +++ b/src/motion/ICM20948Sensor.cpp @@ -0,0 +1,186 @@ +#include "ICM20948Sensor.h" + +#if !defined(ARCH_PORTDUINO) && !defined(ARCH_STM32WL) && !MESHTASTIC_EXCLUDE_I2C + +// Flag when an interrupt has been detected +volatile static bool ICM20948_IRQ = false; + +// Interrupt service routine +void ICM20948SetInterrupt() +{ + ICM20948_IRQ = true; +} + +ICM20948Sensor::ICM20948Sensor(ScanI2C::FoundDevice foundDevice) : MotionSensor::MotionSensor(foundDevice) {} + +bool ICM20948Sensor::init() +{ + // Initialise the sensor + sensor = ICM20948Singleton::GetInstance(); + if (!sensor->init(device)) + return false; + + // Enable simple Wake on Motion + return sensor->setWakeOnMotion(); +} + +#ifdef ICM_20948_INT_PIN + +int32_t ICM20948Sensor::runOnce() +{ + // Wake on motion using hardware interrupts - this is the most efficient way to check for motion + if (ICM20948_IRQ) { + ICM20948_IRQ = false; + sensor->clearInterrupts(); + wakeScreen(); + } + return MOTION_SENSOR_CHECK_INTERVAL_MS; +} + +#else + +int32_t ICM20948Sensor::runOnce() +{ + // Wake on motion using polling - this is not as efficient as using hardware interrupt pin (see above) + auto status = sensor->setBank(0); + if (sensor->status != ICM_20948_Stat_Ok) { + LOG_DEBUG("ICM20948Sensor::isWakeOnMotion failed to set bank - %s\n", sensor->statusString()); + return MOTION_SENSOR_CHECK_INTERVAL_MS; + } + + ICM_20948_INT_STATUS_t int_stat; + status = sensor->read(AGB0_REG_INT_STATUS, (uint8_t *)&int_stat, sizeof(ICM_20948_INT_STATUS_t)); + if (status != ICM_20948_Stat_Ok) { + LOG_DEBUG("ICM20948Sensor::isWakeOnMotion failed to read interrupts - %s\n", sensor->statusString()); + return MOTION_SENSOR_CHECK_INTERVAL_MS; + } + + if (int_stat.WOM_INT != 0) { + // Wake up! + wakeScreen(); + } + return MOTION_SENSOR_CHECK_INTERVAL_MS; +} + +#endif + +// ---------------------------------------------------------------------- +// ICM20948Singleton +// ---------------------------------------------------------------------- + +// Get a singleton wrapper for an Sparkfun ICM_20948_I2C +ICM20948Singleton *ICM20948Singleton::GetInstance() +{ + if (pinstance == nullptr) { + pinstance = new ICM20948Singleton(); + } + return pinstance; +} + +ICM20948Singleton::ICM20948Singleton() {} + +ICM20948Singleton::~ICM20948Singleton() {} + +ICM20948Singleton *ICM20948Singleton::pinstance{nullptr}; + +// Initialise the ICM20948 Sensor +bool ICM20948Singleton::init(ScanI2C::FoundDevice device) +{ +#ifdef ICM_20948_DEBUG + // Set ICM_20948_DEBUG to enable helpful debug messages on Serial + enableDebugging(); +#endif + +// startup +#ifdef Wire1 + ICM_20948_Status_e status = + begin(device.address.port == ScanI2C::I2CPort::WIRE1 ? Wire1 : Wire, device.address.address == ICM20948_ADDR ? 1 : 0); +#else + ICM_20948_Status_e status = begin(Wire, device.address.address == ICM20948_ADDR ? 1 : 0); +#endif + if (status != ICM_20948_Stat_Ok) { + LOG_DEBUG("ICM20948Sensor::init begin - %s\n", statusString()); + return false; + } + + // SW reset to make sure the device starts in a known state + if (swReset() != ICM_20948_Stat_Ok) { + LOG_DEBUG("ICM20948Sensor::init reset - %s\n", statusString()); + return false; + } + delay(200); + + // Now wake the sensor up + if (sleep(false) != ICM_20948_Stat_Ok) { + LOG_DEBUG("ICM20948Sensor::init wake - %s\n", statusString()); + return false; + } + + if (lowPower(false) != ICM_20948_Stat_Ok) { + LOG_DEBUG("ICM20948Sensor::init high power - %s\n", statusString()); + return false; + } + +#ifdef ICM_20948_INT_PIN + + // Active low + cfgIntActiveLow(true); + LOG_DEBUG("ICM20948Sensor::init set cfgIntActiveLow - %s\n", statusString()); + + // Push-pull + cfgIntOpenDrain(false); + LOG_DEBUG("ICM20948Sensor::init set cfgIntOpenDrain - %s\n", statusString()); + + // If enabled, *ANY* read will clear the INT_STATUS register. + cfgIntAnyReadToClear(true); + LOG_DEBUG("ICM20948Sensor::init set cfgIntAnyReadToClear - %s\n", statusString()); + + // Latch the interrupt until cleared + cfgIntLatch(true); + LOG_DEBUG("ICM20948Sensor::init set cfgIntLatch - %s\n", statusString()); + + // Set up an interrupt pin with an internal pullup for active low + pinMode(ICM_20948_INT_PIN, INPUT_PULLUP); + + // Set up an interrupt service routine + attachInterrupt(ICM_20948_INT_PIN, ICM20948SetInterrupt, FALLING); + +#endif + return true; +} + +#ifdef ICM_20948_DMP_IS_ENABLED + +// Stub +bool ICM20948Sensor::initDMP() +{ + return false; +} + +#endif + +bool ICM20948Singleton::setWakeOnMotion() +{ + // Set WoM threshold in milli G's + auto status = WOMThreshold(ICM_20948_WOM_THRESHOLD); + if (status != ICM_20948_Stat_Ok) + return false; + + // Enable WoM Logic mode 1 = Compare the current sample with the previous sample + status = WOMLogic(true, 1); + LOG_DEBUG("ICM20948Sensor::init set WOMLogic - %s\n", statusString()); + if (status != ICM_20948_Stat_Ok) + return false; + + // Enable interrupts on WakeOnMotion + status = intEnableWOM(true); + LOG_DEBUG("ICM20948Sensor::init set intEnableWOM - %s\n", statusString()); + return status == ICM_20948_Stat_Ok; + + // Clear any current interrupts + ICM20948_IRQ = false; + clearInterrupts(); + return true; +} + +#endif \ No newline at end of file diff --git a/src/motion/ICM20948Sensor.h b/src/motion/ICM20948Sensor.h new file mode 100755 index 000000000..d5e246c8d --- /dev/null +++ b/src/motion/ICM20948Sensor.h @@ -0,0 +1,96 @@ +#pragma once +#ifndef _ICM_20948_SENSOR_H_ +#define _ICM_20948_SENSOR_H_ + +#include "MotionSensor.h" + +#if !defined(ARCH_PORTDUINO) && !defined(ARCH_STM32WL) && !MESHTASTIC_EXCLUDE_I2C + +#include + +// Set the default gyro scale - dps250, dps500, dps1000, dps2000 +#ifndef ICM_20948_MPU_GYRO_SCALE +#define ICM_20948_MPU_GYRO_SCALE dps250 +#endif + +// Set the default accelerometer scale - gpm2, gpm4, gpm8, gpm16 +#ifndef ICM_20948_MPU_ACCEL_SCALE +#define ICM_20948_MPU_ACCEL_SCALE gpm2 +#endif + +// Define a threshold for Wake on Motion Sensing (0mg to 1020mg) +#ifndef ICM_20948_WOM_THRESHOLD +#define ICM_20948_WOM_THRESHOLD 16U +#endif + +// Define a pin in variant.h to use interrupts to read the ICM-20948 +#ifndef ICM_20948_WOM_THRESHOLD +#define ICM_20948_INT_PIN 255 +#endif + +// Uncomment this line to enable helpful debug messages on Serial +// #define ICM_20948_DEBUG 1 + +// Uncomment this line to enable the onboard digital motion processor (to be added in a future PR) +// #define ICM_20948_DMP_IS_ENABLED 1 + +// Check for a mandatory compiler flag to use the DMP (to be added in a future PR) +#ifdef ICM_20948_DMP_IS_ENABLED +#ifndef ICM_20948_USE_DMP +#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 +#endif +#endif + +// The I2C address of the Accelerometer (if found) from main.cpp +extern ScanI2C::DeviceAddress accelerometer_found; + +// Singleton wrapper for the Sparkfun ICM_20948_I2C class +class ICM20948Singleton : public ICM_20948_I2C +{ + private: + static ICM20948Singleton *pinstance; + + protected: + ICM20948Singleton(); + ~ICM20948Singleton(); + + public: + // Create a singleton instance (not thread safe) + static ICM20948Singleton *GetInstance(); + + // Singletons should not be cloneable. + ICM20948Singleton(ICM20948Singleton &other) = delete; + + // Singletons should not be assignable. + void operator=(const ICM20948Singleton &) = delete; + + // Initialise the motion sensor singleton for normal operation + bool init(ScanI2C::FoundDevice device); + + // Enable Wake on Motion interrupts (sensor must be initialised first) + bool setWakeOnMotion(); + +#ifdef ICM_20948_DMP_IS_ENABLED + // Initialise the motion sensor singleton for digital motion processing + bool initDMP(); +#endif +}; + +class ICM20948Sensor : public MotionSensor +{ + private: + ICM20948Singleton *sensor = nullptr; + + public: + explicit ICM20948Sensor(ScanI2C::FoundDevice foundDevice); + + // Initialise the motion sensor + virtual bool init() override; + + // Called each time our sensor gets a chance to run + virtual int32_t runOnce() override; +}; + +#endif + +#endif \ No newline at end of file diff --git a/src/motion/LIS3DHSensor.cpp b/src/motion/LIS3DHSensor.cpp new file mode 100755 index 000000000..e2df60b1c --- /dev/null +++ b/src/motion/LIS3DHSensor.cpp @@ -0,0 +1,36 @@ +#include "LIS3DHSensor.h" + +#if !defined(ARCH_PORTDUINO) && !defined(ARCH_STM32WL) && !MESHTASTIC_EXCLUDE_I2C + +LIS3DHSensor::LIS3DHSensor(ScanI2C::FoundDevice foundDevice) : MotionSensor::MotionSensor(foundDevice) {} + +bool LIS3DHSensor::init() +{ + if (sensor.begin(deviceAddress())) { + sensor.setRange(LIS3DH_RANGE_2_G); + // Adjust threshold, higher numbers are less sensitive + sensor.setClick(config.device.double_tap_as_button_press ? 2 : 1, MOTION_SENSOR_CHECK_INTERVAL_MS); + LOG_DEBUG("LIS3DHSensor::init ok\n"); + return true; + } + LOG_DEBUG("LIS3DHSensor::init failed\n"); + return false; +} + +int32_t LIS3DHSensor::runOnce() +{ + if (sensor.getClick() > 0) { + uint8_t click = sensor.getClick(); + if (!config.device.double_tap_as_button_press) { + wakeScreen(); + } + + if (config.device.double_tap_as_button_press && (click & 0x20)) { + buttonPress(); + return 500; + } + } + return MOTION_SENSOR_CHECK_INTERVAL_MS; +} + +#endif \ No newline at end of file diff --git a/src/motion/LIS3DHSensor.h b/src/motion/LIS3DHSensor.h new file mode 100755 index 000000000..603d195a8 --- /dev/null +++ b/src/motion/LIS3DHSensor.h @@ -0,0 +1,24 @@ +#pragma once +#ifndef _LIS3DH_SENSOR_H_ +#define _LIS3DH_SENSOR_H_ + +#include "MotionSensor.h" + +#if !defined(ARCH_PORTDUINO) && !defined(ARCH_STM32WL) && !MESHTASTIC_EXCLUDE_I2C + +#include + +class LIS3DHSensor : public MotionSensor +{ + private: + Adafruit_LIS3DH sensor; + + public: + explicit LIS3DHSensor(ScanI2C::FoundDevice foundDevice); + virtual bool init() override; + virtual int32_t runOnce() override; +}; + +#endif + +#endif \ No newline at end of file diff --git a/src/motion/LSM6DS3Sensor.cpp b/src/motion/LSM6DS3Sensor.cpp new file mode 100755 index 000000000..64ef9a23b --- /dev/null +++ b/src/motion/LSM6DS3Sensor.cpp @@ -0,0 +1,33 @@ +#include "LSM6DS3Sensor.h" + +#if !defined(ARCH_PORTDUINO) && !defined(ARCH_STM32WL) && !MESHTASTIC_EXCLUDE_I2C + +LSM6DS3Sensor::LSM6DS3Sensor(ScanI2C::FoundDevice foundDevice) : MotionSensor::MotionSensor(foundDevice) {} + +bool LSM6DS3Sensor::init() +{ + if (sensor.begin_I2C(deviceAddress())) { + + // Default threshold of 2G, less sensitive options are 4, 8 or 16G + sensor.setAccelRange(LSM6DS_ACCEL_RANGE_2_G); + + // Duration is number of occurances needed to trigger, higher threshold is less sensitive + sensor.enableWakeup(config.display.wake_on_tap_or_motion, 1, LSM6DS3_WAKE_THRESH); + + LOG_DEBUG("LSM6DS3Sensor::init ok\n"); + return true; + } + LOG_DEBUG("LSM6DS3Sensor::init failed\n"); + return false; +} + +int32_t LSM6DS3Sensor::runOnce() +{ + if (sensor.shake()) { + wakeScreen(); + return 500; + } + return MOTION_SENSOR_CHECK_INTERVAL_MS; +} + +#endif \ No newline at end of file diff --git a/src/motion/LSM6DS3Sensor.h b/src/motion/LSM6DS3Sensor.h new file mode 100755 index 000000000..77069ef3c --- /dev/null +++ b/src/motion/LSM6DS3Sensor.h @@ -0,0 +1,28 @@ +#pragma once +#ifndef _LSM6DS3_SENSOR_H_ +#define _LSM6DS3_SENSOR_H_ + +#include "MotionSensor.h" + +#if !defined(ARCH_PORTDUINO) && !defined(ARCH_STM32WL) && !MESHTASTIC_EXCLUDE_I2C + +#ifndef LSM6DS3_WAKE_THRESH +#define LSM6DS3_WAKE_THRESH 20 +#endif + +#include + +class LSM6DS3Sensor : public MotionSensor +{ + private: + Adafruit_LSM6DS3TRC sensor; + + public: + explicit LSM6DS3Sensor(ScanI2C::FoundDevice foundDevice); + virtual bool init() override; + virtual int32_t runOnce() override; +}; + +#endif + +#endif \ No newline at end of file diff --git a/src/motion/MPU6050Sensor.cpp b/src/motion/MPU6050Sensor.cpp new file mode 100755 index 000000000..77aaca46d --- /dev/null +++ b/src/motion/MPU6050Sensor.cpp @@ -0,0 +1,31 @@ +#include "MPU6050Sensor.h" + +#if !defined(ARCH_PORTDUINO) && !defined(ARCH_STM32WL) && !MESHTASTIC_EXCLUDE_I2C + +MPU6050Sensor::MPU6050Sensor(ScanI2C::FoundDevice foundDevice) : MotionSensor::MotionSensor(foundDevice) {} + +bool MPU6050Sensor::init() +{ + if (sensor.begin(deviceAddress())) { + // setup motion detection + sensor.setHighPassFilter(MPU6050_HIGHPASS_0_63_HZ); + sensor.setMotionDetectionThreshold(1); + sensor.setMotionDetectionDuration(20); + sensor.setInterruptPinLatch(true); // Keep it latched. Will turn off when reinitialized. + sensor.setInterruptPinPolarity(true); + LOG_DEBUG("MPU6050Sensor::init ok\n"); + return true; + } + LOG_DEBUG("MPU6050Sensor::init failed\n"); + return false; +} + +int32_t MPU6050Sensor::runOnce() +{ + if (sensor.getMotionInterruptStatus()) { + wakeScreen(); + } + return MOTION_SENSOR_CHECK_INTERVAL_MS; +} + +#endif \ No newline at end of file diff --git a/src/motion/MPU6050Sensor.h b/src/motion/MPU6050Sensor.h new file mode 100755 index 000000000..2e6eafecd --- /dev/null +++ b/src/motion/MPU6050Sensor.h @@ -0,0 +1,24 @@ +#pragma once +#ifndef _MPU6050_SENSOR_H_ +#define _MPU6050_SENSOR_H_ + +#include "MotionSensor.h" + +#if !defined(ARCH_PORTDUINO) && !defined(ARCH_STM32WL) && !MESHTASTIC_EXCLUDE_I2C + +#include + +class MPU6050Sensor : public MotionSensor +{ + private: + Adafruit_MPU6050 sensor; + + public: + explicit MPU6050Sensor(ScanI2C::FoundDevice foundDevice); + virtual bool init() override; + virtual int32_t runOnce() override; +}; + +#endif + +#endif \ No newline at end of file diff --git a/src/motion/MotionSensor.cpp b/src/motion/MotionSensor.cpp new file mode 100755 index 000000000..f1c0ba85e --- /dev/null +++ b/src/motion/MotionSensor.cpp @@ -0,0 +1,79 @@ +#include "MotionSensor.h" + +#if !defined(ARCH_PORTDUINO) && !defined(ARCH_STM32WL) && !MESHTASTIC_EXCLUDE_I2C + +// screen is defined in main.cpp +extern graphics::Screen *screen; + +MotionSensor::MotionSensor(ScanI2C::FoundDevice foundDevice) +{ + device.address.address = foundDevice.address.address; + device.address.port = foundDevice.address.port; + device.type = foundDevice.type; + LOG_DEBUG("MotionSensor::MotionSensor port: %s address: 0x%x type: %d\n", + devicePort() == ScanI2C::I2CPort::WIRE1 ? "Wire1" : "Wire", (uint8_t)deviceAddress(), deviceType()); +} + +ScanI2C::DeviceType MotionSensor::deviceType() +{ + return device.type; +} + +uint8_t MotionSensor::deviceAddress() +{ + return device.address.address; +} + +ScanI2C::I2CPort MotionSensor::devicePort() +{ + return device.address.port; +} + +#if defined(RAK_4631) & !MESHTASTIC_EXCLUDE_SCREEN +void MotionSensor::drawFrameCalibration(OLEDDisplay *display, OLEDDisplayUiState *state, int16_t x, int16_t y) +{ + // int x_offset = display->width() / 2; + // int y_offset = display->height() <= 80 ? 0 : 32; + display->setTextAlignment(TEXT_ALIGN_LEFT); + display->setFont(FONT_MEDIUM); + display->drawString(x, y, "Calibrating\nCompass"); + int16_t compassX = 0, compassY = 0; + uint16_t compassDiam = graphics::Screen::getCompassDiam(display->getWidth(), display->getHeight()); + + // coordinates for the center of the compass/circle + if (config.display.displaymode == meshtastic_Config_DisplayConfig_DisplayMode_DEFAULT) { + compassX = x + display->getWidth() - compassDiam / 2 - 5; + compassY = y + display->getHeight() / 2; + } else { + compassX = x + display->getWidth() - compassDiam / 2 - 5; + compassY = y + FONT_HEIGHT_SMALL + (display->getHeight() - FONT_HEIGHT_SMALL) / 2; + } + display->drawCircle(compassX, compassY, compassDiam / 2); + screen->drawCompassNorth(display, compassX, compassY, screen->getHeading() * PI / 180); +} +#endif + +#if !MESHTASTIC_EXCLUDE_POWER_FSM +void MotionSensor::wakeScreen() +{ + if (powerFSM.getState() == &stateDARK) { + LOG_DEBUG("MotionSensor::wakeScreen detected\n"); + powerFSM.trigger(EVENT_INPUT); + } +} + +void MotionSensor::buttonPress() +{ + LOG_DEBUG("MotionSensor::buttonPress detected\n"); + powerFSM.trigger(EVENT_PRESS); +} + +#else + +void MotionSensor::wakeScreen() {} + +void MotionSensor::buttonPress() {} + +#endif + +#endif \ No newline at end of file diff --git a/src/motion/MotionSensor.h b/src/motion/MotionSensor.h new file mode 100755 index 000000000..4da23cc70 --- /dev/null +++ b/src/motion/MotionSensor.h @@ -0,0 +1,85 @@ +#pragma once +#ifndef _MOTION_SENSOR_H_ +#define _MOTION_SENSOR_H_ + +#define MOTION_SENSOR_CHECK_INTERVAL_MS 100 +#define MOTION_SENSOR_CLICK_THRESHOLD 40 + +#include "../configuration.h" + +#if !defined(ARCH_PORTDUINO) && !defined(ARCH_STM32WL) && !MESHTASTIC_EXCLUDE_I2C + +#include "../PowerFSM.h" +#include "../detect/ScanI2C.h" +#include "../graphics/Screen.h" +#include "../graphics/ScreenFonts.h" +#include "../power.h" + +// Base class for motion processing +class MotionSensor +{ + public: + explicit MotionSensor(ScanI2C::FoundDevice foundDevice); + virtual ~MotionSensor(){}; + + // Get the device type + ScanI2C::DeviceType deviceType(); + + // Get the device address + uint8_t deviceAddress(); + + // Get the device port + ScanI2C::I2CPort devicePort(); + + // Initialise the motion sensor + inline virtual bool init() { return false; }; + + // The method that will be called each time our sensor gets a chance to run + // Returns the desired period for next invocation (or RUN_SAME for no change) + // Refer to /src/concurrency/OSThread.h for more information + inline virtual int32_t runOnce() { return MOTION_SENSOR_CHECK_INTERVAL_MS; }; + + protected: + // Turn on the screen when a tap or motion is detected + virtual void wakeScreen(); + + // Register a button press when a double-tap is detected + virtual void buttonPress(); + +#if defined(RAK_4631) & !MESHTASTIC_EXCLUDE_SCREEN + // draw an OLED frame (currently only used by the RAK4631 BMX160 sensor) + static void drawFrameCalibration(OLEDDisplay *display, OLEDDisplayUiState *state, int16_t x, int16_t y); +#endif + + ScanI2C::FoundDevice device; +}; + +namespace MotionSensorI2C +{ + +static inline int readRegister(uint8_t address, uint8_t reg, uint8_t *data, uint8_t len) +{ + Wire.beginTransmission(address); + Wire.write(reg); + Wire.endTransmission(); + Wire.requestFrom((uint8_t)address, (uint8_t)len); + uint8_t i = 0; + while (Wire.available()) { + data[i++] = Wire.read(); + } + return 0; // Pass +} + +static inline int writeRegister(uint8_t address, uint8_t reg, uint8_t *data, uint8_t len) +{ + Wire.beginTransmission(address); + Wire.write(reg); + Wire.write(data, len); + return (0 != Wire.endTransmission()); +} + +} // namespace MotionSensorI2C + +#endif + +#endif \ No newline at end of file diff --git a/src/motion/STK8XXXSensor.cpp b/src/motion/STK8XXXSensor.cpp new file mode 100755 index 000000000..d4d69ef99 --- /dev/null +++ b/src/motion/STK8XXXSensor.cpp @@ -0,0 +1,40 @@ +#include "STK8XXXSensor.h" + +#if !defined(ARCH_PORTDUINO) && !defined(ARCH_STM32WL) && !MESHTASTIC_EXCLUDE_I2C + +STK8XXXSensor::STK8XXXSensor(ScanI2C::FoundDevice foundDevice) : MotionSensor::MotionSensor(foundDevice) {} + +#ifdef STK8XXX_INT + +volatile static bool STK_IRQ; + +bool STK8XXXSensor::init() +{ + if (sensor.STK8xxx_Initialization(STK8xxx_VAL_RANGE_2G)) { + STK_IRQ = false; + sensor.STK8xxx_Anymotion_init(); + pinMode(STK8XXX_INT, INPUT_PULLUP); + attachInterrupt( + digitalPinToInterrupt(STK8XXX_INT), [] { STK_IRQ = true; }, RISING); + + LOG_DEBUG("STK8XXXSensor::init ok\n"); + return true; + } + LOG_DEBUG("STK8XXXSensor::init failed\n"); + return false; +} + +int32_t STK8XXXSensor::runOnce() +{ + if (STK_IRQ) { + STK_IRQ = false; + if (config.display.wake_on_tap_or_motion) { + wakeScreen(); + } + } + return MOTION_SENSOR_CHECK_INTERVAL_MS; +} + +#endif + +#endif \ No newline at end of file diff --git a/src/motion/STK8XXXSensor.h b/src/motion/STK8XXXSensor.h new file mode 100755 index 000000000..190b916b4 --- /dev/null +++ b/src/motion/STK8XXXSensor.h @@ -0,0 +1,37 @@ +#pragma once +#ifndef _STK8XXX_SENSOR_H_ +#define _STK8XXX_SENSOR_H_ + +#include "MotionSensor.h" + +#if !defined(ARCH_PORTDUINO) && !defined(ARCH_STM32WL) && !MESHTASTIC_EXCLUDE_I2C + +#ifdef STK8XXX_INT + +#include + +class STK8XXXSensor : public MotionSensor +{ + private: + STK8xxx sensor; + + public: + explicit STK8XXXSensor(ScanI2C::FoundDevice foundDevice); + virtual bool init() override; + virtual int32_t runOnce() override; +}; + +#else + +// Stub +class STK8XXXSensor : public MotionSensor +{ + public: + explicit STK8XXXSensor(ScanI2C::FoundDevice foundDevice); +}; + +#endif + +#endif + +#endif \ No newline at end of file diff --git a/src/mqtt/MQTT.cpp b/src/mqtt/MQTT.cpp index 8c241a302..c0399af38 100644 --- a/src/mqtt/MQTT.cpp +++ b/src/mqtt/MQTT.cpp @@ -2,6 +2,7 @@ #include "MeshService.h" #include "NodeDB.h" #include "PowerFSM.h" +#include "configuration.h" #include "main.h" #include "mesh/Channels.h" #include "mesh/Router.h" @@ -17,6 +18,10 @@ #include "mesh/wifi/WiFiAPClient.h" #include #endif +#include "Default.h" +#include "serialization/JSON.h" +#include "serialization/MeshPacketSerializer.h" +#include #include const int reconnectMax = 5; @@ -27,6 +32,9 @@ static MemoryDynamic staticMqttPool; Allocator &mqttPool = staticMqttPool; +// FIXME - this size calculation is super sloppy, but it will go away once we dynamically alloc meshpackets +static uint8_t bytes[meshtastic_MqttClientProxyMessage_size + 30]; // 12 for channel name and 16 for nodeid + void MQTT::mqttCallback(char *topic, byte *payload, unsigned int length) { mqtt->onReceive(topic, payload, length); @@ -52,9 +60,9 @@ void MQTT::onReceive(char *topic, byte *payload, size_t length) JSONObject json; json = json_value->AsObject(); - // parse the channel name from the topic string by looking for "json/" - const char *jsonSlash = "json/"; - char *ptr = strstr(topic, jsonSlash) + sizeof(jsonSlash) + 1; // set pointer to after "json/" + // parse the channel name from the topic string + // the topic has been checked above for having jsonTopic prefix, so just move past it + char *ptr = topic + jsonTopic.length(); ptr = strtok(ptr, "/") ? strtok(ptr, "/") : ptr; // if another "/" was added, parse string up to that character meshtastic_Channel sendChannel = channels.getByName(ptr); // We allow downlink JSON packets only on a channel named "mqtt" @@ -74,11 +82,12 @@ void MQTT::onReceive(char *topic, byte *payload, size_t length) p->channel = json["channel"]->AsNumber(); if (json.find("to") != json.end() && json["to"]->IsNumber()) p->to = json["to"]->AsNumber(); + if (json.find("hopLimit") != json.end() && json["hopLimit"]->IsNumber()) + p->hop_limit = json["hopLimit"]->AsNumber(); if (jsonPayloadStr.length() <= sizeof(p->decoded.payload.bytes)) { memcpy(p->decoded.payload.bytes, jsonPayloadStr.c_str(), jsonPayloadStr.length()); p->decoded.payload.size = jsonPayloadStr.length(); - meshtastic_MeshPacket *packet = packetPool.allocCopy(*p); - service.sendToMesh(packet, RX_SRC_LOCAL); + service->sendToMesh(p, RX_SRC_LOCAL); } else { LOG_WARN("Received MQTT json payload too long, dropping\n"); } @@ -104,10 +113,12 @@ void MQTT::onReceive(char *topic, byte *payload, size_t length) p->channel = json["channel"]->AsNumber(); if (json.find("to") != json.end() && json["to"]->IsNumber()) p->to = json["to"]->AsNumber(); + if (json.find("hopLimit") != json.end() && json["hopLimit"]->IsNumber()) + p->hop_limit = json["hopLimit"]->AsNumber(); p->decoded.payload.size = pb_encode_to_bytes(p->decoded.payload.bytes, sizeof(p->decoded.payload.bytes), &meshtastic_Position_msg, &pos); // make the Data protobuf from position - service.sendToMesh(p, RX_SRC_LOCAL); + service->sendToMesh(p, RX_SRC_LOCAL); } else { LOG_DEBUG("JSON Ignoring downlink message with unsupported type.\n"); } @@ -130,28 +141,56 @@ void MQTT::onReceive(char *topic, byte *payload, size_t length) LOG_ERROR("Invalid MQTT service envelope, topic %s, len %u!\n", topic, length); return; } else { + if (e.channel_id == NULL || e.gateway_id == NULL) { + LOG_ERROR("Invalid MQTT service envelope, topic %s, len %u!\n", topic, length); + return; + } meshtastic_Channel ch = channels.getByName(e.channel_id); if (strcmp(e.gateway_id, owner.id) == 0) { // Generate an implicit ACK towards ourselves (handled and processed only locally!) for this message. // We do this because packets are not rebroadcasted back into MQTT anymore and we assume that at least one node // receives it when we get our own packet back. Then we'll stop our retransmissions. - if (e.packet && getFrom(e.packet) == nodeDB.getNodeNum()) + if (e.packet && isFromUs(e.packet)) routingModule->sendAckNak(meshtastic_Routing_Error_NONE, getFrom(e.packet), e.packet->id, ch.index); else LOG_INFO("Ignoring downlink message we originally sent.\n"); } else { // Find channel by channel_id and check downlink_enabled - if (strcmp(e.channel_id, channels.getGlobalId(ch.index)) == 0 && e.packet && ch.settings.downlink_enabled) { + if ((strcmp(e.channel_id, "PKI") == 0 && e.packet) || + (strcmp(e.channel_id, channels.getGlobalId(ch.index)) == 0 && e.packet && ch.settings.downlink_enabled)) { LOG_INFO("Received MQTT topic %s, len=%u\n", topic, length); meshtastic_MeshPacket *p = packetPool.allocCopy(*e.packet); p->via_mqtt = true; // Mark that the packet was received via MQTT + if (isFromUs(p)) { + LOG_INFO("Ignoring downlink message we originally sent.\n"); + packetPool.release(p); + return; + } if (p->which_payload_variant == meshtastic_MeshPacket_decoded_tag) { + if (moduleConfig.mqtt.encryption_enabled) { + LOG_INFO("Ignoring decoded message on MQTT, encryption is enabled.\n"); + packetPool.release(p); + return; + } + if (p->decoded.portnum == meshtastic_PortNum_ADMIN_APP) { + LOG_INFO("Ignoring decoded admin packet.\n"); + packetPool.release(p); + return; + } p->channel = ch.index; } - // ignore messages if we don't have the channel key - if (router && perhapsDecode(p)) + // PKI messages get accepted even if we can't decrypt + if (router && p->which_payload_variant == meshtastic_MeshPacket_encrypted_tag && + strcmp(e.channel_id, "PKI") == 0) { + const meshtastic_NodeInfoLite *tx = nodeDB->getMeshNode(getFrom(p)); + const meshtastic_NodeInfoLite *rx = nodeDB->getMeshNode(p->to); + // Only accept PKI messages to us, or if we have both the sender and receiver in our nodeDB, as then it's + // likely they discovered each other via a channel we have downlink enabled for + if (isToUs(p) || (tx && tx->has_user && rx && rx->has_user)) + router->enqueueReceivedMessage(p); + } else if (router && perhapsDecode(p)) // ignore messages if we don't have the channel key router->enqueueReceivedMessage(p); else packetPool.release(p); @@ -170,7 +209,7 @@ void mqttInit() new MQTT(); } -#ifdef HAS_NETWORKING +#if HAS_NETWORKING MQTT::MQTT() : concurrency::OSThread("mqtt"), pubSub(mqttClient), mqttQueue(MAX_MQTT_QUEUE) #else MQTT::MQTT() : concurrency::OSThread("mqtt"), mqttQueue(MAX_MQTT_QUEUE) @@ -183,16 +222,23 @@ MQTT::MQTT() : concurrency::OSThread("mqtt"), mqttQueue(MAX_MQTT_QUEUE) mqtt = this; if (*moduleConfig.mqtt.root) { - statusTopic = moduleConfig.mqtt.root + statusTopic; cryptTopic = moduleConfig.mqtt.root + cryptTopic; jsonTopic = moduleConfig.mqtt.root + jsonTopic; + mapTopic = moduleConfig.mqtt.root + mapTopic; } else { - statusTopic = "msh" + statusTopic; cryptTopic = "msh" + cryptTopic; jsonTopic = "msh" + jsonTopic; + mapTopic = "msh" + mapTopic; } -#ifdef HAS_NETWORKING + if (moduleConfig.mqtt.map_reporting_enabled && moduleConfig.mqtt.has_map_report_settings) { + map_position_precision = Default::getConfiguredOrDefault(moduleConfig.mqtt.map_report_settings.position_precision, + default_map_position_precision); + map_publish_interval_msecs = Default::getConfiguredOrDefaultMs( + moduleConfig.mqtt.map_report_settings.publish_interval_secs, default_map_publish_interval_secs); + } + +#if HAS_NETWORKING if (!moduleConfig.mqtt.proxy_to_client_enabled) pubSub.setCallback(mqttCallback); #endif @@ -202,7 +248,7 @@ MQTT::MQTT() : concurrency::OSThread("mqtt"), mqttQueue(MAX_MQTT_QUEUE) enabled = true; runASAP = true; reconnectCount = 0; - publishStatus(); + publishNodeInfo(); } // preflightSleepObserver.observe(&preflightSleep); } else { @@ -212,7 +258,7 @@ MQTT::MQTT() : concurrency::OSThread("mqtt"), mqttQueue(MAX_MQTT_QUEUE) bool MQTT::isConnectedDirectly() { -#ifdef HAS_NETWORKING +#if HAS_NETWORKING return pubSub.connected(); #else return false; @@ -227,10 +273,10 @@ bool MQTT::publish(const char *topic, const char *payload, bool retained) strcpy(msg->topic, topic); strcpy(msg->payload_variant.text, payload); msg->retained = retained; - service.sendMqttMessageToClientProxy(msg); + service->sendMqttMessageToClientProxy(msg); return true; } -#ifdef HAS_NETWORKING +#if HAS_NETWORKING else if (isConnectedDirectly()) { return pubSub.publish(topic, payload, retained); } @@ -247,10 +293,10 @@ bool MQTT::publish(const char *topic, const uint8_t *payload, size_t length, boo msg->payload_variant.data.size = length; memcpy(msg->payload_variant.data.bytes, payload, length); msg->retained = retained; - service.sendMqttMessageToClientProxy(msg); + service->sendMqttMessageToClientProxy(msg); return true; } -#ifdef HAS_NETWORKING +#if HAS_NETWORKING else if (isConnectedDirectly()) { return pubSub.publish(topic, payload, length, retained); } @@ -267,10 +313,10 @@ void MQTT::reconnect() runASAP = true; reconnectCount = 0; - publishStatus(); + publishNodeInfo(); return; // Don't try to connect directly to the server } -#ifdef HAS_NETWORKING +#if HAS_NETWORKING // Defaults int serverPort = 1883; const char *serverAddr = default_mqtt_address; @@ -283,6 +329,7 @@ void MQTT::reconnect() mqttPassword = moduleConfig.mqtt.password; } #if HAS_WIFI && !defined(ARCH_PORTDUINO) +#if !defined(CONFIG_IDF_TARGET_ESP32C6) && !defined(RPI_PICO) if (moduleConfig.mqtt.tls_enabled) { // change default for encrypted to 8883 try { @@ -298,6 +345,9 @@ void MQTT::reconnect() LOG_INFO("Using non-TLS-encrypted session\n"); pubSub.setClient(mqttClient); } +#else + pubSub.setClient(mqttClient); +#endif #elif HAS_NETWORKING pubSub.setClient(mqttClient); #endif @@ -316,15 +366,14 @@ void MQTT::reconnect() LOG_INFO("Attempting to connect directly to MQTT server %s, port: %d, username: %s, password: %s\n", serverAddr, serverPort, mqttUsername, mqttPassword); - auto myStatus = (statusTopic + owner.id); - bool connected = pubSub.connect(owner.id, mqttUsername, mqttPassword, myStatus.c_str(), 1, true, "offline"); + bool connected = pubSub.connect(owner.id, mqttUsername, mqttPassword); if (connected) { LOG_INFO("MQTT connected\n"); enabled = true; // Start running background process again runASAP = true; reconnectCount = 0; - publishStatus(); + publishNodeInfo(); sendSubscriptions(); } else { #if HAS_WIFI && !defined(ARCH_PORTDUINO) @@ -343,64 +392,69 @@ void MQTT::reconnect() void MQTT::sendSubscriptions() { -#ifdef HAS_NETWORKING +#if HAS_NETWORKING + bool hasDownlink = false; size_t numChan = channels.getNumChannels(); for (size_t i = 0; i < numChan; i++) { const auto &ch = channels.getByIndex(i); if (ch.settings.downlink_enabled) { - std::string topic = cryptTopic + channels.getGlobalId(i) + "/#"; + hasDownlink = true; + std::string topic = cryptTopic + channels.getGlobalId(i) + "/+"; LOG_INFO("Subscribing to %s\n", topic.c_str()); pubSub.subscribe(topic.c_str(), 1); // FIXME, is QOS 1 right? +#if !defined(ARCH_NRF52) || \ + defined(NRF52_USE_JSON) // JSON is not supported on nRF52, see issue #2804 ### Fixed by using ArduinoJSON ### if (moduleConfig.mqtt.json_enabled == true) { - std::string topicDecoded = jsonTopic + channels.getGlobalId(i) + "/#"; + std::string topicDecoded = jsonTopic + channels.getGlobalId(i) + "/+"; LOG_INFO("Subscribing to %s\n", topicDecoded.c_str()); pubSub.subscribe(topicDecoded.c_str(), 1); // FIXME, is QOS 1 right? } +#endif // ARCH_NRF52 NRF52_USE_JSON } } +#if !MESHTASTIC_EXCLUDE_PKI + if (hasDownlink) { + std::string topic = cryptTopic + "PKI/+"; + LOG_INFO("Subscribing to %s\n", topic.c_str()); + pubSub.subscribe(topic.c_str(), 1); + } +#endif #endif } bool MQTT::wantsLink() const { - bool hasChannel = false; + bool hasChannelorMapReport = + moduleConfig.mqtt.enabled && (moduleConfig.mqtt.map_reporting_enabled || channels.anyMqttEnabled()); - if (moduleConfig.mqtt.enabled) { - // No need for link if no channel needed it - size_t numChan = channels.getNumChannels(); - for (size_t i = 0; i < numChan; i++) { - const auto &ch = channels.getByIndex(i); - if (ch.settings.uplink_enabled || ch.settings.downlink_enabled) { - hasChannel = true; - break; - } - } - } - if (hasChannel && moduleConfig.mqtt.proxy_to_client_enabled) + if (hasChannelorMapReport && moduleConfig.mqtt.proxy_to_client_enabled) return true; #if HAS_WIFI - return hasChannel && WiFi.isConnected(); + return hasChannelorMapReport && WiFi.isConnected(); #endif #if HAS_ETHERNET - return hasChannel && Ethernet.linkStatus() == LinkON; + return hasChannelorMapReport && Ethernet.linkStatus() == LinkON; #endif return false; } int32_t MQTT::runOnce() { - if (!moduleConfig.mqtt.enabled) +#if HAS_NETWORKING + if (!moduleConfig.mqtt.enabled || !(moduleConfig.mqtt.map_reporting_enabled || channels.anyMqttEnabled())) return disable(); bool wantConnection = wantsLink(); + perhapsReportToMap(); + // If connected poll rapidly, otherwise only occasionally check for a wifi connection change and ability to contact server if (moduleConfig.mqtt.proxy_to_client_enabled) { publishQueuedMessages(); return 200; } -#ifdef HAS_NETWORKING + else if (!pubSub.loop()) { if (!wantConnection) return 5000; // If we don't want connection now, check again in 5 secs @@ -428,38 +482,44 @@ int32_t MQTT::runOnce() return 30000; } -/// FIXME, include more information in the status text -void MQTT::publishStatus() +void MQTT::publishNodeInfo() { - auto myStatus = (statusTopic + owner.id); - bool ok = publish(myStatus.c_str(), "online", true); - LOG_INFO("published online=%d\n", ok); + // TODO: NodeInfo broadcast over MQTT only (NODENUM_BROADCAST_NO_LORA) } - void MQTT::publishQueuedMessages() { if (!mqttQueue.isEmpty()) { LOG_DEBUG("Publishing enqueued MQTT message\n"); - // FIXME - this size calculation is super sloppy, but it will go away once we dynamically alloc meshpackets meshtastic_ServiceEnvelope *env = mqttQueue.dequeuePtr(0); - static uint8_t bytes[meshtastic_MeshPacket_size + 64]; size_t numBytes = pb_encode_to_bytes(bytes, sizeof(bytes), &meshtastic_ServiceEnvelope_msg, env); - - std::string topic = cryptTopic + env->channel_id + "/" + owner.id; + std::string topic; + if (env->packet->pki_encrypted) { + topic = cryptTopic + "PKI/" + owner.id; + } else { + topic = cryptTopic + env->channel_id + "/" + owner.id; + } LOG_INFO("publish %s, %u bytes from queue\n", topic.c_str(), numBytes); publish(topic.c_str(), bytes, numBytes, false); +#if !defined(ARCH_NRF52) || \ + defined(NRF52_USE_JSON) // JSON is not supported on nRF52, see issue #2804 ### Fixed by using ArduinoJson ### if (moduleConfig.mqtt.json_enabled) { // handle json topic - auto jsonString = this->meshPacketToJson(env->packet); + auto jsonString = MeshPacketSerializer::JsonSerialize(env->packet); if (jsonString.length() != 0) { - std::string topicJson = jsonTopic + env->channel_id + "/" + owner.id; + std::string topicJson; + if (env->packet->pki_encrypted) { + topicJson = jsonTopic + "PKI/" + owner.id; + } else { + topicJson = jsonTopic + env->channel_id + "/" + owner.id; + } LOG_INFO("JSON publish message to %s, %u bytes: %s\n", topicJson.c_str(), jsonString.length(), jsonString.c_str()); publish(topicJson.c_str(), jsonString.c_str(), false); } } +#endif // ARCH_NRF52 NRF52_USE_JSON mqttPool.release(env); } } @@ -468,18 +528,39 @@ void MQTT::onSend(const meshtastic_MeshPacket &mp, const meshtastic_MeshPacket & { if (mp.via_mqtt) return; // Don't send messages that came from MQTT back into MQTT - + bool uplinkEnabled = false; + for (int i = 0; i <= 7; i++) { + if (channels.getByIndex(i).settings.uplink_enabled) + uplinkEnabled = true; + } + if (!uplinkEnabled) + return; // no channels have an uplink enabled auto &ch = channels.getByIndex(chIndex); - if (&mp.decoded && strcmp(moduleConfig.mqtt.address, default_mqtt_address) == 0 && - (mp.decoded.portnum == meshtastic_PortNum_RANGE_TEST_APP || - mp.decoded.portnum == meshtastic_PortNum_DETECTION_SENSOR_APP)) { - LOG_DEBUG("MQTT onSend - Ignoring range test or detection sensor message on public mqtt\n"); - return; - } + if (!mp.pki_encrypted) { + if (mp_decoded.which_payload_variant != meshtastic_MeshPacket_decoded_tag) { + LOG_CRIT("MQTT::onSend(): mp_decoded isn't actually decoded\n"); + return; + } - if (ch.settings.uplink_enabled) { - const char *channelId = channels.getGlobalId(chIndex); // FIXME, for now we just use the human name for the channel + // check for the lowest bit of the data bitfield set false, and the use of one of the default keys. + if (!isFromUs(&mp_decoded) && mp_decoded.decoded.has_bitfield && + !(mp_decoded.decoded.bitfield & BITFIELD_OK_TO_MQTT_MASK) && + (ch.settings.psk.size < 2 || (ch.settings.psk.size == 16 && memcmp(ch.settings.psk.bytes, defaultpsk, 16)) || + (ch.settings.psk.size == 32 && memcmp(ch.settings.psk.bytes, eventpsk, 32)))) { + LOG_INFO("MQTT onSend - Not forwarding packet due to DontMqttMeBro flag\n"); + return; + } + + if (strcmp(moduleConfig.mqtt.address, default_mqtt_address) == 0 && + (mp_decoded.decoded.portnum == meshtastic_PortNum_RANGE_TEST_APP || + mp_decoded.decoded.portnum == meshtastic_PortNum_DETECTION_SENSOR_APP)) { + LOG_DEBUG("MQTT onSend - Ignoring range test or detection sensor message on public mqtt\n"); + return; + } + } + if (mp.pki_encrypted || ch.settings.uplink_enabled) { + const char *channelId = mp.pki_encrypted ? "PKI" : channels.getGlobalId(chIndex); meshtastic_ServiceEnvelope *env = mqttPool.allocZeroed(); env->channel_id = (char *)channelId; @@ -489,24 +570,24 @@ void MQTT::onSend(const meshtastic_MeshPacket &mp, const meshtastic_MeshPacket & if (moduleConfig.mqtt.encryption_enabled) { env->packet = (meshtastic_MeshPacket *)∓ LOG_DEBUG("encrypted message\n"); - } else { + } else if (mp_decoded.which_payload_variant == + meshtastic_MeshPacket_decoded_tag) { // Don't upload a still-encrypted PKI packet env->packet = (meshtastic_MeshPacket *)&mp_decoded; LOG_DEBUG("portnum %i message\n", env->packet->decoded.portnum); } if (moduleConfig.mqtt.proxy_to_client_enabled || this->isConnectedDirectly()) { - // FIXME - this size calculation is super sloppy, but it will go away once we dynamically alloc meshpackets - static uint8_t bytes[meshtastic_MeshPacket_size + 64]; size_t numBytes = pb_encode_to_bytes(bytes, sizeof(bytes), &meshtastic_ServiceEnvelope_msg, env); - std::string topic = cryptTopic + channelId + "/" + owner.id; LOG_DEBUG("MQTT Publish %s, %u bytes\n", topic.c_str(), numBytes); publish(topic.c_str(), bytes, numBytes, false); +#if !defined(ARCH_NRF52) || \ + defined(NRF52_USE_JSON) // JSON is not supported on nRF52, see issue #2804 ### Fixed by using ArduinoJson ### if (moduleConfig.mqtt.json_enabled) { // handle json topic - auto jsonString = this->meshPacketToJson((meshtastic_MeshPacket *)&mp_decoded); + auto jsonString = MeshPacketSerializer::JsonSerialize((meshtastic_MeshPacket *)&mp_decoded); if (jsonString.length() != 0) { std::string topicJson = jsonTopic + channelId + "/" + owner.id; LOG_INFO("JSON publish message to %s, %u bytes: %s\n", topicJson.c_str(), jsonString.length(), @@ -514,7 +595,7 @@ void MQTT::onSend(const meshtastic_MeshPacket &mp, const meshtastic_MeshPacket & publish(topicJson.c_str(), jsonString.c_str(), false); } } - +#endif // ARCH_NRF52 NRF52_USE_JSON } else { LOG_INFO("MQTT not connected, queueing packet\n"); if (mqttQueue.numFree() == 0) { @@ -531,295 +612,87 @@ void MQTT::onSend(const meshtastic_MeshPacket &mp, const meshtastic_MeshPacket & } } -// converts a downstream packet into a json message -std::string MQTT::meshPacketToJson(meshtastic_MeshPacket *mp) +void MQTT::perhapsReportToMap() { - // the created jsonObj is immutable after creation, so - // we need to do the heavy lifting before assembling it. - std::string msgType; - JSONObject jsonObj; + if (!moduleConfig.mqtt.map_reporting_enabled || !(moduleConfig.mqtt.proxy_to_client_enabled || isConnectedDirectly())) + return; - if (mp->which_payload_variant == meshtastic_MeshPacket_decoded_tag) { - JSONObject msgPayload; - switch (mp->decoded.portnum) { - case meshtastic_PortNum_TEXT_MESSAGE_APP: { - msgType = "text"; - // convert bytes to string - LOG_DEBUG("got text message of size %u\n", mp->decoded.payload.size); - char payloadStr[(mp->decoded.payload.size) + 1]; - memcpy(payloadStr, mp->decoded.payload.bytes, mp->decoded.payload.size); - payloadStr[mp->decoded.payload.size] = 0; // null terminated string - // check if this is a JSON payload - JSONValue *json_value = JSON::Parse(payloadStr); - if (json_value != NULL) { - LOG_INFO("text message payload is of type json\n"); - // if it is, then we can just use the json object - jsonObj["payload"] = json_value; - } else { - // if it isn't, then we need to create a json object - // with the string as the value - LOG_INFO("text message payload is of type plaintext\n"); - msgPayload["text"] = new JSONValue(payloadStr); - jsonObj["payload"] = new JSONValue(msgPayload); - } - break; - } - case meshtastic_PortNum_TELEMETRY_APP: { - msgType = "telemetry"; - meshtastic_Telemetry scratch; - meshtastic_Telemetry *decoded = NULL; - memset(&scratch, 0, sizeof(scratch)); - if (pb_decode_from_bytes(mp->decoded.payload.bytes, mp->decoded.payload.size, &meshtastic_Telemetry_msg, &scratch)) { - decoded = &scratch; - if (decoded->which_variant == meshtastic_Telemetry_device_metrics_tag) { - msgPayload["battery_level"] = new JSONValue((uint)decoded->variant.device_metrics.battery_level); - msgPayload["voltage"] = new JSONValue(decoded->variant.device_metrics.voltage); - msgPayload["channel_utilization"] = new JSONValue(decoded->variant.device_metrics.channel_utilization); - msgPayload["air_util_tx"] = new JSONValue(decoded->variant.device_metrics.air_util_tx); - } else if (decoded->which_variant == meshtastic_Telemetry_environment_metrics_tag) { - msgPayload["temperature"] = new JSONValue(decoded->variant.environment_metrics.temperature); - msgPayload["relative_humidity"] = new JSONValue(decoded->variant.environment_metrics.relative_humidity); - msgPayload["barometric_pressure"] = new JSONValue(decoded->variant.environment_metrics.barometric_pressure); - msgPayload["gas_resistance"] = new JSONValue(decoded->variant.environment_metrics.gas_resistance); - msgPayload["voltage"] = new JSONValue(decoded->variant.environment_metrics.voltage); - msgPayload["current"] = new JSONValue(decoded->variant.environment_metrics.current); - } else if (decoded->which_variant == meshtastic_Telemetry_power_metrics_tag) { - msgPayload["voltage_ch1"] = new JSONValue(decoded->variant.power_metrics.ch1_voltage); - msgPayload["current_ch1"] = new JSONValue(decoded->variant.power_metrics.ch1_current); - msgPayload["voltage_ch2"] = new JSONValue(decoded->variant.power_metrics.ch2_voltage); - msgPayload["current_ch2"] = new JSONValue(decoded->variant.power_metrics.ch2_current); - msgPayload["voltage_ch3"] = new JSONValue(decoded->variant.power_metrics.ch3_voltage); - msgPayload["current_ch3"] = new JSONValue(decoded->variant.power_metrics.ch3_current); - } - jsonObj["payload"] = new JSONValue(msgPayload); - } else { - LOG_ERROR("Error decoding protobuf for telemetry message!\n"); - } - break; - } - case meshtastic_PortNum_NODEINFO_APP: { - msgType = "nodeinfo"; - meshtastic_User scratch; - meshtastic_User *decoded = NULL; - memset(&scratch, 0, sizeof(scratch)); - if (pb_decode_from_bytes(mp->decoded.payload.bytes, mp->decoded.payload.size, &meshtastic_User_msg, &scratch)) { - decoded = &scratch; - msgPayload["id"] = new JSONValue(decoded->id); - msgPayload["longname"] = new JSONValue(decoded->long_name); - msgPayload["shortname"] = new JSONValue(decoded->short_name); - msgPayload["hardware"] = new JSONValue(decoded->hw_model); - jsonObj["payload"] = new JSONValue(msgPayload); - } else { - LOG_ERROR("Error decoding protobuf for nodeinfo message!\n"); - } - break; - } - case meshtastic_PortNum_POSITION_APP: { - msgType = "position"; - meshtastic_Position scratch; - meshtastic_Position *decoded = NULL; - memset(&scratch, 0, sizeof(scratch)); - if (pb_decode_from_bytes(mp->decoded.payload.bytes, mp->decoded.payload.size, &meshtastic_Position_msg, &scratch)) { - decoded = &scratch; - if ((int)decoded->time) { - msgPayload["time"] = new JSONValue((uint)decoded->time); - } - if ((int)decoded->timestamp) { - msgPayload["timestamp"] = new JSONValue((uint)decoded->timestamp); - } - msgPayload["latitude_i"] = new JSONValue((int)decoded->latitude_i); - msgPayload["longitude_i"] = new JSONValue((int)decoded->longitude_i); - if ((int)decoded->altitude) { - msgPayload["altitude"] = new JSONValue((int)decoded->altitude); - } - if ((int)decoded->ground_speed) { - msgPayload["ground_speed"] = new JSONValue((uint)decoded->ground_speed); - } - if (int(decoded->ground_track)) { - msgPayload["ground_track"] = new JSONValue((uint)decoded->ground_track); - } - if (int(decoded->sats_in_view)) { - msgPayload["sats_in_view"] = new JSONValue((uint)decoded->sats_in_view); - } - if ((int)decoded->PDOP) { - msgPayload["PDOP"] = new JSONValue((int)decoded->PDOP); - } - if ((int)decoded->HDOP) { - msgPayload["HDOP"] = new JSONValue((int)decoded->HDOP); - } - if ((int)decoded->VDOP) { - msgPayload["VDOP"] = new JSONValue((int)decoded->VDOP); - } - jsonObj["payload"] = new JSONValue(msgPayload); - } else { - LOG_ERROR("Error decoding protobuf for position message!\n"); - } - break; - } - case meshtastic_PortNum_WAYPOINT_APP: { - msgType = "position"; - meshtastic_Waypoint scratch; - meshtastic_Waypoint *decoded = NULL; - memset(&scratch, 0, sizeof(scratch)); - if (pb_decode_from_bytes(mp->decoded.payload.bytes, mp->decoded.payload.size, &meshtastic_Waypoint_msg, &scratch)) { - decoded = &scratch; - msgPayload["id"] = new JSONValue((uint)decoded->id); - msgPayload["name"] = new JSONValue(decoded->name); - msgPayload["description"] = new JSONValue(decoded->description); - msgPayload["expire"] = new JSONValue((uint)decoded->expire); - msgPayload["locked_to"] = new JSONValue((uint)decoded->locked_to); - msgPayload["latitude_i"] = new JSONValue((int)decoded->latitude_i); - msgPayload["longitude_i"] = new JSONValue((int)decoded->longitude_i); - jsonObj["payload"] = new JSONValue(msgPayload); - } else { - LOG_ERROR("Error decoding protobuf for position message!\n"); - } - break; - } - case meshtastic_PortNum_NEIGHBORINFO_APP: { - msgType = "neighborinfo"; - meshtastic_NeighborInfo scratch; - meshtastic_NeighborInfo *decoded = NULL; - memset(&scratch, 0, sizeof(scratch)); - if (pb_decode_from_bytes(mp->decoded.payload.bytes, mp->decoded.payload.size, &meshtastic_NeighborInfo_msg, - &scratch)) { - decoded = &scratch; - msgPayload["node_id"] = new JSONValue((uint)decoded->node_id); - msgPayload["node_broadcast_interval_secs"] = new JSONValue((uint)decoded->node_broadcast_interval_secs); - msgPayload["last_sent_by_id"] = new JSONValue((uint)decoded->last_sent_by_id); - msgPayload["neighbors_count"] = new JSONValue(decoded->neighbors_count); - JSONArray neighbors; - for (uint8_t i = 0; i < decoded->neighbors_count; i++) { - JSONObject neighborObj; - neighborObj["node_id"] = new JSONValue((uint)decoded->neighbors[i].node_id); - neighborObj["snr"] = new JSONValue((int)decoded->neighbors[i].snr); - neighbors.push_back(new JSONValue(neighborObj)); - } - msgPayload["neighbors"] = new JSONValue(neighbors); - jsonObj["payload"] = new JSONValue(msgPayload); - } else { - LOG_ERROR("Error decoding protobuf for neighborinfo message!\n"); - } - break; - } - case meshtastic_PortNum_TRACEROUTE_APP: { - if (mp->decoded.request_id) { // Only report the traceroute response - msgType = "traceroute"; - meshtastic_RouteDiscovery scratch; - meshtastic_RouteDiscovery *decoded = NULL; - memset(&scratch, 0, sizeof(scratch)); - if (pb_decode_from_bytes(mp->decoded.payload.bytes, mp->decoded.payload.size, &meshtastic_RouteDiscovery_msg, - &scratch)) { - decoded = &scratch; - JSONArray route; // Route this message took - // Lambda function for adding a long name to the route - auto addToRoute = [](JSONArray *route, NodeNum num) { - char long_name[40] = "Unknown"; - meshtastic_NodeInfoLite *node = nodeDB.getMeshNode(num); - bool name_known = node ? node->has_user : false; - if (name_known) - memcpy(long_name, node->user.long_name, sizeof(long_name)); - route->push_back(new JSONValue(long_name)); - }; - addToRoute(&route, mp->to); // Started at the original transmitter (destination of response) - for (uint8_t i = 0; i < decoded->route_count; i++) { - addToRoute(&route, decoded->route[i]); - } - addToRoute(&route, mp->from); // Ended at the original destination (source of response) - - msgPayload["route"] = new JSONValue(route); - jsonObj["payload"] = new JSONValue(msgPayload); - } else { - LOG_ERROR("Error decoding protobuf for traceroute message!\n"); - } - } - break; - } - case meshtastic_PortNum_DETECTION_SENSOR_APP: { - msgType = "detection"; - char payloadStr[(mp->decoded.payload.size) + 1]; - memcpy(payloadStr, mp->decoded.payload.bytes, mp->decoded.payload.size); - payloadStr[mp->decoded.payload.size] = 0; // null terminated string - msgPayload["text"] = new JSONValue(payloadStr); - jsonObj["payload"] = new JSONValue(msgPayload); - break; - } -#ifdef ARCH_ESP32 - case meshtastic_PortNum_PAXCOUNTER_APP: { - msgType = "paxcounter"; - meshtastic_Paxcount scratch; - meshtastic_Paxcount *decoded = NULL; - memset(&scratch, 0, sizeof(scratch)); - if (pb_decode_from_bytes(mp->decoded.payload.bytes, mp->decoded.payload.size, &meshtastic_Paxcount_msg, &scratch)) { - decoded = &scratch; - msgPayload["wifi_count"] = new JSONValue((uint)decoded->wifi); - msgPayload["ble_count"] = new JSONValue((uint)decoded->ble); - msgPayload["uptime"] = new JSONValue((uint)decoded->uptime); - jsonObj["payload"] = new JSONValue(msgPayload); - } else { - LOG_ERROR("Error decoding protobuf for Paxcount message!\n"); - } - break; - } -#endif - case meshtastic_PortNum_REMOTE_HARDWARE_APP: { - meshtastic_HardwareMessage scratch; - meshtastic_HardwareMessage *decoded = NULL; - memset(&scratch, 0, sizeof(scratch)); - if (pb_decode_from_bytes(mp->decoded.payload.bytes, mp->decoded.payload.size, &meshtastic_HardwareMessage_msg, - &scratch)) { - decoded = &scratch; - if (decoded->type == meshtastic_HardwareMessage_Type_GPIOS_CHANGED) { - msgType = "gpios_changed"; - msgPayload["gpio_value"] = new JSONValue((uint)decoded->gpio_value); - jsonObj["payload"] = new JSONValue(msgPayload); - } else if (decoded->type == meshtastic_HardwareMessage_Type_READ_GPIOS_REPLY) { - msgType = "gpios_read_reply"; - msgPayload["gpio_value"] = new JSONValue((uint)decoded->gpio_value); - msgPayload["gpio_mask"] = new JSONValue((uint)decoded->gpio_mask); - jsonObj["payload"] = new JSONValue(msgPayload); - } - } else { - LOG_ERROR("Error decoding protobuf for RemoteHardware message!\n"); - } - break; - } - // add more packet types here if needed - default: - break; - } + if (Throttle::isWithinTimespanMs(last_report_to_map, map_publish_interval_msecs)) { + return; } else { - LOG_WARN("Couldn't convert encrypted payload of MeshPacket to JSON\n"); + if (map_position_precision == 0 || (localPosition.latitude_i == 0 && localPosition.longitude_i == 0)) { + last_report_to_map = millis(); + if (map_position_precision == 0) + LOG_WARN("MQTT Map reporting is enabled, but precision is 0\n"); + if (localPosition.latitude_i == 0 && localPosition.longitude_i == 0) + LOG_WARN("MQTT Map reporting is enabled, but no position available.\n"); + return; + } + + // Allocate ServiceEnvelope and fill it + meshtastic_ServiceEnvelope *se = mqttPool.allocZeroed(); + se->channel_id = (char *)channels.getGlobalId(channels.getPrimaryIndex()); // Use primary channel as the channel_id + se->gateway_id = owner.id; + + // Allocate MeshPacket and fill it + meshtastic_MeshPacket *mp = packetPool.allocZeroed(); + mp->which_payload_variant = meshtastic_MeshPacket_decoded_tag; + mp->from = nodeDB->getNodeNum(); + mp->to = NODENUM_BROADCAST; + mp->decoded.portnum = meshtastic_PortNum_MAP_REPORT_APP; + + // Fill MapReport message + meshtastic_MapReport mapReport = meshtastic_MapReport_init_default; + memcpy(mapReport.long_name, owner.long_name, sizeof(owner.long_name)); + memcpy(mapReport.short_name, owner.short_name, sizeof(owner.short_name)); + mapReport.role = config.device.role; + mapReport.hw_model = owner.hw_model; + strncpy(mapReport.firmware_version, optstr(APP_VERSION), sizeof(mapReport.firmware_version)); + mapReport.region = config.lora.region; + mapReport.modem_preset = config.lora.modem_preset; + mapReport.has_default_channel = channels.hasDefaultChannel(); + + // Set position with precision (same as in PositionModule) + if (map_position_precision < 32 && map_position_precision > 0) { + mapReport.latitude_i = localPosition.latitude_i & (UINT32_MAX << (32 - map_position_precision)); + mapReport.longitude_i = localPosition.longitude_i & (UINT32_MAX << (32 - map_position_precision)); + mapReport.latitude_i += (1 << (31 - map_position_precision)); + mapReport.longitude_i += (1 << (31 - map_position_precision)); + } else { + mapReport.latitude_i = localPosition.latitude_i; + mapReport.longitude_i = localPosition.longitude_i; + } + mapReport.altitude = localPosition.altitude; + mapReport.position_precision = map_position_precision; + + mapReport.num_online_local_nodes = nodeDB->getNumOnlineMeshNodes(true); + + // Encode MapReport message and set it to MeshPacket in ServiceEnvelope + mp->decoded.payload.size = pb_encode_to_bytes(mp->decoded.payload.bytes, sizeof(mp->decoded.payload.bytes), + &meshtastic_MapReport_msg, &mapReport); + se->packet = mp; + + size_t numBytes = pb_encode_to_bytes(bytes, sizeof(bytes), &meshtastic_ServiceEnvelope_msg, se); + + LOG_INFO("MQTT Publish map report to %s\n", mapTopic.c_str()); + publish(mapTopic.c_str(), bytes, numBytes, false); + + // Release the allocated memory for ServiceEnvelope and MeshPacket + mqttPool.release(se); + packetPool.release(mp); + + // Update the last report time + last_report_to_map = millis(); } - - jsonObj["id"] = new JSONValue((uint)mp->id); - jsonObj["timestamp"] = new JSONValue((uint)mp->rx_time); - jsonObj["to"] = new JSONValue((uint)mp->to); - jsonObj["from"] = new JSONValue((uint)mp->from); - jsonObj["channel"] = new JSONValue((uint)mp->channel); - jsonObj["type"] = new JSONValue(msgType.c_str()); - jsonObj["sender"] = new JSONValue(owner.id); - if (mp->rx_rssi != 0) - jsonObj["rssi"] = new JSONValue((int)mp->rx_rssi); - if (mp->rx_snr != 0) - jsonObj["snr"] = new JSONValue((float)mp->rx_snr); - - // serialize and write it to the stream - JSONValue *value = new JSONValue(jsonObj); - std::string jsonStr = value->Stringify(); - - LOG_INFO("serialized json message: %s\n", jsonStr.c_str()); - - delete value; - return jsonStr; } bool MQTT::isValidJsonEnvelope(JSONObject &json) { // if "sender" is provided, avoid processing packets we uplinked return (json.find("sender") != json.end() ? (json["sender"]->AsString().compare(owner.id) != 0) : true) && + (json.find("hopLimit") != json.end() ? json["hopLimit"]->IsNumber() : true) && // hop limit should be a number (json.find("from") != json.end()) && json["from"]->IsNumber() && - (json["from"]->AsNumber() == nodeDB.getNodeNum()) && // only accept message if the "from" is us + (json["from"]->AsNumber() == nodeDB->getNodeNum()) && // only accept message if the "from" is us (json.find("type") != json.end()) && json["type"]->IsString() && // should specify a type (json.find("payload") != json.end()); // should have a payload } \ No newline at end of file diff --git a/src/mqtt/MQTT.h b/src/mqtt/MQTT.h index 2b803e3fc..c827e12ca 100644 --- a/src/mqtt/MQTT.h +++ b/src/mqtt/MQTT.h @@ -5,20 +5,20 @@ #include "concurrency/OSThread.h" #include "mesh/Channels.h" #include "mesh/generated/meshtastic/mqtt.pb.h" -#include "mqtt/JSON.h" +#include "serialization/JSON.h" #if HAS_WIFI #include -#define HAS_NETWORKING 1 #if !defined(ARCH_PORTDUINO) +#if defined(ESP_ARDUINO_VERSION_MAJOR) && ESP_ARDUINO_VERSION_MAJOR < 3 #include #endif #endif +#endif #if HAS_ETHERNET #include -#define HAS_NETWORKING 1 #endif -#ifdef HAS_NETWORKING +#if HAS_NETWORKING #include #endif @@ -35,15 +35,17 @@ class MQTT : private concurrency::OSThread #if HAS_WIFI WiFiClient mqttClient; #if !defined(ARCH_PORTDUINO) +#if defined(ESP_ARDUINO_VERSION_MAJOR) && ESP_ARDUINO_VERSION_MAJOR < 3 WiFiClientSecure wifiSecureClient; #endif #endif +#endif #if HAS_ETHERNET EthernetClient mqttClient; #endif public: -#ifdef HAS_NETWORKING +#if HAS_NETWORKING PubSubClient pubSub; #endif MQTT(); @@ -71,6 +73,10 @@ class MQTT : private concurrency::OSThread void onClientProxyReceive(meshtastic_MqttClientProxyMessage msg); + bool isEnabled() { return this->enabled; }; + + void start() { setIntervalFromNow(0); }; + protected: PointerQueue mqttQueue; @@ -79,10 +85,18 @@ class MQTT : private concurrency::OSThread virtual int32_t runOnce() override; private: - std::string statusTopic = "/2/stat/"; - std::string cryptTopic = "/2/c/"; // msh/2/c/CHANNELID/NODEID + std::string cryptTopic = "/2/e/"; // msh/2/e/CHANNELID/NODEID std::string jsonTopic = "/2/json/"; // msh/2/json/CHANNELID/NODEID - /** return true if we have a channel that wants uplink/downlink + std::string mapTopic = "/2/map/"; // For protobuf-encoded MapReport messages + + // For map reporting (only applies when enabled) + const uint32_t default_map_position_precision = 14; // defaults to max. offset of ~1459m + const uint32_t default_map_publish_interval_secs = 60 * 15; // defaults to 15 minutes + uint32_t last_report_to_map = 0; + uint32_t map_position_precision = default_map_position_precision; + uint32_t map_publish_interval_msecs = default_map_publish_interval_secs * 1000; + + /** return true if we have a channel that wants uplink/downlink or map reporting is enabled */ bool wantsLink() const; @@ -96,12 +110,13 @@ class MQTT : private concurrency::OSThread /// Called when a new publish arrives from the MQTT server void onReceive(char *topic, byte *payload, size_t length); - /// Called when a new publish arrives from the MQTT server - std::string meshPacketToJson(meshtastic_MeshPacket *mp); - - void publishStatus(); void publishQueuedMessages(); + void publishNodeInfo(); + + // Check if we should report unencrypted information about our node for consumption by a map + void perhapsReportToMap(); + // returns true if this is a valid JSON envelope which we accept on downlink bool isValidJsonEnvelope(JSONObject &json); diff --git a/src/nimble/NimbleBluetooth.cpp b/src/nimble/NimbleBluetooth.cpp index 0b2a806c9..eedfe1a71 100644 --- a/src/nimble/NimbleBluetooth.cpp +++ b/src/nimble/NimbleBluetooth.cpp @@ -1,7 +1,9 @@ -#include "NimbleBluetooth.h" -#include "BluetoothCommon.h" -#include "PowerFSM.h" #include "configuration.h" +#if !MESHTASTIC_EXCLUDE_BLUETOOTH +#include "BluetoothCommon.h" +#include "NimbleBluetooth.h" +#include "PowerFSM.h" + #include "main.h" #include "mesh/PhoneAPI.h" #include "mesh/mesh-pb-constants.h" @@ -10,6 +12,7 @@ NimBLECharacteristic *fromNumCharacteristic; NimBLECharacteristic *BatteryCharacteristic; +NimBLECharacteristic *logRadioCharacteristic; NimBLEServer *bleServer; static bool passkeyShowing; @@ -41,6 +44,9 @@ static BluetoothPhoneAPI *bluetoothPhoneAPI; * Subclasses can use this as a hook to provide custom notifications for their transport (i.e. bluetooth notifies) */ +// Last ToRadio value received from the phone +static uint8_t lastToRadio[MAX_TO_FROM_RADIO_SIZE]; + class NimbleBluetoothToRadioCallback : public NimBLECharacteristicCallbacks { virtual void onWrite(NimBLECharacteristic *pCharacteristic) @@ -48,7 +54,13 @@ class NimbleBluetoothToRadioCallback : public NimBLECharacteristicCallbacks LOG_INFO("To Radio onwrite\n"); auto val = pCharacteristic->getValue(); - bluetoothPhoneAPI->handleToRadio(val.data(), val.length()); + if (memcmp(lastToRadio, val.data(), val.length()) != 0) { + LOG_DEBUG("New ToRadio packet\n"); + memcpy(lastToRadio, val.data(), val.length()); + bluetoothPhoneAPI->handleToRadio(val.data(), val.length()); + } else { + LOG_DEBUG("Dropping duplicate ToRadio packet we just saw\n"); + } } }; @@ -56,7 +68,6 @@ class NimbleBluetoothFromRadioCallback : public NimBLECharacteristicCallbacks { virtual void onRead(NimBLECharacteristic *pCharacteristic) { - LOG_INFO("From Radio onread\n"); uint8_t fromRadioBytes[meshtastic_FromRadio_size]; size_t numBytes = bluetoothPhoneAPI->getFromRadio(fromRadioBytes); @@ -80,7 +91,33 @@ class NimbleBluetoothServerCallback : public NimBLEServerCallbacks LOG_INFO("*** Enter passkey %d on the peer side ***\n", passkey); powerFSM.trigger(EVENT_BLUETOOTH_PAIR); - screen->startBluetoothPinScreen(passkey); +#if HAS_SCREEN + screen->startAlert([passkey](OLEDDisplay *display, OLEDDisplayUiState *state, int16_t x, int16_t y) -> void { + char btPIN[16] = "888888"; + snprintf(btPIN, sizeof(btPIN), "%06u", passkey); + int x_offset = display->width() / 2; + int y_offset = display->height() <= 80 ? 0 : 32; + display->setTextAlignment(TEXT_ALIGN_CENTER); + display->setFont(FONT_MEDIUM); + display->drawString(x_offset + x, y_offset + y, "Bluetooth"); + + display->setFont(FONT_SMALL); + y_offset = display->height() == 64 ? y_offset + FONT_HEIGHT_MEDIUM - 4 : y_offset + FONT_HEIGHT_MEDIUM + 5; + display->drawString(x_offset + x, y_offset + y, "Enter this code"); + + display->setFont(FONT_LARGE); + String displayPin(btPIN); + String pin = displayPin.substring(0, 3) + " " + displayPin.substring(3, 6); + y_offset = display->height() == 64 ? y_offset + FONT_HEIGHT_SMALL - 5 : y_offset + FONT_HEIGHT_SMALL + 5; + display->drawString(x_offset + x, y_offset + y, pin); + + display->setFont(FONT_SMALL); + String deviceName = "Name: "; + deviceName.concat(getDeviceName()); + y_offset = display->height() == 64 ? y_offset + FONT_HEIGHT_LARGE - 6 : y_offset + FONT_HEIGHT_LARGE + 5; + display->drawString(x_offset + x, y_offset + y, deviceName); + }); +#endif passkeyShowing = true; return passkey; @@ -92,11 +129,18 @@ class NimbleBluetoothServerCallback : public NimBLEServerCallbacks if (passkeyShowing) { passkeyShowing = false; - screen->stopBluetoothPinScreen(); + screen->endAlert(); } } - virtual void onDisconnect(NimBLEServer *pServer, ble_gap_conn_desc *desc) { LOG_INFO("BLE disconnect\n"); } + virtual void onDisconnect(NimBLEServer *pServer, ble_gap_conn_desc *desc) + { + LOG_INFO("BLE disconnect\n"); + + if (bluetoothPhoneAPI) { + bluetoothPhoneAPI->close(); + } + } }; static NimbleBluetoothToRadioCallback *toRadioCallbacks; @@ -104,14 +148,26 @@ static NimbleBluetoothFromRadioCallback *fromRadioCallbacks; void NimbleBluetooth::shutdown() { + // No measurable power saving for ESP32 during light-sleep(?) +#ifndef ARCH_ESP32 // Shutdown bluetooth for minimum power draw LOG_INFO("Disable bluetooth\n"); - // Bluefruit.Advertising.stop(); NimBLEAdvertising *pAdvertising = NimBLEDevice::getAdvertising(); pAdvertising->reset(); pAdvertising->stop(); +#endif } +// Proper shutdown for ESP32. Needs reboot to reverse. +void NimbleBluetooth::deinit() +{ +#ifdef ARCH_ESP32 + LOG_INFO("Disable bluetooth until reboot\n"); + NimBLEDevice::deinit(); +#endif +} + +// Has initial setup been completed bool NimbleBluetooth::isActive() { return bleServer; @@ -143,7 +199,9 @@ void NimbleBluetooth::setup() NimBLEDevice::setPower(ESP_PWR_LVL_P9); if (config.bluetooth.mode != meshtastic_Config_BluetoothConfig_PairingMode_NO_PIN) { - NimBLEDevice::setSecurityAuth(true, true, true); + NimBLEDevice::setSecurityAuth(BLE_SM_PAIR_AUTHREQ_BOND | BLE_SM_PAIR_AUTHREQ_MITM | BLE_SM_PAIR_AUTHREQ_SC); + NimBLEDevice::setSecurityInitKey(BLE_SM_PAIR_KEY_DIST_ENC | BLE_SM_PAIR_KEY_DIST_ID); + NimBLEDevice::setSecurityRespKey(BLE_SM_PAIR_KEY_DIST_ENC | BLE_SM_PAIR_KEY_DIST_ID); NimBLEDevice::setSecurityIOCap(BLE_HS_IO_DISPLAY_ONLY); } bleServer = NimBLEDevice::createServer(); @@ -164,6 +222,8 @@ void NimbleBluetooth::setupService() ToRadioCharacteristic = bleService->createCharacteristic(TORADIO_UUID, NIMBLE_PROPERTY::WRITE); FromRadioCharacteristic = bleService->createCharacteristic(FROMRADIO_UUID, NIMBLE_PROPERTY::READ); fromNumCharacteristic = bleService->createCharacteristic(FROMNUM_UUID, NIMBLE_PROPERTY::NOTIFY | NIMBLE_PROPERTY::READ); + logRadioCharacteristic = + bleService->createCharacteristic(LOGRADIO_UUID, NIMBLE_PROPERTY::NOTIFY | NIMBLE_PROPERTY::READ, 512U); } else { ToRadioCharacteristic = bleService->createCharacteristic( TORADIO_UUID, NIMBLE_PROPERTY::WRITE | NIMBLE_PROPERTY::WRITE_AUTHEN | NIMBLE_PROPERTY::WRITE_ENC); @@ -172,6 +232,9 @@ void NimbleBluetooth::setupService() fromNumCharacteristic = bleService->createCharacteristic(FROMNUM_UUID, NIMBLE_PROPERTY::NOTIFY | NIMBLE_PROPERTY::READ | NIMBLE_PROPERTY::READ_AUTHEN | NIMBLE_PROPERTY::READ_ENC); + logRadioCharacteristic = bleService->createCharacteristic( + LOGRADIO_UUID, + NIMBLE_PROPERTY::NOTIFY | NIMBLE_PROPERTY::READ | NIMBLE_PROPERTY::READ_AUTHEN | NIMBLE_PROPERTY::READ_ENC, 512U); } bluetoothPhoneAPI = new BluetoothPhoneAPI(); @@ -220,6 +283,14 @@ void NimbleBluetooth::clearBonds() NimBLEDevice::deleteAllBonds(); } +void NimbleBluetooth::sendLog(const uint8_t *logMessage, size_t length) +{ + if (!bleServer || !isConnected() || length > 512) { + return; + } + logRadioCharacteristic->notify(logMessage, length, true); +} + void clearNVS() { NimBLEDevice::deleteAllBonds(); @@ -227,3 +298,4 @@ void clearNVS() ESP.restart(); #endif } +#endif \ No newline at end of file diff --git a/src/nimble/NimbleBluetooth.h b/src/nimble/NimbleBluetooth.h index 4080a7cbc..45602e088 100644 --- a/src/nimble/NimbleBluetooth.h +++ b/src/nimble/NimbleBluetooth.h @@ -6,15 +6,17 @@ class NimbleBluetooth : BluetoothApi public: void setup(); void shutdown(); + void deinit(); void clearBonds(); bool isActive(); bool isConnected(); int getRssi(); + void sendLog(const uint8_t *logMessage, size_t length); private: void setupService(); void startAdvertising(); }; -void setBluetoothEnable(bool on); -void clearNVS(); +void setBluetoothEnable(bool enable); +void clearNVS(); \ No newline at end of file diff --git a/src/platform/esp32/CallbackCharacteristic.h b/src/platform/esp32/CallbackCharacteristic.h deleted file mode 100644 index cd3bc6f51..000000000 --- a/src/platform/esp32/CallbackCharacteristic.h +++ /dev/null @@ -1,12 +0,0 @@ -#pragma once -#include "BLECharacteristic.h" -#include "PowerFSM.h" // FIXME - someday I want to make this OTA thing a separate lb at at that point it can't touch this - -/** - * A characteristic with a set of overridable callbacks - */ -class CallbackCharacteristic : public BLECharacteristic, public BLECharacteristicCallbacks -{ - public: - CallbackCharacteristic(const char *uuid, uint32_t btprops) : BLECharacteristic(uuid, btprops) { setCallbacks(this); } -}; diff --git a/src/platform/esp32/ESP32CryptoEngine.cpp b/src/platform/esp32/ESP32CryptoEngine.cpp index 998419df8..230139036 100644 --- a/src/platform/esp32/ESP32CryptoEngine.cpp +++ b/src/platform/esp32/ESP32CryptoEngine.cpp @@ -13,58 +13,29 @@ class ESP32CryptoEngine : public CryptoEngine ~ESP32CryptoEngine() { mbedtls_aes_free(&aes); } - /** - * Set the key used for encrypt, decrypt. - * - * As a special case: If all bytes are zero, we assume _no encryption_ and send all data in cleartext. - * - * @param numBytes must be 16 (AES128), 32 (AES256) or 0 (no crypt) - * @param bytes a _static_ buffer that will remain valid for the life of this crypto instance (i.e. this class will cache the - * provided pointer) - */ - virtual void setKey(const CryptoKey &k) override - { - CryptoEngine::setKey(k); - - if (key.length != 0) { - auto res = mbedtls_aes_setkey_enc(&aes, key.bytes, key.length * 8); - assert(!res); - } - } - /** * Encrypt a packet * * @param bytes is updated in place + * TODO: return bool, and handle graciously when something fails */ - virtual void encrypt(uint32_t fromNode, uint64_t packetId, size_t numBytes, uint8_t *bytes) override + virtual void encryptAESCtr(CryptoKey _key, uint8_t *_nonce, size_t numBytes, uint8_t *bytes) override { - if (key.length > 0) { - LOG_DEBUG("ESP32 crypt fr=%x, num=%x, numBytes=%d!\n", fromNode, (uint32_t)packetId, numBytes); - initNonce(fromNode, packetId); + if (_key.length > 0) { if (numBytes <= MAX_BLOCKSIZE) { + mbedtls_aes_setkey_enc(&aes, _key.bytes, _key.length * 8); static uint8_t scratch[MAX_BLOCKSIZE]; uint8_t stream_block[16]; size_t nc_off = 0; memcpy(scratch, bytes, numBytes); memset(scratch + numBytes, 0, sizeof(scratch) - numBytes); // Fill rest of buffer with zero (in case cypher looks at it) - - auto res = mbedtls_aes_crypt_ctr(&aes, numBytes, &nc_off, nonce, stream_block, scratch, bytes); - assert(!res); + mbedtls_aes_crypt_ctr(&aes, numBytes, &nc_off, _nonce, stream_block, scratch, bytes); } else { LOG_ERROR("Packet too large for crypto engine: %d. noop encryption!\n", numBytes); } } } - - virtual void decrypt(uint32_t fromNode, uint64_t packetId, size_t numBytes, uint8_t *bytes) override - { - // For CTR, the implementation is the same - encrypt(fromNode, packetId, numBytes, bytes); - } - - private: }; -CryptoEngine *crypto = new ESP32CryptoEngine(); +CryptoEngine *crypto = new ESP32CryptoEngine(); \ No newline at end of file diff --git a/src/platform/esp32/SimpleAllocator.cpp b/src/platform/esp32/SimpleAllocator.cpp index ed44722c5..04ce35eb3 100644 --- a/src/platform/esp32/SimpleAllocator.cpp +++ b/src/platform/esp32/SimpleAllocator.cpp @@ -26,41 +26,3 @@ void *operator new(size_t size, SimpleAllocator &p) { return p.alloc(size); } - -#if 0 -// This was a dumb idea, turn off for now - -SimpleAllocator *activeAllocator; - -AllocatorScope::AllocatorScope(SimpleAllocator &a) -{ - assert(!activeAllocator); - activeAllocator = &a; -} - -AllocatorScope::~AllocatorScope() -{ - assert(activeAllocator); - activeAllocator = NULL; -} - -/// Global new/delete, uses a simple allocator if it is in scope - -void *operator new(size_t sz) throw(std::bad_alloc) -{ - void *mem = activeAllocator ? activeAllocator->alloc(sz) : malloc(sz); - if (mem) - return mem; - else - throw std::bad_alloc(); -} - -void operator delete(void *ptr) throw() -{ - if (activeAllocator) - LOG_DEBUG("Warning: leaking an active allocator object\n"); // We don't properly handle this yet - else - free(ptr); -} - -#endif \ No newline at end of file diff --git a/src/platform/esp32/architecture.h b/src/platform/esp32/architecture.h index cfd2f8650..0ab2acefe 100644 --- a/src/platform/esp32/architecture.h +++ b/src/platform/esp32/architecture.h @@ -42,6 +42,9 @@ #ifndef DEFAULT_VREF #define DEFAULT_VREF 1100 #endif +#ifndef HAS_CUSTOM_CRYPTO_ENGINE +#define HAS_CUSTOM_CRYPTO_ENGINE 1 +#endif #if defined(HAS_AXP192) || defined(HAS_AXP2101) #define HAS_PMU @@ -73,6 +76,8 @@ #ifdef HELTEC_V2_1 #define HW_VENDOR meshtastic_HardwareModel_HELTEC_V2_1 #endif +#elif defined(HELTEC_WIRELESS_BRIDGE) +#define HW_VENDOR meshtastic_HardwareModel_HELTEC_WIRELESS_BRIDGE #elif defined(ARDUINO_HELTEC_WIFI_LORA_32) #define HW_VENDOR meshtastic_HardwareModel_HELTEC_V1 #elif defined(TLORA_V1) @@ -85,6 +90,8 @@ #define HW_VENDOR meshtastic_HardwareModel_TLORA_V2_1_1P6 #elif defined(TLORA_V2_1_18) #define HW_VENDOR meshtastic_HardwareModel_TLORA_V2_1_1P8 +#elif defined(TLORA_C6) +#define HW_VENDOR meshtastic_HardwareModel_TLORA_C6 #elif defined(T_DECK) #define HW_VENDOR meshtastic_HardwareModel_T_DECK #elif defined(T_WATCH_S3) @@ -101,6 +108,8 @@ #define HW_VENDOR meshtastic_HardwareModel_STATION_G1 #elif defined(DR_DEV) #define HW_VENDOR meshtastic_HardwareModel_DR_DEV +#elif defined(HELTEC_HRU_3601) +#define HW_VENDOR meshtastic_HardwareModel_HELTEC_HRU_3601 #elif defined(HELTEC_V3) #define HW_VENDOR meshtastic_HardwareModel_HELTEC_V3 #elif defined(HELTEC_WSL_V3) @@ -117,6 +126,10 @@ #define HW_VENDOR meshtastic_HardwareModel_HELTEC_WIRELESS_PAPER #elif defined(TLORA_T3S3_V1) #define HW_VENDOR meshtastic_HardwareModel_TLORA_T3_S3 +#elif defined(TLORA_T3S3_EPAPER) +#define HW_VENDOR meshtastic_HardwareModel_TLORA_T3_S3 +#elif defined(CDEBYTE_EORA_S3) +#define HW_VENDOR meshtastic_HardwareModel_CDEBYTE_EORA_S3 #elif defined(BETAFPV_2400_TX) #define HW_VENDOR meshtastic_HardwareModel_BETAFPV_2400_TX #elif defined(NANO_G1_EXPLORER) @@ -125,6 +138,10 @@ #define HW_VENDOR meshtastic_HardwareModel_BETAFPV_900_NANO_TX #elif defined(PICOMPUTER_S3) #define HW_VENDOR meshtastic_HardwareModel_PICOMPUTER_S3 +#elif defined(HELTEC_HT62) +#define HW_VENDOR meshtastic_HardwareModel_HELTEC_HT62 +#elif defined(EBYTE_ESP32_S3) +#define HW_VENDOR meshtastic_HardwareModel_EBYTE_ESP32_S3 #elif defined(ESP32_S3_PICO) #define HW_VENDOR meshtastic_HardwareModel_ESP32_S3_PICO #elif defined(SENSELORA_S3) @@ -135,6 +152,30 @@ #define HW_VENDOR meshtastic_HardwareModel_LORA_TYPE #elif defined(CHATTER_2) #define HW_VENDOR meshtastic_HardwareModel_CHATTER_2 +#elif defined(STATION_G2) +#define HW_VENDOR meshtastic_HardwareModel_STATION_G2 +#elif defined(UNPHONE) +#define HW_VENDOR meshtastic_HardwareModel_UNPHONE +#elif defined(WIPHONE) +#define HW_VENDOR meshtastic_HardwareModel_WIPHONE +#elif defined(RADIOMASTER_900_BANDIT_NANO) +#define HW_VENDOR meshtastic_HardwareModel_RADIOMASTER_900_BANDIT_NANO +#elif defined(RADIOMASTER_900_BANDIT) +#define HW_VENDOR meshtastic_HardwareModel_RADIOMASTER_900_BANDIT +#elif defined(HELTEC_CAPSULE_SENSOR_V3) +#define HW_VENDOR meshtastic_HardwareModel_HELTEC_CAPSULE_SENSOR_V3 +#elif defined(HELTEC_VISION_MASTER_T190) +#define HW_VENDOR meshtastic_HardwareModel_HELTEC_VISION_MASTER_T190 +#elif defined(HELTEC_VISION_MASTER_E213) +#define HW_VENDOR meshtastic_HardwareModel_HELTEC_VISION_MASTER_E213 +#elif defined(HELTEC_VISION_MASTER_E290) +#define HW_VENDOR meshtastic_HardwareModel_HELTEC_VISION_MASTER_E290 +#elif defined(HELTEC_MESH_NODE_T114) +#define HW_VENDOR meshtastic_HardwareModel_HELTEC_MESH_NODE_T114 +#elif defined(SENSECAP_INDICATOR) +#define HW_VENDOR meshtastic_HardwareModel_SENSECAP_INDICATOR +#elif defined(SEEED_XIAO_S3) +#define HW_VENDOR meshtastic_HardwareModel_SEEED_XIAO_S3 #endif // ----------------------------------------------------------------------------- diff --git a/src/platform/esp32/iram-quirk.c b/src/platform/esp32/iram-quirk.c new file mode 100644 index 000000000..813842138 --- /dev/null +++ b/src/platform/esp32/iram-quirk.c @@ -0,0 +1,23 @@ +// Free up some precious space in the iram0_0_seg memory segment + +#include + +#include +#include +#include + +#define IRAM_SECTION section(".iram1.stub") + +IRAM_ATTR esp_err_t stub_probe(esp_flash_t *chip, uint32_t flash_id) +{ + return ESP_ERR_NOT_FOUND; +} + +const spi_flash_chip_t stub_flash_chip __attribute__((IRAM_SECTION)) = { + .name = "stub", + .probe = stub_probe, +}; + +extern const spi_flash_chip_t __wrap_esp_flash_chip_gd __attribute__((IRAM_SECTION, alias("stub_flash_chip"))); +extern const spi_flash_chip_t __wrap_esp_flash_chip_issi __attribute__((IRAM_SECTION, alias("stub_flash_chip"))); +extern const spi_flash_chip_t __wrap_esp_flash_chip_winbond __attribute__((IRAM_SECTION, alias("stub_flash_chip"))); diff --git a/src/platform/esp32/main-esp32.cpp b/src/platform/esp32/main-esp32.cpp index c994eea48..f16accab6 100644 --- a/src/platform/esp32/main-esp32.cpp +++ b/src/platform/esp32/main-esp32.cpp @@ -1,14 +1,19 @@ #include "PowerFSM.h" +#include "PowerMon.h" #include "configuration.h" #include "esp_task_wdt.h" #include "main.h" -#if !defined(CONFIG_IDF_TARGET_ESP32S2) +#if !defined(CONFIG_IDF_TARGET_ESP32S2) && !MESHTASTIC_EXCLUDE_BLUETOOTH +#include "BleOta.h" #include "nimble/NimbleBluetooth.h" #endif -#include "BleOta.h" -#include "mesh/wifi/WiFiAPClient.h" +#if HAS_WIFI +#include "mesh/wifi/WiFiAPClient.h" +#endif + +#include "esp_mac.h" #include "meshUtils.h" #include "sleep.h" #include "soc/rtc.h" @@ -18,23 +23,29 @@ #include #include -#if !defined(CONFIG_IDF_TARGET_ESP32S2) - -void setBluetoothEnable(bool on) +#if !defined(CONFIG_IDF_TARGET_ESP32S2) && !MESHTASTIC_EXCLUDE_BLUETOOTH +void setBluetoothEnable(bool enable) { - if (!isWifiAvailable() && config.bluetooth.enabled == true) { +#if HAS_WIFI + if (!isWifiAvailable() && config.bluetooth.enabled == true) +#else + if (config.bluetooth.enabled == true) +#endif + { if (!nimbleBluetooth) { nimbleBluetooth = new NimbleBluetooth(); } - if (on && !nimbleBluetooth->isActive()) { + if (enable && !nimbleBluetooth->isActive()) { + powerMon->setState(meshtastic_PowerMon_State_BT_On); nimbleBluetooth->setup(); - } else if (!on) { - nimbleBluetooth->shutdown(); } + // For ESP32, no way to recover from bluetooth shutdown without reboot + // BLE advertising automatically stops when MCU enters light-sleep(?) + // For deep-sleep, shutdown hardware with nimbleBluetooth->deinit(). Requires reboot to reverse } } #else -void setBluetoothEnable(bool on) {} +void setBluetoothEnable(bool enable) {} void updateBatteryLevel(uint8_t level) {} #endif @@ -83,8 +94,12 @@ void enableSlowCLK() void esp32Setup() { + /* We explicitly don't want to do call randomSeed, + // as that triggers the esp32 core to use a less secure pseudorandom function. uint32_t seed = esp_random(); LOG_DEBUG("Setting random seed %u\n", seed); + randomSeed(seed); + */ LOG_DEBUG("Total heap: %d\n", ESP.getHeapSize()); LOG_DEBUG("Free heap: %d\n", ESP.getFreeHeap()); @@ -106,14 +121,25 @@ void esp32Setup() uint32_t rebootCounter = preferences.getUInt("rebootCounter", 0); rebootCounter++; preferences.putUInt("rebootCounter", rebootCounter); + // store firmware version and hwrevision for access from OTA firmware + String fwrev = preferences.getString("firmwareVersion", ""); + if (fwrev.compareTo(optstr(APP_VERSION)) != 0) + preferences.putString("firmwareVersion", optstr(APP_VERSION)); + uint8_t hwven = preferences.getUInt("hwVendor", 0); + if (hwven != HW_VENDOR) + preferences.putUInt("hwVendor", HW_VENDOR); preferences.end(); LOG_DEBUG("Number of Device Reboots: %d\n", rebootCounter); +#if !MESHTASTIC_EXCLUDE_BLUETOOTH String BLEOTA = BleOta::getOtaAppVersion(); if (BLEOTA.isEmpty()) { - LOG_DEBUG("No OTA firmware available\n"); + LOG_INFO("No OTA firmware available\n"); } else { - LOG_DEBUG("OTA firmware version %s\n", BLEOTA.c_str()); + LOG_INFO("OTA firmware version %s\n", BLEOTA.c_str()); } +#else + LOG_INFO("No OTA firmware available\n"); +#endif // enableModemSleep(); @@ -122,9 +148,16 @@ void esp32Setup() // #define APP_WATCHDOG_SECS 45 #define APP_WATCHDOG_SECS 90 +#ifdef CONFIG_IDF_TARGET_ESP32C6 + esp_task_wdt_config_t *wdt_config = (esp_task_wdt_config_t *)malloc(sizeof(esp_task_wdt_config_t)); + wdt_config->timeout_ms = APP_WATCHDOG_SECS * 1000; + wdt_config->trigger_panic = true; + res = esp_task_wdt_init(wdt_config); + assert(res == ESP_OK); +#else res = esp_task_wdt_init(APP_WATCHDOG_SECS, true); assert(res == ESP_OK); - +#endif res = esp_task_wdt_add(NULL); assert(res == ESP_OK); @@ -179,16 +212,16 @@ void cpuDeepSleep(uint32_t msecToWake) button(s), maybe we should not include any other GPIOs... */ #if SOC_RTCIO_HOLD_SUPPORTED - static const uint8_t rtcGpios[] = {/* 0, */ 2, - /* 4, */ -#ifndef USE_JTAG - 13, - /* 14, */ /* 15, */ + static const uint8_t rtcGpios[] = { +#ifndef HELTEC_VISION_MASTER_E213 + // For this variant, >20mA leaks through the display if pin 2 held + // Todo: check if it's safe to remove this pin for all variants + 2, #endif - /* 25, */ /* 26, */ /* 27, */ - /* 32, */ /* 33, */ 34, 35, - /* 36, */ 37 - /* 38, 39 */}; +#ifndef USE_JTAG + 13, +#endif + 34, 35, 37}; for (int i = 0; i < sizeof(rtcGpios); i++) rtc_gpio_isolate((gpio_num_t)rtcGpios[i]); @@ -198,7 +231,7 @@ void cpuDeepSleep(uint32_t msecToWake) // to detect wake and in normal operation the external part drives them hard. #ifdef BUTTON_PIN // Only GPIOs which are have RTC functionality can be used in this bit map: 0,2,4,12-15,25-27,32-39. -#if SOC_RTCIO_HOLD_SUPPORTED +#if SOC_RTCIO_HOLD_SUPPORTED && SOC_PM_SUPPORT_EXT_WAKEUP uint64_t gpioMask = (1ULL << (config.device.button_gpio ? config.device.button_gpio : BUTTON_PIN)); #endif @@ -207,12 +240,22 @@ void cpuDeepSleep(uint32_t msecToWake) #endif // Not needed because both of the current boards have external pullups - // FIXME change polarity in hw so we can wake on ANY_HIGH instead - that would allow us to use all three buttons (instead of - // just the first) gpio_pullup_en((gpio_num_t)BUTTON_PIN); + // FIXME change polarity in hw so we can wake on ANY_HIGH instead - that would allow us to use all three buttons (instead + // of just the first) gpio_pullup_en((gpio_num_t)BUTTON_PIN); +#ifdef ESP32S3_WAKE_TYPE + esp_sleep_enable_ext1_wakeup(gpioMask, ESP32S3_WAKE_TYPE); +#else #if SOC_PM_SUPPORT_EXT_WAKEUP +#ifdef CONFIG_IDF_TARGET_ESP32 + // ESP_EXT1_WAKEUP_ALL_LOW has been deprecated since esp-idf v5.4 for any other target. esp_sleep_enable_ext1_wakeup(gpioMask, ESP_EXT1_WAKEUP_ALL_LOW); +#else + esp_sleep_enable_ext1_wakeup(gpioMask, ESP_EXT1_WAKEUP_ANY_LOW); #endif +#endif + +#endif // #end ESP32S3_WAKE_TYPE #endif // We want RTC peripherals to stay on diff --git a/src/platform/extra_variants/README.md b/src/platform/extra_variants/README.md new file mode 100644 index 000000000..e558502f0 --- /dev/null +++ b/src/platform/extra_variants/README.md @@ -0,0 +1,15 @@ +# About extra_variants + +This directory tree is designed to solve two problems. + +- 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). +- 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. + +So we are borrowing the initVariant() ideas here (by using weak gcc references). You can now define lateInitVariant() if your board needs it. + +If you'd like a board specific variant to be run, add the variant.cpp file to an appropriately named +subdirectory and check for \_VARIANT_boardname in the cpp file (so that your code is only built for your board). +You'll need to define \_VARIANT_boardname in your corresponding variant.h file. +See existing boards for examples. + +This approach has no added runtime cost. diff --git a/src/platform/extra_variants/heltec_wireless_tracker/variant.cpp b/src/platform/extra_variants/heltec_wireless_tracker/variant.cpp new file mode 100644 index 000000000..0a19a9c3b --- /dev/null +++ b/src/platform/extra_variants/heltec_wireless_tracker/variant.cpp @@ -0,0 +1,41 @@ +#include "configuration.h" + +#ifdef _VARIANT_HELTEC_WIRELESS_TRACKER + +#include "GPS.h" +#include "GpioLogic.h" +#include "graphics/TFTDisplay.h" + +// Heltec tracker specific init +void lateInitVariant() +{ + // LOG_DEBUG("Heltec tracker initVariant\n"); + +#ifndef MESHTASTIC_EXCLUDE_GPS + GpioVirtPin *virtGpsEnable = gps ? gps->enablePin : new GpioVirtPin(); +#else + GpioVirtPin *virtGpsEnable = new GpioVirtPin(); +#endif + +#ifndef MESHTASTIC_EXCLUDE_SCREEN + // On this board we are actually using the backlightEnable signal to already be controlling a physical enable to the + // display controller. But we'd _ALSO_ like to have that signal drive a virtual GPIO. So nest it as needed. + GpioVirtPin *virtScreenEnable = new GpioVirtPin(); + if (TFTDisplay::backlightEnable) { + GpioPin *physScreenEnable = TFTDisplay::backlightEnable; + GpioPin *splitter = new GpioSplitter(virtScreenEnable, physScreenEnable); + TFTDisplay::backlightEnable = splitter; + + // Assume screen is initially powered + splitter->set(true); + } +#endif + +#if defined(VEXT_ENABLE) && (!defined(MESHTASTIC_EXCLUDE_GPS) || !defined(MESHTASTIC_EXCLUDE_SCREEN)) + // If either the GPS or the screen is on, turn on the external power regulator + GpioPin *hwEnable = new GpioHwPin(VEXT_ENABLE); + new GpioBinaryTransformer(virtGpsEnable, virtScreenEnable, hwEnable, GpioBinaryTransformer::Or); +#endif +} + +#endif \ No newline at end of file diff --git a/src/platform/nrf52/BLEDfuScure.cpp b/src/platform/nrf52/BLEDfuScure.cpp new file mode 100644 index 000000000..82cb8905a --- /dev/null +++ b/src/platform/nrf52/BLEDfuScure.cpp @@ -0,0 +1,143 @@ +/**************************************************************************/ +/*! + @file BLEDfu.cpp + @author hathach (tinyusb.org) + + @section LICENSE + + Software License Agreement (BSD License) + + Copyright (c) 2018, Adafruit Industries (adafruit.com) + All rights reserved. + + Redistribution and use in source and binary forms, with or without + modification, are permitted provided that the following conditions are met: + 1. Redistributions of source code must retain the above copyright + notice, this list of conditions and the following disclaimer. + 2. Redistributions in binary form must reproduce the above copyright + notice, this list of conditions and the following disclaimer in the + documentation and/or other materials provided with the distribution. + 3. Neither the name of the copyright holders nor the + names of its contributors may be used to endorse or promote products + derived from this software without specific prior written permission. + + THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS ''AS IS'' AND ANY + EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED + WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE + DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER BE LIABLE FOR ANY + DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES + (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; + LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND + ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT + (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS + SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. +*/ +/**************************************************************************/ + +#include "BLEDfuSecure.h" +#include "bluefruit.h" + +#define DFU_REV_APPMODE 0x0001 + +const uint16_t UUID16_SVC_DFU_OTA = 0xFE59; + +const uint8_t UUID128_CHR_DFU_CONTROL[16] = {0x50, 0xEA, 0xDA, 0x30, 0x88, 0x83, 0xB8, 0x9F, + 0x60, 0x4F, 0x15, 0xF3, 0x03, 0x00, 0xC9, 0x8E}; + +extern "C" void bootloader_util_app_start(uint32_t start_addr); + +static uint16_t crc16(const uint8_t *data_p, uint8_t length) +{ + uint16_t crc = 0xFFFF; + + while (length--) { + uint8_t x = crc >> 8 ^ *data_p++; + x ^= x >> 4; + crc = (crc << 8) ^ ((uint16_t)(x << 12)) ^ ((uint16_t)(x << 5)) ^ ((uint16_t)x); + } + return crc; +} + +static void bledfu_control_wr_authorize_cb(uint16_t conn_hdl, BLECharacteristic *chr, ble_gatts_evt_write_t *request) +{ + if ((request->handle == chr->handles().value_handle) && (request->op != BLE_GATTS_OP_PREP_WRITE_REQ) && + (request->op != BLE_GATTS_OP_EXEC_WRITE_REQ_NOW) && (request->op != BLE_GATTS_OP_EXEC_WRITE_REQ_CANCEL)) { + BLEConnection *conn = Bluefruit.Connection(conn_hdl); + + ble_gatts_rw_authorize_reply_params_t reply = {.type = BLE_GATTS_AUTHORIZE_TYPE_WRITE}; + + if (!chr->indicateEnabled(conn_hdl)) { + reply.params.write.gatt_status = BLE_GATT_STATUS_ATTERR_CPS_CCCD_CONFIG_ERROR; + sd_ble_gatts_rw_authorize_reply(conn_hdl, &reply); + return; + } + + reply.params.write.gatt_status = BLE_GATT_STATUS_SUCCESS; + sd_ble_gatts_rw_authorize_reply(conn_hdl, &reply); + + enum { START_DFU = 1 }; + if (request->data[0] == START_DFU) { + // Peer data information so that bootloader could re-connect after reboot + typedef struct { + ble_gap_addr_t addr; + ble_gap_irk_t irk; + ble_gap_enc_key_t enc_key; + uint8_t sys_attr[8]; + uint16_t crc16; + } peer_data_t; + + VERIFY_STATIC(offsetof(peer_data_t, crc16) == 60); + + /* Save Peer data + * Peer data address is defined in bootloader linker @0x20007F80 + * - If bonded : save Security information + * - Otherwise : save Address for direct advertising + * + * TODO may force bonded only for security reason + */ + peer_data_t *peer_data = (peer_data_t *)(0x20007F80UL); + varclr(peer_data); + + // Get CCCD + uint16_t sysattr_len = sizeof(peer_data->sys_attr); + sd_ble_gatts_sys_attr_get(conn_hdl, peer_data->sys_attr, &sysattr_len, BLE_GATTS_SYS_ATTR_FLAG_SYS_SRVCS); + + // Get Bond Data or using Address if not bonded + peer_data->addr = conn->getPeerAddr(); + + if (conn->secured()) { + bond_keys_t bkeys; + if (conn->loadBondKey(&bkeys)) { + peer_data->addr = bkeys.peer_id.id_addr_info; + peer_data->irk = bkeys.peer_id.id_info; + peer_data->enc_key = bkeys.own_enc; + } + } + + // Calculate crc + peer_data->crc16 = crc16((uint8_t *)peer_data, offsetof(peer_data_t, crc16)); + + // Initiate DFU Sequence and reboot into DFU OTA mode + Bluefruit.Advertising.restartOnDisconnect(false); + conn->disconnect(); + + NRF_POWER->GPREGRET = 0xB1; + NVIC_SystemReset(); + } + } +} + +BLEDfuSecure::BLEDfuSecure(void) : BLEService(UUID16_SVC_DFU_OTA), _chr_control(UUID128_CHR_DFU_CONTROL) {} + +err_t BLEDfuSecure::begin(void) +{ + // Invoke base class begin() + VERIFY_STATUS(BLEService::begin()); + + _chr_control.setProperties(CHR_PROPS_WRITE | CHR_PROPS_INDICATE); + _chr_control.setMaxLen(23); + _chr_control.setWriteAuthorizeCallback(bledfu_control_wr_authorize_cb); + VERIFY_STATUS(_chr_control.begin()); + + return ERROR_NONE; +} diff --git a/src/platform/nrf52/BLEDfuSecure.h b/src/platform/nrf52/BLEDfuSecure.h new file mode 100644 index 000000000..bd5d910e8 --- /dev/null +++ b/src/platform/nrf52/BLEDfuSecure.h @@ -0,0 +1,55 @@ +/**************************************************************************/ +/*! + @file BLEDfu.h + @author hathach (tinyusb.org) + + @section LICENSE + + Software License Agreement (BSD License) + + Copyright (c) 2018, Adafruit Industries (adafruit.com) + All rights reserved. + + Redistribution and use in source and binary forms, with or without + modification, are permitted provided that the following conditions are met: + 1. Redistributions of source code must retain the above copyright + notice, this list of conditions and the following disclaimer. + 2. Redistributions in binary form must reproduce the above copyright + notice, this list of conditions and the following disclaimer in the + documentation and/or other materials provided with the distribution. + 3. Neither the name of the copyright holders nor the + names of its contributors may be used to endorse or promote products + derived from this software without specific prior written permission. + + THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS ''AS IS'' AND ANY + EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED + WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE + DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER BE LIABLE FOR ANY + DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES + (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; + LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND + ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT + (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS + SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. +*/ +/**************************************************************************/ +#ifndef BLEDFUSECURE_H_ +#define BLEDFUSECURE_H_ + +#include "bluefruit_common.h" + +#include "BLECharacteristic.h" +#include "BLEService.h" + +class BLEDfuSecure : public BLEService +{ + protected: + BLECharacteristic _chr_control; + + public: + BLEDfuSecure(void); + + virtual err_t begin(void); +}; + +#endif /* BLEDFUSECURE_H_ */ diff --git a/src/platform/nrf52/JLINK_MONITOR.c b/src/platform/nrf52/JLINK_MONITOR.c deleted file mode 100644 index 160264905..000000000 --- a/src/platform/nrf52/JLINK_MONITOR.c +++ /dev/null @@ -1,124 +0,0 @@ -/********************************************************************* -* SEGGER Microcontroller GmbH & Co. KG * -* The Embedded Experts * -********************************************************************** -* * -* (c) 1995 - 2015 SEGGER Microcontroller GmbH & Co. KG * -* * -* www.segger.com Support: support@segger.com * -* * -********************************************************************** - ----------------------------------------------------------------------- -File : JLINK_MONITOR.c -Purpose : Implementation of debug monitor for J-Link monitor mode debug on Cortex-M devices. --------- END-OF-HEADER --------------------------------------------- -*/ - -#include "JLINK_MONITOR.h" - -/********************************************************************* - * - * Configuration - * - ********************************************************************** - */ - -/********************************************************************* - * - * Defines - * - ********************************************************************** - */ - -/********************************************************************* - * - * Types - * - ********************************************************************** - */ - -/********************************************************************* - * - * Static data - * - ********************************************************************** - */ - -volatile int MAIN_MonCnt; // Incremented in JLINK_MONITOR_OnPoll() while CPU is in debug mode - -/********************************************************************* - * - * Local functions - * - ********************************************************************** - */ - -/********************************************************************* - * - * Global functions - * - ********************************************************************** - */ - -/********************************************************************* - * - * JLINK_MONITOR_OnExit() - * - * Function description - * Called from DebugMon_Handler(), once per debug exit. - * May perform some target specific operations to be done on debug mode exit. - * - * Notes - * (1) Must not keep the CPU busy for more than 100 ms - */ -void JLINK_MONITOR_OnExit(void) -{ - // - // Add custom code here - // - // BSP_ClrLED(0); -} - -/********************************************************************* - * - * JLINK_MONITOR_OnEnter() - * - * Function description - * Called from DebugMon_Handler(), once per debug entry. - * May perform some target specific operations to be done on debug mode entry - * - * Notes - * (1) Must not keep the CPU busy for more than 100 ms - */ -void JLINK_MONITOR_OnEnter(void) -{ - // - // Add custom code here - // - // BSP_SetLED(0); - // BSP_ClrLED(1); -} - -/********************************************************************* - * - * JLINK_MONITOR_OnPoll() - * - * Function description - * Called periodically from DebugMon_Handler(), to perform some actions that need to be performed periodically during debug - * mode. - * - * Notes - * (1) Must not keep the CPU busy for more than 100 ms - */ -void JLINK_MONITOR_OnPoll(void) -{ - // - // Add custom code here - // - MAIN_MonCnt++; - // BSP_ToggleLED(0); - // _Delay(500000); -} - -/****** End Of File *************************************************/ diff --git a/src/platform/nrf52/JLINK_MONITOR.h b/src/platform/nrf52/JLINK_MONITOR.h deleted file mode 100644 index 87cf332fe..000000000 --- a/src/platform/nrf52/JLINK_MONITOR.h +++ /dev/null @@ -1,27 +0,0 @@ -/********************************************************************* -* SEGGER Microcontroller GmbH & Co. KG * -* The Embedded Experts * -********************************************************************** -* * -* (c) 1995 - 2015 SEGGER Microcontroller GmbH & Co. KG * -* * -* www.segger.com Support: support@segger.com * -* * -********************************************************************** - ----------------------------------------------------------------------- -File : JLINK_MONITOR.h -Purpose : Header file of debug monitor for J-Link monitor mode debug on Cortex-M devices. --------- END-OF-HEADER --------------------------------------------- -*/ - -#ifndef JLINK_MONITOR_H -#define JLINK_MONITOR_H - -void JLINK_MONITOR_OnExit(void); -void JLINK_MONITOR_OnEnter(void); -void JLINK_MONITOR_OnPoll(void); - -#endif - -/****** End Of File *************************************************/ diff --git a/src/platform/nrf52/JLINK_MONITOR_ISR_SES.S b/src/platform/nrf52/JLINK_MONITOR_ISR_SES.S deleted file mode 100644 index cda4b1a50..000000000 --- a/src/platform/nrf52/JLINK_MONITOR_ISR_SES.S +++ /dev/null @@ -1,888 +0,0 @@ -/********************************************************************* -* SEGGER Microcontroller GmbH & Co. KG * -* The Embedded Experts * -********************************************************************** -* * -* (c) 1995 - 2015 SEGGER Microcontroller GmbH & Co. KG * -* * -* www.segger.com Support: support@segger.com * -* * -********************************************************************** - ----------------------------------------------------------------------- -File : JLINK_MONITOR_ISR_SES.s -Purpose : Implementation of debug monitor for J-Link monitor mode - debug on Cortex-M devices, supporting SES compiler. --------- END-OF-HEADER --------------------------------------------- -*/ - - .name JLINK_MONITOR_ISR - .syntax unified - - .extern JLINK_MONITOR_OnEnter - .extern JLINK_MONITOR_OnExit - .extern JLINK_MONITOR_OnPoll - - .global DebugMon_Handler - -/********************************************************************* -* -* Defines, configurable -* -********************************************************************** -*/ - -#define _MON_VERSION 100 // V x.yy - -/********************************************************************* -* -* Defines, fixed -* -********************************************************************** -*/ - -#define _APP_SP_OFF_R0 0x00 -#define _APP_SP_OFF_R1 0x04 -#define _APP_SP_OFF_R2 0x08 -#define _APP_SP_OFF_R3 0x0C -#define _APP_SP_OFF_R12 0x10 -#define _APP_SP_OFF_R14_LR 0x14 -#define _APP_SP_OFF_PC 0x18 -#define _APP_SP_OFF_XPSR 0x1C -#define _APP_SP_OFF_S0 0x20 -#define _APP_SP_OFF_S1 0x24 -#define _APP_SP_OFF_S2 0x28 -#define _APP_SP_OFF_S3 0x2C -#define _APP_SP_OFF_S4 0x30 -#define _APP_SP_OFF_S5 0x34 -#define _APP_SP_OFF_S6 0x38 -#define _APP_SP_OFF_S7 0x3C -#define _APP_SP_OFF_S8 0x40 -#define _APP_SP_OFF_S9 0x44 -#define _APP_SP_OFF_S10 0x48 -#define _APP_SP_OFF_S11 0x4C -#define _APP_SP_OFF_S12 0x50 -#define _APP_SP_OFF_S13 0x54 -#define _APP_SP_OFF_S14 0x58 -#define _APP_SP_OFF_S15 0x5C -#define _APP_SP_OFF_FPSCR 0x60 - -#define _NUM_BYTES_BASIC_STACKFRAME 32 -#define _NUM_BYTES_EXTENDED_STACKFRAME 72 - -#define _SYSTEM_DCRDR_OFF 0x00 -#define _SYSTEM_DEMCR_OFF 0x04 - -#define _SYSTEM_DHCSR 0xE000EDF0 // Debug Halting Control and Status Register (DHCSR) -#define _SYSTEM_DCRSR 0xE000EDF4 // Debug Core Register Selector Register (DCRSR) -#define _SYSTEM_DCRDR 0xE000EDF8 // Debug Core Register Data Register (DCRDR) -#define _SYSTEM_DEMCR 0xE000EDFC // Debug Exception and Monitor Control Register (DEMCR) - -#define _SYSTEM_FPCCR 0xE000EF34 // Floating-Point Context Control Register (FPCCR) -#define _SYSTEM_FPCAR 0xE000EF38 // Floating-Point Context Address Register (FPCAR) -#define _SYSTEM_FPDSCR 0xE000EF3C // Floating-Point Default Status Control Register (FPDSCR) -#define _SYSTEM_MVFR0 0xE000EF40 // Media and FP Feature Register 0 (MVFR0) -#define _SYSTEM_MVFR1 0xE000EF44 // Media and FP Feature Register 1 (MVFR1) - -/* -* Defines for determining if the current debug config supports FPU registers -* For some compilers like IAR EWARM when disabling the FPU in the compiler settings an error is thrown when -*/ -#ifdef __FPU_PRESENT - #if __FPU_PRESENT - #define _HAS_FPU_REGS 1 - #else - #define _HAS_FPU_REGS 0 - #endif -#else - #define _HAS_FPU_REGS 0 -#endif - -/********************************************************************* -* -* Signature of monitor -* -* Function description -* Needed for targets where also a boot ROM is present that possibly specifies a vector table with a valid debug monitor exception entry -*/ - .section .text, "ax" - - // - // JLINKMONHANDLER - // - .byte 0x4A - .byte 0x4C - .byte 0x49 - .byte 0x4E - .byte 0x4B - .byte 0x4D - .byte 0x4F - .byte 0x4E - .byte 0x48 - .byte 0x41 - .byte 0x4E - .byte 0x44 - .byte 0x4C - .byte 0x45 - .byte 0x52 - .byte 0x00 // Align to 8-bytes - -/********************************************************************* -* -* DebugMon_Handler() -* -* Function description -* Debug monitor handler. CPU enters this handler in case a "halt" request is made from the debugger. -* This handler is also responsible for handling commands that are sent by the debugger. -* -* Notes -* This is actually the ISR for the debug interrupt (exception no. 12) -*/ - .thumb_func - -DebugMon_Handler: - /* - General procedure: - DCRDR is used as communication register - DEMCR[19] is used as ready flag - For the command J-Link sends to the monitor: DCRDR[7:0] == Cmd, DCRDR[31:8] == ParamData - - 1) Monitor sets DEMCR[19] whenever it is ready to receive new commands/data - DEMCR[19] is initially set on debug monitor entry - 2) J-Link will clear once it has placed conmmand/data in DCRDR for J-Link - 3) Monitor will wait for DEMCR[19] to be cleared - 4) Monitor will process command (May cause additional data transfers etc., depends on command - 5) No restart-CPU command? => Back to 2), Otherwise => 6) - 6) Monitor will clear DEMCR[19] 19 to indicate that it is no longer ready - */ - PUSH {LR} - BL JLINK_MONITOR_OnEnter - POP {LR} - LDR.N R3,_AddrDCRDR // 0xe000edf8 == _SYSTEM_DCRDR - B.N _IndicateMonReady -_WaitProbeReadIndicateMonRdy: // while(_SYSTEM_DEMCR & (1uL << 19)); => Wait until J-Link has read item - LDR R0,[R3, #+_SYSTEM_DEMCR_OFF] // _SYSTEM_DEMCR - LSLS R0,R0,#+12 - BMI.N _WaitProbeReadIndicateMonRdy -_IndicateMonReady: - LDR R0,[R3, #+_SYSTEM_DEMCR_OFF] // _SYSTEM_DEMCR |= (1uL << 19); => Set MON_REQ bit, so J-Link knows monitor is ready to receive commands - ORR R0,R0,#0x80000 - STR R0,[R3, #+_SYSTEM_DEMCR_OFF] - /* - During command loop: - R0 = Tmp - R1 = Tmp - R2 = Tmp - R3 = &_SYSTEM_DCRDR (allows also access to DEMCR with offset) - R12 = Tmp - - Outside command loop R0-R3 and R12 may be overwritten by MONITOR_OnPoll() - */ -_WaitForJLinkCmd: // do { - PUSH {LR} - BL JLINK_MONITOR_OnPoll - POP {LR} - LDR.N R3,_AddrDCRDR // 0xe000edf8 == _SYSTEM_DCRDR - LDR R0,[R3, #+_SYSTEM_DEMCR_OFF] - LSRS R0,R0,#+20 // DEMCR[19] -> Carry Clear? => J-Link has placed command for us - BCS _WaitForJLinkCmd - /* - Perform command - Command is placed by J-Link in DCRDR[7:0] and additional parameter data is stored in DCRDR[31:8] - J-Link clears DEMCR[19] to indicate that it placed a command/data or read data - Monitor sets DEMCR[19] to indicate that it placed data or read data / is ready for a new command - Setting DEMCR[19] indicates "monitor ready for new command / data" and also indicates: "data has been placed in DCRDR by monitor, for J-Link" - Therefore it is responsibility of the commands to respond to the commands accordingly - - Commands for debug monitor - Commands must not exceed 0xFF (255) as we only defined 8-bits for command-part. Higher 24-bits are parameter info for current command - - Protocol for different commands: - J-Link: Cmd -> DCRDR, DEMCR[19] -> 0 => Cmd placed by probe - */ - LDR R0,[R3, #+_SYSTEM_DCRDR_OFF] // ParamInfo = _SYSTEM_DCRDR - LSRS R1,R0,#+8 // ParamInfo >>= 8 - LSLS R0,R0,#+24 - LSRS R0,R0,#+24 // Cmd = ParamInfo & 0xFF - // - // switch (Cmd) - // - CMP R0,#+0 - BEQ.N _HandleGetMonVersion // case _MON_CMD_GET_MONITOR_VERSION - CMP R0,#+2 - BEQ.N _HandleReadReg // case _MON_CMD_READ_REG - BCC.N _HandleRestartCPU // case _MON_CMD_RESTART_CPU - CMP R0,#+3 - BEQ.N _HandleWriteReg_Veneer // case _MON_CMD_WRITE_REG - B.N _IndicateMonReady // default : while (1); - /* - Return - _MON_CMD_RESTART_CPU - CPU: DEMCR[19] -> 0 => Monitor no longer ready - */ -_HandleRestartCPU: - LDR R0,[R3, #+_SYSTEM_DEMCR_OFF] // _SYSTEM_DEMCR &= ~(1uL << 19); => Clear MON_REQ to indicate that monitor is no longer active - BIC R0,R0,#0x80000 - STR R0,[R3, #+_SYSTEM_DEMCR_OFF] - PUSH {LR} - BL JLINK_MONITOR_OnExit - POP {PC} - // - // Place data section here to not get in trouble with load-offsets - // - .section .text, "ax", %progbits - .align 2 -_AddrDCRDR: - .long 0xE000EDF8 -_AddrCPACR: - .long 0xE000ED88 - - .section .text, "ax" - .thumb_func - -;/********************************************************************* -;* -;* _HandleGetMonVersion -;* -;*/ -_HandleGetMonVersion: - /* - _MON_CMD_GET_MONITOR_VERSION - CPU: Data -> DCRDR, DEMCR[19] -> 1 => Data ready - J-Link: DCRDR -> Read, DEMCR[19] -> 0 => Data read - CPU: DEMCR[19] -> 1 => Mon ready - */ - MOVS R0,#+_MON_VERSION - STR R0,[R3, #+_SYSTEM_DCRDR_OFF] // _SYSTEM_DCRDR = x - LDR R0,[R3, #+_SYSTEM_DEMCR_OFF] // _SYSTEM_DEMCR |= (1uL << 19); => Set MON_REQ bit, so J-Link knows monitor is ready to receive commands - ORR R0,R0,#0x80000 - STR R0,[R3, #+_SYSTEM_DEMCR_OFF] // Indicate data ready - B _WaitProbeReadIndicateMonRdy - -/********************************************************************* -* -* _HandleReadReg -* -*/ -_HandleWriteReg_Veneer: - B.N _HandleWriteReg -_HandleReadReg: - /* - _MON_CMD_READ_REG - CPU: Data -> DCRDR, DEMCR[19] -> 1 => Data ready - J-Link: DCRDR -> Read, DEMCR[19] -> 0 => Data read - CPU: DEMCR[19] -> 1 => Mon ready - - - Register indexes - 0-15: R0-R15 (13 == R13 reserved => is banked ... Has to be read as PSP / MSP. Decision has to be done by J-Link DLL side!) - 16: XPSR - 17: MSP - 18: PSP - 19: CFBP CONTROL/FAULTMASK/BASEPRI/PRIMASK (packed into 4 bytes of word. CONTROL = CFBP[31:24], FAULTMASK = CFBP[16:23], BASEPRI = CFBP[15:8], PRIMASK = CFBP[7:0] - 20: FPSCR - 21-52: FPS0-FPS31 - - - Register usage when entering this "subroutine": - R0 Cmd - R1 ParamInfo - R2 --- - R3 = &_SYSTEM_DCRDR (allows also access to DEMCR with offset) - R12 --- - - Table B1-9 EXC_RETURN definition of exception return behavior, with FP extension - LR Return to Return SP Frame type - --------------------------------------------------------- - 0xFFFFFFE1 Handler mode. MSP Extended - 0xFFFFFFE9 Thread mode MSP Extended - 0xFFFFFFED Thread mode PSP Extended - 0xFFFFFFF1 Handler mode. MSP Basic - 0xFFFFFFF9 Thread mode MSP Basic - 0xFFFFFFFD Thread mode PSP Basic - - So LR[2] == 1 => Return stack == PSP else MSP - - R0-R3, R12, PC, xPSR can be read from application stackpointer - Other regs can be read directly - */ - LSRS R2,LR,#+3 // Shift LR[2] into carry => Carry clear means that CPU was running on MSP - ITE CS - MRSCS R2,PSP - MRSCC R2,MSP - CMP R1,#+4 // if (RegIndex < 4) { (R0-R3) - BCS _HandleReadRegR4 - LDR R0,[R2, R1, LSL #+2] // v = [SP + Rx * 4] (R0-R3) - B.N _HandleReadRegDone -_HandleReadRegR4: - CMP R1,#+5 // if (RegIndex < 5) { (R4) - BCS _HandleReadRegR5 - MOV R0,R4 - B.N _HandleReadRegDone -_HandleReadRegR5: - CMP R1,#+6 // if (RegIndex < 6) { (R5) - BCS _HandleReadRegR6 - MOV R0,R5 - B.N _HandleReadRegDone -_HandleReadRegR6: - CMP R1,#+7 // if (RegIndex < 7) { (R6) - BCS _HandleReadRegR7 - MOV R0,R6 - B.N _HandleReadRegDone -_HandleReadRegR7: - CMP R1,#+8 // if (RegIndex < 8) { (R7) - BCS _HandleReadRegR8 - MOV R0,R7 - B.N _HandleReadRegDone -_HandleReadRegR8: - CMP R1,#+9 // if (RegIndex < 9) { (R8) - BCS _HandleReadRegR9 - MOV R0,R8 - B.N _HandleReadRegDone -_HandleReadRegR9: - CMP R1,#+10 // if (RegIndex < 10) { (R9) - BCS _HandleReadRegR10 - MOV R0,R9 - B.N _HandleReadRegDone -_HandleReadRegR10: - CMP R1,#+11 // if (RegIndex < 11) { (R10) - BCS _HandleReadRegR11 - MOV R0,R10 - B.N _HandleReadRegDone -_HandleReadRegR11: - CMP R1,#+12 // if (RegIndex < 12) { (R11) - BCS _HandleReadRegR12 - MOV R0,R11 - B.N _HandleReadRegDone -_HandleReadRegR12: - CMP R1,#+14 // if (RegIndex < 14) { (R12) - BCS _HandleReadRegR14 - LDR R0,[R2, #+_APP_SP_OFF_R12] - B.N _HandleReadRegDone -_HandleReadRegR14: - CMP R1,#+15 // if (RegIndex < 15) { (R14 / LR) - BCS _HandleReadRegR15 - LDR R0,[R2, #+_APP_SP_OFF_R14_LR] - B.N _HandleReadRegDone -_HandleReadRegR15: - CMP R1,#+16 // if (RegIndex < 16) { (R15 / PC) - BCS _HandleReadRegXPSR - LDR R0,[R2, #+_APP_SP_OFF_PC] - B.N _HandleReadRegDone -_HandleReadRegXPSR: - CMP R1,#+17 // if (RegIndex < 17) { (xPSR) - BCS _HandleReadRegMSP - LDR R0,[R2, #+_APP_SP_OFF_XPSR] - B.N _HandleReadRegDone -_HandleReadRegMSP: - /* - Stackpointer is tricky because we need to get some info about the SP used in the user app, first - - Handle reading R0-R3 which can be read right from application stackpointer - - Table B1-9 EXC_RETURN definition of exception return behavior, with FP extension - LR Return to Return SP Frame type - --------------------------------------------------------- - 0xFFFFFFE1 Handler mode. MSP Extended - 0xFFFFFFE9 Thread mode MSP Extended - 0xFFFFFFED Thread mode PSP Extended - 0xFFFFFFF1 Handler mode. MSP Basic - 0xFFFFFFF9 Thread mode MSP Basic - 0xFFFFFFFD Thread mode PSP Basic - - So LR[2] == 1 => Return stack == PSP else MSP - Per architecture definition: Inside monitor (exception) SP = MSP - - Stack pointer handling is complicated because it is different what is pushed on the stack before entering the monitor ISR... - Cortex-M: 8 regs - Cortex-M + forced-stack-alignment: 8 regs + 1 dummy-word if stack was not 8-byte aligned - Cortex-M + FPU: 8 regs + 17 FPU regs + 1 dummy-word + 1-dummy word if stack was not 8-byte aligned - Cortex-M + FPU + lazy mode: 8 regs + 17 dummy-words + 1 dummy-word + 1-dummy word if stack was not 8-byte aligned - */ - CMP R1,#+18 // if (RegIndex < 18) { (MSP) - BCS _HandleReadRegPSP - MRS R0,MSP - LSRS R1,LR,#+3 // LR[2] -> Carry == 0 => CPU was running on MSP => Needs correction - BCS _HandleReadRegDone_Veneer // CPU was running on PSP? => No correction necessary -_HandleSPCorrection: - LSRS R1,LR,#+5 // LR[4] -> Carry == 0 => extended stack frame has been allocated. See ARM DDI0403D, B1.5.7 Stack alignment on exception entry - ITE CS - ADDCS R0,R0,#+_NUM_BYTES_BASIC_STACKFRAME - ADDCC R0,R0,#+_NUM_BYTES_EXTENDED_STACKFRAME - LDR R1,[R2, #+_APP_SP_OFF_XPSR] // Get xPSR from application stack (R2 has been set to app stack on beginning of _HandleReadReg) - LSRS R1,R1,#+5 // xPSR[9] -> Carry == 1 => Stack has been force-aligned before pushing regs. See ARM DDI0403D, B1.5.7 Stack alignment on exception entry - IT CS - ADDCS R0,R0,#+4 - B _HandleReadRegDone -_HandleReadRegPSP: // RegIndex == 18 - CMP R1,#+19 // if (RegIndex < 19) { - BCS _HandleReadRegCFBP - MRS R0,PSP // PSP is not touched by monitor - LSRS R1,LR,#+3 // LR[2] -> Carry == 1 => CPU was running on PSP => Needs correction - BCC _HandleReadRegDone_Veneer // CPU was running on MSP? => No correction of PSP necessary - B _HandleSPCorrection -_HandleReadRegCFBP: - /* - CFBP is a register that can only be read via debug probe and is a merger of the following regs: - CONTROL/FAULTMASK/BASEPRI/PRIMASK (packed into 4 bytes of word. CONTROL = CFBP[31:24], FAULTMASK = CFBP[16:23], BASEPRI = CFBP[15:8], PRIMASK = CFBP[7:0] - To keep J-Link side the same for monitor and halt mode, we also return CFBP in monitor mode - */ - CMP R1,#+20 // if (RegIndex < 20) { (CFBP) - BCS _HandleReadRegFPU - MOVS R0,#+0 - MRS R2,PRIMASK - ORRS R0,R2 // Merge PRIMASK into CFBP[7:0] - MRS R2,BASEPRI - LSLS R2,R2,#+8 // Merge BASEPRI into CFBP[15:8] - ORRS R0,R2 - MRS R2,FAULTMASK - LSLS R2,R2,#+16 // Merge FAULTMASK into CFBP[23:16] - ORRS R0,R2 - MRS R2,CONTROL - LSRS R1,LR,#3 // LR[2] -> Carry. CONTROL.SPSEL is saved to LR[2] on exception entry => ARM DDI0403D, B1.5.6 Exception entry behavior - IT CS // As J-Link sees value of CONTROL at application time, we need reconstruct original value of CONTROL - ORRCS R2,R2,#+2 // CONTROL.SPSEL (CONTROL[1]) == 0 inside monitor - LSRS R1,LR,#+5 // LR[4] == NOT(CONTROL.FPCA) -> Carry - ITE CS // Merge original value of FPCA (CONTROL[2]) into read data - BICCS R2,R2,#+0x04 // Remember LR contains NOT(CONTROL) - ORRCC R2,R2,#+0x04 - LSLS R2,R2,#+24 - ORRS R0,R2 - B.N _HandleReadRegDone -_HandleReadRegFPU: -#if _HAS_FPU_REGS - CMP R1,#+53 // if (RegIndex < 53) { (20 (FPSCR), 21-52 FPS0-FPS31) - BCS _HandleReadRegDone_Veneer - /* - Read Coprocessor Access Control Register (CPACR) to check if CP10 and CP11 are enabled - If not, access to floating point is not possible - CPACR[21:20] == CP10 enable. 0b01 = Privileged access only. 0b11 = Full access. Other = reserved - CPACR[23:22] == CP11 enable. 0b01 = Privileged access only. 0b11 = Full access. Other = reserved - */ - LDR R0,_AddrCPACR - LDR R0,[R0] - LSLS R0,R0,#+8 - LSRS R0,R0,#+28 - CMP R0,#+0xF - BEQ _HandleReadRegFPU_Allowed - CMP R0,#+0x5 - BNE _HandleReadRegDone_Veneer -_HandleReadRegFPU_Allowed: - CMP R1,#+21 // if (RegIndex < 21) (20 == FPSCR) - BCS _HandleReadRegFPS0_FPS31 - LSRS R0,LR,#+5 // CONTROL[2] == FPCA => NOT(FPCA) saved to LR[4]. LR[4] == 0 => Extended stack frame, so FPU regs possibly on stack - BCS _HandleReadFPSCRLazyMode // Remember: NOT(FPCA) is stored to LR. == 0 means: Extended stack frame - LDR R0,=_SYSTEM_FPCCR - LDR R0,[R0] - LSLS R0,R0,#+2 // FPCCR[30] -> Carry == 1 indicates if lazy mode is active, so space on stack is reserved but FPU registers are not saved on stack - BCS _HandleReadFPSCRLazyMode - LDR R0,[R2, #+_APP_SP_OFF_FPSCR] - B _HandleReadRegDone -_HandleReadFPSCRLazyMode: - VMRS R0,FPSCR - B _HandleReadRegDone -_HandleReadRegFPS0_FPS31: // RegIndex == 21-52 - LSRS R0,LR,#+5 // CONTROL[2] == FPCA => NOT(FPCA) saved to LR[4]. LR[4] == 0 => Extended stack frame, so FPU regs possibly on stack - BCS _HandleReadFPS0_FPS31LazyMode // Remember: NOT(FPCA) is stored to LR. == 0 means: Extended stack frame - LDR R0,=_SYSTEM_FPCCR - LDR R0,[R0] - LSLS R0,R0,#+2 // FPCCR[30] -> Carry == 1 indicates if lazy mode is active, so space on stack is reserved but FPU registers are not saved on stack - BCS _HandleReadFPS0_FPS31LazyMode - SUBS R1,#+21 // Convert absolute reg index into rel. one - LSLS R1,R1,#+2 // RegIndex to position on stack - ADDS R1,#+_APP_SP_OFF_S0 - LDR R0,[R2, R1] -_HandleReadRegDone_Veneer: - B _HandleReadRegDone -_HandleReadFPS0_FPS31LazyMode: - SUBS R1,#+20 // convert abs. RegIndex into rel. one - MOVS R0,#+6 - MULS R1,R0,R1 - LDR R0,=_HandleReadRegUnknown - SUB R0,R0,R1 // _HandleReadRegUnknown - 6 * ((RegIndex - 21) + 1) - ORR R0,R0,#1 // Thumb bit needs to be set in DestAddr - BX R0 - // - // Table for reading FPS0-FPS31 - // - VMOV R0,S31 // v = FPSx - B _HandleReadRegDone - VMOV R0,S30 - B _HandleReadRegDone - VMOV R0,S29 - B _HandleReadRegDone - VMOV R0,S28 - B _HandleReadRegDone - VMOV R0,S27 - B _HandleReadRegDone - VMOV R0,S26 - B _HandleReadRegDone - VMOV R0,S25 - B _HandleReadRegDone - VMOV R0,S24 - B _HandleReadRegDone - VMOV R0,S23 - B _HandleReadRegDone - VMOV R0,S22 - B _HandleReadRegDone - VMOV R0,S21 - B _HandleReadRegDone - VMOV R0,S20 - B _HandleReadRegDone - VMOV R0,S19 - B _HandleReadRegDone - VMOV R0,S18 - B _HandleReadRegDone - VMOV R0,S17 - B _HandleReadRegDone - VMOV R0,S16 - B _HandleReadRegDone - VMOV R0,S15 - B _HandleReadRegDone - VMOV R0,S14 - B _HandleReadRegDone - VMOV R0,S13 - B _HandleReadRegDone - VMOV R0,S12 - B _HandleReadRegDone - VMOV R0,S11 - B _HandleReadRegDone - VMOV R0,S10 - B _HandleReadRegDone - VMOV R0,S9 - B _HandleReadRegDone - VMOV R0,S8 - B _HandleReadRegDone - VMOV R0,S7 - B _HandleReadRegDone - VMOV R0,S6 - B _HandleReadRegDone - VMOV R0,S5 - B _HandleReadRegDone - VMOV R0,S4 - B _HandleReadRegDone - VMOV R0,S3 - B _HandleReadRegDone - VMOV R0,S2 - B _HandleReadRegDone - VMOV R0,S1 - B _HandleReadRegDone - VMOV R0,S0 - B _HandleReadRegDone -#else - B _HandleReadRegUnknown -_HandleReadRegDone_Veneer: - B _HandleReadRegDone -#endif -_HandleReadRegUnknown: - MOVS R0,#+0 // v = 0 - B.N _HandleReadRegDone -_HandleReadRegDone: - - // Send register content to J-Link and wait until J-Link has read the data - - STR R0,[R3, #+_SYSTEM_DCRDR_OFF] // DCRDR = v; - LDR R0,[R3, #+_SYSTEM_DEMCR_OFF] // _SYSTEM_DEMCR |= (1uL << 19); => Set MON_REQ bit, so J-Link knows monitor is ready to receive commands - ORR R0,R0,#0x80000 - STR R0,[R3, #+_SYSTEM_DEMCR_OFF] // Indicate data ready - B _WaitProbeReadIndicateMonRdy - - // Data section for register addresses - -_HandleWriteReg: - /* - _MON_CMD_WRITE_REG - CPU: DEMCR[19] -> 1 => Mon ready - J-Link: Data -> DCRDR, DEMCR[19] -> 0 => Data placed by probe - CPU: DCRDR -> Read, Process command, DEMCR[19] -> 1 => Data read & mon ready - - Register indexes - 0-15: R0-R15 (13 == R13 reserved => is banked ... Has to be read as PSP / MSP. Decision has to be done by J-Link DLL side!) - 16: XPSR - 17: MSP - 18: PSP - 19: CFBP CONTROL/FAULTMASK/BASEPRI/PRIMASK (packed into 4 bytes of word. CONTROL = CFBP[31:24], FAULTMASK = CFBP[16:23], BASEPRI = CFBP[15:8], PRIMASK = CFBP[7:0] - 20: FPSCR - 21-52: FPS0-FPS31 - - - Register usage when entering this "subroutine": - R0 Cmd - R1 ParamInfo - R2 --- - R3 = &_SYSTEM_DCRDR (allows also access to DEMCR with offset) - R12 --- - - Table B1-9 EXC_RETURN definition of exception return behavior, with FP extension - LR Return to Return SP Frame type - --------------------------------------------------------- - 0xFFFFFFE1 Handler mode. MSP Extended - 0xFFFFFFE9 Thread mode MSP Extended - 0xFFFFFFED Thread mode PSP Extended - 0xFFFFFFF1 Handler mode. MSP Basic - 0xFFFFFFF9 Thread mode MSP Basic - 0xFFFFFFFD Thread mode PSP Basic - - So LR[2] == 1 => Return stack == PSP else MSP - - R0-R3, R12, PC, xPSR can be written via application stackpointer - Other regs can be written directly - - - Read register data from J-Link into R0 - */ - LDR R0,[R3, #+_SYSTEM_DEMCR_OFF] // _SYSTEM_DEMCR |= (1uL << 19); => Monitor is ready to receive register data - ORR R0,R0,#0x80000 - STR R0,[R3, #+_SYSTEM_DEMCR_OFF] -_HandleWRegWaitUntilDataRecv: - LDR R0,[R3, #+_SYSTEM_DEMCR_OFF] - LSLS R0,R0,#+12 - BMI.N _HandleWRegWaitUntilDataRecv // DEMCR[19] == 0 => J-Link has placed new data for us - LDR R0,[R3, #+_SYSTEM_DCRDR_OFF] // Get register data - // - // Determine application SP - // - LSRS R2,LR,#+3 // Shift LR[2] into carry => Carry clear means that CPU was running on MSP - ITE CS - MRSCS R2,PSP - MRSCC R2,MSP - CMP R1,#+4 // if (RegIndex < 4) { (R0-R3) - BCS _HandleWriteRegR4 - STR R0,[R2, R1, LSL #+2] // v = [SP + Rx * 4] (R0-R3) - B.N _HandleWriteRegDone -_HandleWriteRegR4: - CMP R1,#+5 // if (RegIndex < 5) { (R4) - BCS _HandleWriteRegR5 - MOV R4,R0 - B.N _HandleWriteRegDone -_HandleWriteRegR5: - CMP R1,#+6 // if (RegIndex < 6) { (R5) - BCS _HandleWriteRegR6 - MOV R5,R0 - B.N _HandleWriteRegDone -_HandleWriteRegR6: - CMP R1,#+7 // if (RegIndex < 7) { (R6) - BCS _HandleWriteRegR7 - MOV R6,R0 - B.N _HandleWriteRegDone -_HandleWriteRegR7: - CMP R1,#+8 // if (RegIndex < 8) { (R7) - BCS _HandleWriteRegR8 - MOV R7,R0 - B.N _HandleWriteRegDone -_HandleWriteRegR8: - CMP R1,#+9 // if (RegIndex < 9) { (R8) - BCS _HandleWriteRegR9 - MOV R8,R0 - B.N _HandleWriteRegDone -_HandleWriteRegR9: - CMP R1,#+10 // if (RegIndex < 10) { (R9) - BCS _HandleWriteRegR10 - MOV R9,R0 - B.N _HandleWriteRegDone -_HandleWriteRegR10: - CMP R1,#+11 // if (RegIndex < 11) { (R10) - BCS _HandleWriteRegR11 - MOV R10,R0 - B.N _HandleWriteRegDone -_HandleWriteRegR11: - CMP R1,#+12 // if (RegIndex < 12) { (R11) - BCS _HandleWriteRegR12 - MOV R11,R0 - B.N _HandleWriteRegDone -_HandleWriteRegR12: - CMP R1,#+14 // if (RegIndex < 14) { (R12) - BCS _HandleWriteRegR14 - STR R0,[R2, #+_APP_SP_OFF_R12] - B.N _HandleWriteRegDone -_HandleWriteRegR14: - CMP R1,#+15 // if (RegIndex < 15) { (R14 / LR) - BCS _HandleWriteRegR15 - STR R0,[R2, #+_APP_SP_OFF_R14_LR] - B.N _HandleWriteRegDone -_HandleWriteRegR15: - CMP R1,#+16 // if (RegIndex < 16) { (R15 / PC) - BCS _HandleWriteRegXPSR - STR R0,[R2, #+_APP_SP_OFF_PC] - B.N _HandleWriteRegDone -_HandleWriteRegXPSR: - CMP R1,#+17 // if (RegIndex < 17) { (xPSR) - BCS _HandleWriteRegMSP - STR R0,[R2, #+_APP_SP_OFF_XPSR] - B.N _HandleWriteRegDone -_HandleWriteRegMSP: - // - // For now, SP cannot be modified because it is needed to jump back from monitor mode - // - CMP R1,#+18 // if (RegIndex < 18) { (MSP) - BCS _HandleWriteRegPSP - B.N _HandleWriteRegDone -_HandleWriteRegPSP: // RegIndex == 18 - CMP R1,#+19 // if (RegIndex < 19) { - BCS _HandleWriteRegCFBP - B.N _HandleWriteRegDone -_HandleWriteRegCFBP: - /* - CFBP is a register that can only be read via debug probe and is a merger of the following regs: - CONTROL/FAULTMASK/BASEPRI/PRIMASK (packed into 4 bytes of word. CONTROL = CFBP[31:24], FAULTMASK = CFBP[16:23], BASEPRI = CFBP[15:8], PRIMASK = CFBP[7:0] - To keep J-Link side the same for monitor and halt mode, we also return CFBP in monitor mode - */ - CMP R1,#+20 // if (RegIndex < 20) { (CFBP) - BCS _HandleWriteRegFPU - LSLS R1,R0,#+24 - LSRS R1,R1,#+24 // Extract CFBP[7:0] => PRIMASK - MSR PRIMASK,R1 - LSLS R1,R0,#+16 - LSRS R1,R1,#+24 // Extract CFBP[15:8] => BASEPRI - MSR BASEPRI,R1 - LSLS R1,R0,#+8 // Extract CFBP[23:16] => FAULTMASK - LSRS R1,R1,#+24 - MSR FAULTMASK,R1 - LSRS R1,R0,#+24 // Extract CFBP[31:24] => CONTROL - LSRS R0,R1,#2 // Current CONTROL[1] -> Carry - ITE CS // Update saved CONTROL.SPSEL (CONTROL[1]). CONTROL.SPSEL is saved to LR[2] on exception entry => ARM DDI0403D, B1.5.6 Exception entry behavior - ORRCS LR,LR,#+4 - BICCC LR,LR,#+4 - BIC R1,R1,#+2 // CONTROL.SPSEL (CONTROL[1]) == 0 inside monitor. Otherwise behavior is UNPREDICTABLE - LSRS R0,R1,#+3 // New CONTROL.FPCA (CONTROL[2]) -> Carry - ITE CS // CONTROL[2] == FPCA => NOT(FPCA) saved to LR[4]. LR[4] == 0 => Extended stack frame, so FPU regs possibly on stack - BICCS LR,LR,#+0x10 // Remember: NOT(FPCA) is stored to LR. == 0 means: Extended stack frame - ORRCC LR,LR,#+0x10 - MRS R0,CONTROL - LSRS R0,R0,#+3 // CONTROL[2] -> Carry - ITE CS // Preserve original value of current CONTROL[2] - ORRCS R1,R1,#+0x04 - BICCC R1,R1,#+0x04 - MSR CONTROL,R1 - ISB // Necessary after writing to CONTROL, see ARM DDI0403D, B1.4.4 The special-purpose CONTROL register - B.N _HandleWriteRegDone -_HandleWriteRegFPU: -#if _HAS_FPU_REGS - CMP R1,#+53 // if (RegIndex < 53) { (20 (FPSCR), 21-52 FPS0-FPS31) - BCS _HandleWriteRegDone_Veneer - /* - Read Coprocessor Access Control Register (CPACR) to check if CP10 and CP11 are enabled - If not, access to floating point is not possible - CPACR[21:20] == CP10 enable. 0b01 = Privileged access only. 0b11 = Full access. Other = reserved - CPACR[23:22] == CP11 enable. 0b01 = Privileged access only. 0b11 = Full access. Other = reserved - */ - MOV R12,R0 // Save register data - LDR R0,_AddrCPACR - LDR R0,[R0] - LSLS R0,R0,#+8 - LSRS R0,R0,#+28 - CMP R0,#+0xF - BEQ _HandleWriteRegFPU_Allowed - CMP R0,#+0x5 - BNE _HandleWriteRegDone_Veneer -_HandleWriteRegFPU_Allowed: - CMP R1,#+21 // if (RegIndex < 21) (20 == FPSCR) - BCS _HandleWriteRegFPS0_FPS31 - LSRS R0,LR,#+5 // CONTROL[2] == FPCA => NOT(FPCA) saved to LR[4]. LR[4] == 0 => Extended stack frame, so FPU regs possibly on stack - BCS _HandleWriteFPSCRLazyMode // Remember: NOT(FPCA) is stored to LR. == 0 means: Extended stack frame - LDR R0,=_SYSTEM_FPCCR - LDR R0,[R0] - LSLS R0,R0,#+2 // FPCCR[30] -> Carry == 1 indicates if lazy mode is active, so space on stack is reserved but FPU registers are not saved on stack - BCS _HandleWriteFPSCRLazyMode - STR R12,[R2, #+_APP_SP_OFF_FPSCR] - B _HandleWriteRegDone -_HandleWriteFPSCRLazyMode: - VMSR FPSCR,R12 - B _HandleWriteRegDone -_HandleWriteRegFPS0_FPS31: // RegIndex == 21-52 - LDR R0,=_SYSTEM_FPCCR - LDR R0,[R0] - LSLS R0,R0,#+2 // FPCCR[30] -> Carry == 1 indicates if lazy mode is active, so space on stack is reserved but FPU registers are not saved on stack - BCS _HandleWriteFPS0_FPS31LazyMode - LSRS R0,LR,#+5 // CONTROL[2] == FPCA => NOT(FPCA) saved to LR[4]. LR[4] == 0 => Extended stack frame, so FPU regs possibly on stack - BCS _HandleWriteFPS0_FPS31LazyMode // Remember: NOT(FPCA) is stored to LR. == 0 means: Extended stack frame - SUBS R1,#+21 // Convert absolute reg index into rel. one - LSLS R1,R1,#+2 // RegIndex to position on stack - ADDS R1,#+_APP_SP_OFF_S0 - STR R12,[R2, R1] -_HandleWriteRegDone_Veneer: - B _HandleWriteRegDone -_HandleWriteFPS0_FPS31LazyMode: - SUBS R1,#+20 // Convert abs. RegIndex into rel. one - MOVS R0,#+6 - MULS R1,R0,R1 - LDR R0,=_HandleReadRegUnknown - SUB R0,R0,R1 // _HandleReadRegUnknown - 6 * ((RegIndex - 21) + 1) - ORR R0,R0,#1 // Thumb bit needs to be set in DestAddr - BX R0 - // - // Table for reading FPS0-FPS31 - // - VMOV S31,R12 // v = FPSx - B _HandleWriteRegDone - VMOV S30,R12 - B _HandleWriteRegDone - VMOV S29,R12 - B _HandleWriteRegDone - VMOV S28,R12 - B _HandleWriteRegDone - VMOV S27,R12 - B _HandleWriteRegDone - VMOV S26,R12 - B _HandleWriteRegDone - VMOV S25,R12 - B _HandleWriteRegDone - VMOV S24,R12 - B _HandleWriteRegDone - VMOV S23,R12 - B _HandleWriteRegDone - VMOV S22,R12 - B _HandleWriteRegDone - VMOV S21,R12 - B _HandleWriteRegDone - VMOV S20,R12 - B _HandleWriteRegDone - VMOV S19,R12 - B _HandleWriteRegDone - VMOV S18,R12 - B _HandleWriteRegDone - VMOV S17,R12 - B _HandleWriteRegDone - VMOV S16,R12 - B _HandleWriteRegDone - VMOV S15,R12 - B _HandleWriteRegDone - VMOV S14,R12 - B _HandleWriteRegDone - VMOV S13,R12 - B _HandleWriteRegDone - VMOV S12,R12 - B _HandleWriteRegDone - VMOV S11,R12 - B _HandleWriteRegDone - VMOV S10,R12 - B _HandleWriteRegDone - VMOV S9,R12 - B _HandleWriteRegDone - VMOV S8,R12 - B _HandleWriteRegDone - VMOV S7,R12 - B _HandleWriteRegDone - VMOV S6,R12 - B _HandleWriteRegDone - VMOV S5,R12 - B _HandleWriteRegDone - VMOV S4,R12 - B _HandleWriteRegDone - VMOV S3,R12 - B _HandleWriteRegDone - VMOV S2,R12 - B _HandleWriteRegDone - VMOV S1,R12 - B _HandleWriteRegDone - VMOV S0,R12 - B _HandleWriteRegDone -#else - B _HandleWriteRegUnknown -#endif -_HandleWriteRegUnknown: - B.N _HandleWriteRegDone -_HandleWriteRegDone: - B _IndicateMonReady // Indicate that monitor has read data, processed command and is ready for a new one - .end -/****** End Of File *************************************************/ diff --git a/src/platform/nrf52/NRF52Bluetooth.cpp b/src/platform/nrf52/NRF52Bluetooth.cpp index dd81929c8..63d9331ad 100644 --- a/src/platform/nrf52/NRF52Bluetooth.cpp +++ b/src/platform/nrf52/NRF52Bluetooth.cpp @@ -1,20 +1,26 @@ #include "NRF52Bluetooth.h" +#include "BLEDfuSecure.h" #include "BluetoothCommon.h" +#include "PowerFSM.h" #include "configuration.h" #include "main.h" #include "mesh/PhoneAPI.h" #include "mesh/mesh-pb-constants.h" #include #include - static BLEService meshBleService = BLEService(BLEUuid(MESH_SERVICE_UUID_16)); static BLECharacteristic fromNum = BLECharacteristic(BLEUuid(FROMNUM_UUID_16)); static BLECharacteristic fromRadio = BLECharacteristic(BLEUuid(FROMRADIO_UUID_16)); static BLECharacteristic toRadio = BLECharacteristic(BLEUuid(TORADIO_UUID_16)); +static BLECharacteristic logRadio = BLECharacteristic(BLEUuid(LOGRADIO_UUID_16)); static BLEDis bledis; // DIS (Device Information Service) helper class instance static BLEBas blebas; // BAS (Battery Service) helper class instance +#ifndef BLE_DFU_SECURE static BLEDfu bledfu; // DFU software update helper service +#else +static BLEDfuSecure bledfusecure; // DFU software update helper service +#endif // This scratch buffer is used for various bluetooth reads/writes - but it is safe because only one bt operation can be in // process at once @@ -52,13 +58,10 @@ void onConnect(uint16_t conn_handle) // Get the reference to current connection BLEConnection *connection = Bluefruit.Connection(conn_handle); connectionHandle = conn_handle; - char central_name[32] = {0}; connection->getPeerName(central_name, sizeof(central_name)); - LOG_INFO("BLE Connected to %s\n", central_name); } - /** * Callback invoked when a connection is dropped * @param conn_handle connection where this event happens @@ -66,40 +69,41 @@ void onConnect(uint16_t conn_handle) */ void onDisconnect(uint16_t conn_handle, uint8_t reason) { - // FIXME - we currently assume only one active connection LOG_INFO("BLE Disconnected, reason = 0x%x\n", reason); + if (bluetoothPhoneAPI) { + bluetoothPhoneAPI->close(); + } } - void onCccd(uint16_t conn_hdl, BLECharacteristic *chr, uint16_t cccd_value) { // Display the raw request packet LOG_INFO("CCCD Updated: %u\n", cccd_value); - // Check the characteristic this CCCD update is associated with in case // this handler is used for multiple CCCD records. - if (chr->uuid == fromNum.uuid) { - if (chr->notifyEnabled(conn_hdl)) { - LOG_INFO("fromNum 'Notify' enabled\n"); + + // According to the GATT spec: cccd value = 0x0001 means notifications are enabled + // and cccd value = 0x0002 means indications are enabled + + if (chr->uuid == fromNum.uuid || chr->uuid == logRadio.uuid) { + auto result = cccd_value == 2 ? chr->indicateEnabled(conn_hdl) : chr->notifyEnabled(conn_hdl); + if (result) { + LOG_INFO("Notify/Indicate enabled\n"); } else { - LOG_INFO("fromNum 'Notify' disabled\n"); + LOG_INFO("Notify/Indicate disabled\n"); } } } - void startAdv(void) { // Advertising packet Bluefruit.Advertising.addFlags(BLE_GAP_ADV_FLAGS_LE_ONLY_GENERAL_DISC_MODE); - // IncludeService UUID // Bluefruit.ScanResponse.addService(meshBleService); Bluefruit.ScanResponse.addTxPower(); Bluefruit.ScanResponse.addName(); - // Include Name // Bluefruit.Advertising.addName(); Bluefruit.Advertising.addService(meshBleService); - /* Start Advertising * - Enable auto advertising if disconnected * - Interval: fast mode = 20 ms, slow mode = 152.5 ms @@ -114,7 +118,6 @@ void startAdv(void) Bluefruit.Advertising.setFastTimeout(30); // number of seconds in fast mode Bluefruit.Advertising.start(0); // 0 = Don't stop advertising after n seconds. FIXME, we should stop advertising after X } - // Just ack that the caller is allowed to read static void authorizeRead(uint16_t conn_hdl) { @@ -122,7 +125,6 @@ static void authorizeRead(uint16_t conn_hdl) reply.params.write.gatt_status = BLE_GATT_STATUS_SUCCESS; sd_ble_gatts_rw_authorize_reply(conn_hdl, &reply); } - /** * client is starting read, pull the bytes from our API class */ @@ -131,7 +133,6 @@ void onFromRadioAuthorize(uint16_t conn_hdl, BLECharacteristic *chr, ble_gatts_e if (request->offset == 0) { // If the read is long, we will get multiple authorize invocations - we only populate data on the first size_t numBytes = bluetoothPhoneAPI->getFromRadio(fromRadioBytes); - // Someone is going to read our value as soon as this callback returns. So fill it with the next message in the queue // or make empty if the queue is empty fromRadio.write(fromRadioBytes, numBytes); @@ -140,37 +141,31 @@ void onFromRadioAuthorize(uint16_t conn_hdl, BLECharacteristic *chr, ble_gatts_e } authorizeRead(conn_hdl); } +// Last ToRadio value received from the phone +static uint8_t lastToRadio[MAX_TO_FROM_RADIO_SIZE]; void onToRadioWrite(uint16_t conn_hdl, BLECharacteristic *chr, uint8_t *data, uint16_t len) { LOG_INFO("toRadioWriteCb data %p, len %u\n", data, len); - - bluetoothPhoneAPI->handleToRadio(data, len); -} - -/** - * client is starting read, pull the bytes from our API class - */ -void onFromNumAuthorize(uint16_t conn_hdl, BLECharacteristic *chr, ble_gatts_evt_read_t *request) -{ - LOG_INFO("fromNumAuthorizeCb\n"); - - authorizeRead(conn_hdl); + if (memcmp(lastToRadio, data, len) != 0) { + LOG_DEBUG("New ToRadio packet\n"); + memcpy(lastToRadio, data, len); + bluetoothPhoneAPI->handleToRadio(data, len); + } else { + LOG_DEBUG("Dropping duplicate ToRadio packet we just saw\n"); + } } void setupMeshService(void) { bluetoothPhoneAPI = new BluetoothPhoneAPI(); - meshBleService.begin(); - // Note: You must call .begin() on the BLEService before calling .begin() on // any characteristic(s) within that service definition.. Calling .begin() on // a BLECharacteristic will cause it to be added to the last BLEService that // was 'begin()'ed! auto secMode = config.bluetooth.mode == meshtastic_Config_BluetoothConfig_PairingMode_NO_PIN ? SECMODE_OPEN : SECMODE_ENC_NO_MITM; - fromNum.setProperties(CHR_PROPS_NOTIFY | CHR_PROPS_READ); fromNum.setPermission(secMode, SECMODE_NO_ACCESS); // FIXME, secure this!!! fromNum.setFixedLen( @@ -200,30 +195,46 @@ void setupMeshService(void) // We don't call this callback via the adafruit queue, because we can safely run in the BLE context toRadio.setWriteCallback(onToRadioWrite, false); toRadio.begin(); + + logRadio.setProperties(CHR_PROPS_INDICATE | CHR_PROPS_NOTIFY | CHR_PROPS_READ); + logRadio.setPermission(secMode, SECMODE_NO_ACCESS); + logRadio.setMaxLen(512); + logRadio.setCccdWriteCallback(onCccd); + logRadio.write32(0); + logRadio.begin(); } - -// FIXME, turn off soft device access for debugging -static bool isSoftDeviceAllowed = true; static uint32_t configuredPasskey; - void NRF52Bluetooth::shutdown() { // Shutdown bluetooth for minimum power draw LOG_INFO("Disable NRF52 bluetooth\n"); + uint8_t connection_num = Bluefruit.connected(); + if (connection_num) { + for (uint8_t i = 0; i < connection_num; i++) { + LOG_INFO("NRF52 bluetooth disconnecting handle %d\n", i); + Bluefruit.disconnect(i); + } + delay(100); // wait for ondisconnect; + } Bluefruit.Advertising.stop(); - Bluefruit.setTxPower(0); // Minimum power } - +void NRF52Bluetooth::startDisabled() +{ + // Setup Bluetooth + nrf52Bluetooth->setup(); + // Shutdown bluetooth for minimum power draw + Bluefruit.Advertising.stop(); + Bluefruit.setTxPower(-40); // Minimum power + LOG_INFO("Disabling NRF52 Bluetooth. (Workaround: tx power min, advertising stopped)\n"); +} bool NRF52Bluetooth::isConnected() { return Bluefruit.connected(connectionHandle); } - int NRF52Bluetooth::getRssi() { return 0; // FIXME figure out where to source this } - void NRF52Bluetooth::setup() { // Initialise the Bluefruit module @@ -231,12 +242,10 @@ void NRF52Bluetooth::setup() Bluefruit.autoConnLed(false); Bluefruit.configPrphBandwidth(BANDWIDTH_MAX); Bluefruit.begin(); - // Clear existing data. Bluefruit.Advertising.stop(); Bluefruit.Advertising.clearData(); Bluefruit.ScanResponse.clearData(); - if (config.bluetooth.mode != meshtastic_Config_BluetoothConfig_PairingMode_NO_PIN) { configuredPasskey = config.bluetooth.mode == meshtastic_Config_BluetoothConfig_PairingMode_FIXED_PIN ? config.bluetooth.fixed_pin @@ -255,66 +264,89 @@ void NRF52Bluetooth::setup() } // Set the advertised device name (keep it short!) Bluefruit.setName(getDeviceName()); - // Set the connect/disconnect callback handlers Bluefruit.Periph.setConnectCallback(onConnect); Bluefruit.Periph.setDisconnectCallback(onDisconnect); - +#ifndef BLE_DFU_SECURE bledfu.setPermission(SECMODE_ENC_WITH_MITM, SECMODE_ENC_WITH_MITM); bledfu.begin(); // Install the DFU helper - +#else + bledfusecure.setPermission(SECMODE_ENC_WITH_MITM, SECMODE_ENC_WITH_MITM); // add by WayenWeng + bledfusecure.begin(); // Install the DFU helper +#endif // Configure and Start the Device Information Service LOG_INFO("Configuring the Device Information Service\n"); bledis.setModel(optstr(HW_VERSION)); bledis.setFirmwareRev(optstr(APP_VERSION)); bledis.begin(); - // Start the BLE Battery Service and set it to 100% LOG_INFO("Configuring the Battery Service\n"); blebas.begin(); blebas.write(0); // Unknown battery level for now - // Setup the Heart Rate Monitor service using // BLEService and BLECharacteristic classes LOG_INFO("Configuring the Mesh bluetooth service\n"); setupMeshService(); - - // Supposedly debugging works with soft device if you disable advertising - if (isSoftDeviceAllowed) { - // Setup the advertising packet(s) - LOG_INFO("Setting up the advertising payload(s)\n"); - startAdv(); - - LOG_INFO("Advertising\n"); - } + // Setup the advertising packet(s) + LOG_INFO("Setting up the advertising payload(s)\n"); + startAdv(); + LOG_INFO("Advertising\n"); +} +void NRF52Bluetooth::resumeAdvertising() +{ + Bluefruit.Advertising.restartOnDisconnect(true); + Bluefruit.Advertising.setInterval(32, 244); // in unit of 0.625 ms + Bluefruit.Advertising.setFastTimeout(30); // number of seconds in fast mode + Bluefruit.Advertising.start(0); } - /// Given a level between 0-100, update the BLE attribute void updateBatteryLevel(uint8_t level) { blebas.write(level); } - void NRF52Bluetooth::clearBonds() { LOG_INFO("Clearing bluetooth bonds!\n"); bond_print_list(BLE_GAP_ROLE_PERIPH); bond_print_list(BLE_GAP_ROLE_CENTRAL); - Bluefruit.Periph.clearBonds(); Bluefruit.Central.clearBonds(); } - void NRF52Bluetooth::onConnectionSecured(uint16_t conn_handle) { LOG_INFO("BLE connection secured\n"); } - bool NRF52Bluetooth::onPairingPasskey(uint16_t conn_handle, uint8_t const passkey[6], bool match_request) { LOG_INFO("BLE pairing process started with passkey %.3s %.3s\n", passkey, passkey + 3); - screen->startBluetoothPinScreen(configuredPasskey); + powerFSM.trigger(EVENT_BLUETOOTH_PAIR); +#if !defined(MESHTASTIC_EXCLUDE_SCREEN) + screen->startAlert([](OLEDDisplay *display, OLEDDisplayUiState *state, int16_t x, int16_t y) -> void { + char btPIN[16] = "888888"; + snprintf(btPIN, sizeof(btPIN), "%06u", configuredPasskey); + int x_offset = display->width() / 2; + int y_offset = display->height() <= 80 ? 0 : 32; + display->setTextAlignment(TEXT_ALIGN_CENTER); + display->setFont(FONT_MEDIUM); + display->drawString(x_offset + x, y_offset + y, "Bluetooth"); + display->setFont(FONT_SMALL); + y_offset = display->height() == 64 ? y_offset + FONT_HEIGHT_MEDIUM - 4 : y_offset + FONT_HEIGHT_MEDIUM + 5; + display->drawString(x_offset + x, y_offset + y, "Enter this code"); + + display->setFont(FONT_LARGE); + String displayPin(btPIN); + String pin = displayPin.substring(0, 3) + " " + displayPin.substring(3, 6); + y_offset = display->height() == 64 ? y_offset + FONT_HEIGHT_SMALL - 5 : y_offset + FONT_HEIGHT_SMALL + 5; + display->drawString(x_offset + x, y_offset + y, pin); + + display->setFont(FONT_SMALL); + String deviceName = "Name: "; + deviceName.concat(getDeviceName()); + y_offset = display->height() == 64 ? y_offset + FONT_HEIGHT_LARGE - 6 : y_offset + FONT_HEIGHT_LARGE + 5; + display->drawString(x_offset + x, y_offset + y, deviceName); + }); +#endif if (match_request) { uint32_t start_time = millis(); while (millis() < start_time + 30000) { @@ -325,13 +357,21 @@ bool NRF52Bluetooth::onPairingPasskey(uint16_t conn_handle, uint8_t const passke LOG_INFO("BLE passkey pairing: match_request=%i\n", match_request); return true; } - void NRF52Bluetooth::onPairingCompleted(uint16_t conn_handle, uint8_t auth_status) { if (auth_status == BLE_GAP_SEC_STATUS_SUCCESS) LOG_INFO("BLE pairing success\n"); else LOG_INFO("BLE pairing failed\n"); + screen->endAlert(); +} - screen->stopBluetoothPinScreen(); +void NRF52Bluetooth::sendLog(const uint8_t *logMessage, size_t length) +{ + if (!isConnected() || length > 512) + return; + if (logRadio.indicateEnabled()) + logRadio.indicate(logMessage, (uint16_t)length); + else + logRadio.notify(logMessage, (uint16_t)length); } \ No newline at end of file diff --git a/src/platform/nrf52/NRF52Bluetooth.h b/src/platform/nrf52/NRF52Bluetooth.h index 193e86cf8..2229163f8 100644 --- a/src/platform/nrf52/NRF52Bluetooth.h +++ b/src/platform/nrf52/NRF52Bluetooth.h @@ -8,13 +8,15 @@ class NRF52Bluetooth : BluetoothApi public: void setup(); void shutdown(); + void startDisabled(); + void resumeAdvertising(); void clearBonds(); bool isConnected(); int getRssi(); + void sendLog(const uint8_t *logMessage, size_t length); private: static void onConnectionSecured(uint16_t conn_handle); - void convertToUint8(uint8_t target[4], uint32_t source); static bool onPairingPasskey(uint16_t conn_handle, uint8_t const passkey[6], bool match_request); static void onPairingCompleted(uint16_t conn_handle, uint8_t auth_status); -}; +}; \ No newline at end of file diff --git a/src/platform/nrf52/NRF52CryptoEngine.cpp b/src/platform/nrf52/NRF52CryptoEngine.cpp index a7cf3d5bf..5de13c58b 100644 --- a/src/platform/nrf52/NRF52CryptoEngine.cpp +++ b/src/platform/nrf52/NRF52CryptoEngine.cpp @@ -9,41 +9,24 @@ class NRF52CryptoEngine : public CryptoEngine ~NRF52CryptoEngine() {} - /** - * Encrypt a packet - * - * @param bytes is updated in place - */ - virtual void encrypt(uint32_t fromNode, uint64_t packetId, size_t numBytes, uint8_t *bytes) override + virtual void encryptAESCtr(CryptoKey _key, uint8_t *_nonce, size_t numBytes, uint8_t *bytes) override { - if (key.length > 16) { - LOG_DEBUG("Software encrypt fr=%x, num=%x, numBytes=%d!\n", fromNode, (uint32_t)packetId, numBytes); + if (_key.length > 16) { AES_ctx ctx; - initNonce(fromNode, packetId); - AES_init_ctx_iv(&ctx, key.bytes, nonce); + AES_init_ctx_iv(&ctx, _key.bytes, _nonce); AES_CTR_xcrypt_buffer(&ctx, bytes, numBytes); - } else if (key.length > 0) { - LOG_DEBUG("nRF52 encrypt fr=%x, num=%x, numBytes=%d!\n", fromNode, (uint32_t)packetId, numBytes); + } else if (_key.length > 0) { nRFCrypto.begin(); nRFCrypto_AES ctx; uint8_t myLen = ctx.blockLen(numBytes); char encBuf[myLen] = {0}; - initNonce(fromNode, packetId); ctx.begin(); - ctx.Process((char *)bytes, numBytes, nonce, key.bytes, key.length, encBuf, ctx.encryptFlag, ctx.ctrMode); + ctx.Process((char *)bytes, numBytes, _nonce, _key.bytes, _key.length, encBuf, ctx.encryptFlag, ctx.ctrMode); ctx.end(); nRFCrypto.end(); memcpy(bytes, encBuf, numBytes); } } - - virtual void decrypt(uint32_t fromNode, uint64_t packetId, size_t numBytes, uint8_t *bytes) override - { - // For CTR, the implementation is the same - encrypt(fromNode, packetId, numBytes, bytes); - } - - private: }; -CryptoEngine *crypto = new NRF52CryptoEngine(); +CryptoEngine *crypto = new NRF52CryptoEngine(); \ No newline at end of file diff --git a/src/platform/nrf52/architecture.h b/src/platform/nrf52/architecture.h index 35cd4fd84..b2b7b5a20 100644 --- a/src/platform/nrf52/architecture.h +++ b/src/platform/nrf52/architecture.h @@ -32,6 +32,9 @@ #ifndef HAS_CPU_SHUTDOWN #define HAS_CPU_SHUTDOWN 1 #endif +#ifndef HAS_CUSTOM_CRYPTO_ENGINE +#define HAS_CUSTOM_CRYPTO_ENGINE 1 +#endif // // set HW_VENDOR @@ -42,6 +45,8 @@ #define HW_VENDOR meshtastic_HardwareModel_NRF52840DK #elif defined(ARDUINO_NRF52840_PPR) #define HW_VENDOR meshtastic_HardwareModel_PPR +#elif defined(RAK2560) +#define HW_VENDOR meshtastic_HardwareModel_RAK2560 #elif defined(RAK4630) #define HW_VENDOR meshtastic_HardwareModel_RAK4631 #elif defined(TTGO_T_ECHO) @@ -52,8 +57,22 @@ #define HW_VENDOR meshtastic_HardwareModel_CANARYONE #elif defined(NORDIC_PCA10059) #define HW_VENDOR meshtastic_HardwareModel_NRF52840_PCA10059 +#elif defined(TWC_MESH_V4) +#define HW_VENDOR meshtastic_HardwareModel_TWC_MESH_V4 +#elif defined(NRF52_PROMICRO_DIY) +#define HW_VENDOR meshtastic_HardwareModel_NRF52_PROMICRO_DIY +#elif defined(WIO_WM1110) +#define HW_VENDOR meshtastic_HardwareModel_WIO_WM1110 +#elif defined(TRACKER_T1000_E) +#define HW_VENDOR meshtastic_HardwareModel_TRACKER_T1000_E +#elif defined(ME25LS01_4Y10TD) +#define HW_VENDOR meshtastic_HardwareModel_ME25LS01_4Y10TD +#elif defined(MS24SF1) +#define HW_VENDOR meshtastic_HardwareModel_MS24SF1 #elif defined(PRIVATE_HW) || defined(FEATHER_DIY) #define HW_VENDOR meshtastic_HardwareModel_PRIVATE_HW +#elif defined(HELTEC_T114) +#define HW_VENDOR meshtastic_HardwareModel_HELTEC_MESH_NODE_T114 #else #define HW_VENDOR meshtastic_HardwareModel_NRF52_UNKNOWN #endif @@ -65,23 +84,19 @@ #ifdef ARDUINO_NRF52840_PCA10056 // This board uses 0 to be mean LED on -#undef LED_INVERTED -#define LED_INVERTED 1 +#undef LED_STATE_ON +#define LED_STATE_ON 0 // State when LED is lit #endif #ifdef _SEEED_XIAO_NRF52840_SENSE_H_ // This board uses 0 to be mean LED on -#undef LED_INVERTED -#define LED_INVERTED 1 +#undef LED_STATE_ON +#define LED_STATE_ON 0 // State when LED is lit #endif -#ifndef TTGO_T_ECHO -#define GPS_UBLOX -#endif - #define LED_PIN PIN_LED1 // LED1 on nrf52840-DK #ifdef PIN_BUTTON1 diff --git a/src/platform/nrf52/main-nrf52.cpp b/src/platform/nrf52/main-nrf52.cpp index 63b014c46..f9329d875 100644 --- a/src/platform/nrf52/main-nrf52.cpp +++ b/src/platform/nrf52/main-nrf52.cpp @@ -9,8 +9,10 @@ #include // #include #include "NodeDB.h" +#include "PowerMon.h" #include "error.h" #include "main.h" +#include "meshUtils.h" #ifdef BQ25703A_ADDR #include "BQ25713.h" @@ -63,31 +65,59 @@ static void initBrownout() // We don't bother with setting up brownout if soft device is disabled - because during production we always use softdevice } -static bool bleOn = false; -static const bool useSoftDevice = true; // Set to false for easier debugging +// This is a public global so that the debugger can set it to false automatically from our gdbinit +bool useSoftDevice = true; // Set to false for easier debugging -void setBluetoothEnable(bool on) +#if !MESHTASTIC_EXCLUDE_BLUETOOTH +void setBluetoothEnable(bool enable) { - if (on != bleOn && config.bluetooth.enabled == true) { - if (on) { - if (!nrf52Bluetooth) { - if (!useSoftDevice) - LOG_INFO("DISABLING NRF52 BLUETOOTH WHILE DEBUGGING\n"); - else { - nrf52Bluetooth = new NRF52Bluetooth(); - nrf52Bluetooth->setup(); + // For debugging use: don't use bluetooth + if (!useSoftDevice) { + if (enable) + LOG_INFO("DISABLING NRF52 BLUETOOTH WHILE DEBUGGING\n"); + return; + } - // We delay brownout init until after BLE because BLE starts soft device - initBrownout(); - } - } - } else if (nrf52Bluetooth) { - nrf52Bluetooth->shutdown(); + // If user disabled bluetooth: init then disable advertising & reduce power + // Workaround. Avoid issue where device hangs several days after boot.. + // Allegedly, no significant increase in power consumption + if (!config.bluetooth.enabled) { + static bool initialized = false; + if (!initialized) { + nrf52Bluetooth = new NRF52Bluetooth(); + nrf52Bluetooth->startDisabled(); + initBrownout(); + initialized = true; } - bleOn = on; + return; + } + + if (enable) { + powerMon->setState(meshtastic_PowerMon_State_BT_On); + + // If not yet set-up + if (!nrf52Bluetooth) { + LOG_DEBUG("Initializing NRF52 Bluetooth\n"); + nrf52Bluetooth = new NRF52Bluetooth(); + nrf52Bluetooth->setup(); + + // We delay brownout init until after BLE because BLE starts soft device + initBrownout(); + } + // Already setup, apparently + else + nrf52Bluetooth->resumeAdvertising(); + } + // Disable (if previously set-up) + else if (nrf52Bluetooth) { + powerMon->clearState(meshtastic_PowerMon_State_BT_On); + nrf52Bluetooth->shutdown(); } } - +#else +#warning NRF52 "Bluetooth disable" workaround does not apply to builds with MESHTASTIC_EXCLUDE_BLUETOOTH +void setBluetoothEnable(bool enable) {} +#endif /** * Override printf to use the SEGGER output library (note - this does not effect the printf method on the debug console) */ @@ -126,13 +156,44 @@ void nrf52Loop() checkSDEvents(); } +#ifdef USE_SEMIHOSTING +#include +#include + +/** + * Note: this variable is in BSS and therfore false by default. But the gdbinit + * file will be installing a temporary breakpoint that changes wantSemihost to true. + */ +bool wantSemihost; + +/** + * Turn on semihosting if the ICE debugger wants it. + */ +void nrf52InitSemiHosting() +{ + if (wantSemihost) { + static SemihostingStream semiStream; + // We must dynamically alloc because the constructor does semihost operations which + // would crash any load not talking to a debugger + semiStream.open(); + semiStream.println("Semihosting starts!"); + // Redirect our serial output to instead go via the ICE port + console->setDestination(&semiStream); + } +} +#endif + void nrf52Setup() { - auto why = NRF_POWER->RESETREAS; + uint32_t why = NRF_POWER->RESETREAS; // per // https://infocenter.nordicsemi.com/index.jsp?topic=%2Fcom.nordic.infocenter.nrf52832.ps.v1.1%2Fpower.html LOG_DEBUG("Reset reason: 0x%x\n", why); +#ifdef USE_SEMIHOSTING + nrf52InitSemiHosting(); +#endif + // Per // https://devzone.nordicsemi.com/nordic/nordic-blog/b/blog/posts/monitor-mode-debugging-with-j-link-and-gdbeclipse // This is the recommended setting for Monitor Mode Debugging @@ -176,22 +237,44 @@ void cpuDeepSleep(uint32_t msecToWake) #ifdef PIN_3V3_EN digitalWrite(PIN_3V3_EN, LOW); #endif -#ifndef USE_EINK +#ifdef AQ_SET_PIN // RAK-12039 set pin for Air quality sensor digitalWrite(AQ_SET_PIN, LOW); #endif +#ifdef RAK14014 + // GPIO restores input status, otherwise there will be leakage current + nrf_gpio_cfg_default(TFT_BL); + nrf_gpio_cfg_default(TFT_DC); + nrf_gpio_cfg_default(TFT_CS); + nrf_gpio_cfg_default(TFT_SCLK); + nrf_gpio_cfg_default(TFT_MOSI); + nrf_gpio_cfg_default(TFT_MISO); + nrf_gpio_cfg_default(SCREEN_TOUCH_INT); + nrf_gpio_cfg_default(WB_I2C1_SCL); + nrf_gpio_cfg_default(WB_I2C1_SDA); +#endif +#endif + +#ifdef HELTEC_MESH_NODE_T114 + nrf_gpio_cfg_default(PIN_GPS_PPS); + detachInterrupt(PIN_GPS_PPS); + detachInterrupt(PIN_BUTTON1); #endif // Sleepy trackers or sensors can low power "sleep" // Don't enter this if we're sleeping portMAX_DELAY, since that's a shutdown event if (msecToWake != portMAX_DELAY && - (config.device.role == meshtastic_Config_DeviceConfig_Role_TRACKER || - config.device.role == meshtastic_Config_DeviceConfig_Role_TAK_TRACKER || - config.device.role == meshtastic_Config_DeviceConfig_Role_SENSOR) && - config.power.is_power_saving == true) { + (IS_ONE_OF(config.device.role, meshtastic_Config_DeviceConfig_Role_TRACKER, + meshtastic_Config_DeviceConfig_Role_TAK_TRACKER, meshtastic_Config_DeviceConfig_Role_SENSOR) && + config.power.is_power_saving == true)) { sd_power_mode_set(NRF_POWER_MODE_LOWPWR); delay(msecToWake); NVIC_SystemReset(); } else { + // Resume on user button press + // https://github.com/lyusupov/SoftRF/blob/81c519ca75693b696752235d559e881f2e0511ee/software/firmware/source/SoftRF/src/platform/nRF52.cpp#L1738 + constexpr uint32_t DFU_MAGIC_SKIP = 0x6d; + sd_power_gpregret_set(0, DFU_MAGIC_SKIP); // Equivalent NRF_POWER->GPREGRET = DFU_MAGIC_SKIP + // FIXME, use system off mode with ram retention for key state? // FIXME, use non-init RAM per // https://devzone.nordicsemi.com/f/nordic-q-a/48919/ram-retention-settings-with-softdevice-enabled @@ -220,5 +303,10 @@ void clearBonds() void enterDfuMode() { +// SDK kit does not have native USB like almost all other NRF52 boards +#ifdef NRF_USE_SERIAL_DFU + enterSerialDfu(); +#else enterUf2Dfu(); +#endif } \ No newline at end of file diff --git a/src/platform/nrf52/nrf52840_s140_v7.ld b/src/platform/nrf52/nrf52840_s140_v7.ld new file mode 100644 index 000000000..6aaeb4034 --- /dev/null +++ b/src/platform/nrf52/nrf52840_s140_v7.ld @@ -0,0 +1,38 @@ +/* Linker script to configure memory regions. */ + +SEARCH_DIR(.) +GROUP(-lgcc -lc -lnosys) + +MEMORY +{ + FLASH (rx) : ORIGIN = 0x27000, LENGTH = 0xED000 - 0x27000 + + /* SRAM required by Softdevice depend on + * - Attribute Table Size (Number of Services and Characteristics) + * - Vendor UUID count + * - Max ATT MTU + * - Concurrent connection peripheral + central + secure links + * - Event Len, HVN queue, Write CMD queue + */ + RAM (rwx) : ORIGIN = 0x20006000, LENGTH = 0x20040000 - 0x20006000 +} + +SECTIONS +{ + . = ALIGN(4); + .svc_data : + { + PROVIDE(__start_svc_data = .); + KEEP(*(.svc_data)) + PROVIDE(__stop_svc_data = .); + } > RAM + + .fs_data : + { + PROVIDE(__start_fs_data = .); + KEEP(*(.fs_data)) + PROVIDE(__stop_fs_data = .); + } > RAM +} INSERT AFTER .data; + +INCLUDE "nrf52_common.ld" diff --git a/src/platform/nrf52/pgmspace.h b/src/platform/nrf52/pgmspace.h deleted file mode 100644 index 5ad8035be..000000000 --- a/src/platform/nrf52/pgmspace.h +++ /dev/null @@ -1,5 +0,0 @@ -#pragma once - -// dummy file to keep old arduino code happy -#define PROGMEM -#define pgm_read_byte(addr) (*((unsigned const char *)addr)) \ No newline at end of file diff --git a/src/platform/nrf52/softdevice/ble.h b/src/platform/nrf52/softdevice/ble.h new file mode 100644 index 000000000..177b436ad --- /dev/null +++ b/src/platform/nrf52/softdevice/ble.h @@ -0,0 +1,652 @@ +/* + * Copyright (c) Nordic Semiconductor ASA + * All rights reserved. + * + * Redistribution and use in source and binary forms, with or without modification, + * are permitted provided that the following conditions are met: + * + * 1. Redistributions of source code must retain the above copyright notice, this + * list of conditions and the following disclaimer. + * + * 2. Redistributions in binary form, except as embedded into a Nordic + * Semiconductor ASA integrated circuit in a product or a software update for + * such product, must reproduce the above copyright notice, this list of + * conditions and the following disclaimer in the documentation and/or other + * materials provided with the distribution. + * + * 3. Neither the name of Nordic Semiconductor ASA nor the names of its + * contributors may be used to endorse or promote products derived from this + * software without specific prior written permission. + * + * 4. This software, with or without modification, must only be used with a + * Nordic Semiconductor ASA integrated circuit. + * + * 5. Any software provided in binary form under this license must not be reverse + * engineered, decompiled, modified and/or disassembled. + * + * THIS SOFTWARE IS PROVIDED BY NORDIC SEMICONDUCTOR ASA "AS IS" AND ANY EXPRESS + * OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES + * OF MERCHANTABILITY, NONINFRINGEMENT, AND FITNESS FOR A PARTICULAR PURPOSE ARE + * DISCLAIMED. IN NO EVENT SHALL NORDIC SEMICONDUCTOR ASA OR CONTRIBUTORS BE + * LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR + * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE + * GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) + * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT + * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT + * OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + */ + +/** + @addtogroup BLE_COMMON BLE SoftDevice Common + @{ + @defgroup ble_api Events, type definitions and API calls + @{ + + @brief Module independent events, type definitions and API calls for the BLE SoftDevice. + + */ + +#ifndef BLE_H__ +#define BLE_H__ + +#include "ble_err.h" +#include "ble_gap.h" +#include "ble_gatt.h" +#include "ble_gattc.h" +#include "ble_gatts.h" +#include "ble_l2cap.h" +#include "nrf_error.h" +#include "nrf_svc.h" +#include + +#ifdef __cplusplus +extern "C" { +#endif + +/** @addtogroup BLE_COMMON_ENUMERATIONS Enumerations + * @{ */ + +/** + * @brief Common API SVC numbers. + */ +enum BLE_COMMON_SVCS { + SD_BLE_ENABLE = BLE_SVC_BASE, /**< Enable and initialize the BLE stack */ + SD_BLE_EVT_GET, /**< Get an event from the pending events queue. */ + SD_BLE_UUID_VS_ADD, /**< Add a Vendor Specific base UUID. */ + SD_BLE_UUID_DECODE, /**< Decode UUID bytes. */ + SD_BLE_UUID_ENCODE, /**< Encode UUID bytes. */ + SD_BLE_VERSION_GET, /**< Get the local version information (company ID, Link Layer Version, Link Layer Subversion). */ + SD_BLE_USER_MEM_REPLY, /**< User Memory Reply. */ + SD_BLE_OPT_SET, /**< Set a BLE option. */ + SD_BLE_OPT_GET, /**< Get a BLE option. */ + SD_BLE_CFG_SET, /**< Add a configuration to the BLE stack. */ + SD_BLE_UUID_VS_REMOVE, /**< Remove a Vendor Specific base UUID. */ +}; + +/** + * @brief BLE Module Independent Event IDs. + */ +enum BLE_COMMON_EVTS { + BLE_EVT_USER_MEM_REQUEST = BLE_EVT_BASE + 0, /**< User Memory request. See @ref ble_evt_user_mem_request_t + \n Reply with @ref sd_ble_user_mem_reply. */ + BLE_EVT_USER_MEM_RELEASE = BLE_EVT_BASE + 1, /**< User Memory release. See @ref ble_evt_user_mem_release_t */ +}; + +/**@brief BLE Connection Configuration IDs. + * + * IDs that uniquely identify a connection configuration. + */ +enum BLE_CONN_CFGS { + BLE_CONN_CFG_GAP = BLE_CONN_CFG_BASE + 0, /**< BLE GAP specific connection configuration. */ + BLE_CONN_CFG_GATTC = BLE_CONN_CFG_BASE + 1, /**< BLE GATTC specific connection configuration. */ + BLE_CONN_CFG_GATTS = BLE_CONN_CFG_BASE + 2, /**< BLE GATTS specific connection configuration. */ + BLE_CONN_CFG_GATT = BLE_CONN_CFG_BASE + 3, /**< BLE GATT specific connection configuration. */ + BLE_CONN_CFG_L2CAP = BLE_CONN_CFG_BASE + 4, /**< BLE L2CAP specific connection configuration. */ +}; + +/**@brief BLE Common Configuration IDs. + * + * IDs that uniquely identify a common configuration. + */ +enum BLE_COMMON_CFGS { + BLE_COMMON_CFG_VS_UUID = BLE_CFG_BASE, /**< Vendor specific base UUID configuration */ +}; + +/**@brief Common Option IDs. + * IDs that uniquely identify a common option. + */ +enum BLE_COMMON_OPTS { + BLE_COMMON_OPT_PA_LNA = BLE_OPT_BASE + 0, /**< PA and LNA options */ + BLE_COMMON_OPT_CONN_EVT_EXT = BLE_OPT_BASE + 1, /**< Extended connection events option */ + BLE_COMMON_OPT_EXTENDED_RC_CAL = BLE_OPT_BASE + 2, /**< Extended RC calibration option */ +}; + +/** @} */ + +/** @addtogroup BLE_COMMON_DEFINES Defines + * @{ */ + +/** @brief Required pointer alignment for BLE Events. + */ +#define BLE_EVT_PTR_ALIGNMENT 4 + +/** @brief Leaves the maximum of the two arguments. + */ +#define BLE_MAX(a, b) ((a) < (b) ? (b) : (a)) + +/** @brief Maximum possible length for BLE Events. + * @note The highest value used for @ref ble_gatt_conn_cfg_t::att_mtu in any connection configuration shall be used as a + * parameter. If that value has not been configured for any connections then @ref BLE_GATT_ATT_MTU_DEFAULT must be used instead. + */ +#define BLE_EVT_LEN_MAX(ATT_MTU) \ + (offsetof(ble_evt_t, evt.gattc_evt.params.prim_srvc_disc_rsp.services) + ((ATT_MTU)-1) / 4 * sizeof(ble_gattc_service_t)) + +/** @defgroup BLE_USER_MEM_TYPES User Memory Types + * @{ */ +#define BLE_USER_MEM_TYPE_INVALID 0x00 /**< Invalid User Memory Types. */ +#define BLE_USER_MEM_TYPE_GATTS_QUEUED_WRITES 0x01 /**< User Memory for GATTS queued writes. */ +/** @} */ + +/** @defgroup BLE_UUID_VS_COUNTS Vendor Specific base UUID counts + * @{ + */ +#define BLE_UUID_VS_COUNT_DEFAULT 10 /**< Default VS UUID count. */ +#define BLE_UUID_VS_COUNT_MAX 254 /**< Maximum VS UUID count. */ +/** @} */ + +/** @defgroup BLE_COMMON_CFG_DEFAULTS Configuration defaults. + * @{ + */ +#define BLE_CONN_CFG_TAG_DEFAULT 0 /**< Default configuration tag, SoftDevice default connection configuration. */ + +/** @} */ + +/** @} */ + +/** @addtogroup BLE_COMMON_STRUCTURES Structures + * @{ */ + +/**@brief User Memory Block. */ +typedef struct { + uint8_t *p_mem; /**< Pointer to the start of the user memory block. */ + uint16_t len; /**< Length in bytes of the user memory block. */ +} ble_user_mem_block_t; + +/**@brief Event structure for @ref BLE_EVT_USER_MEM_REQUEST. */ +typedef struct { + uint8_t type; /**< User memory type, see @ref BLE_USER_MEM_TYPES. */ +} ble_evt_user_mem_request_t; + +/**@brief Event structure for @ref BLE_EVT_USER_MEM_RELEASE. */ +typedef struct { + uint8_t type; /**< User memory type, see @ref BLE_USER_MEM_TYPES. */ + ble_user_mem_block_t mem_block; /**< User memory block */ +} ble_evt_user_mem_release_t; + +/**@brief Event structure for events not associated with a specific function module. */ +typedef struct { + uint16_t conn_handle; /**< Connection Handle on which this event occurred. */ + union { + ble_evt_user_mem_request_t user_mem_request; /**< User Memory Request Event Parameters. */ + ble_evt_user_mem_release_t user_mem_release; /**< User Memory Release Event Parameters. */ + } params; /**< Event parameter union. */ +} ble_common_evt_t; + +/**@brief BLE Event header. */ +typedef struct { + uint16_t evt_id; /**< Value from a BLE__EVT series. */ + uint16_t evt_len; /**< Length in octets including this header. */ +} ble_evt_hdr_t; + +/**@brief Common BLE Event type, wrapping the module specific event reports. */ +typedef struct { + ble_evt_hdr_t header; /**< Event header. */ + union { + ble_common_evt_t common_evt; /**< Common Event, evt_id in BLE_EVT_* series. */ + ble_gap_evt_t gap_evt; /**< GAP originated event, evt_id in BLE_GAP_EVT_* series. */ + ble_gattc_evt_t gattc_evt; /**< GATT client originated event, evt_id in BLE_GATTC_EVT* series. */ + ble_gatts_evt_t gatts_evt; /**< GATT server originated event, evt_id in BLE_GATTS_EVT* series. */ + ble_l2cap_evt_t l2cap_evt; /**< L2CAP originated event, evt_id in BLE_L2CAP_EVT* series. */ + } evt; /**< Event union. */ +} ble_evt_t; + +/** + * @brief Version Information. + */ +typedef struct { + uint8_t version_number; /**< Link Layer Version number. See + https://www.bluetooth.org/en-us/specification/assigned-numbers/link-layer for assigned values. */ + uint16_t company_id; /**< Company ID, Nordic Semiconductor's company ID is 89 (0x0059) + (https://www.bluetooth.org/apps/content/Default.aspx?doc_id=49708). */ + uint16_t + subversion_number; /**< Link Layer Sub Version number, corresponds to the SoftDevice Config ID or Firmware ID (FWID). */ +} ble_version_t; + +/** + * @brief Configuration parameters for the PA and LNA. + */ +typedef struct { + uint8_t enable : 1; /**< Enable toggling for this amplifier */ + uint8_t active_high : 1; /**< Set the pin to be active high */ + uint8_t gpio_pin : 6; /**< The GPIO pin to toggle for this amplifier */ +} ble_pa_lna_cfg_t; + +/** + * @brief PA & LNA GPIO toggle configuration + * + * This option configures the SoftDevice to toggle pins when the radio is active for use with a power amplifier and/or + * a low noise amplifier. + * + * Toggling the pins is achieved by using two PPI channels and a GPIOTE channel. The hardware channel IDs are provided + * by the application and should be regarded as reserved as long as any PA/LNA toggling is enabled. + * + * @note @ref sd_ble_opt_get is not supported for this option. + * @note Setting this option while the radio is in use (i.e. any of the roles are active) may have undefined consequences + * and must be avoided by the application. + */ +typedef struct { + ble_pa_lna_cfg_t pa_cfg; /**< Power Amplifier configuration */ + ble_pa_lna_cfg_t lna_cfg; /**< Low Noise Amplifier configuration */ + + uint8_t ppi_ch_id_set; /**< PPI channel used for radio pin setting */ + uint8_t ppi_ch_id_clr; /**< PPI channel used for radio pin clearing */ + uint8_t gpiote_ch_id; /**< GPIOTE channel used for radio pin toggling */ +} ble_common_opt_pa_lna_t; + +/** + * @brief Configuration of extended BLE connection events. + * + * When enabled the SoftDevice will dynamically extend the connection event when possible. + * + * The connection event length is controlled by the connection configuration as set by @ref ble_gap_conn_cfg_t::event_length. + * The connection event can be extended if there is time to send another packet pair before the start of the next connection + * interval, and if there are no conflicts with other BLE roles requesting radio time. + * + * @note @ref sd_ble_opt_get is not supported for this option. + */ +typedef struct { + uint8_t enable : 1; /**< Enable extended BLE connection events, disabled by default. */ +} ble_common_opt_conn_evt_ext_t; + +/** + * @brief Enable/disable extended RC calibration. + * + * If extended RC calibration is enabled and the internal RC oscillator (@ref NRF_CLOCK_LF_SRC_RC) is used as the SoftDevice + * LFCLK source, the SoftDevice as a peripheral will by default try to increase the receive window if two consecutive packets + * are not received. If it turns out that the packets were not received due to clock drift, the RC calibration is started. + * This calibration comes in addition to the periodic calibration that is configured by @ref sd_softdevice_enable(). When + * using only peripheral connections, the periodic calibration can therefore be configured with a much longer interval as the + * peripheral will be able to detect and adjust automatically to clock drift, and calibrate on demand. + * + * If extended RC calibration is disabled and the internal RC oscillator is used as the SoftDevice LFCLK source, the + * RC oscillator is calibrated periodically as configured by @ref sd_softdevice_enable(). + * + * @note @ref sd_ble_opt_get is not supported for this option. + */ +typedef struct { + uint8_t enable : 1; /**< Enable extended RC calibration, enabled by default. */ +} ble_common_opt_extended_rc_cal_t; + +/**@brief Option structure for common options. */ +typedef union { + ble_common_opt_pa_lna_t pa_lna; /**< Parameters for controlling PA and LNA pin toggling. */ + ble_common_opt_conn_evt_ext_t conn_evt_ext; /**< Parameters for enabling extended connection events. */ + ble_common_opt_extended_rc_cal_t extended_rc_cal; /**< Parameters for enabling extended RC calibration. */ +} ble_common_opt_t; + +/**@brief Common BLE Option type, wrapping the module specific options. */ +typedef union { + ble_common_opt_t common_opt; /**< COMMON options, opt_id in @ref BLE_COMMON_OPTS series. */ + ble_gap_opt_t gap_opt; /**< GAP option, opt_id in @ref BLE_GAP_OPTS series. */ + ble_gattc_opt_t gattc_opt; /**< GATTC option, opt_id in @ref BLE_GATTC_OPTS series. */ +} ble_opt_t; + +/**@brief BLE connection configuration type, wrapping the module specific configurations, set with + * @ref sd_ble_cfg_set. + * + * @note Connection configurations don't have to be set. + * In the case that no configurations has been set, or fewer connection configurations has been set than enabled connections, + * the default connection configuration will be automatically added for the remaining connections. + * When creating connections with the default configuration, @ref BLE_CONN_CFG_TAG_DEFAULT should be used in + * place of @ref ble_conn_cfg_t::conn_cfg_tag. + * + * @sa sd_ble_gap_adv_start() + * @sa sd_ble_gap_connect() + * + * @mscs + * @mmsc{@ref BLE_CONN_CFG} + * @endmscs + + */ +typedef struct { + uint8_t conn_cfg_tag; /**< The application chosen tag it can use with the + @ref sd_ble_gap_adv_start() and @ref sd_ble_gap_connect() calls + to select this configuration when creating a connection. + Must be different for all connection configurations added and not @ref BLE_CONN_CFG_TAG_DEFAULT. */ + union { + ble_gap_conn_cfg_t gap_conn_cfg; /**< GAP connection configuration, cfg_id is @ref BLE_CONN_CFG_GAP. */ + ble_gattc_conn_cfg_t gattc_conn_cfg; /**< GATTC connection configuration, cfg_id is @ref BLE_CONN_CFG_GATTC. */ + ble_gatts_conn_cfg_t gatts_conn_cfg; /**< GATTS connection configuration, cfg_id is @ref BLE_CONN_CFG_GATTS. */ + ble_gatt_conn_cfg_t gatt_conn_cfg; /**< GATT connection configuration, cfg_id is @ref BLE_CONN_CFG_GATT. */ + ble_l2cap_conn_cfg_t l2cap_conn_cfg; /**< L2CAP connection configuration, cfg_id is @ref BLE_CONN_CFG_L2CAP. */ + } params; /**< Connection configuration union. */ +} ble_conn_cfg_t; + +/** + * @brief Configuration of Vendor Specific base UUIDs, set with @ref sd_ble_cfg_set. + * + * @retval ::NRF_ERROR_INVALID_PARAM Too many UUIDs configured. + */ +typedef struct { + uint8_t vs_uuid_count; /**< Number of 128-bit Vendor Specific base UUID bases to allocate memory for. + Default value is @ref BLE_UUID_VS_COUNT_DEFAULT. Maximum value is + @ref BLE_UUID_VS_COUNT_MAX. */ +} ble_common_cfg_vs_uuid_t; + +/**@brief Common BLE Configuration type, wrapping the common configurations. */ +typedef union { + ble_common_cfg_vs_uuid_t vs_uuid_cfg; /**< Vendor Specific base UUID configuration, cfg_id is @ref BLE_COMMON_CFG_VS_UUID. */ +} ble_common_cfg_t; + +/**@brief BLE Configuration type, wrapping the module specific configurations. */ +typedef union { + ble_conn_cfg_t conn_cfg; /**< Connection specific configurations, cfg_id in @ref BLE_CONN_CFGS series. */ + ble_common_cfg_t common_cfg; /**< Global common configurations, cfg_id in @ref BLE_COMMON_CFGS series. */ + ble_gap_cfg_t gap_cfg; /**< Global GAP configurations, cfg_id in @ref BLE_GAP_CFGS series. */ + ble_gatts_cfg_t gatts_cfg; /**< Global GATTS configuration, cfg_id in @ref BLE_GATTS_CFGS series. */ +} ble_cfg_t; + +/** @} */ + +/** @addtogroup BLE_COMMON_FUNCTIONS Functions + * @{ */ + +/**@brief Enable the BLE stack + * + * @param[in, out] p_app_ram_base Pointer to a variable containing the start address of the + * application RAM region (APP_RAM_BASE). On return, this will + * contain the minimum start address of the application RAM region + * required by the SoftDevice for this configuration. + * @warning After this call, the SoftDevice may generate several events. The list of events provided + * below require the application to initiate a SoftDevice API call. The corresponding API call + * is referenced in the event documentation. + * If the application fails to do so, the BLE connection may timeout, or the SoftDevice may stop + * communicating with the peer device. + * - @ref BLE_GAP_EVT_CONN_PARAM_UPDATE_REQUEST + * - @ref BLE_GAP_EVT_DATA_LENGTH_UPDATE_REQUEST + * - @ref BLE_GAP_EVT_PHY_UPDATE_REQUEST + * - @ref BLE_GAP_EVT_SEC_PARAMS_REQUEST + * - @ref BLE_GAP_EVT_SEC_INFO_REQUEST + * - @ref BLE_GAP_EVT_SEC_REQUEST + * - @ref BLE_GAP_EVT_AUTH_KEY_REQUEST + * - @ref BLE_GATTS_EVT_EXCHANGE_MTU_REQUEST + * - @ref BLE_EVT_USER_MEM_REQUEST + * - @ref BLE_L2CAP_EVT_CH_SETUP_REQUEST + * + * @note The memory requirement for a specific configuration will not increase between SoftDevices + * with the same major version number. + * + * @note At runtime the IC's RAM is split into 2 regions: The SoftDevice RAM region is located + * between 0x20000000 and APP_RAM_BASE-1 and the application's RAM region is located between + * APP_RAM_BASE and the start of the call stack. + * + * @details This call initializes the BLE stack, no BLE related function other than @ref + * sd_ble_cfg_set can be called before this one. + * + * @mscs + * @mmsc{@ref BLE_COMMON_ENABLE} + * @endmscs + * + * @retval ::NRF_SUCCESS The BLE stack has been initialized successfully. + * @retval ::NRF_ERROR_INVALID_STATE The BLE stack had already been initialized and cannot be reinitialized. + * @retval ::NRF_ERROR_INVALID_ADDR Invalid or not sufficiently aligned pointer supplied. + * @retval ::NRF_ERROR_NO_MEM One or more of the following is true: + * - The amount of memory assigned to the SoftDevice by *p_app_ram_base is not + * large enough to fit this configuration's memory requirement. Check *p_app_ram_base + * and set the start address of the application RAM region accordingly. + * - Dynamic part of the SoftDevice RAM region is larger then 64 kB which + * is currently not supported. + * @retval ::NRF_ERROR_RESOURCES The total number of L2CAP Channels configured using @ref sd_ble_cfg_set is too large. + */ +SVCALL(SD_BLE_ENABLE, uint32_t, sd_ble_enable(uint32_t *p_app_ram_base)); + +/**@brief Add configurations for the BLE stack + * + * @param[in] cfg_id Config ID, see @ref BLE_CONN_CFGS, @ref BLE_COMMON_CFGS, @ref + * BLE_GAP_CFGS or @ref BLE_GATTS_CFGS. + * @param[in] p_cfg Pointer to a ble_cfg_t structure containing the configuration value. + * @param[in] app_ram_base The start address of the application RAM region (APP_RAM_BASE). + * See @ref sd_ble_enable for details about APP_RAM_BASE. + * + * @note The memory requirement for a specific configuration will not increase between SoftDevices + * with the same major version number. + * + * @note If a configuration is set more than once, the last one set is the one that takes effect on + * @ref sd_ble_enable. + * + * @note Any part of the BLE stack that is NOT configured with @ref sd_ble_cfg_set will have default + * configuration. + * + * @note @ref sd_ble_cfg_set may be called at any time when the SoftDevice is enabled (see @ref + * sd_softdevice_enable) while the BLE part of the SoftDevice is not enabled (see @ref + * sd_ble_enable). + * + * @note Error codes for the configurations are described in the configuration structs. + * + * @mscs + * @mmsc{@ref BLE_COMMON_ENABLE} + * @endmscs + * + * @retval ::NRF_SUCCESS The configuration has been added successfully. + * @retval ::NRF_ERROR_INVALID_STATE The BLE stack had already been initialized. + * @retval ::NRF_ERROR_INVALID_ADDR Invalid or not sufficiently aligned pointer supplied. + * @retval ::NRF_ERROR_INVALID_PARAM Invalid cfg_id supplied. + * @retval ::NRF_ERROR_NO_MEM The amount of memory assigned to the SoftDevice by app_ram_base is not + * large enough to fit this configuration's memory requirement. + */ +SVCALL(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)); + +/**@brief Get an event from the pending events queue. + * + * @param[out] p_dest Pointer to buffer to be filled in with an event, or NULL to retrieve the event length. + * This buffer must be aligned to the extend defined by @ref BLE_EVT_PTR_ALIGNMENT. + * The buffer should be interpreted as a @ref ble_evt_t struct. + * @param[in, out] p_len Pointer the length of the buffer, on return it is filled with the event length. + * + * @details This call allows the application to pull a BLE event from the BLE stack. The application is signaled that + * an event is available from the BLE stack by the triggering of the SD_EVT_IRQn interrupt. + * The application is free to choose whether to call this function from thread mode (main context) or directly from the + * Interrupt Service Routine that maps to SD_EVT_IRQn. In any case however, and because the BLE stack runs at a higher + * priority than the application, this function should be called in a loop (until @ref NRF_ERROR_NOT_FOUND is returned) + * every time SD_EVT_IRQn is raised to ensure that all available events are pulled from the BLE stack. Failure to do so + * could potentially leave events in the internal queue without the application being aware of this fact. + * + * Sizing the p_dest buffer is equally important, since the application needs to provide all the memory necessary for the event to + * be copied into application memory. If the buffer provided is not large enough to fit the entire contents of the event, + * @ref NRF_ERROR_DATA_SIZE will be returned and the application can then call again with a larger buffer size. + * The maximum possible event length is defined by @ref BLE_EVT_LEN_MAX. The application may also "peek" the event length + * by providing p_dest as a NULL pointer and inspecting the value of *p_len upon return: + * + * \code + * uint16_t len; + * errcode = sd_ble_evt_get(NULL, &len); + * \endcode + * + * @mscs + * @mmsc{@ref BLE_COMMON_IRQ_EVT_MSC} + * @mmsc{@ref BLE_COMMON_THREAD_EVT_MSC} + * @endmscs + * + * @retval ::NRF_SUCCESS Event pulled and stored into the supplied buffer. + * @retval ::NRF_ERROR_INVALID_ADDR Invalid or not sufficiently aligned pointer supplied. + * @retval ::NRF_ERROR_NOT_FOUND No events ready to be pulled. + * @retval ::NRF_ERROR_DATA_SIZE Event ready but could not fit into the supplied buffer. + */ +SVCALL(SD_BLE_EVT_GET, uint32_t, sd_ble_evt_get(uint8_t *p_dest, uint16_t *p_len)); + +/**@brief Add a Vendor Specific base UUID. + * + * @details This call enables the application to add a Vendor Specific base UUID to the BLE stack's table, for later + * use with all other modules and APIs. This then allows the application to use the shorter, 24-bit @ref ble_uuid_t + * format when dealing with both 16-bit and 128-bit UUIDs without having to check for lengths and having split code + * paths. This is accomplished by extending the grouping mechanism that the Bluetooth SIG standard base UUID uses + * for all other 128-bit UUIDs. The type field in the @ref ble_uuid_t structure is an index (relative to + * @ref BLE_UUID_TYPE_VENDOR_BEGIN) to the table populated by multiple calls to this function, and the UUID field + * in the same structure contains the 2 bytes at indexes 12 and 13. The number of possible 128-bit UUIDs available to + * the application is therefore the number of Vendor Specific UUIDs added with the help of this function times 65536, + * although restricted to modifying bytes 12 and 13 for each of the entries in the supplied array. + * + * @note Bytes 12 and 13 of the provided UUID will not be used internally, since those are always replaced by + * the 16-bit uuid field in @ref ble_uuid_t. + * + * @note If a UUID is already present in the BLE stack's internal table, the corresponding index will be returned in + * p_uuid_type along with an @ref NRF_SUCCESS error code. + * + * @param[in] p_vs_uuid Pointer to a 16-octet (128-bit) little endian Vendor Specific base UUID disregarding + * bytes 12 and 13. + * @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 + * stored. + * + * @retval ::NRF_SUCCESS Successfully added the Vendor Specific base UUID. + * @retval ::NRF_ERROR_INVALID_ADDR If p_vs_uuid or p_uuid_type is NULL or invalid. + * @retval ::NRF_ERROR_NO_MEM If there are no more free slots for VS UUIDs. + */ +SVCALL(SD_BLE_UUID_VS_ADD, uint32_t, sd_ble_uuid_vs_add(ble_uuid128_t const *p_vs_uuid, uint8_t *p_uuid_type)); + +/**@brief Remove a Vendor Specific base UUID. + * + * @details This call removes a Vendor Specific base UUID. This function allows + * the application to reuse memory allocated for Vendor Specific base UUIDs. + * + * @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 + * type. + * + * @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. + * If the type is set to @ref BLE_UUID_TYPE_UNKNOWN, or the pointer is NULL, the last Vendor Specific + * base UUID will be removed. If the function returns successfully, the UUID type that was removed will + * be written back to @p p_uuid_type. If function returns with a failure, it contains the last type that + * is in use by the ATT Server. + * + * @retval ::NRF_SUCCESS Successfully removed the Vendor Specific base UUID. + * @retval ::NRF_ERROR_INVALID_ADDR If p_uuid_type is invalid. + * @retval ::NRF_ERROR_INVALID_PARAM If p_uuid_type points to a non-valid UUID type. + * @retval ::NRF_ERROR_FORBIDDEN If the Vendor Specific base UUID is in use by the ATT Server. + */ +SVCALL(SD_BLE_UUID_VS_REMOVE, uint32_t, sd_ble_uuid_vs_remove(uint8_t *p_uuid_type)); + +/** @brief Decode little endian raw UUID bytes (16-bit or 128-bit) into a 24 bit @ref ble_uuid_t structure. + * + * @details The raw UUID bytes excluding bytes 12 and 13 (i.e. bytes 0-11 and 14-15) of p_uuid_le are compared + * to the corresponding ones in each entry of the table of Vendor Specific base UUIDs + * to look for a match. If there is such a match, bytes 12 and 13 are returned as p_uuid->uuid and the index + * relative to @ref BLE_UUID_TYPE_VENDOR_BEGIN as p_uuid->type. + * + * @note If the UUID length supplied is 2, then the type set by this call will always be @ref BLE_UUID_TYPE_BLE. + * + * @param[in] uuid_le_len Length in bytes of the buffer pointed to by p_uuid_le (must be 2 or 16 bytes). + * @param[in] p_uuid_le Pointer pointing to little endian raw UUID bytes. + * @param[out] p_uuid Pointer to a @ref ble_uuid_t structure to be filled in. + * + * @retval ::NRF_SUCCESS Successfully decoded into the @ref ble_uuid_t structure. + * @retval ::NRF_ERROR_INVALID_ADDR Invalid pointer supplied. + * @retval ::NRF_ERROR_INVALID_LENGTH Invalid UUID length. + * @retval ::NRF_ERROR_NOT_FOUND For a 128-bit UUID, no match in the populated table of UUIDs. + */ +SVCALL(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)); + +/** @brief Encode a @ref ble_uuid_t structure into little endian raw UUID bytes (16-bit or 128-bit). + * + * @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 + * computed. + * + * @param[in] p_uuid Pointer to a @ref ble_uuid_t structure that will be encoded into bytes. + * @param[out] p_uuid_le_len Pointer to a uint8_t that will be filled with the encoded length (2 or 16 bytes). + * @param[out] p_uuid_le Pointer to a buffer where the little endian raw UUID bytes (2 or 16) will be stored. + * + * @retval ::NRF_SUCCESS Successfully encoded into the buffer. + * @retval ::NRF_ERROR_INVALID_ADDR Invalid pointer supplied. + * @retval ::NRF_ERROR_INVALID_PARAM Invalid UUID type. + */ +SVCALL(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)); + +/**@brief Get Version Information. + * + * @details This call allows the application to get the BLE stack version information. + * + * @param[out] p_version Pointer to a ble_version_t structure to be filled in. + * + * @retval ::NRF_SUCCESS Version information stored successfully. + * @retval ::NRF_ERROR_INVALID_ADDR Invalid pointer supplied. + * @retval ::NRF_ERROR_BUSY The BLE stack is busy (typically doing a locally-initiated disconnection procedure). + */ +SVCALL(SD_BLE_VERSION_GET, uint32_t, sd_ble_version_get(ble_version_t *p_version)); + +/**@brief Provide a user memory block. + * + * @note This call can only be used as a response to a @ref BLE_EVT_USER_MEM_REQUEST event issued to the application. + * + * @param[in] conn_handle Connection handle. + * @param[in] p_block Pointer to a user memory block structure or NULL if memory is managed by the application. + * + * @mscs + * @mmsc{@ref BLE_GATTS_QUEUED_WRITE_PEER_CANCEL_MSC} + * @mmsc{@ref BLE_GATTS_QUEUED_WRITE_NOBUF_AUTH_MSC} + * @mmsc{@ref BLE_GATTS_QUEUED_WRITE_NOBUF_NOAUTH_MSC} + * @mmsc{@ref BLE_GATTS_QUEUED_WRITE_BUF_AUTH_MSC} + * @mmsc{@ref BLE_GATTS_QUEUED_WRITE_BUF_NOAUTH_MSC} + * @mmsc{@ref BLE_GATTS_QUEUED_WRITE_QUEUE_FULL_MSC} + * @endmscs + * + * @retval ::NRF_SUCCESS Successfully queued a response to the peer. + * @retval ::NRF_ERROR_INVALID_ADDR Invalid pointer supplied. + * @retval ::NRF_ERROR_BUSY The stack is busy, process pending events and retry. + * @retval ::BLE_ERROR_INVALID_CONN_HANDLE Invalid Connection Handle. + * @retval ::NRF_ERROR_INVALID_LENGTH Invalid user memory block length supplied. + * @retval ::NRF_ERROR_INVALID_STATE Invalid Connection state or no user memory request pending. + */ +SVCALL(SD_BLE_USER_MEM_REPLY, uint32_t, sd_ble_user_mem_reply(uint16_t conn_handle, ble_user_mem_block_t const *p_block)); + +/**@brief Set a BLE option. + * + * @details This call allows the application to set the value of an option. + * + * @param[in] opt_id Option ID, see @ref BLE_COMMON_OPTS, @ref BLE_GAP_OPTS, and @ref BLE_GATTC_OPTS. + * @param[in] p_opt Pointer to a @ref ble_opt_t structure containing the option value. + * + * @retval ::NRF_SUCCESS Option set successfully. + * @retval ::NRF_ERROR_INVALID_ADDR Invalid pointer supplied. + * @retval ::BLE_ERROR_INVALID_CONN_HANDLE Invalid Connection Handle. + * @retval ::NRF_ERROR_INVALID_PARAM Invalid parameter(s) supplied, check parameter limits and constraints. + * @retval ::NRF_ERROR_INVALID_STATE Unable to set the parameter at this time. + * @retval ::NRF_ERROR_BUSY The BLE stack is busy or the previous procedure has not completed. + */ +SVCALL(SD_BLE_OPT_SET, uint32_t, sd_ble_opt_set(uint32_t opt_id, ble_opt_t const *p_opt)); + +/**@brief Get a BLE option. + * + * @details This call allows the application to retrieve the value of an option. + * + * @param[in] opt_id Option ID, see @ref BLE_COMMON_OPTS and @ref BLE_GAP_OPTS. + * @param[out] p_opt Pointer to a ble_opt_t structure to be filled in. + * + * @retval ::NRF_SUCCESS Option retrieved successfully. + * @retval ::NRF_ERROR_INVALID_ADDR Invalid pointer supplied. + * @retval ::BLE_ERROR_INVALID_CONN_HANDLE Invalid Connection Handle. + * @retval ::NRF_ERROR_INVALID_PARAM Invalid parameter(s) supplied, check parameter limits and constraints. + * @retval ::NRF_ERROR_INVALID_STATE Unable to retrieve the parameter at this time. + * @retval ::NRF_ERROR_BUSY The BLE stack is busy or the previous procedure has not completed. + * @retval ::NRF_ERROR_NOT_SUPPORTED This option is not supported. + * + */ +SVCALL(SD_BLE_OPT_GET, uint32_t, sd_ble_opt_get(uint32_t opt_id, ble_opt_t *p_opt)); + +/** @} */ +#ifdef __cplusplus +} +#endif +#endif /* BLE_H__ */ + +/** + @} + @} +*/ diff --git a/src/platform/nrf52/softdevice/ble_err.h b/src/platform/nrf52/softdevice/ble_err.h new file mode 100644 index 000000000..d20f6d141 --- /dev/null +++ b/src/platform/nrf52/softdevice/ble_err.h @@ -0,0 +1,92 @@ +/* + * Copyright (c) Nordic Semiconductor ASA + * All rights reserved. + * + * Redistribution and use in source and binary forms, with or without modification, + * are permitted provided that the following conditions are met: + * + * 1. Redistributions of source code must retain the above copyright notice, this + * list of conditions and the following disclaimer. + * + * 2. Redistributions in binary form, except as embedded into a Nordic + * Semiconductor ASA integrated circuit in a product or a software update for + * such product, must reproduce the above copyright notice, this list of + * conditions and the following disclaimer in the documentation and/or other + * materials provided with the distribution. + * + * 3. Neither the name of Nordic Semiconductor ASA nor the names of its + * contributors may be used to endorse or promote products derived from this + * software without specific prior written permission. + * + * 4. This software, with or without modification, must only be used with a + * Nordic Semiconductor ASA integrated circuit. + * + * 5. Any software provided in binary form under this license must not be reverse + * engineered, decompiled, modified and/or disassembled. + * + * THIS SOFTWARE IS PROVIDED BY NORDIC SEMICONDUCTOR ASA "AS IS" AND ANY EXPRESS + * OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES + * OF MERCHANTABILITY, NONINFRINGEMENT, AND FITNESS FOR A PARTICULAR PURPOSE ARE + * DISCLAIMED. IN NO EVENT SHALL NORDIC SEMICONDUCTOR ASA OR CONTRIBUTORS BE + * LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR + * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE + * GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) + * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT + * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT + * OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + */ + +/** + @addtogroup BLE_COMMON + @{ + @addtogroup nrf_error + @{ + @ingroup BLE_COMMON + @} + + @defgroup ble_err General error codes + @{ + + @brief General error code definitions for the BLE API. + + @ingroup BLE_COMMON +*/ +#ifndef NRF_BLE_ERR_H__ +#define NRF_BLE_ERR_H__ + +#include "nrf_error.h" + +#ifdef __cplusplus +extern "C" { +#endif + +/* @defgroup BLE_ERRORS Error Codes + * @{ */ +#define BLE_ERROR_NOT_ENABLED (NRF_ERROR_STK_BASE_NUM + 0x001) /**< @ref sd_ble_enable has not been called. */ +#define BLE_ERROR_INVALID_CONN_HANDLE (NRF_ERROR_STK_BASE_NUM + 0x002) /**< Invalid connection handle. */ +#define BLE_ERROR_INVALID_ATTR_HANDLE (NRF_ERROR_STK_BASE_NUM + 0x003) /**< Invalid attribute handle. */ +#define BLE_ERROR_INVALID_ADV_HANDLE (NRF_ERROR_STK_BASE_NUM + 0x004) /**< Invalid advertising handle. */ +#define BLE_ERROR_INVALID_ROLE (NRF_ERROR_STK_BASE_NUM + 0x005) /**< Invalid role. */ +#define BLE_ERROR_BLOCKED_BY_OTHER_LINKS \ + (NRF_ERROR_STK_BASE_NUM + 0x006) /**< The attempt to change link settings failed due to the scheduling of other links. */ +/** @} */ + +/** @defgroup BLE_ERROR_SUBRANGES Module specific error code subranges + * @brief Assignment of subranges for module specific error codes. + * @note For specific error codes, see ble_.h or ble_error_.h. + * @{ */ +#define NRF_L2CAP_ERR_BASE (NRF_ERROR_STK_BASE_NUM + 0x100) /**< L2CAP specific errors. */ +#define NRF_GAP_ERR_BASE (NRF_ERROR_STK_BASE_NUM + 0x200) /**< GAP specific errors. */ +#define NRF_GATTC_ERR_BASE (NRF_ERROR_STK_BASE_NUM + 0x300) /**< GATT client specific errors. */ +#define NRF_GATTS_ERR_BASE (NRF_ERROR_STK_BASE_NUM + 0x400) /**< GATT server specific errors. */ +/** @} */ + +#ifdef __cplusplus +} +#endif +#endif + +/** + @} + @} +*/ diff --git a/src/platform/nrf52/softdevice/ble_gap.h b/src/platform/nrf52/softdevice/ble_gap.h new file mode 100644 index 000000000..8ebdfa82b --- /dev/null +++ b/src/platform/nrf52/softdevice/ble_gap.h @@ -0,0 +1,2895 @@ +/* + * Copyright (c) Nordic Semiconductor ASA + * All rights reserved. + * + * Redistribution and use in source and binary forms, with or without modification, + * are permitted provided that the following conditions are met: + * + * 1. Redistributions of source code must retain the above copyright notice, this + * list of conditions and the following disclaimer. + * + * 2. Redistributions in binary form, except as embedded into a Nordic + * Semiconductor ASA integrated circuit in a product or a software update for + * such product, must reproduce the above copyright notice, this list of + * conditions and the following disclaimer in the documentation and/or other + * materials provided with the distribution. + * + * 3. Neither the name of Nordic Semiconductor ASA nor the names of its + * contributors may be used to endorse or promote products derived from this + * software without specific prior written permission. + * + * 4. This software, with or without modification, must only be used with a + * Nordic Semiconductor ASA integrated circuit. + * + * 5. Any software provided in binary form under this license must not be reverse + * engineered, decompiled, modified and/or disassembled. + * + * THIS SOFTWARE IS PROVIDED BY NORDIC SEMICONDUCTOR ASA "AS IS" AND ANY EXPRESS + * OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES + * OF MERCHANTABILITY, NONINFRINGEMENT, AND FITNESS FOR A PARTICULAR PURPOSE ARE + * DISCLAIMED. IN NO EVENT SHALL NORDIC SEMICONDUCTOR ASA OR CONTRIBUTORS BE + * LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR + * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE + * GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) + * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT + * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT + * OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + */ + +/** + @addtogroup BLE_GAP Generic Access Profile (GAP) + @{ + @brief Definitions and prototypes for the GAP interface. + */ + +#ifndef BLE_GAP_H__ +#define BLE_GAP_H__ + +#include "ble_err.h" +#include "ble_hci.h" +#include "ble_ranges.h" +#include "ble_types.h" +#include "nrf_error.h" +#include "nrf_svc.h" +#include + +#ifdef __cplusplus +extern "C" { +#endif + +/**@addtogroup BLE_GAP_ENUMERATIONS Enumerations + * @{ */ + +/**@brief GAP API SVC numbers. + */ +enum BLE_GAP_SVCS { + SD_BLE_GAP_ADDR_SET = BLE_GAP_SVC_BASE, /**< Set own Bluetooth Address. */ + SD_BLE_GAP_ADDR_GET = BLE_GAP_SVC_BASE + 1, /**< Get own Bluetooth Address. */ + SD_BLE_GAP_WHITELIST_SET = BLE_GAP_SVC_BASE + 2, /**< Set active whitelist. */ + SD_BLE_GAP_DEVICE_IDENTITIES_SET = BLE_GAP_SVC_BASE + 3, /**< Set device identity list. */ + SD_BLE_GAP_PRIVACY_SET = BLE_GAP_SVC_BASE + 4, /**< Set Privacy settings*/ + SD_BLE_GAP_PRIVACY_GET = BLE_GAP_SVC_BASE + 5, /**< Get Privacy settings*/ + SD_BLE_GAP_ADV_SET_CONFIGURE = BLE_GAP_SVC_BASE + 6, /**< Configure an advertising set. */ + SD_BLE_GAP_ADV_START = BLE_GAP_SVC_BASE + 7, /**< Start Advertising. */ + SD_BLE_GAP_ADV_STOP = BLE_GAP_SVC_BASE + 8, /**< Stop Advertising. */ + SD_BLE_GAP_CONN_PARAM_UPDATE = BLE_GAP_SVC_BASE + 9, /**< Connection Parameter Update. */ + SD_BLE_GAP_DISCONNECT = BLE_GAP_SVC_BASE + 10, /**< Disconnect. */ + SD_BLE_GAP_TX_POWER_SET = BLE_GAP_SVC_BASE + 11, /**< Set TX Power. */ + SD_BLE_GAP_APPEARANCE_SET = BLE_GAP_SVC_BASE + 12, /**< Set Appearance. */ + SD_BLE_GAP_APPEARANCE_GET = BLE_GAP_SVC_BASE + 13, /**< Get Appearance. */ + SD_BLE_GAP_PPCP_SET = BLE_GAP_SVC_BASE + 14, /**< Set PPCP. */ + SD_BLE_GAP_PPCP_GET = BLE_GAP_SVC_BASE + 15, /**< Get PPCP. */ + SD_BLE_GAP_DEVICE_NAME_SET = BLE_GAP_SVC_BASE + 16, /**< Set Device Name. */ + SD_BLE_GAP_DEVICE_NAME_GET = BLE_GAP_SVC_BASE + 17, /**< Get Device Name. */ + SD_BLE_GAP_AUTHENTICATE = BLE_GAP_SVC_BASE + 18, /**< Initiate Pairing/Bonding. */ + SD_BLE_GAP_SEC_PARAMS_REPLY = BLE_GAP_SVC_BASE + 19, /**< Reply with Security Parameters. */ + SD_BLE_GAP_AUTH_KEY_REPLY = BLE_GAP_SVC_BASE + 20, /**< Reply with an authentication key. */ + SD_BLE_GAP_LESC_DHKEY_REPLY = BLE_GAP_SVC_BASE + 21, /**< Reply with an LE Secure Connections DHKey. */ + SD_BLE_GAP_KEYPRESS_NOTIFY = BLE_GAP_SVC_BASE + 22, /**< Notify of a keypress during an authentication procedure. */ + SD_BLE_GAP_LESC_OOB_DATA_GET = BLE_GAP_SVC_BASE + 23, /**< Get the local LE Secure Connections OOB data. */ + SD_BLE_GAP_LESC_OOB_DATA_SET = BLE_GAP_SVC_BASE + 24, /**< Set the remote LE Secure Connections OOB data. */ + SD_BLE_GAP_ENCRYPT = BLE_GAP_SVC_BASE + 25, /**< Initiate encryption procedure. */ + SD_BLE_GAP_SEC_INFO_REPLY = BLE_GAP_SVC_BASE + 26, /**< Reply with Security Information. */ + SD_BLE_GAP_CONN_SEC_GET = BLE_GAP_SVC_BASE + 27, /**< Obtain connection security level. */ + SD_BLE_GAP_RSSI_START = BLE_GAP_SVC_BASE + 28, /**< Start reporting of changes in RSSI. */ + SD_BLE_GAP_RSSI_STOP = BLE_GAP_SVC_BASE + 29, /**< Stop reporting of changes in RSSI. */ + SD_BLE_GAP_SCAN_START = BLE_GAP_SVC_BASE + 30, /**< Start Scanning. */ + SD_BLE_GAP_SCAN_STOP = BLE_GAP_SVC_BASE + 31, /**< Stop Scanning. */ + SD_BLE_GAP_CONNECT = BLE_GAP_SVC_BASE + 32, /**< Connect. */ + SD_BLE_GAP_CONNECT_CANCEL = BLE_GAP_SVC_BASE + 33, /**< Cancel ongoing connection procedure. */ + SD_BLE_GAP_RSSI_GET = BLE_GAP_SVC_BASE + 34, /**< Get the last RSSI sample. */ + SD_BLE_GAP_PHY_UPDATE = BLE_GAP_SVC_BASE + 35, /**< Initiate or respond to a PHY Update Procedure. */ + SD_BLE_GAP_DATA_LENGTH_UPDATE = BLE_GAP_SVC_BASE + 36, /**< Initiate or respond to a Data Length Update Procedure. */ + SD_BLE_GAP_QOS_CHANNEL_SURVEY_START = BLE_GAP_SVC_BASE + 37, /**< Start Quality of Service (QoS) channel survey module. */ + SD_BLE_GAP_QOS_CHANNEL_SURVEY_STOP = BLE_GAP_SVC_BASE + 38, /**< Stop Quality of Service (QoS) channel survey module. */ + SD_BLE_GAP_ADV_ADDR_GET = BLE_GAP_SVC_BASE + 39, /**< Get the Address used on air while Advertising. */ + SD_BLE_GAP_NEXT_CONN_EVT_COUNTER_GET = BLE_GAP_SVC_BASE + 40, /**< Get the next connection event counter. */ + SD_BLE_GAP_CONN_EVT_TRIGGER_START = BLE_GAP_SVC_BASE + 41, /** Start triggering a given task on connection event start. */ + SD_BLE_GAP_CONN_EVT_TRIGGER_STOP = + BLE_GAP_SVC_BASE + 42, /** Stop triggering the task configured using @ref sd_ble_gap_conn_evt_trigger_start. */ +}; + +/**@brief GAP Event IDs. + * IDs that uniquely identify an event coming from the stack to the application. + */ +enum BLE_GAP_EVTS { + BLE_GAP_EVT_CONNECTED = + BLE_GAP_EVT_BASE, /**< Connected to peer. \n See @ref ble_gap_evt_connected_t */ + BLE_GAP_EVT_DISCONNECTED = + BLE_GAP_EVT_BASE + 1, /**< Disconnected from peer. \n See @ref ble_gap_evt_disconnected_t. */ + BLE_GAP_EVT_CONN_PARAM_UPDATE = + BLE_GAP_EVT_BASE + 2, /**< Connection Parameters updated. \n See @ref ble_gap_evt_conn_param_update_t. */ + BLE_GAP_EVT_SEC_PARAMS_REQUEST = + BLE_GAP_EVT_BASE + 3, /**< Request to provide security parameters. \n Reply with @ref sd_ble_gap_sec_params_reply. + \n See @ref ble_gap_evt_sec_params_request_t. */ + BLE_GAP_EVT_SEC_INFO_REQUEST = + BLE_GAP_EVT_BASE + 4, /**< Request to provide security information. \n Reply with @ref sd_ble_gap_sec_info_reply. + \n See @ref ble_gap_evt_sec_info_request_t. */ + BLE_GAP_EVT_PASSKEY_DISPLAY = + BLE_GAP_EVT_BASE + 5, /**< Request to display a passkey to the user. \n In LESC Numeric Comparison, reply with @ref + sd_ble_gap_auth_key_reply. \n See @ref ble_gap_evt_passkey_display_t. */ + BLE_GAP_EVT_KEY_PRESSED = + BLE_GAP_EVT_BASE + 6, /**< Notification of a keypress on the remote device.\n See @ref ble_gap_evt_key_pressed_t */ + BLE_GAP_EVT_AUTH_KEY_REQUEST = + BLE_GAP_EVT_BASE + 7, /**< Request to provide an authentication key. \n Reply with @ref sd_ble_gap_auth_key_reply. + \n See @ref ble_gap_evt_auth_key_request_t. */ + BLE_GAP_EVT_LESC_DHKEY_REQUEST = + BLE_GAP_EVT_BASE + 8, /**< Request to calculate an LE Secure Connections DHKey. \n Reply with @ref + sd_ble_gap_lesc_dhkey_reply. \n See @ref ble_gap_evt_lesc_dhkey_request_t */ + BLE_GAP_EVT_AUTH_STATUS = + BLE_GAP_EVT_BASE + 9, /**< Authentication procedure completed with status. \n See @ref ble_gap_evt_auth_status_t. */ + BLE_GAP_EVT_CONN_SEC_UPDATE = + BLE_GAP_EVT_BASE + 10, /**< Connection security updated. \n See @ref ble_gap_evt_conn_sec_update_t. */ + BLE_GAP_EVT_TIMEOUT = + BLE_GAP_EVT_BASE + 11, /**< Timeout expired. \n See @ref ble_gap_evt_timeout_t. */ + BLE_GAP_EVT_RSSI_CHANGED = + BLE_GAP_EVT_BASE + 12, /**< RSSI report. \n See @ref ble_gap_evt_rssi_changed_t. */ + BLE_GAP_EVT_ADV_REPORT = + BLE_GAP_EVT_BASE + 13, /**< Advertising report. \n See @ref ble_gap_evt_adv_report_t. */ + BLE_GAP_EVT_SEC_REQUEST = + BLE_GAP_EVT_BASE + 14, /**< Security Request. \n Reply with @ref sd_ble_gap_authenticate +\n or with @ref sd_ble_gap_encrypt if required security information is available +. \n See @ref ble_gap_evt_sec_request_t. */ + BLE_GAP_EVT_CONN_PARAM_UPDATE_REQUEST = + BLE_GAP_EVT_BASE + 15, /**< Connection Parameter Update Request. \n Reply with @ref + sd_ble_gap_conn_param_update. \n See @ref ble_gap_evt_conn_param_update_request_t. */ + BLE_GAP_EVT_SCAN_REQ_REPORT = + BLE_GAP_EVT_BASE + 16, /**< Scan request report. \n See @ref ble_gap_evt_scan_req_report_t. */ + BLE_GAP_EVT_PHY_UPDATE_REQUEST = + BLE_GAP_EVT_BASE + 17, /**< PHY Update Request. \n Reply with @ref sd_ble_gap_phy_update. \n + See @ref ble_gap_evt_phy_update_request_t. */ + BLE_GAP_EVT_PHY_UPDATE = + BLE_GAP_EVT_BASE + 18, /**< PHY Update Procedure is complete. \n See @ref ble_gap_evt_phy_update_t. */ + BLE_GAP_EVT_DATA_LENGTH_UPDATE_REQUEST = + BLE_GAP_EVT_BASE + 19, /**< Data Length Update Request. \n Reply with @ref + sd_ble_gap_data_length_update. \n See @ref ble_gap_evt_data_length_update_request_t. */ + BLE_GAP_EVT_DATA_LENGTH_UPDATE = + BLE_GAP_EVT_BASE + + 20, /**< LL Data Channel PDU payload length updated. \n See @ref ble_gap_evt_data_length_update_t. */ + BLE_GAP_EVT_QOS_CHANNEL_SURVEY_REPORT = + BLE_GAP_EVT_BASE + + 21, /**< Channel survey report. \n See @ref ble_gap_evt_qos_channel_survey_report_t. */ + BLE_GAP_EVT_ADV_SET_TERMINATED = + BLE_GAP_EVT_BASE + + 22, /**< Advertising set terminated. \n See @ref ble_gap_evt_adv_set_terminated_t. */ +}; + +/**@brief GAP Option IDs. + * IDs that uniquely identify a GAP option. + */ +enum BLE_GAP_OPTS { + BLE_GAP_OPT_CH_MAP = BLE_GAP_OPT_BASE, /**< Channel Map. @ref ble_gap_opt_ch_map_t */ + BLE_GAP_OPT_LOCAL_CONN_LATENCY = BLE_GAP_OPT_BASE + 1, /**< Local connection latency. @ref ble_gap_opt_local_conn_latency_t */ + BLE_GAP_OPT_PASSKEY = BLE_GAP_OPT_BASE + 2, /**< Set passkey. @ref ble_gap_opt_passkey_t */ + BLE_GAP_OPT_COMPAT_MODE_1 = BLE_GAP_OPT_BASE + 3, /**< Compatibility mode. @ref ble_gap_opt_compat_mode_1_t */ + BLE_GAP_OPT_AUTH_PAYLOAD_TIMEOUT = + BLE_GAP_OPT_BASE + 4, /**< Set Authenticated payload timeout. @ref ble_gap_opt_auth_payload_timeout_t */ + BLE_GAP_OPT_SLAVE_LATENCY_DISABLE = + BLE_GAP_OPT_BASE + 5, /**< Disable slave latency. @ref ble_gap_opt_slave_latency_disable_t */ +}; + +/**@brief GAP Configuration IDs. + * + * IDs that uniquely identify a GAP configuration. + */ +enum BLE_GAP_CFGS { + BLE_GAP_CFG_ROLE_COUNT = BLE_GAP_CFG_BASE, /**< Role count configuration. */ + BLE_GAP_CFG_DEVICE_NAME = BLE_GAP_CFG_BASE + 1, /**< Device name configuration. */ + BLE_GAP_CFG_PPCP_INCL_CONFIG = BLE_GAP_CFG_BASE + 2, /**< Peripheral Preferred Connection Parameters characteristic + inclusion configuration. */ + BLE_GAP_CFG_CAR_INCL_CONFIG = BLE_GAP_CFG_BASE + 3, /**< Central Address Resolution characteristic + inclusion configuration. */ +}; + +/**@brief GAP TX Power roles. + */ +enum BLE_GAP_TX_POWER_ROLES { + BLE_GAP_TX_POWER_ROLE_ADV = 1, /**< Advertiser role. */ + BLE_GAP_TX_POWER_ROLE_SCAN_INIT = 2, /**< Scanner and initiator role. */ + BLE_GAP_TX_POWER_ROLE_CONN = 3, /**< Connection role. */ +}; + +/** @} */ + +/**@addtogroup BLE_GAP_DEFINES Defines + * @{ */ + +/**@defgroup BLE_ERRORS_GAP SVC return values specific to GAP + * @{ */ +#define BLE_ERROR_GAP_UUID_LIST_MISMATCH \ + (NRF_GAP_ERR_BASE + 0x000) /**< UUID list does not contain an integral number of UUIDs. */ +#define BLE_ERROR_GAP_DISCOVERABLE_WITH_WHITELIST \ + (NRF_GAP_ERR_BASE + 0x001) /**< Use of Whitelist not permitted with discoverable advertising. */ +#define BLE_ERROR_GAP_INVALID_BLE_ADDR \ + (NRF_GAP_ERR_BASE + 0x002) /**< The upper two bits of the address do not correspond to the specified address type. */ +#define BLE_ERROR_GAP_WHITELIST_IN_USE \ + (NRF_GAP_ERR_BASE + 0x003) /**< Attempt to modify the whitelist while already in use by another operation. */ +#define BLE_ERROR_GAP_DEVICE_IDENTITIES_IN_USE \ + (NRF_GAP_ERR_BASE + 0x004) /**< Attempt to modify the device identity list while already in use by another operation. */ +#define BLE_ERROR_GAP_DEVICE_IDENTITIES_DUPLICATE \ + (NRF_GAP_ERR_BASE + 0x005) /**< The device identity list contains entries with duplicate identity addresses. */ +/**@} */ + +/**@defgroup BLE_GAP_ROLES GAP Roles + * @{ */ +#define BLE_GAP_ROLE_INVALID 0x0 /**< Invalid Role. */ +#define BLE_GAP_ROLE_PERIPH 0x1 /**< Peripheral Role. */ +#define BLE_GAP_ROLE_CENTRAL 0x2 /**< Central Role. */ +/**@} */ + +/**@defgroup BLE_GAP_TIMEOUT_SOURCES GAP Timeout sources + * @{ */ +#define BLE_GAP_TIMEOUT_SRC_SCAN 0x01 /**< Scanning timeout. */ +#define BLE_GAP_TIMEOUT_SRC_CONN 0x02 /**< Connection timeout. */ +#define BLE_GAP_TIMEOUT_SRC_AUTH_PAYLOAD 0x03 /**< Authenticated payload timeout. */ +/**@} */ + +/**@defgroup BLE_GAP_ADDR_TYPES GAP Address types + * @{ */ +#define BLE_GAP_ADDR_TYPE_PUBLIC 0x00 /**< Public (identity) address.*/ +#define BLE_GAP_ADDR_TYPE_RANDOM_STATIC 0x01 /**< Random static (identity) address. */ +#define BLE_GAP_ADDR_TYPE_RANDOM_PRIVATE_RESOLVABLE 0x02 /**< Random private resolvable address. */ +#define BLE_GAP_ADDR_TYPE_RANDOM_PRIVATE_NON_RESOLVABLE 0x03 /**< Random private non-resolvable address. */ +#define BLE_GAP_ADDR_TYPE_ANONYMOUS \ + 0x7F /**< An advertiser may advertise without its address. \ + This type of advertising is called anonymous. */ +/**@} */ + +/**@brief The default interval in seconds at which a private address is refreshed. */ +#define BLE_GAP_DEFAULT_PRIVATE_ADDR_CYCLE_INTERVAL_S (900) /* 15 minutes. */ +/**@brief The maximum interval in seconds at which a private address can be refreshed. */ +#define BLE_GAP_MAX_PRIVATE_ADDR_CYCLE_INTERVAL_S (41400) /* 11 hours 30 minutes. */ + +/** @brief BLE address length. */ +#define BLE_GAP_ADDR_LEN (6) + +/**@defgroup BLE_GAP_PRIVACY_MODES Privacy modes + * @{ */ +#define BLE_GAP_PRIVACY_MODE_OFF 0x00 /**< Device will send and accept its identity address for its own address. */ +#define BLE_GAP_PRIVACY_MODE_DEVICE_PRIVACY 0x01 /**< Device will send and accept only private addresses for its own address. */ +#define BLE_GAP_PRIVACY_MODE_NETWORK_PRIVACY \ + 0x02 /**< Device will send and accept only private addresses for its own address, \ + and will not accept a peer using identity address as sender address when \ + the peer IRK is exchanged, non-zero and added to the identity list. */ +/**@} */ + +/** @brief Invalid power level. */ +#define BLE_GAP_POWER_LEVEL_INVALID 127 + +/** @brief Advertising set handle not set. */ +#define BLE_GAP_ADV_SET_HANDLE_NOT_SET (0xFF) + +/** @brief The default number of advertising sets. */ +#define BLE_GAP_ADV_SET_COUNT_DEFAULT (1) + +/** @brief The maximum number of advertising sets supported by this SoftDevice. */ +#define BLE_GAP_ADV_SET_COUNT_MAX (1) + +/**@defgroup BLE_GAP_ADV_SET_DATA_SIZES Advertising data sizes. + * @{ */ +#define BLE_GAP_ADV_SET_DATA_SIZE_MAX \ + (31) /**< Maximum data length for an advertising set. \ + If more advertising data is required, use extended advertising instead. */ +#define BLE_GAP_ADV_SET_DATA_SIZE_EXTENDED_MAX_SUPPORTED \ + (255) /**< Maximum supported data length for an extended advertising set. */ + +#define BLE_GAP_ADV_SET_DATA_SIZE_EXTENDED_CONNECTABLE_MAX_SUPPORTED \ + (238) /**< Maximum supported data length for an extended connectable advertising set. */ +/**@}. */ + +/** @brief Set ID not available in advertising report. */ +#define BLE_GAP_ADV_REPORT_SET_ID_NOT_AVAILABLE 0xFF + +/**@defgroup BLE_GAP_EVT_ADV_SET_TERMINATED_REASON GAP Advertising Set Terminated reasons + * @{ */ +#define BLE_GAP_EVT_ADV_SET_TERMINATED_REASON_TIMEOUT 0x01 /**< Timeout value reached. */ +#define BLE_GAP_EVT_ADV_SET_TERMINATED_REASON_LIMIT_REACHED 0x02 /**< @ref ble_gap_adv_params_t::max_adv_evts was reached. */ +/**@} */ + +/**@defgroup BLE_GAP_AD_TYPE_DEFINITIONS GAP Advertising and Scan Response Data format + * @note Found at https://www.bluetooth.org/Technical/AssignedNumbers/generic_access_profile.htm + * @{ */ +#define BLE_GAP_AD_TYPE_FLAGS 0x01 /**< Flags for discoverability. */ +#define BLE_GAP_AD_TYPE_16BIT_SERVICE_UUID_MORE_AVAILABLE 0x02 /**< Partial list of 16 bit service UUIDs. */ +#define BLE_GAP_AD_TYPE_16BIT_SERVICE_UUID_COMPLETE 0x03 /**< Complete list of 16 bit service UUIDs. */ +#define BLE_GAP_AD_TYPE_32BIT_SERVICE_UUID_MORE_AVAILABLE 0x04 /**< Partial list of 32 bit service UUIDs. */ +#define BLE_GAP_AD_TYPE_32BIT_SERVICE_UUID_COMPLETE 0x05 /**< Complete list of 32 bit service UUIDs. */ +#define BLE_GAP_AD_TYPE_128BIT_SERVICE_UUID_MORE_AVAILABLE 0x06 /**< Partial list of 128 bit service UUIDs. */ +#define BLE_GAP_AD_TYPE_128BIT_SERVICE_UUID_COMPLETE 0x07 /**< Complete list of 128 bit service UUIDs. */ +#define BLE_GAP_AD_TYPE_SHORT_LOCAL_NAME 0x08 /**< Short local device name. */ +#define BLE_GAP_AD_TYPE_COMPLETE_LOCAL_NAME 0x09 /**< Complete local device name. */ +#define BLE_GAP_AD_TYPE_TX_POWER_LEVEL 0x0A /**< Transmit power level. */ +#define BLE_GAP_AD_TYPE_CLASS_OF_DEVICE 0x0D /**< Class of device. */ +#define BLE_GAP_AD_TYPE_SIMPLE_PAIRING_HASH_C 0x0E /**< Simple Pairing Hash C. */ +#define BLE_GAP_AD_TYPE_SIMPLE_PAIRING_RANDOMIZER_R 0x0F /**< Simple Pairing Randomizer R. */ +#define BLE_GAP_AD_TYPE_SECURITY_MANAGER_TK_VALUE 0x10 /**< Security Manager TK Value. */ +#define BLE_GAP_AD_TYPE_SECURITY_MANAGER_OOB_FLAGS 0x11 /**< Security Manager Out Of Band Flags. */ +#define BLE_GAP_AD_TYPE_SLAVE_CONNECTION_INTERVAL_RANGE 0x12 /**< Slave Connection Interval Range. */ +#define BLE_GAP_AD_TYPE_SOLICITED_SERVICE_UUIDS_16BIT 0x14 /**< List of 16-bit Service Solicitation UUIDs. */ +#define BLE_GAP_AD_TYPE_SOLICITED_SERVICE_UUIDS_128BIT 0x15 /**< List of 128-bit Service Solicitation UUIDs. */ +#define BLE_GAP_AD_TYPE_SERVICE_DATA 0x16 /**< Service Data - 16-bit UUID. */ +#define BLE_GAP_AD_TYPE_PUBLIC_TARGET_ADDRESS 0x17 /**< Public Target Address. */ +#define BLE_GAP_AD_TYPE_RANDOM_TARGET_ADDRESS 0x18 /**< Random Target Address. */ +#define BLE_GAP_AD_TYPE_APPEARANCE 0x19 /**< Appearance. */ +#define BLE_GAP_AD_TYPE_ADVERTISING_INTERVAL 0x1A /**< Advertising Interval. */ +#define BLE_GAP_AD_TYPE_LE_BLUETOOTH_DEVICE_ADDRESS 0x1B /**< LE Bluetooth Device Address. */ +#define BLE_GAP_AD_TYPE_LE_ROLE 0x1C /**< LE Role. */ +#define BLE_GAP_AD_TYPE_SIMPLE_PAIRING_HASH_C256 0x1D /**< Simple Pairing Hash C-256. */ +#define BLE_GAP_AD_TYPE_SIMPLE_PAIRING_RANDOMIZER_R256 0x1E /**< Simple Pairing Randomizer R-256. */ +#define BLE_GAP_AD_TYPE_SERVICE_DATA_32BIT_UUID 0x20 /**< Service Data - 32-bit UUID. */ +#define BLE_GAP_AD_TYPE_SERVICE_DATA_128BIT_UUID 0x21 /**< Service Data - 128-bit UUID. */ +#define BLE_GAP_AD_TYPE_LESC_CONFIRMATION_VALUE 0x22 /**< LE Secure Connections Confirmation Value */ +#define BLE_GAP_AD_TYPE_LESC_RANDOM_VALUE 0x23 /**< LE Secure Connections Random Value */ +#define BLE_GAP_AD_TYPE_URI 0x24 /**< URI */ +#define BLE_GAP_AD_TYPE_3D_INFORMATION_DATA 0x3D /**< 3D Information Data. */ +#define BLE_GAP_AD_TYPE_MANUFACTURER_SPECIFIC_DATA 0xFF /**< Manufacturer Specific Data. */ +/**@} */ + +/**@defgroup BLE_GAP_ADV_FLAGS GAP Advertisement Flags + * @{ */ +#define BLE_GAP_ADV_FLAG_LE_LIMITED_DISC_MODE (0x01) /**< LE Limited Discoverable Mode. */ +#define BLE_GAP_ADV_FLAG_LE_GENERAL_DISC_MODE (0x02) /**< LE General Discoverable Mode. */ +#define BLE_GAP_ADV_FLAG_BR_EDR_NOT_SUPPORTED (0x04) /**< BR/EDR not supported. */ +#define BLE_GAP_ADV_FLAG_LE_BR_EDR_CONTROLLER (0x08) /**< Simultaneous LE and BR/EDR, Controller. */ +#define BLE_GAP_ADV_FLAG_LE_BR_EDR_HOST (0x10) /**< Simultaneous LE and BR/EDR, Host. */ +#define BLE_GAP_ADV_FLAGS_LE_ONLY_LIMITED_DISC_MODE \ + (BLE_GAP_ADV_FLAG_LE_LIMITED_DISC_MODE | \ + BLE_GAP_ADV_FLAG_BR_EDR_NOT_SUPPORTED) /**< LE Limited Discoverable Mode, BR/EDR not supported. */ +#define BLE_GAP_ADV_FLAGS_LE_ONLY_GENERAL_DISC_MODE \ + (BLE_GAP_ADV_FLAG_LE_GENERAL_DISC_MODE | \ + BLE_GAP_ADV_FLAG_BR_EDR_NOT_SUPPORTED) /**< LE General Discoverable Mode, BR/EDR not supported. */ +/**@} */ + +/**@defgroup BLE_GAP_ADV_INTERVALS GAP Advertising interval max and min + * @{ */ +#define BLE_GAP_ADV_INTERVAL_MIN 0x000020 /**< Minimum Advertising interval in 625 us units, i.e. 20 ms. */ +#define BLE_GAP_ADV_INTERVAL_MAX 0x004000 /**< Maximum Advertising interval in 625 us units, i.e. 10.24 s. */ + /**@} */ + +/**@defgroup BLE_GAP_SCAN_INTERVALS GAP Scan interval max and min + * @{ */ +#define BLE_GAP_SCAN_INTERVAL_MIN 0x0004 /**< Minimum Scan interval in 625 us units, i.e. 2.5 ms. */ +#define BLE_GAP_SCAN_INTERVAL_MAX 0xFFFF /**< Maximum Scan interval in 625 us units, i.e. 40,959.375 s. */ + /** @} */ + +/**@defgroup BLE_GAP_SCAN_WINDOW GAP Scan window max and min + * @{ */ +#define BLE_GAP_SCAN_WINDOW_MIN 0x0004 /**< Minimum Scan window in 625 us units, i.e. 2.5 ms. */ +#define BLE_GAP_SCAN_WINDOW_MAX 0xFFFF /**< Maximum Scan window in 625 us units, i.e. 40,959.375 s. */ + /** @} */ + +/**@defgroup BLE_GAP_SCAN_TIMEOUT GAP Scan timeout max and min + * @{ */ +#define BLE_GAP_SCAN_TIMEOUT_MIN 0x0001 /**< Minimum Scan timeout in 10 ms units, i.e 10 ms. */ +#define BLE_GAP_SCAN_TIMEOUT_UNLIMITED 0x0000 /**< Continue to scan forever. */ + /** @} */ + +/**@defgroup BLE_GAP_SCAN_BUFFER_SIZE GAP Minimum scanner buffer size + * + * Scan buffers are used for storing advertising data received from an advertiser. + * If ble_gap_scan_params_t::extended is set to 0, @ref BLE_GAP_SCAN_BUFFER_MIN is the minimum scan buffer length. + * else the minimum scan buffer size is @ref BLE_GAP_SCAN_BUFFER_EXTENDED_MIN. + * @{ */ +#define BLE_GAP_SCAN_BUFFER_MIN \ + (31) /**< Minimum data length for an \ + advertising set. */ +#define BLE_GAP_SCAN_BUFFER_MAX \ + (31) /**< Maximum data length for an \ + advertising set. */ +#define BLE_GAP_SCAN_BUFFER_EXTENDED_MIN \ + (255) /**< Minimum data length for an \ + extended advertising set. */ +#define BLE_GAP_SCAN_BUFFER_EXTENDED_MAX \ + (1650) /**< Maximum data length for an \ + extended advertising set. */ +#define BLE_GAP_SCAN_BUFFER_EXTENDED_MAX_SUPPORTED \ + (255) /**< Maximum supported data length for \ + an extended advertising set. */ +/** @} */ + +/**@defgroup BLE_GAP_ADV_TYPES GAP Advertising types + * + * Advertising types defined in Bluetooth Core Specification v5.0, Vol 6, Part B, Section 4.4.2. + * + * The maximum advertising data length is defined by @ref BLE_GAP_ADV_SET_DATA_SIZE_MAX. + * The maximum supported data length for an extended advertiser is defined by + * @ref BLE_GAP_ADV_SET_DATA_SIZE_EXTENDED_MAX_SUPPORTED + * Note that some of the advertising types do not support advertising data. Non-scannable types do not support + * scan response data. + * + * @{ */ +#define BLE_GAP_ADV_TYPE_CONNECTABLE_SCANNABLE_UNDIRECTED \ + 0x01 /**< Connectable and scannable undirected \ + advertising events. */ +#define BLE_GAP_ADV_TYPE_CONNECTABLE_NONSCANNABLE_DIRECTED_HIGH_DUTY_CYCLE \ + 0x02 /**< Connectable non-scannable directed advertising \ + events. Advertising interval is less that 3.75 ms. \ + Use this type for fast reconnections. \ + @note Advertising data is not supported. */ +#define BLE_GAP_ADV_TYPE_CONNECTABLE_NONSCANNABLE_DIRECTED \ + 0x03 /**< Connectable non-scannable directed advertising \ + events. \ + @note Advertising data is not supported. */ +#define BLE_GAP_ADV_TYPE_NONCONNECTABLE_SCANNABLE_UNDIRECTED \ + 0x04 /**< Non-connectable scannable undirected \ + advertising events. */ +#define BLE_GAP_ADV_TYPE_NONCONNECTABLE_NONSCANNABLE_UNDIRECTED \ + 0x05 /**< Non-connectable non-scannable undirected \ + advertising events. */ +#define BLE_GAP_ADV_TYPE_EXTENDED_CONNECTABLE_NONSCANNABLE_UNDIRECTED \ + 0x06 /**< Connectable non-scannable undirected advertising \ + events using extended advertising PDUs. */ +#define BLE_GAP_ADV_TYPE_EXTENDED_CONNECTABLE_NONSCANNABLE_DIRECTED \ + 0x07 /**< Connectable non-scannable directed advertising \ + events using extended advertising PDUs. */ +#define BLE_GAP_ADV_TYPE_EXTENDED_NONCONNECTABLE_SCANNABLE_UNDIRECTED \ + 0x08 /**< Non-connectable scannable undirected advertising \ + events using extended advertising PDUs. \ + @note Only scan response data is supported. */ +#define BLE_GAP_ADV_TYPE_EXTENDED_NONCONNECTABLE_SCANNABLE_DIRECTED \ + 0x09 /**< Non-connectable scannable directed advertising \ + events using extended advertising PDUs. \ + @note Only scan response data is supported. */ +#define BLE_GAP_ADV_TYPE_EXTENDED_NONCONNECTABLE_NONSCANNABLE_UNDIRECTED \ + 0x0A /**< Non-connectable non-scannable undirected advertising \ + events using extended advertising PDUs. */ +#define BLE_GAP_ADV_TYPE_EXTENDED_NONCONNECTABLE_NONSCANNABLE_DIRECTED \ + 0x0B /**< Non-connectable non-scannable directed advertising \ + events using extended advertising PDUs. */ +/**@} */ + +/**@defgroup BLE_GAP_ADV_FILTER_POLICIES GAP Advertising filter policies + * @{ */ +#define BLE_GAP_ADV_FP_ANY 0x00 /**< Allow scan requests and connect requests from any device. */ +#define BLE_GAP_ADV_FP_FILTER_SCANREQ 0x01 /**< Filter scan requests with whitelist. */ +#define BLE_GAP_ADV_FP_FILTER_CONNREQ 0x02 /**< Filter connect requests with whitelist. */ +#define BLE_GAP_ADV_FP_FILTER_BOTH 0x03 /**< Filter both scan and connect requests with whitelist. */ +/**@} */ + +/**@defgroup BLE_GAP_ADV_DATA_STATUS GAP Advertising data status + * @{ */ +#define BLE_GAP_ADV_DATA_STATUS_COMPLETE 0x00 /**< All data in the advertising event have been received. */ +#define BLE_GAP_ADV_DATA_STATUS_INCOMPLETE_MORE_DATA \ + 0x01 /**< More data to be received. \ + @note This value will only be used if \ + @ref ble_gap_scan_params_t::report_incomplete_evts and \ + @ref ble_gap_adv_report_type_t::extended_pdu are set to true. */ +#define BLE_GAP_ADV_DATA_STATUS_INCOMPLETE_TRUNCATED \ + 0x02 /**< Incomplete data. Buffer size insufficient to receive more. \ + @note This value will only be used if \ + @ref ble_gap_adv_report_type_t::extended_pdu is set to true. */ +#define BLE_GAP_ADV_DATA_STATUS_INCOMPLETE_MISSED \ + 0x03 /**< Failed to receive the remaining data. \ + @note This value will only be used if \ + @ref ble_gap_adv_report_type_t::extended_pdu is set to true. */ +/**@} */ + +/**@defgroup BLE_GAP_SCAN_FILTER_POLICIES GAP Scanner filter policies + * @{ */ +#define BLE_GAP_SCAN_FP_ACCEPT_ALL \ + 0x00 /**< Accept all advertising packets except directed advertising packets \ + not addressed to this device. */ +#define BLE_GAP_SCAN_FP_WHITELIST \ + 0x01 /**< Accept advertising packets from devices in the whitelist except directed \ + packets not addressed to this device. */ +#define BLE_GAP_SCAN_FP_ALL_NOT_RESOLVED_DIRECTED \ + 0x02 /**< Accept all advertising packets specified in @ref BLE_GAP_SCAN_FP_ACCEPT_ALL. \ + In addition, accept directed advertising packets, where the advertiser's \ + address is a resolvable private address that cannot be resolved. */ +#define BLE_GAP_SCAN_FP_WHITELIST_NOT_RESOLVED_DIRECTED \ + 0x03 /**< Accept all advertising packets specified in @ref BLE_GAP_SCAN_FP_WHITELIST. \ + In addition, accept directed advertising packets, where the advertiser's \ + address is a resolvable private address that cannot be resolved. */ +/**@} */ + +/**@defgroup BLE_GAP_ADV_TIMEOUT_VALUES GAP Advertising timeout values in 10 ms units + * @{ */ +#define BLE_GAP_ADV_TIMEOUT_HIGH_DUTY_MAX \ + (128) /**< Maximum high duty advertising time in 10 ms units. Corresponds to 1.28 s. \ + */ +#define BLE_GAP_ADV_TIMEOUT_LIMITED_MAX \ + (18000) /**< Maximum advertising time in 10 ms units corresponding to TGAP(lim_adv_timeout) = 180 s in limited discoverable \ + mode. */ +#define BLE_GAP_ADV_TIMEOUT_GENERAL_UNLIMITED \ + (0) /**< Unlimited advertising in general discoverable mode. \ + For high duty cycle advertising, this corresponds to @ref BLE_GAP_ADV_TIMEOUT_HIGH_DUTY_MAX. */ +/**@} */ + +/**@defgroup BLE_GAP_DISC_MODES GAP Discovery modes + * @{ */ +#define BLE_GAP_DISC_MODE_NOT_DISCOVERABLE 0x00 /**< Not discoverable discovery Mode. */ +#define BLE_GAP_DISC_MODE_LIMITED 0x01 /**< Limited Discovery Mode. */ +#define BLE_GAP_DISC_MODE_GENERAL 0x02 /**< General Discovery Mode. */ +/**@} */ + +/**@defgroup BLE_GAP_IO_CAPS GAP IO Capabilities + * @{ */ +#define BLE_GAP_IO_CAPS_DISPLAY_ONLY 0x00 /**< Display Only. */ +#define BLE_GAP_IO_CAPS_DISPLAY_YESNO 0x01 /**< Display and Yes/No entry. */ +#define BLE_GAP_IO_CAPS_KEYBOARD_ONLY 0x02 /**< Keyboard Only. */ +#define BLE_GAP_IO_CAPS_NONE 0x03 /**< No I/O capabilities. */ +#define BLE_GAP_IO_CAPS_KEYBOARD_DISPLAY 0x04 /**< Keyboard and Display. */ +/**@} */ + +/**@defgroup BLE_GAP_AUTH_KEY_TYPES GAP Authentication Key Types + * @{ */ +#define BLE_GAP_AUTH_KEY_TYPE_NONE 0x00 /**< No key (may be used to reject). */ +#define BLE_GAP_AUTH_KEY_TYPE_PASSKEY 0x01 /**< 6-digit Passkey. */ +#define BLE_GAP_AUTH_KEY_TYPE_OOB 0x02 /**< Out Of Band data. */ +/**@} */ + +/**@defgroup BLE_GAP_KP_NOT_TYPES GAP Keypress Notification Types + * @{ */ +#define BLE_GAP_KP_NOT_TYPE_PASSKEY_START 0x00 /**< Passkey entry started. */ +#define BLE_GAP_KP_NOT_TYPE_PASSKEY_DIGIT_IN 0x01 /**< Passkey digit entered. */ +#define BLE_GAP_KP_NOT_TYPE_PASSKEY_DIGIT_OUT 0x02 /**< Passkey digit erased. */ +#define BLE_GAP_KP_NOT_TYPE_PASSKEY_CLEAR 0x03 /**< Passkey cleared. */ +#define BLE_GAP_KP_NOT_TYPE_PASSKEY_END 0x04 /**< Passkey entry completed. */ +/**@} */ + +/**@defgroup BLE_GAP_SEC_STATUS GAP Security status + * @{ */ +#define BLE_GAP_SEC_STATUS_SUCCESS 0x00 /**< Procedure completed with success. */ +#define BLE_GAP_SEC_STATUS_TIMEOUT 0x01 /**< Procedure timed out. */ +#define BLE_GAP_SEC_STATUS_PDU_INVALID 0x02 /**< Invalid PDU received. */ +#define BLE_GAP_SEC_STATUS_RFU_RANGE1_BEGIN 0x03 /**< Reserved for Future Use range #1 begin. */ +#define BLE_GAP_SEC_STATUS_RFU_RANGE1_END 0x80 /**< Reserved for Future Use range #1 end. */ +#define BLE_GAP_SEC_STATUS_PASSKEY_ENTRY_FAILED 0x81 /**< Passkey entry failed (user canceled or other). */ +#define BLE_GAP_SEC_STATUS_OOB_NOT_AVAILABLE 0x82 /**< Out of Band Key not available. */ +#define BLE_GAP_SEC_STATUS_AUTH_REQ 0x83 /**< Authentication requirements not met. */ +#define BLE_GAP_SEC_STATUS_CONFIRM_VALUE 0x84 /**< Confirm value failed. */ +#define BLE_GAP_SEC_STATUS_PAIRING_NOT_SUPP 0x85 /**< Pairing not supported. */ +#define BLE_GAP_SEC_STATUS_ENC_KEY_SIZE 0x86 /**< Encryption key size. */ +#define BLE_GAP_SEC_STATUS_SMP_CMD_UNSUPPORTED 0x87 /**< Unsupported SMP command. */ +#define BLE_GAP_SEC_STATUS_UNSPECIFIED 0x88 /**< Unspecified reason. */ +#define BLE_GAP_SEC_STATUS_REPEATED_ATTEMPTS 0x89 /**< Too little time elapsed since last attempt. */ +#define BLE_GAP_SEC_STATUS_INVALID_PARAMS 0x8A /**< Invalid parameters. */ +#define BLE_GAP_SEC_STATUS_DHKEY_FAILURE 0x8B /**< DHKey check failure. */ +#define BLE_GAP_SEC_STATUS_NUM_COMP_FAILURE 0x8C /**< Numeric Comparison failure. */ +#define BLE_GAP_SEC_STATUS_BR_EDR_IN_PROG 0x8D /**< BR/EDR pairing in progress. */ +#define BLE_GAP_SEC_STATUS_X_TRANS_KEY_DISALLOWED 0x8E /**< BR/EDR Link Key cannot be used for LE keys. */ +#define BLE_GAP_SEC_STATUS_RFU_RANGE2_BEGIN 0x8F /**< Reserved for Future Use range #2 begin. */ +#define BLE_GAP_SEC_STATUS_RFU_RANGE2_END 0xFF /**< Reserved for Future Use range #2 end. */ +/**@} */ + +/**@defgroup BLE_GAP_SEC_STATUS_SOURCES GAP Security status sources + * @{ */ +#define BLE_GAP_SEC_STATUS_SOURCE_LOCAL 0x00 /**< Local failure. */ +#define BLE_GAP_SEC_STATUS_SOURCE_REMOTE 0x01 /**< Remote failure. */ +/**@} */ + +/**@defgroup BLE_GAP_CP_LIMITS GAP Connection Parameters Limits + * @{ */ +#define BLE_GAP_CP_MIN_CONN_INTVL_NONE 0xFFFF /**< No new minimum connection interval specified in connect parameters. */ +#define BLE_GAP_CP_MIN_CONN_INTVL_MIN \ + 0x0006 /**< Lowest minimum connection interval permitted, in units of 1.25 ms, i.e. 7.5 ms. */ +#define BLE_GAP_CP_MIN_CONN_INTVL_MAX \ + 0x0C80 /**< Highest minimum connection interval permitted, in units of 1.25 ms, i.e. 4 s. \ + */ +#define BLE_GAP_CP_MAX_CONN_INTVL_NONE 0xFFFF /**< No new maximum connection interval specified in connect parameters. */ +#define BLE_GAP_CP_MAX_CONN_INTVL_MIN \ + 0x0006 /**< Lowest maximum connection interval permitted, in units of 1.25 ms, i.e. 7.5 ms. */ +#define BLE_GAP_CP_MAX_CONN_INTVL_MAX \ + 0x0C80 /**< Highest maximum connection interval permitted, in units of 1.25 ms, i.e. 4 s. \ + */ +#define BLE_GAP_CP_SLAVE_LATENCY_MAX 0x01F3 /**< Highest slave latency permitted, in connection events. */ +#define BLE_GAP_CP_CONN_SUP_TIMEOUT_NONE 0xFFFF /**< No new supervision timeout specified in connect parameters. */ +#define BLE_GAP_CP_CONN_SUP_TIMEOUT_MIN 0x000A /**< Lowest supervision timeout permitted, in units of 10 ms, i.e. 100 ms. */ +#define BLE_GAP_CP_CONN_SUP_TIMEOUT_MAX 0x0C80 /**< Highest supervision timeout permitted, in units of 10 ms, i.e. 32 s. */ +/**@} */ + +/**@defgroup BLE_GAP_DEVNAME GAP device name defines. + * @{ */ +#define BLE_GAP_DEVNAME_DEFAULT "nRF5x" /**< Default device name value. */ +#define BLE_GAP_DEVNAME_DEFAULT_LEN 31 /**< Default number of octets in device name. */ +#define BLE_GAP_DEVNAME_MAX_LEN 248 /**< Maximum number of octets in device name. */ +/**@} */ + +/**@brief Disable RSSI events for connections */ +#define BLE_GAP_RSSI_THRESHOLD_INVALID 0xFF + +/**@defgroup BLE_GAP_PHYS GAP PHYs + * @{ */ +#define BLE_GAP_PHY_AUTO 0x00 /**< Automatic PHY selection. Refer @ref sd_ble_gap_phy_update for more information.*/ +#define BLE_GAP_PHY_1MBPS 0x01 /**< 1 Mbps PHY. */ +#define BLE_GAP_PHY_2MBPS 0x02 /**< 2 Mbps PHY. */ +#define BLE_GAP_PHY_CODED 0x04 /**< Coded PHY. */ +#define BLE_GAP_PHY_NOT_SET 0xFF /**< PHY is not configured. */ + +/**@brief Supported PHYs in connections, for scanning, and for advertising. */ +#define BLE_GAP_PHYS_SUPPORTED (BLE_GAP_PHY_1MBPS | BLE_GAP_PHY_2MBPS | BLE_GAP_PHY_CODED) /**< All PHYs are supported. */ + +/**@} */ + +/**@defgroup BLE_GAP_CONN_SEC_MODE_SET_MACROS GAP attribute security requirement setters + * + * See @ref ble_gap_conn_sec_mode_t. + * @{ */ +/**@brief Set sec_mode pointed to by ptr to have no access rights.*/ +#define BLE_GAP_CONN_SEC_MODE_SET_NO_ACCESS(ptr) \ + do { \ + (ptr)->sm = 0; \ + (ptr)->lv = 0; \ + } while (0) +/**@brief Set sec_mode pointed to by ptr to require no protection, open link.*/ +#define BLE_GAP_CONN_SEC_MODE_SET_OPEN(ptr) \ + do { \ + (ptr)->sm = 1; \ + (ptr)->lv = 1; \ + } while (0) +/**@brief Set sec_mode pointed to by ptr to require encryption, but no MITM protection.*/ +#define BLE_GAP_CONN_SEC_MODE_SET_ENC_NO_MITM(ptr) \ + do { \ + (ptr)->sm = 1; \ + (ptr)->lv = 2; \ + } while (0) +/**@brief Set sec_mode pointed to by ptr to require encryption and MITM protection.*/ +#define BLE_GAP_CONN_SEC_MODE_SET_ENC_WITH_MITM(ptr) \ + do { \ + (ptr)->sm = 1; \ + (ptr)->lv = 3; \ + } while (0) +/**@brief Set sec_mode pointed to by ptr to require LESC encryption and MITM protection.*/ +#define BLE_GAP_CONN_SEC_MODE_SET_LESC_ENC_WITH_MITM(ptr) \ + do { \ + (ptr)->sm = 1; \ + (ptr)->lv = 4; \ + } while (0) +/**@brief Set sec_mode pointed to by ptr to require signing or encryption, no MITM protection needed.*/ +#define BLE_GAP_CONN_SEC_MODE_SET_SIGNED_NO_MITM(ptr) \ + do { \ + (ptr)->sm = 2; \ + (ptr)->lv = 1; \ + } while (0) +/**@brief Set sec_mode pointed to by ptr to require signing or encryption with MITM protection.*/ +#define BLE_GAP_CONN_SEC_MODE_SET_SIGNED_WITH_MITM(ptr) \ + do { \ + (ptr)->sm = 2; \ + (ptr)->lv = 2; \ + } while (0) +/**@} */ + +/**@brief GAP Security Random Number Length. */ +#define BLE_GAP_SEC_RAND_LEN 8 + +/**@brief GAP Security Key Length. */ +#define BLE_GAP_SEC_KEY_LEN 16 + +/**@brief GAP LE Secure Connections Elliptic Curve Diffie-Hellman P-256 Public Key Length. */ +#define BLE_GAP_LESC_P256_PK_LEN 64 + +/**@brief GAP LE Secure Connections Elliptic Curve Diffie-Hellman DHKey Length. */ +#define BLE_GAP_LESC_DHKEY_LEN 32 + +/**@brief GAP Passkey Length. */ +#define BLE_GAP_PASSKEY_LEN 6 + +/**@brief Maximum amount of addresses in the whitelist. */ +#define BLE_GAP_WHITELIST_ADDR_MAX_COUNT (8) + +/**@brief Maximum amount of identities in the device identities list. */ +#define BLE_GAP_DEVICE_IDENTITIES_MAX_COUNT (8) + +/**@brief Default connection count for a configuration. */ +#define BLE_GAP_CONN_COUNT_DEFAULT (1) + +/**@defgroup BLE_GAP_EVENT_LENGTH GAP event length defines. + * @{ */ +#define BLE_GAP_EVENT_LENGTH_MIN (2) /**< Minimum event length, in 1.25 ms units. */ +#define BLE_GAP_EVENT_LENGTH_CODED_PHY_MIN (6) /**< The shortest event length in 1.25 ms units supporting LE Coded PHY. */ +#define BLE_GAP_EVENT_LENGTH_DEFAULT (3) /**< Default event length, in 1.25 ms units. */ +/**@} */ + +/**@defgroup BLE_GAP_ROLE_COUNT GAP concurrent connection count defines. + * @{ */ +#define BLE_GAP_ROLE_COUNT_PERIPH_DEFAULT (1) /**< Default maximum number of connections concurrently acting as peripherals. */ +#define BLE_GAP_ROLE_COUNT_CENTRAL_DEFAULT (3) /**< Default maximum number of connections concurrently acting as centrals. */ +#define BLE_GAP_ROLE_COUNT_CENTRAL_SEC_DEFAULT \ + (1) /**< Default number of SMP instances shared between all connections acting as centrals. */ +#define BLE_GAP_ROLE_COUNT_COMBINED_MAX \ + (20) /**< Maximum supported number of concurrent connections in the peripheral and central roles combined. */ + +/**@} */ + +/**@brief Automatic data length parameter. */ +#define BLE_GAP_DATA_LENGTH_AUTO 0 + +/**@defgroup BLE_GAP_AUTH_PAYLOAD_TIMEOUT Authenticated payload timeout defines. + * @{ */ +#define BLE_GAP_AUTH_PAYLOAD_TIMEOUT_MAX (48000) /**< Maximum authenticated payload timeout in 10 ms units, i.e. 8 minutes. */ +#define BLE_GAP_AUTH_PAYLOAD_TIMEOUT_MIN (1) /**< Minimum authenticated payload timeout in 10 ms units, i.e. 10 ms. */ +/**@} */ + +/**@defgroup GAP_SEC_MODES GAP Security Modes + * @{ */ +#define BLE_GAP_SEC_MODE 0x00 /**< No key (may be used to reject). */ +/**@} */ + +/**@brief The total number of channels in Bluetooth Low Energy. */ +#define BLE_GAP_CHANNEL_COUNT (40) + +/**@defgroup BLE_GAP_QOS_CHANNEL_SURVEY_INTERVALS Quality of Service (QoS) Channel survey interval defines + * @{ */ +#define BLE_GAP_QOS_CHANNEL_SURVEY_INTERVAL_CONTINUOUS (0) /**< Continuous channel survey. */ +#define BLE_GAP_QOS_CHANNEL_SURVEY_INTERVAL_MIN_US (7500) /**< Minimum channel survey interval in microseconds (7.5 ms). */ +#define BLE_GAP_QOS_CHANNEL_SURVEY_INTERVAL_MAX_US (4000000) /**< Maximum channel survey interval in microseconds (4 s). */ + /**@} */ + +/** @} */ + +/** @defgroup BLE_GAP_CHAR_INCL_CONFIG GAP Characteristic inclusion configurations + * @{ + */ +#define BLE_GAP_CHAR_INCL_CONFIG_INCLUDE (0) /**< Include the characteristic in the Attribute Table */ +#define BLE_GAP_CHAR_INCL_CONFIG_EXCLUDE_WITH_SPACE \ + (1) /**< Do not include the characteristic in the Attribute table. \ + The SoftDevice will reserve the attribute handles \ + which are otherwise used for this characteristic. \ + By reserving the attribute handles it will be possible \ + to upgrade the SoftDevice without changing handle of the \ + Service Changed characteristic. */ +#define BLE_GAP_CHAR_INCL_CONFIG_EXCLUDE_WITHOUT_SPACE \ + (2) /**< Do not include the characteristic in the Attribute table. \ + The SoftDevice will not reserve the attribute handles \ + which are otherwise used for this characteristic. */ +/**@} */ + +/** @defgroup BLE_GAP_CHAR_INCL_CONFIG_DEFAULTS Characteristic inclusion default values + * @{ */ +#define BLE_GAP_PPCP_INCL_CONFIG_DEFAULT (BLE_GAP_CHAR_INCL_CONFIG_INCLUDE) /**< Included by default. */ +#define BLE_GAP_CAR_INCL_CONFIG_DEFAULT (BLE_GAP_CHAR_INCL_CONFIG_INCLUDE) /**< Included by default. */ +/**@} */ + +/** @defgroup BLE_GAP_SLAVE_LATENCY Slave latency configuration options + * @{ */ +#define BLE_GAP_SLAVE_LATENCY_ENABLE \ + (0) /**< Slave latency is enabled. When slave latency is enabled, \ + the slave will wake up every time it has data to send, \ + and/or every slave latency number of connection events. */ +#define BLE_GAP_SLAVE_LATENCY_DISABLE \ + (1) /**< Disable slave latency. The slave will wake up every connection event \ + regardless of the requested slave latency. \ + This option consumes the most power. */ +#define BLE_GAP_SLAVE_LATENCY_WAIT_FOR_ACK \ + (2) /**< The slave will wake up every connection event if it has not received \ + an ACK from the master for at least slave latency events. This \ + configuration may increase the power consumption in environments \ + with a lot of radio activity. */ +/**@} */ + +/**@addtogroup BLE_GAP_STRUCTURES Structures + * @{ */ + +/**@brief Advertising event properties. */ +typedef struct { + uint8_t type; /**< Advertising type. See @ref BLE_GAP_ADV_TYPES. */ + uint8_t anonymous : 1; /**< Omit advertiser's address from all PDUs. + @note Anonymous advertising is only available for + @ref BLE_GAP_ADV_TYPE_EXTENDED_NONCONNECTABLE_NONSCANNABLE_UNDIRECTED and + @ref BLE_GAP_ADV_TYPE_EXTENDED_NONCONNECTABLE_NONSCANNABLE_DIRECTED. */ + uint8_t include_tx_power : 1; /**< This feature is not supported on this SoftDevice. */ +} ble_gap_adv_properties_t; + +/**@brief Advertising report type. */ +typedef struct { + uint16_t connectable : 1; /**< Connectable advertising event type. */ + uint16_t scannable : 1; /**< Scannable advertising event type. */ + uint16_t directed : 1; /**< Directed advertising event type. */ + uint16_t scan_response : 1; /**< Received a scan response. */ + uint16_t extended_pdu : 1; /**< Received an extended advertising set. */ + uint16_t status : 2; /**< Data status. See @ref BLE_GAP_ADV_DATA_STATUS. */ + uint16_t reserved : 9; /**< Reserved for future use. */ +} ble_gap_adv_report_type_t; + +/**@brief Advertising Auxiliary Pointer. */ +typedef struct { + uint16_t aux_offset; /**< Time offset from the beginning of advertising packet to the auxiliary packet in 100 us units. */ + uint8_t aux_phy; /**< Indicates the PHY on which the auxiliary advertising packet is sent. See @ref BLE_GAP_PHYS. */ +} ble_gap_aux_pointer_t; + +/**@brief Bluetooth Low Energy address. */ +typedef struct { + uint8_t + addr_id_peer : 1; /**< Only valid for peer addresses. + This bit is set by the SoftDevice to indicate whether the address has been resolved from + a Resolvable Private Address (when the peer is using privacy). + If set to 1, @ref addr and @ref addr_type refer to the identity address of the resolved address. + + This bit is ignored when a variable of type @ref ble_gap_addr_t is used as input to API functions. + */ + uint8_t addr_type : 7; /**< See @ref BLE_GAP_ADDR_TYPES. */ + uint8_t addr[BLE_GAP_ADDR_LEN]; /**< 48-bit address, LSB format. + @ref addr is not used if @ref addr_type is @ref BLE_GAP_ADDR_TYPE_ANONYMOUS. */ +} ble_gap_addr_t; + +/**@brief GAP connection parameters. + * + * @note When ble_conn_params_t is received in an event, both min_conn_interval and + * max_conn_interval will be equal to the connection interval set by the central. + * + * @note If both conn_sup_timeout and max_conn_interval are specified, then the following constraint applies: + * conn_sup_timeout * 4 > (1 + slave_latency) * max_conn_interval + * that corresponds to the following Bluetooth Spec requirement: + * The Supervision_Timeout in milliseconds shall be larger than + * (1 + Conn_Latency) * Conn_Interval_Max * 2, where Conn_Interval_Max is given in milliseconds. + */ +typedef struct { + uint16_t min_conn_interval; /**< Minimum Connection Interval in 1.25 ms units, see @ref BLE_GAP_CP_LIMITS.*/ + uint16_t max_conn_interval; /**< Maximum Connection Interval in 1.25 ms units, see @ref BLE_GAP_CP_LIMITS.*/ + uint16_t slave_latency; /**< Slave Latency in number of connection events, see @ref BLE_GAP_CP_LIMITS.*/ + uint16_t conn_sup_timeout; /**< Connection Supervision Timeout in 10 ms units, see @ref BLE_GAP_CP_LIMITS.*/ +} ble_gap_conn_params_t; + +/**@brief GAP connection security modes. + * + * Security Mode 0 Level 0: No access permissions at all (this level is not defined by the Bluetooth Core specification).\n + * Security Mode 1 Level 1: No security is needed (aka open link).\n + * Security Mode 1 Level 2: Encrypted link required, MITM protection not necessary.\n + * Security Mode 1 Level 3: MITM protected encrypted link required.\n + * Security Mode 1 Level 4: LESC MITM protected encrypted link using a 128-bit strength encryption key required.\n + * Security Mode 2 Level 1: Signing or encryption required, MITM protection not necessary.\n + * Security Mode 2 Level 2: MITM protected signing required, unless link is MITM protected encrypted.\n + */ +typedef struct { + uint8_t sm : 4; /**< Security Mode (1 or 2), 0 for no permissions at all. */ + uint8_t lv : 4; /**< Level (1, 2, 3 or 4), 0 for no permissions at all. */ + +} ble_gap_conn_sec_mode_t; + +/**@brief GAP connection security status.*/ +typedef struct { + ble_gap_conn_sec_mode_t sec_mode; /**< Currently active security mode for this connection.*/ + uint8_t + encr_key_size; /**< Length of currently active encryption key, 7 to 16 octets (only applicable for bonding procedures). */ +} ble_gap_conn_sec_t; + +/**@brief Identity Resolving Key. */ +typedef struct { + uint8_t irk[BLE_GAP_SEC_KEY_LEN]; /**< Array containing IRK. */ +} ble_gap_irk_t; + +/**@brief Channel mask (40 bits). + * Every channel is represented with a bit positioned as per channel index defined in Bluetooth Core Specification v5.0, + * Vol 6, Part B, Section 1.4.1. The LSB contained in array element 0 represents channel index 0, and bit 39 represents + * channel index 39. If a bit is set to 1, the channel is not used. + */ +typedef uint8_t ble_gap_ch_mask_t[5]; + +/**@brief GAP advertising parameters. */ +typedef struct { + ble_gap_adv_properties_t properties; /**< The properties of the advertising events. */ + ble_gap_addr_t const *p_peer_addr; /**< Address of a known peer. + @note ble_gap_addr_t::addr_type cannot be + @ref BLE_GAP_ADDR_TYPE_ANONYMOUS. + - When privacy is enabled and the local device uses + @ref BLE_GAP_ADDR_TYPE_RANDOM_PRIVATE_RESOLVABLE addresses, + the device identity list is searched for a matching entry. If + the local IRK for that device identity is set, the local IRK + for that device will be used to generate the advertiser address + field in the advertising packet. + - If @ref ble_gap_adv_properties_t::type is directed, this must be + set to the targeted scanner or initiator. If the peer address is + in the device identity list, the peer IRK for that device will be + used to generate @ref BLE_GAP_ADDR_TYPE_RANDOM_PRIVATE_RESOLVABLE + target addresses used in the advertising event PDUs. */ + uint32_t interval; /**< Advertising interval in 625 us units. @sa BLE_GAP_ADV_INTERVALS. + @note If @ref ble_gap_adv_properties_t::type is set to + @ref BLE_GAP_ADV_TYPE_CONNECTABLE_NONSCANNABLE_DIRECTED_HIGH_DUTY_CYCLE + advertising, this parameter is ignored. */ + uint16_t duration; /**< Advertising duration in 10 ms units. When timeout is reached, + an event of type @ref BLE_GAP_EVT_ADV_SET_TERMINATED is raised. + @sa BLE_GAP_ADV_TIMEOUT_VALUES. + @note The SoftDevice will always complete at least one advertising + event even if the duration is set too low. */ + uint8_t max_adv_evts; /**< Maximum advertising events that shall be sent prior to disabling + advertising. Setting the value to 0 disables the limitation. When + the count of advertising events specified by this parameter + (if not 0) is reached, advertising will be automatically stopped + and an event of type @ref BLE_GAP_EVT_ADV_SET_TERMINATED is raised + @note If @ref ble_gap_adv_properties_t::type is set to + @ref BLE_GAP_ADV_TYPE_CONNECTABLE_NONSCANNABLE_DIRECTED_HIGH_DUTY_CYCLE, + this parameter is ignored. */ + ble_gap_ch_mask_t channel_mask; /**< Channel mask for primary and secondary advertising channels. + At least one of the primary channels, that is channel index 37-39, must be used. + Masking away secondary advertising channels is not supported. */ + uint8_t filter_policy; /**< Filter Policy. @sa BLE_GAP_ADV_FILTER_POLICIES. */ + uint8_t primary_phy; /**< Indicates the PHY on which the primary advertising channel packets + are transmitted. If set to @ref BLE_GAP_PHY_AUTO, @ref BLE_GAP_PHY_1MBPS + will be used. + Valid values are @ref BLE_GAP_PHY_1MBPS and @ref BLE_GAP_PHY_CODED. + @note The primary_phy shall indicate @ref BLE_GAP_PHY_1MBPS if + @ref ble_gap_adv_properties_t::type is not an extended advertising type. */ + uint8_t secondary_phy; /**< Indicates the PHY on which the secondary advertising channel packets + are transmitted. + If set to @ref BLE_GAP_PHY_AUTO, @ref BLE_GAP_PHY_1MBPS will be used. + Valid values are + @ref BLE_GAP_PHY_1MBPS, @ref BLE_GAP_PHY_2MBPS, and @ref BLE_GAP_PHY_CODED. + If @ref ble_gap_adv_properties_t::type is an extended advertising type + and connectable, this is the PHY that will be used to establish a + connection and send AUX_ADV_IND packets on. + @note This parameter will be ignored when + @ref ble_gap_adv_properties_t::type is not an extended advertising type. */ + uint8_t set_id : 4; /**< The advertising set identifier distinguishes this advertising set from other + advertising sets transmitted by this and other devices. + @note This parameter will be ignored when + @ref ble_gap_adv_properties_t::type is not an extended advertising type. */ + uint8_t scan_req_notification : 1; /**< Enable scan request notifications for this advertising set. When a + scan request is received and the scanner address is allowed + by the filter policy, @ref BLE_GAP_EVT_SCAN_REQ_REPORT is raised. + @note This parameter will be ignored when + @ref ble_gap_adv_properties_t::type is a non-scannable + advertising type. */ +} ble_gap_adv_params_t; + +/**@brief GAP advertising data buffers. + * + * The application must provide the buffers for advertisement. The memory shall reside in application RAM, and + * shall never be modified while advertising. The data shall be kept alive until either: + * - @ref BLE_GAP_EVT_ADV_SET_TERMINATED is raised. + * - @ref BLE_GAP_EVT_CONNECTED is raised with @ref ble_gap_evt_connected_t::adv_handle set to the corresponding + * advertising handle. + * - Advertising is stopped. + * - Advertising data is changed. + * To update advertising data while advertising, provide new buffers to @ref sd_ble_gap_adv_set_configure. */ +typedef struct { + ble_data_t adv_data; /**< Advertising data. + @note + Advertising data can only be specified for a @ref ble_gap_adv_properties_t::type + that is allowed to contain advertising data. */ + ble_data_t scan_rsp_data; /**< Scan response data. + @note + Scan response data can only be specified for a @ref ble_gap_adv_properties_t::type + that is scannable. */ +} ble_gap_adv_data_t; + +/**@brief GAP scanning parameters. */ +typedef struct { + uint8_t extended : 1; /**< If 1, the scanner will accept extended advertising packets. + If set to 0, the scanner will not receive advertising packets + on secondary advertising channels, and will not be able + to receive long advertising PDUs. */ + uint8_t report_incomplete_evts : 1; /**< If 1, events of type @ref ble_gap_evt_adv_report_t may have + @ref ble_gap_adv_report_type_t::status set to + @ref BLE_GAP_ADV_DATA_STATUS_INCOMPLETE_MORE_DATA. + This parameter is ignored when used with @ref sd_ble_gap_connect + @note This may be used to abort receiving more packets from an extended + advertising event, and is only available for extended + scanning, see @ref sd_ble_gap_scan_start. + @note This feature is not supported by this SoftDevice. */ + uint8_t active : 1; /**< If 1, perform active scanning by sending scan requests. + This parameter is ignored when used with @ref sd_ble_gap_connect. */ + uint8_t filter_policy : 2; /**< Scanning filter policy. @sa BLE_GAP_SCAN_FILTER_POLICIES. + @note Only @ref BLE_GAP_SCAN_FP_ACCEPT_ALL and + @ref BLE_GAP_SCAN_FP_WHITELIST are valid when used with + @ref sd_ble_gap_connect */ + uint8_t scan_phys; /**< Bitfield of PHYs to scan on. If set to @ref BLE_GAP_PHY_AUTO, + scan_phys will default to @ref BLE_GAP_PHY_1MBPS. + - If @ref ble_gap_scan_params_t::extended is set to 0, the only + supported PHY is @ref BLE_GAP_PHY_1MBPS. + - When used with @ref sd_ble_gap_scan_start, + the bitfield indicates the PHYs the scanner will use for scanning + on primary advertising channels. The scanner will accept + @ref BLE_GAP_PHYS_SUPPORTED as secondary advertising channel PHYs. + - When used with @ref sd_ble_gap_connect, the bitfield indicates + the PHYs the initiator will use for scanning on primary advertising + channels. The initiator will accept connections initiated on either + of the @ref BLE_GAP_PHYS_SUPPORTED PHYs. + If scan_phys contains @ref BLE_GAP_PHY_1MBPS and/or @ref BLE_GAP_PHY_2MBPS, + the primary scan PHY is @ref BLE_GAP_PHY_1MBPS. + If scan_phys also contains @ref BLE_GAP_PHY_CODED, the primary scan + PHY will also contain @ref BLE_GAP_PHY_CODED. If the only scan PHY is + @ref BLE_GAP_PHY_CODED, the primary scan PHY is + @ref BLE_GAP_PHY_CODED only. */ + uint16_t interval; /**< Scan interval in 625 us units. @sa BLE_GAP_SCAN_INTERVALS. */ + uint16_t window; /**< Scan window in 625 us units. @sa BLE_GAP_SCAN_WINDOW. + If scan_phys contains both @ref BLE_GAP_PHY_1MBPS and + @ref BLE_GAP_PHY_CODED interval shall be larger than or + equal to twice the scan window. */ + uint16_t timeout; /**< Scan timeout in 10 ms units. @sa BLE_GAP_SCAN_TIMEOUT. */ + ble_gap_ch_mask_t channel_mask; /**< Channel mask for primary and secondary advertising channels. + At least one of the primary channels, that is channel index 37-39, must be + set to 0. + Masking away secondary channels is not supported. */ +} ble_gap_scan_params_t; + +/**@brief Privacy. + * + * The privacy feature provides a way for the device to avoid being tracked over a period of time. + * The privacy feature, when enabled, hides the local device identity and replaces it with a private address + * that is automatically refreshed at a specified interval. + * + * If a device still wants to be recognized by other peers, it needs to share it's Identity Resolving Key (IRK). + * With this key, a device can generate a random private address that can only be recognized by peers in possession of that + * key, and devices can establish connections without revealing their real identities. + * + * Both network privacy (@ref BLE_GAP_PRIVACY_MODE_NETWORK_PRIVACY) and device privacy (@ref + * BLE_GAP_PRIVACY_MODE_DEVICE_PRIVACY) are supported. + * + * @note If the device IRK is updated, the new IRK becomes the one to be distributed in all + * bonding procedures performed after @ref sd_ble_gap_privacy_set returns. + * The IRK distributed during bonding procedure is the device IRK that is active when @ref sd_ble_gap_sec_params_reply is + * called. + */ +typedef struct { + uint8_t privacy_mode; /**< Privacy mode, see @ref BLE_GAP_PRIVACY_MODES. Default is @ref BLE_GAP_PRIVACY_MODE_OFF. */ + uint8_t private_addr_type; /**< The private address type must be either @ref BLE_GAP_ADDR_TYPE_RANDOM_PRIVATE_RESOLVABLE or + @ref BLE_GAP_ADDR_TYPE_RANDOM_PRIVATE_NON_RESOLVABLE. */ + uint16_t private_addr_cycle_s; /**< Private address cycle interval in seconds. Providing an address cycle value of 0 will use + the default value defined by @ref BLE_GAP_DEFAULT_PRIVATE_ADDR_CYCLE_INTERVAL_S. */ + ble_gap_irk_t + *p_device_irk; /**< When used as input, pointer to IRK structure that will be used as the default IRK. If NULL, the device + default IRK will be used. When used as output, pointer to IRK structure where the current default IRK + will be written to. If NULL, this argument is ignored. By default, the default IRK is used to generate + random private resolvable addresses for the local device unless instructed otherwise. */ +} ble_gap_privacy_params_t; + +/**@brief PHY preferences for TX and RX + * @note tx_phys and rx_phys are bit fields. Multiple bits can be set in them to indicate multiple preferred PHYs for each + * direction. + * @code + * p_gap_phys->tx_phys = BLE_GAP_PHY_1MBPS | BLE_GAP_PHY_2MBPS; + * p_gap_phys->rx_phys = BLE_GAP_PHY_1MBPS | BLE_GAP_PHY_2MBPS; + * @endcode + * + */ +typedef struct { + uint8_t tx_phys; /**< Preferred transmit PHYs, see @ref BLE_GAP_PHYS. */ + uint8_t rx_phys; /**< Preferred receive PHYs, see @ref BLE_GAP_PHYS. */ +} ble_gap_phys_t; + +/** @brief Keys that can be exchanged during a bonding procedure. */ +typedef struct { + uint8_t enc : 1; /**< Long Term Key and Master Identification. */ + uint8_t id : 1; /**< Identity Resolving Key and Identity Address Information. */ + uint8_t sign : 1; /**< Connection Signature Resolving Key. */ + uint8_t link : 1; /**< Derive the Link Key from the LTK. */ +} ble_gap_sec_kdist_t; + +/**@brief GAP security parameters. */ +typedef struct { + uint8_t bond : 1; /**< Perform bonding. */ + uint8_t mitm : 1; /**< Enable Man In The Middle protection. */ + uint8_t lesc : 1; /**< Enable LE Secure Connection pairing. */ + uint8_t keypress : 1; /**< Enable generation of keypress notifications. */ + uint8_t io_caps : 3; /**< IO capabilities, see @ref BLE_GAP_IO_CAPS. */ + uint8_t oob : 1; /**< The OOB data flag. + - In LE legacy pairing, this flag is set if a device has out of band authentication data. + The OOB method is used if both of the devices have out of band authentication data. + - In LE Secure Connections pairing, this flag is set if a device has the peer device's out of band + authentication data. The OOB method is used if at least one device has the peer device's OOB data + available. */ + uint8_t + min_key_size; /**< Minimum encryption key size in octets between 7 and 16. If 0 then not applicable in this instance. */ + uint8_t max_key_size; /**< Maximum encryption key size in octets between min_key_size and 16. */ + ble_gap_sec_kdist_t kdist_own; /**< Key distribution bitmap: keys that the local device will distribute. */ + ble_gap_sec_kdist_t kdist_peer; /**< Key distribution bitmap: keys that the remote device will distribute. */ +} ble_gap_sec_params_t; + +/**@brief GAP Encryption Information. */ +typedef struct { + uint8_t ltk[BLE_GAP_SEC_KEY_LEN]; /**< Long Term Key. */ + uint8_t lesc : 1; /**< Key generated using LE Secure Connections. */ + uint8_t auth : 1; /**< Authenticated Key. */ + uint8_t ltk_len : 6; /**< LTK length in octets. */ +} ble_gap_enc_info_t; + +/**@brief GAP Master Identification. */ +typedef struct { + uint16_t ediv; /**< Encrypted Diversifier. */ + uint8_t rand[BLE_GAP_SEC_RAND_LEN]; /**< Random Number. */ +} ble_gap_master_id_t; + +/**@brief GAP Signing Information. */ +typedef struct { + uint8_t csrk[BLE_GAP_SEC_KEY_LEN]; /**< Connection Signature Resolving Key. */ +} ble_gap_sign_info_t; + +/**@brief GAP LE Secure Connections P-256 Public Key. */ +typedef struct { + uint8_t pk[BLE_GAP_LESC_P256_PK_LEN]; /**< LE Secure Connections Elliptic Curve Diffie-Hellman P-256 Public Key. Stored in the + standard SMP protocol format: {X,Y} both in little-endian. */ +} ble_gap_lesc_p256_pk_t; + +/**@brief GAP LE Secure Connections DHKey. */ +typedef struct { + uint8_t key[BLE_GAP_LESC_DHKEY_LEN]; /**< LE Secure Connections Elliptic Curve Diffie-Hellman Key. Stored in little-endian. */ +} ble_gap_lesc_dhkey_t; + +/**@brief GAP LE Secure Connections OOB data. */ +typedef struct { + ble_gap_addr_t addr; /**< Bluetooth address of the device. */ + uint8_t r[BLE_GAP_SEC_KEY_LEN]; /**< Random Number. */ + uint8_t c[BLE_GAP_SEC_KEY_LEN]; /**< Confirm Value. */ +} ble_gap_lesc_oob_data_t; + +/**@brief Event structure for @ref BLE_GAP_EVT_CONNECTED. */ +typedef struct { + ble_gap_addr_t + peer_addr; /**< Bluetooth address of the peer device. If the peer_addr resolved: @ref + ble_gap_addr_t::addr_id_peer is set to 1 and the address is the device's identity address. */ + uint8_t role; /**< BLE role for this connection, see @ref BLE_GAP_ROLES */ + ble_gap_conn_params_t conn_params; /**< GAP Connection Parameters. */ + uint8_t adv_handle; /**< Advertising handle in which advertising has ended. + This variable is only set if role is set to @ref BLE_GAP_ROLE_PERIPH. */ + ble_gap_adv_data_t adv_data; /**< Advertising buffers corresponding to the terminated + advertising set. The advertising buffers provided in + @ref sd_ble_gap_adv_set_configure are now released. + This variable is only set if role is set to @ref BLE_GAP_ROLE_PERIPH. */ +} ble_gap_evt_connected_t; + +/**@brief Event structure for @ref BLE_GAP_EVT_DISCONNECTED. */ +typedef struct { + uint8_t reason; /**< HCI error code, see @ref BLE_HCI_STATUS_CODES. */ +} ble_gap_evt_disconnected_t; + +/**@brief Event structure for @ref BLE_GAP_EVT_CONN_PARAM_UPDATE. */ +typedef struct { + ble_gap_conn_params_t conn_params; /**< GAP Connection Parameters. */ +} ble_gap_evt_conn_param_update_t; + +/**@brief Event structure for @ref BLE_GAP_EVT_PHY_UPDATE_REQUEST. */ +typedef struct { + ble_gap_phys_t peer_preferred_phys; /**< The PHYs the peer prefers to use. */ +} ble_gap_evt_phy_update_request_t; + +/**@brief Event Structure for @ref BLE_GAP_EVT_PHY_UPDATE. */ +typedef struct { + uint8_t status; /**< Status of the procedure, see @ref BLE_HCI_STATUS_CODES.*/ + uint8_t tx_phy; /**< TX PHY for this connection, see @ref BLE_GAP_PHYS. */ + uint8_t rx_phy; /**< RX PHY for this connection, see @ref BLE_GAP_PHYS. */ +} ble_gap_evt_phy_update_t; + +/**@brief Event structure for @ref BLE_GAP_EVT_SEC_PARAMS_REQUEST. */ +typedef struct { + ble_gap_sec_params_t peer_params; /**< Initiator Security Parameters. */ +} ble_gap_evt_sec_params_request_t; + +/**@brief Event structure for @ref BLE_GAP_EVT_SEC_INFO_REQUEST. */ +typedef struct { + ble_gap_addr_t peer_addr; /**< Bluetooth address of the peer device. */ + ble_gap_master_id_t master_id; /**< Master Identification for LTK lookup. */ + uint8_t enc_info : 1; /**< If 1, Encryption Information required. */ + uint8_t id_info : 1; /**< If 1, Identity Information required. */ + uint8_t sign_info : 1; /**< If 1, Signing Information required. */ +} ble_gap_evt_sec_info_request_t; + +/**@brief Event structure for @ref BLE_GAP_EVT_PASSKEY_DISPLAY. */ +typedef struct { + uint8_t passkey[BLE_GAP_PASSKEY_LEN]; /**< 6-digit passkey in ASCII ('0'-'9' digits only). */ + uint8_t match_request : 1; /**< If 1 requires the application to report the match using @ref sd_ble_gap_auth_key_reply + with either @ref BLE_GAP_AUTH_KEY_TYPE_NONE if there is no match or + @ref BLE_GAP_AUTH_KEY_TYPE_PASSKEY if there is a match. */ +} ble_gap_evt_passkey_display_t; + +/**@brief Event structure for @ref BLE_GAP_EVT_KEY_PRESSED. */ +typedef struct { + uint8_t kp_not; /**< Keypress notification type, see @ref BLE_GAP_KP_NOT_TYPES. */ +} ble_gap_evt_key_pressed_t; + +/**@brief Event structure for @ref BLE_GAP_EVT_AUTH_KEY_REQUEST. */ +typedef struct { + uint8_t key_type; /**< See @ref BLE_GAP_AUTH_KEY_TYPES. */ +} ble_gap_evt_auth_key_request_t; + +/**@brief Event structure for @ref BLE_GAP_EVT_LESC_DHKEY_REQUEST. */ +typedef struct { + ble_gap_lesc_p256_pk_t + *p_pk_peer; /**< LE Secure Connections remote P-256 Public Key. This will point to the application-supplied memory + inside the keyset during the call to @ref sd_ble_gap_sec_params_reply. */ + 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 + procedure. */ +} ble_gap_evt_lesc_dhkey_request_t; + +/**@brief Security levels supported. + * @note See Bluetooth Specification Version 4.2 Volume 3, Part C, Chapter 10, Section 10.2.1. + */ +typedef struct { + uint8_t lv1 : 1; /**< If 1: Level 1 is supported. */ + uint8_t lv2 : 1; /**< If 1: Level 2 is supported. */ + uint8_t lv3 : 1; /**< If 1: Level 3 is supported. */ + uint8_t lv4 : 1; /**< If 1: Level 4 is supported. */ +} ble_gap_sec_levels_t; + +/**@brief Encryption Key. */ +typedef struct { + ble_gap_enc_info_t enc_info; /**< Encryption Information. */ + ble_gap_master_id_t master_id; /**< Master Identification. */ +} ble_gap_enc_key_t; + +/**@brief Identity Key. */ +typedef struct { + ble_gap_irk_t id_info; /**< Identity Resolving Key. */ + ble_gap_addr_t id_addr_info; /**< Identity Address. */ +} ble_gap_id_key_t; + +/**@brief Security Keys. */ +typedef struct { + ble_gap_enc_key_t *p_enc_key; /**< Encryption Key, or NULL. */ + ble_gap_id_key_t *p_id_key; /**< Identity Key, or NULL. */ + ble_gap_sign_info_t *p_sign_key; /**< Signing Key, or NULL. */ + ble_gap_lesc_p256_pk_t *p_pk; /**< LE Secure Connections P-256 Public Key. When in debug mode the application must use the + value defined in the Core Bluetooth Specification v4.2 Vol.3, Part H, Section 2.3.5.6.1 */ +} ble_gap_sec_keys_t; + +/**@brief Security key set for both local and peer keys. */ +typedef struct { + ble_gap_sec_keys_t keys_own; /**< Keys distributed by the local device. For LE Secure Connections the encryption key will be + generated locally and will always be stored if bonding. */ + ble_gap_sec_keys_t + keys_peer; /**< Keys distributed by the remote device. For LE Secure Connections, p_enc_key must always be NULL. */ +} ble_gap_sec_keyset_t; + +/**@brief Data Length Update Procedure parameters. */ +typedef struct { + uint16_t max_tx_octets; /**< Maximum number of payload octets that a Controller supports for transmission of a single Link + Layer Data Channel PDU. */ + uint16_t max_rx_octets; /**< Maximum number of payload octets that a Controller supports for reception of a single Link Layer + Data Channel PDU. */ + uint16_t max_tx_time_us; /**< Maximum time, in microseconds, that a Controller supports for transmission of a single Link + Layer Data Channel PDU. */ + uint16_t max_rx_time_us; /**< Maximum time, in microseconds, that a Controller supports for reception of a single Link Layer + Data Channel PDU. */ +} ble_gap_data_length_params_t; + +/**@brief Data Length Update Procedure local limitation. */ +typedef struct { + uint16_t tx_payload_limited_octets; /**< If > 0, the requested TX packet length is too long by this many octets. */ + uint16_t rx_payload_limited_octets; /**< If > 0, the requested RX packet length is too long by this many octets. */ + uint16_t tx_rx_time_limited_us; /**< If > 0, the requested combination of TX and RX packet lengths is too long by this many + microseconds. */ +} ble_gap_data_length_limitation_t; + +/**@brief Event structure for @ref BLE_GAP_EVT_AUTH_STATUS. */ +typedef struct { + uint8_t auth_status; /**< Authentication status, see @ref BLE_GAP_SEC_STATUS. */ + uint8_t error_src : 2; /**< On error, source that caused the failure, see @ref BLE_GAP_SEC_STATUS_SOURCES. */ + uint8_t bonded : 1; /**< Procedure resulted in a bond. */ + uint8_t lesc : 1; /**< Procedure resulted in a LE Secure Connection. */ + ble_gap_sec_levels_t sm1_levels; /**< Levels supported in Security Mode 1. */ + ble_gap_sec_levels_t sm2_levels; /**< Levels supported in Security Mode 2. */ + ble_gap_sec_kdist_t kdist_own; /**< Bitmap stating which keys were exchanged (distributed) by the local device. If bonding + with LE Secure Connections, the enc bit will be always set. */ + ble_gap_sec_kdist_t kdist_peer; /**< Bitmap stating which keys were exchanged (distributed) by the remote device. If bonding + with LE Secure Connections, the enc bit will never be set. */ +} ble_gap_evt_auth_status_t; + +/**@brief Event structure for @ref BLE_GAP_EVT_CONN_SEC_UPDATE. */ +typedef struct { + ble_gap_conn_sec_t conn_sec; /**< Connection security level. */ +} ble_gap_evt_conn_sec_update_t; + +/**@brief Event structure for @ref BLE_GAP_EVT_TIMEOUT. */ +typedef struct { + uint8_t src; /**< Source of timeout event, see @ref BLE_GAP_TIMEOUT_SOURCES. */ + union { + ble_data_t adv_report_buffer; /**< If source is set to @ref BLE_GAP_TIMEOUT_SRC_SCAN, the released + scan buffer is contained in this field. */ + } params; /**< Event Parameters. */ +} ble_gap_evt_timeout_t; + +/**@brief Event structure for @ref BLE_GAP_EVT_RSSI_CHANGED. */ +typedef struct { + int8_t rssi; /**< Received Signal Strength Indication in dBm. + @note ERRATA-153 and ERRATA-225 require the rssi sample to be compensated based on a temperature + measurement. */ + uint8_t ch_index; /**< Data Channel Index on which the Signal Strength is measured (0-36). */ +} ble_gap_evt_rssi_changed_t; + +/**@brief Event structure for @ref BLE_GAP_EVT_ADV_SET_TERMINATED */ +typedef struct { + uint8_t reason; /**< Reason for why the advertising set terminated. See + @ref BLE_GAP_EVT_ADV_SET_TERMINATED_REASON. */ + uint8_t adv_handle; /**< Advertising handle in which advertising has ended. */ + uint8_t num_completed_adv_events; /**< If @ref ble_gap_adv_params_t::max_adv_evts was not set to 0, + this field indicates the number of completed advertising events. */ + ble_gap_adv_data_t adv_data; /**< Advertising buffers corresponding to the terminated + advertising set. The advertising buffers provided in + @ref sd_ble_gap_adv_set_configure are now released. */ +} ble_gap_evt_adv_set_terminated_t; + +/**@brief Event structure for @ref BLE_GAP_EVT_ADV_REPORT. + * + * @note If @ref ble_gap_adv_report_type_t::status is set to @ref BLE_GAP_ADV_DATA_STATUS_INCOMPLETE_MORE_DATA, + * not all fields in the advertising report may be available. + * + * @note When ble_gap_adv_report_type_t::status is not set to @ref BLE_GAP_ADV_DATA_STATUS_INCOMPLETE_MORE_DATA, + * scanning will be paused. To continue scanning, call @ref sd_ble_gap_scan_start. + */ +typedef struct { + ble_gap_adv_report_type_t type; /**< Advertising report type. See @ref ble_gap_adv_report_type_t. */ + ble_gap_addr_t peer_addr; /**< Bluetooth address of the peer device. If the peer_addr is resolved: + @ref ble_gap_addr_t::addr_id_peer is set to 1 and the address is the + peer's identity address. */ + ble_gap_addr_t direct_addr; /**< Contains the target address of the advertising event if + @ref ble_gap_adv_report_type_t::directed is set to 1. If the + SoftDevice was able to resolve the address, + @ref ble_gap_addr_t::addr_id_peer is set to 1 and the direct_addr + contains the local identity address. If the target address of the + advertising event is @ref BLE_GAP_ADDR_TYPE_RANDOM_PRIVATE_RESOLVABLE, + and the SoftDevice was unable to resolve it, the application may try + to resolve this address to find out if the advertising event was + directed to us. */ + uint8_t primary_phy; /**< Indicates the PHY on which the primary advertising packet was received. + See @ref BLE_GAP_PHYS. */ + uint8_t secondary_phy; /**< Indicates the PHY on which the secondary advertising packet was received. + See @ref BLE_GAP_PHYS. This field is set to @ref BLE_GAP_PHY_NOT_SET if no packets + were received on a secondary advertising channel. */ + int8_t tx_power; /**< TX Power reported by the advertiser in the last packet header received. + This field is set to @ref BLE_GAP_POWER_LEVEL_INVALID if the + last received packet did not contain the Tx Power field. + @note TX Power is only included in extended advertising packets. */ + int8_t rssi; /**< Received Signal Strength Indication in dBm of the last packet received. + @note ERRATA-153 and ERRATA-225 require the rssi sample to be compensated based on a temperature + measurement. */ + uint8_t ch_index; /**< Channel Index on which the last advertising packet is received (0-39). */ + uint8_t set_id; /**< Set ID of the received advertising data. Set ID is not present + if set to @ref BLE_GAP_ADV_REPORT_SET_ID_NOT_AVAILABLE. */ + uint16_t data_id : 12; /**< The advertising data ID of the received advertising data. Data ID + is not present if @ref ble_gap_evt_adv_report_t::set_id is set to + @ref BLE_GAP_ADV_REPORT_SET_ID_NOT_AVAILABLE. */ + ble_data_t data; /**< Received advertising or scan response data. If + @ref ble_gap_adv_report_type_t::status is not set to + @ref BLE_GAP_ADV_DATA_STATUS_INCOMPLETE_MORE_DATA, the data buffer provided + in @ref sd_ble_gap_scan_start is now released. */ + ble_gap_aux_pointer_t aux_pointer; /**< The offset and PHY of the next advertising packet in this extended advertising + event. @note This field is only set if @ref ble_gap_adv_report_type_t::status + is set to @ref BLE_GAP_ADV_DATA_STATUS_INCOMPLETE_MORE_DATA. */ +} ble_gap_evt_adv_report_t; + +/**@brief Event structure for @ref BLE_GAP_EVT_SEC_REQUEST. */ +typedef struct { + uint8_t bond : 1; /**< Perform bonding. */ + uint8_t mitm : 1; /**< Man In The Middle protection requested. */ + uint8_t lesc : 1; /**< LE Secure Connections requested. */ + uint8_t keypress : 1; /**< Generation of keypress notifications requested. */ +} ble_gap_evt_sec_request_t; + +/**@brief Event structure for @ref BLE_GAP_EVT_CONN_PARAM_UPDATE_REQUEST. */ +typedef struct { + ble_gap_conn_params_t conn_params; /**< GAP Connection Parameters. */ +} ble_gap_evt_conn_param_update_request_t; + +/**@brief Event structure for @ref BLE_GAP_EVT_SCAN_REQ_REPORT. */ +typedef struct { + uint8_t adv_handle; /**< Advertising handle for the advertising set which received the Scan Request */ + int8_t rssi; /**< Received Signal Strength Indication in dBm. + @note ERRATA-153 and ERRATA-225 require the rssi sample to be compensated based on a temperature + measurement. */ + ble_gap_addr_t peer_addr; /**< Bluetooth address of the peer device. If the peer_addr resolved: @ref + ble_gap_addr_t::addr_id_peer is set to 1 and the address is the device's identity address. */ +} ble_gap_evt_scan_req_report_t; + +/**@brief Event structure for @ref BLE_GAP_EVT_DATA_LENGTH_UPDATE_REQUEST. */ +typedef struct { + ble_gap_data_length_params_t peer_params; /**< Peer data length parameters. */ +} ble_gap_evt_data_length_update_request_t; + +/**@brief Event structure for @ref BLE_GAP_EVT_DATA_LENGTH_UPDATE. + * + * @note This event may also be raised after a PHY Update procedure. + */ +typedef struct { + ble_gap_data_length_params_t effective_params; /**< The effective data length parameters. */ +} ble_gap_evt_data_length_update_t; + +/**@brief Event structure for @ref BLE_GAP_EVT_QOS_CHANNEL_SURVEY_REPORT. */ +typedef struct { + int8_t + channel_energy[BLE_GAP_CHANNEL_COUNT]; /**< The measured energy on the Bluetooth Low Energy + channels, in dBm, indexed by Channel Index. + If no measurement is available for the given channel, channel_energy is set to + @ref BLE_GAP_POWER_LEVEL_INVALID. */ +} ble_gap_evt_qos_channel_survey_report_t; + +/**@brief GAP event structure. */ +typedef struct { + uint16_t conn_handle; /**< Connection Handle on which event occurred. */ + union /**< union alternative identified by evt_id in enclosing struct. */ + { + ble_gap_evt_connected_t connected; /**< Connected Event Parameters. */ + ble_gap_evt_disconnected_t disconnected; /**< Disconnected Event Parameters. */ + ble_gap_evt_conn_param_update_t conn_param_update; /**< Connection Parameter Update Parameters. */ + ble_gap_evt_sec_params_request_t sec_params_request; /**< Security Parameters Request Event Parameters. */ + ble_gap_evt_sec_info_request_t sec_info_request; /**< Security Information Request Event Parameters. */ + ble_gap_evt_passkey_display_t passkey_display; /**< Passkey Display Event Parameters. */ + ble_gap_evt_key_pressed_t key_pressed; /**< Key Pressed Event Parameters. */ + ble_gap_evt_auth_key_request_t auth_key_request; /**< Authentication Key Request Event Parameters. */ + ble_gap_evt_lesc_dhkey_request_t lesc_dhkey_request; /**< LE Secure Connections DHKey calculation request. */ + ble_gap_evt_auth_status_t auth_status; /**< Authentication Status Event Parameters. */ + ble_gap_evt_conn_sec_update_t conn_sec_update; /**< Connection Security Update Event Parameters. */ + ble_gap_evt_timeout_t timeout; /**< Timeout Event Parameters. */ + ble_gap_evt_rssi_changed_t rssi_changed; /**< RSSI Event Parameters. */ + ble_gap_evt_adv_report_t adv_report; /**< Advertising Report Event Parameters. */ + ble_gap_evt_adv_set_terminated_t adv_set_terminated; /**< Advertising Set Terminated Event Parameters. */ + ble_gap_evt_sec_request_t sec_request; /**< Security Request Event Parameters. */ + ble_gap_evt_conn_param_update_request_t conn_param_update_request; /**< Connection Parameter Update Parameters. */ + ble_gap_evt_scan_req_report_t scan_req_report; /**< Scan Request Report Parameters. */ + ble_gap_evt_phy_update_request_t phy_update_request; /**< PHY Update Request Event Parameters. */ + ble_gap_evt_phy_update_t phy_update; /**< PHY Update Parameters. */ + ble_gap_evt_data_length_update_request_t data_length_update_request; /**< Data Length Update Request Event Parameters. */ + ble_gap_evt_data_length_update_t data_length_update; /**< Data Length Update Event Parameters. */ + ble_gap_evt_qos_channel_survey_report_t + qos_channel_survey_report; /**< Quality of Service (QoS) Channel Survey Report Parameters. */ + } params; /**< Event Parameters. */ +} ble_gap_evt_t; + +/** + * @brief BLE GAP connection configuration parameters, set with @ref sd_ble_cfg_set. + * + * @retval ::NRF_ERROR_CONN_COUNT The connection count for the connection configurations is zero. + * @retval ::NRF_ERROR_INVALID_PARAM One or more of the following is true: + * - The sum of conn_count for all connection configurations combined exceeds UINT8_MAX. + * - The event length is smaller than @ref BLE_GAP_EVENT_LENGTH_MIN. + */ +typedef struct { + uint8_t conn_count; /**< The number of concurrent connections the application can create with this configuration. + The default and minimum value is @ref BLE_GAP_CONN_COUNT_DEFAULT. */ + uint16_t event_length; /**< The time set aside for this connection on every connection interval in 1.25 ms units. + The default value is @ref BLE_GAP_EVENT_LENGTH_DEFAULT, the minimum value is @ref + BLE_GAP_EVENT_LENGTH_MIN. The event length and the connection interval are the primary parameters + for setting the throughput of a connection. + See the SoftDevice Specification for details on throughput. */ +} ble_gap_conn_cfg_t; + +/** + * @brief Configuration of maximum concurrent connections in the different connected roles, set with + * @ref sd_ble_cfg_set. + * + * @retval ::NRF_ERROR_CONN_COUNT The sum of periph_role_count and central_role_count is too + * large. The maximum supported sum of concurrent connections is + * @ref BLE_GAP_ROLE_COUNT_COMBINED_MAX. + * @retval ::NRF_ERROR_INVALID_PARAM central_sec_count is larger than central_role_count. + * @retval ::NRF_ERROR_RESOURCES The adv_set_count is too large. The maximum + * supported advertising handles is + * @ref BLE_GAP_ADV_SET_COUNT_MAX. + */ +typedef struct { + uint8_t adv_set_count; /**< Maximum number of advertising sets. Default value is @ref BLE_GAP_ADV_SET_COUNT_DEFAULT. */ + uint8_t periph_role_count; /**< Maximum number of connections concurrently acting as a peripheral. Default value is @ref + BLE_GAP_ROLE_COUNT_PERIPH_DEFAULT. */ + uint8_t central_role_count; /**< Maximum number of connections concurrently acting as a central. Default value is @ref + BLE_GAP_ROLE_COUNT_CENTRAL_DEFAULT. */ + uint8_t central_sec_count; /**< Number of SMP instances shared between all connections acting as a central. Default value is + @ref BLE_GAP_ROLE_COUNT_CENTRAL_SEC_DEFAULT. */ + uint8_t qos_channel_survey_role_available : 1; /**< If set, the Quality of Service (QoS) channel survey module is available to + the application using @ref sd_ble_gap_qos_channel_survey_start. */ +} ble_gap_cfg_role_count_t; + +/** + * @brief Device name and its properties, set with @ref sd_ble_cfg_set. + * + * @note If the device name is not configured, the default device name will be + * @ref BLE_GAP_DEVNAME_DEFAULT, the maximum device name length will be + * @ref BLE_GAP_DEVNAME_DEFAULT_LEN, vloc will be set to @ref BLE_GATTS_VLOC_STACK and the device name + * will have no write access. + * + * @note If @ref max_len is more than @ref BLE_GAP_DEVNAME_DEFAULT_LEN and vloc is set to @ref BLE_GATTS_VLOC_STACK, + * the attribute table size must be increased to have room for the longer device name (see + * @ref sd_ble_cfg_set and @ref ble_gatts_cfg_attr_tab_size_t). + * + * @note If vloc is @ref BLE_GATTS_VLOC_STACK : + * - p_value must point to non-volatile memory (flash) or be NULL. + * - If p_value is NULL, the device name will initially be empty. + * + * @note If vloc is @ref BLE_GATTS_VLOC_USER : + * - p_value cannot be NULL. + * - If the device name is writable, p_value must point to volatile memory (RAM). + * + * @retval ::NRF_ERROR_INVALID_PARAM One or more of the following is true: + * - Invalid device name location (vloc). + * - Invalid device name security mode. + * @retval ::NRF_ERROR_INVALID_LENGTH One or more of the following is true: + * - The device name length is invalid (must be between 0 and @ref BLE_GAP_DEVNAME_MAX_LEN). + * - The device name length is too long for the given Attribute Table. + * @retval ::NRF_ERROR_NOT_SUPPORTED Device name security mode is not supported. + */ +typedef struct { + ble_gap_conn_sec_mode_t write_perm; /**< Write permissions. */ + uint8_t vloc : 2; /**< Value location, see @ref BLE_GATTS_VLOCS.*/ + uint8_t *p_value; /**< Pointer to where the value (device name) is stored or will be stored. */ + uint16_t current_len; /**< Current length in bytes of the memory pointed to by p_value.*/ + uint16_t max_len; /**< Maximum length in bytes of the memory pointed to by p_value.*/ +} ble_gap_cfg_device_name_t; + +/**@brief Peripheral Preferred Connection Parameters include configuration parameters, set with @ref sd_ble_cfg_set. */ +typedef struct { + uint8_t include_cfg; /**< Inclusion configuration of the Peripheral Preferred Connection Parameters characteristic. + See @ref BLE_GAP_CHAR_INCL_CONFIG. Default is @ref BLE_GAP_PPCP_INCL_CONFIG_DEFAULT. */ +} ble_gap_cfg_ppcp_incl_cfg_t; + +/**@brief Central Address Resolution include configuration parameters, set with @ref sd_ble_cfg_set. */ +typedef struct { + uint8_t include_cfg; /**< Inclusion configuration of the Central Address Resolution characteristic. + See @ref BLE_GAP_CHAR_INCL_CONFIG. Default is @ref BLE_GAP_CAR_INCL_CONFIG_DEFAULT. */ +} ble_gap_cfg_car_incl_cfg_t; + +/**@brief Configuration structure for GAP configurations. */ +typedef union { + ble_gap_cfg_role_count_t role_count_cfg; /**< Role count configuration, cfg_id is @ref BLE_GAP_CFG_ROLE_COUNT. */ + ble_gap_cfg_device_name_t device_name_cfg; /**< Device name configuration, cfg_id is @ref BLE_GAP_CFG_DEVICE_NAME. */ + ble_gap_cfg_ppcp_incl_cfg_t ppcp_include_cfg; /**< Peripheral Preferred Connection Parameters characteristic include + configuration, cfg_id is @ref BLE_GAP_CFG_PPCP_INCL_CONFIG. */ + ble_gap_cfg_car_incl_cfg_t car_include_cfg; /**< Central Address Resolution characteristic include configuration, + cfg_id is @ref BLE_GAP_CFG_CAR_INCL_CONFIG. */ +} ble_gap_cfg_t; + +/**@brief Channel Map option. + * + * @details Used with @ref sd_ble_opt_get to get the current channel map + * or @ref sd_ble_opt_set to set a new channel map. When setting the + * channel map, it applies to all current and future connections. When getting the + * current channel map, it applies to a single connection and the connection handle + * must be supplied. + * + * @note Setting the channel map may take some time, depending on connection parameters. + * The time taken may be different for each connection and the get operation will + * return the previous channel map until the new one has taken effect. + * + * @note After setting the channel map, by spec it can not be set again until at least 1 s has passed. + * See Bluetooth Specification Version 4.1 Volume 2, Part E, Section 7.3.46. + * + * @retval ::NRF_SUCCESS Get or set successful. + * @retval ::NRF_ERROR_INVALID_PARAM One or more of the following is true: + * - Less then two bits in @ref ch_map are set. + * - Bits for primary advertising channels (37-39) are set. + * @retval ::NRF_ERROR_BUSY Channel map was set again before enough time had passed. + * @retval ::BLE_ERROR_INVALID_CONN_HANDLE Invalid connection handle supplied for get. + * + */ +typedef struct { + uint16_t conn_handle; /**< Connection Handle (only applicable for get) */ + uint8_t ch_map[5]; /**< Channel Map (37-bit). */ +} ble_gap_opt_ch_map_t; + +/**@brief Local connection latency option. + * + * @details Local connection latency is a feature which enables the slave to improve + * current consumption by ignoring the slave latency set by the peer. The + * local connection latency can only be set to a multiple of the slave latency, + * and cannot be longer than half of the supervision timeout. + * + * @details Used with @ref sd_ble_opt_set to set the local connection latency. The + * @ref sd_ble_opt_get is not supported for this option, but the actual + * local connection latency (unless set to NULL) is set as a return parameter + * when setting the option. + * + * @note The latency set will be truncated down to the closest slave latency event + * multiple, or the nearest multiple before half of the supervision timeout. + * + * @note The local connection latency is disabled by default, and needs to be enabled for new + * connections and whenever the connection is updated. + * + * @retval ::NRF_SUCCESS Set successfully. + * @retval ::NRF_ERROR_NOT_SUPPORTED Get is not supported. + * @retval ::BLE_ERROR_INVALID_CONN_HANDLE Invalid connection handle parameter. + */ +typedef struct { + uint16_t conn_handle; /**< Connection Handle */ + uint16_t requested_latency; /**< Requested local connection latency. */ + uint16_t *p_actual_latency; /**< Pointer to storage for the actual local connection latency (can be set to NULL to skip return + value). */ +} ble_gap_opt_local_conn_latency_t; + +/**@brief Disable slave latency + * + * @details Used with @ref sd_ble_opt_set to temporarily disable slave latency of a peripheral connection + * (see @ref ble_gap_conn_params_t::slave_latency). And to re-enable it again. When disabled, the + * peripheral will ignore the slave_latency set by the central. + * + * @note Shall only be called on peripheral links. + * + * @retval ::NRF_SUCCESS Set successfully. + * @retval ::NRF_ERROR_NOT_SUPPORTED Get is not supported. + * @retval ::BLE_ERROR_INVALID_CONN_HANDLE Invalid connection handle parameter. + */ +typedef struct { + uint16_t conn_handle; /**< Connection Handle */ + uint8_t disable; /**< For allowed values see @ref BLE_GAP_SLAVE_LATENCY */ +} ble_gap_opt_slave_latency_disable_t; + +/**@brief Passkey Option. + * + * @mscs + * @mmsc{@ref BLE_GAP_PERIPH_BONDING_STATIC_PK_MSC} + * @endmscs + * + * @details Structure containing the passkey to be used during pairing. This can be used with @ref + * sd_ble_opt_set to make the SoftDevice use a preprogrammed passkey for authentication + * instead of generating a random one. + * + * @note Repeated pairing attempts using the same preprogrammed passkey makes pairing vulnerable to MITM attacks. + * + * @note @ref sd_ble_opt_get is not supported for this option. + * + */ +typedef struct { + uint8_t const *p_passkey; /**< Pointer to 6-digit ASCII string (digit 0..9 only, no NULL termination) passkey to be used + during pairing. If this is NULL, the SoftDevice will generate a random passkey if required.*/ +} ble_gap_opt_passkey_t; + +/**@brief Compatibility mode 1 option. + * + * @details This can be used with @ref sd_ble_opt_set to enable and disable + * compatibility mode 1. Compatibility mode 1 is disabled by default. + * + * @note Compatibility mode 1 enables interoperability with devices that do not support a value of + * 0 for the WinOffset parameter in the Link Layer CONNECT_IND packet. This applies to a + * limited set of legacy peripheral devices from another vendor. Enabling this compatibility + * mode will only have an effect if the local device will act as a central device and + * initiate a connection to a peripheral device. In that case it may lead to the connection + * creation taking up to one connection interval longer to complete for all connections. + * + * @retval ::NRF_SUCCESS Set successfully. + * @retval ::NRF_ERROR_INVALID_STATE When connection creation is ongoing while mode 1 is set. + */ +typedef struct { + uint8_t enable : 1; /**< Enable compatibility mode 1.*/ +} ble_gap_opt_compat_mode_1_t; + +/**@brief Authenticated payload timeout option. + * + * @details This can be used with @ref sd_ble_opt_set to change the Authenticated payload timeout to a value other + * than the default of @ref BLE_GAP_AUTH_PAYLOAD_TIMEOUT_MAX. + * + * @note The authenticated payload timeout event ::BLE_GAP_TIMEOUT_SRC_AUTH_PAYLOAD will be generated + * if auth_payload_timeout time has elapsed without receiving a packet with a valid MIC on an encrypted + * link. + * + * @note The LE ping procedure will be initiated before the timer expires to give the peer a chance + * to reset the timer. In addition the stack will try to prioritize running of LE ping over other + * activities to increase chances of finishing LE ping before timer expires. To avoid side-effects + * on other activities, it is recommended to use high timeout values. + * Recommended timeout > 2*(connInterval * (6 + connSlaveLatency)). + * + * @retval ::NRF_SUCCESS Set successfully. + * @retval ::NRF_ERROR_INVALID_PARAM Invalid parameter(s) supplied. auth_payload_timeout was outside of allowed range. + * @retval ::BLE_ERROR_INVALID_CONN_HANDLE Invalid connection handle parameter. + */ +typedef struct { + uint16_t conn_handle; /**< Connection Handle */ + uint16_t auth_payload_timeout; /**< Requested timeout in 10 ms unit, see @ref BLE_GAP_AUTH_PAYLOAD_TIMEOUT. */ +} ble_gap_opt_auth_payload_timeout_t; + +/**@brief Option structure for GAP options. */ +typedef union { + ble_gap_opt_ch_map_t ch_map; /**< Parameters for the Channel Map option. */ + ble_gap_opt_local_conn_latency_t local_conn_latency; /**< Parameters for the Local connection latency option */ + ble_gap_opt_passkey_t passkey; /**< Parameters for the Passkey option.*/ + ble_gap_opt_compat_mode_1_t compat_mode_1; /**< Parameters for the compatibility mode 1 option.*/ + ble_gap_opt_auth_payload_timeout_t auth_payload_timeout; /**< Parameters for the authenticated payload timeout option.*/ + ble_gap_opt_slave_latency_disable_t slave_latency_disable; /**< Parameters for the Disable slave latency option */ +} ble_gap_opt_t; + +/**@brief Connection event triggering parameters. */ +typedef struct { + uint8_t ppi_ch_id; /**< PPI channel to use. This channel should be regarded as reserved until + connection event PPI task triggering is stopped. + The PPI channel ID can not be one of the PPI channels reserved by + the SoftDevice. See @ref NRF_SOC_SD_PPI_CHANNELS_SD_ENABLED_MSK. */ + uint32_t task_endpoint; /**< Task Endpoint to trigger. */ + uint16_t conn_evt_counter_start; /**< The connection event on which the task triggering should start. */ + uint16_t period_in_events; /**< Trigger period. Valid range is [1, 32767]. + If the device is in slave role and slave latency is enabled, + this parameter should be set to a multiple of (slave latency + 1) + to ensure low power operation. */ +} ble_gap_conn_event_trigger_t; +/**@} */ + +/**@addtogroup BLE_GAP_FUNCTIONS Functions + * @{ */ + +/**@brief Set the local Bluetooth identity address. + * + * The local Bluetooth identity address is the address that identifies this device to other peers. + * The address type must be either @ref BLE_GAP_ADDR_TYPE_PUBLIC or @ref BLE_GAP_ADDR_TYPE_RANDOM_STATIC. + * + * @note The identity address cannot be changed while advertising, scanning or creating a connection. + * + * @note This address will be distributed to the peer during bonding. + * If the address changes, the address stored in the peer device will not be valid and the ability to + * reconnect using the old address will be lost. + * + * @note By default the SoftDevice will set an address of type @ref BLE_GAP_ADDR_TYPE_RANDOM_STATIC upon being + * enabled. The address is a random number populated during the IC manufacturing process and remains unchanged + * for the lifetime of each IC. + * + * @mscs + * @mmsc{@ref BLE_GAP_ADV_MSC} + * @endmscs + * + * @param[in] p_addr Pointer to address structure. + * + * @retval ::NRF_SUCCESS Address successfully set. + * @retval ::NRF_ERROR_INVALID_ADDR Invalid pointer supplied. + * @retval ::BLE_ERROR_GAP_INVALID_BLE_ADDR Invalid address. + * @retval ::NRF_ERROR_BUSY The stack is busy, process pending events and retry. + * @retval ::NRF_ERROR_INVALID_STATE The identity address cannot be changed while advertising, + * scanning or creating a connection. + */ +SVCALL(SD_BLE_GAP_ADDR_SET, uint32_t, sd_ble_gap_addr_set(ble_gap_addr_t const *p_addr)); + +/**@brief Get local Bluetooth identity address. + * + * @note This will always return the identity address irrespective of the privacy settings, + * i.e. the address type will always be either @ref BLE_GAP_ADDR_TYPE_PUBLIC or @ref BLE_GAP_ADDR_TYPE_RANDOM_STATIC. + * + * @param[out] p_addr Pointer to address structure to be filled in. + * + * @retval ::NRF_SUCCESS Address successfully retrieved. + * @retval ::NRF_ERROR_INVALID_ADDR Invalid or NULL pointer supplied. + */ +SVCALL(SD_BLE_GAP_ADDR_GET, uint32_t, sd_ble_gap_addr_get(ble_gap_addr_t *p_addr)); + +/**@brief Get the Bluetooth device address used by the advertiser. + * + * @note This function will return the local Bluetooth address used in advertising PDUs. When + * using privacy, the SoftDevice will generate a new private address every + * @ref ble_gap_privacy_params_t::private_addr_cycle_s configured using + * @ref sd_ble_gap_privacy_set. Hence depending on when the application calls this API, the + * address returned may not be the latest address that is used in the advertising PDUs. + * + * @param[in] adv_handle The advertising handle to get the address from. + * @param[out] p_addr Pointer to address structure to be filled in. + * + * @retval ::NRF_SUCCESS Address successfully retrieved. + * @retval ::NRF_ERROR_INVALID_ADDR Invalid or NULL pointer supplied. + * @retval ::BLE_ERROR_INVALID_ADV_HANDLE The provided advertising handle was not found. + * @retval ::NRF_ERROR_INVALID_STATE The advertising set is currently not advertising. + */ +SVCALL(SD_BLE_GAP_ADV_ADDR_GET, uint32_t, sd_ble_gap_adv_addr_get(uint8_t adv_handle, ble_gap_addr_t *p_addr)); + +/**@brief Set the active whitelist in the SoftDevice. + * + * @note Only one whitelist can be used at a time and the whitelist is shared between the BLE roles. + * The whitelist cannot be set if a BLE role is using the whitelist. + * + * @note If an address is resolved using the information in the device identity list, then the whitelist + * filter policy applies to the peer identity address and not the resolvable address sent on air. + * + * @mscs + * @mmsc{@ref BLE_GAP_WL_SHARE_MSC} + * @mmsc{@ref BLE_GAP_PRIVACY_SCAN_PRIVATE_SCAN_MSC} + * @endmscs + * + * @param[in] pp_wl_addrs Pointer to a whitelist of peer addresses, if NULL the whitelist will be cleared. + * @param[in] len Length of the whitelist, maximum @ref BLE_GAP_WHITELIST_ADDR_MAX_COUNT. + * + * @retval ::NRF_SUCCESS The whitelist is successfully set/cleared. + * @retval ::NRF_ERROR_INVALID_ADDR The whitelist (or one of its entries) provided is invalid. + * @retval ::BLE_ERROR_GAP_WHITELIST_IN_USE The whitelist is in use by a BLE role and cannot be set or cleared. + * @retval ::BLE_ERROR_GAP_INVALID_BLE_ADDR Invalid address type is supplied. + * @retval ::NRF_ERROR_DATA_SIZE The given whitelist size is invalid (zero or too large); this can only return when + * pp_wl_addrs is not NULL. + */ +SVCALL(SD_BLE_GAP_WHITELIST_SET, uint32_t, sd_ble_gap_whitelist_set(ble_gap_addr_t const *const *pp_wl_addrs, uint8_t len)); + +/**@brief Set device identity list. + * + * @note Only one device identity list can be used at a time and the list is shared between the BLE roles. + * The device identity list cannot be set if a BLE role is using the list. + * + * @param[in] pp_id_keys Pointer to an array of peer identity addresses and peer IRKs, if NULL the device identity list will + * be cleared. + * @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 + * same index. To fill in the list with the currently set device IRK for all peers, set to NULL. + * @param[in] len Length of the device identity list, maximum @ref BLE_GAP_DEVICE_IDENTITIES_MAX_COUNT. + * + * @mscs + * @mmsc{@ref BLE_GAP_PRIVACY_ADV_MSC} + * @mmsc{@ref BLE_GAP_PRIVACY_SCAN_MSC} + * @mmsc{@ref BLE_GAP_PRIVACY_SCAN_PRIVATE_SCAN_MSC} + * @mmsc{@ref BLE_GAP_PRIVACY_ADV_DIR_PRIV_MSC} + * @mmsc{@ref BLE_GAP_PERIPH_CONN_PRIV_MSC} + * @mmsc{@ref BLE_GAP_CENTRAL_CONN_PRIV_MSC} + * @endmscs + * + * @retval ::NRF_SUCCESS The device identity list successfully set/cleared. + * @retval ::NRF_ERROR_INVALID_ADDR The device identity list (or one of its entries) provided is invalid. + * This code may be returned if the local IRK list also has an invalid entry. + * @retval ::BLE_ERROR_GAP_DEVICE_IDENTITIES_IN_USE The device identity list is in use and cannot be set or cleared. + * @retval ::BLE_ERROR_GAP_DEVICE_IDENTITIES_DUPLICATE The device identity list contains multiple entries with the same identity + * address. + * @retval ::BLE_ERROR_GAP_INVALID_BLE_ADDR Invalid address type is supplied. + * @retval ::NRF_ERROR_DATA_SIZE The given device identity list size invalid (zero or too large); this can + * only return when pp_id_keys is not NULL. + */ +SVCALL(SD_BLE_GAP_DEVICE_IDENTITIES_SET, uint32_t, + 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, + uint8_t len)); + +/**@brief Set privacy settings. + * + * @note Privacy settings cannot be changed while advertising, scanning or creating a connection. + * + * @param[in] p_privacy_params Privacy settings. + * + * @mscs + * @mmsc{@ref BLE_GAP_PRIVACY_ADV_MSC} + * @mmsc{@ref BLE_GAP_PRIVACY_SCAN_MSC} + * @mmsc{@ref BLE_GAP_PRIVACY_ADV_DIR_PRIV_MSC} + * @endmscs + * + * @retval ::NRF_SUCCESS Set successfully. + * @retval ::NRF_ERROR_BUSY The stack is busy, process pending events and retry. + * @retval ::BLE_ERROR_GAP_INVALID_BLE_ADDR Invalid address type is supplied. + * @retval ::NRF_ERROR_INVALID_ADDR The pointer to privacy settings is NULL or invalid. + * Otherwise, the p_device_irk pointer in privacy parameter is an invalid pointer. + * @retval ::NRF_ERROR_INVALID_PARAM Out of range parameters are provided. + * @retval ::NRF_ERROR_NOT_SUPPORTED The SoftDevice does not support privacy if the Central Address Resolution + characteristic is not configured to be included and the SoftDevice is configured + to support central roles. + See @ref ble_gap_cfg_car_incl_cfg_t and @ref ble_gap_cfg_role_count_t. + * @retval ::NRF_ERROR_INVALID_STATE Privacy settings cannot be changed while advertising, scanning + * or creating a connection. + */ +SVCALL(SD_BLE_GAP_PRIVACY_SET, uint32_t, sd_ble_gap_privacy_set(ble_gap_privacy_params_t const *p_privacy_params)); + +/**@brief Get privacy settings. + * + * @note ::ble_gap_privacy_params_t::p_device_irk must be initialized to NULL or a valid address before this function is called. + * If it is initialized to a valid address, the address pointed to will contain the current device IRK on return. + * + * @param[in,out] p_privacy_params Privacy settings. + * + * @retval ::NRF_SUCCESS Privacy settings read. + * @retval ::NRF_ERROR_INVALID_ADDR The pointer given for returning the privacy settings may be NULL or invalid. + * Otherwise, the p_device_irk pointer in privacy parameter is an invalid pointer. + */ +SVCALL(SD_BLE_GAP_PRIVACY_GET, uint32_t, sd_ble_gap_privacy_get(ble_gap_privacy_params_t *p_privacy_params)); + +/**@brief Configure an advertising set. Set, clear or update advertising and scan response data. + * + * @note The format of the advertising data will be checked by this call to ensure interoperability. + * Limitations imposed by this API call to the data provided include having a flags data type in the scan response data and + * duplicating the local name in the advertising data and scan response data. + * + * @note In order to update advertising data while advertising, new advertising buffers must be provided. + * + * @mscs + * @mmsc{@ref BLE_GAP_ADV_MSC} + * @mmsc{@ref BLE_GAP_WL_SHARE_MSC} + * @endmscs + * + * @param[in,out] p_adv_handle Provide a pointer to a handle containing @ref + * BLE_GAP_ADV_SET_HANDLE_NOT_SET to configure a new advertising set. On success, a new handle is then returned through the + * pointer. Provide a pointer to an existing advertising handle to configure an existing advertising set. + * @param[in] p_adv_data Advertising data. If set to NULL, no advertising data will be used. See + * @ref ble_gap_adv_data_t. + * @param[in] p_adv_params Advertising parameters. When this function is used to update advertising + * data while advertising, this parameter must be NULL. See @ref ble_gap_adv_params_t. + * + * @retval ::NRF_SUCCESS Advertising set successfully configured. + * @retval ::NRF_ERROR_INVALID_PARAM Invalid parameter(s) supplied: + * - Invalid advertising data configuration specified. See @ref + * ble_gap_adv_data_t. + * - Invalid configuration of p_adv_params. See @ref ble_gap_adv_params_t. + * - Use of whitelist requested but whitelist has not been set, + * see @ref sd_ble_gap_whitelist_set. + * @retval ::BLE_ERROR_GAP_INVALID_BLE_ADDR ble_gap_adv_params_t::p_peer_addr is invalid. + * @retval ::NRF_ERROR_INVALID_STATE Invalid state to perform operation. Either: + * - It is invalid to provide non-NULL advertising set parameters while + * advertising. + * - It is invalid to provide the same data buffers while advertising. To + * update advertising data, provide new advertising buffers. + * @retval ::BLE_ERROR_GAP_DISCOVERABLE_WITH_WHITELIST Discoverable mode and whitelist incompatible. + * @retval ::BLE_ERROR_INVALID_ADV_HANDLE The provided advertising handle was not found. Use @ref + * BLE_GAP_ADV_SET_HANDLE_NOT_SET to configure a new advertising handle. + * @retval ::NRF_ERROR_INVALID_ADDR Invalid pointer supplied. + * @retval ::NRF_ERROR_INVALID_FLAGS Invalid combination of advertising flags supplied. + * @retval ::NRF_ERROR_INVALID_DATA Invalid data type(s) supplied. Check the advertising data format + * specification given in Bluetooth Specification Version 5.0, Volume 3, Part C, Chapter 11. + * @retval ::NRF_ERROR_INVALID_LENGTH Invalid data length(s) supplied. + * @retval ::NRF_ERROR_NOT_SUPPORTED Unsupported data length or advertising parameter configuration. + * @retval ::NRF_ERROR_NO_MEM Not enough memory to configure a new advertising handle. Update an + * existing advertising handle instead. + * @retval ::BLE_ERROR_GAP_UUID_LIST_MISMATCH Invalid UUID list supplied. + */ +SVCALL(SD_BLE_GAP_ADV_SET_CONFIGURE, uint32_t, + sd_ble_gap_adv_set_configure(uint8_t *p_adv_handle, ble_gap_adv_data_t const *p_adv_data, + ble_gap_adv_params_t const *p_adv_params)); + +/**@brief Start advertising (GAP Discoverable, Connectable modes, Broadcast Procedure). + * + * @note Only one advertiser may be active at any time. + * + * @note If privacy is enabled, the advertiser's private address will be refreshed when this function is called. + * See @ref sd_ble_gap_privacy_set(). + * + * @events + * @event{@ref BLE_GAP_EVT_CONNECTED, Generated after connection has been established through connectable advertising.} + * @event{@ref BLE_GAP_EVT_ADV_SET_TERMINATED, Advertising set has terminated.} + * @event{@ref BLE_GAP_EVT_SCAN_REQ_REPORT, A scan request was received.} + * @endevents + * + * @mscs + * @mmsc{@ref BLE_GAP_ADV_MSC} + * @mmsc{@ref BLE_GAP_PERIPH_CONN_PRIV_MSC} + * @mmsc{@ref BLE_GAP_PRIVACY_ADV_DIR_PRIV_MSC} + * @mmsc{@ref BLE_GAP_WL_SHARE_MSC} + * @endmscs + * + * @param[in] adv_handle Advertising handle to advertise on, received from @ref sd_ble_gap_adv_set_configure. + * @param[in] conn_cfg_tag Tag identifying a configuration set by @ref sd_ble_cfg_set or + * @ref BLE_CONN_CFG_TAG_DEFAULT to use the default connection configuration. For non-connectable + * advertising, this is ignored. + * + * @retval ::NRF_SUCCESS The BLE stack has started advertising. + * @retval ::NRF_ERROR_INVALID_STATE adv_handle is not configured or already advertising. + * @retval ::NRF_ERROR_CONN_COUNT The limit of available connections for this connection configuration + * tag has been reached; connectable advertiser cannot be started. + * To increase the number of available connections, + * use @ref sd_ble_cfg_set with @ref BLE_GAP_CFG_ROLE_COUNT or @ref BLE_CONN_CFG_GAP. + * @retval ::BLE_ERROR_INVALID_ADV_HANDLE Advertising handle not found. Configure a new adveriting handle with @ref + sd_ble_gap_adv_set_configure. + * @retval ::NRF_ERROR_NOT_FOUND conn_cfg_tag not found. + * @retval ::NRF_ERROR_INVALID_PARAM Invalid parameter(s) supplied: + * - Invalid configuration of p_adv_params. See @ref ble_gap_adv_params_t. + * - Use of whitelist requested but whitelist has not been set, see @ref + sd_ble_gap_whitelist_set. + * @retval ::NRF_ERROR_RESOURCES Either: + * - adv_handle is configured with connectable advertising, but the event_length parameter + * associated with conn_cfg_tag is too small to be able to establish a connection on + * the selected advertising phys. Use @ref sd_ble_cfg_set to increase the event length. + * - Not enough BLE role slots available. + Stop one or more currently active roles (Central, Peripheral, Broadcaster or Observer) + and try again. + * - p_adv_params is configured with connectable advertising, but the event_length + parameter + * associated with conn_cfg_tag is too small to be able to establish a connection on + * the selected advertising phys. Use @ref sd_ble_cfg_set to increase the event length. + */ +SVCALL(SD_BLE_GAP_ADV_START, uint32_t, sd_ble_gap_adv_start(uint8_t adv_handle, uint8_t conn_cfg_tag)); + +/**@brief Stop advertising (GAP Discoverable, Connectable modes, Broadcast Procedure). + * + * @mscs + * @mmsc{@ref BLE_GAP_ADV_MSC} + * @mmsc{@ref BLE_GAP_WL_SHARE_MSC} + * @endmscs + * + * @param[in] adv_handle The advertising handle that should stop advertising. + * + * @retval ::NRF_SUCCESS The BLE stack has stopped advertising. + * @retval ::BLE_ERROR_INVALID_ADV_HANDLE Invalid advertising handle. + * @retval ::NRF_ERROR_INVALID_STATE The advertising handle is not advertising. + */ +SVCALL(SD_BLE_GAP_ADV_STOP, uint32_t, sd_ble_gap_adv_stop(uint8_t adv_handle)); + +/**@brief Update connection parameters. + * + * @details In the central role this will initiate a Link Layer connection parameter update procedure, + * otherwise in the peripheral role, this will send the corresponding L2CAP request and wait for + * the central to perform the procedure. In both cases, and regardless of success or failure, the application + * will be informed of the result with a @ref BLE_GAP_EVT_CONN_PARAM_UPDATE event. + * + * @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 + * procedure unrequested. + * + * @events + * @event{@ref BLE_GAP_EVT_CONN_PARAM_UPDATE, Result of the connection parameter update procedure.} + * @endevents + * + * @mscs + * @mmsc{@ref BLE_GAP_CPU_MSC} + * @mmsc{@ref BLE_GAP_CENTRAL_ENC_AUTH_MUTEX_MSC} + * @mmsc{@ref BLE_GAP_MULTILINK_CPU_MSC} + * @mmsc{@ref BLE_GAP_MULTILINK_CTRL_PROC_MSC} + * @mmsc{@ref BLE_GAP_CENTRAL_CPU_MSC} + * @endmscs + * + * @param[in] conn_handle Connection handle. + * @param[in] p_conn_params Pointer to desired connection parameters. If NULL is provided on a peripheral role, + * the parameters in the PPCP characteristic of the GAP service will be used instead. + * If NULL is provided on a central role and in response to a @ref + * BLE_GAP_EVT_CONN_PARAM_UPDATE_REQUEST, the peripheral request will be rejected + * + * @retval ::NRF_SUCCESS The Connection Update procedure has been started successfully. + * @retval ::NRF_ERROR_INVALID_ADDR Invalid pointer supplied. + * @retval ::NRF_ERROR_INVALID_PARAM Invalid parameter(s) supplied, check parameter limits and constraints. + * @retval ::NRF_ERROR_INVALID_STATE Disconnection in progress or link has not been established. + * @retval ::NRF_ERROR_BUSY Procedure already in progress, wait for pending procedures to complete and retry. + * @retval ::BLE_ERROR_INVALID_CONN_HANDLE Invalid connection handle supplied. + * @retval ::NRF_ERROR_NO_MEM Not enough memory to complete operation. + */ +SVCALL(SD_BLE_GAP_CONN_PARAM_UPDATE, uint32_t, + sd_ble_gap_conn_param_update(uint16_t conn_handle, ble_gap_conn_params_t const *p_conn_params)); + +/**@brief Disconnect (GAP Link Termination). + * + * @details This call initiates the disconnection procedure, and its completion will be communicated to the application + * with a @ref BLE_GAP_EVT_DISCONNECTED event. + * + * @events + * @event{@ref BLE_GAP_EVT_DISCONNECTED, Generated when disconnection procedure is complete.} + * @endevents + * + * @mscs + * @mmsc{@ref BLE_GAP_CONN_MSC} + * @endmscs + * + * @param[in] conn_handle Connection handle. + * @param[in] hci_status_code HCI status code, see @ref BLE_HCI_STATUS_CODES (accepted values are @ref + * BLE_HCI_REMOTE_USER_TERMINATED_CONNECTION and @ref BLE_HCI_CONN_INTERVAL_UNACCEPTABLE). + * + * @retval ::NRF_SUCCESS The disconnection procedure has been started successfully. + * @retval ::NRF_ERROR_INVALID_PARAM Invalid parameter(s) supplied. + * @retval ::BLE_ERROR_INVALID_CONN_HANDLE Invalid connection handle supplied. + * @retval ::NRF_ERROR_INVALID_STATE Disconnection in progress or link has not been established. + */ +SVCALL(SD_BLE_GAP_DISCONNECT, uint32_t, sd_ble_gap_disconnect(uint16_t conn_handle, uint8_t hci_status_code)); + +/**@brief Set the radio's transmit power. + * + * @param[in] role The role to set the transmit power for, see @ref BLE_GAP_TX_POWER_ROLES for + * possible roles. + * @param[in] handle The handle parameter is interpreted depending on role: + * - If role is @ref BLE_GAP_TX_POWER_ROLE_CONN, this value is the specific connection handle. + * - If role is @ref BLE_GAP_TX_POWER_ROLE_ADV, the advertising set identified with the advertising handle, + * will use the specified transmit power, and include it in the advertising packet headers if + * @ref ble_gap_adv_properties_t::include_tx_power set. + * - For all other roles handle is ignored. + * @param[in] tx_power Radio transmit power in dBm (see note for accepted values). + * + * @note Supported tx_power values: -40dBm, -20dBm, -16dBm, -12dBm, -8dBm, -4dBm, 0dBm, +3dBm and +4dBm. + * In addition, on some chips following values are supported: +2dBm, +5dBm, +6dBm, +7dBm and +8dBm. + * Setting these values on a chip that does not support them will result in undefined behaviour. + * @note The initiator will have the same transmit power as the scanner. + * @note When a connection is created it will inherit the transmit power from the initiator or + * advertiser leading to the connection. + * + * @retval ::NRF_SUCCESS Successfully changed the transmit power. + * @retval ::NRF_ERROR_INVALID_PARAM Invalid parameter(s) supplied. + * @retval ::BLE_ERROR_INVALID_ADV_HANDLE Advertising handle not found. + * @retval ::BLE_ERROR_INVALID_CONN_HANDLE Invalid connection handle supplied. + */ +SVCALL(SD_BLE_GAP_TX_POWER_SET, uint32_t, sd_ble_gap_tx_power_set(uint8_t role, uint16_t handle, int8_t tx_power)); + +/**@brief Set GAP Appearance value. + * + * @param[in] appearance Appearance (16-bit), see @ref BLE_APPEARANCES. + * + * @retval ::NRF_SUCCESS Appearance value set successfully. + * @retval ::NRF_ERROR_INVALID_PARAM Invalid parameter(s) supplied. + */ +SVCALL(SD_BLE_GAP_APPEARANCE_SET, uint32_t, sd_ble_gap_appearance_set(uint16_t appearance)); + +/**@brief Get GAP Appearance value. + * + * @param[out] p_appearance Pointer to appearance (16-bit) to be filled in, see @ref BLE_APPEARANCES. + * + * @retval ::NRF_SUCCESS Appearance value retrieved successfully. + * @retval ::NRF_ERROR_INVALID_ADDR Invalid pointer supplied. + */ +SVCALL(SD_BLE_GAP_APPEARANCE_GET, uint32_t, sd_ble_gap_appearance_get(uint16_t *p_appearance)); + +/**@brief Set GAP Peripheral Preferred Connection Parameters. + * + * @param[in] p_conn_params Pointer to a @ref ble_gap_conn_params_t structure with the desired parameters. + * + * @retval ::NRF_SUCCESS Peripheral Preferred Connection Parameters set successfully. + * @retval ::NRF_ERROR_INVALID_ADDR Invalid pointer supplied. + * @retval ::NRF_ERROR_INVALID_PARAM Invalid parameter(s) supplied. + * @retval ::NRF_ERROR_NOT_SUPPORTED The characteristic is not included in the Attribute Table, + see @ref ble_gap_cfg_ppcp_incl_cfg_t. + */ +SVCALL(SD_BLE_GAP_PPCP_SET, uint32_t, sd_ble_gap_ppcp_set(ble_gap_conn_params_t const *p_conn_params)); + +/**@brief Get GAP Peripheral Preferred Connection Parameters. + * + * @param[out] p_conn_params Pointer to a @ref ble_gap_conn_params_t structure where the parameters will be stored. + * + * @retval ::NRF_SUCCESS Peripheral Preferred Connection Parameters retrieved successfully. + * @retval ::NRF_ERROR_INVALID_ADDR Invalid pointer supplied. + * @retval ::NRF_ERROR_NOT_SUPPORTED The characteristic is not included in the Attribute Table, + see @ref ble_gap_cfg_ppcp_incl_cfg_t. + */ +SVCALL(SD_BLE_GAP_PPCP_GET, uint32_t, sd_ble_gap_ppcp_get(ble_gap_conn_params_t *p_conn_params)); + +/**@brief Set GAP device name. + * + * @note If the device name is located in application flash memory (see @ref ble_gap_cfg_device_name_t), + * it cannot be changed. Then @ref NRF_ERROR_FORBIDDEN will be returned. + * + * @param[in] p_write_perm Write permissions for the Device Name characteristic, see @ref ble_gap_conn_sec_mode_t. + * @param[in] p_dev_name Pointer to a UTF-8 encoded, non NULL-terminated string. + * @param[in] len Length of the UTF-8, non NULL-terminated string pointed to by p_dev_name in octets (must be smaller or + * equal than @ref BLE_GAP_DEVNAME_MAX_LEN). + * + * @retval ::NRF_SUCCESS GAP device name and permissions set successfully. + * @retval ::NRF_ERROR_INVALID_ADDR Invalid pointer supplied. + * @retval ::NRF_ERROR_INVALID_PARAM Invalid parameter(s) supplied. + * @retval ::NRF_ERROR_DATA_SIZE Invalid data size(s) supplied. + * @retval ::NRF_ERROR_FORBIDDEN Device name is not writable. + */ +SVCALL(SD_BLE_GAP_DEVICE_NAME_SET, uint32_t, + 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)); + +/**@brief Get GAP device name. + * + * @note If the device name is longer than the size of the supplied buffer, + * p_len will return the complete device name length, + * and not the number of bytes actually returned in p_dev_name. + * The application may use this information to allocate a suitable buffer size. + * + * @param[out] p_dev_name Pointer to an empty buffer where the UTF-8 non NULL-terminated string will be placed. Set to + * NULL to obtain the complete device name length. + * @param[in,out] p_len Length of the buffer pointed by p_dev_name, complete device name length on output. + * + * @retval ::NRF_SUCCESS GAP device name retrieved successfully. + * @retval ::NRF_ERROR_INVALID_ADDR Invalid pointer supplied. + * @retval ::NRF_ERROR_DATA_SIZE Invalid data size(s) supplied. + */ +SVCALL(SD_BLE_GAP_DEVICE_NAME_GET, uint32_t, sd_ble_gap_device_name_get(uint8_t *p_dev_name, uint16_t *p_len)); + +/**@brief Initiate the GAP Authentication procedure. + * + * @details In the central role, this function will send an SMP Pairing Request (or an SMP Pairing Failed if rejected), + * otherwise in the peripheral role, an SMP Security Request will be sent. + * + * @events + * @event{Depending on the security parameters set and the packet exchanges with the peer\, the following events may be + * generated:} + * @event{@ref BLE_GAP_EVT_SEC_PARAMS_REQUEST} + * @event{@ref BLE_GAP_EVT_SEC_INFO_REQUEST} + * @event{@ref BLE_GAP_EVT_PASSKEY_DISPLAY} + * @event{@ref BLE_GAP_EVT_KEY_PRESSED} + * @event{@ref BLE_GAP_EVT_AUTH_KEY_REQUEST} + * @event{@ref BLE_GAP_EVT_LESC_DHKEY_REQUEST} + * @event{@ref BLE_GAP_EVT_CONN_SEC_UPDATE} + * @event{@ref BLE_GAP_EVT_AUTH_STATUS} + * @event{@ref BLE_GAP_EVT_TIMEOUT} + * @endevents + * + * @mscs + * @mmsc{@ref BLE_GAP_PERIPH_SEC_REQ_MSC} + * @mmsc{@ref BLE_GAP_CENTRAL_SEC_REQ_MSC} + * @mmsc{@ref BLE_GAP_CENTRAL_ENC_AUTH_MUTEX_MSC} + * @mmsc{@ref BLE_GAP_CENTRAL_PAIRING_JW_MSC} + * @mmsc{@ref BLE_GAP_CENTRAL_BONDING_JW_MSC} + * @mmsc{@ref BLE_GAP_CENTRAL_BONDING_PK_PERIPH_MSC} + * @mmsc{@ref BLE_GAP_CENTRAL_BONDING_PK_PERIPH_OOB_MSC} + * @mmsc{@ref BLE_GAP_CENTRAL_LESC_PAIRING_JW_MSC} + * @mmsc{@ref BLE_GAP_CENTRAL_LESC_BONDING_NC_MSC} + * @mmsc{@ref BLE_GAP_CENTRAL_LESC_BONDING_PKE_PD_MSC} + * @mmsc{@ref BLE_GAP_CENTRAL_LESC_BONDING_PKE_CD_MSC} + * @mmsc{@ref BLE_GAP_CENTRAL_LESC_BONDING_OOB_MSC} + * @endmscs + * + * @param[in] conn_handle Connection handle. + * @param[in] p_sec_params Pointer to the @ref ble_gap_sec_params_t structure with the security parameters to be used during the + * pairing or bonding procedure. In the peripheral role, only the bond, mitm, lesc and keypress fields of this structure are used. + * In the central role, this pointer may be NULL to reject a Security Request. + * + * @retval ::NRF_SUCCESS Successfully initiated authentication procedure. + * @retval ::NRF_ERROR_INVALID_ADDR Invalid pointer supplied. + * @retval ::NRF_ERROR_INVALID_PARAM Invalid parameter(s) supplied. + * @retval ::NRF_ERROR_INVALID_STATE Invalid state to perform operation. Either: + * - No link has been established. + * - An encryption is already executing or queued. + * @retval ::NRF_ERROR_NO_MEM The maximum number of authentication procedures that can run in parallel for the given role is + * reached. + * @retval ::BLE_ERROR_INVALID_CONN_HANDLE Invalid connection handle supplied. + * @retval ::NRF_ERROR_NOT_SUPPORTED Setting of sign or link fields in @ref ble_gap_sec_kdist_t not supported. + * Distribution of own Identity Information is only supported if the Central + * Address Resolution characteristic is configured to be included or + * the Softdevice is configured to support peripheral roles only. + * See @ref ble_gap_cfg_car_incl_cfg_t and @ref ble_gap_cfg_role_count_t. + * @retval ::NRF_ERROR_TIMEOUT A SMP timeout has occurred, and further SMP operations on this link is prohibited. + */ +SVCALL(SD_BLE_GAP_AUTHENTICATE, uint32_t, + sd_ble_gap_authenticate(uint16_t conn_handle, ble_gap_sec_params_t const *p_sec_params)); + +/**@brief Reply with GAP security parameters. + * + * @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 + * an @ref NRF_ERROR_INVALID_STATE. + * @note If the call returns an error code, the request is still pending, and the reply call may be repeated with corrected + * parameters. + * + * @events + * @event{This function is used during authentication procedures, see the list of events in the documentation of @ref + * sd_ble_gap_authenticate.} + * @endevents + * + * @mscs + * @mmsc{@ref BLE_GAP_PERIPH_PAIRING_JW_MSC} + * @mmsc{@ref BLE_GAP_PERIPH_BONDING_JW_MSC} + * @mmsc{@ref BLE_GAP_PERIPH_BONDING_PK_PERIPH_MSC} + * @mmsc{@ref BLE_GAP_PERIPH_BONDING_PK_CENTRAL_OOB_MSC} + * @mmsc{@ref BLE_GAP_PERIPH_BONDING_STATIC_PK_MSC} + * @mmsc{@ref BLE_GAP_PERIPH_PAIRING_CONFIRM_FAIL_MSC} + * @mmsc{@ref BLE_GAP_PERIPH_LESC_PAIRING_JW_MSC} + * @mmsc{@ref BLE_GAP_PERIPH_LESC_BONDING_NC_MSC} + * @mmsc{@ref BLE_GAP_PERIPH_LESC_BONDING_PKE_PD_MSC} + * @mmsc{@ref BLE_GAP_PERIPH_LESC_BONDING_PKE_CD_MSC} + * @mmsc{@ref BLE_GAP_PERIPH_LESC_BONDING_OOB_MSC} + * @mmsc{@ref BLE_GAP_PERIPH_PAIRING_KS_TOO_SMALL_MSC} + * @mmsc{@ref BLE_GAP_PERIPH_PAIRING_APP_ERROR_MSC} + * @mmsc{@ref BLE_GAP_PERIPH_PAIRING_REMOTE_PAIRING_FAIL_MSC} + * @mmsc{@ref BLE_GAP_PERIPH_PAIRING_TIMEOUT_MSC} + * @mmsc{@ref BLE_GAP_CENTRAL_PAIRING_JW_MSC} + * @mmsc{@ref BLE_GAP_CENTRAL_BONDING_JW_MSC} + * @mmsc{@ref BLE_GAP_CENTRAL_BONDING_PK_PERIPH_MSC} + * @mmsc{@ref BLE_GAP_CENTRAL_BONDING_PK_PERIPH_OOB_MSC} + * @mmsc{@ref BLE_GAP_CENTRAL_LESC_PAIRING_JW_MSC} + * @mmsc{@ref BLE_GAP_CENTRAL_LESC_BONDING_NC_MSC} + * @mmsc{@ref BLE_GAP_CENTRAL_LESC_BONDING_PKE_PD_MSC} + * @mmsc{@ref BLE_GAP_CENTRAL_LESC_BONDING_PKE_CD_MSC} + * @mmsc{@ref BLE_GAP_CENTRAL_LESC_BONDING_OOB_MSC} + * @endmscs + * + * @param[in] conn_handle Connection handle. + * @param[in] sec_status Security status, see @ref BLE_GAP_SEC_STATUS. + * @param[in] p_sec_params Pointer to a @ref ble_gap_sec_params_t security parameters structure. In the central role this must be + * set to NULL, as the parameters have already been provided during a previous call to @ref sd_ble_gap_authenticate. + * @param[in,out] p_sec_keyset Pointer to a @ref ble_gap_sec_keyset_t security keyset structure. Any keys generated and/or + * distributed as a result of the ongoing security procedure will be stored into the memory referenced by the pointers inside this + * structure. The keys will be stored and available to the application upon reception of a @ref BLE_GAP_EVT_AUTH_STATUS event. + * Note that the SoftDevice expects the application to provide memory for storing the + * peer's keys. So it must be ensured that the relevant pointers inside this structure are not NULL. The + * pointers to the local key can, however, be NULL, in which case, the local key data will not be available to the application + * upon reception of the + * @ref BLE_GAP_EVT_AUTH_STATUS event. + * + * @retval ::NRF_SUCCESS Successfully accepted security parameter from the application. + * @retval ::NRF_ERROR_INVALID_ADDR Invalid pointer supplied. + * @retval ::NRF_ERROR_BUSY The stack is busy, process pending events and retry. + * @retval ::NRF_ERROR_INVALID_PARAM Invalid parameter(s) supplied. + * @retval ::NRF_ERROR_INVALID_STATE Security parameters has not been requested. + * @retval ::BLE_ERROR_INVALID_CONN_HANDLE Invalid connection handle supplied. + * @retval ::NRF_ERROR_NOT_SUPPORTED Setting of sign or link fields in @ref ble_gap_sec_kdist_t not supported. + * Distribution of own Identity Information is only supported if the Central + * Address Resolution characteristic is configured to be included or + * the Softdevice is configured to support peripheral roles only. + * See @ref ble_gap_cfg_car_incl_cfg_t and @ref ble_gap_cfg_role_count_t. + */ +SVCALL(SD_BLE_GAP_SEC_PARAMS_REPLY, uint32_t, + sd_ble_gap_sec_params_reply(uint16_t conn_handle, uint8_t sec_status, ble_gap_sec_params_t const *p_sec_params, + ble_gap_sec_keyset_t const *p_sec_keyset)); + +/**@brief Reply with an authentication key. + * + * @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, + * calling it at other times will result in an @ref NRF_ERROR_INVALID_STATE. + * @note If the call returns an error code, the request is still pending, and the reply call may be repeated with corrected + * parameters. + * + * @events + * @event{This function is used during authentication procedures\, see the list of events in the documentation of @ref + * sd_ble_gap_authenticate.} + * @endevents + * + * @mscs + * @mmsc{@ref BLE_GAP_PERIPH_BONDING_PK_CENTRAL_OOB_MSC} + * @mmsc{@ref BLE_GAP_PERIPH_LESC_BONDING_NC_MSC} + * @mmsc{@ref BLE_GAP_PERIPH_LESC_BONDING_PKE_CD_MSC} + * @mmsc{@ref BLE_GAP_CENTRAL_BONDING_PK_PERIPH_OOB_MSC} + * @mmsc{@ref BLE_GAP_CENTRAL_LESC_BONDING_NC_MSC} + * @mmsc{@ref BLE_GAP_CENTRAL_LESC_BONDING_PKE_CD_MSC} + * @endmscs + * + * @param[in] conn_handle Connection handle. + * @param[in] key_type See @ref BLE_GAP_AUTH_KEY_TYPES. + * @param[in] p_key If key type is @ref BLE_GAP_AUTH_KEY_TYPE_NONE, then NULL. + * If key type is @ref BLE_GAP_AUTH_KEY_TYPE_PASSKEY, then a 6-byte ASCII string (digit 0..9 only, no NULL + * termination) or NULL when confirming LE Secure Connections Numeric Comparison. If key type is @ref BLE_GAP_AUTH_KEY_TYPE_OOB, + * then a 16-byte OOB key value in little-endian format. + * + * @retval ::NRF_SUCCESS Authentication key successfully set. + * @retval ::NRF_ERROR_INVALID_ADDR Invalid pointer supplied. + * @retval ::NRF_ERROR_INVALID_PARAM Invalid parameter(s) supplied. + * @retval ::NRF_ERROR_INVALID_STATE Authentication key has not been requested. + * @retval ::BLE_ERROR_INVALID_CONN_HANDLE Invalid connection handle supplied. + */ +SVCALL(SD_BLE_GAP_AUTH_KEY_REPLY, uint32_t, + sd_ble_gap_auth_key_reply(uint16_t conn_handle, uint8_t key_type, uint8_t const *p_key)); + +/**@brief Reply with an LE Secure connections DHKey. + * + * @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 + * an @ref NRF_ERROR_INVALID_STATE. + * @note If the call returns an error code, the request is still pending, and the reply call may be repeated with corrected + * parameters. + * + * @events + * @event{This function is used during authentication procedures\, see the list of events in the documentation of @ref + * sd_ble_gap_authenticate.} + * @endevents + * + * @mscs + * @mmsc{@ref BLE_GAP_PERIPH_LESC_PAIRING_JW_MSC} + * @mmsc{@ref BLE_GAP_PERIPH_LESC_BONDING_NC_MSC} + * @mmsc{@ref BLE_GAP_PERIPH_LESC_BONDING_PKE_PD_MSC} + * @mmsc{@ref BLE_GAP_PERIPH_LESC_BONDING_PKE_CD_MSC} + * @mmsc{@ref BLE_GAP_PERIPH_LESC_BONDING_OOB_MSC} + * @mmsc{@ref BLE_GAP_CENTRAL_LESC_PAIRING_JW_MSC} + * @mmsc{@ref BLE_GAP_CENTRAL_LESC_BONDING_NC_MSC} + * @mmsc{@ref BLE_GAP_CENTRAL_LESC_BONDING_PKE_PD_MSC} + * @mmsc{@ref BLE_GAP_CENTRAL_LESC_BONDING_PKE_CD_MSC} + * @mmsc{@ref BLE_GAP_CENTRAL_LESC_BONDING_OOB_MSC} + * @endmscs + * + * @param[in] conn_handle Connection handle. + * @param[in] p_dhkey LE Secure Connections DHKey. + * + * @retval ::NRF_SUCCESS DHKey successfully set. + * @retval ::NRF_ERROR_INVALID_ADDR Invalid pointer supplied. + * @retval ::NRF_ERROR_INVALID_PARAM Invalid parameter(s) supplied. + * @retval ::NRF_ERROR_INVALID_STATE Invalid state to perform operation. Either: + * - The peer is not authenticated. + * - The application has not pulled a @ref BLE_GAP_EVT_LESC_DHKEY_REQUEST event. + * @retval ::BLE_ERROR_INVALID_CONN_HANDLE Invalid connection handle supplied. + */ +SVCALL(SD_BLE_GAP_LESC_DHKEY_REPLY, uint32_t, + sd_ble_gap_lesc_dhkey_reply(uint16_t conn_handle, ble_gap_lesc_dhkey_t const *p_dhkey)); + +/**@brief Notify the peer of a local keypress. + * + * @mscs + * @mmsc{@ref BLE_GAP_PERIPH_LESC_BONDING_PKE_CD_MSC} + * @mmsc{@ref BLE_GAP_CENTRAL_LESC_BONDING_PKE_CD_MSC} + * @endmscs + * + * @param[in] conn_handle Connection handle. + * @param[in] kp_not See @ref BLE_GAP_KP_NOT_TYPES. + * + * @retval ::NRF_SUCCESS Keypress notification successfully queued for transmission. + * @retval ::NRF_ERROR_INVALID_PARAM Invalid parameter(s) supplied. + * @retval ::NRF_ERROR_INVALID_STATE Invalid state to perform operation. Either: + * - Authentication key not requested. + * - Passkey has not been entered. + * - Keypresses have not been enabled by both peers. + * @retval ::BLE_ERROR_INVALID_CONN_HANDLE Invalid connection handle supplied. + * @retval ::NRF_ERROR_BUSY The BLE stack is busy. Retry at later time. + */ +SVCALL(SD_BLE_GAP_KEYPRESS_NOTIFY, uint32_t, sd_ble_gap_keypress_notify(uint16_t conn_handle, uint8_t kp_not)); + +/**@brief Generate a set of OOB data to send to a peer out of band. + * + * @note The @ref ble_gap_addr_t included in the OOB data returned will be the currently active one (or, if a connection has + * already been established, the one used during connection setup). The application may manually overwrite it with an updated + * value. + * + * @mscs + * @mmsc{@ref BLE_GAP_PERIPH_LESC_BONDING_OOB_MSC} + * @mmsc{@ref BLE_GAP_CENTRAL_LESC_BONDING_OOB_MSC} + * @endmscs + * + * @param[in] conn_handle Connection handle. Can be @ref BLE_CONN_HANDLE_INVALID if a BLE connection has not been established yet. + * @param[in] p_pk_own LE Secure Connections local P-256 Public Key. + * @param[out] p_oobd_own The OOB data to be sent out of band to a peer. + * + * @retval ::NRF_SUCCESS OOB data successfully generated. + * @retval ::NRF_ERROR_INVALID_ADDR Invalid pointer supplied. + * @retval ::BLE_ERROR_INVALID_CONN_HANDLE Invalid connection handle supplied. + */ +SVCALL(SD_BLE_GAP_LESC_OOB_DATA_GET, uint32_t, + sd_ble_gap_lesc_oob_data_get(uint16_t conn_handle, ble_gap_lesc_p256_pk_t const *p_pk_own, + ble_gap_lesc_oob_data_t *p_oobd_own)); + +/**@brief Provide the OOB data sent/received out of band. + * + * @note An authentication procedure with OOB selected as an algorithm must be in progress when calling this function. + * @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 + * function. + * + * @events + * @event{This function is used during authentication procedures\, see the list of events in the documentation of @ref + * sd_ble_gap_authenticate.} + * @endevents + * + * @mscs + * @mmsc{@ref BLE_GAP_PERIPH_LESC_BONDING_OOB_MSC} + * @mmsc{@ref BLE_GAP_CENTRAL_LESC_BONDING_OOB_MSC} + * @endmscs + * + * @param[in] conn_handle Connection handle. + * @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. + * Must correspond to @ref ble_gap_sec_params_t::oob flag in @ref BLE_GAP_EVT_SEC_PARAMS_REQUEST. + * @param[in] p_oobd_peer The OOB data received out of band from a peer or NULL if none received. + * Must correspond to @ref ble_gap_sec_params_t::oob flag + * in @ref sd_ble_gap_authenticate in the central role or + * in @ref sd_ble_gap_sec_params_reply in the peripheral role. + * + * @retval ::NRF_SUCCESS OOB data accepted. + * @retval ::NRF_ERROR_INVALID_ADDR Invalid pointer supplied. + * @retval ::NRF_ERROR_INVALID_STATE Invalid state to perform operation. Either: + * - Authentication key not requested + * - Not expecting LESC OOB data + * - Have not actually exchanged passkeys. + * @retval ::BLE_ERROR_INVALID_CONN_HANDLE Invalid connection handle supplied. + */ +SVCALL(SD_BLE_GAP_LESC_OOB_DATA_SET, uint32_t, + sd_ble_gap_lesc_oob_data_set(uint16_t conn_handle, ble_gap_lesc_oob_data_t const *p_oobd_own, + ble_gap_lesc_oob_data_t const *p_oobd_peer)); + +/**@brief Initiate GAP Encryption procedure. + * + * @details In the central role, this function will initiate the encryption procedure using the encryption information provided. + * + * @events + * @event{@ref BLE_GAP_EVT_CONN_SEC_UPDATE, The connection security has been updated.} + * @endevents + * + * @mscs + * @mmsc{@ref BLE_GAP_CENTRAL_ENC_AUTH_MUTEX_MSC} + * @mmsc{@ref BLE_GAP_CENTRAL_ENC_MSC} + * @mmsc{@ref BLE_GAP_MULTILINK_CTRL_PROC_MSC} + * @mmsc{@ref BLE_GAP_CENTRAL_SEC_REQ_MSC} + * @endmscs + * + * @param[in] conn_handle Connection handle. + * @param[in] p_master_id Pointer to a @ref ble_gap_master_id_t master identification structure. + * @param[in] p_enc_info Pointer to a @ref ble_gap_enc_info_t encryption information structure. + * + * @retval ::NRF_SUCCESS Successfully initiated authentication procedure. + * @retval ::NRF_ERROR_INVALID_ADDR Invalid pointer supplied. + * @retval ::NRF_ERROR_INVALID_STATE No link has been established. + * @retval ::BLE_ERROR_INVALID_CONN_HANDLE Invalid connection handle supplied. + * @retval ::BLE_ERROR_INVALID_ROLE Operation is not supported in the Peripheral role. + * @retval ::NRF_ERROR_BUSY Procedure already in progress or not allowed at this time, wait for pending procedures to complete and + * retry. + */ +SVCALL(SD_BLE_GAP_ENCRYPT, uint32_t, + 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)); + +/**@brief Reply with GAP security information. + * + * @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 + * @ref NRF_ERROR_INVALID_STATE. + * @note If the call returns an error code, the request is still pending, and the reply call may be repeated with corrected + * parameters. + * @note Data signing is not yet supported, and p_sign_info must therefore be NULL. + * + * @mscs + * @mmsc{@ref BLE_GAP_PERIPH_ENC_MSC} + * @endmscs + * + * @param[in] conn_handle Connection handle. + * @param[in] p_enc_info Pointer to a @ref ble_gap_enc_info_t encryption information structure. May be NULL to signal none is + * available. + * @param[in] p_id_info Pointer to a @ref ble_gap_irk_t identity information structure. May be NULL to signal none is available. + * @param[in] p_sign_info Pointer to a @ref ble_gap_sign_info_t signing information structure. May be NULL to signal none is + * available. + * + * @retval ::NRF_SUCCESS Successfully accepted security information. + * @retval ::NRF_ERROR_INVALID_PARAM Invalid parameter(s) supplied. + * @retval ::NRF_ERROR_INVALID_STATE Invalid state to perform operation. Either: + * - No link has been established. + * - No @ref BLE_GAP_EVT_SEC_INFO_REQUEST pending. + * - Encryption information provided by the app without being requested. See @ref + * ble_gap_evt_sec_info_request_t::enc_info. + * @retval ::BLE_ERROR_INVALID_CONN_HANDLE Invalid connection handle supplied. + */ +SVCALL(SD_BLE_GAP_SEC_INFO_REPLY, uint32_t, + 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, + ble_gap_sign_info_t const *p_sign_info)); + +/**@brief Get the current connection security. + * + * @param[in] conn_handle Connection handle. + * @param[out] p_conn_sec Pointer to a @ref ble_gap_conn_sec_t structure to be filled in. + * + * @retval ::NRF_SUCCESS Current connection security successfully retrieved. + * @retval ::NRF_ERROR_INVALID_ADDR Invalid pointer supplied. + * @retval ::BLE_ERROR_INVALID_CONN_HANDLE Invalid connection handle supplied. + */ +SVCALL(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)); + +/**@brief Start reporting the received signal strength to the application. + * + * A new event is reported whenever the RSSI value changes, until @ref sd_ble_gap_rssi_stop is called. + * + * @events + * @event{@ref BLE_GAP_EVT_RSSI_CHANGED, New RSSI data available. How often the event is generated is + * dependent on the settings of the threshold_dbm + * and skip_count input parameters.} + * @endevents + * + * @mscs + * @mmsc{@ref BLE_GAP_CENTRAL_RSSI_READ_MSC} + * @mmsc{@ref BLE_GAP_RSSI_FILT_MSC} + * @endmscs + * + * @param[in] conn_handle Connection handle. + * @param[in] threshold_dbm Minimum change in dBm before triggering the @ref BLE_GAP_EVT_RSSI_CHANGED event. Events are + * disabled if threshold_dbm equals @ref BLE_GAP_RSSI_THRESHOLD_INVALID. + * @param[in] skip_count Number of RSSI samples with a change of threshold_dbm or more before sending a new @ref + * BLE_GAP_EVT_RSSI_CHANGED event. + * + * @retval ::NRF_SUCCESS Successfully activated RSSI reporting. + * @retval ::NRF_ERROR_INVALID_STATE RSSI reporting is already ongoing. + * @retval ::BLE_ERROR_INVALID_CONN_HANDLE Invalid connection handle supplied. + */ +SVCALL(SD_BLE_GAP_RSSI_START, uint32_t, sd_ble_gap_rssi_start(uint16_t conn_handle, uint8_t threshold_dbm, uint8_t skip_count)); + +/**@brief Stop reporting the received signal strength. + * + * @note An RSSI change detected before the call but not yet received by the application + * may be reported after @ref sd_ble_gap_rssi_stop has been called. + * + * @mscs + * @mmsc{@ref BLE_GAP_CENTRAL_RSSI_READ_MSC} + * @mmsc{@ref BLE_GAP_RSSI_FILT_MSC} + * @endmscs + * + * @param[in] conn_handle Connection handle. + * + * @retval ::NRF_SUCCESS Successfully deactivated RSSI reporting. + * @retval ::NRF_ERROR_INVALID_STATE RSSI reporting is not ongoing. + * @retval ::BLE_ERROR_INVALID_CONN_HANDLE Invalid connection handle supplied. + */ +SVCALL(SD_BLE_GAP_RSSI_STOP, uint32_t, sd_ble_gap_rssi_stop(uint16_t conn_handle)); + +/**@brief Get the received signal strength for the last connection event. + * + * @ref sd_ble_gap_rssi_start must be called to start reporting RSSI before using this function. @ref NRF_ERROR_NOT_FOUND + * will be returned until RSSI was sampled for the first time after calling @ref sd_ble_gap_rssi_start. + * @note ERRATA-153 and ERRATA-225 require the rssi sample to be compensated based on a temperature measurement. + * @mscs + * @mmsc{@ref BLE_GAP_CENTRAL_RSSI_READ_MSC} + * @endmscs + * + * @param[in] conn_handle Connection handle. + * @param[out] p_rssi Pointer to the location where the RSSI measurement shall be stored. + * @param[out] p_ch_index Pointer to the location where Channel Index for the RSSI measurement shall be stored. + * + * @retval ::NRF_SUCCESS Successfully read the RSSI. + * @retval ::NRF_ERROR_NOT_FOUND No sample is available. + * @retval ::NRF_ERROR_INVALID_ADDR Invalid pointer supplied. + * @retval ::BLE_ERROR_INVALID_CONN_HANDLE Invalid connection handle supplied. + * @retval ::NRF_ERROR_INVALID_STATE RSSI reporting is not ongoing. + */ +SVCALL(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)); + +/**@brief Start or continue scanning (GAP Discovery procedure, Observer Procedure). + * + * @note A call to this function will require the application to keep the memory pointed by + * p_adv_report_buffer alive until the buffer is released. The buffer is released when the scanner is stopped + * or when this function is called with another buffer. + * + * @note The scanner will automatically stop in the following cases: + * - @ref sd_ble_gap_scan_stop is called. + * - @ref sd_ble_gap_connect is called. + * - A @ref BLE_GAP_EVT_TIMEOUT with source set to @ref BLE_GAP_TIMEOUT_SRC_SCAN is received. + * - When a @ref BLE_GAP_EVT_ADV_REPORT event is received and @ref ble_gap_adv_report_type_t::status is not set to + * @ref BLE_GAP_ADV_DATA_STATUS_INCOMPLETE_MORE_DATA. In this case scanning is only paused to let the application + * access received data. The application must call this function to continue scanning, or call @ref + * sd_ble_gap_scan_stop to stop scanning. + * + * @note If a @ref BLE_GAP_EVT_ADV_REPORT event is received with @ref ble_gap_adv_report_type_t::status set to + * @ref BLE_GAP_ADV_DATA_STATUS_INCOMPLETE_MORE_DATA, the scanner will continue scanning, and the application will + * receive more reports from this advertising event. The following reports will include the old and new received data. + * + * @events + * @event{@ref BLE_GAP_EVT_ADV_REPORT, An advertising or scan response packet has been received.} + * @event{@ref BLE_GAP_EVT_TIMEOUT, Scanner has timed out.} + * @endevents + * + * @mscs + * @mmsc{@ref BLE_GAP_SCAN_MSC} + * @mmsc{@ref BLE_GAP_WL_SHARE_MSC} + * @endmscs + * + * @param[in] p_scan_params Pointer to scan parameters structure. When this function is used to continue + * scanning, this parameter must be NULL. + * @param[in] p_adv_report_buffer Pointer to buffer used to store incoming advertising data. + * The memory pointed to should be kept alive until the scanning is stopped. + * See @ref BLE_GAP_SCAN_BUFFER_SIZE for minimum and maximum buffer size. + * If the scanner receives advertising data larger than can be stored in the buffer, + * a @ref BLE_GAP_EVT_ADV_REPORT will be raised with @ref ble_gap_adv_report_type_t::status + * set to @ref BLE_GAP_ADV_DATA_STATUS_INCOMPLETE_TRUNCATED. + * + * @retval ::NRF_SUCCESS Successfully initiated scanning procedure. + * @retval ::NRF_ERROR_INVALID_ADDR Invalid pointer supplied. + * @retval ::NRF_ERROR_INVALID_STATE Invalid state to perform operation. Either: + * - Scanning is already ongoing and p_scan_params was not NULL + * - Scanning is not running and p_scan_params was NULL. + * - The scanner has timed out when this function is called to continue scanning. + * @retval ::NRF_ERROR_INVALID_PARAM Invalid parameter(s) supplied. See @ref ble_gap_scan_params_t. + * @retval ::NRF_ERROR_NOT_SUPPORTED Unsupported parameters supplied. See @ref ble_gap_scan_params_t. + * @retval ::NRF_ERROR_INVALID_LENGTH The provided buffer length is invalid. See @ref BLE_GAP_SCAN_BUFFER_MIN. + * @retval ::NRF_ERROR_RESOURCES Not enough BLE role slots available. + * Stop one or more currently active roles (Central, Peripheral or Broadcaster) and try again + */ +SVCALL(SD_BLE_GAP_SCAN_START, uint32_t, + sd_ble_gap_scan_start(ble_gap_scan_params_t const *p_scan_params, ble_data_t const *p_adv_report_buffer)); + +/**@brief Stop scanning (GAP Discovery procedure, Observer Procedure). + * + * @note The buffer provided in @ref sd_ble_gap_scan_start is released. + * + * @mscs + * @mmsc{@ref BLE_GAP_SCAN_MSC} + * @mmsc{@ref BLE_GAP_WL_SHARE_MSC} + * @endmscs + * + * @retval ::NRF_SUCCESS Successfully stopped scanning procedure. + * @retval ::NRF_ERROR_INVALID_STATE Not in the scanning state. + */ +SVCALL(SD_BLE_GAP_SCAN_STOP, uint32_t, sd_ble_gap_scan_stop(void)); + +/**@brief Create a connection (GAP Link Establishment). + * + * @note If a scanning procedure is currently in progress it will be automatically stopped when calling this function. + * The scanning procedure will be stopped even if the function returns an error. + * + * @events + * @event{@ref BLE_GAP_EVT_CONNECTED, A connection was established.} + * @event{@ref BLE_GAP_EVT_TIMEOUT, Failed to establish a connection.} + * @endevents + * + * @mscs + * @mmsc{@ref BLE_GAP_WL_SHARE_MSC} + * @mmsc{@ref BLE_GAP_CENTRAL_CONN_PRIV_MSC} + * @mmsc{@ref BLE_GAP_CENTRAL_CONN_MSC} + * @endmscs + * + * @param[in] p_peer_addr Pointer to peer identity address. If @ref ble_gap_scan_params_t::filter_policy is set to use + * whitelist, then p_peer_addr is ignored. + * @param[in] p_scan_params Pointer to scan parameters structure. + * @param[in] p_conn_params Pointer to desired connection parameters. + * @param[in] conn_cfg_tag Tag identifying a configuration set by @ref sd_ble_cfg_set or + * @ref BLE_CONN_CFG_TAG_DEFAULT to use the default connection configuration. + * + * @retval ::NRF_SUCCESS Successfully initiated connection procedure. + * @retval ::NRF_ERROR_INVALID_ADDR Invalid parameter(s) pointer supplied. + * @retval ::NRF_ERROR_INVALID_PARAM Invalid parameter(s) supplied. + * - Invalid parameter(s) in p_scan_params or p_conn_params. + * - Use of whitelist requested but whitelist has not been set, see @ref + * sd_ble_gap_whitelist_set. + * - Peer address was not present in the device identity list, see @ref + * sd_ble_gap_device_identities_set. + * @retval ::NRF_ERROR_NOT_FOUND conn_cfg_tag not found. + * @retval ::NRF_ERROR_INVALID_STATE The SoftDevice is in an invalid state to perform this operation. This may be due to an + * existing locally initiated connect procedure, which must complete before initiating again. + * @retval ::BLE_ERROR_GAP_INVALID_BLE_ADDR Invalid Peer address. + * @retval ::NRF_ERROR_CONN_COUNT The limit of available connections for this connection configuration tag has been reached. + * To increase the number of available connections, + * use @ref sd_ble_cfg_set with @ref BLE_GAP_CFG_ROLE_COUNT or @ref BLE_CONN_CFG_GAP. + * @retval ::NRF_ERROR_RESOURCES Either: + * - Not enough BLE role slots available. + * Stop one or more currently active roles (Central, Peripheral or Observer) and try again. + * - The event_length parameter associated with conn_cfg_tag is too small to be able to + * establish a connection on the selected @ref ble_gap_scan_params_t::scan_phys. + * Use @ref sd_ble_cfg_set to increase the event length. + */ +SVCALL(SD_BLE_GAP_CONNECT, uint32_t, + sd_ble_gap_connect(ble_gap_addr_t const *p_peer_addr, ble_gap_scan_params_t const *p_scan_params, + ble_gap_conn_params_t const *p_conn_params, uint8_t conn_cfg_tag)); + +/**@brief Cancel a connection establishment. + * + * @mscs + * @mmsc{@ref BLE_GAP_CENTRAL_CONN_MSC} + * @endmscs + * + * @retval ::NRF_SUCCESS Successfully canceled an ongoing connection procedure. + * @retval ::NRF_ERROR_INVALID_STATE No locally initiated connect procedure started or connection + * completed occurred. + */ +SVCALL(SD_BLE_GAP_CONNECT_CANCEL, uint32_t, sd_ble_gap_connect_cancel(void)); + +/**@brief Initiate or respond to a PHY Update Procedure + * + * @details This function is used to initiate or respond to a PHY Update Procedure. It will always + * generate a @ref BLE_GAP_EVT_PHY_UPDATE event if successfully executed. + * If this function is used to initiate a PHY Update procedure and the only option + * provided in @ref ble_gap_phys_t::tx_phys and @ref ble_gap_phys_t::rx_phys is the + * currently active PHYs in the respective directions, the SoftDevice will generate a + * @ref BLE_GAP_EVT_PHY_UPDATE with the current PHYs set and will not initiate the + * procedure in the Link Layer. + * + * If @ref ble_gap_phys_t::tx_phys or @ref ble_gap_phys_t::rx_phys is @ref BLE_GAP_PHY_AUTO, + * then the stack will select PHYs based on the peer's PHY preferences and the local link + * configuration. The PHY Update procedure will for this case result in a PHY combination + * that respects the time constraints configured with @ref sd_ble_cfg_set and the current + * link layer data length. + * + * When acting as a central, the SoftDevice will select the fastest common PHY in each direction. + * + * If the peer does not support the PHY Update Procedure, then the resulting + * @ref BLE_GAP_EVT_PHY_UPDATE event will have a status set to + * @ref BLE_HCI_UNSUPPORTED_REMOTE_FEATURE. + * + * If the PHY Update procedure was rejected by the peer due to a procedure collision, the status + * will be @ref BLE_HCI_STATUS_CODE_LMP_ERROR_TRANSACTION_COLLISION or + * @ref BLE_HCI_DIFFERENT_TRANSACTION_COLLISION. + * If the peer responds to the PHY Update procedure with invalid parameters, the status + * will be @ref BLE_HCI_STATUS_CODE_INVALID_LMP_PARAMETERS. + * If the PHY Update procedure was rejected by the peer for a different reason, the status will + * contain the reason as specified by the peer. + * + * @events + * @event{@ref BLE_GAP_EVT_PHY_UPDATE, Result of the PHY Update Procedure.} + * @endevents + * + * @mscs + * @mmsc{@ref BLE_GAP_CENTRAL_PHY_UPDATE} + * @mmsc{@ref BLE_GAP_PERIPHERAL_PHY_UPDATE} + * @endmscs + * + * @param[in] conn_handle Connection handle to indicate the connection for which the PHY Update is requested. + * @param[in] p_gap_phys Pointer to PHY structure. + * + * @retval ::NRF_SUCCESS Successfully requested a PHY Update. + * @retval ::NRF_ERROR_INVALID_ADDR Invalid pointer supplied. + * @retval ::BLE_ERROR_INVALID_CONN_HANDLE Invalid connection handle supplied. + * @retval ::NRF_ERROR_INVALID_PARAM Invalid parameter(s) supplied. + * @retval ::NRF_ERROR_INVALID_STATE No link has been established. + * @retval ::NRF_ERROR_RESOURCES The connection event length configured for this link is not sufficient for the combination of + * @ref ble_gap_phys_t::tx_phys, @ref ble_gap_phys_t::rx_phys, and @ref + * ble_gap_data_length_params_t. The connection event length is configured with @ref BLE_CONN_CFG_GAP using @ref sd_ble_cfg_set. + * @retval ::NRF_ERROR_BUSY Procedure is already in progress or not allowed at this time. Process pending events and wait for the + * pending procedure to complete and retry. + * + */ +SVCALL(SD_BLE_GAP_PHY_UPDATE, uint32_t, sd_ble_gap_phy_update(uint16_t conn_handle, ble_gap_phys_t const *p_gap_phys)); + +/**@brief Initiate or respond to a Data Length Update Procedure. + * + * @note If the application uses @ref BLE_GAP_DATA_LENGTH_AUTO for one or more members of + * p_dl_params, the SoftDevice will choose the highest value supported in current + * configuration and connection parameters. + * @note If the link PHY is Coded, the SoftDevice will ensure that the MaxTxTime and/or MaxRxTime + * used in the Data Length Update procedure is at least 2704 us. Otherwise, MaxTxTime and + * MaxRxTime will be limited to maximum 2120 us. + * + * @param[in] conn_handle Connection handle. + * @param[in] p_dl_params Pointer to local parameters to be used in Data Length Update + * Procedure. Set any member to @ref BLE_GAP_DATA_LENGTH_AUTO to let + * the SoftDevice automatically decide the value for that member. + * Set to NULL to use automatic values for all members. + * @param[out] p_dl_limitation Pointer to limitation to be written when local device does not + * have enough resources or does not support the requested Data Length + * Update parameters. Ignored if NULL. + * + * @mscs + * @mmsc{@ref BLE_GAP_DATA_LENGTH_UPDATE_PROCEDURE_MSC} + * @endmscs + * + * @retval ::NRF_SUCCESS Successfully set Data Length Extension initiation/response parameters. + * @retval ::NRF_ERROR_INVALID_ADDR Invalid pointer supplied. + * @retval ::BLE_ERROR_INVALID_CONN_HANDLE Invalid connection handle parameter supplied. + * @retval ::NRF_ERROR_INVALID_STATE No link has been established. + * @retval ::NRF_ERROR_INVALID_PARAM Invalid parameters supplied. + * @retval ::NRF_ERROR_NOT_SUPPORTED The requested parameters are not supported by the SoftDevice. Inspect + * p_dl_limitation to see which parameter is not supported. + * @retval ::NRF_ERROR_RESOURCES The connection event length configured for this link is not sufficient for the requested + * parameters. Use @ref sd_ble_cfg_set with @ref BLE_CONN_CFG_GAP to increase the connection event length. Inspect p_dl_limitation + * to see where the limitation is. + * @retval ::NRF_ERROR_BUSY Peer has already initiated a Data Length Update Procedure. Process the + * pending @ref BLE_GAP_EVT_DATA_LENGTH_UPDATE_REQUEST event to respond. + */ +SVCALL(SD_BLE_GAP_DATA_LENGTH_UPDATE, uint32_t, + sd_ble_gap_data_length_update(uint16_t conn_handle, ble_gap_data_length_params_t const *p_dl_params, + ble_gap_data_length_limitation_t *p_dl_limitation)); + +/**@brief Start the Quality of Service (QoS) channel survey module. + * + * @details The channel survey module provides measurements of the energy levels on + * the Bluetooth Low Energy channels. When the module is enabled, @ref BLE_GAP_EVT_QOS_CHANNEL_SURVEY_REPORT + * events will periodically report the measured energy levels for each channel. + * + * @note The measurements are scheduled with lower priority than other Bluetooth Low Energy roles, + * Radio Timeslot API events and Flash API events. + * + * @note The channel survey module will attempt to do measurements so that the average interval + * between measurements will be interval_us. However due to the channel survey module + * having the lowest priority of all roles and modules, this may not be possible. In that + * case fewer than expected channel survey reports may be given. + * + * @note In order to use the channel survey module, @ref ble_gap_cfg_role_count_t::qos_channel_survey_role_available + * must be set. This is done using @ref sd_ble_cfg_set. + * + * @param[in] interval_us Requested average interval for the measurements and reports. See + * @ref BLE_GAP_QOS_CHANNEL_SURVEY_INTERVALS for valid ranges. If set + * to @ref BLE_GAP_QOS_CHANNEL_SURVEY_INTERVAL_CONTINUOUS, the channel + * survey role will be scheduled at every available opportunity. + * + * @retval ::NRF_SUCCESS The module is successfully started. + * @retval ::NRF_ERROR_INVALID_PARAM Invalid parameter supplied. interval_us is out of the + * allowed range. + * @retval ::NRF_ERROR_INVALID_STATE Trying to start the module when already running. + * @retval ::NRF_ERROR_RESOURCES The channel survey module is not available to the application. + * Set @ref ble_gap_cfg_role_count_t::qos_channel_survey_role_available using + * @ref sd_ble_cfg_set. + */ +SVCALL(SD_BLE_GAP_QOS_CHANNEL_SURVEY_START, uint32_t, sd_ble_gap_qos_channel_survey_start(uint32_t interval_us)); + +/**@brief Stop the Quality of Service (QoS) channel survey module. + * + * @note The SoftDevice may generate one @ref BLE_GAP_EVT_QOS_CHANNEL_SURVEY_REPORT event after this + * function is called. + * + * @retval ::NRF_SUCCESS The module is successfully stopped. + * @retval ::NRF_ERROR_INVALID_STATE Trying to stop the module when it is not running. + */ +SVCALL(SD_BLE_GAP_QOS_CHANNEL_SURVEY_STOP, uint32_t, sd_ble_gap_qos_channel_survey_stop(void)); + +/**@brief Obtain the next connection event counter value. + * + * @details The connection event counter is initialized to zero on the first connection event. The value is incremented + * by one for each connection event. For more information see Bluetooth Core Specification v5.0, Vol 6, Part B, + * Section 4.5.1. + * + * @note The connection event counter obtained through this API will be outdated if this API is called + * at the same time as the connection event counter is incremented. + * + * @note This API will always return the last connection event counter + 1. + * The actual connection event may be multiple connection events later if: + * - Slave latency is enabled and there is no data to transmit or receive. + * - Another role is scheduled with a higher priority at the same time as the next connection event. + * + * @param[in] conn_handle Connection handle. + * @param[out] p_counter Pointer to the variable where the next connection event counter will be written. + * + * @retval ::NRF_SUCCESS The connection event counter was successfully retrieved. + * @retval ::BLE_ERROR_INVALID_CONN_HANDLE Invalid connection handle parameter supplied. + * @retval ::NRF_ERROR_INVALID_ADDR Invalid pointer supplied. + */ +SVCALL(SD_BLE_GAP_NEXT_CONN_EVT_COUNTER_GET, uint32_t, + sd_ble_gap_next_conn_evt_counter_get(uint16_t conn_handle, uint16_t *p_counter)); + +/**@brief Start triggering a given task on connection event start. + * + * @details When enabled, this feature will trigger a PPI task at the start of connection events. + * The application can configure the SoftDevice to trigger every N connection events starting from + * a given connection event counter. See also @ref ble_gap_conn_event_trigger_t. + * + * @param[in] conn_handle Connection handle. + * @param[in] p_params Connection event trigger parameters. + * + * @retval ::NRF_SUCCESS Success. + * @retval ::BLE_ERROR_INVALID_CONN_HANDLE Invalid connection handle supplied. + * @retval ::NRF_ERROR_INVALID_ADDR Invalid pointer supplied. + * @retval ::NRF_ERROR_INVALID_PARAM Invalid parameter supplied. See @ref ble_gap_conn_event_trigger_t. + * @retval ::NRF_ERROR_INVALID_STATE Either: + * - Trying to start connection event triggering when it is already ongoing. + * - @ref ble_gap_conn_event_trigger_t::conn_evt_counter_start is in the past. + * Use @ref sd_ble_gap_next_conn_evt_counter_get to find a new value + to be used as ble_gap_conn_event_trigger_t::conn_evt_counter_start. + */ +SVCALL(SD_BLE_GAP_CONN_EVT_TRIGGER_START, uint32_t, + sd_ble_gap_conn_evt_trigger_start(uint16_t conn_handle, ble_gap_conn_event_trigger_t const *p_params)); + +/**@brief Stop triggering the task configured using @ref sd_ble_gap_conn_evt_trigger_start. + * + * @param[in] conn_handle Connection handle. + * + * @retval ::NRF_SUCCESS Success. + * @retval ::BLE_ERROR_INVALID_CONN_HANDLE Invalid connection handle supplied. + * @retval ::NRF_ERROR_INVALID_STATE Trying to stop connection event triggering when it is not enabled. + */ +SVCALL(SD_BLE_GAP_CONN_EVT_TRIGGER_STOP, uint32_t, sd_ble_gap_conn_evt_trigger_stop(uint16_t conn_handle)); + +/** @} */ + +#ifdef __cplusplus +} +#endif +#endif // BLE_GAP_H__ + +/** + @} +*/ diff --git a/src/platform/nrf52/softdevice/ble_gatt.h b/src/platform/nrf52/softdevice/ble_gatt.h new file mode 100644 index 000000000..df0d728fc --- /dev/null +++ b/src/platform/nrf52/softdevice/ble_gatt.h @@ -0,0 +1,232 @@ +/* + * Copyright (c) Nordic Semiconductor ASA + * All rights reserved. + * + * Redistribution and use in source and binary forms, with or without modification, + * are permitted provided that the following conditions are met: + * + * 1. Redistributions of source code must retain the above copyright notice, this + * list of conditions and the following disclaimer. + * + * 2. Redistributions in binary form, except as embedded into a Nordic + * Semiconductor ASA integrated circuit in a product or a software update for + * such product, must reproduce the above copyright notice, this list of + * conditions and the following disclaimer in the documentation and/or other + * materials provided with the distribution. + * + * 3. Neither the name of Nordic Semiconductor ASA nor the names of its + * contributors may be used to endorse or promote products derived from this + * software without specific prior written permission. + * + * 4. This software, with or without modification, must only be used with a + * Nordic Semiconductor ASA integrated circuit. + * + * 5. Any software provided in binary form under this license must not be reverse + * engineered, decompiled, modified and/or disassembled. + * + * THIS SOFTWARE IS PROVIDED BY NORDIC SEMICONDUCTOR ASA "AS IS" AND ANY EXPRESS + * OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES + * OF MERCHANTABILITY, NONINFRINGEMENT, AND FITNESS FOR A PARTICULAR PURPOSE ARE + * DISCLAIMED. IN NO EVENT SHALL NORDIC SEMICONDUCTOR ASA OR CONTRIBUTORS BE + * LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR + * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE + * GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) + * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT + * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT + * OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + */ + +/** + @addtogroup BLE_GATT Generic Attribute Profile (GATT) Common + @{ + @brief Common definitions and prototypes for the GATT interfaces. + */ + +#ifndef BLE_GATT_H__ +#define BLE_GATT_H__ + +#include "ble_err.h" +#include "ble_hci.h" +#include "ble_ranges.h" +#include "ble_types.h" +#include "nrf_error.h" +#include "nrf_svc.h" +#include + +#ifdef __cplusplus +extern "C" { +#endif + +/** @addtogroup BLE_GATT_DEFINES Defines + * @{ */ + +/** @brief Default ATT MTU, in bytes. */ +#define BLE_GATT_ATT_MTU_DEFAULT 23 + +/**@brief Invalid Attribute Handle. */ +#define BLE_GATT_HANDLE_INVALID 0x0000 + +/**@brief First Attribute Handle. */ +#define BLE_GATT_HANDLE_START 0x0001 + +/**@brief Last Attribute Handle. */ +#define BLE_GATT_HANDLE_END 0xFFFF + +/** @defgroup BLE_GATT_TIMEOUT_SOURCES GATT Timeout sources + * @{ */ +#define BLE_GATT_TIMEOUT_SRC_PROTOCOL 0x00 /**< ATT Protocol timeout. */ +/** @} */ + +/** @defgroup BLE_GATT_WRITE_OPS GATT Write operations + * @{ */ +#define BLE_GATT_OP_INVALID 0x00 /**< Invalid Operation. */ +#define BLE_GATT_OP_WRITE_REQ 0x01 /**< Write Request. */ +#define BLE_GATT_OP_WRITE_CMD 0x02 /**< Write Command. */ +#define BLE_GATT_OP_SIGN_WRITE_CMD 0x03 /**< Signed Write Command. */ +#define BLE_GATT_OP_PREP_WRITE_REQ 0x04 /**< Prepare Write Request. */ +#define BLE_GATT_OP_EXEC_WRITE_REQ 0x05 /**< Execute Write Request. */ +/** @} */ + +/** @defgroup BLE_GATT_EXEC_WRITE_FLAGS GATT Execute Write flags + * @{ */ +#define BLE_GATT_EXEC_WRITE_FLAG_PREPARED_CANCEL 0x00 /**< Cancel prepared write. */ +#define BLE_GATT_EXEC_WRITE_FLAG_PREPARED_WRITE 0x01 /**< Execute prepared write. */ +/** @} */ + +/** @defgroup BLE_GATT_HVX_TYPES GATT Handle Value operations + * @{ */ +#define BLE_GATT_HVX_INVALID 0x00 /**< Invalid Operation. */ +#define BLE_GATT_HVX_NOTIFICATION 0x01 /**< Handle Value Notification. */ +#define BLE_GATT_HVX_INDICATION 0x02 /**< Handle Value Indication. */ +/** @} */ + +/** @defgroup BLE_GATT_STATUS_CODES GATT Status Codes + * @{ */ +#define BLE_GATT_STATUS_SUCCESS 0x0000 /**< Success. */ +#define BLE_GATT_STATUS_UNKNOWN 0x0001 /**< Unknown or not applicable status. */ +#define BLE_GATT_STATUS_ATTERR_INVALID 0x0100 /**< ATT Error: Invalid Error Code. */ +#define BLE_GATT_STATUS_ATTERR_INVALID_HANDLE 0x0101 /**< ATT Error: Invalid Attribute Handle. */ +#define BLE_GATT_STATUS_ATTERR_READ_NOT_PERMITTED 0x0102 /**< ATT Error: Read not permitted. */ +#define BLE_GATT_STATUS_ATTERR_WRITE_NOT_PERMITTED 0x0103 /**< ATT Error: Write not permitted. */ +#define BLE_GATT_STATUS_ATTERR_INVALID_PDU 0x0104 /**< ATT Error: Used in ATT as Invalid PDU. */ +#define BLE_GATT_STATUS_ATTERR_INSUF_AUTHENTICATION 0x0105 /**< ATT Error: Authenticated link required. */ +#define BLE_GATT_STATUS_ATTERR_REQUEST_NOT_SUPPORTED 0x0106 /**< ATT Error: Used in ATT as Request Not Supported. */ +#define BLE_GATT_STATUS_ATTERR_INVALID_OFFSET 0x0107 /**< ATT Error: Offset specified was past the end of the attribute. */ +#define BLE_GATT_STATUS_ATTERR_INSUF_AUTHORIZATION 0x0108 /**< ATT Error: Used in ATT as Insufficient Authorization. */ +#define BLE_GATT_STATUS_ATTERR_PREPARE_QUEUE_FULL 0x0109 /**< ATT Error: Used in ATT as Prepare Queue Full. */ +#define BLE_GATT_STATUS_ATTERR_ATTRIBUTE_NOT_FOUND 0x010A /**< ATT Error: Used in ATT as Attribute not found. */ +#define BLE_GATT_STATUS_ATTERR_ATTRIBUTE_NOT_LONG \ + 0x010B /**< ATT Error: Attribute cannot be read or written using read/write blob requests. */ +#define BLE_GATT_STATUS_ATTERR_INSUF_ENC_KEY_SIZE 0x010C /**< ATT Error: Encryption key size used is insufficient. */ +#define BLE_GATT_STATUS_ATTERR_INVALID_ATT_VAL_LENGTH 0x010D /**< ATT Error: Invalid value size. */ +#define BLE_GATT_STATUS_ATTERR_UNLIKELY_ERROR 0x010E /**< ATT Error: Very unlikely error. */ +#define BLE_GATT_STATUS_ATTERR_INSUF_ENCRYPTION 0x010F /**< ATT Error: Encrypted link required. */ +#define BLE_GATT_STATUS_ATTERR_UNSUPPORTED_GROUP_TYPE \ + 0x0110 /**< ATT Error: Attribute type is not a supported grouping attribute. */ +#define BLE_GATT_STATUS_ATTERR_INSUF_RESOURCES 0x0111 /**< ATT Error: Insufficient resources. */ +#define BLE_GATT_STATUS_ATTERR_RFU_RANGE1_BEGIN 0x0112 /**< ATT Error: Reserved for Future Use range #1 begin. */ +#define BLE_GATT_STATUS_ATTERR_RFU_RANGE1_END 0x017F /**< ATT Error: Reserved for Future Use range #1 end. */ +#define BLE_GATT_STATUS_ATTERR_APP_BEGIN 0x0180 /**< ATT Error: Application range begin. */ +#define BLE_GATT_STATUS_ATTERR_APP_END 0x019F /**< ATT Error: Application range end. */ +#define BLE_GATT_STATUS_ATTERR_RFU_RANGE2_BEGIN 0x01A0 /**< ATT Error: Reserved for Future Use range #2 begin. */ +#define BLE_GATT_STATUS_ATTERR_RFU_RANGE2_END 0x01DF /**< ATT Error: Reserved for Future Use range #2 end. */ +#define BLE_GATT_STATUS_ATTERR_RFU_RANGE3_BEGIN 0x01E0 /**< ATT Error: Reserved for Future Use range #3 begin. */ +#define BLE_GATT_STATUS_ATTERR_RFU_RANGE3_END 0x01FC /**< ATT Error: Reserved for Future Use range #3 end. */ +#define BLE_GATT_STATUS_ATTERR_CPS_WRITE_REQ_REJECTED \ + 0x01FC /**< ATT Common Profile and Service Error: Write request rejected. \ + */ +#define BLE_GATT_STATUS_ATTERR_CPS_CCCD_CONFIG_ERROR \ + 0x01FD /**< ATT Common Profile and Service Error: Client Characteristic Configuration Descriptor improperly configured. */ +#define BLE_GATT_STATUS_ATTERR_CPS_PROC_ALR_IN_PROG \ + 0x01FE /**< ATT Common Profile and Service Error: Procedure Already in Progress. */ +#define BLE_GATT_STATUS_ATTERR_CPS_OUT_OF_RANGE 0x01FF /**< ATT Common Profile and Service Error: Out Of Range. */ +/** @} */ + +/** @defgroup BLE_GATT_CPF_FORMATS Characteristic Presentation Formats + * @note Found at + * http://developer.bluetooth.org/gatt/descriptors/Pages/DescriptorViewer.aspx?u=org.bluetooth.descriptor.gatt.characteristic_presentation_format.xml + * @{ */ +#define BLE_GATT_CPF_FORMAT_RFU 0x00 /**< Reserved For Future Use. */ +#define BLE_GATT_CPF_FORMAT_BOOLEAN 0x01 /**< Boolean. */ +#define BLE_GATT_CPF_FORMAT_2BIT 0x02 /**< Unsigned 2-bit integer. */ +#define BLE_GATT_CPF_FORMAT_NIBBLE 0x03 /**< Unsigned 4-bit integer. */ +#define BLE_GATT_CPF_FORMAT_UINT8 0x04 /**< Unsigned 8-bit integer. */ +#define BLE_GATT_CPF_FORMAT_UINT12 0x05 /**< Unsigned 12-bit integer. */ +#define BLE_GATT_CPF_FORMAT_UINT16 0x06 /**< Unsigned 16-bit integer. */ +#define BLE_GATT_CPF_FORMAT_UINT24 0x07 /**< Unsigned 24-bit integer. */ +#define BLE_GATT_CPF_FORMAT_UINT32 0x08 /**< Unsigned 32-bit integer. */ +#define BLE_GATT_CPF_FORMAT_UINT48 0x09 /**< Unsigned 48-bit integer. */ +#define BLE_GATT_CPF_FORMAT_UINT64 0x0A /**< Unsigned 64-bit integer. */ +#define BLE_GATT_CPF_FORMAT_UINT128 0x0B /**< Unsigned 128-bit integer. */ +#define BLE_GATT_CPF_FORMAT_SINT8 0x0C /**< Signed 2-bit integer. */ +#define BLE_GATT_CPF_FORMAT_SINT12 0x0D /**< Signed 12-bit integer. */ +#define BLE_GATT_CPF_FORMAT_SINT16 0x0E /**< Signed 16-bit integer. */ +#define BLE_GATT_CPF_FORMAT_SINT24 0x0F /**< Signed 24-bit integer. */ +#define BLE_GATT_CPF_FORMAT_SINT32 0x10 /**< Signed 32-bit integer. */ +#define BLE_GATT_CPF_FORMAT_SINT48 0x11 /**< Signed 48-bit integer. */ +#define BLE_GATT_CPF_FORMAT_SINT64 0x12 /**< Signed 64-bit integer. */ +#define BLE_GATT_CPF_FORMAT_SINT128 0x13 /**< Signed 128-bit integer. */ +#define BLE_GATT_CPF_FORMAT_FLOAT32 0x14 /**< IEEE-754 32-bit floating point. */ +#define BLE_GATT_CPF_FORMAT_FLOAT64 0x15 /**< IEEE-754 64-bit floating point. */ +#define BLE_GATT_CPF_FORMAT_SFLOAT 0x16 /**< IEEE-11073 16-bit SFLOAT. */ +#define BLE_GATT_CPF_FORMAT_FLOAT 0x17 /**< IEEE-11073 32-bit FLOAT. */ +#define BLE_GATT_CPF_FORMAT_DUINT16 0x18 /**< IEEE-20601 format. */ +#define BLE_GATT_CPF_FORMAT_UTF8S 0x19 /**< UTF-8 string. */ +#define BLE_GATT_CPF_FORMAT_UTF16S 0x1A /**< UTF-16 string. */ +#define BLE_GATT_CPF_FORMAT_STRUCT 0x1B /**< Opaque Structure. */ +/** @} */ + +/** @defgroup BLE_GATT_CPF_NAMESPACES GATT Bluetooth Namespaces + * @{ + */ +#define BLE_GATT_CPF_NAMESPACE_BTSIG 0x01 /**< Bluetooth SIG defined Namespace. */ +#define BLE_GATT_CPF_NAMESPACE_DESCRIPTION_UNKNOWN 0x0000 /**< Namespace Description Unknown. */ +/** @} */ + +/** @} */ + +/** @addtogroup BLE_GATT_STRUCTURES Structures + * @{ */ + +/** + * @brief BLE GATT connection configuration parameters, set with @ref sd_ble_cfg_set. + * + * @retval ::NRF_ERROR_INVALID_PARAM att_mtu is smaller than @ref BLE_GATT_ATT_MTU_DEFAULT. + */ +typedef struct { + uint16_t att_mtu; /**< Maximum size of ATT packet the SoftDevice can send or receive. + The default and minimum value is @ref BLE_GATT_ATT_MTU_DEFAULT. + @mscs + @mmsc{@ref BLE_GATTC_MTU_EXCHANGE} + @mmsc{@ref BLE_GATTS_MTU_EXCHANGE} + @endmscs + */ +} ble_gatt_conn_cfg_t; + +/**@brief GATT Characteristic Properties. */ +typedef struct { + /* Standard properties */ + uint8_t broadcast : 1; /**< Broadcasting of the value permitted. */ + uint8_t read : 1; /**< Reading the value permitted. */ + uint8_t write_wo_resp : 1; /**< Writing the value with Write Command permitted. */ + uint8_t write : 1; /**< Writing the value with Write Request permitted. */ + uint8_t notify : 1; /**< Notification of the value permitted. */ + uint8_t indicate : 1; /**< Indications of the value permitted. */ + uint8_t auth_signed_wr : 1; /**< Writing the value with Signed Write Command permitted. */ +} ble_gatt_char_props_t; + +/**@brief GATT Characteristic Extended Properties. */ +typedef struct { + /* Extended properties */ + uint8_t reliable_wr : 1; /**< Writing the value with Queued Write operations permitted. */ + uint8_t wr_aux : 1; /**< Writing the Characteristic User Description descriptor permitted. */ +} ble_gatt_char_ext_props_t; + +/** @} */ + +#ifdef __cplusplus +} +#endif +#endif // BLE_GATT_H__ + +/** @} */ diff --git a/src/platform/nrf52/softdevice/ble_gattc.h b/src/platform/nrf52/softdevice/ble_gattc.h new file mode 100644 index 000000000..f1df1782c --- /dev/null +++ b/src/platform/nrf52/softdevice/ble_gattc.h @@ -0,0 +1,764 @@ +/* + * Copyright (c) Nordic Semiconductor ASA + * All rights reserved. + * + * Redistribution and use in source and binary forms, with or without modification, + * are permitted provided that the following conditions are met: + * + * 1. Redistributions of source code must retain the above copyright notice, this + * list of conditions and the following disclaimer. + * + * 2. Redistributions in binary form, except as embedded into a Nordic + * Semiconductor ASA integrated circuit in a product or a software update for + * such product, must reproduce the above copyright notice, this list of + * conditions and the following disclaimer in the documentation and/or other + * materials provided with the distribution. + * + * 3. Neither the name of Nordic Semiconductor ASA nor the names of its + * contributors may be used to endorse or promote products derived from this + * software without specific prior written permission. + * + * 4. This software, with or without modification, must only be used with a + * Nordic Semiconductor ASA integrated circuit. + * + * 5. Any software provided in binary form under this license must not be reverse + * engineered, decompiled, modified and/or disassembled. + * + * THIS SOFTWARE IS PROVIDED BY NORDIC SEMICONDUCTOR ASA "AS IS" AND ANY EXPRESS + * OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES + * OF MERCHANTABILITY, NONINFRINGEMENT, AND FITNESS FOR A PARTICULAR PURPOSE ARE + * DISCLAIMED. IN NO EVENT SHALL NORDIC SEMICONDUCTOR ASA OR CONTRIBUTORS BE + * LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR + * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE + * GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) + * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT + * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT + * OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + */ + +/** + @addtogroup BLE_GATTC Generic Attribute Profile (GATT) Client + @{ + @brief Definitions and prototypes for the GATT Client interface. + */ + +#ifndef BLE_GATTC_H__ +#define BLE_GATTC_H__ + +#include "ble_err.h" +#include "ble_gatt.h" +#include "ble_ranges.h" +#include "ble_types.h" +#include "nrf.h" +#include "nrf_error.h" +#include "nrf_svc.h" +#include + +#ifdef __cplusplus +extern "C" { +#endif + +/** @addtogroup BLE_GATTC_ENUMERATIONS Enumerations + * @{ */ + +/**@brief GATTC API SVC numbers. */ +enum BLE_GATTC_SVCS { + SD_BLE_GATTC_PRIMARY_SERVICES_DISCOVER = BLE_GATTC_SVC_BASE, /**< Primary Service Discovery. */ + SD_BLE_GATTC_RELATIONSHIPS_DISCOVER, /**< Relationship Discovery. */ + SD_BLE_GATTC_CHARACTERISTICS_DISCOVER, /**< Characteristic Discovery. */ + SD_BLE_GATTC_DESCRIPTORS_DISCOVER, /**< Characteristic Descriptor Discovery. */ + SD_BLE_GATTC_ATTR_INFO_DISCOVER, /**< Attribute Information Discovery. */ + SD_BLE_GATTC_CHAR_VALUE_BY_UUID_READ, /**< Read Characteristic Value by UUID. */ + SD_BLE_GATTC_READ, /**< Generic read. */ + SD_BLE_GATTC_CHAR_VALUES_READ, /**< Read multiple Characteristic Values. */ + SD_BLE_GATTC_WRITE, /**< Generic write. */ + SD_BLE_GATTC_HV_CONFIRM, /**< Handle Value Confirmation. */ + SD_BLE_GATTC_EXCHANGE_MTU_REQUEST, /**< Exchange MTU Request. */ +}; + +/** + * @brief GATT Client Event IDs. + */ +enum BLE_GATTC_EVTS { + BLE_GATTC_EVT_PRIM_SRVC_DISC_RSP = BLE_GATTC_EVT_BASE, /**< Primary Service Discovery Response event. \n See @ref + ble_gattc_evt_prim_srvc_disc_rsp_t. */ + BLE_GATTC_EVT_REL_DISC_RSP, /**< Relationship Discovery Response event. \n See @ref ble_gattc_evt_rel_disc_rsp_t. + */ + BLE_GATTC_EVT_CHAR_DISC_RSP, /**< Characteristic Discovery Response event. \n See @ref + ble_gattc_evt_char_disc_rsp_t. */ + BLE_GATTC_EVT_DESC_DISC_RSP, /**< Descriptor Discovery Response event. \n See @ref + ble_gattc_evt_desc_disc_rsp_t. */ + BLE_GATTC_EVT_ATTR_INFO_DISC_RSP, /**< Attribute Information Response event. \n See @ref + ble_gattc_evt_attr_info_disc_rsp_t. */ + BLE_GATTC_EVT_CHAR_VAL_BY_UUID_READ_RSP, /**< Read By UUID Response event. \n See @ref + ble_gattc_evt_char_val_by_uuid_read_rsp_t. */ + BLE_GATTC_EVT_READ_RSP, /**< Read Response event. \n See @ref ble_gattc_evt_read_rsp_t. */ + BLE_GATTC_EVT_CHAR_VALS_READ_RSP, /**< Read multiple Response event. \n See @ref + ble_gattc_evt_char_vals_read_rsp_t. */ + BLE_GATTC_EVT_WRITE_RSP, /**< Write Response event. \n See @ref ble_gattc_evt_write_rsp_t. */ + BLE_GATTC_EVT_HVX, /**< Handle Value Notification or Indication event. \n Confirm indication with @ref + sd_ble_gattc_hv_confirm. \n See @ref ble_gattc_evt_hvx_t. */ + BLE_GATTC_EVT_EXCHANGE_MTU_RSP, /**< Exchange MTU Response event. \n See @ref + ble_gattc_evt_exchange_mtu_rsp_t. */ + BLE_GATTC_EVT_TIMEOUT, /**< Timeout event. \n See @ref ble_gattc_evt_timeout_t. */ + BLE_GATTC_EVT_WRITE_CMD_TX_COMPLETE /**< Write without Response transmission complete. \n See @ref + ble_gattc_evt_write_cmd_tx_complete_t. */ +}; + +/**@brief GATTC Option IDs. + * IDs that uniquely identify a GATTC option. + */ +enum BLE_GATTC_OPTS { + BLE_GATTC_OPT_UUID_DISC = BLE_GATTC_OPT_BASE, /**< UUID discovery. @ref ble_gattc_opt_uuid_disc_t */ +}; + +/** @} */ + +/** @addtogroup BLE_GATTC_DEFINES Defines + * @{ */ + +/** @defgroup BLE_ERRORS_GATTC SVC return values specific to GATTC + * @{ */ +#define BLE_ERROR_GATTC_PROC_NOT_PERMITTED (NRF_GATTC_ERR_BASE + 0x000) /**< Procedure not Permitted. */ +/** @} */ + +/** @defgroup BLE_GATTC_ATTR_INFO_FORMAT Attribute Information Formats + * @{ */ +#define BLE_GATTC_ATTR_INFO_FORMAT_16BIT 1 /**< 16-bit Attribute Information Format. */ +#define BLE_GATTC_ATTR_INFO_FORMAT_128BIT 2 /**< 128-bit Attribute Information Format. */ +/** @} */ + +/** @defgroup BLE_GATTC_DEFAULTS GATT Client defaults + * @{ */ +#define BLE_GATTC_WRITE_CMD_TX_QUEUE_SIZE_DEFAULT \ + 1 /**< Default number of Write without Response that can be queued for transmission. */ +/** @} */ + +/** @} */ + +/** @addtogroup BLE_GATTC_STRUCTURES Structures + * @{ */ + +/** + * @brief BLE GATTC connection configuration parameters, set with @ref sd_ble_cfg_set. + */ +typedef struct { + uint8_t write_cmd_tx_queue_size; /**< The guaranteed minimum number of Write without Response that can be queued for + transmission. The default value is @ref BLE_GATTC_WRITE_CMD_TX_QUEUE_SIZE_DEFAULT */ +} ble_gattc_conn_cfg_t; + +/**@brief Operation Handle Range. */ +typedef struct { + uint16_t start_handle; /**< Start Handle. */ + uint16_t end_handle; /**< End Handle. */ +} ble_gattc_handle_range_t; + +/**@brief GATT service. */ +typedef struct { + ble_uuid_t uuid; /**< Service UUID. */ + ble_gattc_handle_range_t handle_range; /**< Service Handle Range. */ +} ble_gattc_service_t; + +/**@brief GATT include. */ +typedef struct { + uint16_t handle; /**< Include Handle. */ + ble_gattc_service_t included_srvc; /**< Handle of the included service. */ +} ble_gattc_include_t; + +/**@brief GATT characteristic. */ +typedef struct { + ble_uuid_t uuid; /**< Characteristic UUID. */ + ble_gatt_char_props_t char_props; /**< Characteristic Properties. */ + uint8_t char_ext_props : 1; /**< Extended properties present. */ + uint16_t handle_decl; /**< Handle of the Characteristic Declaration. */ + uint16_t handle_value; /**< Handle of the Characteristic Value. */ +} ble_gattc_char_t; + +/**@brief GATT descriptor. */ +typedef struct { + uint16_t handle; /**< Descriptor Handle. */ + ble_uuid_t uuid; /**< Descriptor UUID. */ +} ble_gattc_desc_t; + +/**@brief Write Parameters. */ +typedef struct { + uint8_t write_op; /**< Write Operation to be performed, see @ref BLE_GATT_WRITE_OPS. */ + uint8_t flags; /**< Flags, see @ref BLE_GATT_EXEC_WRITE_FLAGS. */ + uint16_t handle; /**< Handle to the attribute to be written. */ + uint16_t offset; /**< Offset in bytes. @note For WRITE_CMD and WRITE_REQ, offset must be 0. */ + uint16_t len; /**< Length of data in bytes. */ + uint8_t const *p_value; /**< Pointer to the value data. */ +} ble_gattc_write_params_t; + +/**@brief Attribute Information for 16-bit Attribute UUID. */ +typedef struct { + uint16_t handle; /**< Attribute handle. */ + ble_uuid_t uuid; /**< 16-bit Attribute UUID. */ +} ble_gattc_attr_info16_t; + +/**@brief Attribute Information for 128-bit Attribute UUID. */ +typedef struct { + uint16_t handle; /**< Attribute handle. */ + ble_uuid128_t uuid; /**< 128-bit Attribute UUID. */ +} ble_gattc_attr_info128_t; + +/**@brief Event structure for @ref BLE_GATTC_EVT_PRIM_SRVC_DISC_RSP. */ +typedef struct { + uint16_t count; /**< Service count. */ + ble_gattc_service_t services[1]; /**< Service data. @note This is a variable length array. The size of 1 indicated is only a + placeholder for compilation. See @ref sd_ble_evt_get for more information on how to use + event structures with variable length array members. */ +} ble_gattc_evt_prim_srvc_disc_rsp_t; + +/**@brief Event structure for @ref BLE_GATTC_EVT_REL_DISC_RSP. */ +typedef struct { + uint16_t count; /**< Include count. */ + ble_gattc_include_t includes[1]; /**< Include data. @note This is a variable length array. The size of 1 indicated is only a + placeholder for compilation. See @ref sd_ble_evt_get for more information on how to use + event structures with variable length array members. */ +} ble_gattc_evt_rel_disc_rsp_t; + +/**@brief Event structure for @ref BLE_GATTC_EVT_CHAR_DISC_RSP. */ +typedef struct { + uint16_t count; /**< Characteristic count. */ + ble_gattc_char_t chars[1]; /**< Characteristic data. @note This is a variable length array. The size of 1 indicated is only a + placeholder for compilation. See @ref sd_ble_evt_get for more information on how to use event + structures with variable length array members. */ +} ble_gattc_evt_char_disc_rsp_t; + +/**@brief Event structure for @ref BLE_GATTC_EVT_DESC_DISC_RSP. */ +typedef struct { + uint16_t count; /**< Descriptor count. */ + ble_gattc_desc_t descs[1]; /**< Descriptor data. @note This is a variable length array. The size of 1 indicated is only a + placeholder for compilation. See @ref sd_ble_evt_get for more information on how to use event + structures with variable length array members. */ +} ble_gattc_evt_desc_disc_rsp_t; + +/**@brief Event structure for @ref BLE_GATTC_EVT_ATTR_INFO_DISC_RSP. */ +typedef struct { + uint16_t count; /**< Attribute count. */ + uint8_t format; /**< Attribute information format, see @ref BLE_GATTC_ATTR_INFO_FORMAT. */ + union { + ble_gattc_attr_info16_t attr_info16[1]; /**< Attribute information for 16-bit Attribute UUID. + @note This is a variable length array. The size of 1 indicated is only a + placeholder for compilation. See @ref sd_ble_evt_get for more information on + how to use event structures with variable length array members. */ + ble_gattc_attr_info128_t attr_info128[1]; /**< Attribute information for 128-bit Attribute UUID. + @note This is a variable length array. The size of 1 indicated is only a + placeholder for compilation. See @ref sd_ble_evt_get for more information on + how to use event structures with variable length array members. */ + } info; /**< Attribute information union. */ +} ble_gattc_evt_attr_info_disc_rsp_t; + +/**@brief GATT read by UUID handle value pair. */ +typedef struct { + uint16_t handle; /**< Attribute Handle. */ + uint8_t *p_value; /**< Pointer to the Attribute Value, length is available in @ref + ble_gattc_evt_char_val_by_uuid_read_rsp_t::value_len. */ +} ble_gattc_handle_value_t; + +/**@brief Event structure for @ref BLE_GATTC_EVT_CHAR_VAL_BY_UUID_READ_RSP. */ +typedef struct { + uint16_t count; /**< Handle-Value Pair Count. */ + uint16_t value_len; /**< Length of the value in Handle-Value(s) list. */ + uint8_t handle_value[1]; /**< Handle-Value(s) list. To iterate through the list use @ref + sd_ble_gattc_evt_char_val_by_uuid_read_rsp_iter. + @note This is a variable length array. The size of 1 indicated is only a placeholder for + compilation. See @ref sd_ble_evt_get for more information on how to use event structures with + variable length array members. */ +} ble_gattc_evt_char_val_by_uuid_read_rsp_t; + +/**@brief Event structure for @ref BLE_GATTC_EVT_READ_RSP. */ +typedef struct { + uint16_t handle; /**< Attribute Handle. */ + uint16_t offset; /**< Offset of the attribute data. */ + uint16_t len; /**< Attribute data length. */ + uint8_t data[1]; /**< Attribute data. @note This is a variable length array. The size of 1 indicated is only a placeholder for + compilation. See @ref sd_ble_evt_get for more information on how to use event structures with variable + length array members. */ +} ble_gattc_evt_read_rsp_t; + +/**@brief Event structure for @ref BLE_GATTC_EVT_CHAR_VALS_READ_RSP. */ +typedef struct { + uint16_t len; /**< Concatenated Attribute values length. */ + uint8_t values[1]; /**< Attribute values. @note This is a variable length array. The size of 1 indicated is only a placeholder + for compilation. See @ref sd_ble_evt_get for more information on how to use event structures with + variable length array members. */ +} ble_gattc_evt_char_vals_read_rsp_t; + +/**@brief Event structure for @ref BLE_GATTC_EVT_WRITE_RSP. */ +typedef struct { + uint16_t handle; /**< Attribute Handle. */ + uint8_t write_op; /**< Type of write operation, see @ref BLE_GATT_WRITE_OPS. */ + uint16_t offset; /**< Data offset. */ + uint16_t len; /**< Data length. */ + uint8_t data[1]; /**< Data. @note This is a variable length array. The size of 1 indicated is only a placeholder for + compilation. See @ref sd_ble_evt_get for more information on how to use event structures with variable + length array members. */ +} ble_gattc_evt_write_rsp_t; + +/**@brief Event structure for @ref BLE_GATTC_EVT_HVX. */ +typedef struct { + uint16_t handle; /**< Handle to which the HVx operation applies. */ + uint8_t type; /**< Indication or Notification, see @ref BLE_GATT_HVX_TYPES. */ + uint16_t len; /**< Attribute data length. */ + uint8_t data[1]; /**< Attribute data. @note This is a variable length array. The size of 1 indicated is only a placeholder for + compilation. See @ref sd_ble_evt_get for more information on how to use event structures with variable + length array members. */ +} ble_gattc_evt_hvx_t; + +/**@brief Event structure for @ref BLE_GATTC_EVT_EXCHANGE_MTU_RSP. */ +typedef struct { + uint16_t server_rx_mtu; /**< Server RX MTU size. */ +} ble_gattc_evt_exchange_mtu_rsp_t; + +/**@brief Event structure for @ref BLE_GATTC_EVT_TIMEOUT. */ +typedef struct { + uint8_t src; /**< Timeout source, see @ref BLE_GATT_TIMEOUT_SOURCES. */ +} ble_gattc_evt_timeout_t; + +/**@brief Event structure for @ref BLE_GATTC_EVT_WRITE_CMD_TX_COMPLETE. */ +typedef struct { + uint8_t count; /**< Number of write without response transmissions completed. */ +} ble_gattc_evt_write_cmd_tx_complete_t; + +/**@brief GATTC event structure. */ +typedef struct { + uint16_t conn_handle; /**< Connection Handle on which event occurred. */ + uint16_t gatt_status; /**< GATT status code for the operation, see @ref BLE_GATT_STATUS_CODES. */ + uint16_t + error_handle; /**< In case of error: The handle causing the error. In all other cases @ref BLE_GATT_HANDLE_INVALID. */ + union { + ble_gattc_evt_prim_srvc_disc_rsp_t prim_srvc_disc_rsp; /**< Primary Service Discovery Response Event Parameters. */ + ble_gattc_evt_rel_disc_rsp_t rel_disc_rsp; /**< Relationship Discovery Response Event Parameters. */ + ble_gattc_evt_char_disc_rsp_t char_disc_rsp; /**< Characteristic Discovery Response Event Parameters. */ + ble_gattc_evt_desc_disc_rsp_t desc_disc_rsp; /**< Descriptor Discovery Response Event Parameters. */ + ble_gattc_evt_char_val_by_uuid_read_rsp_t + char_val_by_uuid_read_rsp; /**< Characteristic Value Read by UUID Response Event Parameters. */ + ble_gattc_evt_read_rsp_t read_rsp; /**< Read Response Event Parameters. */ + ble_gattc_evt_char_vals_read_rsp_t char_vals_read_rsp; /**< Characteristic Values Read Response Event Parameters. */ + ble_gattc_evt_write_rsp_t write_rsp; /**< Write Response Event Parameters. */ + ble_gattc_evt_hvx_t hvx; /**< Handle Value Notification/Indication Event Parameters. */ + ble_gattc_evt_exchange_mtu_rsp_t exchange_mtu_rsp; /**< Exchange MTU Response Event Parameters. */ + ble_gattc_evt_timeout_t timeout; /**< Timeout Event Parameters. */ + ble_gattc_evt_attr_info_disc_rsp_t attr_info_disc_rsp; /**< Attribute Information Discovery Event Parameters. */ + ble_gattc_evt_write_cmd_tx_complete_t + write_cmd_tx_complete; /**< Write without Response transmission complete Event Parameters. */ + } params; /**< Event Parameters. @note Only valid if @ref gatt_status == @ref BLE_GATT_STATUS_SUCCESS. */ +} ble_gattc_evt_t; + +/**@brief UUID discovery option. + * + * @details Used with @ref sd_ble_opt_set to enable and disable automatic insertion of discovered 128-bit UUIDs to the + * Vendor Specific UUID table. Disabled by default. + * - When disabled, if a procedure initiated by + * @ref sd_ble_gattc_primary_services_discover, + * @ref sd_ble_gattc_relationships_discover, + * @ref sd_ble_gattc_characteristics_discover, + * @ref sd_ble_gattc_descriptors_discover + * finds a 128-bit UUID which was not added by @ref sd_ble_uuid_vs_add, @ref ble_uuid_t::type will be set + * to @ref BLE_UUID_TYPE_UNKNOWN in the corresponding event. + * - When enabled, all found 128-bit UUIDs will be automatically added. The application can use + * @ref sd_ble_uuid_encode to retrieve the 128-bit UUID from @ref ble_uuid_t received in the corresponding + * event. If the total number of Vendor Specific UUIDs exceeds the table capacity, @ref ble_uuid_t::type will + * be set to @ref BLE_UUID_TYPE_UNKNOWN in the corresponding event. + * See also @ref ble_common_cfg_vs_uuid_t, @ref sd_ble_uuid_vs_remove. + * + * @note @ref sd_ble_opt_get is not supported for this option. + * + * @retval ::NRF_SUCCESS Set successfully. + * + */ +typedef struct { + uint8_t auto_add_vs_enable : 1; /**< Set to 1 to enable (or 0 to disable) automatic insertion of discovered 128-bit UUIDs. */ +} ble_gattc_opt_uuid_disc_t; + +/**@brief Option structure for GATTC options. */ +typedef union { + ble_gattc_opt_uuid_disc_t uuid_disc; /**< Parameters for the UUID discovery option. */ +} ble_gattc_opt_t; + +/** @} */ + +/** @addtogroup BLE_GATTC_FUNCTIONS Functions + * @{ */ + +/**@brief Initiate or continue a GATT Primary Service Discovery procedure. + * + * @details This function initiates or resumes a Primary Service discovery procedure, starting from the supplied handle. + * If the last service has not been reached, this function must be called again with an updated start handle value to + * continue the search. See also @ref ble_gattc_opt_uuid_disc_t. + * + * @events + * @event{@ref BLE_GATTC_EVT_PRIM_SRVC_DISC_RSP} + * @endevents + * + * @mscs + * @mmsc{@ref BLE_GATTC_PRIM_SRVC_DISC_MSC} + * @endmscs + * + * @param[in] conn_handle The connection handle identifying the connection to perform this procedure on. + * @param[in] start_handle Handle to start searching from. + * @param[in] p_srvc_uuid Pointer to the service UUID to be found. If it is NULL, all primary services will be returned. + * + * @retval ::NRF_SUCCESS Successfully started or resumed the Primary Service Discovery procedure. + * @retval ::BLE_ERROR_INVALID_CONN_HANDLE Invalid Connection Handle. + * @retval ::NRF_ERROR_INVALID_STATE Invalid Connection State. + * @retval ::NRF_ERROR_INVALID_PARAM Invalid parameter(s) supplied. + * @retval ::NRF_ERROR_BUSY Client procedure already in progress. + * @retval ::NRF_ERROR_TIMEOUT There has been a GATT procedure timeout. No new GATT procedure can be performed without + * reestablishing the connection. + */ +SVCALL(SD_BLE_GATTC_PRIMARY_SERVICES_DISCOVER, uint32_t, + sd_ble_gattc_primary_services_discover(uint16_t conn_handle, uint16_t start_handle, ble_uuid_t const *p_srvc_uuid)); + +/**@brief Initiate or continue a GATT Relationship Discovery procedure. + * + * @details This function initiates or resumes the Find Included Services sub-procedure. If the last included service has not been + * reached, this must be called again with an updated handle range to continue the search. See also @ref + * ble_gattc_opt_uuid_disc_t. + * + * @events + * @event{@ref BLE_GATTC_EVT_REL_DISC_RSP} + * @endevents + * + * @mscs + * @mmsc{@ref BLE_GATTC_REL_DISC_MSC} + * @endmscs + * + * @param[in] conn_handle The connection handle identifying the connection to perform this procedure on. + * @param[in] p_handle_range A pointer to the range of handles of the Service to perform this procedure on. + * + * @retval ::NRF_SUCCESS Successfully started or resumed the Relationship Discovery procedure. + * @retval ::BLE_ERROR_INVALID_CONN_HANDLE Invalid Connection Handle. + * @retval ::NRF_ERROR_INVALID_STATE Invalid Connection State. + * @retval ::NRF_ERROR_INVALID_ADDR Invalid pointer supplied. + * @retval ::NRF_ERROR_INVALID_PARAM Invalid parameter(s) supplied. + * @retval ::NRF_ERROR_BUSY Client procedure already in progress. + * @retval ::NRF_ERROR_TIMEOUT There has been a GATT procedure timeout. No new GATT procedure can be performed without + * reestablishing the connection. + */ +SVCALL(SD_BLE_GATTC_RELATIONSHIPS_DISCOVER, uint32_t, + sd_ble_gattc_relationships_discover(uint16_t conn_handle, ble_gattc_handle_range_t const *p_handle_range)); + +/**@brief Initiate or continue a GATT Characteristic Discovery procedure. + * + * @details This function initiates or resumes a Characteristic discovery procedure. If the last Characteristic has not been + * reached, this must be called again with an updated handle range to continue the discovery. See also @ref + * ble_gattc_opt_uuid_disc_t. + * + * @events + * @event{@ref BLE_GATTC_EVT_CHAR_DISC_RSP} + * @endevents + * + * @mscs + * @mmsc{@ref BLE_GATTC_CHAR_DISC_MSC} + * @endmscs + * + * @param[in] conn_handle The connection handle identifying the connection to perform this procedure on. + * @param[in] p_handle_range A pointer to the range of handles of the Service to perform this procedure on. + * + * @retval ::NRF_SUCCESS Successfully started or resumed the Characteristic Discovery procedure. + * @retval ::BLE_ERROR_INVALID_CONN_HANDLE Invalid Connection Handle. + * @retval ::NRF_ERROR_INVALID_STATE Invalid Connection State. + * @retval ::NRF_ERROR_INVALID_ADDR Invalid pointer supplied. + * @retval ::NRF_ERROR_BUSY Client procedure already in progress. + * @retval ::NRF_ERROR_TIMEOUT There has been a GATT procedure timeout. No new GATT procedure can be performed without + * reestablishing the connection. + */ +SVCALL(SD_BLE_GATTC_CHARACTERISTICS_DISCOVER, uint32_t, + sd_ble_gattc_characteristics_discover(uint16_t conn_handle, ble_gattc_handle_range_t const *p_handle_range)); + +/**@brief Initiate or continue a GATT Characteristic Descriptor Discovery procedure. + * + * @details This function initiates or resumes a Characteristic Descriptor discovery procedure. If the last Descriptor has not + * been reached, this must be called again with an updated handle range to continue the discovery. See also @ref + * ble_gattc_opt_uuid_disc_t. + * + * @events + * @event{@ref BLE_GATTC_EVT_DESC_DISC_RSP} + * @endevents + * + * @mscs + * @mmsc{@ref BLE_GATTC_DESC_DISC_MSC} + * @endmscs + * + * @param[in] conn_handle The connection handle identifying the connection to perform this procedure on. + * @param[in] p_handle_range A pointer to the range of handles of the Characteristic to perform this procedure on. + * + * @retval ::NRF_SUCCESS Successfully started or resumed the Descriptor Discovery procedure. + * @retval ::BLE_ERROR_INVALID_CONN_HANDLE Invalid Connection Handle. + * @retval ::NRF_ERROR_INVALID_STATE Invalid Connection State. + * @retval ::NRF_ERROR_INVALID_ADDR Invalid pointer supplied. + * @retval ::NRF_ERROR_BUSY Client procedure already in progress. + * @retval ::NRF_ERROR_TIMEOUT There has been a GATT procedure timeout. No new GATT procedure can be performed without + * reestablishing the connection. + */ +SVCALL(SD_BLE_GATTC_DESCRIPTORS_DISCOVER, uint32_t, + sd_ble_gattc_descriptors_discover(uint16_t conn_handle, ble_gattc_handle_range_t const *p_handle_range)); + +/**@brief Initiate or continue a GATT Read using Characteristic UUID procedure. + * + * @details This function initiates or resumes a Read using Characteristic UUID procedure. If the last Characteristic has not been + * reached, this must be called again with an updated handle range to continue the discovery. + * + * @events + * @event{@ref BLE_GATTC_EVT_CHAR_VAL_BY_UUID_READ_RSP} + * @endevents + * + * @mscs + * @mmsc{@ref BLE_GATTC_READ_UUID_MSC} + * @endmscs + * + * @param[in] conn_handle The connection handle identifying the connection to perform this procedure on. + * @param[in] p_uuid Pointer to a Characteristic value UUID to read. + * @param[in] p_handle_range A pointer to the range of handles to perform this procedure on. + * + * @retval ::NRF_SUCCESS Successfully started or resumed the Read using Characteristic UUID procedure. + * @retval ::BLE_ERROR_INVALID_CONN_HANDLE Invalid Connection Handle. + * @retval ::NRF_ERROR_INVALID_STATE Invalid Connection State. + * @retval ::NRF_ERROR_INVALID_ADDR Invalid pointer supplied. + * @retval ::NRF_ERROR_BUSY Client procedure already in progress. + * @retval ::NRF_ERROR_TIMEOUT There has been a GATT procedure timeout. No new GATT procedure can be performed without + * reestablishing the connection. + */ +SVCALL(SD_BLE_GATTC_CHAR_VALUE_BY_UUID_READ, uint32_t, + sd_ble_gattc_char_value_by_uuid_read(uint16_t conn_handle, ble_uuid_t const *p_uuid, + ble_gattc_handle_range_t const *p_handle_range)); + +/**@brief Initiate or continue a GATT Read (Long) Characteristic or Descriptor procedure. + * + * @details This function initiates or resumes a GATT Read (Long) Characteristic or Descriptor procedure. If the Characteristic or + * Descriptor to be read is longer than ATT_MTU - 1, this function must be called multiple times with appropriate offset to read + * the complete value. + * + * @events + * @event{@ref BLE_GATTC_EVT_READ_RSP} + * @endevents + * + * @mscs + * @mmsc{@ref BLE_GATTC_VALUE_READ_MSC} + * @endmscs + * + * @param[in] conn_handle The connection handle identifying the connection to perform this procedure on. + * @param[in] handle The handle of the attribute to be read. + * @param[in] offset Offset into the attribute value to be read. + * + * @retval ::NRF_SUCCESS Successfully started or resumed the Read (Long) procedure. + * @retval ::BLE_ERROR_INVALID_CONN_HANDLE Invalid Connection Handle. + * @retval ::NRF_ERROR_INVALID_STATE Invalid Connection State. + * @retval ::NRF_ERROR_BUSY Client procedure already in progress. + * @retval ::NRF_ERROR_TIMEOUT There has been a GATT procedure timeout. No new GATT procedure can be performed without + * reestablishing the connection. + */ +SVCALL(SD_BLE_GATTC_READ, uint32_t, sd_ble_gattc_read(uint16_t conn_handle, uint16_t handle, uint16_t offset)); + +/**@brief Initiate a GATT Read Multiple Characteristic Values procedure. + * + * @details This function initiates a GATT Read Multiple Characteristic Values procedure. + * + * @events + * @event{@ref BLE_GATTC_EVT_CHAR_VALS_READ_RSP} + * @endevents + * + * @mscs + * @mmsc{@ref BLE_GATTC_READ_MULT_MSC} + * @endmscs + * + * @param[in] conn_handle The connection handle identifying the connection to perform this procedure on. + * @param[in] p_handles A pointer to the handle(s) of the attribute(s) to be read. + * @param[in] handle_count The number of handles in p_handles. + * + * @retval ::NRF_SUCCESS Successfully started the Read Multiple Characteristic Values procedure. + * @retval ::BLE_ERROR_INVALID_CONN_HANDLE Invalid Connection Handle. + * @retval ::NRF_ERROR_INVALID_STATE Invalid Connection State. + * @retval ::NRF_ERROR_INVALID_ADDR Invalid pointer supplied. + * @retval ::NRF_ERROR_BUSY Client procedure already in progress. + * @retval ::NRF_ERROR_TIMEOUT There has been a GATT procedure timeout. No new GATT procedure can be performed without + * reestablishing the connection. + */ +SVCALL(SD_BLE_GATTC_CHAR_VALUES_READ, uint32_t, + sd_ble_gattc_char_values_read(uint16_t conn_handle, uint16_t const *p_handles, uint16_t handle_count)); + +/**@brief Perform a Write (Characteristic Value or Descriptor, with or without response, signed or not, long or reliable) + * procedure. + * + * @details This function can perform all write procedures described in GATT. + * + * @note Only one write with response procedure can be ongoing per connection at a time. + * If the application tries to write with response while another write with response procedure is ongoing, + * the function call will return @ref NRF_ERROR_BUSY. + * A @ref BLE_GATTC_EVT_WRITE_RSP event will be issued as soon as the write response arrives from the peer. + * + * @note The number of Write without Response that can be queued is configured by @ref + * ble_gattc_conn_cfg_t::write_cmd_tx_queue_size When the queue is full, the function call will return @ref NRF_ERROR_RESOURCES. + * A @ref BLE_GATTC_EVT_WRITE_CMD_TX_COMPLETE event will be issued as soon as the transmission of the write without + * response is complete. + * + * @note The application can keep track of the available queue element count for writes without responses by following the + * procedure below: + * - Store initial queue element count in a variable. + * - Decrement the variable, which stores the currently available queue element count, by one when a call to this + * function returns @ref NRF_SUCCESS. + * - Increment the variable, which stores the current available queue element count, by the count variable in @ref + * BLE_GATTC_EVT_WRITE_CMD_TX_COMPLETE event. + * + * @events + * @event{@ref BLE_GATTC_EVT_WRITE_CMD_TX_COMPLETE, Write without response transmission complete.} + * @event{@ref BLE_GATTC_EVT_WRITE_RSP, Write response received from the peer.} + * @endevents + * + * @mscs + * @mmsc{@ref BLE_GATTC_VALUE_WRITE_WITHOUT_RESP_MSC} + * @mmsc{@ref BLE_GATTC_VALUE_WRITE_MSC} + * @mmsc{@ref BLE_GATTC_VALUE_LONG_WRITE_MSC} + * @mmsc{@ref BLE_GATTC_VALUE_RELIABLE_WRITE_MSC} + * @endmscs + * + * @param[in] conn_handle The connection handle identifying the connection to perform this procedure on. + * @param[in] p_write_params A pointer to a write parameters structure. + * + * @retval ::NRF_SUCCESS Successfully started the Write procedure. + * @retval ::BLE_ERROR_INVALID_CONN_HANDLE Invalid Connection Handle. + * @retval ::NRF_ERROR_INVALID_STATE Invalid Connection State. + * @retval ::NRF_ERROR_INVALID_ADDR Invalid pointer supplied. + * @retval ::NRF_ERROR_INVALID_PARAM Invalid parameter(s) supplied. + * @retval ::NRF_ERROR_DATA_SIZE Invalid data size(s) supplied. + * @retval ::NRF_ERROR_BUSY For write with response, procedure already in progress. Wait for a @ref BLE_GATTC_EVT_WRITE_RSP event + * and retry. + * @retval ::NRF_ERROR_RESOURCES Too many writes without responses queued. + * Wait for a @ref BLE_GATTC_EVT_WRITE_CMD_TX_COMPLETE event and retry. + * @retval ::NRF_ERROR_TIMEOUT There has been a GATT procedure timeout. No new GATT procedure can be performed without + * reestablishing the connection. + */ +SVCALL(SD_BLE_GATTC_WRITE, uint32_t, sd_ble_gattc_write(uint16_t conn_handle, ble_gattc_write_params_t const *p_write_params)); + +/**@brief Send a Handle Value Confirmation to the GATT Server. + * + * @mscs + * @mmsc{@ref BLE_GATTC_HVI_MSC} + * @endmscs + * + * @param[in] conn_handle The connection handle identifying the connection to perform this procedure on. + * @param[in] handle The handle of the attribute in the indication. + * + * @retval ::NRF_SUCCESS Successfully queued the Handle Value Confirmation for transmission. + * @retval ::BLE_ERROR_INVALID_CONN_HANDLE Invalid Connection Handle. + * @retval ::NRF_ERROR_INVALID_STATE Invalid Connection State or no Indication pending to be confirmed. + * @retval ::BLE_ERROR_INVALID_ATTR_HANDLE Invalid attribute handle. + * @retval ::NRF_ERROR_TIMEOUT There has been a GATT procedure timeout. No new GATT procedure can be performed without + * reestablishing the connection. + */ +SVCALL(SD_BLE_GATTC_HV_CONFIRM, uint32_t, sd_ble_gattc_hv_confirm(uint16_t conn_handle, uint16_t handle)); + +/**@brief Discovers information about a range of attributes on a GATT server. + * + * @events + * @event{@ref BLE_GATTC_EVT_ATTR_INFO_DISC_RSP, Generated when information about a range of attributes has been received.} + * @endevents + * + * @param[in] conn_handle The connection handle identifying the connection to perform this procedure on. + * @param[in] p_handle_range The range of handles to request information about. + * + * @retval ::NRF_SUCCESS Successfully started an attribute information discovery procedure. + * @retval ::BLE_ERROR_INVALID_CONN_HANDLE Invalid connection handle. + * @retval ::NRF_ERROR_INVALID_STATE Invalid connection state + * @retval ::NRF_ERROR_INVALID_ADDR Invalid pointer supplied. + * @retval ::NRF_ERROR_BUSY Client procedure already in progress. + * @retval ::NRF_ERROR_TIMEOUT There has been a GATT procedure timeout. No new GATT procedure can be performed without + * reestablishing the connection. + */ +SVCALL(SD_BLE_GATTC_ATTR_INFO_DISCOVER, uint32_t, + sd_ble_gattc_attr_info_discover(uint16_t conn_handle, ble_gattc_handle_range_t const *p_handle_range)); + +/**@brief Start an ATT_MTU exchange by sending an Exchange MTU Request to the server. + * + * @details The SoftDevice sets ATT_MTU to the minimum of: + * - The Client RX MTU value, and + * - The Server RX MTU value from @ref BLE_GATTC_EVT_EXCHANGE_MTU_RSP. + * + * However, the SoftDevice never sets ATT_MTU lower than @ref BLE_GATT_ATT_MTU_DEFAULT. + * + * @events + * @event{@ref BLE_GATTC_EVT_EXCHANGE_MTU_RSP} + * @endevents + * + * @mscs + * @mmsc{@ref BLE_GATTC_MTU_EXCHANGE} + * @endmscs + * + * @param[in] conn_handle The connection handle identifying the connection to perform this procedure on. + * @param[in] client_rx_mtu Client RX MTU size. + * - The minimum value is @ref BLE_GATT_ATT_MTU_DEFAULT. + * - The maximum value is @ref ble_gatt_conn_cfg_t::att_mtu in the connection configuration + used for this connection. + * - The value must be equal to Server RX MTU size given in @ref sd_ble_gatts_exchange_mtu_reply + * if an ATT_MTU exchange has already been performed in the other direction. + * + * @retval ::NRF_SUCCESS Successfully sent request to the server. + * @retval ::BLE_ERROR_INVALID_CONN_HANDLE Invalid connection handle. + * @retval ::NRF_ERROR_INVALID_STATE Invalid connection state or an ATT_MTU exchange was already requested once. + * @retval ::NRF_ERROR_INVALID_PARAM Invalid Client RX MTU size supplied. + * @retval ::NRF_ERROR_BUSY Client procedure already in progress. + * @retval ::NRF_ERROR_TIMEOUT There has been a GATT procedure timeout. No new GATT procedure can be performed without + reestablishing the connection. + */ +SVCALL(SD_BLE_GATTC_EXCHANGE_MTU_REQUEST, uint32_t, + sd_ble_gattc_exchange_mtu_request(uint16_t conn_handle, uint16_t client_rx_mtu)); + +/**@brief Iterate through Handle-Value(s) list in @ref BLE_GATTC_EVT_CHAR_VAL_BY_UUID_READ_RSP event. + * + * @param[in] p_gattc_evt Pointer to event buffer containing @ref BLE_GATTC_EVT_CHAR_VAL_BY_UUID_READ_RSP event. + * @note If the buffer contains different event, behavior is undefined. + * @param[in,out] p_iter Iterator, points to @ref ble_gattc_handle_value_t structure that will be filled in with + * the next Handle-Value pair in each iteration. If the function returns other than + * @ref NRF_SUCCESS, it will not be changed. + * - To start iteration, initialize the structure to zero. + * - To continue, pass the value from previous iteration. + * + * \code + * ble_gattc_handle_value_t iter; + * memset(&iter, 0, sizeof(ble_gattc_handle_value_t)); + * while (sd_ble_gattc_evt_char_val_by_uuid_read_rsp_iter(&ble_evt.evt.gattc_evt, &iter) == NRF_SUCCESS) + * { + * app_handle = iter.handle; + * memcpy(app_value, iter.p_value, ble_evt.evt.gattc_evt.params.char_val_by_uuid_read_rsp.value_len); + * } + * \endcode + * + * @retval ::NRF_SUCCESS Successfully retrieved the next Handle-Value pair. + * @retval ::NRF_ERROR_NOT_FOUND No more Handle-Value pairs available in the list. + */ +__STATIC_INLINE uint32_t sd_ble_gattc_evt_char_val_by_uuid_read_rsp_iter(ble_gattc_evt_t *p_gattc_evt, + ble_gattc_handle_value_t *p_iter); + +/** @} */ + +#ifndef SUPPRESS_INLINE_IMPLEMENTATION + +__STATIC_INLINE uint32_t sd_ble_gattc_evt_char_val_by_uuid_read_rsp_iter(ble_gattc_evt_t *p_gattc_evt, + ble_gattc_handle_value_t *p_iter) +{ + uint32_t value_len = p_gattc_evt->params.char_val_by_uuid_read_rsp.value_len; + uint8_t *p_first = p_gattc_evt->params.char_val_by_uuid_read_rsp.handle_value; + uint8_t *p_next = p_iter->p_value ? p_iter->p_value + value_len : p_first; + + if ((p_next - p_first) / (sizeof(uint16_t) + value_len) < p_gattc_evt->params.char_val_by_uuid_read_rsp.count) { + p_iter->handle = (uint16_t)p_next[1] << 8 | p_next[0]; + p_iter->p_value = p_next + sizeof(uint16_t); + return NRF_SUCCESS; + } else { + return NRF_ERROR_NOT_FOUND; + } +} + +#endif /* SUPPRESS_INLINE_IMPLEMENTATION */ + +#ifdef __cplusplus +} +#endif +#endif /* BLE_GATTC_H__ */ + +/** + @} +*/ diff --git a/src/platform/nrf52/softdevice/ble_gatts.h b/src/platform/nrf52/softdevice/ble_gatts.h new file mode 100644 index 000000000..dc94957cd --- /dev/null +++ b/src/platform/nrf52/softdevice/ble_gatts.h @@ -0,0 +1,904 @@ +/* + * Copyright (c) Nordic Semiconductor ASA + * All rights reserved. + * + * Redistribution and use in source and binary forms, with or without modification, + * are permitted provided that the following conditions are met: + * + * 1. Redistributions of source code must retain the above copyright notice, this + * list of conditions and the following disclaimer. + * + * 2. Redistributions in binary form, except as embedded into a Nordic + * Semiconductor ASA integrated circuit in a product or a software update for + * such product, must reproduce the above copyright notice, this list of + * conditions and the following disclaimer in the documentation and/or other + * materials provided with the distribution. + * + * 3. Neither the name of Nordic Semiconductor ASA nor the names of its + * contributors may be used to endorse or promote products derived from this + * software without specific prior written permission. + * + * 4. This software, with or without modification, must only be used with a + * Nordic Semiconductor ASA integrated circuit. + * + * 5. Any software provided in binary form under this license must not be reverse + * engineered, decompiled, modified and/or disassembled. + * + * THIS SOFTWARE IS PROVIDED BY NORDIC SEMICONDUCTOR ASA "AS IS" AND ANY EXPRESS + * OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES + * OF MERCHANTABILITY, NONINFRINGEMENT, AND FITNESS FOR A PARTICULAR PURPOSE ARE + * DISCLAIMED. IN NO EVENT SHALL NORDIC SEMICONDUCTOR ASA OR CONTRIBUTORS BE + * LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR + * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE + * GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) + * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT + * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT + * OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + */ + +/** + @addtogroup BLE_GATTS Generic Attribute Profile (GATT) Server + @{ + @brief Definitions and prototypes for the GATTS interface. + */ + +#ifndef BLE_GATTS_H__ +#define BLE_GATTS_H__ + +#include "ble_err.h" +#include "ble_gap.h" +#include "ble_gatt.h" +#include "ble_hci.h" +#include "ble_ranges.h" +#include "ble_types.h" +#include "nrf_error.h" +#include "nrf_svc.h" +#include + +#ifdef __cplusplus +extern "C" { +#endif + +/** @addtogroup BLE_GATTS_ENUMERATIONS Enumerations + * @{ */ + +/** + * @brief GATTS API SVC numbers. + */ +enum BLE_GATTS_SVCS { + SD_BLE_GATTS_SERVICE_ADD = BLE_GATTS_SVC_BASE, /**< Add a service. */ + SD_BLE_GATTS_INCLUDE_ADD, /**< Add an included service. */ + SD_BLE_GATTS_CHARACTERISTIC_ADD, /**< Add a characteristic. */ + SD_BLE_GATTS_DESCRIPTOR_ADD, /**< Add a generic attribute. */ + SD_BLE_GATTS_VALUE_SET, /**< Set an attribute value. */ + SD_BLE_GATTS_VALUE_GET, /**< Get an attribute value. */ + SD_BLE_GATTS_HVX, /**< Handle Value Notification or Indication. */ + SD_BLE_GATTS_SERVICE_CHANGED, /**< Perform a Service Changed Indication to one or more peers. */ + SD_BLE_GATTS_RW_AUTHORIZE_REPLY, /**< Reply to an authorization request for a read or write operation on one or more + attributes. */ + SD_BLE_GATTS_SYS_ATTR_SET, /**< Set the persistent system attributes for a connection. */ + SD_BLE_GATTS_SYS_ATTR_GET, /**< Retrieve the persistent system attributes. */ + SD_BLE_GATTS_INITIAL_USER_HANDLE_GET, /**< Retrieve the first valid user handle. */ + SD_BLE_GATTS_ATTR_GET, /**< Retrieve the UUID and/or metadata of an attribute. */ + SD_BLE_GATTS_EXCHANGE_MTU_REPLY /**< Reply to Exchange MTU Request. */ +}; + +/** + * @brief GATT Server Event IDs. + */ +enum BLE_GATTS_EVTS { + BLE_GATTS_EVT_WRITE = BLE_GATTS_EVT_BASE, /**< Write operation performed. \n See + @ref ble_gatts_evt_write_t. */ + BLE_GATTS_EVT_RW_AUTHORIZE_REQUEST, /**< Read/Write Authorization request. \n Reply with + @ref sd_ble_gatts_rw_authorize_reply. \n See @ref ble_gatts_evt_rw_authorize_request_t. + */ + BLE_GATTS_EVT_SYS_ATTR_MISSING, /**< A persistent system attribute access is pending. \n Respond with @ref + sd_ble_gatts_sys_attr_set. \n See @ref ble_gatts_evt_sys_attr_missing_t. */ + BLE_GATTS_EVT_HVC, /**< Handle Value Confirmation. \n See @ref ble_gatts_evt_hvc_t. + */ + BLE_GATTS_EVT_SC_CONFIRM, /**< Service Changed Confirmation. \n No additional event + structure applies. */ + BLE_GATTS_EVT_EXCHANGE_MTU_REQUEST, /**< Exchange MTU Request. \n Reply with + @ref sd_ble_gatts_exchange_mtu_reply. \n See @ref ble_gatts_evt_exchange_mtu_request_t. + */ + BLE_GATTS_EVT_TIMEOUT, /**< Peer failed to respond to an ATT request in time. \n See @ref + ble_gatts_evt_timeout_t. */ + BLE_GATTS_EVT_HVN_TX_COMPLETE /**< Handle Value Notification transmission complete. \n See @ref + ble_gatts_evt_hvn_tx_complete_t. */ +}; + +/**@brief GATTS Configuration IDs. + * + * IDs that uniquely identify a GATTS configuration. + */ +enum BLE_GATTS_CFGS { + BLE_GATTS_CFG_SERVICE_CHANGED = BLE_GATTS_CFG_BASE, /**< Service changed configuration. */ + BLE_GATTS_CFG_ATTR_TAB_SIZE, /**< Attribute table size configuration. */ + BLE_GATTS_CFG_SERVICE_CHANGED_CCCD_PERM, /**< Service changed CCCD permission configuration. */ +}; + +/** @} */ + +/** @addtogroup BLE_GATTS_DEFINES Defines + * @{ */ + +/** @defgroup BLE_ERRORS_GATTS SVC return values specific to GATTS + * @{ */ +#define BLE_ERROR_GATTS_INVALID_ATTR_TYPE (NRF_GATTS_ERR_BASE + 0x000) /**< Invalid attribute type. */ +#define BLE_ERROR_GATTS_SYS_ATTR_MISSING (NRF_GATTS_ERR_BASE + 0x001) /**< System Attributes missing. */ +/** @} */ + +/** @defgroup BLE_GATTS_ATTR_LENS_MAX Maximum attribute lengths + * @{ */ +#define BLE_GATTS_FIX_ATTR_LEN_MAX (510) /**< Maximum length for fixed length Attribute Values. */ +#define BLE_GATTS_VAR_ATTR_LEN_MAX (512) /**< Maximum length for variable length Attribute Values. */ +/** @} */ + +/** @defgroup BLE_GATTS_SRVC_TYPES GATT Server Service Types + * @{ */ +#define BLE_GATTS_SRVC_TYPE_INVALID 0x00 /**< Invalid Service Type. */ +#define BLE_GATTS_SRVC_TYPE_PRIMARY 0x01 /**< Primary Service. */ +#define BLE_GATTS_SRVC_TYPE_SECONDARY 0x02 /**< Secondary Type. */ +/** @} */ + +/** @defgroup BLE_GATTS_ATTR_TYPES GATT Server Attribute Types + * @{ */ +#define BLE_GATTS_ATTR_TYPE_INVALID 0x00 /**< Invalid Attribute Type. */ +#define BLE_GATTS_ATTR_TYPE_PRIM_SRVC_DECL 0x01 /**< Primary Service Declaration. */ +#define BLE_GATTS_ATTR_TYPE_SEC_SRVC_DECL 0x02 /**< Secondary Service Declaration. */ +#define BLE_GATTS_ATTR_TYPE_INC_DECL 0x03 /**< Include Declaration. */ +#define BLE_GATTS_ATTR_TYPE_CHAR_DECL 0x04 /**< Characteristic Declaration. */ +#define BLE_GATTS_ATTR_TYPE_CHAR_VAL 0x05 /**< Characteristic Value. */ +#define BLE_GATTS_ATTR_TYPE_DESC 0x06 /**< Descriptor. */ +#define BLE_GATTS_ATTR_TYPE_OTHER 0x07 /**< Other, non-GATT specific type. */ +/** @} */ + +/** @defgroup BLE_GATTS_OPS GATT Server Operations + * @{ */ +#define BLE_GATTS_OP_INVALID 0x00 /**< Invalid Operation. */ +#define BLE_GATTS_OP_WRITE_REQ 0x01 /**< Write Request. */ +#define BLE_GATTS_OP_WRITE_CMD 0x02 /**< Write Command. */ +#define BLE_GATTS_OP_SIGN_WRITE_CMD 0x03 /**< Signed Write Command. */ +#define BLE_GATTS_OP_PREP_WRITE_REQ 0x04 /**< Prepare Write Request. */ +#define BLE_GATTS_OP_EXEC_WRITE_REQ_CANCEL 0x05 /**< Execute Write Request: Cancel all prepared writes. */ +#define BLE_GATTS_OP_EXEC_WRITE_REQ_NOW 0x06 /**< Execute Write Request: Immediately execute all prepared writes. */ +/** @} */ + +/** @defgroup BLE_GATTS_VLOCS GATT Value Locations + * @{ */ +#define BLE_GATTS_VLOC_INVALID 0x00 /**< Invalid Location. */ +#define BLE_GATTS_VLOC_STACK 0x01 /**< Attribute Value is located in stack memory, no user memory is required. */ +#define BLE_GATTS_VLOC_USER \ + 0x02 /**< Attribute Value is located in user memory. This requires the user to maintain a valid buffer through the lifetime \ + of the attribute, since the stack will read and write directly to the memory using the pointer provided in the APIs. \ + There are no alignment requirements for the buffer. */ +/** @} */ + +/** @defgroup BLE_GATTS_AUTHORIZE_TYPES GATT Server Authorization Types + * @{ */ +#define BLE_GATTS_AUTHORIZE_TYPE_INVALID 0x00 /**< Invalid Type. */ +#define BLE_GATTS_AUTHORIZE_TYPE_READ 0x01 /**< Authorize a Read Operation. */ +#define BLE_GATTS_AUTHORIZE_TYPE_WRITE 0x02 /**< Authorize a Write Request Operation. */ +/** @} */ + +/** @defgroup BLE_GATTS_SYS_ATTR_FLAGS System Attribute Flags + * @{ */ +#define BLE_GATTS_SYS_ATTR_FLAG_SYS_SRVCS (1 << 0) /**< Restrict system attributes to system services only. */ +#define BLE_GATTS_SYS_ATTR_FLAG_USR_SRVCS (1 << 1) /**< Restrict system attributes to user services only. */ +/** @} */ + +/** @defgroup BLE_GATTS_SERVICE_CHANGED Service Changed Inclusion Values + * @{ + */ +#define BLE_GATTS_SERVICE_CHANGED_DEFAULT \ + (1) /**< Default is to include the Service Changed characteristic in the Attribute Table. */ +/** @} */ + +/** @defgroup BLE_GATTS_ATTR_TAB_SIZE Attribute Table size + * @{ + */ +#define BLE_GATTS_ATTR_TAB_SIZE_MIN (248) /**< Minimum Attribute Table size */ +#define BLE_GATTS_ATTR_TAB_SIZE_DEFAULT (1408) /**< Default Attribute Table size. */ +/** @} */ + +/** @defgroup BLE_GATTS_DEFAULTS GATT Server defaults + * @{ + */ +#define BLE_GATTS_HVN_TX_QUEUE_SIZE_DEFAULT \ + 1 /**< Default number of Handle Value Notifications that can be queued for transmission. */ +/** @} */ + +/** @} */ + +/** @addtogroup BLE_GATTS_STRUCTURES Structures + * @{ */ + +/** + * @brief BLE GATTS connection configuration parameters, set with @ref sd_ble_cfg_set. + */ +typedef struct { + uint8_t hvn_tx_queue_size; /**< Minimum guaranteed number of Handle Value Notifications that can be queued for transmission. + The default value is @ref BLE_GATTS_HVN_TX_QUEUE_SIZE_DEFAULT */ +} ble_gatts_conn_cfg_t; + +/**@brief Attribute metadata. */ +typedef struct { + ble_gap_conn_sec_mode_t read_perm; /**< Read permissions. */ + ble_gap_conn_sec_mode_t write_perm; /**< Write permissions. */ + uint8_t vlen : 1; /**< Variable length attribute. */ + uint8_t vloc : 2; /**< Value location, see @ref BLE_GATTS_VLOCS.*/ + uint8_t rd_auth : 1; /**< Read authorization and value will be requested from the application on every read operation. */ + uint8_t wr_auth : 1; /**< Write authorization will be requested from the application on every Write Request operation (but not + Write Command). */ +} ble_gatts_attr_md_t; + +/**@brief GATT Attribute. */ +typedef struct { + ble_uuid_t const *p_uuid; /**< Pointer to the attribute UUID. */ + ble_gatts_attr_md_t const *p_attr_md; /**< Pointer to the attribute metadata structure. */ + uint16_t init_len; /**< Initial attribute value length in bytes. */ + uint16_t init_offs; /**< Initial attribute value offset in bytes. If different from zero, the first init_offs bytes of the + attribute value will be left uninitialized. */ + uint16_t max_len; /**< Maximum attribute value length in bytes, see @ref BLE_GATTS_ATTR_LENS_MAX for maximum values. */ + uint8_t *p_value; /**< Pointer to the attribute data. Please note that if the @ref BLE_GATTS_VLOC_USER value location is + selected in the attribute metadata, this will have to point to a buffer that remains valid through the + lifetime of the attribute. This excludes usage of automatic variables that may go out of scope or any + other temporary location. The stack may access that memory directly without the application's + knowledge. For writable characteristics, this value must not be a location in flash memory.*/ +} ble_gatts_attr_t; + +/**@brief GATT Attribute Value. */ +typedef struct { + uint16_t len; /**< Length in bytes to be written or read. Length in bytes written or read after successful return.*/ + uint16_t offset; /**< Attribute value offset. */ + uint8_t *p_value; /**< Pointer to where value is stored or will be stored. + If value is stored in user memory, only the attribute length is updated when p_value == NULL. + Set to NULL when reading to obtain the complete length of the attribute value */ +} ble_gatts_value_t; + +/**@brief GATT Characteristic Presentation Format. */ +typedef struct { + uint8_t format; /**< Format of the value, see @ref BLE_GATT_CPF_FORMATS. */ + int8_t exponent; /**< Exponent for integer data types. */ + uint16_t unit; /**< Unit from Bluetooth Assigned Numbers. */ + uint8_t name_space; /**< Namespace from Bluetooth Assigned Numbers, see @ref BLE_GATT_CPF_NAMESPACES. */ + uint16_t desc; /**< Namespace description from Bluetooth Assigned Numbers, see @ref BLE_GATT_CPF_NAMESPACES. */ +} ble_gatts_char_pf_t; + +/**@brief GATT Characteristic metadata. */ +typedef struct { + ble_gatt_char_props_t char_props; /**< Characteristic Properties. */ + ble_gatt_char_ext_props_t char_ext_props; /**< Characteristic Extended Properties. */ + uint8_t const * + p_char_user_desc; /**< Pointer to a UTF-8 encoded string (non-NULL terminated), NULL if the descriptor is not required. */ + uint16_t char_user_desc_max_size; /**< The maximum size in bytes of the user description descriptor. */ + uint16_t char_user_desc_size; /**< The size of the user description, must be smaller or equal to char_user_desc_max_size. */ + ble_gatts_char_pf_t const + *p_char_pf; /**< Pointer to a presentation format structure or NULL if the CPF descriptor is not required. */ + ble_gatts_attr_md_t const + *p_user_desc_md; /**< Attribute metadata for the User Description descriptor, or NULL for default values. */ + ble_gatts_attr_md_t const + *p_cccd_md; /**< Attribute metadata for the Client Characteristic Configuration Descriptor, or NULL for default values. */ + ble_gatts_attr_md_t const + *p_sccd_md; /**< Attribute metadata for the Server Characteristic Configuration Descriptor, or NULL for default values. */ +} ble_gatts_char_md_t; + +/**@brief GATT Characteristic Definition Handles. */ +typedef struct { + uint16_t value_handle; /**< Handle to the characteristic value. */ + uint16_t user_desc_handle; /**< Handle to the User Description descriptor, or @ref BLE_GATT_HANDLE_INVALID if not present. */ + uint16_t cccd_handle; /**< Handle to the Client Characteristic Configuration Descriptor, or @ref BLE_GATT_HANDLE_INVALID if + not present. */ + uint16_t sccd_handle; /**< Handle to the Server Characteristic Configuration Descriptor, or @ref BLE_GATT_HANDLE_INVALID if + not present. */ +} ble_gatts_char_handles_t; + +/**@brief GATT HVx parameters. */ +typedef struct { + uint16_t handle; /**< Characteristic Value Handle. */ + uint8_t type; /**< Indication or Notification, see @ref BLE_GATT_HVX_TYPES. */ + uint16_t offset; /**< Offset within the attribute value. */ + uint16_t *p_len; /**< Length in bytes to be written, length in bytes written after return. */ + uint8_t const *p_data; /**< Actual data content, use NULL to use the current attribute value. */ +} ble_gatts_hvx_params_t; + +/**@brief GATT Authorization parameters. */ +typedef struct { + uint16_t gatt_status; /**< GATT status code for the operation, see @ref BLE_GATT_STATUS_CODES. */ + uint8_t update : 1; /**< If set, data supplied in p_data will be used to update the attribute value. + Please note that for @ref BLE_GATTS_AUTHORIZE_TYPE_WRITE operations this bit must always be set, + as the data to be written needs to be stored and later provided by the application. */ + uint16_t offset; /**< Offset of the attribute value being updated. */ + uint16_t len; /**< Length in bytes of the value in p_data pointer, see @ref BLE_GATTS_ATTR_LENS_MAX. */ + uint8_t const *p_data; /**< Pointer to new value used to update the attribute value. */ +} ble_gatts_authorize_params_t; + +/**@brief GATT Read or Write Authorize Reply parameters. */ +typedef struct { + uint8_t type; /**< Type of authorize operation, see @ref BLE_GATTS_AUTHORIZE_TYPES. */ + union { + ble_gatts_authorize_params_t read; /**< Read authorization parameters. */ + ble_gatts_authorize_params_t write; /**< Write authorization parameters. */ + } params; /**< Reply Parameters. */ +} ble_gatts_rw_authorize_reply_params_t; + +/**@brief Service Changed Inclusion configuration parameters, set with @ref sd_ble_cfg_set. */ +typedef struct { + uint8_t service_changed : 1; /**< If 1, include the Service Changed characteristic in the Attribute Table. Default is @ref + BLE_GATTS_SERVICE_CHANGED_DEFAULT. */ +} ble_gatts_cfg_service_changed_t; + +/**@brief Service Changed CCCD permission configuration parameters, set with @ref sd_ble_cfg_set. + * + * @note @ref ble_gatts_attr_md_t::vlen is ignored and should be set to 0. + * + * @retval ::NRF_ERROR_INVALID_PARAM One or more of the following is true: + * - @ref ble_gatts_attr_md_t::write_perm is out of range. + * - @ref ble_gatts_attr_md_t::write_perm is @ref BLE_GAP_CONN_SEC_MODE_SET_NO_ACCESS, that is + * not allowed by the Bluetooth Specification. + * - wrong @ref ble_gatts_attr_md_t::read_perm, only @ref BLE_GAP_CONN_SEC_MODE_SET_OPEN is + * allowed by the Bluetooth Specification. + * - wrong @ref ble_gatts_attr_md_t::vloc, only @ref BLE_GATTS_VLOC_STACK is allowed. + * @retval ::NRF_ERROR_NOT_SUPPORTED Security Mode 2 not supported + */ +typedef struct { + ble_gatts_attr_md_t + perm; /**< Permission for Service Changed CCCD. Default is @ref BLE_GAP_CONN_SEC_MODE_SET_OPEN, no authorization. */ +} ble_gatts_cfg_service_changed_cccd_perm_t; + +/**@brief Attribute table size configuration parameters, set with @ref sd_ble_cfg_set. + * + * @retval ::NRF_ERROR_INVALID_LENGTH One or more of the following is true: + * - The specified Attribute Table size is too small. + * The minimum acceptable size is defined by @ref BLE_GATTS_ATTR_TAB_SIZE_MIN. + * - The specified Attribute Table size is not a multiple of 4. + */ +typedef struct { + uint32_t attr_tab_size; /**< Attribute table size. Default is @ref BLE_GATTS_ATTR_TAB_SIZE_DEFAULT, minimum is @ref + BLE_GATTS_ATTR_TAB_SIZE_MIN. */ +} ble_gatts_cfg_attr_tab_size_t; + +/**@brief Config structure for GATTS configurations. */ +typedef union { + ble_gatts_cfg_service_changed_t + service_changed; /**< Include service changed characteristic, cfg_id is @ref BLE_GATTS_CFG_SERVICE_CHANGED. */ + ble_gatts_cfg_service_changed_cccd_perm_t service_changed_cccd_perm; /**< Service changed CCCD permission, cfg_id is @ref + BLE_GATTS_CFG_SERVICE_CHANGED_CCCD_PERM. */ + ble_gatts_cfg_attr_tab_size_t attr_tab_size; /**< Attribute table size, cfg_id is @ref BLE_GATTS_CFG_ATTR_TAB_SIZE. */ +} ble_gatts_cfg_t; + +/**@brief Event structure for @ref BLE_GATTS_EVT_WRITE. */ +typedef struct { + uint16_t handle; /**< Attribute Handle. */ + ble_uuid_t uuid; /**< Attribute UUID. */ + uint8_t op; /**< Type of write operation, see @ref BLE_GATTS_OPS. */ + uint8_t auth_required; /**< Writing operation deferred due to authorization requirement. Application may use @ref + sd_ble_gatts_value_set to finalize the writing operation. */ + uint16_t offset; /**< Offset for the write operation. */ + uint16_t len; /**< Length of the received data. */ + uint8_t data[1]; /**< Received data. @note This is a variable length array. The size of 1 indicated is only a placeholder for + compilation. See @ref sd_ble_evt_get for more information on how to use event structures with variable + length array members. */ +} ble_gatts_evt_write_t; + +/**@brief Event substructure for authorized read requests, see @ref ble_gatts_evt_rw_authorize_request_t. */ +typedef struct { + uint16_t handle; /**< Attribute Handle. */ + ble_uuid_t uuid; /**< Attribute UUID. */ + uint16_t offset; /**< Offset for the read operation. */ +} ble_gatts_evt_read_t; + +/**@brief Event structure for @ref BLE_GATTS_EVT_RW_AUTHORIZE_REQUEST. */ +typedef struct { + uint8_t type; /**< Type of authorize operation, see @ref BLE_GATTS_AUTHORIZE_TYPES. */ + union { + ble_gatts_evt_read_t read; /**< Attribute Read Parameters. */ + ble_gatts_evt_write_t write; /**< Attribute Write Parameters. */ + } request; /**< Request Parameters. */ +} ble_gatts_evt_rw_authorize_request_t; + +/**@brief Event structure for @ref BLE_GATTS_EVT_SYS_ATTR_MISSING. */ +typedef struct { + uint8_t hint; /**< Hint (currently unused). */ +} ble_gatts_evt_sys_attr_missing_t; + +/**@brief Event structure for @ref BLE_GATTS_EVT_HVC. */ +typedef struct { + uint16_t handle; /**< Attribute Handle. */ +} ble_gatts_evt_hvc_t; + +/**@brief Event structure for @ref BLE_GATTS_EVT_EXCHANGE_MTU_REQUEST. */ +typedef struct { + uint16_t client_rx_mtu; /**< Client RX MTU size. */ +} ble_gatts_evt_exchange_mtu_request_t; + +/**@brief Event structure for @ref BLE_GATTS_EVT_TIMEOUT. */ +typedef struct { + uint8_t src; /**< Timeout source, see @ref BLE_GATT_TIMEOUT_SOURCES. */ +} ble_gatts_evt_timeout_t; + +/**@brief Event structure for @ref BLE_GATTS_EVT_HVN_TX_COMPLETE. */ +typedef struct { + uint8_t count; /**< Number of notification transmissions completed. */ +} ble_gatts_evt_hvn_tx_complete_t; + +/**@brief GATTS event structure. */ +typedef struct { + uint16_t conn_handle; /**< Connection Handle on which the event occurred. */ + union { + ble_gatts_evt_write_t write; /**< Write Event Parameters. */ + ble_gatts_evt_rw_authorize_request_t authorize_request; /**< Read or Write Authorize Request Parameters. */ + ble_gatts_evt_sys_attr_missing_t sys_attr_missing; /**< System attributes missing. */ + ble_gatts_evt_hvc_t hvc; /**< Handle Value Confirmation Event Parameters. */ + ble_gatts_evt_exchange_mtu_request_t exchange_mtu_request; /**< Exchange MTU Request Event Parameters. */ + ble_gatts_evt_timeout_t timeout; /**< Timeout Event. */ + ble_gatts_evt_hvn_tx_complete_t hvn_tx_complete; /**< Handle Value Notification transmission complete Event Parameters. */ + } params; /**< Event Parameters. */ +} ble_gatts_evt_t; + +/** @} */ + +/** @addtogroup BLE_GATTS_FUNCTIONS Functions + * @{ */ + +/**@brief Add a service declaration to the Attribute Table. + * + * @note Secondary Services are only relevant in the context of the entity that references them, it is therefore forbidden to + * add a secondary service declaration that is not referenced by another service later in the Attribute Table. + * + * @mscs + * @mmsc{@ref BLE_GATTS_ATT_TABLE_POP_MSC} + * @endmscs + * + * @param[in] type Toggles between primary and secondary services, see @ref BLE_GATTS_SRVC_TYPES. + * @param[in] p_uuid Pointer to service UUID. + * @param[out] p_handle Pointer to a 16-bit word where the assigned handle will be stored. + * + * @retval ::NRF_SUCCESS Successfully added a service declaration. + * @retval ::NRF_ERROR_INVALID_ADDR Invalid pointer supplied. + * @retval ::NRF_ERROR_INVALID_PARAM Invalid parameter(s) supplied, Vendor Specific UUIDs need to be present in the table. + * @retval ::NRF_ERROR_FORBIDDEN Forbidden value supplied, certain UUIDs are reserved for the stack. + * @retval ::NRF_ERROR_NO_MEM Not enough memory to complete operation. + */ +SVCALL(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)); + +/**@brief Add an include declaration to the Attribute Table. + * + * @note It is currently only possible to add an include declaration to the last added service (i.e. only sequential population is + * supported at this time). + * + * @note The included service must already be present in the Attribute Table prior to this call. + * + * @mscs + * @mmsc{@ref BLE_GATTS_ATT_TABLE_POP_MSC} + * @endmscs + * + * @param[in] service_handle Handle of the service where the included service is to be placed, if @ref BLE_GATT_HANDLE_INVALID + * is used, it will be placed sequentially. + * @param[in] inc_srvc_handle Handle of the included service. + * @param[out] p_include_handle Pointer to a 16-bit word where the assigned handle will be stored. + * + * @retval ::NRF_SUCCESS Successfully added an include declaration. + * @retval ::NRF_ERROR_INVALID_ADDR Invalid pointer supplied. + * @retval ::NRF_ERROR_INVALID_PARAM Invalid parameter(s) supplied, handle values need to match previously added services. + * @retval ::NRF_ERROR_INVALID_STATE Invalid state to perform operation, a service context is required. + * @retval ::NRF_ERROR_NOT_SUPPORTED Feature is not supported, service_handle must be that of the last added service. + * @retval ::NRF_ERROR_FORBIDDEN Forbidden value supplied, self inclusions are not allowed. + * @retval ::NRF_ERROR_NO_MEM Not enough memory to complete operation. + * @retval ::NRF_ERROR_NOT_FOUND Attribute not found. + */ +SVCALL(SD_BLE_GATTS_INCLUDE_ADD, uint32_t, + sd_ble_gatts_include_add(uint16_t service_handle, uint16_t inc_srvc_handle, uint16_t *p_include_handle)); + +/**@brief Add a characteristic declaration, a characteristic value declaration and optional characteristic descriptor declarations + * to the Attribute Table. + * + * @note It is currently only possible to add a characteristic to the last added service (i.e. only sequential population is + * supported at this time). + * + * @note Several restrictions apply to the parameters, such as matching permissions between the user description descriptor and + * the writable auxiliaries bits, readable (no security) and writable (selectable) CCCDs and SCCDs and valid presentation format + * values. + * + * @note If no metadata is provided for the optional descriptors, their permissions will be derived from the characteristic + * permissions. + * + * @mscs + * @mmsc{@ref BLE_GATTS_ATT_TABLE_POP_MSC} + * @endmscs + * + * @param[in] service_handle Handle of the service where the characteristic is to be placed, if @ref BLE_GATT_HANDLE_INVALID is + * used, it will be placed sequentially. + * @param[in] p_char_md Characteristic metadata. + * @param[in] p_attr_char_value Pointer to the attribute structure corresponding to the characteristic value. + * @param[out] p_handles Pointer to the structure where the assigned handles will be stored. + * + * @retval ::NRF_SUCCESS Successfully added a characteristic. + * @retval ::NRF_ERROR_INVALID_ADDR Invalid pointer supplied. + * @retval ::NRF_ERROR_INVALID_PARAM Invalid parameter(s) supplied, service handle, Vendor Specific UUIDs, lengths, and + * permissions need to adhere to the constraints. + * @retval ::NRF_ERROR_INVALID_STATE Invalid state to perform operation, a service context is required. + * @retval ::NRF_ERROR_FORBIDDEN Forbidden value supplied, certain UUIDs are reserved for the stack. + * @retval ::NRF_ERROR_NO_MEM Not enough memory to complete operation. + * @retval ::NRF_ERROR_DATA_SIZE Invalid data size(s) supplied, attribute lengths are restricted by @ref BLE_GATTS_ATTR_LENS_MAX. + */ +SVCALL(SD_BLE_GATTS_CHARACTERISTIC_ADD, uint32_t, + sd_ble_gatts_characteristic_add(uint16_t service_handle, ble_gatts_char_md_t const *p_char_md, + ble_gatts_attr_t const *p_attr_char_value, ble_gatts_char_handles_t *p_handles)); + +/**@brief Add a descriptor to the Attribute Table. + * + * @note It is currently only possible to add a descriptor to the last added characteristic (i.e. only sequential population is + * supported at this time). + * + * @mscs + * @mmsc{@ref BLE_GATTS_ATT_TABLE_POP_MSC} + * @endmscs + * + * @param[in] char_handle Handle of the characteristic where the descriptor is to be placed, if @ref BLE_GATT_HANDLE_INVALID is + * used, it will be placed sequentially. + * @param[in] p_attr Pointer to the attribute structure. + * @param[out] p_handle Pointer to a 16-bit word where the assigned handle will be stored. + * + * @retval ::NRF_SUCCESS Successfully added a descriptor. + * @retval ::NRF_ERROR_INVALID_ADDR Invalid pointer supplied. + * @retval ::NRF_ERROR_INVALID_PARAM Invalid parameter(s) supplied, characteristic handle, Vendor Specific UUIDs, lengths, and + * permissions need to adhere to the constraints. + * @retval ::NRF_ERROR_INVALID_STATE Invalid state to perform operation, a characteristic context is required. + * @retval ::NRF_ERROR_FORBIDDEN Forbidden value supplied, certain UUIDs are reserved for the stack. + * @retval ::NRF_ERROR_NO_MEM Not enough memory to complete operation. + * @retval ::NRF_ERROR_DATA_SIZE Invalid data size(s) supplied, attribute lengths are restricted by @ref BLE_GATTS_ATTR_LENS_MAX. + */ +SVCALL(SD_BLE_GATTS_DESCRIPTOR_ADD, uint32_t, + sd_ble_gatts_descriptor_add(uint16_t char_handle, ble_gatts_attr_t const *p_attr, uint16_t *p_handle)); + +/**@brief Set the value of a given attribute. + * + * @note Values other than system attributes can be set at any time, regardless of whether any active connections exist. + * + * @mscs + * @mmsc{@ref BLE_GATTS_QUEUED_WRITE_QUEUE_FULL_MSC} + * @mmsc{@ref BLE_GATTS_QUEUED_WRITE_NOBUF_NOAUTH_MSC} + * @endmscs + * + * @param[in] conn_handle Connection handle. Ignored if the value does not belong to a system attribute. + * @param[in] handle Attribute handle. + * @param[in,out] p_value Attribute value information. + * + * @retval ::NRF_SUCCESS Successfully set the value of the attribute. + * @retval ::NRF_ERROR_INVALID_ADDR Invalid pointer supplied. + * @retval ::NRF_ERROR_INVALID_PARAM Invalid parameter(s) supplied. + * @retval ::NRF_ERROR_NOT_FOUND Attribute not found. + * @retval ::NRF_ERROR_FORBIDDEN Forbidden handle supplied, certain attributes are not modifiable by the application. + * @retval ::NRF_ERROR_DATA_SIZE Invalid data size(s) supplied, attribute lengths are restricted by @ref BLE_GATTS_ATTR_LENS_MAX. + * @retval ::BLE_ERROR_INVALID_CONN_HANDLE Invalid connection handle supplied on a system attribute. + */ +SVCALL(SD_BLE_GATTS_VALUE_SET, uint32_t, + sd_ble_gatts_value_set(uint16_t conn_handle, uint16_t handle, ble_gatts_value_t *p_value)); + +/**@brief Get the value of a given attribute. + * + * @note If the attribute value is longer than the size of the supplied buffer, + * @ref ble_gatts_value_t::len will return the total attribute value length (excluding offset), + * and not the number of bytes actually returned in @ref ble_gatts_value_t::p_value. + * The application may use this information to allocate a suitable buffer size. + * + * @note When retrieving system attribute values with this function, the connection handle + * may refer to an already disconnected connection. Refer to the documentation of + * @ref sd_ble_gatts_sys_attr_get for further information. + * + * @param[in] conn_handle Connection handle. Ignored if the value does not belong to a system attribute. + * @param[in] handle Attribute handle. + * @param[in,out] p_value Attribute value information. + * + * @retval ::NRF_SUCCESS Successfully retrieved the value of the attribute. + * @retval ::NRF_ERROR_INVALID_ADDR Invalid pointer supplied. + * @retval ::NRF_ERROR_NOT_FOUND Attribute not found. + * @retval ::NRF_ERROR_INVALID_PARAM Invalid attribute offset supplied. + * @retval ::BLE_ERROR_INVALID_CONN_HANDLE Invalid connection handle supplied on a system attribute. + * @retval ::BLE_ERROR_GATTS_SYS_ATTR_MISSING System attributes missing, use @ref sd_ble_gatts_sys_attr_set to set them to a known + * value. + */ +SVCALL(SD_BLE_GATTS_VALUE_GET, uint32_t, + sd_ble_gatts_value_get(uint16_t conn_handle, uint16_t handle, ble_gatts_value_t *p_value)); + +/**@brief Notify or Indicate an attribute value. + * + * @details This function checks for the relevant Client Characteristic Configuration descriptor value to verify that the relevant + * operation (notification or indication) has been enabled by the client. It is also able to update the attribute value before + * issuing the PDU, so that the application can atomically perform a value update and a server initiated transaction with a single + * API call. + * + * @note The local attribute value may be updated even if an outgoing packet is not sent to the peer due to an error during + * execution. The Attribute Table has been updated if one of the following error codes is returned: @ref NRF_ERROR_INVALID_STATE, + * @ref NRF_ERROR_BUSY, + * @ref NRF_ERROR_FORBIDDEN, @ref BLE_ERROR_GATTS_SYS_ATTR_MISSING and @ref NRF_ERROR_RESOURCES. + * The caller can check whether the value has been updated by looking at the contents of *(@ref + * ble_gatts_hvx_params_t::p_len). + * + * @note Only one indication procedure can be ongoing per connection at a time. + * If the application tries to indicate an attribute value while another indication procedure is ongoing, + * the function call will return @ref NRF_ERROR_BUSY. + * A @ref BLE_GATTS_EVT_HVC event will be issued as soon as the confirmation arrives from the peer. + * + * @note The number of Handle Value Notifications that can be queued is configured by @ref + * 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 + * BLE_GATTS_EVT_HVN_TX_COMPLETE event will be issued as soon as the transmission of the notification is complete. + * + * @note The application can keep track of the available queue element count for notifications by following the procedure + * below: + * - Store initial queue element count in a variable. + * - Decrement the variable, which stores the currently available queue element count, by one when a call to this + * function returns @ref NRF_SUCCESS. + * - Increment the variable, which stores the current available queue element count, by the count variable in @ref + * BLE_GATTS_EVT_HVN_TX_COMPLETE event. + * + * @events + * @event{@ref BLE_GATTS_EVT_HVN_TX_COMPLETE, Notification transmission complete.} + * @event{@ref BLE_GATTS_EVT_HVC, Confirmation received from the peer.} + * @endevents + * + * @mscs + * @mmsc{@ref BLE_GATTS_HVX_SYS_ATTRS_MISSING_MSC} + * @mmsc{@ref BLE_GATTS_HVN_MSC} + * @mmsc{@ref BLE_GATTS_HVI_MSC} + * @mmsc{@ref BLE_GATTS_HVX_DISABLED_MSC} + * @endmscs + * + * @param[in] conn_handle Connection handle. + * @param[in,out] p_hvx_params Pointer to an HVx parameters structure. If @ref ble_gatts_hvx_params_t::p_data + * contains a non-NULL pointer the attribute value will be updated with the contents + * pointed by it before sending the notification or indication. If the attribute value + * is updated, @ref ble_gatts_hvx_params_t::p_len is updated by the SoftDevice to + * contain the number of actual bytes written, else it will be set to 0. + * + * @retval ::NRF_SUCCESS Successfully queued a notification or indication for transmission, and optionally updated the attribute + * value. + * @retval ::BLE_ERROR_INVALID_CONN_HANDLE Invalid Connection Handle. + * @retval ::NRF_ERROR_INVALID_STATE One or more of the following is true: + * - Invalid Connection State + * - Notifications and/or indications not enabled in the CCCD + * - An ATT_MTU exchange is ongoing + * @retval ::NRF_ERROR_INVALID_ADDR Invalid pointer supplied. + * @retval ::NRF_ERROR_INVALID_PARAM Invalid parameter(s) supplied. + * @retval ::BLE_ERROR_INVALID_ATTR_HANDLE Invalid attribute handle(s) supplied. Only attributes added directly by the application + * are available to notify and indicate. + * @retval ::BLE_ERROR_GATTS_INVALID_ATTR_TYPE Invalid attribute type(s) supplied, only characteristic values may be notified and + * indicated. + * @retval ::NRF_ERROR_NOT_FOUND Attribute not found. + * @retval ::NRF_ERROR_FORBIDDEN The connection's current security level is lower than the one required by the write permissions + * of the CCCD associated with this characteristic. + * @retval ::NRF_ERROR_DATA_SIZE Invalid data size(s) supplied. + * @retval ::NRF_ERROR_BUSY For @ref BLE_GATT_HVX_INDICATION Procedure already in progress. Wait for a @ref BLE_GATTS_EVT_HVC + * event and retry. + * @retval ::BLE_ERROR_GATTS_SYS_ATTR_MISSING System attributes missing, use @ref sd_ble_gatts_sys_attr_set to set them to a known + * value. + * @retval ::NRF_ERROR_RESOURCES Too many notifications queued. + * Wait for a @ref BLE_GATTS_EVT_HVN_TX_COMPLETE event and retry. + * @retval ::NRF_ERROR_TIMEOUT There has been a GATT procedure timeout. No new GATT procedure can be performed without + * reestablishing the connection. + */ +SVCALL(SD_BLE_GATTS_HVX, uint32_t, sd_ble_gatts_hvx(uint16_t conn_handle, ble_gatts_hvx_params_t const *p_hvx_params)); + +/**@brief Indicate the Service Changed attribute value. + * + * @details This call will send a Handle Value Indication to one or more peers connected to inform them that the Attribute + * Table layout has changed. As soon as the peer has confirmed the indication, a @ref BLE_GATTS_EVT_SC_CONFIRM event will + * be issued. + * + * @note Some of the restrictions and limitations that apply to @ref sd_ble_gatts_hvx also apply here. + * + * @events + * @event{@ref BLE_GATTS_EVT_SC_CONFIRM, Confirmation of attribute table change received from peer.} + * @endevents + * + * @mscs + * @mmsc{@ref BLE_GATTS_SC_MSC} + * @endmscs + * + * @param[in] conn_handle Connection handle. + * @param[in] start_handle Start of affected attribute handle range. + * @param[in] end_handle End of affected attribute handle range. + * + * @retval ::NRF_SUCCESS Successfully queued the Service Changed indication for transmission. + * @retval ::BLE_ERROR_INVALID_CONN_HANDLE Invalid Connection Handle. + * @retval ::NRF_ERROR_NOT_SUPPORTED Service Changed not enabled at initialization. See @ref + * sd_ble_cfg_set and @ref ble_gatts_cfg_service_changed_t. + * @retval ::NRF_ERROR_INVALID_STATE One or more of the following is true: + * - Invalid Connection State + * - Notifications and/or indications not enabled in the CCCD + * - An ATT_MTU exchange is ongoing + * @retval ::NRF_ERROR_INVALID_PARAM Invalid parameter(s) supplied. + * @retval ::BLE_ERROR_INVALID_ATTR_HANDLE Invalid attribute handle(s) supplied, handles must be in the range populated by the + * application. + * @retval ::NRF_ERROR_BUSY Procedure already in progress. + * @retval ::BLE_ERROR_GATTS_SYS_ATTR_MISSING System attributes missing, use @ref sd_ble_gatts_sys_attr_set to set them to a known + * value. + * @retval ::NRF_ERROR_TIMEOUT There has been a GATT procedure timeout. No new GATT procedure can be performed without + * reestablishing the connection. + */ +SVCALL(SD_BLE_GATTS_SERVICE_CHANGED, uint32_t, + sd_ble_gatts_service_changed(uint16_t conn_handle, uint16_t start_handle, uint16_t end_handle)); + +/**@brief Respond to a Read/Write authorization request. + * + * @note This call should only be used as a response to a @ref BLE_GATTS_EVT_RW_AUTHORIZE_REQUEST event issued to the application. + * + * @mscs + * @mmsc{@ref BLE_GATTS_QUEUED_WRITE_NOBUF_AUTH_MSC} + * @mmsc{@ref BLE_GATTS_QUEUED_WRITE_BUF_AUTH_MSC} + * @mmsc{@ref BLE_GATTS_QUEUED_WRITE_NOBUF_NOAUTH_MSC} + * @mmsc{@ref BLE_GATTS_READ_REQ_AUTH_MSC} + * @mmsc{@ref BLE_GATTS_WRITE_REQ_AUTH_MSC} + * @mmsc{@ref BLE_GATTS_QUEUED_WRITE_QUEUE_FULL_MSC} + * @mmsc{@ref BLE_GATTS_QUEUED_WRITE_PEER_CANCEL_MSC} + * @endmscs + * + * @param[in] conn_handle Connection handle. + * @param[in] p_rw_authorize_reply_params Pointer to a structure with the attribute provided by the application. + * + * @note @ref ble_gatts_authorize_params_t::p_data is ignored when this function is used to respond + * to a @ref BLE_GATTS_AUTHORIZE_TYPE_READ event if @ref ble_gatts_authorize_params_t::update + * is set to 0. + * + * @retval ::NRF_SUCCESS Successfully queued a response to the peer, and in the case of a write operation, Attribute + * Table updated. + * @retval ::BLE_ERROR_INVALID_CONN_HANDLE Invalid Connection Handle. + * @retval ::NRF_ERROR_BUSY The stack is busy, process pending events and retry. + * @retval ::NRF_ERROR_INVALID_ADDR Invalid pointer supplied. + * @retval ::NRF_ERROR_INVALID_STATE Invalid Connection State or no authorization request pending. + * @retval ::NRF_ERROR_INVALID_PARAM Authorization op invalid, + * handle supplied does not match requested handle, + * or invalid data to be written provided by the application. + * @retval ::NRF_ERROR_TIMEOUT There has been a GATT procedure timeout. No new GATT procedure can be performed without + * reestablishing the connection. + */ +SVCALL(SD_BLE_GATTS_RW_AUTHORIZE_REPLY, uint32_t, + sd_ble_gatts_rw_authorize_reply(uint16_t conn_handle, + ble_gatts_rw_authorize_reply_params_t const *p_rw_authorize_reply_params)); + +/**@brief Update persistent system attribute information. + * + * @details Supply information about persistent system attributes to the stack, + * previously obtained using @ref sd_ble_gatts_sys_attr_get. + * This call is only allowed for active connections, and is usually + * made immediately after a connection is established with an known bonded device, + * often as a response to a @ref BLE_GATTS_EVT_SYS_ATTR_MISSING. + * + * p_sysattrs may point directly to the application's stored copy of the system attributes + * obtained using @ref sd_ble_gatts_sys_attr_get. + * If the pointer is NULL, the system attribute info is initialized, assuming that + * the application does not have any previously saved system attribute data for this device. + * + * @note The state of persistent system attributes is reset upon connection establishment and then remembered for its duration. + * + * @note If this call returns with an error code different from @ref NRF_SUCCESS, the storage of persistent system attributes may + * have been completed only partially. This means that the state of the attribute table is undefined, and the application should + * either provide a new set of attributes using this same call or reset the SoftDevice to return to a known state. + * + * @note When the @ref BLE_GATTS_SYS_ATTR_FLAG_SYS_SRVCS is used with this function, only the system attributes included in system + * services will be modified. + * @note When the @ref BLE_GATTS_SYS_ATTR_FLAG_USR_SRVCS is used with this function, only the system attributes included in user + * services will be modified. + * + * @mscs + * @mmsc{@ref BLE_GATTS_HVX_SYS_ATTRS_MISSING_MSC} + * @mmsc{@ref BLE_GATTS_SYS_ATTRS_UNK_PEER_MSC} + * @mmsc{@ref BLE_GATTS_SYS_ATTRS_BONDED_PEER_MSC} + * @endmscs + * + * @param[in] conn_handle Connection handle. + * @param[in] p_sys_attr_data Pointer to a saved copy of system attributes supplied to the stack, or NULL. + * @param[in] len Size of data pointed by p_sys_attr_data, in octets. + * @param[in] flags Optional additional flags, see @ref BLE_GATTS_SYS_ATTR_FLAGS + * + * @retval ::NRF_SUCCESS Successfully set the system attribute information. + * @retval ::BLE_ERROR_INVALID_CONN_HANDLE Invalid Connection Handle. + * @retval ::NRF_ERROR_INVALID_ADDR Invalid pointer supplied. + * @retval ::NRF_ERROR_INVALID_STATE Invalid Connection State. + * @retval ::NRF_ERROR_INVALID_PARAM Invalid flags supplied. + * @retval ::NRF_ERROR_INVALID_DATA Invalid data supplied, the data should be exactly the same as retrieved with @ref + * sd_ble_gatts_sys_attr_get. + * @retval ::NRF_ERROR_NO_MEM Not enough memory to complete operation. + */ +SVCALL(SD_BLE_GATTS_SYS_ATTR_SET, uint32_t, + sd_ble_gatts_sys_attr_set(uint16_t conn_handle, uint8_t const *p_sys_attr_data, uint16_t len, uint32_t flags)); + +/**@brief Retrieve persistent system attribute information from the stack. + * + * @details This call is used to retrieve information about values to be stored persistently by the application + * during the lifetime of a connection or after it has been terminated. When a new connection is established with the + * same bonded device, the system attribute information retrieved with this function should be restored using using @ref + * sd_ble_gatts_sys_attr_set. If retrieved after disconnection, the data should be read before a new connection established. The + * connection handle for the previous, now disconnected, connection will remain valid until a new one is created to allow this API + * call to refer to it. Connection handles belonging to active connections can be used as well, but care should be taken since the + * system attributes may be written to at any time by the peer during a connection's lifetime. + * + * @note When the @ref BLE_GATTS_SYS_ATTR_FLAG_SYS_SRVCS is used with this function, only the system attributes included in system + * services will be returned. + * @note When the @ref BLE_GATTS_SYS_ATTR_FLAG_USR_SRVCS is used with this function, only the system attributes included in user + * services will be returned. + * + * @mscs + * @mmsc{@ref BLE_GATTS_SYS_ATTRS_BONDED_PEER_MSC} + * @endmscs + * + * @param[in] conn_handle Connection handle of the recently terminated connection. + * @param[out] p_sys_attr_data Pointer to a buffer where updated information about system attributes will be filled in. The + * format of the data is described in @ref BLE_GATTS_SYS_ATTRS_FORMAT. NULL can be provided to obtain the length of the data. + * @param[in,out] p_len Size of application buffer if p_sys_attr_data is not NULL. Unconditionally updated to actual + * length of system attribute data. + * @param[in] flags Optional additional flags, see @ref BLE_GATTS_SYS_ATTR_FLAGS + * + * @retval ::NRF_SUCCESS Successfully retrieved the system attribute information. + * @retval ::BLE_ERROR_INVALID_CONN_HANDLE Invalid Connection Handle. + * @retval ::NRF_ERROR_INVALID_ADDR Invalid pointer supplied. + * @retval ::NRF_ERROR_INVALID_PARAM Invalid flags supplied. + * @retval ::NRF_ERROR_DATA_SIZE The system attribute information did not fit into the provided buffer. + * @retval ::NRF_ERROR_NOT_FOUND No system attributes found. + */ +SVCALL(SD_BLE_GATTS_SYS_ATTR_GET, uint32_t, + sd_ble_gatts_sys_attr_get(uint16_t conn_handle, uint8_t *p_sys_attr_data, uint16_t *p_len, uint32_t flags)); + +/**@brief Retrieve the first valid user attribute handle. + * + * @param[out] p_handle Pointer to an integer where the handle will be stored. + * + * @retval ::NRF_SUCCESS Successfully retrieved the handle. + * @retval ::NRF_ERROR_INVALID_ADDR Invalid pointer supplied. + */ +SVCALL(SD_BLE_GATTS_INITIAL_USER_HANDLE_GET, uint32_t, sd_ble_gatts_initial_user_handle_get(uint16_t *p_handle)); + +/**@brief Retrieve the attribute UUID and/or metadata. + * + * @param[in] handle Attribute handle + * @param[out] p_uuid UUID of the attribute. Use NULL to omit this field. + * @param[out] p_md Metadata of the attribute. Use NULL to omit this field. + * + * @retval ::NRF_SUCCESS Successfully retrieved the attribute metadata, + * @retval ::NRF_ERROR_INVALID_ADDR Invalid pointer supplied. + * @retval ::NRF_ERROR_INVALID_PARAM Invalid parameters supplied. Returned when both @c p_uuid and @c p_md are NULL. + * @retval ::NRF_ERROR_NOT_FOUND Attribute was not found. + */ +SVCALL(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)); + +/**@brief Reply to an ATT_MTU exchange request by sending an Exchange MTU Response to the client. + * + * @details This function is only used to reply to a @ref BLE_GATTS_EVT_EXCHANGE_MTU_REQUEST event. + * + * @details The SoftDevice sets ATT_MTU to the minimum of: + * - The Client RX MTU value from @ref BLE_GATTS_EVT_EXCHANGE_MTU_REQUEST, and + * - The Server RX MTU value. + * + * However, the SoftDevice never sets ATT_MTU lower than @ref BLE_GATT_ATT_MTU_DEFAULT. + * + * @mscs + * @mmsc{@ref BLE_GATTS_MTU_EXCHANGE} + * @endmscs + * + * @param[in] conn_handle The connection handle identifying the connection to perform this procedure on. + * @param[in] server_rx_mtu Server RX MTU size. + * - The minimum value is @ref BLE_GATT_ATT_MTU_DEFAULT. + * - The maximum value is @ref ble_gatt_conn_cfg_t::att_mtu in the connection configuration + * used for this connection. + * - The value must be equal to Client RX MTU size given in @ref sd_ble_gattc_exchange_mtu_request + * if an ATT_MTU exchange has already been performed in the other direction. + * + * @retval ::NRF_SUCCESS Successfully sent response to the client. + * @retval ::BLE_ERROR_INVALID_CONN_HANDLE Invalid Connection Handle. + * @retval ::NRF_ERROR_INVALID_STATE Invalid Connection State or no ATT_MTU exchange request pending. + * @retval ::NRF_ERROR_INVALID_PARAM Invalid Server RX MTU size supplied. + * @retval ::NRF_ERROR_TIMEOUT There has been a GATT procedure timeout. No new GATT procedure can be performed without + * reestablishing the connection. + */ +SVCALL(SD_BLE_GATTS_EXCHANGE_MTU_REPLY, uint32_t, sd_ble_gatts_exchange_mtu_reply(uint16_t conn_handle, uint16_t server_rx_mtu)); +/** @} */ + +#ifdef __cplusplus +} +#endif +#endif // BLE_GATTS_H__ + +/** + @} +*/ diff --git a/src/platform/nrf52/softdevice/ble_hci.h b/src/platform/nrf52/softdevice/ble_hci.h new file mode 100644 index 000000000..27f85d52e --- /dev/null +++ b/src/platform/nrf52/softdevice/ble_hci.h @@ -0,0 +1,135 @@ +/* + * Copyright (c) Nordic Semiconductor ASA + * All rights reserved. + * + * Redistribution and use in source and binary forms, with or without modification, + * are permitted provided that the following conditions are met: + * + * 1. Redistributions of source code must retain the above copyright notice, this + * list of conditions and the following disclaimer. + * + * 2. Redistributions in binary form, except as embedded into a Nordic + * Semiconductor ASA integrated circuit in a product or a software update for + * such product, must reproduce the above copyright notice, this list of + * conditions and the following disclaimer in the documentation and/or other + * materials provided with the distribution. + * + * 3. Neither the name of Nordic Semiconductor ASA nor the names of its + * contributors may be used to endorse or promote products derived from this + * software without specific prior written permission. + * + * 4. This software, with or without modification, must only be used with a + * Nordic Semiconductor ASA integrated circuit. + * + * 5. Any software provided in binary form under this license must not be reverse + * engineered, decompiled, modified and/or disassembled. + * + * THIS SOFTWARE IS PROVIDED BY NORDIC SEMICONDUCTOR ASA "AS IS" AND ANY EXPRESS + * OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES + * OF MERCHANTABILITY, NONINFRINGEMENT, AND FITNESS FOR A PARTICULAR PURPOSE ARE + * DISCLAIMED. IN NO EVENT SHALL NORDIC SEMICONDUCTOR ASA OR CONTRIBUTORS BE + * LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR + * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE + * GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) + * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT + * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT + * OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + */ + +/** + @addtogroup BLE_COMMON + @{ +*/ + +#ifndef BLE_HCI_H__ +#define BLE_HCI_H__ +#ifdef __cplusplus +extern "C" { +#endif + +/** @defgroup BLE_HCI_STATUS_CODES Bluetooth status codes + * @{ */ + +#define BLE_HCI_STATUS_CODE_SUCCESS 0x00 /**< Success. */ +#define BLE_HCI_STATUS_CODE_UNKNOWN_BTLE_COMMAND 0x01 /**< Unknown BLE Command. */ +#define BLE_HCI_STATUS_CODE_UNKNOWN_CONNECTION_IDENTIFIER 0x02 /**< Unknown Connection Identifier. */ +/*0x03 Hardware Failure +0x04 Page Timeout +*/ +#define BLE_HCI_AUTHENTICATION_FAILURE 0x05 /**< Authentication Failure. */ +#define BLE_HCI_STATUS_CODE_PIN_OR_KEY_MISSING 0x06 /**< Pin or Key missing. */ +#define BLE_HCI_MEMORY_CAPACITY_EXCEEDED 0x07 /**< Memory Capacity Exceeded. */ +#define BLE_HCI_CONNECTION_TIMEOUT 0x08 /**< Connection Timeout. */ +/*0x09 Connection Limit Exceeded +0x0A Synchronous Connection Limit To A Device Exceeded +0x0B ACL Connection Already Exists*/ +#define BLE_HCI_STATUS_CODE_COMMAND_DISALLOWED 0x0C /**< Command Disallowed. */ +/*0x0D Connection Rejected due to Limited Resources +0x0E Connection Rejected Due To Security Reasons +0x0F Connection Rejected due to Unacceptable BD_ADDR +0x10 Connection Accept Timeout Exceeded +0x11 Unsupported Feature or Parameter Value*/ +#define BLE_HCI_STATUS_CODE_INVALID_BTLE_COMMAND_PARAMETERS 0x12 /**< Invalid BLE Command Parameters. */ +#define BLE_HCI_REMOTE_USER_TERMINATED_CONNECTION 0x13 /**< Remote User Terminated Connection. */ +#define BLE_HCI_REMOTE_DEV_TERMINATION_DUE_TO_LOW_RESOURCES \ + 0x14 /**< Remote Device Terminated Connection due to low \ + resources.*/ +#define BLE_HCI_REMOTE_DEV_TERMINATION_DUE_TO_POWER_OFF 0x15 /**< Remote Device Terminated Connection due to power off. */ +#define BLE_HCI_LOCAL_HOST_TERMINATED_CONNECTION 0x16 /**< Local Host Terminated Connection. */ +/* +0x17 Repeated Attempts +0x18 Pairing Not Allowed +0x19 Unknown LMP PDU +*/ +#define BLE_HCI_UNSUPPORTED_REMOTE_FEATURE 0x1A /**< Unsupported Remote Feature. */ +/* +0x1B SCO Offset Rejected +0x1C SCO Interval Rejected +0x1D SCO Air Mode Rejected*/ +#define BLE_HCI_STATUS_CODE_INVALID_LMP_PARAMETERS 0x1E /**< Invalid LMP Parameters. */ +#define BLE_HCI_STATUS_CODE_UNSPECIFIED_ERROR 0x1F /**< Unspecified Error. */ +/*0x20 Unsupported LMP Parameter Value +0x21 Role Change Not Allowed +*/ +#define BLE_HCI_STATUS_CODE_LMP_RESPONSE_TIMEOUT 0x22 /**< LMP Response Timeout. */ +#define BLE_HCI_STATUS_CODE_LMP_ERROR_TRANSACTION_COLLISION 0x23 /**< LMP Error Transaction Collision/LL Procedure Collision. */ +#define BLE_HCI_STATUS_CODE_LMP_PDU_NOT_ALLOWED 0x24 /**< LMP PDU Not Allowed. */ +/*0x25 Encryption Mode Not Acceptable +0x26 Link Key Can Not be Changed +0x27 Requested QoS Not Supported +*/ +#define BLE_HCI_INSTANT_PASSED 0x28 /**< Instant Passed. */ +#define BLE_HCI_PAIRING_WITH_UNIT_KEY_UNSUPPORTED 0x29 /**< Pairing with Unit Key Unsupported. */ +#define BLE_HCI_DIFFERENT_TRANSACTION_COLLISION 0x2A /**< Different Transaction Collision. */ +/* +0x2B Reserved +0x2C QoS Unacceptable Parameter +0x2D QoS Rejected +0x2E Channel Classification Not Supported +0x2F Insufficient Security +*/ +#define BLE_HCI_PARAMETER_OUT_OF_MANDATORY_RANGE 0x30 /**< Parameter Out Of Mandatory Range. */ +/* +0x31 Reserved +0x32 Role Switch Pending +0x33 Reserved +0x34 Reserved Slot Violation +0x35 Role Switch Failed +0x36 Extended Inquiry Response Too Large +0x37 Secure Simple Pairing Not Supported By Host. +0x38 Host Busy - Pairing +0x39 Connection Rejected due to No Suitable Channel Found*/ +#define BLE_HCI_CONTROLLER_BUSY 0x3A /**< Controller Busy. */ +#define BLE_HCI_CONN_INTERVAL_UNACCEPTABLE 0x3B /**< Connection Interval Unacceptable. */ +#define BLE_HCI_DIRECTED_ADVERTISER_TIMEOUT 0x3C /**< Directed Advertisement Timeout. */ +#define BLE_HCI_CONN_TERMINATED_DUE_TO_MIC_FAILURE 0x3D /**< Connection Terminated due to MIC Failure. */ +#define BLE_HCI_CONN_FAILED_TO_BE_ESTABLISHED 0x3E /**< Connection Failed to be Established. */ + +/** @} */ + +#ifdef __cplusplus +} +#endif +#endif // BLE_HCI_H__ + +/** @} */ diff --git a/src/platform/nrf52/softdevice/ble_l2cap.h b/src/platform/nrf52/softdevice/ble_l2cap.h new file mode 100644 index 000000000..5f4bd277d --- /dev/null +++ b/src/platform/nrf52/softdevice/ble_l2cap.h @@ -0,0 +1,495 @@ +/* + * Copyright (c) Nordic Semiconductor ASA + * All rights reserved. + * + * Redistribution and use in source and binary forms, with or without modification, + * are permitted provided that the following conditions are met: + * + * 1. Redistributions of source code must retain the above copyright notice, this + * list of conditions and the following disclaimer. + * + * 2. Redistributions in binary form, except as embedded into a Nordic + * Semiconductor ASA integrated circuit in a product or a software update for + * such product, must reproduce the above copyright notice, this list of + * conditions and the following disclaimer in the documentation and/or other + * materials provided with the distribution. + * + * 3. Neither the name of Nordic Semiconductor ASA nor the names of its + * contributors may be used to endorse or promote products derived from this + * software without specific prior written permission. + * + * 4. This software, with or without modification, must only be used with a + * Nordic Semiconductor ASA integrated circuit. + * + * 5. Any software provided in binary form under this license must not be reverse + * engineered, decompiled, modified and/or disassembled. + * + * THIS SOFTWARE IS PROVIDED BY NORDIC SEMICONDUCTOR ASA "AS IS" AND ANY EXPRESS + * OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES + * OF MERCHANTABILITY, NONINFRINGEMENT, AND FITNESS FOR A PARTICULAR PURPOSE ARE + * DISCLAIMED. IN NO EVENT SHALL NORDIC SEMICONDUCTOR ASA OR CONTRIBUTORS BE + * LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR + * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE + * GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) + * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT + * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT + * OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + */ + +/** + @addtogroup BLE_L2CAP Logical Link Control and Adaptation Protocol (L2CAP) + @{ + @brief Definitions and prototypes for the L2CAP interface. + */ + +#ifndef BLE_L2CAP_H__ +#define BLE_L2CAP_H__ + +#include "ble_err.h" +#include "ble_ranges.h" +#include "ble_types.h" +#include "nrf_error.h" +#include "nrf_svc.h" +#include + +#ifdef __cplusplus +extern "C" { +#endif + +/**@addtogroup BLE_L2CAP_TERMINOLOGY Terminology + * @{ + * @details + * + * L2CAP SDU + * - A data unit that the application can send/receive to/from a peer. + * + * L2CAP PDU + * - A data unit that is exchanged between local and remote L2CAP entities. + * It consists of L2CAP protocol control information and payload fields. + * The payload field can contain an L2CAP SDU or a part of an L2CAP SDU. + * + * L2CAP MTU + * - The maximum length of an L2CAP SDU. + * + * L2CAP MPS + * - The maximum length of an L2CAP PDU payload field. + * + * Credits + * - A value indicating the number of L2CAP PDUs that the receiver of the credit can send to the peer. + * @} */ + +/**@addtogroup BLE_L2CAP_ENUMERATIONS Enumerations + * @{ */ + +/**@brief L2CAP API SVC numbers. */ +enum BLE_L2CAP_SVCS { + SD_BLE_L2CAP_CH_SETUP = BLE_L2CAP_SVC_BASE + 0, /**< Set up an L2CAP channel. */ + SD_BLE_L2CAP_CH_RELEASE = BLE_L2CAP_SVC_BASE + 1, /**< Release an L2CAP channel. */ + SD_BLE_L2CAP_CH_RX = BLE_L2CAP_SVC_BASE + 2, /**< Receive an SDU on an L2CAP channel. */ + SD_BLE_L2CAP_CH_TX = BLE_L2CAP_SVC_BASE + 3, /**< Transmit an SDU on an L2CAP channel. */ + SD_BLE_L2CAP_CH_FLOW_CONTROL = BLE_L2CAP_SVC_BASE + 4, /**< Advanced SDU reception flow control. */ +}; + +/**@brief L2CAP Event IDs. */ +enum BLE_L2CAP_EVTS { + BLE_L2CAP_EVT_CH_SETUP_REQUEST = BLE_L2CAP_EVT_BASE + 0, /**< L2CAP Channel Setup Request event. + \n Reply with @ref sd_ble_l2cap_ch_setup. + \n See @ref ble_l2cap_evt_ch_setup_request_t. */ + BLE_L2CAP_EVT_CH_SETUP_REFUSED = BLE_L2CAP_EVT_BASE + 1, /**< L2CAP Channel Setup Refused event. + \n See @ref ble_l2cap_evt_ch_setup_refused_t. */ + BLE_L2CAP_EVT_CH_SETUP = BLE_L2CAP_EVT_BASE + 2, /**< L2CAP Channel Setup Completed event. + \n See @ref ble_l2cap_evt_ch_setup_t. */ + BLE_L2CAP_EVT_CH_RELEASED = BLE_L2CAP_EVT_BASE + 3, /**< L2CAP Channel Released event. + \n No additional event structure applies. */ + BLE_L2CAP_EVT_CH_SDU_BUF_RELEASED = BLE_L2CAP_EVT_BASE + 4, /**< L2CAP Channel SDU data buffer released event. + \n See @ref ble_l2cap_evt_ch_sdu_buf_released_t. */ + BLE_L2CAP_EVT_CH_CREDIT = BLE_L2CAP_EVT_BASE + 5, /**< L2CAP Channel Credit received. + \n See @ref ble_l2cap_evt_ch_credit_t. */ + BLE_L2CAP_EVT_CH_RX = BLE_L2CAP_EVT_BASE + 6, /**< L2CAP Channel SDU received. + \n See @ref ble_l2cap_evt_ch_rx_t. */ + BLE_L2CAP_EVT_CH_TX = BLE_L2CAP_EVT_BASE + 7, /**< L2CAP Channel SDU transmitted. + \n See @ref ble_l2cap_evt_ch_tx_t. */ +}; + +/** @} */ + +/**@addtogroup BLE_L2CAP_DEFINES Defines + * @{ */ + +/**@brief Maximum number of L2CAP channels per connection. */ +#define BLE_L2CAP_CH_COUNT_MAX (64) + +/**@brief Minimum L2CAP MTU, in bytes. */ +#define BLE_L2CAP_MTU_MIN (23) + +/**@brief Minimum L2CAP MPS, in bytes. */ +#define BLE_L2CAP_MPS_MIN (23) + +/**@brief Invalid CID. */ +#define BLE_L2CAP_CID_INVALID (0x0000) + +/**@brief Default number of credits for @ref sd_ble_l2cap_ch_flow_control. */ +#define BLE_L2CAP_CREDITS_DEFAULT (1) + +/**@defgroup BLE_L2CAP_CH_SETUP_REFUSED_SRCS L2CAP channel setup refused sources + * @{ */ +#define BLE_L2CAP_CH_SETUP_REFUSED_SRC_LOCAL (0x01) /**< Local. */ +#define BLE_L2CAP_CH_SETUP_REFUSED_SRC_REMOTE (0x02) /**< Remote. */ + /** @} */ + +/** @defgroup BLE_L2CAP_CH_STATUS_CODES L2CAP channel status codes + * @{ */ +#define BLE_L2CAP_CH_STATUS_CODE_SUCCESS (0x0000) /**< Success. */ +#define BLE_L2CAP_CH_STATUS_CODE_LE_PSM_NOT_SUPPORTED (0x0002) /**< LE_PSM not supported. */ +#define BLE_L2CAP_CH_STATUS_CODE_NO_RESOURCES (0x0004) /**< No resources available. */ +#define BLE_L2CAP_CH_STATUS_CODE_INSUFF_AUTHENTICATION (0x0005) /**< Insufficient authentication. */ +#define BLE_L2CAP_CH_STATUS_CODE_INSUFF_AUTHORIZATION (0x0006) /**< Insufficient authorization. */ +#define BLE_L2CAP_CH_STATUS_CODE_INSUFF_ENC_KEY_SIZE (0x0007) /**< Insufficient encryption key size. */ +#define BLE_L2CAP_CH_STATUS_CODE_INSUFF_ENC (0x0008) /**< Insufficient encryption. */ +#define BLE_L2CAP_CH_STATUS_CODE_INVALID_SCID (0x0009) /**< Invalid Source CID. */ +#define BLE_L2CAP_CH_STATUS_CODE_SCID_ALLOCATED (0x000A) /**< Source CID already allocated. */ +#define BLE_L2CAP_CH_STATUS_CODE_UNACCEPTABLE_PARAMS (0x000B) /**< Unacceptable parameters. */ +#define BLE_L2CAP_CH_STATUS_CODE_NOT_UNDERSTOOD \ + (0x8000) /**< Command Reject received instead of LE Credit Based Connection Response. */ +#define BLE_L2CAP_CH_STATUS_CODE_TIMEOUT (0xC000) /**< Operation timed out. */ +/** @} */ + +/** @} */ + +/**@addtogroup BLE_L2CAP_STRUCTURES Structures + * @{ */ + +/** + * @brief BLE L2CAP connection configuration parameters, set with @ref sd_ble_cfg_set. + * + * @note These parameters are set per connection, so all L2CAP channels created on this connection + * will have the same parameters. + * + * @retval ::NRF_ERROR_INVALID_PARAM One or more of the following is true: + * - rx_mps is smaller than @ref BLE_L2CAP_MPS_MIN. + * - tx_mps is smaller than @ref BLE_L2CAP_MPS_MIN. + * - ch_count is greater than @ref BLE_L2CAP_CH_COUNT_MAX. + * @retval ::NRF_ERROR_NO_MEM rx_mps or tx_mps is set too high. + */ +typedef struct { + uint16_t rx_mps; /**< The maximum L2CAP PDU payload size, in bytes, that L2CAP shall + be able to receive on L2CAP channels on connections with this + configuration. The minimum value is @ref BLE_L2CAP_MPS_MIN. */ + uint16_t tx_mps; /**< The maximum L2CAP PDU payload size, in bytes, that L2CAP shall + be able to transmit on L2CAP channels on connections with this + configuration. The minimum value is @ref BLE_L2CAP_MPS_MIN. */ + uint8_t rx_queue_size; /**< Number of SDU data buffers that can be queued for reception per + L2CAP channel. The minimum value is one. */ + uint8_t tx_queue_size; /**< Number of SDU data buffers that can be queued for transmission + per L2CAP channel. The minimum value is one. */ + uint8_t ch_count; /**< Number of L2CAP channels the application can create per connection + with this configuration. The default value is zero, the maximum + value is @ref BLE_L2CAP_CH_COUNT_MAX. + @note if this parameter is set to zero, all other parameters in + @ref ble_l2cap_conn_cfg_t are ignored. */ +} ble_l2cap_conn_cfg_t; + +/**@brief L2CAP channel RX parameters. */ +typedef struct { + uint16_t rx_mtu; /**< The maximum L2CAP SDU size, in bytes, that L2CAP shall be able to + receive on this L2CAP channel. + - Must be equal to or greater than @ref BLE_L2CAP_MTU_MIN. */ + uint16_t rx_mps; /**< The maximum L2CAP PDU payload size, in bytes, that L2CAP shall be + able to receive on this L2CAP channel. + - Must be equal to or greater than @ref BLE_L2CAP_MPS_MIN. + - Must be equal to or less than @ref ble_l2cap_conn_cfg_t::rx_mps. */ + ble_data_t sdu_buf; /**< SDU data buffer for reception. + - If @ref ble_data_t::p_data is non-NULL, initial credits are + issued to the peer. + - If @ref ble_data_t::p_data is NULL, no initial credits are + issued to the peer. */ +} ble_l2cap_ch_rx_params_t; + +/**@brief L2CAP channel setup parameters. */ +typedef struct { + ble_l2cap_ch_rx_params_t rx_params; /**< L2CAP channel RX parameters. */ + uint16_t le_psm; /**< LE Protocol/Service Multiplexer. Used when requesting + setup of an L2CAP channel, ignored otherwise. */ + uint16_t status; /**< Status code, see @ref BLE_L2CAP_CH_STATUS_CODES. + Used when replying to a setup request of an L2CAP + channel, ignored otherwise. */ +} ble_l2cap_ch_setup_params_t; + +/**@brief L2CAP channel TX parameters. */ +typedef struct { + uint16_t tx_mtu; /**< The maximum L2CAP SDU size, in bytes, that L2CAP is able to + transmit on this L2CAP channel. */ + uint16_t peer_mps; /**< The maximum L2CAP PDU payload size, in bytes, that the peer is + able to receive on this L2CAP channel. */ + uint16_t tx_mps; /**< The maximum L2CAP PDU payload size, in bytes, that L2CAP is able + to transmit on this L2CAP channel. This is effective tx_mps, + selected by the SoftDevice as + MIN( @ref ble_l2cap_ch_tx_params_t::peer_mps, @ref ble_l2cap_conn_cfg_t::tx_mps ) */ + uint16_t credits; /**< Initial credits given by the peer. */ +} ble_l2cap_ch_tx_params_t; + +/**@brief L2CAP Channel Setup Request event. */ +typedef struct { + ble_l2cap_ch_tx_params_t tx_params; /**< L2CAP channel TX parameters. */ + uint16_t le_psm; /**< LE Protocol/Service Multiplexer. */ +} ble_l2cap_evt_ch_setup_request_t; + +/**@brief L2CAP Channel Setup Refused event. */ +typedef struct { + uint8_t source; /**< Source, see @ref BLE_L2CAP_CH_SETUP_REFUSED_SRCS */ + uint16_t status; /**< Status code, see @ref BLE_L2CAP_CH_STATUS_CODES */ +} ble_l2cap_evt_ch_setup_refused_t; + +/**@brief L2CAP Channel Setup Completed event. */ +typedef struct { + ble_l2cap_ch_tx_params_t tx_params; /**< L2CAP channel TX parameters. */ +} ble_l2cap_evt_ch_setup_t; + +/**@brief L2CAP Channel SDU Data Buffer Released event. */ +typedef struct { + ble_data_t sdu_buf; /**< Returned reception or transmission SDU data buffer. The SoftDevice + returns SDU data buffers supplied by the application, which have + not yet been returned previously via a @ref BLE_L2CAP_EVT_CH_RX or + @ref BLE_L2CAP_EVT_CH_TX event. */ +} ble_l2cap_evt_ch_sdu_buf_released_t; + +/**@brief L2CAP Channel Credit received event. */ +typedef struct { + uint16_t credits; /**< Additional credits given by the peer. */ +} ble_l2cap_evt_ch_credit_t; + +/**@brief L2CAP Channel received SDU event. */ +typedef struct { + uint16_t sdu_len; /**< Total SDU length, in bytes. */ + ble_data_t sdu_buf; /**< SDU data buffer. + @note If there is not enough space in the buffer + (sdu_buf.len < sdu_len) then the rest of the SDU will be + silently discarded by the SoftDevice. */ +} ble_l2cap_evt_ch_rx_t; + +/**@brief L2CAP Channel transmitted SDU event. */ +typedef struct { + ble_data_t sdu_buf; /**< SDU data buffer. */ +} ble_l2cap_evt_ch_tx_t; + +/**@brief L2CAP event structure. */ +typedef struct { + uint16_t conn_handle; /**< Connection Handle on which the event occured. */ + uint16_t local_cid; /**< Local Channel ID of the L2CAP channel, or + @ref BLE_L2CAP_CID_INVALID if not present. */ + union { + ble_l2cap_evt_ch_setup_request_t ch_setup_request; /**< L2CAP Channel Setup Request Event Parameters. */ + ble_l2cap_evt_ch_setup_refused_t ch_setup_refused; /**< L2CAP Channel Setup Refused Event Parameters. */ + ble_l2cap_evt_ch_setup_t ch_setup; /**< L2CAP Channel Setup Completed Event Parameters. */ + ble_l2cap_evt_ch_sdu_buf_released_t ch_sdu_buf_released; /**< L2CAP Channel SDU Data Buffer Released Event Parameters. */ + ble_l2cap_evt_ch_credit_t credit; /**< L2CAP Channel Credit Received Event Parameters. */ + ble_l2cap_evt_ch_rx_t rx; /**< L2CAP Channel SDU Received Event Parameters. */ + ble_l2cap_evt_ch_tx_t tx; /**< L2CAP Channel SDU Transmitted Event Parameters. */ + } params; /**< Event Parameters. */ +} ble_l2cap_evt_t; + +/** @} */ + +/**@addtogroup BLE_L2CAP_FUNCTIONS Functions + * @{ */ + +/**@brief Set up an L2CAP channel. + * + * @details This function is used to: + * - Request setup of an L2CAP channel: sends an LE Credit Based Connection Request packet to a peer. + * - Reply to a setup request of an L2CAP channel (if called in response to a + * @ref BLE_L2CAP_EVT_CH_SETUP_REQUEST event): sends an LE Credit Based Connection + * Response packet to a peer. + * + * @note A call to this function will require the application to keep the SDU data buffer alive + * until the SDU data buffer is returned in @ref BLE_L2CAP_EVT_CH_RX or + * @ref BLE_L2CAP_EVT_CH_SDU_BUF_RELEASED event. + * + * @events + * @event{@ref BLE_L2CAP_EVT_CH_SETUP, Setup successful.} + * @event{@ref BLE_L2CAP_EVT_CH_SETUP_REFUSED, Setup failed.} + * @endevents + * + * @mscs + * @mmsc{@ref BLE_L2CAP_CH_SETUP_MSC} + * @endmscs + * + * @param[in] conn_handle Connection Handle. + * @param[in,out] p_local_cid Pointer to a uint16_t containing Local Channel ID of the L2CAP channel: + * - As input: @ref BLE_L2CAP_CID_INVALID when requesting setup of an L2CAP + * channel or local_cid provided in the @ref BLE_L2CAP_EVT_CH_SETUP_REQUEST + * event when replying to a setup request of an L2CAP channel. + * - As output: local_cid for this channel. + * @param[in] p_params L2CAP channel parameters. + * + * @retval ::NRF_SUCCESS Successfully queued request or response for transmission. + * @retval ::NRF_ERROR_BUSY The stack is busy, process pending events and retry. + * @retval ::NRF_ERROR_INVALID_ADDR Invalid pointer supplied. + * @retval ::BLE_ERROR_INVALID_CONN_HANDLE Invalid Connection Handle. + * @retval ::NRF_ERROR_INVALID_PARAM Invalid parameter(s) supplied. + * @retval ::NRF_ERROR_INVALID_LENGTH Supplied higher rx_mps than has been configured on this link. + * @retval ::NRF_ERROR_INVALID_STATE Invalid State to perform operation (L2CAP channel already set up). + * @retval ::NRF_ERROR_NOT_FOUND CID not found. + * @retval ::NRF_ERROR_RESOURCES The limit has been reached for available L2CAP channels, + * see @ref ble_l2cap_conn_cfg_t::ch_count. + */ +SVCALL(SD_BLE_L2CAP_CH_SETUP, uint32_t, + sd_ble_l2cap_ch_setup(uint16_t conn_handle, uint16_t *p_local_cid, ble_l2cap_ch_setup_params_t const *p_params)); + +/**@brief Release an L2CAP channel. + * + * @details This sends a Disconnection Request packet to a peer. + * + * @events + * @event{@ref BLE_L2CAP_EVT_CH_RELEASED, Release complete.} + * @endevents + * + * @mscs + * @mmsc{@ref BLE_L2CAP_CH_RELEASE_MSC} + * @endmscs + * + * @param[in] conn_handle Connection Handle. + * @param[in] local_cid Local Channel ID of the L2CAP channel. + * + * @retval ::NRF_SUCCESS Successfully queued request for transmission. + * @retval ::BLE_ERROR_INVALID_CONN_HANDLE Invalid Connection Handle. + * @retval ::NRF_ERROR_INVALID_STATE Invalid State to perform operation (Setup or release is + * in progress for the L2CAP channel). + * @retval ::NRF_ERROR_NOT_FOUND CID not found. + */ +SVCALL(SD_BLE_L2CAP_CH_RELEASE, uint32_t, sd_ble_l2cap_ch_release(uint16_t conn_handle, uint16_t local_cid)); + +/**@brief Receive an SDU on an L2CAP channel. + * + * @details This may issue additional credits to the peer using an LE Flow Control Credit packet. + * + * @note A call to this function will require the application to keep the memory pointed by + * @ref ble_data_t::p_data alive until the SDU data buffer is returned in @ref BLE_L2CAP_EVT_CH_RX + * or @ref BLE_L2CAP_EVT_CH_SDU_BUF_RELEASED event. + * + * @note The SoftDevice can queue up to @ref ble_l2cap_conn_cfg_t::rx_queue_size SDU data buffers + * for reception per L2CAP channel. + * + * @events + * @event{@ref BLE_L2CAP_EVT_CH_RX, The SDU is received.} + * @endevents + * + * @mscs + * @mmsc{@ref BLE_L2CAP_CH_RX_MSC} + * @endmscs + * + * @param[in] conn_handle Connection Handle. + * @param[in] local_cid Local Channel ID of the L2CAP channel. + * @param[in] p_sdu_buf Pointer to the SDU data buffer. + * + * @retval ::NRF_SUCCESS Buffer accepted. + * @retval ::NRF_ERROR_INVALID_ADDR Invalid pointer supplied. + * @retval ::BLE_ERROR_INVALID_CONN_HANDLE Invalid Connection Handle. + * @retval ::NRF_ERROR_INVALID_STATE Invalid State to perform operation (Setup or release is + * in progress for an L2CAP channel). + * @retval ::NRF_ERROR_NOT_FOUND CID not found. + * @retval ::NRF_ERROR_RESOURCES Too many SDU data buffers supplied. Wait for a + * @ref BLE_L2CAP_EVT_CH_RX event and retry. + */ +SVCALL(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)); + +/**@brief Transmit an SDU on an L2CAP channel. + * + * @note A call to this function will require the application to keep the memory pointed by + * @ref ble_data_t::p_data alive until the SDU data buffer is returned in @ref BLE_L2CAP_EVT_CH_TX + * or @ref BLE_L2CAP_EVT_CH_SDU_BUF_RELEASED event. + * + * @note The SoftDevice can queue up to @ref ble_l2cap_conn_cfg_t::tx_queue_size SDUs for + * transmission per L2CAP channel. + * + * @note The application can keep track of the available credits for transmission by following + * the procedure below: + * - Store initial credits given by the peer in a variable. + * (Initial credits are provided in a @ref BLE_L2CAP_EVT_CH_SETUP event.) + * - Decrement the variable, which stores the currently available credits, by + * ceiling((@ref ble_data_t::len + 2) / tx_mps) when a call to this function returns + * @ref NRF_SUCCESS. (tx_mps is provided in a @ref BLE_L2CAP_EVT_CH_SETUP event.) + * - Increment the variable, which stores the currently available credits, by additional + * credits given by the peer in a @ref BLE_L2CAP_EVT_CH_CREDIT event. + * + * @events + * @event{@ref BLE_L2CAP_EVT_CH_TX, The SDU is transmitted.} + * @endevents + * + * @mscs + * @mmsc{@ref BLE_L2CAP_CH_TX_MSC} + * @endmscs + * + * @param[in] conn_handle Connection Handle. + * @param[in] local_cid Local Channel ID of the L2CAP channel. + * @param[in] p_sdu_buf Pointer to the SDU data buffer. + * + * @retval ::NRF_SUCCESS Successfully queued L2CAP SDU for transmission. + * @retval ::NRF_ERROR_INVALID_ADDR Invalid pointer supplied. + * @retval ::BLE_ERROR_INVALID_CONN_HANDLE Invalid Connection Handle. + * @retval ::NRF_ERROR_INVALID_STATE Invalid State to perform operation (Setup or release is + * in progress for the L2CAP channel). + * @retval ::NRF_ERROR_NOT_FOUND CID not found. + * @retval ::NRF_ERROR_DATA_SIZE Invalid SDU length supplied, must not be more than + * @ref ble_l2cap_ch_tx_params_t::tx_mtu provided in + * @ref BLE_L2CAP_EVT_CH_SETUP event. + * @retval ::NRF_ERROR_RESOURCES Too many SDUs queued for transmission. Wait for a + * @ref BLE_L2CAP_EVT_CH_TX event and retry. + */ +SVCALL(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)); + +/**@brief Advanced SDU reception flow control. + * + * @details Adjust the way the SoftDevice issues credits to the peer. + * This may issue additional credits to the peer using an LE Flow Control Credit packet. + * + * @mscs + * @mmsc{@ref BLE_L2CAP_CH_FLOW_CONTROL_MSC} + * @endmscs + * + * @param[in] conn_handle Connection Handle. + * @param[in] local_cid Local Channel ID of the L2CAP channel or @ref BLE_L2CAP_CID_INVALID to set + * the value that will be used for newly created channels. + * @param[in] credits Number of credits that the SoftDevice will make sure the peer has every + * time it starts using a new reception buffer. + * - @ref BLE_L2CAP_CREDITS_DEFAULT is the default value the SoftDevice will + * use if this function is not called. + * - If set to zero, the SoftDevice will stop issuing credits for new reception + * buffers the application provides or has provided. SDU reception that is + * currently ongoing will be allowed to complete. + * @param[out] p_credits NULL or pointer to a uint16_t. If a valid pointer is provided, it will be + * written by the SoftDevice with the number of credits that is or will be + * available to the peer. If the value written by the SoftDevice is 0 when + * credits parameter was set to 0, the peer will not be able to send more + * data until more credits are provided by calling this function again with + * credits > 0. This parameter is ignored when local_cid is set to + * @ref BLE_L2CAP_CID_INVALID. + * + * @note Application should take care when setting number of credits higher than default value. In + * this case the application must make sure that the SoftDevice always has reception buffers + * available (see @ref sd_ble_l2cap_ch_rx) for that channel. If the SoftDevice does not have + * such buffers available, packets may be NACKed on the Link Layer and all Bluetooth traffic + * on the connection handle may be stalled until the SoftDevice again has an available + * reception buffer. This applies even if the application has used this call to set the + * credits back to default, or zero. + * + * @retval ::NRF_SUCCESS Flow control parameters accepted. + * @retval ::NRF_ERROR_INVALID_ADDR Invalid pointer supplied. + * @retval ::BLE_ERROR_INVALID_CONN_HANDLE Invalid Connection Handle. + * @retval ::NRF_ERROR_INVALID_STATE Invalid State to perform operation (Setup or release is + * in progress for an L2CAP channel). + * @retval ::NRF_ERROR_NOT_FOUND CID not found. + */ +SVCALL(SD_BLE_L2CAP_CH_FLOW_CONTROL, uint32_t, + sd_ble_l2cap_ch_flow_control(uint16_t conn_handle, uint16_t local_cid, uint16_t credits, uint16_t *p_credits)); + +/** @} */ + +#ifdef __cplusplus +} +#endif +#endif // BLE_L2CAP_H__ + +/** + @} +*/ diff --git a/src/platform/nrf52/softdevice/ble_ranges.h b/src/platform/nrf52/softdevice/ble_ranges.h new file mode 100644 index 000000000..2768e4996 --- /dev/null +++ b/src/platform/nrf52/softdevice/ble_ranges.h @@ -0,0 +1,149 @@ +/* + * Copyright (c) Nordic Semiconductor ASA + * All rights reserved. + * + * Redistribution and use in source and binary forms, with or without modification, + * are permitted provided that the following conditions are met: + * + * 1. Redistributions of source code must retain the above copyright notice, this + * list of conditions and the following disclaimer. + * + * 2. Redistributions in binary form, except as embedded into a Nordic + * Semiconductor ASA integrated circuit in a product or a software update for + * such product, must reproduce the above copyright notice, this list of + * conditions and the following disclaimer in the documentation and/or other + * materials provided with the distribution. + * + * 3. Neither the name of Nordic Semiconductor ASA nor the names of its + * contributors may be used to endorse or promote products derived from this + * software without specific prior written permission. + * + * 4. This software, with or without modification, must only be used with a + * Nordic Semiconductor ASA integrated circuit. + * + * 5. Any software provided in binary form under this license must not be reverse + * engineered, decompiled, modified and/or disassembled. + * + * THIS SOFTWARE IS PROVIDED BY NORDIC SEMICONDUCTOR ASA "AS IS" AND ANY EXPRESS + * OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES + * OF MERCHANTABILITY, NONINFRINGEMENT, AND FITNESS FOR A PARTICULAR PURPOSE ARE + * DISCLAIMED. IN NO EVENT SHALL NORDIC SEMICONDUCTOR ASA OR CONTRIBUTORS BE + * LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR + * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE + * GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) + * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT + * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT + * OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + */ + +/** + @addtogroup BLE_COMMON + @{ + @defgroup ble_ranges Module specific SVC, event and option number subranges + @{ + + @brief Definition of SVC, event and option number subranges for each API module. + + @note + SVCs, event and option numbers are split into subranges for each API module. + Each module receives its entire allocated range of SVC calls, whether implemented or not, + but return BLE_ERROR_NOT_SUPPORTED for unimplemented or undefined calls in its range. + + Note that the symbols BLE__SVC_LAST is the end of the allocated SVC range, + rather than the last SVC function call actually defined and implemented. + + Specific SVC, event and option values are defined in each module's ble_.h file, + which defines names of each individual SVC code based on the range start value. +*/ + +#ifndef BLE_RANGES_H__ +#define BLE_RANGES_H__ + +#ifdef __cplusplus +extern "C" { +#endif + +#define BLE_SVC_BASE 0x60 /**< Common BLE SVC base. */ +#define BLE_SVC_LAST 0x6B /**< Common BLE SVC last. */ + +#define BLE_GAP_SVC_BASE 0x6C /**< GAP BLE SVC base. */ +#define BLE_GAP_SVC_LAST 0x9A /**< GAP BLE SVC last. */ + +#define BLE_GATTC_SVC_BASE 0x9B /**< GATTC BLE SVC base. */ +#define BLE_GATTC_SVC_LAST 0xA7 /**< GATTC BLE SVC last. */ + +#define BLE_GATTS_SVC_BASE 0xA8 /**< GATTS BLE SVC base. */ +#define BLE_GATTS_SVC_LAST 0xB7 /**< GATTS BLE SVC last. */ + +#define BLE_L2CAP_SVC_BASE 0xB8 /**< L2CAP BLE SVC base. */ +#define BLE_L2CAP_SVC_LAST 0xBF /**< L2CAP BLE SVC last. */ + +#define BLE_EVT_INVALID 0x00 /**< Invalid BLE Event. */ + +#define BLE_EVT_BASE 0x01 /**< Common BLE Event base. */ +#define BLE_EVT_LAST 0x0F /**< Common BLE Event last. */ + +#define BLE_GAP_EVT_BASE 0x10 /**< GAP BLE Event base. */ +#define BLE_GAP_EVT_LAST 0x2F /**< GAP BLE Event last. */ + +#define BLE_GATTC_EVT_BASE 0x30 /**< GATTC BLE Event base. */ +#define BLE_GATTC_EVT_LAST 0x4F /**< GATTC BLE Event last. */ + +#define BLE_GATTS_EVT_BASE 0x50 /**< GATTS BLE Event base. */ +#define BLE_GATTS_EVT_LAST 0x6F /**< GATTS BLE Event last. */ + +#define BLE_L2CAP_EVT_BASE 0x70 /**< L2CAP BLE Event base. */ +#define BLE_L2CAP_EVT_LAST 0x8F /**< L2CAP BLE Event last. */ + +#define BLE_OPT_INVALID 0x00 /**< Invalid BLE Option. */ + +#define BLE_OPT_BASE 0x01 /**< Common BLE Option base. */ +#define BLE_OPT_LAST 0x1F /**< Common BLE Option last. */ + +#define BLE_GAP_OPT_BASE 0x20 /**< GAP BLE Option base. */ +#define BLE_GAP_OPT_LAST 0x3F /**< GAP BLE Option last. */ + +#define BLE_GATT_OPT_BASE 0x40 /**< GATT BLE Option base. */ +#define BLE_GATT_OPT_LAST 0x5F /**< GATT BLE Option last. */ + +#define BLE_GATTC_OPT_BASE 0x60 /**< GATTC BLE Option base. */ +#define BLE_GATTC_OPT_LAST 0x7F /**< GATTC BLE Option last. */ + +#define BLE_GATTS_OPT_BASE 0x80 /**< GATTS BLE Option base. */ +#define BLE_GATTS_OPT_LAST 0x9F /**< GATTS BLE Option last. */ + +#define BLE_L2CAP_OPT_BASE 0xA0 /**< L2CAP BLE Option base. */ +#define BLE_L2CAP_OPT_LAST 0xBF /**< L2CAP BLE Option last. */ + +#define BLE_CFG_INVALID 0x00 /**< Invalid BLE configuration. */ + +#define BLE_CFG_BASE 0x01 /**< Common BLE configuration base. */ +#define BLE_CFG_LAST 0x1F /**< Common BLE configuration last. */ + +#define BLE_CONN_CFG_BASE 0x20 /**< BLE connection configuration base. */ +#define BLE_CONN_CFG_LAST 0x3F /**< BLE connection configuration last. */ + +#define BLE_GAP_CFG_BASE 0x40 /**< GAP BLE configuration base. */ +#define BLE_GAP_CFG_LAST 0x5F /**< GAP BLE configuration last. */ + +#define BLE_GATT_CFG_BASE 0x60 /**< GATT BLE configuration base. */ +#define BLE_GATT_CFG_LAST 0x7F /**< GATT BLE configuration last. */ + +#define BLE_GATTC_CFG_BASE 0x80 /**< GATTC BLE configuration base. */ +#define BLE_GATTC_CFG_LAST 0x9F /**< GATTC BLE configuration last. */ + +#define BLE_GATTS_CFG_BASE 0xA0 /**< GATTS BLE configuration base. */ +#define BLE_GATTS_CFG_LAST 0xBF /**< GATTS BLE configuration last. */ + +#define BLE_L2CAP_CFG_BASE 0xC0 /**< L2CAP BLE configuration base. */ +#define BLE_L2CAP_CFG_LAST 0xDF /**< L2CAP BLE configuration last. */ + +#ifdef __cplusplus +} +#endif +#endif /* BLE_RANGES_H__ */ + +/** + @} + @} +*/ diff --git a/src/platform/nrf52/softdevice/ble_types.h b/src/platform/nrf52/softdevice/ble_types.h new file mode 100644 index 000000000..db3656cfd --- /dev/null +++ b/src/platform/nrf52/softdevice/ble_types.h @@ -0,0 +1,217 @@ +/* + * Copyright (c) Nordic Semiconductor ASA + * All rights reserved. + * + * Redistribution and use in source and binary forms, with or without modification, + * are permitted provided that the following conditions are met: + * + * 1. Redistributions of source code must retain the above copyright notice, this + * list of conditions and the following disclaimer. + * + * 2. Redistributions in binary form, except as embedded into a Nordic + * Semiconductor ASA integrated circuit in a product or a software update for + * such product, must reproduce the above copyright notice, this list of + * conditions and the following disclaimer in the documentation and/or other + * materials provided with the distribution. + * + * 3. Neither the name of Nordic Semiconductor ASA nor the names of its + * contributors may be used to endorse or promote products derived from this + * software without specific prior written permission. + * + * 4. This software, with or without modification, must only be used with a + * Nordic Semiconductor ASA integrated circuit. + * + * 5. Any software provided in binary form under this license must not be reverse + * engineered, decompiled, modified and/or disassembled. + * + * THIS SOFTWARE IS PROVIDED BY NORDIC SEMICONDUCTOR ASA "AS IS" AND ANY EXPRESS + * OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES + * OF MERCHANTABILITY, NONINFRINGEMENT, AND FITNESS FOR A PARTICULAR PURPOSE ARE + * DISCLAIMED. IN NO EVENT SHALL NORDIC SEMICONDUCTOR ASA OR CONTRIBUTORS BE + * LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR + * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE + * GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) + * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT + * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT + * OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + */ + +/** + @addtogroup BLE_COMMON + @{ + @defgroup ble_types Common types and macro definitions + @{ + + @brief Common types and macro definitions for the BLE SoftDevice. + */ + +#ifndef BLE_TYPES_H__ +#define BLE_TYPES_H__ + +#include + +#ifdef __cplusplus +extern "C" { +#endif + +/** @addtogroup BLE_TYPES_DEFINES Defines + * @{ */ + +/** @defgroup BLE_CONN_HANDLES BLE Connection Handles + * @{ */ +#define BLE_CONN_HANDLE_INVALID 0xFFFF /**< Invalid Connection Handle. */ +#define BLE_CONN_HANDLE_ALL 0xFFFE /**< Applies to all Connection Handles. */ +/** @} */ + +/** @defgroup BLE_UUID_VALUES Assigned Values for BLE UUIDs + * @{ */ +/* Generic UUIDs, applicable to all services */ +#define BLE_UUID_UNKNOWN 0x0000 /**< Reserved UUID. */ +#define BLE_UUID_SERVICE_PRIMARY 0x2800 /**< Primary Service. */ +#define BLE_UUID_SERVICE_SECONDARY 0x2801 /**< Secondary Service. */ +#define BLE_UUID_SERVICE_INCLUDE 0x2802 /**< Include. */ +#define BLE_UUID_CHARACTERISTIC 0x2803 /**< Characteristic. */ +#define BLE_UUID_DESCRIPTOR_CHAR_EXT_PROP 0x2900 /**< Characteristic Extended Properties Descriptor. */ +#define BLE_UUID_DESCRIPTOR_CHAR_USER_DESC 0x2901 /**< Characteristic User Description Descriptor. */ +#define BLE_UUID_DESCRIPTOR_CLIENT_CHAR_CONFIG 0x2902 /**< Client Characteristic Configuration Descriptor. */ +#define BLE_UUID_DESCRIPTOR_SERVER_CHAR_CONFIG 0x2903 /**< Server Characteristic Configuration Descriptor. */ +#define BLE_UUID_DESCRIPTOR_CHAR_PRESENTATION_FORMAT 0x2904 /**< Characteristic Presentation Format Descriptor. */ +#define BLE_UUID_DESCRIPTOR_CHAR_AGGREGATE_FORMAT 0x2905 /**< Characteristic Aggregate Format Descriptor. */ +/* GATT specific UUIDs */ +#define BLE_UUID_GATT 0x1801 /**< Generic Attribute Profile. */ +#define BLE_UUID_GATT_CHARACTERISTIC_SERVICE_CHANGED 0x2A05 /**< Service Changed Characteristic. */ +/* GAP specific UUIDs */ +#define BLE_UUID_GAP 0x1800 /**< Generic Access Profile. */ +#define BLE_UUID_GAP_CHARACTERISTIC_DEVICE_NAME 0x2A00 /**< Device Name Characteristic. */ +#define BLE_UUID_GAP_CHARACTERISTIC_APPEARANCE 0x2A01 /**< Appearance Characteristic. */ +#define BLE_UUID_GAP_CHARACTERISTIC_RECONN_ADDR 0x2A03 /**< Reconnection Address Characteristic. */ +#define BLE_UUID_GAP_CHARACTERISTIC_PPCP 0x2A04 /**< Peripheral Preferred Connection Parameters Characteristic. */ +#define BLE_UUID_GAP_CHARACTERISTIC_CAR 0x2AA6 /**< Central Address Resolution Characteristic. */ +#define BLE_UUID_GAP_CHARACTERISTIC_RPA_ONLY 0x2AC9 /**< Resolvable Private Address Only Characteristic. */ +/** @} */ + +/** @defgroup BLE_UUID_TYPES Types of UUID + * @{ */ +#define BLE_UUID_TYPE_UNKNOWN 0x00 /**< Invalid UUID type. */ +#define BLE_UUID_TYPE_BLE 0x01 /**< Bluetooth SIG UUID (16-bit). */ +#define BLE_UUID_TYPE_VENDOR_BEGIN 0x02 /**< Vendor UUID types start at this index (128-bit). */ +/** @} */ + +/** @defgroup BLE_APPEARANCES Bluetooth Appearance values + * @note Retrieved from + * http://developer.bluetooth.org/gatt/characteristics/Pages/CharacteristicViewer.aspx?u=org.bluetooth.characteristic.gap.appearance.xml + * @{ */ +#define BLE_APPEARANCE_UNKNOWN 0 /**< Unknown. */ +#define BLE_APPEARANCE_GENERIC_PHONE 64 /**< Generic Phone. */ +#define BLE_APPEARANCE_GENERIC_COMPUTER 128 /**< Generic Computer. */ +#define BLE_APPEARANCE_GENERIC_WATCH 192 /**< Generic Watch. */ +#define BLE_APPEARANCE_WATCH_SPORTS_WATCH 193 /**< Watch: Sports Watch. */ +#define BLE_APPEARANCE_GENERIC_CLOCK 256 /**< Generic Clock. */ +#define BLE_APPEARANCE_GENERIC_DISPLAY 320 /**< Generic Display. */ +#define BLE_APPEARANCE_GENERIC_REMOTE_CONTROL 384 /**< Generic Remote Control. */ +#define BLE_APPEARANCE_GENERIC_EYE_GLASSES 448 /**< Generic Eye-glasses. */ +#define BLE_APPEARANCE_GENERIC_TAG 512 /**< Generic Tag. */ +#define BLE_APPEARANCE_GENERIC_KEYRING 576 /**< Generic Keyring. */ +#define BLE_APPEARANCE_GENERIC_MEDIA_PLAYER 640 /**< Generic Media Player. */ +#define BLE_APPEARANCE_GENERIC_BARCODE_SCANNER 704 /**< Generic Barcode Scanner. */ +#define BLE_APPEARANCE_GENERIC_THERMOMETER 768 /**< Generic Thermometer. */ +#define BLE_APPEARANCE_THERMOMETER_EAR 769 /**< Thermometer: Ear. */ +#define BLE_APPEARANCE_GENERIC_HEART_RATE_SENSOR 832 /**< Generic Heart rate Sensor. */ +#define BLE_APPEARANCE_HEART_RATE_SENSOR_HEART_RATE_BELT 833 /**< Heart Rate Sensor: Heart Rate Belt. */ +#define BLE_APPEARANCE_GENERIC_BLOOD_PRESSURE 896 /**< Generic Blood Pressure. */ +#define BLE_APPEARANCE_BLOOD_PRESSURE_ARM 897 /**< Blood Pressure: Arm. */ +#define BLE_APPEARANCE_BLOOD_PRESSURE_WRIST 898 /**< Blood Pressure: Wrist. */ +#define BLE_APPEARANCE_GENERIC_HID 960 /**< Human Interface Device (HID). */ +#define BLE_APPEARANCE_HID_KEYBOARD 961 /**< Keyboard (HID Subtype). */ +#define BLE_APPEARANCE_HID_MOUSE 962 /**< Mouse (HID Subtype). */ +#define BLE_APPEARANCE_HID_JOYSTICK 963 /**< Joystick (HID Subtype). */ +#define BLE_APPEARANCE_HID_GAMEPAD 964 /**< Gamepad (HID Subtype). */ +#define BLE_APPEARANCE_HID_DIGITIZERSUBTYPE 965 /**< Digitizer Tablet (HID Subtype). */ +#define BLE_APPEARANCE_HID_CARD_READER 966 /**< Card Reader (HID Subtype). */ +#define BLE_APPEARANCE_HID_DIGITAL_PEN 967 /**< Digital Pen (HID Subtype). */ +#define BLE_APPEARANCE_HID_BARCODE 968 /**< Barcode Scanner (HID Subtype). */ +#define BLE_APPEARANCE_GENERIC_GLUCOSE_METER 1024 /**< Generic Glucose Meter. */ +#define BLE_APPEARANCE_GENERIC_RUNNING_WALKING_SENSOR 1088 /**< Generic Running Walking Sensor. */ +#define BLE_APPEARANCE_RUNNING_WALKING_SENSOR_IN_SHOE 1089 /**< Running Walking Sensor: In-Shoe. */ +#define BLE_APPEARANCE_RUNNING_WALKING_SENSOR_ON_SHOE 1090 /**< Running Walking Sensor: On-Shoe. */ +#define BLE_APPEARANCE_RUNNING_WALKING_SENSOR_ON_HIP 1091 /**< Running Walking Sensor: On-Hip. */ +#define BLE_APPEARANCE_GENERIC_CYCLING 1152 /**< Generic Cycling. */ +#define BLE_APPEARANCE_CYCLING_CYCLING_COMPUTER 1153 /**< Cycling: Cycling Computer. */ +#define BLE_APPEARANCE_CYCLING_SPEED_SENSOR 1154 /**< Cycling: Speed Sensor. */ +#define BLE_APPEARANCE_CYCLING_CADENCE_SENSOR 1155 /**< Cycling: Cadence Sensor. */ +#define BLE_APPEARANCE_CYCLING_POWER_SENSOR 1156 /**< Cycling: Power Sensor. */ +#define BLE_APPEARANCE_CYCLING_SPEED_CADENCE_SENSOR 1157 /**< Cycling: Speed and Cadence Sensor. */ +#define BLE_APPEARANCE_GENERIC_PULSE_OXIMETER 3136 /**< Generic Pulse Oximeter. */ +#define BLE_APPEARANCE_PULSE_OXIMETER_FINGERTIP 3137 /**< Fingertip (Pulse Oximeter subtype). */ +#define BLE_APPEARANCE_PULSE_OXIMETER_WRIST_WORN 3138 /**< Wrist Worn(Pulse Oximeter subtype). */ +#define BLE_APPEARANCE_GENERIC_WEIGHT_SCALE 3200 /**< Generic Weight Scale. */ +#define BLE_APPEARANCE_GENERIC_OUTDOOR_SPORTS_ACT 5184 /**< Generic Outdoor Sports Activity. */ +#define BLE_APPEARANCE_OUTDOOR_SPORTS_ACT_LOC_DISP 5185 /**< Location Display Device (Outdoor Sports Activity subtype). */ +#define BLE_APPEARANCE_OUTDOOR_SPORTS_ACT_LOC_AND_NAV_DISP \ + 5186 /**< Location and Navigation Display Device (Outdoor Sports Activity subtype). */ +#define BLE_APPEARANCE_OUTDOOR_SPORTS_ACT_LOC_POD 5187 /**< Location Pod (Outdoor Sports Activity subtype). */ +#define BLE_APPEARANCE_OUTDOOR_SPORTS_ACT_LOC_AND_NAV_POD \ + 5188 /**< Location and Navigation Pod (Outdoor Sports Activity subtype). */ +/** @} */ + +/** @brief Set .type and .uuid fields of ble_uuid_struct to specified UUID value. */ +#define BLE_UUID_BLE_ASSIGN(instance, value) \ + do { \ + instance.type = BLE_UUID_TYPE_BLE; \ + instance.uuid = value; \ + } while (0) + +/** @brief Copy type and uuid members from src to dst ble_uuid_t pointer. Both pointers must be valid/non-null. */ +#define BLE_UUID_COPY_PTR(dst, src) \ + do { \ + (dst)->type = (src)->type; \ + (dst)->uuid = (src)->uuid; \ + } while (0) + +/** @brief Copy type and uuid members from src to dst ble_uuid_t struct. */ +#define BLE_UUID_COPY_INST(dst, src) \ + do { \ + (dst).type = (src).type; \ + (dst).uuid = (src).uuid; \ + } while (0) + +/** @brief Compare for equality both type and uuid members of two (valid, non-null) ble_uuid_t pointers. */ +#define BLE_UUID_EQ(p_uuid1, p_uuid2) (((p_uuid1)->type == (p_uuid2)->type) && ((p_uuid1)->uuid == (p_uuid2)->uuid)) + +/** @brief Compare for difference both type and uuid members of two (valid, non-null) ble_uuid_t pointers. */ +#define BLE_UUID_NEQ(p_uuid1, p_uuid2) (((p_uuid1)->type != (p_uuid2)->type) || ((p_uuid1)->uuid != (p_uuid2)->uuid)) + +/** @} */ + +/** @addtogroup BLE_TYPES_STRUCTURES Structures + * @{ */ + +/** @brief 128 bit UUID values. */ +typedef struct { + uint8_t uuid128[16]; /**< Little-Endian UUID bytes. */ +} ble_uuid128_t; + +/** @brief Bluetooth Low Energy UUID type, encapsulates both 16-bit and 128-bit UUIDs. */ +typedef struct { + uint16_t uuid; /**< 16-bit UUID value or octets 12-13 of 128-bit UUID. */ + uint8_t + type; /**< UUID type, see @ref BLE_UUID_TYPES. If type is @ref BLE_UUID_TYPE_UNKNOWN, the value of uuid is undefined. */ +} ble_uuid_t; + +/**@brief Data structure. */ +typedef struct { + uint8_t *p_data; /**< Pointer to the data buffer provided to/from the application. */ + uint16_t len; /**< Length of the data buffer, in bytes. */ +} ble_data_t; + +/** @} */ +#ifdef __cplusplus +} +#endif + +#endif /* BLE_TYPES_H__ */ + +/** + @} + @} +*/ diff --git a/src/platform/nrf52/softdevice/nrf52/nrf_mbr.h b/src/platform/nrf52/softdevice/nrf52/nrf_mbr.h new file mode 100644 index 000000000..4e0bd752a --- /dev/null +++ b/src/platform/nrf52/softdevice/nrf52/nrf_mbr.h @@ -0,0 +1,259 @@ +/* + * Copyright (c) 2014 - 2017, Nordic Semiconductor ASA + * All rights reserved. + * + * Redistribution and use in source and binary forms, with or without modification, + * are permitted provided that the following conditions are met: + * + * 1. Redistributions of source code must retain the above copyright notice, this + * list of conditions and the following disclaimer. + * + * 2. Redistributions in binary form, except as embedded into a Nordic + * Semiconductor ASA integrated circuit in a product or a software update for + * such product, must reproduce the above copyright notice, this list of + * conditions and the following disclaimer in the documentation and/or other + * materials provided with the distribution. + * + * 3. Neither the name of Nordic Semiconductor ASA nor the names of its + * contributors may be used to endorse or promote products derived from this + * software without specific prior written permission. + * + * 4. This software, with or without modification, must only be used with a + * Nordic Semiconductor ASA integrated circuit. + * + * 5. Any software provided in binary form under this license must not be reverse + * engineered, decompiled, modified and/or disassembled. + * + * THIS SOFTWARE IS PROVIDED BY NORDIC SEMICONDUCTOR ASA "AS IS" AND ANY EXPRESS + * OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES + * OF MERCHANTABILITY, NONINFRINGEMENT, AND FITNESS FOR A PARTICULAR PURPOSE ARE + * DISCLAIMED. IN NO EVENT SHALL NORDIC SEMICONDUCTOR ASA OR CONTRIBUTORS BE + * LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR + * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE + * GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) + * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT + * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT + * OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + */ + +/** + @defgroup nrf_mbr_api Master Boot Record API + @{ + + @brief APIs for updating SoftDevice and BootLoader + +*/ + +#ifndef NRF_MBR_H__ +#define NRF_MBR_H__ + +#include "nrf_svc.h" +#include + +#ifdef __cplusplus +extern "C" { +#endif + +/** @addtogroup NRF_MBR_DEFINES Defines + * @{ */ + +/**@brief MBR SVC Base number. */ +#define MBR_SVC_BASE (0x18) + +/**@brief Page size in words. */ +#define MBR_PAGE_SIZE_IN_WORDS (1024) + +/** @brief The size that must be reserved for the MBR when a SoftDevice is written to flash. +This is the offset where the first byte of the SoftDevice hex file is written. */ +#define MBR_SIZE (0x1000) + +/** @brief Location (in the flash memory) of the bootloader address. */ +#define MBR_BOOTLOADER_ADDR (0xFF8) + +/** @brief Location (in UICR) of the bootloader address. */ +#define MBR_UICR_BOOTLOADER_ADDR (&(NRF_UICR->NRFFW[0])) + +/** @brief Location (in the flash memory) of the address of the MBR parameter page. */ +#define MBR_PARAM_PAGE_ADDR (0xFFC) + +/** @brief Location (in UICR) of the address of the MBR parameter page. */ +#define MBR_UICR_PARAM_PAGE_ADDR (&(NRF_UICR->NRFFW[1])) + +/** @} */ + +/** @addtogroup NRF_MBR_ENUMS Enumerations + * @{ */ + +/**@brief nRF Master Boot Record API SVC numbers. */ +enum NRF_MBR_SVCS { + SD_MBR_COMMAND = MBR_SVC_BASE, /**< ::sd_mbr_command */ +}; + +/**@brief Possible values for ::sd_mbr_command_t.command */ +enum NRF_MBR_COMMANDS { + SD_MBR_COMMAND_COPY_BL, /**< Copy a new BootLoader. @see ::sd_mbr_command_copy_bl_t*/ + SD_MBR_COMMAND_COPY_SD, /**< Copy a new SoftDevice. @see ::sd_mbr_command_copy_sd_t*/ + SD_MBR_COMMAND_INIT_SD, /**< Initialize forwarding interrupts to SD, and run reset function in SD. Does not require any + parameters in ::sd_mbr_command_t params.*/ + SD_MBR_COMMAND_COMPARE, /**< This command works like memcmp. @see ::sd_mbr_command_compare_t*/ + SD_MBR_COMMAND_VECTOR_TABLE_BASE_SET, /**< Change the address the MBR starts after a reset. @see + ::sd_mbr_command_vector_table_base_set_t*/ + SD_MBR_COMMAND_RESERVED, + SD_MBR_COMMAND_IRQ_FORWARD_ADDRESS_SET, /**< Start forwarding all interrupts to this address. @see + ::sd_mbr_command_irq_forward_address_set_t*/ +}; + +/** @} */ + +/** @addtogroup NRF_MBR_TYPES Types + * @{ */ + +/**@brief This command copies part of a new SoftDevice + * + * The destination area is erased before copying. + * If dst is in the middle of a flash page, that whole flash page will be erased. + * If (dst+len) is in the middle of a flash page, that whole flash page will be erased. + * + * The user of this function is responsible for setting the BPROT registers. + * + * @retval ::NRF_SUCCESS indicates that the contents of the memory blocks where copied correctly. + * @retval ::NRF_ERROR_INTERNAL indicates that the contents of the memory blocks where not verified correctly after copying. + */ +typedef struct { + uint32_t *src; /**< Pointer to the source of data to be copied.*/ + uint32_t *dst; /**< Pointer to the destination where the content is to be copied.*/ + uint32_t len; /**< Number of 32 bit words to copy. Must be a multiple of @ref MBR_PAGE_SIZE_IN_WORDS words.*/ +} sd_mbr_command_copy_sd_t; + +/**@brief This command works like memcmp, but takes the length in words. + * + * @retval ::NRF_SUCCESS indicates that the contents of both memory blocks are equal. + * @retval ::NRF_ERROR_NULL indicates that the contents of the memory blocks are not equal. + */ +typedef struct { + uint32_t *ptr1; /**< Pointer to block of memory. */ + uint32_t *ptr2; /**< Pointer to block of memory. */ + uint32_t len; /**< Number of 32 bit words to compare.*/ +} sd_mbr_command_compare_t; + +/**@brief This command copies a new BootLoader. + * + * The MBR assumes that either @ref MBR_BOOTLOADER_ADDR or @ref MBR_UICR_BOOTLOADER_ADDR is set to + * the address where the bootloader will be copied. If both addresses are set, the MBR will prioritize + * @ref MBR_BOOTLOADER_ADDR. + * + * The bootloader destination is erased by this function. + * If (destination+bl_len) is in the middle of a flash page, that whole flash page will be erased. + * + * This command requires that @ref MBR_PARAM_PAGE_ADDR or @ref MBR_UICR_PARAM_PAGE_ADDR is set, + * see @ref sd_mbr_command. + * + * This command will use the flash protect peripheral (BPROT or ACL) to protect the flash that is + * not intended to be written. + * + * On success, this function will not return. It will start the new bootloader from reset-vector as normal. + * + * @retval ::NRF_ERROR_INTERNAL indicates an internal error that should not happen. + * @retval ::NRF_ERROR_FORBIDDEN if the bootloader address is not set. + * @retval ::NRF_ERROR_INVALID_LENGTH if parameters attempts to read or write outside flash area. + * @retval ::NRF_ERROR_NO_MEM No MBR parameter page is provided. See @ref sd_mbr_command. + */ +typedef struct { + uint32_t *bl_src; /**< Pointer to the source of the bootloader to be be copied.*/ + uint32_t bl_len; /**< Number of 32 bit words to copy for BootLoader. */ +} sd_mbr_command_copy_bl_t; + +/**@brief Change the address the MBR starts after a reset + * + * Once this function has been called, this address is where the MBR will start to forward + * interrupts to after a reset. + * + * To restore default forwarding, this function should be called with @ref address set to 0. If a + * bootloader is present, interrupts will be forwarded to the bootloader. If not, interrupts will + * be forwarded to the SoftDevice. + * + * The location of a bootloader can be specified in @ref MBR_BOOTLOADER_ADDR or + * @ref MBR_UICR_BOOTLOADER_ADDR. If both addresses are set, the MBR will prioritize + * @ref MBR_BOOTLOADER_ADDR. + * + * This command requires that @ref MBR_PARAM_PAGE_ADDR or @ref MBR_UICR_PARAM_PAGE_ADDR is set, + * see @ref sd_mbr_command. + * + * On success, this function will not return. It will reset the device. + * + * @retval ::NRF_ERROR_INTERNAL indicates an internal error that should not happen. + * @retval ::NRF_ERROR_INVALID_ADDR if parameter address is outside of the flash size. + * @retval ::NRF_ERROR_NO_MEM No MBR parameter page is provided. See @ref sd_mbr_command. + */ +typedef struct { + uint32_t address; /**< The base address of the interrupt vector table for forwarded interrupts.*/ +} sd_mbr_command_vector_table_base_set_t; + +/**@brief Sets the base address of the interrupt vector table for interrupts forwarded from the MBR + * + * Unlike sd_mbr_command_vector_table_base_set_t, this function does not reset, and it does not + * change where the MBR starts after reset. + * + * @retval ::NRF_SUCCESS + */ +typedef struct { + uint32_t address; /**< The base address of the interrupt vector table for forwarded interrupts.*/ +} sd_mbr_command_irq_forward_address_set_t; + +/**@brief Input structure containing data used when calling ::sd_mbr_command + * + * Depending on what command value that is set, the corresponding params value type must also be + * set. See @ref NRF_MBR_COMMANDS for command types and corresponding params value type. If command + * @ref SD_MBR_COMMAND_INIT_SD is set, it is not necessary to set any values under params. + */ +typedef struct { + uint32_t command; /**< Type of command to be issued. See @ref NRF_MBR_COMMANDS. */ + union { + sd_mbr_command_copy_sd_t copy_sd; /**< Parameters for copy SoftDevice.*/ + sd_mbr_command_compare_t compare; /**< Parameters for verify.*/ + sd_mbr_command_copy_bl_t copy_bl; /**< Parameters for copy BootLoader. Requires parameter page. */ + sd_mbr_command_vector_table_base_set_t base_set; /**< Parameters for vector table base set. Requires parameter page.*/ + sd_mbr_command_irq_forward_address_set_t irq_forward_address_set; /**< Parameters for irq forward address set*/ + } params; /**< Command parameters. */ +} sd_mbr_command_t; + +/** @} */ + +/** @addtogroup NRF_MBR_FUNCTIONS Functions + * @{ */ + +/**@brief Issue Master Boot Record commands + * + * Commands used when updating a SoftDevice and bootloader. + * + * The @ref SD_MBR_COMMAND_COPY_BL and @ref SD_MBR_COMMAND_VECTOR_TABLE_BASE_SET requires + * parameters to be retained by the MBR when resetting the IC. This is done in a separate flash + * page. The location of the flash page should be provided by the application in either + * @ref MBR_PARAM_PAGE_ADDR or @ref MBR_UICR_PARAM_PAGE_ADDR. If both addresses are set, the MBR + * will prioritize @ref MBR_PARAM_PAGE_ADDR. This page will be cleared by the MBR and is used to + * store the command before reset. When an address is specified, the page it refers to must not be + * used by the application. If no address is provided by the application, i.e. both + * @ref MBR_PARAM_PAGE_ADDR and @ref MBR_UICR_PARAM_PAGE_ADDR is 0xFFFFFFFF, MBR commands which use + * flash will be unavailable and return @ref NRF_ERROR_NO_MEM. + * + * @param[in] param Pointer to a struct describing the command. + * + * @note For a complete set of return values, see ::sd_mbr_command_copy_sd_t, + * ::sd_mbr_command_copy_bl_t, ::sd_mbr_command_compare_t, + * ::sd_mbr_command_vector_table_base_set_t, ::sd_mbr_command_irq_forward_address_set_t + * + * @retval ::NRF_ERROR_NO_MEM No MBR parameter page provided + * @retval ::NRF_ERROR_INVALID_PARAM if an invalid command is given. + */ +SVCALL(SD_MBR_COMMAND, uint32_t, sd_mbr_command(sd_mbr_command_t *param)); + +/** @} */ + +#ifdef __cplusplus +} +#endif +#endif // NRF_MBR_H__ + +/** + @} +*/ diff --git a/src/platform/nrf52/softdevice/nrf_error.h b/src/platform/nrf52/softdevice/nrf_error.h new file mode 100644 index 000000000..fb2831e19 --- /dev/null +++ b/src/platform/nrf52/softdevice/nrf_error.h @@ -0,0 +1,90 @@ +/* + * Copyright (c) Nordic Semiconductor ASA + * All rights reserved. + * + * Redistribution and use in source and binary forms, with or without modification, + * are permitted provided that the following conditions are met: + * + * 1. Redistributions of source code must retain the above copyright notice, this + * list of conditions and the following disclaimer. + * + * 2. Redistributions in binary form, except as embedded into a Nordic + * Semiconductor ASA integrated circuit in a product or a software update for + * such product, must reproduce the above copyright notice, this list of + * conditions and the following disclaimer in the documentation and/or other + * materials provided with the distribution. + * + * 3. Neither the name of Nordic Semiconductor ASA nor the names of its + * contributors may be used to endorse or promote products derived from this + * software without specific prior written permission. + * + * 4. This software, with or without modification, must only be used with a + * Nordic Semiconductor ASA integrated circuit. + * + * 5. Any software provided in binary form under this license must not be reverse + * engineered, decompiled, modified and/or disassembled. + * + * THIS SOFTWARE IS PROVIDED BY NORDIC SEMICONDUCTOR ASA "AS IS" AND ANY EXPRESS + * OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES + * OF MERCHANTABILITY, NONINFRINGEMENT, AND FITNESS FOR A PARTICULAR PURPOSE ARE + * DISCLAIMED. IN NO EVENT SHALL NORDIC SEMICONDUCTOR ASA OR CONTRIBUTORS BE + * LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR + * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE + * GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) + * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT + * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT + * OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + */ + +/** + @defgroup nrf_error SoftDevice Global Error Codes + @{ + + @brief Global Error definitions +*/ + +/* Header guard */ +#ifndef NRF_ERROR_H__ +#define NRF_ERROR_H__ + +#ifdef __cplusplus +extern "C" { +#endif + +/** @defgroup NRF_ERRORS_BASE Error Codes Base number definitions + * @{ */ +#define NRF_ERROR_BASE_NUM (0x0) ///< Global error base +#define NRF_ERROR_SDM_BASE_NUM (0x1000) ///< SDM error base +#define NRF_ERROR_SOC_BASE_NUM (0x2000) ///< SoC error base +#define NRF_ERROR_STK_BASE_NUM (0x3000) ///< STK error base +/** @} */ + +#define NRF_SUCCESS (NRF_ERROR_BASE_NUM + 0) ///< Successful command +#define NRF_ERROR_SVC_HANDLER_MISSING (NRF_ERROR_BASE_NUM + 1) ///< SVC handler is missing +#define NRF_ERROR_SOFTDEVICE_NOT_ENABLED (NRF_ERROR_BASE_NUM + 2) ///< SoftDevice has not been enabled +#define NRF_ERROR_INTERNAL (NRF_ERROR_BASE_NUM + 3) ///< Internal Error +#define NRF_ERROR_NO_MEM (NRF_ERROR_BASE_NUM + 4) ///< No Memory for operation +#define NRF_ERROR_NOT_FOUND (NRF_ERROR_BASE_NUM + 5) ///< Not found +#define NRF_ERROR_NOT_SUPPORTED (NRF_ERROR_BASE_NUM + 6) ///< Not supported +#define NRF_ERROR_INVALID_PARAM (NRF_ERROR_BASE_NUM + 7) ///< Invalid Parameter +#define NRF_ERROR_INVALID_STATE (NRF_ERROR_BASE_NUM + 8) ///< Invalid state, operation disallowed in this state +#define NRF_ERROR_INVALID_LENGTH (NRF_ERROR_BASE_NUM + 9) ///< Invalid Length +#define NRF_ERROR_INVALID_FLAGS (NRF_ERROR_BASE_NUM + 10) ///< Invalid Flags +#define NRF_ERROR_INVALID_DATA (NRF_ERROR_BASE_NUM + 11) ///< Invalid Data +#define NRF_ERROR_DATA_SIZE (NRF_ERROR_BASE_NUM + 12) ///< Invalid Data size +#define NRF_ERROR_TIMEOUT (NRF_ERROR_BASE_NUM + 13) ///< Operation timed out +#define NRF_ERROR_NULL (NRF_ERROR_BASE_NUM + 14) ///< Null Pointer +#define NRF_ERROR_FORBIDDEN (NRF_ERROR_BASE_NUM + 15) ///< Forbidden Operation +#define NRF_ERROR_INVALID_ADDR (NRF_ERROR_BASE_NUM + 16) ///< Bad Memory Address +#define NRF_ERROR_BUSY (NRF_ERROR_BASE_NUM + 17) ///< Busy +#define NRF_ERROR_CONN_COUNT (NRF_ERROR_BASE_NUM + 18) ///< Maximum connection count exceeded. +#define NRF_ERROR_RESOURCES (NRF_ERROR_BASE_NUM + 19) ///< Not enough resources for operation + +#ifdef __cplusplus +} +#endif +#endif // NRF_ERROR_H__ + +/** + @} +*/ diff --git a/src/platform/nrf52/softdevice/nrf_error_sdm.h b/src/platform/nrf52/softdevice/nrf_error_sdm.h new file mode 100644 index 000000000..2fd621057 --- /dev/null +++ b/src/platform/nrf52/softdevice/nrf_error_sdm.h @@ -0,0 +1,73 @@ +/* + * Copyright (c) Nordic Semiconductor ASA + * All rights reserved. + * + * Redistribution and use in source and binary forms, with or without modification, + * are permitted provided that the following conditions are met: + * + * 1. Redistributions of source code must retain the above copyright notice, this + * list of conditions and the following disclaimer. + * + * 2. Redistributions in binary form, except as embedded into a Nordic + * Semiconductor ASA integrated circuit in a product or a software update for + * such product, must reproduce the above copyright notice, this list of + * conditions and the following disclaimer in the documentation and/or other + * materials provided with the distribution. + * + * 3. Neither the name of Nordic Semiconductor ASA nor the names of its + * contributors may be used to endorse or promote products derived from this + * software without specific prior written permission. + * + * 4. This software, with or without modification, must only be used with a + * Nordic Semiconductor ASA integrated circuit. + * + * 5. Any software provided in binary form under this license must not be reverse + * engineered, decompiled, modified and/or disassembled. + * + * THIS SOFTWARE IS PROVIDED BY NORDIC SEMICONDUCTOR ASA "AS IS" AND ANY EXPRESS + * OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES + * OF MERCHANTABILITY, NONINFRINGEMENT, AND FITNESS FOR A PARTICULAR PURPOSE ARE + * DISCLAIMED. IN NO EVENT SHALL NORDIC SEMICONDUCTOR ASA OR CONTRIBUTORS BE + * LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR + * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE + * GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) + * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT + * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT + * OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + */ + +/** + @addtogroup nrf_sdm_api + @{ + @defgroup nrf_sdm_error SoftDevice Manager Error Codes + @{ + + @brief Error definitions for the SDM API +*/ + +/* Header guard */ +#ifndef NRF_ERROR_SDM_H__ +#define NRF_ERROR_SDM_H__ + +#include "nrf_error.h" + +#ifdef __cplusplus +extern "C" { +#endif + +#define NRF_ERROR_SDM_LFCLK_SOURCE_UNKNOWN (NRF_ERROR_SDM_BASE_NUM + 0) ///< Unknown LFCLK source. +#define NRF_ERROR_SDM_INCORRECT_INTERRUPT_CONFIGURATION \ + (NRF_ERROR_SDM_BASE_NUM + 1) ///< Incorrect interrupt configuration (can be caused by using illegal priority levels, or having + ///< enabled SoftDevice interrupts). +#define NRF_ERROR_SDM_INCORRECT_CLENR0 \ + (NRF_ERROR_SDM_BASE_NUM + 2) ///< Incorrect CLENR0 (can be caused by erroneous SoftDevice flashing). + +#ifdef __cplusplus +} +#endif +#endif // NRF_ERROR_SDM_H__ + +/** + @} + @} +*/ diff --git a/src/platform/nrf52/softdevice/nrf_error_soc.h b/src/platform/nrf52/softdevice/nrf_error_soc.h new file mode 100644 index 000000000..cbd0ba8ac --- /dev/null +++ b/src/platform/nrf52/softdevice/nrf_error_soc.h @@ -0,0 +1,85 @@ +/* + * Copyright (c) Nordic Semiconductor ASA + * All rights reserved. + * + * Redistribution and use in source and binary forms, with or without modification, + * are permitted provided that the following conditions are met: + * + * 1. Redistributions of source code must retain the above copyright notice, this + * list of conditions and the following disclaimer. + * + * 2. Redistributions in binary form, except as embedded into a Nordic + * Semiconductor ASA integrated circuit in a product or a software update for + * such product, must reproduce the above copyright notice, this list of + * conditions and the following disclaimer in the documentation and/or other + * materials provided with the distribution. + * + * 3. Neither the name of Nordic Semiconductor ASA nor the names of its + * contributors may be used to endorse or promote products derived from this + * software without specific prior written permission. + * + * 4. This software, with or without modification, must only be used with a + * Nordic Semiconductor ASA integrated circuit. + * + * 5. Any software provided in binary form under this license must not be reverse + * engineered, decompiled, modified and/or disassembled. + * + * THIS SOFTWARE IS PROVIDED BY NORDIC SEMICONDUCTOR ASA "AS IS" AND ANY EXPRESS + * OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES + * OF MERCHANTABILITY, NONINFRINGEMENT, AND FITNESS FOR A PARTICULAR PURPOSE ARE + * DISCLAIMED. IN NO EVENT SHALL NORDIC SEMICONDUCTOR ASA OR CONTRIBUTORS BE + * LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR + * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE + * GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) + * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT + * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT + * OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + */ + +/** + @addtogroup nrf_soc_api + @{ + @defgroup nrf_soc_error SoC Library Error Codes + @{ + + @brief Error definitions for the SoC library + +*/ + +/* Header guard */ +#ifndef NRF_ERROR_SOC_H__ +#define NRF_ERROR_SOC_H__ + +#include "nrf_error.h" +#ifdef __cplusplus +extern "C" { +#endif + +/* Mutex Errors */ +#define NRF_ERROR_SOC_MUTEX_ALREADY_TAKEN (NRF_ERROR_SOC_BASE_NUM + 0) ///< Mutex already taken + +/* NVIC errors */ +#define NRF_ERROR_SOC_NVIC_INTERRUPT_NOT_AVAILABLE (NRF_ERROR_SOC_BASE_NUM + 1) ///< NVIC interrupt not available +#define NRF_ERROR_SOC_NVIC_INTERRUPT_PRIORITY_NOT_ALLOWED (NRF_ERROR_SOC_BASE_NUM + 2) ///< NVIC interrupt priority not allowed +#define NRF_ERROR_SOC_NVIC_SHOULD_NOT_RETURN (NRF_ERROR_SOC_BASE_NUM + 3) ///< NVIC should not return + +/* Power errors */ +#define NRF_ERROR_SOC_POWER_MODE_UNKNOWN (NRF_ERROR_SOC_BASE_NUM + 4) ///< Power mode unknown +#define NRF_ERROR_SOC_POWER_POF_THRESHOLD_UNKNOWN (NRF_ERROR_SOC_BASE_NUM + 5) ///< Power POF threshold unknown +#define NRF_ERROR_SOC_POWER_OFF_SHOULD_NOT_RETURN (NRF_ERROR_SOC_BASE_NUM + 6) ///< Power off should not return + +/* Rand errors */ +#define NRF_ERROR_SOC_RAND_NOT_ENOUGH_VALUES (NRF_ERROR_SOC_BASE_NUM + 7) ///< RAND not enough values + +/* PPI errors */ +#define NRF_ERROR_SOC_PPI_INVALID_CHANNEL (NRF_ERROR_SOC_BASE_NUM + 8) ///< Invalid PPI Channel +#define NRF_ERROR_SOC_PPI_INVALID_GROUP (NRF_ERROR_SOC_BASE_NUM + 9) ///< Invalid PPI Group + +#ifdef __cplusplus +} +#endif +#endif // NRF_ERROR_SOC_H__ +/** + @} + @} +*/ diff --git a/src/platform/nrf52/softdevice/nrf_nvic.h b/src/platform/nrf52/softdevice/nrf_nvic.h new file mode 100644 index 000000000..d4ab204d9 --- /dev/null +++ b/src/platform/nrf52/softdevice/nrf_nvic.h @@ -0,0 +1,449 @@ +/* + * Copyright (c) Nordic Semiconductor ASA + * All rights reserved. + * + * Redistribution and use in source and binary forms, with or without modification, + * are permitted provided that the following conditions are met: + * + * 1. Redistributions of source code must retain the above copyright notice, this + * list of conditions and the following disclaimer. + * + * 2. Redistributions in binary form, except as embedded into a Nordic + * Semiconductor ASA integrated circuit in a product or a software update for + * such product, must reproduce the above copyright notice, this list of + * conditions and the following disclaimer in the documentation and/or other + * materials provided with the distribution. + * + * 3. Neither the name of Nordic Semiconductor ASA nor the names of its + * contributors may be used to endorse or promote products derived from this + * software without specific prior written permission. + * + * 4. This software, with or without modification, must only be used with a + * Nordic Semiconductor ASA integrated circuit. + * + * 5. Any software provided in binary form under this license must not be reverse + * engineered, decompiled, modified and/or disassembled. + * + * THIS SOFTWARE IS PROVIDED BY NORDIC SEMICONDUCTOR ASA "AS IS" AND ANY EXPRESS + * OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES + * OF MERCHANTABILITY, NONINFRINGEMENT, AND FITNESS FOR A PARTICULAR PURPOSE ARE + * DISCLAIMED. IN NO EVENT SHALL NORDIC SEMICONDUCTOR ASA OR CONTRIBUTORS BE + * LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR + * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE + * GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) + * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT + * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT + * OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + */ + +/** + * @defgroup nrf_nvic_api SoftDevice NVIC API + * @{ + * + * @note In order to use this module, the following code has to be added to a .c file: + * \code + * nrf_nvic_state_t nrf_nvic_state = {0}; + * \endcode + * + * @note Definitions and declarations starting with __ (double underscore) in this header file are + * not intended for direct use by the application. + * + * @brief APIs for the accessing NVIC when using a SoftDevice. + * + */ + +#ifndef NRF_NVIC_H__ +#define NRF_NVIC_H__ + +#include "nrf.h" +#include "nrf_error.h" +#include "nrf_error_soc.h" +#include "nrf_svc.h" +#include + +#ifdef __cplusplus +extern "C" { +#endif + +/**@addtogroup NRF_NVIC_DEFINES Defines + * @{ */ + +/**@defgroup NRF_NVIC_ISER_DEFINES SoftDevice NVIC internal definitions + * @{ */ + +#define __NRF_NVIC_NVMC_IRQn \ + (30) /**< The peripheral ID of the NVMC. IRQ numbers are used to identify peripherals, but the NVMC doesn't have an IRQ \ + number in the MDK. */ + +#define __NRF_NVIC_ISER_COUNT (2) /**< The number of ISER/ICER registers in the NVIC that are used. */ + +/**@brief Interrupt priority levels used by the SoftDevice. */ +#define __NRF_NVIC_SD_IRQ_PRIOS \ + ((uint8_t)((1U << 0) /**< Priority level high .*/ \ + | (1U << 1) /**< Priority level medium. */ \ + | (1U << 4) /**< Priority level low. */ \ + )) + +/**@brief Interrupt priority levels available to the application. */ +#define __NRF_NVIC_APP_IRQ_PRIOS ((uint8_t)~__NRF_NVIC_SD_IRQ_PRIOS) + +/**@brief Interrupts used by the SoftDevice, with IRQn in the range 0-31. */ +#define __NRF_NVIC_SD_IRQS_0 \ + ((uint32_t)((1U << POWER_CLOCK_IRQn) | (1U << RADIO_IRQn) | (1U << RTC0_IRQn) | (1U << TIMER0_IRQn) | (1U << RNG_IRQn) | \ + (1U << ECB_IRQn) | (1U << CCM_AAR_IRQn) | (1U << TEMP_IRQn) | (1U << __NRF_NVIC_NVMC_IRQn) | \ + (1U << (uint32_t)SWI5_IRQn))) + +/**@brief Interrupts used by the SoftDevice, with IRQn in the range 32-63. */ +#define __NRF_NVIC_SD_IRQS_1 ((uint32_t)0) + +/**@brief Interrupts available for to application, with IRQn in the range 0-31. */ +#define __NRF_NVIC_APP_IRQS_0 (~__NRF_NVIC_SD_IRQS_0) + +/**@brief Interrupts available for to application, with IRQn in the range 32-63. */ +#define __NRF_NVIC_APP_IRQS_1 (~__NRF_NVIC_SD_IRQS_1) + +/**@} */ + +/**@} */ + +/**@addtogroup NRF_NVIC_VARIABLES Variables + * @{ */ + +/**@brief Type representing the state struct for the SoftDevice NVIC module. */ +typedef struct { + uint32_t volatile __irq_masks[__NRF_NVIC_ISER_COUNT]; /**< IRQs enabled by the application in the NVIC. */ + uint32_t volatile __cr_flag; /**< Non-zero if already in a critical region */ +} nrf_nvic_state_t; + +/**@brief Variable keeping the state for the SoftDevice NVIC module. This must be declared in an + * application source file. */ +extern nrf_nvic_state_t nrf_nvic_state; + +/**@} */ + +/**@addtogroup NRF_NVIC_INTERNAL_FUNCTIONS SoftDevice NVIC internal functions + * @{ */ + +/**@brief Disables IRQ interrupts globally, including the SoftDevice's interrupts. + * + * @retval The value of PRIMASK prior to disabling the interrupts. + */ +__STATIC_INLINE int __sd_nvic_irq_disable(void); + +/**@brief Enables IRQ interrupts globally, including the SoftDevice's interrupts. + */ +__STATIC_INLINE void __sd_nvic_irq_enable(void); + +/**@brief Checks if IRQn is available to application + * @param[in] IRQn IRQ to check + * + * @retval 1 (true) if the IRQ to check is available to the application + */ +__STATIC_INLINE uint32_t __sd_nvic_app_accessible_irq(IRQn_Type IRQn); + +/**@brief Checks if priority is available to application + * @param[in] priority priority to check + * + * @retval 1 (true) if the priority to check is available to the application + */ +__STATIC_INLINE uint32_t __sd_nvic_is_app_accessible_priority(uint32_t priority); + +/**@} */ + +/**@addtogroup NRF_NVIC_FUNCTIONS SoftDevice NVIC public functions + * @{ */ + +/**@brief Enable External Interrupt. + * @note Corresponds to NVIC_EnableIRQ in CMSIS. + * + * @pre IRQn is valid and not reserved by the stack. + * + * @param[in] IRQn See the NVIC_EnableIRQ documentation in CMSIS. + * + * @retval ::NRF_SUCCESS The interrupt was enabled. + * @retval ::NRF_ERROR_SOC_NVIC_INTERRUPT_NOT_AVAILABLE The interrupt is not available for the application. + * @retval ::NRF_ERROR_SOC_NVIC_INTERRUPT_PRIORITY_NOT_ALLOWED The interrupt has a priority not available for the application. + */ +__STATIC_INLINE uint32_t sd_nvic_EnableIRQ(IRQn_Type IRQn); + +/**@brief Disable External Interrupt. + * @note Corresponds to NVIC_DisableIRQ in CMSIS. + * + * @pre IRQn is valid and not reserved by the stack. + * + * @param[in] IRQn See the NVIC_DisableIRQ documentation in CMSIS. + * + * @retval ::NRF_SUCCESS The interrupt was disabled. + * @retval ::NRF_ERROR_SOC_NVIC_INTERRUPT_NOT_AVAILABLE The interrupt is not available for the application. + */ +__STATIC_INLINE uint32_t sd_nvic_DisableIRQ(IRQn_Type IRQn); + +/**@brief Get Pending Interrupt. + * @note Corresponds to NVIC_GetPendingIRQ in CMSIS. + * + * @pre IRQn is valid and not reserved by the stack. + * + * @param[in] IRQn See the NVIC_GetPendingIRQ documentation in CMSIS. + * @param[out] p_pending_irq Return value from NVIC_GetPendingIRQ. + * + * @retval ::NRF_SUCCESS The interrupt is available for the application. + * @retval ::NRF_ERROR_SOC_NVIC_INTERRUPT_NOT_AVAILABLE IRQn is not available for the application. + */ +__STATIC_INLINE uint32_t sd_nvic_GetPendingIRQ(IRQn_Type IRQn, uint32_t *p_pending_irq); + +/**@brief Set Pending Interrupt. + * @note Corresponds to NVIC_SetPendingIRQ in CMSIS. + * + * @pre IRQn is valid and not reserved by the stack. + * + * @param[in] IRQn See the NVIC_SetPendingIRQ documentation in CMSIS. + * + * @retval ::NRF_SUCCESS The interrupt is set pending. + * @retval ::NRF_ERROR_SOC_NVIC_INTERRUPT_NOT_AVAILABLE IRQn is not available for the application. + */ +__STATIC_INLINE uint32_t sd_nvic_SetPendingIRQ(IRQn_Type IRQn); + +/**@brief Clear Pending Interrupt. + * @note Corresponds to NVIC_ClearPendingIRQ in CMSIS. + * + * @pre IRQn is valid and not reserved by the stack. + * + * @param[in] IRQn See the NVIC_ClearPendingIRQ documentation in CMSIS. + * + * @retval ::NRF_SUCCESS The interrupt pending flag is cleared. + * @retval ::NRF_ERROR_SOC_NVIC_INTERRUPT_NOT_AVAILABLE IRQn is not available for the application. + */ +__STATIC_INLINE uint32_t sd_nvic_ClearPendingIRQ(IRQn_Type IRQn); + +/**@brief Set Interrupt Priority. + * @note Corresponds to NVIC_SetPriority in CMSIS. + * + * @pre IRQn is valid and not reserved by the stack. + * @pre Priority is valid and not reserved by the stack. + * + * @param[in] IRQn See the NVIC_SetPriority documentation in CMSIS. + * @param[in] priority A valid IRQ priority for use by the application. + * + * @retval ::NRF_SUCCESS The interrupt and priority level is available for the application. + * @retval ::NRF_ERROR_SOC_NVIC_INTERRUPT_NOT_AVAILABLE IRQn is not available for the application. + * @retval ::NRF_ERROR_SOC_NVIC_INTERRUPT_PRIORITY_NOT_ALLOWED The interrupt priority is not available for the application. + */ +__STATIC_INLINE uint32_t sd_nvic_SetPriority(IRQn_Type IRQn, uint32_t priority); + +/**@brief Get Interrupt Priority. + * @note Corresponds to NVIC_GetPriority in CMSIS. + * + * @pre IRQn is valid and not reserved by the stack. + * + * @param[in] IRQn See the NVIC_GetPriority documentation in CMSIS. + * @param[out] p_priority Return value from NVIC_GetPriority. + * + * @retval ::NRF_SUCCESS The interrupt priority is returned in p_priority. + * @retval ::NRF_ERROR_SOC_NVIC_INTERRUPT_NOT_AVAILABLE - IRQn is not available for the application. + */ +__STATIC_INLINE uint32_t sd_nvic_GetPriority(IRQn_Type IRQn, uint32_t *p_priority); + +/**@brief System Reset. + * @note Corresponds to NVIC_SystemReset in CMSIS. + * + * @retval ::NRF_ERROR_SOC_NVIC_SHOULD_NOT_RETURN + */ +__STATIC_INLINE uint32_t sd_nvic_SystemReset(void); + +/**@brief Enter critical region. + * + * @post Application interrupts will be disabled. + * @note sd_nvic_critical_region_enter() and ::sd_nvic_critical_region_exit() must be called in matching pairs inside each + * execution context + * @sa sd_nvic_critical_region_exit + * + * @param[out] p_is_nested_critical_region If 1, the application is now in a nested critical region. + * + * @retval ::NRF_SUCCESS + */ +__STATIC_INLINE uint32_t sd_nvic_critical_region_enter(uint8_t *p_is_nested_critical_region); + +/**@brief Exit critical region. + * + * @pre Application has entered a critical region using ::sd_nvic_critical_region_enter. + * @post If not in a nested critical region, the application interrupts will restored to the state before + * ::sd_nvic_critical_region_enter was called. + * + * @param[in] is_nested_critical_region If this is set to 1, the critical region won't be exited. @sa + * sd_nvic_critical_region_enter. + * + * @retval ::NRF_SUCCESS + */ +__STATIC_INLINE uint32_t sd_nvic_critical_region_exit(uint8_t is_nested_critical_region); + +/**@} */ + +#ifndef SUPPRESS_INLINE_IMPLEMENTATION + +__STATIC_INLINE int __sd_nvic_irq_disable(void) +{ + int pm = __get_PRIMASK(); + __disable_irq(); + return pm; +} + +__STATIC_INLINE void __sd_nvic_irq_enable(void) +{ + __enable_irq(); +} + +__STATIC_INLINE uint32_t __sd_nvic_app_accessible_irq(IRQn_Type IRQn) +{ + if (IRQn < 32) { + return ((1UL << IRQn) & __NRF_NVIC_APP_IRQS_0) != 0; + } else if (IRQn < 64) { + return ((1UL << (IRQn - 32)) & __NRF_NVIC_APP_IRQS_1) != 0; + } else { + return 1; + } +} + +__STATIC_INLINE uint32_t __sd_nvic_is_app_accessible_priority(uint32_t priority) +{ + if ((priority >= (1 << __NVIC_PRIO_BITS)) || (((1 << priority) & __NRF_NVIC_APP_IRQ_PRIOS) == 0)) { + return 0; + } + return 1; +} + +__STATIC_INLINE uint32_t sd_nvic_EnableIRQ(IRQn_Type IRQn) +{ + if (!__sd_nvic_app_accessible_irq(IRQn)) { + return NRF_ERROR_SOC_NVIC_INTERRUPT_NOT_AVAILABLE; + } + if (!__sd_nvic_is_app_accessible_priority(NVIC_GetPriority(IRQn))) { + return NRF_ERROR_SOC_NVIC_INTERRUPT_PRIORITY_NOT_ALLOWED; + } + + if (nrf_nvic_state.__cr_flag) { + nrf_nvic_state.__irq_masks[(uint32_t)((int32_t)IRQn) >> 5] |= + (uint32_t)(1 << ((uint32_t)((int32_t)IRQn) & (uint32_t)0x1F)); + } else { + NVIC_EnableIRQ(IRQn); + } + return NRF_SUCCESS; +} + +__STATIC_INLINE uint32_t sd_nvic_DisableIRQ(IRQn_Type IRQn) +{ + if (!__sd_nvic_app_accessible_irq(IRQn)) { + return NRF_ERROR_SOC_NVIC_INTERRUPT_NOT_AVAILABLE; + } + + if (nrf_nvic_state.__cr_flag) { + nrf_nvic_state.__irq_masks[(uint32_t)((int32_t)IRQn) >> 5] &= ~(1UL << ((uint32_t)(IRQn)&0x1F)); + } else { + NVIC_DisableIRQ(IRQn); + } + + return NRF_SUCCESS; +} + +__STATIC_INLINE uint32_t sd_nvic_GetPendingIRQ(IRQn_Type IRQn, uint32_t *p_pending_irq) +{ + if (__sd_nvic_app_accessible_irq(IRQn)) { + *p_pending_irq = NVIC_GetPendingIRQ(IRQn); + return NRF_SUCCESS; + } else { + return NRF_ERROR_SOC_NVIC_INTERRUPT_NOT_AVAILABLE; + } +} + +__STATIC_INLINE uint32_t sd_nvic_SetPendingIRQ(IRQn_Type IRQn) +{ + if (__sd_nvic_app_accessible_irq(IRQn)) { + NVIC_SetPendingIRQ(IRQn); + return NRF_SUCCESS; + } else { + return NRF_ERROR_SOC_NVIC_INTERRUPT_NOT_AVAILABLE; + } +} + +__STATIC_INLINE uint32_t sd_nvic_ClearPendingIRQ(IRQn_Type IRQn) +{ + if (__sd_nvic_app_accessible_irq(IRQn)) { + NVIC_ClearPendingIRQ(IRQn); + return NRF_SUCCESS; + } else { + return NRF_ERROR_SOC_NVIC_INTERRUPT_NOT_AVAILABLE; + } +} + +__STATIC_INLINE uint32_t sd_nvic_SetPriority(IRQn_Type IRQn, uint32_t priority) +{ + if (!__sd_nvic_app_accessible_irq(IRQn)) { + return NRF_ERROR_SOC_NVIC_INTERRUPT_NOT_AVAILABLE; + } + + if (!__sd_nvic_is_app_accessible_priority(priority)) { + return NRF_ERROR_SOC_NVIC_INTERRUPT_PRIORITY_NOT_ALLOWED; + } + + NVIC_SetPriority(IRQn, (uint32_t)priority); + return NRF_SUCCESS; +} + +__STATIC_INLINE uint32_t sd_nvic_GetPriority(IRQn_Type IRQn, uint32_t *p_priority) +{ + if (__sd_nvic_app_accessible_irq(IRQn)) { + *p_priority = (NVIC_GetPriority(IRQn) & 0xFF); + return NRF_SUCCESS; + } else { + return NRF_ERROR_SOC_NVIC_INTERRUPT_NOT_AVAILABLE; + } +} + +__STATIC_INLINE uint32_t sd_nvic_SystemReset(void) +{ + NVIC_SystemReset(); + return NRF_ERROR_SOC_NVIC_SHOULD_NOT_RETURN; +} + +__STATIC_INLINE uint32_t sd_nvic_critical_region_enter(uint8_t *p_is_nested_critical_region) +{ + int was_masked = __sd_nvic_irq_disable(); + if (!nrf_nvic_state.__cr_flag) { + nrf_nvic_state.__cr_flag = 1; + nrf_nvic_state.__irq_masks[0] = (NVIC->ICER[0] & __NRF_NVIC_APP_IRQS_0); + NVIC->ICER[0] = __NRF_NVIC_APP_IRQS_0; + nrf_nvic_state.__irq_masks[1] = (NVIC->ICER[1] & __NRF_NVIC_APP_IRQS_1); + NVIC->ICER[1] = __NRF_NVIC_APP_IRQS_1; + *p_is_nested_critical_region = 0; + } else { + *p_is_nested_critical_region = 1; + } + if (!was_masked) { + __sd_nvic_irq_enable(); + } + return NRF_SUCCESS; +} + +__STATIC_INLINE uint32_t sd_nvic_critical_region_exit(uint8_t is_nested_critical_region) +{ + if (nrf_nvic_state.__cr_flag && (is_nested_critical_region == 0)) { + int was_masked = __sd_nvic_irq_disable(); + NVIC->ISER[0] = nrf_nvic_state.__irq_masks[0]; + NVIC->ISER[1] = nrf_nvic_state.__irq_masks[1]; + nrf_nvic_state.__cr_flag = 0; + if (!was_masked) { + __sd_nvic_irq_enable(); + } + } + + return NRF_SUCCESS; +} + +#endif /* SUPPRESS_INLINE_IMPLEMENTATION */ + +#ifdef __cplusplus +} +#endif + +#endif // NRF_NVIC_H__ + +/**@} */ diff --git a/src/platform/nrf52/softdevice/nrf_sdm.h b/src/platform/nrf52/softdevice/nrf_sdm.h new file mode 100644 index 000000000..02bf135b4 --- /dev/null +++ b/src/platform/nrf52/softdevice/nrf_sdm.h @@ -0,0 +1,380 @@ +/* + * Copyright (c) Nordic Semiconductor ASA + * All rights reserved. + * + * Redistribution and use in source and binary forms, with or without modification, + * are permitted provided that the following conditions are met: + * + * 1. Redistributions of source code must retain the above copyright notice, this + * list of conditions and the following disclaimer. + * + * 2. Redistributions in binary form, except as embedded into a Nordic + * Semiconductor ASA integrated circuit in a product or a software update for + * such product, must reproduce the above copyright notice, this list of + * conditions and the following disclaimer in the documentation and/or other + * materials provided with the distribution. + * + * 3. Neither the name of Nordic Semiconductor ASA nor the names of its + * contributors may be used to endorse or promote products derived from this + * software without specific prior written permission. + * + * 4. This software, with or without modification, must only be used with a + * Nordic Semiconductor ASA integrated circuit. + * + * 5. Any software provided in binary form under this license must not be reverse + * engineered, decompiled, modified and/or disassembled. + * + * THIS SOFTWARE IS PROVIDED BY NORDIC SEMICONDUCTOR ASA "AS IS" AND ANY EXPRESS + * OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES + * OF MERCHANTABILITY, NONINFRINGEMENT, AND FITNESS FOR A PARTICULAR PURPOSE ARE + * DISCLAIMED. IN NO EVENT SHALL NORDIC SEMICONDUCTOR ASA OR CONTRIBUTORS BE + * LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR + * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE + * GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) + * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT + * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT + * OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + */ + +/** + @defgroup nrf_sdm_api SoftDevice Manager API + @{ + + @brief APIs for SoftDevice management. + +*/ + +#ifndef NRF_SDM_H__ +#define NRF_SDM_H__ + +#include "nrf.h" +#include "nrf_error.h" +#include "nrf_error_sdm.h" +#include "nrf_soc.h" +#include "nrf_svc.h" +#include + +#ifdef __cplusplus +extern "C" { +#endif + +/** @addtogroup NRF_SDM_DEFINES Defines + * @{ */ +#ifdef NRFSOC_DOXYGEN +/// Declared in nrf_mbr.h +#define MBR_SIZE 0 +#warning test +#endif + +/** @brief The major version for the SoftDevice binary distributed with this header file. */ +#define SD_MAJOR_VERSION (7) + +/** @brief The minor version for the SoftDevice binary distributed with this header file. */ +#define SD_MINOR_VERSION (3) + +/** @brief The bugfix version for the SoftDevice binary distributed with this header file. */ +#define SD_BUGFIX_VERSION (0) + +/** @brief The SoftDevice variant of this firmware. */ +#define SD_VARIANT_ID 140 + +/** @brief The full version number for the SoftDevice binary this header file was distributed + * with, as a decimal number in the form Mmmmbbb, where: + * - M is major version (one or more digits) + * - mmm is minor version (three digits) + * - bbb is bugfix version (three digits). */ +#define SD_VERSION (SD_MAJOR_VERSION * 1000000 + SD_MINOR_VERSION * 1000 + SD_BUGFIX_VERSION) + +/** @brief SoftDevice Manager SVC Base number. */ +#define SDM_SVC_BASE 0x10 + +/** @brief SoftDevice unique string size in bytes. */ +#define SD_UNIQUE_STR_SIZE 20 + +/** @brief Invalid info field. Returned when an info field does not exist. */ +#define SDM_INFO_FIELD_INVALID (0) + +/** @brief Defines the SoftDevice Information Structure location (address) as an offset from +the start of the SoftDevice (without MBR)*/ +#define SOFTDEVICE_INFO_STRUCT_OFFSET (0x2000) + +/** @brief Defines the absolute SoftDevice Information Structure location (address) when the + * SoftDevice is installed just above the MBR (the usual case). */ +#define SOFTDEVICE_INFO_STRUCT_ADDRESS (SOFTDEVICE_INFO_STRUCT_OFFSET + MBR_SIZE) + +/** @brief Defines the offset for the SoftDevice Information Structure size value relative to the + * SoftDevice base address. The size value is of type uint8_t. */ +#define SD_INFO_STRUCT_SIZE_OFFSET (SOFTDEVICE_INFO_STRUCT_OFFSET) + +/** @brief Defines the offset for the SoftDevice size value relative to the SoftDevice base address. + * The size value is of type uint32_t. */ +#define SD_SIZE_OFFSET (SOFTDEVICE_INFO_STRUCT_OFFSET + 0x08) + +/** @brief Defines the offset for FWID value relative to the SoftDevice base address. The FWID value + * is of type uint16_t. */ +#define SD_FWID_OFFSET (SOFTDEVICE_INFO_STRUCT_OFFSET + 0x0C) + +/** @brief Defines the offset for the SoftDevice ID relative to the SoftDevice base address. The ID + * is of type uint32_t. */ +#define SD_ID_OFFSET (SOFTDEVICE_INFO_STRUCT_OFFSET + 0x10) + +/** @brief Defines the offset for the SoftDevice version relative to the SoftDevice base address in + * the same format as @ref SD_VERSION, stored as an uint32_t. */ +#define SD_VERSION_OFFSET (SOFTDEVICE_INFO_STRUCT_OFFSET + 0x14) + +/** @brief Defines the offset for the SoftDevice unique string relative to the SoftDevice base address. + * The SD_UNIQUE_STR is stored as an array of uint8_t. The size of array is @ref SD_UNIQUE_STR_SIZE. + */ +#define SD_UNIQUE_STR_OFFSET (SOFTDEVICE_INFO_STRUCT_OFFSET + 0x18) + +/** @brief Defines a macro for retrieving the actual SoftDevice Information Structure size value + * from a given base address. Use @ref MBR_SIZE as the argument when the SoftDevice is + * installed just above the MBR (the usual case). */ +#define SD_INFO_STRUCT_SIZE_GET(baseaddr) (*((uint8_t *)((baseaddr) + SD_INFO_STRUCT_SIZE_OFFSET))) + +/** @brief Defines a macro for retrieving the actual SoftDevice size value from a given base + * address. Use @ref MBR_SIZE as the argument when the SoftDevice is installed just above + * the MBR (the usual case). */ +#define SD_SIZE_GET(baseaddr) (*((uint32_t *)((baseaddr) + SD_SIZE_OFFSET))) + +/** @brief Defines the amount of flash that is used by the SoftDevice. + * Add @ref MBR_SIZE to find the first available flash address when the SoftDevice is installed + * just above the MBR (the usual case). + */ +#define SD_FLASH_SIZE 0x27000 + +/** @brief Defines a macro for retrieving the actual FWID value from a given base address. Use + * @ref MBR_SIZE as the argument when the SoftDevice is installed just above the MBR (the usual + * case). */ +#define SD_FWID_GET(baseaddr) (*((uint16_t *)((baseaddr) + SD_FWID_OFFSET))) + +/** @brief Defines a macro for retrieving the actual SoftDevice ID from a given base address. Use + * @ref MBR_SIZE as the argument when the SoftDevice is installed just above the MBR (the + * usual case). */ +#define SD_ID_GET(baseaddr) \ + ((SD_INFO_STRUCT_SIZE_GET(baseaddr) > (SD_ID_OFFSET - SOFTDEVICE_INFO_STRUCT_OFFSET)) \ + ? (*((uint32_t *)((baseaddr) + SD_ID_OFFSET))) \ + : SDM_INFO_FIELD_INVALID) + +/** @brief Defines a macro for retrieving the actual SoftDevice version from a given base address. + * Use @ref MBR_SIZE as the argument when the SoftDevice is installed just above the MBR + * (the usual case). */ +#define SD_VERSION_GET(baseaddr) \ + ((SD_INFO_STRUCT_SIZE_GET(baseaddr) > (SD_VERSION_OFFSET - SOFTDEVICE_INFO_STRUCT_OFFSET)) \ + ? (*((uint32_t *)((baseaddr) + SD_VERSION_OFFSET))) \ + : SDM_INFO_FIELD_INVALID) + +/** @brief Defines a macro for retrieving the address of SoftDevice unique str based on a given base address. + * Use @ref MBR_SIZE as the argument when the SoftDevice is installed just above the MBR + * (the usual case). */ +#define SD_UNIQUE_STR_ADDR_GET(baseaddr) \ + ((SD_INFO_STRUCT_SIZE_GET(baseaddr) > (SD_UNIQUE_STR_OFFSET - SOFTDEVICE_INFO_STRUCT_OFFSET)) \ + ? (((uint8_t *)((baseaddr) + SD_UNIQUE_STR_OFFSET))) \ + : SDM_INFO_FIELD_INVALID) + +/**@defgroup NRF_FAULT_ID_RANGES Fault ID ranges + * @{ */ +#define NRF_FAULT_ID_SD_RANGE_START 0x00000000 /**< SoftDevice ID range start. */ +#define NRF_FAULT_ID_APP_RANGE_START 0x00001000 /**< Application ID range start. */ +/**@} */ + +/**@defgroup NRF_FAULT_IDS Fault ID types + * @{ */ +#define NRF_FAULT_ID_SD_ASSERT \ + (NRF_FAULT_ID_SD_RANGE_START + 1) /**< SoftDevice assertion. The info parameter is reserved for future used. */ +#define NRF_FAULT_ID_APP_MEMACC \ + (NRF_FAULT_ID_APP_RANGE_START + 1) /**< Application invalid memory access. The info parameter will contain 0x00000000, \ + in case of SoftDevice RAM access violation. In case of SoftDevice peripheral \ + register violation the info parameter will contain the sub-region number of \ + PREGION[0], on whose address range the disallowed write access caused the \ + memory access fault. */ +/**@} */ + +/** @} */ + +/** @addtogroup NRF_SDM_ENUMS Enumerations + * @{ */ + +/**@brief nRF SoftDevice Manager API SVC numbers. */ +enum NRF_SD_SVCS { + SD_SOFTDEVICE_ENABLE = SDM_SVC_BASE, /**< ::sd_softdevice_enable */ + SD_SOFTDEVICE_DISABLE, /**< ::sd_softdevice_disable */ + SD_SOFTDEVICE_IS_ENABLED, /**< ::sd_softdevice_is_enabled */ + SD_SOFTDEVICE_VECTOR_TABLE_BASE_SET, /**< ::sd_softdevice_vector_table_base_set */ + SVC_SDM_LAST /**< Placeholder for last SDM SVC */ +}; + +/** @} */ + +/** @addtogroup NRF_SDM_DEFINES Defines + * @{ */ + +/**@defgroup NRF_CLOCK_LF_ACCURACY Clock accuracy + * @{ */ + +#define NRF_CLOCK_LF_ACCURACY_250_PPM (0) /**< Default: 250 ppm */ +#define NRF_CLOCK_LF_ACCURACY_500_PPM (1) /**< 500 ppm */ +#define NRF_CLOCK_LF_ACCURACY_150_PPM (2) /**< 150 ppm */ +#define NRF_CLOCK_LF_ACCURACY_100_PPM (3) /**< 100 ppm */ +#define NRF_CLOCK_LF_ACCURACY_75_PPM (4) /**< 75 ppm */ +#define NRF_CLOCK_LF_ACCURACY_50_PPM (5) /**< 50 ppm */ +#define NRF_CLOCK_LF_ACCURACY_30_PPM (6) /**< 30 ppm */ +#define NRF_CLOCK_LF_ACCURACY_20_PPM (7) /**< 20 ppm */ +#define NRF_CLOCK_LF_ACCURACY_10_PPM (8) /**< 10 ppm */ +#define NRF_CLOCK_LF_ACCURACY_5_PPM (9) /**< 5 ppm */ +#define NRF_CLOCK_LF_ACCURACY_2_PPM (10) /**< 2 ppm */ +#define NRF_CLOCK_LF_ACCURACY_1_PPM (11) /**< 1 ppm */ + +/** @} */ + +/**@defgroup NRF_CLOCK_LF_SRC Possible LFCLK oscillator sources + * @{ */ + +#define NRF_CLOCK_LF_SRC_RC (0) /**< LFCLK RC oscillator. */ +#define NRF_CLOCK_LF_SRC_XTAL (1) /**< LFCLK crystal oscillator. */ +#define NRF_CLOCK_LF_SRC_SYNTH (2) /**< LFCLK Synthesized from HFCLK. */ + +/** @} */ + +/** @} */ + +/** @addtogroup NRF_SDM_TYPES Types + * @{ */ + +/**@brief Type representing LFCLK oscillator source. */ +typedef struct { + uint8_t source; /**< LF oscillator clock source, see @ref NRF_CLOCK_LF_SRC. */ + uint8_t rc_ctiv; /**< Only for ::NRF_CLOCK_LF_SRC_RC: Calibration timer interval in 1/4 second + units (nRF52: 1-32). + @note To avoid excessive clock drift, 0.5 degrees Celsius is the + maximum temperature change allowed in one calibration timer + interval. The interval should be selected to ensure this. + + @note Must be 0 if source is not ::NRF_CLOCK_LF_SRC_RC. */ + uint8_t rc_temp_ctiv; /**< Only for ::NRF_CLOCK_LF_SRC_RC: How often (in number of calibration + intervals) the RC oscillator shall be calibrated if the temperature + hasn't changed. + 0: Always calibrate even if the temperature hasn't changed. + 1: Only calibrate if the temperature has changed (legacy - nRF51 only). + 2-33: Check the temperature and only calibrate if it has changed, + however calibration will take place every rc_temp_ctiv + intervals in any case. + + @note Must be 0 if source is not ::NRF_CLOCK_LF_SRC_RC. + + @note For nRF52, the application must ensure calibration at least once + every 8 seconds to ensure +/-500 ppm clock stability. The + recommended configuration for ::NRF_CLOCK_LF_SRC_RC on nRF52 is + rc_ctiv=16 and rc_temp_ctiv=2. This will ensure calibration at + least once every 8 seconds and for temperature changes of 0.5 + degrees Celsius every 4 seconds. See the Product Specification + for the nRF52 device being used for more information.*/ + uint8_t accuracy; /**< External clock accuracy used in the LL to compute timing + windows, see @ref NRF_CLOCK_LF_ACCURACY.*/ +} nrf_clock_lf_cfg_t; + +/**@brief Fault Handler type. + * + * When certain unrecoverable errors occur within the application or SoftDevice the fault handler will be called back. + * The protocol stack will be in an undefined state when this happens and the only way to recover will be to + * perform a reset, using e.g. CMSIS NVIC_SystemReset(). + * If the application returns from the fault handler the SoftDevice will call NVIC_SystemReset(). + * + * @note It is recommended to either perform a reset in the fault handler or to let the SoftDevice reset the device. + * Otherwise SoC peripherals may behave in an undefined way. For example, the RADIO peripherial may + * continously transmit packets. + * + * @note This callback is executed in HardFault context, thus SVC functions cannot be called from the fault callback. + * + * @param[in] id Fault identifier. See @ref NRF_FAULT_IDS. + * @param[in] pc The program counter of the instruction that triggered the fault. + * @param[in] info Optional additional information regarding the fault. Refer to each Fault identifier for details. + * + * @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 + * when the fault is detected by the CPU. The CPU program counter may have advanced up to 2 instructions (no branching) after the + * one that triggered the fault. + */ +typedef void (*nrf_fault_handler_t)(uint32_t id, uint32_t pc, uint32_t info); + +/** @} */ + +/** @addtogroup NRF_SDM_FUNCTIONS Functions + * @{ */ + +/**@brief Enables the SoftDevice and by extension the protocol stack. + * + * @note Some care must be taken if a low frequency clock source is already running when calling this function: + * If the LF clock has a different source then the one currently running, it will be stopped. Then, the new + * clock source will be started. + * + * @note This function has no effect when returning with an error. + * + * @post If return code is ::NRF_SUCCESS + * - SoC library and protocol stack APIs are made available. + * - A portion of RAM will be unavailable (see relevant SDS documentation). + * - Some peripherals will be unavailable or available only through the SoC API (see relevant SDS documentation). + * - Interrupts will not arrive from protected peripherals or interrupts. + * - nrf_nvic_ functions must be used instead of CMSIS NVIC_ functions for reliable usage of the SoftDevice. + * - Interrupt latency may be affected by the SoftDevice (see relevant SDS documentation). + * - Chosen low frequency clock source will be running. + * + * @param p_clock_lf_cfg Low frequency clock source and accuracy. + If NULL the clock will be configured as an RC source with rc_ctiv = 16 and .rc_temp_ctiv = 2 + In the case of XTAL source, the PPM accuracy of the chosen clock source must be greater than or equal to + the actual characteristics of your XTAL clock. + * @param fault_handler Callback to be invoked in case of fault, cannot be NULL. + * + * @retval ::NRF_SUCCESS + * @retval ::NRF_ERROR_INVALID_ADDR Invalid or NULL pointer supplied. + * @retval ::NRF_ERROR_INVALID_STATE SoftDevice is already enabled, and the clock source and fault handler cannot be updated. + * @retval ::NRF_ERROR_SDM_INCORRECT_INTERRUPT_CONFIGURATION SoftDevice interrupt is already enabled, or an enabled interrupt has + an illegal priority level. + * @retval ::NRF_ERROR_SDM_LFCLK_SOURCE_UNKNOWN Unknown low frequency clock source selected. + * @retval ::NRF_ERROR_INVALID_PARAM Invalid clock source configuration supplied in p_clock_lf_cfg. + */ +SVCALL(SD_SOFTDEVICE_ENABLE, uint32_t, + sd_softdevice_enable(nrf_clock_lf_cfg_t const *p_clock_lf_cfg, nrf_fault_handler_t fault_handler)); + +/**@brief Disables the SoftDevice and by extension the protocol stack. + * + * Idempotent function to disable the SoftDevice. + * + * @post SoC library and protocol stack APIs are made unavailable. + * @post All interrupts that was protected by the SoftDevice will be disabled and initialized to priority 0 (highest). + * @post All peripherals used by the SoftDevice will be reset to default values. + * @post All of RAM become available. + * @post All interrupts are forwarded to the application. + * @post LFCLK source chosen in ::sd_softdevice_enable will be left running. + * + * @retval ::NRF_SUCCESS + */ +SVCALL(SD_SOFTDEVICE_DISABLE, uint32_t, sd_softdevice_disable(void)); + +/**@brief Check if the SoftDevice is enabled. + * + * @param[out] p_softdevice_enabled If the SoftDevice is enabled: 1 else 0. + * + * @retval ::NRF_SUCCESS + */ +SVCALL(SD_SOFTDEVICE_IS_ENABLED, uint32_t, sd_softdevice_is_enabled(uint8_t *p_softdevice_enabled)); + +/**@brief Sets the base address of the interrupt vector table for interrupts forwarded from the SoftDevice + * + * This function is only intended to be called when a bootloader is enabled. + * + * @param[in] address The base address of the interrupt vector table for forwarded interrupts. + + * @retval ::NRF_SUCCESS + */ +SVCALL(SD_SOFTDEVICE_VECTOR_TABLE_BASE_SET, uint32_t, sd_softdevice_vector_table_base_set(uint32_t address)); + +/** @} */ + +#ifdef __cplusplus +} +#endif +#endif // NRF_SDM_H__ + +/** + @} +*/ \ No newline at end of file diff --git a/src/platform/nrf52/softdevice/nrf_soc.h b/src/platform/nrf52/softdevice/nrf_soc.h new file mode 100644 index 000000000..c649ca836 --- /dev/null +++ b/src/platform/nrf52/softdevice/nrf_soc.h @@ -0,0 +1,1046 @@ +/* + * Copyright (c) Nordic Semiconductor ASA + * All rights reserved. + * + * Redistribution and use in source and binary forms, with or without modification, + * are permitted provided that the following conditions are met: + * + * 1. Redistributions of source code must retain the above copyright notice, this + * list of conditions and the following disclaimer. + * + * 2. Redistributions in binary form, except as embedded into a Nordic + * Semiconductor ASA integrated circuit in a product or a software update for + * such product, must reproduce the above copyright notice, this list of + * conditions and the following disclaimer in the documentation and/or other + * materials provided with the distribution. + * + * 3. Neither the name of Nordic Semiconductor ASA nor the names of its + * contributors may be used to endorse or promote products derived from this + * software without specific prior written permission. + * + * 4. This software, with or without modification, must only be used with a + * Nordic Semiconductor ASA integrated circuit. + * + * 5. Any software provided in binary form under this license must not be reverse + * engineered, decompiled, modified and/or disassembled. + * + * THIS SOFTWARE IS PROVIDED BY NORDIC SEMICONDUCTOR ASA "AS IS" AND ANY EXPRESS + * OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES + * OF MERCHANTABILITY, NONINFRINGEMENT, AND FITNESS FOR A PARTICULAR PURPOSE ARE + * DISCLAIMED. IN NO EVENT SHALL NORDIC SEMICONDUCTOR ASA OR CONTRIBUTORS BE + * LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR + * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE + * GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) + * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT + * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT + * OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + */ + +/** + * @defgroup nrf_soc_api SoC Library API + * @{ + * + * @brief APIs for the SoC library. + * + */ + +#ifndef NRF_SOC_H__ +#define NRF_SOC_H__ + +#include "nrf.h" +#include "nrf_error.h" +#include "nrf_error_soc.h" +#include "nrf_svc.h" +#include + +#ifdef __cplusplus +extern "C" { +#endif + +/**@addtogroup NRF_SOC_DEFINES Defines + * @{ */ + +/**@brief The number of the lowest SVC number reserved for the SoC library. */ +#define SOC_SVC_BASE (0x20) /**< Base value for SVCs that are available when the SoftDevice is disabled. */ +#define SOC_SVC_BASE_NOT_AVAILABLE (0x2C) /**< Base value for SVCs that are not available when the SoftDevice is disabled. */ + +/**@brief Guaranteed time for application to process radio inactive notification. */ +#define NRF_RADIO_NOTIFICATION_INACTIVE_GUARANTEED_TIME_US (62) + +/**@brief The minimum allowed timeslot extension time. */ +#define NRF_RADIO_MINIMUM_TIMESLOT_LENGTH_EXTENSION_TIME_US (200) + +/**@brief The maximum processing time to handle a timeslot extension. */ +#define NRF_RADIO_MAX_EXTENSION_PROCESSING_TIME_US (20) + +/**@brief The latest time before the end of a timeslot the timeslot can be extended. */ +#define NRF_RADIO_MIN_EXTENSION_MARGIN_US (82) + +#define SOC_ECB_KEY_LENGTH (16) /**< ECB key length. */ +#define SOC_ECB_CLEARTEXT_LENGTH (16) /**< ECB cleartext length. */ +#define SOC_ECB_CIPHERTEXT_LENGTH (SOC_ECB_CLEARTEXT_LENGTH) /**< ECB ciphertext length. */ + +#define SD_EVT_IRQn (SWI2_IRQn) /**< SoftDevice Event IRQ number. Used for both protocol events and SoC events. */ +#define SD_EVT_IRQHandler \ + (SWI2_IRQHandler) /**< SoftDevice Event IRQ handler. Used for both protocol events and SoC events. \ + The default interrupt priority for this handler is set to 6 */ +#define RADIO_NOTIFICATION_IRQn (SWI1_IRQn) /**< The radio notification IRQ number. */ +#define RADIO_NOTIFICATION_IRQHandler \ + (SWI1_IRQHandler) /**< The radio notification IRQ handler. \ + The default interrupt priority for this handler is set to 6 */ +#define NRF_RADIO_LENGTH_MIN_US (100) /**< The shortest allowed radio timeslot, in microseconds. */ +#define NRF_RADIO_LENGTH_MAX_US (100000) /**< The longest allowed radio timeslot, in microseconds. */ + +#define NRF_RADIO_DISTANCE_MAX_US \ + (128000000UL - 1UL) /**< The longest timeslot distance, in microseconds, allowed for the distance parameter (see @ref \ + nrf_radio_request_normal_t) in the request. */ + +#define NRF_RADIO_EARLIEST_TIMEOUT_MAX_US \ + (128000000UL - 1UL) /**< The longest timeout, in microseconds, allowed when requesting the earliest possible timeslot. */ + +#define NRF_RADIO_START_JITTER_US \ + (2) /**< The maximum jitter in @ref NRF_RADIO_CALLBACK_SIGNAL_TYPE_START relative to the requested start time. */ + +/**@brief Mask of PPI channels reserved by the SoftDevice when the SoftDevice is disabled. */ +#define NRF_SOC_SD_PPI_CHANNELS_SD_DISABLED_MSK ((uint32_t)(0)) + +/**@brief Mask of PPI channels reserved by the SoftDevice when the SoftDevice is enabled. */ +#define NRF_SOC_SD_PPI_CHANNELS_SD_ENABLED_MSK \ + ((uint32_t)((1U << 17) | (1U << 18) | (1U << 19) | (1U << 20) | (1U << 21) | (1U << 22) | (1U << 23) | (1U << 24) | \ + (1U << 25) | (1U << 26) | (1U << 27) | (1U << 28) | (1U << 29) | (1U << 30) | (1U << 31))) + +/**@brief Mask of PPI groups reserved by the SoftDevice when the SoftDevice is disabled. */ +#define NRF_SOC_SD_PPI_GROUPS_SD_DISABLED_MSK ((uint32_t)(0)) + +/**@brief Mask of PPI groups reserved by the SoftDevice when the SoftDevice is enabled. */ +#define NRF_SOC_SD_PPI_GROUPS_SD_ENABLED_MSK ((uint32_t)((1U << 4) | (1U << 5))) + +/**@} */ + +/**@addtogroup NRF_SOC_ENUMS Enumerations + * @{ */ + +/**@brief The SVC numbers used by the SVC functions in the SoC library. */ +enum NRF_SOC_SVCS { + SD_PPI_CHANNEL_ENABLE_GET = SOC_SVC_BASE, + SD_PPI_CHANNEL_ENABLE_SET = SOC_SVC_BASE + 1, + SD_PPI_CHANNEL_ENABLE_CLR = SOC_SVC_BASE + 2, + SD_PPI_CHANNEL_ASSIGN = SOC_SVC_BASE + 3, + SD_PPI_GROUP_TASK_ENABLE = SOC_SVC_BASE + 4, + SD_PPI_GROUP_TASK_DISABLE = SOC_SVC_BASE + 5, + SD_PPI_GROUP_ASSIGN = SOC_SVC_BASE + 6, + SD_PPI_GROUP_GET = SOC_SVC_BASE + 7, + SD_FLASH_PAGE_ERASE = SOC_SVC_BASE + 8, + SD_FLASH_WRITE = SOC_SVC_BASE + 9, + SD_PROTECTED_REGISTER_WRITE = SOC_SVC_BASE + 11, + SD_MUTEX_NEW = SOC_SVC_BASE_NOT_AVAILABLE, + SD_MUTEX_ACQUIRE = SOC_SVC_BASE_NOT_AVAILABLE + 1, + SD_MUTEX_RELEASE = SOC_SVC_BASE_NOT_AVAILABLE + 2, + SD_RAND_APPLICATION_POOL_CAPACITY_GET = SOC_SVC_BASE_NOT_AVAILABLE + 3, + SD_RAND_APPLICATION_BYTES_AVAILABLE_GET = SOC_SVC_BASE_NOT_AVAILABLE + 4, + SD_RAND_APPLICATION_VECTOR_GET = SOC_SVC_BASE_NOT_AVAILABLE + 5, + SD_POWER_MODE_SET = SOC_SVC_BASE_NOT_AVAILABLE + 6, + SD_POWER_SYSTEM_OFF = SOC_SVC_BASE_NOT_AVAILABLE + 7, + SD_POWER_RESET_REASON_GET = SOC_SVC_BASE_NOT_AVAILABLE + 8, + SD_POWER_RESET_REASON_CLR = SOC_SVC_BASE_NOT_AVAILABLE + 9, + SD_POWER_POF_ENABLE = SOC_SVC_BASE_NOT_AVAILABLE + 10, + SD_POWER_POF_THRESHOLD_SET = SOC_SVC_BASE_NOT_AVAILABLE + 11, + SD_POWER_POF_THRESHOLDVDDH_SET = SOC_SVC_BASE_NOT_AVAILABLE + 12, + SD_POWER_RAM_POWER_SET = SOC_SVC_BASE_NOT_AVAILABLE + 13, + SD_POWER_RAM_POWER_CLR = SOC_SVC_BASE_NOT_AVAILABLE + 14, + SD_POWER_RAM_POWER_GET = SOC_SVC_BASE_NOT_AVAILABLE + 15, + SD_POWER_GPREGRET_SET = SOC_SVC_BASE_NOT_AVAILABLE + 16, + SD_POWER_GPREGRET_CLR = SOC_SVC_BASE_NOT_AVAILABLE + 17, + SD_POWER_GPREGRET_GET = SOC_SVC_BASE_NOT_AVAILABLE + 18, + SD_POWER_DCDC_MODE_SET = SOC_SVC_BASE_NOT_AVAILABLE + 19, + SD_POWER_DCDC0_MODE_SET = SOC_SVC_BASE_NOT_AVAILABLE + 20, + SD_APP_EVT_WAIT = SOC_SVC_BASE_NOT_AVAILABLE + 21, + SD_CLOCK_HFCLK_REQUEST = SOC_SVC_BASE_NOT_AVAILABLE + 22, + SD_CLOCK_HFCLK_RELEASE = SOC_SVC_BASE_NOT_AVAILABLE + 23, + SD_CLOCK_HFCLK_IS_RUNNING = SOC_SVC_BASE_NOT_AVAILABLE + 24, + SD_RADIO_NOTIFICATION_CFG_SET = SOC_SVC_BASE_NOT_AVAILABLE + 25, + SD_ECB_BLOCK_ENCRYPT = SOC_SVC_BASE_NOT_AVAILABLE + 26, + SD_ECB_BLOCKS_ENCRYPT = SOC_SVC_BASE_NOT_AVAILABLE + 27, + SD_RADIO_SESSION_OPEN = SOC_SVC_BASE_NOT_AVAILABLE + 28, + SD_RADIO_SESSION_CLOSE = SOC_SVC_BASE_NOT_AVAILABLE + 29, + SD_RADIO_REQUEST = SOC_SVC_BASE_NOT_AVAILABLE + 30, + SD_EVT_GET = SOC_SVC_BASE_NOT_AVAILABLE + 31, + SD_TEMP_GET = SOC_SVC_BASE_NOT_AVAILABLE + 32, + SD_POWER_USBPWRRDY_ENABLE = SOC_SVC_BASE_NOT_AVAILABLE + 33, + SD_POWER_USBDETECTED_ENABLE = SOC_SVC_BASE_NOT_AVAILABLE + 34, + SD_POWER_USBREMOVED_ENABLE = SOC_SVC_BASE_NOT_AVAILABLE + 35, + SD_POWER_USBREGSTATUS_GET = SOC_SVC_BASE_NOT_AVAILABLE + 36, + SVC_SOC_LAST = SOC_SVC_BASE_NOT_AVAILABLE + 37 +}; + +/**@brief Possible values of a ::nrf_mutex_t. */ +enum NRF_MUTEX_VALUES { NRF_MUTEX_FREE, NRF_MUTEX_TAKEN }; + +/**@brief Power modes. */ +enum NRF_POWER_MODES { + NRF_POWER_MODE_CONSTLAT, /**< Constant latency mode. See power management in the reference manual. */ + NRF_POWER_MODE_LOWPWR /**< Low power mode. See power management in the reference manual. */ +}; + +/**@brief Power failure thresholds */ +enum NRF_POWER_THRESHOLDS { + NRF_POWER_THRESHOLD_V17 = 4UL, /**< 1.7 Volts power failure threshold. */ + NRF_POWER_THRESHOLD_V18, /**< 1.8 Volts power failure threshold. */ + NRF_POWER_THRESHOLD_V19, /**< 1.9 Volts power failure threshold. */ + NRF_POWER_THRESHOLD_V20, /**< 2.0 Volts power failure threshold. */ + NRF_POWER_THRESHOLD_V21, /**< 2.1 Volts power failure threshold. */ + NRF_POWER_THRESHOLD_V22, /**< 2.2 Volts power failure threshold. */ + NRF_POWER_THRESHOLD_V23, /**< 2.3 Volts power failure threshold. */ + NRF_POWER_THRESHOLD_V24, /**< 2.4 Volts power failure threshold. */ + NRF_POWER_THRESHOLD_V25, /**< 2.5 Volts power failure threshold. */ + NRF_POWER_THRESHOLD_V26, /**< 2.6 Volts power failure threshold. */ + NRF_POWER_THRESHOLD_V27, /**< 2.7 Volts power failure threshold. */ + NRF_POWER_THRESHOLD_V28 /**< 2.8 Volts power failure threshold. */ +}; + +/**@brief Power failure thresholds for high voltage */ +enum NRF_POWER_THRESHOLDVDDHS { + NRF_POWER_THRESHOLDVDDH_V27, /**< 2.7 Volts power failure threshold. */ + NRF_POWER_THRESHOLDVDDH_V28, /**< 2.8 Volts power failure threshold. */ + NRF_POWER_THRESHOLDVDDH_V29, /**< 2.9 Volts power failure threshold. */ + NRF_POWER_THRESHOLDVDDH_V30, /**< 3.0 Volts power failure threshold. */ + NRF_POWER_THRESHOLDVDDH_V31, /**< 3.1 Volts power failure threshold. */ + NRF_POWER_THRESHOLDVDDH_V32, /**< 3.2 Volts power failure threshold. */ + NRF_POWER_THRESHOLDVDDH_V33, /**< 3.3 Volts power failure threshold. */ + NRF_POWER_THRESHOLDVDDH_V34, /**< 3.4 Volts power failure threshold. */ + NRF_POWER_THRESHOLDVDDH_V35, /**< 3.5 Volts power failure threshold. */ + NRF_POWER_THRESHOLDVDDH_V36, /**< 3.6 Volts power failure threshold. */ + NRF_POWER_THRESHOLDVDDH_V37, /**< 3.7 Volts power failure threshold. */ + NRF_POWER_THRESHOLDVDDH_V38, /**< 3.8 Volts power failure threshold. */ + NRF_POWER_THRESHOLDVDDH_V39, /**< 3.9 Volts power failure threshold. */ + NRF_POWER_THRESHOLDVDDH_V40, /**< 4.0 Volts power failure threshold. */ + NRF_POWER_THRESHOLDVDDH_V41, /**< 4.1 Volts power failure threshold. */ + NRF_POWER_THRESHOLDVDDH_V42 /**< 4.2 Volts power failure threshold. */ +}; + +/**@brief DC/DC converter modes. */ +enum NRF_POWER_DCDC_MODES { + NRF_POWER_DCDC_DISABLE, /**< The DCDC is disabled. */ + NRF_POWER_DCDC_ENABLE /**< The DCDC is enabled. */ +}; + +/**@brief Radio notification distances. */ +enum NRF_RADIO_NOTIFICATION_DISTANCES { + NRF_RADIO_NOTIFICATION_DISTANCE_NONE = 0, /**< The event does not have a notification. */ + NRF_RADIO_NOTIFICATION_DISTANCE_800US, /**< The distance from the active notification to start of radio activity. */ + NRF_RADIO_NOTIFICATION_DISTANCE_1740US, /**< The distance from the active notification to start of radio activity. */ + NRF_RADIO_NOTIFICATION_DISTANCE_2680US, /**< The distance from the active notification to start of radio activity. */ + NRF_RADIO_NOTIFICATION_DISTANCE_3620US, /**< The distance from the active notification to start of radio activity. */ + NRF_RADIO_NOTIFICATION_DISTANCE_4560US, /**< The distance from the active notification to start of radio activity. */ + NRF_RADIO_NOTIFICATION_DISTANCE_5500US /**< The distance from the active notification to start of radio activity. */ +}; + +/**@brief Radio notification types. */ +enum NRF_RADIO_NOTIFICATION_TYPES { + NRF_RADIO_NOTIFICATION_TYPE_NONE = 0, /**< The event does not have a radio notification signal. */ + NRF_RADIO_NOTIFICATION_TYPE_INT_ON_ACTIVE, /**< Using interrupt for notification when the radio will be enabled. */ + NRF_RADIO_NOTIFICATION_TYPE_INT_ON_INACTIVE, /**< Using interrupt for notification when the radio has been disabled. */ + NRF_RADIO_NOTIFICATION_TYPE_INT_ON_BOTH, /**< Using interrupt for notification both when the radio will be enabled and + disabled. */ +}; + +/**@brief The Radio signal callback types. */ +enum NRF_RADIO_CALLBACK_SIGNAL_TYPE { + NRF_RADIO_CALLBACK_SIGNAL_TYPE_START, /**< This signal indicates the start of the radio timeslot. */ + NRF_RADIO_CALLBACK_SIGNAL_TYPE_TIMER0, /**< This signal indicates the NRF_TIMER0 interrupt. */ + NRF_RADIO_CALLBACK_SIGNAL_TYPE_RADIO, /**< This signal indicates the NRF_RADIO interrupt. */ + NRF_RADIO_CALLBACK_SIGNAL_TYPE_EXTEND_FAILED, /**< This signal indicates extend action failed. */ + NRF_RADIO_CALLBACK_SIGNAL_TYPE_EXTEND_SUCCEEDED /**< This signal indicates extend action succeeded. */ +}; + +/**@brief The actions requested by the signal callback. + * + * This code gives the SOC instructions about what action to take when the signal callback has + * returned. + */ +enum NRF_RADIO_SIGNAL_CALLBACK_ACTION { + NRF_RADIO_SIGNAL_CALLBACK_ACTION_NONE, /**< Return without action. */ + NRF_RADIO_SIGNAL_CALLBACK_ACTION_EXTEND, /**< Request an extension of the current + timeslot. Maximum execution time for this action: + @ref NRF_RADIO_MAX_EXTENSION_PROCESSING_TIME_US. + This action must be started at least + @ref NRF_RADIO_MIN_EXTENSION_MARGIN_US before + the end of the timeslot. */ + NRF_RADIO_SIGNAL_CALLBACK_ACTION_END, /**< End the current radio timeslot. */ + NRF_RADIO_SIGNAL_CALLBACK_ACTION_REQUEST_AND_END /**< Request a new radio timeslot and end the current timeslot. */ +}; + +/**@brief Radio timeslot high frequency clock source configuration. */ +enum NRF_RADIO_HFCLK_CFG { + NRF_RADIO_HFCLK_CFG_XTAL_GUARANTEED, /**< The SoftDevice will guarantee that the high frequency clock source is the + external crystal for the whole duration of the timeslot. This should be the + preferred option for events that use the radio or require high timing accuracy. + @note The SoftDevice will automatically turn on and off the external crystal, + at the beginning and end of the timeslot, respectively. The crystal may also + intentionally be left running after the timeslot, in cases where it is needed + by the SoftDevice shortly after the end of the timeslot. */ + NRF_RADIO_HFCLK_CFG_NO_GUARANTEE /**< This configuration allows for earlier and tighter scheduling of timeslots. + The RC oscillator may be the clock source in part or for the whole duration of the + timeslot. The RC oscillator's accuracy must therefore be taken into consideration. + @note If the application will use the radio peripheral in timeslots with this + configuration, it must make sure that the crystal is running and stable before + starting the radio. */ +}; + +/**@brief Radio timeslot priorities. */ +enum NRF_RADIO_PRIORITY { + NRF_RADIO_PRIORITY_HIGH, /**< High (equal priority as the normal connection priority of the SoftDevice stack(s)). */ + NRF_RADIO_PRIORITY_NORMAL, /**< Normal (equal priority as the priority of secondary activities of the SoftDevice stack(s)). */ +}; + +/**@brief Radio timeslot request type. */ +enum NRF_RADIO_REQUEST_TYPE { + NRF_RADIO_REQ_TYPE_EARLIEST, /**< Request radio timeslot as early as possible. This should always be used for the first + request in a session. */ + NRF_RADIO_REQ_TYPE_NORMAL /**< Normal radio timeslot request. */ +}; + +/**@brief SoC Events. */ +enum NRF_SOC_EVTS { + NRF_EVT_HFCLKSTARTED, /**< Event indicating that the HFCLK has started. */ + NRF_EVT_POWER_FAILURE_WARNING, /**< Event indicating that a power failure warning has occurred. */ + NRF_EVT_FLASH_OPERATION_SUCCESS, /**< Event indicating that the ongoing flash operation has completed successfully. */ + NRF_EVT_FLASH_OPERATION_ERROR, /**< Event indicating that the ongoing flash operation has timed out with an error. */ + NRF_EVT_RADIO_BLOCKED, /**< Event indicating that a radio timeslot was blocked. */ + NRF_EVT_RADIO_CANCELED, /**< Event indicating that a radio timeslot was canceled by SoftDevice. */ + NRF_EVT_RADIO_SIGNAL_CALLBACK_INVALID_RETURN, /**< Event indicating that a radio timeslot signal callback handler return was + invalid. */ + NRF_EVT_RADIO_SESSION_IDLE, /**< Event indicating that a radio timeslot session is idle. */ + NRF_EVT_RADIO_SESSION_CLOSED, /**< Event indicating that a radio timeslot session is closed. */ + NRF_EVT_POWER_USB_POWER_READY, /**< Event indicating that a USB 3.3 V supply is ready. */ + NRF_EVT_POWER_USB_DETECTED, /**< Event indicating that voltage supply is detected on VBUS. */ + NRF_EVT_POWER_USB_REMOVED, /**< Event indicating that voltage supply is removed from VBUS. */ + NRF_EVT_NUMBER_OF_EVTS +}; + +/**@} */ + +/**@addtogroup NRF_SOC_STRUCTURES Structures + * @{ */ + +/**@brief Represents a mutex for use with the nrf_mutex functions. + * @note Accessing the value directly is not safe, use the mutex functions! + */ +typedef volatile uint8_t nrf_mutex_t; + +/**@brief Parameters for a request for a timeslot as early as possible. */ +typedef struct { + uint8_t hfclk; /**< High frequency clock source, see @ref NRF_RADIO_HFCLK_CFG. */ + uint8_t priority; /**< The radio timeslot priority, see @ref NRF_RADIO_PRIORITY. */ + uint32_t length_us; /**< The radio timeslot length (in the range 100 to 100,000] microseconds). */ + uint32_t timeout_us; /**< Longest acceptable delay until the start of the requested timeslot (up to @ref + NRF_RADIO_EARLIEST_TIMEOUT_MAX_US microseconds). */ +} nrf_radio_request_earliest_t; + +/**@brief Parameters for a normal radio timeslot request. */ +typedef struct { + uint8_t hfclk; /**< High frequency clock source, see @ref NRF_RADIO_HFCLK_CFG. */ + uint8_t priority; /**< The radio timeslot priority, see @ref NRF_RADIO_PRIORITY. */ + uint32_t distance_us; /**< Distance from the start of the previous radio timeslot (up to @ref NRF_RADIO_DISTANCE_MAX_US + microseconds). */ + uint32_t length_us; /**< The radio timeslot length (in the range [100..100,000] microseconds). */ +} nrf_radio_request_normal_t; + +/**@brief Radio timeslot request parameters. */ +typedef struct { + uint8_t request_type; /**< Type of request, see @ref NRF_RADIO_REQUEST_TYPE. */ + union { + nrf_radio_request_earliest_t earliest; /**< Parameters for requesting a radio timeslot as early as possible. */ + nrf_radio_request_normal_t normal; /**< Parameters for requesting a normal radio timeslot. */ + } params; /**< Parameter union. */ +} nrf_radio_request_t; + +/**@brief Return parameters of the radio timeslot signal callback. */ +typedef struct { + uint8_t callback_action; /**< The action requested by the application when returning from the signal callback, see @ref + NRF_RADIO_SIGNAL_CALLBACK_ACTION. */ + union { + struct { + nrf_radio_request_t *p_next; /**< The request parameters for the next radio timeslot. */ + } request; /**< Additional parameters for return_code @ref NRF_RADIO_SIGNAL_CALLBACK_ACTION_REQUEST_AND_END. */ + struct { + uint32_t length_us; /**< Requested extension of the radio timeslot duration (microseconds) (for minimum time see @ref + NRF_RADIO_MINIMUM_TIMESLOT_LENGTH_EXTENSION_TIME_US). */ + } extend; /**< Additional parameters for return_code @ref NRF_RADIO_SIGNAL_CALLBACK_ACTION_EXTEND. */ + } params; /**< Parameter union. */ +} nrf_radio_signal_callback_return_param_t; + +/**@brief The radio timeslot signal callback type. + * + * @note In case of invalid return parameters, the radio timeslot will automatically end + * immediately after returning from the signal callback and the + * @ref NRF_EVT_RADIO_SIGNAL_CALLBACK_INVALID_RETURN event will be sent. + * @note The returned struct pointer must remain valid after the signal callback + * function returns. For instance, this means that it must not point to a stack variable. + * + * @param[in] signal_type Type of signal, see @ref NRF_RADIO_CALLBACK_SIGNAL_TYPE. + * + * @return Pointer to structure containing action requested by the application. + */ +typedef nrf_radio_signal_callback_return_param_t *(*nrf_radio_signal_callback_t)(uint8_t signal_type); + +/**@brief AES ECB parameter typedefs */ +typedef uint8_t soc_ecb_key_t[SOC_ECB_KEY_LENGTH]; /**< Encryption key type. */ +typedef uint8_t soc_ecb_cleartext_t[SOC_ECB_CLEARTEXT_LENGTH]; /**< Cleartext data type. */ +typedef uint8_t soc_ecb_ciphertext_t[SOC_ECB_CIPHERTEXT_LENGTH]; /**< Ciphertext data type. */ + +/**@brief AES ECB data structure */ +typedef struct { + soc_ecb_key_t key; /**< Encryption key. */ + soc_ecb_cleartext_t cleartext; /**< Cleartext data. */ + soc_ecb_ciphertext_t ciphertext; /**< Ciphertext data. */ +} nrf_ecb_hal_data_t; + +/**@brief AES ECB block. Used to provide multiple blocks in a single call + to @ref sd_ecb_blocks_encrypt.*/ +typedef struct { + soc_ecb_key_t const *p_key; /**< Pointer to the Encryption key. */ + soc_ecb_cleartext_t const *p_cleartext; /**< Pointer to the Cleartext data. */ + soc_ecb_ciphertext_t *p_ciphertext; /**< Pointer to the Ciphertext data. */ +} nrf_ecb_hal_data_block_t; + +/**@} */ + +/**@addtogroup NRF_SOC_FUNCTIONS Functions + * @{ */ + +/**@brief Initialize a mutex. + * + * @param[in] p_mutex Pointer to the mutex to initialize. + * + * @retval ::NRF_SUCCESS + */ +SVCALL(SD_MUTEX_NEW, uint32_t, sd_mutex_new(nrf_mutex_t *p_mutex)); + +/**@brief Attempt to acquire a mutex. + * + * @param[in] p_mutex Pointer to the mutex to acquire. + * + * @retval ::NRF_SUCCESS The mutex was successfully acquired. + * @retval ::NRF_ERROR_SOC_MUTEX_ALREADY_TAKEN The mutex could not be acquired. + */ +SVCALL(SD_MUTEX_ACQUIRE, uint32_t, sd_mutex_acquire(nrf_mutex_t *p_mutex)); + +/**@brief Release a mutex. + * + * @param[in] p_mutex Pointer to the mutex to release. + * + * @retval ::NRF_SUCCESS + */ +SVCALL(SD_MUTEX_RELEASE, uint32_t, sd_mutex_release(nrf_mutex_t *p_mutex)); + +/**@brief Query the capacity of the application random pool. + * + * @param[out] p_pool_capacity The capacity of the pool. + * + * @retval ::NRF_SUCCESS + */ +SVCALL(SD_RAND_APPLICATION_POOL_CAPACITY_GET, uint32_t, sd_rand_application_pool_capacity_get(uint8_t *p_pool_capacity)); + +/**@brief Get number of random bytes available to the application. + * + * @param[out] p_bytes_available The number of bytes currently available in the pool. + * + * @retval ::NRF_SUCCESS + */ +SVCALL(SD_RAND_APPLICATION_BYTES_AVAILABLE_GET, uint32_t, sd_rand_application_bytes_available_get(uint8_t *p_bytes_available)); + +/**@brief Get random bytes from the application pool. + * + * @param[out] p_buff Pointer to unit8_t buffer for storing the bytes. + * @param[in] length Number of bytes to take from pool and place in p_buff. + * + * @retval ::NRF_SUCCESS The requested bytes were written to p_buff. + * @retval ::NRF_ERROR_SOC_RAND_NOT_ENOUGH_VALUES No bytes were written to the buffer, because there were not enough bytes + * available. + */ +SVCALL(SD_RAND_APPLICATION_VECTOR_GET, uint32_t, sd_rand_application_vector_get(uint8_t *p_buff, uint8_t length)); + +/**@brief Gets the reset reason register. + * + * @param[out] p_reset_reason Contents of the NRF_POWER->RESETREAS register. + * + * @retval ::NRF_SUCCESS + */ +SVCALL(SD_POWER_RESET_REASON_GET, uint32_t, sd_power_reset_reason_get(uint32_t *p_reset_reason)); + +/**@brief Clears the bits of the reset reason register. + * + * @param[in] reset_reason_clr_msk Contains the bits to clear from the reset reason register. + * + * @retval ::NRF_SUCCESS + */ +SVCALL(SD_POWER_RESET_REASON_CLR, uint32_t, sd_power_reset_reason_clr(uint32_t reset_reason_clr_msk)); + +/**@brief Sets the power mode when in CPU sleep. + * + * @param[in] power_mode The power mode to use when in CPU sleep, see @ref NRF_POWER_MODES. @sa sd_app_evt_wait + * + * @retval ::NRF_SUCCESS The power mode was set. + * @retval ::NRF_ERROR_SOC_POWER_MODE_UNKNOWN The power mode was unknown. + */ +SVCALL(SD_POWER_MODE_SET, uint32_t, sd_power_mode_set(uint8_t power_mode)); + +/**@brief Puts the chip in System OFF mode. + * + * @retval ::NRF_ERROR_SOC_POWER_OFF_SHOULD_NOT_RETURN + */ +SVCALL(SD_POWER_SYSTEM_OFF, uint32_t, sd_power_system_off(void)); + +/**@brief Enables or disables the power-fail comparator. + * + * Enabling this will give a SoftDevice event (NRF_EVT_POWER_FAILURE_WARNING) when the power failure warning occurs. + * The event can be retrieved with sd_evt_get(); + * + * @param[in] pof_enable True if the power-fail comparator should be enabled, false if it should be disabled. + * + * @retval ::NRF_SUCCESS + */ +SVCALL(SD_POWER_POF_ENABLE, uint32_t, sd_power_pof_enable(uint8_t pof_enable)); + +/**@brief Enables or disables the USB power ready event. + * + * Enabling this will give a SoftDevice event (NRF_EVT_POWER_USB_POWER_READY) when a USB 3.3 V supply is ready. + * The event can be retrieved with sd_evt_get(); + * + * @param[in] usbpwrrdy_enable True if the power ready event should be enabled, false if it should be disabled. + * + * @note Calling this function on a chip without USBD peripheral will result in undefined behaviour. + * + * @retval ::NRF_SUCCESS + */ +SVCALL(SD_POWER_USBPWRRDY_ENABLE, uint32_t, sd_power_usbpwrrdy_enable(uint8_t usbpwrrdy_enable)); + +/**@brief Enables or disables the power USB-detected event. + * + * Enabling this will give a SoftDevice event (NRF_EVT_POWER_USB_DETECTED) when a voltage supply is detected on VBUS. + * The event can be retrieved with sd_evt_get(); + * + * @param[in] usbdetected_enable True if the power ready event should be enabled, false if it should be disabled. + * + * @note Calling this function on a chip without USBD peripheral will result in undefined behaviour. + * + * @retval ::NRF_SUCCESS + */ +SVCALL(SD_POWER_USBDETECTED_ENABLE, uint32_t, sd_power_usbdetected_enable(uint8_t usbdetected_enable)); + +/**@brief Enables or disables the power USB-removed event. + * + * Enabling this will give a SoftDevice event (NRF_EVT_POWER_USB_REMOVED) when a voltage supply is removed from VBUS. + * The event can be retrieved with sd_evt_get(); + * + * @param[in] usbremoved_enable True if the power ready event should be enabled, false if it should be disabled. + * + * @note Calling this function on a chip without USBD peripheral will result in undefined behaviour. + * + * @retval ::NRF_SUCCESS + */ +SVCALL(SD_POWER_USBREMOVED_ENABLE, uint32_t, sd_power_usbremoved_enable(uint8_t usbremoved_enable)); + +/**@brief Get USB supply status register content. + * + * @param[out] usbregstatus The content of USBREGSTATUS register. + * + * @note Calling this function on a chip without USBD peripheral will result in undefined behaviour. + * + * @retval ::NRF_SUCCESS + */ +SVCALL(SD_POWER_USBREGSTATUS_GET, uint32_t, sd_power_usbregstatus_get(uint32_t *usbregstatus)); + +/**@brief Sets the power failure comparator threshold value. + * + * @note: Power failure comparator threshold setting. This setting applies both for normal voltage + * mode (supply connected to both VDD and VDDH) and high voltage mode (supply connected to + * VDDH only). + * + * @param[in] threshold The power-fail threshold value to use, see @ref NRF_POWER_THRESHOLDS. + * + * @retval ::NRF_SUCCESS The power failure threshold was set. + * @retval ::NRF_ERROR_SOC_POWER_POF_THRESHOLD_UNKNOWN The power failure threshold is unknown. + */ +SVCALL(SD_POWER_POF_THRESHOLD_SET, uint32_t, sd_power_pof_threshold_set(uint8_t threshold)); + +/**@brief Sets the power failure comparator threshold value for high voltage. + * + * @note: Power failure comparator threshold setting for high voltage mode (supply connected to + * VDDH only). This setting does not apply for normal voltage mode (supply connected to both + * VDD and VDDH). + * + * @param[in] threshold The power-fail threshold value to use, see @ref NRF_POWER_THRESHOLDVDDHS. + * + * @retval ::NRF_SUCCESS The power failure threshold was set. + * @retval ::NRF_ERROR_SOC_POWER_POF_THRESHOLD_UNKNOWN The power failure threshold is unknown. + */ +SVCALL(SD_POWER_POF_THRESHOLDVDDH_SET, uint32_t, sd_power_pof_thresholdvddh_set(uint8_t threshold)); + +/**@brief Writes the NRF_POWER->RAM[index].POWERSET register. + * + * @param[in] index Contains the index in the NRF_POWER->RAM[index].POWERSET register to write to. + * @param[in] ram_powerset Contains the word to write to the NRF_POWER->RAM[index].POWERSET register. + * + * @retval ::NRF_SUCCESS + */ +SVCALL(SD_POWER_RAM_POWER_SET, uint32_t, sd_power_ram_power_set(uint8_t index, uint32_t ram_powerset)); + +/**@brief Writes the NRF_POWER->RAM[index].POWERCLR register. + * + * @param[in] index Contains the index in the NRF_POWER->RAM[index].POWERCLR register to write to. + * @param[in] ram_powerclr Contains the word to write to the NRF_POWER->RAM[index].POWERCLR register. + * + * @retval ::NRF_SUCCESS + */ +SVCALL(SD_POWER_RAM_POWER_CLR, uint32_t, sd_power_ram_power_clr(uint8_t index, uint32_t ram_powerclr)); + +/**@brief Get contents of NRF_POWER->RAM[index].POWER register, indicates power status of RAM[index] blocks. + * + * @param[in] index Contains the index in the NRF_POWER->RAM[index].POWER register to read from. + * @param[out] p_ram_power Content of NRF_POWER->RAM[index].POWER register. + * + * @retval ::NRF_SUCCESS + */ +SVCALL(SD_POWER_RAM_POWER_GET, uint32_t, sd_power_ram_power_get(uint8_t index, uint32_t *p_ram_power)); + +/**@brief Set bits in the general purpose retention registers (NRF_POWER->GPREGRET*). + * + * @param[in] gpregret_id 0 for GPREGRET, 1 for GPREGRET2. + * @param[in] gpregret_msk Bits to be set in the GPREGRET register. + * + * @retval ::NRF_SUCCESS + */ +SVCALL(SD_POWER_GPREGRET_SET, uint32_t, sd_power_gpregret_set(uint32_t gpregret_id, uint32_t gpregret_msk)); + +/**@brief Clear bits in the general purpose retention registers (NRF_POWER->GPREGRET*). + * + * @param[in] gpregret_id 0 for GPREGRET, 1 for GPREGRET2. + * @param[in] gpregret_msk Bits to be clear in the GPREGRET register. + * + * @retval ::NRF_SUCCESS + */ +SVCALL(SD_POWER_GPREGRET_CLR, uint32_t, sd_power_gpregret_clr(uint32_t gpregret_id, uint32_t gpregret_msk)); + +/**@brief Get contents of the general purpose retention registers (NRF_POWER->GPREGRET*). + * + * @param[in] gpregret_id 0 for GPREGRET, 1 for GPREGRET2. + * @param[out] p_gpregret Contents of the GPREGRET register. + * + * @retval ::NRF_SUCCESS + */ +SVCALL(SD_POWER_GPREGRET_GET, uint32_t, sd_power_gpregret_get(uint32_t gpregret_id, uint32_t *p_gpregret)); + +/**@brief Enable or disable the DC/DC regulator for the regulator stage 1 (REG1). + * + * @param[in] dcdc_mode The mode of the DCDC, see @ref NRF_POWER_DCDC_MODES. + * + * @retval ::NRF_SUCCESS + * @retval ::NRF_ERROR_INVALID_PARAM The DCDC mode is invalid. + */ +SVCALL(SD_POWER_DCDC_MODE_SET, uint32_t, sd_power_dcdc_mode_set(uint8_t dcdc_mode)); + +/**@brief Enable or disable the DC/DC regulator for the regulator stage 0 (REG0). + * + * For more details on the REG0 stage, please see product specification. + * + * @param[in] dcdc_mode The mode of the DCDC0, see @ref NRF_POWER_DCDC_MODES. + * + * @retval ::NRF_SUCCESS + * @retval ::NRF_ERROR_INVALID_PARAM The dcdc_mode is invalid. + */ +SVCALL(SD_POWER_DCDC0_MODE_SET, uint32_t, sd_power_dcdc0_mode_set(uint8_t dcdc_mode)); + +/**@brief Request the high frequency crystal oscillator. + * + * Will start the high frequency crystal oscillator, the startup time of the crystal varies + * and the ::sd_clock_hfclk_is_running function can be polled to check if it has started. + * + * @see sd_clock_hfclk_is_running + * @see sd_clock_hfclk_release + * + * @retval ::NRF_SUCCESS + */ +SVCALL(SD_CLOCK_HFCLK_REQUEST, uint32_t, sd_clock_hfclk_request(void)); + +/**@brief Releases the high frequency crystal oscillator. + * + * Will stop the high frequency crystal oscillator, this happens immediately. + * + * @see sd_clock_hfclk_is_running + * @see sd_clock_hfclk_request + * + * @retval ::NRF_SUCCESS + */ +SVCALL(SD_CLOCK_HFCLK_RELEASE, uint32_t, sd_clock_hfclk_release(void)); + +/**@brief Checks if the high frequency crystal oscillator is running. + * + * @see sd_clock_hfclk_request + * @see sd_clock_hfclk_release + * + * @param[out] p_is_running 1 if the external crystal oscillator is running, 0 if not. + * + * @retval ::NRF_SUCCESS + */ +SVCALL(SD_CLOCK_HFCLK_IS_RUNNING, uint32_t, sd_clock_hfclk_is_running(uint32_t *p_is_running)); + +/**@brief Waits for an application event. + * + * An application event is either an application interrupt or a pended interrupt when the interrupt + * is disabled. + * + * When the application waits for an application event by calling this function, an interrupt that + * is enabled will be taken immediately on pending since this function will wait in thread mode, + * then the execution will return in the application's main thread. + * + * In order to wake up from disabled interrupts, the SEVONPEND flag has to be set in the Cortex-M + * MCU's System Control Register (SCR), CMSIS_SCB. In that case, when a disabled interrupt gets + * pended, this function will return to the application's main thread. + * + * @note The application must ensure that the pended flag is cleared using ::sd_nvic_ClearPendingIRQ + * in order to sleep using this function. This is only necessary for disabled interrupts, as + * the interrupt handler will clear the pending flag automatically for enabled interrupts. + * + * @note If an application interrupt has happened since the last time sd_app_evt_wait was + * called this function will return immediately and not go to sleep. This is to avoid race + * conditions that can occur when a flag is updated in the interrupt handler and processed + * in the main loop. + * + * @post An application interrupt has happened or a interrupt pending flag is set. + * + * @retval ::NRF_SUCCESS + */ +SVCALL(SD_APP_EVT_WAIT, uint32_t, sd_app_evt_wait(void)); + +/**@brief Get PPI channel enable register contents. + * + * @param[out] p_channel_enable The contents of the PPI CHEN register. + * + * @retval ::NRF_SUCCESS + */ +SVCALL(SD_PPI_CHANNEL_ENABLE_GET, uint32_t, sd_ppi_channel_enable_get(uint32_t *p_channel_enable)); + +/**@brief Set PPI channel enable register. + * + * @param[in] channel_enable_set_msk Mask containing the bits to set in the PPI CHEN register. + * + * @retval ::NRF_SUCCESS + */ +SVCALL(SD_PPI_CHANNEL_ENABLE_SET, uint32_t, sd_ppi_channel_enable_set(uint32_t channel_enable_set_msk)); + +/**@brief Clear PPI channel enable register. + * + * @param[in] channel_enable_clr_msk Mask containing the bits to clear in the PPI CHEN register. + * + * @retval ::NRF_SUCCESS + */ +SVCALL(SD_PPI_CHANNEL_ENABLE_CLR, uint32_t, sd_ppi_channel_enable_clr(uint32_t channel_enable_clr_msk)); + +/**@brief Assign endpoints to a PPI channel. + * + * @param[in] channel_num Number of the PPI channel to assign. + * @param[in] evt_endpoint Event endpoint of the PPI channel. + * @param[in] task_endpoint Task endpoint of the PPI channel. + * + * @retval ::NRF_ERROR_SOC_PPI_INVALID_CHANNEL The channel number is invalid. + * @retval ::NRF_SUCCESS + */ +SVCALL(SD_PPI_CHANNEL_ASSIGN, uint32_t, + sd_ppi_channel_assign(uint8_t channel_num, const volatile void *evt_endpoint, const volatile void *task_endpoint)); + +/**@brief Task to enable a channel group. + * + * @param[in] group_num Number of the channel group. + * + * @retval ::NRF_ERROR_SOC_PPI_INVALID_GROUP The group number is invalid + * @retval ::NRF_SUCCESS + */ +SVCALL(SD_PPI_GROUP_TASK_ENABLE, uint32_t, sd_ppi_group_task_enable(uint8_t group_num)); + +/**@brief Task to disable a channel group. + * + * @param[in] group_num Number of the PPI group. + * + * @retval ::NRF_ERROR_SOC_PPI_INVALID_GROUP The group number is invalid. + * @retval ::NRF_SUCCESS + */ +SVCALL(SD_PPI_GROUP_TASK_DISABLE, uint32_t, sd_ppi_group_task_disable(uint8_t group_num)); + +/**@brief Assign PPI channels to a channel group. + * + * @param[in] group_num Number of the channel group. + * @param[in] channel_msk Mask of the channels to assign to the group. + * + * @retval ::NRF_ERROR_SOC_PPI_INVALID_GROUP The group number is invalid. + * @retval ::NRF_SUCCESS + */ +SVCALL(SD_PPI_GROUP_ASSIGN, uint32_t, sd_ppi_group_assign(uint8_t group_num, uint32_t channel_msk)); + +/**@brief Gets the PPI channels of a channel group. + * + * @param[in] group_num Number of the channel group. + * @param[out] p_channel_msk Mask of the channels assigned to the group. + * + * @retval ::NRF_ERROR_SOC_PPI_INVALID_GROUP The group number is invalid. + * @retval ::NRF_SUCCESS + */ +SVCALL(SD_PPI_GROUP_GET, uint32_t, sd_ppi_group_get(uint8_t group_num, uint32_t *p_channel_msk)); + +/**@brief Configures the Radio Notification signal. + * + * @note + * - The notification signal latency depends on the interrupt priority settings of SWI used + * for notification signal. + * - To ensure that the radio notification signal behaves in a consistent way, the radio + * notifications must be configured when there is no protocol stack or other SoftDevice + * activity in progress. It is recommended that the radio notification signal is + * configured directly after the SoftDevice has been enabled. + * - In the period between the ACTIVE signal and the start of the Radio Event, the SoftDevice + * will interrupt the application to do Radio Event preparation. + * - Using the Radio Notification feature may limit the bandwidth, as the SoftDevice may have + * to shorten the connection events to have time for the Radio Notification signals. + * + * @param[in] type Type of notification signal, see @ref NRF_RADIO_NOTIFICATION_TYPES. + * @ref NRF_RADIO_NOTIFICATION_TYPE_NONE shall be used to turn off radio + * notification. Using @ref NRF_RADIO_NOTIFICATION_DISTANCE_NONE is + * recommended (but not required) to be used with + * @ref NRF_RADIO_NOTIFICATION_TYPE_NONE. + * + * @param[in] distance Distance between the notification signal and start of radio activity, see @ref + * NRF_RADIO_NOTIFICATION_DISTANCES. This parameter is ignored when @ref NRF_RADIO_NOTIFICATION_TYPE_NONE or + * @ref NRF_RADIO_NOTIFICATION_TYPE_INT_ON_INACTIVE is used. + * + * @retval ::NRF_ERROR_INVALID_PARAM The group number is invalid. + * @retval ::NRF_ERROR_INVALID_STATE A protocol stack or other SoftDevice is running. Stop all + * running activities and retry. + * @retval ::NRF_SUCCESS + */ +SVCALL(SD_RADIO_NOTIFICATION_CFG_SET, uint32_t, sd_radio_notification_cfg_set(uint8_t type, uint8_t distance)); + +/**@brief Encrypts a block according to the specified parameters. + * + * 128-bit AES encryption. + * + * @note: + * - The application may set the SEVONPEND bit in the SCR to 1 to make the SoftDevice sleep while + * the ECB is running. The SEVONPEND bit should only be cleared (set to 0) from application + * main or low interrupt level. + * + * @param[in, out] p_ecb_data Pointer to the ECB parameters' struct (two input + * parameters and one output parameter). + * + * @retval ::NRF_SUCCESS + */ +SVCALL(SD_ECB_BLOCK_ENCRYPT, uint32_t, sd_ecb_block_encrypt(nrf_ecb_hal_data_t *p_ecb_data)); + +/**@brief Encrypts multiple data blocks provided as an array of data block structures. + * + * @details: Performs 128-bit AES encryption on multiple data blocks + * + * @note: + * - The application may set the SEVONPEND bit in the SCR to 1 to make the SoftDevice sleep while + * the ECB is running. The SEVONPEND bit should only be cleared (set to 0) from application + * main or low interrupt level. + * + * @param[in] block_count Count of blocks in the p_data_blocks array. + * @param[in,out] p_data_blocks Pointer to the first entry in a contiguous array of + * @ref nrf_ecb_hal_data_block_t structures. + * + * @retval ::NRF_SUCCESS + */ +SVCALL(SD_ECB_BLOCKS_ENCRYPT, uint32_t, sd_ecb_blocks_encrypt(uint8_t block_count, nrf_ecb_hal_data_block_t *p_data_blocks)); + +/**@brief Gets any pending events generated by the SoC API. + * + * The application should keep calling this function to get events, until ::NRF_ERROR_NOT_FOUND is returned. + * + * @param[out] p_evt_id Set to one of the values in @ref NRF_SOC_EVTS, if any events are pending. + * + * @retval ::NRF_SUCCESS An event was pending. The event id is written in the p_evt_id parameter. + * @retval ::NRF_ERROR_NOT_FOUND No pending events. + */ +SVCALL(SD_EVT_GET, uint32_t, sd_evt_get(uint32_t *p_evt_id)); + +/**@brief Get the temperature measured on the chip + * + * This function will block until the temperature measurement is done. + * It takes around 50 us from call to return. + * + * @param[out] p_temp Result of temperature measurement. Die temperature in 0.25 degrees Celsius. + * + * @retval ::NRF_SUCCESS A temperature measurement was done, and the temperature was written to temp + */ +SVCALL(SD_TEMP_GET, uint32_t, sd_temp_get(int32_t *p_temp)); + +/**@brief Flash Write + * + * Commands to write a buffer to flash + * + * If the SoftDevice is enabled: + * This call initiates the flash access command, and its completion will be communicated to the + * application with exactly one of the following events: + * - @ref NRF_EVT_FLASH_OPERATION_SUCCESS - The command was successfully completed. + * - @ref NRF_EVT_FLASH_OPERATION_ERROR - The command could not be started. + * + * If the SoftDevice is not enabled no event will be generated, and this call will return @ref NRF_SUCCESS when the + * write has been completed + * + * @note + * - This call takes control over the radio and the CPU during flash erase and write to make sure that + * they will not interfere with the flash access. This means that all interrupts will be blocked + * for a predictable time (depending on the NVMC specification in the device's Product Specification + * and the command parameters). + * - The data in the p_src buffer should not be modified before the @ref NRF_EVT_FLASH_OPERATION_SUCCESS + * or the @ref NRF_EVT_FLASH_OPERATION_ERROR have been received if the SoftDevice is enabled. + * - This call will make the SoftDevice trigger a hardfault when the page is written, if it is + * protected. + * + * + * @param[in] p_dst Pointer to start of flash location to be written. + * @param[in] p_src Pointer to buffer with data to be written. + * @param[in] size Number of 32-bit words to write. Maximum size is the number of words in one + * flash page. See the device's Product Specification for details. + * + * @retval ::NRF_ERROR_INVALID_ADDR Tried to write to a non existing flash address, or p_dst or p_src was unaligned. + * @retval ::NRF_ERROR_BUSY The previous command has not yet completed. + * @retval ::NRF_ERROR_INVALID_LENGTH Size was 0, or higher than the maximum allowed size. + * @retval ::NRF_ERROR_FORBIDDEN Tried to write to an address outside the application flash area. + * @retval ::NRF_SUCCESS The command was accepted. + */ +SVCALL(SD_FLASH_WRITE, uint32_t, sd_flash_write(uint32_t *p_dst, uint32_t const *p_src, uint32_t size)); + +/**@brief Flash Erase page + * + * Commands to erase a flash page + * If the SoftDevice is enabled: + * This call initiates the flash access command, and its completion will be communicated to the + * application with exactly one of the following events: + * - @ref NRF_EVT_FLASH_OPERATION_SUCCESS - The command was successfully completed. + * - @ref NRF_EVT_FLASH_OPERATION_ERROR - The command could not be started. + * + * If the SoftDevice is not enabled no event will be generated, and this call will return @ref NRF_SUCCESS when the + * erase has been completed + * + * @note + * - This call takes control over the radio and the CPU during flash erase and write to make sure that + * they will not interfere with the flash access. This means that all interrupts will be blocked + * for a predictable time (depending on the NVMC specification in the device's Product Specification + * and the command parameters). + * - This call will make the SoftDevice trigger a hardfault when the page is erased, if it is + * protected. + * + * + * @param[in] page_number Page number of the page to erase + * + * @retval ::NRF_ERROR_INTERNAL If a new session could not be opened due to an internal error. + * @retval ::NRF_ERROR_INVALID_ADDR Tried to erase to a non existing flash page. + * @retval ::NRF_ERROR_BUSY The previous command has not yet completed. + * @retval ::NRF_ERROR_FORBIDDEN Tried to erase a page outside the application flash area. + * @retval ::NRF_SUCCESS The command was accepted. + */ +SVCALL(SD_FLASH_PAGE_ERASE, uint32_t, sd_flash_page_erase(uint32_t page_number)); + +/**@brief Opens a session for radio timeslot requests. + * + * @note Only one session can be open at a time. + * @note p_radio_signal_callback(@ref NRF_RADIO_CALLBACK_SIGNAL_TYPE_START) will be called when the radio timeslot + * starts. From this point the NRF_RADIO and NRF_TIMER0 peripherals can be freely accessed + * by the application. + * @note p_radio_signal_callback(@ref NRF_RADIO_CALLBACK_SIGNAL_TYPE_TIMER0) is called whenever the NRF_TIMER0 + * interrupt occurs. + * @note p_radio_signal_callback(@ref NRF_RADIO_CALLBACK_SIGNAL_TYPE_RADIO) is called whenever the NRF_RADIO + * interrupt occurs. + * @note p_radio_signal_callback() will be called at ARM interrupt priority level 0. This + * implies that none of the sd_* API calls can be used from p_radio_signal_callback(). + * + * @param[in] p_radio_signal_callback The signal callback. + * + * @retval ::NRF_ERROR_INVALID_ADDR p_radio_signal_callback is an invalid function pointer. + * @retval ::NRF_ERROR_BUSY If session cannot be opened. + * @retval ::NRF_ERROR_INTERNAL If a new session could not be opened due to an internal error. + * @retval ::NRF_SUCCESS Otherwise. + */ +SVCALL(SD_RADIO_SESSION_OPEN, uint32_t, sd_radio_session_open(nrf_radio_signal_callback_t p_radio_signal_callback)); + +/**@brief Closes a session for radio timeslot requests. + * + * @note Any current radio timeslot will be finished before the session is closed. + * @note If a radio timeslot is scheduled when the session is closed, it will be canceled. + * @note The application cannot consider the session closed until the @ref NRF_EVT_RADIO_SESSION_CLOSED + * event is received. + * + * @retval ::NRF_ERROR_FORBIDDEN If session not opened. + * @retval ::NRF_ERROR_BUSY If session is currently being closed. + * @retval ::NRF_SUCCESS Otherwise. + */ +SVCALL(SD_RADIO_SESSION_CLOSE, uint32_t, sd_radio_session_close(void)); + +/**@brief Requests a radio timeslot. + * + * @note The request type is determined by p_request->request_type, and can be one of @ref NRF_RADIO_REQ_TYPE_EARLIEST + * and @ref NRF_RADIO_REQ_TYPE_NORMAL. The first request in a session must always be of type @ref + * NRF_RADIO_REQ_TYPE_EARLIEST. + * @note For a normal request (@ref NRF_RADIO_REQ_TYPE_NORMAL), the start time of a radio timeslot is specified by + * p_request->distance_us and is given relative to the start of the previous timeslot. + * @note A too small p_request->distance_us will lead to a @ref NRF_EVT_RADIO_BLOCKED event. + * @note Timeslots scheduled too close will lead to a @ref NRF_EVT_RADIO_BLOCKED event. + * @note See the SoftDevice Specification for more on radio timeslot scheduling, distances and lengths. + * @note If an opportunity for the first radio timeslot is not found before 100 ms after the call to this + * function, it is not scheduled, and instead a @ref NRF_EVT_RADIO_BLOCKED event is sent. + * The application may then try to schedule the first radio timeslot again. + * @note Successful requests will result in nrf_radio_signal_callback_t(@ref NRF_RADIO_CALLBACK_SIGNAL_TYPE_START). + * Unsuccessful requests will result in a @ref NRF_EVT_RADIO_BLOCKED event, see @ref NRF_SOC_EVTS. + * @note The jitter in the start time of the radio timeslots is +/- @ref NRF_RADIO_START_JITTER_US us. + * @note The nrf_radio_signal_callback_t(@ref NRF_RADIO_CALLBACK_SIGNAL_TYPE_START) call has a latency relative to the + * specified radio timeslot start, but this does not affect the actual start time of the timeslot. + * @note NRF_TIMER0 is reset at the start of the radio timeslot, and is clocked at 1MHz from the high frequency + * (16 MHz) clock source. If p_request->hfclk_force_xtal is true, the high frequency clock is + * guaranteed to be clocked from the external crystal. + * @note The SoftDevice will neither access the NRF_RADIO peripheral nor the NRF_TIMER0 peripheral + * during the radio timeslot. + * + * @param[in] p_request Pointer to the request parameters. + * + * @retval ::NRF_ERROR_FORBIDDEN Either: + * - The session is not open. + * - The session is not IDLE. + * - This is the first request and its type is not @ref NRF_RADIO_REQ_TYPE_EARLIEST. + * - The request type was set to @ref NRF_RADIO_REQ_TYPE_NORMAL after a + * @ref NRF_RADIO_REQ_TYPE_EARLIEST request was blocked. + * @retval ::NRF_ERROR_INVALID_ADDR If the p_request pointer is invalid. + * @retval ::NRF_ERROR_INVALID_PARAM If the parameters of p_request are not valid. + * @retval ::NRF_SUCCESS Otherwise. + */ +SVCALL(SD_RADIO_REQUEST, uint32_t, sd_radio_request(nrf_radio_request_t const *p_request)); + +/**@brief Write register protected by the SoftDevice + * + * This function writes to a register that is write-protected by the SoftDevice. Please refer to your + * SoftDevice Specification for more details about which registers that are protected by SoftDevice. + * This function can write to the following protected peripheral: + * - ACL + * + * @note Protected registers may be read directly. + * @note Register that are write-once will return @ref NRF_SUCCESS on second set, even the value in + * the register has not changed. See the Product Specification for more details about register + * properties. + * + * @param[in] p_register Pointer to register to be written. + * @param[in] value Value to be written to the register. + * + * @retval ::NRF_ERROR_INVALID_ADDR This function can not write to the reguested register. + * @retval ::NRF_SUCCESS Value successfully written to register. + * + */ +SVCALL(SD_PROTECTED_REGISTER_WRITE, uint32_t, sd_protected_register_write(volatile uint32_t *p_register, uint32_t value)); + +/**@} */ + +#ifdef __cplusplus +} +#endif +#endif // NRF_SOC_H__ + +/**@} */ diff --git a/src/platform/nrf52/softdevice/nrf_svc.h b/src/platform/nrf52/softdevice/nrf_svc.h new file mode 100644 index 000000000..1de44656f --- /dev/null +++ b/src/platform/nrf52/softdevice/nrf_svc.h @@ -0,0 +1,98 @@ +/* + * Copyright (c) Nordic Semiconductor ASA + * All rights reserved. + * + * Redistribution and use in source and binary forms, with or without modification, + * are permitted provided that the following conditions are met: + * + * 1. Redistributions of source code must retain the above copyright notice, this + * list of conditions and the following disclaimer. + * + * 2. Redistributions in binary form, except as embedded into a Nordic + * Semiconductor ASA integrated circuit in a product or a software update for + * such product, must reproduce the above copyright notice, this list of + * conditions and the following disclaimer in the documentation and/or other + * materials provided with the distribution. + * + * 3. Neither the name of Nordic Semiconductor ASA nor the names of its + * contributors may be used to endorse or promote products derived from this + * software without specific prior written permission. + * + * 4. This software, with or without modification, must only be used with a + * Nordic Semiconductor ASA integrated circuit. + * + * 5. Any software provided in binary form under this license must not be reverse + * engineered, decompiled, modified and/or disassembled. + * + * THIS SOFTWARE IS PROVIDED BY NORDIC SEMICONDUCTOR ASA "AS IS" AND ANY EXPRESS + * OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES + * OF MERCHANTABILITY, NONINFRINGEMENT, AND FITNESS FOR A PARTICULAR PURPOSE ARE + * DISCLAIMED. IN NO EVENT SHALL NORDIC SEMICONDUCTOR ASA OR CONTRIBUTORS BE + * LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR + * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE + * GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) + * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT + * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT + * OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + */ + +#ifndef NRF_SVC__ +#define NRF_SVC__ + +#include "stdint.h" + +#ifdef __cplusplus +extern "C" { +#endif + +/** @brief Supervisor call declaration. + * + * A call to a function marked with @ref SVCALL, will trigger a Supervisor Call (SVC) Exception. + * The SVCs with SVC numbers 0x00-0x0F are forwared to the application. All other SVCs are handled by the SoftDevice. + * + * @param[in] number The SVC number to be used. + * @param[in] return_type The return type of the SVC function. + * @param[in] signature Function signature. The function can have at most four arguments. + */ + +#ifdef SVCALL_AS_NORMAL_FUNCTION +#define SVCALL(number, return_type, signature) return_type signature +#else + +#ifndef SVCALL +#if defined(__CC_ARM) +#define SVCALL(number, return_type, signature) return_type __svc(number) signature +#elif defined(__GNUC__) +#ifdef __cplusplus +#define GCC_CAST_CPP (uint16_t) +#else +#define GCC_CAST_CPP +#endif +#define SVCALL(number, return_type, signature) \ + _Pragma("GCC diagnostic push") _Pragma("GCC diagnostic ignored \"-Wreturn-type\"") __attribute__((naked)) \ + __attribute__((unused)) static return_type signature \ + { \ + __asm("svc %0\n" \ + "bx r14" \ + : \ + : "I"(GCC_CAST_CPP number) \ + : "r0"); \ + } \ + _Pragma("GCC diagnostic pop") + +#elif defined(__ICCARM__) +#define PRAGMA(x) _Pragma(#x) +#define SVCALL(number, return_type, signature) \ + PRAGMA(swi_number = (number)) \ + __swi return_type signature; +#else +#define SVCALL(number, return_type, signature) return_type signature +#endif +#endif // SVCALL + +#endif // SVCALL_AS_NORMAL_FUNCTION + +#ifdef __cplusplus +} +#endif +#endif // NRF_SVC__ diff --git a/src/platform/portduino/CrossPlatformCryptoEngine.cpp b/src/platform/portduino/CrossPlatformCryptoEngine.cpp deleted file mode 100644 index 46ef942f0..000000000 --- a/src/platform/portduino/CrossPlatformCryptoEngine.cpp +++ /dev/null @@ -1,78 +0,0 @@ -#include "AES.h" -#include "CTR.h" -#include "CryptoEngine.h" -#include "configuration.h" - -/** A platform independent AES engine implemented using Tiny-AES - */ -class CrossPlatformCryptoEngine : public CryptoEngine -{ - - CTRCommon *ctr = NULL; - - public: - CrossPlatformCryptoEngine() {} - - ~CrossPlatformCryptoEngine() {} - - /** - * Set the key used for encrypt, decrypt. - * - * As a special case: If all bytes are zero, we assume _no encryption_ and send all data in cleartext. - * - * @param numBytes must be 16 (AES128), 32 (AES256) or 0 (no crypt) - * @param bytes a _static_ buffer that will remain valid for the life of this crypto instance (i.e. this class will cache the - * provided pointer) - */ - virtual void setKey(const CryptoKey &k) override - { - CryptoEngine::setKey(k); - LOG_DEBUG("Installing AES%d key!\n", key.length * 8); - if (ctr) { - delete ctr; - ctr = NULL; - } - if (key.length != 0) { - if (key.length == 16) - ctr = new CTR(); - else - ctr = new CTR(); - - ctr->setKey(key.bytes, key.length); - } - } - - /** - * Encrypt a packet - * - * @param bytes is updated in place - */ - virtual void encrypt(uint32_t fromNode, uint64_t packetId, size_t numBytes, uint8_t *bytes) override - { - if (key.length > 0) { - initNonce(fromNode, packetId); - if (numBytes <= MAX_BLOCKSIZE) { - static uint8_t scratch[MAX_BLOCKSIZE]; - memcpy(scratch, bytes, numBytes); - memset(scratch + numBytes, 0, - sizeof(scratch) - numBytes); // Fill rest of buffer with zero (in case cypher looks at it) - - ctr->setIV(nonce, sizeof(nonce)); - ctr->setCounterSize(4); - ctr->encrypt(bytes, scratch, numBytes); - } else { - LOG_ERROR("Packet too large for crypto engine: %d. noop encryption!\n", numBytes); - } - } - } - - virtual void decrypt(uint32_t fromNode, uint64_t packetId, size_t numBytes, uint8_t *bytes) override - { - // For CTR, the implementation is the same - encrypt(fromNode, packetId, numBytes, bytes); - } - - private: -}; - -CryptoEngine *crypto = new CrossPlatformCryptoEngine(); diff --git a/src/platform/portduino/PortduinoGlue.cpp b/src/platform/portduino/PortduinoGlue.cpp index c8fcc3d13..e56016a5b 100644 --- a/src/platform/portduino/PortduinoGlue.cpp +++ b/src/platform/portduino/PortduinoGlue.cpp @@ -17,10 +17,11 @@ std::map settingsMap; std::map settingsStrings; +std::ofstream traceFile; char *configPath = nullptr; // FIXME - move setBluetoothEnable into a HALPlatform class -void setBluetoothEnable(bool on) +void setBluetoothEnable(bool enable) { // not needed } @@ -74,9 +75,31 @@ void portduinoCustomInit() void portduinoSetup() { printf("Setting up Meshtastic on Portduino...\n"); - gpioInit(); + int max_GPIO = 0; + const configNames GPIO_lines[] = {cs, + irq, + busy, + reset, + sx126x_ant_sw, + txen, + rxen, + displayDC, + displayCS, + displayBacklight, + displayBacklightPWMChannel, + displayReset, + touchscreenCS, + touchscreenIRQ, + user}; std::string gpioChipName = "gpiochip"; + settingsStrings[i2cdev] = ""; + settingsStrings[keyboardDevice] = ""; + settingsStrings[webserverrootpath] = ""; + settingsStrings[spidev] = ""; + settingsStrings[displayspidev] = ""; + settingsMap[spiSpeed] = 2000000; + settingsMap[ascii_logs] = !isatty(1); YAML::Node yamlConfig; @@ -84,7 +107,7 @@ void portduinoSetup() std::cout << "Using " << configPath << " as config file" << std::endl; try { yamlConfig = YAML::LoadFile(configPath); - } catch (YAML::Exception e) { + } catch (YAML::Exception &e) { std::cout << "Could not open " << configPath << " because of error: " << e.what() << std::endl; exit(EXIT_FAILURE); } @@ -92,7 +115,7 @@ void portduinoSetup() std::cout << "Using local config.yaml as config file" << std::endl; try { yamlConfig = YAML::LoadFile("config.yaml"); - } catch (YAML::Exception e) { + } catch (YAML::Exception &e) { std::cout << "*** Exception " << e.what() << std::endl; exit(EXIT_FAILURE); } @@ -100,20 +123,27 @@ void portduinoSetup() std::cout << "Using /etc/meshtasticd/config.yaml as config file" << std::endl; try { yamlConfig = YAML::LoadFile("/etc/meshtasticd/config.yaml"); - } catch (YAML::Exception e) { + } catch (YAML::Exception &e) { std::cout << "*** Exception " << e.what() << std::endl; exit(EXIT_FAILURE); } } else { std::cout << "No 'config.yaml' found, running simulated." << std::endl; + settingsMap[maxnodes] = 200; // Default to 200 nodes + settingsMap[logoutputlevel] = level_debug; // Default to debug // Set the random seed equal to TCPPort to have a different seed per instance randomSeed(TCPPort); return; } + // Rather important to set this, if not running simulated. + randomSeed(time(NULL)); + try { if (yamlConfig["Logging"]) { - if (yamlConfig["Logging"]["LogLevel"].as("info") == "debug") { + if (yamlConfig["Logging"]["LogLevel"].as("info") == "trace") { + settingsMap[logoutputlevel] = level_trace; + } else if (yamlConfig["Logging"]["LogLevel"].as("info") == "debug") { settingsMap[logoutputlevel] = level_debug; } else if (yamlConfig["Logging"]["LogLevel"].as("info") == "info") { settingsMap[logoutputlevel] = level_info; @@ -122,11 +152,17 @@ void portduinoSetup() } else if (yamlConfig["Logging"]["LogLevel"].as("info") == "error") { settingsMap[logoutputlevel] = level_error; } + settingsStrings[traceFilename] = yamlConfig["Logging"]["TraceFile"].as(""); + if (yamlConfig["Logging"]["AsciiLogs"]) { + // Default is !isatty(1) but can be set explicitly in config.yaml + settingsMap[ascii_logs] = yamlConfig["Logging"]["AsciiLogs"].as(); + } } if (yamlConfig["Lora"]) { settingsMap[use_sx1262] = false; settingsMap[use_rf95] = false; settingsMap[use_sx1280] = false; + settingsMap[use_sx1268] = false; if (yamlConfig["Lora"]["Module"] && yamlConfig["Lora"]["Module"].as("") == "sx1262") { settingsMap[use_sx1262] = true; @@ -134,6 +170,8 @@ void portduinoSetup() settingsMap[use_rf95] = true; } else if (yamlConfig["Lora"]["Module"] && yamlConfig["Lora"]["Module"].as("") == "sx1280") { settingsMap[use_sx1280] = true; + } else if (yamlConfig["Lora"]["Module"] && yamlConfig["Lora"]["Module"].as("") == "sx1268") { + settingsMap[use_sx1268] = true; } settingsMap[dio2_as_rf_switch] = yamlConfig["Lora"]["DIO2_AS_RF_SWITCH"].as(false); settingsMap[dio3_tcxo_voltage] = yamlConfig["Lora"]["DIO3_TCXO_VOLTAGE"].as(false); @@ -143,10 +181,22 @@ void portduinoSetup() settingsMap[reset] = yamlConfig["Lora"]["Reset"].as(RADIOLIB_NC); settingsMap[txen] = yamlConfig["Lora"]["TXen"].as(RADIOLIB_NC); settingsMap[rxen] = yamlConfig["Lora"]["RXen"].as(RADIOLIB_NC); + settingsMap[sx126x_ant_sw] = yamlConfig["Lora"]["SX126X_ANT_SW"].as(RADIOLIB_NC); settingsMap[gpiochip] = yamlConfig["Lora"]["gpiochip"].as(0); + settingsMap[ch341Quirk] = yamlConfig["Lora"]["ch341_quirk"].as(false); + settingsMap[spiSpeed] = yamlConfig["Lora"]["spiSpeed"].as(2000000); gpioChipName += std::to_string(settingsMap[gpiochip]); settingsStrings[spidev] = "/dev/" + yamlConfig["Lora"]["spidev"].as("spidev0.0"); + if (settingsStrings[spidev].length() == 14) { + int x = settingsStrings[spidev].at(11) - '0'; + int y = settingsStrings[spidev].at(13) - '0'; + if (x >= 0 && x < 10 && y >= 0 && y < 10) { + settingsMap[spidev] = x + y << 4; + settingsMap[displayspidev] = settingsMap[spidev]; + settingsMap[touchscreenspidev] = settingsMap[spidev]; + } + } } if (yamlConfig["GPIO"]) { settingsMap[user] = yamlConfig["GPIO"]["User"].as(RADIOLIB_NC); @@ -169,18 +219,44 @@ void portduinoSetup() settingsMap[displayPanel] = st7735; else if (yamlConfig["Display"]["Panel"].as("") == "ST7735S") settingsMap[displayPanel] = st7735s; + else if (yamlConfig["Display"]["Panel"].as("") == "ST7796") + settingsMap[displayPanel] = st7796; else if (yamlConfig["Display"]["Panel"].as("") == "ILI9341") settingsMap[displayPanel] = ili9341; + else if (yamlConfig["Display"]["Panel"].as("") == "ILI9342") + settingsMap[displayPanel] = ili9342; + else if (yamlConfig["Display"]["Panel"].as("") == "ILI9488") + settingsMap[displayPanel] = ili9488; + else if (yamlConfig["Display"]["Panel"].as("") == "HX8357D") + settingsMap[displayPanel] = hx8357d; + else if (yamlConfig["Display"]["Panel"].as("") == "X11") + settingsMap[displayPanel] = x11; settingsMap[displayHeight] = yamlConfig["Display"]["Height"].as(0); settingsMap[displayWidth] = yamlConfig["Display"]["Width"].as(0); settingsMap[displayDC] = yamlConfig["Display"]["DC"].as(-1); settingsMap[displayCS] = yamlConfig["Display"]["CS"].as(-1); + settingsMap[displayRGBOrder] = yamlConfig["Display"]["RGBOrder"].as(false); settingsMap[displayBacklight] = yamlConfig["Display"]["Backlight"].as(-1); + settingsMap[displayBacklightInvert] = yamlConfig["Display"]["BacklightInvert"].as(false); + settingsMap[displayBacklightPWMChannel] = yamlConfig["Display"]["BacklightPWMChannel"].as(-1); settingsMap[displayReset] = yamlConfig["Display"]["Reset"].as(-1); settingsMap[displayOffsetX] = yamlConfig["Display"]["OffsetX"].as(0); settingsMap[displayOffsetY] = yamlConfig["Display"]["OffsetY"].as(0); settingsMap[displayRotate] = yamlConfig["Display"]["Rotate"].as(false); + settingsMap[displayOffsetRotate] = yamlConfig["Display"]["OffsetRotate"].as(1); settingsMap[displayInvert] = yamlConfig["Display"]["Invert"].as(false); + settingsMap[displayBusFrequency] = yamlConfig["Display"]["BusFrequency"].as(40000000); + if (yamlConfig["Display"]["spidev"]) { + settingsStrings[displayspidev] = "/dev/" + yamlConfig["Display"]["spidev"].as("spidev0.1"); + if (settingsStrings[displayspidev].length() == 14) { + int x = settingsStrings[displayspidev].at(11) - '0'; + int y = settingsStrings[displayspidev].at(13) - '0'; + if (x >= 0 && x < 10 && y >= 0 && y < 10) { + settingsMap[displayspidev] = x + y << 4; + settingsMap[touchscreenspidev] = settingsMap[displayspidev]; + } + } + } } settingsMap[touchscreenModule] = no_touchscreen; if (yamlConfig["Touchscreen"]) { @@ -188,19 +264,53 @@ void portduinoSetup() settingsMap[touchscreenModule] = xpt2046; else if (yamlConfig["Touchscreen"]["Module"].as("") == "STMPE610") settingsMap[touchscreenModule] = stmpe610; + else if (yamlConfig["Touchscreen"]["Module"].as("") == "GT911") + settingsMap[touchscreenModule] = gt911; + else if (yamlConfig["Touchscreen"]["Module"].as("") == "FT5x06") + settingsMap[touchscreenModule] = ft5x06; settingsMap[touchscreenCS] = yamlConfig["Touchscreen"]["CS"].as(-1); settingsMap[touchscreenIRQ] = yamlConfig["Touchscreen"]["IRQ"].as(-1); + settingsMap[touchscreenBusFrequency] = yamlConfig["Touchscreen"]["BusFrequency"].as(1000000); + settingsMap[touchscreenRotate] = yamlConfig["Touchscreen"]["Rotate"].as(-1); + settingsMap[touchscreenI2CAddr] = yamlConfig["Touchscreen"]["I2CAddr"].as(-1); + if (yamlConfig["Touchscreen"]["spidev"]) { + settingsStrings[touchscreenspidev] = "/dev/" + yamlConfig["Touchscreen"]["spidev"].as(""); + if (settingsStrings[touchscreenspidev].length() == 14) { + int x = settingsStrings[touchscreenspidev].at(11) - '0'; + int y = settingsStrings[touchscreenspidev].at(13) - '0'; + if (x >= 0 && x < 10 && y >= 0 && y < 10) { + settingsMap[touchscreenspidev] = x + y << 4; + } + } + } } if (yamlConfig["Input"]) { settingsStrings[keyboardDevice] = (yamlConfig["Input"]["KeyboardDevice"]).as(""); } - } catch (YAML::Exception e) { + if (yamlConfig["Webserver"]) { + settingsMap[webserverport] = (yamlConfig["Webserver"]["Port"]).as(-1); + settingsStrings[webserverrootpath] = (yamlConfig["Webserver"]["RootPath"]).as(""); + } + + settingsMap[maxnodes] = (yamlConfig["General"]["MaxNodes"]).as(200); + settingsMap[maxtophone] = (yamlConfig["General"]["MaxMessageQueue"]).as(100); + + } catch (YAML::Exception &e) { std::cout << "*** Exception " << e.what() << std::endl; exit(EXIT_FAILURE); } + for (configNames i : GPIO_lines) { + if (settingsMap.count(i) && settingsMap[i] > max_GPIO) + max_GPIO = settingsMap[i]; + } + + gpioInit(max_GPIO + 1); // Done here so we can inform Portduino how many GPIOs we need. + // Need to bind all the configured GPIO pins so they're not simulated + // TODO: Can we do this in the for loop above? + // TODO: If one of these fails, we should log and terminate if (settingsMap.count(cs) > 0 && settingsMap[cs] != RADIOLIB_NC) { if (initGPIOPin(settingsMap[cs], gpioChipName) != ERRNO_OK) { settingsMap[cs] = RADIOLIB_NC; @@ -221,6 +331,11 @@ void portduinoSetup() settingsMap[reset] = RADIOLIB_NC; } } + if (settingsMap.count(sx126x_ant_sw) > 0 && settingsMap[sx126x_ant_sw] != RADIOLIB_NC) { + if (initGPIOPin(settingsMap[sx126x_ant_sw], gpioChipName) != ERRNO_OK) { + settingsMap[sx126x_ant_sw] = RADIOLIB_NC; + } + } if (settingsMap.count(user) > 0 && settingsMap[user] != RADIOLIB_NC) { if (initGPIOPin(settingsMap[user], gpioChipName) != ERRNO_OK) { settingsMap[user] = RADIOLIB_NC; @@ -254,11 +369,24 @@ void portduinoSetup() initGPIOPin(settingsMap[touchscreenIRQ], gpioChipName); } + if (settingsStrings[spidev] != "") { + SPI.begin(settingsStrings[spidev].c_str()); + } + if (settingsStrings[traceFilename] != "") { + try { + traceFile.open(settingsStrings[traceFilename], std::ios::out | std::ios::app); + } catch (std::ofstream::failure &e) { + std::cout << "*** traceFile Exception " << e.what() << std::endl; + exit(EXIT_FAILURE); + } + } + return; } -int initGPIOPin(int pinNum, std::string gpioChipName) +int initGPIOPin(int pinNum, const std::string gpioChipName) { +#ifdef PORTDUINO_LINUX_HARDWARE std::string gpio_name = "GPIO" + std::to_string(pinNum); try { GPIOPin *csPin; @@ -271,4 +399,7 @@ int initGPIOPin(int pinNum, std::string gpioChipName) std::cout << "Warning, cannot claim pin " << gpio_name << (p ? p.__cxa_exception_type()->name() : "null") << std::endl; return ERRNO_DISABLED; } +#else + return ERRNO_OK; +#endif } \ No newline at end of file diff --git a/src/platform/portduino/PortduinoGlue.h b/src/platform/portduino/PortduinoGlue.h index f8da20e37..8ee96717e 100644 --- a/src/platform/portduino/PortduinoGlue.h +++ b/src/platform/portduino/PortduinoGlue.h @@ -1,4 +1,5 @@ #pragma once +#include #include enum configNames { @@ -7,38 +8,60 @@ enum configNames { irq, busy, reset, + sx126x_ant_sw, txen, rxen, dio2_as_rf_switch, dio3_tcxo_voltage, + ch341Quirk, use_rf95, use_sx1280, + use_sx1268, user, gpiochip, spidev, + spiSpeed, i2cdev, has_gps, touchscreenModule, touchscreenCS, touchscreenIRQ, + touchscreenI2CAddr, + touchscreenBusFrequency, + touchscreenRotate, + touchscreenspidev, + displayspidev, + displayBusFrequency, displayPanel, displayWidth, displayHeight, displayCS, displayDC, + displayRGBOrder, displayBacklight, + displayBacklightPWMChannel, + displayBacklightInvert, displayReset, displayRotate, + displayOffsetRotate, displayOffsetX, displayOffsetY, displayInvert, keyboardDevice, - logoutputlevel + logoutputlevel, + traceFilename, + webserver, + webserverport, + webserverrootpath, + maxtophone, + maxnodes, + ascii_logs }; -enum { no_screen, st7789, st7735, st7735s, ili9341 }; -enum { no_touchscreen, xpt2046, stmpe610 }; -enum { level_error, level_warn, level_info, level_debug }; +enum { no_screen, x11, st7789, st7735, st7735s, st7796, ili9341, ili9342, ili9488, hx8357d }; +enum { no_touchscreen, xpt2046, stmpe610, gt911, ft5x06 }; +enum { level_error, level_warn, level_info, level_debug, level_trace }; extern std::map settingsMap; extern std::map settingsStrings; +extern std::ofstream traceFile; int initGPIOPin(int pinNum, std::string gpioChipname); \ No newline at end of file diff --git a/src/platform/portduino/SimRadio.cpp b/src/platform/portduino/SimRadio.cpp index d0072cf35..12757fe6b 100644 --- a/src/platform/portduino/SimRadio.cpp +++ b/src/platform/portduino/SimRadio.cpp @@ -199,8 +199,8 @@ void SimRadio::startSend(meshtastic_MeshPacket *txp) pb_encode_to_bytes(p->decoded.payload.bytes, sizeof(p->decoded.payload.bytes), &meshtastic_Compressed_msg, &c); p->decoded.portnum = meshtastic_PortNum_SIMULATOR_APP; - service.sendQueueStatusToPhone(router->getQueueStatus(), 0, p->id); - service.sendToPhone(p); // Sending back to simulator + service->sendQueueStatusToPhone(router->getQueueStatus(), 0, p->id); + service->sendToPhone(p); // Sending back to simulator } void SimRadio::startReceive(meshtastic_MeshPacket *p) diff --git a/src/platform/rp2040/main-rp2040.cpp b/src/platform/rp2040/main-rp2040.cpp deleted file mode 100644 index 3359263e9..000000000 --- a/src/platform/rp2040/main-rp2040.cpp +++ /dev/null @@ -1,43 +0,0 @@ -#include "configuration.h" -#include -#include - -void setBluetoothEnable(bool on) -{ - // not needed -} - -void cpuDeepSleep(uint32_t msecs) -{ - // not needed -} - -void updateBatteryLevel(uint8_t level) -{ - // not needed -} - -void getMacAddr(uint8_t *dmac) -{ - pico_unique_board_id_t src; - pico_get_unique_board_id(&src); - dmac[5] = src.id[7]; - dmac[4] = src.id[6]; - dmac[3] = src.id[5]; - dmac[2] = src.id[4]; - dmac[1] = src.id[3]; - dmac[0] = src.id[2]; -} - -void rp2040Setup() -{ - /* Sets a random seed to make sure we get different random numbers on each boot. - Taken from CPU cycle counter and ROSC oscillator, so should be pretty random. - */ - randomSeed(rp2040.hwrand32()); -} - -void enterDfuMode() -{ - reset_usb_boot(0, 0); -} \ No newline at end of file diff --git a/src/platform/rp2040/rp2040CryptoEngine.cpp b/src/platform/rp2040/rp2040CryptoEngine.cpp deleted file mode 100644 index 5486e51e5..000000000 --- a/src/platform/rp2040/rp2040CryptoEngine.cpp +++ /dev/null @@ -1,66 +0,0 @@ -#include "AES.h" -#include "CTR.h" -#include "CryptoEngine.h" -#include "configuration.h" - -class RP2040CryptoEngine : public CryptoEngine -{ - - CTRCommon *ctr = NULL; - - public: - RP2040CryptoEngine() {} - - ~RP2040CryptoEngine() {} - - virtual void setKey(const CryptoKey &k) override - { - CryptoEngine::setKey(k); - LOG_DEBUG("Installing AES%d key!\n", key.length * 8); - if (ctr) { - delete ctr; - ctr = NULL; - } - if (key.length != 0) { - if (key.length == 16) - ctr = new CTR(); - else - ctr = new CTR(); - - ctr->setKey(key.bytes, key.length); - } - } - /** - * Encrypt a packet - * - * @param bytes is updated in place - */ - virtual void encrypt(uint32_t fromNode, uint64_t packetId, size_t numBytes, uint8_t *bytes) override - { - if (key.length > 0) { - initNonce(fromNode, packetId); - if (numBytes <= MAX_BLOCKSIZE) { - static uint8_t scratch[MAX_BLOCKSIZE]; - memcpy(scratch, bytes, numBytes); - memset(scratch + numBytes, 0, - sizeof(scratch) - numBytes); // Fill rest of buffer with zero (in case cypher looks at it) - - ctr->setIV(nonce, sizeof(nonce)); - ctr->setCounterSize(4); - ctr->encrypt(bytes, scratch, numBytes); - } else { - LOG_ERROR("Packet too large for crypto engine: %d. noop encryption!\n", numBytes); - } - } - } - - virtual void decrypt(uint32_t fromNode, uint64_t packetId, size_t numBytes, uint8_t *bytes) override - { - // For CTR, the implementation is the same - encrypt(fromNode, packetId, numBytes, bytes); - } - - private: -}; - -CryptoEngine *crypto = new RP2040CryptoEngine(); diff --git a/src/platform/rp2040/architecture.h b/src/platform/rp2xx0/architecture.h similarity index 78% rename from src/platform/rp2040/architecture.h rename to src/platform/rp2xx0/architecture.h index d7d7214c0..8c7dfc0cd 100644 --- a/src/platform/rp2040/architecture.h +++ b/src/platform/rp2xx0/architecture.h @@ -23,10 +23,14 @@ #if defined(RPI_PICO) #define HW_VENDOR meshtastic_HardwareModel_RPI_PICO +#elif defined(RPI_PICO2) +#define HW_VENDOR meshtastic_HardwareModel_RPI_PICO2 #elif defined(RAK11310) #define HW_VENDOR meshtastic_HardwareModel_RAK11310 #elif defined(SENSELORA_RP2040) #define HW_VENDOR meshtastic_HardwareModel_SENSELORA_RP2040 #elif defined(RP2040_LORA) #define HW_VENDOR meshtastic_HardwareModel_RP2040_LORA +#elif defined(RP2040_FEATHER_RFM95) +#define HW_VENDOR meshtastic_HardwareModel_RP2040_FEATHER_RFM95 #endif \ No newline at end of file diff --git a/src/platform/rp2xx0/hardware_rosc/include/hardware/rosc.h b/src/platform/rp2xx0/hardware_rosc/include/hardware/rosc.h new file mode 100644 index 000000000..e1e014f33 --- /dev/null +++ b/src/platform/rp2xx0/hardware_rosc/include/hardware/rosc.h @@ -0,0 +1,93 @@ +/* + * Copyright (c) 2020 Raspberry Pi (Trading) Ltd. + * + * SPDX-License-Identifier: BSD-3-Clause + */ + +#ifndef _HARDWARE_ROSC_H_ +#define _HARDWARE_ROSC_H_ + +#include "hardware/structs/rosc.h" +#include "pico.h" + +#ifdef __cplusplus +extern "C" { +#endif + +/** \file rosc.h + * \defgroup hardware_rosc hardware_rosc + * + * Ring Oscillator (ROSC) API + * + * A Ring Oscillator is an on-chip oscillator that requires no external crystal. Instead, the output is generated from a series of + * inverters that are chained together to create a feedback loop. RP2040 boots from the ring oscillator initially, meaning the + * first stages of the bootrom, including booting from SPI flash, will be clocked by the ring oscillator. If your design has a + * crystal oscillator, you’ll likely want to switch to this as your reference clock as soon as possible, because the frequency is + * more accurate than the ring oscillator. + */ + +/*! \brief Set frequency of the Ring Oscillator + * \ingroup hardware_rosc + * + * \param code The drive strengths. See the RP2040 datasheet for information on this value. + */ +void rosc_set_freq(uint32_t code); + +/*! \brief Set range of the Ring Oscillator + * \ingroup hardware_rosc + * + * Frequency range. Frequencies will vary with Process, Voltage & Temperature (PVT). + * Clock output will not glitch when changing the range up one step at a time. + * + * \param range 0x01 Low, 0x02 Medium, 0x03 High, 0x04 Too High. + */ +void rosc_set_range(uint range); + +/*! \brief Disable the Ring Oscillator + * \ingroup hardware_rosc + * + */ +void rosc_disable(void); + +/*! \brief Put Ring Oscillator in to dormant mode. + * \ingroup hardware_rosc + * + * The ROSC supports a dormant mode,which stops oscillation until woken up up by an asynchronous interrupt. + * This can either come from the RTC, being clocked by an external clock, or a GPIO pin going high or low. + * If no IRQ is configured before going into dormant mode the ROSC will never restart. + * + * PLLs should be stopped before selecting dormant mode. + */ +void rosc_set_dormant(void); + +// FIXME: Add doxygen + +uint32_t next_rosc_code(uint32_t code); + +uint rosc_find_freq(uint32_t low_mhz, uint32_t high_mhz); + +void rosc_set_div(uint32_t div); + +inline static void rosc_clear_bad_write(void) +{ + hw_clear_bits(&rosc_hw->status, ROSC_STATUS_BADWRITE_BITS); +} + +inline static bool rosc_write_okay(void) +{ + return !(rosc_hw->status & ROSC_STATUS_BADWRITE_BITS); +} + +inline static void rosc_write(io_rw_32 *addr, uint32_t value) +{ + rosc_clear_bad_write(); + assert(rosc_write_okay()); + *addr = value; + assert(rosc_write_okay()); +}; + +#ifdef __cplusplus +} +#endif + +#endif \ No newline at end of file diff --git a/src/platform/rp2xx0/hardware_rosc/rosc.c b/src/platform/rp2xx0/hardware_rosc/rosc.c new file mode 100644 index 000000000..f79929f8d --- /dev/null +++ b/src/platform/rp2xx0/hardware_rosc/rosc.c @@ -0,0 +1,70 @@ +/* + * Copyright (c) 2020 Raspberry Pi (Trading) Ltd. + * + * SPDX-License-Identifier: BSD-3-Clause + */ + +#include "pico.h" + +// For MHZ definitions etc +#include "hardware/clocks.h" +#include "hardware/rosc.h" + +// Given a ROSC delay stage code, return the next-numerically-higher code. +// Top result bit is set when called on maximum ROSC code. +uint32_t next_rosc_code(uint32_t code) +{ + return ((code | 0x08888888u) + 1u) & 0xf7777777u; +} + +uint rosc_find_freq(uint32_t low_mhz, uint32_t high_mhz) +{ + // TODO: This could be a lot better + rosc_set_div(1); + for (uint32_t code = 0; code <= 0x77777777u; code = next_rosc_code(code)) { + rosc_set_freq(code); + uint rosc_mhz = frequency_count_khz(CLOCKS_FC0_SRC_VALUE_ROSC_CLKSRC) / 1000; + if ((rosc_mhz >= low_mhz) && (rosc_mhz <= high_mhz)) { + return rosc_mhz; + } + } + return 0; +} + +void rosc_set_div(uint32_t div) +{ + assert(div <= 31 && div >= 1); + rosc_write(&rosc_hw->div, ROSC_DIV_VALUE_PASS + div); +} + +void rosc_set_freq(uint32_t code) +{ + rosc_write(&rosc_hw->freqa, (ROSC_FREQA_PASSWD_VALUE_PASS << ROSC_FREQA_PASSWD_LSB) | (code & 0xffffu)); + rosc_write(&rosc_hw->freqb, (ROSC_FREQA_PASSWD_VALUE_PASS << ROSC_FREQA_PASSWD_LSB) | (code >> 16u)); +} + +void rosc_set_range(uint range) +{ + // Range should use enumvals from the headers and thus have the password correct + rosc_write(&rosc_hw->ctrl, (ROSC_CTRL_ENABLE_VALUE_ENABLE << ROSC_CTRL_ENABLE_LSB) | range); +} + +void rosc_disable(void) +{ + uint32_t tmp = rosc_hw->ctrl; + tmp &= (~ROSC_CTRL_ENABLE_BITS); + tmp |= (ROSC_CTRL_ENABLE_VALUE_DISABLE << ROSC_CTRL_ENABLE_LSB); + rosc_write(&rosc_hw->ctrl, tmp); + // Wait for stable to go away + while (rosc_hw->status & ROSC_STATUS_STABLE_BITS) + ; +} + +void rosc_set_dormant(void) +{ + // WARNING: This stops the rosc until woken up by an irq + rosc_write(&rosc_hw->dormant, ROSC_DORMANT_VALUE_DORMANT); + // Wait for it to become stable once woken up + while (!(rosc_hw->status & ROSC_STATUS_STABLE_BITS)) + ; +} \ No newline at end of file diff --git a/src/platform/rp2xx0/main-rp2xx0.cpp b/src/platform/rp2xx0/main-rp2xx0.cpp new file mode 100644 index 000000000..67bf1eb08 --- /dev/null +++ b/src/platform/rp2xx0/main-rp2xx0.cpp @@ -0,0 +1,147 @@ +#include "configuration.h" +#include "hardware/xosc.h" +#include +#include +#include +#include +#include + +void setBluetoothEnable(bool enable) +{ + // not needed +} + +static bool awake; + +static void sleep_callback(void) +{ + awake = true; +} + +void epoch_to_datetime(time_t epoch, datetime_t *dt) +{ + struct tm *tm_info; + + tm_info = gmtime(&epoch); + dt->year = tm_info->tm_year; + dt->month = tm_info->tm_mon + 1; + dt->day = tm_info->tm_mday; + dt->dotw = tm_info->tm_wday; + dt->hour = tm_info->tm_hour; + dt->min = tm_info->tm_min; + dt->sec = tm_info->tm_sec; +} + +void debug_date(datetime_t t) +{ + LOG_DEBUG("%d %d %d %d %d %d %d\n", t.year, t.month, t.day, t.hour, t.min, t.sec, t.dotw); + uart_default_tx_wait_blocking(); +} + +void cpuDeepSleep(uint32_t msecs) +{ + + time_t seconds = (time_t)(msecs / 1000); + datetime_t t_init, t_alarm; + + awake = false; + // Start the RTC + rtc_init(); + epoch_to_datetime(0, &t_init); + rtc_set_datetime(&t_init); + epoch_to_datetime(seconds, &t_alarm); + // debug_date(t_init); + // debug_date(t_alarm); + uart_default_tx_wait_blocking(); + sleep_run_from_dormant_source(DORMANT_SOURCE_ROSC); + sleep_goto_sleep_until(&t_alarm, &sleep_callback); + + // Make sure we don't wake + while (!awake) { + delay(1); + } + + /* For now, I don't know how to revert this state + We just reboot in order to get back operational */ + rp2040.reboot(); + + /* Set RP2040 in dormant mode. Will not wake up. */ + // xosc_dormant(); +} + +void updateBatteryLevel(uint8_t level) +{ + // not needed +} + +void getMacAddr(uint8_t *dmac) +{ + pico_unique_board_id_t src; + pico_get_unique_board_id(&src); + dmac[5] = src.id[7]; + dmac[4] = src.id[6]; + dmac[3] = src.id[5]; + dmac[2] = src.id[4]; + dmac[1] = src.id[3]; + dmac[0] = src.id[2]; +} + +void rp2040Setup() +{ + /* Sets a random seed to make sure we get different random numbers on each boot. + Taken from CPU cycle counter and ROSC oscillator, so should be pretty random. + */ + randomSeed(rp2040.hwrand32()); + +#ifdef RP2040_SLOW_CLOCK + uint f_pll_sys = frequency_count_khz(CLOCKS_FC0_SRC_VALUE_PLL_SYS_CLKSRC_PRIMARY); + uint f_pll_usb = frequency_count_khz(CLOCKS_FC0_SRC_VALUE_PLL_USB_CLKSRC_PRIMARY); + uint f_rosc = frequency_count_khz(CLOCKS_FC0_SRC_VALUE_ROSC_CLKSRC); + uint f_clk_sys = frequency_count_khz(CLOCKS_FC0_SRC_VALUE_CLK_SYS); + uint f_clk_peri = frequency_count_khz(CLOCKS_FC0_SRC_VALUE_CLK_PERI); + uint f_clk_usb = frequency_count_khz(CLOCKS_FC0_SRC_VALUE_CLK_USB); + uint f_clk_adc = frequency_count_khz(CLOCKS_FC0_SRC_VALUE_CLK_ADC); + uint f_clk_rtc = frequency_count_khz(CLOCKS_FC0_SRC_VALUE_CLK_RTC); + + LOG_INFO("Clock speed:\n"); + LOG_INFO("pll_sys = %dkHz\n", f_pll_sys); + LOG_INFO("pll_usb = %dkHz\n", f_pll_usb); + LOG_INFO("rosc = %dkHz\n", f_rosc); + LOG_INFO("clk_sys = %dkHz\n", f_clk_sys); + LOG_INFO("clk_peri = %dkHz\n", f_clk_peri); + LOG_INFO("clk_usb = %dkHz\n", f_clk_usb); + LOG_INFO("clk_adc = %dkHz\n", f_clk_adc); + LOG_INFO("clk_rtc = %dkHz\n", f_clk_rtc); +#endif +} + +void enterDfuMode() +{ + reset_usb_boot(0, 0); +} + +/* Init in early boot state. */ +#ifdef RP2040_SLOW_CLOCK +void initVariant() +{ + /* Set the system frequency to 18 MHz. */ + set_sys_clock_khz(18 * KHZ, false); + /* The previous line automatically detached clk_peri from clk_sys, and + attached it to pll_usb. We need to attach clk_peri back to system PLL to keep SPI + working at this low speed. + For details see https://github.com/jgromes/RadioLib/discussions/938 + */ + clock_configure(clk_peri, + 0, // No glitchless mux + CLOCKS_CLK_PERI_CTRL_AUXSRC_VALUE_CLKSRC_PLL_SYS, // System PLL on AUX mux + 18 * MHZ, // Input frequency + 18 * MHZ // Output (must be same as no divider) + ); + /* Run also ADC on lower clk_sys. */ + clock_configure(clk_adc, 0, CLOCKS_CLK_ADC_CTRL_AUXSRC_VALUE_CLKSRC_PLL_SYS, 18 * MHZ, 18 * MHZ); + /* Run RTC from XOSC since USB clock is off */ + clock_configure(clk_rtc, 0, CLOCKS_CLK_RTC_CTRL_AUXSRC_VALUE_XOSC_CLKSRC, 12 * MHZ, 47 * KHZ); + /* Turn off USB PLL */ + pll_deinit(pll_usb); +} +#endif \ No newline at end of file diff --git a/src/platform/rp2xx0/pico_sleep/include/pico/sleep.h b/src/platform/rp2xx0/pico_sleep/include/pico/sleep.h new file mode 100644 index 000000000..17dff2468 --- /dev/null +++ b/src/platform/rp2xx0/pico_sleep/include/pico/sleep.h @@ -0,0 +1,107 @@ +/* + * Copyright (c) 2020 Raspberry Pi (Trading) Ltd. + * + * SPDX-License-Identifier: BSD-3-Clause + */ + +#ifndef _PICO_SLEEP_H_ +#define _PICO_SLEEP_H_ + +#include "hardware/rtc.h" +#include "pico.h" + +#ifdef __cplusplus +extern "C" { +#endif + +/** \file sleep.h + * \defgroup hardware_sleep hardware_sleep + * + * Lower Power Sleep API + * + * The difference between sleep and dormant is that ALL clocks are stopped in dormant mode, + * until the source (either xosc or rosc) is started again by an external event. + * In sleep mode some clocks can be left running controlled by the SLEEP_EN registers in the clocks + * block. For example you could keep clk_rtc running. Some destinations (proc0 and proc1 wakeup logic) + * can't be stopped in sleep mode otherwise there wouldn't be enough logic to wake up again. + * + * \subsection sleep_example Example + * \addtogroup hardware_sleep + * \include hello_sleep.c + + */ +typedef enum { DORMANT_SOURCE_NONE, DORMANT_SOURCE_XOSC, DORMANT_SOURCE_ROSC } dormant_source_t; + +/*! \brief Set all clock sources to the the dormant clock source to prepare for sleep. + * \ingroup hardware_sleep + * + * \param dormant_source The dormant clock source to use + */ +void sleep_run_from_dormant_source(dormant_source_t dormant_source); + +/*! \brief Set the dormant clock source to be the crystal oscillator + * \ingroup hardware_sleep + */ +static inline void sleep_run_from_xosc(void) +{ + sleep_run_from_dormant_source(DORMANT_SOURCE_XOSC); +} + +/*! \brief Set the dormant clock source to be the ring oscillator + * \ingroup hardware_sleep + */ +static inline void sleep_run_from_rosc(void) +{ + sleep_run_from_dormant_source(DORMANT_SOURCE_ROSC); +} + +/*! \brief Send system to sleep until the specified time + * \ingroup hardware_sleep + * + * One of the sleep_run_* functions must be called prior to this call + * + * \param t The time to wake up + * \param callback Function to call on wakeup. + */ +void sleep_goto_sleep_until(datetime_t *t, rtc_callback_t callback); + +/*! \brief Send system to sleep until the specified GPIO changes + * \ingroup hardware_sleep + * + * One of the sleep_run_* functions must be called prior to this call + * + * \param gpio_pin The pin to provide the wake up + * \param edge true for leading edge, false for trailing edge + * \param high true for active high, false for active low + */ +void sleep_goto_dormant_until_pin(uint gpio_pin, bool edge, bool high); + +/*! \brief Send system to sleep until a leading high edge is detected on GPIO + * \ingroup hardware_sleep + * + * One of the sleep_run_* functions must be called prior to this call + * + * \param gpio_pin The pin to provide the wake up + */ +static inline void sleep_goto_dormant_until_edge_high(uint gpio_pin) +{ + sleep_goto_dormant_until_pin(gpio_pin, true, true); +} + +/*! \brief Send system to sleep until a high level is detected on GPIO + * \ingroup hardware_sleep + * + * One of the sleep_run_* functions must be called prior to this call + * + * \param gpio_pin The pin to provide the wake up + */ +static inline void sleep_goto_dormant_until_level_high(uint gpio_pin) +{ + sleep_goto_dormant_until_pin(gpio_pin, false, true); +} + +#ifdef __cplusplus +} +#endif + +#endif \ No newline at end of file diff --git a/src/platform/rp2xx0/pico_sleep/sleep.c b/src/platform/rp2xx0/pico_sleep/sleep.c new file mode 100644 index 000000000..65096be85 --- /dev/null +++ b/src/platform/rp2xx0/pico_sleep/sleep.c @@ -0,0 +1,155 @@ +/* + * Copyright (c) 2020 Raspberry Pi (Trading) Ltd. + * + * SPDX-License-Identifier: BSD-3-Clause + */ + +#include "pico.h" + +#include "pico/sleep.h" +#include "pico/stdlib.h" + +#include "hardware/clocks.h" +#include "hardware/pll.h" +#include "hardware/regs/io_bank0.h" +#include "hardware/rosc.h" +#include "hardware/rtc.h" +#include "hardware/xosc.h" +// For __wfi +#include "hardware/sync.h" +// For scb_hw so we can enable deep sleep +#include "hardware/structs/scb.h" +// when using old SDK this macro is not defined +#ifndef XOSC_HZ +#define XOSC_HZ 12000000u +#endif +// The difference between sleep and dormant is that ALL clocks are stopped in dormant mode, +// until the source (either xosc or rosc) is started again by an external event. +// In sleep mode some clocks can be left running controlled by the SLEEP_EN registers in the clocks +// block. For example you could keep clk_rtc running. Some destinations (proc0 and proc1 wakeup logic) +// can't be stopped in sleep mode otherwise there wouldn't be enough logic to wake up again. + +// TODO: Optionally, memories can also be powered down. + +static dormant_source_t _dormant_source; + +bool dormant_source_valid(dormant_source_t dormant_source) +{ + return (dormant_source == DORMANT_SOURCE_XOSC) || (dormant_source == DORMANT_SOURCE_ROSC); +} + +// In order to go into dormant mode we need to be running from a stoppable clock source: +// either the xosc or rosc with no PLLs running. This means we disable the USB and ADC clocks +// and all PLLs +void sleep_run_from_dormant_source(dormant_source_t dormant_source) +{ + assert(dormant_source_valid(dormant_source)); + _dormant_source = dormant_source; + + // FIXME: Just defining average rosc freq here. + uint src_hz = (dormant_source == DORMANT_SOURCE_XOSC) ? XOSC_HZ : 6.5 * MHZ; + uint clk_ref_src = (dormant_source == DORMANT_SOURCE_XOSC) ? CLOCKS_CLK_REF_CTRL_SRC_VALUE_XOSC_CLKSRC + : CLOCKS_CLK_REF_CTRL_SRC_VALUE_ROSC_CLKSRC_PH; + + // CLK_REF = XOSC or ROSC + clock_configure(clk_ref, clk_ref_src, + 0, // No aux mux + src_hz, src_hz); + + // CLK SYS = CLK_REF + clock_configure(clk_sys, CLOCKS_CLK_SYS_CTRL_SRC_VALUE_CLK_REF, + 0, // Using glitchless mux + src_hz, src_hz); + + // CLK USB = 0MHz + clock_stop(clk_usb); + + // CLK ADC = 0MHz + clock_stop(clk_adc); + + // CLK RTC = ideally XOSC (12MHz) / 256 = 46875Hz but could be rosc + uint clk_rtc_src = (dormant_source == DORMANT_SOURCE_XOSC) ? CLOCKS_CLK_RTC_CTRL_AUXSRC_VALUE_XOSC_CLKSRC + : CLOCKS_CLK_RTC_CTRL_AUXSRC_VALUE_ROSC_CLKSRC_PH; + + clock_configure(clk_rtc, + 0, // No GLMUX + clk_rtc_src, src_hz, 46875); + + // CLK PERI = clk_sys. Used as reference clock for Peripherals. No dividers so just select and enable + clock_configure(clk_peri, 0, CLOCKS_CLK_PERI_CTRL_AUXSRC_VALUE_CLK_SYS, src_hz, src_hz); + + pll_deinit(pll_sys); + pll_deinit(pll_usb); + + // Assuming both xosc and rosc are running at the moment + if (dormant_source == DORMANT_SOURCE_XOSC) { + // Can disable rosc + rosc_disable(); + } else { + // Can disable xosc + xosc_disable(); + } + + // Reconfigure uart with new clocks + /* This dones not work with our current core */ + // setup_default_uart(); +} + +// Go to sleep until woken up by the RTC +void sleep_goto_sleep_until(datetime_t *t, rtc_callback_t callback) +{ + // We should have already called the sleep_run_from_dormant_source function + assert(dormant_source_valid(_dormant_source)); + + // Turn off all clocks when in sleep mode except for RTC + clocks_hw->sleep_en0 = CLOCKS_SLEEP_EN0_CLK_RTC_RTC_BITS; + clocks_hw->sleep_en1 = 0x0; + + rtc_set_alarm(t, callback); + + uint save = scb_hw->scr; + // Enable deep sleep at the proc + scb_hw->scr = save | M0PLUS_SCR_SLEEPDEEP_BITS; + + // Go to sleep + __wfi(); +} + +static void _go_dormant(void) +{ + assert(dormant_source_valid(_dormant_source)); + + if (_dormant_source == DORMANT_SOURCE_XOSC) { + xosc_dormant(); + } else { + rosc_set_dormant(); + } +} + +void sleep_goto_dormant_until_pin(uint gpio_pin, bool edge, bool high) +{ + bool low = !high; + bool level = !edge; + + // Configure the appropriate IRQ at IO bank 0 + assert(gpio_pin < NUM_BANK0_GPIOS); + + uint32_t event = 0; + + if (level && low) + event = IO_BANK0_DORMANT_WAKE_INTE0_GPIO0_LEVEL_LOW_BITS; + if (level && high) + event = IO_BANK0_DORMANT_WAKE_INTE0_GPIO0_LEVEL_HIGH_BITS; + if (edge && high) + event = IO_BANK0_DORMANT_WAKE_INTE0_GPIO0_EDGE_HIGH_BITS; + if (edge && low) + event = IO_BANK0_DORMANT_WAKE_INTE0_GPIO0_EDGE_LOW_BITS; + + gpio_set_dormant_irq_enabled(gpio_pin, event, true); + + _go_dormant(); + // Execution stops here until woken up + + // Clear the irq so we can go back to dormant mode again if we want + gpio_acknowledge_irq(gpio_pin, event); +} \ No newline at end of file diff --git a/src/platform/stm32wl/InternalFileSystem.cpp b/src/platform/stm32wl/InternalFileSystem.cpp deleted file mode 100644 index d42a646a5..000000000 --- a/src/platform/stm32wl/InternalFileSystem.cpp +++ /dev/null @@ -1,141 +0,0 @@ -/* - * The MIT License (MIT) - * - * Copyright (c) 2019 hathach for Adafruit Industries - * - * Permission is hereby granted, free of charge, to any person obtaining a copy - * of this software and associated documentation files (the "Software"), to deal - * in the Software without restriction, including without limitation the rights - * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell - * copies of the Software, and to permit persons to whom the Software is - * furnished to do so, subject to the following conditions: - * - * The above copyright notice and this permission notice shall be included in - * all copies or substantial portions of the Software. - * - * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR - * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, - * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE - * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER - * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, - * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN - * THE SOFTWARE. - */ - -#include "InternalFileSystem.h" -#include - -//--------------------------------------------------------------------+ -// LFS Disk IO -//--------------------------------------------------------------------+ - -static inline uint32_t lba2addr(uint32_t block) -{ - return ((uint32_t)LFS_FLASH_ADDR) + block * LFS_BLOCK_SIZE; -} - -static int _internal_flash_read(const struct lfs_config *c, lfs_block_t block, lfs_off_t off, void *buffer, lfs_size_t size) -{ - (void)c; - - uint32_t addr = lba2addr(block) + off; - uint8_t prom; - - for (int i = 0; i < size; i++) { - prom = EEPROM.read(addr + i); - memcpy((char *)buffer + i, &prom, 1); - } - return 0; -} - -// Program a region in a block. The block must have previously -// been erased. Negative error codes are propagated to the user. -// May return LFS_ERR_CORRUPT if the block should be considered bad. -static int _internal_flash_prog(const struct lfs_config *c, lfs_block_t block, lfs_off_t off, const void *buffer, lfs_size_t size) -{ - (void)c; - - uint32_t addr = lba2addr(block) + off; - uint8_t prom; - - for (int i = 0; i < size; i++) { - memcpy(&prom, (char *)buffer + i, 1); - EEPROM.update(addr + i, prom); - } - return 0; -} - -// Erase a block. A block must be erased before being programmed. -// The state of an erased block is undefined. Negative error codes -// are propagated to the user. -// May return LFS_ERR_CORRUPT if the block should be considered bad. -static int _internal_flash_erase(const struct lfs_config *c, lfs_block_t block) -{ - (void)c; - - uint32_t addr = lba2addr(block); - - // implement as write 0xff to whole block address - for (int i = 0; i < LFS_BLOCK_SIZE; i++) { - EEPROM.update(addr, 0xff); - } - - return 0; -} - -// Sync the state of the underlying block device. Negative error codes -// are propagated to the user. -static int _internal_flash_sync(const struct lfs_config *c) -{ - // we don't use a ram cache, this is a noop - return 0; -} - -static struct lfs_config _InternalFSConfig = {.context = NULL, - - .read = _internal_flash_read, - .prog = _internal_flash_prog, - .erase = _internal_flash_erase, - .sync = _internal_flash_sync, - - .read_size = LFS_CACHE_SIZE, - .prog_size = LFS_CACHE_SIZE, - .block_size = LFS_BLOCK_SIZE, - .block_count = LFS_FLASH_TOTAL_SIZE / LFS_BLOCK_SIZE, - .block_cycles = - 500, // protection against wear leveling (suggested values between 100-1000) - .cache_size = LFS_CACHE_SIZE, - .lookahead_size = LFS_CACHE_SIZE, - - .read_buffer = lfs_read_buffer, - .prog_buffer = lfs_prog_buffer, - .lookahead_buffer = lfs_lookahead_buffer}; - -InternalFileSystem InternalFS; - -//--------------------------------------------------------------------+ -// -//--------------------------------------------------------------------+ - -InternalFileSystem::InternalFileSystem(void) : LittleFS(&_InternalFSConfig) {} - -bool InternalFileSystem::begin(void) -{ - // failed to mount, erase all sector then format and mount again - if (!LittleFS::begin()) { - // Erase all sectors of internal flash region for Filesystem. - // implement as write 0xff to whole block address - for (uint32_t addr = LFS_FLASH_ADDR; addr < (LFS_FLASH_ADDR + LFS_FLASH_TOTAL_SIZE); addr++) { - EEPROM.update(addr, 0xff); - } - - // lfs format - this->format(); - - // mount again if still failed, give up - if (!LittleFS::begin()) - return false; - } - - return true; -} diff --git a/src/platform/stm32wl/InternalFileSystem.h b/src/platform/stm32wl/InternalFileSystem.h deleted file mode 100644 index 66344194e..000000000 --- a/src/platform/stm32wl/InternalFileSystem.h +++ /dev/null @@ -1,54 +0,0 @@ -/* - * The MIT License (MIT) - * - * Copyright (c) 2019 hathach for Adafruit Industries - * - * Permission is hereby granted, free of charge, to any person obtaining a copy - * of this software and associated documentation files (the "Software"), to deal - * in the Software without restriction, including without limitation the rights - * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell - * copies of the Software, and to permit persons to whom the Software is - * furnished to do so, subject to the following conditions: - * - * The above copyright notice and this permission notice shall be included in - * all copies or substantial portions of the Software. - * - * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR - * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, - * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE - * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER - * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, - * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN - * THE SOFTWARE. - */ - -#ifndef INTERNALFILESYSTEM_H_ -#define INTERNALFILESYSTEM_H_ - -#include "LittleFS.h" - -// The EEPROM Library assumes our usable flash area starts at logical 0 -#define LFS_FLASH_ADDR 0 - -// use the built in EEPROM emulation. Total Size is 2Kbyte -#define LFS_BLOCK_SIZE 128 // min. block size is 128 to fit CTZ pointers -#define LFS_CACHE_SIZE 16 - -#define LFS_FLASH_TOTAL_SIZE FLASH_PAGE_SIZE - -static uint8_t lfs_read_buffer[LFS_CACHE_SIZE] = {0}; -static uint8_t lfs_prog_buffer[LFS_CACHE_SIZE] = {0}; -static uint8_t lfs_lookahead_buffer[LFS_CACHE_SIZE] = {0}; - -class InternalFileSystem : public LittleFS -{ - public: - InternalFileSystem(void); - - // overwrite to also perform low level format (sector erase of whole flash region) - bool begin(void); -}; - -extern InternalFileSystem InternalFS; - -#endif /* INTERNALFILESYSTEM_H_ */ diff --git a/src/platform/stm32wl/LittleFS.cpp b/src/platform/stm32wl/LittleFS.cpp deleted file mode 100644 index b1267d88a..000000000 --- a/src/platform/stm32wl/LittleFS.cpp +++ /dev/null @@ -1,258 +0,0 @@ -#include -#include - -#include "LittleFS.h" - -using namespace LittleFS_Namespace; - -//--------------------------------------------------------------------+ -// Implementation -//--------------------------------------------------------------------+ - -LittleFS::LittleFS(void) : LittleFS(NULL) {} - -LittleFS::LittleFS(struct lfs_config *cfg) -{ - memset(&_lfs, 0, sizeof(_lfs)); - _lfs_cfg = cfg; - _mounted = false; - _mutex = xSemaphoreCreateMutexStatic(&this->_MutexStorageSpace); -} - -LittleFS::~LittleFS() {} - -// Initialize and mount the file system -// Return true if mounted successfully else probably corrupted. -// User should format the disk and try again -bool LittleFS::begin(struct lfs_config *cfg) -{ - _lockFS(); - - bool ret; - // not a loop, just an quick way to short-circuit on error - do { - if (_mounted) { - ret = true; - break; - } - if (cfg) { - _lfs_cfg = cfg; - } - if (nullptr == _lfs_cfg) { - ret = false; - break; - } - // actually attempt to mount, and log error if one occurs - int err = lfs_mount(&_lfs, _lfs_cfg); - PRINT_LFS_ERR(err); - _mounted = (err == LFS_ERR_OK); - ret = _mounted; - } while (0); - - _unlockFS(); - return ret; -} - -// Tear down and unmount file system -void LittleFS::end(void) -{ - _lockFS(); - - if (_mounted) { - _mounted = false; - int err = lfs_unmount(&_lfs); - PRINT_LFS_ERR(err); - (void)err; - } - - _unlockFS(); -} - -bool LittleFS::format(void) -{ - _lockFS(); - - int err = LFS_ERR_OK; - bool attemptMount = _mounted; - // not a loop, just an quick way to short-circuit on error - do { - // if already mounted: umount first -> format -> remount - if (_mounted) { - _mounted = false; - err = lfs_unmount(&_lfs); - if (LFS_ERR_OK != err) { - PRINT_LFS_ERR(err); - break; - } - } - err = lfs_format(&_lfs, _lfs_cfg); - if (LFS_ERR_OK != err) { - PRINT_LFS_ERR(err); - break; - } - - if (attemptMount) { - err = lfs_mount(&_lfs, _lfs_cfg); - if (LFS_ERR_OK != err) { - PRINT_LFS_ERR(err); - break; - } - _mounted = true; - } - // success! - } while (0); - - _unlockFS(); - return LFS_ERR_OK == err; -} - -// Open a file or folder -LittleFS_Namespace::File LittleFS::open(char const *filepath, uint8_t mode) -{ - // No lock is required here ... the File() object will synchronize with the mutex provided - return LittleFS_Namespace::File(filepath, mode, *this); -} - -// Check if file or folder exists -bool LittleFS::exists(char const *filepath) -{ - struct lfs_info info; - _lockFS(); - - bool ret = (0 == lfs_stat(&_lfs, filepath, &info)); - - _unlockFS(); - return ret; -} - -// Create a directory, create intermediate parent if needed -bool LittleFS::mkdir(char const *filepath) -{ - bool ret = true; - const char *slash = filepath; - if (slash[0] == '/') - slash++; // skip root '/' - - _lockFS(); - - // make intermediate parent directory(ies) - while (NULL != (slash = strchr(slash, '/'))) { - char parent[slash - filepath + 1] = {0}; - memcpy(parent, filepath, slash - filepath); - - int rc = lfs_mkdir(&_lfs, parent); - if (rc != LFS_ERR_OK && rc != LFS_ERR_EXIST) { - PRINT_LFS_ERR(rc); - ret = false; - break; - } - slash++; - } - // make the final requested directory - if (ret) { - int rc = lfs_mkdir(&_lfs, filepath); - if (rc != LFS_ERR_OK && rc != LFS_ERR_EXIST) { - PRINT_LFS_ERR(rc); - ret = false; - } - } - - _unlockFS(); - return ret; -} - -// Remove a file -bool LittleFS::remove(char const *filepath) -{ - _lockFS(); - - int err = lfs_remove(&_lfs, filepath); - PRINT_LFS_ERR(err); - - _unlockFS(); - return LFS_ERR_OK == err; -} - -// Rename a file -bool LittleFS::rename(char const *oldfilepath, char const *newfilepath) -{ - _lockFS(); - - int err = lfs_rename(&_lfs, oldfilepath, newfilepath); - PRINT_LFS_ERR(err); - - _unlockFS(); - return LFS_ERR_OK == err; -} - -// Remove a folder -bool LittleFS::rmdir(char const *filepath) -{ - _lockFS(); - - int err = lfs_remove(&_lfs, filepath); - PRINT_LFS_ERR(err); - - _unlockFS(); - return LFS_ERR_OK == err; -} - -// Remove a folder recursively -bool LittleFS::rmdir_r(char const *filepath) -{ - /* adafruit: lfs is modified to remove non-empty folder, - According to below issue, comment these 2 line won't corrupt filesystem - at least when using LFS v1. If moving to LFS v2, see tracked issue - to see if issues (such as the orphans in threaded linked list) are resolved. - https://github.com/ARMmbed/littlefs/issues/43 - */ - _lockFS(); - - int err = lfs_remove(&_lfs, filepath); - PRINT_LFS_ERR(err); - - _unlockFS(); - return LFS_ERR_OK == err; -} - -//------------- Debug -------------// -#if CFG_DEBUG - -const char *dbg_strerr_lfs(int32_t err) -{ - switch (err) { - case LFS_ERR_OK: - return "LFS_ERR_OK"; - case LFS_ERR_IO: - return "LFS_ERR_IO"; - case LFS_ERR_CORRUPT: - return "LFS_ERR_CORRUPT"; - case LFS_ERR_NOENT: - return "LFS_ERR_NOENT"; - case LFS_ERR_EXIST: - return "LFS_ERR_EXIST"; - case LFS_ERR_NOTDIR: - return "LFS_ERR_NOTDIR"; - case LFS_ERR_ISDIR: - return "LFS_ERR_ISDIR"; - case LFS_ERR_NOTEMPTY: - return "LFS_ERR_NOTEMPTY"; - case LFS_ERR_BADF: - return "LFS_ERR_BADF"; - case LFS_ERR_INVAL: - return "LFS_ERR_INVAL"; - case LFS_ERR_NOSPC: - return "LFS_ERR_NOSPC"; - case LFS_ERR_NOMEM: - return "LFS_ERR_NOMEM"; - - default: - static char errcode[10]; - sprintf(errcode, "%ld", err); - return errcode; - } - - return NULL; -} - -#endif diff --git a/src/platform/stm32wl/LittleFS.h b/src/platform/stm32wl/LittleFS.h deleted file mode 100644 index 4a0b01af2..000000000 --- a/src/platform/stm32wl/LittleFS.h +++ /dev/null @@ -1,85 +0,0 @@ - -#ifndef LITTLEFS_H_ -#define LITTLEFS_H_ - -#include - -#include "lfs.h" - -#include "LittleFS_File.h" - -#include "FreeRTOS.h" // tied to FreeRTOS for serialization -#include "semphr.h" - -class LittleFS -{ - public: - LittleFS(void); - explicit LittleFS(struct lfs_config *cfg); - virtual ~LittleFS(); - - bool begin(struct lfs_config *cfg = NULL); - void end(void); - - // Open the specified file/directory with the supplied mode (e.g. read or - // write, etc). Returns a File object for interacting with the file. - // Note that currently only one file can be open at a time. - LittleFS_Namespace::File open(char const *filename, uint8_t mode = LittleFS_Namespace::FILE_O_READ); - - // Methods to determine if the requested file path exists. - bool exists(char const *filepath); - - // Create the requested directory hierarchy--if intermediate directories - // do not exist they will be created. - bool mkdir(char const *filepath); - - // Delete the file. - bool remove(char const *filepath); - - // Rename the file. - bool rename(char const *oldfilepath, char const *newfilepath); - - // Delete a folder (must be empty) - bool rmdir(char const *filepath); - - // Delete a folder (recursively) - bool rmdir_r(char const *filepath); - - // format file system - bool format(void); - - /*------------------------------------------------------------------*/ - /* INTERNAL USAGE ONLY - * Although declare as public, it is meant to be invoked by internal - * code. User should not call these directly - *------------------------------------------------------------------*/ - lfs_t *_getFS(void) { return &_lfs; } - void _lockFS(void) { xSemaphoreTake(_mutex, portMAX_DELAY); } - void _unlockFS(void) { xSemaphoreGive(_mutex); } - - protected: - bool _mounted; - struct lfs_config *_lfs_cfg; - lfs_t _lfs; - SemaphoreHandle_t _mutex; - - private: - StaticSemaphore_t _MutexStorageSpace; -}; - -#if !CFG_DEBUG -#define VERIFY_LFS(...) _GET_3RD_ARG(__VA_ARGS__, VERIFY_ERR_2ARGS, VERIFY_ERR_1ARGS)(__VA_ARGS__, NULL) -#define PRINT_LFS_ERR(_err) -#else -#define VERIFY_LFS(...) _GET_3RD_ARG(__VA_ARGS__, VERIFY_ERR_2ARGS, VERIFY_ERR_1ARGS)(__VA_ARGS__, dbg_strerr_lfs) -#define PRINT_LFS_ERR(_err) \ - do { \ - if (_err) { \ - VERIFY_MESS((long int)_err, dbg_strerr_lfs); \ - } \ - } while (0) // LFS_ERR are of type int, VERIFY_MESS expects long_int - -const char *dbg_strerr_lfs(int32_t err); -#endif - -#endif /* LITTLEFS_H_ */ diff --git a/src/platform/stm32wl/LittleFS_File.cpp b/src/platform/stm32wl/LittleFS_File.cpp deleted file mode 100644 index cffb924e1..000000000 --- a/src/platform/stm32wl/LittleFS_File.cpp +++ /dev/null @@ -1,362 +0,0 @@ -#include - -#include "LittleFS.h" - -#include - -//--------------------------------------------------------------------+ -// MACRO TYPEDEF CONSTANT ENUM DECLARATION -//--------------------------------------------------------------------+ - -using namespace LittleFS_Namespace; - -File::File(LittleFS &fs) -{ - _fs = &fs; - _is_dir = false; - _name[0] = 0; - _dir_path = NULL; - - _dir = NULL; - _file = NULL; -} - -File::File(char const *filename, uint8_t mode, LittleFS &fs) : File(fs) -{ - // public constructor calls public API open(), which will obtain the mutex - this->open(filename, mode); -} - -bool File::_open_file(char const *filepath, uint8_t mode) -{ - int flags = (mode == FILE_O_READ) ? LFS_O_RDONLY : (mode == FILE_O_WRITE) ? (LFS_O_RDWR | LFS_O_CREAT) : 0; - - if (flags) { - _file = (lfs_file_t *)malloc(sizeof(lfs_file_t)); - if (!_file) - return false; - - int rc = lfs_file_open(_fs->_getFS(), _file, filepath, flags); - - if (rc) { - // failed to open - PRINT_LFS_ERR(rc); - return false; - } - - // move to end of file - if (mode == FILE_O_WRITE) - lfs_file_seek(_fs->_getFS(), _file, 0, LFS_SEEK_END); - - _is_dir = false; - } - - return true; -} - -bool File::_open_dir(char const *filepath) -{ - _dir = (lfs_dir_t *)malloc(sizeof(lfs_dir_t)); - if (!_dir) - return false; - - int rc = lfs_dir_open(_fs->_getFS(), _dir, filepath); - - if (rc) { - // failed to open - PRINT_LFS_ERR(rc); - return false; - } - - _is_dir = true; - - _dir_path = (char *)malloc(strlen(filepath) + 1); - strcpy(_dir_path, filepath); - - return true; -} - -bool File::open(char const *filepath, uint8_t mode) -{ - bool ret = false; - _fs->_lockFS(); - - ret = this->_open(filepath, mode); - - _fs->_unlockFS(); - return ret; -} - -bool File::_open(char const *filepath, uint8_t mode) -{ - bool ret = false; - - // close if currently opened - if (this->isOpen()) - _close(); - - struct lfs_info info; - int rc = lfs_stat(_fs->_getFS(), filepath, &info); - - if (LFS_ERR_OK == rc) { - // file existed, open file or directory accordingly - ret = (info.type == LFS_TYPE_REG) ? _open_file(filepath, mode) : _open_dir(filepath); - } else if (LFS_ERR_NOENT == rc) { - // file not existed, only proceed with FILE_O_WRITE mode - if (mode == FILE_O_WRITE) - ret = _open_file(filepath, mode); - } else { - PRINT_LFS_ERR(rc); - } - - // save bare file name - if (ret) { - char const *splash = strrchr(filepath, '/'); - strncpy(_name, splash ? (splash + 1) : filepath, LFS_NAME_MAX); - } - return ret; -} - -size_t File::write(uint8_t ch) -{ - return write(&ch, 1); -} - -size_t File::write(uint8_t const *buf, size_t size) -{ - lfs_ssize_t wrcount = 0; - _fs->_lockFS(); - - if (!this->_is_dir) { - wrcount = lfs_file_write(_fs->_getFS(), _file, buf, size); - if (wrcount < 0) { - wrcount = 0; - } - } - - _fs->_unlockFS(); - return wrcount; -} - -int File::read(void) -{ - // this thin wrapper relies on called function to synchronize - int ret = -1; - uint8_t ch; - if (read(&ch, 1) > 0) { - ret = static_cast(ch); - } - return ret; -} - -int File::read(void *buf, uint16_t nbyte) -{ - int ret = 0; - _fs->_lockFS(); - - if (!this->_is_dir) { - ret = lfs_file_read(_fs->_getFS(), _file, buf, nbyte); - } - - _fs->_unlockFS(); - return ret; -} - -int File::peek(void) -{ - int ret = -1; - _fs->_lockFS(); - - if (!this->_is_dir) { - uint32_t pos = lfs_file_tell(_fs->_getFS(), _file); - uint8_t ch = 0; - if (lfs_file_read(_fs->_getFS(), _file, &ch, 1) > 0) { - ret = static_cast(ch); - } - (void)lfs_file_seek(_fs->_getFS(), _file, pos, LFS_SEEK_SET); - } - - _fs->_unlockFS(); - return ret; -} - -int File::available(void) -{ - int ret = 0; - _fs->_lockFS(); - - if (!this->_is_dir) { - uint32_t size = lfs_file_size(_fs->_getFS(), _file); - uint32_t pos = lfs_file_tell(_fs->_getFS(), _file); - ret = size - pos; - } - - _fs->_unlockFS(); - return ret; -} - -bool File::seek(uint32_t pos) -{ - bool ret = false; - _fs->_lockFS(); - - if (!this->_is_dir) { - ret = lfs_file_seek(_fs->_getFS(), _file, pos, LFS_SEEK_SET) >= 0; - } - - _fs->_unlockFS(); - return ret; -} - -uint32_t File::position(void) -{ - uint32_t ret = 0; - _fs->_lockFS(); - - if (!this->_is_dir) { - ret = lfs_file_tell(_fs->_getFS(), _file); - } - - _fs->_unlockFS(); - return ret; -} - -uint32_t File::size(void) -{ - uint32_t ret = 0; - _fs->_lockFS(); - - if (!this->_is_dir) { - ret = lfs_file_size(_fs->_getFS(), _file); - } - - _fs->_unlockFS(); - return ret; -} - -bool File::truncate(uint32_t pos) -{ - int32_t ret = LFS_ERR_ISDIR; - _fs->_lockFS(); - if (!this->_is_dir) { - ret = lfs_file_truncate(_fs->_getFS(), _file, pos); - } - _fs->_unlockFS(); - return (ret == 0); -} - -bool File::truncate(void) -{ - int32_t ret = LFS_ERR_ISDIR; - _fs->_lockFS(); - if (!this->_is_dir) { - uint32_t pos = lfs_file_tell(_fs->_getFS(), _file); - ret = lfs_file_truncate(_fs->_getFS(), _file, pos); - } - _fs->_unlockFS(); - return (ret == 0); -} - -void File::flush(void) -{ - _fs->_lockFS(); - - if (!this->_is_dir) { - lfs_file_sync(_fs->_getFS(), _file); - } - - _fs->_unlockFS(); - return; -} - -void File::close(void) -{ - _fs->_lockFS(); - this->_close(); - _fs->_unlockFS(); -} - -void File::_close(void) -{ - if (this->isOpen()) { - if (this->_is_dir) { - lfs_dir_close(_fs->_getFS(), _dir); - free(_dir); - _dir = NULL; - - if (this->_dir_path) - free(_dir_path); - _dir_path = NULL; - } else { - lfs_file_close(this->_fs->_getFS(), _file); - free(_file); - _file = NULL; - } - } -} - -File::operator bool(void) -{ - return isOpen(); -} - -bool File::isOpen(void) -{ - return (_file != NULL) || (_dir != NULL); -} - -// WARNING -- although marked as `const`, the values pointed -// to may change. For example, if the same File -// object has `open()` called with a different -// file or directory name, this same pointer will -// suddenly (unexpectedly?) have different values. -char const *File::name(void) -{ - return this->_name; -} - -bool File::isDirectory(void) -{ - return this->_is_dir; -} - -File File::openNextFile(uint8_t mode) -{ - _fs->_lockFS(); - - File ret(*_fs); - if (this->_is_dir) { - struct lfs_info info; - int rc; - - // lfs_dir_read returns 0 when reaching end of directory, 1 if found an entry - // Skip the "." and ".." entries ... - do { - rc = lfs_dir_read(_fs->_getFS(), _dir, &info); - } while (rc == 1 && (!strcmp(".", info.name) || !strcmp("..", info.name))); - - if (rc == 1) { - // string cat name with current folder - char filepath[strlen(_dir_path) + 1 + strlen(info.name) + 1]; // potential for significant stack usage - strcpy(filepath, _dir_path); - if (!(_dir_path[0] == '/' && _dir_path[1] == 0)) - strcat(filepath, "/"); // only add '/' if cwd is not root - strcat(filepath, info.name); - - (void)ret._open(filepath, mode); // return value is ignored ... caller is expected to check isOpened() - } else if (rc < 0) { - PRINT_LFS_ERR(rc); - } - } - _fs->_unlockFS(); - return ret; -} - -void File::rewindDirectory(void) -{ - _fs->_lockFS(); - if (this->_is_dir) { - lfs_dir_rewind(_fs->_getFS(), _dir); - } - _fs->_unlockFS(); -} diff --git a/src/platform/stm32wl/LittleFS_File.h b/src/platform/stm32wl/LittleFS_File.h deleted file mode 100644 index e88a2790d..000000000 --- a/src/platform/stm32wl/LittleFS_File.h +++ /dev/null @@ -1,82 +0,0 @@ -#ifndef LITTLEFS_FILE_H_ -#define LITTLEFS_FILE_H_ - -// Forward declaration -class LittleFS; - -namespace LittleFS_Namespace -{ - -// avoid conflict with other FileSystem FILE_READ/FILE_WRITE -enum { - FILE_O_READ = 0, - FILE_O_WRITE = 1, -}; - -class File : public Stream -{ - public: - explicit File(LittleFS &fs); - File(char const *filename, uint8_t mode, LittleFS &fs); - - public: - bool open(char const *filename, uint8_t mode); - - //------------- Stream API -------------// - virtual size_t write(uint8_t ch); - virtual size_t write(uint8_t const *buf, size_t size); - size_t write(const char *str) - { - if (str == NULL) - return 0; - return write((const uint8_t *)str, strlen(str)); - } - size_t write(const char *buffer, size_t size) { return write((const uint8_t *)buffer, size); } - - virtual int read(void); - int read(void *buf, uint16_t nbyte); - - virtual int peek(void); - virtual int available(void); - virtual void flush(void); - - bool seek(uint32_t pos); - uint32_t position(void); - uint32_t size(void); - - bool truncate(uint32_t pos); - bool truncate(void); - - void close(void); - - operator bool(void); - - bool isOpen(void); - char const *name(void); - - bool isDirectory(void); - File openNextFile(uint8_t mode = FILE_O_READ); - void rewindDirectory(void); - - private: - LittleFS *_fs; - - bool _is_dir; - - union { - lfs_file_t *_file; - lfs_dir_t *_dir; - }; - - char *_dir_path; - char _name[LFS_NAME_MAX + 1]; - - bool _open(char const *filepath, uint8_t mode); - bool _open_file(char const *filepath, uint8_t mode); - bool _open_dir(char const *filepath); - void _close(void); -}; - -} // namespace LittleFS_Namespace - -#endif /* LITTLEFS_FILE_H_ */ diff --git a/src/platform/stm32wl/STM32WLCryptoEngine.cpp b/src/platform/stm32wl/STM32WLCryptoEngine.cpp deleted file mode 100644 index 7367a2bc0..000000000 --- a/src/platform/stm32wl/STM32WLCryptoEngine.cpp +++ /dev/null @@ -1,36 +0,0 @@ -#include "CryptoEngine.h" -#include "aes.hpp" -#include "configuration.h" - -class STM32WLCryptoEngine : public CryptoEngine -{ - public: - STM32WLCryptoEngine() {} - - ~STM32WLCryptoEngine() {} - - /** - * Encrypt a packet - * - * @param bytes is updated in place - */ - virtual void encrypt(uint32_t fromNode, uint64_t packetNum, size_t numBytes, uint8_t *bytes) override - { - if (key.length > 0) { - AES_ctx ctx; - initNonce(fromNode, packetNum); - AES_init_ctx_iv(&ctx, key.bytes, nonce); - AES_CTR_xcrypt_buffer(&ctx, bytes, numBytes); - } - } - - virtual void decrypt(uint32_t fromNode, uint64_t packetNum, size_t numBytes, uint8_t *bytes) override - { - // For CTR, the implementation is the same - encrypt(fromNode, packetNum, numBytes, bytes); - } - - private: -}; - -CryptoEngine *crypto = new STM32WLCryptoEngine(); diff --git a/src/platform/stm32wl/architecture.h b/src/platform/stm32wl/architecture.h index 1c021903a..325a192a4 100644 --- a/src/platform/stm32wl/architecture.h +++ b/src/platform/stm32wl/architecture.h @@ -9,12 +9,18 @@ #ifndef HAS_RADIO #define HAS_RADIO 1 #endif +#ifndef HAS_TELEMETRY +#define HAS_TELEMETRY 1 +#endif // // set HW_VENDOR // - -#ifndef HW_VENDOR +#ifdef _VARIANT_WIOE5_ +#define HW_VENDOR meshtastic_HardwareModel_WIO_E5 +#elif defined(_VARIANT_RAK3172_) +#define HW_VENDOR meshtastic_HardwareModel_RAK3172 +#else #define HW_VENDOR meshtastic_HardwareModel_PRIVATE_HW #endif @@ -22,4 +28,4 @@ #define SX126X_CS 1000 #define SX126X_DIO1 1001 #define SX126X_RESET 1003 -#define SX126X_BUSY 1004 +#define SX126X_BUSY 1004 \ No newline at end of file diff --git a/src/platform/stm32wl/main-stm32wl.cpp b/src/platform/stm32wl/main-stm32wl.cpp index f57928c60..3eddbb3cf 100644 --- a/src/platform/stm32wl/main-stm32wl.cpp +++ b/src/platform/stm32wl/main-stm32wl.cpp @@ -3,7 +3,7 @@ #include #include -void setBluetoothEnable(bool on) {} +void setBluetoothEnable(bool enable) {} void playStartMelody() {} @@ -26,11 +26,3 @@ void getMacAddr(uint8_t *dmac) } void cpuDeepSleep(uint32_t msecToWake) {} - -/* pacify libc_nano */ -extern "C" { -int _gettimeofday(struct timeval *tv, void *tzvp) -{ - return -1; -} -} diff --git a/src/power.h b/src/power.h index 4dd35e710..63335104b 100644 --- a/src/power.h +++ b/src/power.h @@ -1,7 +1,11 @@ #pragma once +#include "../variants/rak2560/RAK9154Sensor.h" #include "PowerStatus.h" #include "concurrency/OSThread.h" +#include "configuration.h" + #ifdef ARCH_ESP32 +// "legacy adc calibration driver is deprecated, please migrate to use esp_adc/adc_cali.h and esp_adc/adc_cali_scheme.h #include #include #endif @@ -10,13 +14,6 @@ #define NUM_OCV_POINTS 11 #endif -// 3400,3350,3320,3290,3270,3260,3250,3230,3200,3120,3000 //3.4 to 3.0 LiFePO4 -// 2120,2090,2070,2050,2030,2010,1990,1980,1970,1960,1950 //2.12 to 1.95 Lead Acid -// 4200,4050,3990,3890,3790,3700,3650,3550,3450,3300,3200 //4.2 to 3.2 LiIon/LiPo -// 4200,4050,3990,3890,3790,3700,3650,3550,3400,3300,3000 //4.2 to 3.0 LiIon/LiPo -// 4150,4050,3990,3890,3790,3690,3620,3520,3420,3300,3100 //4.15 to 3.1 LiIon/LiPo -// 2770,2650,2540,2420,2300,2180,2060,1940,1800,1680,1550 //2.8 to 1.5 Lithium Titanate - #ifndef OCV_ARRAY #ifdef CELL_TYPE_LIFEPO4 #define OCV_ARRAY 3400, 3350, 3320, 3290, 3270, 3260, 3250, 3230, 3200, 3120, 3000 @@ -27,7 +24,7 @@ #elif defined(CELL_TYPE_NIMH) #define OCV_ARRAY 1400, 1300, 1280, 1270, 1260, 1250, 1240, 1230, 1210, 1150, 1000 #elif defined(CELL_TYPE_LTO) -#define OCV_ARRAY 2770, 2650, 2540, 2420, 2300, 2180, 2060, 1940, 1800, 1680, 1550 +#define OCV_ARRAY 2700, 2560, 2540, 2520, 2500, 2460, 2420, 2400, 2380, 2320, 1500 #else // LiIon #define OCV_ARRAY 4190, 4050, 3990, 3890, 3800, 3720, 3630, 3530, 3420, 3300, 3100 #endif @@ -43,7 +40,7 @@ extern RTC_NOINIT_ATTR uint64_t RTC_reg_b; #include "soc/sens_reg.h" // needed for adc pin reset #endif -#if HAS_TELEMETRY && !defined(ARCH_PORTDUINO) +#if HAS_TELEMETRY && !MESHTASTIC_EXCLUDE_ENVIRONMENTAL_SENSOR && !defined(ARCH_PORTDUINO) #include "modules/Telemetry/Sensor/INA219Sensor.h" #include "modules/Telemetry/Sensor/INA260Sensor.h" #include "modules/Telemetry/Sensor/INA3221Sensor.h" @@ -52,6 +49,23 @@ extern INA219Sensor ina219Sensor; extern INA3221Sensor ina3221Sensor; #endif +#if HAS_TELEMETRY && !MESHTASTIC_EXCLUDE_ENVIRONMENTAL_SENSOR && !defined(ARCH_PORTDUINO) && !defined(ARCH_STM32WL) +#include "modules/Telemetry/Sensor/MAX17048Sensor.h" +extern MAX17048Sensor max17048Sensor; +#endif + +#if HAS_RAKPROT && !defined(ARCH_PORTDUINO) +#include "../variants/rak2560/RAK9154Sensor.h" +extern RAK9154Sensor rak9154Sensor; +#endif + +#ifdef HAS_PMU +#include "XPowersAXP192.tpp" +#include "XPowersAXP2101.tpp" +#include "XPowersLibInterface.hpp" +extern XPowersLibInterface *PMU; +#endif + class Power : private concurrency::OSThread { @@ -74,6 +88,8 @@ class Power : private concurrency::OSThread bool axpChipInit(); /// Setup a simple ADC input based battery sensor bool analogInit(); + /// Setup a Lipo battery level sensor + bool lipoInit(); private: // open circuit voltage lookup table diff --git a/src/mqtt/JSON.cpp b/src/serialization/JSON.cpp similarity index 99% rename from src/mqtt/JSON.cpp rename to src/serialization/JSON.cpp index e98bf47b9..42e615108 100644 --- a/src/mqtt/JSON.cpp +++ b/src/serialization/JSON.cpp @@ -184,7 +184,7 @@ bool JSON::ExtractString(const char **data, std::string &str) // End of the string? else if (next_char == '"') { (*data)++; - str.reserve(); // Remove unused capacity + str.shrink_to_fit(); // Remove unused capacity return true; } diff --git a/src/mqtt/JSON.h b/src/serialization/JSON.h similarity index 100% rename from src/mqtt/JSON.h rename to src/serialization/JSON.h diff --git a/src/mqtt/JSONValue.cpp b/src/serialization/JSONValue.cpp similarity index 98% rename from src/mqtt/JSONValue.cpp rename to src/serialization/JSONValue.cpp index a229666a9..b2e9575bf 100644 --- a/src/mqtt/JSONValue.cpp +++ b/src/serialization/JSONValue.cpp @@ -37,14 +37,14 @@ #define FREE_ARRAY(x) \ { \ JSONArray::iterator iter; \ - for (iter = x.begin(); iter != x.end(); iter++) { \ + for (iter = x.begin(); iter != x.end(); ++iter) { \ delete *iter; \ } \ } #define FREE_OBJECT(x) \ { \ JSONObject::iterator iter; \ - for (iter = x.begin(); iter != x.end(); iter++) { \ + for (iter = x.begin(); iter != x.end(); ++iter) { \ delete (*iter).second; \ } \ } @@ -368,9 +368,9 @@ JSONValue::JSONValue(int m_integer_value) * * @access public * - * @param uint m_integer_value The number to use as the value + * @param unsigned int m_integer_value The number to use as the value */ -JSONValue::JSONValue(uint m_integer_value) +JSONValue::JSONValue(unsigned int m_integer_value) { type = JSONType_Number; number_value = (double)m_integer_value; @@ -430,7 +430,7 @@ JSONValue::JSONValue(const JSONValue &m_source) JSONArray source_array = *m_source.array_value; JSONArray::iterator iter; array_value = new JSONArray(); - for (iter = source_array.begin(); iter != source_array.end(); iter++) + for (iter = source_array.begin(); iter != source_array.end(); ++iter) array_value->push_back(new JSONValue(**iter)); break; } @@ -439,7 +439,7 @@ JSONValue::JSONValue(const JSONValue &m_source) JSONObject source_object = *m_source.object_value; object_value = new JSONObject(); JSONObject::iterator iter; - for (iter = source_object.begin(); iter != source_object.end(); iter++) { + for (iter = source_object.begin(); iter != source_object.end(); ++iter) { std::string name = (*iter).first; (*object_value)[name] = new JSONValue(*((*iter).second)); } @@ -462,12 +462,12 @@ JSONValue::~JSONValue() { if (type == JSONType_Array) { JSONArray::iterator iter; - for (iter = array_value->begin(); iter != array_value->end(); iter++) + for (iter = array_value->begin(); iter != array_value->end(); ++iter) delete *iter; delete array_value; } else if (type == JSONType_Object) { JSONObject::iterator iter; - for (iter = object_value->begin(); iter != object_value->end(); iter++) { + for (iter = object_value->begin(); iter != object_value->end(); ++iter) { delete (*iter).second; } delete object_value; @@ -722,7 +722,7 @@ std::vector JSONValue::ObjectKeys() const while (iter != object_value->end()) { keys.push_back(iter->first); - iter++; + ++iter; } } @@ -865,7 +865,7 @@ std::string JSONValue::StringifyString(const std::string &str) str_out += chr; } - iter++; + ++iter; } str_out += "\""; diff --git a/src/mqtt/JSONValue.h b/src/serialization/JSONValue.h similarity index 85% rename from src/mqtt/JSONValue.h rename to src/serialization/JSONValue.h index 3a50a831a..16d53e89f 100644 --- a/src/mqtt/JSONValue.h +++ b/src/serialization/JSONValue.h @@ -40,15 +40,15 @@ class JSONValue public: JSONValue(/*NULL*/); - JSONValue(const char *m_char_value); - JSONValue(const std::string &m_string_value); - JSONValue(bool m_bool_value); - JSONValue(double m_number_value); - JSONValue(int m_integer_value); - JSONValue(uint m_integer_value); - JSONValue(const JSONArray &m_array_value); - JSONValue(const JSONObject &m_object_value); - JSONValue(const JSONValue &m_source); + explicit JSONValue(const char *m_char_value); + explicit JSONValue(const std::string &m_string_value); + explicit JSONValue(bool m_bool_value); + explicit JSONValue(double m_number_value); + explicit JSONValue(int m_integer_value); + explicit JSONValue(unsigned int m_integer_value); + explicit JSONValue(const JSONArray &m_array_value); + explicit JSONValue(const JSONObject &m_object_value); + explicit JSONValue(const JSONValue &m_source); ~JSONValue(); bool IsNull() const; diff --git a/src/serialization/MeshPacketSerializer.cpp b/src/serialization/MeshPacketSerializer.cpp new file mode 100644 index 000000000..ebcfaecab --- /dev/null +++ b/src/serialization/MeshPacketSerializer.cpp @@ -0,0 +1,358 @@ +#ifndef NRF52_USE_JSON +#include "MeshPacketSerializer.h" +#include "JSON.h" +#include "NodeDB.h" +#include "mesh/generated/meshtastic/mqtt.pb.h" +#include "mesh/generated/meshtastic/telemetry.pb.h" +#include "modules/RoutingModule.h" +#include +#include +#if defined(ARCH_ESP32) +#include "../mesh/generated/meshtastic/paxcount.pb.h" +#endif +#include "mesh/generated/meshtastic/remote_hardware.pb.h" + +std::string MeshPacketSerializer::JsonSerialize(const meshtastic_MeshPacket *mp, bool shouldLog) +{ + // the created jsonObj is immutable after creation, so + // we need to do the heavy lifting before assembling it. + std::string msgType; + JSONObject jsonObj; + + if (mp->which_payload_variant == meshtastic_MeshPacket_decoded_tag) { + JSONObject msgPayload; + switch (mp->decoded.portnum) { + case meshtastic_PortNum_TEXT_MESSAGE_APP: { + msgType = "text"; + // convert bytes to string + if (shouldLog) + LOG_DEBUG("got text message of size %u\n", mp->decoded.payload.size); + + char payloadStr[(mp->decoded.payload.size) + 1]; + memcpy(payloadStr, mp->decoded.payload.bytes, mp->decoded.payload.size); + payloadStr[mp->decoded.payload.size] = 0; // null terminated string + // check if this is a JSON payload + JSONValue *json_value = JSON::Parse(payloadStr); + if (json_value != NULL) { + if (shouldLog) + LOG_INFO("text message payload is of type json\n"); + + // if it is, then we can just use the json object + jsonObj["payload"] = json_value; + } else { + // if it isn't, then we need to create a json object + // with the string as the value + if (shouldLog) + LOG_INFO("text message payload is of type plaintext\n"); + + msgPayload["text"] = new JSONValue(payloadStr); + jsonObj["payload"] = new JSONValue(msgPayload); + } + break; + } + case meshtastic_PortNum_TELEMETRY_APP: { + msgType = "telemetry"; + meshtastic_Telemetry scratch; + meshtastic_Telemetry *decoded = NULL; + memset(&scratch, 0, sizeof(scratch)); + if (pb_decode_from_bytes(mp->decoded.payload.bytes, mp->decoded.payload.size, &meshtastic_Telemetry_msg, &scratch)) { + decoded = &scratch; + if (decoded->which_variant == meshtastic_Telemetry_device_metrics_tag) { + msgPayload["battery_level"] = new JSONValue((unsigned int)decoded->variant.device_metrics.battery_level); + msgPayload["voltage"] = new JSONValue(decoded->variant.device_metrics.voltage); + msgPayload["channel_utilization"] = new JSONValue(decoded->variant.device_metrics.channel_utilization); + msgPayload["air_util_tx"] = new JSONValue(decoded->variant.device_metrics.air_util_tx); + msgPayload["uptime_seconds"] = new JSONValue((unsigned int)decoded->variant.device_metrics.uptime_seconds); + } else if (decoded->which_variant == meshtastic_Telemetry_environment_metrics_tag) { + msgPayload["temperature"] = new JSONValue(decoded->variant.environment_metrics.temperature); + msgPayload["relative_humidity"] = new JSONValue(decoded->variant.environment_metrics.relative_humidity); + msgPayload["barometric_pressure"] = new JSONValue(decoded->variant.environment_metrics.barometric_pressure); + msgPayload["gas_resistance"] = new JSONValue(decoded->variant.environment_metrics.gas_resistance); + msgPayload["voltage"] = new JSONValue(decoded->variant.environment_metrics.voltage); + msgPayload["current"] = new JSONValue(decoded->variant.environment_metrics.current); + msgPayload["lux"] = new JSONValue(decoded->variant.environment_metrics.lux); + msgPayload["white_lux"] = new JSONValue(decoded->variant.environment_metrics.white_lux); + msgPayload["iaq"] = new JSONValue((uint)decoded->variant.environment_metrics.iaq); + msgPayload["wind_speed"] = new JSONValue(decoded->variant.environment_metrics.wind_speed); + msgPayload["wind_direction"] = new JSONValue((uint)decoded->variant.environment_metrics.wind_direction); + msgPayload["wind_gust"] = new JSONValue(decoded->variant.environment_metrics.wind_gust); + msgPayload["wind_lull"] = new JSONValue(decoded->variant.environment_metrics.wind_lull); + } else if (decoded->which_variant == meshtastic_Telemetry_air_quality_metrics_tag) { + msgPayload["pm10"] = new JSONValue((unsigned int)decoded->variant.air_quality_metrics.pm10_standard); + msgPayload["pm25"] = new JSONValue((unsigned int)decoded->variant.air_quality_metrics.pm25_standard); + msgPayload["pm100"] = new JSONValue((unsigned int)decoded->variant.air_quality_metrics.pm100_standard); + msgPayload["pm10_e"] = new JSONValue((unsigned int)decoded->variant.air_quality_metrics.pm10_environmental); + msgPayload["pm25_e"] = new JSONValue((unsigned int)decoded->variant.air_quality_metrics.pm25_environmental); + msgPayload["pm100_e"] = new JSONValue((unsigned int)decoded->variant.air_quality_metrics.pm100_environmental); + } else if (decoded->which_variant == meshtastic_Telemetry_power_metrics_tag) { + msgPayload["voltage_ch1"] = new JSONValue(decoded->variant.power_metrics.ch1_voltage); + msgPayload["current_ch1"] = new JSONValue(decoded->variant.power_metrics.ch1_current); + msgPayload["voltage_ch2"] = new JSONValue(decoded->variant.power_metrics.ch2_voltage); + msgPayload["current_ch2"] = new JSONValue(decoded->variant.power_metrics.ch2_current); + msgPayload["voltage_ch3"] = new JSONValue(decoded->variant.power_metrics.ch3_voltage); + msgPayload["current_ch3"] = new JSONValue(decoded->variant.power_metrics.ch3_current); + } + jsonObj["payload"] = new JSONValue(msgPayload); + } else if (shouldLog) { + LOG_ERROR(errStr, msgType.c_str()); + } + break; + } + case meshtastic_PortNum_NODEINFO_APP: { + msgType = "nodeinfo"; + meshtastic_User scratch; + meshtastic_User *decoded = NULL; + memset(&scratch, 0, sizeof(scratch)); + if (pb_decode_from_bytes(mp->decoded.payload.bytes, mp->decoded.payload.size, &meshtastic_User_msg, &scratch)) { + decoded = &scratch; + msgPayload["id"] = new JSONValue(decoded->id); + msgPayload["longname"] = new JSONValue(decoded->long_name); + msgPayload["shortname"] = new JSONValue(decoded->short_name); + msgPayload["hardware"] = new JSONValue(decoded->hw_model); + msgPayload["role"] = new JSONValue((int)decoded->role); + jsonObj["payload"] = new JSONValue(msgPayload); + } else if (shouldLog) { + LOG_ERROR(errStr, msgType.c_str()); + } + break; + } + case meshtastic_PortNum_POSITION_APP: { + msgType = "position"; + meshtastic_Position scratch; + meshtastic_Position *decoded = NULL; + memset(&scratch, 0, sizeof(scratch)); + if (pb_decode_from_bytes(mp->decoded.payload.bytes, mp->decoded.payload.size, &meshtastic_Position_msg, &scratch)) { + decoded = &scratch; + if ((int)decoded->time) { + msgPayload["time"] = new JSONValue((unsigned int)decoded->time); + } + if ((int)decoded->timestamp) { + msgPayload["timestamp"] = new JSONValue((unsigned int)decoded->timestamp); + } + msgPayload["latitude_i"] = new JSONValue((int)decoded->latitude_i); + msgPayload["longitude_i"] = new JSONValue((int)decoded->longitude_i); + if ((int)decoded->altitude) { + msgPayload["altitude"] = new JSONValue((int)decoded->altitude); + } + if ((int)decoded->ground_speed) { + msgPayload["ground_speed"] = new JSONValue((unsigned int)decoded->ground_speed); + } + if (int(decoded->ground_track)) { + msgPayload["ground_track"] = new JSONValue((unsigned int)decoded->ground_track); + } + if (int(decoded->sats_in_view)) { + msgPayload["sats_in_view"] = new JSONValue((unsigned int)decoded->sats_in_view); + } + if ((int)decoded->PDOP) { + msgPayload["PDOP"] = new JSONValue((int)decoded->PDOP); + } + if ((int)decoded->HDOP) { + msgPayload["HDOP"] = new JSONValue((int)decoded->HDOP); + } + if ((int)decoded->VDOP) { + msgPayload["VDOP"] = new JSONValue((int)decoded->VDOP); + } + if ((int)decoded->precision_bits) { + msgPayload["precision_bits"] = new JSONValue((int)decoded->precision_bits); + } + jsonObj["payload"] = new JSONValue(msgPayload); + } else if (shouldLog) { + LOG_ERROR(errStr, msgType.c_str()); + } + break; + } + case meshtastic_PortNum_WAYPOINT_APP: { + msgType = "waypoint"; + meshtastic_Waypoint scratch; + meshtastic_Waypoint *decoded = NULL; + memset(&scratch, 0, sizeof(scratch)); + if (pb_decode_from_bytes(mp->decoded.payload.bytes, mp->decoded.payload.size, &meshtastic_Waypoint_msg, &scratch)) { + decoded = &scratch; + msgPayload["id"] = new JSONValue((unsigned int)decoded->id); + msgPayload["name"] = new JSONValue(decoded->name); + msgPayload["description"] = new JSONValue(decoded->description); + msgPayload["expire"] = new JSONValue((unsigned int)decoded->expire); + msgPayload["locked_to"] = new JSONValue((unsigned int)decoded->locked_to); + msgPayload["latitude_i"] = new JSONValue((int)decoded->latitude_i); + msgPayload["longitude_i"] = new JSONValue((int)decoded->longitude_i); + jsonObj["payload"] = new JSONValue(msgPayload); + } else if (shouldLog) { + LOG_ERROR(errStr, msgType.c_str()); + } + break; + } + case meshtastic_PortNum_NEIGHBORINFO_APP: { + msgType = "neighborinfo"; + meshtastic_NeighborInfo scratch; + meshtastic_NeighborInfo *decoded = NULL; + memset(&scratch, 0, sizeof(scratch)); + if (pb_decode_from_bytes(mp->decoded.payload.bytes, mp->decoded.payload.size, &meshtastic_NeighborInfo_msg, + &scratch)) { + decoded = &scratch; + msgPayload["node_id"] = new JSONValue((unsigned int)decoded->node_id); + msgPayload["node_broadcast_interval_secs"] = new JSONValue((unsigned int)decoded->node_broadcast_interval_secs); + msgPayload["last_sent_by_id"] = new JSONValue((unsigned int)decoded->last_sent_by_id); + msgPayload["neighbors_count"] = new JSONValue(decoded->neighbors_count); + JSONArray neighbors; + for (uint8_t i = 0; i < decoded->neighbors_count; i++) { + JSONObject neighborObj; + neighborObj["node_id"] = new JSONValue((unsigned int)decoded->neighbors[i].node_id); + neighborObj["snr"] = new JSONValue((int)decoded->neighbors[i].snr); + neighbors.push_back(new JSONValue(neighborObj)); + } + msgPayload["neighbors"] = new JSONValue(neighbors); + jsonObj["payload"] = new JSONValue(msgPayload); + } else if (shouldLog) { + LOG_ERROR(errStr, msgType.c_str()); + } + break; + } + case meshtastic_PortNum_TRACEROUTE_APP: { + if (mp->decoded.request_id) { // Only report the traceroute response + msgType = "traceroute"; + meshtastic_RouteDiscovery scratch; + meshtastic_RouteDiscovery *decoded = NULL; + memset(&scratch, 0, sizeof(scratch)); + if (pb_decode_from_bytes(mp->decoded.payload.bytes, mp->decoded.payload.size, &meshtastic_RouteDiscovery_msg, + &scratch)) { + decoded = &scratch; + JSONArray route; // Route this message took + // Lambda function for adding a long name to the route + auto addToRoute = [](JSONArray *route, NodeNum num) { + char long_name[40] = "Unknown"; + meshtastic_NodeInfoLite *node = nodeDB->getMeshNode(num); + bool name_known = node ? node->has_user : false; + if (name_known) + memcpy(long_name, node->user.long_name, sizeof(long_name)); + route->push_back(new JSONValue(long_name)); + }; + addToRoute(&route, mp->to); // Started at the original transmitter (destination of response) + for (uint8_t i = 0; i < decoded->route_count; i++) { + addToRoute(&route, decoded->route[i]); + } + addToRoute(&route, mp->from); // Ended at the original destination (source of response) + + msgPayload["route"] = new JSONValue(route); + jsonObj["payload"] = new JSONValue(msgPayload); + } else if (shouldLog) { + LOG_ERROR(errStr, msgType.c_str()); + } + } + break; + } + case meshtastic_PortNum_DETECTION_SENSOR_APP: { + msgType = "detection"; + char payloadStr[(mp->decoded.payload.size) + 1]; + memcpy(payloadStr, mp->decoded.payload.bytes, mp->decoded.payload.size); + payloadStr[mp->decoded.payload.size] = 0; // null terminated string + msgPayload["text"] = new JSONValue(payloadStr); + jsonObj["payload"] = new JSONValue(msgPayload); + break; + } +#ifdef ARCH_ESP32 + case meshtastic_PortNum_PAXCOUNTER_APP: { + msgType = "paxcounter"; + meshtastic_Paxcount scratch; + meshtastic_Paxcount *decoded = NULL; + memset(&scratch, 0, sizeof(scratch)); + if (pb_decode_from_bytes(mp->decoded.payload.bytes, mp->decoded.payload.size, &meshtastic_Paxcount_msg, &scratch)) { + decoded = &scratch; + msgPayload["wifi_count"] = new JSONValue((unsigned int)decoded->wifi); + msgPayload["ble_count"] = new JSONValue((unsigned int)decoded->ble); + msgPayload["uptime"] = new JSONValue((unsigned int)decoded->uptime); + jsonObj["payload"] = new JSONValue(msgPayload); + } else if (shouldLog) { + LOG_ERROR(errStr, msgType.c_str()); + } + break; + } +#endif + case meshtastic_PortNum_REMOTE_HARDWARE_APP: { + meshtastic_HardwareMessage scratch; + meshtastic_HardwareMessage *decoded = NULL; + memset(&scratch, 0, sizeof(scratch)); + if (pb_decode_from_bytes(mp->decoded.payload.bytes, mp->decoded.payload.size, &meshtastic_HardwareMessage_msg, + &scratch)) { + decoded = &scratch; + if (decoded->type == meshtastic_HardwareMessage_Type_GPIOS_CHANGED) { + msgType = "gpios_changed"; + msgPayload["gpio_value"] = new JSONValue((unsigned int)decoded->gpio_value); + jsonObj["payload"] = new JSONValue(msgPayload); + } else if (decoded->type == meshtastic_HardwareMessage_Type_READ_GPIOS_REPLY) { + msgType = "gpios_read_reply"; + msgPayload["gpio_value"] = new JSONValue((unsigned int)decoded->gpio_value); + msgPayload["gpio_mask"] = new JSONValue((unsigned int)decoded->gpio_mask); + jsonObj["payload"] = new JSONValue(msgPayload); + } + } else if (shouldLog) { + LOG_ERROR(errStr, "RemoteHardware"); + } + break; + } + // add more packet types here if needed + default: + break; + } + } else if (shouldLog) { + LOG_WARN("Couldn't convert encrypted payload of MeshPacket to JSON\n"); + } + + jsonObj["id"] = new JSONValue((unsigned int)mp->id); + jsonObj["timestamp"] = new JSONValue((unsigned int)mp->rx_time); + jsonObj["to"] = new JSONValue((unsigned int)mp->to); + jsonObj["from"] = new JSONValue((unsigned int)mp->from); + jsonObj["channel"] = new JSONValue((unsigned int)mp->channel); + jsonObj["type"] = new JSONValue(msgType.c_str()); + jsonObj["sender"] = new JSONValue(owner.id); + if (mp->rx_rssi != 0) + jsonObj["rssi"] = new JSONValue((int)mp->rx_rssi); + if (mp->rx_snr != 0) + jsonObj["snr"] = new JSONValue((float)mp->rx_snr); + if (mp->hop_start != 0 && mp->hop_limit <= mp->hop_start) { + jsonObj["hops_away"] = new JSONValue((unsigned int)(mp->hop_start - mp->hop_limit)); + jsonObj["hop_start"] = new JSONValue((unsigned int)(mp->hop_start)); + } + + // serialize and write it to the stream + JSONValue *value = new JSONValue(jsonObj); + std::string jsonStr = value->Stringify(); + + if (shouldLog) + LOG_INFO("serialized json message: %s\n", jsonStr.c_str()); + + delete value; + return jsonStr; +} + +std::string MeshPacketSerializer::JsonSerializeEncrypted(const meshtastic_MeshPacket *mp) +{ + JSONObject jsonObj; + + jsonObj["id"] = new JSONValue((unsigned int)mp->id); + jsonObj["time_ms"] = new JSONValue((double)millis()); + jsonObj["timestamp"] = new JSONValue((unsigned int)mp->rx_time); + jsonObj["to"] = new JSONValue((unsigned int)mp->to); + jsonObj["from"] = new JSONValue((unsigned int)mp->from); + jsonObj["channel"] = new JSONValue((unsigned int)mp->channel); + jsonObj["want_ack"] = new JSONValue(mp->want_ack); + + if (mp->rx_rssi != 0) + jsonObj["rssi"] = new JSONValue((int)mp->rx_rssi); + if (mp->rx_snr != 0) + jsonObj["snr"] = new JSONValue((float)mp->rx_snr); + if (mp->hop_start != 0 && mp->hop_limit <= mp->hop_start) { + jsonObj["hops_away"] = new JSONValue((unsigned int)(mp->hop_start - mp->hop_limit)); + jsonObj["hop_start"] = new JSONValue((unsigned int)(mp->hop_start)); + } + jsonObj["size"] = new JSONValue((unsigned int)mp->encrypted.size); + auto encryptedStr = bytesToHex(mp->encrypted.bytes, mp->encrypted.size); + jsonObj["bytes"] = new JSONValue(encryptedStr.c_str()); + + // serialize and write it to the stream + JSONValue *value = new JSONValue(jsonObj); + std::string jsonStr = value->Stringify(); + + delete value; + return jsonStr; +} +#endif \ No newline at end of file diff --git a/src/serialization/MeshPacketSerializer.h b/src/serialization/MeshPacketSerializer.h new file mode 100644 index 000000000..989f30fc0 --- /dev/null +++ b/src/serialization/MeshPacketSerializer.h @@ -0,0 +1,24 @@ +#include +#include + +static const char hexChars[16] = {'0', '1', '2', '3', '4', '5', '6', '7', '8', '9', 'A', 'B', 'C', 'D', 'E', 'F'}; +static const char *errStr = "Error decoding protobuf for %s message!\n"; + +class MeshPacketSerializer +{ + public: + static std::string JsonSerialize(const meshtastic_MeshPacket *mp, bool shouldLog = true); + static std::string JsonSerializeEncrypted(const meshtastic_MeshPacket *mp); + + private: + static std::string bytesToHex(const uint8_t *bytes, int len) + { + std::string result = ""; + for (int i = 0; i < len; ++i) { + char const byte = bytes[i]; + result += hexChars[(byte & 0xF0) >> 4]; + result += hexChars[(byte & 0x0F) >> 0]; + } + return result; + } +}; \ No newline at end of file diff --git a/src/serialization/MeshPacketSerializer_nRF52.cpp b/src/serialization/MeshPacketSerializer_nRF52.cpp new file mode 100644 index 000000000..cd3aa1630 --- /dev/null +++ b/src/serialization/MeshPacketSerializer_nRF52.cpp @@ -0,0 +1,353 @@ +#ifdef NRF52_USE_JSON +#warning 'Using nRF52 Serializer' + +#include "ArduinoJson.h" +#include "MeshPacketSerializer.h" +#include "NodeDB.h" +#include "mesh/generated/meshtastic/mqtt.pb.h" +#include "mesh/generated/meshtastic/remote_hardware.pb.h" +#include "mesh/generated/meshtastic/telemetry.pb.h" +#include "modules/RoutingModule.h" +#include +#include + +StaticJsonDocument<1024> jsonObj; +StaticJsonDocument<1024> arrayObj; + +std::string MeshPacketSerializer::JsonSerialize(const meshtastic_MeshPacket *mp, bool shouldLog) +{ + // the created jsonObj is immutable after creation, so + // we need to do the heavy lifting before assembling it. + std::string msgType; + jsonObj.clear(); + arrayObj.clear(); + + if (mp->which_payload_variant == meshtastic_MeshPacket_decoded_tag) { + switch (mp->decoded.portnum) { + case meshtastic_PortNum_TEXT_MESSAGE_APP: { + msgType = "text"; + // convert bytes to string + if (shouldLog) + LOG_DEBUG("got text message of size %u\n", mp->decoded.payload.size); + + char payloadStr[(mp->decoded.payload.size) + 1]; + memcpy(payloadStr, mp->decoded.payload.bytes, mp->decoded.payload.size); + payloadStr[mp->decoded.payload.size] = 0; // null terminated string + // check if this is a JSON payload + StaticJsonDocument<512> text_doc; + DeserializationError error = deserializeJson(text_doc, payloadStr); + if (error) { + // if it isn't, then we need to create a json object + // with the string as the value + if (shouldLog) + LOG_INFO("text message payload is of type plaintext\n"); + jsonObj["payload"]["text"] = payloadStr; + } else { + // if it is, then we can just use the json object + if (shouldLog) + LOG_INFO("text message payload is of type json\n"); + jsonObj["payload"] = text_doc; + } + break; + } + case meshtastic_PortNum_TELEMETRY_APP: { + msgType = "telemetry"; + meshtastic_Telemetry scratch; + meshtastic_Telemetry *decoded = NULL; + memset(&scratch, 0, sizeof(scratch)); + if (pb_decode_from_bytes(mp->decoded.payload.bytes, mp->decoded.payload.size, &meshtastic_Telemetry_msg, &scratch)) { + decoded = &scratch; + if (decoded->which_variant == meshtastic_Telemetry_device_metrics_tag) { + jsonObj["payload"]["battery_level"] = (unsigned int)decoded->variant.device_metrics.battery_level; + jsonObj["payload"]["voltage"] = decoded->variant.device_metrics.voltage; + jsonObj["payload"]["channel_utilization"] = decoded->variant.device_metrics.channel_utilization; + jsonObj["payload"]["air_util_tx"] = decoded->variant.device_metrics.air_util_tx; + jsonObj["payload"]["uptime_seconds"] = (unsigned int)decoded->variant.device_metrics.uptime_seconds; + } else if (decoded->which_variant == meshtastic_Telemetry_environment_metrics_tag) { + jsonObj["payload"]["temperature"] = decoded->variant.environment_metrics.temperature; + jsonObj["payload"]["relative_humidity"] = decoded->variant.environment_metrics.relative_humidity; + jsonObj["payload"]["barometric_pressure"] = decoded->variant.environment_metrics.barometric_pressure; + jsonObj["payload"]["gas_resistance"] = decoded->variant.environment_metrics.gas_resistance; + jsonObj["payload"]["voltage"] = decoded->variant.environment_metrics.voltage; + jsonObj["payload"]["current"] = decoded->variant.environment_metrics.current; + jsonObj["payload"]["lux"] = decoded->variant.environment_metrics.lux; + jsonObj["payload"]["white_lux"] = decoded->variant.environment_metrics.white_lux; + jsonObj["payload"]["iaq"] = (uint)decoded->variant.environment_metrics.iaq; + jsonObj["payload"]["wind_speed"] = decoded->variant.environment_metrics.wind_speed; + jsonObj["payload"]["wind_direction"] = (uint)decoded->variant.environment_metrics.wind_direction; + jsonObj["payload"]["wind_gust"] = decoded->variant.environment_metrics.wind_gust; + jsonObj["payload"]["wind_lull"] = decoded->variant.environment_metrics.wind_lull; + } else if (decoded->which_variant == meshtastic_Telemetry_air_quality_metrics_tag) { + jsonObj["payload"]["pm10"] = (unsigned int)decoded->variant.air_quality_metrics.pm10_standard; + jsonObj["payload"]["pm25"] = (unsigned int)decoded->variant.air_quality_metrics.pm25_standard; + jsonObj["payload"]["pm100"] = (unsigned int)decoded->variant.air_quality_metrics.pm100_standard; + jsonObj["payload"]["pm10_e"] = (unsigned int)decoded->variant.air_quality_metrics.pm10_environmental; + jsonObj["payload"]["pm25_e"] = (unsigned int)decoded->variant.air_quality_metrics.pm25_environmental; + jsonObj["payload"]["pm100_e"] = (unsigned int)decoded->variant.air_quality_metrics.pm100_environmental; + } else if (decoded->which_variant == meshtastic_Telemetry_power_metrics_tag) { + jsonObj["payload"]["voltage_ch1"] = decoded->variant.power_metrics.ch1_voltage; + jsonObj["payload"]["current_ch1"] = decoded->variant.power_metrics.ch1_current; + jsonObj["payload"]["voltage_ch2"] = decoded->variant.power_metrics.ch2_voltage; + jsonObj["payload"]["current_ch2"] = decoded->variant.power_metrics.ch2_current; + jsonObj["payload"]["voltage_ch3"] = decoded->variant.power_metrics.ch3_voltage; + jsonObj["payload"]["current_ch3"] = decoded->variant.power_metrics.ch3_current; + } + } else if (shouldLog) { + LOG_ERROR("Error decoding protobuf for telemetry message!\n"); + return ""; + } + break; + } + case meshtastic_PortNum_NODEINFO_APP: { + msgType = "nodeinfo"; + meshtastic_User scratch; + meshtastic_User *decoded = NULL; + memset(&scratch, 0, sizeof(scratch)); + if (pb_decode_from_bytes(mp->decoded.payload.bytes, mp->decoded.payload.size, &meshtastic_User_msg, &scratch)) { + decoded = &scratch; + jsonObj["payload"]["id"] = decoded->id; + jsonObj["payload"]["longname"] = decoded->long_name; + jsonObj["payload"]["shortname"] = decoded->short_name; + jsonObj["payload"]["hardware"] = decoded->hw_model; + jsonObj["payload"]["role"] = (int)decoded->role; + } else if (shouldLog) { + LOG_ERROR("Error decoding protobuf for nodeinfo message!\n"); + return ""; + } + break; + } + case meshtastic_PortNum_POSITION_APP: { + msgType = "position"; + meshtastic_Position scratch; + meshtastic_Position *decoded = NULL; + memset(&scratch, 0, sizeof(scratch)); + if (pb_decode_from_bytes(mp->decoded.payload.bytes, mp->decoded.payload.size, &meshtastic_Position_msg, &scratch)) { + decoded = &scratch; + if ((int)decoded->time) { + jsonObj["payload"]["time"] = (unsigned int)decoded->time; + } + if ((int)decoded->timestamp) { + jsonObj["payload"]["timestamp"] = (unsigned int)decoded->timestamp; + } + jsonObj["payload"]["latitude_i"] = (int)decoded->latitude_i; + jsonObj["payload"]["longitude_i"] = (int)decoded->longitude_i; + if ((int)decoded->altitude) { + jsonObj["payload"]["altitude"] = (int)decoded->altitude; + } + if ((int)decoded->ground_speed) { + jsonObj["payload"]["ground_speed"] = (unsigned int)decoded->ground_speed; + } + if (int(decoded->ground_track)) { + jsonObj["payload"]["ground_track"] = (unsigned int)decoded->ground_track; + } + if (int(decoded->sats_in_view)) { + jsonObj["payload"]["sats_in_view"] = (unsigned int)decoded->sats_in_view; + } + if ((int)decoded->PDOP) { + jsonObj["payload"]["PDOP"] = (int)decoded->PDOP; + } + if ((int)decoded->HDOP) { + jsonObj["payload"]["HDOP"] = (int)decoded->HDOP; + } + if ((int)decoded->VDOP) { + jsonObj["payload"]["VDOP"] = (int)decoded->VDOP; + } + if ((int)decoded->precision_bits) { + jsonObj["payload"]["precision_bits"] = (int)decoded->precision_bits; + } + } else if (shouldLog) { + LOG_ERROR("Error decoding protobuf for position message!\n"); + return ""; + } + break; + } + case meshtastic_PortNum_WAYPOINT_APP: { + msgType = "position"; + meshtastic_Waypoint scratch; + meshtastic_Waypoint *decoded = NULL; + memset(&scratch, 0, sizeof(scratch)); + if (pb_decode_from_bytes(mp->decoded.payload.bytes, mp->decoded.payload.size, &meshtastic_Waypoint_msg, &scratch)) { + decoded = &scratch; + jsonObj["payload"]["id"] = (unsigned int)decoded->id; + jsonObj["payload"]["name"] = decoded->name; + jsonObj["payload"]["description"] = decoded->description; + jsonObj["payload"]["expire"] = (unsigned int)decoded->expire; + jsonObj["payload"]["locked_to"] = (unsigned int)decoded->locked_to; + jsonObj["payload"]["latitude_i"] = (int)decoded->latitude_i; + jsonObj["payload"]["longitude_i"] = (int)decoded->longitude_i; + } else if (shouldLog) { + LOG_ERROR("Error decoding protobuf for position message!\n"); + return ""; + } + break; + } + case meshtastic_PortNum_NEIGHBORINFO_APP: { + msgType = "neighborinfo"; + meshtastic_NeighborInfo scratch; + meshtastic_NeighborInfo *decoded = NULL; + memset(&scratch, 0, sizeof(scratch)); + if (pb_decode_from_bytes(mp->decoded.payload.bytes, mp->decoded.payload.size, &meshtastic_NeighborInfo_msg, + &scratch)) { + decoded = &scratch; + jsonObj["payload"]["node_id"] = (unsigned int)decoded->node_id; + jsonObj["payload"]["node_broadcast_interval_secs"] = (unsigned int)decoded->node_broadcast_interval_secs; + jsonObj["payload"]["last_sent_by_id"] = (unsigned int)decoded->last_sent_by_id; + jsonObj["payload"]["neighbors_count"] = decoded->neighbors_count; + + JsonObject neighbors_obj = arrayObj.to(); + JsonArray neighbors = neighbors_obj.createNestedArray("neighbors"); + JsonObject neighbors_0 = neighbors.createNestedObject(); + + for (uint8_t i = 0; i < decoded->neighbors_count; i++) { + neighbors_0["node_id"] = (unsigned int)decoded->neighbors[i].node_id; + neighbors_0["snr"] = (int)decoded->neighbors[i].snr; + neighbors[i + 1] = neighbors_0; + neighbors_0.clear(); + } + neighbors.remove(0); + jsonObj["payload"]["neighbors"] = neighbors; + } else if (shouldLog) { + LOG_ERROR("Error decoding protobuf for neighborinfo message!\n"); + return ""; + } + break; + } + case meshtastic_PortNum_TRACEROUTE_APP: { + if (mp->decoded.request_id) { // Only report the traceroute response + msgType = "traceroute"; + meshtastic_RouteDiscovery scratch; + meshtastic_RouteDiscovery *decoded = NULL; + memset(&scratch, 0, sizeof(scratch)); + if (pb_decode_from_bytes(mp->decoded.payload.bytes, mp->decoded.payload.size, &meshtastic_RouteDiscovery_msg, + &scratch)) { + decoded = &scratch; + JsonArray route = arrayObj.createNestedArray("route"); + + auto addToRoute = [](JsonArray *route, NodeNum num) { + char long_name[40] = "Unknown"; + meshtastic_NodeInfoLite *node = nodeDB->getMeshNode(num); + bool name_known = node ? node->has_user : false; + if (name_known) + memcpy(long_name, node->user.long_name, sizeof(long_name)); + route->add(long_name); + }; + + addToRoute(&route, mp->to); // route.add(mp->to); + for (uint8_t i = 0; i < decoded->route_count; i++) { + addToRoute(&route, decoded->route[i]); // route.add(decoded->route[i]); + } + addToRoute(&route, + mp->from); // route.add(mp->from); // Ended at the original destination (source of response) + + jsonObj["payload"]["route"] = route; + } else if (shouldLog) { + LOG_ERROR("Error decoding protobuf for traceroute message!\n"); + return ""; + } + } else { + LOG_WARN("Traceroute response not reported"); + return ""; + } + break; + } + case meshtastic_PortNum_DETECTION_SENSOR_APP: { + msgType = "detection"; + char payloadStr[(mp->decoded.payload.size) + 1]; + memcpy(payloadStr, mp->decoded.payload.bytes, mp->decoded.payload.size); + payloadStr[mp->decoded.payload.size] = 0; // null terminated string + jsonObj["payload"]["text"] = payloadStr; + break; + } + case meshtastic_PortNum_REMOTE_HARDWARE_APP: { + meshtastic_HardwareMessage scratch; + meshtastic_HardwareMessage *decoded = NULL; + memset(&scratch, 0, sizeof(scratch)); + if (pb_decode_from_bytes(mp->decoded.payload.bytes, mp->decoded.payload.size, &meshtastic_HardwareMessage_msg, + &scratch)) { + decoded = &scratch; + if (decoded->type == meshtastic_HardwareMessage_Type_GPIOS_CHANGED) { + msgType = "gpios_changed"; + jsonObj["payload"]["gpio_value"] = (unsigned int)decoded->gpio_value; + } else if (decoded->type == meshtastic_HardwareMessage_Type_READ_GPIOS_REPLY) { + msgType = "gpios_read_reply"; + jsonObj["payload"]["gpio_value"] = (unsigned int)decoded->gpio_value; + jsonObj["payload"]["gpio_mask"] = (unsigned int)decoded->gpio_mask; + } + } else if (shouldLog) { + LOG_ERROR("Error decoding protobuf for RemoteHardware message!\n"); + return ""; + } + break; + } + // add more packet types here if needed + default: + LOG_WARN("Unsupported packet type %d\n", mp->decoded.portnum); + return ""; + break; + } + } else if (shouldLog) { + LOG_WARN("Couldn't convert encrypted payload of MeshPacket to JSON\n"); + return ""; + } + + jsonObj["id"] = (unsigned int)mp->id; + jsonObj["timestamp"] = (unsigned int)mp->rx_time; + jsonObj["to"] = (unsigned int)mp->to; + jsonObj["from"] = (unsigned int)mp->from; + jsonObj["channel"] = (unsigned int)mp->channel; + jsonObj["type"] = msgType.c_str(); + jsonObj["sender"] = owner.id; + if (mp->rx_rssi != 0) + jsonObj["rssi"] = (int)mp->rx_rssi; + if (mp->rx_snr != 0) + jsonObj["snr"] = (float)mp->rx_snr; + if (mp->hop_start != 0 && mp->hop_limit <= mp->hop_start) { + jsonObj["hops_away"] = (unsigned int)(mp->hop_start - mp->hop_limit); + jsonObj["hop_start"] = (unsigned int)(mp->hop_start); + } + + // serialize and write it to the stream + + // Serial.printf("serialized json message: \r\n"); + // serializeJson(jsonObj, Serial); + // Serial.println(""); + + std::string jsonStr = ""; + serializeJson(jsonObj, jsonStr); + + if (shouldLog) + LOG_INFO("serialized json message: %s\n", jsonStr.c_str()); + + return jsonStr; +} + +std::string MeshPacketSerializer::JsonSerializeEncrypted(const meshtastic_MeshPacket *mp) +{ + jsonObj.clear(); + jsonObj["id"] = (unsigned int)mp->id; + jsonObj["time_ms"] = (double)millis(); + jsonObj["timestamp"] = (unsigned int)mp->rx_time; + jsonObj["to"] = (unsigned int)mp->to; + jsonObj["from"] = (unsigned int)mp->from; + jsonObj["channel"] = (unsigned int)mp->channel; + jsonObj["want_ack"] = mp->want_ack; + + if (mp->rx_rssi != 0) + jsonObj["rssi"] = (int)mp->rx_rssi; + if (mp->rx_snr != 0) + jsonObj["snr"] = (float)mp->rx_snr; + if (mp->hop_start != 0 && mp->hop_limit <= mp->hop_start) { + jsonObj["hops_away"] = (unsigned int)(mp->hop_start - mp->hop_limit); + jsonObj["hop_start"] = (unsigned int)(mp->hop_start); + } + jsonObj["size"] = (unsigned int)mp->encrypted.size; + auto encryptedStr = bytesToHex(mp->encrypted.bytes, mp->encrypted.size); + jsonObj["bytes"] = encryptedStr.c_str(); + + // serialize and write it to the stream + std::string jsonStr = ""; + serializeJson(jsonObj, jsonStr); + + return jsonStr; +} +#endif \ No newline at end of file diff --git a/src/shutdown.h b/src/shutdown.h index 6449b129e..481e7778d 100644 --- a/src/shutdown.h +++ b/src/shutdown.h @@ -26,6 +26,9 @@ void powerCommandsCheck() SPI.end(); Wire.end(); Serial1.end(); + if (screen) + delete screen; + LOG_DEBUG("final reboot!\n"); reboot(); #else rebootAtMsec = -1; @@ -35,13 +38,13 @@ void powerCommandsCheck() #if defined(ARCH_ESP32) || defined(ARCH_NRF52) if (shutdownAtMsec) { - screen->startShutdownScreen(); + screen->startAlert("Shutting down..."); } #endif if (shutdownAtMsec && millis() > shutdownAtMsec) { LOG_INFO("Shutting down from admin command\n"); -#if defined(ARCH_NRF52) || defined(ARCH_ESP32) +#if defined(ARCH_NRF52) || defined(ARCH_ESP32) || defined(ARCH_RP2040) playShutdownMelody(); power->shutdown(); #elif defined(ARCH_PORTDUINO) diff --git a/src/sleep.cpp b/src/sleep.cpp index 0f71ab25b..60f83f537 100644 --- a/src/sleep.cpp +++ b/src/sleep.cpp @@ -1,23 +1,36 @@ -#include "sleep.h" +#include "configuration.h" + +#if !MESHTASTIC_EXCLUDE_GPS #include "GPS.h" +#endif + +#include "ButtonThread.h" +#include "Default.h" +#include "Led.h" #include "MeshRadio.h" #include "MeshService.h" #include "NodeDB.h" -#include "configuration.h" +#include "PowerMon.h" +#include "detect/LoRaRadioType.h" #include "error.h" #include "main.h" +#include "sleep.h" #include "target_specific.h" #ifdef ARCH_ESP32 +// "esp_pm_config_esp32_t is deprecated, please include esp_pm.h and use esp_pm_config_t instead" #include "esp32/pm.h" #include "esp_pm.h" +#if HAS_WIFI #include "mesh/wifi/WiFiAPClient.h" +#endif #include "rom/rtc.h" #include #include esp_sleep_source_t wakeCause; // the reason we booted this time #endif +#include "Throttle.h" #ifndef INCLUDE_vTaskSuspend #define INCLUDE_vTaskSuspend 0 @@ -28,10 +41,7 @@ Observable preflightSleep; /// Called to tell observers we are now entering sleep and you should prepare. Must return 0 /// notifySleep will be called for light or deep sleep, notifyDeepSleep is only called for deep sleep -/// notifyGPSSleep will be called when config.position.gps_enabled is set to 0 or from buttonthread when GPS_POWER_TOGGLE is -/// enabled. Observable notifySleep, notifyDeepSleep; -Observable notifyGPSSleep; // deep sleep support RTC_DATA_ATTR int bootCount = 0; @@ -48,20 +58,20 @@ RTC_DATA_ATTR int bootCount = 0; */ void setCPUFast(bool on) { -#ifdef ARCH_ESP32 +#if defined(ARCH_ESP32) && HAS_WIFI if (isWifiAvailable()) { /* * * There's a newly introduced bug in the espressif framework where WiFi is - * unstable when the frequency is less than 240mhz. + * unstable when the frequency is less than 240MHz. * * This mostly impacts WiFi AP mode but we'll bump the frequency for * all WiFi use cases. * (Added: Dec 23, 2021 by Jm Casler) */ #ifndef CONFIG_IDF_TARGET_ESP32C3 - LOG_DEBUG("Setting CPU to 240mhz because WiFi is in use.\n"); + LOG_DEBUG("Setting CPU to 240MHz because WiFi is in use.\n"); setCpuFrequencyMhz(240); #endif return; @@ -75,21 +85,6 @@ void setCPUFast(bool on) #endif } -void setLed(bool ledOn) -{ -#ifdef LED_PIN - // toggle the led so we can get some rough sense of how often loop is pausing - digitalWrite(LED_PIN, ledOn ^ LED_INVERTED); -#endif - -#ifdef HAS_PMU - if (pmu_found && PMU) { - // blink the axp led - PMU->setChargingLedMode(ledOn ? XPOWERS_CHG_LED_ON : XPOWERS_CHG_LED_OFF); - } -#endif -} - // Perform power on init that we do on each wake from deep sleep void initDeepSleep() { @@ -141,6 +136,22 @@ void initDeepSleep() LOG_INFO("Booted, wake cause %d (boot count %d), reset_reason=%s\n", wakeCause, bootCount, reason); #endif + +#if SOC_RTCIO_HOLD_SUPPORTED + // If waking from sleep, release any and all RTC GPIOs + if (wakeCause != ESP_SLEEP_WAKEUP_UNDEFINED) { + LOG_DEBUG("Disabling any holds on RTC IO pads\n"); + for (uint8_t i = 0; i <= GPIO_NUM_MAX; i++) { + if (rtc_gpio_is_valid_gpio((gpio_num_t)i)) + rtc_gpio_hold_dis((gpio_num_t)i); + + // ESP32 (original) + else if (GPIO_IS_VALID_OUTPUT_GPIO((gpio_num_t)i)) + gpio_hold_dis((gpio_num_t)i); + } + } +#endif + #endif } @@ -160,7 +171,8 @@ static void waitEnterSleep(bool skipPreflight = false) while (!doPreflightSleep()) { delay(100); // Kinda yucky - wait until radio says say we can shutdown (finished in process sends/receives) - if (millis() - now > 30 * 1000) { // If we wait too long just report an error and go to sleep + if (!Throttle::isWithinTimespanMs(now, + THIRTY_SECONDS_MS)) { // If we wait too long just report an error and go to sleep RECORD_CRITICALERROR(meshtastic_CriticalErrorCode_SLEEP_ENTER_WAIT); assert(0); // FIXME - for now we just restart, need to fix bug #167 break; @@ -186,29 +198,83 @@ void doDeepSleep(uint32_t msecToWake, bool skipPreflight = false) // not using wifi yet, but once we are this is needed to shutoff the radio hw // esp_wifi_stop(); waitEnterSleep(skipPreflight); + +#if defined(ARCH_ESP32) && !MESHTASTIC_EXCLUDE_BLUETOOTH + // Full shutdown of bluetooth hardware + if (nimbleBluetooth) + nimbleBluetooth->deinit(); +#endif + +#ifdef ARCH_ESP32 + if (shouldLoraWake(msecToWake)) { + notifySleep.notifyObservers(NULL); + } else { + notifyDeepSleep.notifyObservers(NULL); + } +#else notifyDeepSleep.notifyObservers(NULL); +#endif + + powerMon->setState(meshtastic_PowerMon_State_CPU_DeepSleep); screen->doDeepSleep(); // datasheet says this will draw only 10ua - nodeDB.saveToDisk(); + nodeDB->saveToDisk(); - // Kill GPS power completely (even if previously we just had it in sleep mode) - if (gps) - gps->setGPSPower(false, false, 0); +#ifdef PIN_POWER_EN + pinMode(PIN_POWER_EN, INPUT); // power off peripherals + // pinMode(PIN_POWER_EN1, INPUT_PULLDOWN); +#endif - setLed(false); +#ifdef TRACKER_T1000_E +#ifdef GNSS_AIROHA + digitalWrite(GPS_VRTC_EN, LOW); + digitalWrite(PIN_GPS_RESET, LOW); + digitalWrite(GPS_SLEEP_INT, LOW); + digitalWrite(GPS_RTC_INT, LOW); + pinMode(GPS_RESETB_OUT, OUTPUT); + digitalWrite(GPS_RESETB_OUT, LOW); +#endif + +#ifdef BUZZER_EN_PIN + digitalWrite(BUZZER_EN_PIN, LOW); +#endif + +#ifdef PIN_3V3_EN + digitalWrite(PIN_3V3_EN, LOW); +#endif +#endif + ledBlink.set(false); #ifdef RESET_OLED digitalWrite(RESET_OLED, 1); // put the display in reset before killing its power #endif -#if defined(VEXT_ENABLE_V03) - digitalWrite(VEXT_ENABLE_V03, 1); // turn off the display power -#elif defined(VEXT_ENABLE_V05) - digitalWrite(VEXT_ENABLE_V05, 0); // turn off the lora amplifier power - digitalWrite(ST7735_BL_V05, 0); // turn off the display power -#elif defined(VEXT_ENABLE) - digitalWrite(VEXT_ENABLE, 1); // turn off the display power +#if defined(VEXT_ENABLE) + digitalWrite(VEXT_ENABLE, !VEXT_ON_VALUE); // turn on the display power +#endif + +#ifdef ARCH_ESP32 + if (shouldLoraWake(msecToWake)) { + enableLoraInterrupt(); + } +#ifdef BUTTON_PIN + // Avoid leakage through button pin + if (GPIO_IS_VALID_OUTPUT_GPIO(BUTTON_PIN)) { +#ifdef BUTTON_NEED_PULLUP + pinMode(BUTTON_PIN, INPUT_PULLUP); +#else + pinMode(BUTTON_PIN, INPUT); +#endif + gpio_hold_en((gpio_num_t)BUTTON_PIN); + } +#endif + if (GPIO_IS_VALID_OUTPUT_GPIO(LORA_CS)) { + // LoRa CS (RADIO_NSS) needs to stay HIGH, even during deep sleep + pinMode(LORA_CS, OUTPUT); + digitalWrite(LORA_CS, HIGH); + gpio_hold_en((gpio_num_t)LORA_CS); + } #endif #ifdef HAS_PMU @@ -223,6 +289,7 @@ void doDeepSleep(uint32_t msecToWake, bool skipPreflight = false) // If we want to leave the radio receiving in would be 11.5mA current draw, but most of the time it is just waiting // in its sequencer (true?) so the average power draw should be much lower even if we were listinging for packets // all the time. + PMU->setChargingLedMode(XPOWERS_CHG_LED_OFF); uint8_t model = PMU->getChipModel(); if (model == XPOWERS_AXP2101) { @@ -237,9 +304,23 @@ void doDeepSleep(uint32_t msecToWake, bool skipPreflight = false) // t-beam v1.1 radio power channel PMU->disablePowerOutput(XPOWERS_LDO2); // lora radio power channel } + if (msecToWake == portMAX_DELAY) { + LOG_INFO("PMU shutdown.\n"); + console->flush(); + PMU->shutdown(); + } } #endif +#if defined(ARCH_ESP32) && defined(I2C_SDA) + // Added by https://github.com/meshtastic/firmware/pull/4418 + // Possibly to support Heltec Capsule Sensor? + Wire.end(); + pinMode(I2C_SDA, ANALOG); + pinMode(I2C_SCL, ANALOG); +#endif + + console->flush(); cpuDeepSleep(msecToWake); } @@ -286,20 +367,19 @@ esp_sleep_wakeup_cause_t doLightSleep(uint64_t sleepMsec) // FIXME, use a more r // assert(esp_sleep_enable_uart_wakeup(0) == ESP_OK); #endif #ifdef BUTTON_PIN -#if SOC_PM_SUPPORT_EXT_WAKEUP - esp_sleep_enable_ext0_wakeup((gpio_num_t)(config.device.button_gpio ? config.device.button_gpio : BUTTON_PIN), - LOW); // when user presses, this button goes low -#else + // The enableLoraInterrupt() method is using ext0_wakeup, so we are forced to use GPIO wakeup + gpio_num_t pin = (gpio_num_t)(config.device.button_gpio ? config.device.button_gpio : BUTTON_PIN); + + // Have to *fully* detach the normal button-interrupts first + buttonThread->detachButtonInterrupts(); + + gpio_wakeup_enable(pin, GPIO_INTR_LOW_LEVEL); esp_sleep_enable_gpio_wakeup(); - gpio_wakeup_enable((gpio_num_t)BUTTON_PIN, GPIO_INTR_LOW_LEVEL); #endif +#ifdef T_WATCH_S3 + gpio_wakeup_enable((gpio_num_t)SCREEN_TOUCH_INT, GPIO_INTR_LOW_LEVEL); #endif -#if defined(LORA_DIO1) && (LORA_DIO1 != RADIOLIB_NC) - gpio_wakeup_enable((gpio_num_t)LORA_DIO1, GPIO_INTR_HIGH_LEVEL); // SX126x/SX128x interrupt, active high -#endif -#ifdef RF95_IRQ - gpio_wakeup_enable((gpio_num_t)RF95_IRQ, GPIO_INTR_HIGH_LEVEL); // RF95 interrupt, active high -#endif + enableLoraInterrupt(); #ifdef PMU_IRQ // wake due to PMU can happen repeatedly if there is no battery installed or the battery fills if (pmu_found) @@ -307,27 +387,55 @@ esp_sleep_wakeup_cause_t doLightSleep(uint64_t sleepMsec) // FIXME, use a more r #endif auto res = esp_sleep_enable_gpio_wakeup(); if (res != ESP_OK) { - LOG_DEBUG("esp_sleep_enable_gpio_wakeup result %d\n", res); + LOG_ERROR("esp_sleep_enable_gpio_wakeup result %d\n", res); } assert(res == ESP_OK); res = esp_sleep_enable_timer_wakeup(sleepUsec); if (res != ESP_OK) { - LOG_DEBUG("esp_sleep_enable_timer_wakeup result %d\n", res); + LOG_ERROR("esp_sleep_enable_timer_wakeup result %d\n", res); } assert(res == ESP_OK); + + console->flush(); res = esp_light_sleep_start(); if (res != ESP_OK) { - LOG_DEBUG("esp_light_sleep_start result %d\n", res); + LOG_ERROR("esp_light_sleep_start result %d\n", res); } - assert(res == ESP_OK); + // commented out because it's not that crucial; + // if it sporadically happens the node will go into light sleep during the next round + // assert(res == ESP_OK); + +#ifdef BUTTON_PIN + // Disable wake-on-button interrupt. Re-attach normal button-interrupts + gpio_wakeup_disable(pin); + buttonThread->attachButtonInterrupts(); +#endif + +#ifdef T_WATCH_S3 + gpio_wakeup_disable((gpio_num_t)SCREEN_TOUCH_INT); +#endif + +#if !defined(SOC_PM_SUPPORT_EXT_WAKEUP) && defined(LORA_DIO1) && (LORA_DIO1 != RADIOLIB_NC) + if (radioType != RF95_RADIO) { + gpio_wakeup_disable((gpio_num_t)LORA_DIO1); + } +#endif +#if defined(RF95_IRQ) && (RF95_IRQ != RADIOLIB_NC) + if (radioType == RF95_RADIO) { + gpio_wakeup_disable((gpio_num_t)RF95_IRQ); + } +#endif esp_sleep_wakeup_cause_t cause = esp_sleep_get_wakeup_cause(); #ifdef BUTTON_PIN if (cause == ESP_SLEEP_WAKEUP_GPIO) { LOG_INFO("Exit light sleep gpio: btn=%d\n", !digitalRead(config.device.button_gpio ? config.device.button_gpio : BUTTON_PIN)); - } + } else #endif + { + LOG_INFO("Exit light sleep cause: %d\n", cause); + } return cause; } @@ -343,12 +451,17 @@ esp_sleep_wakeup_cause_t doLightSleep(uint64_t sleepMsec) // FIXME, use a more r */ void enableModemSleep() { +#if ESP_ARDUINO_VERSION >= ESP_ARDUINO_VERSION_VAL(3, 0, 0) + static esp_pm_config_t esp32_config; // filled with zeros because bss +#else static esp_pm_config_esp32_t esp32_config; // filled with zeros because bss - +#endif #if CONFIG_IDF_TARGET_ESP32S3 esp32_config.max_freq_mhz = CONFIG_ESP32S3_DEFAULT_CPU_FREQ_MHZ; #elif CONFIG_IDF_TARGET_ESP32S2 esp32_config.max_freq_mhz = CONFIG_ESP32S2_DEFAULT_CPU_FREQ_MHZ; +#elif CONFIG_IDF_TARGET_ESP32C6 + esp32_config.max_freq_mhz = CONFIG_ESP_DEFAULT_CPU_FREQ_MHZ; #elif CONFIG_IDF_TARGET_ESP32C3 esp32_config.max_freq_mhz = CONFIG_ESP32C3_DEFAULT_CPU_FREQ_MHZ; #else @@ -359,4 +472,44 @@ void enableModemSleep() int rv = esp_pm_configure(&esp32_config); LOG_DEBUG("Sleep request result %x\n", rv); } + +bool shouldLoraWake(uint32_t msecToWake) +{ + return msecToWake < portMAX_DELAY && (config.device.role == meshtastic_Config_DeviceConfig_Role_ROUTER || + config.device.role == meshtastic_Config_DeviceConfig_Role_REPEATER); +} + +void enableLoraInterrupt() +{ +#if SOC_PM_SUPPORT_EXT_WAKEUP && defined(LORA_DIO1) && (LORA_DIO1 != RADIOLIB_NC) + gpio_pulldown_en((gpio_num_t)LORA_DIO1); +#if defined(LORA_RESET) && (LORA_RESET != RADIOLIB_NC) + gpio_pullup_en((gpio_num_t)LORA_RESET); +#endif +#if defined(LORA_CS) && (LORA_CS != RADIOLIB_NC) + gpio_pullup_en((gpio_num_t)LORA_CS); +#endif + + if (rtc_gpio_is_valid_gpio((gpio_num_t)LORA_DIO1)) { + // Setup light/deep sleep with wakeup by external source + LOG_INFO("setup LORA_DIO1 (GPIO%02d) with wakeup by external source\n", LORA_DIO1); + esp_sleep_enable_ext0_wakeup((gpio_num_t)LORA_DIO1, HIGH); + } else { + LOG_INFO("setup LORA_DIO1 (GPIO%02d) with wakeup by gpio interrupt\n", LORA_DIO1); + gpio_wakeup_enable((gpio_num_t)LORA_DIO1, GPIO_INTR_HIGH_LEVEL); + } + +#elif defined(LORA_DIO1) && (LORA_DIO1 != RADIOLIB_NC) + if (radioType != RF95_RADIO) { + LOG_INFO("setup LORA_DIO1 (GPIO%02d) with wakeup by gpio interrupt\n", LORA_DIO1); + gpio_wakeup_enable((gpio_num_t)LORA_DIO1, GPIO_INTR_HIGH_LEVEL); // SX126x/SX128x interrupt, active high + } +#endif +#if defined(RF95_IRQ) && (RF95_IRQ != RADIOLIB_NC) + if (radioType == RF95_RADIO) { + LOG_INFO("setup RF95_IRQ (GPIO%02d) with wakeup by gpio interrupt\n", RF95_IRQ); + gpio_wakeup_enable((gpio_num_t)RF95_IRQ, GPIO_INTR_HIGH_LEVEL); // RF95 interrupt, active high + } +#endif +} #endif \ No newline at end of file diff --git a/src/sleep.h b/src/sleep.h index a592ad2c1..6ac420769 100644 --- a/src/sleep.h +++ b/src/sleep.h @@ -22,7 +22,6 @@ extern XPowersLibInterface *PMU; void initDeepSleep(); void setCPUFast(bool on); -void setLed(bool ledOn); /** return true if sleep is allowed right now */ bool doPreflightSleep(); @@ -41,6 +40,8 @@ extern Observable notifySleep; /// Called to tell observers we are now entering (deep) sleep and you should prepare. Must return 0 extern Observable notifyDeepSleep; -/// Called to tell GPS thread to enter deep sleep independently of LoRa/MCU sleep, prior to full poweroff. Must return 0 -extern Observable notifyGPSSleep; -void enableModemSleep(); \ No newline at end of file +void enableModemSleep(); +#ifdef ARCH_ESP32 +void enableLoraInterrupt(); +bool shouldLoraWake(uint32_t msecToWake); +#endif \ No newline at end of file diff --git a/src/target_specific.h b/src/target_specific.h index 1e79df510..7404a3720 100644 --- a/src/target_specific.h +++ b/src/target_specific.h @@ -5,6 +5,6 @@ // Functions that are unique to particular target types (esp32, bare, nrf52 etc...) // Enable/disable bluetooth. -void setBluetoothEnable(bool on); +void setBluetoothEnable(bool enable); void getMacAddr(uint8_t *dmac); \ No newline at end of file diff --git a/src/xmodem.cpp b/src/xmodem.cpp index 852ff3453..de73e8668 100644 --- a/src/xmodem.cpp +++ b/src/xmodem.cpp @@ -50,6 +50,8 @@ #include "xmodem.h" +#ifdef FSCom + XModemAdapter xModem; XModemAdapter::XModemAdapter() {} @@ -248,4 +250,5 @@ void XModemAdapter::handlePacket(meshtastic_XModem xmodemPacket) // Unknown control character break; } -} \ No newline at end of file +} +#endif \ No newline at end of file diff --git a/src/xmodem.h b/src/xmodem.h index 2ba0bb39f..4cfcb43e1 100644 --- a/src/xmodem.h +++ b/src/xmodem.h @@ -38,6 +38,8 @@ #define MAXRETRANS 25 +#ifdef FSCom + class XModemAdapter { public: @@ -75,3 +77,4 @@ class XModemAdapter }; extern XModemAdapter xModem; +#endif // FSCom \ No newline at end of file diff --git a/test/test_crypto/test_main.cpp b/test/test_crypto/test_main.cpp new file mode 100644 index 000000000..cbe366048 --- /dev/null +++ b/test/test_crypto/test_main.cpp @@ -0,0 +1,183 @@ +#include "CryptoEngine.h" + +#include + +void HexToBytes(uint8_t *result, const std::string hex, size_t len = 0) +{ + if (len) { + memset(result, 0, len); + } + for (unsigned int i = 0; i < hex.length(); i += 2) { + std::string byteString = hex.substr(i, 2); + result[i / 2] = (uint8_t)strtol(byteString.c_str(), NULL, 16); + } + return; +} + +void setUp(void) +{ + // set stuff up here +} + +void tearDown(void) +{ + // clean stuff up here +} + +void test_SHA256(void) +{ + uint8_t expected[32]; + uint8_t hash[32] = {0}; + + HexToBytes(expected, "e3b0c44298fc1c149afbf4c8996fb92427ae41e4649b934ca495991b7852b855"); + crypto->hash(hash, 0); + TEST_ASSERT_EQUAL_MEMORY(hash, expected, 32); + + HexToBytes(hash, "d3", 32); + HexToBytes(expected, "28969cdfa74a12c82f3bad960b0b000aca2ac329deea5c2328ebc6f2ba9802c1"); + crypto->hash(hash, 1); + TEST_ASSERT_EQUAL_MEMORY(hash, expected, 32); + + HexToBytes(hash, "11af", 32); + HexToBytes(expected, "5ca7133fa735326081558ac312c620eeca9970d1e70a4b95533d956f072d1f98"); + crypto->hash(hash, 2); + TEST_ASSERT_EQUAL_MEMORY(hash, expected, 32); +} +void test_ECB_AES256(void) +{ + // https://csrc.nist.gov/CSRC/media/Projects/Cryptographic-Standards-and-Guidelines/documents/examples/AES_ECB.pdf + + uint8_t key[32] = {0}; + uint8_t plain[16] = {0}; + uint8_t result[16] = {0}; + uint8_t expected[16] = {0}; + + HexToBytes(key, "603DEB1015CA71BE2B73AEF0857D77811F352C073B6108D72D9810A30914DFF4"); + + HexToBytes(plain, "6BC1BEE22E409F96E93D7E117393172A"); + HexToBytes(expected, "F3EED1BDB5D2A03C064B5A7E3DB181F8"); + crypto->aesSetKey(key, 32); + crypto->aesEncrypt(plain, result); // Does 16 bytes at a time + TEST_ASSERT_EQUAL_MEMORY(expected, result, 16); + + HexToBytes(plain, "AE2D8A571E03AC9C9EB76FAC45AF8E51"); + HexToBytes(expected, "591CCB10D410ED26DC5BA74A31362870"); + crypto->aesSetKey(key, 32); + crypto->aesEncrypt(plain, result); // Does 16 bytes at a time + TEST_ASSERT_EQUAL_MEMORY(expected, result, 16); + + HexToBytes(plain, "30C81C46A35CE411E5FBC1191A0A52EF"); + HexToBytes(expected, "B6ED21B99CA6F4F9F153E7B1BEAFED1D"); + crypto->aesSetKey(key, 32); + crypto->aesEncrypt(plain, result); // Does 16 bytes at a time + TEST_ASSERT_EQUAL_MEMORY(expected, result, 16); +} +void test_DH25519(void) +{ + // test vectors from wycheproof x25519 + // https://github.com/C2SP/wycheproof/blob/master/testvectors/x25519_test.json + uint8_t private_key[32]; + uint8_t public_key[32]; + uint8_t expected_shared[32]; + + HexToBytes(public_key, "504a36999f489cd2fdbc08baff3d88fa00569ba986cba22548ffde80f9806829"); + HexToBytes(private_key, "c8a9d5a91091ad851c668b0736c1c9a02936c0d3ad62670858088047ba057475"); + HexToBytes(expected_shared, "436a2c040cf45fea9b29a0cb81b1f41458f863d0d61b453d0a982720d6d61320"); + crypto->setDHPrivateKey(private_key); + TEST_ASSERT(crypto->setDHPublicKey(public_key)); + TEST_ASSERT_EQUAL_MEMORY(expected_shared, crypto->shared_key, 32); + + HexToBytes(public_key, "63aa40c6e38346c5caf23a6df0a5e6c80889a08647e551b3563449befcfc9733"); + HexToBytes(private_key, "d85d8c061a50804ac488ad774ac716c3f5ba714b2712e048491379a500211958"); + HexToBytes(expected_shared, "279df67a7c4611db4708a0e8282b195e5ac0ed6f4b2f292c6fbd0acac30d1332"); + crypto->setDHPrivateKey(private_key); + TEST_ASSERT(crypto->setDHPublicKey(public_key)); + TEST_ASSERT_EQUAL_MEMORY(expected_shared, crypto->shared_key, 32); + + HexToBytes(public_key, "ecffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff7f"); + HexToBytes(private_key, "18630f93598637c35da623a74559cf944374a559114c7937811041fc8605564a"); + crypto->setDHPrivateKey(private_key); + TEST_ASSERT(!crypto->setDHPublicKey(public_key)); // Weak public key results in 0 shared key + + HexToBytes(public_key, "f7e13a1a067d2f4e1061bf9936fde5be6b0c2494a8f809cbac7f290ef719e91c"); + HexToBytes(private_key, "10300724f3bea134eb1575245ef26ff9b8ccd59849cd98ce1a59002fe1d5986c"); + HexToBytes(expected_shared, "24becd5dfed9e9289ba2e15b82b0d54f8e9aacb72f5e4248c58d8d74b451ce76"); + crypto->setDHPrivateKey(private_key); + TEST_ASSERT(crypto->setDHPublicKey(public_key)); + crypto->hash(crypto->shared_key, 32); + TEST_ASSERT_EQUAL_MEMORY(expected_shared, crypto->shared_key, 32); +} + +void test_PKC_Decrypt(void) +{ + uint8_t private_key[32]; + uint8_t public_key[32]; + uint8_t expected_shared[32]; + uint8_t expected_decrypted[32]; + uint8_t radioBytes[128] __attribute__((__aligned__)); + uint8_t decrypted[128] __attribute__((__aligned__)); + uint8_t expected_nonce[16]; + + uint32_t fromNode; + HexToBytes(public_key, "db18fc50eea47f00251cb784819a3cf5fc361882597f589f0d7ff820e8064457"); + HexToBytes(private_key, "a00330633e63522f8a4d81ec6d9d1e6617f6c8ffd3a4c698229537d44e522277"); + HexToBytes(expected_shared, "777b1545c9d6f9a2"); + HexToBytes(expected_decrypted, "08011204746573744800"); + HexToBytes(radioBytes, "8c646d7a2909000062d6b2136b00000040df24abfcc30a17a3d9046726099e796a1c036a792b"); + HexToBytes(expected_nonce, "62d6b213036a792b2909000000"); + fromNode = 0x0929; + crypto->setDHPrivateKey(private_key); + TEST_ASSERT(crypto->setDHPublicKey(public_key)); + crypto->hash(crypto->shared_key, 32); + crypto->decryptCurve25519(fromNode, 0x13b2d662, 22, radioBytes + 16, decrypted); + TEST_ASSERT_EQUAL_MEMORY(expected_shared, crypto->shared_key, 8); + TEST_ASSERT_EQUAL_MEMORY(expected_nonce, crypto->nonce, 13); + + TEST_ASSERT_EQUAL_MEMORY(expected_decrypted, decrypted, 10); +} + +void test_AES_CTR(void) +{ + uint8_t expected[32]; + uint8_t plain[32]; + uint8_t nonce[32]; + CryptoKey k; + + // vectors from https://www.rfc-editor.org/rfc/rfc3686#section-6 + k.length = 32; + HexToBytes(k.bytes, "776BEFF2851DB06F4C8A0542C8696F6C6A81AF1EEC96B4D37FC1D689E6C1C104"); + HexToBytes(nonce, "00000060DB5672C97AA8F0B200000001"); + HexToBytes(expected, "145AD01DBF824EC7560863DC71E3E0C0"); + memcpy(plain, "Single block msg", 16); + + crypto->encryptAESCtr(k, nonce, 16, plain); + TEST_ASSERT_EQUAL_MEMORY(expected, plain, 16); + + k.length = 16; + memcpy(plain, "Single block msg", 16); + HexToBytes(k.bytes, "AE6852F8121067CC4BF7A5765577F39E"); + HexToBytes(nonce, "00000030000000000000000000000001"); + HexToBytes(expected, "E4095D4FB7A7B3792D6175A3261311B8"); + crypto->encryptAESCtr(k, nonce, 16, plain); + TEST_ASSERT_EQUAL_MEMORY(expected, plain, 16); +} + +void setup() +{ + // NOTE!!! Wait for >2 secs + // if board doesn't support software reset via Serial.DTR/RTS + delay(10); + delay(2000); + + UNITY_BEGIN(); // IMPORTANT LINE! + RUN_TEST(test_SHA256); + RUN_TEST(test_ECB_AES256); + RUN_TEST(test_DH25519); + RUN_TEST(test_AES_CTR); + RUN_TEST(test_PKC_Decrypt); +} + +void loop() +{ + UNITY_END(); // stop unit testing +} \ No newline at end of file diff --git a/userPrefs.h b/userPrefs.h new file mode 100644 index 000000000..ed622bcfb --- /dev/null +++ b/userPrefs.h @@ -0,0 +1,71 @@ +#ifndef _USERPREFS_ +#define _USERPREFS_ + +// Slipstream values: + +#define USERPREFS_TZ_STRING "tzplaceholder " + +// Uncomment and modify to set device defaults + +// #define USERPREFS_EVENT_MODE 1 + +// #define USERPREFS_CONFIG_LORA_REGION meshtastic_Config_LoRaConfig_RegionCode_US +// #define USERPREFS_LORACONFIG_MODEM_PRESET meshtastic_Config_LoRaConfig_ModemPreset_SHORT_FAST +// #define USERPREFS_LORACONFIG_CHANNEL_NUM 31 +// #define USERPREFS_CONFIG_LORA_IGNORE_MQTT true + +// #define USERPREFS_CONFIG_GPS_MODE meshtastic_Config_PositionConfig_GpsMode_ENABLED + +// #define USERPREFS_CHANNELS_TO_WRITE 3 +/* +#define 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 \ + } +*/ +// #define USERPREFS_CHANNEL_0_NAME "DEFCONnect" +// #define USERPREFS_CHANNEL_0_PRECISION 14 +/* +#define USERPREFS_CHANNEL_1_PSK \ + { \ + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, \ + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00 \ + } +*/ +// #define USERPREFS_CHANNEL_1_NAME "REPLACEME" +// #define USERPREFS_CHANNEL_1_PRECISION 14 +/* +#define USERPREFS_CHANNEL_2_PSK \ + { \ + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, \ + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00 \ + } +*/ +// #define USERPREFS_CHANNEL_2_NAME "REPLACEME" +// #define USERPREFS_CHANNEL_2_PRECISION 14 + +// #define USERPREFS_CONFIG_OWNER_LONG_NAME "My Long Name" +// #define USERPREFS_CONFIG_OWNER_SHORT_NAME "MLN" + +// #define USERPREFS_SPLASH_TITLE "DEFCONtastic" +// #define icon_width 34 +// #define icon_height 29 +// #define USERPREFS_HAS_SPLASH +/* +static unsigned char icon_bits[] = { + 0x00, 0xC0, 0x0F, 0x00, 0x00, 0x00, 0xF0, 0x3F, 0x00, 0x00, 0x00, 0xF8, 0x7F, 0x00, 0x00, 0x00, 0xFC, 0xFF, 0x00, 0x00, 0x00, + 0x9E, 0xE7, 0x00, 0x00, 0x00, 0x0E, 0xC7, 0x01, 0x00, 0x1C, 0x0F, 0xC7, 0x01, 0x00, 0x1C, 0xDF, 0xE7, 0x63, 0x00, 0x1C, 0xFF, + 0xBF, 0xE1, 0x00, 0x3C, 0xF3, 0xBF, 0xE3, 0x00, 0x7F, 0xF7, 0xBF, 0xF1, 0x00, 0xFF, 0xF7, 0xBF, 0xF9, 0x03, 0xFF, 0xE7, 0x9F, + 0xFF, 0x03, 0xC0, 0xCF, 0xEF, 0xDF, 0x03, 0x00, 0xDF, 0xE3, 0x8F, 0x00, 0x00, 0x7C, 0xFB, 0x03, 0x00, 0x00, 0xF8, 0xFF, 0x00, + 0x00, 0x00, 0xE0, 0x0F, 0x00, 0x00, 0x00, 0xC0, 0x0F, 0x00, 0x00, 0x00, 0x78, 0x3F, 0x00, 0x00, 0x00, 0xFC, 0xFC, 0x00, 0x00, + 0x98, 0x3F, 0xF0, 0x23, 0x00, 0xFC, 0x0F, 0xE0, 0x7F, 0x00, 0xFC, 0x03, 0x80, 0xFF, 0x01, 0xFC, 0x00, 0x00, 0x3E, 0x00, 0x70, + 0x00, 0x00, 0x1C, 0x00, 0x70, 0x00, 0x00, 0x1C, 0x00, 0x70, 0x00, 0x00, 0x1C, 0x00, 0x70, 0x00, 0x00, 0x1C, 0x00}; +*/ +/* +#define USERPREFS_USE_ADMIN_KEY 1 +static unsigned char USERPREFS_ADMIN_KEY[] = {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}; +*/ +#endif \ No newline at end of file diff --git a/userPrefs.json b/userPrefs.json new file mode 100644 index 000000000..bc62602be --- /dev/null +++ b/userPrefs.json @@ -0,0 +1,16 @@ +{ + "USERPREFS_CHANNEL_0_NAME": "\"DEFCONnect\"", + "USERPREFS_CHANNEL_0_PRECISION": "14", + "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 }", + "USERPREFS_CONFIG_LORA_IGNORE_MQTT": "true", + "USERPREFS_CONFIG_LORA_REGION": "meshtastic_Config_LoRaConfig_RegionCode_US", + "USERPREFS_CONFIG_OWNER_LONG_NAME": "\"My Long Name\"", + "USERPREFS_CONFIG_OWNER_SHORT_NAME": "\"MLN\"", + "USERPREFS_EVENT_MODE": "1", + "USERPREFS_HAS_SPLASH": "", + "USERPREFS_LORACONFIG_CHANNEL_NUM": "31", + "USERPREFS_LORACONFIG_MODEM_PRESET": "meshtastic_Config_LoRaConfig_ModemPreset_SHORT_FAST", + "USERPREFS_SPLASH_TITLE": "\"DEFCONtastic\"", + "USERPREFS_TZ_STRING": "\"tzplaceholder \"", + "USERPREFS_USE_ADMIN_KEY": "1" +} diff --git a/variants/CDEBYTE_EoRa-S3/pins_arduino.h b/variants/CDEBYTE_EoRa-S3/pins_arduino.h new file mode 100644 index 000000000..46415d30f --- /dev/null +++ b/variants/CDEBYTE_EoRa-S3/pins_arduino.h @@ -0,0 +1,28 @@ +// Need this file for ESP32-S3 +// No need to modify this file, changes to pins imported from variant.h +// Most is similar to https://github.com/espressif/arduino-esp32/blob/master/variants/esp32s3/pins_arduino.h + +#ifndef Pins_Arduino_h +#define Pins_Arduino_h + +#include +#include + +#define USB_VID 0x303a +#define USB_PID 0x1001 + +// Serial +static const uint8_t TX = UART_TX; +static const uint8_t RX = UART_RX; + +// Default SPI will be mapped to Radio +static const uint8_t SS = LORA_CS; +static const uint8_t SCK = LORA_SCK; +static const uint8_t MOSI = LORA_MOSI; +static const uint8_t MISO = LORA_MISO; + +// The default Wire will be mapped to PMU and RTC +static const uint8_t SCL = I2C_SCL; +static const uint8_t SDA = I2C_SDA; + +#endif /* Pins_Arduino_h */ diff --git a/variants/CDEBYTE_EoRa-S3/platformio.ini b/variants/CDEBYTE_EoRa-S3/platformio.ini new file mode 100644 index 000000000..a1642ff97 --- /dev/null +++ b/variants/CDEBYTE_EoRa-S3/platformio.ini @@ -0,0 +1,8 @@ +[env:CDEBYTE_EoRa-S3] +extends = esp32s3_base +board = CDEBYTE_EoRa-S3 +build_flags = + ${esp32s3_base.build_flags} + -D CDEBYTE_EORA_S3 + -I variants/CDEBYTE_EoRa-S3 + -D GPS_POWER_TOGGLE \ No newline at end of file diff --git a/variants/CDEBYTE_EoRa-S3/variant.h b/variants/CDEBYTE_EoRa-S3/variant.h new file mode 100644 index 000000000..5da99667b --- /dev/null +++ b/variants/CDEBYTE_EoRa-S3/variant.h @@ -0,0 +1,63 @@ +// LED - status indication +#define LED_PIN 37 + +// Button - user interface +#define BUTTON_PIN 0 // This is the BOOT button, and it has its own pull-up resistor + +// SD card - TODO: test, currently untested, copied from T3S3 variant +#define HAS_SDCARD +#define SDCARD_USE_SPI1 +// TODO: rename this to make this SD-card specific +#define SPI_CS 13 +#define SPI_SCK 14 +#define SPI_MOSI 11 +#define SPI_MISO 2 +// FIXME: there are two other SPI pins that are not defined here +// Compatibility +#define SDCARD_CS SPI_CS + +// Battery voltage monitoring - TODO: test, currently untested, copied from T3S3 variant +#define BATTERY_PIN 1 // A battery voltage measurement pin, voltage divider connected here to measure battery voltage +#define ADC_CHANNEL ADC1_GPIO1_CHANNEL +#define ADC_MULTIPLIER \ + 2.11 // ratio of voltage divider = 2.0 (R10=1M, R13=1M), plus some undervoltage correction - TODO: this was carried over from + // the T3S3, test to see if the undervoltage correction is needed. + +// Display - OLED connected via I2C by the default hardware configuration +#define HAS_SCREEN 1 +#define USE_SSD1306 +#define I2C_SCL 17 +#define I2C_SDA 18 + +// UART - The 1mm JST SH connector closest to the USB-C port +#define UART_TX 43 +#define UART_RX 44 + +// Peripheral I2C - The 1mm JST SH connector furthest from the USB-C port which follows Adafruit connection standard. There are no +// pull-up resistors on these lines, the downstream device needs to include them. TODO: test, currently untested +#define I2C_SCL1 21 +#define I2C_SDA1 10 + +// Radio +#define USE_SX1262 // CDEBYTE EoRa-S3-900TB <- CDEBYTE E22-900MM22S <- Semtech SX1262 +#define USE_SX1268 // CDEBYTE EoRa-S3-400TB <- CDEBYTE E22-400MM22S <- Semtech SX1268 + +#define SX126X_CS 7 +#define LORA_SCK 5 +#define LORA_MOSI 6 +#define LORA_MISO 3 +#define SX126X_RESET 8 +#define SX126X_BUSY 34 +#define SX126X_DIO1 33 + +#define SX126X_DIO2_AS_RF_SWITCH // All switching is performed with DIO2, it is automatically inverted using circuitry. +// CDEBYTE EoRa-S3 uses an XTAL, thus we do not need DIO3 as TCXO voltage reference. Don't define SX126X_DIO3_TCXO_VOLTAGE for +// simplicity rather than defining it as 0. +#define SX126X_MAX_POWER \ + 22 // E22-900MM22S and E22-400MM22S have a raw SX1262 or SX1268 respsectively, they are rated to output up and including 22 + // dBm out of their SX126x IC. + +// Compatibility with old variant.h file structure - FIXME: this should be done in the respective radio interface modules to clean +// up all variants. +#define LORA_CS SX126X_CS +#define LORA_DIO1 SX126X_DIO1 \ No newline at end of file diff --git a/variants/Dongle_nRF52840-pca10059-v1/platformio.ini b/variants/Dongle_nRF52840-pca10059-v1/platformio.ini index a937bfa98..a98656e86 100644 --- a/variants/Dongle_nRF52840-pca10059-v1/platformio.ini +++ b/variants/Dongle_nRF52840-pca10059-v1/platformio.ini @@ -1,11 +1,14 @@ [env:pca10059_diy_eink] +board_level = extra extends = nrf52840_base board = nordic_pca10059 -board_level = extra build_flags = ${nrf52840_base.build_flags} -Ivariants/Dongle_nRF52840-pca10059-v1 -D NORDIC_PCA10059 - -L "${platformio.libdeps_dir}/${this.__env__}/BSEC2 Software Library/src/cortex-m4/fpv4-sp-d16-hard" + -L "${platformio.libdeps_dir}/${this.__env__}/bsec2/src/cortex-m4/fpv4-sp-d16-hard" + -DEINK_DISPLAY_MODEL=GxEPD2_420_M01 + -DEINK_WIDTH=300 + -DEINK_HEIGHT=400 build_src_filter = ${nrf52_base.build_src_filter} +<../variants/Dongle_nRF52840-pca10059-v1> lib_deps = ${nrf52840_base.lib_deps} zinggjm/GxEPD2@^1.4.9 -debug_tool = jlink +debug_tool = jlink \ No newline at end of file diff --git a/variants/Dongle_nRF52840-pca10059-v1/variant.cpp b/variants/Dongle_nRF52840-pca10059-v1/variant.cpp index 8c6bf039c..2fc87c718 100644 --- a/variants/Dongle_nRF52840-pca10059-v1/variant.cpp +++ b/variants/Dongle_nRF52840-pca10059-v1/variant.cpp @@ -29,10 +29,7 @@ const uint32_t g_ADigitalPinMap[] = { void initVariant() { - // LED1 & LED2 + // LED1 pinMode(PIN_LED1, OUTPUT); ledOff(PIN_LED1); - - pinMode(PIN_LED2, OUTPUT); - ledOff(PIN_LED2); -} +} \ No newline at end of file diff --git a/variants/Dongle_nRF52840-pca10059-v1/variant.h b/variants/Dongle_nRF52840-pca10059-v1/variant.h index 81e2ad995..2318450eb 100644 --- a/variants/Dongle_nRF52840-pca10059-v1/variant.h +++ b/variants/Dongle_nRF52840-pca10059-v1/variant.h @@ -43,16 +43,12 @@ extern "C" { #define NUM_ANALOG_OUTPUTS (0) // LEDs -#define PIN_LED1 (0 + 12) // Blue LED P1.12 -#define PIN_LED2 (0 + 6) // Built in Green P0.06 - -// Green Built in LED1 -// #define PIN_LED1 (0 + 6) // LED1 P1.15 - -// RGB NeoPixel LED2 -// #define PIN_LED1 (0 + 8) Red -// #define PIN_LED1 (32 + 9) Green -// #define PIN_LED1 (0 + 12) Blue +#define PIN_LED1 (0 + 6) // Built in Green P0.06 +#define PIN_LED2 (0 + 6) // Just here for completeness +#define RGBLED_RED (0 + 8) // Red of RGB P0.08 +#define RGBLED_GREEN (32 + 9) // Green of RGB P1.09 +#define RGBLED_BLUE (0 + 12) // Blue of RGB P0.12 +#define RGBLED_CA // comment out this line if you have a common cathode type, as defined use common anode logic #define LED_BUILTIN PIN_LED1 #define LED_CONN PIN_LED2 @@ -136,7 +132,7 @@ static const uint8_t SCK = PIN_SPI_SCK; #define USE_SX1262 #define SX126X_CS (0 + 31) // LORA_CS P0.31 #define SX126X_DIO1 (0 + 29) // DIO1 P0.29 -#define SX126X_BUSY (0 + 2) // LORA_BUSY P0.02 +#define SX126X_BUSY (0 + 2) // LORA_BUSY P0.02 #define SX126X_RESET (32 + 15) // LORA_RESET P1.15 #define SX126X_TXEN (32 + 13) // TXEN P1.13 NiceRF 868 dont use #define SX126X_RXEN (32 + 10) // RXEN P1.10 NiceRF 868 dont use @@ -155,19 +151,10 @@ static const uint8_t SCK = PIN_SPI_SCK; // and has 12 bit resolution #define BATTERY_SENSE_RESOLUTION_BITS 12 #define BATTERY_SENSE_RESOLUTION 4096.0 -// Definition of milliVolt per LSB => 3.0V ADC range and 12-bit ADC resolution = 3000mV/4096 -#define VBAT_MV_PER_LSB (0.73242188F) -// Voltage divider value => 1.5M + 1M voltage divider on VBAT = (1.5M / (1M + 1.5M)) -#define VBAT_DIVIDER (0.4F) -// Compensation factor for the VBAT divider -#define VBAT_DIVIDER_COMP (1.73) -// Fixed calculation of milliVolt from compensation value -#define REAL_VBAT_MV_PER_LSB (VBAT_DIVIDER_COMP * VBAT_MV_PER_LSB) #undef AREF_VOLTAGE #define AREF_VOLTAGE 3.0 #define VBAT_AR_INTERNAL AR_INTERNAL_3_0 -#define ADC_MULTIPLIER VBAT_DIVIDER_COMP // REAL_VBAT_MV_PER_LSB -#define VBAT_RAW_TO_SCALED(x) (REAL_VBAT_MV_PER_LSB * x) +#define ADC_MULTIPLIER (1.73F) #ifdef __cplusplus } diff --git a/variants/EBYTE_ESP32-S3/pins_arduino.h b/variants/EBYTE_ESP32-S3/pins_arduino.h new file mode 100644 index 000000000..46415d30f --- /dev/null +++ b/variants/EBYTE_ESP32-S3/pins_arduino.h @@ -0,0 +1,28 @@ +// Need this file for ESP32-S3 +// No need to modify this file, changes to pins imported from variant.h +// Most is similar to https://github.com/espressif/arduino-esp32/blob/master/variants/esp32s3/pins_arduino.h + +#ifndef Pins_Arduino_h +#define Pins_Arduino_h + +#include +#include + +#define USB_VID 0x303a +#define USB_PID 0x1001 + +// Serial +static const uint8_t TX = UART_TX; +static const uint8_t RX = UART_RX; + +// Default SPI will be mapped to Radio +static const uint8_t SS = LORA_CS; +static const uint8_t SCK = LORA_SCK; +static const uint8_t MOSI = LORA_MOSI; +static const uint8_t MISO = LORA_MISO; + +// The default Wire will be mapped to PMU and RTC +static const uint8_t SCL = I2C_SCL; +static const uint8_t SDA = I2C_SDA; + +#endif /* Pins_Arduino_h */ diff --git a/variants/EBYTE_ESP32-S3/platformio.ini b/variants/EBYTE_ESP32-S3/platformio.ini new file mode 100644 index 000000000..10de91386 --- /dev/null +++ b/variants/EBYTE_ESP32-S3/platformio.ini @@ -0,0 +1,9 @@ +[env:EBYTE_ESP32-S3] +extends = esp32s3_base +; board assumes the lowest spec WROOM module: 4 MB (Quad SPI) Flash, No PSRAM +board = ESP32-S3-WROOM-1-N4 +board_level = extra +build_flags = + ${esp32s3_base.build_flags} + -D EBYTE_ESP32_S3 + -I variants/EBYTE_ESP32-S3 diff --git a/variants/EBYTE_ESP32-S3/variant.h b/variants/EBYTE_ESP32-S3/variant.h new file mode 100644 index 000000000..80fb26434 --- /dev/null +++ b/variants/EBYTE_ESP32-S3/variant.h @@ -0,0 +1,193 @@ +// Supporting information: https://github.com/S5NC/EBYTE_ESP32-S3/ + +// Originally developed for E22-900M30S with ESP32-S3-WROOM-1-N4 +// NOTE: Uses ESP32-S3-WROOM-1-N4.json in boards folder (via platformio.ini board field), assumes 4 MB (quad SPI) flash, no PSRAM + +// FIXME: implement SX12 module type autodetection and have setup for each case (add E32 support) +// 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 +// problem to NC the extra GND pins. + +// For each EBYTE module pin in this section, provide the pin number of the ESP32-S3 you connected it to +// The ESP32-S3 is great because YOU CAN USE PRACTICALLY ANY PINS for the connections, but avoid some pins (such as on the WROOM +// modules the following): strapping pins (except 0 as a user button input as it already has a pulldown resistor in typical +// application schematic) (0, 3, 45, 46), USB-reserved (19, 20), and pins which aren't present on the WROOM-2 module for +// compatiblity as it uses octal SPI, or are likely connected internally in either WROOM version (26-37), and avoid pins whose +// 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, +// 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 +// serial pins, but this isn't recommended for Serial0 as the WROOM modules have a 499 Ohm resistor on U0TXD (to reduce harmonics +// but also acting as a sort of protection) + +// 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 +// DIO2 as an extra interrupt, but right now Meshtastic does not benefit from having another interrupt pin available. + +// 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 +// enable future software to make the most of an extra available interrupt pin + +// Possible improvement: can add extremely low resistance MOSFET to physically toggle power to E22 module when in full sleep (not +// waiting for interrupt)? + +// PA stands for Power Amplifier, used when transmitting to increase output power +// LNA stands for Low Noise Amplifier, used when \ listening for / receiving \ data to increase sensitivity + +////////////////////////////////////////////////////////////////////////////////// +// // +// Have custom connections or functionality? Configure them in this section // +// // +////////////////////////////////////////////////////////////////////////////////// + +#define SX126X_CS 14 // EBYTE module's NSS pin // FIXME: rename to SX126X_SS +#define LORA_SCK 21 // EBYTE module's SCK pin +#define LORA_MOSI 38 // EBYTE module's MOSI pin +#define LORA_MISO 39 // EBYTE module's MISO pin +#define SX126X_RESET 40 // EBYTE module's NRST pin +#define SX126X_BUSY 41 // EBYTE module's BUSY pin +#define SX126X_DIO1 42 // EBYTE module's DIO1 pin +// 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 +// pin! Also E22 module datasheets say not to connect it to an MCU pin. +// 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 +// pin! Also E22 module datasheets say to use it as the TCXO's reference voltage. +// E32 module (which uses SX1276) may not have ability to set TCXO voltage using a DIO pin. + +// The radio module needs to be told whether to enable RX mode or TX mode. Each radio module takes different actions based on +// these values, but generally the path from the antenna to SX1262 is changed from signal output to signal input. Also, if there +// are LNAs (Low-Noise Amplifiers) or PAs (Power Amplifiers) in the output or input paths, their power is also controlled by +// these pins. You should never have both TXEN and RXEN set high, this can cause problems for some radio modules, and is +// commonly referred to as 'undefined behaviour' in datasheets. For the SX1262, you shouldn't connect DIO2 to the MCU. DIO2 is +// 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 +// control the RF switching mode. + +// Choose ONLY ONE option from below, comment in/out the '/*'s and '*/'s +// SX126X_TXEN is the E22's [SX1262's] TXEN pin, SX126X_RXEN is the E22's [SX1262's] RXEN pin + +// 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 +// expensive option hardware-wise, is the 'most proper' way, removes need for routing one/two traces from MCU to RF switching +// pins), however you can't have E22 in low-power 'sleep' mode (TXEN and RXEN both low cannot be achieved this this option). +/* +#define SX126X_DIO2_AS_RF_SWITCH +#define SX126X_TXEN RADIOLIB_NC +#define SX126X_RXEN RADIOLIB_NC +*/ + +// Option 2: E22's TXEN pin connected to E22's DIO2 pin, E22's RXEN pin connected to MCU pin (cheaper option hardware-wise, +// removes need for routing another trace from MCU to an RF switching pin). +// /* +#define SX126X_DIO2_AS_RF_SWITCH +#define SX126X_TXEN RADIOLIB_NC +#define SX126X_RXEN 10 +// */ + +// Option 3: E22's TXEN pin connected to MCU pin, E22's RXEN pin connected to MCU pin (cheaper option hardware-wise, allows for +// ramping up PA before transmission (add/expand on feature yourself in RadioLib) if PA takes a while to stabilise) +// 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 +// a short if they are both connected at the same time (suboptimal PCB design) and there's a slight non-neglibible delay and/or +// voltage difference between DIO2 and TXEN). Can use DIO2 as an IRQ (but not in Meshtastic at the moment). +/* +#define SX126X_TXEN 9 +#define SX126X_RXEN 10 +*/ + +// (NOT RECOMMENDED, if need to ramp up PA before transmission, better to use option 3) +// 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 +// option hardware-wise, allows for ramping up PA before transmission (add/expand on feature yourself in RadioLib) if PA takes +// a while to stabilise, removes need for routing another trace from MCU to an RF switching pin, however may mean if in +// RadioLib you don't tell DIO2 to go high to indicate transmission (so the negated output goes to RXEN to turn the LNA off) +// 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, +// changing DIO2's switching advance in RadioLib may not even be possible, may be baked into the SX126x). +/* +#define SX126X_DIO2_AS_RF_SWITCH +#define SX126X_TXEN 9 +#define SX126X_RXEN RADIOLIB_NC +*/ + +// Status +#define LED_PIN 1 +#define LED_STATE_ON 1 // State when LED is lit +// External notification +// FIXME: Check if EXT_NOTIFY_OUT actualy has any effect and removes the need for setting the external notication pin in the +// app/preferences +#define EXT_NOTIFY_OUT 2 // The GPIO pin that acts as the external notification output (here we connect an LED to it) +// Buzzer +#define PIN_BUZZER 11 +// Buttons +#define BUTTON_PIN 0 // Use the BOOT button as the user button +// I2C +#define I2C_SCL 18 +#define I2C_SDA 8 +// UART +#define UART_TX 43 +#define UART_RX 44 + +// Power +// Outputting 22dBm from SX1262 results in ~30dBm E22-900M30S output (module only uses last stage of the YP2233W PA) +// Respect local regulations! If your E22-900M30S outputs the advertised 30 dBm and you use a 6 dBi antenna, you are at the +// equivalent of 36 EIRP (Effective Isotropic Radiated Power), which in this case is the limit for non-HAM users in the US (4W +// EIRP, at SPECIFIC frequencies). +// In the EU (and UK), as of now, you are allowed 27 dBm ERP which is 29.15 EIRP. +// https://eur-lex.europa.eu/legal-content/EN/TXT/?uri=CELEX:32022D0180 +// https://www.legislation.gov.uk/uksi/1999/930/schedule/6/made +// To respect the 29.15 dBm EIRP (at SPECIFIC frequencies, others are lower) EU limit with a 2.5 dBi gain antenna, consulting +// https://github.com/S5NC/EBYTE_ESP32-S3/blob/main/power%20testing.txt, assuming 0.1 dBm insertion loss, output 20 dBm from the +// 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 +// with a lower gain antenna, and output the difference as a higher total power input into the antenna, as your EIRP would be the +// same, but you would get a wider angle of coverage. Also take insertion loss and possibly VSWR into account +// (https://www.everythingrf.com/tech-resources/vswr). Please check regulations yourself and check airtime, usage (for example +// whether you are airborne), frequency, and power laws. +#define SX126X_MAX_POWER 22 // SX126xInterface.cpp defaults to 22 if not defined, but here we define it for good practice + +// Display +// FIXME: change behavior in src to default to not having screen if is undefined +// FIXME: remove 0/1 option for HAS_SCREEN in src, change to being defined or not +// FIXME: check if it actually causes a crash when not specifiying that a display isn't present +#define HAS_SCREEN 0 // Assume no screen present by default to prevent crash... + +// GPS +// FIXME: unsure what to define HAS_GPS as if GPS isn't always present +#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 +#define PIN_GPS_EN 15 +#define GPS_EN_ACTIVE 1 +#define GPS_TX_PIN 16 +#define GPS_RX_PIN 17 + +///////////////////////////////////////////////////////////////////////////////// +// // +// You should have no need to modify the code below, nor in pins_arduino.h // +// // +///////////////////////////////////////////////////////////////////////////////// + +#define USE_SX1262 // E22-900M30S, E22-900M22S, and E22-900MM22S (not E220!) use SX1262 +#define USE_SX1268 // E22-400M30S, E22-400M33S, E22-400M22S, and E22-400MM22S use SX1268 + +// The below isn't needed as we directly define SX126X_TXEN and SX126X_RXEN instead of using proxies E22_TXEN and E22_RXEN +/* +// 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 +being defined but having no value #if (!defined(E22_TXEN) || !(0 <= E22_TXEN && E22_TXEN <= 48)) #define E22_TXEN RADIOLIB_NC +#endif +// 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 +being defined but having no value #if (!defined(E22_RXEN) || !(0 <= E22_RXEN && E22_RXEN <= 48)) #define E22_RXEN RADIOLIB_NC +#endif +#define SX126X_TXEN E22_TXEN +#define SX126X_RXEN E22_RXEN +*/ + +// E22 series TCXO voltage is 1.8V per https://www.ebyte.com/en/pdf-down.aspx?id=781 (source +// https://github.com/jgromes/RadioLib/issues/12#issuecomment-520695575), so set it as such +#define SX126X_DIO3_TCXO_VOLTAGE 1.8 + +#define LORA_CS SX126X_CS // FIXME: for some reason both are used in /src + +// 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 +// 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 +// 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 +// in src (as we are not using RF95) as SX1262 does not have it per SX1262 datasheet, so no need to define +// FIXME: confirm that the linked lines below are actually only called when using the SX126x or SX128x and no other modules +// then use SX126X_DIO1 and SX128X_DIO1 respectively for that purpose, removing the need for RF95-style LORA_* definitions when +// the RF95 isn't used +#define LORA_DIO1 \ + SX126X_DIO1 // The old name is used in + // https://github.com/meshtastic/firmware/blob/7eff5e7bcb2084499b723c5e3846c15ee089e36d/src/sleep.cpp#L298, so + // must also define the old name +// 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 +// 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 +// 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 +// 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 +// generated even if it is mapped to the pins.) \ No newline at end of file diff --git a/variants/ME25LS01-4Y10TD/platformio.ini b/variants/ME25LS01-4Y10TD/platformio.ini new file mode 100644 index 000000000..479a4e79c --- /dev/null +++ b/variants/ME25LS01-4Y10TD/platformio.ini @@ -0,0 +1,15 @@ +[env:ME25LS01-4Y10TD] +extends = nrf52840_base +board = me25ls01-4y10td +board_level = extra +; platform = https://github.com/maxgerhardt/platform-nordicnrf52#cac6fcf943a41accd2aeb4f3659ae297a73f422e +build_flags = ${nrf52840_base.build_flags} -Ivariants/ME25LS01-4Y10TD -Isrc/platform/nrf52/softdevice -Isrc/platform/nrf52/softdevice/nrf52 -DME25LS01_4Y10TD + -L "${platformio.libdeps_dir}/${this.__env__}/bsec2/src/cortex-m4/fpv4-sp-d16-hard" + -DGPS_POWER_TOGGLE ; comment this line to disable triple press function on the user button to turn off gps entirely. +board_build.ldscript = src/platform/nrf52/nrf52840_s140_v7.ld +build_src_filter = ${nrf52_base.build_src_filter} +<../variants/ME25LS01-4Y10TD> +lib_deps = + ${nrf52840_base.lib_deps} +; If not set we will default to uploading over serial (first it forces bootloader entry by talking 1200bps to cdcacm) +upload_protocol = nrfutil +upload_port = /dev/ttyACM1 \ No newline at end of file diff --git a/variants/ME25LS01-4Y10TD/rfswitch.h b/variants/ME25LS01-4Y10TD/rfswitch.h new file mode 100644 index 000000000..cda6364f5 --- /dev/null +++ b/variants/ME25LS01-4Y10TD/rfswitch.h @@ -0,0 +1,15 @@ +#include "RadioLib.h" +#include "nrf.h" + +// set RF switch configuration for Wio WM1110 +// Wio WM1110 uses DIO5 and DIO6 for RF switching + +static const uint32_t rfswitch_dio_pins[] = {RADIOLIB_LR11X0_DIO5, RADIOLIB_LR11X0_DIO6, RADIOLIB_NC, RADIOLIB_NC, RADIOLIB_NC}; + +static const Module::RfSwitchMode_t rfswitch_table[] = { + // mode DIO5 DIO6 + {LR11x0::MODE_STBY, {LOW, LOW}}, {LR11x0::MODE_RX, {HIGH, LOW}}, + {LR11x0::MODE_TX, {HIGH, HIGH}}, {LR11x0::MODE_TX_HP, {LOW, HIGH}}, + {LR11x0::MODE_TX_HF, {LOW, LOW}}, {LR11x0::MODE_GNSS, {LOW, LOW}}, + {LR11x0::MODE_WIFI, {LOW, LOW}}, END_OF_MODE_TABLE, +}; diff --git a/variants/ME25LS01-4Y10TD/variant.cpp b/variants/ME25LS01-4Y10TD/variant.cpp new file mode 100644 index 000000000..35dc1d39b --- /dev/null +++ b/variants/ME25LS01-4Y10TD/variant.cpp @@ -0,0 +1,40 @@ +/* + Copyright (c) 2014-2015 Arduino LLC. All right reserved. + Copyright (c) 2016 Sandeep Mistry All right reserved. + Copyright (c) 2018, Adafruit Industries (adafruit.com) + + This library is free software; you can redistribute it and/or + modify it under the terms of the GNU Lesser General Public + License as published by the Free Software Foundation; either + version 2.1 of the License, or (at your option) any later version. + + This library is distributed in the hope that it will be useful, + but WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. + See the GNU Lesser General Public License for more details. + + You should have received a copy of the GNU Lesser General Public + License along with this library; if not, write to the Free Software + Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA +*/ + +#include "variant.h" +#include "nrf.h" +#include "wiring_constants.h" +#include "wiring_digital.h" + +const uint32_t g_ADigitalPinMap[] = { + // P0 + 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, + + // P1 + 32, 33, 34, 35, 36, 37, 38, 39, 40, 41, 42, 43, 44, 45, 46, 47}; + +void initVariant() +{ + pinMode(LED_PIN, OUTPUT); + digitalWrite(LED_PIN, LOW); + + pinMode(PIN_3V3_EN, OUTPUT); + digitalWrite(PIN_3V3_EN, HIGH); +} \ No newline at end of file diff --git a/variants/ME25LS01-4Y10TD/variant.h b/variants/ME25LS01-4Y10TD/variant.h new file mode 100644 index 000000000..e772069da --- /dev/null +++ b/variants/ME25LS01-4Y10TD/variant.h @@ -0,0 +1,138 @@ +/* + Copyright (c) 2014-2015 Arduino LLC. All right reserved. + Copyright (c) 2016 Sandeep Mistry All right reserved. + Copyright (c) 2018, Adafruit Industries (adafruit.com) + + This library is free software; you can redistribute it and/or + modify it under the terms of the GNU Lesser General Public + License as published by the Free Software Foundation; either + version 2.1 of the License, or (at your option) any later version. + This library is distributed in the hope that it will be useful, + but WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. + See the GNU Lesser General Public License for more details. + You should have received a copy of the GNU Lesser General Public + License along with this library; if not, write to the Free Software + Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA +*/ + +#ifndef _VARIANT_ME25LS01_4Y10TD_ +#define _VARIANT_ME25LS01_4Y10TD_ + +#define ME25LS01 + +/** Master clock frequency */ +#define VARIANT_MCK (64000000ul) + +#define USE_LFXO // Board uses 32khz crystal for LF + +/*---------------------------------------------------------------------------- + * Headers + *----------------------------------------------------------------------------*/ + +#include "WVariant.h" + +#ifdef __cplusplus +extern "C" { +#endif // __cplusplus + +// Number of pins defined in PinDescription array +#define PINS_COUNT (48) +#define NUM_DIGITAL_PINS (48) +#define NUM_ANALOG_INPUTS (6) +#define NUM_ANALOG_OUTPUTS (0) + +// Use the native nrf52 usb power detection +#define NRF_APM + +#define PIN_3V3_EN (32 + 5) //-1 +#define PIN_3V3_ACC_EN -1 + +#define PIN_LED1 (32 + 7) // P1.07 Blue D2 + +#define LED_PIN PIN_LED1 +#define LED_BUILTIN -1 + +#define LED_BLUE -1 +#define LED_STATE_ON 1 // State when LED is lit + +#define BUTTON_PIN (0 + 27) // P0.27 K3 +#define BUTTON_NEED_PULLUP + +#define HAS_WIRE 1 + +#define WIRE_INTERFACES_COUNT 1 + +#define PIN_WIRE_SDA (0 + 15) // P0.15 +#define PIN_WIRE_SCL (0 + 17) // P0.17 + +/* + * Serial interfaces + */ +#define PIN_SERIAL1_RX (0 + 14) // P0.14 +#define PIN_SERIAL1_TX (0 + 13) // P0.13 + +#define PIN_SERIAL2_RX (0 + 17) // P0.17 +#define PIN_SERIAL2_TX (0 + 16) // P0.16 + +#define SPI_INTERFACES_COUNT 1 + +#define PIN_SPI_MISO (0 + 29) // P0.20 // MISO +#define PIN_SPI_MOSI (0 + 2) // P0.02 // MOSI +#define PIN_SPI_SCK (32 + 15) // P1.15 // SCK +#define PIN_SPI_NSS (32 + 13) // P1.13 // NSS + +#define LORA_RESET (32 + 11) // P1.11 // RST +#define LORA_DIO1 (32 + 12) // P1.12 // IRQ +#define LORA_DIO2 (32 + 10) // P1.10 // BUSY +#define LORA_SCK PIN_SPI_SCK +#define LORA_MISO PIN_SPI_MISO +#define LORA_MOSI PIN_SPI_MOSI +#define LORA_CS PIN_SPI_NSS + +// supported modules list +#define USE_LR1110 + +#define LR1110_IRQ_PIN LORA_DIO1 +#define LR1110_NRESET_PIN LORA_RESET +#define LR1110_BUSY_PIN LORA_DIO2 +#define LR1110_SPI_NSS_PIN LORA_CS +#define LR1110_SPI_SCK_PIN LORA_SCK +#define LR1110_SPI_MOSI_PIN LORA_MOSI +#define LR1110_SPI_MISO_PIN LORA_MISO + +#define LR11X0_DIO3_TCXO_VOLTAGE 1.6 +#define LR11X0_DIO_AS_RF_SWITCH + +#define HAS_GPS 0 + +#define PIN_GPS_EN -1 +#define GPS_EN_ACTIVE HIGH +#define PIN_GPS_RESET -1 +#define GPS_VRTC_EN -1 +#define GPS_SLEEP_INT -1 +#define GPS_RTC_INT -1 +#define GPS_RESETB_OUT -1 + +#define BATTERY_PIN -1 +#define ADC_MULTIPLIER (2.0F) + +#define ADC_RESOLUTION 14 +#define BATTERY_SENSE_RESOLUTION_BITS 12 + +#undef AREF_VOLTAGE +#define AREF_VOLTAGE 3.0 +#define VBAT_AR_INTERNAL AR_INTERNAL_3_0 + +// Buzzer +#define PIN_BUZZER (0 + 25) + +#ifdef __cplusplus +} +#endif + +/*---------------------------------------------------------------------------- + * Arduino objects - C++ only + *----------------------------------------------------------------------------*/ + +#endif // _VARIANT_ME25LS01_4Y10TD_ diff --git a/variants/ME25LS01-4Y10TD_e-ink/platformio.ini b/variants/ME25LS01-4Y10TD_e-ink/platformio.ini new file mode 100644 index 000000000..f2e3a49e3 --- /dev/null +++ b/variants/ME25LS01-4Y10TD_e-ink/platformio.ini @@ -0,0 +1,19 @@ +[env:ME25LS01-4Y10TD_e-ink] +extends = nrf52840_base +board = me25ls01-4y10td +board_level = extra +; platform = https://github.com/maxgerhardt/platform-nordicnrf52#cac6fcf943a41accd2aeb4f3659ae297a73f422e +build_flags = ${nrf52840_base.build_flags} -Ivariants/ME25LS01-4Y10TD_e-ink -Isrc/platform/nrf52/softdevice -Isrc/platform/nrf52/softdevice/nrf52 -DME25LS01_4Y10TD + -L "${platformio.libdeps_dir}/${this.__env__}/bsec2/src/cortex-m4/fpv4-sp-d16-hard" + -DGPS_POWER_TOGGLE ; comment this line to disable triple press function on the user button to turn off gps entirely. + -DEINK_DISPLAY_MODEL=GxEPD2_420_GDEY042T81 + -DEINK_WIDTH=400 + -DEINK_HEIGHT=300 +board_build.ldscript = src/platform/nrf52/nrf52840_s140_v7.ld +build_src_filter = ${nrf52_base.build_src_filter} +<../variants/ME25LS01-4Y10TD_e-ink> +lib_deps = + ${nrf52840_base.lib_deps} + zinggjm/GxEPD2@^1.5.8 +; If not set we will default to uploading over serial (first it forces bootloader entry by talking 1200bps to cdcacm) +upload_protocol = nrfutil +upload_port = /dev/ttyACM1 \ No newline at end of file diff --git a/variants/ME25LS01-4Y10TD_e-ink/rfswitch.h b/variants/ME25LS01-4Y10TD_e-ink/rfswitch.h new file mode 100644 index 000000000..cda6364f5 --- /dev/null +++ b/variants/ME25LS01-4Y10TD_e-ink/rfswitch.h @@ -0,0 +1,15 @@ +#include "RadioLib.h" +#include "nrf.h" + +// set RF switch configuration for Wio WM1110 +// Wio WM1110 uses DIO5 and DIO6 for RF switching + +static const uint32_t rfswitch_dio_pins[] = {RADIOLIB_LR11X0_DIO5, RADIOLIB_LR11X0_DIO6, RADIOLIB_NC, RADIOLIB_NC, RADIOLIB_NC}; + +static const Module::RfSwitchMode_t rfswitch_table[] = { + // mode DIO5 DIO6 + {LR11x0::MODE_STBY, {LOW, LOW}}, {LR11x0::MODE_RX, {HIGH, LOW}}, + {LR11x0::MODE_TX, {HIGH, HIGH}}, {LR11x0::MODE_TX_HP, {LOW, HIGH}}, + {LR11x0::MODE_TX_HF, {LOW, LOW}}, {LR11x0::MODE_GNSS, {LOW, LOW}}, + {LR11x0::MODE_WIFI, {LOW, LOW}}, END_OF_MODE_TABLE, +}; diff --git a/variants/ME25LS01-4Y10TD_e-ink/variant.cpp b/variants/ME25LS01-4Y10TD_e-ink/variant.cpp new file mode 100644 index 000000000..35dc1d39b --- /dev/null +++ b/variants/ME25LS01-4Y10TD_e-ink/variant.cpp @@ -0,0 +1,40 @@ +/* + Copyright (c) 2014-2015 Arduino LLC. All right reserved. + Copyright (c) 2016 Sandeep Mistry All right reserved. + Copyright (c) 2018, Adafruit Industries (adafruit.com) + + This library is free software; you can redistribute it and/or + modify it under the terms of the GNU Lesser General Public + License as published by the Free Software Foundation; either + version 2.1 of the License, or (at your option) any later version. + + This library is distributed in the hope that it will be useful, + but WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. + See the GNU Lesser General Public License for more details. + + You should have received a copy of the GNU Lesser General Public + License along with this library; if not, write to the Free Software + Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA +*/ + +#include "variant.h" +#include "nrf.h" +#include "wiring_constants.h" +#include "wiring_digital.h" + +const uint32_t g_ADigitalPinMap[] = { + // P0 + 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, + + // P1 + 32, 33, 34, 35, 36, 37, 38, 39, 40, 41, 42, 43, 44, 45, 46, 47}; + +void initVariant() +{ + pinMode(LED_PIN, OUTPUT); + digitalWrite(LED_PIN, LOW); + + pinMode(PIN_3V3_EN, OUTPUT); + digitalWrite(PIN_3V3_EN, HIGH); +} \ No newline at end of file diff --git a/variants/ME25LS01-4Y10TD_e-ink/variant.h b/variants/ME25LS01-4Y10TD_e-ink/variant.h new file mode 100644 index 000000000..797394ce6 --- /dev/null +++ b/variants/ME25LS01-4Y10TD_e-ink/variant.h @@ -0,0 +1,161 @@ +/* + Copyright (c) 2014-2015 Arduino LLC. All right reserved. + Copyright (c) 2016 Sandeep Mistry All right reserved. + Copyright (c) 2018, Adafruit Industries (adafruit.com) + + This library is free software; you can redistribute it and/or + modify it under the terms of the GNU Lesser General Public + License as published by the Free Software Foundation; either + version 2.1 of the License, or (at your option) any later version. + This library is distributed in the hope that it will be useful, + but WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. + See the GNU Lesser General Public License for more details. + You should have received a copy of the GNU Lesser General Public + License along with this library; if not, write to the Free Software + Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA +*/ + +#ifndef _VARIANT_ME25LS01_4Y10TD_ +#define _VARIANT_ME25LS01_4Y10TD_ + +#define ME25LS01 + +/** Master clock frequency */ +#define VARIANT_MCK (64000000ul) + +#define USE_LFXO // Board uses 32khz crystal for LF + +/*---------------------------------------------------------------------------- + * Headers + *----------------------------------------------------------------------------*/ + +#include "WVariant.h" + +#ifdef __cplusplus +extern "C" { +#endif // __cplusplus + +// Number of pins defined in PinDescription array +#define PINS_COUNT (48) +#define NUM_DIGITAL_PINS (48) +#define NUM_ANALOG_INPUTS (6) +#define NUM_ANALOG_OUTPUTS (0) + +// Use the native nrf52 usb power detection +#define NRF_APM + +#define PIN_3V3_EN (32 + 5) //-1 +#define PIN_3V3_ACC_EN -1 + +#define PIN_LED1 (32 + 7) // P1.07 Blue D2 + +#define LED_PIN PIN_LED1 +#define LED_BUILTIN -1 + +#define LED_BLUE -1 +#define LED_STATE_ON 1 // State when LED is lit + +#define BUTTON_PIN (0 + 27) // P0.27 K3 +#define BUTTON_NEED_PULLUP + +#define HAS_WIRE 1 + +#define WIRE_INTERFACES_COUNT 1 + +#define PIN_WIRE_SDA (0 + 15) // P0.15 +#define PIN_WIRE_SCL (0 + 17) // P0.17 + +/* + * Serial interfaces + */ +#define PIN_SERIAL1_RX (0 + 14) // P0.14 +#define PIN_SERIAL1_TX (0 + 13) // P0.13 + +#define PIN_SERIAL2_RX (0 + 17) // P0.17 +#define PIN_SERIAL2_TX (0 + 16) // P0.16 + +#define SPI_INTERFACES_COUNT 2 + +// LoRa SPI +#define PIN_SPI_MISO (0 + 29) // P0.20 // MISO +#define PIN_SPI_MOSI (0 + 2) // P0.02 // MOSI +#define PIN_SPI_SCK (32 + 15) // P1.15 // SCK +#define PIN_SPI_NSS (32 + 13) // P1.13 // NSS + +#define LORA_RESET (32 + 11) // P1.11 // RST +#define LORA_DIO1 (32 + 12) // P1.12 // IRQ +#define LORA_DIO2 (32 + 10) // P1.10 // BUSY +#define LORA_SCK PIN_SPI_SCK +#define LORA_MISO PIN_SPI_MISO +#define LORA_MOSI PIN_SPI_MOSI +#define LORA_CS PIN_SPI_NSS + +static const uint8_t SS = (32 + 13); // P1.13 // NSS +static const uint8_t MOSI = PIN_SPI_MOSI; +static const uint8_t MISO = PIN_SPI_MISO; +static const uint8_t SCK = PIN_SPI_SCK; + +// EPD SPI +#define PIN_SPI1_MISO (32 + 2) // Not Used for EPD but needs to be defined +#define PIN_SPI1_MOSI (0 + 10) // EPD_MOSI P0.10 +#define PIN_SPI1_SCK (0 + 9) // EPD_SCLK P0.09 + +/* + * eink display pins + */ + +#define USE_EINK +#define PIN_EINK_CS (32 + 0) // EPD_CS +#define PIN_EINK_BUSY (0 + 19) // EPD_BUSY +#define PIN_EINK_DC (0 + 24) // EPD_D/C +#define PIN_EINK_RES (0 + 23) // EPD_RESET +#define PIN_EINK_SCLK PIN_SPI1_SCK +#define PIN_EINK_MOSI PIN_SPI1_MOSI + +// supported modules list +#define USE_LR1110 + +#define LR1110_IRQ_PIN LORA_DIO1 +#define LR1110_NRESET_PIN LORA_RESET +#define LR1110_BUSY_PIN LORA_DIO2 +#define LR1110_SPI_NSS_PIN LORA_CS +#define LR1110_SPI_SCK_PIN LORA_SCK +#define LR1110_SPI_MOSI_PIN LORA_MOSI +#define LR1110_SPI_MISO_PIN LORA_MISO + +#define LR11X0_DIO3_TCXO_VOLTAGE 1.6 +#define LR11X0_DIO_AS_RF_SWITCH + +#define HAS_GPS 0 + +#define PIN_GPS_EN -1 +#define GPS_EN_ACTIVE HIGH +#define PIN_GPS_RESET -1 +#define GPS_VRTC_EN -1 +#define GPS_SLEEP_INT -1 +#define GPS_RTC_INT -1 +#define GPS_RESETB_OUT -1 + +#define BATTERY_PIN -1 +#define ADC_MULTIPLIER (2.0F) + +#define ADC_RESOLUTION 14 +#define BATTERY_SENSE_RESOLUTION_BITS 12 + +#undef AREF_VOLTAGE +#define AREF_VOLTAGE 3.0 +#define VBAT_AR_INTERNAL AR_INTERNAL_3_0 + +// Buzzer +#define PIN_BUZZER (0 + 25) + +#ifdef __cplusplus +} +#endif + +/*---------------------------------------------------------------------------- + * Arduino objects - C++ only + *----------------------------------------------------------------------------*/ + +#endif // _VARIANT_ME25LS01_4Y10TD__ \ No newline at end of file diff --git a/variants/MS24SF1/platformio.ini b/variants/MS24SF1/platformio.ini new file mode 100644 index 000000000..5cbd078d0 --- /dev/null +++ b/variants/MS24SF1/platformio.ini @@ -0,0 +1,15 @@ +[env:ms24sf1] +extends = nrf52840_base +board = ms24sf1 +board_level = extra +; platform = https://github.com/maxgerhardt/platform-nordicnrf52#cac6fcf943a41accd2aeb4f3659ae297a73f422e +build_flags = ${nrf52840_base.build_flags} -Ivariants/MS24SF1 -Isrc/platform/nrf52/softdevice -Isrc/platform/nrf52/softdevice/nrf52 + -L "${platformio.libdeps_dir}/${this.__env__}/bsec2/src/cortex-m4/fpv4-sp-d16-hard" + -DGPS_POWER_TOGGLE ; comment this line to disable triple press function on the user button to turn off gps entirely. +board_build.ldscript = src/platform/nrf52/nrf52840_s140_v7.ld +build_src_filter = ${nrf52_base.build_src_filter} +<../variants/MS24SF1> +lib_deps = + ${nrf52840_base.lib_deps} +; If not set we will default to uploading over serial (first it forces bootloader entry by talking 1200bps to cdcacm) +upload_protocol = nrfutil +upload_port = /dev/ttyACM1 diff --git a/variants/MS24SF1/variant.cpp b/variants/MS24SF1/variant.cpp new file mode 100644 index 000000000..d1d79c8ce --- /dev/null +++ b/variants/MS24SF1/variant.cpp @@ -0,0 +1,30 @@ +/* + Copyright (c) 2014-2015 Arduino LLC. All right reserved. + Copyright (c) 2016 Sandeep Mistry All right reserved. + Copyright (c) 2018, Adafruit Industries (adafruit.com) + This library is free software; you can redistribute it and/or + modify it under the terms of the GNU Lesser General Public + License as published by the Free Software Foundation; either + version 2.1 of the License, or (at your option) any later version. + This library is distributed in the hope that it will be useful, + but WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. + See the GNU Lesser General Public License for more details. + You should have received a copy of the GNU Lesser General Public + License along with this library; if not, write to the Free Software + Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA +*/ + +#include "variant.h" +#include "nrf.h" +#include "wiring_constants.h" +#include "wiring_digital.h" + +const uint32_t g_ADigitalPinMap[] = { + // P0 + 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, + + // P1 + 32, 33, 34, 35, 36, 37, 38, 39, 40, 41, 42, 43, 44, 45, 46, 47}; + +void initVariant() {} diff --git a/variants/MS24SF1/variant.h b/variants/MS24SF1/variant.h new file mode 100644 index 000000000..d26dcebc2 --- /dev/null +++ b/variants/MS24SF1/variant.h @@ -0,0 +1,139 @@ +/* + Copyright (c) 2014-2015 Arduino LLC. All right reserved. + Copyright (c) 2016 Sandeep Mistry All right reserved. + Copyright (c) 2018, Adafruit Industries (adafruit.com) + + This library is free software; you can redistribute it and/or + modify it under the terms of the GNU Lesser General Public + License as published by the Free Software Foundation; either + version 2.1 of the License, or (at your option) any later version. + This library is distributed in the hope that it will be useful, + but WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. + See the GNU Lesser General Public License for more details. + You should have received a copy of the GNU Lesser General Public + License along with this library; if not, write to the Free Software + Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA +*/ + +#ifndef _VARIANT_MINEWSEMI_MS24SF1_ +#define _VARIANT_MINEWSEMI_MS24SF1_ + +#define ME25LS01 + +/** Master clock frequency */ +#define VARIANT_MCK (64000000ul) + +#define USE_LFXO // Board uses 32khz crystal for LF + +/*---------------------------------------------------------------------------- + * Headers + *----------------------------------------------------------------------------*/ + +#include "WVariant.h" + +#ifdef __cplusplus +extern "C" { +#endif // __cplusplus + +// Number of pins defined in PinDescription array +#define PINS_COUNT (48) +#define NUM_DIGITAL_PINS (48) +#define NUM_ANALOG_INPUTS (6) +#define NUM_ANALOG_OUTPUTS (0) + +// Use the native nrf52 usb power detection +#define NRF_APM + +#define PIN_3V3_EN (32 + 5) //-1 +#define PIN_3V3_ACC_EN -1 + +#define PIN_LED1 (-1) + +#define LED_PIN PIN_LED1 +#define LED_BUILTIN -1 + +#define LED_BLUE -1 +#define LED_STATE_ON 1 // State when LED is lit + +#define BUTTON_PIN (-1) +#define BUTTON_NEED_PULLUP + +#define HAS_WIRE 1 + +#define WIRE_INTERFACES_COUNT 1 + +#define PIN_WIRE_SDA (0 + 29) // P0.15 +#define PIN_WIRE_SCL (0 + 30) // P0.17 + +/* + * Serial interfaces + */ +#define PIN_SERIAL1_RX (-1) // P0.14 +#define PIN_SERIAL1_TX (-1) // P0.13 + +#define PIN_SERIAL2_RX (-1) // P0.17 +#define PIN_SERIAL2_TX (-1) // P0.16 + +/* + * SPI Interfaces + */ +#define SPI_INTERFACES_COUNT 1 // 2 + +#define PIN_SPI_MISO (0 + 17) // MISO P0.17 +#define PIN_SPI_MOSI (0 + 20) // MOSI P0.20 +#define PIN_SPI_SCK (0 + 21) // SCK P0.21 + +// #define PIN_SPI1_MISO (-1) // +// #define PIN_SPI1_MOSI (10) // EPD_MOSI P0.10 +// #define PIN_SPI1_SCK (9) // EPD_SCLK P0.09 + +static const uint8_t SS = (0 + 22); // LORA_CS P0.22 +static const uint8_t MOSI = PIN_SPI_MOSI; +static const uint8_t MISO = PIN_SPI_MISO; +static const uint8_t SCK = PIN_SPI_SCK; + +// MINEWSEMI nRF52840+SX1262 MS24SF1 (NRF82540 with integrated SX1262) +#define USE_SX1262 +#define SX126X_CS (0 + 22) // LORA_CS P0.22 +#define SX126X_DIO1 (0 + 16) // DIO1 P0.16 +#define SX126X_BUSY (0 + 19) // LORA_BUSY P0.19 +#define SX126X_RESET (0 + 12) // LORA_RESET P0.12 +#define SX126X_TXEN (32 + 4) // TXEN P1.04 +#define SX126X_RXEN (32 + 2) // RXEN P1.02 + +// DIO2 controlls an antenna switch and the TCXO voltage is controlled by DIO3 +#define SX126X_DIO2_AS_RF_SWITCH + +#define HAS_GPS 0 + +#define PIN_GPS_EN -1 +#define GPS_EN_ACTIVE HIGH +#define PIN_GPS_RESET -1 +#define GPS_VRTC_EN -1 +#define GPS_SLEEP_INT -1 +#define GPS_RTC_INT -1 +#define GPS_RESETB_OUT -1 + +#define BATTERY_PIN -1 +#define ADC_MULTIPLIER (2.0F) + +#define ADC_RESOLUTION 14 +#define BATTERY_SENSE_RESOLUTION_BITS 12 + +#undef AREF_VOLTAGE +#define AREF_VOLTAGE 3.0 +#define VBAT_AR_INTERNAL AR_INTERNAL_3_0 + +// Buzzer +// #define PIN_BUZZER (0 + 25) + +#ifdef __cplusplus +} +#endif + +/*---------------------------------------------------------------------------- + * Arduino objects - C++ only + *----------------------------------------------------------------------------*/ + +#endif // _VARIANT_MINEWSEMI_MS24SF1_ diff --git a/variants/MakePython_nRF52840_eink/platformio.ini b/variants/MakePython_nRF52840_eink/platformio.ini index 3ac18bcf0..b11b54c7d 100644 --- a/variants/MakePython_nRF52840_eink/platformio.ini +++ b/variants/MakePython_nRF52840_eink/platformio.ini @@ -3,12 +3,15 @@ board_level = extra extends = nrf52840_base board = nordic_pca10059 build_flags = ${nrf52840_base.build_flags} -Ivariants/MakePython_nRF52840_eink -D PRIVATE_HW - -L "${platformio.libdeps_dir}/${this.__env__}/BSEC2 Software Library/src/cortex-m4/fpv4-sp-d16-hard" + -L "${platformio.libdeps_dir}/${this.__env__}/bsec2/src/cortex-m4/fpv4-sp-d16-hard" -D PIN_EINK_EN build_src_filter = ${nrf52_base.build_src_filter} +<../variants/MakePython_nRF52840_eink> lib_deps = ${nrf52840_base.lib_deps} https://github.com/meshtastic/ESP32_Codec2.git#633326c78ac251c059ab3a8c430fcdf25b41672f zinggjm/GxEPD2@^1.4.9 + -DEINK_DISPLAY_MODEL=GxEPD2_290_T5D + -DEINK_WIDTH=296 + -DEINK_HEIGHT=128 debug_tool = jlink ;upload_port = /dev/ttyACM4 diff --git a/variants/MakePython_nRF52840_eink/variant.h b/variants/MakePython_nRF52840_eink/variant.h index 2ff9c76fd..00c8dc199 100644 --- a/variants/MakePython_nRF52840_eink/variant.h +++ b/variants/MakePython_nRF52840_eink/variant.h @@ -25,8 +25,6 @@ extern "C" { #define NUM_ANALOG_INPUTS (6) #define NUM_ANALOG_OUTPUTS (0) -#define RADIOLIB_GODMODE - // LEDs #define PIN_LED1 (32 + 10) // LED P1.15 #define PIN_LED2 (-1) // @@ -134,19 +132,10 @@ static const uint8_t SCK = PIN_SPI_SCK; // and has 12 bit resolution #define BATTERY_SENSE_RESOLUTION_BITS 12 #define BATTERY_SENSE_RESOLUTION 4096.0 -// Definition of milliVolt per LSB => 3.0V ADC range and 12-bit ADC resolution = 3000mV/4096 -#define VBAT_MV_PER_LSB (0.73242188F) -// Voltage divider value => 1.5M + 1M voltage divider on VBAT = (1.5M / (1M + 1.5M)) -#define VBAT_DIVIDER (0.4F) -// Compensation factor for the VBAT divider -#define VBAT_DIVIDER_COMP (1.73) -// Fixed calculation of milliVolt from compensation value -#define REAL_VBAT_MV_PER_LSB (VBAT_DIVIDER_COMP * VBAT_MV_PER_LSB) #undef AREF_VOLTAGE #define AREF_VOLTAGE 3.0 #define VBAT_AR_INTERNAL AR_INTERNAL_3_0 -#define ADC_MULTIPLIER VBAT_DIVIDER_COMP // REAL_VBAT_MV_PER_LSB -#define VBAT_RAW_TO_SCALED(x) (REAL_VBAT_MV_PER_LSB * x) +#define ADC_MULTIPLIER (1.73F) #ifdef __cplusplus } @@ -156,4 +145,4 @@ static const uint8_t SCK = PIN_SPI_SCK; * Arduino objects - C++ only *----------------------------------------------------------------------------*/ -#endif +#endif \ No newline at end of file diff --git a/variants/MakePython_nRF52840_oled/platformio.ini b/variants/MakePython_nRF52840_oled/platformio.ini index e0ddb1377..0146385e0 100644 --- a/variants/MakePython_nRF52840_oled/platformio.ini +++ b/variants/MakePython_nRF52840_oled/platformio.ini @@ -3,7 +3,7 @@ board_level = extra extends = nrf52840_base board = nordic_pca10059 build_flags = ${nrf52840_base.build_flags} -Ivariants/MakePython_nRF52840_oled -D PRIVATE_HW - -L "${platformio.libdeps_dir}/${this.__env__}/BSEC2 Software Library/src/cortex-m4/fpv4-sp-d16-hard" + -L "${platformio.libdeps_dir}/${this.__env__}/bsec2/src/cortex-m4/fpv4-sp-d16-hard" build_src_filter = ${nrf52_base.build_src_filter} +<../variants/MakePython_nRF52840_oled> lib_deps = ${nrf52840_base.lib_deps} diff --git a/variants/MakePython_nRF52840_oled/variant.h b/variants/MakePython_nRF52840_oled/variant.h index e7375a610..28d941171 100644 --- a/variants/MakePython_nRF52840_oled/variant.h +++ b/variants/MakePython_nRF52840_oled/variant.h @@ -25,8 +25,6 @@ extern "C" { #define NUM_ANALOG_INPUTS (6) #define NUM_ANALOG_OUTPUTS (0) -#define RADIOLIB_GODMODE - // LEDs #define PIN_LED1 (32 + 10) // LED P1.15 #define PIN_LED2 (-1) // @@ -112,19 +110,10 @@ static const uint8_t SCK = PIN_SPI_SCK; // and has 12 bit resolution #define BATTERY_SENSE_RESOLUTION_BITS 12 #define BATTERY_SENSE_RESOLUTION 4096.0 -// Definition of milliVolt per LSB => 3.0V ADC range and 12-bit ADC resolution = 3000mV/4096 -#define VBAT_MV_PER_LSB (0.73242188F) -// Voltage divider value => 1.5M + 1M voltage divider on VBAT = (1.5M / (1M + 1.5M)) -#define VBAT_DIVIDER (0.4F) -// Compensation factor for the VBAT divider -#define VBAT_DIVIDER_COMP (1.73) -// Fixed calculation of milliVolt from compensation value -#define REAL_VBAT_MV_PER_LSB (VBAT_DIVIDER_COMP * VBAT_MV_PER_LSB) #undef AREF_VOLTAGE #define AREF_VOLTAGE 3.0 #define VBAT_AR_INTERNAL AR_INTERNAL_3_0 -#define ADC_MULTIPLIER VBAT_DIVIDER_COMP // REAL_VBAT_MV_PER_LSB -#define VBAT_RAW_TO_SCALED(x) (REAL_VBAT_MV_PER_LSB * x) +#define ADC_MULTIPLIER (1.73F) #ifdef __cplusplus } @@ -134,4 +123,4 @@ static const uint8_t SCK = PIN_SPI_SCK; * Arduino objects - C++ only *----------------------------------------------------------------------------*/ -#endif +#endif \ No newline at end of file diff --git a/variants/TWC_mesh_v4/platformio.ini b/variants/TWC_mesh_v4/platformio.ini new file mode 100644 index 000000000..4fb382334 --- /dev/null +++ b/variants/TWC_mesh_v4/platformio.ini @@ -0,0 +1,10 @@ +[env:TWC_mesh_v4] +extends = nrf52840_base +board = nordic_pca10059 +board_level = extra +build_flags = ${nrf52840_base.build_flags} -I variants/TWC_mesh_v4 -D TWC_mesh_v4 -L".pio\libdeps\TWC_mesh_v4\bsec2\src\cortex-m4\fpv4-sp-d16-hard" +build_src_filter = ${nrf52_base.build_src_filter} +<../variants/TWC_mesh_v4> +lib_deps = + ${nrf52840_base.lib_deps} + zinggjm/GxEPD2@^1.4.9 +debug_tool = jlink \ No newline at end of file diff --git a/variants/pca10056-rc-clock/variant.cpp b/variants/TWC_mesh_v4/variant.cpp similarity index 99% rename from variants/pca10056-rc-clock/variant.cpp rename to variants/TWC_mesh_v4/variant.cpp index a1882a33f..b3712346d 100644 --- a/variants/pca10056-rc-clock/variant.cpp +++ b/variants/TWC_mesh_v4/variant.cpp @@ -2,17 +2,14 @@ Copyright (c) 2014-2015 Arduino LLC. All right reserved. Copyright (c) 2016 Sandeep Mistry All right reserved. Copyright (c) 2018, Adafruit Industries (adafruit.com) - This library is free software; you can redistribute it and/or modify it under the terms of the GNU Lesser General Public License as published by the Free Software Foundation; either version 2.1 of the License, or (at your option) any later version. - This library is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU Lesser General Public License for more details. - You should have received a copy of the GNU Lesser General Public License along with this library; if not, write to the Free Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA @@ -38,5 +35,4 @@ void initVariant() pinMode(PIN_LED2, OUTPUT); ledOff(PIN_LED2); - ; -} +} \ No newline at end of file diff --git a/variants/TWC_mesh_v4/variant.h b/variants/TWC_mesh_v4/variant.h new file mode 100644 index 000000000..6a6f541e6 --- /dev/null +++ b/variants/TWC_mesh_v4/variant.h @@ -0,0 +1,133 @@ +#ifndef _VARIANT_TWC_MESH_V4_ +#define _VARIANT_TWC_MESH_V4_ + +#define PCA10059 + +/** Master clock frequency */ +#define VARIANT_MCK (64000000ul) + +#define USE_LFXO // Board uses 32khz crystal for LF +// define USE_LFRC // Board uses RC for LF + +/*---------------------------------------------------------------------------- + * Headers + *----------------------------------------------------------------------------*/ + +#include "WVariant.h" + +#ifdef __cplusplus +extern "C" { +#endif // __cplusplus + +// Number of pins defined in PinDescription array +#define PINS_COUNT (48) +#define NUM_DIGITAL_PINS (48) +#define NUM_ANALOG_INPUTS (6) +#define NUM_ANALOG_OUTPUTS (0) + +// LEDs +#define PIN_LED1 (32 + 10) // Blue LED P1.10 +#define PIN_LED2 (32 + 15) // Built in Green P1.15 + +// RGB NeoPixel LED2 +// #define PIN_LED1 (0 + 8) Red +// #define PIN_LED1 (32 + 9) Green +// #define PIN_LED1 (0 + 12) Blue + +#define LED_BUILTIN PIN_LED1 +#define LED_CONN PIN_LED2 + +#define LED_GREEN PIN_LED1 +#define LED_BLUE PIN_LED2 + +#define LED_STATE_ON 0 // State when LED is litted + +/* + * Buttons + */ +#define PIN_BUTTON1 (32 + 2) // BTN_DN P1.02 Built in button + +/* + * Analog pins + */ +#define PIN_A0 (0 + 29) // using VDIV (A6 / P0.29) + +static const uint8_t A0 = PIN_A0; +#define ADC_RESOLUTION 14 + +// Other pins +#define PIN_AREF (-1) // AREF Not yet used + +static const uint8_t AREF = PIN_AREF; + +/* + * Serial interfaces + */ +#define PIN_SERIAL1_RX (0 + 24) +#define PIN_SERIAL1_TX (0 + 25) + +// Connected to Jlink CDC +#define PIN_SERIAL2_RX (-1) +#define PIN_SERIAL2_TX (-1) + +/* + * SPI Interfaces + */ +#define SPI_INTERFACES_COUNT 1 + +#define PIN_SPI_MISO (0 + 15) // MISO P0.15 +#define PIN_SPI_MOSI (0 + 13) // MOSI P0.13 +#define PIN_SPI_SCK (0 + 14) // SCK P0.14 + +static const uint8_t SS = (0 + 6); // LORA_CS P0.6 +static const uint8_t MOSI = PIN_SPI_MOSI; +static const uint8_t MISO = PIN_SPI_MISO; +static const uint8_t SCK = PIN_SPI_SCK; + +////#define USE_EINK +#define USE_SSD1306 + +/* + * Wire Interfaces + */ +#define WIRE_INTERFACES_COUNT 1 + +#define PIN_WIRE_SDA (0 + 12) // SDA P0.12 +#define PIN_WIRE_SCL (0 + 11) // SCL P0.11 + +// NiceRF 868 LoRa module +#define USE_SX1262 +#define USE_LLCC68 + +#define SX126X_CS (0 + 6) // LORA_CS P0.06 +#define SX126X_DIO1 (0 + 7) // DIO1 P0.07 +#define SX126X_BUSY (0 + 26) // LORA_BUSY P0.26 +#define SX126X_RESET (0 + 27) // LORA_RESET P0.27 +#define SX126X_DIO3_TCXO_VOLTAGE 1.8 + +#define PIN_GPS_EN (-1) +#define PIN_GPS_PPS (-1) // Pulse per second input from the GPS + +#define GPS_RX_PIN PIN_SERIAL1_RX +#define GPS_TX_PIN PIN_SERIAL1_TX + +// Battery +// The battery sense is hooked to pin A6 (0.29) +#define BATTERY_PIN PIN_A0 +// and has 12 bit resolution +#define BATTERY_SENSE_RESOLUTION_BITS 12 +#define BATTERY_SENSE_RESOLUTION 4096.0 +#undef AREF_VOLTAGE +#define AREF_VOLTAGE 3.0 +#define VBAT_AR_INTERNAL AR_INTERNAL_3_0 +#define ADC_MULTIPLIER (2.0F) + +#ifdef __cplusplus +} +#endif + +/*---------------------------------------------------------------------------- + * Arduino objects - C++ only + *----------------------------------------------------------------------------*/ + +#endif \ No newline at end of file diff --git a/variants/betafpv_2400_tx_micro/platformio.ini b/variants/betafpv_2400_tx_micro/platformio.ini index 82fe2a9e4..531e8532d 100644 --- a/variants/betafpv_2400_tx_micro/platformio.ini +++ b/variants/betafpv_2400_tx_micro/platformio.ini @@ -15,4 +15,4 @@ upload_protocol = esptool upload_speed = 460800 lib_deps = ${esp32_base.lib_deps} - makuna/NeoPixelBus@^2.7.1 + adafruit/Adafruit NeoPixel @ ^1.12.0 \ No newline at end of file diff --git a/variants/betafpv_2400_tx_micro/variant.h b/variants/betafpv_2400_tx_micro/variant.h index 8c615d168..fd06183ee 100644 --- a/variants/betafpv_2400_tx_micro/variant.h +++ b/variants/betafpv_2400_tx_micro/variant.h @@ -1,5 +1,4 @@ // https://betafpv.com/products/elrs-micro-tx-module -#include // 0.96" OLED #define I2C_SDA 22 @@ -15,7 +14,11 @@ #define LORA_CS 5 #define RF95_FAN_EN 17 -#define LED_PIN 16 // This is a LED_WS2812 not a standard LED +// #define LED_PIN 16 // This is a LED_WS2812 not a standard LED +#define HAS_NEOPIXEL // Enable the use of neopixels +#define NEOPIXEL_COUNT 1 // How many neopixels are connected +#define NEOPIXEL_DATA 16 // gpio pin used to send data to the neopixels +#define NEOPIXEL_TYPE (NEO_GRB + NEO_KHZ800) // type of neopixels in use #define BUTTON_PIN 25 #define BUTTON_NEED_PULLUP @@ -31,4 +34,4 @@ #define SX128X_TXEN 26 #define SX128X_RXEN 27 #define SX128X_RESET LORA_RESET -#define SX128X_MAX_POWER 13 +#define SX128X_MAX_POWER 13 \ No newline at end of file diff --git a/variants/betafpv_900_tx_nano/platformio.ini b/variants/betafpv_900_tx_nano/platformio.ini index 68e1a469b..3bea16f6b 100644 --- a/variants/betafpv_900_tx_nano/platformio.ini +++ b/variants/betafpv_900_tx_nano/platformio.ini @@ -1,6 +1,7 @@ [env:betafpv_900_tx_nano] extends = esp32_base board = esp32doit-devkit-v1 +board_level = extra build_flags = ${esp32_base.build_flags} -D BETAFPV_900_TX_NANO @@ -13,4 +14,4 @@ upload_protocol = esptool ;upload_port = /dev/ttyUSB0 upload_speed = 460800 lib_deps = - ${esp32_base.lib_deps} + ${esp32_base.lib_deps} \ No newline at end of file diff --git a/variants/bpi_picow_esp32_s3/pins_arduino.h b/variants/bpi_picow_esp32_s3/pins_arduino.h index af03bf28a..dd7b3c518 100644 --- a/variants/bpi_picow_esp32_s3/pins_arduino.h +++ b/variants/bpi_picow_esp32_s3/pins_arduino.h @@ -6,14 +6,6 @@ #define USB_VID 0x303a #define USB_PID 0x1001 -#define EXTERNAL_NUM_INTERRUPTS 46 -#define NUM_DIGITAL_PINS 48 -#define NUM_ANALOG_INPUTS 20 - -#define analogInputToDigitalPin(p) (((p) < 20) ? (analogChannelToDigitalPin(p)) : -1) -#define digitalPinToInterrupt(p) (((p) < 48) ? (p) : -1) -#define digitalPinHasPWM(p) (p < 46) - static const uint8_t TX = 43; static const uint8_t RX = 44; diff --git a/variants/canaryone/platformio.ini b/variants/canaryone/platformio.ini index d52bbb24a..5e01c3763 100644 --- a/variants/canaryone/platformio.ini +++ b/variants/canaryone/platformio.ini @@ -6,10 +6,9 @@ debug_tool = jlink # add -DCFG_SYSVIEW if you want to use the Segger systemview tool for OS profiling. build_flags = ${nrf52840_base.build_flags} -Ivariants/canaryone - -L "${platformio.libdeps_dir}/${this.__env__}/BSEC2 Software Library/src/cortex-m4/fpv4-sp-d16-hard" + -L "${platformio.libdeps_dir}/${this.__env__}/bsec2/src/cortex-m4/fpv4-sp-d16-hard" build_src_filter = ${nrf52_base.build_src_filter} +<../variants/canaryone> lib_deps = ${nrf52840_base.lib_deps} - adafruit/Adafruit BusIO@^1.13.2 lewisxhe/PCF8563_Library@^1.0.1 ;upload_protocol = fs diff --git a/variants/canaryone/variant.h b/variants/canaryone/variant.h index e31ba3c58..140b605ad 100644 --- a/variants/canaryone/variant.h +++ b/variants/canaryone/variant.h @@ -56,7 +56,6 @@ extern "C" { #define LED_CONN PIN_LED3 #define LED_STATE_ON 0 // State when LED is lit -#define LED_INVERTED 1 /* * Buttons @@ -103,6 +102,9 @@ static const uint8_t A0 = PIN_A0; #define EXTERNAL_FLASH_DEVICES MX25R1635F #define EXTERNAL_FLASH_USE_QSPI +// Add a delay on startup to allow LoRa and GPS to power up +#define PIN_PWR_DELAY_MS 100 + /* * Lora radio */ @@ -163,19 +165,10 @@ static const uint8_t A0 = PIN_A0; // and has 12 bit resolution #define BATTERY_SENSE_RESOLUTION_BITS 12 #define BATTERY_SENSE_RESOLUTION 4096.0 -// Definition of milliVolt per LSB => 3.0V ADC range and 12-bit ADC resolution = 3000mV/4096 -#define VBAT_MV_PER_LSB (0.73242188F) -// Voltage divider value => 100K + 100K voltage divider on VBAT = (100K / (100K + 100K)) -#define VBAT_DIVIDER (0.5F) -// Compensation factor for the VBAT divider -#define VBAT_DIVIDER_COMP (2.0) -// Fixed calculation of milliVolt from compensation value -#define REAL_VBAT_MV_PER_LSB (VBAT_DIVIDER_COMP * VBAT_MV_PER_LSB) #undef AREF_VOLTAGE #define AREF_VOLTAGE 3.0 #define VBAT_AR_INTERNAL AR_INTERNAL_3_0 -#define ADC_MULTIPLIER VBAT_DIVIDER_COMP -#define VBAT_RAW_TO_SCALED(x) (REAL_VBAT_MV_PER_LSB * x) +#define ADC_MULTIPLIER (2.0F) #ifdef __cplusplus } diff --git a/variants/chatter2/platformio.ini b/variants/chatter2/platformio.ini index 0856debfc..1f086cf07 100644 --- a/variants/chatter2/platformio.ini +++ b/variants/chatter2/platformio.ini @@ -2,7 +2,6 @@ [env:chatter2] extends = esp32_base board = esp32doit-devkit-v1 -board_level = extra build_flags = ${esp32_base.build_flags} -D CHATTER_2 diff --git a/variants/chatter2/variant.h b/variants/chatter2/variant.h index 90faa1d7b..5c27e2fb5 100644 --- a/variants/chatter2/variant.h +++ b/variants/chatter2/variant.h @@ -34,7 +34,7 @@ // Buzzer #define PIN_BUZZER 19 // Buttons -#define BUTTON_PIN 36 // Use the WAKE button as the user button +// #define BUTTON_PIN 36 // Use the WAKE button as the user button // I2C // #define I2C_SCL 27 // #define I2C_SDA 26 @@ -54,7 +54,7 @@ #define ST7735_RESET 15 #define ST7735_MISO -1 #define ST7735_BUSY -1 -#define ST7735_BL 32 +#define TFT_BL 32 #define ST7735_SPI_HOST HSPI_HOST // SPI2_HOST for S3, auto may work too #define SPI_FREQUENCY 40000000 #define SPI_READ_FREQUENCY 16000000 @@ -66,6 +66,7 @@ #define SCREEN_ROTATE #define SCREEN_TRANSITION_FRAMERATE 5 // fps #define DISPLAY_FORCE_SMALL_FONTS +#define TFT_BACKLIGHT_ON LOW // Battery @@ -91,6 +92,13 @@ #define GPS_TX_PIN 13 #define GPS_RX_PIN 2 +// keyboard +#define INPUTBROKER_SERIAL_TYPE 1 +#define KB_LOAD 21 // load values from the switch and store in shift register +#define KB_CLK 22 // clock pin for serial data out +#define KB_DATA 23 // data pin +#define CANNED_MESSAGE_MODULE_ENABLE 1 + ///////////////////////////////////////////////////////////////////////////////// // // // You should have no need to modify the code below, nor in pins_arduino.h // @@ -114,4 +122,4 @@ // 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 // 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 // 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 -// generated even if it is mapped to the pins.) \ No newline at end of file +// generated even if it is mapped to the pins.) diff --git a/variants/lora_isp4520/variant.cpp b/variants/diy/nrf52_promicro_diy_tcxo/variant.cpp similarity index 68% rename from variants/lora_isp4520/variant.cpp rename to variants/diy/nrf52_promicro_diy_tcxo/variant.cpp index 41b31384a..5869ed1d4 100644 --- a/variants/lora_isp4520/variant.cpp +++ b/variants/diy/nrf52_promicro_diy_tcxo/variant.cpp @@ -24,29 +24,15 @@ #include "wiring_digital.h" const uint32_t g_ADigitalPinMap[] = { - 25, // D0 SPI_MISO - 24, // D1 SPI_NSS - 23, // D2 SPI_SCK - 4, // D3 VBAT - 11, // D4 DIO1 - 27, // D5 BUSY - 19, // D6 NRESET - 12, // D7 BUTTON2 - 22, // D8 BUTTON3 - 26, // D9 SPI_MOSI - 31, // D10 UART_RX - 2, // D11 UART_TX - 10, // D12 LED1 GREEN - 17, // D13 LED2 RED - 9, // D14 BUZZER - 7, // D15 BUTTON1 -}; + // P0 + 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, + + // P1 + 32, 33, 34, 35, 36, 37, 38, 39, 40, 41, 42, 43, 44, 45, 46, 47}; -#include void initVariant() { - for (int i : {PIN_LED1, PIN_LED2}) { - pinMode(i, OUTPUT); - ledOff(i); - } + // 3V3 Power Rail + pinMode(PIN_3V3_EN, OUTPUT); + digitalWrite(PIN_3V3_EN, HIGH); } diff --git a/variants/diy/nrf52_promicro_diy_tcxo/variant.h b/variants/diy/nrf52_promicro_diy_tcxo/variant.h new file mode 100644 index 000000000..05d4a088c --- /dev/null +++ b/variants/diy/nrf52_promicro_diy_tcxo/variant.h @@ -0,0 +1,164 @@ +#ifndef _VARIANT_PROMICRO_DIY_ +#define _VARIANT_PROMICRO_DIY_ + +/** Master clock frequency */ +#define VARIANT_MCK (64000000ul) + +// #define USE_LFXO // Board uses 32khz crystal for LF +#define USE_LFRC // Board uses RC for LF + +#define PROMICRO_DIY_TCXO + +/*---------------------------------------------------------------------------- + * Headers + *----------------------------------------------------------------------------*/ + +#include "WVariant.h" + +#ifdef __cplusplus +extern "C" { +#endif // __cplusplus + +/* +NRF52 PRO MICRO PIN ASSIGNMENT + +| Pin | Function | | Pin | Function | +|-------|------------|---|---------|-------------| +| Gnd | | | vbat | | +| P0.06 | Serial2 RX | | vbat | | +| P0.08 | Serial2 TX | | Gnd | | +| Gnd | | | reset | | +| Gnd | | | ext_vcc | *see 0.13 | +| P0.17 | RXEN | | P0.31 | BATTERY_PIN | +| P0.20 | GPS_RX | | P0.29 | BUSY | +| P0.22 | GPS_TX | | P0.02 | MISO | +| P0.24 | GPS_EN | | P1.15 | MOSI | +| P1.00 | BUTTON_PIN | | P1.13 | CS | +| P0.11 | SCL | | P1.11 | SCK | +| P1.04 | SDA | | P0.10 | DIO1/IRQ | +| P1.06 | Free pin | | P0.09 | RESET | +| | | | | | +| | Mid board | | | Internal | +| P1.01 | Free pin | | 0.15 | LED | +| P1.02 | Free pin | | 0.13 | 3V3_EN | +| P1.07 | Free pin | | | | +*/ + +// Number of pins defined in PinDescription array +#define PINS_COUNT (48) +#define NUM_DIGITAL_PINS (48) +#define NUM_ANALOG_INPUTS (1) +#define NUM_ANALOG_OUTPUTS (0) + +// Pin 13 enables 3.3V periphery. If the Lora module is on this pin, then it should stay enabled at all times. +#define PIN_3V3_EN (0 + 13) // P0.13 + +// Analog pins +#define BATTERY_PIN (0 + 31) // P0.31 Battery ADC +#define ADC_CHANNEL ADC1_GPIO4_CHANNEL +#define ADC_RESOLUTION 14 +#define BATTERY_SENSE_RESOLUTION_BITS 12 +#define BATTERY_SENSE_RESOLUTION 4096.0 +// Definition of milliVolt per LSB => 3.0V ADC range and 12-bit ADC resolution = 3000mV/4096 +#define VBAT_MV_PER_LSB (0.73242188F) +// Voltage divider value => 1.5M + 1M voltage divider on VBAT = (1.5M / (1M + 1.5M)) +#define VBAT_DIVIDER (0.6F) +// Compensation factor for the VBAT divider +#define VBAT_DIVIDER_COMP (1.73) +// Fixed calculation of milliVolt from compensation value +#define REAL_VBAT_MV_PER_LSB (VBAT_DIVIDER_COMP * VBAT_MV_PER_LSB) +#undef AREF_VOLTAGE +#define AREF_VOLTAGE 3.0 +#define VBAT_AR_INTERNAL AR_INTERNAL_3_0 +#define ADC_MULTIPLIER VBAT_DIVIDER_COMP // REAL_VBAT_MV_PER_LSB +#define VBAT_RAW_TO_SCALED(x) (REAL_VBAT_MV_PER_LSB * x) + +// WIRE IC AND IIC PINS +#define WIRE_INTERFACES_COUNT 1 + +#define PIN_WIRE_SDA (32 + 4) // P1.04 +#define PIN_WIRE_SCL (0 + 11) // P0.11 + +// LED +#define PIN_LED1 (0 + 15) // P0.15 +#define LED_BUILTIN PIN_LED1 +// Actually red +#define LED_BLUE PIN_LED1 +#define LED_STATE_ON 1 // State when LED is lit + +// Button +#define BUTTON_PIN (32 + 0) // P1.00 + +// GPS +#define PIN_GPS_TX (0 + 22) // P0.22 +#define PIN_GPS_RX (0 + 20) // P0.20 + +#define PIN_GPS_EN (0 + 24) // P0.24 +#define GPS_POWER_TOGGLE +#define GPS_UBLOX +// define GPS_DEBUG + +// UART interfaces +#define PIN_SERIAL1_RX PIN_GPS_TX +#define PIN_SERIAL1_TX PIN_GPS_RX + +#define PIN_SERIAL2_RX (0 + 6) // P0.06 +#define PIN_SERIAL2_TX (0 + 8) // P0.08 + +// Serial interfaces +#define SPI_INTERFACES_COUNT 1 + +#define PIN_SPI_MISO (0 + 2) // P0.02 +#define PIN_SPI_MOSI (32 + 15) // P1.15 +#define PIN_SPI_SCK (32 + 11) // P1.11 + +// LORA MODULES +#define USE_LLCC68 +#define USE_SX1262 +// #define USE_RF95 +#define USE_SX1268 + +// LORA CONFIG +#define SX126X_CS (32 + 13) // P1.13 FIXME - we really should define LORA_CS instead +#define SX126X_DIO1 (0 + 10) // P0.10 IRQ +#define SX126X_DIO2_AS_RF_SWITCH // Note for E22 modules: DIO2 is not attached internally to TXEN for automatic TX/RX switching, + // so it needs connecting externally if it is used in this way +#define SX126X_BUSY (0 + 29) // P0.29 +#define SX126X_RESET (0 + 9) // P0.09 +#define SX126X_RXEN (0 + 17) // P0.17 +#define SX126X_TXEN RADIOLIB_NC // Assuming that DIO2 is connected to TXEN pin. If not, TXEN must be connected. + +// #define SX126X_MAX_POWER 8 set this if using a high-power board! + +/* +On 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 +settings. + +| Mfr | Module | TCXO | RF Switch | Notes | +| ---------- | ---------------- | ---- | --------- | -------------------------------------------- | +| Ebyte | E22-900M22S | Yes | Ext | | +| Ebyte | E22-900MM22S | No | Ext | | +| Ebyte | E22-900M30S | Yes | Ext | | +| Ebyte | E22-900M33S | Yes | Ext | MAX_POWER must be set to 8 for this | +| Ebyte | E220-900M22S | No | Ext | LLCC68, looks like DIO3 not connected at all | +| AI-Thinker | RA-01SH | No | Int | | +| Heltec | HT-RA62 | Yes | Int | | +| NiceRF | Lora1262 | yes | Int | | +| Waveshare | Core1262-HF | yes | Ext | | +| Waveshare | LoRa Node Module | yes | Int | | + +*/ + +#define SX126X_DIO3_TCXO_VOLTAGE 1.8 +#define TCXO_OPTIONAL // make it so that the firmware can try both TCXO and XTAL +extern float tcxoVoltage; // make this available everywhere + +#ifdef __cplusplus +} +#endif + +/*---------------------------------------------------------------------------- + * Arduino objects - C++ only + *----------------------------------------------------------------------------*/ + +#endif diff --git a/variants/diy/nrf52_promicro_diy_xtal/variant.cpp b/variants/diy/nrf52_promicro_diy_xtal/variant.cpp new file mode 100644 index 000000000..5869ed1d4 --- /dev/null +++ b/variants/diy/nrf52_promicro_diy_xtal/variant.cpp @@ -0,0 +1,38 @@ +/* + Copyright (c) 2014-2015 Arduino LLC. All right reserved. + Copyright (c) 2016 Sandeep Mistry All right reserved. + Copyright (c) 2018, Adafruit Industries (adafruit.com) + + This library is free software; you can redistribute it and/or + modify it under the terms of the GNU Lesser General Public + License as published by the Free Software Foundation; either + version 2.1 of the License, or (at your option) any later version. + + This library is distributed in the hope that it will be useful, + but WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. + See the GNU Lesser General Public License for more details. + + You should have received a copy of the GNU Lesser General Public + License along with this library; if not, write to the Free Software + Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA +*/ + +#include "variant.h" +#include "nrf.h" +#include "wiring_constants.h" +#include "wiring_digital.h" + +const uint32_t g_ADigitalPinMap[] = { + // P0 + 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, + + // P1 + 32, 33, 34, 35, 36, 37, 38, 39, 40, 41, 42, 43, 44, 45, 46, 47}; + +void initVariant() +{ + // 3V3 Power Rail + pinMode(PIN_3V3_EN, OUTPUT); + digitalWrite(PIN_3V3_EN, HIGH); +} diff --git a/variants/diy/nrf52_promicro_diy_xtal/variant.h b/variants/diy/nrf52_promicro_diy_xtal/variant.h new file mode 100644 index 000000000..7aafab7da --- /dev/null +++ b/variants/diy/nrf52_promicro_diy_xtal/variant.h @@ -0,0 +1,155 @@ +#ifndef _VARIANT_PROMICRO_DIY_ +#define _VARIANT_PROMICRO_DIY_ + +/** Master clock frequency */ +#define VARIANT_MCK (64000000ul) + +// #define USE_LFXO // Board uses 32khz crystal for LF +#define USE_LFRC // Board uses RC for LF + +#define PROMICRO_DIY_XTAL +/*---------------------------------------------------------------------------- + * Headers + *----------------------------------------------------------------------------*/ + +#include "WVariant.h" + +#ifdef __cplusplus +extern "C" { +#endif // __cplusplus + +/* +NRF52 PRO MICRO PIN ASSIGNMENT + +| Pin | Function | | Pin | Function | +|-------|------------|---|---------|-------------| +| Gnd | | | vbat | | +| P0.06 | Serial2 RX | | vbat | | +| P0.08 | Serial2 TX | | Gnd | | +| Gnd | | | reset | | +| Gnd | | | ext_vcc | *see 0.13 | +| P0.17 | RXEN | | P0.31 | BATTERY_PIN | +| P0.20 | GPS_RX | | P0.29 | BUSY | +| P0.22 | GPS_TX | | P0.02 | MISO | +| P0.24 | GPS_EN | | P1.15 | MOSI | +| P1.00 | BUTTON_PIN | | P1.13 | CS | +| P0.11 | SCL | | P1.11 | SCK | +| P1.04 | SDA | | P0.10 | DIO1/IRQ | +| P1.06 | Free pin | | P0.09 | RESET | +| | | | | | +| | Mid board | | | Internal | +| P1.01 | Free pin | | 0.15 | LED | +| P1.02 | Free pin | | 0.13 | 3V3_EN | +| P1.07 | Free pin | | | | +*/ + +// Number of pins defined in PinDescription array +#define PINS_COUNT (48) +#define NUM_DIGITAL_PINS (48) +#define NUM_ANALOG_INPUTS (1) +#define NUM_ANALOG_OUTPUTS (0) + +// Pin 13 enables 3.3V periphery. If the Lora module is on this pin, then it should stay enabled at all times. +#define PIN_3V3_EN (0 + 13) // P0.13 + +// Analog pins +#define BATTERY_PIN (0 + 31) // P0.31 Battery ADC +#define ADC_CHANNEL ADC1_GPIO4_CHANNEL +#define ADC_RESOLUTION 14 +#define BATTERY_SENSE_RESOLUTION_BITS 12 +#define BATTERY_SENSE_RESOLUTION 4096.0 +// Definition of milliVolt per LSB => 3.0V ADC range and 12-bit ADC resolution = 3000mV/4096 +#define VBAT_MV_PER_LSB (0.73242188F) +// Voltage divider value => 1.5M + 1M voltage divider on VBAT = (1.5M / (1M + 1.5M)) +#define VBAT_DIVIDER (0.6F) +// Compensation factor for the VBAT divider +#define VBAT_DIVIDER_COMP (1.73) +// Fixed calculation of milliVolt from compensation value +#define REAL_VBAT_MV_PER_LSB (VBAT_DIVIDER_COMP * VBAT_MV_PER_LSB) +#undef AREF_VOLTAGE +#define AREF_VOLTAGE 3.0 +#define VBAT_AR_INTERNAL AR_INTERNAL_3_0 +#define ADC_MULTIPLIER VBAT_DIVIDER_COMP // REAL_VBAT_MV_PER_LSB +#define VBAT_RAW_TO_SCALED(x) (REAL_VBAT_MV_PER_LSB * x) + +// WIRE IC AND IIC PINS +#define WIRE_INTERFACES_COUNT 1 + +#define PIN_WIRE_SDA (32 + 4) // P1.04 +#define PIN_WIRE_SCL (0 + 11) // P0.11 + +// LED +#define PIN_LED1 (0 + 15) // P0.15 +#define LED_BUILTIN PIN_LED1 +// Actually red +#define LED_BLUE PIN_LED1 +#define LED_STATE_ON 1 // State when LED is lit + +// Button +#define BUTTON_PIN (32 + 0) // P1.00 + +// GPS +#define PIN_GPS_TX (0 + 22) // P0.22 +#define PIN_GPS_RX (0 + 20) // P0.20 + +#define PIN_GPS_EN (0 + 24) // P0.24 +#define GPS_POWER_TOGGLE +#define GPS_UBLOX +// define GPS_DEBUG + +// UART interfaces +#define PIN_SERIAL1_RX PIN_GPS_TX +#define PIN_SERIAL1_TX PIN_GPS_RX + +#define PIN_SERIAL2_RX (0 + 6) // P0.06 +#define PIN_SERIAL2_TX (0 + 8) // P0.08 + +// Serial interfaces +#define SPI_INTERFACES_COUNT 1 + +#define PIN_SPI_MISO (0 + 2) // P0.02 +#define PIN_SPI_MOSI (32 + 15) // P1.15 +#define PIN_SPI_SCK (32 + 11) // P1.11 + +// LORA MODULES +#define USE_LLCC68 +#define USE_SX1262 +// #define USE_RF95 +#define USE_SX1268 + +// LORA CONFIG +#define SX126X_CS (32 + 13) // P1.13 FIXME - we really should define LORA_CS instead +#define SX126X_DIO1 (0 + 10) // P0.10 IRQ +#define SX126X_DIO2_AS_RF_SWITCH // Note for E22 modules: DIO2 is not attached internally to TXEN for automatic TX/RX switching, + // so it needs connecting externally if it is used in this way +#define SX126X_BUSY (0 + 29) // P0.29 +#define SX126X_RESET (0 + 9) // P0.09 +#define SX126X_RXEN (0 + 17) // P0.17 +#define SX126X_TXEN RADIOLIB_NC // Assuming that DIO2 is connected to TXEN pin. If not, TXEN must be connected. + +/* +On the SX1262, DIO3 sets the voltage for an external TCXO, if one is present. If one is not present, then this should not be used. + +Ebyte +e22-900mm22s has no TCXO +e22-900m22s has TCXO +e220-900mm22s has no TCXO, works with/without this definition, looks like DIO3 not connected at all + +AI-thinker +RA-01SH does not have TCXO + +Waveshare +Core1262 has TCXO + +*/ +// #define SX126X_DIO3_TCXO_VOLTAGE 1.8 + +#ifdef __cplusplus +} +#endif + +/*---------------------------------------------------------------------------- + * Arduino objects - C++ only + *----------------------------------------------------------------------------*/ + +#endif \ No newline at end of file diff --git a/variants/diy/platformio.ini b/variants/diy/platformio.ini index e7d72d13f..f3c22b7a8 100644 --- a/variants/diy/platformio.ini +++ b/variants/diy/platformio.ini @@ -2,12 +2,11 @@ [env:meshtastic-diy-v1] extends = esp32_base board = esp32doit-devkit-v1 -board_level = extra +board_check = true build_flags = ${esp32_base.build_flags} -D DIY_V1 -D EBYTE_E22 - -D OLED_RU -I variants/diy/v1 ; Meshtastic DIY v1.1 new schematic based on ESP32-WROOM-32 & SX1262/SX1268 modules @@ -19,14 +18,12 @@ build_flags = ${esp32_base.build_flags} -D DIY_V1 -D EBYTE_E22 - -D OLED_RU -I variants/diy/v1_1 ; Port to Disaster Radio's ESP32-v3 Dev Board [env:meshtastic-dr-dev] extends = esp32_base board = esp32doit-devkit-v1 -board_level = extra board_upload.maximum_size = 4194304 board_upload.maximum_ram_size = 532480 build_flags = @@ -39,8 +36,55 @@ build_flags = [env:hydra] extends = esp32_base board = esp32doit-devkit-v1 -board_level = extra build_flags = ${esp32_base.build_flags} -D DIY_V1 -I variants/diy/hydra + + +; Promicro + E22(0)-xxxMM / RA-01SH modules board variant - DIY - without TCXO +[env:nrf52_promicro_diy_xtal] +extends = nrf52840_base +board = promicro-nrf52840 +board_level = extra +build_flags = ${nrf52840_base.build_flags} + -I variants/diy/nrf52_promicro_diy_xtal + -D NRF52_PROMICRO_DIY + -L "${platformio.libdeps_dir}/${this.__env__}/bsec2/src/cortex-m4/fpv4-sp-d16-hard" +build_src_filter = ${nrf52_base.build_src_filter} +<../variants/diy/nrf52_promicro_diy_xtal> +lib_deps = + ${nrf52840_base.lib_deps} +debug_tool = jlink + + +; Promicro + E22(0)-xxxM / HT-RA62 modules board variant - DIY - with TCXO +[env:nrf52_promicro_diy_tcxo] +extends = nrf52840_base +board = promicro-nrf52840 +board_level = extra +build_flags = ${nrf52840_base.build_flags} + -I variants/diy/nrf52_promicro_diy_tcxo + -D NRF52_PROMICRO_DIY + -L "${platformio.libdeps_dir}/${this.__env__}/bsec2/src/cortex-m4/fpv4-sp-d16-hard" +build_src_filter = ${nrf52_base.build_src_filter} +<../variants/diy/nrf52_promicro_diy_tcxo> +lib_deps = + ${nrf52840_base.lib_deps} +debug_tool = jlink + +; NanoVHF T-Energy-S3 + E22(0)-xxxM - DIY +[env:t-energy-s3_e22] +extends = esp32s3_base +board = esp32-s3-devkitc-1 +board_level = extra +board_upload.flash_size = 16MB ;Specify the FLASH capacity as 16MB +board_build.arduino.memory_type = qio_opi ;Enable internal PSRAM +build_unflags = + ${esp32s3_base.build_unflags} + -D ARDUINO_USB_MODE=1 +build_flags = + ${esp32s3_base.build_flags} + -D EBYTE_ESP32_S3 + -D BOARD_HAS_PSRAM + -D ARDUINO_USB_MODE=0 + -D ARDUINO_USB_CDC_ON_BOOT=1 + -I variants/diy/t-energy-s3_e22 diff --git a/variants/diy/t-energy-s3_e22/variant.h b/variants/diy/t-energy-s3_e22/variant.h new file mode 100644 index 000000000..6933d7715 --- /dev/null +++ b/variants/diy/t-energy-s3_e22/variant.h @@ -0,0 +1,46 @@ +// NanoVHF T-Energy-S3 + E22(0)-xxxM - DIY +// https://github.com/NanoVHF/Meshtastic-DIY/tree/main/PCB/ESP-32-devkit_EBYTE-E22/Mesh-v1.06-TTGO-T18 + +// Battery +#define BATTERY_PIN 3 +#define ADC_MULTIPLIER 2.0 +#define ADC_CHANNEL ADC1_GPIO3_CHANNEL + +// Button on NanoVHF PCB +#define BUTTON_PIN 39 + +// I2C via connectors on NanoVHF PCB +#define I2C_SCL 2 +#define I2C_SDA 42 + +// Screen (disabled) +#define HAS_SCREEN 0 // Assume no screen present by default to prevent crash... + +// GPS via T-Energy-S3 onboard connector +#define HAS_GPS 1 +#define GPS_TX_PIN 43 +#define GPS_RX_PIN 44 + +// LoRa +#define USE_SX1262 // E22-900M30S, E22-900M22S, and E22-900MM22S (not E220!) use SX1262 +#define USE_SX1268 // E22-400M30S, E22-400M33S, E22-400M22S, and E22-400MM22S use SX1268 + +#define SX126X_MAX_POWER 22 // SX126xInterface.cpp defaults to 22 if not defined, but here we define it for good practice +#define SX126X_DIO3_TCXO_VOLTAGE 1.8 // E22 series TCXO reference voltage is 1.8V + +#define SX126X_CS 5 // EBYTE module's NSS pin // FIXME: rename to SX126X_SS +#define SX126X_SCK 6 // EBYTE module's SCK pin +#define SX126X_MOSI 13 // EBYTE module's MOSI pin +#define SX126X_MISO 4 // EBYTE module's MISO pin +#define SX126X_RESET 1 // EBYTE module's NRST pin +#define SX126X_BUSY 48 // EBYTE module's BUSY pin +#define SX126X_DIO1 47 // EBYTE module's DIO1 pin + +#define SX126X_TXEN 10 // Schematic connects EBYTE module's TXEN pin to MCU +#define SX126X_RXEN 12 // Schematic connects EBYTE module's RXEN pin to MCU + +#define LORA_CS SX126X_CS // Compatibility with variant file configuration structure +#define LORA_SCK SX126X_SCK // Compatibility with variant file configuration structure +#define LORA_MOSI SX126X_MOSI // Compatibility with variant file configuration structure +#define LORA_MISO SX126X_MISO // Compatibility with variant file configuration structure +#define LORA_DIO1 SX126X_DIO1 // Compatibility with variant file configuration structure diff --git a/variants/dreamcatcher/platformio.ini b/variants/dreamcatcher/platformio.ini new file mode 100644 index 000000000..46f9b9871 --- /dev/null +++ b/variants/dreamcatcher/platformio.ini @@ -0,0 +1,27 @@ +[env:dreamcatcher] ; 2301, latest revision +extends = esp32s3_base +board = esp32s3box +board_level = extra + +build_flags = + ${esp32s3_base.build_flags} + -D PRIVATE_HW + -D OTHERNET_DC_REV=2301 + -I variants/dreamcatcher + -DARDUINO_USB_CDC_ON_BOOT=1 + +lib_deps = ${esp32s3_base.lib_deps} + earlephilhower/ESP8266Audio@^1.9.7 + earlephilhower/ESP8266SAM@^1.0.1 + +[env:dreamcatcher-2206] +extends = esp32s3_base +board = esp32s3box +board_level = extra + +build_flags = + ${esp32s3_base.build_flags} + -D PRIVATE_HW + -D OTHERNET_DC_REV=2206 + -I variants/dreamcatcher + -DARDUINO_USB_CDC_ON_BOOT=1 \ No newline at end of file diff --git a/variants/dreamcatcher/rfswitch.h b/variants/dreamcatcher/rfswitch.h new file mode 100644 index 000000000..74edb25d1 --- /dev/null +++ b/variants/dreamcatcher/rfswitch.h @@ -0,0 +1,17 @@ +#include "RadioLib.h" + +// RF Switch Matrix SubG RFO_HP_LF / RFO_LP_LF / RFI_[NP]_LF0 +// DIO5 -> RFSW0_V1 +// DIO6 -> RFSW1_V2 +// DIO7 -> ANT_CTRL_ON + ESP_IO9/LR_GPS_ANT_DC_EN -> RFI_GPS (Bias-T GPS) + +static const uint32_t rfswitch_dio_pins[] = {RADIOLIB_LR11X0_DIO5, RADIOLIB_LR11X0_DIO6, RADIOLIB_LR11X0_DIO7, RADIOLIB_NC, + RADIOLIB_NC}; + +static const Module::RfSwitchMode_t rfswitch_table[] = { + // mode DIO5 DIO6 DIO7 + {LR11x0::MODE_STBY, {LOW, LOW, LOW}}, {LR11x0::MODE_RX, {HIGH, LOW, LOW}}, + {LR11x0::MODE_TX, {LOW, HIGH, LOW}}, {LR11x0::MODE_TX_HP, {LOW, HIGH, LOW}}, + {LR11x0::MODE_TX_HF, {LOW, LOW, LOW}}, {LR11x0::MODE_GNSS, {LOW, LOW, HIGH}}, + {LR11x0::MODE_WIFI, {LOW, LOW, LOW}}, END_OF_MODE_TABLE, +}; \ No newline at end of file diff --git a/variants/dreamcatcher/variant.h b/variants/dreamcatcher/variant.h new file mode 100644 index 000000000..eb95a95dd --- /dev/null +++ b/variants/dreamcatcher/variant.h @@ -0,0 +1,109 @@ +#undef I2C_SDA +#undef I2C_SCL +#define I2C_SDA 16 // I2C pins for this board +#define I2C_SCL 17 + +#define I2C_SDA1 45 +#define I2C_SCL1 46 + +#define LED_PIN 6 +#define LED_STATE_ON 1 +#define BUTTON_PIN 0 + +#define HAS_TPS65233 + +// V1 of SubG Switch SMA 0 or F Selector 1 +// #define RF_SW_SUBG1 8 +// V2 of SubG Switch SMA 1 or F Selector 0 +// #define RF_SW_SUBG2 5 + +#define RESET_OLED 8 // Emulate RF_SW_SUBG1, Use F Connector +#define VTFT_CTRL 5 // Emulate RF_SW_SUBG2, for SMA swap the pin values + +#if OTHERNET_DC_REV == 2206 +#define USE_LR1120 + +#define SPI_MISO 37 +#define SPI_MOSI 39 +#define SPI_SCK 38 +#define SDCARD_CS 40 + +#define PIN_BUZZER 48 + +// These can either be used for GPS or a serial link. Define through Protobufs +// #define GPS_RX_PIN 10 +// #define GPS_TX_PIN 21 + +#define PIN_POWER_EN 7 // RF section power supply enable +#define PERIPHERAL_WARMUP_MS 1000 // wait for TPS chip to initialize +#define TPS_EXTM 45 // connected, but not used +#define BIAS_T_ENABLE 9 // needs to be low +#define BIAS_T_VALUE 0 +#else // 2301 +#define USE_LR1121 +#define SPI_MISO 10 +#define SPI_MOSI 39 +#define SPI_SCK 38 + +#define SDCARD_CS 40 + +// This is only informational, we always use SD cards in 1 bit mode +#define SPI_DATA1 15 +#define SPI_DATA2 18 + +// These can either be used for GPS or a serial link. Define through Protobufs +// #define GPS_RX_PIN 36 +// #define GPS_TX_PIN 37 + +// dac / amp instead of buzzer +#define HAS_I2S +#define DAC_I2S_BCK 21 +#define DAC_I2S_WS 9 +#define DAC_I2S_DOUT 48 + +#define BIAS_T_ENABLE 7 // needs to be low +#define BIAS_T_VALUE 0 +#define BIAS_T_SUBGHZ 2 // also needs to be low, we hijack SENSOR_POWER_CTRL_PIN to emulate this +#define SENSOR_POWER_CTRL_PIN BIAS_T_SUBGHZ +#define SENSOR_POWER_ON 0 +#endif + +#define HAS_SDCARD // Have SPI interface SD card slot +#define SDCARD_USE_SPI1 + +#define LORA_RESET 3 +#define LORA_SCK 12 +#define LORA_MISO 13 +#define LORA_MOSI 11 +#define LORA_CS 14 +#define LORA_DIO9 4 +#define LORA_DIO2 47 + +#define LR1120_IRQ_PIN LORA_DIO9 +#define LR1120_NRESET_PIN LORA_RESET +#define LR1120_BUSY_PIN LORA_DIO2 +#define LR1120_SPI_NSS_PIN LORA_CS +#define LR1120_SPI_SCK_PIN LORA_SCK +#define LR1120_SPI_MOSI_PIN LORA_MOSI +#define LR1120_SPI_MISO_PIN LORA_MISO + +#define LR1121_IRQ_PIN LORA_DIO9 +#define LR1121_NRESET_PIN LORA_RESET +#define LR1121_BUSY_PIN LORA_DIO2 +#define LR1121_SPI_NSS_PIN LORA_CS +#define LR1121_SPI_SCK_PIN LORA_SCK +#define LR1121_SPI_MOSI_PIN LORA_MOSI +#define LR1121_SPI_MISO_PIN LORA_MISO + +#define LR11X0_DIO3_TCXO_VOLTAGE 1.8 +#define LR11X0_DIO_AS_RF_SWITCH + +// This board needs external switching between sub-GHz and 2.4G circuits + +// V1 of RF1 selector SubG 1 or 2.4GHz 0 +// #define RF_SW_SMA1 42 +// V2 of RF1 Selector SubG 0 or 2.4GHz 1 +// #define RF_SW_SMA2 41 + +#define LR11X0_RF_SWITCH_SUBGHZ 42 +#define LR11X0_RF_SWITCH_2_4GHZ 41 diff --git a/variants/esp32-s3-pico/pins_arduino.h b/variants/esp32-s3-pico/pins_arduino.h index d24d98a2e..57a66fea2 100644 --- a/variants/esp32-s3-pico/pins_arduino.h +++ b/variants/esp32-s3-pico/pins_arduino.h @@ -6,14 +6,6 @@ #define USB_VID 0x303a #define USB_PID 0x1001 -#define EXTERNAL_NUM_INTERRUPTS 46 -#define NUM_DIGITAL_PINS 48 -#define NUM_ANALOG_INPUTS 20 - -#define analogInputToDigitalPin(p) (((p) < 20) ? (analogChannelToDigitalPin(p)) : -1) -#define digitalPinToInterrupt(p) (((p) < 48) ? (p) : -1) -#define digitalPinHasPWM(p) (p < 46) - // The default Wire will be mapped to PMU and RTC static const uint8_t SDA = 15; static const uint8_t SCL = 16; diff --git a/variants/esp32-s3-pico/platformio.ini b/variants/esp32-s3-pico/platformio.ini index f39004c36..916f623bd 100644 --- a/variants/esp32-s3-pico/platformio.ini +++ b/variants/esp32-s3-pico/platformio.ini @@ -11,15 +11,15 @@ board_upload.require_upload_port = yes ;upload_port = /dev/ttyACM0 -build_flags = ${esp32_base.build_flags} +build_flags = ${esp32s3_base.build_flags} -DESP32_S3_PICO ;-DPRIVATE_HW -Ivariants/esp32-s3-pico -DBOARD_HAS_PSRAM - -DTECHO_DISPLAY_MODEL=GxEPD2_290_T94_V2 - -DEPD_HEIGHT=128 - -DEPD_WIDTH=296 + -DEINK_DISPLAY_MODEL=GxEPD2_290_T94_V2 + -DEINK_WIDTH=296 + -DEINK_HEIGHT=128 lib_deps = ${esp32s3_base.lib_deps} zinggjm/GxEPD2@^1.5.3 - ;adafruit/Adafruit NeoPixel@^1.10.7 + adafruit/Adafruit NeoPixel @ ^1.12.0 diff --git a/variants/esp32-s3-pico/variant.h b/variants/esp32-s3-pico/variant.h index 9e10183fb..bfcb6059d 100644 --- a/variants/esp32-s3-pico/variant.h +++ b/variants/esp32-s3-pico/variant.h @@ -10,6 +10,10 @@ // #define LED_PIN PIN_LED // Board has RGB LED 21 +#define HAS_NEOPIXEL // Enable the use of neopixels +#define NEOPIXEL_COUNT 1 // How many neopixels are connected +#define NEOPIXEL_DATA 21 // gpio pin used to send data to the neopixels +#define NEOPIXEL_TYPE (NEO_GRB + NEO_KHZ800) // type of neopixels in use // The usbPower state is revered ? // DEBUG | ??:??:?? 365 [Power] Battery: usbPower=0, isCharging=0, batMv=4116, batPct=90 @@ -74,4 +78,4 @@ #define PIN_EINK_DC 33 #define PIN_EINK_RES 42 // 37 //(-1) // cant be MISO Waveshare ??) #define PIN_EINK_SCLK 35 -#define PIN_EINK_MOSI 36 +#define PIN_EINK_MOSI 36 \ No newline at end of file diff --git a/variants/feather_diy/platformio.ini b/variants/feather_diy/platformio.ini index 924f9098d..82dbb317c 100644 --- a/variants/feather_diy/platformio.ini +++ b/variants/feather_diy/platformio.ini @@ -2,9 +2,8 @@ [env:feather_diy] extends = nrf52840_base board = adafruit_feather_nrf52840 -board_level = extra build_flags = ${nrf52840_base.build_flags} -Ivariants/feather_diy -Dfeather_diy - -L "${platformio.libdeps_dir}/${this.__env__}/BSEC2 Software Library/src/cortex-m4/fpv4-sp-d16-hard" + -L "${platformio.libdeps_dir}/${this.__env__}/bsec2/src/cortex-m4/fpv4-sp-d16-hard" build_src_filter = ${nrf52_base.build_src_filter} +<../variants/feather_diy> lib_deps = ${nrf52840_base.lib_deps} diff --git a/variants/feather_rp2040_rfm95/platformio.ini b/variants/feather_rp2040_rfm95/platformio.ini new file mode 100644 index 000000000..a28ad7655 --- /dev/null +++ b/variants/feather_rp2040_rfm95/platformio.ini @@ -0,0 +1,16 @@ +[env:feather_rp2040_rfm95] +extends = rp2040_base +board = adafruit_feather +upload_protocol = picotool + +# add our variants files to the include and src paths +build_flags = ${rp2040_base.build_flags} + -DRP2040_FEATHER_RFM95 + -Ivariants/feather_rp2040_rfm95 + -DDEBUG_RP2040_PORT=Serial + -DHW_SPI1_DEVICE + -L "${platformio.libdeps_dir}/${this.__env__}/bsec2/src/cortex-m0plus" +lib_deps = + ${rp2040_base.lib_deps} +debug_build_flags = ${rp2040_base.build_flags} +debug_tool = cmsis-dap ; for e.g. Picotool \ No newline at end of file diff --git a/variants/feather_rp2040_rfm95/variant.h b/variants/feather_rp2040_rfm95/variant.h new file mode 100644 index 000000000..e9e178202 --- /dev/null +++ b/variants/feather_rp2040_rfm95/variant.h @@ -0,0 +1,61 @@ +// #define RADIOLIB_CUSTOM_ARDUINO 1 +// #define RADIOLIB_TONE_UNSUPPORTED 1 +// #define RADIOLIB_SOFTWARE_SERIAL_UNSUPPORTED 1 + +#define ARDUINO_ARCH_AVR + +// #define USE_SSD1306 + +// #define USE_SH1106 1 + +// default I2C pins: +// SDA = 4 +// SCL = 5 + +// Recommended pins for SerialModule: +// txd = 8 +// rxd = 9 + +#define EXT_NOTIFY_OUT 22 +#define BUTTON_PIN 7 +// #define BUTTON_NEED_PULLUP + +#define LED_PIN PIN_LED + +// #define BATTERY_PIN 26 +// ratio of voltage divider = 3.0 (R17=200k, R18=100k) +// #define ADC_MULTIPLIER 3.1 // 3.0 + a bit for being optimistic + +#define USE_RF95 // RFM95/SX127x + +#undef LORA_SCK +#undef LORA_MISO +#undef LORA_MOSI +#undef LORA_CS + +// https://www.adafruit.com/product/5714 +// https://learn.adafruit.com/feather-rp2040-rfm95 +// https://learn.adafruit.com/assets/120283 +// https://learn.adafruit.com/assets/120813 +#define LORA_SCK 14 // 10 12P +#define LORA_MISO 8 // 12 10P +#define LORA_MOSI 15 // 11 11P +#define LORA_CS 16 // 3 13P + +#define LORA_RESET 17 // 15 14P + +#define LORA_DIO0 21 // ?? 6P +#define LORA_DIO1 22 // 20 7P +#define LORA_DIO2 23 // 2 8P +#define LORA_DIO3 19 // ?? 3P +#define LORA_DIO4 20 // ?? 4P +#define LORA_DIO5 18 // ?? 15P + +#ifdef USE_SX1262 +#define SX126X_CS LORA_CS +#define SX126X_DIO1 LORA_DIO1 +#define SX126X_BUSY LORA_DIO2 +#define SX126X_RESET LORA_RESET +#define SX126X_DIO2_AS_RF_SWITCH +// #define SX126X_DIO3_TCXO_VOLTAGE 1.8 +#endif \ No newline at end of file diff --git a/variants/heltec_capsule_sensor_v3/platformio.ini b/variants/heltec_capsule_sensor_v3/platformio.ini new file mode 100644 index 000000000..f1aef925d --- /dev/null +++ b/variants/heltec_capsule_sensor_v3/platformio.ini @@ -0,0 +1,11 @@ +[env:heltec_capsule_sensor_v3] +extends = esp32s3_base +board = heltec_wifi_lora_32_V3 +board_check = true + +build_flags = + ${esp32s3_base.build_flags} -I variants/heltec_capsule_sensor_v3 + -D HELTEC_CAPSULE_SENSOR_V3 + -D GPS_POWER_TOGGLE ; comment this line to disable triple press function on the user button to turn off gps entirely. + ;-D DEBUG_DISABLED ; uncomment this line to disable DEBUG output + diff --git a/variants/heltec_capsule_sensor_v3/variant.h b/variants/heltec_capsule_sensor_v3/variant.h new file mode 100644 index 000000000..415de0559 --- /dev/null +++ b/variants/heltec_capsule_sensor_v3/variant.h @@ -0,0 +1,53 @@ +#define LED_PIN 33 +#define LED_PIN2 34 +#define EXT_PWR_DETECT 35 + +#define BUTTON_PIN 18 + +#define BATTERY_PIN 7 // A battery voltage measurement pin, voltage divider connected here to measure battery voltage +#define ADC_CHANNEL ADC1_GPIO7_CHANNEL +#define ADC_ATTENUATION ADC_ATTEN_DB_2_5 // lower dB for high resistance voltage divider +#define ADC_MULTIPLIER (4.9 * 1.045) +#define ADC_CTRL 36 // active HIGH, powers the voltage divider. Only on 1.1 +#define ADC_CTRL_ENABLED HIGH + +#undef GPS_RX_PIN +#undef GPS_TX_PIN +#define GPS_RX_PIN 5 +#define GPS_TX_PIN 4 +#define PIN_GPS_RESET 3 +#define GPS_RESET_MODE LOW +#define PIN_GPS_PPS 1 +#define PIN_GPS_EN 21 +#define GPS_EN_ACTIVE HIGH + +#define USE_SX1262 +#define LORA_DIO0 -1 // a No connect on the SX1262 module +#define LORA_RESET 12 +#define LORA_DIO1 14 // SX1262 IRQ +#define LORA_DIO2 13 // SX1262 BUSY +#define LORA_DIO3 // Not connected on PCB, but internally on the TTGO SX1262, if DIO3 is high the TXCO is enabled + +#define LORA_SCK 9 +#define LORA_MISO 11 +#define LORA_MOSI 10 +#define LORA_CS 8 + +#define SX126X_CS LORA_CS +#define SX126X_DIO1 LORA_DIO1 +#define SX126X_BUSY LORA_DIO2 +#define SX126X_RESET LORA_RESET + +#define SX126X_DIO2_AS_RF_SWITCH +#define SX126X_DIO3_TCXO_VOLTAGE 1.8 + +#define I2C_SDA 1 +#define I2C_SCL 2 +#define HAS_SCREEN 0 +#define SENSOR_POWER_CTRL_PIN 21 +#define SENSOR_POWER_ON 1 + +#define PERIPHERAL_WARMUP_MS 100 +#define SENSOR_GPS_CONFLICT + +#define ESP32S3_WAKE_TYPE ESP_EXT1_WAKEUP_ANY_HIGH \ No newline at end of file diff --git a/variants/heltec_esp32c3/pins_arduino.h b/variants/heltec_esp32c3/pins_arduino.h index db30a2f30..a717a3706 100644 --- a/variants/heltec_esp32c3/pins_arduino.h +++ b/variants/heltec_esp32c3/pins_arduino.h @@ -3,14 +3,6 @@ #include -#define EXTERNAL_NUM_INTERRUPTS 22 -#define NUM_DIGITAL_PINS 22 -#define NUM_ANALOG_INPUTS 6 - -#define analogInputToDigitalPin(p) (((p) < NUM_ANALOG_INPUTS) ? (esp32_adc2gpio[(p)]) : -1) -#define digitalPinToInterrupt(p) (((p) < NUM_DIGITAL_PINS) ? (p) : -1) -#define digitalPinHasPWM(p) (p < EXTERNAL_NUM_INTERRUPTS) - static const uint8_t TX = 21; static const uint8_t RX = 20; diff --git a/variants/heltec_esp32c3/platformio.ini b/variants/heltec_esp32c3/platformio.ini index c9c80213e..6fe5c3c69 100644 --- a/variants/heltec_esp32c3/platformio.ini +++ b/variants/heltec_esp32c3/platformio.ini @@ -1,7 +1,6 @@ [env:heltec-ht62-esp32c3-sx1262] extends = esp32c3_base board = esp32-c3-devkitm-1 -board_level = extra build_flags = ${esp32_base.build_flags} -D HELTEC_HT62 diff --git a/variants/heltec_esp32c3/variant.h b/variants/heltec_esp32c3/variant.h index de6462a38..ca00c43fa 100644 --- a/variants/heltec_esp32c3/variant.h +++ b/variants/heltec_esp32c3/variant.h @@ -1,24 +1,16 @@ -#define I2C_SDA 1 -#define I2C_SCL 0 - #define BUTTON_PIN 9 -#define BUTTON_NEED_PULLUP -// LED flashes brighter +// LED pin on HT-DEV-ESP_V2 and HT-DEV-ESP_V3 // https://resource.heltec.cn/download/HT-CT62/HT-CT62_Reference_Design.pdf -#define LED_PIN 18 // LED -#define LED_INVERTED 1 +// https://resource.heltec.cn/download/HT-DEV-ESP/HT-DEV-ESP_V3_Sch.pdf +#define LED_PIN 2 // LED +#define LED_STATE_ON 1 // State when LED is lit #define HAS_SCREEN 0 #define HAS_GPS 0 #undef GPS_RX_PIN #undef GPS_TX_PIN -#undef LORA_SCK -#undef LORA_MISO -#undef LORA_MOSI -#undef LORA_CS - #define USE_SX1262 #define LORA_SCK 10 #define LORA_MISO 6 @@ -34,4 +26,4 @@ #define SX126X_BUSY LORA_BUSY #define SX126X_RESET LORA_RESET #define SX126X_DIO2_AS_RF_SWITCH -#define SX126X_DIO3_TCXO_VOLTAGE 1.8 +#define SX126X_DIO3_TCXO_VOLTAGE 1.8 \ No newline at end of file diff --git a/variants/heltec_hru_3601/pins_arduino.h b/variants/heltec_hru_3601/pins_arduino.h new file mode 100644 index 000000000..625c57ced --- /dev/null +++ b/variants/heltec_hru_3601/pins_arduino.h @@ -0,0 +1,25 @@ +#ifndef Pins_Arduino_h +#define Pins_Arduino_h + +#include +#include + +static const uint8_t TX = UART_TX; +static const uint8_t RX = UART_RX; + +static const uint8_t SDA = I2C_SDA; +static const uint8_t SCL = I2C_SCL; + +static const uint8_t SS = 8; +static const uint8_t MOSI = 7; +static const uint8_t MISO = 6; +static const uint8_t SCK = 10; + +static const uint8_t A0 = 0; +static const uint8_t A1 = 1; +static const uint8_t A2 = 2; +static const uint8_t A3 = 3; +static const uint8_t A4 = 4; +static const uint8_t A5 = 5; + +#endif /* Pins_Arduino_h */ diff --git a/variants/heltec_hru_3601/platformio.ini b/variants/heltec_hru_3601/platformio.ini new file mode 100644 index 000000000..3668e72b7 --- /dev/null +++ b/variants/heltec_hru_3601/platformio.ini @@ -0,0 +1,9 @@ +[env:heltec-hru-3601] +extends = esp32c3_base +board = adafruit_qtpy_esp32c3 +build_flags = + ${esp32_base.build_flags} + -D HELTEC_HRU_3601 + -I variants/heltec_hru_3601 +lib_deps = ${esp32c3_base.lib_deps} + adafruit/Adafruit NeoPixel @ ^1.12.0 diff --git a/variants/heltec_hru_3601/variant.h b/variants/heltec_hru_3601/variant.h new file mode 100644 index 000000000..31783ec35 --- /dev/null +++ b/variants/heltec_hru_3601/variant.h @@ -0,0 +1,40 @@ +#define BUTTON_PIN 9 + +#define HAS_SCREEN 0 +#define HAS_GPS 0 +#undef GPS_RX_PIN +#undef GPS_TX_PIN + +#define USE_SX1262 +#define LORA_SCK 10 +#define LORA_MISO 6 +#define LORA_MOSI 7 +#define LORA_CS 8 +#define LORA_DIO0 RADIOLIB_NC +#define LORA_RESET 5 +#define LORA_DIO1 3 +#define LORA_DIO2 RADIOLIB_NC +#define LORA_BUSY 4 +#define SX126X_CS LORA_CS +#define SX126X_DIO1 LORA_DIO1 +#define SX126X_BUSY LORA_BUSY +#define SX126X_RESET LORA_RESET +#define SX126X_DIO2_AS_RF_SWITCH +#define SX126X_DIO3_TCXO_VOLTAGE 1.8 + +// Vext_Ctrl pin controls 3.3V LDO (U2) which provides power to I2C peripheral +#define PIN_POWER_EN 1 + +// Board has I2C connected to UART0 pins, and no other hardware serial port +#define UART_TX -1 +#define UART_RX -1 + +// Board has I2C connected to U0RXD and U0TXD +#define I2C_SDA 21 +#define I2C_SCL 20 + +// Board has RGB LED on GPIO2 +#define HAS_NEOPIXEL // Enable the use of neopixels +#define NEOPIXEL_COUNT 1 // How many neopixels are connected +#define NEOPIXEL_DATA 2 // gpio pin used to send data to the neopixels +#define NEOPIXEL_TYPE (NEO_GRB + NEO_KHZ800) // type of neopixels in use diff --git a/variants/heltec_mesh_node_t114/platformio.ini b/variants/heltec_mesh_node_t114/platformio.ini new file mode 100644 index 000000000..1b06c7f5e --- /dev/null +++ b/variants/heltec_mesh_node_t114/platformio.ini @@ -0,0 +1,17 @@ +; First prototype nrf52840/sx1262 device +[env:heltec-mesh-node-t114] +extends = nrf52840_base +board = heltec_mesh_node_t114 +debug_tool = jlink + +# add -DCFG_SYSVIEW if you want to use the Segger systemview tool for OS profiling. +build_flags = ${nrf52840_base.build_flags} -Ivariants/heltec_mesh_node_t114 + -L "${platformio.libdeps_dir}/${this.__env__}/bsec2/src/cortex-m4/fpv4-sp-d16-hard" + -DGPS_POWER_TOGGLE + -DHELTEC_T114 + +build_src_filter = ${nrf52_base.build_src_filter} +<../variants/heltec_mesh_node_t114> +lib_deps = + ${nrf52840_base.lib_deps} + lewisxhe/PCF8563_Library@^1.0.1 + https://github.com/meshtastic/st7789#bd33ea58ddfe4a5e4a66d53300ccbd38d66ac21f \ No newline at end of file diff --git a/variants/heltec_mesh_node_t114/variant.cpp b/variants/heltec_mesh_node_t114/variant.cpp new file mode 100644 index 000000000..85c9f4a72 --- /dev/null +++ b/variants/heltec_mesh_node_t114/variant.cpp @@ -0,0 +1,38 @@ +/* + Copyright (c) 2014-2015 Arduino LLC. All right reserved. + Copyright (c) 2016 Sandeep Mistry All right reserved. + Copyright (c) 2018, Adafruit Industries (adafruit.com) + + This library is free software; you can redistribute it and/or + modify it under the terms of the GNU Lesser General Public + License as published by the Free Software Foundation; either + version 2.1 of the License, or (at your option) any later version. + + This library is distributed in the hope that it will be useful, + but WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. + See the GNU Lesser General Public License for more details. + + You should have received a copy of the GNU Lesser General Public + License along with this library; if not, write to the Free Software + Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA +*/ + +#include "variant.h" +#include "nrf.h" +#include "wiring_constants.h" +#include "wiring_digital.h" + +const uint32_t g_ADigitalPinMap[] = { + // P0 - pins 0 and 1 are hardwired for xtal and should never be enabled + 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, + + // P1 + 32, 33, 34, 35, 36, 37, 38, 39, 40, 41, 42, 43, 44, 45, 46, 47}; + +void initVariant() +{ + // LED1 + pinMode(PIN_LED1, OUTPUT); + ledOff(PIN_LED1); +} diff --git a/variants/heltec_mesh_node_t114/variant.h b/variants/heltec_mesh_node_t114/variant.h new file mode 100644 index 000000000..426085a26 --- /dev/null +++ b/variants/heltec_mesh_node_t114/variant.h @@ -0,0 +1,218 @@ +/* + Copyright (c) 2014-2015 Arduino LLC. All right reserved. + Copyright (c) 2016 Sandeep Mistry All right reserved. + Copyright (c) 2018, Adafruit Industries (adafruit.com) + + This library is free software; you can redistribute it and/or + modify it under the terms of the GNU Lesser General Public + License as published by the Free Software Foundation; either + version 2.1 of the License, or (at your option) any later version. + This library is distributed in the hope that it will be useful, + but WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. + See the GNU Lesser General Public License for more details. + You should have received a copy of the GNU Lesser General Public + License along with this library; if not, write to the Free Software + Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA +*/ + +#ifndef _VARIANT_HELTEC_NRF_ +#define _VARIANT_HELTEC_NRF_ +/** Master clock frequency */ +#define VARIANT_MCK (64000000ul) + +#define USE_LFXO // Board uses 32khz crystal for LF + +/*---------------------------------------------------------------------------- + * Headers + *----------------------------------------------------------------------------*/ + +#include "WVariant.h" + +#ifdef __cplusplus +extern "C" { +#endif // __cplusplus + +#define HELTEC_MESH_NODE_T114 + +#define USE_ST7789 + +#define ST7789_NSS 11 +#define ST7789_RS 12 // DC +#define ST7789_SDA 41 // MOSI +#define ST7789_SCK 40 +#define ST7789_RESET 2 +#define ST7789_MISO -1 +#define ST7789_BUSY -1 +#define VTFT_CTRL 3 +#define VTFT_LEDA 15 +// #define ST7789_BL (32+6) +#define TFT_BACKLIGHT_ON LOW +#define ST7789_SPI_HOST SPI1_HOST +// #define TFT_BL (32+6) +#define SPI_FREQUENCY 40000000 +#define SPI_READ_FREQUENCY 16000000 +#define TFT_HEIGHT 135 +#define TFT_WIDTH 240 +#define TFT_OFFSET_X 0 +#define TFT_OFFSET_Y 0 +// #define TFT_OFFSET_ROTATION 0 +// #define SCREEN_ROTATE +// #define SCREEN_TRANSITION_FRAMERATE 5 + +// Number of pins defined in PinDescription array +#define PINS_COUNT (48) +#define NUM_DIGITAL_PINS (48) +#define NUM_ANALOG_INPUTS (1) +#define NUM_ANALOG_OUTPUTS (0) + +// LEDs +#define PIN_LED1 (32 + 3) // green (confirmed on 1.0 board) +#define LED_BLUE PIN_LED1 // fake for bluefruit library +#define LED_GREEN PIN_LED1 +#define LED_BUILTIN LED_GREEN +#define LED_STATE_ON 0 // State when LED is lit + +#define HAS_NEOPIXEL // Enable the use of neopixels +#define NEOPIXEL_COUNT 2 // How many neopixels are connected +#define NEOPIXEL_DATA 14 // gpio pin used to send data to the neopixels +#define NEOPIXEL_TYPE (NEO_GRB + NEO_KHZ800) // type of neopixels in use + +/* + * Buttons + */ +#define PIN_BUTTON1 (32 + 10) +// #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 + +/* +No longer populated on PCB +*/ +#define PIN_SERIAL2_RX (0 + 9) +#define PIN_SERIAL2_TX (0 + 10) +// #define PIN_SERIAL2_EN (0 + 17) + +/* + * I2C + */ + +#define WIRE_INTERFACES_COUNT 2 + +// I2C bus 0 +// Routed to footprint for PCF8563TS RTC +// Not populated on T114 V1, maybe in future? +#define PIN_WIRE_SDA (0 + 26) // P0.26 +#define PIN_WIRE_SCL (0 + 27) // P0.27 + +// I2C bus 1 +// Available on header pins, for general use +#define PIN_WIRE1_SDA (0 + 16) // P0.16 +#define PIN_WIRE1_SCL (0 + 13) // P0.13 + +// QSPI Pins +#define PIN_QSPI_SCK (32 + 14) +#define PIN_QSPI_CS (32 + 15) +#define PIN_QSPI_IO0 (32 + 12) // MOSI if using two bit interface +#define PIN_QSPI_IO1 (32 + 13) // MISO if using two bit interface +#define PIN_QSPI_IO2 (0 + 7) // WP if using two bit interface (i.e. not used) +#define PIN_QSPI_IO3 (0 + 5) // HOLD if using two bit interface (i.e. not used) + +// On-board QSPI Flash +#define EXTERNAL_FLASH_DEVICES MX25R1635F +#define EXTERNAL_FLASH_USE_QSPI + +/* + * Lora radio + */ + +#define USE_SX1262 +// #define USE_SX1268 +#define SX126X_CS (0 + 24) // FIXME - we really should define LORA_CS instead +#define LORA_CS (0 + 24) +#define SX126X_DIO1 (0 + 20) +// Note DIO2 is attached internally to the module to an analog switch for TX/RX switching +// #define SX1262_DIO3 (0 + 21) +// This is used as an *output* from the sx1262 and connected internally to power the tcxo, do not drive from the +// main +// CPU? +#define SX126X_BUSY (0 + 17) +#define SX126X_RESET (0 + 25) +// Not really an E22 but TTGO seems to be trying to clone that +#define SX126X_DIO2_AS_RF_SWITCH +#define SX126X_DIO3_TCXO_VOLTAGE 1.8 + +#define PIN_SPI1_MISO \ + ST7789_MISO // FIXME not really needed, but for now the SPI code requires something to be defined, pick an used GPIO +#define PIN_SPI1_MOSI ST7789_SDA +#define PIN_SPI1_SCK ST7789_SCK + +/* + * GPS pins + */ + +#define GPS_L76K + +// #define PIN_GPS_RESET (32 + 6) // An output to reset L76K GPS. As per datasheet, low for > 100ms will reset the L76K +#define GPS_RESET_MODE LOW +// #define PIN_GPS_EN (21) +#define VEXT_ENABLE (0 + 21) +#define PERIPHERAL_WARMUP_MS 1000 // Make sure I2C QuickLink has stable power before continuing +#define VEXT_ON_VALUE HIGH +// #define GPS_EN_ACTIVE HIGH +#define PIN_GPS_STANDBY (32 + 2) // An output to wake GPS, low means allow sleep, high means force wake +#define PIN_GPS_PPS (32 + 4) +// Seems to be missing on this new board +// #define PIN_GPS_PPS (32 + 4) // Pulse per second input from the GPS +#define GPS_TX_PIN (32 + 5) // This is for bits going TOWARDS the CPU +#define GPS_RX_PIN (32 + 7) // This is for bits going TOWARDS the GPS + +#define GPS_THREAD_INTERVAL 50 + +#define PIN_SERIAL1_RX GPS_TX_PIN +#define PIN_SERIAL1_TX GPS_RX_PIN + +// PCF8563 RTC Module +#define PCF8563_RTC 0x51 + +/* + * SPI Interfaces + */ +#define SPI_INTERFACES_COUNT 2 + +// For LORA, spi 0 +#define PIN_SPI_MISO (0 + 23) +#define PIN_SPI_MOSI (0 + 22) +#define PIN_SPI_SCK (0 + 19) + +// #define PIN_PWR_EN (0 + 6) + +// To debug via the segger JLINK console rather than the CDC-ACM serial device +// #define USE_SEGGER + +// Battery +// The battery sense is hooked to pin A0 (4) +// it is defined in the anlaolgue pin section of this file +// and has 12 bit resolution + +#define ADC_CTRL 6 +#define ADC_CTRL_ENABLED HIGH +#define BATTERY_PIN 4 +#define ADC_RESOLUTION 14 + +#define BATTERY_SENSE_RESOLUTION_BITS 12 +#define BATTERY_SENSE_RESOLUTION 4096.0 +#undef AREF_VOLTAGE +#define AREF_VOLTAGE 3.0 +#define VBAT_AR_INTERNAL AR_INTERNAL_3_0 +#define ADC_MULTIPLIER (4.90F) + +#define HAS_RTC 0 +#ifdef __cplusplus +} +#endif + +/*---------------------------------------------------------------------------- + * Arduino objects - C++ only + *----------------------------------------------------------------------------*/ + +#endif diff --git a/variants/heltec_v2.1/platformio.ini b/variants/heltec_v2.1/platformio.ini index 7d4daecc9..5aa04fc58 100644 --- a/variants/heltec_v2.1/platformio.ini +++ b/variants/heltec_v2.1/platformio.ini @@ -2,7 +2,6 @@ ;build_type = debug ; to make it possible to step through our jtag debugger extends = esp32_base board = heltec_wifi_lora_32_V2 -board_level = extra build_flags = ${esp32_base.build_flags} -D HELTEC_V2_1 -I variants/heltec_v2.1 -DGPS_POWER_TOGGLE ; comment this line to disable triple press function on the user button to turn off gps entirely. \ No newline at end of file diff --git a/variants/heltec_v2/platformio.ini b/variants/heltec_v2/platformio.ini index 3289f4e68..cee1537d0 100644 --- a/variants/heltec_v2/platformio.ini +++ b/variants/heltec_v2/platformio.ini @@ -2,6 +2,5 @@ ;build_type = debug ; to make it possible to step through our jtag debugger extends = esp32_base board = heltec_wifi_lora_32_V2 -board_level = extra build_flags = ${esp32_base.build_flags} -D HELTEC_V2_0 -I variants/heltec_v2 \ No newline at end of file diff --git a/variants/heltec_v3/platformio.ini b/variants/heltec_v3/platformio.ini index 58ee0b5ba..e8f73e1ef 100644 --- a/variants/heltec_v3/platformio.ini +++ b/variants/heltec_v3/platformio.ini @@ -1,6 +1,7 @@ [env:heltec-v3] extends = esp32s3_base board = heltec_wifi_lora_32_V3 +board_check = true # Temporary until espressif creates a release with this new target build_flags = ${esp32s3_base.build_flags} -D HELTEC_V3 -I variants/heltec_v3 diff --git a/variants/heltec_v3/variant.h b/variants/heltec_v3/variant.h index 70b122f58..4f1d91db8 100644 --- a/variants/heltec_v3/variant.h +++ b/variants/heltec_v3/variant.h @@ -1,5 +1,7 @@ #define LED_PIN LED +#define USE_SSD1306 // Heltec_v3 has a SSD1306 display + #define RESET_OLED RST_OLED #define I2C_SDA SDA_OLED // I2C pins for this board #define I2C_SCL SCL_OLED @@ -16,7 +18,7 @@ #define BATTERY_PIN 1 // A battery voltage measurement pin, voltage divider connected here to measure battery voltage #define ADC_CHANNEL ADC1_GPIO1_CHANNEL #define ADC_ATTENUATION ADC_ATTEN_DB_2_5 // lower dB for high resistance voltage divider -#define ADC_MULTIPLIER 4.9 +#define ADC_MULTIPLIER 4.9 * 1.045 #define USE_SX1262 diff --git a/variants/heltec_vision_master_e213/pins_arduino.h b/variants/heltec_vision_master_e213/pins_arduino.h new file mode 100644 index 000000000..56f5ef157 --- /dev/null +++ b/variants/heltec_vision_master_e213/pins_arduino.h @@ -0,0 +1,61 @@ +#ifndef Pins_Arduino_h +#define Pins_Arduino_h + +#include + +static const uint8_t LED_BUILTIN = 45; // LED is not populated on earliest board variant +#define BUILTIN_LED LED_BUILTIN // Backward compatibility +#define LED_BUILTIN LED_BUILTIN + +static const uint8_t TX = 43; +static const uint8_t RX = 44; + +static const uint8_t SDA = 39; +static const uint8_t SCL = 38; + +static const uint8_t SS = 8; +static const uint8_t MOSI = 10; +static const uint8_t MISO = 11; +static const uint8_t SCK = 9; + +static const uint8_t A0 = 1; +static const uint8_t A1 = 2; +static const uint8_t A2 = 3; +static const uint8_t A3 = 4; +static const uint8_t A4 = 5; +static const uint8_t A5 = 6; +static const uint8_t A6 = 7; +static const uint8_t A7 = 8; +static const uint8_t A8 = 9; +static const uint8_t A9 = 10; +static const uint8_t A10 = 11; +static const uint8_t A11 = 12; +static const uint8_t A12 = 13; +static const uint8_t A13 = 14; +static const uint8_t A14 = 15; +static const uint8_t A15 = 16; +static const uint8_t A16 = 17; +static const uint8_t A17 = 18; +static const uint8_t A18 = 19; +static const uint8_t A19 = 20; + +static const uint8_t T1 = 1; +static const uint8_t T2 = 2; +static const uint8_t T3 = 3; +static const uint8_t T4 = 4; +static const uint8_t T5 = 5; +static const uint8_t T6 = 6; +static const uint8_t T7 = 7; +static const uint8_t T8 = 8; +static const uint8_t T9 = 9; +static const uint8_t T10 = 10; +static const uint8_t T11 = 11; +static const uint8_t T12 = 12; +static const uint8_t T13 = 13; +static const uint8_t T14 = 14; + +static const uint8_t RST_LoRa = 12; +static const uint8_t BUSY_LoRa = 13; +static const uint8_t DIO1 = 14; + +#endif /* Pins_Arduino_h */ diff --git a/variants/heltec_vision_master_e213/platformio.ini b/variants/heltec_vision_master_e213/platformio.ini new file mode 100644 index 000000000..709ae321f --- /dev/null +++ b/variants/heltec_vision_master_e213/platformio.ini @@ -0,0 +1,23 @@ +[env:heltec-vision-master-e213] +extends = esp32s3_base +board = heltec_vision_master_e213 +build_flags = + ${esp32s3_base.build_flags} + -Ivariants/heltec_vision_master_e213 + -DHELTEC_VISION_MASTER_E213 + -DEINK_DISPLAY_MODEL=GxEPD2_213_FC1 + -DEINK_WIDTH=250 + -DEINK_HEIGHT=122 + -DUSE_EINK_DYNAMICDISPLAY ; Enable Dynamic EInk + -DEINK_LIMIT_FASTREFRESH=10 ; How many consecutive fast-refreshes are permitted + -DEINK_LIMIT_RATE_BACKGROUND_SEC=30 ; Minimum interval between BACKGROUND updates + -DEINK_LIMIT_RATE_RESPONSIVE_SEC=1 ; Minimum interval between RESPONSIVE updates +; -D EINK_LIMIT_GHOSTING_PX=2000 ; (Optional) How much image ghosting is tolerated + -DEINK_BACKGROUND_USES_FAST ; (Optional) Use FAST refresh for both BACKGROUND and RESPONSIVE, until a limit is reached. + -DEINK_HASQUIRK_GHOSTING ; Display model is identified as "prone to ghosting" + -DEINK_HASQUIRK_WEAKFASTREFRESH ; Pixels set with fast-refresh are easy to clear, disrupted by sunlight +lib_deps = + ${esp32s3_base.lib_deps} + https://github.com/meshtastic/GxEPD2#b202ebfec6a4821e098cf7a625ba0f6f2400292d + lewisxhe/PCF8563_Library@^1.0.1 +upload_speed = 115200 \ No newline at end of file diff --git a/variants/heltec_vision_master_e213/variant.h b/variants/heltec_vision_master_e213/variant.h new file mode 100644 index 000000000..386df6fcf --- /dev/null +++ b/variants/heltec_vision_master_e213/variant.h @@ -0,0 +1,56 @@ +#define LED_PIN 45 // LED is not populated on earliest board variant +#define BUTTON_PIN 0 +#define BUTTON_PIN_SECONDARY 21 // Second built-in button +#define BUTTON_SECONDARY_CANNEDMESSAGES // By default, use the secondary button as canned message input + +// I2C +#define I2C_SDA SDA +#define I2C_SCL SCL + +// Display (E-Ink) +#define USE_EINK +#define PIN_EINK_CS 5 +#define PIN_EINK_BUSY 1 +#define PIN_EINK_DC 2 +#define PIN_EINK_RES 3 +#define PIN_EINK_SCLK 4 +#define PIN_EINK_MOSI 6 + +// SPI +#define SPI_INTERFACES_COUNT 2 +#define PIN_SPI_MISO 11 +#define PIN_SPI_MOSI 10 +#define PIN_SPI_SCK 9 + +// Power +#define VEXT_ENABLE 18 // Powers the E-Ink display, and the 3.3V supply to the I2C QuickLink connector +#define PERIPHERAL_WARMUP_MS 1000 // Make sure I2C QuickLink has stable power before continuing +#define VEXT_ON_VALUE HIGH +#define ADC_CTRL 46 +#define ADC_CTRL_ENABLED HIGH +#define BATTERY_PIN 7 +#define ADC_CHANNEL ADC1_GPIO7_CHANNEL +#define ADC_MULTIPLIER 4.9 * 1.03 +#define ADC_ATTENUATION ADC_ATTEN_DB_2_5 +#define HAS_32768HZ + +// LoRa +#define USE_SX1262 + +#define LORA_DIO0 RADIOLIB_NC // a No connect on the SX1262 module +#define LORA_RESET 12 +#define LORA_DIO1 14 // SX1262 IRQ +#define LORA_DIO2 13 // SX1262 BUSY + +#define LORA_SCK 9 +#define LORA_MISO 11 +#define LORA_MOSI 10 +#define LORA_CS 8 + +#define SX126X_CS LORA_CS +#define SX126X_DIO1 LORA_DIO1 +#define SX126X_BUSY LORA_DIO2 +#define SX126X_RESET LORA_RESET + +#define SX126X_DIO2_AS_RF_SWITCH +#define SX126X_DIO3_TCXO_VOLTAGE 1.8 \ No newline at end of file diff --git a/variants/heltec_vision_master_e290/pins_arduino.h b/variants/heltec_vision_master_e290/pins_arduino.h new file mode 100644 index 000000000..56f5ef157 --- /dev/null +++ b/variants/heltec_vision_master_e290/pins_arduino.h @@ -0,0 +1,61 @@ +#ifndef Pins_Arduino_h +#define Pins_Arduino_h + +#include + +static const uint8_t LED_BUILTIN = 45; // LED is not populated on earliest board variant +#define BUILTIN_LED LED_BUILTIN // Backward compatibility +#define LED_BUILTIN LED_BUILTIN + +static const uint8_t TX = 43; +static const uint8_t RX = 44; + +static const uint8_t SDA = 39; +static const uint8_t SCL = 38; + +static const uint8_t SS = 8; +static const uint8_t MOSI = 10; +static const uint8_t MISO = 11; +static const uint8_t SCK = 9; + +static const uint8_t A0 = 1; +static const uint8_t A1 = 2; +static const uint8_t A2 = 3; +static const uint8_t A3 = 4; +static const uint8_t A4 = 5; +static const uint8_t A5 = 6; +static const uint8_t A6 = 7; +static const uint8_t A7 = 8; +static const uint8_t A8 = 9; +static const uint8_t A9 = 10; +static const uint8_t A10 = 11; +static const uint8_t A11 = 12; +static const uint8_t A12 = 13; +static const uint8_t A13 = 14; +static const uint8_t A14 = 15; +static const uint8_t A15 = 16; +static const uint8_t A16 = 17; +static const uint8_t A17 = 18; +static const uint8_t A18 = 19; +static const uint8_t A19 = 20; + +static const uint8_t T1 = 1; +static const uint8_t T2 = 2; +static const uint8_t T3 = 3; +static const uint8_t T4 = 4; +static const uint8_t T5 = 5; +static const uint8_t T6 = 6; +static const uint8_t T7 = 7; +static const uint8_t T8 = 8; +static const uint8_t T9 = 9; +static const uint8_t T10 = 10; +static const uint8_t T11 = 11; +static const uint8_t T12 = 12; +static const uint8_t T13 = 13; +static const uint8_t T14 = 14; + +static const uint8_t RST_LoRa = 12; +static const uint8_t BUSY_LoRa = 13; +static const uint8_t DIO1 = 14; + +#endif /* Pins_Arduino_h */ diff --git a/variants/heltec_vision_master_e290/platformio.ini b/variants/heltec_vision_master_e290/platformio.ini new file mode 100644 index 000000000..e1ba100ae --- /dev/null +++ b/variants/heltec_vision_master_e290/platformio.ini @@ -0,0 +1,25 @@ +[env:heltec-vision-master-e290] +extends = esp32s3_base +board = heltec_vision_master_e290 +build_flags = + ${esp32s3_base.build_flags} + -I variants/heltec_vision_master_e290 + -D HELTEC_VISION_MASTER_E290 + -D BUTTON_CLICK_MS=200 + -D EINK_DISPLAY_MODEL=GxEPD2_290_BN8 + -D EINK_WIDTH=296 + -D EINK_HEIGHT=128 + -D USE_EINK_DYNAMICDISPLAY ; Enable Dynamic EInk + -D EINK_LIMIT_FASTREFRESH=10 ; How many consecutive fast-refreshes are permitted + -D EINK_LIMIT_RATE_BACKGROUND_SEC=30 ; Minimum interval between BACKGROUND updates + -D EINK_LIMIT_RATE_RESPONSIVE_SEC=1 ; Minimum interval between RESPONSIVE updates + -D EINK_HASQUIRK_GHOSTING ; Display model is identified as "prone to ghosting" + -D EINK_HASQUIRK_WEAKFASTREFRESH ; Pixels set with fast-refresh are easy to clear, disrupted by sunlight +; -D EINK_LIMIT_GHOSTING_PX=2000 ; How much image ghosting is tolerated +; -D EINK_BACKGROUND_USES_FAST ; (If enabled) don't redraw RESPONSIVE frames at next BACKGROUND update + +lib_deps = + ${esp32s3_base.lib_deps} + https://github.com/meshtastic/GxEPD2#448c8538129fde3d02a7cb5e6fc81971ad92547f + lewisxhe/PCF8563_Library@^1.0.1 +upload_speed = 115200 \ No newline at end of file diff --git a/variants/heltec_vision_master_e290/variant.h b/variants/heltec_vision_master_e290/variant.h new file mode 100644 index 000000000..299186549 --- /dev/null +++ b/variants/heltec_vision_master_e290/variant.h @@ -0,0 +1,55 @@ +#define LED_PIN 45 // LED is not populated on earliest board variant +#define BUTTON_PIN 0 +#define BUTTON_PIN_SECONDARY 21 // Second built-in button +#define BUTTON_SECONDARY_CANNEDMESSAGES // By default, use the secondary button as canned message input + +// I2C +#define I2C_SDA SDA +#define I2C_SCL SCL + +// Display (E-Ink) +#define USE_EINK +#define PIN_EINK_CS 3 +#define PIN_EINK_BUSY 6 +#define PIN_EINK_DC 4 +#define PIN_EINK_RES 5 +#define PIN_EINK_SCLK 2 +#define PIN_EINK_MOSI 1 + +// SPI +#define SPI_INTERFACES_COUNT 2 +#define PIN_SPI_MISO 11 +#define PIN_SPI_MOSI 10 +#define PIN_SPI_SCK 9 + +// Power +#define VEXT_ENABLE 18 // Powers the E-Ink display only +#define VEXT_ON_VALUE HIGH +#define ADC_CTRL 46 +#define ADC_CTRL_ENABLED HIGH +#define BATTERY_PIN 7 +#define ADC_CHANNEL ADC1_GPIO7_CHANNEL +#define ADC_MULTIPLIER 4.9 * 1.03 +#define ADC_ATTENUATION ADC_ATTEN_DB_2_5 +#define HAS_32768HZ + +// LoRa +#define USE_SX1262 + +#define LORA_DIO0 RADIOLIB_NC // a No connect on the SX1262 module +#define LORA_RESET 12 +#define LORA_DIO1 14 // SX1262 IRQ +#define LORA_DIO2 13 // SX1262 BUSY + +#define LORA_SCK 9 +#define LORA_MISO 11 +#define LORA_MOSI 10 +#define LORA_CS 8 + +#define SX126X_CS LORA_CS +#define SX126X_DIO1 LORA_DIO1 +#define SX126X_BUSY LORA_DIO2 +#define SX126X_RESET LORA_RESET + +#define SX126X_DIO2_AS_RF_SWITCH +#define SX126X_DIO3_TCXO_VOLTAGE 1.8 \ No newline at end of file diff --git a/variants/heltec_vision_master_t190/pins_arduino.h b/variants/heltec_vision_master_t190/pins_arduino.h new file mode 100644 index 000000000..eeef95ff1 --- /dev/null +++ b/variants/heltec_vision_master_t190/pins_arduino.h @@ -0,0 +1,61 @@ +#ifndef Pins_Arduino_h +#define Pins_Arduino_h + +#include + +static const uint8_t LED_BUILTIN = 35; +#define BUILTIN_LED LED_BUILTIN // backward compatibility +#define LED_BUILTIN LED_BUILTIN + +static const uint8_t TX = 43; +static const uint8_t RX = 44; + +static const uint8_t SDA = 2; +static const uint8_t SCL = 1; + +static const uint8_t SS = 8; +static const uint8_t MOSI = 10; +static const uint8_t MISO = 11; +static const uint8_t SCK = 9; + +static const uint8_t A0 = 1; +static const uint8_t A1 = 2; +static const uint8_t A2 = 3; +static const uint8_t A3 = 4; +static const uint8_t A4 = 5; +static const uint8_t A5 = 6; +static const uint8_t A6 = 7; +static const uint8_t A7 = 8; +static const uint8_t A8 = 9; +static const uint8_t A9 = 10; +static const uint8_t A10 = 11; +static const uint8_t A11 = 12; +static const uint8_t A12 = 13; +static const uint8_t A13 = 14; +static const uint8_t A14 = 15; +static const uint8_t A15 = 16; +static const uint8_t A16 = 17; +static const uint8_t A17 = 18; +static const uint8_t A18 = 19; +static const uint8_t A19 = 20; + +static const uint8_t T1 = 1; +static const uint8_t T2 = 2; +static const uint8_t T3 = 3; +static const uint8_t T4 = 4; +static const uint8_t T5 = 5; +static const uint8_t T6 = 6; +static const uint8_t T7 = 7; +static const uint8_t T8 = 8; +static const uint8_t T9 = 9; +static const uint8_t T10 = 10; +static const uint8_t T11 = 11; +static const uint8_t T12 = 12; +static const uint8_t T13 = 13; +static const uint8_t T14 = 14; + +static const uint8_t RST_LoRa = 12; +static const uint8_t BUSY_LoRa = 13; +static const uint8_t DIO0 = 14; + +#endif /* Pins_Arduino_h */ diff --git a/variants/heltec_vision_master_t190/platformio.ini b/variants/heltec_vision_master_t190/platformio.ini new file mode 100644 index 000000000..0c504d62b --- /dev/null +++ b/variants/heltec_vision_master_t190/platformio.ini @@ -0,0 +1,13 @@ +[env:heltec-vision-master-t190] +extends = esp32s3_base +board = heltec_vision_master_t190 +build_flags = + ${esp32s3_base.build_flags} + -Ivariants/heltec_vision_master_t190 + -DHELTEC_VISION_MASTER_T190 + ; -D PRIVATE_HW +lib_deps = + ${esp32s3_base.lib_deps} + lewisxhe/PCF8563_Library@^1.0.1 + https://github.com/meshtastic/st7789#bd33ea58ddfe4a5e4a66d53300ccbd38d66ac21f +upload_speed = 921600 \ No newline at end of file diff --git a/variants/heltec_vision_master_t190/variant.h b/variants/heltec_vision_master_t190/variant.h new file mode 100644 index 000000000..1da3f9971 --- /dev/null +++ b/variants/heltec_vision_master_t190/variant.h @@ -0,0 +1,72 @@ +#define BUTTON_PIN 0 +#define BUTTON_PIN_SECONDARY 21 // Second built-in button +#define BUTTON_SECONDARY_CANNEDMESSAGES // By default, use the secondary button as canned message input + +// I2C +#define I2C_SDA SDA +#define I2C_SCL SCL + +// Display (TFT) +#define USE_ST7789 +#define ST7789_NSS 39 +#define ST7789_RS 47 // DC +#define ST7789_SDA 48 // MOSI +#define ST7789_SCK 38 +#define ST7789_RESET 40 +#define ST7789_MISO 4 +#define ST7789_BUSY -1 +#define VTFT_CTRL 7 +#define VTFT_LEDA 17 +#define TFT_BACKLIGHT_ON HIGH +#define ST7789_SPI_HOST SPI2_HOST +#define SPI_FREQUENCY 10000000 +#define SPI_READ_FREQUENCY 10000000 +#define TFT_HEIGHT 170 +#define TFT_WIDTH 320 +#define TFT_OFFSET_X 0 +#define TFT_OFFSET_Y 0 +// #define TFT_OFFSET_ROTATION 0 +// #define SCREEN_ROTATE +// #define SCREEN_TRANSITION_FRAMERATE 5 +#define BRIGHTNESS_DEFAULT 100 // Medium Low Brightnes + +// #define SLEEP_TIME 120 + +// SPI +#define SPI_INTERFACES_COUNT 2 +#define PIN_SPI_MISO 11 +#define PIN_SPI_MOSI 10 +#define PIN_SPI_SCK 9 + +// Power +#define VEXT_ENABLE 5 +#define VEXT_ON_VALUE HIGH +#define ADC_CTRL 46 +#define ADC_CTRL_ENABLED HIGH +#define BATTERY_PIN 6 +#define ADC_CHANNEL ADC1_GPIO6_CHANNEL +#define ADC_MULTIPLIER 4.9 * 1.03 // Voltage divider is roughly 1:1 +#define ADC_ATTENUATION ADC_ATTEN_DB_2_5 // Voltage divider output is quite high +#define HAS_32768HZ + +// LoRa +#define USE_SX1262 + +#define LORA_DIO0 RADIOLIB_NC // a No connect on the SX1262 module +#define LORA_RESET 12 +#define LORA_DIO1 14 // SX1262 IRQ +#define LORA_DIO2 13 // SX1262 BUSY +#define LORA_DIO3 // Not connected on PCB, but internally on the TTGO SX1262, if DIO3 is high the TXCO is enabled + +#define LORA_SCK 9 +#define LORA_MISO 11 +#define LORA_MOSI 10 +#define LORA_CS 8 + +#define SX126X_CS LORA_CS +#define SX126X_DIO1 LORA_DIO1 +#define SX126X_BUSY LORA_DIO2 +#define SX126X_RESET LORA_RESET + +#define SX126X_DIO2_AS_RF_SWITCH +#define SX126X_DIO3_TCXO_VOLTAGE 1.8 \ No newline at end of file diff --git a/variants/heltec_wireless_bridge/platformio.ini b/variants/heltec_wireless_bridge/platformio.ini new file mode 100644 index 000000000..45c3aba74 --- /dev/null +++ b/variants/heltec_wireless_bridge/platformio.ini @@ -0,0 +1,6 @@ +[env:heltec-wireless-bridge] +;build_type = debug ; to make it possible to step through our jtag debugger +extends = esp32_base +board = heltec_wifi_lora_32 +build_flags = + ${esp32_base.build_flags} -D HELTEC_WIRELESS_BRIDGE -I variants/heltec_wireless_bridge \ No newline at end of file diff --git a/variants/heltec_wireless_bridge/variant.h b/variants/heltec_wireless_bridge/variant.h new file mode 100644 index 000000000..7c4f41660 --- /dev/null +++ b/variants/heltec_wireless_bridge/variant.h @@ -0,0 +1,29 @@ +// the default ESP32 Pin of 15 is the Oled SCL, set to 36 and 37 and works fine. +// Tested on Neo6m module. +#undef GPS_RX_PIN +#undef GPS_TX_PIN +#define GPS_RX_PIN 36 +#define GPS_TX_PIN 33 + +#ifndef USE_JTAG // gpio15 is TDO for JTAG, so no I2C on this board while doing jtag +#define I2C_SDA 4 // I2C pins for this board +#define I2C_SCL 15 +#endif + +#define LED_PIN 25 // If defined we will blink this LED +#define BUTTON_PIN 0 // If defined, this will be used for user button presses + +#define USE_RF95 +#define LORA_DIO0 26 // a No connect on the SX1262 module +#ifndef USE_JTAG +#define LORA_RESET 14 +#endif +#define LORA_DIO1 35 +#define LORA_DIO2 34 // Not really used + +// ratio of voltage divider = 3.20 (R1=100k, R2=220k) +#define ADC_MULTIPLIER 3.2 + +#define BATTERY_PIN 13 // A battery voltage measurement pin, voltage divider connected here to measure battery voltage +#define ADC_CHANNEL ADC2_GPIO13_CHANNEL +#define BAT_MEASURE_ADC_UNIT 2 \ No newline at end of file diff --git a/variants/heltec_wireless_paper/pins_arduino.h b/variants/heltec_wireless_paper/pins_arduino.h index 66d091691..3e36d98f5 100644 --- a/variants/heltec_wireless_paper/pins_arduino.h +++ b/variants/heltec_wireless_paper/pins_arduino.h @@ -3,24 +3,10 @@ #include -#define WIFI_Kit_32 true -#define DISPLAY_HEIGHT 64 -#define DISPLAY_WIDTH 128 - -#define EXTERNAL_NUM_INTERRUPTS 16 -#define NUM_DIGITAL_PINS 40 -#define NUM_ANALOG_INPUTS 16 - -#define analogInputToDigitalPin(p) (((p) < 20) ? (analogChannelToDigitalPin(p)) : -1) -#define digitalPinToInterrupt(p) (((p) < 40) ? (p) : -1) -#define digitalPinHasPWM(p) (p < 34) - -static const uint8_t LED_BUILTIN = 35; +static const uint8_t LED_BUILTIN = 18; #define BUILTIN_LED LED_BUILTIN // backward compatibility #define LED_BUILTIN LED_BUILTIN -static const uint8_t KEY_BUILTIN = 0; - static const uint8_t TX = 43; static const uint8_t RX = 44; @@ -68,11 +54,8 @@ static const uint8_t T12 = 12; static const uint8_t T13 = 13; static const uint8_t T14 = 14; -static const uint8_t Vext = 45; -static const uint8_t LED = 18; - static const uint8_t RST_LoRa = 12; static const uint8_t BUSY_LoRa = 13; -static const uint8_t DIO0 = 14; +static const uint8_t DIO1 = 14; #endif /* Pins_Arduino_h */ diff --git a/variants/heltec_wireless_paper/platformio.ini b/variants/heltec_wireless_paper/platformio.ini index dd93b52cb..afbbd8be9 100644 --- a/variants/heltec_wireless_paper/platformio.ini +++ b/variants/heltec_wireless_paper/platformio.ini @@ -2,10 +2,22 @@ extends = esp32s3_base board = heltec_wifi_lora_32_V3 build_flags = - ${esp32s3_base.build_flags} -D HELTEC_WIRELESS_PAPER -I variants/heltec_wireless_paper + ${esp32s3_base.build_flags} + -I variants/heltec_wireless_paper + -D HELTEC_WIRELESS_PAPER + -D EINK_DISPLAY_MODEL=GxEPD2_213_FC1 + -D EINK_WIDTH=250 + -D EINK_HEIGHT=122 + -D USE_EINK_DYNAMICDISPLAY ; Enable Dynamic EInk + -D EINK_LIMIT_FASTREFRESH=10 ; How many consecutive fast-refreshes are permitted + -D EINK_LIMIT_RATE_BACKGROUND_SEC=30 ; Minimum interval between BACKGROUND updates + -D EINK_LIMIT_RATE_RESPONSIVE_SEC=1 ; Minimum interval between RESPONSIVE updates +; -D EINK_LIMIT_GHOSTING_PX=2000 ; (Optional) How much image ghosting is tolerated + -D EINK_BACKGROUND_USES_FAST ; (Optional) Use FAST refresh for both BACKGROUND and RESPONSIVE, until a limit is reached. + -D EINK_HASQUIRK_GHOSTING ; Display model is identified as "prone to ghosting" + -D EINK_HASQUIRK_WEAKFASTREFRESH ; Pixels set with fast-refresh are easy to clear, disrupted by sunlight lib_deps = ${esp32s3_base.lib_deps} - https://github.com/ixt/GxEPD2#39f325b677713eb04dfcc83b8e402e77523fb8bf - adafruit/Adafruit BusIO@^1.13.2 + https://github.com/meshtastic/GxEPD2#b202ebfec6a4821e098cf7a625ba0f6f2400292d lewisxhe/PCF8563_Library@^1.0.1 upload_speed = 115200 \ No newline at end of file diff --git a/variants/heltec_wireless_paper/variant.h b/variants/heltec_wireless_paper/variant.h index c2a030ed0..520dcec9b 100644 --- a/variants/heltec_wireless_paper/variant.h +++ b/variants/heltec_wireless_paper/variant.h @@ -1,13 +1,12 @@ #define LED_PIN 18 +#define BUTTON_PIN 0 -// Enable bus for external periherals +// I2C #define I2C_SDA SDA #define I2C_SCL SCL +// Display (E-Ink) #define USE_EINK -/* - * eink display pins - */ #define PIN_EINK_CS 4 #define PIN_EINK_BUSY 7 #define PIN_EINK_DC 5 @@ -15,32 +14,31 @@ #define PIN_EINK_SCLK 3 #define PIN_EINK_MOSI 2 -/* - * SPI interfaces - */ +// SPI #define SPI_INTERFACES_COUNT 2 +#define PIN_SPI_MISO 11 +#define PIN_SPI_MOSI 10 +#define PIN_SPI_SCK 9 -#define PIN_SPI_MISO 10 // MISO P0.17 -#define PIN_SPI_MOSI 11 // MOSI P0.15 -#define PIN_SPI_SCK 9 // SCK P0.13 - -#define VEXT_ENABLE 45 // active low, powers the oled display and the lora antenna boost -#define BUTTON_PIN 0 - +// Power +#define VEXT_ENABLE 45 // Active low, powers the E-Ink display +#define VEXT_ON_VALUE LOW #define ADC_CTRL 19 #define BATTERY_PIN 20 #define ADC_CHANNEL ADC2_GPIO20_CHANNEL #define ADC_MULTIPLIER 2 // Voltage divider is roughly 1:1 #define BAT_MEASURE_ADC_UNIT 2 // Use ADC2 -#define ADC_ATTENUATION ADC_ATTEN_DB_11 // Voltage divider output is quite high +#define ADC_ATTENUATION ADC_ATTEN_DB_12 // Voltage divider output is quite high +#define HAS_32768HZ +#define ADC_CTRL_ENABLED LOW +// LoRa #define USE_SX1262 -#define LORA_DIO0 -1 // a No connect on the SX1262 module +#define LORA_DIO0 RADIOLIB_NC // a No connect on the SX1262 module #define LORA_RESET 12 #define LORA_DIO1 14 // SX1262 IRQ #define LORA_DIO2 13 // SX1262 BUSY -#define LORA_DIO3 // Not connected on PCB, but internally on the TTGO SX1262, if DIO3 is high the TXCO is enabled #define LORA_SCK 9 #define LORA_MISO 11 @@ -53,4 +51,4 @@ #define SX126X_RESET LORA_RESET #define SX126X_DIO2_AS_RF_SWITCH -#define SX126X_DIO3_TCXO_VOLTAGE 1.8 +#define SX126X_DIO3_TCXO_VOLTAGE 1.8 \ No newline at end of file diff --git a/variants/heltec_wireless_paper_v1/pins_arduino.h b/variants/heltec_wireless_paper_v1/pins_arduino.h index 66d091691..2bb44161a 100644 --- a/variants/heltec_wireless_paper_v1/pins_arduino.h +++ b/variants/heltec_wireless_paper_v1/pins_arduino.h @@ -3,19 +3,7 @@ #include -#define WIFI_Kit_32 true -#define DISPLAY_HEIGHT 64 -#define DISPLAY_WIDTH 128 - -#define EXTERNAL_NUM_INTERRUPTS 16 -#define NUM_DIGITAL_PINS 40 -#define NUM_ANALOG_INPUTS 16 - -#define analogInputToDigitalPin(p) (((p) < 20) ? (analogChannelToDigitalPin(p)) : -1) -#define digitalPinToInterrupt(p) (((p) < 40) ? (p) : -1) -#define digitalPinHasPWM(p) (p < 34) - -static const uint8_t LED_BUILTIN = 35; +static const uint8_t LED_BUILTIN = 18; #define BUILTIN_LED LED_BUILTIN // backward compatibility #define LED_BUILTIN LED_BUILTIN @@ -73,6 +61,6 @@ static const uint8_t LED = 18; static const uint8_t RST_LoRa = 12; static const uint8_t BUSY_LoRa = 13; -static const uint8_t DIO0 = 14; +static const uint8_t DIO1 = 14; #endif /* Pins_Arduino_h */ diff --git a/variants/heltec_wireless_paper_v1/platformio.ini b/variants/heltec_wireless_paper_v1/platformio.ini index 7d7f4eb14..999f1586a 100644 --- a/variants/heltec_wireless_paper_v1/platformio.ini +++ b/variants/heltec_wireless_paper_v1/platformio.ini @@ -5,9 +5,18 @@ build_flags = ${esp32s3_base.build_flags} -I variants/heltec_wireless_paper_v1 -D HELTEC_WIRELESS_PAPER_V1_0 + -D EINK_DISPLAY_MODEL=GxEPD2_213_BN + -D EINK_WIDTH=250 + -D EINK_HEIGHT=122 + -D USE_EINK_DYNAMICDISPLAY ; Enable Dynamic EInk + -D EINK_LIMIT_FASTREFRESH=5 ; How many consecutive fast-refreshes are permitted + -D EINK_LIMIT_RATE_BACKGROUND_SEC=30 ; Minimum interval between BACKGROUND updates + -D EINK_LIMIT_RATE_RESPONSIVE_SEC=1 ; Minimum interval between RESPONSIVE updates + -D EINK_LIMIT_GHOSTING_PX=2000 ; (Optional) How much image ghosting is tolerated + ;-D EINK_BACKGROUND_USES_FAST ; (Optional) Use FAST refresh for both BACKGROUND and RESPONSIVE, until a limit is reached. + -D EINK_HASQUIRK_VICIOUSFASTREFRESH ; Identify that pixels drawn by fast-refresh are harder to clear lib_deps = ${esp32s3_base.lib_deps} - https://github.com/meshtastic/GxEPD2/ - adafruit/Adafruit BusIO@^1.13.2 + https://github.com/meshtastic/GxEPD2#55f618961db45a23eff0233546430f1e5a80f63a lewisxhe/PCF8563_Library@^1.0.1 upload_speed = 115200 \ No newline at end of file diff --git a/variants/heltec_wireless_paper_v1/variant.h b/variants/heltec_wireless_paper_v1/variant.h index 166b7f30e..520dcec9b 100644 --- a/variants/heltec_wireless_paper_v1/variant.h +++ b/variants/heltec_wireless_paper_v1/variant.h @@ -1,21 +1,12 @@ #define LED_PIN 18 +#define BUTTON_PIN 0 -// Enable bus for external periherals +// I2C #define I2C_SDA SDA #define I2C_SCL SCL +// Display (E-Ink) #define USE_EINK - -// Settings for Dynamic Partial mode -// Change between partial and full refresh config, or skip update, balancing urgency and display health. -#define USE_EINK_DYNAMIC_PARTIAL -#define EINK_LOWPRIORITY_LIMIT_SECONDS 30 -#define EINK_HIGHPRIORITY_LIMIT_SECONDS 1 -#define EINK_PARTIAL_REPEAT_LIMIT 5 - -/* - * eink display pins - */ #define PIN_EINK_CS 4 #define PIN_EINK_BUSY 7 #define PIN_EINK_DC 5 @@ -23,32 +14,31 @@ #define PIN_EINK_SCLK 3 #define PIN_EINK_MOSI 2 -/* - * SPI interfaces - */ +// SPI #define SPI_INTERFACES_COUNT 2 +#define PIN_SPI_MISO 11 +#define PIN_SPI_MOSI 10 +#define PIN_SPI_SCK 9 -#define PIN_SPI_MISO 10 // MISO P0.17 -#define PIN_SPI_MOSI 11 // MOSI P0.15 -#define PIN_SPI_SCK 9 // SCK P0.13 - -#define VEXT_ENABLE 45 // active low, powers the oled display and the lora antenna boost -#define BUTTON_PIN 0 - +// Power +#define VEXT_ENABLE 45 // Active low, powers the E-Ink display +#define VEXT_ON_VALUE LOW #define ADC_CTRL 19 #define BATTERY_PIN 20 #define ADC_CHANNEL ADC2_GPIO20_CHANNEL #define ADC_MULTIPLIER 2 // Voltage divider is roughly 1:1 #define BAT_MEASURE_ADC_UNIT 2 // Use ADC2 -#define ADC_ATTENUATION ADC_ATTEN_DB_11 // Voltage divider output is quite high +#define ADC_ATTENUATION ADC_ATTEN_DB_12 // Voltage divider output is quite high +#define HAS_32768HZ +#define ADC_CTRL_ENABLED LOW +// LoRa #define USE_SX1262 -#define LORA_DIO0 -1 // a No connect on the SX1262 module +#define LORA_DIO0 RADIOLIB_NC // a No connect on the SX1262 module #define LORA_RESET 12 #define LORA_DIO1 14 // SX1262 IRQ #define LORA_DIO2 13 // SX1262 BUSY -#define LORA_DIO3 // Not connected on PCB, but internally on the TTGO SX1262, if DIO3 is high the TXCO is enabled #define LORA_SCK 9 #define LORA_MISO 11 @@ -61,4 +51,4 @@ #define SX126X_RESET LORA_RESET #define SX126X_DIO2_AS_RF_SWITCH -#define SX126X_DIO3_TCXO_VOLTAGE 1.8 +#define SX126X_DIO3_TCXO_VOLTAGE 1.8 \ No newline at end of file diff --git a/variants/heltec_wireless_tracker/pins_arduino.h b/variants/heltec_wireless_tracker/pins_arduino.h index 5c0b529b0..1052af961 100644 --- a/variants/heltec_wireless_tracker/pins_arduino.h +++ b/variants/heltec_wireless_tracker/pins_arduino.h @@ -11,18 +11,10 @@ #define USB_VID 0x303a #define USB_PID 0x1001 -#define EXTERNAL_NUM_INTERRUPTS 46 -#define NUM_DIGITAL_PINS 48 -#define NUM_ANALOG_INPUTS 20 - static const uint8_t LED_BUILTIN = 18; #define BUILTIN_LED LED_BUILTIN // backward compatibility #define LED_BUILTIN LED_BUILTIN -#define analogInputToDigitalPin(p) (((p) < 20) ? (analogChannelToDigitalPin(p)) : -1) -#define digitalPinToInterrupt(p) (((p) < 48) ? (p) : -1) -#define digitalPinHasPWM(p) (p < 46) - static const uint8_t TX = 43; static const uint8_t RX = 44; diff --git a/variants/heltec_wireless_tracker/platformio.ini b/variants/heltec_wireless_tracker/platformio.ini index 3259d563c..c7ecce8ea 100644 --- a/variants/heltec_wireless_tracker/platformio.ini +++ b/variants/heltec_wireless_tracker/platformio.ini @@ -1,7 +1,7 @@ [env:heltec-wireless-tracker] extends = esp32s3_base board = heltec_wireless_tracker -upload_protocol = esp-builtin +upload_protocol = esptool build_flags = ${esp32s3_base.build_flags} -I variants/heltec_wireless_tracker @@ -11,4 +11,4 @@ build_flags = lib_deps = ${esp32s3_base.lib_deps} - lovyan03/LovyanGFX@^1.1.8 \ No newline at end of file + lovyan03/LovyanGFX@^1.1.8 diff --git a/variants/heltec_wireless_tracker/variant.h b/variants/heltec_wireless_tracker/variant.h index 167345e1a..79fa0e801 100644 --- a/variants/heltec_wireless_tracker/variant.h +++ b/variants/heltec_wireless_tracker/variant.h @@ -1,5 +1,6 @@ #define LED_PIN 18 +#define _VARIANT_HELTEC_WIRELESS_TRACKER #define HELTEC_TRACKER_V1_X // I2C @@ -15,7 +16,7 @@ #define ST7735_RESET 39 #define ST7735_MISO -1 #define ST7735_BUSY -1 -#define ST7735_BL_V05 21 /* V1.1 PCB marking */ +#define TFT_BL 21 /* V1.1 PCB marking */ #define ST7735_SPI_HOST SPI3_HOST #define SPI_FREQUENCY 40000000 #define SPI_READ_FREQUENCY 16000000 @@ -27,15 +28,21 @@ #define SCREEN_TRANSITION_FRAMERATE 3 // fps #define DISPLAY_FORCE_SMALL_FONTS -#define VEXT_ENABLE_V05 3 // active HIGH, powers the lora antenna boost +// pin 3 is Vext on v1.1 - HIGH enables LDO for Vext rail which goes to: +// 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 +// GPS LNA SW7125DE: VCC(4), pulls up SHDN(5) through 10kR +// LED: VDD, LEDA (through diode) + +#define VEXT_ENABLE 3 // active HIGH - powers the GPS, GPS LNA and OLED +#define VEXT_ON_VALUE HIGH #define BUTTON_PIN 0 #define BATTERY_PIN 1 // A battery voltage measurement pin, voltage divider connected here to measure battery voltage #define ADC_CHANNEL ADC1_GPIO1_CHANNEL #define ADC_ATTENUATION ADC_ATTEN_DB_2_5 // lower dB for high resistance voltage divider -#define ADC_MULTIPLIER 4.9 -#define ADC_CTRL 2 // active HIGH, powers the voltage divider. Only on 1.1 -#define ADC_CTRL_ENABLED HIGH +#define ADC_MULTIPLIER 4.9 * 1.045 +#define ADC_CTRL 2 // active HIGH, powers the voltage divider. Only on 1.1 +#define ADC_USE_PULLUP // Use internal pullup/pulldown instead of actively driving the output #undef GPS_RX_PIN #undef GPS_TX_PIN @@ -43,9 +50,12 @@ #define GPS_TX_PIN 34 #define PIN_GPS_RESET 35 #define PIN_GPS_PPS 36 +// #define PIN_GPS_EN 3 // Uncomment to power off the GPS with triple-click on Tracker v1.1, though we'll also lose the +// display. #define GPS_RESET_MODE LOW #define GPS_UC6580 +#define GPS_BAUDRATE 115200 #define USE_SX1262 #define LORA_DIO0 -1 // a No connect on the SX1262 module @@ -65,4 +75,4 @@ #define SX126X_RESET LORA_RESET #define SX126X_DIO2_AS_RF_SWITCH -#define SX126X_DIO3_TCXO_VOLTAGE 1.8 +#define SX126X_DIO3_TCXO_VOLTAGE 1.8 \ No newline at end of file diff --git a/variants/heltec_wireless_tracker_V1_0/pins_arduino.h b/variants/heltec_wireless_tracker_V1_0/pins_arduino.h index 5c0b529b0..28b982012 100644 --- a/variants/heltec_wireless_tracker_V1_0/pins_arduino.h +++ b/variants/heltec_wireless_tracker_V1_0/pins_arduino.h @@ -11,23 +11,15 @@ #define USB_VID 0x303a #define USB_PID 0x1001 -#define EXTERNAL_NUM_INTERRUPTS 46 -#define NUM_DIGITAL_PINS 48 -#define NUM_ANALOG_INPUTS 20 - static const uint8_t LED_BUILTIN = 18; #define BUILTIN_LED LED_BUILTIN // backward compatibility #define LED_BUILTIN LED_BUILTIN -#define analogInputToDigitalPin(p) (((p) < 20) ? (analogChannelToDigitalPin(p)) : -1) -#define digitalPinToInterrupt(p) (((p) < 48) ? (p) : -1) -#define digitalPinHasPWM(p) (p < 46) - static const uint8_t TX = 43; static const uint8_t RX = 44; -static const uint8_t SDA = 45; -static const uint8_t SCL = 46; +static const uint8_t SDA = 5; +static const uint8_t SCL = 6; static const uint8_t SS = 8; static const uint8_t MOSI = 10; diff --git a/variants/heltec_wireless_tracker_V1_0/platformio.ini b/variants/heltec_wireless_tracker_V1_0/platformio.ini index 034360c3d..303e27dbf 100644 --- a/variants/heltec_wireless_tracker_V1_0/platformio.ini +++ b/variants/heltec_wireless_tracker_V1_0/platformio.ini @@ -1,7 +1,7 @@ [env:heltec-wireless-tracker-V1-0] extends = esp32s3_base board = heltec_wireless_tracker -upload_protocol = esp-builtin +upload_protocol = esptool build_flags = ${esp32s3_base.build_flags} -I variants/heltec_wireless_tracker_V1_0 diff --git a/variants/heltec_wireless_tracker_V1_0/variant.h b/variants/heltec_wireless_tracker_V1_0/variant.h index 84e77a6b9..876ff1146 100644 --- a/variants/heltec_wireless_tracker_V1_0/variant.h +++ b/variants/heltec_wireless_tracker_V1_0/variant.h @@ -15,7 +15,7 @@ #define ST7735_RESET 39 #define ST7735_MISO -1 #define ST7735_BUSY -1 -#define ST7735_BL_V03 45 +#define TFT_BL 45 #define ST7735_SPI_HOST SPI3_HOST #define SPI_FREQUENCY 40000000 #define SPI_READ_FREQUENCY 16000000 @@ -24,17 +24,18 @@ #define TFT_WIDTH DISPLAY_HEIGHT #define TFT_OFFSET_X 26 #define TFT_OFFSET_Y -1 -#define VTFT_CTRL_V03 46 // Heltec Tracker needs this pulled low for TFT +#define VTFT_CTRL 46 // Heltec Tracker needs this pulled low for TFT #define SCREEN_TRANSITION_FRAMERATE 3 // fps #define DISPLAY_FORCE_SMALL_FONTS -#define VEXT_ENABLE_V03 Vext // active low, powers the oled display and the lora antenna boost +#define VEXT_ENABLE Vext // active low, powers the oled display and the lora antenna boost +#define VEXT_ON_VALUE LOW #define BUTTON_PIN 0 #define BATTERY_PIN 1 // A battery voltage measurement pin, voltage divider connected here to measure battery voltage #define ADC_CHANNEL ADC1_GPIO1_CHANNEL #define ADC_ATTENUATION ADC_ATTEN_DB_2_5 // lower dB for high resistance voltage divider -#define ADC_MULTIPLIER 4.9 +#define ADC_MULTIPLIER 4.9 * 1.045 #undef GPS_RX_PIN #undef GPS_TX_PIN @@ -43,12 +44,12 @@ #define PIN_GPS_RESET 35 #define PIN_GPS_PPS 36 -#define VGNSS_CTRL_V03 37 // Heltec Tracker needs this pulled low for GPS -#define PIN_GPS_EN VGNSS_CTRL_V03 +#define PIN_GPS_EN 37 // Heltec Tracker needs this pulled low for GPS #define GPS_EN_ACTIVE LOW #define GPS_RESET_MODE LOW #define GPS_UC6580 +#define GPS_BAUDRATE 115200 #define USE_SX1262 #define LORA_DIO0 -1 // a No connect on the SX1262 module @@ -68,4 +69,4 @@ #define SX126X_RESET LORA_RESET #define SX126X_DIO2_AS_RF_SWITCH -#define SX126X_DIO3_TCXO_VOLTAGE 1.8 +#define SX126X_DIO3_TCXO_VOLTAGE 1.8 \ No newline at end of file diff --git a/variants/heltec_wsl_v3/variant.h b/variants/heltec_wsl_v3/variant.h index d3a009ade..c103b9172 100644 --- a/variants/heltec_wsl_v3/variant.h +++ b/variants/heltec_wsl_v3/variant.h @@ -3,9 +3,8 @@ #define LED_PIN LED -#define HAS_SCREEN 0 - #define VEXT_ENABLE Vext // active low, powers the oled display and the lora antenna boost +#define VEXT_ON_VALUE LOW #define BUTTON_PIN 0 #define ADC_CTRL 37 @@ -13,7 +12,7 @@ #define BATTERY_PIN 1 // A battery voltage measurement pin, voltage divider connected here to measure battery voltage #define ADC_CHANNEL ADC1_GPIO1_CHANNEL #define ADC_ATTENUATION ADC_ATTEN_DB_2_5 // lower dB for high resistance voltage divider -#define ADC_MULTIPLIER 4.9 +#define ADC_MULTIPLIER 4.9 * 1.045 #define USE_SX1262 @@ -34,4 +33,4 @@ #define SX126X_RESET LORA_RESET #define SX126X_DIO2_AS_RF_SWITCH -#define SX126X_DIO3_TCXO_VOLTAGE 1.8 +#define SX126X_DIO3_TCXO_VOLTAGE 1.8 \ No newline at end of file diff --git a/variants/lora_isp4520/platformio.ini b/variants/lora_isp4520/platformio.ini deleted file mode 100644 index 9d6563515..000000000 --- a/variants/lora_isp4520/platformio.ini +++ /dev/null @@ -1,18 +0,0 @@ -[env:lora_isp4520] -extends = nrf52_base -board = lora_isp4520 -board_level = extra - -# add our variants files to the include and src paths -build_flags = ${nrf52_base.build_flags} -Ivariants/lora_isp4520 - -# No screen and GPS on the board. We still need RTC.cpp for the RTC clock. -build_src_filter = ${nrf52_base.build_src_filter} +<../variants/lora_isp4520> - - + + -lib_ignore = ${nrf52_base.lib_ignore} - ESP8266_SSD1306 - SparkFun Ublox Arduino Library - AXP202X_Library - TinyGPSPlus - -upload_protocol = jlink -monitor_port = /dev/ttyUSB0 \ No newline at end of file diff --git a/variants/lora_isp4520/variant.h b/variants/lora_isp4520/variant.h deleted file mode 100644 index 30b8fc169..000000000 --- a/variants/lora_isp4520/variant.h +++ /dev/null @@ -1,94 +0,0 @@ -/* - Copyright (c) 2014-2015 Arduino LLC. All right reserved. - Copyright (c) 2016 Sandeep Mistry All right reserved. - Copyright (c) 2018, Adafruit Industries (adafruit.com) - - This library is free software; you can redistribute it and/or - modify it under the terms of the GNU Lesser General Public - License as published by the Free Software Foundation; either - version 2.1 of the License, or (at your option) any later version. - This library is distributed in the hope that it will be useful, - but WITHOUT ANY WARRANTY; without even the implied warranty of - MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. - See the GNU Lesser General Public License for more details. - You should have received a copy of the GNU Lesser General Public - License along with this library; if not, write to the Free Software - Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA -*/ - -#ifndef _VARIANT_LORA_ISP4520_ -#define _VARIANT_LORA_ISP4520_ - -#define USE_SEGGER -/*---------------------------------------------------------------------------- - * Headers - *----------------------------------------------------------------------------*/ - -#include "WVariant.h" - -#define USE_LFXO - -// #define USE_SEGGER - -// Number of pins defined in PinDescription array -#define PINS_COUNT (16) -#define NUM_DIGITAL_PINS (16) -#define NUM_ANALOG_INPUTS (1) -#define NUM_ANALOG_OUTPUTS (1) - -/* - * SPI Interfaces - */ -#define SPI_INTERFACES_COUNT 1 - -// These are in arduino pin numbers, -// translation in g_ADigitalPinMap in variants.cpp -#define PIN_SPI_MISO (0) -#define PIN_SPI_MOSI (9) -#define PIN_SPI_SCK (2) - -/* - * Wire Interfaces (I2C) - */ -#define WIRE_INTERFACES_COUNT 0 - -// GPIOs the SX1262 is connected -#define USE_SX1262 -#define SX126X_CS 1 // aka SPI_NSS -#define SX126X_DIO1 (4) -#define SX126X_BUSY (5) -#define SX126X_RESET (6) - -/* - * Serial interfaces - */ -#define PIN_SERIAL_RX (10) -#define PIN_SERIAL_TX (11) -// LEDs -#define PIN_LED1 (12) -#define PIN_LED2 (13) -#define PIN_BUZZER (14) - -#define LED_BUILTIN PIN_LED1 -#define LED_CONN PIN_LED2 - -#define LED_RED PIN_LED1 -#define LED_BLUE PIN_LED2 - -#define LED_STATE_ON 1 // State when LED is litted - -/* - * Buttons - */ -#define PIN_BUTTON1 (15) -#define PIN_BUTTON2 (7) -#define PIN_BUTTON3 (8) - -// ADC pin and voltage divider -#define BATTERY_PIN 3 -#define ADC_MULTIPLIER 1.436 - -#define SX126X_DIO2_AS_RF_SWITCH -#define SX126X_DIO3_TCXO_VOLTAGE 1.8 // Not really an E22 but this board clones using DIO3 for tcxo control - -#endif diff --git a/variants/lora_relay_v1/platformio.ini b/variants/lora_relay_v1/platformio.ini deleted file mode 100644 index 77402aadc..000000000 --- a/variants/lora_relay_v1/platformio.ini +++ /dev/null @@ -1,23 +0,0 @@ -; The https://github.com/BigCorvus/SX1262-LoRa-BLE-Relay board by @BigCorvus -[env:lora-relay-v1] -extends = nrf52840_base -board = lora-relay-v1 -board_level = extra -# add our variants files to the include and src paths -# define build flags for the TFT_eSPI library -build_flags = ${nrf52840_base.build_flags} -Ivariants/lora_relay_v1 - -DUSER_SETUP_LOADED - -DTFT_WIDTH=80 - -DTFT_HEIGHT=160 - -DST7735_GREENTAB160x80 - -DST7735_DRIVER - -DTFT_CS=ST7735_CS - -DTFT_DC=ST7735_RS - -DTFT_RST=ST7735_RESET - -DSPI_FREQUENCY=27000000 - -L "${platformio.libdeps_dir}/${this.__env__}/BSEC2 Software Library/src/cortex-m4/fpv4-sp-d16-hard" -build_src_filter = ${nrf52_base.build_src_filter} +<../variants/lora_relay_v1> -lib_deps = - ${nrf52840_base.lib_deps} - sparkfun/SparkFun BQ27441 LiPo Fuel Gauge Arduino Library@^1.1.0 - bodmer/TFT_eSPI@^2.4.76 \ No newline at end of file diff --git a/variants/lora_relay_v1/variant.cpp b/variants/lora_relay_v1/variant.cpp deleted file mode 100644 index 891c8bb29..000000000 --- a/variants/lora_relay_v1/variant.cpp +++ /dev/null @@ -1,105 +0,0 @@ -/* - Copyright (c) 2014-2015 Arduino LLC. All right reserved. - Copyright (c) 2016 Sandeep Mistry All right reserved. - Copyright (c) 2018, Adafruit Industries (adafruit.com) - - This library is free software; you can redistribute it and/or - modify it under the terms of the GNU Lesser General Public - License as published by the Free Software Foundation; either - version 2.1 of the License, or (at your option) any later version. - - This library is distributed in the hope that it will be useful, - but WITHOUT ANY WARRANTY; without even the implied warranty of - MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. - See the GNU Lesser General Public License for more details. - - You should have received a copy of the GNU Lesser General Public - License along with this library; if not, write to the Free Software - Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA -*/ - -#include "variant.h" -#include "nrf.h" -#include "wiring_constants.h" -#include "wiring_digital.h" - -const uint32_t g_ADigitalPinMap[] = { - // D0 .. D13 - 25, // D0 is P0.25 (UART TX) - 24, // D1 is P0.24 (UART RX - 10, // D2 is P0.10 (NFC2) - 47, // D3 is P1.15 (LED1) - 42, // D4 is P1.10 (LED2) - 40, // D5 is P1.08 - 7, // D6 is P0.07 - 34, // D7 is P1.02 (Button) - 16, // D8 is P0.16 (NeoPixel) - 26, // D9 is P0.26 D_RS (IPS data/command control) - 27, // D10 is P0.27 - 6, // D11 is P0.06 D_RES (IPS display reset) - 8, // D12 is P0.08 D_CS (IPS display chip select) - 41, // D13 is P1.09 BLT (IPS display backlight) - 4, // D14 is P0.04 SX1262 RXEN - 5, // D15 is P0.05 BOOST_EN (5V buck converter enable for the the radio power) - - // D14 .. D21 (aka A0 .. A7) - 30, // D16 is P0.30 (A0) - 28, // D17 is P0.28 (A1) - 2, // D18 is P0.02 (A2) - 3, // D19 is P0.03 (A3) - 29, // D20 is P0.29 (A4, Battery) - 31, // D21 is P0.31 (A5, ARef) - - // D22 .. D23 (aka I2C pins) - 12, // D22 is P0.12 (SDA) - 11, // D23 is P0.11 (SCL) - - // D24 .. D26 (aka SPI pins) - 15, // D24 is P0.15 (SPI MISO) - 13, // D25 is P0.13 (SPI MOSI) - 14, // D26 is P0.14 (SPI SCK ) - - // QSPI pins (not exposed via any header / test point) - // 19, // P0.19 (QSPI CLK) - // 20, // P0.20 (QSPI CS) - // 17, // P0.17 (QSPI Data 0) - // 22, // P0.22 (QSPI Data 1) - // 23, // P0.23 (QSPI Data 2) - // 21, // P0.21 (QSPI Data 3) - - // The remaining NFC pin - 9, // D27 P0.09 (NFC1, exposed only via test point on bottom of board) - - // The following pins were never listed as they were considered unusable - // 0, // P0.00 is XL1 (attached to 32.768kHz crystal) Never expose as GPIOs - // 1, // P0.01 is XL2 (attached to 32.768kHz crystal) - 18, // D28 P0.18 is RESET (attached to switch) - // 32, // P1.00 is SWO (attached to debug header) - - // D29-D43 - 27, // D29 P0.27 E22-SX1262 DIO1 - 28, // D30 P0.28 E22-SX1262 DIO2 - 30, // D31 P0.30 E22-SX1262 TXEN - 35, // D32 P1.03 E22-SX1262 NSS - 32 + 8, // D33 P1.08 E22-SX1262 BUSY - 32 + 12, // D34 P1.12 E22-SX1262 RESET - 32 + 1, // P1.01 BTN_UP - 32 + 2, // P1.02 SWITCH - 32 + 14, // D37 P1.14 is not connected per schematic - 36, // P1.04 is not connected per schematic - 37, // P1.05 is not connected per schematic - 38, // P1.06 is not connected per schematic - 39, // P1.07 is not connected per schematic - 43, // P1.11 is not connected per schematic - 45, // P1.13 is not connected per schematic -}; - -void initVariant() -{ - // LED1 & LED2 - pinMode(PIN_LED1, OUTPUT); - ledOff(PIN_LED1); - - pinMode(PIN_LED2, OUTPUT); - ledOff(PIN_LED2); -} diff --git a/variants/lora_relay_v1/variant.h b/variants/lora_relay_v1/variant.h deleted file mode 100644 index 9cfb69337..000000000 --- a/variants/lora_relay_v1/variant.h +++ /dev/null @@ -1,157 +0,0 @@ -/* - Copyright (c) 2014-2015 Arduino LLC. All right reserved. - Copyright (c) 2016 Sandeep Mistry All right reserved. - Copyright (c) 2018, Adafruit Industries (adafruit.com) - - This library is free software; you can redistribute it and/or - modify it under the terms of the GNU Lesser General Public - License as published by the Free Software Foundation; either - version 2.1 of the License, or (at your option) any later version. - This library is distributed in the hope that it will be useful, - but WITHOUT ANY WARRANTY; without even the implied warranty of - MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. - See the GNU Lesser General Public License for more details. - You should have received a copy of the GNU Lesser General Public - License along with this library; if not, write to the Free Software - Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA -*/ - -#ifndef _VARIANT_LORA_RELAY_V1_ -#define _VARIANT_LORA_RELAY_V1_ - -/** Master clock frequency */ -#define VARIANT_MCK (64000000ul) - -#define USE_LFXO // Board uses 32khz crystal for LF -// define USE_LFRC // Board uses RC for LF - -/*---------------------------------------------------------------------------- - * Headers - *----------------------------------------------------------------------------*/ - -#include "WVariant.h" - -#ifdef __cplusplus -extern "C" { -#endif // __cplusplus - -// Number of pins defined in PinDescription array -#define PINS_COUNT (43) -#define NUM_DIGITAL_PINS (43) -#define NUM_ANALOG_INPUTS (6) // A6 is used for battery, A7 is analog reference -#define NUM_ANALOG_OUTPUTS (0) - -// LEDs -#define PIN_LED1 (3) -#define PIN_LED2 (4) -#define PIN_NEOPIXEL (8) - -#define LED_BUILTIN PIN_LED1 -#define LED_CONN PIN_LED2 - -#define LED_RED PIN_LED1 -#define LED_BLUE PIN_LED2 - -#define LED_STATE_ON 1 // State when LED is litted - -/* - * Buttons - */ -#define PIN_BUTTON1 (7) - -/* - * Analog pins - */ -#define PIN_A0 (16) -#define PIN_A1 (17) -#define PIN_A2 (18) -#define PIN_A3 (19) -#define PIN_A4 (20) -#define PIN_A5 (21) - -static const uint8_t A0 = PIN_A0; -static const uint8_t A1 = PIN_A1; -static const uint8_t A2 = PIN_A2; -static const uint8_t A3 = PIN_A3; -static const uint8_t A4 = PIN_A4; -static const uint8_t A5 = PIN_A5; -#define ADC_RESOLUTION 14 - -// Other pins -#define PIN_AREF PIN_A5 -#define PIN_VBAT PIN_A4 -#define BATTERY_PIN PIN_VBAT -#define PIN_NFC1 (33) -#define PIN_NFC2 (2) -#define PIN_PIEZO (37) -static const uint8_t AREF = PIN_AREF; - -/* - * Serial interfaces - */ -#define PIN_SERIAL1_RX (1) -#define PIN_SERIAL1_TX (0) - -/* - * SPI Interfaces - */ -#define SPI_INTERFACES_COUNT 1 - -#define PIN_SPI_MISO (24) -#define PIN_SPI_MOSI (25) -#define PIN_SPI_SCK (26) - -static const uint8_t SS = (5); -static const uint8_t MOSI = PIN_SPI_MOSI; -static const uint8_t MISO = PIN_SPI_MISO; -static const uint8_t SCK = PIN_SPI_SCK; - -/* - * Wire Interfaces - */ -#define WIRE_INTERFACES_COUNT 1 - -#define PIN_WIRE_SDA (22) -#define PIN_WIRE_SCL (23) - -// I2C device addresses -#define I2C_ADDR_BQ27441 0x55 // Battery gauge - -// SX1262 declaration -#define USE_SX1262 - -// CUSTOM GPIOs the SX1262 -#define SX126X_CS (32) - -// If you would prefer to get console debug output over the JTAG ICE connection rather than the CDC-ACM USB serial device, just -// define this. #define USE_SEGGER - -#define SX126X_DIO1 (29) -#define SX1262_DIO2 (30) -#define SX126X_BUSY (33) // Supposed to be P0.18 but because of reworks, now on P0.31 (18) -#define SX126X_RESET (34) -// #define SX126X_ANT_SW (32 + 10) -#define SX126X_RXEN (14) -#define SX126X_TXEN (31) -#define SX126X_POWER_EN \ - (15) // FIXME, see warning hre https://github.com/BigCorvus/SX1262-LoRa-BLE-Relay/blob/master/LORA_RELAY_NRF52840.ino -// Indicates this SX1262 is inside of an ebyte E22 module and special config should be done for that -#define SX126X_DIO3_TCXO_VOLTAGE 1.8 - -#define ST7735_RESET (11) // Output -#define ST7735_CS (12) -#define ST7735_BACKLIGHT_EN (13) -#define ST7735_RS (9) - -// #define LORA_DISABLE_SENDING // The board can brownout during lora TX if you don't have a battery connected. Disable sending -// to allow USB power only based debugging - -#ifdef __cplusplus -} -#endif - -/*---------------------------------------------------------------------------- - * Arduino objects - C++ only - *----------------------------------------------------------------------------*/ - -#endif diff --git a/variants/lora_relay_v2/platformio.ini b/variants/lora_relay_v2/platformio.ini deleted file mode 100644 index 4439d8a46..000000000 --- a/variants/lora_relay_v2/platformio.ini +++ /dev/null @@ -1,25 +0,0 @@ -; The https://github.com/BigCorvus/LoRa-BLE-Relay-v2 board by @BigCorvus -[env:lora-relay-v2] -extends = nrf52840_base -board = lora-relay-v2 -board_level = extra -# add our variants files to the include and src paths -# define build flags for the TFT_eSPI library -build_flags = ${nrf52840_base.build_flags} -Ivariants/lora_relay_v2 - -DUSER_SETUP_LOADED - -DTFT_WIDTH=80 - -DTFT_HEIGHT=160 - -DST7735_GREENTAB160x80 - -DST7735_DRIVER - -DTFT_CS=ST7735_CS - -DTFT_DC=ST7735_RS - -DTFT_RST=ST7735_RESET - -DSPI_FREQUENCY=27000000 - -DTFT_WR=ST7735_SDA - -DTFT_SCLK=ST7735_SCK - -L "${platformio.libdeps_dir}/${this.__env__}/BSEC2 Software Library/src/cortex-m4/fpv4-sp-d16-hard" -build_src_filter = ${nrf52_base.build_src_filter} +<../variants/lora_relay_v2> -lib_deps = - ${nrf52840_base.lib_deps} - sparkfun/SparkFun BQ27441 LiPo Fuel Gauge Arduino Library@^1.1.0 - bodmer/TFT_eSPI@^2.4.76 diff --git a/variants/lora_relay_v2/variant.cpp b/variants/lora_relay_v2/variant.cpp deleted file mode 100644 index 23d648873..000000000 --- a/variants/lora_relay_v2/variant.cpp +++ /dev/null @@ -1,105 +0,0 @@ -/* - Copyright (c) 2014-2015 Arduino LLC. All right reserved. - Copyright (c) 2016 Sandeep Mistry All right reserved. - Copyright (c) 2018, Adafruit Industries (adafruit.com) - - This library is free software; you can redistribute it and/or - modify it under the terms of the GNU Lesser General Public - License as published by the Free Software Foundation; either - version 2.1 of the License, or (at your option) any later version. - - This library is distributed in the hope that it will be useful, - but WITHOUT ANY WARRANTY; without even the implied warranty of - MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. - See the GNU Lesser General Public License for more details. - - You should have received a copy of the GNU Lesser General Public - License along with this library; if not, write to the Free Software - Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA -*/ - -#include "variant.h" -#include "nrf.h" -#include "wiring_constants.h" -#include "wiring_digital.h" - -const uint32_t g_ADigitalPinMap[] = { - // D0 .. D13 - 25, // D0 is P0.25 (UART TX) - 24, // D1 is P0.24 (UART RX - 10, // D2 is P0.10 (NFC2) - 47, // D3 is P1.15 (LED1) - (32 + 10), // D4 is P1.10 (LED2) - 40, // D5 is P1.08 - 7, // D6 is P0.07 - 34, // D7 is P1.02 (Switch) - 16, // D8 is P0.16 (NeoPixel) - 26, // D9 is P0.26 D_RS (IPS data/command control) - 27, // D10 is P0.27 - 6, // D11 is P0.06 D_RES (IPS display reset) - 8, // D12 is P0.08 D_CS (IPS display chip select) - 41, // D13 is P0.23 BLT (IPS display backlight) - 4, // D14 is P0.04 SX1262 RXEN - 5, // D15 is P0.05 BOOST_EN (5V buck converter enable for the the radio power) - - // D14 .. D21 (aka A0 .. A7) - 30, // D16 is P0.30 (A0) - 28, // D17 is P0.28 (A1) - 2, // D18 is P0.02 (A2) - 3, // D19 is P0.03 (A3) - 29, // D20 is P0.29 (A4, Battery) - 31, // D21 is P0.31 (A5, ARef) - - // D22 .. D23 (aka I2C pins) - 12, // D22 is P0.12 (SDA) - 11, // D23 is P0.11 (SCL) - - // D24 .. D26 (aka SPI pins) - 15, // D24 is P0.15 (SPI MISO) - 13, // D25 is P0.13 (SPI MOSI) - 14, // D26 is P0.14 (SPI SCK ) - - // QSPI pins (not exposed via any header / test point) - // 19, // P0.19 (QSPI CLK) - // 20, // P0.20 (QSPI CS) - // 17, // P0.17 (QSPI Data 0) - // 22, // P0.22 (QSPI Data 1) - // 23, // P0.23 (QSPI Data 2) - // 21, // P0.21 (QSPI Data 3) - - // The remaining NFC pin - 9, // D27 P0.09 (NFC1, exposed only via test point on bottom of board) - - // The following pins were never listed as they were considered unusable - // 0, // P0.00 is XL1 (attached to 32.768kHz crystal) Never expose as GPIOs - // 1, // P0.01 is XL2 (attached to 32.768kHz crystal) - 18, // D28 P0.18 is RESET (attached to switch) - // 32, // P1.00 is SWO (attached to debug header) - - // D29-D43 - 32 + 12, // D29 P0.27 E22-SX1262 DIO1 - 28, // D30 P0.28 E22-SX1262 DIO2 - 30, // D31 P0.30 E22-SX1262 TXEN - 35, // D32 P1.03 E22-SX1262 NSS - 32 + 8, // D33 P1.08 E22-SX1262 BUSY - 27, // D34 P0.27 E22-SX1262 RESET - 32 + 1, // D35 P1.01 BTN_UP - 32, // D36 P1.0 GPS power - 21, // D37 P0.21 disp_clk - 36, // P1.04 BTN_OK - 37, // D39 P0.19 disp_SDA - 38, // D40 P1.06 BUZZER - 39, // P1.07 is not connected per schematic - 43, // P1.11 is not connected per schematic - 45, // P1.13 is not connected per schematic -}; - -void initVariant() -{ - // LED1 & LED2 - pinMode(PIN_LED1, OUTPUT); - ledOff(PIN_LED1); - - pinMode(PIN_LED2, OUTPUT); - ledOff(PIN_LED2); -} diff --git a/variants/lora_relay_v2/variant.h b/variants/lora_relay_v2/variant.h deleted file mode 100644 index 3afe8620e..000000000 --- a/variants/lora_relay_v2/variant.h +++ /dev/null @@ -1,183 +0,0 @@ -/* - Copyright (c) 2014-2015 Arduino LLC. All right reserved. - Copyright (c) 2016 Sandeep Mistry All right reserved. - Copyright (c) 2018, Adafruit Industries (adafruit.com) - - This library is free software; you can redistribute it and/or - modify it under the terms of the GNU Lesser General Public - License as published by the Free Software Foundation; either - version 2.1 of the License, or (at your option) any later version. - This library is distributed in the hope that it will be useful, - but WITHOUT ANY WARRANTY; without even the implied warranty of - MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. - See the GNU Lesser General Public License for more details. - You should have received a copy of the GNU Lesser General Public - License along with this library; if not, write to the Free Software - Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA -*/ - -#ifndef _VARIANT_LORA_RELAY_V1_ -#define _VARIANT_LORA_RELAY_V1_ - -/** Master clock frequency */ -#define VARIANT_MCK (64000000ul) - -#define USE_LFXO // Board uses 32khz crystal for LF -// define USE_LFRC // Board uses RC for LF - -/* -kevinh todo - -ok leds -ok buttons -ok gps power -ok gps signal -ok? lcd -ok buzzer -serial flash -ok lora (inc boost en) - -mention dat1 and dat2 on sd card -use hardware spi controller for lcd - not bitbang - -*/ - -/*---------------------------------------------------------------------------- - * Headers - *----------------------------------------------------------------------------*/ - -#include "WVariant.h" - -#ifdef __cplusplus -extern "C" { -#endif // __cplusplus - -// Number of pins defined in PinDescription array -#define PINS_COUNT (43) -#define NUM_DIGITAL_PINS (43) -#define NUM_ANALOG_INPUTS (6) // A6 is used for battery, A7 is analog reference -#define NUM_ANALOG_OUTPUTS (0) - -// LEDs -#define PIN_LED1 (3) -#define PIN_LED2 (4) -#define PIN_NEOPIXEL (8) -#define PIN_BUZZER (40) - -#define LED_BUILTIN PIN_LED1 -#define LED_CONN PIN_LED2 - -#define LED_RED PIN_LED1 -#define LED_BLUE PIN_LED2 - -#define LED_STATE_ON 1 // State when LED is litted - -/* - * Buttons - */ -#define PIN_BUTTON1 (7) -#define PIN_BUTTON2 (35) -#define PIN_BUTTON3 (37) - -/* - * Analog pins - */ -#define PIN_A0 (16) -#define PIN_A1 (17) -#define PIN_A2 (18) -#define PIN_A3 (19) -#define PIN_A4 (20) -#define PIN_A5 (21) - -static const uint8_t A0 = PIN_A0; -static const uint8_t A1 = PIN_A1; -static const uint8_t A2 = PIN_A2; -static const uint8_t A3 = PIN_A3; -static const uint8_t A4 = PIN_A4; -static const uint8_t A5 = PIN_A5; -#define ADC_RESOLUTION 14 - -// Other pins -#define PIN_AREF PIN_A5 -#define PIN_VBAT PIN_A4 -#define BATTERY_PIN PIN_VBAT -#define PIN_NFC1 (33) -#define PIN_NFC2 (2) -#define PIN_PIEZO (37) -static const uint8_t AREF = PIN_AREF; - -/* - * Serial interfaces - */ -#define PIN_SERIAL1_RX (1) -#define PIN_SERIAL1_TX (0) - -/* - * SPI Interfaces - */ -#define SPI_INTERFACES_COUNT 1 - -#define PIN_SPI_MISO (24) -#define PIN_SPI_MOSI (25) -#define PIN_SPI_SCK (26) - -static const uint8_t SS = (5); -static const uint8_t MOSI = PIN_SPI_MOSI; -static const uint8_t MISO = PIN_SPI_MISO; -static const uint8_t SCK = PIN_SPI_SCK; - -/* - * Wire Interfaces - */ -#define WIRE_INTERFACES_COUNT 1 - -#define PIN_WIRE_SDA (22) -#define PIN_WIRE_SCL (23) - -// I2C device addresses -#define I2C_ADDR_BQ27441 0x55 // Battery gauge - -// SX1262 declaration -#define USE_SX1262 - -// CUSTOM GPIOs the SX1262 -#define SX126X_CS (32) - -// If you would prefer to get console debug output over the JTAG ICE connection rather than the CDC-ACM USB serial device, just -// define this. #define USE_SEGGER - -#define SX126X_DIO1 (29) -#define SX1262_DIO2 (30) -#define SX126X_BUSY (33) // Supposed to be P0.18 but because of reworks, now on P0.31 (18) -#define SX126X_RESET (34) -// #define SX126X_ANT_SW (32 + 10) -#define SX126X_RXEN (14) -#define SX126X_TXEN (31) -#define SX126X_POWER_EN \ - (15) // FIXME, see warning hre https://github.com/BigCorvus/SX1262-LoRa-BLE-Relay/blob/master/LORA_RELAY_NRF52840.ino -// Indicates this SX1262 is inside of an ebyte E22 module and special config should be done for that -#define SX126X_DIO3_TCXO_VOLTAGE 1.8 - -// ST7565 SPI -#define ST7735_RESET (11) // Output -#define ST7735_CS (12) -#define ST7735_BACKLIGHT_EN (13) -#define ST7735_RS (9) -#define ST7735_SDA (39) // actually spi MOSI -#define ST7735_SCK (37) // actually spi clk - -#define PIN_GPS_EN 36 // Just kill GPS power when we want it to sleep? FIXME -#define GPS_EN_ACTIVE 0 // GPS Power output is active low - -// #define LORA_DISABLE_SENDING // The board can brownout during lora TX if you don't have a battery connected. Disable sending -// to allow USB power only based debugging - -#ifdef __cplusplus -} -#endif - -/*---------------------------------------------------------------------------- - * Arduino objects - C++ only - *----------------------------------------------------------------------------*/ - -#endif diff --git a/variants/m5stack-stamp-c3/pins_arduino.h b/variants/m5stack-stamp-c3/pins_arduino.h index 38ef9934e..22d2af51d 100644 --- a/variants/m5stack-stamp-c3/pins_arduino.h +++ b/variants/m5stack-stamp-c3/pins_arduino.h @@ -3,14 +3,6 @@ #include -#define EXTERNAL_NUM_INTERRUPTS 22 -#define NUM_DIGITAL_PINS 22 -#define NUM_ANALOG_INPUTS 6 - -#define analogInputToDigitalPin(p) (((p) < NUM_ANALOG_INPUTS) ? (esp32_adc2gpio[(p)]) : -1) -#define digitalPinToInterrupt(p) (((p) < NUM_DIGITAL_PINS) ? (p) : -1) -#define digitalPinHasPWM(p) (p < EXTERNAL_NUM_INTERRUPTS) - static const uint8_t TX = -1; // 21; static const uint8_t RX = -1; // 20; diff --git a/variants/m5stack_core/pins_arduino.h b/variants/m5stack_core/pins_arduino.h index 8f2a0041e..cf807aab4 100644 --- a/variants/m5stack_core/pins_arduino.h +++ b/variants/m5stack_core/pins_arduino.h @@ -3,14 +3,6 @@ #include -#define EXTERNAL_NUM_INTERRUPTS 16 -#define NUM_DIGITAL_PINS 20 -#define NUM_ANALOG_INPUTS 16 - -#define analogInputToDigitalPin(p) (((p) < 20) ? (analogChannelToDigitalPin(p)) : -1) -#define digitalPinToInterrupt(p) (((p) < 40) ? (p) : -1) -#define digitalPinHasPWM(p) (p < 34) - static const uint8_t TX = 1; static const uint8_t RX = 3; diff --git a/variants/m5stack_core/platformio.ini b/variants/m5stack_core/platformio.ini index 84fb9f251..95f5aea9f 100644 --- a/variants/m5stack_core/platformio.ini +++ b/variants/m5stack_core/platformio.ini @@ -1,7 +1,6 @@ [env:m5stack-core] extends = esp32_base board = m5stack-core-esp32 -board_level = extra monitor_filters = esp32_exception_decoder build_src_filter = ${esp32_base.build_src_filter} @@ -26,4 +25,4 @@ lib_ignore = m5stack-core lib_deps = ${esp32_base.lib_deps} - lovyan03/LovyanGFX@^1.1.8 + lovyan03/LovyanGFX@^1.1.8 \ No newline at end of file diff --git a/variants/m5stack_coreink/pins_arduino.h b/variants/m5stack_coreink/pins_arduino.h index 7f9a14785..c75283ab2 100644 --- a/variants/m5stack_coreink/pins_arduino.h +++ b/variants/m5stack_coreink/pins_arduino.h @@ -3,14 +3,6 @@ #include -#define EXTERNAL_NUM_INTERRUPTS 16 -#define NUM_DIGITAL_PINS 40 -#define NUM_ANALOG_INPUTS 16 - -#define analogInputToDigitalPin(p) (((p) < 20) ? (esp32_adc2gpio[(p)]) : -1) -#define digitalPinToInterrupt(p) (((p) < 40) ? (p) : -1) -#define digitalPinHasPWM(p) (p < 34) - #define TX2 -1 #define RX2 -1 diff --git a/variants/m5stack_coreink/platformio.ini b/variants/m5stack_coreink/platformio.ini index ee6d340dc..c0c8bd30e 100644 --- a/variants/m5stack_coreink/platformio.ini +++ b/variants/m5stack_coreink/platformio.ini @@ -1,7 +1,7 @@ [env:m5stack-coreink] extends = esp32_base board = m5stack-coreink -board_level = extra +board_check = true build_src_filter = ${esp32_base.build_src_filter} build_flags = @@ -9,8 +9,9 @@ build_flags = ;-D RADIOLIB_VERBOSE -Ofast -D__MCUXPRESSO - -DEPD_HEIGHT=200 - -DEPD_WIDTH=200 + -DEINK_DISPLAY_MODEL=GxEPD2_154_M09 + -DEINK_WIDTH=200 + -DEINK_HEIGHT=200 -DUSER_SETUP_LOADED -DM5_COREINK -DM5STACK @@ -23,4 +24,4 @@ lib_ignore = monitor_filters = esp32_exception_decoder board_build.f_cpu = 240000000L upload_protocol = esptool -upload_port = /dev/ttyACM0 +upload_port = /dev/ttyACM0 \ No newline at end of file diff --git a/variants/m5stack_coreink/variant.h b/variants/m5stack_coreink/variant.h index f19da2696..ecd93b7be 100644 --- a/variants/m5stack_coreink/variant.h +++ b/variants/m5stack_coreink/variant.h @@ -10,7 +10,7 @@ // #define GPS_TX_PIN 32 (now used by SX1262 BUSY as GPS works with just RX) // Green LED -#define LED_INVERTED 0 +#define LED_STATE_ON 1 // State when LED is lit #define LED_PIN 10 #include "pcf8563.h" @@ -106,4 +106,4 @@ // GND // https://github.com/m5stack/M5Core-Ink/blob/master/examples/Basics/FactoryTest/FactoryTest.ino#L58 #define ADC_MULTIPLIER 5 -// https://embeddedexplorer.com/esp32-adc-esp-idf-tutorial/ +// https://embeddedexplorer.com/esp32-adc-esp-idf-tutorial/ \ No newline at end of file diff --git a/variants/monteops_hw1/platformio.ini b/variants/monteops_hw1/platformio.ini index f9d260e74..4b42dce39 100644 --- a/variants/monteops_hw1/platformio.ini +++ b/variants/monteops_hw1/platformio.ini @@ -1,9 +1,10 @@ ; MonteOps M.Node/M.Backbone/M.Eagle hardware based on hardware variant #1 (RAK4630 based) [env:monteops_hw1] +board_level = extra extends = nrf52840_base board = wiscore_rak4631 build_flags = ${nrf52840_base.build_flags} -Ivariants/monteops_hw1 -D MONTEOPS_HW1 - -L "${platformio.libdeps_dir}/${this.__env__}/BSEC2 Software Library/src/cortex-m4/fpv4-sp-d16-hard" + -L "${platformio.libdeps_dir}/${this.__env__}/bsec2/src/cortex-m4/fpv4-sp-d16-hard" build_src_filter = ${nrf52_base.build_src_filter} +<../variants/monteops_hw1> + + + lib_deps = ${nrf52840_base.lib_deps} diff --git a/variants/monteops_hw1/variant.h b/variants/monteops_hw1/variant.h index f7df0688b..97536b169 100644 --- a/variants/monteops_hw1/variant.h +++ b/variants/monteops_hw1/variant.h @@ -208,19 +208,10 @@ SO GPIO 39/TXEN MAY NOT BE DEFINED FOR SUCCESSFUL OPERATION OF THE SX1262 - TG // and has 12 bit resolution #define BATTERY_SENSE_RESOLUTION_BITS 12 #define BATTERY_SENSE_RESOLUTION 4096.0 -// Definition of milliVolt per LSB => 3.0V ADC range and 12-bit ADC resolution = 3000mV/4096 -#define VBAT_MV_PER_LSB (0.73242188F) -// Voltage divider value => 1.5M + 1M voltage divider on VBAT = (1.5M / (1M + 1.5M)) -#define VBAT_DIVIDER (0.4F) -// Compensation factor for the VBAT divider -#define VBAT_DIVIDER_COMP (1.73) -// Fixed calculation of milliVolt from compensation value -#define REAL_VBAT_MV_PER_LSB (VBAT_DIVIDER_COMP * VBAT_MV_PER_LSB) #undef AREF_VOLTAGE #define AREF_VOLTAGE 3.0 #define VBAT_AR_INTERNAL AR_INTERNAL_3_0 -#define ADC_MULTIPLIER VBAT_DIVIDER_COMP // REAL_VBAT_MV_PER_LSB -#define VBAT_RAW_TO_SCALED(x) (REAL_VBAT_MV_PER_LSB * x) +#define ADC_MULTIPLIER (1.73F) // #define HAS_RTC 1 @@ -239,4 +230,4 @@ SO GPIO 39/TXEN MAY NOT BE DEFINED FOR SUCCESSFUL OPERATION OF THE SX1262 - TG * Arduino objects - C++ only *----------------------------------------------------------------------------*/ -#endif +#endif \ No newline at end of file diff --git a/variants/my_esp32s3_diy_eink/pins_arduino.h b/variants/my_esp32s3_diy_eink/pins_arduino.h index 39e316624..b37a258c3 100644 --- a/variants/my_esp32s3_diy_eink/pins_arduino.h +++ b/variants/my_esp32s3_diy_eink/pins_arduino.h @@ -6,14 +6,6 @@ #define USB_VID 0x303a #define USB_PID 0x1001 -#define EXTERNAL_NUM_INTERRUPTS 46 -#define NUM_DIGITAL_PINS 48 -#define NUM_ANALOG_INPUTS 20 - -#define analogInputToDigitalPin(p) (((p) < 20) ? (analogChannelToDigitalPin(p)) : -1) -#define digitalPinToInterrupt(p) (((p) < 48) ? (p) : -1) -#define digitalPinHasPWM(p) (p < 46) - // The default Wire will be mapped to PMU and RTC static const uint8_t SDA = 18; static const uint8_t SCL = 17; diff --git a/variants/my_esp32s3_diy_eink/platformio.ini b/variants/my_esp32s3_diy_eink/platformio.ini index d3c55afda..e81f2c1ab 100644 --- a/variants/my_esp32s3_diy_eink/platformio.ini +++ b/variants/my_esp32s3_diy_eink/platformio.ini @@ -13,15 +13,15 @@ platform_packages = lib_deps = ${esp32_base.lib_deps} zinggjm/GxEPD2@^1.5.1 - adafruit/Adafruit NeoPixel@^1.10.7 + adafruit/Adafruit NeoPixel @ ^1.12.0 build_unflags = -DARDUINO_USB_MODE=1 build_flags = ;${esp32_base.build_flags} -D MY_ESP32S3_DIY -I variants/my_esp32s3_diy_eink ${esp32_base.build_flags} -D PRIVATE_HW -I variants/my_esp32s3_diy_eink -Dmy - -DTECHO_DISPLAY_MODEL=GxEPD2_290_T5D - -DEPD_HEIGHT=128 - -DEPD_WIDTH=296 + -DEINK_DISPLAY_MODEL=GxEPD2_290_T5D + -DEINK_WIDTH=296 + -DEINK_HEIGHT=128 -DBOARD_HAS_PSRAM -mfix-esp32-psram-cache-issue - -DARDUINO_USB_MODE=0 + -DARDUINO_USB_MODE=0 \ No newline at end of file diff --git a/variants/my_esp32s3_diy_eink/variant.h b/variants/my_esp32s3_diy_eink/variant.h index a5bebdacc..024f912dd 100644 --- a/variants/my_esp32s3_diy_eink/variant.h +++ b/variants/my_esp32s3_diy_eink/variant.h @@ -12,6 +12,10 @@ #define I2C_SCL 17 // 2 // #define LED_PIN 38 // This is a RGB LED not a standard LED +#define HAS_NEOPIXEL // Enable the use of neopixels +#define NEOPIXEL_COUNT 1 // How many neopixels are connected +#define NEOPIXEL_DATA 38 // gpio pin used to send data to the neopixels +#define NEOPIXEL_TYPE (NEO_GRB + NEO_KHZ800) // type of neopixels in use #define BUTTON_PIN 0 // This is the BOOT button #define BUTTON_NEED_PULLUP @@ -53,4 +57,4 @@ #define PIN_EINK_DC 1 #define PIN_EINK_RES (-1) #define PIN_EINK_SCLK 5 -#define PIN_EINK_MOSI 6 +#define PIN_EINK_MOSI 6 \ No newline at end of file diff --git a/variants/my_esp32s3_diy_oled/pins_arduino.h b/variants/my_esp32s3_diy_oled/pins_arduino.h index 39e316624..b37a258c3 100644 --- a/variants/my_esp32s3_diy_oled/pins_arduino.h +++ b/variants/my_esp32s3_diy_oled/pins_arduino.h @@ -6,14 +6,6 @@ #define USB_VID 0x303a #define USB_PID 0x1001 -#define EXTERNAL_NUM_INTERRUPTS 46 -#define NUM_DIGITAL_PINS 48 -#define NUM_ANALOG_INPUTS 20 - -#define analogInputToDigitalPin(p) (((p) < 20) ? (analogChannelToDigitalPin(p)) : -1) -#define digitalPinToInterrupt(p) (((p) < 48) ? (p) : -1) -#define digitalPinHasPWM(p) (p < 46) - // The default Wire will be mapped to PMU and RTC static const uint8_t SDA = 18; static const uint8_t SCL = 17; diff --git a/variants/my_esp32s3_diy_oled/platformio.ini b/variants/my_esp32s3_diy_oled/platformio.ini index 9b8b09f7f..2d7a5cd91 100644 --- a/variants/my_esp32s3_diy_oled/platformio.ini +++ b/variants/my_esp32s3_diy_oled/platformio.ini @@ -12,11 +12,11 @@ platform_packages = tool-esptoolpy@^1.40500.0 lib_deps = ${esp32_base.lib_deps} - adafruit/Adafruit NeoPixel@^1.10.7 + adafruit/Adafruit NeoPixel @ ^1.12.0 build_unflags = -DARDUINO_USB_MODE=1 build_flags = ;${esp32_base.build_flags} -D MY_ESP32S3_DIY -I variants/my_esp32s3_diy_oled ${esp32_base.build_flags} -D PRIVATE_HW -I variants/my_esp32s3_diy_oled -DBOARD_HAS_PSRAM -mfix-esp32-psram-cache-issue - -DARDUINO_USB_MODE=0 + -DARDUINO_USB_MODE=0 \ No newline at end of file diff --git a/variants/my_esp32s3_diy_oled/variant.h b/variants/my_esp32s3_diy_oled/variant.h index 6dd18c236..8a3a39003 100644 --- a/variants/my_esp32s3_diy_oled/variant.h +++ b/variants/my_esp32s3_diy_oled/variant.h @@ -12,6 +12,10 @@ #define I2C_SCL 17 // 2 // #define LED_PIN 38 // This is a RGB LED not a standard LED +#define HAS_NEOPIXEL // Enable the use of neopixels +#define NEOPIXEL_COUNT 1 // How many neopixels are connected +#define NEOPIXEL_DATA 38 // gpio pin used to send data to the neopixels +#define NEOPIXEL_TYPE (NEO_GRB + NEO_KHZ800) // type of neopixels in use #define BUTTON_PIN 0 // This is the BOOT button #define BUTTON_NEED_PULLUP @@ -53,4 +57,4 @@ // #define PIN_EINK_DC 1 // #define PIN_EINK_RES (-1) // #define PIN_EINK_SCLK 5 -// #define PIN_EINK_MOSI 6 +// #define PIN_EINK_MOSI 6 \ No newline at end of file diff --git a/variants/nano-g2-ultra/platformio.ini b/variants/nano-g2-ultra/platformio.ini index d5e5a6137..913b38e3f 100644 --- a/variants/nano-g2-ultra/platformio.ini +++ b/variants/nano-g2-ultra/platformio.ini @@ -5,10 +5,9 @@ board = nano-g2-ultra debug_tool = jlink build_flags = ${nrf52840_base.build_flags} -Ivariants/nano-g2-ultra -D NANO_G2_ULTRA - -L "${platformio.libdeps_dir}/${this.__env__}/BSEC2 Software Library/src/cortex-m4/fpv4-sp-d16-hard" + -L "${platformio.libdeps_dir}/${this.__env__}/bsec2/src/cortex-m4/fpv4-sp-d16-hard" build_src_filter = ${nrf52_base.build_src_filter} +<../variants/nano-g2-ultra> lib_deps = ${nrf52840_base.lib_deps} - adafruit/Adafruit BusIO@^1.13.2 lewisxhe/PCF8563_Library@^1.0.1 ;upload_protocol = fs diff --git a/variants/nano-g2-ultra/variant.h b/variants/nano-g2-ultra/variant.h index c328d2271..fd51cf9a1 100644 --- a/variants/nano-g2-ultra/variant.h +++ b/variants/nano-g2-ultra/variant.h @@ -54,7 +54,6 @@ extern "C" { #define LED_CONN PIN_GREEN #define LED_STATE_ON 0 // State when LED is lit -// #define LED_INVERTED 1 /* * Buttons @@ -165,19 +164,10 @@ External serial flash W25Q16JV_IQ // and has 12 bit resolution #define BATTERY_SENSE_RESOLUTION_BITS 12 #define BATTERY_SENSE_RESOLUTION 4096.0 -// Definition of milliVolt per LSB => 3.0V ADC range and 12-bit ADC resolution = 3000mV/4096 -#define VBAT_MV_PER_LSB (0.73242188F) -// Voltage divider value => 100K + 100K voltage divider on VBAT = (100K / (100K + 100K)) -#define VBAT_DIVIDER (0.5F) -// Compensation factor for the VBAT divider -#define VBAT_DIVIDER_COMP (2.0F) -// Fixed calculation of milliVolt from compensation value -#define REAL_VBAT_MV_PER_LSB (VBAT_DIVIDER_COMP * VBAT_MV_PER_LSB) #undef AREF_VOLTAGE #define AREF_VOLTAGE 3.0 #define VBAT_AR_INTERNAL AR_INTERNAL_3_0 -#define ADC_MULTIPLIER VBAT_DIVIDER_COMP -#define VBAT_RAW_TO_SCALED(x) (REAL_VBAT_MV_PER_LSB * x) +#define ADC_MULTIPLIER (2.0F) #define HAS_RTC 1 @@ -195,4 +185,4 @@ External serial flash W25Q16JV_IQ * Arduino objects - C++ only *----------------------------------------------------------------------------*/ -#endif +#endif \ No newline at end of file diff --git a/variants/pca10056-rc-clock/platformio.ini b/variants/pca10056-rc-clock/platformio.ini deleted file mode 100644 index 0467b1417..000000000 --- a/variants/pca10056-rc-clock/platformio.ini +++ /dev/null @@ -1,9 +0,0 @@ -; The NRF52840-dk development board, but @geeksville's board - which has a busted oscilliator -[env:nrf52840dk-geeksville] -board_level = extra -extends = nrf52840_base -board = nrf52840_dk_modified -# add our variants files to the include and src paths -build_flags = ${nrf52_base.build_flags} -Ivariants/pca10056-rc-clock - -L "${platformio.libdeps_dir}/${this.__env__}/BSEC2 Software Library/src/cortex-m4/fpv4-sp-d16-hard" -build_src_filter = ${nrf52_base.build_src_filter} +<../variants/pca10056-rc-clock> \ No newline at end of file diff --git a/variants/pca10056-rc-clock/variant.h b/variants/pca10056-rc-clock/variant.h deleted file mode 100644 index 032e1de2b..000000000 --- a/variants/pca10056-rc-clock/variant.h +++ /dev/null @@ -1,162 +0,0 @@ -/* - Copyright (c) 2014-2015 Arduino LLC. All right reserved. - Copyright (c) 2016 Sandeep Mistry All right reserved. - Copyright (c) 2018, Adafruit Industries (adafruit.com) - - This library is free software; you can redistribute it and/or - modify it under the terms of the GNU Lesser General Public - License as published by the Free Software Foundation; either - version 2.1 of the License, or (at your option) any later version. - This library is distributed in the hope that it will be useful, - but WITHOUT ANY WARRANTY; without even the implied warranty of - MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. - See the GNU Lesser General Public License for more details. - You should have received a copy of the GNU Lesser General Public - License along with this library; if not, write to the Free Software - Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA -*/ - -#ifndef _VARIANT_PCA10056_ -#define _VARIANT_PCA10056_ - -/** Master clock frequency */ -#define VARIANT_MCK (64000000ul) - -// This file is the same as the standard pac10056 variant, except that @geeksville broke the xtal on his devboard so -// he has to use a RC clock. - -// #define USE_LFXO // Board uses 32khz crystal for LF -#define USE_LFRC // Board uses RC for LF - -/*---------------------------------------------------------------------------- - * Headers - *----------------------------------------------------------------------------*/ - -#include "WVariant.h" - -#ifdef __cplusplus -extern "C" { -#endif // __cplusplus - -// Number of pins defined in PinDescription array -#define PINS_COUNT (48) -#define NUM_DIGITAL_PINS (48) -#define NUM_ANALOG_INPUTS (6) -#define NUM_ANALOG_OUTPUTS (0) - -// LEDs -#define PIN_LED1 (13) -#define PIN_LED2 (14) - -#define LED_BUILTIN PIN_LED1 -#define LED_CONN PIN_LED2 - -#define LED_RED PIN_LED1 -#define LED_BLUE PIN_LED2 - -#define LED_STATE_ON 0 // State when LED is litted - -/* - * Buttons - */ -#define PIN_BUTTON1 11 -#define PIN_BUTTON2 12 -#define PIN_BUTTON3 24 -#define PIN_BUTTON4 25 - -/* - * Analog pins - */ -#define PIN_A0 (3) -#define PIN_A1 (4) -#define PIN_A2 (28) -#define PIN_A3 (29) -#define PIN_A4 (30) -#define PIN_A5 (31) -#define PIN_A6 (0xff) -#define PIN_A7 (0xff) - -static const uint8_t A0 = PIN_A0; -static const uint8_t A1 = PIN_A1; -static const uint8_t A2 = PIN_A2; -static const uint8_t A3 = PIN_A3; -static const uint8_t A4 = PIN_A4; -static const uint8_t A5 = PIN_A5; -static const uint8_t A6 = PIN_A6; -static const uint8_t A7 = PIN_A7; -#define ADC_RESOLUTION 14 - -// Other pins -#define PIN_AREF (2) -#define PIN_NFC1 (9) -#define PIN_NFC2 (10) - -static const uint8_t AREF = PIN_AREF; - -/* - * Serial interfaces - */ - -// Arduino Header D0, D1 -#define PIN_SERIAL1_RX (33) // P1.01 -#define PIN_SERIAL1_TX (34) // P1.02 - -// Connected to Jlink CDC -#define PIN_SERIAL2_RX (8) -#define PIN_SERIAL2_TX (6) - -/* - * SPI Interfaces - */ -#define SPI_INTERFACES_COUNT 1 - -#define PIN_SPI_MISO (46) -#define PIN_SPI_MOSI (45) -#define PIN_SPI_SCK (47) - -static const uint8_t SS = 44; -static const uint8_t MOSI = PIN_SPI_MOSI; -static const uint8_t MISO = PIN_SPI_MISO; -static const uint8_t SCK = PIN_SPI_SCK; - -/* - * Wire Interfaces - */ -#define WIRE_INTERFACES_COUNT 1 - -#define PIN_WIRE_SDA (26) -#define PIN_WIRE_SCL (27) - -// QSPI Pins -#define PIN_QSPI_SCK 19 -#define PIN_QSPI_CS 17 -#define PIN_QSPI_IO0 20 -#define PIN_QSPI_IO1 21 -#define PIN_QSPI_IO2 22 -#define PIN_QSPI_IO3 23 - -// On-board QSPI Flash -#define EXTERNAL_FLASH_DEVICES MX25R6435F -#define EXTERNAL_FLASH_USE_QSPI - -// CUSTOM GPIOs the SX1262MB2CAS shield when installed on the NRF52840-DK development board -#define USE_SX1262 -#define SX126X_CS (32 + 8) // P1.08 -#define SX126X_DIO1 (32 + 6) // P1.06 -#define SX126X_BUSY (32 + 4) // P1.04 -#define SX126X_RESET (0 + 3) // P0.03 -#define SX126X_ANT_SW (32 + 10) // P1.10 -#define SX126X_DIO2_AS_RF_SWITCH - -// To debug via the segger JLINK console rather than the CDC-ACM serial device -// #define USE_SEGGER - -#ifdef __cplusplus -} -#endif - -/*---------------------------------------------------------------------------- - * Arduino objects - C++ only - *----------------------------------------------------------------------------*/ - -#endif diff --git a/variants/picomputer-s3/pins_arduino.h b/variants/picomputer-s3/pins_arduino.h index c84601b1e..a3d40018c 100644 --- a/variants/picomputer-s3/pins_arduino.h +++ b/variants/picomputer-s3/pins_arduino.h @@ -6,14 +6,6 @@ #define USB_VID 0x303a #define USB_PID 0x1001 -#define EXTERNAL_NUM_INTERRUPTS 46 -#define NUM_DIGITAL_PINS 48 -#define NUM_ANALOG_INPUTS 20 - -#define analogInputToDigitalPin(p) (((p) < 20) ? (analogChannelToDigitalPin(p)) : -1) -#define digitalPinToInterrupt(p) (((p) < 48) ? (p) : -1) -#define digitalPinHasPWM(p) (p < 46) - static const uint8_t TX = 43; static const uint8_t RX = 44; diff --git a/variants/picomputer-s3/variant.h b/variants/picomputer-s3/variant.h index fc746c599..ff8faa6f4 100644 --- a/variants/picomputer-s3/variant.h +++ b/variants/picomputer-s3/variant.h @@ -37,7 +37,7 @@ #define ST7789_MISO -1 #define ST7789_BUSY -1 #define ST7789_SPI_HOST SPI3_HOST -#define ST7789_BACKLIGHT_EN 5 +#define TFT_BL 5 #define SPI_FREQUENCY 40000000 #define SPI_READ_FREQUENCY 16000000 #define TFT_HEIGHT 320 diff --git a/variants/portduino/platformio.ini b/variants/portduino/platformio.ini index d37c6be21..46417e388 100644 --- a/variants/portduino/platformio.ini +++ b/variants/portduino/platformio.ini @@ -1,6 +1,10 @@ [env:native] extends = portduino_base -build_flags = ${portduino_base.build_flags} -O0 -I variants/portduino +; The pkg-config commands below optionally add link flags. +; the || : is just a "or run the null command" to avoid returning an error code +build_flags = ${portduino_base.build_flags} -O0 -I variants/portduino -I /usr/include + !pkg-config --libs libulfius --silence-errors || : + !pkg-config --libs openssl --silence-errors || : board = cross_platform lib_deps = ${portduino_base.lib_deps} -build_src_filter = ${portduino_base.build_src_filter} \ No newline at end of file +build_src_filter = ${portduino_base.build_src_filter} diff --git a/variants/portduino/variant.h b/variants/portduino/variant.h index f47b58afc..b7b39d6e8 100644 --- a/variants/portduino/variant.h +++ b/variants/portduino/variant.h @@ -1,3 +1,5 @@ #define HAS_SCREEN 1 #define CANNED_MESSAGE_MODULE_ENABLE 1 #define HAS_GPS 1 +#define MAX_RX_TOPHONE settingsMap[maxtophone] +#define MAX_NUM_NODES settingsMap[maxnodes] \ No newline at end of file diff --git a/variants/ppr/platformio.ini b/variants/ppr/platformio.ini deleted file mode 100644 index 22273ce8e..000000000 --- a/variants/ppr/platformio.ini +++ /dev/null @@ -1,8 +0,0 @@ -; The PPR board -[env:ppr] -extends = nrf52_base -board = ppr -board_level = extra -lib_deps = - ${arduino_base.lib_deps} - industruino/UC1701@^1.1.0 \ No newline at end of file diff --git a/variants/ppr/variant.h b/variants/ppr/variant.h deleted file mode 100644 index 4c6cc015c..000000000 --- a/variants/ppr/variant.h +++ /dev/null @@ -1,159 +0,0 @@ -/* - Copyright (c) 2014-2015 Arduino LLC. All right reserved. - Copyright (c) 2016 Sandeep Mistry All right reserved. - Copyright (c) 2018, Adafruit Industries (adafruit.com) - - This library is free software; you can redistribute it and/or - modify it under the terms of the GNU Lesser General Public - License as published by the Free Software Foundation; either - version 2.1 of the License, or (at your option) any later version. - This library is distributed in the hope that it will be useful, - but WITHOUT ANY WARRANTY; without even the implied warranty of - MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. - See the GNU Lesser General Public License for more details. - You should have received a copy of the GNU Lesser General Public - License along with this library; if not, write to the Free Software - Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA -*/ - -#pragma once - -/** Master clock frequency */ -#define VARIANT_MCK (64000000ul) - -// This board does not have a 32khz crystal -// #define USE_LFXO // Board uses 32khz crystal for LF -#define USE_LFRC // Board uses RC for LF - -/*---------------------------------------------------------------------------- - * Headers - *----------------------------------------------------------------------------*/ - -#include "WVariant.h" - -#ifdef __cplusplus -extern "C" { -#endif // __cplusplus - -// Number of pins defined in PinDescription array -#define PINS_COUNT (46) -#define NUM_DIGITAL_PINS (46) -#define NUM_ANALOG_INPUTS (0) -#define NUM_ANALOG_OUTPUTS (0) - -// LEDs -#define PIN_LED1 (0) -#define PIN_LED2 (1) - -#define LED_BUILTIN PIN_LED1 -#define LED_CONN PIN_LED2 - -#define LED_RED PIN_LED1 -#define LED_GREEN PIN_LED2 - -// FIXME, bluefruit automatically blinks this led while connected. call AdafruitBluefruit::autoConnLed to change this. -#define LED_BLUE LED_GREEN - -#define LED_STATE_ON 1 // State when LED is litted - -/* - * Buttons - */ -#define PIN_BUTTON1 4 // center -#define PIN_BUTTON2 2 -#define PIN_BUTTON3 3 -#define PIN_BUTTON4 5 -#define PIN_BUTTON5 6 - -/* - * Analog pins - */ -#define PIN_A0 (0xff) -#define PIN_A1 (0xff) -#define PIN_A2 (0xff) -#define PIN_A3 (0xff) -#define PIN_A4 (0xff) -#define PIN_A5 (0xff) -#define PIN_A6 (0xff) -#define PIN_A7 (0xff) - -static const uint8_t A0 = PIN_A0; -static const uint8_t A1 = PIN_A1; -static const uint8_t A2 = PIN_A2; -static const uint8_t A3 = PIN_A3; -static const uint8_t A4 = PIN_A4; -static const uint8_t A5 = PIN_A5; -static const uint8_t A6 = PIN_A6; -static const uint8_t A7 = PIN_A7; -#define ADC_RESOLUTION 14 - -// Other pins -#define PIN_AREF (0xff) -// #define PIN_NFC1 (9) -// #define PIN_NFC2 (10) - -static const uint8_t AREF = PIN_AREF; - -/* - * Serial interfaces - */ - -// GPS is on Serial1 -#define PIN_SERIAL1_RX (8) -#define PIN_SERIAL1_TX (9) - -// Connected to Jlink CDC -// #define PIN_SERIAL2_RX (8) -// #define PIN_SERIAL2_TX (6) - -/* - * SPI Interfaces - */ -#define SPI_INTERFACES_COUNT 1 - -#define PIN_SPI_MISO (15) -#define PIN_SPI_MOSI (13) -#define PIN_SPI_SCK (12) - -// static const uint8_t SS = 44; -static const uint8_t MOSI = PIN_SPI_MOSI; -static const uint8_t MISO = PIN_SPI_MISO; -static const uint8_t SCK = PIN_SPI_SCK; - -/* - * Wire Interfaces - */ -#define WIRE_INTERFACES_COUNT 1 - -#define PIN_WIRE_SDA (32 + 2) -#define PIN_WIRE_SCL (32) - -// CUSTOM GPIOs the SX1262 -#define USE_SX1262 -#define SX126X_CS (10) -#define SX126X_DIO1 (20) -#define SX1262_DIO2 (26) -#define SX126X_BUSY (31) // Supposed to be P0.18 but because of reworks, now on P0.31 (18) -#define SX126X_RESET (17) -// #define SX126X_ANT_SW (32 + 10) -#define SX126X_RXEN (22) -#define SX126X_TXEN (24) -// Indicates this SX1262 is inside of an ebyte E22 module and special config should be done for that -#define SX126X_DIO3_TCXO_VOLTAGE 1.8 - -// ERC12864-10 LCD -#define ERC12864_CS (32 + 4) -#define ERC12864_RESET (32 + 6) -#define ERC12864_CD (32 + 9) - -// L80 GPS -#define L80_PPS (28) -#define L80_RESET (29) - -#ifdef __cplusplus -} -#endif - -/*---------------------------------------------------------------------------- - * Arduino objects - C++ only - *----------------------------------------------------------------------------*/ diff --git a/variants/ppr1/platformio.ini b/variants/ppr1/platformio.ini deleted file mode 100644 index f6c2a5e0b..000000000 --- a/variants/ppr1/platformio.ini +++ /dev/null @@ -1,9 +0,0 @@ -; The PPR board -[env:ppr1] -extends = nrf52_base -board = ppr1 -board_level = extra -build_flags = ${nrf52_base.build_flags} -Ivariants/ppr1 -build_src_filter = ${nrf52_base.build_src_filter} +<../variants/ppr1> -lib_deps = - ${arduino_base.lib_deps} \ No newline at end of file diff --git a/variants/ppr1/variant.h b/variants/ppr1/variant.h deleted file mode 100644 index ba3a25c2a..000000000 --- a/variants/ppr1/variant.h +++ /dev/null @@ -1,179 +0,0 @@ -/* - Copyright (c) 2014-2015 Arduino LLC. All right reserved. - Copyright (c) 2016 Sandeep Mistry All right reserved. - Copyright (c) 2018, Adafruit Industries (adafruit.com) - - This library is free software; you can redistribute it and/or - modify it under the terms of the GNU Lesser General Public - License as published by the Free Software Foundation; either - version 2.1 of the License, or (at your option) any later version. - This library is distributed in the hope that it will be useful, - but WITHOUT ANY WARRANTY; without even the implied warranty of - MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. - See the GNU Lesser General Public License for more details. - You should have received a copy of the GNU Lesser General Public - License along with this library; if not, write to the Free Software - Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA -*/ - -#pragma once - -/** Master clock frequency */ -#define VARIANT_MCK (64000000ul) - -// This board does have a 32khz crystal -#define USE_LFXO // Board uses 32khz crystal for LF -// #define USE_LFRC // Board uses RC for LF - -/*---------------------------------------------------------------------------- - * Headers - *----------------------------------------------------------------------------*/ - -#include "WVariant.h" - -#ifdef __cplusplus -extern "C" { -#endif // __cplusplus - -// Number of pins defined in PinDescription array -#define PINS_COUNT (46) -#define NUM_DIGITAL_PINS (46) -#define NUM_ANALOG_INPUTS (0) -#define NUM_ANALOG_OUTPUTS (0) - -// LEDs -#define PIN_LED1 (25) -#define PIN_LED2 (11) - -#define LED_BUILTIN PIN_LED1 -#define LED_CONN PIN_LED2 - -#define LED_RED PIN_LED1 -#define LED_GREEN PIN_LED2 - -// FIXME, bluefruit automatically blinks this led while connected. call AdafruitBluefruit::autoConnLed to change this. -#define LED_BLUE LED_GREEN - -#define LED_STATE_ON 1 // State when LED is litted - -/* - * Buttons - */ -#define PIN_BUTTON1 4 // up -#define PIN_BUTTON2 2 // left -#define PIN_BUTTON3 3 // center -#define PIN_BUTTON4 5 // right -#define PIN_BUTTON5 6 // down - -/* - * Analog pins - */ -#define PIN_A0 (0xff) -#define PIN_A1 (0xff) -#define PIN_A2 (0xff) -#define PIN_A3 (0xff) -#define PIN_A4 (0xff) -#define PIN_A5 (0xff) -#define PIN_A6 (0xff) -#define PIN_A7 (0xff) - -static const uint8_t A0 = PIN_A0; -static const uint8_t A1 = PIN_A1; -static const uint8_t A2 = PIN_A2; -static const uint8_t A3 = PIN_A3; -static const uint8_t A4 = PIN_A4; -static const uint8_t A5 = PIN_A5; -static const uint8_t A6 = PIN_A6; -static const uint8_t A7 = PIN_A7; -#define ADC_RESOLUTION 14 - -// Other pins -#define PIN_AREF (0xff) -// #define PIN_NFC1 (9) -// #define PIN_NFC2 (10) - -static const uint8_t AREF = PIN_AREF; - -/* - * Serial interfaces - */ - -// GPS is on Serial1 -#define PIN_SERIAL1_RX (8) -#define PIN_SERIAL1_TX (9) - -// We intentionally leave this undefined so we don't even try to make a Ublox driver -// #define GPS_TX_PIN PIN_SERIAL1_TX -// #define GPS_RX_PIN PIN_SERIAL1_RX - -#define PIN_GPS_RESET 29 // active high -#define PIN_GPS_PPS 28 -// #define PIN_GPS_WAKE 20 // CELL_CTRL in schematic? based on their example code -#define PIN_GPS_EN 7 // GPS_EN active high - -// #define PIN_VUSB_EN 21 - -// LCD - -#define PIN_LCD_RESET 23 // active low, pulse low for 20ms at boot -#define USE_ST7567 - -/// Charge controller I2C address -#define BQ25703A_ADDR 0x6b - -// Define if screen should be mirrored left to right -#define SCREEN_MIRROR - -// LCD screens are slow, so slowdown the wipe so it looks better -#define SCREEN_TRANSITION_FRAMERATE 10 // fps - -/* - * SPI Interfaces - */ -#define SPI_INTERFACES_COUNT 1 - -#define PIN_SPI_MISO (15) -#define PIN_SPI_MOSI (13) -#define PIN_SPI_SCK (12) - -// static const uint8_t SS = 44; -static const uint8_t MOSI = PIN_SPI_MOSI; -static const uint8_t MISO = PIN_SPI_MISO; -static const uint8_t SCK = PIN_SPI_SCK; - -/* - * Wire Interfaces - */ -#define WIRE_INTERFACES_COUNT 1 - -#define PIN_WIRE_SDA (32 + 2) -#define PIN_WIRE_SCL (32) - -// CUSTOM GPIOs the SX1262 -#define USE_SX1262 -#define SX126X_CS (0 + 10) // FIXME - we really should define LORA_CS instead -#define SX126X_DIO1 (0 + 20) -#define SX1262_DIO2 (0 + 26) -#define SX126X_BUSY (0 + 19) -#define SX126X_RESET (0 + 17) -#define SX126X_TXEN (0 + 24) -#define SX126X_RXEN (0 + 22) -// Not really an E22 but this board clones using DIO3 for tcxo control -#define SX126X_DIO3_TCXO_VOLTAGE 1.8 - -// FIXME, to prevent burning out parts I've set the power level super low, because I don't have -// an antenna wired up -#define SX126X_MAX_POWER 1 - -#define LORA_DISABLE_SENDING // Define this to disable transmission for testing (power testing etc...) - -// To debug via the segger JLINK console rather than the CDC-ACM serial device -// #define USE_SEGGER - -#ifdef __cplusplus -} -#endif - -/*---------------------------------------------------------------------------- - * Arduino objects - C++ only - *----------------------------------------------------------------------------*/ diff --git a/variants/radiomaster_900_bandit/platformio.ini b/variants/radiomaster_900_bandit/platformio.ini new file mode 100644 index 000000000..4ff8a6ea2 --- /dev/null +++ b/variants/radiomaster_900_bandit/platformio.ini @@ -0,0 +1,14 @@ +[env:radiomaster_900_bandit] +extends = esp32_base +board = esp32doit-devkit-v1 +build_flags = + ${esp32_base.build_flags} + -DRADIOMASTER_900_BANDIT + -DVTABLES_IN_FLASH=1 + -DCONFIG_DISABLE_HAL_LOCKS=1 + -O2 + -Ivariants/radiomaster_900_bandit +board_build.f_cpu = 240000000L +upload_protocol = esptool +lib_deps = + ${esp32_base.lib_deps} \ No newline at end of file diff --git a/variants/radiomaster_900_bandit/variant.h b/variants/radiomaster_900_bandit/variant.h new file mode 100644 index 000000000..0c7417cac --- /dev/null +++ b/variants/radiomaster_900_bandit/variant.h @@ -0,0 +1,126 @@ +/* + Initial settings and work by https://github.com/gjelsoe + Unit provided by Radio Master RC + https://radiomasterrc.com/products/bandit-expresslrs-rf-module with 1.29" OLED display CH1115 driver +*/ + +/* + On this model then screen is NOT upside down, don't flip it for the user. +*/ +#undef DISPLAY_FLIP_SCREEN + +/* + I2C SDA and SCL. + 0x18 - STK8XXX Accelerometer + 0x3C - SH1115 Display Driver +*/ +#define I2C_SDA 14 +#define I2C_SCL 12 + +/* + I2C STK8XXX Accelerometer Interrupt PIN to ESP32 Pin 6 - SENSOR_CAPP (GPIO37) +*/ +#define STK8XXX_INT 37 + +/* + No GPS - but free pins are available. +*/ +#define HAS_GPS 0 +#undef GPS_RX_PIN +#undef GPS_TX_PIN + +/* + Pin connections from ESP32-D0WDQ6 to SX1276. +*/ +#define LORA_DIO0 22 +#define LORA_DIO1 21 +#define LORA_SCK 18 +#define LORA_MISO 19 +#define LORA_MOSI 23 +#define LORA_CS 4 +#define LORA_RESET 5 +#define LORA_TXEN 33 + +/* + This unit has a FAN built-in. + FAN is active at 250mW on it's ExpressLRS Firmware. + This FAN has TACHO signal on Pin 27 for use with PWM. +*/ +#define RF95_FAN_EN 2 + +/* + LED PIN setup and it has a NeoPixel LED. + It's possible to setup colors for Button 1 and 2, + look at BUTTON1_COLOR, BUTTON1_COLOR_INDEX, BUTTON2_COLOR and BUTTON2_COLOR_INDEX + this is done here for now. +*/ +#define HAS_NEOPIXEL // Enable the use of neopixels +#define NEOPIXEL_COUNT 6 // How many neopixels are connected +#define NEOPIXEL_DATA 15 // GPIO pin used to send data to the neopixels +#define NEOPIXEL_TYPE (NEO_GRB + NEO_KHZ800) // Type of neopixels in use +#define ENABLE_AMBIENTLIGHTING // Turn on Ambient Lighting +// #define BUTTON1_COLOR 0xFF0000 // Background light for Button 1 in HEX RGB Color (RadioMaster Bandit only). +// #define BUTTON1_COLOR_INDEX 0 // NeoPixel Index ID for Button 1 +// #define BUTTON2_COLOR 0x0000FF // Background light for Button 2 in HEX RGB Color (RadioMaster Bandit only). +// #define BUTTON2_COLOR_INDEX 1 // NeoPixel Index ID for Button 2 + +/* + It has 1 x five-way and 2 x normal buttons. + + Button GPIO RGB Index + --------------------------- + Five-way 39 - + Button 1 34 0 + Button 2 35 1 + + Five way button when using ADC. + 2.632V, 2.177V, 1.598V, 1.055V, 0V + + ADC Values: + { UP, DOWN, LEFT, RIGHT, ENTER, IDLE } + 3227, 0 ,1961, 2668, 1290, 4095 + + Five way button when using ADC. + https://github.com/ExpressLRS/targets/blob/f3215b5ec891108db1a13523e4163950cfcadaac/TX/Radiomaster%20Bandit.json#L41 + +*/ +#define INPUTBROKER_EXPRESSLRSFIVEWAY_TYPE +#define PIN_JOYSTICK 39 +#define JOYSTICK_ADC_VALS /*UP*/ 3227, /*DOWN*/ 0, /*LEFT*/ 1961, /*RIGHT*/ 2668, /*OK*/ 1290, /*IDLE*/ 4095 + +/* + Normal Button Pin setup. +*/ +#define BUTTON_PIN 34 +#define BUTTON_NEED_PULLUP + +/* + No External notification. +*/ +#undef EXT_NOTIFY_OUT + +/* + Remapping PIN Names. + Note, that this unit uses RFO +*/ +#define USE_RF95 +#define USE_RF95_RFO +#define RF95_CS LORA_CS +#define RF95_DIO1 LORA_DIO1 +#define RF95_TXEN LORA_TXEN +#define RF95_RESET LORA_RESET +#define RF95_MAX_POWER 10 + +/* + This module has Skyworks SKY66122 controlled by dacWrite + power ranging from 100mW to 1000mW. + + Mapping of PA_LEVEL to Power output: GPIO26/dacWrite + 168 -> 100mW + 155 -> 250mW + 142 -> 500mW + 110 -> 1000mW +*/ +#define RF95_PA_EN 26 +#define RF95_PA_DAC_EN +#define RF95_PA_LEVEL 110 \ No newline at end of file diff --git a/variants/radiomaster_900_bandit_micro/platformio.ini b/variants/radiomaster_900_bandit_micro/platformio.ini new file mode 100644 index 000000000..9e54f5859 --- /dev/null +++ b/variants/radiomaster_900_bandit_micro/platformio.ini @@ -0,0 +1,19 @@ +; +; This uses the same code and settings as the Radio Master Bandit Nano (https://www.radiomasterrc.com/products/bandit-nano-expresslrs-rf-module) +; +; Link to the unit : https://www.radiomasterrc.com/products/bandit-micro-expresslrs-rf-module +; +[env:radiomaster_900_bandit_micro] +extends = esp32_base +board = esp32doit-devkit-v1 +build_flags = + ${esp32_base.build_flags} + -DRADIOMASTER_900_BANDIT_NANO + -DVTABLES_IN_FLASH=1 + -DCONFIG_DISABLE_HAL_LOCKS=1 + -O2 + -Ivariants/radiomaster_900_bandit_nano +board_build.f_cpu = 240000000L +upload_protocol = esptool +lib_deps = + ${esp32_base.lib_deps} \ No newline at end of file diff --git a/variants/radiomaster_900_bandit_nano/platformio.ini b/variants/radiomaster_900_bandit_nano/platformio.ini new file mode 100644 index 000000000..0d43b8665 --- /dev/null +++ b/variants/radiomaster_900_bandit_nano/platformio.ini @@ -0,0 +1,14 @@ +[env:radiomaster_900_bandit_nano] +extends = esp32_base +board = esp32doit-devkit-v1 +build_flags = + ${esp32_base.build_flags} + -DRADIOMASTER_900_BANDIT_NANO + -DVTABLES_IN_FLASH=1 + -DCONFIG_DISABLE_HAL_LOCKS=1 + -O2 + -Ivariants/radiomaster_900_bandit_nano +board_build.f_cpu = 240000000L +upload_protocol = esptool +lib_deps = + ${esp32_base.lib_deps} \ No newline at end of file diff --git a/variants/radiomaster_900_bandit_nano/variant.h b/variants/radiomaster_900_bandit_nano/variant.h new file mode 100644 index 000000000..1b6bba126 --- /dev/null +++ b/variants/radiomaster_900_bandit_nano/variant.h @@ -0,0 +1,81 @@ +/* + Initial settings and work by https://github.com/uberhalit and re-work by https://github.com/gjelsoe + Unit provided by Radio Master RC + https://radiomasterrc.com/products/bandit-nano-expresslrs-rf-module with 0.96" OLED display +*/ + +/* + I2C SDA and SCL. +*/ +#define I2C_SDA 14 +#define I2C_SCL 12 + +/* + No GPS - but free solder pads are available inside the case. +*/ +#undef GPS_RX_PIN +#undef GPS_TX_PIN + +/* + Pin connections from ESP32-D0WDQ6 to SX1276. +*/ +#define LORA_DIO0 22 +#define LORA_DIO1 21 +#define LORA_SCK 18 +#define LORA_MISO 19 +#define LORA_MOSI 23 +#define LORA_CS 4 +#define LORA_RESET 5 +#define LORA_TXEN 33 + +/* + This unit has a FAN built-in. + FAN is active at 250mW on it's ExpressLRS Firmware. +*/ +#define RF95_FAN_EN 2 + +/* + LED PIN setup. +*/ +#define LED_PIN 15 + +/* + Five way button when using ADC. + https://github.com/ExpressLRS/targets/blob/f3215b5ec891108db1a13523e4163950cfcadaac/TX/Radiomaster%20Bandit.json#L41 +*/ +#define INPUTBROKER_EXPRESSLRSFIVEWAY_TYPE +#define PIN_JOYSTICK 39 +#define JOYSTICK_ADC_VALS /*UP*/ 3227, /*DOWN*/ 0, /*LEFT*/ 1961, /*RIGHT*/ 2668, /*OK*/ 1290, /*IDLE*/ 4095 + +#define DISPLAY_FLIP_SCREEN + +/* + No External notification. +*/ +#undef EXT_NOTIFY_OUT + +/* + Remapping PIN Names. + Note, that this unit uses RFO +*/ +#define USE_RF95 +#define USE_RF95_RFO +#define RF95_CS LORA_CS +#define RF95_DIO1 LORA_DIO1 +#define RF95_TXEN LORA_TXEN +#define RF95_RESET LORA_RESET +#define RF95_MAX_POWER 12 + +/* + This module has Skyworks SKY66122 controlled by dacWrite + power rangeing from 100mW to 1000mW. + + Mapping of PA_LEVEL to Power output: GPIO26/dacWrite + 168 -> 100mW -> 2.11v + 148 -> 250mW -> 1.87v + 128 -> 500mW -> 1.63v + 90 -> 1000mW -> 1.16v +*/ +#define RF95_PA_EN 26 +#define RF95_PA_DAC_EN +#define RF95_PA_LEVEL 90 diff --git a/variants/rak10701/platformio.ini b/variants/rak10701/platformio.ini index 736329eb8..4c9bf3b20 100644 --- a/variants/rak10701/platformio.ini +++ b/variants/rak10701/platformio.ini @@ -1,10 +1,14 @@ ; 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. [env:rak10701] extends = nrf52840_base +board_level = extra board = wiscore_rak4631 build_flags = ${nrf52840_base.build_flags} -Ivariants/rak10701 -D RAK_4631 - -L "${platformio.libdeps_dir}/${this.__env__}/BSEC2 Software Library/src/cortex-m4/fpv4-sp-d16-hard" + -L "${platformio.libdeps_dir}/${this.__env__}/bsec2/src/cortex-m4/fpv4-sp-d16-hard" -DGPS_POWER_TOGGLE ; comment this line to disable triple press function on the user button to turn off gps entirely. + -DEINK_DISPLAY_MODEL=GxEPD2_213_BN + -DEINK_WIDTH=250 + -DEINK_HEIGHT=122 build_src_filter = ${nrf52_base.build_src_filter} +<../variants/rak10701> + + + lib_deps = ${nrf52840_base.lib_deps} @@ -13,6 +17,8 @@ lib_deps = https://github.com/RAKWireless/RAK13800-W5100S.git#1.0.2 rakwireless/RAKwireless NCP5623 RGB LED library@^1.0.2 bodmer/TFT_eSPI + beegee-tokyo/RAKwireless RAK12034@^1.0.0 + beegee-tokyo/RAK14014-FT6336U @ 1.0.1 debug_tool = jlink ; If not set we will default to uploading over serial (first it forces bootloader entry by talking 1200bps to cdcacm) ;upload_protocol = jlink \ No newline at end of file diff --git a/variants/rak10701/variant.cpp b/variants/rak10701/variant.cpp index 2b4bd39a6..5a3587982 100644 --- a/variants/rak10701/variant.cpp +++ b/variants/rak10701/variant.cpp @@ -38,4 +38,8 @@ void initVariant() pinMode(PIN_LED2, OUTPUT); ledOff(PIN_LED2); + + // 3V3 Power Rail + pinMode(PIN_3V3_EN, OUTPUT); + digitalWrite(PIN_3V3_EN, HIGH); } \ No newline at end of file diff --git a/variants/rak10701/variant.h b/variants/rak10701/variant.h index 5ff12a7de..c263796ee 100644 --- a/variants/rak10701/variant.h +++ b/variants/rak10701/variant.h @@ -133,10 +133,6 @@ static const uint8_t SCK = PIN_SPI_SCK; #define PIN_EINK_SCLK (0 + 3) #define PIN_EINK_MOSI (0 + 30) // also called SDI -// Controls power for the eink display - Board power is enabled either by VBUS from USB or the CPU asserting PWR_ON -// FIXME - I think this is actually just the board power enable - it enables power to the CPU also -// #define PIN_EINK_PWR_ON (-1) - // #define USE_EINK // RAKRGB @@ -202,13 +198,13 @@ static const uint8_t WB_SPI_MOSI = 30; // IO_SLOT /* Setup of the SX1262 LoRa module ( https://docs.rakwireless.com/Product-Categories/WisBlock/RAK4631/Datasheet/ ) -P1.10 NSS SPI NSS (Arduino GPIO number 42) -P1.11 SCK SPI CLK (Arduino GPIO number 43) -P1.12 MOSI SPI MOSI (Arduino GPIO number 44) -P1.13 MISO SPI MISO (Arduino GPIO number 45) -P1.14 BUSY BUSY signal (Arduino GPIO number 46) -P1.15 DIO1 DIO1 event interrupt (Arduino GPIO number 47) -P1.06 NRESET NRESET manual reset of the SX1262 (Arduino GPIO number 38) +P1.10 NSS SPI NSS (Arduino GPIO number 42) +P1.11 SCK SPI CLK (Arduino GPIO number 43) +P1.12 MOSI SPI MOSI (Arduino GPIO number 44) +P1.13 MISO SPI MISO (Arduino GPIO number 45) +P1.14 BUSY BUSY signal (Arduino GPIO number 46) +P1.15 DIO1 DIO1 event interrupt (Arduino GPIO number 47) +P1.06 NRESET NRESET manual reset of the SX1262 (Arduino GPIO number 38) Important for successful SX1262 initialization: @@ -268,19 +264,10 @@ SO GPIO 39/TXEN MAY NOT BE DEFINED FOR SUCCESSFUL OPERATION OF THE SX1262 - TG // and has 12 bit resolution #define BATTERY_SENSE_RESOLUTION_BITS 12 #define BATTERY_SENSE_RESOLUTION 4096.0 -// Definition of milliVolt per LSB => 3.0V ADC range and 12-bit ADC resolution = 3000mV/4096 -#define VBAT_MV_PER_LSB (0.73242188F) -// Voltage divider value => 1.5M + 1M voltage divider on VBAT = (1.5M / (1M + 1.5M)) -#define VBAT_DIVIDER (0.4F) -// Compensation factor for the VBAT divider -#define VBAT_DIVIDER_COMP (1.73) -// Fixed calculation of milliVolt from compensation value -#define REAL_VBAT_MV_PER_LSB (VBAT_DIVIDER_COMP * VBAT_MV_PER_LSB) #undef AREF_VOLTAGE #define AREF_VOLTAGE 3.0 #define VBAT_AR_INTERNAL AR_INTERNAL_3_0 -#define ADC_MULTIPLIER VBAT_DIVIDER_COMP // REAL_VBAT_MV_PER_LSB -#define VBAT_RAW_TO_SCALED(x) (REAL_VBAT_MV_PER_LSB * x) +#define ADC_MULTIPLIER (1.73F) #define HAS_RTC 1 @@ -320,13 +307,13 @@ SO GPIO 39/TXEN MAY NOT BE DEFINED FOR SUCCESSFUL OPERATION OF THE SX1262 - TG #define SCREEN_ROTATE #define SCREEN_TRANSITION_FRAMERATE 5 -#define HAS_TOUCHSCREEN 0 -#define SCREEN_TOUCH_INT 10 // From tp.h on the tracker open source code. -#define TOUCH_I2C_PORT 0 -#define TOUCH_SLAVE_ADDRESS 0x5D // GT911 +#define HAS_TOUCHSCREEN 1 +#define SCREEN_TOUCH_INT WB_IO6 + +#define CANNED_MESSAGE_MODULE_ENABLE 1 /*---------------------------------------------------------------------------- * Arduino objects - C++ only *----------------------------------------------------------------------------*/ -#endif +#endif \ No newline at end of file diff --git a/variants/rak11200/pins_arduino.h b/variants/rak11200/pins_arduino.h index 2dfe02614..f383d54a7 100644 --- a/variants/rak11200/pins_arduino.h +++ b/variants/rak11200/pins_arduino.h @@ -3,14 +3,6 @@ #include -#define EXTERNAL_NUM_INTERRUPTS 16 -#define NUM_DIGITAL_PINS 40 -#define NUM_ANALOG_INPUTS 16 - -#define analogInputToDigitalPin(p) (((p) < 20) ? (esp32_adc2gpio[(p)]) : -1) -#define digitalPinToInterrupt(p) (((p) < 40) ? (p) : -1) -#define digitalPinHasPWM(p) (p < 34) - #define LED_GREEN 12 #define LED_BLUE 2 diff --git a/variants/rak11200/platformio.ini b/variants/rak11200/platformio.ini index f653adeb2..eddc3458e 100644 --- a/variants/rak11200/platformio.ini +++ b/variants/rak11200/platformio.ini @@ -1,7 +1,7 @@ [env:rak11200] extends = esp32_base -board_level = extra board = wiscore_rak11200 +board_check = true build_flags = ${esp32_base.build_flags} -D RAK_11200 -I variants/rak11200 -upload_speed = 115200 +upload_speed = 115200 \ No newline at end of file diff --git a/variants/rak11200/variant.h b/variants/rak11200/variant.h index 3399594e5..01edb8b73 100644 --- a/variants/rak11200/variant.h +++ b/variants/rak11200/variant.h @@ -3,14 +3,6 @@ #include -#define EXTERNAL_NUM_INTERRUPTS 16 -#define NUM_DIGITAL_PINS 40 -#define NUM_ANALOG_INPUTS 16 - -#define analogInputToDigitalPin(p) (((p) < 20) ? (esp32_adc2gpio[(p)]) : -1) -#define digitalPinToInterrupt(p) (((p) < 40) ? (p) : -1) -#define digitalPinHasPWM(p) (p < 34) - #define LED_GREEN 12 #define LED_BLUE 2 @@ -78,11 +70,12 @@ static const uint8_t SCK = 33; #define LORA_CS SS #define USE_SX1262 +#define SX126X_ANT_SW WB_IO3 #define SX126X_CS SS // NSS for SX126X #define SX126X_DIO1 LORA_DIO1 #define SX126X_BUSY LORA_DIO2 #define SX126X_RESET LORA_RESET -#define SX126X_POWER_EN WB_IO3 +#define SX126X_POWER_EN WB_IO2 // DIO2 controlls an antenna switch and the TCXO voltage is controlled by DIO3 #define SX126X_DIO2_AS_RF_SWITCH #define SX126X_DIO3_TCXO_VOLTAGE 1.8 diff --git a/variants/rak11310/platformio.ini b/variants/rak11310/platformio.ini index 6495278bf..c7b3504fe 100644 --- a/variants/rak11310/platformio.ini +++ b/variants/rak11310/platformio.ini @@ -2,13 +2,15 @@ extends = rp2040_base board = wiscore_rak11300 upload_protocol = picotool +# keep an old SDK to use less memory. +platform_packages = framework-arduinopico@https://github.com/earlephilhower/arduino-pico.git#3.7.2 # add our variants files to the include and src paths build_flags = ${rp2040_base.build_flags} -DRAK11310 -Ivariants/rak11310 -DDEBUG_RP2040_PORT=Serial - -L "${platformio.libdeps_dir}/${this.__env__}/BSEC2 Software Library/src/cortex-m0plus" + -L "${platformio.libdeps_dir}/${this.__env__}/bsec2/src/cortex-m0plus" lib_deps = ${rp2040_base.lib_deps} debug_build_flags = ${rp2040_base.build_flags} diff --git a/variants/rak11310/variant.h b/variants/rak11310/variant.h index ba3d4fed7..54e403ee7 100644 --- a/variants/rak11310/variant.h +++ b/variants/rak11310/variant.h @@ -6,6 +6,7 @@ #define LED_CONN PIN_LED2 #define LED_PIN LED_BUILTIN +#define ledOff(pin) pinMode(pin, INPUT) #define BUTTON_PIN 9 #define BUTTON_NEED_PULLUP @@ -14,7 +15,7 @@ #define BATTERY_PIN 26 #define BATTERY_SENSE_RESOLUTION_BITS ADC_RESOLUTION // ratio of voltage divider = 3.0 (R17=200k, R18=100k) -#define ADC_MULTIPLIER 3.1 // 3.0 + a bit for being optimistic +#define ADC_MULTIPLIER 1.84 #define DETECTION_SENSOR_EN 28 @@ -47,4 +48,4 @@ // DIO2 controlls an antenna switch and the TCXO voltage is controlled by DIO3 #define SX126X_DIO2_AS_RF_SWITCH #define SX126X_DIO3_TCXO_VOLTAGE 1.8 -#endif \ No newline at end of file +#endif diff --git a/variants/rak2560/RAK9154Sensor.cpp b/variants/rak2560/RAK9154Sensor.cpp new file mode 100644 index 000000000..9f660947e --- /dev/null +++ b/variants/rak2560/RAK9154Sensor.cpp @@ -0,0 +1,183 @@ +#ifdef HAS_RAKPROT +#include "../variants/rak2560/RAK9154Sensor.h" +#include "../mesh/generated/meshtastic/telemetry.pb.h" +#include "../modules/Telemetry/Sensor/TelemetrySensor.h" +#include "configuration.h" + +#include "concurrency/Periodic.h" +#include + +using namespace concurrency; + +#define BOOT_DATA_REQ + +RAK9154Sensor::RAK9154Sensor() : TelemetrySensor(meshtastic_TelemetrySensorType_SENSOR_UNSET, "RAK1954") {} + +static Periodic *onewirePeriodic; + +static SoftwareHalfSerial mySerial(HALF_UART_PIN); // Wire pin P0.15 + +static uint8_t buff[0x100]; +static uint16_t bufflen = 0; + +static int16_t dc_cur = 0; +static uint16_t dc_vol = 0; +static uint8_t dc_prec = 0; +static uint8_t provision = 0; + +static void onewire_evt(const uint8_t pid, const uint8_t sid, const SNHUBAPI_EVT_E eid, uint8_t *msg, uint16_t len) +{ + switch (eid) { + case SNHUBAPI_EVT_RECV_REQ: + case SNHUBAPI_EVT_RECV_RSP: + break; + + case SNHUBAPI_EVT_QSEND: + mySerial.write(msg, len); + break; + + case SNHUBAPI_EVT_ADD_SID: + // LOG_INFO("+ADD:SID:[%02x]\r\n", msg[0]); + break; + + case SNHUBAPI_EVT_ADD_PID: + // LOG_INFO("+ADD:PID:[%02x]\r\n", msg[0]); +#ifdef BOOT_DATA_REQ + provision = msg[0]; +#endif + break; + + case SNHUBAPI_EVT_GET_INTV: + break; + + case SNHUBAPI_EVT_GET_ENABLE: + break; + + case SNHUBAPI_EVT_SDATA_REQ: + + // LOG_INFO("+EVT:PID[%02x],IPSO[%02x]\r\n",pid,msg[0]); + // for( uint16_t i=1; i 100) { + dc_prec = 100; + } + break; + case RAK_IPSO_DC_CURRENT: + dc_cur = (msg[2] << 8) + msg[1]; + break; + case RAK_IPSO_DC_VOLTAGE: + dc_vol = (msg[2] << 8) + msg[1]; + dc_vol *= 10; + break; + default: + break; + } + + break; + case SNHUBAPI_EVT_REPORT: + + // LOG_INFO("+EVT:PID[%02x],IPSO[%02x]\r\n",pid,msg[0]); + // for( uint16_t i=1; i 100) { + dc_prec = 100; + } + break; + case RAK_IPSO_DC_CURRENT: + dc_cur = (msg[1] << 8) + msg[2]; + break; + case RAK_IPSO_DC_VOLTAGE: + dc_vol = (msg[1] << 8) + msg[2]; + dc_vol *= 10; + break; + default: + break; + } + + break; + + case SNHUBAPI_EVT_CHKSUM_ERR: + LOG_INFO("+ERR:CHKSUM\r\n"); + break; + + case SNHUBAPI_EVT_SEQ_ERR: + LOG_INFO("+ERR:SEQUCE\r\n"); + break; + + default: + break; + } +} + +static int32_t onewireHandle() +{ + if (provision != 0) { + RakSNHub_Protocl_API.get.data(provision); + provision = 0; + } + + while (mySerial.available()) { + char a = mySerial.read(); + buff[bufflen++] = a; + delay(2); // continue data, timeout=2ms + } + + if (bufflen != 0) { + RakSNHub_Protocl_API.process((uint8_t *)buff, bufflen); + bufflen = 0; + } + + return 50; +} + +int32_t RAK9154Sensor::runOnce() +{ + onewirePeriodic = new Periodic("onewireHandle", onewireHandle); + + mySerial.begin(9600); + + RakSNHub_Protocl_API.init(onewire_evt); + + status = true; + initialized = true; + return 0; +} + +void RAK9154Sensor::setup() +{ + // Set up oversampling and filter initialization +} + +bool RAK9154Sensor::getMetrics(meshtastic_Telemetry *measurement) +{ + return true; +} + +uint16_t RAK9154Sensor::getBusVoltageMv() +{ + return dc_vol; +} + +int RAK9154Sensor::getBusBatteryPercent() +{ + return (int)dc_prec; +} + +bool RAK9154Sensor::isCharging() +{ + return (dc_cur > 0) ? true : false; +} +#endif // HAS_RAKPROT \ No newline at end of file diff --git a/variants/rak2560/RAK9154Sensor.h b/variants/rak2560/RAK9154Sensor.h new file mode 100644 index 000000000..6c6f304d6 --- /dev/null +++ b/variants/rak2560/RAK9154Sensor.h @@ -0,0 +1,23 @@ +#ifdef HAS_RAKPROT +#ifndef _RAK9154SENSOR_H +#define _RAK9154SENSOR_H 1 +#include "../mesh/generated/meshtastic/telemetry.pb.h" +#include "../modules/Telemetry/Sensor/TelemetrySensor.h" +#include "../modules/Telemetry/Sensor/VoltageSensor.h" + +class RAK9154Sensor : public TelemetrySensor, VoltageSensor +{ + private: + protected: + virtual void setup() override; + + public: + RAK9154Sensor(); + virtual int32_t runOnce() override; + virtual bool getMetrics(meshtastic_Telemetry *measurement) override; + virtual uint16_t getBusVoltageMv() override; + int getBusBatteryPercent(); + bool isCharging(); +}; +#endif // _RAK9154SENSOR_H +#endif // HAS_RAKPROT \ No newline at end of file diff --git a/variants/rak2560/create_uf2.py b/variants/rak2560/create_uf2.py new file mode 100644 index 000000000..af78f3e09 --- /dev/null +++ b/variants/rak2560/create_uf2.py @@ -0,0 +1,113 @@ +import struct + +Import("env") # noqa: F821 + + +# Parse input and create UF2 file +def create_uf2(source, target, env): + # source_hex = target[0].get_abspath() + source_hex = target[0].get_string(False) + source_hex = ".\\" + source_hex + print("#########################################################") + print("Create UF2 from " + source_hex) + print("#########################################################") + # print("Source: " + source_hex) + target = source_hex.replace(".hex", "") + target = target + ".uf2" + # print("Target: " + target) + + with open(source_hex, mode="rb") as f: + inpbuf = f.read() + + outbuf = convert_from_hex_to_uf2(inpbuf.decode("utf-8")) + + write_file(target, outbuf) + print("#########################################################") + print(target + " is ready to flash to target device") + print("#########################################################") + + +# Add callback after .hex file was created +env.AddPostAction("$BUILD_DIR/${PROGNAME}.hex", create_uf2) # noqa: F821 + +# UF2 creation taken from uf2conv.py +UF2_MAGIC_START0 = 0x0A324655 # "UF2\n" +UF2_MAGIC_START1 = 0x9E5D5157 # Randomly selected +UF2_MAGIC_END = 0x0AB16F30 # Ditto + +familyid = 0xADA52840 + + +class Block: + def __init__(self, addr): + self.addr = addr + self.bytes = bytearray(256) + + def encode(self, blockno, numblocks): + global familyid + flags = 0x0 + if familyid: + flags |= 0x2000 + hd = struct.pack( + " + + + +lib_deps = + ${nrf52840_base.lib_deps} + ${networking_base.lib_deps} + melopero/Melopero RV3028@^1.1.0 + https://github.com/RAKWireless/RAK13800-W5100S.git#1.0.2 + rakwireless/RAKwireless NCP5623 RGB LED library@^1.0.2 + beegee-tokyo/RAKwireless RAK12034@^1.0.0 + https://github.com/beegee-tokyo/RAK-OneWireSerial.git +debug_tool = jlink +; If not set we will default to uploading over serial (first it forces bootloader entry by talking 1200bps to cdcacm) +;upload_protocol = jlink diff --git a/variants/ppr1/variant.cpp b/variants/rak2560/variant.cpp similarity index 89% rename from variants/ppr1/variant.cpp rename to variants/rak2560/variant.cpp index acc3e344a..e84b60b3b 100644 --- a/variants/ppr1/variant.cpp +++ b/variants/rak2560/variant.cpp @@ -28,7 +28,7 @@ const uint32_t g_ADigitalPinMap[] = { 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, // P1 - 32, 33, 34, 35, 36, 37, 38, 39, 40, 41, 42, 43, 44, 45}; + 32, 33, 34, 35, 36, 37, 38, 39, 40, 41, 42, 43, 44, 45, 46, 47}; void initVariant() { @@ -38,4 +38,8 @@ void initVariant() pinMode(PIN_LED2, OUTPUT); ledOff(PIN_LED2); + + // 3V3 Power Rail + pinMode(PIN_3V3_EN, OUTPUT); + digitalWrite(PIN_3V3_EN, HIGH); } diff --git a/variants/rak2560/variant.h b/variants/rak2560/variant.h new file mode 100644 index 000000000..8e5d90553 --- /dev/null +++ b/variants/rak2560/variant.h @@ -0,0 +1,281 @@ +/* + Copyright (c) 2014-2015 Arduino LLC. All right reserved. + Copyright (c) 2016 Sandeep Mistry All right reserved. + Copyright (c) 2018, Adafruit Industries (adafruit.com) + + This library is free software; you can redistribute it and/or + modify it under the terms of the GNU Lesser General Public + License as published by the Free Software Foundation; either + version 2.1 of the License, or (at your option) any later version. + This library is distributed in the hope that it will be useful, + but WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. + See the GNU Lesser General Public License for more details. + You should have received a copy of the GNU Lesser General Public + License along with this library; if not, write to the Free Software + Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA +*/ + +#ifndef _VARIANT_RAK2560_ +#define _VARIANT_RAK2560_ + +#define RAK4630 +#define RAK2560 + +/** Master clock frequency */ +#define VARIANT_MCK (64000000ul) + +#define USE_LFXO // Board uses 32khz crystal for LF +// define USE_LFRC // Board uses RC for LF + +/*---------------------------------------------------------------------------- + * Headers + *----------------------------------------------------------------------------*/ + +#include "WVariant.h" + +#ifdef __cplusplus +extern "C" { +#endif // __cplusplus + +// Number of pins defined in PinDescription array +#define PINS_COUNT (48) +#define NUM_DIGITAL_PINS (48) +#define NUM_ANALOG_INPUTS (6) +#define NUM_ANALOG_OUTPUTS (0) + +// LEDs +#define PIN_LED1 (35) +#define PIN_LED2 (36) + +#define LED_BUILTIN PIN_LED1 +#define LED_CONN PIN_LED2 + +#define LED_GREEN PIN_LED1 +#define LED_BLUE PIN_LED2 + +#define LED_STATE_ON 1 // State when LED is litted + +/* + * Buttons + */ + +#define PIN_BUTTON1 9 // Pin for button on E-ink button module or IO expansion +#define BUTTON_NEED_PULLUP +#define PIN_BUTTON2 12 +#define PIN_BUTTON3 24 +#define PIN_BUTTON4 25 + +/* + * Analog pins + */ +#define PIN_A0 (5) +#define PIN_A1 (31) +#define PIN_A2 (28) +#define PIN_A3 (29) +#define PIN_A4 (30) +#define PIN_A5 (31) +#define PIN_A6 (0xff) +#define PIN_A7 (0xff) + +static const uint8_t A0 = PIN_A0; +static const uint8_t A1 = PIN_A1; +static const uint8_t A2 = PIN_A2; +static const uint8_t A3 = PIN_A3; +static const uint8_t A4 = PIN_A4; +static const uint8_t A5 = PIN_A5; +static const uint8_t A6 = PIN_A6; +static const uint8_t A7 = PIN_A7; +#define ADC_RESOLUTION 14 + +// Other pins +#define PIN_AREF (2) +#define PIN_NFC1 (9) +#define PIN_NFC2 (10) + +static const uint8_t AREF = PIN_AREF; + +/* + * Serial interfaces + */ +#define PIN_SERIAL1_RX (15) +#define PIN_SERIAL1_TX (16) + +// Connected to Serial 2 +#define PIN_SERIAL2_RX (19) +#define PIN_SERIAL2_TX (20) + +/* + * SPI Interfaces + */ +#define SPI_INTERFACES_COUNT 2 + +#define PIN_SPI_MISO (45) +#define PIN_SPI_MOSI (44) +#define PIN_SPI_SCK (43) + +#define PIN_SPI1_MISO (29) // (0 + 29) +#define PIN_SPI1_MOSI (30) // (0 + 30) +#define PIN_SPI1_SCK (3) // (0 + 3) + +static const uint8_t SS = 42; +static const uint8_t MOSI = PIN_SPI_MOSI; +static const uint8_t MISO = PIN_SPI_MISO; +static const uint8_t SCK = PIN_SPI_SCK; + +/* + * eink display pins + */ + +#define PIN_EINK_CS (0 + 26) +#define PIN_EINK_BUSY (0 + 4) +#define PIN_EINK_DC (0 + 17) +#define PIN_EINK_RES (-1) +#define PIN_EINK_SCLK (0 + 3) +#define PIN_EINK_MOSI (0 + 30) // also called SDI + +// #define USE_EINK + +/* + * Wire Interfaces + */ +#define WIRE_INTERFACES_COUNT 1 + +#define PIN_WIRE_SDA (13) +#define PIN_WIRE_SCL (14) + +// QSPI Pins +#define PIN_QSPI_SCK 3 +#define PIN_QSPI_CS 26 +#define PIN_QSPI_IO0 30 +#define PIN_QSPI_IO1 29 +#define PIN_QSPI_IO2 28 +#define PIN_QSPI_IO3 2 + +/* @note RAK5005-O GPIO mapping to RAK4631 GPIO ports + RAK5005-O <-> nRF52840 + IO1 <-> P0.17 (Arduino GPIO number 17) + IO2 <-> P1.02 (Arduino GPIO number 34) + IO3 <-> P0.21 (Arduino GPIO number 21) + IO4 <-> P0.04 (Arduino GPIO number 4) + IO5 <-> P0.09 (Arduino GPIO number 9) + IO6 <-> P0.10 (Arduino GPIO number 10) + IO7 <-> P0.28 (Arduino GPIO number 28) + SW1 <-> P0.01 (Arduino GPIO number 1) + A0 <-> P0.04/AIN2 (Arduino Analog A2 + A1 <-> P0.31/AIN7 (Arduino Analog A7 + SPI_CS <-> P0.26 (Arduino GPIO number 26) + */ + +// RAK4630 LoRa module + +/* Setup of the SX1262 LoRa module ( https://docs.rakwireless.com/Product-Categories/WisBlock/RAK4631/Datasheet/ ) + +P1.10 NSS SPI NSS (Arduino GPIO number 42) +P1.11 SCK SPI CLK (Arduino GPIO number 43) +P1.12 MOSI SPI MOSI (Arduino GPIO number 44) +P1.13 MISO SPI MISO (Arduino GPIO number 45) +P1.14 BUSY BUSY signal (Arduino GPIO number 46) +P1.15 DIO1 DIO1 event interrupt (Arduino GPIO number 47) +P1.06 NRESET NRESET manual reset of the SX1262 (Arduino GPIO number 38) + +Important for successful SX1262 initialization: + +* Setup DIO2 to control the antenna switch +* Setup DIO3 to control the TCXO power supply +* Setup the SX1262 to use it's DCDC regulator and not the LDO +* RAK4630 schematics show GPIO P1.07 connected to the antenna switch, but it should not be initialized, as DIO2 will do the +control of the antenna switch + +SO GPIO 39/TXEN MAY NOT BE DEFINED FOR SUCCESSFUL OPERATION OF THE SX1262 - TG + +*/ + +#define DETECTION_SENSOR_EN 4 + +#define USE_SX1262 +#define SX126X_CS (42) +#define SX126X_DIO1 (47) +#define SX126X_BUSY (46) +#define SX126X_RESET (38) +// #define SX126X_TXEN (39) +// #define SX126X_RXEN (37) +#define SX126X_POWER_EN (37) +// DIO2 controlls an antenna switch and the TCXO voltage is controlled by DIO3 +#define SX126X_DIO2_AS_RF_SWITCH +#define SX126X_DIO3_TCXO_VOLTAGE 1.8 + +// Testing USB detection +#define NRF_APM + +// enables 3.3V periphery like GPS or IO Module +// Do not toggle this for GPS power savings +#define PIN_3V3_EN (34) + +// RAK1910 GPS module +// If using the wisblock GPS module and pluged into Port A on WisBlock base +// IO1 is hooked to PPS (pin 12 on header) = gpio 17 +// 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). +// Therefore must be 1 to keep peripherals powered +// Power is on the controllable 3V3_S rail +// #define PIN_GPS_RESET (34) +// #define PIN_GPS_EN PIN_3V3_EN +#define PIN_GPS_PPS (17) // Pulse per second input from the GPS + +// On RAK2560 the GPS is be on a different UART +// #define GPS_RX_PIN PIN_SERIAL2_RX +// #define GPS_TX_PIN PIN_SERIAL2_TX +// #define PIN_GPS_EN PIN_3V3_EN +// Disable GPS +// #define MESHTASTIC_EXCLUDE_GPS 1 +// Define pin to enable GPS toggle (set GPIO to LOW) via user button triple press + +// RAK12002 RTC Module +#define RV3028_RTC (uint8_t)0b1010010 + +// RAK18001 Buzzer in Slot C +// #define PIN_BUZZER 21 // IO3 is PWM2 +// NEW: set this via protobuf instead! + +// Battery +// The battery sense is hooked to pin A0 (5) +#define BATTERY_PIN PIN_A0 +// and has 12 bit resolution +#define BATTERY_SENSE_RESOLUTION_BITS 12 +#define BATTERY_SENSE_RESOLUTION 4096.0 +#undef AREF_VOLTAGE +#define AREF_VOLTAGE 3.0 +#define VBAT_AR_INTERNAL AR_INTERNAL_3_0 +#define ADC_MULTIPLIER 1.73 + +#define HAS_RTC 1 + +#define HAS_ETHERNET 1 + +#define RAK_4631 1 + +#define HALF_UART_PIN PIN_SERIAL1_RX + +#if defined(GPS_RX_PIN) && (GPS_RX_PIN == HALF_UART_PIN) +#error pin 15 collision + +#endif + +#if defined(GPS_TX_PIN) && (GPS_RX_PIN == HALF_UART_PIN) +#error pin 15 collision +#endif + +#define PIN_ETHERNET_RESET 21 +#define PIN_ETHERNET_SS PIN_EINK_CS +#define ETH_SPI_PORT SPI1 +#define AQ_SET_PIN 10 + +#ifdef __cplusplus +} +#endif + +/*---------------------------------------------------------------------------- + * Arduino objects - C++ only + *----------------------------------------------------------------------------*/ + +#endif \ No newline at end of file diff --git a/variants/rak3172/platformio.ini b/variants/rak3172/platformio.ini new file mode 100644 index 000000000..9e617e01e --- /dev/null +++ b/variants/rak3172/platformio.ini @@ -0,0 +1,34 @@ +[env:rak3172] +extends = stm32_base +board = wiscore_rak3172 +build_flags = + ${stm32_base.build_flags} + -Ivariants/rak3172 + -DSERIAL_UART_INSTANCE=1 + -DPIN_SERIAL_RX=PB7 + -DPIN_SERIAL_TX=PB6 + -DHAL_DAC_MODULE_ONLY + -DHAL_ADC_MODULE_DISABLED + -DHAL_COMP_MODULE_DISABLED + -DHAL_CRC_MODULE_DISABLED + -DHAL_CRYP_MODULE_DISABLED + -DHAL_GTZC_MODULE_DISABLED + -DHAL_HSEM_MODULE_DISABLED + -DHAL_I2C_MODULE_DISABLED + -DHAL_I2S_MODULE_DISABLED + -DHAL_IPCC_MODULE_DISABLED + -DHAL_IRDA_MODULE_DISABLED + -DHAL_IWDG_MODULE_DISABLED + -DHAL_LPTIM_MODULE_DISABLED + -DHAL_PKA_MODULE_DISABLED + -DHAL_RNG_MODULE_DISABLED + -DHAL_RTC_MODULE_DISABLED + -DHAL_SMARTCARD_MODULE_DISABLED + -DHAL_SMBUS_MODULE_DISABLED + -DHAL_TIM_MODULE_DISABLED + -DHAL_WWDG_MODULE_DISABLED + -DHAL_EXTI_MODULE_DISABLED + -DRADIOLIB_EXCLUDE_SX128X=1 + -DRADIOLIB_EXCLUDE_SX127X=1 + -DRADIOLIB_EXCLUDE_LR11X0=1 +upload_port = stlink \ No newline at end of file diff --git a/variants/rak3172/variant.h b/variants/rak3172/variant.h new file mode 100644 index 000000000..21de65b2c --- /dev/null +++ b/variants/rak3172/variant.h @@ -0,0 +1,12 @@ +/* +This variant is a work in progress. +Do not expect a working Meshtastic device with this target. +*/ + +#ifndef _VARIANT_RAK3172_ +#define _VARIANT_RAK3172_ + +#define USE_STM32WLx +#define MAX_NUM_NODES 10 + +#endif \ No newline at end of file diff --git a/variants/rak4631/platformio.ini b/variants/rak4631/platformio.ini index b9789166f..ced93df66 100644 --- a/variants/rak4631/platformio.ini +++ b/variants/rak4631/platformio.ini @@ -2,9 +2,16 @@ [env:rak4631] extends = nrf52840_base board = wiscore_rak4631 +board_check = true build_flags = ${nrf52840_base.build_flags} -Ivariants/rak4631 -D RAK_4631 - -L "${platformio.libdeps_dir}/${this.__env__}/BSEC2 Software Library/src/cortex-m4/fpv4-sp-d16-hard" + -L "${platformio.libdeps_dir}/${this.__env__}/bsec2/src/cortex-m4/fpv4-sp-d16-hard" -DGPS_POWER_TOGGLE ; comment this line to disable triple press function on the user button to turn off gps entirely. + -DEINK_DISPLAY_MODEL=GxEPD2_213_BN + -DEINK_WIDTH=250 + -DEINK_HEIGHT=122 + -DRADIOLIB_EXCLUDE_SX128X=1 + -DRADIOLIB_EXCLUDE_SX127X=1 + -DRADIOLIB_EXCLUDE_LR11X0=1 build_src_filter = ${nrf52_base.build_src_filter} +<../variants/rak4631> + + + lib_deps = ${nrf52840_base.lib_deps} @@ -12,6 +19,37 @@ lib_deps = melopero/Melopero RV3028@^1.1.0 https://github.com/RAKWireless/RAK13800-W5100S.git#1.0.2 rakwireless/RAKwireless NCP5623 RGB LED library@^1.0.2 -debug_tool = jlink + https://github.com/RAKWireless/RAK12034-BMX160.git#dcead07ffa267d3c906e9ca4a1330ab989e957e2 + ; If not set we will default to uploading over serial (first it forces bootloader entry by talking 1200bps to cdcacm) +; Note: as of 6/2013 the serial/bootloader based programming takes approximately 30 seconds ;upload_protocol = jlink + +; Allows programming and debug via the RAK NanoDAP as the default debugger tool for the RAK4631 (it is only $10!) +; programming time is about the same as the bootloader version. +; For information on this see the meshtastic developers documentation for "Development on the NRF52" +[env:rak4631_dbg] +extends = env:rak4631 +board_level = extra + +; if the builtin version of openocd has a buggy version of semihosting, so use the external version +; platform_packages = platformio/tool-openocd@^3.1200.0 + +build_flags = + ${env:rak4631.build_flags} + -D USE_SEMIHOSTING + +lib_deps = + ${env:rak4631.lib_deps} + https://github.com/geeksville/Armduino-Semihosting.git#35b538fdf208c3530c1434cd099a08e486672ee4 + +; 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. +; However the built in openocd version in platformio has buggy support for TCP to semihosting. +; +; 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. +; In theory I could change those scripts. But for now I'm trying going back to a DAP adapter but with the external openocd. + +upload_protocol = stlink +; eventually use platformio/tool-pyocd@^2.3600.0 instad +;upload_protocol = custom +;upload_command = pyocd flash -t nrf52840 $UPLOADERFLAGS $SOURCE \ No newline at end of file diff --git a/variants/rak4631/variant.cpp b/variants/rak4631/variant.cpp index 75cca1dc3..e84b60b3b 100644 --- a/variants/rak4631/variant.cpp +++ b/variants/rak4631/variant.cpp @@ -38,4 +38,8 @@ void initVariant() pinMode(PIN_LED2, OUTPUT); ledOff(PIN_LED2); + + // 3V3 Power Rail + pinMode(PIN_3V3_EN, OUTPUT); + digitalWrite(PIN_3V3_EN, HIGH); } diff --git a/variants/rak4631/variant.h b/variants/rak4631/variant.h index cc18a901f..bc5541336 100644 --- a/variants/rak4631/variant.h +++ b/variants/rak4631/variant.h @@ -133,10 +133,6 @@ static const uint8_t SCK = PIN_SPI_SCK; #define PIN_EINK_SCLK (0 + 3) #define PIN_EINK_MOSI (0 + 30) // also called SDI -// Controls power for the eink display - Board power is enabled either by VBUS from USB or the CPU asserting PWR_ON -// FIXME - I think this is actually just the board power enable - it enables power to the CPU also -// #define PIN_EINK_PWR_ON (-1) - // #define USE_EINK // RAKRGB @@ -181,13 +177,13 @@ static const uint8_t SCK = PIN_SPI_SCK; /* Setup of the SX1262 LoRa module ( https://docs.rakwireless.com/Product-Categories/WisBlock/RAK4631/Datasheet/ ) -P1.10 NSS SPI NSS (Arduino GPIO number 42) -P1.11 SCK SPI CLK (Arduino GPIO number 43) -P1.12 MOSI SPI MOSI (Arduino GPIO number 44) -P1.13 MISO SPI MISO (Arduino GPIO number 45) -P1.14 BUSY BUSY signal (Arduino GPIO number 46) -P1.15 DIO1 DIO1 event interrupt (Arduino GPIO number 47) -P1.06 NRESET NRESET manual reset of the SX1262 (Arduino GPIO number 38) +P1.10 NSS SPI NSS (Arduino GPIO number 42) +P1.11 SCK SPI CLK (Arduino GPIO number 43) +P1.12 MOSI SPI MOSI (Arduino GPIO number 44) +P1.13 MISO SPI MISO (Arduino GPIO number 45) +P1.14 BUSY BUSY signal (Arduino GPIO number 46) +P1.15 DIO1 DIO1 event interrupt (Arduino GPIO number 47) +P1.06 NRESET NRESET manual reset of the SX1262 (Arduino GPIO number 38) Important for successful SX1262 initialization: @@ -219,6 +215,7 @@ SO GPIO 39/TXEN MAY NOT BE DEFINED FOR SUCCESSFUL OPERATION OF THE SX1262 - TG #define NRF_APM // enables 3.3V periphery like GPS or IO Module +// Do not toggle this for GPS power savings #define PIN_3V3_EN (34) // RAK1910 GPS module @@ -249,19 +246,10 @@ SO GPIO 39/TXEN MAY NOT BE DEFINED FOR SUCCESSFUL OPERATION OF THE SX1262 - TG // and has 12 bit resolution #define BATTERY_SENSE_RESOLUTION_BITS 12 #define BATTERY_SENSE_RESOLUTION 4096.0 -// Definition of milliVolt per LSB => 3.0V ADC range and 12-bit ADC resolution = 3000mV/4096 -#define VBAT_MV_PER_LSB (0.73242188F) -// Voltage divider value => 1.5M + 1M voltage divider on VBAT = (1.5M / (1M + 1.5M)) -#define VBAT_DIVIDER (0.4F) -// Compensation factor for the VBAT divider -#define VBAT_DIVIDER_COMP (1.73F) -// Fixed calculation of milliVolt from compensation value -#define REAL_VBAT_MV_PER_LSB (VBAT_DIVIDER_COMP * VBAT_MV_PER_LSB) #undef AREF_VOLTAGE #define AREF_VOLTAGE 3.0 #define VBAT_AR_INTERNAL AR_INTERNAL_3_0 -#define ADC_MULTIPLIER VBAT_DIVIDER_COMP // REAL_VBAT_MV_PER_LSB -#define VBAT_RAW_TO_SCALED(x) (REAL_VBAT_MV_PER_LSB * x) +#define ADC_MULTIPLIER 1.73 #define HAS_RTC 1 diff --git a/variants/rak4631_epaper/platformio.ini b/variants/rak4631_epaper/platformio.ini index 0871eee45..2479f09c8 100644 --- a/variants/rak4631_epaper/platformio.ini +++ b/variants/rak4631_epaper/platformio.ini @@ -3,13 +3,20 @@ extends = nrf52840_base board = wiscore_rak4631 build_flags = ${nrf52840_base.build_flags} -Ivariants/rak4631_epaper -D RAK_4631 - -L "${platformio.libdeps_dir}/${this.__env__}/BSEC2 Software Library/src/cortex-m4/fpv4-sp-d16-hard" + -L "${platformio.libdeps_dir}/${this.__env__}/bsec2/src/cortex-m4/fpv4-sp-d16-hard" + -DEINK_DISPLAY_MODEL=GxEPD2_213_BN + -DEINK_WIDTH=250 + -DEINK_HEIGHT=122 + -DRADIOLIB_EXCLUDE_SX128X=1 + -DRADIOLIB_EXCLUDE_SX127X=1 + -DRADIOLIB_EXCLUDE_LR11X0=1 build_src_filter = ${nrf52_base.build_src_filter} +<../variants/rak4631_epaper> lib_deps = ${nrf52840_base.lib_deps} zinggjm/GxEPD2@^1.4.9 melopero/Melopero RV3028@^1.1.0 rakwireless/RAKwireless NCP5623 RGB LED library@^1.0.2 + beegee-tokyo/RAKwireless RAK12034@^1.0.0 debug_tool = jlink ; If not set we will default to uploading over serial (first it forces bootloader entry by talking 1200bps to cdcacm) ;upload_protocol = jlink \ No newline at end of file diff --git a/variants/rak4631_epaper/variant.cpp b/variants/rak4631_epaper/variant.cpp index 75cca1dc3..e84b60b3b 100644 --- a/variants/rak4631_epaper/variant.cpp +++ b/variants/rak4631_epaper/variant.cpp @@ -38,4 +38,8 @@ void initVariant() pinMode(PIN_LED2, OUTPUT); ledOff(PIN_LED2); + + // 3V3 Power Rail + pinMode(PIN_3V3_EN, OUTPUT); + digitalWrite(PIN_3V3_EN, HIGH); } diff --git a/variants/rak4631_epaper/variant.h b/variants/rak4631_epaper/variant.h index d8a5e5597..0bb97498c 100644 --- a/variants/rak4631_epaper/variant.h +++ b/variants/rak4631_epaper/variant.h @@ -133,10 +133,6 @@ static const uint8_t SCK = PIN_SPI_SCK; #define PIN_EINK_SCLK (0 + 3) #define PIN_EINK_MOSI (0 + 30) // also called SDI -// Controls power for the eink display - Board power is enabled either by VBUS from USB or the CPU asserting PWR_ON -// FIXME - I think this is actually just the board power enable - it enables power to the CPU also -// #define PIN_EINK_PWR_ON (-1) - #define USE_EINK // RAKRGB @@ -218,19 +214,10 @@ static const uint8_t SCK = PIN_SPI_SCK; // and has 12 bit resolution #define BATTERY_SENSE_RESOLUTION_BITS 12 #define BATTERY_SENSE_RESOLUTION 4096.0 -// Definition of milliVolt per LSB => 3.0V ADC range and 12-bit ADC resolution = 3000mV/4096 -#define VBAT_MV_PER_LSB (0.73242188F) -// Voltage divider value => 1.5M + 1M voltage divider on VBAT = (1.5M / (1M + 1.5M)) -#define VBAT_DIVIDER (0.4F) -// Compensation factor for the VBAT divider -#define VBAT_DIVIDER_COMP (1.73F) -// Fixed calculation of milliVolt from compensation value -#define REAL_VBAT_MV_PER_LSB (VBAT_DIVIDER_COMP * VBAT_MV_PER_LSB) #undef AREF_VOLTAGE #define AREF_VOLTAGE 3.0 #define VBAT_AR_INTERNAL AR_INTERNAL_3_0 -#define ADC_MULTIPLIER VBAT_DIVIDER_COMP // REAL_VBAT_MV_PER_LSB -#define VBAT_RAW_TO_SCALED(x) (REAL_VBAT_MV_PER_LSB * x) +#define ADC_MULTIPLIER 1.73 #define HAS_RTC 1 diff --git a/variants/rak4631_epaper_onrxtx/platformio.ini b/variants/rak4631_epaper_onrxtx/platformio.ini index 0a4f05344..8c1b8eee8 100644 --- a/variants/rak4631_epaper_onrxtx/platformio.ini +++ b/variants/rak4631_epaper_onrxtx/platformio.ini @@ -4,15 +4,22 @@ board_level = extra extends = nrf52840_base board = wiscore_rak4631 build_flags = ${nrf52840_base.build_flags} -Ivariants/rak4631_epaper -D RAK_4631 - -L "${platformio.libdeps_dir}/${this.__env__}/BSEC2 Software Library/src/cortex-m4/fpv4-sp-d16-hard" + -L "${platformio.libdeps_dir}/${this.__env__}/bsec2/src/cortex-m4/fpv4-sp-d16-hard" -D PIN_EINK_EN=34 + -D EINK_DISPLAY_MODEL=GxEPD2_213_BN + -D EINK_WIDTH=250 + -D EINK_HEIGHT=122 + -D RADIOLIB_EXCLUDE_SX128X=1 + -D RADIOLIB_EXCLUDE_SX127X=1 + -D RADIOLIB_EXCLUDE_LR11X0=1 build_src_filter = ${nrf52_base.build_src_filter} +<../variants/rak4631_epaper_onrxtx> lib_deps = ${nrf52840_base.lib_deps} zinggjm/GxEPD2@^1.5.1 melopero/Melopero RV3028@^1.1.0 rakwireless/RAKwireless NCP5623 RGB LED library@^1.0.2 + beegee-tokyo/RAKwireless RAK12034@^1.0.0 debug_tool = jlink ; If not set we will default to uploading over serial (first it forces bootloader entry by talking 1200bps to cdcacm) ;upload_protocol = jlink -;upload_port = /dev/ttyACM3 +;upload_port = /dev/ttyACM3 \ No newline at end of file diff --git a/variants/rak4631_epaper_onrxtx/variant.cpp b/variants/rak4631_epaper_onrxtx/variant.cpp index 75cca1dc3..e84b60b3b 100644 --- a/variants/rak4631_epaper_onrxtx/variant.cpp +++ b/variants/rak4631_epaper_onrxtx/variant.cpp @@ -38,4 +38,8 @@ void initVariant() pinMode(PIN_LED2, OUTPUT); ledOff(PIN_LED2); + + // 3V3 Power Rail + pinMode(PIN_3V3_EN, OUTPUT); + digitalWrite(PIN_3V3_EN, HIGH); } diff --git a/variants/rak4631_epaper_onrxtx/variant.h b/variants/rak4631_epaper_onrxtx/variant.h index 411e3eb17..5888cff33 100644 --- a/variants/rak4631_epaper_onrxtx/variant.h +++ b/variants/rak4631_epaper_onrxtx/variant.h @@ -119,10 +119,6 @@ static const uint8_t SCK = PIN_SPI_SCK; #define PIN_EINK_SCLK (0 + 14) // SCL #define PIN_EINK_MOSI (0 + 13) // SDA -// Controls power for the eink display - Board power is enabled either by VBUS from USB or the CPU asserting PWR_ON -// FIXME - I think this is actually just the board power enable - it enables power to the CPU also -// #define PIN_EINK_PWR_ON (-1) - // RAKRGB #define HAS_NCP5623 @@ -191,19 +187,10 @@ static const uint8_t SCK = PIN_SPI_SCK; // and has 12 bit resolution // #define BATTERY_SENSE_RESOLUTION_BITS 12 // #define BATTERY_SENSE_RESOLUTION 4096.0 -// Definition of milliVolt per LSB => 3.0V ADC range and 12-bit ADC resolution = 3000mV/4096 -// #define VBAT_MV_PER_LSB (0.73242188F) -// Voltage divider value => 1.5M + 1M voltage divider on VBAT = (1.5M / (1M + 1.5M)) -// #define VBAT_DIVIDER (0.4F) -// Compensation factor for the VBAT divider -// #define VBAT_DIVIDER_COMP (1.73) -// Fixed calculation of milliVolt from compensation value -// #define REAL_VBAT_MV_PER_LSB (VBAT_DIVIDER_COMP * VBAT_MV_PER_LSB) // #undef AREF_VOLTAGE // #define AREF_VOLTAGE 3.0 // #define VBAT_AR_INTERNAL AR_INTERNAL_3_0 -// #define ADC_MULTIPLIER VBAT_DIVIDER_COMP // REAL_VBAT_MV_PER_LSB -// #define VBAT_RAW_TO_SCALED(x) (REAL_VBAT_MV_PER_LSB * x) +// #define ADC_MULTIPLIER 1.73 // #define HAS_RTC 1 diff --git a/variants/rak4631_eth_gw/platformio.ini b/variants/rak4631_eth_gw/platformio.ini new file mode 100644 index 000000000..62b7e737d --- /dev/null +++ b/variants/rak4631_eth_gw/platformio.ini @@ -0,0 +1,66 @@ +; The very slick RAK wireless RAK 4631 / 4630 board - Unified firmware for 5005/19003, with or without OLED RAK 1921 +[env:rak4631_eth_gw] +extends = nrf52840_base +board = wiscore_rak4631 +board_check = true +build_flags = ${nrf52840_base.build_flags} -Ivariants/rak4631_eth_gw -D RAK_4631 + -L "${platformio.libdeps_dir}/${this.__env__}/bsec2/src/cortex-m4/fpv4-sp-d16-hard" + -DGPS_POWER_TOGGLE ; comment this line to disable triple press function on the user button to turn off gps entirely. + -DEINK_DISPLAY_MODEL=GxEPD2_213_BN + -DEINK_WIDTH=250 + -DEINK_HEIGHT=122 + -DNRF52_USE_JSON=1 + -DMESHTASTIC_EXCLUDE_GPS=1 + -DMESHTASTIC_EXCLUDE_WIFI=1 + -DMESHTASTIC_EXCLUDE_SCREEN=1 +; -DMESHTASTIC_EXCLUDE_PKI=1 + -DMESHTASTIC_EXCLUDE_POWER_FSM=1 + -DMESHTASTIC_EXCLUDE_POWERMON=1 +; -DMESHTASTIC_EXCLUDE_TZ=1 + -DMESHTASTIC_EXCLUDE_EXTERNALNOTIFICATION=1 + -DMESHTASTIC_EXCLUDE_PAXCOUNTER=1 + -DMESHTASTIC_EXCLUDE_REMOTEHARDWARE=1 + -DMESHTASTIC_EXCLUDE_STOREFORWARD=1 + -DMESHTASTIC_EXCLUDE_CANNEDMESSAGES=1 + -DMESHTASTIC_EXCLUDE_WAYPOINT=1 +build_src_filter = ${nrf52_base.build_src_filter} +<../variants/rak4631_eth_gw> + + + +lib_deps = + ${nrf52840_base.lib_deps} + ${networking_base.lib_deps} + melopero/Melopero RV3028@^1.1.0 + https://github.com/RAKWireless/RAK13800-W5100S.git#1.0.2 + rakwireless/RAKwireless NCP5623 RGB LED library@^1.0.2 + https://github.com/meshtastic/RAK12034-BMX160.git#4821355fb10390ba8557dc43ca29a023bcfbb9d9 + bblanchon/ArduinoJson @ 6.21.4 +; If not set we will default to uploading over serial (first it forces bootloader entry by talking 1200bps to cdcacm) +; Note: as of 6/2013 the serial/bootloader based programming takes approximately 30 seconds +;upload_protocol = jlink + +; Allows programming and debug via the RAK NanoDAP as the default debugger tool for the RAK4631 (it is only $10!) +; programming time is about the same as the bootloader version. +; For information on this see the meshtastic developers documentation for "Development on the NRF52" +[env:rak4631_eth_gw_dbg] +extends = env:rak4631 +board_level = extra + +; if the builtin version of openocd has a buggy version of semihosting, so use the external version +; platform_packages = platformio/tool-openocd@^3.1200.0 + +build_flags = + ${env:rak4631_eth_gw.build_flags} + -D USE_SEMIHOSTING + +lib_deps = + ${env:rak4631_eth_gw.lib_deps} + https://github.com/geeksville/Armduino-Semihosting.git#35b538fdf208c3530c1434cd099a08e486672ee4 + +; 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. +; However the built in openocd version in platformio has buggy support for TCP to semihosting. +; +; 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. +; In theory I could change those scripts. But for now I'm trying going back to a DAP adapter but with the external openocd. + +upload_protocol = stlink +; eventually use platformio/tool-pyocd@^2.3600.0 instad +;upload_protocol = custom +;upload_command = pyocd flash -t nrf52840 $UPLOADERFLAGS $SOURCE \ No newline at end of file diff --git a/variants/ppr/variant.cpp b/variants/rak4631_eth_gw/variant.cpp similarity index 81% rename from variants/ppr/variant.cpp rename to variants/rak4631_eth_gw/variant.cpp index f5f219e9b..e84b60b3b 100644 --- a/variants/ppr/variant.cpp +++ b/variants/rak4631_eth_gw/variant.cpp @@ -25,11 +25,10 @@ const uint32_t g_ADigitalPinMap[] = { // P0 - 0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 0xff, 12, 13, 0xff, 15, 0xff, 17, 18, 0xff, 20, 0xff, 22, 0xff, 24, 0xff, 26, 0xff, 28, 29, - 30, 31, + 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, // P1 - 32, 0xff, 34, 0xff, 36, 0xff, 38, 0xff, 0xff, 41, 42, 43, 0xff, 45}; + 32, 33, 34, 35, 36, 37, 38, 39, 40, 41, 42, 43, 44, 45, 46, 47}; void initVariant() { @@ -39,4 +38,8 @@ void initVariant() pinMode(PIN_LED2, OUTPUT); ledOff(PIN_LED2); + + // 3V3 Power Rail + pinMode(PIN_3V3_EN, OUTPUT); + digitalWrite(PIN_3V3_EN, HIGH); } diff --git a/variants/rak4631_eth_gw/variant.h b/variants/rak4631_eth_gw/variant.h new file mode 100644 index 000000000..bc5541336 --- /dev/null +++ b/variants/rak4631_eth_gw/variant.h @@ -0,0 +1,273 @@ +/* + Copyright (c) 2014-2015 Arduino LLC. All right reserved. + Copyright (c) 2016 Sandeep Mistry All right reserved. + Copyright (c) 2018, Adafruit Industries (adafruit.com) + + This library is free software; you can redistribute it and/or + modify it under the terms of the GNU Lesser General Public + License as published by the Free Software Foundation; either + version 2.1 of the License, or (at your option) any later version. + This library is distributed in the hope that it will be useful, + but WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. + See the GNU Lesser General Public License for more details. + You should have received a copy of the GNU Lesser General Public + License along with this library; if not, write to the Free Software + Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA +*/ + +#ifndef _VARIANT_RAK4630_ +#define _VARIANT_RAK4630_ + +#define RAK4630 + +/** Master clock frequency */ +#define VARIANT_MCK (64000000ul) + +#define USE_LFXO // Board uses 32khz crystal for LF +// define USE_LFRC // Board uses RC for LF + +/*---------------------------------------------------------------------------- + * Headers + *----------------------------------------------------------------------------*/ + +#include "WVariant.h" + +#ifdef __cplusplus +extern "C" { +#endif // __cplusplus + +// Number of pins defined in PinDescription array +#define PINS_COUNT (48) +#define NUM_DIGITAL_PINS (48) +#define NUM_ANALOG_INPUTS (6) +#define NUM_ANALOG_OUTPUTS (0) + +// LEDs +#define PIN_LED1 (35) +#define PIN_LED2 (36) + +#define LED_BUILTIN PIN_LED1 +#define LED_CONN PIN_LED2 + +#define LED_GREEN PIN_LED1 +#define LED_BLUE PIN_LED2 + +#define LED_STATE_ON 1 // State when LED is litted + +/* + * Buttons + */ + +#define PIN_BUTTON1 9 // Pin for button on E-ink button module or IO expansion +#define BUTTON_NEED_PULLUP +#define PIN_BUTTON2 12 +#define PIN_BUTTON3 24 +#define PIN_BUTTON4 25 + +/* + * Analog pins + */ +#define PIN_A0 (5) +#define PIN_A1 (31) +#define PIN_A2 (28) +#define PIN_A3 (29) +#define PIN_A4 (30) +#define PIN_A5 (31) +#define PIN_A6 (0xff) +#define PIN_A7 (0xff) + +static const uint8_t A0 = PIN_A0; +static const uint8_t A1 = PIN_A1; +static const uint8_t A2 = PIN_A2; +static const uint8_t A3 = PIN_A3; +static const uint8_t A4 = PIN_A4; +static const uint8_t A5 = PIN_A5; +static const uint8_t A6 = PIN_A6; +static const uint8_t A7 = PIN_A7; +#define ADC_RESOLUTION 14 + +// Other pins +#define PIN_AREF (2) +#define PIN_NFC1 (9) +#define PIN_NFC2 (10) + +static const uint8_t AREF = PIN_AREF; + +/* + * Serial interfaces + */ +#define PIN_SERIAL1_RX (15) +#define PIN_SERIAL1_TX (16) + +// Connected to Jlink CDC +#define PIN_SERIAL2_RX (8) +#define PIN_SERIAL2_TX (6) + +/* + * SPI Interfaces + */ +#define SPI_INTERFACES_COUNT 2 + +#define PIN_SPI_MISO (45) +#define PIN_SPI_MOSI (44) +#define PIN_SPI_SCK (43) + +#define PIN_SPI1_MISO (29) // (0 + 29) +#define PIN_SPI1_MOSI (30) // (0 + 30) +#define PIN_SPI1_SCK (3) // (0 + 3) + +static const uint8_t SS = 42; +static const uint8_t MOSI = PIN_SPI_MOSI; +static const uint8_t MISO = PIN_SPI_MISO; +static const uint8_t SCK = PIN_SPI_SCK; + +/* + * eink display pins + */ + +#define PIN_EINK_CS (0 + 26) +#define PIN_EINK_BUSY (0 + 4) +#define PIN_EINK_DC (0 + 17) +#define PIN_EINK_RES (-1) +#define PIN_EINK_SCLK (0 + 3) +#define PIN_EINK_MOSI (0 + 30) // also called SDI + +// #define USE_EINK + +// RAKRGB +#define HAS_NCP5623 + +/* + * Wire Interfaces + */ +#define WIRE_INTERFACES_COUNT 1 + +#define PIN_WIRE_SDA (13) +#define PIN_WIRE_SCL (14) + +// QSPI Pins +#define PIN_QSPI_SCK 3 +#define PIN_QSPI_CS 26 +#define PIN_QSPI_IO0 30 +#define PIN_QSPI_IO1 29 +#define PIN_QSPI_IO2 28 +#define PIN_QSPI_IO3 2 + +// On-board QSPI Flash +#define EXTERNAL_FLASH_DEVICES IS25LP080D +#define EXTERNAL_FLASH_USE_QSPI + +/* @note RAK5005-O GPIO mapping to RAK4631 GPIO ports + RAK5005-O <-> nRF52840 + IO1 <-> P0.17 (Arduino GPIO number 17) + IO2 <-> P1.02 (Arduino GPIO number 34) + IO3 <-> P0.21 (Arduino GPIO number 21) + IO4 <-> P0.04 (Arduino GPIO number 4) + IO5 <-> P0.09 (Arduino GPIO number 9) + IO6 <-> P0.10 (Arduino GPIO number 10) + IO7 <-> P0.28 (Arduino GPIO number 28) + SW1 <-> P0.01 (Arduino GPIO number 1) + A0 <-> P0.04/AIN2 (Arduino Analog A2 + A1 <-> P0.31/AIN7 (Arduino Analog A7 + SPI_CS <-> P0.26 (Arduino GPIO number 26) + */ + +// RAK4630 LoRa module + +/* Setup of the SX1262 LoRa module ( https://docs.rakwireless.com/Product-Categories/WisBlock/RAK4631/Datasheet/ ) + +P1.10 NSS SPI NSS (Arduino GPIO number 42) +P1.11 SCK SPI CLK (Arduino GPIO number 43) +P1.12 MOSI SPI MOSI (Arduino GPIO number 44) +P1.13 MISO SPI MISO (Arduino GPIO number 45) +P1.14 BUSY BUSY signal (Arduino GPIO number 46) +P1.15 DIO1 DIO1 event interrupt (Arduino GPIO number 47) +P1.06 NRESET NRESET manual reset of the SX1262 (Arduino GPIO number 38) + +Important for successful SX1262 initialization: + +* Setup DIO2 to control the antenna switch +* Setup DIO3 to control the TCXO power supply +* Setup the SX1262 to use it's DCDC regulator and not the LDO +* RAK4630 schematics show GPIO P1.07 connected to the antenna switch, but it should not be initialized, as DIO2 will do the +control of the antenna switch + +SO GPIO 39/TXEN MAY NOT BE DEFINED FOR SUCCESSFUL OPERATION OF THE SX1262 - TG + +*/ + +#define DETECTION_SENSOR_EN 4 + +#define USE_SX1262 +#define SX126X_CS (42) +#define SX126X_DIO1 (47) +#define SX126X_BUSY (46) +#define SX126X_RESET (38) +// #define SX126X_TXEN (39) +// #define SX126X_RXEN (37) +#define SX126X_POWER_EN (37) +// DIO2 controlls an antenna switch and the TCXO voltage is controlled by DIO3 +#define SX126X_DIO2_AS_RF_SWITCH +#define SX126X_DIO3_TCXO_VOLTAGE 1.8 + +// Testing USB detection +#define NRF_APM + +// enables 3.3V periphery like GPS or IO Module +// Do not toggle this for GPS power savings +#define PIN_3V3_EN (34) + +// RAK1910 GPS module +// If using the wisblock GPS module and pluged into Port A on WisBlock base +// IO1 is hooked to PPS (pin 12 on header) = gpio 17 +// 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). +// Therefore must be 1 to keep peripherals powered +// Power is on the controllable 3V3_S rail +// #define PIN_GPS_RESET (34) +// #define PIN_GPS_EN PIN_3V3_EN +#define PIN_GPS_PPS (17) // Pulse per second input from the GPS + +#define GPS_RX_PIN PIN_SERIAL1_RX +#define GPS_TX_PIN PIN_SERIAL1_TX + +// Define pin to enable GPS toggle (set GPIO to LOW) via user button triple press + +// RAK12002 RTC Module +#define RV3028_RTC (uint8_t)0b1010010 + +// RAK18001 Buzzer in Slot C +// #define PIN_BUZZER 21 // IO3 is PWM2 +// NEW: set this via protobuf instead! + +// Battery +// The battery sense is hooked to pin A0 (5) +#define BATTERY_PIN PIN_A0 +// and has 12 bit resolution +#define BATTERY_SENSE_RESOLUTION_BITS 12 +#define BATTERY_SENSE_RESOLUTION 4096.0 +#undef AREF_VOLTAGE +#define AREF_VOLTAGE 3.0 +#define VBAT_AR_INTERNAL AR_INTERNAL_3_0 +#define ADC_MULTIPLIER 1.73 + +#define HAS_RTC 1 + +#define HAS_ETHERNET 1 + +#define RAK_4631 1 + +#define PIN_ETHERNET_RESET 21 +#define PIN_ETHERNET_SS PIN_EINK_CS +#define ETH_SPI_PORT SPI1 +#define AQ_SET_PIN 10 + +#ifdef __cplusplus +} +#endif + +/*---------------------------------------------------------------------------- + * Arduino objects - C++ only + *----------------------------------------------------------------------------*/ + +#endif \ No newline at end of file diff --git a/variants/rp2040-lora/platformio.ini b/variants/rp2040-lora/platformio.ini index a1d6bea9d..8499f6f3c 100644 --- a/variants/rp2040-lora/platformio.ini +++ b/variants/rp2040-lora/platformio.ini @@ -9,7 +9,7 @@ build_flags = ${rp2040_base.build_flags} -Ivariants/rp2040-lora -DDEBUG_RP2040_PORT=Serial -DHW_SPI1_DEVICE - -L "${platformio.libdeps_dir}/${this.__env__}/BSEC2 Software Library/src/cortex-m0plus" + -L "${platformio.libdeps_dir}/${this.__env__}/bsec2/src/cortex-m0plus" lib_deps = ${rp2040_base.lib_deps} debug_build_flags = ${rp2040_base.build_flags} diff --git a/variants/rp2040-lora/variant.h b/variants/rp2040-lora/variant.h index 1f42c4db7..f1826605f 100644 --- a/variants/rp2040-lora/variant.h +++ b/variants/rp2040-lora/variant.h @@ -15,7 +15,7 @@ // rxd = 9 #define EXT_NOTIFY_OUT 22 -#define BUTTON_PIN 17 +#undef BUTTON_PIN // Pin 17 used for antenna switching via DIO4 #define LED_PIN PIN_LED @@ -23,6 +23,7 @@ // ratio of voltage divider = 3.0 (R17=200k, R18=100k) // #define ADC_MULTIPLIER 3.1 // 3.0 + a bit for being optimistic +#define HAS_CPU_SHUTDOWN 1 #define USE_SX1262 #undef LORA_SCK @@ -32,23 +33,28 @@ // https://www.waveshare.com/rp2040-lora.htm // https://www.waveshare.com/img/devkit/RP2040-LoRa-HF/RP2040-LoRa-HF-details-11.jpg -#define LORA_SCK 14 // 10 -#define LORA_MISO 24 // 12 -#define LORA_MOSI 15 // 11 -#define LORA_CS 13 // 3 +#define LORA_SCK 14 // GPIO14 +#define LORA_MISO 24 // GPIO24 +#define LORA_MOSI 15 // GPIO15 +#define LORA_CS 13 // GPIO13 -#define LORA_DIO0 RADIOLIB_NC -#define LORA_RESET 23 // 15 -#define LORA_DIO1 16 // 20 -#define LORA_DIO2 18 // 2 -#define LORA_DIO3 RADIOLIB_NC -#define LORA_DIO4 17 +#define LORA_DIO0 RADIOLIB_NC // No GPIO connection +#define LORA_RESET 23 // GPIO23 +#define LORA_BUSY 18 // GPIO18 +#define LORA_DIO1 16 // GPIO16 +#define LORA_DIO2 RADIOLIB_NC // Antenna switching, no GPIO connection +#define LORA_DIO3 RADIOLIB_NC // No GPIO connection +#define LORA_DIO4 17 // GPIO17 + +// On rp2040-lora board the antenna switch is wired and works with complementary-pin control logic. +// See PE4259 datasheet page 4 #ifdef USE_SX1262 #define SX126X_CS LORA_CS #define SX126X_DIO1 LORA_DIO1 -#define SX126X_BUSY LORA_DIO2 +#define SX126X_BUSY LORA_BUSY #define SX126X_RESET LORA_RESET -#define SX126X_DIO2_AS_RF_SWITCH +#define SX126X_DIO2_AS_RF_SWITCH // Antenna switch CTRL +#define SX126X_RXEN LORA_DIO4 // Antenna switch !CTRL via GPIO17 // #define SX126X_DIO3_TCXO_VOLTAGE 1.8 #endif \ No newline at end of file diff --git a/variants/rpipico-slowclock/platformio.ini b/variants/rpipico-slowclock/platformio.ini new file mode 100644 index 000000000..c21994249 --- /dev/null +++ b/variants/rpipico-slowclock/platformio.ini @@ -0,0 +1,29 @@ +[env:pico_slowclock] +extends = rp2040_base +board = rpipico +board_level = extra +upload_protocol = jlink +# debug settings for external openocd with RP2040 support (custom build) +debug_tool = custom +debug_init_cmds = + target extended-remote localhost:3333 + $INIT_BREAK + monitor reset halt + $LOAD_CMDS + monitor init + monitor reset halt + +# add our variants files to the include and src paths +build_flags = ${rp2040_base.build_flags} + -DRPI_PICO + -Ivariants/rpipico-slowclock + -DDEBUG_RP2040_PORT=Serial2 + -DHW_SPI1_DEVICE + -L "${platformio.libdeps_dir}/${this.__env__}/bsec2/src/cortex-m0plus" + -g + -DNO_USB +lib_deps = + ${rp2040_base.lib_deps} +debug_build_flags = ${rp2040_base.build_flags} + -g + -DNO_USB \ No newline at end of file diff --git a/variants/rpipico-slowclock/variant.h b/variants/rpipico-slowclock/variant.h new file mode 100644 index 000000000..fb97ec0fb --- /dev/null +++ b/variants/rpipico-slowclock/variant.h @@ -0,0 +1,87 @@ +#define ARDUINO_ARCH_AVR + +// Build with slow system clock enabled to reduce power consumption. +#define RP2040_SLOW_CLOCK + +#ifdef RP2040_SLOW_CLOCK +// Redefine UART1 serial log output to avoid collision with UART0 for GPS. +#define SERIAL2_TX 4 +#define SERIAL2_RX 5 +// Reroute log output in SensorLib when USB is not available +#define log_e(...) Serial2.printf(__VA_ARGS__) +#define log_i(...) Serial2.printf(__VA_ARGS__) +#define log_d(...) Serial2.printf(__VA_ARGS__) +#endif + +// Expecting the Waveshare Pico GPS hat +#define HAS_GPS 1 + +// Enable OLED Screen +#define HAS_SCREEN 1 +#define USE_SH1106 1 +#define RESET_OLED 13 + +// Redefine I2C0 pins to avoid collision with UART1/Serial2. +#define I2C_SDA 8 +#define I2C_SCL 9 + +// Redefine Waveshare UPS-A/B I2C_1 pins: +#define I2C_SDA1 6 +#define I2C_SCL1 7 +// Waveshare UPS-A/B uses a 0.01 Ohm shunt for the INA219 sensor +#define INA219_MULTIPLIER 10.0f + +// Waveshare Pico GPS L76B pins: +#define GPS_RX_PIN 1 +#define GPS_TX_PIN 0 + +// Wakeup from backup mode +// #define PIN_GPS_FORCE_ON 14 +// No GPS reset available +#undef PIN_GPS_RESET +/* + * For PPS output the resistor R20 needs to be populated with 0 Ohm + * on the Waveshare Pico GPS board. + */ +#define PIN_GPS_PPS 16 +/* + * For standby mode switching the resistor R18 needs to be populated + * with 0 Ohm on the Waveshare Pico GPS board. + */ +#define PIN_GPS_STANDBY 17 + +#define BUTTON_PIN 18 +#define EXT_NOTIFY_OUT 22 +#define LED_PIN PIN_LED + +#define BATTERY_PIN 26 +// ratio of voltage divider = 3.0 (R17=200k, R18=100k) +#define ADC_MULTIPLIER 3.1 // 3.0 + a bit for being optimistic +#define BATTERY_SENSE_RESOLUTION_BITS ADC_RESOLUTION + +#define USE_SX1262 + +#undef LORA_SCK +#undef LORA_MISO +#undef LORA_MOSI +#undef LORA_CS + +#define LORA_SCK 10 +#define LORA_MISO 12 +#define LORA_MOSI 11 +#define LORA_CS 3 + +#define LORA_DIO0 RADIOLIB_NC +#define LORA_RESET 15 +#define LORA_DIO1 20 +#define LORA_DIO2 2 +#define LORA_DIO3 RADIOLIB_NC + +#ifdef USE_SX1262 +#define SX126X_CS LORA_CS +#define SX126X_DIO1 LORA_DIO1 +#define SX126X_BUSY LORA_DIO2 +#define SX126X_RESET LORA_RESET +#define SX126X_DIO2_AS_RF_SWITCH +#define SX126X_DIO3_TCXO_VOLTAGE 1.8 +#endif \ No newline at end of file diff --git a/variants/rpipico/platformio.ini b/variants/rpipico/platformio.ini index 9537694ec..e4b9e479f 100644 --- a/variants/rpipico/platformio.ini +++ b/variants/rpipico/platformio.ini @@ -9,7 +9,7 @@ build_flags = ${rp2040_base.build_flags} -Ivariants/rpipico -DDEBUG_RP2040_PORT=Serial -DHW_SPI1_DEVICE - -L "${platformio.libdeps_dir}/${this.__env__}/BSEC2 Software Library/src/cortex-m0plus" + -L "${platformio.libdeps_dir}/${this.__env__}/bsec2/src/cortex-m0plus" lib_deps = ${rp2040_base.lib_deps} debug_build_flags = ${rp2040_base.build_flags} diff --git a/variants/rpipico/variant.h b/variants/rpipico/variant.h index ad6d0b211..7efaeaf7a 100644 --- a/variants/rpipico/variant.h +++ b/variants/rpipico/variant.h @@ -4,8 +4,6 @@ #define ARDUINO_ARCH_AVR -#define USE_SH1106 1 - // default I2C pins: // SDA = 4 // SCL = 5 diff --git a/variants/rpipico2/platformio.ini b/variants/rpipico2/platformio.ini new file mode 100644 index 000000000..a63414418 --- /dev/null +++ b/variants/rpipico2/platformio.ini @@ -0,0 +1,16 @@ +[env:pico2] +extends = rp2350_base +board = rpipico2 +upload_protocol = picotool + +# add our variants files to the include and src paths +build_flags = ${rp2350_base.build_flags} + -DRPI_PICO2 + -Ivariants/rpipico2 + -DDEBUG_RP2040_PORT=Serial + -DHW_SPI1_DEVICE + -L "${platformio.libdeps_dir}/${this.__env__}/bsec2/src/cortex-m0plus" +lib_deps = + ${rp2350_base.lib_deps} +debug_build_flags = ${rp2350_base.build_flags} +debug_tool = cmsis-dap ; for e.g. Picotool \ No newline at end of file diff --git a/variants/rpipico2/variant.h b/variants/rpipico2/variant.h new file mode 100644 index 000000000..7efaeaf7a --- /dev/null +++ b/variants/rpipico2/variant.h @@ -0,0 +1,50 @@ +// #define RADIOLIB_CUSTOM_ARDUINO 1 +// #define RADIOLIB_TONE_UNSUPPORTED 1 +// #define RADIOLIB_SOFTWARE_SERIAL_UNSUPPORTED 1 + +#define ARDUINO_ARCH_AVR + +// default I2C pins: +// SDA = 4 +// SCL = 5 + +// Recommended pins for SerialModule: +// txd = 8 +// rxd = 9 + +#define EXT_NOTIFY_OUT 22 +#define BUTTON_PIN 17 + +#define LED_PIN PIN_LED + +#define BATTERY_PIN 26 +// ratio of voltage divider = 3.0 (R17=200k, R18=100k) +#define ADC_MULTIPLIER 3.1 // 3.0 + a bit for being optimistic +#define BATTERY_SENSE_RESOLUTION_BITS ADC_RESOLUTION + +#define USE_SX1262 + +#undef LORA_SCK +#undef LORA_MISO +#undef LORA_MOSI +#undef LORA_CS + +#define LORA_SCK 10 +#define LORA_MISO 12 +#define LORA_MOSI 11 +#define LORA_CS 3 + +#define LORA_DIO0 RADIOLIB_NC +#define LORA_RESET 15 +#define LORA_DIO1 20 +#define LORA_DIO2 2 +#define LORA_DIO3 RADIOLIB_NC + +#ifdef USE_SX1262 +#define SX126X_CS LORA_CS +#define SX126X_DIO1 LORA_DIO1 +#define SX126X_BUSY LORA_DIO2 +#define SX126X_RESET LORA_RESET +#define SX126X_DIO2_AS_RF_SWITCH +#define SX126X_DIO3_TCXO_VOLTAGE 1.8 +#endif diff --git a/variants/rpipicow/platformio.ini b/variants/rpipicow/platformio.ini index 29b5c8bcb..2600b4b38 100644 --- a/variants/rpipicow/platformio.ini +++ b/variants/rpipicow/platformio.ini @@ -1,7 +1,6 @@ [env:picow] extends = rp2040_base board = rpipicow -board_level = extra upload_protocol = picotool # add our variants files to the include and src paths @@ -9,7 +8,7 @@ build_flags = ${rp2040_base.build_flags} -DRPI_PICO -Ivariants/rpipicow -DHW_SPI1_DEVICE - -L "${platformio.libdeps_dir}/${this.__env__}/BSEC2 Software Library/src/cortex-m0plus" + -L "${platformio.libdeps_dir}/${this.__env__}/bsec2/src/cortex-m0plus" -fexceptions # for exception handling in MQTT build_src_filter = ${rp2040_base.build_src_filter} + lib_deps = diff --git a/variants/rpipicow/variant.h b/variants/rpipicow/variant.h index 27117680f..24da8f932 100644 --- a/variants/rpipicow/variant.h +++ b/variants/rpipicow/variant.h @@ -8,8 +8,6 @@ #define HAS_WIFI 1 #endif -#define USE_SH1106 1 - // default I2C pins: // SDA = 4 // SCL = 5 @@ -21,6 +19,8 @@ #define EXT_NOTIFY_OUT 22 #define BUTTON_PIN 17 +#define LED_PIN LED_BUILTIN + #define BATTERY_PIN 26 // ratio of voltage divider = 3.0 (R17=200k, R18=100k) #define ADC_MULTIPLIER 3.1 // 3.0 + a bit for being optimistic @@ -51,4 +51,4 @@ #define SX126X_RESET LORA_RESET #define SX126X_DIO2_AS_RF_SWITCH #define SX126X_DIO3_TCXO_VOLTAGE 1.8 -#endif \ No newline at end of file +#endif diff --git a/variants/seeed-sensecap-indicator/pins_arduino.h b/variants/seeed-sensecap-indicator/pins_arduino.h new file mode 100644 index 000000000..300f0e0f5 --- /dev/null +++ b/variants/seeed-sensecap-indicator/pins_arduino.h @@ -0,0 +1,56 @@ +#ifndef Pins_Arduino_h +#define Pins_Arduino_h + +#include + +// static const uint8_t LED_BUILTIN = -1; + +// static const uint8_t TX = 43; +// static const uint8_t RX = 44; + +static const uint8_t SDA = 39; +static const uint8_t SCL = 40; + +// Default SPI will be mapped to Radio +static const uint8_t SS = -1; +static const uint8_t MOSI = 48; +static const uint8_t MISO = 47; +static const uint8_t SCK = 41; + +static const uint8_t A0 = 1; +static const uint8_t A1 = 2; +static const uint8_t A2 = 3; +static const uint8_t A3 = 4; +static const uint8_t A4 = 5; +static const uint8_t A5 = 6; +static const uint8_t A6 = 7; +static const uint8_t A7 = 8; +static const uint8_t A8 = 9; +static const uint8_t A9 = 10; +static const uint8_t A10 = 11; +static const uint8_t A11 = 12; +static const uint8_t A12 = 13; +static const uint8_t A13 = 14; +static const uint8_t A14 = 15; +static const uint8_t A15 = 16; +static const uint8_t A16 = 17; +static const uint8_t A17 = 18; +static const uint8_t A18 = 19; +static const uint8_t A19 = 20; + +static const uint8_t T1 = 1; +static const uint8_t T2 = 2; +static const uint8_t T3 = 3; +static const uint8_t T4 = 4; +static const uint8_t T5 = 5; +static const uint8_t T6 = 6; +static const uint8_t T7 = 7; +static const uint8_t T8 = 8; +static const uint8_t T9 = 9; +static const uint8_t T10 = 10; +static const uint8_t T11 = 11; +static const uint8_t T12 = 12; +static const uint8_t T13 = 13; +static const uint8_t T14 = 14; + +#endif /* Pins_Arduino_h */ \ No newline at end of file diff --git a/variants/seeed-sensecap-indicator/platformio.ini b/variants/seeed-sensecap-indicator/platformio.ini new file mode 100644 index 000000000..e6bb2145e --- /dev/null +++ b/variants/seeed-sensecap-indicator/platformio.ini @@ -0,0 +1,28 @@ +; Seeed Studio SenseCAP Indicator +[env:seeed-sensecap-indicator] +extends = esp32s3_base +platform_packages = + platformio/framework-arduinoespressif32 @ https://github.com/mverch67/arduino-esp32.git#add_tca9535 ; based on 2.0.16 + +board = seeed-sensecap-indicator +board_check = true +upload_protocol = esptool + +build_flags = ${esp32_base.build_flags} + -Ivariants/seeed-sensecap-indicator + -DSENSECAP_INDICATOR + -DCONFIG_ARDUHAL_LOG_COLORS + -DRADIOLIB_DEBUG_SPI=0 + -DRADIOLIB_DEBUG_PROTOCOL=0 + -DRADIOLIB_DEBUG_BASIC=0 + -DRADIOLIB_VERBOSE_ASSERT=0 + -DRADIOLIB_SPI_PARANOID=0 + -DIO_EXPANDER=0x40 + -DIO_EXPANDER_IRQ=42 + ;-DIO_EXPANDER_DEBUG + -DUSE_ARDUINO_HAL_GPIO + +lib_deps = ${esp32s3_base.lib_deps} + https://github.com/mverch67/LovyanGFX#develop + earlephilhower/ESP8266Audio@^1.9.7 + earlephilhower/ESP8266SAM@^1.0.1 \ No newline at end of file diff --git a/variants/seeed-sensecap-indicator/variant.h b/variants/seeed-sensecap-indicator/variant.h new file mode 100644 index 000000000..d7ed329eb --- /dev/null +++ b/variants/seeed-sensecap-indicator/variant.h @@ -0,0 +1,64 @@ +#define I2C_SDA 39 +#define I2C_SCL 40 + +#define BUTTON_PIN 38 +// #define BUTTON_NEED_PULLUP + +// #define BATTERY_PIN 27 // A battery voltage measurement pin, voltage divider connected here to measure battery voltage +// #define ADC_CHANNEL ADC1_GPIO27_CHANNEL +// #define ADC_MULTIPLIER 2 + +// ST7701 TFT LCD +#define ST7701_CS (4 | IO_EXPANDER) +#define ST7701_RS -1 // DC +#define ST7701_SDA 48 // MOSI +#define ST7701_SCK 41 +#define ST7701_RESET (5 | IO_EXPANDER) +#define ST7701_MISO 47 +#define ST7701_BUSY -1 +#define ST7701_BL 45 +#define ST7701_SPI_HOST SPI2_HOST +#define ST7701_BACKLIGHT_EN 45 +#define SPI_FREQUENCY 20000000 +#define SPI_READ_FREQUENCY 16000000 +#define TFT_HEIGHT 480 +#define TFT_WIDTH 480 +#define TFT_OFFSET_X 0 +#define TFT_OFFSET_Y 0 +#define TFT_OFFSET_ROTATION 0 +#define TFT_BL 45 +#define SCREEN_ROTATE +#define SCREEN_TRANSITION_FRAMERATE 5 // fps + +#define HAS_TOUCHSCREEN 1 +#define SCREEN_TOUCH_INT (6 | IO_EXPANDER) +#define SCREEN_TOUCH_RST (7 | IO_EXPANDER) +#define TOUCH_I2C_PORT 0 +#define TOUCH_SLAVE_ADDRESS 0x48 + +// Buzzer +#define PIN_BUZZER 19 + +#define HAS_GPS 0 +#undef GPS_RX_PIN +#undef GPS_TX_PIN + +#define USE_SX1262 +#define USE_SX1268 + +#define LORA_SCK 41 +#define LORA_MISO 47 +#define LORA_MOSI 48 +#define LORA_CS (0 | IO_EXPANDER) + +#define LORA_DIO0 -1 // a no connect on the SX1262 module +#define LORA_RESET (1 | IO_EXPANDER) +#define LORA_DIO1 (3 | IO_EXPANDER) // SX1262 IRQ +#define LORA_DIO2 (2 | IO_EXPANDER) // SX1262 BUSY +#define LORA_DIO3 + +#define SX126X_CS LORA_CS +#define SX126X_DIO1 LORA_DIO1 +#define SX126X_BUSY LORA_DIO2 +#define SX126X_RESET LORA_RESET +#define SX126X_DIO2_AS_RF_SWITCH diff --git a/variants/seeed_xiao_s3/pins_arduino.h b/variants/seeed_xiao_s3/pins_arduino.h new file mode 100644 index 000000000..52e96eaeb --- /dev/null +++ b/variants/seeed_xiao_s3/pins_arduino.h @@ -0,0 +1,21 @@ +#ifndef Pins_Arduino_h +#define Pins_Arduino_h + +#include + +#define USB_VID 0x2886 +#define USB_PID 0x0059 + +// GPIO48 Reference: https://github.com/espressif/arduino-esp32/pull/8600 + +// The default Wire will be mapped to Screen and Sensors +static const uint8_t SDA = 47; +static const uint8_t SCL = 48; + +// Default SPI will be mapped to Radio +static const uint8_t MISO = 8; +static const uint8_t SCK = 7; +static const uint8_t MOSI = 9; +static const uint8_t SS = 41; + +#endif /* Pins_Arduino_h */ diff --git a/variants/seeed_xiao_s3/platformio.ini b/variants/seeed_xiao_s3/platformio.ini new file mode 100644 index 000000000..3d10d7136 --- /dev/null +++ b/variants/seeed_xiao_s3/platformio.ini @@ -0,0 +1,17 @@ +[env:seeed-xiao-s3] +extends = esp32s3_base +board = seeed-xiao-s3 +board_check = true +board_build.mcu = esp32s3 +upload_protocol = esptool +upload_speed = 921600 +lib_deps = + ${esp32s3_base.lib_deps} +build_unflags = + ${esp32s3_base.build_unflags} + -DARDUINO_USB_MODE=1 +build_flags = + ${esp32s3_base.build_flags} -DSEEED_XIAO_S3 -I variants/seeed_xiao_s3 + -DBOARD_HAS_PSRAM + + -DARDUINO_USB_MODE=0 \ No newline at end of file diff --git a/variants/seeed_xiao_s3/variant.h b/variants/seeed_xiao_s3/variant.h new file mode 100644 index 000000000..ab886d354 --- /dev/null +++ b/variants/seeed_xiao_s3/variant.h @@ -0,0 +1,84 @@ +/* + ▄▄▄▄▄▄▄▄▄▄▄ ▄▄▄▄▄▄▄▄▄▄▄ ▄▄▄▄▄▄▄▄▄▄▄ ▄▄▄▄▄▄▄▄▄▄▄ ▄▄▄▄▄▄▄▄▄▄ +▐░░░░░░░░░░░▌▐░░░░░░░░░░░▌▐░░░░░░░░░░░▌▐░░░░░░░░░░░▌▐░░░░░░░░░░▌ +▐░█▀▀▀▀▀▀▀▀▀ ▐░█▀▀▀▀▀▀▀▀▀ ▐░█▀▀▀▀▀▀▀▀▀ ▐░█▀▀▀▀▀▀▀▀▀ ▐░█▀▀▀▀▀▀▀█░▌ +▐░▌ ▐░▌ ▐░▌ ▐░▌ ▐░▌ ▐░▌ +▐░█▄▄▄▄▄▄▄▄▄ ▐░█▄▄▄▄▄▄▄▄▄ ▐░█▄▄▄▄▄▄▄▄▄ ▐░█▄▄▄▄▄▄▄▄▄ ▐░▌ ▐░▌ +▐░░░░░░░░░░░▌▐░░░░░░░░░░░▌▐░░░░░░░░░░░▌▐░░░░░░░░░░░▌▐░▌ ▐░▌ + ▀▀▀▀▀▀▀▀▀█░▌▐░█▀▀▀▀▀▀▀▀▀ ▐░█▀▀▀▀▀▀▀▀▀ ▐░█▀▀▀▀▀▀▀▀▀ ▐░▌ ▐░▌ + ▐░▌▐░▌ ▐░▌ ▐░▌ ▐░▌ ▐░▌ + ▄▄▄▄▄▄▄▄▄█░▌▐░█▄▄▄▄▄▄▄▄▄ ▐░█▄▄▄▄▄▄▄▄▄ ▐░█▄▄▄▄▄▄▄▄▄ ▐░█▄▄▄▄▄▄▄█░▌ +▐░░░░░░░░░░░▌▐░░░░░░░░░░░▌▐░░░░░░░░░░░▌▐░░░░░░░░░░░▌▐░░░░░░░░░░▌ + ▀▀▀▀▀▀▀▀▀▀▀ ▀▀▀▀▀▀▀▀▀▀▀ ▀▀▀▀▀▀▀▀▀▀▀ ▀▀▀▀▀▀▀▀▀▀▀ ▀▀▀▀▀▀▀▀▀▀ + + ▄ ▄ ▄▄▄▄▄▄▄▄▄▄▄ ▄▄▄▄▄▄▄▄▄▄▄ ▄▄▄▄▄▄▄▄▄▄▄ ▄▄▄▄▄▄▄▄▄▄▄ ▄▄▄▄▄▄▄▄▄▄▄ + ▐░▌ ▐░▌▐░░░░░░░░░░░▌▐░░░░░░░░░░░▌▐░░░░░░░░░░░▌ ▐░░░░░░░░░░░▌▐░░░░░░░░░░░▌ + ▐░▌ ▐░▌ ▀▀▀▀█░█▀▀▀▀ ▐░█▀▀▀▀▀▀▀█░▌▐░█▀▀▀▀▀▀▀█░▌ ▐░█▀▀▀▀▀▀▀▀▀ ▀▀▀▀▀▀▀▀▀█░▌ + ▐░▌ ▐░▌ ▐░▌ ▐░▌ ▐░▌▐░▌ ▐░▌ ▐░▌ ▐░▌ + ▐░▐░▌ ▐░▌ ▐░█▄▄▄▄▄▄▄█░▌▐░▌ ▐░▌ ▐░█▄▄▄▄▄▄▄▄▄ ▄▄▄▄▄▄▄▄▄█░▌ + ▐░▌ ▐░▌ ▐░░░░░░░░░░░▌▐░▌ ▐░▌ ▐░░░░░░░░░░░▌▐░░░░░░░░░░░▌ + ▐░▌░▌ ▐░▌ ▐░█▀▀▀▀▀▀▀█░▌▐░▌ ▐░▌ ▀▀▀▀▀▀▀▀▀█░▌ ▀▀▀▀▀▀▀▀▀█░▌ + ▐░▌ ▐░▌ ▐░▌ ▐░▌ ▐░▌▐░▌ ▐░▌ ▐░▌ ▐░▌ + ▐░▌ ▐░▌ ▄▄▄▄█░█▄▄▄▄ ▐░▌ ▐░▌▐░█▄▄▄▄▄▄▄█░▌ ▄▄▄▄▄▄▄▄▄█░▌ ▄▄▄▄▄▄▄▄▄█░▌ + ▐░▌ ▐░▌▐░░░░░░░░░░░▌▐░▌ ▐░▌▐░░░░░░░░░░░▌ ▐░░░░░░░░░░░▌▐░░░░░░░░░░░▌ + ▀ ▀ ▀▀▀▀▀▀▀▀▀▀▀ ▀ ▀ ▀▀▀▀▀▀▀▀▀▀▀ ▀▀▀▀▀▀▀▀▀▀▀ ▀▀▀▀▀▀▀▀▀▀▀ +*/ + +/* +Board Information: https://www.seeedstudio.com/XIAO-ESP32S3-Sense-p-5639.html +Expansion Board Infomation : https://www.seeedstudio.com/Seeeduino-XIAO-Expansion-board-p-4746.html +L76K GPS Module Information : https://www.seeedstudio.com/L76K-GNSS-Module-for-Seeed-Studio-XIAO-p-5864.html +*/ + +#define LED_PIN 48 +#define LED_STATE_ON 1 // State when LED is lit + +#define BUTTON_PIN 21 // This is the Program Button +#define BUTTON_NEED_PULLUP + +/*Warning: + https://www.seeedstudio.com/L76K-GNSS-Module-for-Seeed-Studio-XIAO-p-5864.html + L76K Expansion Board can not directly used, L76K Reset Pin needs to override or physically remove it, + otherwise it will conflict with the SPI pins +*/ +// #define GPS_L76K +#ifdef GPS_L76K +#define GPS_RX_PIN 44 +#define GPS_TX_PIN 43 +#define HAS_GPS 1 +#define GPS_BAUDRATE 9600 +#define GPS_THREAD_INTERVAL 50 +#define PIN_SERIAL1_RX PIN_GPS_TX +#define PIN_SERIAL1_TX PIN_GPS_RX +#define PIN_GPS_STANDBY 1 +#endif + +// XIAO S3 Expansion board has 1.3 inch OLED Screen +#define USCREEN_SSD1306 + +#define I2C_SDA 5 +#define I2C_SCL 6 + +// XIAO S3 LORA module +#define USE_SX1262 + +#define LORA_MISO 8 +#define LORA_SCK 7 +#define LORA_MOSI 9 +#define LORA_CS 41 + +#define LORA_RESET 42 +#define LORA_DIO1 39 + +#define LORA_DIO2 38 + +#ifdef USE_SX1262 +#define SX126X_CS LORA_CS +#define SX126X_DIO1 LORA_DIO1 +#define SX126X_BUSY 40 +#define SX126X_RESET LORA_RESET + +// DIO2 controlls an antenna switch and the TCXO voltage is controlled by DIO3 +#define SX126X_DIO2_AS_RF_SWITCH +#define SX126X_DIO3_TCXO_VOLTAGE 1.8 +#endif \ No newline at end of file diff --git a/variants/senselora_rp2040/platformio.ini b/variants/senselora_rp2040/platformio.ini index 3b3253ee8..852ecbbb9 100644 --- a/variants/senselora_rp2040/platformio.ini +++ b/variants/senselora_rp2040/platformio.ini @@ -1,4 +1,5 @@ [env:senselora_rp2040] +board_level = extra extends = rp2040_base board = rpipico upload_protocol = picotool @@ -8,6 +9,6 @@ build_flags = ${rp2040_base.build_flags} -DSENSELORA_RP2040 -Ivariants/senselora_rp2040 -DDEBUG_RP2040_PORT=Serial - -L "${platformio.libdeps_dir}/${this.__env__}/BSEC2 Software Library/src/cortex-m0plus" + -L "${platformio.libdeps_dir}/${this.__env__}/bsec2/src/cortex-m0plus" lib_deps = ${rp2040_base.lib_deps} \ No newline at end of file diff --git a/variants/station-g2/pins_arduino.h b/variants/station-g2/pins_arduino.h new file mode 100755 index 000000000..6a803008d --- /dev/null +++ b/variants/station-g2/pins_arduino.h @@ -0,0 +1,21 @@ +#ifndef Pins_Arduino_h +#define Pins_Arduino_h + +#include + +#define USB_VID 0x303a +#define USB_PID 0x1001 + +// GPIO48 Reference: https://github.com/espressif/arduino-esp32/pull/8600 + +// The default Wire will be mapped to Screen and Sensors +static const uint8_t SDA = 5; +static const uint8_t SCL = 6; + +// Default SPI will be mapped to Radio +static const uint8_t MISO = 14; +static const uint8_t SCK = 12; +static const uint8_t MOSI = 13; +static const uint8_t SS = 11; + +#endif /* Pins_Arduino_h */ \ No newline at end of file diff --git a/variants/station-g2/platformio.ini b/variants/station-g2/platformio.ini new file mode 100755 index 000000000..b674c8bae --- /dev/null +++ b/variants/station-g2/platformio.ini @@ -0,0 +1,18 @@ +[env:station-g2] +extends = esp32s3_base +board = station-g2 +board_check = true +board_build.mcu = esp32s3 +upload_protocol = esptool +;upload_port = /dev/ttyACM0 +upload_speed = 921600 +lib_deps = + ${esp32s3_base.lib_deps} +build_unflags = + ${esp32s3_base.build_unflags} + -DARDUINO_USB_MODE=1 +build_flags = + ${esp32s3_base.build_flags} -D STATION_G2 -I variants/station-g2 + -DBOARD_HAS_PSRAM + -DSTATION_G2 + -DARDUINO_USB_MODE=0 \ No newline at end of file diff --git a/variants/station-g2/variant.h b/variants/station-g2/variant.h new file mode 100755 index 000000000..8f0b4b220 --- /dev/null +++ b/variants/station-g2/variant.h @@ -0,0 +1,54 @@ +/* +Board Information: https://wiki.uniteng.com/en/meshtastic/station-g2 +*/ + +// Station G2 may not have GPS installed, but it has a GROVE GPS Socket for Optional GPS Module +#define GPS_RX_PIN 7 +#define GPS_TX_PIN 15 + +// Station G2 has 1.3 inch OLED Screen +#define USE_SH1107_128_64 + +#define I2C_SDA 5 // I2C pins for this board +#define I2C_SCL 6 + +#define BUTTON_PIN 38 // This is the Program Button +#define BUTTON_NEED_PULLUP + +#define USE_SX1262 + +#define LORA_MISO 14 +#define LORA_SCK 12 +#define LORA_MOSI 13 +#define LORA_CS 11 + +#define LORA_RESET 21 +#define LORA_DIO1 48 + +#ifdef USE_SX1262 +#define SX126X_CS LORA_CS // FIXME - we really should define LORA_CS instead +#define SX126X_DIO1 LORA_DIO1 +#define SX126X_BUSY 47 +#define SX126X_RESET LORA_RESET + +// DIO2 controlls an antenna switch and the TCXO voltage is controlled by DIO3 +#define SX126X_DIO2_AS_RF_SWITCH +#define SX126X_DIO3_TCXO_VOLTAGE 1.8 + +// Ensure the PA does not exceed the saturation output power. More +// Info:https://wiki.uniteng.com/en/meshtastic/station-g2#summary-for-lora-power-amplifier-conduction-test +#define SX126X_MAX_POWER 19 +#endif + +/* +#define BATTERY_PIN 4 // A battery voltage measurement pin, voltage divider connected here to measure battery voltage +#define ADC_CHANNEL ADC1_GPIO4_CHANNEL +#define ADC_MULTIPLIER 4 +#define BATTERY_SENSE_SAMPLES 15 // Set the number of samples, It has an effect of increasing sensitivity. +#define BAT_FULLVOLT 8400 +#define BAT_EMPTYVOLT 5000 +#define BAT_CHARGINGVOLT 8400 +#define BAT_NOBATVOLT 4460 +#define CELL_TYPE_LION // same curve for liion/lipo +#define NUM_CELLS 2 +*/ diff --git a/variants/t-deck/pins_arduino.h b/variants/t-deck/pins_arduino.h index 0150935ed..cb429d776 100644 --- a/variants/t-deck/pins_arduino.h +++ b/variants/t-deck/pins_arduino.h @@ -6,14 +6,6 @@ #define USB_VID 0x303a #define USB_PID 0x1001 -#define EXTERNAL_NUM_INTERRUPTS 46 -#define NUM_DIGITAL_PINS 48 -#define NUM_ANALOG_INPUTS 20 - -#define analogInputToDigitalPin(p) (((p) < NUM_ANALOG_INPUTS) ? (analogChannelToDigitalPin(p)) : -1) -#define digitalPinToInterrupt(p) (((p) < NUM_DIGITAL_PINS) ? (p) : -1) -#define digitalPinHasPWM(p) (p < EXTERNAL_NUM_INTERRUPTS) - // static const uint8_t LED_BUILTIN = -1; static const uint8_t TX = 43; diff --git a/variants/t-deck/platformio.ini b/variants/t-deck/platformio.ini index cb6033300..a63ff57a7 100644 --- a/variants/t-deck/platformio.ini +++ b/variants/t-deck/platformio.ini @@ -2,12 +2,14 @@ [env:t-deck] extends = esp32s3_base board = t-deck +board_check = true upload_protocol = esptool #upload_port = COM29 build_flags = ${esp32_base.build_flags} -DT_DECK -DBOARD_HAS_PSRAM + -DMAX_THREADS=40 -DGPS_POWER_TOGGLE -Ivariants/t-deck diff --git a/variants/t-deck/variant.h b/variants/t-deck/variant.h index 62ac0a373..9860d608f 100644 --- a/variants/t-deck/variant.h +++ b/variants/t-deck/variant.h @@ -8,7 +8,7 @@ #define ST7789_BUSY -1 #define ST7789_BL 42 #define ST7789_SPI_HOST SPI2_HOST -#define ST7789_BACKLIGHT_EN 42 +#define TFT_BL 42 #define SPI_FREQUENCY 40000000 #define SPI_READ_FREQUENCY 16000000 #define TFT_HEIGHT 320 @@ -18,12 +18,15 @@ #define TFT_OFFSET_ROTATION 0 #define SCREEN_ROTATE #define SCREEN_TRANSITION_FRAMERATE 5 +#define BRIGHTNESS_DEFAULT 130 // Medium Low Brightness #define HAS_TOUCHSCREEN 1 #define SCREEN_TOUCH_INT 16 #define TOUCH_I2C_PORT 0 #define TOUCH_SLAVE_ADDRESS 0x5D // GT911 +#define SLEEP_TIME 120 + #define BUTTON_PIN 0 // #define BUTTON_NEED_PULLUP @@ -94,4 +97,4 @@ #define SX126X_DIO2_AS_RF_SWITCH #define SX126X_DIO3_TCXO_VOLTAGE 1.8 // Internally the TTGO module hooks the SX1262-DIO2 in to control the TX/RX switch (which is the default for the sx1262interface -// code) +// code) \ No newline at end of file diff --git a/variants/t-echo/platformio.ini b/variants/t-echo/platformio.ini index 843bd88ff..5b295c96a 100644 --- a/variants/t-echo/platformio.ini +++ b/variants/t-echo/platformio.ini @@ -2,16 +2,26 @@ [env:t-echo] extends = nrf52840_base board = t-echo +board_check = true debug_tool = jlink # add -DCFG_SYSVIEW if you want to use the Segger systemview tool for OS profiling. build_flags = ${nrf52840_base.build_flags} -Ivariants/t-echo -DGPS_POWER_TOGGLE - -L "${platformio.libdeps_dir}/${this.__env__}/BSEC2 Software Library/src/cortex-m4/fpv4-sp-d16-hard" + -L "${platformio.libdeps_dir}/${this.__env__}/bsec2/src/cortex-m4/fpv4-sp-d16-hard" + -DEINK_DISPLAY_MODEL=GxEPD2_154_D67 + -DEINK_WIDTH=200 + -DEINK_HEIGHT=200 + -DUSE_EINK_DYNAMICDISPLAY ; Enable Dynamic EInk + -DEINK_LIMIT_FASTREFRESH=20 ; How many consecutive fast-refreshes are permitted + -DEINK_LIMIT_RATE_BACKGROUND_SEC=30 ; Minimum interval between BACKGROUND updates + -DEINK_LIMIT_RATE_RESPONSIVE_SEC=1 ; Minimum interval between RESPONSIVE updates +; -DEINK_LIMIT_GHOSTING_PX=2000 ; (Optional) How much image ghosting is tolerated + -DEINK_BACKGROUND_USES_FAST ; (Optional) Use FAST refresh for both BACKGROUND and RESPONSIVE, until a limit is reached. + build_src_filter = ${nrf52_base.build_src_filter} +<../variants/t-echo> lib_deps = ${nrf52840_base.lib_deps} - https://github.com/meshtastic/GxEPD2#afce87a97dda1ac31d8a28dc8fa7c6f55dc96a61 - adafruit/Adafruit BusIO@^1.13.2 + https://github.com/meshtastic/GxEPD2#55f618961db45a23eff0233546430f1e5a80f63a lewisxhe/PCF8563_Library@^1.0.1 -;upload_protocol = fs +;upload_protocol = fs \ No newline at end of file diff --git a/variants/t-echo/variant.h b/variants/t-echo/variant.h index 345091c2f..9abb4ea69 100644 --- a/variants/t-echo/variant.h +++ b/variants/t-echo/variant.h @@ -43,9 +43,10 @@ extern "C" { #define NUM_ANALOG_OUTPUTS (0) // LEDs -#define PIN_LED1 (0 + 14) // blue (confirmed on boards marked v1.0, date 2021-6-28) -#define PIN_LED2 (32 + 1) // green -#define PIN_LED3 (32 + 3) // red +#define PIN_LED1 (0 + 14) // 13 red (confirmed on 1.0 board) +// Unused(by firmware) LEDs: +#define PIN_LED2 (0 + 15) // 14 blue +#define PIN_LED3 (0 + 13) // 15 green #define LED_RED PIN_LED3 #define LED_BLUE PIN_LED1 @@ -55,7 +56,6 @@ extern "C" { #define LED_CONN PIN_GREEN #define LED_STATE_ON 0 // State when LED is lit -#define LED_INVERTED 1 /* * Buttons @@ -64,6 +64,9 @@ extern "C" { #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 #define PIN_BUTTON_TOUCH (0 + 11) // 0.11 is the soft touch button on T-Echo +#define BUTTON_CLICK_MS 400 +#define BUTTON_TOUCH_MS 200 + /* * Analog pins */ @@ -130,7 +133,7 @@ External serial flash WP25R1635FZUIL0 // Note DIO2 is attached internally to the module to an analog switch for TX/RX switching #define SX1262_DIO3 \ (0 + 21) // This is used as an *output* from the sx1262 and connected internally to power the tcxo, do not drive from the main - // CPU? +// CPU? #define SX126X_BUSY (0 + 17) #define SX126X_RESET (0 + 25) // Not really an E22 but TTGO seems to be trying to clone that @@ -155,9 +158,9 @@ External serial flash WP25R1635FZUIL0 #define PIN_EINK_SCLK (0 + 31) #define PIN_EINK_MOSI (0 + 29) // also called SDI -// Controls power for the eink display - Board power is enabled either by VBUS from USB or the CPU asserting PWR_ON -// FIXME - I think this is actually just the board power enable - it enables power to the CPU also -#define PIN_EINK_PWR_ON (0 + 12) +// Controls power for all peripherals (eink + GPS + LoRa + Sensor) +#define PIN_POWER_EN (0 + 12) +// #define PIN_POWER_EN1 (0 + 13) #define USE_EINK @@ -176,13 +179,13 @@ External serial flash WP25R1635FZUIL0 #define PIN_GPS_STANDBY (32 + 2) // An output to wake GPS, low means allow sleep, high means force wake // Seems to be missing on this new board // #define PIN_GPS_PPS (32 + 4) // Pulse per second input from the GPS -#define PIN_GPS_TX (32 + 9) // This is for bits going TOWARDS the CPU -#define PIN_GPS_RX (32 + 8) // This is for bits going TOWARDS the GPS +#define GPS_TX_PIN (32 + 9) // This is for bits going TOWARDS the CPU +#define GPS_RX_PIN (32 + 8) // This is for bits going TOWARDS the GPS #define GPS_THREAD_INTERVAL 50 -#define PIN_SERIAL1_RX PIN_GPS_TX -#define PIN_SERIAL1_TX PIN_GPS_RX +#define PIN_SERIAL1_RX GPS_TX_PIN +#define PIN_SERIAL1_TX GPS_RX_PIN // PCF8563 RTC Module #define PCF8563_RTC 0x51 @@ -208,19 +211,10 @@ External serial flash WP25R1635FZUIL0 // and has 12 bit resolution #define BATTERY_SENSE_RESOLUTION_BITS 12 #define BATTERY_SENSE_RESOLUTION 4096.0 -// Definition of milliVolt per LSB => 3.0V ADC range and 12-bit ADC resolution = 3000mV/4096 -#define VBAT_MV_PER_LSB (0.73242188F) -// Voltage divider value => 100K + 100K voltage divider on VBAT = (100K / (100K + 100K)) -#define VBAT_DIVIDER (0.5F) -// Compensation factor for the VBAT divider -#define VBAT_DIVIDER_COMP (2.0F) -// Fixed calculation of milliVolt from compensation value -#define REAL_VBAT_MV_PER_LSB (VBAT_DIVIDER_COMP * VBAT_MV_PER_LSB) #undef AREF_VOLTAGE #define AREF_VOLTAGE 3.0 #define VBAT_AR_INTERNAL AR_INTERNAL_3_0 -#define ADC_MULTIPLIER VBAT_DIVIDER_COMP -#define VBAT_RAW_TO_SCALED(x) (REAL_VBAT_MV_PER_LSB * x) +#define ADC_MULTIPLIER (2.0F) #define HAS_RTC 1 diff --git a/variants/t-watch-s3/pins_arduino.h b/variants/t-watch-s3/pins_arduino.h index d3dde6856..35f0e933e 100644 --- a/variants/t-watch-s3/pins_arduino.h +++ b/variants/t-watch-s3/pins_arduino.h @@ -3,14 +3,6 @@ #include -#define EXTERNAL_NUM_INTERRUPTS 46 -#define NUM_DIGITAL_PINS 48 -#define NUM_ANALOG_INPUTS 20 - -#define analogInputToDigitalPin(p) (((p) < NUM_ANALOG_INPUTS) ? (analogChannelToDigitalPin(p)) : -1) -#define digitalPinToInterrupt(p) (((p) < NUM_DIGITAL_PINS) ? (p) : -1) -#define digitalPinHasPWM(p) (p < EXTERNAL_NUM_INTERRUPTS) - // static const uint8_t LED_BUILTIN = -1; // static const uint8_t TX = 43; diff --git a/variants/t-watch-s3/platformio.ini b/variants/t-watch-s3/platformio.ini index d03273ed4..1f5fc278b 100644 --- a/variants/t-watch-s3/platformio.ini +++ b/variants/t-watch-s3/platformio.ini @@ -2,9 +2,8 @@ [env:t-watch-s3] extends = esp32s3_base board = t-watch-s3 +board_check = true upload_protocol = esptool -upload_speed = 115200 -upload_port = /dev/tty.usbmodem3485188D636C1 build_flags = ${esp32_base.build_flags} -DT_WATCH_S3 diff --git a/variants/t-watch-s3/variant.h b/variants/t-watch-s3/variant.h index c66fac5ef..9f939d859 100644 --- a/variants/t-watch-s3/variant.h +++ b/variants/t-watch-s3/variant.h @@ -8,7 +8,7 @@ #define ST7789_BUSY -1 #define ST7789_BL 45 #define ST7789_SPI_HOST SPI3_HOST -#define ST7789_BACKLIGHT_EN 45 +#define TFT_BL 45 #define SPI_FREQUENCY 40000000 #define SPI_READ_FREQUENCY 16000000 #define TFT_HEIGHT 240 @@ -25,11 +25,11 @@ #define TOUCH_I2C_PORT 1 #define TOUCH_SLAVE_ADDRESS 0x38 +#define SLEEP_TIME 180 + #define I2C_SDA1 39 // Used for capacitive touch #define I2C_SCL1 40 // Used for capacitive touch -#define TFT_BL ST7789_BACKLIGHT_EN - #define HAS_I2S #define DAC_I2S_BCK 48 #define DAC_I2S_WS 15 diff --git a/variants/tbeam-s3-core/pins_arduino.h b/variants/tbeam-s3-core/pins_arduino.h index 24edb7d9f..e66b69e02 100644 --- a/variants/tbeam-s3-core/pins_arduino.h +++ b/variants/tbeam-s3-core/pins_arduino.h @@ -6,13 +6,13 @@ #define USB_VID 0x303a #define USB_PID 0x1001 -#define EXTERNAL_NUM_INTERRUPTS 46 -#define NUM_DIGITAL_PINS 48 -#define NUM_ANALOG_INPUTS 20 - -#define analogInputToDigitalPin(p) (((p) < 20) ? (analogChannelToDigitalPin(p)) : -1) -#define digitalPinToInterrupt(p) (((p) < 48) ? (p) : -1) -#define digitalPinHasPWM(p) (p < 46) +// Now declared in .platformio/packages/framework-arduinoespressif32/cores/esp32/Arduino.h +// #define NUM_ANALOG_INPUTS 20 +// #define EXTERNAL_NUM_INTERRUPTS 46 +// #define NUM_DIGITAL_PINS 48 +// #define analogInputToDigitalPin(p) (((p) < 20) ? (analogChannelToDigitalPin(p)) : -1) +// #define digitalPinToInterrupt(p) (((p) < 48) ? (p) : -1) +// #define digitalPinHasPWM(p) (p < 46) static const uint8_t TX = 43; static const uint8_t RX = 44; @@ -39,4 +39,4 @@ static const uint8_t SCK = 12; // #define PMU_IRQ (40) #define RTC_INT (14) -#endif /* Pins_Arduino_h */ +#endif /* Pins_Arduino_h */ \ No newline at end of file diff --git a/variants/tbeam-s3-core/platformio.ini b/variants/tbeam-s3-core/platformio.ini index 99d315a69..e50d506b9 100644 --- a/variants/tbeam-s3-core/platformio.ini +++ b/variants/tbeam-s3-core/platformio.ini @@ -2,6 +2,7 @@ [env:tbeam-s3-core] extends = esp32s3_base board = tbeam-s3-core +board_check = true lib_deps = ${esp32s3_base.lib_deps} diff --git a/variants/tbeam-s3-core/variant.h b/variants/tbeam-s3-core/variant.h index 0fa9f8fe8..cc706459f 100644 --- a/variants/tbeam-s3-core/variant.h +++ b/variants/tbeam-s3-core/variant.h @@ -11,7 +11,7 @@ // anywhere. // #define EXT_NOTIFY_OUT 13 // Default pin to use for Ext Notify Module. -#define LED_INVERTED 1 +#define LED_STATE_ON 0 // State when LED is lit // 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 // not found then probe for SX1262 @@ -66,4 +66,4 @@ // has 32768 Hz crystal #define HAS_32768HZ -#define USE_SH1106 +#define USE_SH1106 \ No newline at end of file diff --git a/variants/tbeam/platformio.ini b/variants/tbeam/platformio.ini index 76a03d126..85e66c2dd 100644 --- a/variants/tbeam/platformio.ini +++ b/variants/tbeam/platformio.ini @@ -2,9 +2,10 @@ [env:tbeam] extends = esp32_base board = ttgo-t-beam +board_check = true lib_deps = ${esp32_base.lib_deps} build_flags = ${esp32_base.build_flags} -D TBEAM_V10 -I variants/tbeam -DGPS_POWER_TOGGLE ; comment this line to disable double press function on the user button to turn off gps entirely. -upload_speed = 921600 +upload_speed = 921600 \ No newline at end of file diff --git a/variants/tbeam/variant.h b/variants/tbeam/variant.h index d237f542b..8771c20d2 100644 --- a/variants/tbeam/variant.h +++ b/variants/tbeam/variant.h @@ -8,8 +8,8 @@ // anywhere. #define EXT_NOTIFY_OUT 13 // Default pin to use for Ext Notify Module. -#define LED_INVERTED 1 -#define LED_PIN 4 // Newer tbeams (1.1) have an extra led on GPIO4 +#define LED_STATE_ON 0 // State when LED is lit +#define LED_PIN 4 // Newer tbeams (1.1) have an extra led on GPIO4 // 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 // not found then probe for SX1262 diff --git a/variants/tbeam_v07/platformio.ini b/variants/tbeam_v07/platformio.ini index 5428b0e2a..0cba92400 100644 --- a/variants/tbeam_v07/platformio.ini +++ b/variants/tbeam_v07/platformio.ini @@ -1,7 +1,7 @@ ; The original TBEAM board without the AXP power chip and a few other changes [env:tbeam0_7] +board_level = extra extends = esp32_base board = ttgo-t-beam -board_level = extra build_flags = ${esp32_base.build_flags} -D TBEAM_V07 -I variants/tbeam_v07 \ No newline at end of file diff --git a/variants/tlora_c6/platformio.ini b/variants/tlora_c6/platformio.ini new file mode 100644 index 000000000..d042cd78b --- /dev/null +++ b/variants/tlora_c6/platformio.ini @@ -0,0 +1,10 @@ +[env:tlora-c6] +extends = esp32c6_base +board = esp32-c6-devkitm-1 +build_flags = + ${esp32c6_base.build_flags} + -D TLORA_C6 + -I variants/tlora_c6 + -DARDUINO_USB_CDC_ON_BOOT=1 + -DARDUINO_USB_MODE=1 + -L "${platformio.libdeps_dir}/${this.__env__}/bsec2/src/esp32c3" \ No newline at end of file diff --git a/variants/tlora_c6/variant.h b/variants/tlora_c6/variant.h new file mode 100644 index 000000000..55635fe13 --- /dev/null +++ b/variants/tlora_c6/variant.h @@ -0,0 +1,21 @@ +#define I2C_SDA 8 // I2C pins for this board +#define I2C_SCL 9 + +#define LED_PIN 7 // If defined we will blink this LED +#define LED_STATE_ON 0 // State when LED is lit + +#define USE_SX1262 +#define LORA_SCK 6 +#define LORA_MISO 1 +#define LORA_MOSI 0 +#define LORA_CS 18 +#define LORA_RESET 21 +#define SX126X_CS LORA_CS +#define SX126X_DIO1 23 +#define SX126X_DIO2 20 +#define SX126X_BUSY 22 +#define SX126X_RESET LORA_RESET +#define SX126X_RXEN 15 +#define SX126X_TXEN 14 +#define SX126X_DIO2_AS_RF_SWITCH +#define SX126X_DIO3_TCXO_VOLTAGE 1.8 diff --git a/variants/tlora_t3s3_epaper/pins_arduino.h b/variants/tlora_t3s3_epaper/pins_arduino.h new file mode 100644 index 000000000..ca44959c8 --- /dev/null +++ b/variants/tlora_t3s3_epaper/pins_arduino.h @@ -0,0 +1,26 @@ +#ifndef Pins_Arduino_h +#define Pins_Arduino_h + +#include + +#define USB_VID 0x303a +#define USB_PID 0x1001 + +// The default Wire will be mapped to PMU and RTC +static const uint8_t SDA = 18; +static const uint8_t SCL = 12; // t3s3 e-Paper has no pin 17 as t3s3 v1, so use another free pin next to it + +// Default SPI will be mapped to Radio +static const uint8_t SS = 7; +static const uint8_t MOSI = 6; +static const uint8_t MISO = 3; +static const uint8_t SCK = 5; + +#define SPI_MOSI (11) +#define SPI_SCK (14) +#define SPI_MISO (2) +#define SPI_CS (13) + +#define SDCARD_CS SPI_CS + +#endif /* Pins_Arduino_h */ diff --git a/variants/tlora_t3s3_epaper/platformio.ini b/variants/tlora_t3s3_epaper/platformio.ini new file mode 100644 index 000000000..ceb4fbaf5 --- /dev/null +++ b/variants/tlora_t3s3_epaper/platformio.ini @@ -0,0 +1,23 @@ +[env:tlora-t3s3-epaper] +extends = esp32s3_base +board = tlora-t3s3-v1 +board_check = true +upload_protocol = esptool + +build_flags = + ${esp32_base.build_flags} -D TLORA_T3S3_EPAPER -I variants/tlora_t3s3_epaper + -DGPS_POWER_TOGGLE + -DEINK_DISPLAY_MODEL=GxEPD2_213_BN + -DEINK_WIDTH=250 + -DEINK_HEIGHT=122 + -DUSE_EINK_DYNAMICDISPLAY ; Enable Dynamic EInk + -DEINK_LIMIT_FASTREFRESH=10 ; How many consecutive fast-refreshes are permitted + -DEINK_LIMIT_RATE_BACKGROUND_SEC=30 ; Minimum interval between BACKGROUND updates + -DEINK_LIMIT_RATE_RESPONSIVE_SEC=1 ; Minimum interval between RESPONSIVE updates + -DEINK_HASQUIRK_VICIOUSFASTREFRESH ; Identify that pixels drawn by fast-refresh are harder to clear + ;-DEINK_LIMIT_GHOSTING_PX=2000 ; (Optional) How much image ghosting is tolerated + ;-DEINK_BACKGROUND_USES_FAST ; (Optional) Use FAST refresh for both BACKGROUND and RESPONSIVE, until a limit is reached. + +lib_deps = + ${esp32s3_base.lib_deps} + https://github.com/meshtastic/GxEPD2#b202ebfec6a4821e098cf7a625ba0f6f2400292d diff --git a/variants/tlora_t3s3_epaper/variant.h b/variants/tlora_t3s3_epaper/variant.h new file mode 100644 index 000000000..461ce0c31 --- /dev/null +++ b/variants/tlora_t3s3_epaper/variant.h @@ -0,0 +1,69 @@ +#define HAS_SDCARD +#define SDCARD_USE_SPI1 + +// Display (E-Ink) +#define USE_EINK +#define PIN_EINK_CS 15 +#define PIN_EINK_BUSY 48 +#define PIN_EINK_DC 16 +#define PIN_EINK_RES 47 +#define PIN_EINK_SCLK 14 +#define PIN_EINK_MOSI 11 + +#define BATTERY_PIN 1 // A battery voltage measurement pin, voltage divider connected here to +// measure battery voltage ratio of voltage divider = 2.0 (assumption) +#define ADC_MULTIPLIER 2.11 // 2.0 + 10% for correction of display undervoltage. +#define ADC_CHANNEL ADC1_GPIO1_CHANNEL + +#define I2C_SDA SDA +#define I2C_SCL SCL + +// external qwiic connector +#define GPS_RX_PIN 44 +#define GPS_TX_PIN 43 + +#define LED_PIN 37 +#define BUTTON_PIN 0 +#define BUTTON_NEED_PULLUP + +// 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 not found then probe for SX1262 +#define USE_RF95 // RFM95/SX127x +#define USE_SX1262 +#define USE_SX1280 + +#define LORA_SCK 5 +#define LORA_MISO 3 +#define LORA_MOSI 6 +#define LORA_CS 7 +#define LORA_RESET 8 + +// per SX1276_Receive_Interrupt/utilities.h +#define LORA_DIO0 9 +#define LORA_DIO1 33 // TCXO_EN ? +#define LORA_DIO2 34 +#define LORA_RXEN 21 +#define LORA_TXEN 10 + +// per SX1262_Receive_Interrupt/utilities.h +#ifdef USE_SX1262 +#define SX126X_CS LORA_CS +#define SX126X_DIO1 33 +#define SX126X_BUSY 34 +#define SX126X_RESET LORA_RESET +#define SX126X_DIO2_AS_RF_SWITCH +#define SX126X_DIO3_TCXO_VOLTAGE 1.8 +#endif + +// per SX128x_Receive_Interrupt/utilities.h +#ifdef USE_SX1280 +#define SX128X_CS LORA_CS +#define SX128X_DIO1 9 +#define SX128X_DIO2 33 +#define SX128X_DIO3 34 +#define SX128X_BUSY 36 +#define SX128X_RESET LORA_RESET +#define SX128X_RXEN 21 +#define SX128X_TXEN 10 +#define SX128X_MAX_POWER 3 +#endif diff --git a/variants/tlora_t3s3_v1/pins_arduino.h b/variants/tlora_t3s3_v1/pins_arduino.h index 627dad19d..4ced1b446 100644 --- a/variants/tlora_t3s3_v1/pins_arduino.h +++ b/variants/tlora_t3s3_v1/pins_arduino.h @@ -6,14 +6,6 @@ #define USB_VID 0x303a #define USB_PID 0x1001 -#define EXTERNAL_NUM_INTERRUPTS 46 -#define NUM_DIGITAL_PINS 48 -#define NUM_ANALOG_INPUTS 20 - -#define analogInputToDigitalPin(p) (((p) < 20) ? (analogChannelToDigitalPin(p)) : -1) -#define digitalPinToInterrupt(p) (((p) < 48) ? (p) : -1) -#define digitalPinHasPWM(p) (p < 46) - // The default Wire will be mapped to PMU and RTC static const uint8_t SDA = 18; static const uint8_t SCL = 17; diff --git a/variants/tlora_t3s3_v1/platformio.ini b/variants/tlora_t3s3_v1/platformio.ini index fd3d393d9..0a5797280 100644 --- a/variants/tlora_t3s3_v1/platformio.ini +++ b/variants/tlora_t3s3_v1/platformio.ini @@ -1,7 +1,8 @@ [env:tlora-t3s3-v1] extends = esp32s3_base board = tlora-t3s3-v1 -upload_protocol = esp-builtin +board_check = true +upload_protocol = esptool build_flags = ${esp32_base.build_flags} -D TLORA_T3S3_V1 -I variants/tlora_t3s3_v1 diff --git a/variants/tlora_t3s3_v1/rfswitch.h b/variants/tlora_t3s3_v1/rfswitch.h new file mode 100644 index 000000000..19080cec6 --- /dev/null +++ b/variants/tlora_t3s3_v1/rfswitch.h @@ -0,0 +1,11 @@ +#include "RadioLib.h" + +static const uint32_t rfswitch_dio_pins[] = {RADIOLIB_LR11X0_DIO5, RADIOLIB_LR11X0_DIO6, RADIOLIB_NC, RADIOLIB_NC, RADIOLIB_NC}; + +static const Module::RfSwitchMode_t rfswitch_table[] = { + // mode DIO5 DIO6 + {LR11x0::MODE_STBY, {LOW, LOW}}, {LR11x0::MODE_RX, {HIGH, LOW}}, + {LR11x0::MODE_TX, {LOW, HIGH}}, {LR11x0::MODE_TX_HP, {LOW, HIGH}}, + {LR11x0::MODE_TX_HF, {LOW, LOW}}, {LR11x0::MODE_GNSS, {LOW, LOW}}, + {LR11x0::MODE_WIFI, {LOW, LOW}}, END_OF_MODE_TABLE, +}; \ No newline at end of file diff --git a/variants/tlora_t3s3_v1/variant.h b/variants/tlora_t3s3_v1/variant.h index 8a1af1ec2..babe44a58 100644 --- a/variants/tlora_t3s3_v1/variant.h +++ b/variants/tlora_t3s3_v1/variant.h @@ -24,6 +24,7 @@ #define USE_RF95 // RFM95/SX127x #define USE_SX1262 #define USE_SX1280 +#define USE_LR1121 #define LORA_SCK 5 #define LORA_MISO 3 @@ -60,3 +61,19 @@ #define SX128X_TXEN 10 #define SX128X_MAX_POWER 3 #endif + +// LR1121 +#ifdef USE_LR1121 +#define LR1121_IRQ_PIN 36 +#define LR1121_NRESET_PIN LORA_RESET +#define LR1121_BUSY_PIN LORA_DIO2 +#define LR1121_SPI_NSS_PIN LORA_CS +#define LR1121_SPI_SCK_PIN LORA_SCK +#define LR1121_SPI_MOSI_PIN LORA_MOSI +#define LR1121_SPI_MISO_PIN LORA_MISO +#define LR11X0_DIO3_TCXO_VOLTAGE 3.0 +#define LR11X0_DIO_AS_RF_SWITCH +#endif + +#define HAS_SDCARD // Have SPI interface SD card slot +#define SDCARD_USE_SPI1 \ No newline at end of file diff --git a/variants/tlora_v1/variant.h b/variants/tlora_v1/variant.h index 08fefa809..83e2c193e 100644 --- a/variants/tlora_v1/variant.h +++ b/variants/tlora_v1/variant.h @@ -4,8 +4,9 @@ #define RESET_OLED 16 // If defined, this pin will be used to reset the display controller #define VEXT_ENABLE 21 // active low, powers the oled display and the lora antenna boost -#define LED_PIN 2 // If defined we will blink this LED -#define BUTTON_PIN 0 // If defined, this will be used for user button presses +#define VEXT_ON_VALUE LOW +#define LED_PIN 2 // If defined we will blink this LED +#define BUTTON_PIN 0 // If defined, this will be used for user button presses #define BUTTON_NEED_PULLUP #define EXT_NOTIFY_OUT 13 // Default pin to use for Ext Notify Module. diff --git a/variants/tlora_v1_3/platformio.ini b/variants/tlora_v1_3/platformio.ini index 739f76268..9d9f41a7c 100644 --- a/variants/tlora_v1_3/platformio.ini +++ b/variants/tlora_v1_3/platformio.ini @@ -1,6 +1,5 @@ [env:tlora_v1_3] extends = esp32_base -board_level = extra board = ttgo-lora32-v1 build_flags = ${esp32_base.build_flags} -D TLORA_V1_3 -I variants/tlora_v1_3 \ No newline at end of file diff --git a/variants/tlora_v2/platformio.ini b/variants/tlora_v2/platformio.ini index 25ae3a360..8710068af 100644 --- a/variants/tlora_v2/platformio.ini +++ b/variants/tlora_v2/platformio.ini @@ -1,6 +1,5 @@ [env:tlora-v2] extends = esp32_base board = ttgo-lora32-v1 -board_level = extra build_flags = ${esp32_base.build_flags} -D TLORA_V2 -I variants/tlora_v2 \ No newline at end of file diff --git a/variants/tlora_v2_1_16/platformio.ini b/variants/tlora_v2_1_16/platformio.ini index 167f6c37c..351f71676 100644 --- a/variants/tlora_v2_1_16/platformio.ini +++ b/variants/tlora_v2_1_16/platformio.ini @@ -1,6 +1,7 @@ [env:tlora-v2-1-1_6] extends = esp32_base board = ttgo-lora32-v21 +board_check = true build_flags = ${esp32_base.build_flags} -D TLORA_V2_1_16 -I variants/tlora_v2_1_16 -DGPS_POWER_TOGGLE ; comment this line to disable triple press function on the user button to turn off gps entirely. \ No newline at end of file diff --git a/variants/tracker-t1000-e/platformio.ini b/variants/tracker-t1000-e/platformio.ini new file mode 100644 index 000000000..dfc72f3f0 --- /dev/null +++ b/variants/tracker-t1000-e/platformio.ini @@ -0,0 +1,16 @@ +; tracker-t1000-e v0.9.1 +[env:tracker-t1000-e] +extends = nrf52840_base +board = tracker-t1000-e +; board_level = extra +; platform = https://github.com/maxgerhardt/platform-nordicnrf52#cac6fcf943a41accd2aeb4f3659ae297a73f422e +build_flags = ${nrf52840_base.build_flags} -Ivariants/tracker-t1000-e -Isrc/platform/nrf52/softdevice -Isrc/platform/nrf52/softdevice/nrf52 -DTRACKER_T1000_E + -L "${platformio.libdeps_dir}/${this.__env__}/bsec2/src/cortex-m4/fpv4-sp-d16-hard" + -DGPS_POWER_TOGGLE ; comment this line to disable triple press function on the user button to turn off gps entirely. +board_build.ldscript = src/platform/nrf52/nrf52840_s140_v7.ld +build_src_filter = ${nrf52_base.build_src_filter} +<../variants/tracker-t1000-e> +lib_deps = + ${nrf52840_base.lib_deps} +debug_tool = jlink +; If not set we will default to uploading over serial (first it forces bootloader entry by talking 1200bps to cdcacm) +upload_protocol = nrfutil diff --git a/variants/tracker-t1000-e/rfswitch.h b/variants/tracker-t1000-e/rfswitch.h new file mode 100644 index 000000000..e229d77cf --- /dev/null +++ b/variants/tracker-t1000-e/rfswitch.h @@ -0,0 +1,13 @@ +#include "RadioLib.h" +#include "nrf.h" + +static const uint32_t rfswitch_dio_pins[Module::RFSWITCH_MAX_PINS] = {RADIOLIB_LR11X0_DIO5, RADIOLIB_LR11X0_DIO6, + RADIOLIB_LR11X0_DIO7, RADIOLIB_LR11X0_DIO8, RADIOLIB_NC}; + +static const Module::RfSwitchMode_t rfswitch_table[] = { + // mode DIO5 DIO6 DIO7 DIO8 + {LR11x0::MODE_STBY, {LOW, LOW, LOW, LOW}}, {LR11x0::MODE_RX, {HIGH, LOW, LOW, HIGH}}, + {LR11x0::MODE_TX, {HIGH, HIGH, LOW, HIGH}}, {LR11x0::MODE_TX_HP, {LOW, HIGH, LOW, HIGH}}, + {LR11x0::MODE_TX_HF, {LOW, LOW, LOW, LOW}}, {LR11x0::MODE_GNSS, {LOW, LOW, HIGH, LOW}}, + {LR11x0::MODE_WIFI, {LOW, LOW, LOW, LOW}}, END_OF_MODE_TABLE, +}; \ No newline at end of file diff --git a/variants/tracker-t1000-e/variant.cpp b/variants/tracker-t1000-e/variant.cpp new file mode 100644 index 000000000..85e0c44f3 --- /dev/null +++ b/variants/tracker-t1000-e/variant.cpp @@ -0,0 +1,64 @@ +/* + Copyright (c) 2014-2015 Arduino LLC. All right reserved. + Copyright (c) 2016 Sandeep Mistry All right reserved. + Copyright (c) 2018, Adafruit Industries (adafruit.com) + + This library is free software; you can redistribute it and/or + modify it under the terms of the GNU Lesser General Public + License as published by the Free Software Foundation; either + version 2.1 of the License, or (at your option) any later version. + + This library is distributed in the hope that it will be useful, + but WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. + See the GNU Lesser General Public License for more details. + + You should have received a copy of the GNU Lesser General Public + License along with this library; if not, write to the Free Software + Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA +*/ + +#include "variant.h" +#include "nrf.h" +#include "wiring_constants.h" +#include "wiring_digital.h" + +const uint32_t g_ADigitalPinMap[] = { + // P0 + 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, + + // P1 + 32, 33, 34, 35, 36, 37, 38, 39, 40, 41, 42, 43, 44, 45, 46, 47}; + +void initVariant() +{ + // LED1 & LED2 + pinMode(LED_PIN, OUTPUT); + digitalWrite(LED_PIN, LOW); + + pinMode(PIN_3V3_EN, OUTPUT); + digitalWrite(PIN_3V3_EN, HIGH); + + pinMode(PIN_3V3_ACC_EN, OUTPUT); + digitalWrite(PIN_3V3_ACC_EN, LOW); + + pinMode(BUZZER_EN_PIN, OUTPUT); + digitalWrite(BUZZER_EN_PIN, HIGH); + + pinMode(PIN_GPS_EN, OUTPUT); + digitalWrite(PIN_GPS_EN, LOW); + + pinMode(GPS_VRTC_EN, OUTPUT); + digitalWrite(GPS_VRTC_EN, HIGH); + + pinMode(PIN_GPS_RESET, OUTPUT); + digitalWrite(PIN_GPS_RESET, LOW); + + pinMode(GPS_SLEEP_INT, OUTPUT); + digitalWrite(GPS_SLEEP_INT, HIGH); + + pinMode(GPS_RTC_INT, OUTPUT); + digitalWrite(GPS_RTC_INT, LOW); + + pinMode(GPS_RESETB_OUT, INPUT); +} \ No newline at end of file diff --git a/variants/tracker-t1000-e/variant.h b/variants/tracker-t1000-e/variant.h new file mode 100644 index 000000000..b8eb59b31 --- /dev/null +++ b/variants/tracker-t1000-e/variant.h @@ -0,0 +1,152 @@ +/* + Copyright (c) 2014-2015 Arduino LLC. All right reserved. + Copyright (c) 2016 Sandeep Mistry All right reserved. + Copyright (c) 2018, Adafruit Industries (adafruit.com) + + This library is free software; you can redistribute it and/or + modify it under the terms of the GNU Lesser General Public + License as published by the Free Software Foundation; either + version 2.1 of the License, or (at your option) any later version. + This library is distributed in the hope that it will be useful, + but WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. + See the GNU Lesser General Public License for more details. + You should have received a copy of the GNU Lesser General Public + License along with this library; if not, write to the Free Software + Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA +*/ + +#ifndef _VARIANT_TRACKER_T1000_E_ +#define _VARIANT_TRACKER_T1000_E_ + +/** Master clock frequency */ +#define VARIANT_MCK (64000000ul) + +#define USE_LFXO // Board uses 32khz crystal for LF + +/*---------------------------------------------------------------------------- + * Headers + *----------------------------------------------------------------------------*/ + +#include "WVariant.h" + +#ifdef __cplusplus +extern "C" { +#endif // __cplusplus + +// Number of pins defined in PinDescription array +#define PINS_COUNT (48) +#define NUM_DIGITAL_PINS (48) +#define NUM_ANALOG_INPUTS (6) +#define NUM_ANALOG_OUTPUTS (0) + +// Use the native nrf52 usb power detection +#define NRF_APM + +#define PIN_3V3_EN (32 + 6) // P1.6, Power to Sensors +#define PIN_3V3_ACC_EN (32 + 7) // P1.7, Power to Acc + +#define PIN_LED1 (0 + 24) // P0.24 +#define LED_PIN PIN_LED1 +#define LED_BUILTIN -1 +#define LED_BLUE -1 // Actually green +#define LED_STATE_ON 1 // State when LED is lit + +#define BUTTON_PIN (0 + 6) // P0.6 +#define BUTTON_ACTIVE_LOW false +#define BUTTON_ACTIVE_PULLUP false +#define BUTTON_SENSE_TYPE 0x6 + +#define HAS_WIRE 1 + +#define WIRE_INTERFACES_COUNT 1 + +// unused pins +#define PIN_WIRE_SDA (0 + 9) // P0.26 +#define PIN_WIRE_SCL (0 + 10) // P0.27 + +/* + * Serial interfaces + */ +#define PIN_SERIAL1_RX (0 + 14) // P0.14 +#define PIN_SERIAL1_TX (0 + 13) // P0.13 + +#define PIN_SERIAL2_RX (0 + 17) // P0.17 +#define PIN_SERIAL2_TX (0 + 16) // P0.16 + +#define SPI_INTERFACES_COUNT 1 + +#define PIN_SPI_MISO (32 + 8) // P1.08 +#define PIN_SPI_MOSI (32 + 9) // P1.09 +#define PIN_SPI_SCK (0 + 11) // P0.11 +#define PIN_SPI_NSS (0 + 12) // P0.12 + +#define LORA_RESET (32 + 10) // P1.10 // RST +#define LORA_DIO1 (32 + 1) // P1.01 // IRQ +#define LORA_DIO2 (0 + 7) // P0.07 // BUSY +#define LORA_SCK PIN_SPI_SCK +#define LORA_MISO PIN_SPI_MISO +#define LORA_MOSI PIN_SPI_MOSI +#define LORA_CS PIN_SPI_NSS + +// supported modules list +#define USE_LR1110 + +#define LR1110_IRQ_PIN LORA_DIO1 +#define LR1110_NRESET_PIN LORA_RESET +#define LR1110_BUSY_PIN LORA_DIO2 +#define LR1110_SPI_NSS_PIN LORA_CS +#define LR1110_SPI_SCK_PIN LORA_SCK +#define LR1110_SPI_MOSI_PIN LORA_MOSI +#define LR1110_SPI_MISO_PIN LORA_MISO + +#define LR11X0_DIO3_TCXO_VOLTAGE 1.6 +#define LR11X0_DIO_AS_RF_SWITCH + +#define HAS_GPS 1 +#define GNSS_AIROHA +#define GPS_RX_PIN PIN_SERIAL1_RX +#define GPS_TX_PIN PIN_SERIAL1_TX + +#define GPS_BAUDRATE 115200 + +#define PIN_GPS_EN (32 + 11) // P1.11 +#define GPS_EN_ACTIVE HIGH + +#define PIN_GPS_RESET (32 + 15) // P1.15 +#define GPS_RESET_MODE HIGH + +#define GPS_VRTC_EN (0 + 8) // P0.8, awlays high +#define GPS_SLEEP_INT (32 + 12) // P1.12, awlays high +#define GPS_RTC_INT (0 + 15) // P0.15, normal is LOW, wake by HIGH +#define GPS_RESETB_OUT (32 + 14) // P1.14, awlays input pull_up + +#define GPS_FIX_HOLD_TIME 15000 // ms +#define BATTERY_PIN 2 +#define ADC_MULTIPLIER (2.0F) + +#define ADC_RESOLUTION 14 +#define BATTERY_SENSE_RESOLUTION_BITS 12 + +#undef AREF_VOLTAGE +#define AREF_VOLTAGE 3.0 +#define VBAT_AR_INTERNAL AR_INTERNAL_3_0 + +// Buzzer +#define BUZZER_EN_PIN (32 + 5) // P1.05, awlays high +#define PIN_BUZZER (0 + 25) // P0.25, pwm output + +#define T1000X_SENSOR_EN +#define T1000X_VCC_PIN (0 + 4) // P0.4 +#define T1000X_NTC_PIN (0 + 31) // P0.31 +#define T1000X_LUX_PIN (0 + 29) // P0.29 + +#ifdef __cplusplus +} +#endif + +/*---------------------------------------------------------------------------- + * Arduino objects - C++ only + *----------------------------------------------------------------------------*/ + +#endif // _VARIANT_TRACKER_T1000_E_ \ No newline at end of file diff --git a/variants/trackerd/platformio.ini b/variants/trackerd/platformio.ini index 23868ffb4..6fba190f3 100644 --- a/variants/trackerd/platformio.ini +++ b/variants/trackerd/platformio.ini @@ -4,10 +4,10 @@ extends = esp32_base platform = espressif32 board = pico32 board_build.f_flash = 80000000L -board_level = extra + build_flags = ${esp32_base.build_flags} -D PRIVATE_HW -I variants/trackerd -D BSFILE=\"boards/dragino_lbt2.h\" ;board_build.partitions = no_ota.csv ;platform_packages = ; platformio/framework-arduinoespressif32@3 -;platformio/framework-arduinoespressif32 @ https://github.com/espressif/arduino-esp32.git#2.0.1-RC1 \ No newline at end of file +;platformio/framework-arduinoespressif32 @ https://github.com/espressif/arduino-esp32.git#2.0.1-RC1 diff --git a/variants/trackerd/variant.h b/variants/trackerd/variant.h index b3fca367f..c4dfb9e93 100644 --- a/variants/trackerd/variant.h +++ b/variants/trackerd/variant.h @@ -10,7 +10,7 @@ #define LED_PIN 13 // 13 red, 2 blue, 15 red -//#define HAS_BUTTON 0 +// #define HAS_BUTTON 0 #define BUTTON_PIN 0 #define BUTTON_NEED_PULLUP @@ -20,27 +20,34 @@ #define LORA_DIO1 33 #define LORA_DIO2 32 // Not really used -#define BATTERY_PIN 35 // A battery voltage measurement pin, voltage divider connected here to measure battery voltage +#undef BAT_MEASURE_ADC_UNIT +#define BATTERY_PIN 35 // A battery voltage measurement pin, voltage divider connected here to measure battery voltage +#define ADC_MULTIPLIER 1.34 // tracked resistance divider is 100k+470k, so it can not fillfull well on esp32 adc +#define ADC_CHANNEL ADC1_GPIO35_CHANNEL +#define ADC_ATTENUATION ADC_ATTEN_DB_12 // lower dB for high resistance voltage divider -// Battery -// The battery sense is hooked to pin A0 (4) -// it is defined in the anlaolgue pin section of this file -// and has 12 bit resolution -#define BATTERY_SENSE_RESOLUTION_BITS 12 -#define BATTERY_SENSE_RESOLUTION 4096.0 -// Definition of milliVolt per LSB => 3.0V ADC range and 12-bit ADC resolution = 3000mV/4096 -#define VBAT_MV_PER_LSB (0.73242188F) -// Voltage divider value => 100K + 100K voltage divider on VBAT = (100K / (100K + 100K)) -#define VBAT_DIVIDER (0.5F) -// Compensation factor for the VBAT divider -#define VBAT_DIVIDER_COMP (2.0) -// Fixed calculation of milliVolt from compensation value -#define REAL_VBAT_MV_PER_LSB (VBAT_DIVIDER_COMP * VBAT_MV_PER_LSB) -#undef AREF_VOLTAGE -#define AREF_VOLTAGE 3.0 -#define VBAT_AR_INTERNAL AR_INTERNAL_3_0 -#define ADC_MULTIPLIER VBAT_DIVIDER_COMP -#define VBAT_RAW_TO_SCALED(x) (REAL_VBAT_MV_PER_LSB * x) +#undef GPS_RX_PIN +#undef GPS_TX_PIN +#undef PIN_GPS_PPS -//#define BATTERY_SENSE_SAMPLES 15 // Set the number of samples, It has an effect of increasing sensitivity. -//#define ADC_MULTIPLIER 3.3 \ No newline at end of file +#define PIN_GPS_EN 12 +#define GPS_EN_ACTIVE 1 + +#define GPS_TX_PIN 10 +#define GPS_RX_PIN 9 + +#define PIN_GPS_RESET 25 +// #define PIN_GPS_REINIT 25 +#define GPS_RESET_MODE 1 + +#define GPS_L76K + +#undef PIN_LED1 +#undef PIN_LED2 +#undef PIN_LED3 + +#define PIN_LED1 13 +#define PIN_LED2 15 +#define PIN_LED3 2 + +#define ledOff(pin) pinMode(pin, INPUT) \ No newline at end of file diff --git a/variants/tracksenger/internal/pins_arduino.h b/variants/tracksenger/internal/pins_arduino.h new file mode 100644 index 000000000..1052af961 --- /dev/null +++ b/variants/tracksenger/internal/pins_arduino.h @@ -0,0 +1,72 @@ +#ifndef Pins_Arduino_h +#define Pins_Arduino_h + +#include "soc/soc_caps.h" +#include + +#define WIFI_LoRa_32_V3 true +#define DISPLAY_HEIGHT 80 +#define DISPLAY_WIDTH 160 + +#define USB_VID 0x303a +#define USB_PID 0x1001 + +static const uint8_t LED_BUILTIN = 18; +#define BUILTIN_LED LED_BUILTIN // backward compatibility +#define LED_BUILTIN LED_BUILTIN + +static const uint8_t TX = 43; +static const uint8_t RX = 44; + +static const uint8_t SDA = 45; +static const uint8_t SCL = 46; + +static const uint8_t SS = 8; +static const uint8_t MOSI = 10; +static const uint8_t MISO = 11; +static const uint8_t SCK = 9; + +static const uint8_t A0 = 1; +static const uint8_t A1 = 2; +static const uint8_t A2 = 3; +static const uint8_t A3 = 4; +static const uint8_t A4 = 5; +static const uint8_t A5 = 6; +static const uint8_t A6 = 7; +static const uint8_t A7 = 8; +static const uint8_t A8 = 9; +static const uint8_t A9 = 10; +static const uint8_t A10 = 11; +static const uint8_t A11 = 12; +static const uint8_t A12 = 13; +static const uint8_t A13 = 14; +static const uint8_t A14 = 15; +static const uint8_t A15 = 16; +static const uint8_t A16 = 17; +static const uint8_t A17 = 18; +static const uint8_t A18 = 19; +static const uint8_t A19 = 20; + +static const uint8_t T1 = 1; +static const uint8_t T2 = 2; +static const uint8_t T3 = 3; +static const uint8_t T4 = 4; +static const uint8_t T5 = 5; +static const uint8_t T6 = 6; +static const uint8_t T7 = 7; +static const uint8_t T8 = 8; +static const uint8_t T9 = 9; +static const uint8_t T10 = 10; +static const uint8_t T11 = 11; +static const uint8_t T12 = 12; +static const uint8_t T13 = 13; +static const uint8_t T14 = 14; + +static const uint8_t Vext = 36; +static const uint8_t LED = 18; + +static const uint8_t RST_LoRa = 12; +static const uint8_t BUSY_LoRa = 13; +static const uint8_t DIO0 = 14; + +#endif /* Pins_Arduino_h */ diff --git a/variants/tracksenger/internal/variant.h b/variants/tracksenger/internal/variant.h new file mode 100644 index 000000000..57ead848d --- /dev/null +++ b/variants/tracksenger/internal/variant.h @@ -0,0 +1,92 @@ +#define LED_PIN 18 + +#define HELTEC_TRACKER_V1_X + +// TRACKSENGER builtin LCD + +// I2C +#define I2C_SDA SDA +#define I2C_SCL SCL + +// ST7735S TFT LCD +#define ST7735S 1 // there are different (sub-)versions of ST7735 +#define ST7735_CS 38 +#define ST7735_RS 40 // DC +#define ST7735_SDA 42 // MOSI +#define ST7735_SCK 41 +#define ST7735_RESET 39 +#define ST7735_MISO -1 +#define ST7735_BUSY -1 +#define TFT_BL 21 /* V1.1 PCB marking */ +#define ST7735_SPI_HOST SPI3_HOST +#define SPI_FREQUENCY 40000000 +#define SPI_READ_FREQUENCY 16000000 +#define SCREEN_ROTATE +#define TFT_HEIGHT DISPLAY_WIDTH +#define TFT_WIDTH DISPLAY_HEIGHT +#define TFT_OFFSET_X 26 +#define TFT_OFFSET_Y -1 +#define SCREEN_TRANSITION_FRAMERATE 3 // fps +#define DISPLAY_FORCE_SMALL_FONTS + +#define VEXT_ENABLE 3 // active HIGH, powers the lora antenna boost +#define VEXT_ON_VALUE HIGH +#define BUTTON_PIN 0 + +#define BATTERY_PIN 1 // A battery voltage measurement pin, voltage divider connected here to measure battery voltage +#define ADC_CHANNEL ADC1_GPIO1_CHANNEL +#define ADC_ATTENUATION ADC_ATTEN_DB_2_5 // lower dB for high resistance voltage divider +#define ADC_MULTIPLIER 4.9 +#define ADC_CTRL 2 // active HIGH, powers the voltage divider. Only on 1.1 +#define ADC_CTRL_ENABLED HIGH + +#undef GPS_RX_PIN +#undef GPS_TX_PIN +#define GPS_RX_PIN 33 +#define GPS_TX_PIN 34 +#define PIN_GPS_RESET 35 +#define PIN_GPS_PPS 36 + +#define GPS_RESET_MODE LOW +#define GPS_UC6580 +#define GPS_BAUDRATE 115200 + +#define USE_SX1262 +#define LORA_DIO0 -1 // a No connect on the SX1262 module +#define LORA_RESET 12 +#define LORA_DIO1 14 // SX1262 IRQ +#define LORA_DIO2 13 // SX1262 BUSY +#define LORA_DIO3 // Not connected on PCB, but internally on the TTGO SX1262, if DIO3 is high the TXCO is enabled + +#define LORA_SCK 9 +#define LORA_MISO 11 +#define LORA_MOSI 10 +#define LORA_CS 8 + +#define SX126X_CS LORA_CS +#define SX126X_DIO1 LORA_DIO1 +#define SX126X_BUSY LORA_DIO2 +#define SX126X_RESET LORA_RESET + +#define SX126X_DIO2_AS_RF_SWITCH +#define SX126X_DIO3_TCXO_VOLTAGE 1.8 + +// Picomputer gets a white on black display +#define TFT_MESH COLOR565(0xFF, 0xFF, 0xFF) + +// keyboard changes + +#define PIN_BUZZER 43 +#define CANNED_MESSAGE_MODULE_ENABLE 1 + +#define INPUTBROKER_MATRIX_TYPE 1 + +#define KEYS_COLS \ + { \ + 44, 45, 46, 4, 5, 6 \ + } +#define KEYS_ROWS \ + { \ + 26, 37, 17, 16, 15, 7 \ + } +// #end keyboard \ No newline at end of file diff --git a/variants/tracksenger/lcd/pins_arduino.h b/variants/tracksenger/lcd/pins_arduino.h new file mode 100644 index 000000000..1052af961 --- /dev/null +++ b/variants/tracksenger/lcd/pins_arduino.h @@ -0,0 +1,72 @@ +#ifndef Pins_Arduino_h +#define Pins_Arduino_h + +#include "soc/soc_caps.h" +#include + +#define WIFI_LoRa_32_V3 true +#define DISPLAY_HEIGHT 80 +#define DISPLAY_WIDTH 160 + +#define USB_VID 0x303a +#define USB_PID 0x1001 + +static const uint8_t LED_BUILTIN = 18; +#define BUILTIN_LED LED_BUILTIN // backward compatibility +#define LED_BUILTIN LED_BUILTIN + +static const uint8_t TX = 43; +static const uint8_t RX = 44; + +static const uint8_t SDA = 45; +static const uint8_t SCL = 46; + +static const uint8_t SS = 8; +static const uint8_t MOSI = 10; +static const uint8_t MISO = 11; +static const uint8_t SCK = 9; + +static const uint8_t A0 = 1; +static const uint8_t A1 = 2; +static const uint8_t A2 = 3; +static const uint8_t A3 = 4; +static const uint8_t A4 = 5; +static const uint8_t A5 = 6; +static const uint8_t A6 = 7; +static const uint8_t A7 = 8; +static const uint8_t A8 = 9; +static const uint8_t A9 = 10; +static const uint8_t A10 = 11; +static const uint8_t A11 = 12; +static const uint8_t A12 = 13; +static const uint8_t A13 = 14; +static const uint8_t A14 = 15; +static const uint8_t A15 = 16; +static const uint8_t A16 = 17; +static const uint8_t A17 = 18; +static const uint8_t A18 = 19; +static const uint8_t A19 = 20; + +static const uint8_t T1 = 1; +static const uint8_t T2 = 2; +static const uint8_t T3 = 3; +static const uint8_t T4 = 4; +static const uint8_t T5 = 5; +static const uint8_t T6 = 6; +static const uint8_t T7 = 7; +static const uint8_t T8 = 8; +static const uint8_t T9 = 9; +static const uint8_t T10 = 10; +static const uint8_t T11 = 11; +static const uint8_t T12 = 12; +static const uint8_t T13 = 13; +static const uint8_t T14 = 14; + +static const uint8_t Vext = 36; +static const uint8_t LED = 18; + +static const uint8_t RST_LoRa = 12; +static const uint8_t BUSY_LoRa = 13; +static const uint8_t DIO0 = 14; + +#endif /* Pins_Arduino_h */ diff --git a/variants/tracksenger/lcd/variant.h b/variants/tracksenger/lcd/variant.h new file mode 100644 index 000000000..ecf4e854e --- /dev/null +++ b/variants/tracksenger/lcd/variant.h @@ -0,0 +1,116 @@ +#define LED_PIN 18 + +#define HELTEC_TRACKER_V1_X + +// TRACKSENGER 2.8" IPS 320x240 + +// I2C +// #define I2C_SDA 42 +// #define I2C_SCL 41 +// #define HAS_SCREEN 1 +// #define USE_SSD1306 + +// Default SPI1 will be mapped to the display +#define ST7789_SDA 42 +#define ST7789_SCK 41 +#define ST7789_CS 38 +#define ST7789_RS 40 +#define ST7789_BL 21 +// P#define TFT_BL 21 /* V1.1 PCB marking */ + +#define ST7789_RESET -1 +#define ST7789_MISO -1 +#define ST7789_BUSY -1 +#define ST7789_SPI_HOST SPI3_HOST +#define TFT_BL 21 +#define SPI_FREQUENCY 40000000 +#define SPI_READ_FREQUENCY 16000000 +#define TFT_HEIGHT 320 +#define TFT_WIDTH 240 +#define TFT_OFFSET_X 0 +#define TFT_OFFSET_Y 0 +#define TFT_OFFSET_ROTATION 0 +#define SCREEN_ROTATE + +// ST7735S TFT LCD +// #define ST7735S 1 // there are different (sub-)versions of ST7735 +// #define ST7735_CS 38 +// #define ST7735_RS 40 // DC +// #define ST7735_SDA 42 // MOSI +// #define ST7735_SCK 41 +// #define ST7735_RESET 39 +// #define ST7735_MISO -1 +// #define ST7735_BUSY -1 +#define TFT_BL 21 /* V1.1 PCB marking */ +// #define ST7735_SPI_HOST SPI3_HOST +// #define SPI_FREQUENCY 40000000 +// #define SPI_READ_FREQUENCY 16000000 +// #define SCREEN_ROTATE +// #define TFT_HEIGHT DISPLAY_WIDTH +// #define TFT_WIDTH DISPLAY_HEIGHT +// #define TFT_OFFSET_X 26 +// #define TFT_OFFSET_Y -1 +#define SCREEN_TRANSITION_FRAMERATE 3 // fps +// #define DISPLAY_FORCE_SMALL_FONTS + +#define VEXT_ENABLE 3 // active HIGH, powers the lora antenna boost +#define VEXT_ON_VALUE HIGH +#define BUTTON_PIN 0 + +#define BATTERY_PIN 1 // A battery voltage measurement pin, voltage divider connected here to measure battery voltage +#define ADC_CHANNEL ADC1_GPIO1_CHANNEL +#define ADC_ATTENUATION ADC_ATTEN_DB_2_5 // lower dB for high resistance voltage divider +#define ADC_MULTIPLIER 4.9 +#define ADC_CTRL 2 // active HIGH, powers the voltage divider. Only on 1.1 +#define ADC_CTRL_ENABLED HIGH + +#undef GPS_RX_PIN +#undef GPS_TX_PIN +#define GPS_RX_PIN 33 +#define GPS_TX_PIN 34 +#define PIN_GPS_RESET 35 +#define PIN_GPS_PPS 36 + +#define GPS_RESET_MODE LOW +#define GPS_UC6580 +#define GPS_BAUDRATE 115200 + +#define USE_SX1262 +#define LORA_DIO0 -1 // a No connect on the SX1262 module +#define LORA_RESET 12 +#define LORA_DIO1 14 // SX1262 IRQ +#define LORA_DIO2 13 // SX1262 BUSY +#define LORA_DIO3 // Not connected on PCB, but internally on the TTGO SX1262, if DIO3 is high the TXCO is enabled + +#define LORA_SCK 9 +#define LORA_MISO 11 +#define LORA_MOSI 10 +#define LORA_CS 8 + +#define SX126X_CS LORA_CS +#define SX126X_DIO1 LORA_DIO1 +#define SX126X_BUSY LORA_DIO2 +#define SX126X_RESET LORA_RESET + +#define SX126X_DIO2_AS_RF_SWITCH +#define SX126X_DIO3_TCXO_VOLTAGE 1.8 + +// Picomputer gets a white on black display +#define TFT_MESH COLOR565(0xFF, 0xFF, 0xFF) + +// keyboard changes + +#define PIN_BUZZER 43 +#define CANNED_MESSAGE_MODULE_ENABLE 1 + +#define INPUTBROKER_MATRIX_TYPE 1 + +#define KEYS_COLS \ + { \ + 44, 45, 46, 4, 5, 6 \ + } +#define KEYS_ROWS \ + { \ + 26, 37, 17, 16, 15, 7 \ + } +// #end keyboard \ No newline at end of file diff --git a/variants/tracksenger/oled/pins_arduino.h b/variants/tracksenger/oled/pins_arduino.h new file mode 100644 index 000000000..1052af961 --- /dev/null +++ b/variants/tracksenger/oled/pins_arduino.h @@ -0,0 +1,72 @@ +#ifndef Pins_Arduino_h +#define Pins_Arduino_h + +#include "soc/soc_caps.h" +#include + +#define WIFI_LoRa_32_V3 true +#define DISPLAY_HEIGHT 80 +#define DISPLAY_WIDTH 160 + +#define USB_VID 0x303a +#define USB_PID 0x1001 + +static const uint8_t LED_BUILTIN = 18; +#define BUILTIN_LED LED_BUILTIN // backward compatibility +#define LED_BUILTIN LED_BUILTIN + +static const uint8_t TX = 43; +static const uint8_t RX = 44; + +static const uint8_t SDA = 45; +static const uint8_t SCL = 46; + +static const uint8_t SS = 8; +static const uint8_t MOSI = 10; +static const uint8_t MISO = 11; +static const uint8_t SCK = 9; + +static const uint8_t A0 = 1; +static const uint8_t A1 = 2; +static const uint8_t A2 = 3; +static const uint8_t A3 = 4; +static const uint8_t A4 = 5; +static const uint8_t A5 = 6; +static const uint8_t A6 = 7; +static const uint8_t A7 = 8; +static const uint8_t A8 = 9; +static const uint8_t A9 = 10; +static const uint8_t A10 = 11; +static const uint8_t A11 = 12; +static const uint8_t A12 = 13; +static const uint8_t A13 = 14; +static const uint8_t A14 = 15; +static const uint8_t A15 = 16; +static const uint8_t A16 = 17; +static const uint8_t A17 = 18; +static const uint8_t A18 = 19; +static const uint8_t A19 = 20; + +static const uint8_t T1 = 1; +static const uint8_t T2 = 2; +static const uint8_t T3 = 3; +static const uint8_t T4 = 4; +static const uint8_t T5 = 5; +static const uint8_t T6 = 6; +static const uint8_t T7 = 7; +static const uint8_t T8 = 8; +static const uint8_t T9 = 9; +static const uint8_t T10 = 10; +static const uint8_t T11 = 11; +static const uint8_t T12 = 12; +static const uint8_t T13 = 13; +static const uint8_t T14 = 14; + +static const uint8_t Vext = 36; +static const uint8_t LED = 18; + +static const uint8_t RST_LoRa = 12; +static const uint8_t BUSY_LoRa = 13; +static const uint8_t DIO0 = 14; + +#endif /* Pins_Arduino_h */ diff --git a/variants/tracksenger/oled/variant.h b/variants/tracksenger/oled/variant.h new file mode 100644 index 000000000..70f0f3209 --- /dev/null +++ b/variants/tracksenger/oled/variant.h @@ -0,0 +1,94 @@ +#define LED_PIN 18 + +#define HELTEC_TRACKER_V1_X + +// TRACKSENGER 2.42" I2C OLED + +// I2C +#define I2C_SDA 42 +#define I2C_SCL 41 +#define HAS_SCREEN 1 +#define USE_SSD1306 + +// ST7735S TFT LCD +// #define ST7735S 1 // there are different (sub-)versions of ST7735 +// #define ST7735_CS 38 +// #define ST7735_RS 40 // DC +// #define ST7735_SDA 42 // MOSI +// #define ST7735_SCK 41 +// #define ST7735_RESET 39 +// #define ST7735_MISO -1 +// #define ST7735_BUSY -1 +#define TFT_BL 21 /* V1.1 PCB marking */ +// #define ST7735_SPI_HOST SPI3_HOST +// #define SPI_FREQUENCY 40000000 +// #define SPI_READ_FREQUENCY 16000000 +// #define SCREEN_ROTATE +// #define TFT_HEIGHT DISPLAY_WIDTH +// #define TFT_WIDTH DISPLAY_HEIGHT +// #define TFT_OFFSET_X 26 +// #define TFT_OFFSET_Y -1 +#define SCREEN_TRANSITION_FRAMERATE 3 // fps +// #define DISPLAY_FORCE_SMALL_FONTS + +#define VEXT_ENABLE 3 // active HIGH, powers the lora antenna boost +#define VEXT_ON_VALUE HIGH +#define BUTTON_PIN 0 + +#define BATTERY_PIN 1 // A battery voltage measurement pin, voltage divider connected here to measure battery voltage +#define ADC_CHANNEL ADC1_GPIO1_CHANNEL +#define ADC_ATTENUATION ADC_ATTEN_DB_2_5 // lower dB for high resistance voltage divider +#define ADC_MULTIPLIER 4.9 +#define ADC_CTRL 2 // active HIGH, powers the voltage divider. Only on 1.1 +#define ADC_CTRL_ENABLED HIGH + +#undef GPS_RX_PIN +#undef GPS_TX_PIN +#define GPS_RX_PIN 33 +#define GPS_TX_PIN 34 +#define PIN_GPS_RESET 35 +#define PIN_GPS_PPS 36 + +#define GPS_RESET_MODE LOW +#define GPS_UC6580 +#define GPS_BAUDRATE 115200 + +#define USE_SX1262 +#define LORA_DIO0 -1 // a No connect on the SX1262 module +#define LORA_RESET 12 +#define LORA_DIO1 14 // SX1262 IRQ +#define LORA_DIO2 13 // SX1262 BUSY +#define LORA_DIO3 // Not connected on PCB, but internally on the TTGO SX1262, if DIO3 is high the TXCO is enabled + +#define LORA_SCK 9 +#define LORA_MISO 11 +#define LORA_MOSI 10 +#define LORA_CS 8 + +#define SX126X_CS LORA_CS +#define SX126X_DIO1 LORA_DIO1 +#define SX126X_BUSY LORA_DIO2 +#define SX126X_RESET LORA_RESET + +#define SX126X_DIO2_AS_RF_SWITCH +#define SX126X_DIO3_TCXO_VOLTAGE 1.8 + +// Picomputer gets a white on black display +#define TFT_MESH COLOR565(0xFF, 0xFF, 0xFF) + +// keyboard changes + +#define PIN_BUZZER 43 +#define CANNED_MESSAGE_MODULE_ENABLE 1 + +#define INPUTBROKER_MATRIX_TYPE 1 + +#define KEYS_COLS \ + { \ + 44, 45, 46, 4, 5, 6 \ + } +#define KEYS_ROWS \ + { \ + 26, 37, 17, 16, 15, 7 \ + } +// #end keyboard \ No newline at end of file diff --git a/variants/tracksenger/platformio.ini b/variants/tracksenger/platformio.ini new file mode 100644 index 000000000..d3e31264f --- /dev/null +++ b/variants/tracksenger/platformio.ini @@ -0,0 +1,40 @@ +[env:tracksenger] +extends = esp32s3_base +board = heltec_wireless_tracker +upload_protocol = esp-builtin + +build_flags = + ${esp32s3_base.build_flags} -I variants/tracksenger/internal + -D HELTEC_TRACKER_V1_1 + -D GPS_POWER_TOGGLE ; comment this line to disable triple press function on the user button to turn off gps entirely. + ;-D DEBUG_DISABLED ; uncomment this line to disable DEBUG output + +lib_deps = + ${esp32s3_base.lib_deps} + lovyan03/LovyanGFX@^1.1.8 + +[env:tracksenger-lcd] +extends = esp32s3_base +board = heltec_wireless_tracker +upload_protocol = esp-builtin + +build_flags = + ${esp32s3_base.build_flags} -I variants/tracksenger/lcd + -D HELTEC_TRACKER_V1_1 + -D GPS_POWER_TOGGLE ; comment this line to disable triple press function on the user button to turn off gps entirely. + ;-D DEBUG_DISABLED ; uncomment this line to disable DEBUG output + +lib_deps = + ${esp32s3_base.lib_deps} + lovyan03/LovyanGFX@^1.1.8 + +[env:tracksenger-oled] +extends = esp32s3_base +board = heltec_wireless_tracker +upload_protocol = esp-builtin + +build_flags = + ${esp32s3_base.build_flags} -I variants/tracksenger/oled + -D HELTEC_TRACKER_V1_1 + -D GPS_POWER_TOGGLE ; comment this line to disable triple press function on the user button to turn off gps entirely. + ;-D DEBUG_DISABLED ; uncomment this line to disable DEBUG output diff --git a/variants/unphone/platformio.ini b/variants/unphone/platformio.ini new file mode 100644 index 000000000..dbfa0599d --- /dev/null +++ b/variants/unphone/platformio.ini @@ -0,0 +1,32 @@ +; platformio.ini for unphone meshtastic + +[env:unphone] + +extends = esp32s3_base +board = unphone9 +upload_speed = 921600 +monitor_speed = 115200 +monitor_filters = esp32_exception_decoder + +build_unflags = + ${esp32s3_base.build_unflags} + -D ARDUINO_USB_MODE + +build_flags = ${esp32_base.build_flags} + ;-D BOARD_HAS_PSRAM // what's up with this - doesn't seem to be recognised at boot + -D UNPHONE + -I variants/unphone + -D ARDUINO_USB_MODE=0 + -D UNPHONE_ACCEL=0 + -D UNPHONE_TOUCHS=0 + -D UNPHONE_SDCARD=0 + -D UNPHONE_UI0=0 + -D UNPHONE_LORA=0 + -D UNPHONE_FACTORY_MODE=0 + +build_src_filter = ${esp32_base.build_src_filter} +<../variants/unphone> + +lib_deps = ${esp32s3_base.lib_deps} + lovyan03/LovyanGFX @ ^1.1.8 + https://gitlab.com/hamishcunningham/unphonelibrary#meshtastic @ ^9.0.0 + adafruit/Adafruit NeoPixel @ ^1.12.0 \ No newline at end of file diff --git a/variants/unphone/variant.cpp b/variants/unphone/variant.cpp new file mode 100644 index 000000000..7884f82e3 --- /dev/null +++ b/variants/unphone/variant.cpp @@ -0,0 +1,21 @@ +// meshtastic/firmware/variants/unphone/variant.cpp + +#include "unPhone.h" +unPhone unphone = unPhone("meshtastic_unphone"); + +void initVariant() +{ + unphone.begin(); // initialise hardware etc. + unphone.store(unphone.buildTime); + unphone.printWakeupReason(); // what woke us up? (stored, not printed :|) + unphone.checkPowerSwitch(); // if power switch is off, shutdown + unphone.backlight(false); // setup backlight and make sure its off + unphone.expanderPower(true); // enable power to expander / hat / sheild + + for (int i = 0; i < 3; i++) { // buzz a bit + unphone.vibe(true); + delay(150); + unphone.vibe(false); + delay(150); + } +} \ No newline at end of file diff --git a/variants/unphone/variant.h b/variants/unphone/variant.h new file mode 100644 index 000000000..0a94c5987 --- /dev/null +++ b/variants/unphone/variant.h @@ -0,0 +1,71 @@ +// meshtastic/firmware/variants/unphone/variant.h + +#pragma once + +#define SPI_SCK 39 +#define SPI_MOSI 40 +#define SPI_MISO 41 + +// We use the RFM95W LoRa module +#define USE_RF95 +#define LORA_SCK SPI_SCK +#define LORA_MOSI SPI_MOSI +#define LORA_MISO SPI_MISO +#define LORA_CS 44 +#define LORA_DIO0 10 // AKA LORA_IRQ +#define LORA_RESET 42 +#define LORA_DIO1 11 +#define LORA_DIO2 RADIOLIB_NC // Not really used + +// HX8357 TFT LCD +#define HX8357_CS 48 +#define HX8357_RS 47 // AKA DC +#define HX8357_RESET 46 +#define HX8357_SCK SPI_SCK +#define HX8357_MOSI SPI_MOSI +#define HX8357_MISO SPI_MISO +#define HX8357_BUSY -1 +#define HX8357_SPI_HOST SPI2_HOST +#define SPI_FREQUENCY 40000000 +#define SPI_READ_FREQUENCY 16000000 +#define TFT_HEIGHT 480 +#define TFT_WIDTH 320 +#define TFT_OFFSET_X 0 +#define TFT_OFFSET_Y 0 +#define TFT_OFFSET_ROTATION 6 // unPhone's screen wired unusually, 0 typical +#define TFT_INVERT false +#define SCREEN_ROTATE true +#define SCREEN_TRANSITION_FRAMERATE 5 + +#define HAS_TOUCHSCREEN 1 +#define USE_XPT2046 1 +#define TOUCH_CS 38 + +#define HAS_GPS \ + 0 // the unphone doesn't have a gps module by default (though + // GPS featherwing -- https://www.adafruit.com/product/3133 + // -- can be added) +#undef GPS_RX_PIN +#undef GPS_TX_PIN + +// #define HAS_SDCARD 1 // causes hang if defined +#define SDCARD_CS 43 + +#define LED_PIN 13 // the red part of the RGB LED +#define LED_STATE_ON 0 // State when LED is lit + +#define BUTTON_PIN 21 // Button 3 - square - top button in landscape mode +#define BUTTON_NEED_PULLUP // we do need a helping hand up +#define BUTTON_PIN_ALT 45 // Button 1 - triangle - bottom button in landscape mode + +#define I2C_SDA 3 // I2C pins for this board +#define I2C_SCL 4 + +#define LSM6DS3_WAKE_THRESH 5 // higher values reduce the sensitivity of the wake threshold + +// ratio of voltage divider = 3.20 (R1=100k, R2=220k) +// #define ADC_MULTIPLIER 3.2 + +// #define BATTERY_PIN 13 // battery V measurement pin; vbat divider is here +// #define ADC_CHANNEL ADC2_GPIO13_CHANNEL +// #define BAT_MEASURE_ADC_UNIT 2 \ No newline at end of file diff --git a/variants/wio-e5/platformio.ini b/variants/wio-e5/platformio.ini index 07f6efa6d..29c4a0a37 100644 --- a/variants/wio-e5/platformio.ini +++ b/variants/wio-e5/platformio.ini @@ -1,11 +1,36 @@ [env:wio-e5] -extends = stm32wl5e_base -board_level = extra +extends = stm32_base +board = lora_e5_dev_board build_flags = - ${stm32wl5e_base.build_flags} + ${stm32_base.build_flags} -Ivariants/wio-e5 - -DHAL_DAC_MODULE_ONLY -DSERIAL_UART_INSTANCE=1 -DPIN_SERIAL_RX=PB7 -DPIN_SERIAL_TX=PB6 + -DHAL_DAC_MODULE_ONLY + -DHAL_ADC_MODULE_DISABLED + -DHAL_COMP_MODULE_DISABLED + -DHAL_CRC_MODULE_DISABLED + -DHAL_CRYP_MODULE_DISABLED + -DHAL_GTZC_MODULE_DISABLED + -DHAL_HSEM_MODULE_DISABLED + -DHAL_I2C_MODULE_DISABLED + -DHAL_I2S_MODULE_DISABLED + -DHAL_IPCC_MODULE_DISABLED + -DHAL_IRDA_MODULE_DISABLED + -DHAL_IWDG_MODULE_DISABLED + -DHAL_LPTIM_MODULE_DISABLED + -DHAL_PKA_MODULE_DISABLED + -DHAL_RNG_MODULE_DISABLED + -DHAL_RTC_MODULE_DISABLED + -DHAL_SMARTCARD_MODULE_DISABLED + -DHAL_SMBUS_MODULE_DISABLED + -DHAL_TIM_MODULE_DISABLED + -DHAL_WWDG_MODULE_DISABLED + -DHAL_EXTI_MODULE_DISABLED + -DRADIOLIB_EXCLUDE_SX128X=1 + -DRADIOLIB_EXCLUDE_SX127X=1 + -DRADIOLIB_EXCLUDE_LR11X0=1 +; -D PIO_FRAMEWORK_ARDUINO_NANOLIB_FLOAT_PRINTF + upload_port = stlink \ No newline at end of file diff --git a/variants/wio-e5/variant.h b/variants/wio-e5/variant.h index 86e58bcb2..ac92915bb 100644 --- a/variants/wio-e5/variant.h +++ b/variants/wio-e5/variant.h @@ -13,5 +13,9 @@ Do not expect a working Meshtastic device with this target. #define _VARIANT_WIOE5_ #define USE_STM32WLx +#define MAX_NUM_NODES 10 -#endif \ No newline at end of file +#define LED_PIN PB5 +#define LED_STATE_ON 1 + +#endif diff --git a/variants/wio-sdk-wm1110/platformio.ini b/variants/wio-sdk-wm1110/platformio.ini new file mode 100644 index 000000000..e77455bcf --- /dev/null +++ b/variants/wio-sdk-wm1110/platformio.ini @@ -0,0 +1,25 @@ +; The black Wio-WM1110 Dev Kit with sensors and the WM1110 module +[env:wio-sdk-wm1110] +extends = nrf52840_base +board = wio-sdk-wm1110 + +extra_scripts = + bin/platformio-custom.py + extra_scripts/disable_adafruit_usb.py + +# Remove adafruit USB serial from the build (it is incompatible with using the ch340 serial chip on this board) +build_unflags = ${nrf52840_base:build_unflags} -DUSBCON -DUSE_TINYUSB +build_flags = ${nrf52840_base.build_flags} -Ivariants/wio-sdk-wm1110 -Isrc/platform/nrf52/softdevice -Isrc/platform/nrf52/softdevice/nrf52 -DWIO_WM1110 + -L "${platformio.libdeps_dir}/${this.__env__}/bsec2/src/cortex-m4/fpv4-sp-d16-hard" + -DGPS_POWER_TOGGLE ; comment this line to disable triple press function on the user button to turn off gps entirely. + -DCFG_TUD_CDC=0 +board_build.ldscript = src/platform/nrf52/nrf52840_s140_v7.ld +build_src_filter = ${nrf52_base.build_src_filter} +<../variants/wio-sdk-wm1110> + +;debug_tool = jlink +debug_tool = stlink +; No need to reflash if the binary hasn't changed + +; If not set we will default to uploading over serial (first it forces bootloader entry by talking 1200bps to cdcacm) +;upload_protocol = nrfutil +;upload_protocol = stlink \ No newline at end of file diff --git a/variants/wio-sdk-wm1110/rfswitch.h b/variants/wio-sdk-wm1110/rfswitch.h new file mode 100644 index 000000000..cda6364f5 --- /dev/null +++ b/variants/wio-sdk-wm1110/rfswitch.h @@ -0,0 +1,15 @@ +#include "RadioLib.h" +#include "nrf.h" + +// set RF switch configuration for Wio WM1110 +// Wio WM1110 uses DIO5 and DIO6 for RF switching + +static const uint32_t rfswitch_dio_pins[] = {RADIOLIB_LR11X0_DIO5, RADIOLIB_LR11X0_DIO6, RADIOLIB_NC, RADIOLIB_NC, RADIOLIB_NC}; + +static const Module::RfSwitchMode_t rfswitch_table[] = { + // mode DIO5 DIO6 + {LR11x0::MODE_STBY, {LOW, LOW}}, {LR11x0::MODE_RX, {HIGH, LOW}}, + {LR11x0::MODE_TX, {HIGH, HIGH}}, {LR11x0::MODE_TX_HP, {LOW, HIGH}}, + {LR11x0::MODE_TX_HF, {LOW, LOW}}, {LR11x0::MODE_GNSS, {LOW, LOW}}, + {LR11x0::MODE_WIFI, {LOW, LOW}}, END_OF_MODE_TABLE, +}; diff --git a/variants/wio-sdk-wm1110/variant.cpp b/variants/wio-sdk-wm1110/variant.cpp new file mode 100644 index 000000000..5a3587982 --- /dev/null +++ b/variants/wio-sdk-wm1110/variant.cpp @@ -0,0 +1,45 @@ +/* + Copyright (c) 2014-2015 Arduino LLC. All right reserved. + Copyright (c) 2016 Sandeep Mistry All right reserved. + Copyright (c) 2018, Adafruit Industries (adafruit.com) + + This library is free software; you can redistribute it and/or + modify it under the terms of the GNU Lesser General Public + License as published by the Free Software Foundation; either + version 2.1 of the License, or (at your option) any later version. + + This library is distributed in the hope that it will be useful, + but WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. + See the GNU Lesser General Public License for more details. + + You should have received a copy of the GNU Lesser General Public + License along with this library; if not, write to the Free Software + Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA +*/ + +#include "variant.h" +#include "nrf.h" +#include "wiring_constants.h" +#include "wiring_digital.h" + +const uint32_t g_ADigitalPinMap[] = { + // P0 + 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, + + // P1 + 32, 33, 34, 35, 36, 37, 38, 39, 40, 41, 42, 43, 44, 45, 46, 47}; + +void initVariant() +{ + // LED1 & LED2 + pinMode(PIN_LED1, OUTPUT); + ledOff(PIN_LED1); + + pinMode(PIN_LED2, OUTPUT); + ledOff(PIN_LED2); + + // 3V3 Power Rail + pinMode(PIN_3V3_EN, OUTPUT); + digitalWrite(PIN_3V3_EN, HIGH); +} \ No newline at end of file diff --git a/variants/wio-sdk-wm1110/variant.h b/variants/wio-sdk-wm1110/variant.h new file mode 100644 index 000000000..b6e5c79df --- /dev/null +++ b/variants/wio-sdk-wm1110/variant.h @@ -0,0 +1,120 @@ +/* + Copyright (c) 2014-2015 Arduino LLC. All right reserved. + Copyright (c) 2016 Sandeep Mistry All right reserved. + Copyright (c) 2018, Adafruit Industries (adafruit.com) + + This library is free software; you can redistribute it and/or + modify it under the terms of the GNU Lesser General Public + License as published by the Free Software Foundation; either + version 2.1 of the License, or (at your option) any later version. + This library is distributed in the hope that it will be useful, + but WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. + See the GNU Lesser General Public License for more details. + You should have received a copy of the GNU Lesser General Public + License along with this library; if not, write to the Free Software + Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA +*/ + +#ifndef _VARIANT_WIO_SDK_WM1110_ +#define _VARIANT_WIO_SDK_WM1110_ + +/** Master clock frequency */ +#define VARIANT_MCK (64000000ul) + +#define USE_LFXO // Board uses 32khz crystal for LF +// define USE_LFRC // Board uses RC for LF + +/*---------------------------------------------------------------------------- + * Headers + *----------------------------------------------------------------------------*/ + +#include "WVariant.h" + +#ifdef USE_TINYUSB +#error TinyUSB must be disabled by platformio before using this variant +#endif + +// We use the hardware serial port for the serial console +#define Serial Serial1 + +#ifdef __cplusplus +extern "C" { +#endif // __cplusplus + +// Number of pins defined in PinDescription array +#define PINS_COUNT (48) +#define NUM_DIGITAL_PINS (48) +#define NUM_ANALOG_INPUTS (6) +#define NUM_ANALOG_OUTPUTS (0) + +#define WIRE_INTERFACES_COUNT 1 + +#define PIN_3V3_EN (0 + 7) // P0.7, Power to Sensors + +#define PIN_WIRE_SDA (0 + 27) // P0.27 +#define PIN_WIRE_SCL (0 + 26) // P0.26 + +#define PIN_LED1 (0 + 13) // P0.13 +#define PIN_LED2 (0 + 14) // P0.14 + +#define LED_BUILTIN PIN_LED1 + +#define LED_GREEN PIN_LED1 +#define LED_BLUE PIN_LED2 // Actually red + +#define LED_STATE_ON 1 // State when LED is lit + +#define BUTTON_PIN (0 + 23) // P0.23 + +/* + * Serial interfaces + */ +#define PIN_SERIAL1_RX (0 + 22) // P0.22 +#define PIN_SERIAL1_TX (0 + 24) // P0.24 + +#define PIN_SERIAL2_RX (0 + 6) // P0.06 +#define PIN_SERIAL2_TX (0 + 8) // P0.08 + +#define SPI_INTERFACES_COUNT 1 + +#define PIN_SPI_MISO (32 + 15) // P1.15 47 +#define PIN_SPI_MOSI (32 + 14) // P1.14 46 +#define PIN_SPI_SCK (32 + 13) // P1.13 45 +#define PIN_SPI_NSS (32 + 12) // P1.12 44 + +#define LORA_RESET (32 + 10) // P1.10 42 // RST +#define LORA_DIO1 (32 + 8) // P1.08 40 // IRQ +#define LORA_DIO2 (32 + 11) // P1.11 43 // BUSY +#define LORA_SCK PIN_SPI_SCK +#define LORA_MISO PIN_SPI_MISO +#define LORA_MOSI PIN_SPI_MOSI +#define LORA_CS PIN_SPI_NSS + +// supported modules list +#define USE_LR1110 + +#define LR1110_IRQ_PIN LORA_DIO1 +#define LR1110_NRESET_PIN LORA_RESET +#define LR1110_BUSY_PIN LORA_DIO2 +#define LR1110_SPI_NSS_PIN LORA_CS +#define LR1110_SPI_SCK_PIN LORA_SCK +#define LR1110_SPI_MOSI_PIN LORA_MOSI +#define LR1110_SPI_MISO_PIN LORA_MISO + +#define LR11X0_DIO3_TCXO_VOLTAGE 1.6 +#define LR11X0_DIO_AS_RF_SWITCH + +#define LR1110_GNSS_ANT_PIN (32 + 5) // P1.05 37 + +#define NRF_USE_SERIAL_DFU + +#ifdef __cplusplus +} +#endif + +/*---------------------------------------------------------------------------- + * Arduino objects - C++ only + *----------------------------------------------------------------------------*/ + +#endif // _VARIANT_WIO_SDK_WM1110_ diff --git a/variants/wio-t1000-s/platformio.ini b/variants/wio-t1000-s/platformio.ini new file mode 100644 index 000000000..cb1cf86f7 --- /dev/null +++ b/variants/wio-t1000-s/platformio.ini @@ -0,0 +1,15 @@ +; The very slick RAK wireless RAK 4631 / 4630 board - Unified firmware for 5005/19003, with or without OLED RAK 1921 +[env:wio-t1000-s] +extends = nrf52840_base +board = wio-t1000-s +board_level = extra +build_flags = ${nrf52840_base.build_flags} -Ivariants/wio-t1000-s -Isrc/platform/nrf52/softdevice -Isrc/platform/nrf52/softdevice/nrf52 -DWIO_WM1110 + -L "${platformio.libdeps_dir}/${this.__env__}/bsec2/src/cortex-m4/fpv4-sp-d16-hard" + -DGPS_POWER_TOGGLE ; comment this line to disable triple press function on the user button to turn off gps entirely. +board_build.ldscript = src/platform/nrf52/nrf52840_s140_v7.ld +build_src_filter = ${nrf52_base.build_src_filter} +<../variants/wio-t1000-s> +lib_deps = + ${nrf52840_base.lib_deps} +debug_tool = jlink +; If not set we will default to uploading over serial (first it forces bootloader entry by talking 1200bps to cdcacm) +upload_protocol = jlink \ No newline at end of file diff --git a/variants/wio-t1000-s/rfswitch.h b/variants/wio-t1000-s/rfswitch.h new file mode 100644 index 000000000..e229d77cf --- /dev/null +++ b/variants/wio-t1000-s/rfswitch.h @@ -0,0 +1,13 @@ +#include "RadioLib.h" +#include "nrf.h" + +static const uint32_t rfswitch_dio_pins[Module::RFSWITCH_MAX_PINS] = {RADIOLIB_LR11X0_DIO5, RADIOLIB_LR11X0_DIO6, + RADIOLIB_LR11X0_DIO7, RADIOLIB_LR11X0_DIO8, RADIOLIB_NC}; + +static const Module::RfSwitchMode_t rfswitch_table[] = { + // mode DIO5 DIO6 DIO7 DIO8 + {LR11x0::MODE_STBY, {LOW, LOW, LOW, LOW}}, {LR11x0::MODE_RX, {HIGH, LOW, LOW, HIGH}}, + {LR11x0::MODE_TX, {HIGH, HIGH, LOW, HIGH}}, {LR11x0::MODE_TX_HP, {LOW, HIGH, LOW, HIGH}}, + {LR11x0::MODE_TX_HF, {LOW, LOW, LOW, LOW}}, {LR11x0::MODE_GNSS, {LOW, LOW, HIGH, LOW}}, + {LR11x0::MODE_WIFI, {LOW, LOW, LOW, LOW}}, END_OF_MODE_TABLE, +}; \ No newline at end of file diff --git a/variants/wio-t1000-s/variant.cpp b/variants/wio-t1000-s/variant.cpp new file mode 100644 index 000000000..85e0c44f3 --- /dev/null +++ b/variants/wio-t1000-s/variant.cpp @@ -0,0 +1,64 @@ +/* + Copyright (c) 2014-2015 Arduino LLC. All right reserved. + Copyright (c) 2016 Sandeep Mistry All right reserved. + Copyright (c) 2018, Adafruit Industries (adafruit.com) + + This library is free software; you can redistribute it and/or + modify it under the terms of the GNU Lesser General Public + License as published by the Free Software Foundation; either + version 2.1 of the License, or (at your option) any later version. + + This library is distributed in the hope that it will be useful, + but WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. + See the GNU Lesser General Public License for more details. + + You should have received a copy of the GNU Lesser General Public + License along with this library; if not, write to the Free Software + Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA +*/ + +#include "variant.h" +#include "nrf.h" +#include "wiring_constants.h" +#include "wiring_digital.h" + +const uint32_t g_ADigitalPinMap[] = { + // P0 + 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, + + // P1 + 32, 33, 34, 35, 36, 37, 38, 39, 40, 41, 42, 43, 44, 45, 46, 47}; + +void initVariant() +{ + // LED1 & LED2 + pinMode(LED_PIN, OUTPUT); + digitalWrite(LED_PIN, LOW); + + pinMode(PIN_3V3_EN, OUTPUT); + digitalWrite(PIN_3V3_EN, HIGH); + + pinMode(PIN_3V3_ACC_EN, OUTPUT); + digitalWrite(PIN_3V3_ACC_EN, LOW); + + pinMode(BUZZER_EN_PIN, OUTPUT); + digitalWrite(BUZZER_EN_PIN, HIGH); + + pinMode(PIN_GPS_EN, OUTPUT); + digitalWrite(PIN_GPS_EN, LOW); + + pinMode(GPS_VRTC_EN, OUTPUT); + digitalWrite(GPS_VRTC_EN, HIGH); + + pinMode(PIN_GPS_RESET, OUTPUT); + digitalWrite(PIN_GPS_RESET, LOW); + + pinMode(GPS_SLEEP_INT, OUTPUT); + digitalWrite(GPS_SLEEP_INT, HIGH); + + pinMode(GPS_RTC_INT, OUTPUT); + digitalWrite(GPS_RTC_INT, LOW); + + pinMode(GPS_RESETB_OUT, INPUT); +} \ No newline at end of file diff --git a/variants/wio-t1000-s/variant.h b/variants/wio-t1000-s/variant.h new file mode 100644 index 000000000..eb6a34d6c --- /dev/null +++ b/variants/wio-t1000-s/variant.h @@ -0,0 +1,160 @@ +/* + Copyright (c) 2014-2015 Arduino LLC. All right reserved. + Copyright (c) 2016 Sandeep Mistry All right reserved. + Copyright (c) 2018, Adafruit Industries (adafruit.com) + + This library is free software; you can redistribute it and/or + modify it under the terms of the GNU Lesser General Public + License as published by the Free Software Foundation; either + version 2.1 of the License, or (at your option) any later version. + This library is distributed in the hope that it will be useful, + but WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. + See the GNU Lesser General Public License for more details. + You should have received a copy of the GNU Lesser General Public + License along with this library; if not, write to the Free Software + Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA +*/ + +#ifndef _VARIANT_WIO_SDK_WM1110_ +#define _VARIANT_WIO_SDK_WM1110_ + +/** Master clock frequency */ +#define VARIANT_MCK (64000000ul) + +#define USE_LFXO // Board uses 32khz crystal for LF +// define USE_LFRC // Board uses RC for LF + +#define BLE_DFU_SECURE // we use the 7.x softdevice signing keys + +/*---------------------------------------------------------------------------- + * Headers + *----------------------------------------------------------------------------*/ + +#include "WVariant.h" + +#ifdef __cplusplus +extern "C" { +#endif // __cplusplus + +// Number of pins defined in PinDescription array +#define PINS_COUNT (48) +#define NUM_DIGITAL_PINS (48) +#define NUM_ANALOG_INPUTS (6) +#define NUM_ANALOG_OUTPUTS (0) + +#define PIN_3V3_EN (32 + 6) // P1.6, Power to Sensors +#define PIN_3V3_ACC_EN (32 + 7) // P1.7, Power to Acc + +#define PIN_LED1 (0 + 24) // P0.24 +#define LED_PIN PIN_LED1 +#define LED_BUILTIN -1 +#define LED_BLUE -1 // Actually green +#define LED_STATE_ON 1 // State when LED is lit + +#define BUTTON_PIN (0 + 6) // P0.6 +#define BUTTON_ACTIVE_LOW false +#define BUTTON_ACTIVE_PULLUP false +#define BUTTON_SENSE_TYPE INPUT_SENSE_HIGH + +#define HAS_WIRE 0 + +#define WIRE_INTERFACES_COUNT 1 + +#define PIN_WIRE_SDA (0 + 26) // P0.26 +#define PIN_WIRE_SCL (0 + 27) // P0.27 + +/* + * Serial interfaces + */ +#define PIN_SERIAL1_RX (0 + 14) // P0.14 +#define PIN_SERIAL1_TX (0 + 13) // P0.13 + +#define PIN_SERIAL2_RX (0 + 17) // P0.17 +#define PIN_SERIAL2_TX (0 + 16) // P0.16 + +#define USER_DEBUG_PORT Serial2 + +#define SPI_INTERFACES_COUNT 1 + +#define PIN_SPI_MISO (32 + 8) // P1.08 +#define PIN_SPI_MOSI (32 + 9) // P1.09 +#define PIN_SPI_SCK (0 + 11) // P0.11 +#define PIN_SPI_NSS (0 + 12) // P0.12 + +#define LORA_RESET (32 + 10) // P1.10 // RST +#define LORA_DIO1 (32 + 1) // P1.01 // IRQ +#define LORA_DIO2 (0 + 7) // P0.07 // BUSY +#define LORA_SCK PIN_SPI_SCK +#define LORA_MISO PIN_SPI_MISO +#define LORA_MOSI PIN_SPI_MOSI +#define LORA_CS PIN_SPI_NSS + +// supported modules list +#define USE_LR1110 + +#define LR1110_IRQ_PIN LORA_DIO1 +#define LR1110_NRESET_PIN LORA_RESET +#define LR1110_BUSY_PIN LORA_DIO2 +#define LR1110_SPI_NSS_PIN LORA_CS +#define LR1110_SPI_SCK_PIN LORA_SCK +#define LR1110_SPI_MOSI_PIN LORA_MOSI +#define LR1110_SPI_MISO_PIN LORA_MISO + +#define LR11X0_DIO3_TCXO_VOLTAGE 1.6 +#define LR11X0_DIO_AS_RF_SWITCH + +#define HAS_GPS 1 +#define GNSS_AIROHA +#define GPS_RX_PIN PIN_SERIAL1_RX +#define GPS_TX_PIN PIN_SERIAL1_TX + +#define GPS_BAUDRATE 115200 + +#define PIN_GPS_EN (32 + 11) // P1.11 +#define GPS_EN_ACTIVE HIGH + +#define PIN_GPS_RESET (32 + 15) // P1.15 +#define GPS_RESET_MODE HIGH + +#define GPS_VRTC_EN (0 + 8) // P0.8, awlays high +#define GPS_SLEEP_INT (32 + 12) // P1.12, awlays high +#define GPS_RTC_INT (0 + 15) // P0.15, normal is LOW, wake by HIGH +#define GPS_RESETB_OUT (32 + 14) // P1.14, awlays input pull_up + +// #define GPS_THREAD_INTERVAL 50 +#define GPS_FIX_HOLD_TIME 15000 // ms + +#define BATTERY_PIN 2 +// #define ADC_CHANNEL ADC1_GPIO2_CHANNEL +#define ADC_MULTIPLIER (2.0F) + +#define ADC_RESOLUTION 14 +#define BATTERY_SENSE_RESOLUTION_BITS 12 +// #define BATTERY_SENSE_RESOLUTION 4096.0 + +#undef AREF_VOLTAGE +#define AREF_VOLTAGE 3.0 +#define VBAT_AR_INTERNAL AR_INTERNAL_3_0 + +// #define ADC_CTRL (32 + 6) +// #define ADC_CTRL_ENABLED HIGH + +// Buzzer +#define BUZZER_EN_PIN (32 + 5) // P1.05, awlays high +#define PIN_BUZZER (0 + 25) // P0.25, pwm output + +#define T1000X_SENSOR_EN +#define T1000X_VCC_PIN (0 + 4) // P0.4 +#define T1000X_NTC_PIN (0 + 31) // P0.31 +#define T1000X_LUX_PIN (0 + 29) // P0.29 + +#ifdef __cplusplus +} +#endif + +/*---------------------------------------------------------------------------- + * Arduino objects - C++ only + *----------------------------------------------------------------------------*/ + +#endif // _VARIANT_WIO_SDK_WM1110_ \ No newline at end of file diff --git a/variants/wio-tracker-wm1110/platformio.ini b/variants/wio-tracker-wm1110/platformio.ini new file mode 100644 index 000000000..614fea588 --- /dev/null +++ b/variants/wio-tracker-wm1110/platformio.ini @@ -0,0 +1,13 @@ +; The red tracker Dev Board with the WM1110 module +[env:wio-tracker-wm1110] +extends = nrf52840_base +board = wio-tracker-wm1110 +build_flags = ${nrf52840_base.build_flags} -Ivariants/wio-tracker-wm1110 -Isrc/platform/nrf52/softdevice -Isrc/platform/nrf52/softdevice/nrf52 -DWIO_WM1110 + -L "${platformio.libdeps_dir}/${this.__env__}/bsec2/src/cortex-m4/fpv4-sp-d16-hard" + -DGPS_POWER_TOGGLE ; comment this line to disable triple press function on the user button to turn off gps entirely. +board_build.ldscript = src/platform/nrf52/nrf52840_s140_v7.ld +build_src_filter = ${nrf52_base.build_src_filter} +<../variants/wio-tracker-wm1110> +lib_deps = + ${nrf52840_base.lib_deps} +; If not set we will default to uploading over serial (first it forces bootloader entry by talking 1200bps to cdcacm) +;upload_protocol = jlink \ No newline at end of file diff --git a/variants/wio-tracker-wm1110/rfswitch.h b/variants/wio-tracker-wm1110/rfswitch.h new file mode 100644 index 000000000..cda6364f5 --- /dev/null +++ b/variants/wio-tracker-wm1110/rfswitch.h @@ -0,0 +1,15 @@ +#include "RadioLib.h" +#include "nrf.h" + +// set RF switch configuration for Wio WM1110 +// Wio WM1110 uses DIO5 and DIO6 for RF switching + +static const uint32_t rfswitch_dio_pins[] = {RADIOLIB_LR11X0_DIO5, RADIOLIB_LR11X0_DIO6, RADIOLIB_NC, RADIOLIB_NC, RADIOLIB_NC}; + +static const Module::RfSwitchMode_t rfswitch_table[] = { + // mode DIO5 DIO6 + {LR11x0::MODE_STBY, {LOW, LOW}}, {LR11x0::MODE_RX, {HIGH, LOW}}, + {LR11x0::MODE_TX, {HIGH, HIGH}}, {LR11x0::MODE_TX_HP, {LOW, HIGH}}, + {LR11x0::MODE_TX_HF, {LOW, LOW}}, {LR11x0::MODE_GNSS, {LOW, LOW}}, + {LR11x0::MODE_WIFI, {LOW, LOW}}, END_OF_MODE_TABLE, +}; diff --git a/variants/wio-tracker-wm1110/variant.cpp b/variants/wio-tracker-wm1110/variant.cpp new file mode 100644 index 000000000..5a3587982 --- /dev/null +++ b/variants/wio-tracker-wm1110/variant.cpp @@ -0,0 +1,45 @@ +/* + Copyright (c) 2014-2015 Arduino LLC. All right reserved. + Copyright (c) 2016 Sandeep Mistry All right reserved. + Copyright (c) 2018, Adafruit Industries (adafruit.com) + + This library is free software; you can redistribute it and/or + modify it under the terms of the GNU Lesser General Public + License as published by the Free Software Foundation; either + version 2.1 of the License, or (at your option) any later version. + + This library is distributed in the hope that it will be useful, + but WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. + See the GNU Lesser General Public License for more details. + + You should have received a copy of the GNU Lesser General Public + License along with this library; if not, write to the Free Software + Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA +*/ + +#include "variant.h" +#include "nrf.h" +#include "wiring_constants.h" +#include "wiring_digital.h" + +const uint32_t g_ADigitalPinMap[] = { + // P0 + 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, + + // P1 + 32, 33, 34, 35, 36, 37, 38, 39, 40, 41, 42, 43, 44, 45, 46, 47}; + +void initVariant() +{ + // LED1 & LED2 + pinMode(PIN_LED1, OUTPUT); + ledOff(PIN_LED1); + + pinMode(PIN_LED2, OUTPUT); + ledOff(PIN_LED2); + + // 3V3 Power Rail + pinMode(PIN_3V3_EN, OUTPUT); + digitalWrite(PIN_3V3_EN, HIGH); +} \ No newline at end of file diff --git a/variants/wio-tracker-wm1110/variant.h b/variants/wio-tracker-wm1110/variant.h new file mode 100644 index 000000000..32e84485d --- /dev/null +++ b/variants/wio-tracker-wm1110/variant.h @@ -0,0 +1,114 @@ +/* + Copyright (c) 2014-2015 Arduino LLC. All right reserved. + Copyright (c) 2016 Sandeep Mistry All right reserved. + Copyright (c) 2018, Adafruit Industries (adafruit.com) + + This library is free software; you can redistribute it and/or + modify it under the terms of the GNU Lesser General Public + License as published by the Free Software Foundation; either + version 2.1 of the License, or (at your option) any later version. + This library is distributed in the hope that it will be useful, + but WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. + See the GNU Lesser General Public License for more details. + You should have received a copy of the GNU Lesser General Public + License along with this library; if not, write to the Free Software + Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA +*/ + +#ifndef _VARIANT_WIO_TRACKER_WM1110_ +#define _VARIANT_WIO_TRACKER_WM1110_ + +/** Master clock frequency */ +#define VARIANT_MCK (64000000ul) + +#define USE_LFXO // Board uses 32khz crystal for LF +// define USE_LFRC // Board uses RC for LF + +/*---------------------------------------------------------------------------- + * Headers + *----------------------------------------------------------------------------*/ + +#include "WVariant.h" + +#ifdef __cplusplus +extern "C" { +#endif // __cplusplus + +// Number of pins defined in PinDescription array +#define PINS_COUNT (48) +#define NUM_DIGITAL_PINS (48) +#define NUM_ANALOG_INPUTS (6) +#define NUM_ANALOG_OUTPUTS (0) + +#define WIRE_INTERFACES_COUNT 1 + +// We rely on the nrf52840 USB controller to tell us if we are hooked to a power supply +#define NRF_APM + +#define PIN_3V3_EN (32 + 1) // P1.01, Power to Sensors + +#define PIN_WIRE_SDA (0 + 5) // P0.05 +#define PIN_WIRE_SCL (0 + 4) // P0.04 + +#define PIN_LED1 (0 + 6) // P0.06 +#define PIN_LED2 (PINS_COUNT) // P0.14 + +#define LED_BUILTIN PIN_LED1 + +#define LED_GREEN PIN_LED1 +#define LED_BLUE PIN_LED2 + +#define LED_STATE_ON 0 + +#define BUTTON_PIN (32 + 2) // P1.02 + +/* + * Serial interfaces + */ +#define PIN_SERIAL1_RX (0 + 24) // P0.24 +#define PIN_SERIAL1_TX (0 + 25) // P0.25 + +#define PIN_SERIAL2_RX (0 + 6) // P0.06 +#define PIN_SERIAL2_TX (0 + 8) // P0.08 + +#define SPI_INTERFACES_COUNT 1 + +#define PIN_SPI_MISO (32 + 15) // P1.15 47 +#define PIN_SPI_MOSI (32 + 14) // P1.14 46 +#define PIN_SPI_SCK (32 + 13) // P1.13 45 +#define PIN_SPI_NSS (32 + 12) // P1.12 44 + +#define LORA_RESET (32 + 10) // P1.10 10 // RST +#define LORA_DIO1 (0 + 2) // P0.02 2 // IRQ +#define LORA_DIO2 (32 + 11) // P1.11 43 // BUSY +#define LORA_SCK PIN_SPI_SCK +#define LORA_MISO PIN_SPI_MISO +#define LORA_MOSI PIN_SPI_MOSI +#define LORA_CS PIN_SPI_NSS + +// supported modules list +#define USE_LR1110 + +#define LR1110_IRQ_PIN LORA_DIO1 +#define LR1110_NRESET_PIN LORA_RESET +#define LR1110_BUSY_PIN LORA_DIO2 +#define LR1110_SPI_NSS_PIN LORA_CS +#define LR1110_SPI_SCK_PIN LORA_SCK +#define LR1110_SPI_MOSI_PIN LORA_MOSI +#define LR1110_SPI_MISO_PIN LORA_MISO + +#define LR11X0_DIO3_TCXO_VOLTAGE 1.6 +#define LR11X0_DIO_AS_RF_SWITCH + +#define LR1110_GNSS_ANT_PIN (32 + 5) // P1.05 37 + +#ifdef __cplusplus +} +#endif + +/*---------------------------------------------------------------------------- + * Arduino objects - C++ only + *----------------------------------------------------------------------------*/ + +#endif // _VARIANT_WIO_TRACKER_WM1110_ \ No newline at end of file diff --git a/variants/wiphone/pins_arduino.h b/variants/wiphone/pins_arduino.h new file mode 100644 index 000000000..3759219d1 --- /dev/null +++ b/variants/wiphone/pins_arduino.h @@ -0,0 +1,44 @@ +#ifndef Pins_Arduino_h +#define Pins_Arduino_h + +#include + +static const uint8_t TX = 1; +static const uint8_t RX = 3; + +static const uint8_t SDA = 21; +static const uint8_t SCL = 22; + +static const uint8_t SS = 5; +static const uint8_t MOSI = 23; +static const uint8_t MISO = 19; +static const uint8_t SCK = 18; + +static const uint8_t G23 = 23; +static const uint8_t G19 = 19; +static const uint8_t G18 = 18; +static const uint8_t G3 = 3; +static const uint8_t G16 = 16; +static const uint8_t G21 = 21; +static const uint8_t G2 = 2; +static const uint8_t G12 = 12; +static const uint8_t G15 = 15; +static const uint8_t G35 = 35; +static const uint8_t G36 = 36; +static const uint8_t G25 = 25; +static const uint8_t G26 = 26; +static const uint8_t G1 = 1; +static const uint8_t G17 = 17; +static const uint8_t G22 = 22; +static const uint8_t G5 = 5; +static const uint8_t G13 = 13; +static const uint8_t G0 = 0; +static const uint8_t G34 = 34; + +static const uint8_t DAC1 = 25; +static const uint8_t DAC2 = 26; + +static const uint8_t ADC1 = 35; +static const uint8_t ADC2 = 36; + +#endif /* Pins_Arduino_h */ diff --git a/variants/wiphone/platformio.ini b/variants/wiphone/platformio.ini new file mode 100644 index 000000000..0218f8930 --- /dev/null +++ b/variants/wiphone/platformio.ini @@ -0,0 +1,13 @@ +[env:wiphone] +extends = esp32_base +board = wiphone +board_level = extra +monitor_filters = esp32_exception_decoder +board_build.partitions = default_16MB.csv +build_flags = + ${esp32_base.build_flags} -D WIPHONE -I variants/wiphone +lib_deps = + ${esp32_base.lib_deps} + lovyan03/LovyanGFX@^1.1.8 + sparkfun/SX1509 IO Expander@^3.0.5 + pololu/APA102@^3.0.0 \ No newline at end of file diff --git a/variants/wiphone/variant.h b/variants/wiphone/variant.h new file mode 100644 index 000000000..cfa5667bb --- /dev/null +++ b/variants/wiphone/variant.h @@ -0,0 +1,62 @@ +#define I2C_SDA 15 +#define I2C_SCL 25 + +#define GPIO_EXTENDER 1509 +#define EXTENDER_FLAG 0x40 +#define EXTENDER_PIN(x) (x + EXTENDER_FLAG) + +#undef RF95_SCK +#undef RF95_MISO +#undef RF95_MOSI +#undef RF95_NSS + +#define RF95_SCK 14 +#define RF95_MISO 12 +#define RF95_MOSI 13 +#define RF95_NSS 27 + +#define USE_RF95 +#define LORA_DIO0 38 +#define LORA_RESET RADIOLIB_NC +#define LORA_DIO1 RADIOLIB_NC +#define LORA_DIO2 RADIOLIB_NC + +// This board has no GPS or Screen for now +#undef GPS_RX_PIN +#undef GPS_TX_PIN +#define NO_GPS +#define HAS_GPS 0 +#define NO_SCREEN +#define HAS_SCREEN 0 + +// Default SPI1 will be mapped to the display +#define ST7789_SDA 23 +#define ST7789_SCK 18 +#define ST7789_CS 5 +#define ST7789_RS 26 +// 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 +// it) +// #define ST7789_BL -1 // EXTENDER_PIN(9) + +#define ST7789_RESET -1 +#define ST7789_MISO 19 +#define ST7789_BUSY -1 +#define ST7789_SPI_HOST SPI3_HOST +// 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 +// it) +// #define TFT_BL -1 // EXTENDER_PIN(9) +#define SPI_FREQUENCY 40000000 +#define SPI_READ_FREQUENCY 16000000 +#define TFT_HEIGHT 240 +#define TFT_WIDTH 320 +#define TFT_OFFSET_X 0 +#define TFT_OFFSET_Y 0 +#define TFT_OFFSET_ROTATION 0 +#define SCREEN_ROTATE +#define SCREEN_TRANSITION_FRAMERATE 5 + +#define I2S_MCLK_GPIO0 +#define I2S_BCK_PIN 4 // rev1.3 - 4 (wp05) +#define I2S_WS_PIN 33 +#define I2S_MOSI_PIN 21 +#define I2S_MISO_PIN 34 \ No newline at end of file diff --git a/variants/xiao_ble/platformio.ini b/variants/xiao_ble/platformio.ini index c52e2c644..6c47780d5 100644 --- a/variants/xiao_ble/platformio.ini +++ b/variants/xiao_ble/platformio.ini @@ -3,11 +3,12 @@ extends = nrf52840_base board = xiao_ble_sense board_level = extra -build_flags = ${nrf52840_base.build_flags} -Ivariants/xiao_ble -Dxiao_ble -D EBYTE_E22 - -L "${platformio.libdeps_dir}/${this.__env__}/BSEC2 Software Library/src/cortex-m4/fpv4-sp-d16-hard" +build_flags = ${nrf52840_base.build_flags} -Ivariants/xiao_ble -Isrc/platform/nrf52/softdevice -Isrc/platform/nrf52/softdevice/nrf52 -D EBYTE_E22 -DEBYTE_E22_900M30S -DPRIVATE_HW + -L "${platformio.libdeps_dir}/${this.__env__}/bsec2/src/cortex-m4/fpv4-sp-d16-hard" +board_build.ldscript = src/platform/nrf52/nrf52840_s140_v7.ld build_src_filter = ${nrf52_base.build_src_filter} +<../variants/xiao_ble> lib_deps = ${nrf52840_base.lib_deps} debug_tool = jlink ; If not set we will default to uploading over serial (first it forces bootloader entry by talking 1200bps to cdcacm) -;upload_protocol = jlink \ No newline at end of file +;upload_protocol = jlink diff --git a/variants/xiao_ble/variant.h b/variants/xiao_ble/variant.h index e2b8eb613..a86ddfde2 100644 --- a/variants/xiao_ble/variant.h +++ b/variants/xiao_ble/variant.h @@ -142,6 +142,16 @@ static const uint8_t SCK = PIN_SPI_SCK; // (which is the default for the sx1262interface code) #define SX126X_DIO2_AS_RF_SWITCH #define SX126X_DIO3_TCXO_VOLTAGE 1.8 +#ifdef EBYTE_E22_900M30S +// 10dB PA gain and 30dB rated output; based on PA output table from Ebyte Robin +#define REGULATORY_GAIN_LORA 10 +#define SX126X_MAX_POWER 20 +#endif +#ifdef EBYTE_E22_900M33S +// 25dB PA gain and 33dB rated output; based on TX Power Curve from E22-900M33S_UserManual_EN_v1.0.pdf +#define REGULATORY_GAIN_LORA 25 +#define SX126X_MAX_POWER 8 +#endif #endif /* @@ -181,6 +191,7 @@ static const uint8_t SCL = PIN_WIRE_SCL; #define BAT_READ \ 14 // P0_14 = 14 Reads battery voltage from divider on signal board. (PIN_VBAT is reading voltage divider on XIAO and is // program pin 32 / or P0.31) +#define BATTERY_SENSE_RESOLUTION_BITS 10 #define CHARGE_LED 23 // P0_17 = 17 D23 YELLOW CHARGE LED #define HICHG 22 // P0_13 = 13 D22 Charge-select pin for Lipo for 100 mA instead of default 50mA charge diff --git a/version.properties b/version.properties index ed7e93154..df7ba70c7 100644 --- a/version.properties +++ b/version.properties @@ -1,4 +1,4 @@ [VERSION] major = 2 -minor = 2 -build = 24 +minor = 5 +build = 6