diff --git a/.github/workflows/Tasmota_build_devel.yml b/.github/workflows/Tasmota_build_devel.yml index fe3f995d1..2bfc5d806 100644 --- a/.github/workflows/Tasmota_build_devel.yml +++ b/.github/workflows/Tasmota_build_devel.yml @@ -9,1318 +9,74 @@ on: - '**.md' # Do no build if *.md files changes jobs: - - tasmota: - runs-on: ubuntu-latest - continue-on-error: true - steps: - - uses: actions/checkout@v2 - - name: Set up Python - uses: actions/setup-python@v1 - - name: Install dependencies - run: | - pip install -U platformio - - name: Run PlatformIO - run: | - platformio run -e tasmota - - uses: actions/upload-artifact@v2 - with: - name: firmware - path: ./build_output - - - tasmota-minimal: - runs-on: ubuntu-latest - continue-on-error: true - steps: - - uses: actions/checkout@v2 - - name: Set up Python - uses: actions/setup-python@v1 - - name: Install dependencies - run: | - pip install -U platformio - - name: Run PlatformIO - run: | - platformio run -e tasmota-minimal - - uses: actions/upload-artifact@v2 - with: - name: firmware - path: ./build_output - - - tasmota-lite: - runs-on: ubuntu-latest - continue-on-error: true - steps: - - uses: actions/checkout@v2 - - name: Set up Python - uses: actions/setup-python@v1 - - name: Install dependencies - run: | - pip install -U platformio - - name: Run PlatformIO - run: | - platformio run -e tasmota-lite - - uses: actions/upload-artifact@v2 - with: - name: firmware - path: ./build_output - - - tasmota-knx: - runs-on: ubuntu-latest - continue-on-error: true - steps: - - uses: actions/checkout@v2 - - name: Set up Python - uses: actions/setup-python@v1 - - name: Install dependencies - run: | - pip install -U platformio - - name: Run PlatformIO - run: | - platformio run -e tasmota-knx - - uses: actions/upload-artifact@v2 - with: - name: firmware - path: ./build_output - - - tasmota-sensors: - runs-on: ubuntu-latest - continue-on-error: true - steps: - - uses: actions/checkout@v2 - - name: Set up Python - uses: actions/setup-python@v1 - - name: Install dependencies - run: | - pip install -U platformio - - name: Run PlatformIO - run: | - platformio run -e tasmota-sensors - - uses: actions/upload-artifact@v2 - with: - name: firmware - path: ./build_output - - - tasmota-display: - runs-on: ubuntu-latest - continue-on-error: true - steps: - - uses: actions/checkout@v2 - - name: Set up Python - uses: actions/setup-python@v1 - - name: Install dependencies - run: | - pip install -U platformio - - name: Run PlatformIO - run: | - platformio run -e tasmota-display - - uses: actions/upload-artifact@v2 - with: - name: firmware - path: ./build_output - - - tasmota-ir: - runs-on: ubuntu-latest - continue-on-error: true - steps: - - uses: actions/checkout@v2 - - name: Set up Python - uses: actions/setup-python@v1 - - name: Install dependencies - run: | - pip install -U platformio - - name: Run PlatformIO - run: | - platformio run -e tasmota-ir - - uses: actions/upload-artifact@v2 - with: - name: firmware - path: ./build_output - - - tasmota-zbbridge: - runs-on: ubuntu-latest - continue-on-error: true - steps: - - uses: actions/checkout@v2 - - name: Set up Python - uses: actions/setup-python@v1 - - name: Install dependencies - run: | - pip install -U platformio - - name: Run PlatformIO - run: | - platformio run -e tasmota-zbbridge - - uses: actions/upload-artifact@v2 - with: - name: firmware - path: ./build_output - - - tasmota-zigbee: - runs-on: ubuntu-latest - continue-on-error: true - steps: - - uses: actions/checkout@v2 - - name: Set up Python - uses: actions/setup-python@v1 - - name: Install dependencies - run: | - pip install -U platformio - - name: Run PlatformIO - run: | - platformio run -e tasmota-zigbee - - uses: actions/upload-artifact@v2 - with: - name: firmware - path: ./build_output - - - tasmota-AF: - runs-on: ubuntu-latest - continue-on-error: true - steps: - - uses: actions/checkout@v2 - - name: Set up Python - uses: actions/setup-python@v1 - - name: Install dependencies - run: | - pip install -U platformio - - name: Run PlatformIO - run: | - platformio run -e tasmota-AF - - uses: actions/upload-artifact@v2 - with: - name: firmware - path: ./build_output - - - tasmota-BG: - runs-on: ubuntu-latest - continue-on-error: true - steps: - - uses: actions/checkout@v2 - - name: Set up Python - uses: actions/setup-python@v1 - - name: Install dependencies - run: | - pip install -U platformio - - name: Run PlatformIO - run: | - platformio run -e tasmota-BG - - uses: actions/upload-artifact@v2 - with: - name: firmware - path: ./build_output - - - tasmota-BR: - runs-on: ubuntu-latest - continue-on-error: true - steps: - - uses: actions/checkout@v2 - - name: Set up Python - uses: actions/setup-python@v1 - - name: Install dependencies - run: | - pip install -U platformio - - name: Run PlatformIO - run: | - platformio run -e tasmota-BR - - uses: actions/upload-artifact@v2 - with: - name: firmware - path: ./build_output - - - tasmota-CN: - runs-on: ubuntu-latest - continue-on-error: true - steps: - - uses: actions/checkout@v2 - - name: Set up Python - uses: actions/setup-python@v1 - - name: Install dependencies - run: | - pip install -U platformio - - name: Run PlatformIO - run: | - platformio run -e tasmota-CN - - uses: actions/upload-artifact@v2 - with: - name: firmware - path: ./build_output - - - tasmota-CZ: - runs-on: ubuntu-latest - continue-on-error: true - steps: - - uses: actions/checkout@v2 - - name: Set up Python - uses: actions/setup-python@v1 - - name: Install dependencies - run: | - pip install -U platformio - - name: Run PlatformIO - run: | - platformio run -e tasmota-CZ - - uses: actions/upload-artifact@v2 - with: - name: firmware - path: ./build_output - - - tasmota-DE: - runs-on: ubuntu-latest - continue-on-error: true - steps: - - uses: actions/checkout@v2 - - name: Set up Python - uses: actions/setup-python@v1 - - name: Install dependencies - run: | - pip install -U platformio - - name: Run PlatformIO - run: | - platformio run -e tasmota-DE - - uses: actions/upload-artifact@v2 - with: - name: firmware - path: ./build_output - - - tasmota-ES: - runs-on: ubuntu-latest - continue-on-error: true - steps: - - uses: actions/checkout@v2 - - name: Set up Python - uses: actions/setup-python@v1 - - name: Install dependencies - run: | - pip install -U platformio - - name: Run PlatformIO - run: | - platformio run -e tasmota-ES - - uses: actions/upload-artifact@v2 - with: - name: firmware - path: ./build_output - - - tasmota-FR: - runs-on: ubuntu-latest - continue-on-error: true - steps: - - uses: actions/checkout@v2 - - name: Set up Python - uses: actions/setup-python@v1 - - name: Install dependencies - run: | - pip install -U platformio - - name: Run PlatformIO - run: | - platformio run -e tasmota-FR - - uses: actions/upload-artifact@v2 - with: - name: firmware - path: ./build_output - - - tasmota-FY: - runs-on: ubuntu-latest - continue-on-error: true - steps: - - uses: actions/checkout@v2 - - name: Set up Python - uses: actions/setup-python@v1 - - name: Install dependencies - run: | - pip install -U platformio - - name: Run PlatformIO - run: | - platformio run -e tasmota-FY - - uses: actions/upload-artifact@v2 - with: - name: firmware - path: ./build_output - - - tasmota-GR: - runs-on: ubuntu-latest - continue-on-error: true - steps: - - uses: actions/checkout@v2 - - name: Set up Python - uses: actions/setup-python@v1 - - name: Install dependencies - run: | - pip install -U platformio - - name: Run PlatformIO - run: | - platformio run -e tasmota-GR - - uses: actions/upload-artifact@v2 - with: - name: firmware - path: ./build_output - - - tasmota-HE: - runs-on: ubuntu-latest - continue-on-error: true - steps: - - uses: actions/checkout@v2 - - name: Set up Python - uses: actions/setup-python@v1 - - name: Install dependencies - run: | - pip install -U platformio - - name: Run PlatformIO - run: | - platformio run -e tasmota-HE - - uses: actions/upload-artifact@v2 - with: - name: firmware - path: ./build_output - - - tasmota-HU: - runs-on: ubuntu-latest - continue-on-error: true - steps: - - uses: actions/checkout@v2 - - name: Set up Python - uses: actions/setup-python@v1 - - name: Install dependencies - run: | - pip install -U platformio - - name: Run PlatformIO - run: | - platformio run -e tasmota-HU - - uses: actions/upload-artifact@v2 - with: - name: firmware - path: ./build_output - - - tasmota-IT: - runs-on: ubuntu-latest - continue-on-error: true - steps: - - uses: actions/checkout@v2 - - name: Set up Python - uses: actions/setup-python@v1 - - name: Install dependencies - run: | - pip install -U platformio - - name: Run PlatformIO - run: | - platformio run -e tasmota-IT - - uses: actions/upload-artifact@v2 - with: - name: firmware - path: ./build_output - - - tasmota-KO: - runs-on: ubuntu-latest - continue-on-error: true - steps: - - uses: actions/checkout@v2 - - name: Set up Python - uses: actions/setup-python@v1 - - name: Install dependencies - run: | - pip install -U platformio - - name: Run PlatformIO - run: | - platformio run -e tasmota-KO - - uses: actions/upload-artifact@v2 - with: - name: firmware - path: ./build_output - - - tasmota-NL: - runs-on: ubuntu-latest - continue-on-error: true - steps: - - uses: actions/checkout@v2 - - name: Set up Python - uses: actions/setup-python@v1 - - name: Install dependencies - run: | - pip install -U platformio - - name: Run PlatformIO - run: | - platformio run -e tasmota-NL - - uses: actions/upload-artifact@v2 - with: - name: firmware - path: ./build_output - - - tasmota-PL: - runs-on: ubuntu-latest - continue-on-error: true - steps: - - uses: actions/checkout@v2 - - name: Set up Python - uses: actions/setup-python@v1 - - name: Install dependencies - run: | - pip install -U platformio - - name: Run PlatformIO - run: | - platformio run -e tasmota-PL - - uses: actions/upload-artifact@v2 - with: - name: firmware - path: ./build_output - - - tasmota-PT: - runs-on: ubuntu-latest - continue-on-error: true - steps: - - uses: actions/checkout@v2 - - name: Set up Python - uses: actions/setup-python@v1 - - name: Install dependencies - run: | - pip install -U platformio - - name: Run PlatformIO - run: | - platformio run -e tasmota-PT - - uses: actions/upload-artifact@v2 - with: - name: firmware - path: ./build_output - - - tasmota-RO: - runs-on: ubuntu-latest - continue-on-error: true - steps: - - uses: actions/checkout@v2 - - name: Set up Python - uses: actions/setup-python@v1 - - name: Install dependencies - run: | - pip install -U platformio - - name: Run PlatformIO - run: | - platformio run -e tasmota-RO - - uses: actions/upload-artifact@v2 - with: - name: firmware - path: ./build_output - - - tasmota-RU: - runs-on: ubuntu-latest - continue-on-error: true - steps: - - uses: actions/checkout@v2 - - name: Set up Python - uses: actions/setup-python@v1 - - name: Install dependencies - run: | - pip install -U platformio - - name: Run PlatformIO - run: | - platformio run -e tasmota-RU - - uses: actions/upload-artifact@v2 - with: - name: firmware - path: ./build_output - - - tasmota-SE: - runs-on: ubuntu-latest - continue-on-error: true - steps: - - uses: actions/checkout@v2 - - name: Set up Python - uses: actions/setup-python@v1 - - name: Install dependencies - run: | - pip install -U platformio - - name: Run PlatformIO - run: | - platformio run -e tasmota-SE - - uses: actions/upload-artifact@v2 - with: - name: firmware - path: ./build_output - - - tasmota-SK: - runs-on: ubuntu-latest - continue-on-error: true - steps: - - uses: actions/checkout@v2 - - name: Set up Python - uses: actions/setup-python@v1 - - name: Install dependencies - run: | - pip install -U platformio - - name: Run PlatformIO - run: | - platformio run -e tasmota-SK - - uses: actions/upload-artifact@v2 - with: - name: firmware - path: ./build_output - - - tasmota-TR: - runs-on: ubuntu-latest - continue-on-error: true - steps: - - uses: actions/checkout@v2 - - name: Set up Python - uses: actions/setup-python@v1 - - name: Install dependencies - run: | - pip install -U platformio - - name: Run PlatformIO - run: | - platformio run -e tasmota-TR - - uses: actions/upload-artifact@v2 - with: - name: firmware - path: ./build_output - - - tasmota-TW: - runs-on: ubuntu-latest - continue-on-error: true - steps: - - uses: actions/checkout@v2 - - name: Set up Python - uses: actions/setup-python@v1 - - name: Install dependencies - run: | - pip install -U platformio - - name: Run PlatformIO - run: | - platformio run -e tasmota-TW - - uses: actions/upload-artifact@v2 - with: - name: firmware - path: ./build_output - - - tasmota-UK: - runs-on: ubuntu-latest - continue-on-error: true - steps: - - uses: actions/checkout@v2 - - name: Set up Python - uses: actions/setup-python@v1 - - name: Install dependencies - run: | - pip install -U platformio - - name: Run PlatformIO - run: | - platformio run -e tasmota-UK - - uses: actions/upload-artifact@v2 - with: - name: firmware - path: ./build_output - - - tasmota-VN: - runs-on: ubuntu-latest - continue-on-error: true - steps: - - uses: actions/checkout@v2 - - name: Set up Python - uses: actions/setup-python@v1 - - name: Install dependencies - run: | - pip install -U platformio - - name: Run PlatformIO - run: | - platformio run -e tasmota-VN - - uses: actions/upload-artifact@v2 - with: - name: firmware - path: ./build_output - - - tasmota32: - runs-on: ubuntu-latest - continue-on-error: true - steps: - - uses: actions/checkout@v2 - - name: Set up Python - uses: actions/setup-python@v1 - - name: Install dependencies - run: | - pip install -U platformio - - name: Run PlatformIO - run: | - platformio run -e tasmota32 - - uses: actions/upload-artifact@v2 - with: - name: firmware - path: ./build_output - - - tasmota32solo1: - runs-on: ubuntu-latest - continue-on-error: true - steps: - - uses: actions/checkout@v2 - - name: Set up Python - uses: actions/setup-python@v1 - - name: Install dependencies - run: | - pip install -U platformio - - name: Run PlatformIO - run: | - platformio run -e tasmota32solo1 - - uses: actions/upload-artifact@v2 - with: - name: firmware - path: ./build_output - - - tasmota32-webcam: - runs-on: ubuntu-latest - continue-on-error: true - steps: - - uses: actions/checkout@v2 - - name: Set up Python - uses: actions/setup-python@v1 - - name: Install dependencies - run: | - pip install -U platformio - - name: Run PlatformIO - run: | - platformio run -e tasmota32-webcam - - uses: actions/upload-artifact@v2 - with: - name: firmware - path: ./build_output - - - tasmota32-odroidgo: - runs-on: ubuntu-latest - continue-on-error: true - steps: - - uses: actions/checkout@v2 - - name: Set up Python - uses: actions/setup-python@v1 - - name: Install dependencies - run: | - pip install -U platformio - - name: Run PlatformIO - run: | - platformio run -e tasmota32-odroidgo - - uses: actions/upload-artifact@v2 - with: - name: firmware - path: ./build_output - - - tasmota32-core2: - runs-on: ubuntu-latest - continue-on-error: true - steps: - - uses: actions/checkout@v2 - - name: Set up Python - uses: actions/setup-python@v1 - - name: Install dependencies - run: | - pip install -U platformio - - name: Run PlatformIO - run: | - platformio run -e tasmota32-core2 - - uses: actions/upload-artifact@v2 - with: - name: firmware - path: ./build_output - - - tasmota32-bluetooth: - runs-on: ubuntu-latest - continue-on-error: true - steps: - - uses: actions/checkout@v2 - - name: Set up Python - uses: actions/setup-python@v1 - - name: Install dependencies - run: | - pip install -U platformio - - name: Run PlatformIO - run: | - platformio run -e tasmota32-bluetooth - - uses: actions/upload-artifact@v2 - with: - name: firmware - path: ./build_output - - - tasmota32-display: - runs-on: ubuntu-latest - continue-on-error: true - steps: - - uses: actions/checkout@v2 - - name: Set up Python - uses: actions/setup-python@v1 - - name: Install dependencies - run: | - pip install -U platformio - - name: Run PlatformIO - run: | - platformio run -e tasmota32-display - - uses: actions/upload-artifact@v2 - with: - name: firmware - path: ./build_output - - - tasmota32-lvgl: - runs-on: ubuntu-latest - continue-on-error: true - steps: - - uses: actions/checkout@v2 - - name: Set up Python - uses: actions/setup-python@v1 - - name: Install dependencies - run: | - pip install -U platformio - - name: Run PlatformIO - run: | - platformio run -e tasmota32-lvgl - - uses: actions/upload-artifact@v2 - with: - name: firmware - path: ./build_output - - - tasmota32-ir: - runs-on: ubuntu-latest - continue-on-error: true - steps: - - uses: actions/checkout@v2 - - name: Set up Python - uses: actions/setup-python@v1 - - name: Install dependencies - run: | - pip install -U platformio - - name: Run PlatformIO - run: | - platformio run -e tasmota32-ir - - uses: actions/upload-artifact@v2 - with: - name: firmware - path: ./build_output - - tasmota32c3: - runs-on: ubuntu-latest - continue-on-error: true - steps: - - uses: actions/checkout@v2 - - name: Set up Python - uses: actions/setup-python@v1 - - name: Install dependencies - run: | - pip install -U platformio - - name: Run PlatformIO - run: | - platformio run -e tasmota32c3 - - uses: actions/upload-artifact@v2 - with: - name: firmware - path: ./build_output - - tasmota32-AF: - runs-on: ubuntu-latest - continue-on-error: true - steps: - - uses: actions/checkout@v2 - - name: Set up Python - uses: actions/setup-python@v1 - - name: Install dependencies - run: | - pip install -U platformio - - name: Run PlatformIO - run: | - platformio run -e tasmota32-AF - - uses: actions/upload-artifact@v2 - with: - name: firmware - path: ./build_output - - - tasmota32-BG: - runs-on: ubuntu-latest - continue-on-error: true - steps: - - uses: actions/checkout@v2 - - name: Set up Python - uses: actions/setup-python@v1 - - name: Install dependencies - run: | - pip install -U platformio - - name: Run PlatformIO - run: | - platformio run -e tasmota32-BG - - uses: actions/upload-artifact@v2 - with: - name: firmware - path: ./build_output - - - tasmota32-BR: - runs-on: ubuntu-latest - continue-on-error: true - steps: - - uses: actions/checkout@v2 - - name: Set up Python - uses: actions/setup-python@v1 - - name: Install dependencies - run: | - pip install -U platformio - - name: Run PlatformIO - run: | - platformio run -e tasmota32-BR - - uses: actions/upload-artifact@v2 - with: - name: firmware - path: ./build_output - - - tasmota32-CN: - runs-on: ubuntu-latest - continue-on-error: true - steps: - - uses: actions/checkout@v2 - - name: Set up Python - uses: actions/setup-python@v1 - - name: Install dependencies - run: | - pip install -U platformio - - name: Run PlatformIO - run: | - platformio run -e tasmota32-CN - - uses: actions/upload-artifact@v2 - with: - name: firmware - path: ./build_output - - - tasmota32-CZ: - runs-on: ubuntu-latest - continue-on-error: true - steps: - - uses: actions/checkout@v2 - - name: Set up Python - uses: actions/setup-python@v1 - - name: Install dependencies - run: | - pip install -U platformio - - name: Run PlatformIO - run: | - platformio run -e tasmota32-CZ - - uses: actions/upload-artifact@v2 - with: - name: firmware - path: ./build_output - - - tasmota32-DE: - runs-on: ubuntu-latest - continue-on-error: true - steps: - - uses: actions/checkout@v2 - - name: Set up Python - uses: actions/setup-python@v1 - - name: Install dependencies - run: | - pip install -U platformio - - name: Run PlatformIO - run: | - platformio run -e tasmota32-DE - - uses: actions/upload-artifact@v2 - with: - name: firmware - path: ./build_output - - - tasmota32-ES: - runs-on: ubuntu-latest - continue-on-error: true - steps: - - uses: actions/checkout@v2 - - name: Set up Python - uses: actions/setup-python@v1 - - name: Install dependencies - run: | - pip install -U platformio - - name: Run PlatformIO - run: | - platformio run -e tasmota32-ES - - uses: actions/upload-artifact@v2 - with: - name: firmware - path: ./build_output - - - tasmota32-FR: - runs-on: ubuntu-latest - continue-on-error: true - steps: - - uses: actions/checkout@v2 - - name: Set up Python - uses: actions/setup-python@v1 - - name: Install dependencies - run: | - pip install -U platformio - - name: Run PlatformIO - run: | - platformio run -e tasmota32-FR - - uses: actions/upload-artifact@v2 - with: - name: firmware - path: ./build_output - - - tasmota32-FY: - runs-on: ubuntu-latest - continue-on-error: true - steps: - - uses: actions/checkout@v2 - - name: Set up Python - uses: actions/setup-python@v1 - - name: Install dependencies - run: | - pip install -U platformio - - name: Run PlatformIO - run: | - platformio run -e tasmota32-FY - - uses: actions/upload-artifact@v2 - with: - name: firmware - path: ./build_output - - - tasmota32-GR: - runs-on: ubuntu-latest - continue-on-error: true - steps: - - uses: actions/checkout@v2 - - name: Set up Python - uses: actions/setup-python@v1 - - name: Install dependencies - run: | - pip install -U platformio - - name: Run PlatformIO - run: | - platformio run -e tasmota32-GR - - uses: actions/upload-artifact@v2 - with: - name: firmware - path: ./build_output - - - tasmota32-HE: - runs-on: ubuntu-latest - continue-on-error: true - steps: - - uses: actions/checkout@v2 - - name: Set up Python - uses: actions/setup-python@v1 - - name: Install dependencies - run: | - pip install -U platformio - - name: Run PlatformIO - run: | - platformio run -e tasmota32-HE - - uses: actions/upload-artifact@v2 - with: - name: firmware - path: ./build_output - - - tasmota32-HU: - runs-on: ubuntu-latest - continue-on-error: true - steps: - - uses: actions/checkout@v2 - - name: Set up Python - uses: actions/setup-python@v1 - - name: Install dependencies - run: | - pip install -U platformio - - name: Run PlatformIO - run: | - platformio run -e tasmota32-HU - - uses: actions/upload-artifact@v2 - with: - name: firmware - path: ./build_output - - - tasmota32-IT: - runs-on: ubuntu-latest - continue-on-error: true - steps: - - uses: actions/checkout@v2 - - name: Set up Python - uses: actions/setup-python@v1 - - name: Install dependencies - run: | - pip install -U platformio - - name: Run PlatformIO - run: | - platformio run -e tasmota32-IT - - uses: actions/upload-artifact@v2 - with: - name: firmware - path: ./build_output - - - tasmota32-KO: - runs-on: ubuntu-latest - continue-on-error: true - steps: - - uses: actions/checkout@v2 - - name: Set up Python - uses: actions/setup-python@v1 - - name: Install dependencies - run: | - pip install -U platformio - - name: Run PlatformIO - run: | - platformio run -e tasmota32-KO - - uses: actions/upload-artifact@v2 - with: - name: firmware - path: ./build_output - - - tasmota32-NL: - runs-on: ubuntu-latest - continue-on-error: true - steps: - - uses: actions/checkout@v2 - - name: Set up Python - uses: actions/setup-python@v1 - - name: Install dependencies - run: | - pip install -U platformio - - name: Run PlatformIO - run: | - platformio run -e tasmota32-NL - - uses: actions/upload-artifact@v2 - with: - name: firmware - path: ./build_output - - - tasmota32-PL: - runs-on: ubuntu-latest - continue-on-error: true - steps: - - uses: actions/checkout@v2 - - name: Set up Python - uses: actions/setup-python@v1 - - name: Install dependencies - run: | - pip install -U platformio - - name: Run PlatformIO - run: | - platformio run -e tasmota32-PL - - uses: actions/upload-artifact@v2 - with: - name: firmware - path: ./build_output - - - tasmota32-PT: - runs-on: ubuntu-latest - continue-on-error: true - steps: - - uses: actions/checkout@v2 - - name: Set up Python - uses: actions/setup-python@v1 - - name: Install dependencies - run: | - pip install -U platformio - - name: Run PlatformIO - run: | - platformio run -e tasmota32-PT - - uses: actions/upload-artifact@v2 - with: - name: firmware - path: ./build_output - - - tasmota32-RO: - runs-on: ubuntu-latest - continue-on-error: true - steps: - - uses: actions/checkout@v2 - - name: Set up Python - uses: actions/setup-python@v1 - - name: Install dependencies - run: | - pip install -U platformio - - name: Run PlatformIO - run: | - platformio run -e tasmota32-RO - - uses: actions/upload-artifact@v2 - with: - name: firmware - path: ./build_output - - - tasmota32-RU: - runs-on: ubuntu-latest - continue-on-error: true - steps: - - uses: actions/checkout@v2 - - name: Set up Python - uses: actions/setup-python@v1 - - name: Install dependencies - run: | - pip install -U platformio - - name: Run PlatformIO - run: | - platformio run -e tasmota32-RU - - uses: actions/upload-artifact@v2 - with: - name: firmware - path: ./build_output - - - tasmota32-SE: - runs-on: ubuntu-latest - continue-on-error: true - steps: - - uses: actions/checkout@v2 - - name: Set up Python - uses: actions/setup-python@v1 - - name: Install dependencies - run: | - pip install -U platformio - - name: Run PlatformIO - run: | - platformio run -e tasmota32-SE - - uses: actions/upload-artifact@v2 - with: - name: firmware - path: ./build_output - - - tasmota32-SK: - runs-on: ubuntu-latest - continue-on-error: true - steps: - - uses: actions/checkout@v2 - - name: Set up Python - uses: actions/setup-python@v1 - - name: Install dependencies - run: | - pip install -U platformio - - name: Run PlatformIO - run: | - platformio run -e tasmota32-SK - - uses: actions/upload-artifact@v2 - with: - name: firmware - path: ./build_output - - - tasmota32-TR: - runs-on: ubuntu-latest - continue-on-error: true - steps: - - uses: actions/checkout@v2 - - name: Set up Python - uses: actions/setup-python@v1 - - name: Install dependencies - run: | - pip install -U platformio - - name: Run PlatformIO - run: | - platformio run -e tasmota32-TR - - uses: actions/upload-artifact@v2 - with: - name: firmware - path: ./build_output - - - tasmota32-TW: - runs-on: ubuntu-latest - continue-on-error: true - steps: - - uses: actions/checkout@v2 - - name: Set up Python - uses: actions/setup-python@v1 - - name: Install dependencies - run: | - pip install -U platformio - - name: Run PlatformIO - run: | - platformio run -e tasmota32-TW - - uses: actions/upload-artifact@v2 - with: - name: firmware - path: ./build_output - - - tasmota32-UK: - runs-on: ubuntu-latest - continue-on-error: true - steps: - - uses: actions/checkout@v2 - - name: Set up Python - uses: actions/setup-python@v1 - - name: Install dependencies - run: | - pip install -U platformio - - name: Run PlatformIO - run: | - platformio run -e tasmota32-UK - - uses: actions/upload-artifact@v2 - with: - name: firmware - path: ./build_output - - - tasmota32-VN: - runs-on: ubuntu-latest - continue-on-error: true - steps: - - uses: actions/checkout@v2 - - name: Set up Python - uses: actions/setup-python@v1 - - name: Install dependencies - run: | - pip install -U platformio - - name: Run PlatformIO - run: | - platformio run -e tasmota32-VN - - uses: actions/upload-artifact@v2 - with: - name: firmware - path: ./build_output - + base-images: + runs-on: ubuntu-latest + if: github.repository == 'arendst/Tasmota' + continue-on-error: true + strategy: + matrix: + variant: + - tasmota + - tasmota-minimal + - tasmota-display + - tasmota-ir + - tasmota-knx + - tasmota-lite + - tasmota-sensors + - tasmota-zbbridge + - tasmota-zigbee + - tasmota32 + - tasmota32-webcam + - tasmota32-bluetooth + - tasmota32-core2 + - tasmota32-display + - tasmota32-ir + - tasmota32-lvgl + - tasmota32-odroidgo + - tasmota32c3 + - tasmota32solo1 + steps: + - uses: actions/checkout@v2 + with: + ref: development + - name: Set up Python + uses: actions/setup-python@v1 + - name: Install dependencies + run: | + pip install -U platformio + - name: Run PlatformIO + run: platformio run -e ${{ matrix.variant }} + - uses: actions/upload-artifact@v2 + with: + name: firmware + path: ./build_output + + language-images: + runs-on: ubuntu-latest + if: github.repository == 'arendst/Tasmota' + continue-on-error: true + strategy: + matrix: + variant: [ tasmota, tasmota32 ] + language: [ AF, BG, BR, CN, CZ, DE, ES, FR, FY, GR, HE, HU, IT, KO, NL, PL, PT, RO, RU, SE, SK, TR, TW, UK, VN ] + steps: + - uses: actions/checkout@v2 + with: + ref: development + - name: Set up Python + uses: actions/setup-python@v1 + - name: Install dependencies + run: | + pip install -U platformio + - name: Run PlatformIO + run: platformio run -e ${{ matrix.variant }}-${{ matrix.language }} + - uses: actions/upload-artifact@v2 + with: + name: firmware + path: ./build_output Upload: - needs: [tasmota-VN, tasmota32-VN, tasmota32-TW, tasmota32-TR] + needs: [base-images, language-images] runs-on: ubuntu-latest continue-on-error: true steps: diff --git a/.github/workflows/Tasmota_build_master.yml b/.github/workflows/Tasmota_build_master.yml index 4639fde5e..9ca6e1f6c 100644 --- a/.github/workflows/Tasmota_build_master.yml +++ b/.github/workflows/Tasmota_build_master.yml @@ -5,1320 +5,77 @@ on: branches: master paths-ignore: - '.github/**' # Ignore changes towards the .github directory + - '**.md' # Do no build if *.md files changes jobs: - - tasmota: - runs-on: ubuntu-latest - continue-on-error: true - steps: - - uses: actions/checkout@v2 - - name: Set up Python - uses: actions/setup-python@v1 - - name: Install dependencies - run: | - pip install -U platformio - - name: Run PlatformIO - run: | - platformio run -e tasmota - - uses: actions/upload-artifact@v2 - with: - name: firmware - path: ./build_output - - - tasmota-minimal: - runs-on: ubuntu-latest - continue-on-error: true - steps: - - uses: actions/checkout@v2 - - name: Set up Python - uses: actions/setup-python@v1 - - name: Install dependencies - run: | - pip install -U platformio - - name: Run PlatformIO - run: | - platformio run -e tasmota-minimal - - uses: actions/upload-artifact@v2 - with: - name: firmware - path: ./build_output - - - tasmota-lite: - runs-on: ubuntu-latest - continue-on-error: true - steps: - - uses: actions/checkout@v2 - - name: Set up Python - uses: actions/setup-python@v1 - - name: Install dependencies - run: | - pip install -U platformio - - name: Run PlatformIO - run: | - platformio run -e tasmota-lite - - uses: actions/upload-artifact@v2 - with: - name: firmware - path: ./build_output - - - tasmota-knx: - runs-on: ubuntu-latest - continue-on-error: true - steps: - - uses: actions/checkout@v2 - - name: Set up Python - uses: actions/setup-python@v1 - - name: Install dependencies - run: | - pip install -U platformio - - name: Run PlatformIO - run: | - platformio run -e tasmota-knx - - uses: actions/upload-artifact@v2 - with: - name: firmware - path: ./build_output - - - tasmota-sensors: - runs-on: ubuntu-latest - continue-on-error: true - steps: - - uses: actions/checkout@v2 - - name: Set up Python - uses: actions/setup-python@v1 - - name: Install dependencies - run: | - pip install -U platformio - - name: Run PlatformIO - run: | - platformio run -e tasmota-sensors - - uses: actions/upload-artifact@v2 - with: - name: firmware - path: ./build_output - - - tasmota-display: - runs-on: ubuntu-latest - continue-on-error: true - steps: - - uses: actions/checkout@v2 - - name: Set up Python - uses: actions/setup-python@v1 - - name: Install dependencies - run: | - pip install -U platformio - - name: Run PlatformIO - run: | - platformio run -e tasmota-display - - uses: actions/upload-artifact@v2 - with: - name: firmware - path: ./build_output - - - tasmota-ir: - runs-on: ubuntu-latest - continue-on-error: true - steps: - - uses: actions/checkout@v2 - - name: Set up Python - uses: actions/setup-python@v1 - - name: Install dependencies - run: | - pip install -U platformio - - name: Run PlatformIO - run: | - platformio run -e tasmota-ir - - uses: actions/upload-artifact@v2 - with: - name: firmware - path: ./build_output - - - tasmota-zbbridge: - runs-on: ubuntu-latest - continue-on-error: true - steps: - - uses: actions/checkout@v2 - - name: Set up Python - uses: actions/setup-python@v1 - - name: Install dependencies - run: | - pip install -U platformio - - name: Run PlatformIO - run: | - platformio run -e tasmota-zbbridge - - uses: actions/upload-artifact@v2 - with: - name: firmware - path: ./build_output - - - tasmota-zigbee: - runs-on: ubuntu-latest - continue-on-error: true - steps: - - uses: actions/checkout@v2 - - name: Set up Python - uses: actions/setup-python@v1 - - name: Install dependencies - run: | - pip install -U platformio - - name: Run PlatformIO - run: | - platformio run -e tasmota-zigbee - - uses: actions/upload-artifact@v2 - with: - name: firmware - path: ./build_output - - - tasmota-AF: - runs-on: ubuntu-latest - continue-on-error: true - steps: - - uses: actions/checkout@v2 - - name: Set up Python - uses: actions/setup-python@v1 - - name: Install dependencies - run: | - pip install -U platformio - - name: Run PlatformIO - run: | - platformio run -e tasmota-AF - - uses: actions/upload-artifact@v2 - with: - name: firmware - path: ./build_output - - - tasmota-BG: - runs-on: ubuntu-latest - continue-on-error: true - steps: - - uses: actions/checkout@v2 - - name: Set up Python - uses: actions/setup-python@v1 - - name: Install dependencies - run: | - pip install -U platformio - - name: Run PlatformIO - run: | - platformio run -e tasmota-BG - - uses: actions/upload-artifact@v2 - with: - name: firmware - path: ./build_output - - - tasmota-BR: - runs-on: ubuntu-latest - continue-on-error: true - steps: - - uses: actions/checkout@v2 - - name: Set up Python - uses: actions/setup-python@v1 - - name: Install dependencies - run: | - pip install -U platformio - - name: Run PlatformIO - run: | - platformio run -e tasmota-BR - - uses: actions/upload-artifact@v2 - with: - name: firmware - path: ./build_output - - - tasmota-CN: - runs-on: ubuntu-latest - continue-on-error: true - steps: - - uses: actions/checkout@v2 - - name: Set up Python - uses: actions/setup-python@v1 - - name: Install dependencies - run: | - pip install -U platformio - - name: Run PlatformIO - run: | - platformio run -e tasmota-CN - - uses: actions/upload-artifact@v2 - with: - name: firmware - path: ./build_output - - - tasmota-CZ: - runs-on: ubuntu-latest - continue-on-error: true - steps: - - uses: actions/checkout@v2 - - name: Set up Python - uses: actions/setup-python@v1 - - name: Install dependencies - run: | - pip install -U platformio - - name: Run PlatformIO - run: | - platformio run -e tasmota-CZ - - uses: actions/upload-artifact@v2 - with: - name: firmware - path: ./build_output - - - tasmota-DE: - runs-on: ubuntu-latest - continue-on-error: true - steps: - - uses: actions/checkout@v2 - - name: Set up Python - uses: actions/setup-python@v1 - - name: Install dependencies - run: | - pip install -U platformio - - name: Run PlatformIO - run: | - platformio run -e tasmota-DE - - uses: actions/upload-artifact@v2 - with: - name: firmware - path: ./build_output - - - tasmota-ES: - runs-on: ubuntu-latest - continue-on-error: true - steps: - - uses: actions/checkout@v2 - - name: Set up Python - uses: actions/setup-python@v1 - - name: Install dependencies - run: | - pip install -U platformio - - name: Run PlatformIO - run: | - platformio run -e tasmota-ES - - uses: actions/upload-artifact@v2 - with: - name: firmware - path: ./build_output - - - tasmota-FR: - runs-on: ubuntu-latest - continue-on-error: true - steps: - - uses: actions/checkout@v2 - - name: Set up Python - uses: actions/setup-python@v1 - - name: Install dependencies - run: | - pip install -U platformio - - name: Run PlatformIO - run: | - platformio run -e tasmota-FR - - uses: actions/upload-artifact@v2 - with: - name: firmware - path: ./build_output - - - tasmota-FY: - runs-on: ubuntu-latest - continue-on-error: true - steps: - - uses: actions/checkout@v2 - - name: Set up Python - uses: actions/setup-python@v1 - - name: Install dependencies - run: | - pip install -U platformio - - name: Run PlatformIO - run: | - platformio run -e tasmota-FY - - uses: actions/upload-artifact@v2 - with: - name: firmware - path: ./build_output - - - tasmota-GR: - runs-on: ubuntu-latest - continue-on-error: true - steps: - - uses: actions/checkout@v2 - - name: Set up Python - uses: actions/setup-python@v1 - - name: Install dependencies - run: | - pip install -U platformio - - name: Run PlatformIO - run: | - platformio run -e tasmota-GR - - uses: actions/upload-artifact@v2 - with: - name: firmware - path: ./build_output - - - tasmota-HE: - runs-on: ubuntu-latest - continue-on-error: true - steps: - - uses: actions/checkout@v2 - - name: Set up Python - uses: actions/setup-python@v1 - - name: Install dependencies - run: | - pip install -U platformio - - name: Run PlatformIO - run: | - platformio run -e tasmota-HE - - uses: actions/upload-artifact@v2 - with: - name: firmware - path: ./build_output - - - tasmota-HU: - runs-on: ubuntu-latest - continue-on-error: true - steps: - - uses: actions/checkout@v2 - - name: Set up Python - uses: actions/setup-python@v1 - - name: Install dependencies - run: | - pip install -U platformio - - name: Run PlatformIO - run: | - platformio run -e tasmota-HU - - uses: actions/upload-artifact@v2 - with: - name: firmware - path: ./build_output - - - tasmota-IT: - runs-on: ubuntu-latest - continue-on-error: true - steps: - - uses: actions/checkout@v2 - - name: Set up Python - uses: actions/setup-python@v1 - - name: Install dependencies - run: | - pip install -U platformio - - name: Run PlatformIO - run: | - platformio run -e tasmota-IT - - uses: actions/upload-artifact@v2 - with: - name: firmware - path: ./build_output - - - tasmota-KO: - runs-on: ubuntu-latest - continue-on-error: true - steps: - - uses: actions/checkout@v2 - - name: Set up Python - uses: actions/setup-python@v1 - - name: Install dependencies - run: | - pip install -U platformio - - name: Run PlatformIO - run: | - platformio run -e tasmota-KO - - uses: actions/upload-artifact@v2 - with: - name: firmware - path: ./build_output - - - tasmota-NL: - runs-on: ubuntu-latest - continue-on-error: true - steps: - - uses: actions/checkout@v2 - - name: Set up Python - uses: actions/setup-python@v1 - - name: Install dependencies - run: | - pip install -U platformio - - name: Run PlatformIO - run: | - platformio run -e tasmota-NL - - uses: actions/upload-artifact@v2 - with: - name: firmware - path: ./build_output - - - tasmota-PL: - runs-on: ubuntu-latest - continue-on-error: true - steps: - - uses: actions/checkout@v2 - - name: Set up Python - uses: actions/setup-python@v1 - - name: Install dependencies - run: | - pip install -U platformio - - name: Run PlatformIO - run: | - platformio run -e tasmota-PL - - uses: actions/upload-artifact@v2 - with: - name: firmware - path: ./build_output - - - tasmota-PT: - runs-on: ubuntu-latest - continue-on-error: true - steps: - - uses: actions/checkout@v2 - - name: Set up Python - uses: actions/setup-python@v1 - - name: Install dependencies - run: | - pip install -U platformio - - name: Run PlatformIO - run: | - platformio run -e tasmota-PT - - uses: actions/upload-artifact@v2 - with: - name: firmware - path: ./build_output - - - tasmota-RO: - runs-on: ubuntu-latest - continue-on-error: true - steps: - - uses: actions/checkout@v2 - - name: Set up Python - uses: actions/setup-python@v1 - - name: Install dependencies - run: | - pip install -U platformio - - name: Run PlatformIO - run: | - platformio run -e tasmota-RO - - uses: actions/upload-artifact@v2 - with: - name: firmware - path: ./build_output - - - tasmota-RU: - runs-on: ubuntu-latest - continue-on-error: true - steps: - - uses: actions/checkout@v2 - - name: Set up Python - uses: actions/setup-python@v1 - - name: Install dependencies - run: | - pip install -U platformio - - name: Run PlatformIO - run: | - platformio run -e tasmota-RU - - uses: actions/upload-artifact@v2 - with: - name: firmware - path: ./build_output - - - tasmota-SE: - runs-on: ubuntu-latest - continue-on-error: true - steps: - - uses: actions/checkout@v2 - - name: Set up Python - uses: actions/setup-python@v1 - - name: Install dependencies - run: | - pip install -U platformio - - name: Run PlatformIO - run: | - platformio run -e tasmota-SE - - uses: actions/upload-artifact@v2 - with: - name: firmware - path: ./build_output - - - tasmota-SK: - runs-on: ubuntu-latest - continue-on-error: true - steps: - - uses: actions/checkout@v2 - - name: Set up Python - uses: actions/setup-python@v1 - - name: Install dependencies - run: | - pip install -U platformio - - name: Run PlatformIO - run: | - platformio run -e tasmota-SK - - uses: actions/upload-artifact@v2 - with: - name: firmware - path: ./build_output - - - tasmota-TR: - runs-on: ubuntu-latest - continue-on-error: true - steps: - - uses: actions/checkout@v2 - - name: Set up Python - uses: actions/setup-python@v1 - - name: Install dependencies - run: | - pip install -U platformio - - name: Run PlatformIO - run: | - platformio run -e tasmota-TR - - uses: actions/upload-artifact@v2 - with: - name: firmware - path: ./build_output - - - tasmota-TW: - runs-on: ubuntu-latest - continue-on-error: true - steps: - - uses: actions/checkout@v2 - - name: Set up Python - uses: actions/setup-python@v1 - - name: Install dependencies - run: | - pip install -U platformio - - name: Run PlatformIO - run: | - platformio run -e tasmota-TW - - uses: actions/upload-artifact@v2 - with: - name: firmware - path: ./build_output - - - tasmota-UK: - runs-on: ubuntu-latest - continue-on-error: true - steps: - - uses: actions/checkout@v2 - - name: Set up Python - uses: actions/setup-python@v1 - - name: Install dependencies - run: | - pip install -U platformio - - name: Run PlatformIO - run: | - platformio run -e tasmota-UK - - uses: actions/upload-artifact@v2 - with: - name: firmware - path: ./build_output - - - tasmota-VN: - runs-on: ubuntu-latest - continue-on-error: true - steps: - - uses: actions/checkout@v2 - - name: Set up Python - uses: actions/setup-python@v1 - - name: Install dependencies - run: | - pip install -U platformio - - name: Run PlatformIO - run: | - platformio run -e tasmota-VN - - uses: actions/upload-artifact@v2 - with: - name: firmware - path: ./build_output - - - tasmota32: - runs-on: ubuntu-latest - continue-on-error: true - steps: - - uses: actions/checkout@v2 - - name: Set up Python - uses: actions/setup-python@v1 - - name: Install dependencies - run: | - pip install -U platformio - - name: Run PlatformIO - run: | - platformio run -e tasmota32 - - uses: actions/upload-artifact@v2 - with: - name: firmware - path: ./build_output - - - tasmota32solo1: - runs-on: ubuntu-latest - continue-on-error: true - steps: - - uses: actions/checkout@v2 - - name: Set up Python - uses: actions/setup-python@v1 - - name: Install dependencies - run: | - pip install -U platformio - - name: Run PlatformIO - run: | - platformio run -e tasmota32solo1 - - uses: actions/upload-artifact@v2 - with: - name: firmware - path: ./build_output - - - tasmota32-webcam: - runs-on: ubuntu-latest - continue-on-error: true - steps: - - uses: actions/checkout@v2 - - name: Set up Python - uses: actions/setup-python@v1 - - name: Install dependencies - run: | - pip install -U platformio - - name: Run PlatformIO - run: | - platformio run -e tasmota32-webcam - - uses: actions/upload-artifact@v2 - with: - name: firmware - path: ./build_output - - - tasmota32-odroidgo: - runs-on: ubuntu-latest - continue-on-error: true - steps: - - uses: actions/checkout@v2 - - name: Set up Python - uses: actions/setup-python@v1 - - name: Install dependencies - run: | - pip install -U platformio - - name: Run PlatformIO - run: | - platformio run -e tasmota32-odroidgo - - uses: actions/upload-artifact@v2 - with: - name: firmware - path: ./build_output - - - tasmota32-core2: - runs-on: ubuntu-latest - continue-on-error: true - steps: - - uses: actions/checkout@v2 - - name: Set up Python - uses: actions/setup-python@v1 - - name: Install dependencies - run: | - pip install -U platformio - - name: Run PlatformIO - run: | - platformio run -e tasmota32-core2 - - uses: actions/upload-artifact@v2 - with: - name: firmware - path: ./build_output - - - tasmota32-bluetooth: - runs-on: ubuntu-latest - continue-on-error: true - steps: - - uses: actions/checkout@v2 - - name: Set up Python - uses: actions/setup-python@v1 - - name: Install dependencies - run: | - pip install -U platformio - - name: Run PlatformIO - run: | - platformio run -e tasmota32-bluetooth - - uses: actions/upload-artifact@v2 - with: - name: firmware - path: ./build_output - - - tasmota32-display: - runs-on: ubuntu-latest - continue-on-error: true - steps: - - uses: actions/checkout@v2 - - name: Set up Python - uses: actions/setup-python@v1 - - name: Install dependencies - run: | - pip install -U platformio - - name: Run PlatformIO - run: | - platformio run -e tasmota32-display - - uses: actions/upload-artifact@v2 - with: - name: firmware - path: ./build_output - - - tasmota32-lvgl: - runs-on: ubuntu-latest - continue-on-error: true - steps: - - uses: actions/checkout@v2 - - name: Set up Python - uses: actions/setup-python@v1 - - name: Install dependencies - run: | - pip install -U platformio - - name: Run PlatformIO - run: | - platformio run -e tasmota32-lvgl - - uses: actions/upload-artifact@v2 - with: - name: firmware - path: ./build_output - - - tasmota32-ir: - runs-on: ubuntu-latest - continue-on-error: true - steps: - - uses: actions/checkout@v2 - - name: Set up Python - uses: actions/setup-python@v1 - - name: Install dependencies - run: | - pip install -U platformio - - name: Run PlatformIO - run: | - platformio run -e tasmota32-ir - - uses: actions/upload-artifact@v2 - with: - name: firmware - path: ./build_output - - tasmota32c3: - runs-on: ubuntu-latest - continue-on-error: true - steps: - - uses: actions/checkout@v2 - - name: Set up Python - uses: actions/setup-python@v1 - - name: Install dependencies - run: | - pip install -U platformio - - name: Run PlatformIO - run: | - platformio run -e tasmota32c3 - - uses: actions/upload-artifact@v2 - with: - name: firmware - path: ./build_output - - tasmota32-AF: - runs-on: ubuntu-latest - continue-on-error: true - steps: - - uses: actions/checkout@v2 - - name: Set up Python - uses: actions/setup-python@v1 - - name: Install dependencies - run: | - pip install -U platformio - - name: Run PlatformIO - run: | - platformio run -e tasmota32-AF - - uses: actions/upload-artifact@v2 - with: - name: firmware - path: ./build_output - - - tasmota32-BG: - runs-on: ubuntu-latest - continue-on-error: true - steps: - - uses: actions/checkout@v2 - - name: Set up Python - uses: actions/setup-python@v1 - - name: Install dependencies - run: | - pip install -U platformio - - name: Run PlatformIO - run: | - platformio run -e tasmota32-BG - - uses: actions/upload-artifact@v2 - with: - name: firmware - path: ./build_output - - - tasmota32-BR: - runs-on: ubuntu-latest - continue-on-error: true - steps: - - uses: actions/checkout@v2 - - name: Set up Python - uses: actions/setup-python@v1 - - name: Install dependencies - run: | - pip install -U platformio - - name: Run PlatformIO - run: | - platformio run -e tasmota32-BR - - uses: actions/upload-artifact@v2 - with: - name: firmware - path: ./build_output - - - tasmota32-CN: - runs-on: ubuntu-latest - continue-on-error: true - steps: - - uses: actions/checkout@v2 - - name: Set up Python - uses: actions/setup-python@v1 - - name: Install dependencies - run: | - pip install -U platformio - - name: Run PlatformIO - run: | - platformio run -e tasmota32-CN - - uses: actions/upload-artifact@v2 - with: - name: firmware - path: ./build_output - - - tasmota32-CZ: - runs-on: ubuntu-latest - continue-on-error: true - steps: - - uses: actions/checkout@v2 - - name: Set up Python - uses: actions/setup-python@v1 - - name: Install dependencies - run: | - pip install -U platformio - - name: Run PlatformIO - run: | - platformio run -e tasmota32-CZ - - uses: actions/upload-artifact@v2 - with: - name: firmware - path: ./build_output - - - tasmota32-DE: - runs-on: ubuntu-latest - continue-on-error: true - steps: - - uses: actions/checkout@v2 - - name: Set up Python - uses: actions/setup-python@v1 - - name: Install dependencies - run: | - pip install -U platformio - - name: Run PlatformIO - run: | - platformio run -e tasmota32-DE - - uses: actions/upload-artifact@v2 - with: - name: firmware - path: ./build_output - - - tasmota32-ES: - runs-on: ubuntu-latest - continue-on-error: true - steps: - - uses: actions/checkout@v2 - - name: Set up Python - uses: actions/setup-python@v1 - - name: Install dependencies - run: | - pip install -U platformio - - name: Run PlatformIO - run: | - platformio run -e tasmota32-ES - - uses: actions/upload-artifact@v2 - with: - name: firmware - path: ./build_output - - - tasmota32-FR: - runs-on: ubuntu-latest - continue-on-error: true - steps: - - uses: actions/checkout@v2 - - name: Set up Python - uses: actions/setup-python@v1 - - name: Install dependencies - run: | - pip install -U platformio - - name: Run PlatformIO - run: | - platformio run -e tasmota32-FR - - uses: actions/upload-artifact@v2 - with: - name: firmware - path: ./build_output - - - tasmota32-FY: - runs-on: ubuntu-latest - continue-on-error: true - steps: - - uses: actions/checkout@v2 - - name: Set up Python - uses: actions/setup-python@v1 - - name: Install dependencies - run: | - pip install -U platformio - - name: Run PlatformIO - run: | - platformio run -e tasmota32-FY - - uses: actions/upload-artifact@v2 - with: - name: firmware - path: ./build_output - - - tasmota32-GR: - runs-on: ubuntu-latest - continue-on-error: true - steps: - - uses: actions/checkout@v2 - - name: Set up Python - uses: actions/setup-python@v1 - - name: Install dependencies - run: | - pip install -U platformio - - name: Run PlatformIO - run: | - platformio run -e tasmota32-GR - - uses: actions/upload-artifact@v2 - with: - name: firmware - path: ./build_output - - - tasmota32-HE: - runs-on: ubuntu-latest - continue-on-error: true - steps: - - uses: actions/checkout@v2 - - name: Set up Python - uses: actions/setup-python@v1 - - name: Install dependencies - run: | - pip install -U platformio - - name: Run PlatformIO - run: | - platformio run -e tasmota32-HE - - uses: actions/upload-artifact@v2 - with: - name: firmware - path: ./build_output - - - tasmota32-HU: - runs-on: ubuntu-latest - continue-on-error: true - steps: - - uses: actions/checkout@v2 - - name: Set up Python - uses: actions/setup-python@v1 - - name: Install dependencies - run: | - pip install -U platformio - - name: Run PlatformIO - run: | - platformio run -e tasmota32-HU - - uses: actions/upload-artifact@v2 - with: - name: firmware - path: ./build_output - - - tasmota32-IT: - runs-on: ubuntu-latest - continue-on-error: true - steps: - - uses: actions/checkout@v2 - - name: Set up Python - uses: actions/setup-python@v1 - - name: Install dependencies - run: | - pip install -U platformio - - name: Run PlatformIO - run: | - platformio run -e tasmota32-IT - - uses: actions/upload-artifact@v2 - with: - name: firmware - path: ./build_output - - - tasmota32-KO: - runs-on: ubuntu-latest - continue-on-error: true - steps: - - uses: actions/checkout@v2 - - name: Set up Python - uses: actions/setup-python@v1 - - name: Install dependencies - run: | - pip install -U platformio - - name: Run PlatformIO - run: | - platformio run -e tasmota32-KO - - uses: actions/upload-artifact@v2 - with: - name: firmware - path: ./build_output - - - tasmota32-NL: - runs-on: ubuntu-latest - continue-on-error: true - steps: - - uses: actions/checkout@v2 - - name: Set up Python - uses: actions/setup-python@v1 - - name: Install dependencies - run: | - pip install -U platformio - - name: Run PlatformIO - run: | - platformio run -e tasmota32-NL - - uses: actions/upload-artifact@v2 - with: - name: firmware - path: ./build_output - - - tasmota32-PL: - runs-on: ubuntu-latest - continue-on-error: true - steps: - - uses: actions/checkout@v2 - - name: Set up Python - uses: actions/setup-python@v1 - - name: Install dependencies - run: | - pip install -U platformio - - name: Run PlatformIO - run: | - platformio run -e tasmota32-PL - - uses: actions/upload-artifact@v2 - with: - name: firmware - path: ./build_output - - - tasmota32-PT: - runs-on: ubuntu-latest - continue-on-error: true - steps: - - uses: actions/checkout@v2 - - name: Set up Python - uses: actions/setup-python@v1 - - name: Install dependencies - run: | - pip install -U platformio - - name: Run PlatformIO - run: | - platformio run -e tasmota32-PT - - uses: actions/upload-artifact@v2 - with: - name: firmware - path: ./build_output - - - tasmota32-RO: - runs-on: ubuntu-latest - continue-on-error: true - steps: - - uses: actions/checkout@v2 - - name: Set up Python - uses: actions/setup-python@v1 - - name: Install dependencies - run: | - pip install -U platformio - - name: Run PlatformIO - run: | - platformio run -e tasmota32-RO - - uses: actions/upload-artifact@v2 - with: - name: firmware - path: ./build_output - - - tasmota32-RU: - runs-on: ubuntu-latest - continue-on-error: true - steps: - - uses: actions/checkout@v2 - - name: Set up Python - uses: actions/setup-python@v1 - - name: Install dependencies - run: | - pip install -U platformio - - name: Run PlatformIO - run: | - platformio run -e tasmota32-RU - - uses: actions/upload-artifact@v2 - with: - name: firmware - path: ./build_output - - - tasmota32-SE: - runs-on: ubuntu-latest - continue-on-error: true - steps: - - uses: actions/checkout@v2 - - name: Set up Python - uses: actions/setup-python@v1 - - name: Install dependencies - run: | - pip install -U platformio - - name: Run PlatformIO - run: | - platformio run -e tasmota32-SE - - uses: actions/upload-artifact@v2 - with: - name: firmware - path: ./build_output - - - tasmota32-SK: - runs-on: ubuntu-latest - continue-on-error: true - steps: - - uses: actions/checkout@v2 - - name: Set up Python - uses: actions/setup-python@v1 - - name: Install dependencies - run: | - pip install -U platformio - - name: Run PlatformIO - run: | - platformio run -e tasmota32-SK - - uses: actions/upload-artifact@v2 - with: - name: firmware - path: ./build_output - - - tasmota32-TR: - runs-on: ubuntu-latest - continue-on-error: true - steps: - - uses: actions/checkout@v2 - - name: Set up Python - uses: actions/setup-python@v1 - - name: Install dependencies - run: | - pip install -U platformio - - name: Run PlatformIO - run: | - platformio run -e tasmota32-TR - - uses: actions/upload-artifact@v2 - with: - name: firmware - path: ./build_output - - - tasmota32-TW: - runs-on: ubuntu-latest - continue-on-error: true - steps: - - uses: actions/checkout@v2 - - name: Set up Python - uses: actions/setup-python@v1 - - name: Install dependencies - run: | - pip install -U platformio - - name: Run PlatformIO - run: | - platformio run -e tasmota32-TW - - uses: actions/upload-artifact@v2 - with: - name: firmware - path: ./build_output - - - tasmota32-UK: - runs-on: ubuntu-latest - continue-on-error: true - steps: - - uses: actions/checkout@v2 - - name: Set up Python - uses: actions/setup-python@v1 - - name: Install dependencies - run: | - pip install -U platformio - - name: Run PlatformIO - run: | - platformio run -e tasmota32-UK - - uses: actions/upload-artifact@v2 - with: - name: firmware - path: ./build_output - - - tasmota32-VN: - runs-on: ubuntu-latest - continue-on-error: true - steps: - - uses: actions/checkout@v2 - - name: Set up Python - uses: actions/setup-python@v1 - - name: Install dependencies - run: | - pip install -U platformio - - name: Run PlatformIO - run: | - platformio run -e tasmota32-VN - - uses: actions/upload-artifact@v2 - with: - name: firmware - path: ./build_output - + base-images: + runs-on: ubuntu-latest + if: github.repository == 'arendst/Tasmota' + continue-on-error: true + strategy: + matrix: + variant: + - tasmota + - tasmota-minimal + - tasmota-display + - tasmota-ir + - tasmota-knx + - tasmota-lite + - tasmota-sensors + - tasmota-zbbridge + - tasmota-zigbee + - tasmota32 + - tasmota32-webcam + - tasmota32-bluetooth + - tasmota32-core2 + - tasmota32-display + - tasmota32-ir + - tasmota32-lvgl + - tasmota32-odroidgo + - tasmota32c3 + - tasmota32solo1 + steps: + - uses: actions/checkout@v2 + with: + ref: master + - name: Set up Python + uses: actions/setup-python@v1 + - name: Install dependencies + run: | + pip install -U platformio + - name: Run PlatformIO + run: platformio run -e ${{ matrix.variant }} + - uses: actions/upload-artifact@v2 + with: + name: firmware + path: ./build_output + + language-images: + runs-on: ubuntu-latest + if: github.repository == 'arendst/Tasmota' + continue-on-error: true + strategy: + matrix: + variant: [ tasmota, tasmota32 ] + language: [ AF, BG, BR, CN, CZ, DE, ES, FR, FY, GR, HE, HU, IT, KO, NL, PL, PT, RO, RU, SE, SK, TR, TW, UK, VN ] + steps: + - uses: actions/checkout@v2 + with: + ref: master + - name: Set up Python + uses: actions/setup-python@v1 + - name: Install dependencies + run: | + pip install -U platformio + - name: Run PlatformIO + run: platformio run -e ${{ matrix.variant }}-${{ matrix.language }} + - uses: actions/upload-artifact@v2 + with: + name: firmware + path: ./build_output Upload: - needs: [tasmota-VN, tasmota32-VN, tasmota32-TW, tasmota32-TR] + needs: [base-images, language-images] runs-on: ubuntu-latest continue-on-error: true steps: diff --git a/.github/workflows/build_all_the_things.yml b/.github/workflows/build_all_the_things.yml index 2ffca53b7..cb41ae85e 100644 --- a/.github/workflows/build_all_the_things.yml +++ b/.github/workflows/build_all_the_things.yml @@ -18,6 +18,7 @@ on: jobs: base-images: runs-on: ubuntu-latest + if: github.repository == 'arendst/Tasmota' strategy: matrix: variant: @@ -59,6 +60,7 @@ jobs: language-images: runs-on: ubuntu-latest + if: github.repository == 'arendst/Tasmota' strategy: matrix: variant: [ tasmota ] diff --git a/CHANGELOG.md b/CHANGELOG.md index eb781e0d4..6ca69c83c 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -3,19 +3,32 @@ All notable changes to this project will be documented in this file. ## [Unreleased] - Development -## [10.0.0.4] +## [10.1.0.1] + +## [Released] + +## [10.1.0] 20211208 +- Release Noelle + +### Added +- Berry added ``tcpclient`` + +## [10.0.0.4] 20211208 ### Added - (Internal) Support for FUNC_BUTTON_MULTI_PRESSED in (light)drivers - Support for GPE Multi color smart light as sold by Action in the Netherlands +- Support for 74xx595 8-bit shift registers (#13921) ### Changed - (Internal) Range conversion edge values - NimBLE to v.1.3.3 - MQTT TLS dual mode (CA or fingeprint) in same firmware, ``SetOption132 1`` to force fingerprint +- Toolchains for ESP32x changed from 8.4.0-2021r1 to 8.4.0-2021r2 ### Fixed - Tuya dimmer range issue (#13849) -- BLE Memory leak with update NimBLE v.1.3.1 to v.1.3.3 +- BLE Memory leak with update NimBLE v.1.3.1 to v.1.3.3 +- Compile error BLE EQ3 driver with core 2.0.x (#13948) ## [10.0.0.3] 20211130 ### Added @@ -75,8 +88,6 @@ All notable changes to this project will be documented in this file. - Discovery of shutters (#13572) - ESP32-C3 OneWire as used by DS18x20 (#13583) -## [Released] - ## [10.0.0] 20211019 - Release Norman @@ -882,6 +893,7 @@ All notable changes to this project will be documented in this file. ### Changed - Triple-mode TLS via configuration in a single firmware (TLS AWS IoT, Letsencrypt and No-TLS) +- Berry C mapping moved to a separate ``berry_mapping`` library ### Fixed - ESP32 PWM range diff --git a/FIRMWARE.md b/FIRMWARE.md index e2eb172b7..610cc6fba 100644 --- a/FIRMWARE.md +++ b/FIRMWARE.md @@ -18,7 +18,7 @@ See [CHANGELOG.md](https://github.com/arendst/Tasmota/blob/development/tasmota/C ## Development -[![Dev Version](https://img.shields.io/badge/development%20version-v10.0.x.x-blue.svg)](https://github.com/arendst/Tasmota) +[![Dev Version](https://img.shields.io/badge/development%20version-v10.1.x.x-blue.svg)](https://github.com/arendst/Tasmota) [![Download Dev](https://img.shields.io/badge/download-development-yellow.svg)](http://ota.tasmota.com/tasmota/) [![Tasmota CI](https://github.com/arendst/Tasmota/workflows/Tasmota%20CI/badge.svg)](https://github.com/arendst/Tasmota/actions?query=workflow%3A%22Tasmota+CI%22) [![Tasmota ESP32 CI](https://github.com/arendst/Tasmota/workflows/Tasmota%20ESP32%20CI/badge.svg)](https://github.com/arendst/Tasmota/actions?query=workflow%3A%22Tasmota+ESP32+CI%22) diff --git a/README.md b/README.md index 111536ba8..b41539308 100644 --- a/README.md +++ b/README.md @@ -23,7 +23,7 @@ Easy initial installation of Tasmota can be performed using the [Tasmota WebInst ## Development -[![Dev Version](https://img.shields.io/badge/development%20version-v10.0.x.x-blue.svg)](https://github.com/arendst/Tasmota) +[![Dev Version](https://img.shields.io/badge/development%20version-v10.1.x.x-blue.svg)](https://github.com/arendst/Tasmota) [![Download Dev](https://img.shields.io/badge/download-development-yellow.svg)](http://ota.tasmota.com/tasmota/) [![Tasmota CI](https://github.com/arendst/Tasmota/workflows/Tasmota%20CI/badge.svg)](https://github.com/arendst/Tasmota/actions?query=workflow%3A%22Tasmota+CI%22) [![Tasmota ESP32 CI](https://github.com/arendst/Tasmota/workflows/Tasmota%20ESP32%20CI/badge.svg)](https://github.com/arendst/Tasmota/actions?query=workflow%3A%22Tasmota+ESP32+CI%22) diff --git a/RELEASENOTES.md b/RELEASENOTES.md index 8c8578f3e..e7b2dcdb3 100644 --- a/RELEASENOTES.md +++ b/RELEASENOTES.md @@ -66,12 +66,12 @@ Latest released binaries can be downloaded from - http://ota.tasmota.com/tasmota/release Historical binaries can be downloaded from -- http://ota.tasmota.com/tasmota/release-10.0.0 +- http://ota.tasmota.com/tasmota/release-10.1.0 The latter links can be used for OTA upgrades too like ``OtaUrl http://ota.tasmota.com/tasmota/release/tasmota.bin.gz`` ### ESP32 based -The following binary downloads have been compiled with ESP32/Arduino library core version **1.0.7.4**. +The following binary downloads have been compiled with ESP32/Arduino library core version **2.0.1.1**. - **tasmota32.bin** = The Tasmota version with most drivers including additional sensors and KNX for 4M+ flash. **RECOMMENDED RELEASE BINARY** - **tasmota32c3.bin** = The Tasmota version with most drivers including additional sensors and KNX for ESP32-C3 and 4M+ flash. @@ -90,7 +90,7 @@ Latest released binaries can be downloaded from - http://ota.tasmota.com/tasmota32/release Historical binaries can be downloaded from -- http://ota.tasmota.com/tasmota32/release-10.0.0 +- http://ota.tasmota.com/tasmota32/release-10.1.0 The latter links can be used for OTA upgrades too like ``OtaUrl http://ota.tasmota.com/tasmota32/release/tasmota32.bin`` @@ -100,48 +100,13 @@ The latter links can be used for OTA upgrades too like ``OtaUrl http://ota.tasmo [Complete list](BUILDS.md) of available feature and sensors. -## Changelog v10.0.0.4 +## Changelog v10.1.0.1 ### Added -- 1 second heartbeat GPIO -- (Internal) Support for FUNC_BUTTON_MULTI_PRESSED in (light)drivers -- Command ``TcpConfig`` for TCPBridge protocol configuration [#13565](https://github.com/arendst/Tasmota/issues/13565) -- Support for HDC2010 temperature/humidity sensor by Luc Boudreau [#13633](https://github.com/arendst/Tasmota/issues/13633) -- WS2812 scheme 13 stairs effect [#13595](https://github.com/arendst/Tasmota/issues/13595) -- Command ``IfxPeriod `` to overrule ``Teleperiod`` for Influx messages [#13750](https://github.com/arendst/Tasmota/issues/13750) -- Support for GPE Multi color smart light as sold by Action in the Netherlands -- Shutter support for venetian blinds with tilt control -- ESP32 Proof of Concept Sonoff SPM with limited functionality (switching and energy monitoring) [#13447](https://github.com/arendst/Tasmota/issues/13447) -- ESP32 Autoconfiguration -- ESP32 Preliminary support for Tasmota Apps (.tapp extesions) -- ESP32 OTA over HTTPS -- ESP32 HTTPS support to ``WebQuery`` -- ESP32 Berry support for neopixel (WS2812, SK6812) -- ESP32 Berry ``import re`` regex module -- ESP32 Berry add module ``python_compat`` to be closer to Python syntax [#13428](https://github.com/arendst/Tasmota/issues/13428) ### Breaking Changed -- ESP32-S2 TSettings memory usage fixed to 4096 bytes regression from v9.5.0.8 ### Changed -- ESP32 core library from v1.0.7.4 to v2.0.1.1 -- ESP32-C3 core library from v2.0.0-post to ESP32 core library -- IRremoteESP8266 library from v2.7.20 to v2.8.0 -- (Internal) Range conversion edge values -- ESP8266 Gratuitous ARP enabled and set to 60 seconds [#13623](https://github.com/arendst/Tasmota/issues/13623) -- File editor no-wrap [#13427](https://github.com/arendst/Tasmota/issues/13427) -- ESP8266 Gratuitous ARP enabled and set to 60 seconds [#13623](https://github.com/arendst/Tasmota/issues/13623) -- Ethernet hostname ending in ``_eth`` to ``-eth`` according to RFC952 ### Fixed -- Initial reset RTC memory based variables like EnergyToday and EnergyTotal -- ESP32 Telegram compile error [#13435](https://github.com/arendst/Tasmota/issues/13435) -- SML compile error [#13441](https://github.com/arendst/Tasmota/issues/13441) -- GUI checkbox MQTT TLS not saved regression from v9.2.0.3 [#13442](https://github.com/arendst/Tasmota/issues/13442) -- Discovery of shutters [#13572](https://github.com/arendst/Tasmota/issues/13572) -- ESP32-C3 OneWire as used by DS18x20 [#13583](https://github.com/arendst/Tasmota/issues/13583) -- ESP32 analog NTC temperature calculation [#13703](https://github.com/arendst/Tasmota/issues/13703) -- Tuya dimmer range issue [#13849](https://github.com/arendst/Tasmota/issues/13849) ### Removed -- ILI9488 driver in favour of Universal Display driver [#13719](https://github.com/arendst/Tasmota/issues/13719) - diff --git a/TEMPLATES.md b/TEMPLATES.md index cea550f41..5e9531452 100644 --- a/TEMPLATES.md +++ b/TEMPLATES.md @@ -2,11 +2,12 @@ # Templates -Find below the available templates as of October 2021. More template information can be found in the [Tasmota Device Templates Repository](http://blakadder.github.io/templates) +Find below the available templates as of December 2021. More template information can be found in the [Tasmota Device Templates Repository](http://blakadder.github.io/templates) -## Addressable LED Controller +## Addressable LED ``` Athom 2812b {"NAME":"LS2812B-TAS","GPIO":[32,0,1376,0,0,0,0,0,0,0,0,0,0,0],"FLAG":0,"BASE":18} +BlitzWolf IC Smart RGB Magic {"NAME":"BW-LT31","GPIO":[0,0,32,1376,0,0,0,0,0,1088,0,0,0,0],"FLAG":0,"BASE":18,"CMND":"SO37 24"} cod.m WLAN Pixel Controller v0.6 {"NAME":"cod.m Pixel Controller","GPIO":[32,0,1376,0,0,0,0,0,544,0,0,0,0,0],"FLAG":0,"BASE":18} ESP01 NeoPixel Ring {"NAME":"ESP-01S-RGB-LED-v1.0","GPIO":[1,1,1376,1,0,0,0,0,0,0,0,0,0,0],"FLAG":0,"BASE":18} SP501E WS2812B {"NAME":"SP501E","GPIO":[0,32,0,1376,0,0,0,0,0,0,0,0,0,0],"FLAG":0,"BASE":18} @@ -19,6 +20,7 @@ BlitzWolf 400ml {"NAME":"BW-FUN3","GPIO":[0,2272,0,2304,0,0,0,0,0,0 Brilex 400ml {"NAME":"BrilexDiffuser","GPIO":[1,1,1,1,1,1,0,0,1,1,1,1,1,0],"FLAG":0,"BASE":54} Essential Oil 400ml {"NAME":"XD800W","GPIO":[0,2272,0,2304,0,0,0,0,0,0,0,0,0,0],"FLAG":0,"BASE":54} GD-30W 300ml {"NAME":"GD-30W","GPIO":[0,2272,0,2304,0,0,0,0,0,0,0,0,0,0],"FLAG":0,"BASE":54} +Gernems 400 ml {"NAME":"YX-088","GPIO":[0,2272,0,2304,0,0,0,0,0,0,0,0,0,0],"FLAG":0,"BASE":54,"CMND":"TuyaMCU 11,1|TuyaMCU 61,2|TuyaMCU 62,3|TuyaMCU|12,5|TuyaMCU 63,6|TuyaMCU 21,7|TuyaMCU 24,8|TuyaRGB 3|DimmerRange 1,255|TuyaEnumList 1,2|TuyaEnumList 2,2|TuyaEnumList 3,1"} Kbaybo 300ml {"NAME":"K-H25","GPIO":[0,2272,0,2304,0,0,0,0,0,0,0,0,0,0],"FLAG":0,"BASE":54} Kogan 500ml {"NAME":"Kogan Difuser","GPIO":[1,1,1,1,1,1,0,0,1,1,1,1,1,0],"FLAG":0,"BASE":54} Maxcio 400ml {"NAME":"MaxcioDiffuser","GPIO":[1,1,1,1,1,1,0,0,1,1,1,1,1,0],"FLAG":0,"BASE":54} @@ -40,7 +42,7 @@ Anoopsyche 9W 800lm {"NAME":"Anoop-CW-WW","GPIO":[0,0,0,0,0,416,0,0,0,4 Arlec Smart 1350lm PAR38 {"NAME":"Arlec GLD302HA","GPIO":[0,0,0,0,0,0,0,0,417,0,416,0,0,0],"FLAG":0,"BASE":18} Arlec Smart 9.5W 806lm {"NAME":"Arlec GLD110HA","GPIO":[0,0,0,0,0,416,0,0,0,417,0,0,0,0],"FLAG":0,"BASE":48} Arlec Smart 9.5W 806lm {"NAME":"Arlec CCT","GPIO":[0,0,0,0,0,416,0,0,0,417,0,0,0,0],"FLAG":0,"BASE":48} -Arlec Smart R80 9.5W 806lm {"NAME":"Arlec GLD115HA","GPIO":[0,0,0,0,0,416,0,0,0,449,0,0,0,0],"FLAG":0,"BASE":48} +Arlec Smart R80 9.5W 806lm {"NAME":"Arlec R80","GPIO":[0,0,0,0,0,416,0,0,0,449,0,0,0,0],"FLAG":0,"BASE":48} BlitzWolf A70 9W 900lm {"NAME":"BW-LT29","GPIO":[0,0,0,0,0,0,0,0,0,449,0,416,0,0],"FLAG":0,"BASE":18} BrilliantSmart 20696 9W 900lm {"NAME":"Brilliant20696","GPIO":[0,0,0,0,0,0,0,0,417,0,416,0,0,0],"FLAG":0,"BASE":18} BrilliantSmart 20697 9W 900lm {"NAME":"Brilliant20696","GPIO":[0,0,0,0,0,0,0,0,417,0,416,0,0,0],"FLAG":0,"BASE":18} @@ -128,12 +130,6 @@ Wipro Garnet NS9100 810lm {"NAME":"WiproSmartBulb","GPIO":[0,0,0,0,417,0,0,0, Wyze A19 800lm {"NAME":"Wyze Bulb","GPIO":[5728,0,0,0,0,0,0,0,0,416,417,0,0,0],"FLAG":0,"BASE":48} ``` -## Camera -``` -Ai-Thinker DIY Kit {"NAME":"AITHINKER CAM","GPIO":[4992,1,672,1,416,5088,1,1,1,6720,736,704,1,1,5089,5090,0,5091,5184,5152,0,5120,5024,5056,0,0,0,0,4928,576,5094,5095,5092,0,0,5093],"FLAG":0,"BASE":2} -Wireles Tag DIY Kit {"NAME":"WT-ESP32-CAM","GPIO":[4992,1,1,1,1,5088,0,0,1,1,1,1,1,0,5089,5090,0,5091,5184,5152,0,5120,5024,5056,0,0,0,0,4928,0,5094,5095,5092,0,0,5093],"FLAG":0,"BASE":2} -``` - ## Ceiling Light ``` BAZZ 14" RGBCCT {"NAME":"WF19129W","GPIO":[0,0,0,0,416,419,0,0,417,420,418,0,0,0],"FLAG":0,"BASE":18} @@ -152,8 +148,11 @@ LOLAsmart Uranus White 70 cm {"NAME":"lola smart","GPIO":[0,0,0,1088,416,419,0, LSC 20W 1400lm White Ambiance {"NAME":"LSC RGBCW LED","GPIO":[0,0,0,0,0,0,0,0,4064,0,4032,0,0,0],"FLAG":0,"BASE":18} Luminea 24W CCT {"NAME":"Luminea NX6205-944","GPIO":[0,0,0,0,0,0,0,0,449,0,416,0,0,0],"FLAG":0,"BASE":48} LVL 300mm Round {"NAME":"LVL 300m Round 24W Ceiling LED","GPIO":[0,0,0,0,0,416,0,0,0,449,0,0,0,0],"FLAG":0,"BASE":48} +Nedis CCT 800lm {"NAME":"NEDIS WIFILAW10WT","GPIO":[0,0,0,0,0,0,0,0,417,0,416,0,0,0],"FLAG":0,"BASE":18} +Nedis RGBCCT 1200lm {"NAME":"Nedis RGB","GPIO":[0,0,0,0,417,416,0,0,420,418,419,0,0,0],"FLAG":0,"BASE":18} Oeegoo 15W RGBCCT {"NAME":"Oeegoo RGBCCT","GPIO":[0,0,0,0,416,419,0,0,417,420,418,0,0,0],"FLAG":0,"BASE":18} Offdarks Star Fine RGBCCT 60W 40mm {"NAME":"Offdarks","GPIO":[0,0,0,0,417,416,0,0,419,420,418,0,0,0],"FLAG":0,"BASE":18} +Polux UFO RGBCCT 48W {"NAME":"Polux 313924","GPIO":[0,0,0,0,416,417,0,0,418,419,420,0,0,0],"FLAG":0,"BASE":18} SMRTLite LED Panel {"NAME":"SMRTLite","GPIO":[0,0,0,0,417,416,0,0,420,418,419,0,0,0],"FLAG":0,"BASE":18} Spectrum Smart Nymphea 36W CCT {"NAME":"Nymphea_36w","GPIO":[0,0,0,0,0,416,0,0,0,417,0,0,0,0],"FLAG":0,"BASE":18} Taloya 12" 24W CCT Main and RGB Ambient {"NAME":"Taloya GA300-24W-AI-WEMG","GPIO":[0,0,0,0,416,419,0,0,417,420,418,0,0,0],"FLAG":0,"BASE":18} @@ -184,6 +183,11 @@ MS-108 In-Wall {"NAME":"MS-108","GPIO":[0,0,0,0,161,160,0,0,224,0, QS-WIFI-C01-RF {"NAME":"Shutter-QS-WIFI-C01","GPIO":[0,0,1,0,288,0,0,0,32,33,224,225,0,0],"FLAG":0,"BASE":18} ``` +## Curtain Motor +``` +Steren {"NAME":"Steren_SHOME-155","GPIO":[0,0,0,0,0,0,0,0,0,2304,0,2272,0,0],"FLAG":0,"BASE":54,"CMND":"SO54 1|SO20 1|TuyaMCU 61,1|TuyaMCU 21,2|TuyaMCU 27,3|TuyaMCU 97,5|TuyaMCU 11,6|TuyaMCU 62,7|TuyaMCU 63,8|TuyaMCU 81,9|TuyaMCU 98,10|TuyaMCU 82,11"} +``` + ## Curtain Switch ``` Anccy {"NAME":"Anccy Shutter","GPIO":[544,0,289,34,226,33,0,0,32,224,290,225,288,0],"FLAG":0,"BASE":18} @@ -198,12 +202,15 @@ Konesky {"NAME":"KingArt","GPIO":[544,0,289,162,226,32,0,0, LoraTap SC400W-EU {"NAME":"Loratap SC400W","GPIO":[544,0,0,34,0,32,0,0,33,225,0,224,0,0],"FLAG":0,"BASE":18} LoraTap SC411WSC-EU RF Remote {"NAME":"Loratap","GPIO":[0,0,0,34,226,32,0,0,33,225,0,224,0,0],"FLAG":0,"BASE":18} Maxcio WF-CS01 {"NAME":"Maxcio","GPIO":[544,0,289,162,226,33,0,0,32,224,290,225,288,0],"FLAG":0,"BASE":18} +Moes RF {"NAME":"Moes WS-EUR-CW","GPIO":[0,2272,0,2304,0,0,0,0,0,0,0,0,0,0],"FLAG":0,"BASE":54} SCS86-03AJAI {"NAME":"ESE86-03AJAI","GPIO":[544,227,289,34,226,33,0,0,32,224,290,225,288,0],"FLAG":0,"BASE":18} Teekar SYS-CS 01 {"NAME":"Teekar-Tag","GPIO":[320,0,544,33,225,162,0,0,0,224,321,258,32,0],"FLAG":0,"BASE":18} Teepao {"NAME":"Teepao","GPIO":[576,322,226,33,225,34,0,0,320,224,321,0,32,0],"FLAG":0,"BASE":18} WF-CS01 {"NAME":"ShutterSwitch","GPIO":[544,227,289,34,226,33,0,0,32,224,290,225,288,0],"FLAG":0,"BASE":18,"CMND":"Rule1 1"} WF-CS02 {"NAME":"WF-CS02 Tuya","GPIO":[544,0,289,162,226,33,0,0,32,224,290,225,288,0],"FLAG":0,"BASE":18} +WuyunElek {"NAME":"MILOS Jalousie","GPIO":[1,0,224,225,1,320,0,0,32,33,34,226,0,0],"FLAG":0,"BASE":18} Zemismart {"NAME":"Zemismart","GPIO":[544,0,0,162,290,161,0,0,160,224,226,225,0,0],"FLAG":0,"BASE":18} +Zemismart Backlit {"NAME":"WF-CS01","GPIO":[544,227,289,34,226,161,0,0,160,224,290,225,288,0],"FLAG":0,"BASE":18} ``` ## DIN Relay @@ -214,7 +221,9 @@ OpenEnergyMonitor WiFi MQTT Thermostat {"NAME":"MQTT-RELAY","GPIO":[32,0,1,0,0, Sinotimer {"NAME":"TM608","GPIO":[32,0,0,0,2720,2656,0,0,2624,320,224,0,0,0],"FLAG":0,"BASE":18} Sinotimer {"NAME":"Sinotimer TM60","GPIO":[0,0,0,0,0,288,0,0,224,160,0,0,0,0],"FLAG":0,"BASE":18} Sohan DIN Circuit Breaker 1P 50A {"NAME":"RDCBC-1P","GPIO":[32,0,0,0,0,0,0,0,224,320,0,0,0,0],"FLAG":0,"BASE":1} +Sonoff Smart Stackable Power Meter {"NAME":"Sonoff SPM (POC2)","GPIO":[1,0,1,0,3200,5536,0,0,1,1,1,0,3232,0,5600,0,0,0,0,5568,0,0,0,0,0,0,0,0,544,1,1,32,1,0,0,1],"FLAG":0,"BASE":1} TOMZN 2P 63/80A Circuit Breaker {"NAME":"TOMZN","GPIO":[0,0,0,0,0,0,0,0,64,224,0,0,288,0],"FLAG":0,"BASE":18} +TOMZN 4P 80A Circuit Breaker {"NAME":"TOMZN4","GPIO":[32,0,0,0,0,0,0,0,224,288,0,0,0,0],"FLAG":0,"BASE":18} ``` ## Dehumidifier @@ -225,21 +234,29 @@ Vacplus 50 Pint {"NAME":"VacPlus Dehumidifier","GPIO":[0,0,0,0,0,0, ## Development Board ``` +Adafruit ESP32 Feather {"NAME":"HUZZAH32","GPIO":[0,0,0,0,4709,0,1,1,1,288,1,1,1,1,0,1,0,0,608,640,0,4705,4704,1,0,0,0,0,1,1,4706,4710,4708,0,0,4707],"FLAG":0,"BASE":1} Adafruit HUZZAH {"NAME":"Huzzah","GPIO":[32,0,320,0,1,1,0,0,1,1,1,1,1,0],"FLAG":0,"BASE":18} +Ai-Thinker Camera {"NAME":"AITHINKER CAM","GPIO":[4992,1,672,1,416,5088,1,1,1,6720,736,704,1,1,5089,5090,0,5091,5184,5152,0,5120,5024,5056,0,0,0,0,4928,576,5094,5095,5092,0,0,5093],"FLAG":0,"BASE":2} +Ai-Thinker ESP32-C3 "Not available" +Ai-Thinker ESP32-S2F NodeMCU "Not available" AZ-Envy Environmental Sensor {"NAME":"AZ Envy","GPIO":[32,0,320,0,640,608,0,0,0,0,0,0,0,4704],"FLAG":0,"BASE":18} ESP32 Lite V1.0.0 {"NAME":"ESP32 Lite V1.0.0","GPIO":[1,0,1,0,1,1,0,0,1,1,1,1,1,1,1,1,0,0,0,1,0,1,1,1,0,0,0,0,1,1,1,1,0,0,0,0],"FLAG":0,"BASE":1} LC Technology MicroPython Maker {"NAME":"LC-ESP-Python","GPIO":[1,1,544,1,1,1,1,1,1,1,1,1,1,1],"FLAG":0,"BASE":18} -LilyGO TTGO T-Internet-POE {"NAME":"LilyGO T-Internet-POE","GPIO":[0,1,1,1,1,1,1,1,1,1,1,1,1,1,5600,1,0,1,1,5568,0,1,1,1,0,0,0,0,1,1,1,1,1,0,0,1],"FLAG":0,"BASE":1} +LilyGO T-OI Plus v1.2 ESP32-C3 "Not available" +LilyGO T7 v1.5 {"NAME":"LilyGO T7 V1.5","GPIO":[1,1,1,1,1,1,0,0,0,0,0,0,0,0,1,544,0,0,0,1,0,1,1,1,0,0,0,0,0,1,1,4704,1,0,0,1],"FLAG":0,"BASE":1} +LilyGO TTGO ESP32 Ethernet {"NAME":"T-Internet-POE v1.2","GPIO":[0,1,1,1,1,1,1,1,1,1,1,1,1,1,5600,1,0,1,1,5568,0,1,1,1,0,0,0,0,1,1,1,1,1,0,0,1],"FLAG":0,"BASE":1,"CMND":"EthType 0|EthClockMode 1|EthAddress 0"} M5Stack Atom Lite ESP32 {"NAME":"M5Stack Atom Lite","GPIO":[1,1,1,1,1,1,1,1,1056,1,1,1,1,1,1,1,0,1,1,1,0,1,640,1376,0,0,0,0,608,1,1,1,1,0,0,32],"FLAG":0,"BASE":1} +Mostly Robots Wemos D1 4 Channel MOSFET Shield {"NAME":"MOSFET","GPIO":[1,1,288,1,1,1,1,1,226,225,227,224,1,1],"FLAG":0,"BASE":18} Olimex ESP32-POE Ethernet {"NAME":"Olimex ESP32-PoE","GPIO":[1,1,1,1,1,1,0,0,5536,1,1,1,1,0,5600,0,0,0,0,5568,0,0,0,0,0,0,0,0,1,1,1,1,1,0,0,1],"FLAG":0,"BASE":1} QuinLED 2 Channel {"NAME":"QuinLED 2 channel","GPIO":[416,0,417,0,0,0,0,0,0,0,0,0,0,0],"FLAG":0,"BASE":18} Silicognition wESP32 {"NAME":"wESP32","GPIO":[0,0,1,0,1,1,0,0,1,1,1,1,5568,5600,1,0,0,0,0,1,0,0,0,0,0,0,0,0,1,1,1,1,1,0,0,1],"FLAG":0,"BASE":1} TZT ESP8266 Weather Station Kit {"NAME":"TZT Weather Station","GPIO":[32,0,640,0,1,1184,0,0,1,1,608,1,1,1],"FLAG":0,"BASE":18} WifInfo - Teleinfo Server {"NAME":"WifInfo","GPIO":[1376,1,1,5152,640,608,1,1,1,1,1,1,1,1],"FLAG":0,"BASE":18} +Wireles Tag Camera {"NAME":"WT-ESP32-CAM","GPIO":[4992,1,1,1,1,5088,0,0,1,1,1,1,1,0,5089,5090,0,5091,5184,5152,0,5120,5024,5056,0,0,0,0,4928,0,5094,5095,5092,0,0,5093],"FLAG":0,"BASE":2} Wireless Tag ESP32 Ethernet {"NAME":"WT32-ETH01","GPIO":[1,1,1,1,1,1,0,0,1,0,1,1,3840,576,5600,0,0,0,0,5568,0,0,0,0,0,0,0,0,1,1,0,1,1,0,0,1],"FLAG":0,"BASE":1} Witty Cloud {"NAME":"Witty Cloud","GPIO":[1,1,320,1,32,1,0,0,417,418,1,416,1,4704],"FLAG":0,"BASE":32} Yison ESP-01/ESP-202 {"NAME":"Yison Dev Board","GPIO":[259,544,258,1,260,261,1,1,416,418,257,417,256,1],"FLAG":0,"BASE":18} -ZiGate-Ethernet {"NAME":"ZIGATE-ETH","GPIO":[1,1,1,1,1,1,0,0,1,0,1,1,3840,576,5600,0,0,0,0,5568,0,0,0,0,0,0,0,0,0,1,1,0,1,1,0,0,1],"FLAG":0,"BASE":18,"CMND":"EthClockMode 3 | EthAddress 1"} +ZiGate-Ethernet {"NAME":"ZIGATE-ETH","GPIO":[1,1,1,1,1,1,0,0,1,0,1,1,3840,576,5600,0,0,0,0,5568,0,0,0,0,0,0,0,0,0,1,1,0,1,1,0,0],"FLAG":0,"BASE":18,"CMND":"EthClockMode 3 | EthAddress 1"} ``` ## Dimmable @@ -326,6 +343,7 @@ Xiaomi Philips MUE4088RT {"NAME":"Xiaomi Philips","GPIO":[0,0,0,0,0,0,0,0,0, ``` 3A Smart Home HGZB-04D {"NAME":"HGZB-4D","GPIO":[1,1,1,1,1,1,0,0,1,1,290,1,1,0],"FLAG":0,"BASE":54} Acenx SD03 {"NAME":"SD03","GPIO":[34,33,0,323,576,322,0,0,321,416,320,96,256,0],"FLAG":0,"BASE":73} +Athom EU {"NAME":"Athom Dimmer Switch","GPIO":[576,2272,0,2304,0,0,0,0,0,0,0,0,0,1],"FLAG":0,"BASE":54,"CMND":"TuyaMCU 21,2|Ledtable 0|DimmerRange 10,1000"} CE Smart Home {"NAME":"CE-WF500D","GPIO":[0,0,0,0,0,0,0,0,0,2304,0,2272,0,0],"FLAG":0,"BASE":54} CE Smart Home CFW500D-3W 3 Way {"NAME":"CE-WF500D-3W","GPIO":[0,0,0,0,0,0,0,0,0,2304,0,2272,0,0],"FLAG":0,"BASE":54} CNSKOU Touch {"NAME":"CNSKOU Dimmer Switch","GPIO":[0,0,0,0,0,0,0,0,0,0,290,0,0,0],"FLAG":0,"BASE":54} @@ -338,14 +356,16 @@ Martin Jerry SD01 {"NAME":"MJ-SD01 Dimmer","GPIO":[34,33,0,323,576,32 Martin Jerry Single Pole {"NAME":"MJ-KN01 Dimmer","GPIO":[0,2272,0,2304,0,0,0,0,0,0,0,0,0,0],"FLAG":0,"BASE":54} Maxcio Rotary {"NAME":"EDM-1WAA-EU","GPIO":[1,1,1,1,1,1,0,0,1,1,1,1,1,0],"FLAG":0,"BASE":54} Minoston 3-Way {"NAME":"MS10W","GPIO":[1,2272,1,2304,1,1,0,0,1,1,1,1,1,0],"FLAG":0,"BASE":54} -Moes DS01-1 {"NAME":"MOES DS01","GPIO":[1,1,1,1,1,1,0,0,1,2304,1,2272,1,0],"FLAG":0,"BASE":54} +Moes {"NAME":"MOES DS01","GPIO":[1,1,1,1,1,1,0,0,1,2304,1,2272,1,0],"FLAG":0,"BASE":54} PS-16-DZ {"NAME":"PS-16-DZ","GPIO":[1,3200,1,3232,1,1,0,0,1,288,1,1,1,0],"FLAG":0,"BASE":58} Teekar UIW001-1 {"NAME":"Teekar UIW001-","GPIO":[0,3232,416,3200,640,608,0,0,160,0,0,0,0,0],"FLAG":0,"BASE":18} Tessan MJ-SD02 {"NAME":"MJ-SD02","GPIO":[34,33,0,323,576,322,0,0,321,416,320,96,256,0],"FLAG":0,"BASE":73} TopGreener TGWF500D {"NAME":"TopGreener-Dimmer","GPIO":[0,0,0,0,0,0,0,0,0,2304,0,2272,0,0],"FLAG":0,"BASE":54} -TreatLife DS01 {"NAME":"DS02S Dimmer","GPIO":[0,2272,0,2304,0,0,0,0,0,0,0,0,0,0],"FLAG":0,"BASE":54} -TreatLife DS02S {"NAME":"DS02S Dimmer","GPIO":[0,2272,0,2304,0,0,0,0,0,0,0,0,0,0],"FLAG":0,"BASE":54} +TreatLife 400W {"NAME":"DS02S Dimmer","GPIO":[0,2272,0,2304,0,0,0,0,0,0,0,0,0,0],"FLAG":0,"BASE":54} +TreatLife 400W Single Pole {"NAME":"DS02S Dimmer","GPIO":[0,2272,0,2304,0,0,0,0,0,0,0,0,0,0],"FLAG":0,"BASE":54} +Treatlife Dual Outdoor Dimmer {"NAME":"DP12","GPIO":[1,2272,1,2304,1,1,0,0,1,1,1,1,1,0],"FLAG":0,"BASE":54,"CMND":"SO97 1 | TuyaMCU 11,1 | TuyaMCU 12,7 | TuyaMCU 21,2 | TuyaMCU 22,8 | SO20 1 | SO54 1"} TreatLife Light and Fan {"NAME":"DS03 Fan/Light","GPIO":[0,2272,0,2304,0,0,0,0,0,0,0,0,0,0],"FLAG":0,"BASE":54} +Virage Labs VirageDimmer {"NAME":"VirageDimmer","GPIO":[0,2272,0,2304,0,0,0,0,0,0,0,0,0,0],"FLAG":0,"BASE":18} WF-DS01 {"NAME":"Dimmer WF-DS01","GPIO":[1,1,1,1,1,1,0,0,1,1,290,1,1,0],"FLAG":0,"BASE":54} WiFi Dimmer Switch {"NAME":"PS-16-DZ","GPIO":[0,3200,0,3232,0,0,0,0,0,288,0,0,0,0],"FLAG":0,"BASE":58} Zemismart KS-7011 {"NAME":"KS-7011 Dimmer","GPIO":[1,2272,1,2304,1,1,0,0,1,1,1,1,1,0],"FLAG":0,"BASE":54} @@ -371,10 +391,11 @@ Sonoff D1 {"NAME":"Sonoff D1","GPIO":[1,3200,0,3232,0,0,0,0,0 ``` Heltec WiFi Kit 32 {"NAME":"WiFi Kit 32","GPIO":[1,1,1,1,640,1,1,1,1,1,1,608,3840,1,1,1,0,1,1,1,0,224,1,1,0,0,0,0,1,1,1,1,1,0,0,1],"FLAG":0,"BASE":1} Heltec WiFi Kit 8 {"NAME":"HTIT-W8266","GPIO":[1,1,1,1,640,608,0,0,1,1,1,1,1024,1],"FLAG":0,"BASE":18} +LilyGO T5 4.7 inch E-paper {"NAME":"LilyGO T5-4.7","GPIO":[0,0,0,0,0,0,0,0,1,1,1,1,0,0,0,0,0,0,0,7616,0,0,0,0,0,0,0,0,0,0,33,34,4704,0,0,32],"FLAG":0,"BASE":1} LilyGO TTGO ESP8266 0.91 inch OLED SSD1306 {"NAME":"TTGO-0.91","GPIO":[1,1,640,1,1024,0,0,0,1,1,608,1,0,1],"FLAG":0,"BASE":18} LilyGO TTGO T-Camera {"NAME":"T-Camera","GPIO":[1,1,1,1,4992,5120,1,1,1,5089,5090,64,1,1,5024,65,0,640,608,5056,0,5184,1,5152,0,0,0,0,1,1,5088,5091,5095,5094,5093,5092],"FLAG":0,"BASE":1} LilyGO TTGO T-Display 1.14in {"NAME":"ESP32-ttgo-display","GPIO":[0,1,1,1,992,6592,1,1,1,1,1,1,6624,1,896,864,0,1,1,1024,0,1,1,1,0,0,0,0,1,1,1,33,1,0,0,1],"FLAG":0,"BASE":1} -LilyGO TTGO T-Watcher {"NAME":"TTGO T4 v1.3","GPIO":[35,1,672,1,992,1024,1,1,832,768,736,704,1,1,896,0,0,640,608,864,0,0,1,928,0,0,0,0,960,1,1,4704,1,32,33,34],"FLAG":0,"BASE":1} +LilyGO TTGO T-Watcher {"NAME":"TTGO T4 v1.3","GPIO":[35,1,672,1,992,1024,1,1,832,768,736,704,1,1,896,0,0,640,608,864,0,0,1,6368,0,0,0,0,6400,1,1,4704,1,32,33,34],"FLAG":0,"BASE":1} LilyGO TTGO TO ESP8266 OLED SH1106 Weather Station {"NAME":"TTGO T12","GPIO":[1,1,1,1,608,640,0,0,32,34,33,1,1,1],"FLAG":0,"BASE":18} M5Stack Core2 {"NAME":"M5Stack Core 2","GPIO":[6210,1,1,1,6720,768,0,0,0,1,1,800,0,0,736,1,0,641,609,704,0,0,0,1,0,0,0,0,640,608,1,1,1,0,672,0],"FLAG":0,"BASE":1} M5Stack M5StickC {"NAME":"M5StickC","GPIO":[1,0,0,0,0,768,1056,576,0,736,0,704,0,0,1024,0,0,641,609,800,0,0,1,0,0,0,0,0,640,608,1,0,1,32,6210,33],"FLAG":0,"BASE":1} @@ -383,6 +404,12 @@ OLED Display Module 0.66" for Wemos D1 Mini {"NAME":"OLED 64x48","GPIO":[1,1,1, TTGO ESP32 {"NAME":"TTGO T-Journal ESP32 Camera","GPIO":[4928,1,1,1,1,5091,1,1,1,608,640,4960,1,5088,5093,5095,0,5184,5120,5056,0,5024,5152,4992,0,0,0,0,1,1,5090,5089,5094,0,0,5092],"FLAG":0,"BASE":1} ``` +## Display Switch +``` +Lanbon L8 5 in 1 LCD Touch {"NAME":"Lanbon L8","GPIO":[0,0,0,0,0,992,0,0,224,0,225,0,0,0,1024,896,0,6624,6592,864,0,832,416,226,0,0,0,0,417,418,0,352,0,0,0,4736],"FLAG":0,"BASE":1} +Sonoff NSPanel Touch {"NAME":"NSPanel","GPIO":[0,0,0,0,3872,0,0,0,0,0,32,0,0,0,0,225,0,480,224,1,0,0,0,33,0,0,0,0,0,0,0,0,0,0,4736,0],"FLAG":0,"BASE":1,"CMND":"ADCParam 2,64000,10000,3950 | Sleep 0 | BuzzerPWM 1"} +``` + ## Downlight ``` 3A 12W RGBW {"NAME":"RGBWSpot","GPIO":[0,0,0,0,416,419,0,0,417,452,418,0,0,0],"FLAG":0,"BASE":18} @@ -390,6 +417,7 @@ Arlec Smart 9W CCT {"NAME":"Arlec ALD092CHA","GPIO":[0,0,0,0,416,417,0 Arlec Smart 9W RGB+CCT {"NAME":"Arlec ALD092RHA","GPIO":[0,0,0,0,419,420,0,0,416,418,417,0,0,0],"FLAG":0,"BASE":18} Atom 10W RGBCCT {"NAME":"Atom AT9017/WH/WIZ/TR","GPIO":[0,0,420,0,419,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,416,417,418,0,0,0,0,0,0,0,0,0,0,0,0],"FLAG":0,"BASE":1} Atom 11W RGBCCT {"NAME":"Atom AT9012/WH/WIZ","GPIO":[0,0,420,0,419,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,416,417,418,0,0,0,0,0,0,0,0,0,0,0,0],"FLAG":0,"BASE":1} +Bazz 6" RGBCCT Recessed Lighting Conversion Kit {"NAME":"CON6RGBTNWWF","GPIO":[0,0,0,0,416,419,0,0,417,420,418,0,0,0],"FLAG":0,"BASE":18} BrilliantSmart Prism 10W RGBCCT {"NAME":"Prism","GPIO":[0,0,0,0,416,419,0,0,417,420,418,0,0,0],"FLAG":0,"BASE":18} BrilliantSmart Trilogy 9W CCT {"NAME":"SmartCCTDwnLgt","GPIO":[0,0,0,0,0,416,0,0,0,449,0,0,0,0],"FLAG":0,"BASE":48} Connect SmartHome RGB {"NAME":"CSH-240RGB10W","GPIO":[0,0,0,0,416,419,0,0,417,420,418,0,0,0],"FLAG":0,"BASE":18} @@ -400,6 +428,7 @@ Globe 5W 4" Recessed RGBCCT {"NAME":"GlobeRGBWW","GPIO":[0,0,0,0,416,419,0,0,41 Hyperikon 14W 1000lm 6" {"NAME":"HyperikonDL6","GPIO":[0,0,0,0,417,416,0,0,420,418,419,0,0,0],"FLAG":0,"BASE":18} iHomma 6W RGBCCT {"NAME":"iHomma RGBWW","GPIO":[0,0,0,0,420,419,0,0,416,417,418,0,0,0],"FLAG":0,"BASE":18} iHomma RGB BT+IR 12W {"NAME":"iHommaLEDDownl","GPIO":[0,0,0,0,0,419,0,0,416,417,418,0,0,0],"FLAG":0,"BASE":18} +Illume 6-inch RGBCCT {"NAME":"I-SMRGBCCT6","GPIO":[0,0,0,0,407,406,0,0,409,420,408,0,0,0],"FLAG":0,"BASE":18} Kogan 9W RGBCCT {"NAME":"Kogan_SMARTLED","GPIO":[0,0,0,0,417,416,0,0,420,418,419,0,0,0],"FLAG":0,"BASE":18} LEDLite CCT 10W Fire Rated {"NAME":"LEDLite-LTTD10Wifi","GPIO":[0,0,0,0,0,0,0,0,417,0,416,0,0,0],"FLAG":0,"BASE":18} Mirabella Genio 9W CCT {"NAME":"GenioDLightCCT","GPIO":[0,0,0,0,0,0,0,0,449,0,416,0,0,0],"FLAG":0,"BASE":48} @@ -427,6 +456,7 @@ Arlec Smart 45cm Smart DC Wall {"NAME":"Arlec 45cm Fan","GPIO":[0,0,0,0,0,0,0,0 Geek Aire 3D Oscillating Desktop {"NAME":"Geek Aire Fan","GPIO":[0,2272,0,2304,0,0,0,0,0,0,0,0,0,0],"FLAG":0,"BASE":54,"CMND":"TuyaMCU 12,4 | TuyaMCU 13,5"} Goldair SleepSmart GCPF315 {"NAME":"Goldair Fan","GPIO":[0,0,0,0,0,0,0,0,0,2304,0,2272,0,0],"FLAG":0,"BASE":54} Lucci Connect Remote Control {"NAME":"Lucci Fan","GPIO":[0,0,0,0,0,0,0,0,0,2304,0,2272,0,0],"FLAG":0,"BASE":54} +QuietCool Gable Mount Attic {"NAME":"QuietCool-AFG-SMT-PRO-2.0","GPIO":[0,0,0,0,0,224,0,0,0,0,0,0,0,0,640,608,0,0,0,225,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0],"FLAG":0,"BASE":1,"CMND":"Interlock 1|WebButton1 Low|WebButton2 High|SO8 1"} Sichler Haushaltsgeraete Column {"NAME":"Sichler Fan","GPIO":[0,2272,0,2304,0,0,0,0,0,0,0,0,0,0],"FLAG":0,"BASE":54} Technical Pro {"NAME":"FXA16 Fan","GPIO":[0,2272,0,2304,0,0,0,0,0,0,0,0,0,0],"FLAG":0,"BASE":54,"CMND":"TuyaMCU 12,8"} Zemismart Bladeless {"NAME":"Bladeless Fan","GPIO":[1,2272,1,2304,1,1,0,0,1,1,1,1,1,0],"FLAG":0,"BASE":54} @@ -446,7 +476,7 @@ Sonoff iFan04-L 110V Light and Ceiling {"NAME":"iFan04-L","GPIO":[32,3200,0,323 Avatto Light and {"NAME":"AVATTO SYS-FL01","GPIO":[0,2272,0,2304,0,0,0,0,0,0,0,0,0,0],"FLAG":0,"BASE":54} Deta Light and {"NAME":"Deta Fan Speed and Light Controller","GPIO":[33,0,0,576,226,34,0,0,0,225,224,227,32,0],"FLAG":0,"BASE":18} iSwitch Light and {"NAME":"iSwitchOZ Light Fan","GPIO":[0,2272,0,2304,0,0,0,0,0,0,0,0,0,0],"FLAG":0,"BASE":54} -Treatlife Ceiling {"NAME":"DS02F","GPIO":[0,2272,0,2304,0,0,0,0,0,0,0,0,0,0],"FLAG":0,"BASE":54,"CMND":"TuyaMCU 11,1|SO97 1|SO68 0"} +Treatlife 1.5A 4 Speed Ceiling {"NAME":"DS02F","GPIO":[0,2272,0,2304,0,0,0,0,0,0,0,0,0,0],"FLAG":0,"BASE":54,"CMND":"TuyaMCU 11,1|SO97 1|SO68 0"} ``` ## Garage Door Opener @@ -567,7 +597,6 @@ ZJ-WF-ESP-A v1.1 {"NAME":"RGB2","GPIO":[0,0,0,0,0,0,0,0,417,416,418, Arlec Smart 2m LED Colour Changing Strip Light {"NAME":"Arlec_Light_Strip","GPIO":[1,1,1088,1,416,419,1,1,417,420,418,0,1,1],"FLAG":0,"BASE":18} B.K. Licht 2m RGB {"NAME":"RGBW-Strip","GPIO":[0,0,0,0,416,32,0,0,417,0,418,0,0,0],"FLAG":0,"BASE":18} BAZZ 10 ft RGBW {"NAME":"BAZZ U183MRGBWWF RGBW LED Strip","GPIO":[32,0,0,0,416,419,0,0,417,0,418,0,0,0],"FLAG":0,"BASE":18} -BlitzWolf BW-LT11 {"NAME":"BW-LT11 Strip","GPIO":[32,0,0,0,416,419,0,0,417,0,418,0,0,0],"FLAG":0,"BASE":18} BrilliantSmart 20743 RGB+W {"NAME":"BrilliantStrip","GPIO":[32,0,0,0,416,419,0,0,417,0,418,0,0,0],"FLAG":0,"BASE":18} Briloner 2256-150 RGB {"NAME":"Briloner2256-1","GPIO":[1088,0,0,0,416,0,0,0,417,0,418,0,0,0],"FLAG":0,"BASE":18} Calex 5m RGB + White {"NAME":"Calex RGBW IR","GPIO":[1088,0,0,0,416,0,0,0,417,419,418,0,0,0],"FLAG":0,"BASE":18} @@ -589,7 +618,7 @@ LE LampUX 16.4ft RGB {"NAME":"LampUX","GPIO":[0,33,32,0,0,417,0,0,418,10 LE LampUX 2m RGB TV Backlight {"NAME":"LE 904102","GPIO":[0,32,33,0,0,417,0,0,418,34,0,416,0,0],"FLAG":0,"BASE":18} LE LampUX 5m RGB {"NAME":"LampUX","GPIO":[32,0,0,0,0,417,0,0,418,0,0,416,0,0],"FLAG":0,"BASE":18} LE LampUX 5m RGB {"NAME":"LE LampUx","GPIO":[0,0,0,0,0,417,0,0,418,0,0,416,0,0],"FLAG":0,"BASE":34} -LE lampUX 5m RGBW {"NAME":"LampUX","GPIO":[0,0,32,0,0,417,0,0,418,0,419,416,0,0],"FLAG":0,"BASE":18} +LE lampUX 5m RGBW {"NAME":"LampUX","GPIO":[0,0,0,0,416,419,0,0,417,0,418,0,0,0],"FLAG":0,"BASE":18} Lenovo 5m RGBW {"NAME":"Lenovo LED Strip 5m","GPIO":[0,0,0,0,416,419,0,0,417,420,418,0,0,0],"FLAG":0,"BASE":18} LePower 32.8ft RGB {"NAME":"LePower","GPIO":[0,0,0,0,0,417,0,0,418,0,0,416,0,0],"FLAG":0,"BASE":18} Lohas ZN022 5m RGBW {"NAME":"LOHAS M5-022","GPIO":[0,0,0,0,417,416,0,0,32,418,0,0,0,0],"FLAG":0,"BASE":18} @@ -617,7 +646,7 @@ Torchstar Safe Lighting Kit {"NAME":"Torchstar","GPIO":[0,0,0,0,288,0,0,0,0,0,0 WiZ 2m Starter Kit {"NAME":"WiZ LED Strip","GPIO":[0,0,420,0,419,0,0,0,0,0,0,0,32,0,0,0,0,0,0,0,0,416,417,418,0,0,0,0,0,0,0,0,0,0,0,0],"FLAG":0,"BASE":1} WOOX 5m RGBW {"NAME":"GardenLedstrip1","GPIO":[0,0,0,0,0,417,0,0,418,160,416,0,0,0],"FLAG":0,"BASE":18} WOOX 5m RGBW {"NAME":"Woox R5093","GPIO":[32,0,0,0,416,419,0,0,417,0,418,0,0,0],"FLAG":0,"BASE":18} -Yeelight Lightstrip 1S {"NAME":"Yeelight Lightstrip 1S","GPIO":[0,0,0,0,0,418,0,0,0,416,417,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],"FLAG":0,"BASE":1,"CMND":"`SO37 128 | SO92 1"} +Yeelight Lightstrip 1S {"NAME":"Yeelight Lightstrip 1S","GPIO":[0,0,0,0,0,418,0,0,0,416,417,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],"FLAG":0,"BASE":1,"CMND":"SO37 128 | SO92 1"} Zemismart 3m Extendable RGBW {"NAME":"Zemismart LED","GPIO":[0,0,0,0,417,416,0,0,0,418,419,0,0,0],"FLAG":0,"BASE":18} ``` @@ -641,6 +670,8 @@ electriQ MOODL Ambiance Lamp {"NAME":"ElectriQ MOODL","GPIO":[0,4640,0,0,0,0,0, Hama Wall Light Square, 10 cm, IP 44 {"NAME":"Hama Wifi Wall Light","GPIO":[0,0,0,0,0,416,0,0,0,417,0,0,0,1],"FLAG":0,"BASE":18} Hugoai Table Lamp {"NAME":"HG02","GPIO":[1,1,1,1,1,1,0,0,1,1,1,1,1,0],"FLAG":0,"BASE":54,"CMND":"TuyaMCU 11,20 | TuyaMCU 26,21 | TuyaMCU 21,22 | TuyaMCU 23,23 | TuyaMCU 24,24 | DimmerRange 34,1000"} Iwoole Table Lamp {"NAME":"GLOBELAMP","GPIO":[0,0,0,0,419,0,0,0,417,418,416,0,0,0],"FLAG":0,"BASE":18} +LSC Multicolor Christmas String {"NAME":"LSC MC Lights","GPIO":[0,0,0,0,544,32,0,0,3840,0,3872,0,0,0],"FLAG":0,"BASE":18} +LSC Smart Mood {"NAME":"LSC Mood Light","GPIO":[0,0,0,0,416,419,0,0,417,420,418,0,0,0],"FLAG":0,"BASE":18} Lumary 18W RGBCCT Recessed Panel {"NAME":"LumaryDLghtRGB","GPIO":[0,0,0,0,417,416,0,0,420,418,419,0,0,0],"FLAG":0,"BASE":18} Mi LED Desk Lamp {"NAME":"Mi Desk Lamp","GPIO":[0,0,32,0,416,417,0,0,3264,3296,0,0,0,0],"FLAG":0,"BASE":66} Mirabella Genio 10 LED Filament Festoon {"NAME":"GenioFestoon","GPIO":[0,0,0,0,0,0,0,0,0,0,416,0,0,0],"FLAG":0,"BASE":18} @@ -648,16 +679,18 @@ Mirabella Genio 4 Black LED Garden Path {"NAME":"GenioGardenStr","GPIO":[0,0,0, Mirabella Genio CCT 6 LED 30mm Stainless Steel Deck {"NAME":"Mirabella Deck CCT","GPIO":[0,0,0,0,0,416,0,0,0,417,0,0,0,0],"FLAG":0,"BASE":18} MiraBella Genio Colour 6 LED 30mm Stainless Steel Deck {"NAME":"Genio RGB Deck Lights","GPIO":[0,0,0,0,416,0,0,0,417,0,418,0,0,0],"FLAG":0,"BASE":18} Mirabella Genio Rechargable LED Portable Lamp {"NAME":"MirabellaPortableLamp","GPIO":[32,0,0,0,416,419,0,0,417,0,418,0,0,0],"FLAG":0,"BASE":18} +Nous CCT Desk Lamp {"NAME":"NOUS Smart Desk Lamp S1","GPIO":[1,1,1,1,1,1,0,0,1,1,1,1,1,0],"FLAG":0,"BASE":54,"CMND":"TuyaMCU 11,1 | TuyaMCU 21,3 | TuyaMCU 23,4 | DimmerRange 25,255"} Novostella UT88835 20W Flood {"NAME":"Novo 20W Flood","GPIO":[0,0,0,0,416,419,0,0,417,420,418,0,0,0],"FLAG":0,"BASE":18} Novostella UT88836 20W Flood {"NAME":"Novo 20W Flood","GPIO":[0,0,0,0,416,419,0,0,417,420,418,0,0,0],"FLAG":0,"BASE":18} Nue Vision Care Desk Lamp {"NAME":"Nue Vision Desk Lamp VC18","GPIO":[1,1,1,1,1,1,0,0,1,1,1,1,1,0],"FLAG":0,"BASE":54,"CMND":"TuyaMCU 11,1 | TuyaMCU 21,3 | TuyaMCU 23,4"} -Sonoff BN-SZ01 {"NAME":"Sonoff BN-SZ","GPIO":[0,0,0,0,0,0,0,0,416,320,0,0,0,0],"FLAG":0,"BASE":22} +Philips Wiz 24W LED White Batten {"NAME":"PHILIPS-wiz-24w","GPIO":[0,0,0,0,417,0,0,0,0,416,0,0,0,0],"FLAG":0,"BASE":18} +Sonoff {"NAME":"Sonoff BN-SZ","GPIO":[0,0,0,0,0,0,0,0,416,320,0,0,0,0],"FLAG":0,"BASE":22} Spotlight 9cm RGB+W 7W {"NAME":"Spotlight RGBW","GPIO":[0,0,0,0,0,0,0,0,0,3008,0,3040,0,0],"FLAG":0,"BASE":27} -TCP WPAN Square 600X600mm 36W CCT Panel {"NAME":"TCPsmart LED Panel","GPIO":[0,0,0,0,0,416,0,0,0,449,0,0,0,0],"FLAG":0,"BASE":18} +TCP WPAN Square 600X600mm 36W CCT Panel {"NAME":"TCPsmart LED Panel","GPIO":[0,0,0,0,0,416,0,0,0,449,0,0,0,0],"FLAG":0,"BASE":18,"CMND":"SO92 1|DimmerRange 30,100"} Teckin FL41 {"NAME":"Teckin FL41","GPIO":[0,0,0,0,0,32,0,0,0,0,416,0,0,0],"FLAG":0,"BASE":18} Wipro Next Smart Batten 20W CCT {"NAME":"WIPROBatten","GPIO":[0,0,0,0,0,416,0,0,0,449,0,0,0,4704],"FLAG":0,"BASE":18} Xiaomi Mi Desk Lamp Pro {"NAME":"Mi Desk Lamp Pro","GPIO":[6212,0,416,0,417,0,0,0,3840,0,0,0,160,640,608,0,0,0,0,0,0,0,3296,3264,0,0,0,0,0,32,0,0,0,0,0,0],"FLAG":0,"BASE":1,"CMND":"DimmerRange 30,100"} -Yeelight Crystal Pendant {"NAME":"Yeelight Meteorite","GPIO":[0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,420,0,419,0,0,0,0,417,418,0,0,0,0,0,416,0,0,0,0,0,0],"FLAG":0,"BASE":1,"CMND":"`SO37 128 | SO92 1"} +Yeelight Crystal Pendant {"NAME":"Yeelight Meteorite","GPIO":[0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,420,0,419,0,0,0,0,417,418,0,0,0,0,0,416,0,0,0,0,0,0],"FLAG":0,"BASE":1,"CMND":"SO37 128 | SO92 1"} Zemismart Moonlamp {"NAME":"Zemismart Moonlamp","GPIO":[1,1,1,1,416,419,1,1,417,420,418,1,1,1],"FLAG":0,"BASE":18} ``` @@ -682,12 +715,16 @@ NEO Coolcam Mouse Trap {"NAME":"Neo Mouse Trap","GPIO":[1,2272,1,2304,1,1, PCI-e Desktop PC Remote Control {"NAME":"PC-Switch-01","GPIO":[32,0,0,0,0,0,0,0,224,544,0,0,0,0],"FLAG":0,"BASE":18} Proscenic T21 Air Fryer {"NAME":"Proscenic T21","GPIO":[0,2272,0,2304,0,0,0,0,0,0,0,0,0,0],"FLAG":0,"BASE":54} RainPoint Indoor Water Pump {"NAME":"RainPoint","GPIO":[0,0,0,0,0,0,0,0,0,0,0,0,0,0],"FLAG":0,"BASE":54,"CMND":"TuyaMCU 81,107|TuyaMCU 12,109|TuyaMCU 11,1|TuyaMCU 82,104"} +Sinilink PCIe Computer Remote {"NAME":"XY-WPCE","GPIO":[1,1,320,1,32,224,0,0,160,0,0,0,0,0],"FLAG":0,"BASE":18,"CMND":"SO114 1 | SwitchMode1 2"} +Sinilink USB Computer Remote {"NAME":"XY-WPCL","GPIO":[1,1,320,1,32,224,0,0,160,0,0,0,0,0],"FLAG":0,"BASE":18,"CMND":"SO114 1 | SwitchMode1 2"} Xystec USB3.0 4 Port Hub {"NAME":"Xystec USB Hub","GPIO":[0,0,0,0,224,0,0,0,226,227,225,0,0,0],"FLAG":0,"BASE":18} ``` ## Module ``` -Ai Thinker ESP-C3-12F ESP-12 Compatible "Not available" +Ai-Thinker ESP32-C3 "Not available" +Ai-Thinker ESP32-C3F ESP-12 Compatible "Not available" +Ai-Thinker ESP32-S2F "Not available" DT-Light ESP8285 Lighting {"NAME":"DMP-L1","GPIO":[1,1,0,1,1,1,0,0,1,1,1,1,1,1],"FLAG":0,"BASE":18} ESP-01D {"NAME":"ESP-01D","GPIO":[1,1,0,1,1,0,0,0,1,0,1,0,0,0],"FLAG":0,"BASE":18} ESP-01M "Not available" @@ -700,7 +737,10 @@ ESP-M2 {"NAME":"ESP-M2","GPIO":[1,1,1,1,1,1,0,0,1,1,1,1,0, ESP-M3 {"NAME":"ESP-M3","GPIO":[1,1,1,1,1,0,0,0,0,1,1,0,1,0],"FLAG":0,"BASE":18} ESP-M4 {"NAME":"ESP-M4","GPIO":[1,1,0,1,1,1,0,0,1,1,1,1,1,0],"FLAG":0,"BASE":18} LC Technology PSF-B04 Ewelink 4 Channel Switch {"NAME":"LC-EWL-B04-MB","GPIO":[1,1,1,1,1,1,0,0,1,288,1,1,0,0],"FLAG":0,"BASE":18} +M5Stack M5Stamp C3 "Not available" +M5Stack M5Stamp Pico {"NAME":"M5Stamp Pico","GPIO":[1,1,0,1,0,0,0,0,0,0,0,0,0,0,1,1,0,1,1,0,0,1,0,1376,0,0,0,0,1,1,0,0,1,0,0,32],"FLAG":0,"BASE":1} MTools 16 Channel ESP32 Relay Driver 5V DC {"NAME":"16ch Board","GPIO":[1,1,237,1,232,1,1,1,228,231,1,1,233,230,234,235,0,238,239,236,0,224,227,226,0,0,0,0,229,225,1,1,1,0,0,1],"FLAG":0,"BASE":1} +PSF-B Series ESP8285 "Not available" Shelly Universal Input/Output {"NAME":"Shelly Uni","GPIO":[320,0,0,0,225,1216,0,0,192,193,0,224,0,4864],"FLAG":0,"BASE":18} Sinilink MODBUS Interface {"NAME":"XY-WFPOW","GPIO":[0,1,0,1,0,0,0,0,0,0,0,0,0,0],"FLAG":0,"BASE":18} Wireless Tag ESP32-C3 ESP-12 Compatible "Not available" @@ -769,13 +809,14 @@ Konyks Pluviose 16A IP55 {"NAME":"Konyks Pluviose","GPIO":[32,0,0,0,0,0,0,0, Koolertron {"NAME":"C168 Outdoor","GPIO":[0,32,0,320,2720,2656,0,0,224,2624,225,226,0,0],"FLAG":0,"BASE":18} Luminea 2 Outlet {"NAME":"Luminea","GPIO":[0,0,0,0,225,320,0,0,224,321,32,0,0,1],"FLAG":0,"BASE":18} Luminea NX-4458 {"NAME":"Luminea NX4458","GPIO":[32,0,0,0,2688,2656,0,0,2624,320,224,0,0,0],"FLAG":0,"BASE":65} +Master {"NAME":"Master_IOT-EXTPLUG","GPIO":[32,1,0,1,1,0,0,0,224,288,0,0,0,0],"FLAG":0,"BASE":1} Maxcio EOP03-EU {"NAME":"Maxcio EOP03-EU","GPIO":[0,0,0,0,225,321,0,0,224,288,32,0,322,0],"FLAG":0,"BASE":18} Maxcio SOP02-US {"NAME":"Maxcio SOP02US","GPIO":[0,0,0,0,0,544,0,0,224,32,225,0,0,1],"FLAG":0,"BASE":18} Merkury {"NAME":"Merkury Switch","GPIO":[32,0,0,0,0,321,0,0,0,288,224,0,0,0],"FLAG":0,"BASE":18} Merkury {"NAME":"Merkury Switch","GPIO":[0,0,0,0,32,0,0,0,0,224,0,0,0,0],"FLAG":0,"BASE":18} Minoston MP22W {"NAME":"Minoston MP22W","GPIO":[0,0,0,0,320,0,0,0,224,64,0,0,0,0],"FLAG":0,"BASE":18} Nedis PO120 IP44 {"NAME":"WIFIPO120FWT","GPIO":[32,0,0,0,2688,2656,0,0,2624,320,224,0,0,0],"FLAG":0,"BASE":49} -Obi Stecker IP44 {"NAME":"OBI Socket 2","GPIO":[0,0,0,0,224,32,0,0,320,289,0,0,0,0],"FLAG":0,"BASE":61} +Obi Stecker IP44 {"NAME":"OBI-Outdoor-Socket2","GPIO":[0,0,0,0,224,32,0,0,576,288,1,1,1,1],"FLAG":0,"BASE":18} Oittm Outdoor {"NAME":"Oittm Outdoor","GPIO":[32,0,0,0,0,0,0,0,0,0,320,224,1,0],"FLAG":0,"BASE":18} Peteme PS-1602 {"NAME":"Peteme Outdoor","GPIO":[32,0,0,0,0,225,33,0,224,320,0,0,0,0],"FLAG":0,"BASE":18} Poweradd {"NAME":"POWERADD","GPIO":[0,0,0,0,320,321,0,0,224,32,225,0,0,0],"FLAG":0,"BASE":18} @@ -802,6 +843,7 @@ Wyze {"NAME":"Wyze Plug Outdoor","GPIO":[0,0,0,0,0,576,0 ## Plug ``` +1AC 2USB {"NAME":"BSD31","GPIO":[0,0,0,0,0,225,0,0,224,32,320,0,0,0],"FLAG":0,"BASE":18} 2nice SP111 {"NAME":"2NICE SP111","GPIO":[320,0,321,0,0,0,0,0,0,32,0,224,0,4736],"FLAG":0,"BASE":18} 2nice UP111 {"NAME":"2NICE UP111","GPIO":[0,576,0,32,2720,2656,0,0,2624,320,224,0,0,0],"FLAG":0,"BASE":18} 3Stone Mini {"NAME":"3Stone Smart Plug","GPIO":[0,32,0,0,0,0,0,0,0,320,224,0,0,0],"FLAG":0,"BASE":18} @@ -840,6 +882,7 @@ Aoycocr X6 {"NAME":"Aoycocr X6","GPIO":[0,0,320,0,0,0,0,0,0,32 Aquiv S1 {"NAME":"Aquiv S1","GPIO":[0,0,544,0,320,0,0,0,224,32,0,0,0,1],"FLAG":0,"BASE":18} Arlec 10m Smart Extension Lead {"NAME":"Arlec Ext Cord","GPIO":[0,32,0,0,0,0,0,0,0,320,224,0,0,0],"FLAG":0,"BASE":18} Arlec Heavy Duty 20m Extension Lead {"NAME":"Arlec Ext Cord","GPIO":[0,32,0,0,0,0,0,0,0,320,224,0,0,0],"FLAG":0,"BASE":18} +Arlec Plug In Socket {"NAME":"PC191HA","GPIO":[0,32,0,0,2720,2656,0,0,2624,224,288,0,0,0],"FLAG":0,"BASE":18} Arlec Smart {"NAME":"Arlec-PC190HA","GPIO":[0,0,0,0,320,0,0,0,224,576,32,0,0,0],"FLAG":0,"BASE":18} Arlec Smart {"NAME":"PC399HA","GPIO":[0,0,0,32,2720,2656,0,0,2624,320,224,0,0,0],"FLAG":0,"BASE":52} Arlec Smart 2.1A USB Charger {"NAME":"Arlec Single","GPIO":[0,0,0,0,321,0,0,0,224,0,64,0,0,0],"FLAG":0,"BASE":18} @@ -881,6 +924,7 @@ Bakibo TP22Y {"NAME":"Bakibo TP22Y","GPIO":[0,0,0,32,2720,2656,0 Bardi 16A {"NAME":"BARDI","GPIO":[320,0,0,0,0,2720,0,0,224,32,2656,321,2624,0],"FLAG":0,"BASE":18} Bauhn ASPU-1019 {"NAME":"Bauhn Smart Pl","GPIO":[0,0,0,0,224,225,0,0,0,320,32,0,0,0],"FLAG":0,"BASE":18} BAW {"NAME":"BAW TPSWIFI-10","GPIO":[0,0,0,0,320,0,0,0,224,32,0,0,0,0],"FLAG":0,"BASE":18} +Bawoo {"NAME":"Bawoo S120","GPIO":[0,0,0,0,288,0,0,0,224,32,0,0,0,0],"FLAG":0,"BASE":18} Be HiTech 16A {"NAME":"Be HiTech","GPIO":[0,0,0,288,0,2720,0,0,2624,32,2656,224,0],"FLAG":0,"BASE":18} Bearware 303492 3AC+2USB {"NAME":"Bearware 30349","GPIO":[0,320,0,32,225,226,0,0,227,224,544,0,0,0],"FLAG":0,"BASE":18} Bestek MRJ1011 {"NAME":"BestekMRJ1011","GPIO":[0,0,0,0,320,0,0,0,224,32,0,0,0,0],"FLAG":0,"BASE":1} @@ -952,6 +996,7 @@ Digoo NX-SP202 {"NAME":"Generic_SP202","GPIO":[288,0,0,2624,65,272 Dilisens NX-SP201 Mini 2 in 1 {"NAME":"NX-SP201","GPIO":[0,0,2624,0,2720,2656,288,224,33,225,32,0,0,0],"FLAG":0,"BASE":18} DILISENS SP201 {"NAME":"Dilisens SP201","GPIO":[0,0,2624,0,2688,2656,288,224,33,225,32,0,0,0],"FLAG":0,"BASE":18} Dunnes Stores {"NAME":"SmartLifePlug","GPIO":[0,0,0,32,0,0,0,0,0,320,224,0,0,0],"FLAG":0,"BASE":18} +Duvik 10A {"NAME":"Duvik M008","GPIO":[0,0,0,0,320,320,0,0,224,32,0,0,0,0],"FLAG":0,"BASE":18} DWFeng AWP02L-N {"NAME":"AWP02L-N","GPIO":[1,1,320,1,1,1,0,0,1,32,1,224,1,0],"FLAG":0,"BASE":18} DWFeng BSD01 {"NAME":"DWFeng BSD01","GPIO":[1,1,1,1,1,1,1,1,224,32,320,1,1,1],"FLAG":0,"BASE":18} ECO Plugs CT-065W {"NAME":"ECO/CT-065W","GPIO":[0,0,576,0,0,0,0,0,0,32,0,224,0,0],"FLAG":0,"BASE":18} @@ -971,10 +1016,11 @@ Energeeks 2 USB {"NAME":"EG-EW005MC","GPIO":[544,1,288,1,1,225,1,1, Energizer {"NAME":"Energizer EIE3-1001-WHT","GPIO":[32,0,448,0,2688,2656,0,0,2624,450,224,0,449,0],"FLAG":0,"BASE":18} Energizer Smart Plug {"NAME":"Energizer Smart Plug","GPIO":[0,0,0,32,0,0,0,0,0,320,224,0,0,0],"FLAG":0,"BASE":18} Epicka {"NAME":"Epicka","GPIO":[1,1,1,1,321,320,0,0,224,32,1,1,1,4704],"FLAG":0,"BASE":18} +Eques Elf Smart Plug {"NAME":"EQP01WTGY","GPIO":[0,0,0,320,0,0,0,0,96,0,0,224,0,0],"FLAG":0,"BASE":18} Esicoo JSM-WF02 {"NAME":"Esicoo Plug","GPIO":[0,32,0,0,0,0,0,0,0,320,224,0,0,0],"FLAG":0,"BASE":18} Estink C178 {"NAME":"Estink C178","GPIO":[0,0,0,0,288,321,0,0,224,32,0,0,0,0],"FLAG":0,"BASE":18} -Etekcity ESW01-USA {"NAME":"ESW01-USA","GPIO":[0,0,0,0,224,544,0,0,2656,2688,32,2592,288,0],"FLAG":0,"BASE":55} -Etekcity ESW15-USA {"NAME":"ESW15-US","GPIO":[0,0,0,0,0,224,0,0,2656,2688,32,2592,288,0],"FLAG":0,"BASE":18} +Etekcity 15A {"NAME":"ESW15-US","GPIO":[0,0,0,0,0,224,0,0,2656,2688,32,2592,288,0],"FLAG":0,"BASE":18} +Etekcity 8A {"NAME":"ESW01-USA","GPIO":[0,0,0,0,224,544,0,0,2656,2688,32,2592,288,0],"FLAG":0,"BASE":55} EU3S {"NAME":"AWOW BSD33","GPIO":[0,0,320,0,0,2720,0,0,2624,32,2656,224,0,0],"FLAG":0,"BASE":18} Eva Logik {"NAME":"EVA LOGIK Plug","GPIO":[1,32,1,1,1,1,0,0,1,288,224,1,1,0],"FLAG":0,"BASE":18} EZPlug V1 OpenSource {"NAME":"EZPlug V1","GPIO":[0,0,0,32,0,0,0,0,0,320,224,0,0,0],"FLAG":0,"BASE":1} @@ -985,6 +1031,7 @@ FK-PW901U {"NAME":"FK-PW901U","GPIO":[320,1,1,1,1,226,0,0,224 FLHS-ZN04 {"NAME":"FLHS-ZN04","GPIO":[321,0,320,0,0,2720,0,0,2624,32,2656,224,0,0],"FLAG":0,"BASE":45} Fontastic SH01 {"NAME":"Fontastic","GPIO":[1,0,1,0,320,0,0,0,224,32,0,0,0,4704],"FLAG":0,"BASE":18} Foreet {"NAME":"Foreet_120V","GPIO":[0,0,0,0,224,32,0,0,289,288,0,0,0,0],"FLAG":0,"BASE":18} +Fox&Summit FS-IP12PK {"NAME":"Fox & Summit Plug","GPIO":[0,0,32,0,3840,0,0,0,544,256,480,0,0,0],"FLAG":0,"BASE":18,"CMND":"BuzzerPwm 1"} FrankEver 15A {"NAME":"Israel plug","GPIO":[321,0,320,2624,0,2720,0,0,0,32,2656,224,0,0],"FLAG":0,"BASE":45} FrankEver 16A {"NAME":"FrankEver FK-PW801ER","GPIO":[0,0,0,0,288,0,0,0,224,32,0,0,0,0],"FLAG":0,"BASE":18} FrankEver Mini {"NAME":"FK-PW801US","GPIO":[0,0,320,0,0,0,0,0,0,32,0,224,0,0],"FLAG":0,"BASE":18} @@ -999,12 +1046,14 @@ Geeni Spot Glo {"NAME":"Geeni Glo","GPIO":[0,0,0,0,320,0,0,0,224,3 Geeni SWITCH {"NAME":"Geeni Switch","GPIO":[0,0,0,0,288,321,0,0,224,32,0,0,0,0],"FLAG":0,"BASE":18} Geeni Switch Duo {"NAME":"Geeni Duo","GPIO":[0,0,0,0,33,225,0,0,32,288,224,0,289,0],"FLAG":0,"BASE":18} Girier 16A {"NAME":"Girier - JR-PM01","GPIO":[0,544,0,2624,2720,2656,0,0,224,32,320,0,0,0],"FLAG":0,"BASE":68} +Globe 15A {"NAME":"Globe 50329","GPIO":[0,0,0,0,320,0,0,0,224,0,32,0,0,0],"FLAG":0,"BASE":18} Globe 2 Outlet {"NAME":"Globe 50020","GPIO":[0,576,0,321,33,32,0,0,224,320,225,0,0,0],"FLAG":0,"BASE":18} Globe Smart {"NAME":"GlobeSmartPlug","GPIO":[0,0,0,0,320,0,0,0,224,0,32,0,0,0],"FLAG":0,"BASE":18} GoldenDot Mini {"NAME":"GoldenDot Mini","GPIO":[0,32,0,0,0,0,0,0,0,321,224,0,0,0],"FLAG":0,"BASE":52} GoldenDot with ADC {"NAME":"W-US003-Power","GPIO":[320,0,0,0,0,0,0,0,0,32,0,224,0,4896],"FLAG":0,"BASE":18} Goliath 16A {"NAME":"GOLIATH AV-SSTE01","GPIO":[0,0,320,0,0,0,0,0,0,32,0,224,0,0],"FLAG":0,"BASE":18} Gosund {"NAME":"Gosund EP2","GPIO":[320,1,576,1,2656,2720,0,0,2624,32,0,224,0,0],"FLAG":0,"BASE":45} +Gosund {"NAME":"SHP5","GPIO":[321,3072,320,3104,1,225,0,0,1,1,224,1,32,0],"FLAG":0,"BASE":18} Gosund 13A {"NAME":"Gosund UP111","GPIO":[0,320,0,32,2720,2656,0,0,2624,576,224,0,0,0],"FLAG":0,"BASE":18} Gosund 2 in 1 {"NAME":"Gosund WP212","GPIO":[321,288,544,0,224,2720,0,0,2624,32,2656,225,33,0],"FLAG":0,"BASE":18} Gosund Dual {"NAME":"Gosund SP211","GPIO":[33,576,320,2624,2720,2656,0,0,32,321,224,0,225,0],"FLAG":0,"BASE":18} @@ -1012,10 +1061,9 @@ Gosund SP1 {"NAME":"Gosund SP1 v23","GPIO":[0,321,0,32,2720,26 Gosund SP111 {"NAME":"Gosund SP111","GPIO":[320,0,321,0,0,2720,0,0,2624,32,2656,224,0,0],"FLAG":0,"BASE":18} Gosund SP111 v1.1 {"NAME":"Gosund SP111 v1.1","GPIO":[320,0,576,0,2656,2720,0,0,2624,32,0,224,0,0],"FLAG":0,"BASE":45} Gosund SP111 v1.4 {"NAME":"Gosund SP111 v1.4","GPIO":[321,1,320,1,0,2720,0,0,2624,32,2656,224,0,0],"FLAG":0,"BASE":45} -Gosund SP112 {"NAME":"SHP5","GPIO":[321,3072,320,3104,1,225,0,0,1,1,224,1,32,0],"FLAG":0,"BASE":18} Gosund SP112 {"NAME":"Gosund 112v3.4","GPIO":[320,0,321,0,2656,2720,0,0,2624,257,224,0,0,4800],"FLAG":0,"BASE":18} Gosund WP1 {"NAME":"Gosund WP1-1","GPIO":[0,0,320,0,0,2720,0,0,2624,32,2656,224,0,0],"FLAG":0,"BASE":45} -Gosund WP2 {"NAME":"Gosund WP2","GPIO":[32,576,321,0,33,0,0,0,225,320,224,0,0,0],"FLAG":0,"BASE":18} +Gosund WP2 {"NAME":"Gosund WP2 Plug","GPIO":[33,0,320,0,321,32,0,0,224,576,225,0,0,0],"FLAG":0,"BASE":18} Gosund WP211 {"NAME":"Gosund wp211","GPIO":[0,0,0,0,224,0,0,0,0,32,0,225,33,0],"FLAG":0,"BASE":18} Gosund WP212 {"NAME":"Gosund_WP212","GPIO":[32,544,321,0,33,0,0,0,225,320,224,0,0,0],"FLAG":0,"BASE":18} Gosund WP3 {"NAME":"Gosund WP3 v2","GPIO":[320,0,321,0,0,0,0,0,0,32,0,224,0,0],"FLAG":0,"BASE":18} @@ -1051,10 +1099,10 @@ Hyleton 313 {"NAME":"Hyleton 313","GPIO":[321,0,320,0,0,0,0,0,0 Hyleton 314 {"NAME":"hyleton-314","GPIO":[321,0,320,0,0,0,0,0,0,32,0,224,0,0],"FLAG":0,"BASE":18} Hyleton 315 {"NAME":"hyleton-315","GPIO":[0,0,0,0,321,320,0,0,224,64,0,0,0,0],"FLAG":0,"BASE":18} Hyleton 317 {"NAME":"hyleton-317","GPIO":[320,0,321,0,322,0,0,0,0,64,0,224,0,0],"FLAG":0,"BASE":18} -Hyleton HLT-311 {"NAME":"HLT-311","GPIO":[320,0,0,0,0,0,0,0,0,32,0,224,0,0],"FLAG":0,"BASE":18} +Hyleton HLT-311 {"NAME":"HLT-311","GPIO":[544,0,320,0,0,0,0,0,0,32,0,224,0,0],"FLAG":0,"BASE":18} iClever IC-BS08 {"NAME":"iClever BS08","GPIO":[0,0,0,0,544,320,0,0,224,32,0,0,0,0],"FLAG":0,"BASE":18} iDIGITAL {"NAME":"Brilliant","GPIO":[0,0,0,0,288,0,0,0,224,64,0,0,0,0],"FLAG":0,"BASE":18} -Ihommate 16A {"NAME":"ZCH-02","GPIO":[0,0,0,32,2688,2656,0,0,2592,320,224,0,0,4704],"FLAG":0,"BASE":18} +Ihommate 16A {"NAME":"ZCH-02","GPIO":[0,0,0,32,2688,2656,0,0,2624,320,224,0,0,4704],"FLAG":0,"BASE":18} Infray 16A {"NAME":"AWP08L","GPIO":[32,0,288,0,0,0,0,0,0,0,0,224,0,4704],"FLAG":0,"BASE":18} Insmart WP5 {"NAME":"INSMART","GPIO":[0,0,448,0,0,0,0,0,0,160,0,224,0,0],"FLAG":0,"BASE":18} iSwitch {"NAME":"Smart Plug XSA","GPIO":[1,32,1,1,1,1,0,0,1,320,224,1,1,0],"FLAG":0,"BASE":18} @@ -1102,6 +1150,7 @@ Koogeek W-UKX {"NAME":"Koogeek W-UKX","GPIO":[0,32,1,1,1,0,0,0,0, KULED K63 {"NAME":"KULED K63","GPIO":[0,0,0,0,224,32,0,0,320,0,0,0,0,0],"FLAG":0,"BASE":18} Laduo YX-DE01 {"NAME":"YX-DE01","GPIO":[1,32,1,1,1,1,0,0,1,320,224,1,1,0],"FLAG":0,"BASE":18} LE LampUX Smart Socket {"NAME":"LE LampUX","GPIO":[0,0,0,0,0,320,0,0,224,32,0,0,0,0],"FLAG":0,"BASE":18} +Ledvance Smart+ {"NAME":"Ledvance Plug","GPIO":[0,0,0,320,2688,2656,0,0,224,32,2624,0,0,0],"FLAG":0,"BASE":18} Lenovo SE-341A {"NAME":"Lenovo SE-341A","GPIO":[0,0,0,0,32,224,0,0,576,0,320,0,0,0],"FLAG":0,"BASE":18} LESHP KS-501 {"NAME":"LESHP KS-501","GPIO":[32,0,0,0,0,0,0,0,224,320,0,0,0,0],"FLAG":0,"BASE":1} Lighting Arena {"NAME":"Lighting Arena Smart Plug","GPIO":[0,0,320,0,0,0,0,0,0,32,0,224,0,0],"FLAG":0,"BASE":18} @@ -1113,6 +1162,7 @@ Lohas Nightlight + USB {"NAME":"Lohas LED Mini Plug","GPIO":[0,321,0,288,3 Lonsonho 10A Type E {"NAME":"Lonsonho10ALed","GPIO":[0,0,0,0,320,0,0,0,224,32,0,0,0,0],"FLAG":0,"BASE":18} LoraTap SP400W-IT {"NAME":"LoraTap SP400W","GPIO":[0,0,0,0,544,320,0,0,224,32,0,0,0,1],"FLAG":0,"BASE":18} LSC Power {"NAME":"LSC Smart Plug","GPIO":[0,0,0,0,320,0,0,0,224,32,0,0,0,0],"FLAG":0,"BASE":18} +LSC Smart Connect {"NAME":"LSC Smart Plug FR","GPIO":[0,0,0,0,320,0,0,0,224,0,32,0,0,0],"FLAG":0,"BASE":18} Lumiman LM650 {"NAME":"Lumiman LM650","GPIO":[0,0,0,0,320,0,0,0,224,32,0,0,0,0],"FLAG":0,"BASE":18} Luminea NX-4491 {"NAME":"Luminea NX-449","GPIO":[320,0,576,0,0,0,0,0,0,32,0,224,0,0],"FLAG":0,"BASE":18} Luminea NX-4541 {"NAME":"NX-4451","GPIO":[0,0,0,32,0,0,0,0,0,320,224,0,0,0],"FLAG":0,"BASE":55} @@ -1134,9 +1184,11 @@ Merkury MI-WW101-199 {"NAME":"merkury WW101","GPIO":[0,0,0,0,0,0,0,0,320 Merkury MI-WW102-199L {"NAME":"MIC-WW102","GPIO":[32,0,0,0,0,0,0,0,0,320,224,0,0,0],"FLAG":0,"BASE":36} Merkury MI-WW105-199W {"NAME":"Merkury Switch","GPIO":[1,1,1,1,576,320,0,0,224,32,1,1,1,4704],"FLAG":0,"BASE":18} Mini {"NAME":"MiniSmartSocket_S03","GPIO":[0,0,0,0,320,0,0,0,0,32,0,224,0,0],"FLAG":0,"BASE":18} +Mini Smart {"NAME":"W-US002S","GPIO":[0,32,0,0,2720,0,0,0,0,288,224,0,0,0],"FLAG":0,"BASE":45} Minleaf W-DEXI {"NAME":"W-DEXI","GPIO":[0,32,0,0,2720,2656,0,0,2624,288,224,0,0,0],"FLAG":0,"BASE":18} Mirabella Genio {"NAME":"GenioGpo","GPIO":[0,0,0,32,2720,2656,0,0,2624,320,224,0,0,0],"FLAG":0,"BASE":18} Mirabella Genio 1002341 {"NAME":"Genio 1","GPIO":[0,0,320,0,0,0,0,0,224,32,0,0,0,0],"FLAG":0,"BASE":1} +Mirabella Genio Double Plug with USB Ports {"NAME":"Genio I002932","GPIO":[0,320,1,32,0,0,0,0,224,0,225,0,0,0],"FLAG":0,"BASE":18} Mirabella Genio USB {"NAME":"Mirabella Genio 1002826","GPIO":[0,0,0,32,0,0,0,0,0,320,224,0,0,0],"FLAG":0,"BASE":1} Mirabella Genio USB Port {"NAME":"Genio I002341","GPIO":[0,0,0,0,320,0,0,0,224,32,0,0,0,0],"FLAG":0,"BASE":1} Mistral {"NAME":"Mistral Smart ","GPIO":[320,0,0,0,0,0,0,0,0,32,0,224,0,0],"FLAG":0,"BASE":18} @@ -1158,6 +1210,7 @@ NEO Coolcam NAS-WR01W {"NAME":"NAS-WR01W","GPIO":[0,0,0,0,288,0,0,0,224,3 NEO Coolcam NAS-WR01W 16A {"NAME":"Neo Coolcam 16","GPIO":[32,0,0,0,2720,2656,0,0,2624,320,224,0,0,0],"FLAG":0,"BASE":49} Nestler-matho {"NAME":"N-m 485-1","GPIO":[0,0,0,32,2688,2656,0,0,2624,320,224,0,0,0],"FLAG":0,"BASE":18} NETVIP XS-SSA01 {"NAME":"XS-SSA01","GPIO":[0,0,0,0,0,0,0,0,320,32,0,224,0,0],"FLAG":0,"BASE":18} +Nexxt Surge Protector 220V Chile {"NAME":"Nexxt Smart Plug","GPIO":[0,0,0,0,320,1,0,0,32,544,224,0,0,0],"FLAG":0,"BASE":18} NGS Loop Track 16A {"NAME":"LOOP","GPIO":[0,0,320,0,0,0,0,0,0,32,0,224,0,0],"FLAG":0,"BASE":18} Nightlight and AC Outlet {"NAME":"SWN03","GPIO":[32,0,0,0,0,0,1,1,416,0,0,224,0,0],"FLAG":0,"BASE":18} Nishica SM-PW701I {"NAME":"SM-PW701I","GPIO":[1,1,1,1,1,1,1,1,224,288,32,1,1,1],"FLAG":0,"BASE":18} @@ -1215,12 +1268,12 @@ SilentNight {"NAME":"SilentNightPlug","GPIO":[0,0,0,0,288,0,0,0 Silvergear Slimme Stekker {"NAME":"Silvergear SmartHomePlug","GPIO":[0,0,0,96,0,0,0,0,0,320,224,0,0,0],"FLAG":0,"BASE":18} SimpleHome {"NAME":"SimpleHome","GPIO":[289,0,0,0,0,0,0,0,224,320,32,0,0,0],"FLAG":0,"BASE":1} SimpleHome 2 USB {"NAME":"SimpleHome","GPIO":[289,0,0,0,2656,2624,0,0,224,2688,32,0,0,0],"FLAG":0,"BASE":1} +Slitinto Mini 2 in 1 {"NAME":"slitinto NX-SP201","GPIO":[0,0,0,2624,32,2720,0,0,224,33,2656,225,0,0],"FLAG":0,"BASE":18} Slitinto NX-SM110 {"NAME":"Slitinto SM110","GPIO":[0,0,320,0,0,2720,0,0,2624,32,2656,224,0,0],"FLAG":0,"BASE":45} Slitinto NX-SM112 {"NAME":"NX-SM112","GPIO":[576,0,0,2624,0,2720,0,0,0,32,2656,224,0,0],"FLAG":0,"BASE":45} Slitinto NX-SM112 v2 {"NAME":"Slitinto NX SM","GPIO":[320,1,576,1,0,2720,0,0,2624,32,2656,224,0,0],"FLAG":0,"BASE":45} Slitinto NX-SM200 {"NAME":"NX-SM200","GPIO":[0,0,0,32,2720,2656,0,0,0,288,224,2592,0,0],"FLAG":0,"BASE":45} Slitinto NX-SM2001 {"NAME":"NX-SM2001","GPIO":[0,0,0,32,2720,2656,0,0,2624,288,224,0,0,0],"FLAG":0,"BASE":45} -Slitinto NX-SP201 Mini 2 in 1 {"NAME":"Slitinto Dual ","GPIO":[576,0,0,2624,64,2720,0,0,224,65,2656,225,0,0],"FLAG":0,"BASE":18} Slitinto NX-SP202 {"NAME":"Slitinto SP202","GPIO":[32,0,0,0,2720,2656,0,0,2624,288,225,224,65,0],"FLAG":0,"BASE":64} SM-PW701K {"NAME":"SM-PW701K","GPIO":[0,0,0,0,288,0,0,0,224,32,0,0,0,0],"FLAG":0,"BASE":18} Smaho {"NAME":"SMAHO WiFi P.","GPIO":[32,0,0,0,2720,2656,0,0,2624,320,224,0,0,0],"FLAG":0,"BASE":18} @@ -1248,7 +1301,7 @@ STITCH {"NAME":"Stitch 27937","GPIO":[32,0,320,0,2688,2656 STITCH {"NAME":"Stitch 35511","GPIO":[320,0,321,0,0,2688,0,0,0,32,2656,224,2624,0],"FLAG":0,"BASE":18} STITCH 15A In-Line {"NAME":"Stitch 39047","GPIO":[0,288,0,32,2688,2656,0,0,2624,0,224,0,0,0],"FLAG":0,"BASE":18} STITCH Mini 10A {"NAME":"STITCH 41730","GPIO":[0,0,320,0,0,0,0,0,0,32,0,224,0,0],"FLAG":0,"BASE":18} -SuperNight Dual {"NAME":"SuperNight Dua","GPIO":[1,32,1,224,2656,2688,0,0,225,2592,322,1,1,4704],"FLAG":0,"BASE":18} +SuperNight Dual {"NAME":"SUPERNIGHT","GPIO":[0,32,0,224,2656,2688,0,0,225,2624,576,0,0,4833],"FLAG":0,"BASE":18} SWA1 {"NAME":"SWA1","GPIO":[0,0,0,0,288,224,0,0,0,32,0,0,0,0],"FLAG":0,"BASE":18} SWA1 FR {"NAME":"SWA1","GPIO":[0,0,0,0,288,224,0,0,0,32,0,0,0,0],"FLAG":0,"BASE":18} SWA1 UK {"NAME":"SWA1","GPIO":[0,0,0,0,288,224,0,0,0,32,0,0,0,0],"FLAG":0,"BASE":18} @@ -1289,6 +1342,7 @@ TP20 {"NAME":"TP20","GPIO":[0,0,0,32,0,0,0,0,0,320,224,0 TP24 {"NAME":"TP24","GPIO":[0,0,0,32,0,0,0,0,0,320,224,0,0,0],"FLAG":0,"BASE":18} Treatlife Dimmable {"NAME":"DP20","GPIO":[0,2272,0,2304,0,0,0,0,0,0,0,0,0,0],"FLAG":0,"BASE":54,"CMND":"TuyaMCU 21,2 | SO20 1 | SO54 1"} U10 Series {"NAME":"WIFI-Socket","GPIO":[1,32,1,1,1,1,1,1,1,320,224,1,1,4704],"FLAG":0,"BASE":18} +UltraBrite {"NAME":"UltraBrite Smart Plug","GPIO":[1,1,1,1,288,289,1,1,224,32,1,1,1,1],"FLAG":0,"BASE":18} Ultralink UL-P01W {"NAME":"UL-P01W","GPIO":[0,288,0,32,2720,2656,0,0,2624,544,224,0,0,0],"FLAG":0,"BASE":18} Upstone {"NAME":"UPSTONE","GPIO":[1,1,544,1,320,1,0,0,224,32,1,1,1,1],"FLAG":0,"BASE":18} US212 {"NAME":"US212","GPIO":[320,0,0,2624,0,2720,0,0,224,32,2656,225,0,0],"FLAG":0,"BASE":18} @@ -1309,8 +1363,9 @@ WAZA JH-G01E 10A {"NAME":"Waza JH-G01E","GPIO":[0,0,0,0,288,0,0,0,22 Waza JH-G01E 16A {"NAME":"Waza JH-G01E 2","GPIO":[0,0,0,0,0,0,0,0,32,288,224,0,0,4704],"FLAG":0,"BASE":18} Wily Electronics {"NAME":"VC Plug","GPIO":[544,0,0,0,0,2720,0,0,2624,32,2656,224,0,0],"FLAG":0,"BASE":45} WiOn {"NAME":"WiOn","GPIO":[1,0,288,0,0,0,0,0,1,32,0,224,0,0],"FLAG":0,"BASE":17} +WiOn Single Outlet {"NAME":"WiOn 50050","GPIO":[0,0,576,0,0,0,0,0,0,32,0,224,0,0],"FLAG":0,"BASE":18} Wipro 16A {"NAME":"Wip-DSP1160","GPIO":[0,0,0,32,2720,2656,0,0,2624,576,224,0,0,0],"FLAG":0,"BASE":52} -Wisdom ZY_ACU02 {"NAME":"ZY-ACU02","GPIO":[0,0,0,544,225,224,0,0,320,32,321,0,0,0],"FLAG":0,"BASE":18} +Wisdom Dual {"NAME":"ZY-ACU02","GPIO":[0,0,0,544,225,224,0,0,320,32,321,0,0,0],"FLAG":0,"BASE":18} WL-SC01 {"NAME":"WL-SC01","GPIO":[0,0,0,0,320,0,0,0,224,0,32,0,0,0],"FLAG":0,"BASE":1} WOOX R4026 {"NAME":"WOOX R4026","GPIO":[0,0,0,32,0,0,0,0,0,320,224,0,0,0],"FLAG":0,"BASE":18} WOOX R4785 {"NAME":"WOOXR4785","GPIO":[0,0,0,0,288,224,0,0,0,32,0,0,0,0],"FLAG":0,"BASE":18} @@ -1329,14 +1384,14 @@ XS-A14 {"NAME":"NETVIP XS-A14","GPIO":[416,0,417,0,0,32,0, XS-A17 {"NAME":"XS-A18","GPIO":[416,0,417,0,0,418,0,0,0,32,0,224,0,0],"FLAG":0,"BASE":45} XS-A18 {"NAME":"XS-A18","GPIO":[416,0,417,0,0,418,0,0,0,32,0,224,0,0],"FLAG":0,"BASE":45} XS-A23 {"NAME":"XS-A23","GPIO":[320,1,0,2624,32,2720,0,0,0,33,2656,224,225,0],"FLAG":0,"BASE":45} -XS-SSA01 {"NAME":"XS-SSA01","GPIO":[0,32,0,0,0,0,0,0,320,160,0,224,0,0],"FLAG":0,"BASE":18} +XS-SSA01 {"NAME":"XS-SSA01","GPIO":[1,0,0,1,0,0,0,0,320,32,1,224,1,0],"FLAG":0,"BASE":18} XS-SSA01 v2 {"NAME":"XS-SSA01","GPIO":[1,32,1,1,1,1,0,0,320,1,1,224,1,0],"FLAG":0,"BASE":18} XS-SSA05 {"NAME":"XS-SSA05","GPIO":[257,1,1,2624,1,2688,0,0,224,32,2656,258,1,4704],"FLAG":0,"BASE":18} XS-SSA06 {"NAME":"XS-SSA06","GPIO":[416,0,417,0,0,418,0,0,0,64,0,224,0,0],"FLAG":0,"BASE":18} Yagala SWA9 {"NAME":"SWA9","GPIO":[0,0,0,0,288,224,0,0,0,32,0,0,0,0],"FLAG":0,"BASE":18} Yelomin JH-G01E {"NAME":"Yelomin","GPIO":[0,3072,0,3104,0,0,0,0,32,320,224,0,0,0],"FLAG":0,"BASE":18} YERON US101 {"NAME":"YERON_US101","GPIO":[1,1,1,32,2688,2656,0,0,2624,320,224,1,1,0],"FLAG":0,"BASE":18} -YM-WS-1 Mini {"NAME":"YM-WS1","GPIO":[0,0,0,0,0,0,0,0,320,32,0,224,0,0],"FLAG":0,"BASE":18} +YM-WS-1 Mini {"NAME":"YM-WS-1-ALT","GPIO":[32,33,34,35,0,0,0,0,0,288,224,0,0,0],"FLAG":0,"BASE":18} YM-WS-3 16A {"NAME":"YM-WS-3","GPIO":[0,32,0,0,0,0,0,0,0,288,224,0,576,4704],"FLAG":0,"BASE":18} YT-E002 {"NAME":"YT-E002","GPIO":[576,0,0,0,33,0,0,0,225,32,0,224,0,0],"FLAG":0,"BASE":18} YT-E003 {"NAME":"YT-E003-SP202","GPIO":[32,0,0,0,2720,2656,0,0,2624,288,225,224,65,0],"FLAG":0,"BASE":64} @@ -1360,6 +1415,7 @@ AHRise 4+4AC+4USB {"NAME":"AHRise-083","GPIO":[0,0,0,0,320,32,0,0,225 AHRise AHR-085 {"NAME":"AHRise AHR-085","GPIO":[0,0,0,0,32,320,0,0,225,226,224,0,0,0],"FLAG":0,"BASE":18} Aicliv 4AC 3USB {"NAME":"Aicliv WiFi","GPIO":[0,0,0,227,226,576,0,0,224,32,225,0,0,0],"FLAG":0,"BASE":18} Ailink 4AC 4USB {"NAME":"Ailink","GPIO":[288,321,0,289,256,32,0,0,258,257,259,0,228,0],"FLAG":0,"BASE":4} +Anhaorui 6+6AC 4USB {"NAME":"Anhaorui ZN-709","GPIO":[320,0,0,160,224,225,0,0,228,229,227,226,0,0],"FLAG":0,"BASE":18,"CMND":"SwitchMode1 5|SO32 10"} Anncoe 4AC 4USB {"NAME":"P-EU4U4S","GPIO":[288,0,0,0,226,227,0,0,0,0,225,224,0,0],"FLAG":0,"BASE":18} Annhome 3AC + 2USB {"NAME":"1200W WiFi SPS","GPIO":[259,0,0,0,321,288,0,0,224,32,225,226,260,0],"FLAG":0,"BASE":18} AOFO 3AC+4USB {"NAME":"AOFO","GPIO":[0,320,0,32,225,224,0,0,0,226,227,0,0,4704],"FLAG":0,"BASE":18} @@ -1389,8 +1445,9 @@ Geeni Surge + Charge 2 USB {"NAME":"Geeni GN-SW023","GPIO":[288,0,0,0,225,224, Geeni SURGE 6-Outlet Surge Protector {"NAME":"Geeni 6 Strip","GPIO":[320,0,0,0,225,224,0,0,227,228,226,229,32,0],"FLAG":0,"BASE":18} Geeni Surge Mini {"NAME":"Geeni-GN-SW004","GPIO":[320,0,0,32,0,0,0,0,225,224,226,0,0,1],"FLAG":0,"BASE":18} Globe 4 Outlet 2 USB {"NAME":"PowerBar","GPIO":[320,0,0,0,227,32,0,0,225,226,224,0,0,1],"FLAG":0,"BASE":18} +Gosund 3+3AC 3USB {"NAME":"Gosund-PM03-T","GPIO":[0,0,576,0,0,259,0,0,224,225,226,0,32,0],"FLAG":0,"BASE":18} Gosund P1 {"NAME":"Gosund_P1","GPIO":[0,3072,544,3104,0,259,0,0,225,226,224,0,32,4704],"FLAG":0,"BASE":18} -Gosund P2 {"NAME":"Gosund P2","GPIO":[0,0,544,0,0,259,0,0,224,225,226,0,32,0],"FLAG":0,"BASE":18} +Gosund P2 {"NAME":"Gosund-PM03-v2","GPIO":[0,0,576,0,0,0,0,0,224,225,226,259,32,0],"FLAG":0,"BASE":18} Gosund WP9 {"NAME":"Gosund WP9","GPIO":[320,291,290,289,0,224,0,0,226,227,225,0,32,0],"FLAG":0,"BASE":18} Hama 4AC 4USB {"NAME":"HamaStrip","GPIO":[0,544,0,32,225,224,0,0,226,227,228,0,0,0],"FLAG":0,"BASE":18} Heyvalue 3AC+3USB {"NAME":"HeyvalueHLT-330","GPIO":[288,0,289,0,227,256,0,0,257,35,258,0,0,0],"FLAG":0,"BASE":18} @@ -1430,6 +1487,7 @@ POWSAV 5+5AC 4USB {"NAME":"POWSAV 5+5AC+4USB","GPIO":[320,0,0,32,224, Prokord 4AC 4USB {"NAME":"PSH-WT003-EU","GPIO":[0,320,0,32,226,227,0,0,225,224,260,0,0,0],"FLAG":0,"BASE":18} S2199EU {"NAME":"S2199EU","GPIO":[0,32,0,288,226,228,0,0,224,227,225,0,0,4704],"FLAG":0,"BASE":18} SA-P402A {"NAME":"SA-P402A","GPIO":[0,32,0,320,226,228,224,227,225,0,0,0,0,4704],"FLAG":0,"BASE":18} +Smart Tech 4AC 4USB {"NAME":"ST-T-SPS1","GPIO":[0,576,320,0,228,225,0,0,227,32,226,224,0,0],"FLAG":0,"BASE":18} STITCH 4 AC, 2 Always-On USB {"NAME":"MP Stitch 34082","GPIO":[320,0,0,0,227,32,0,0,225,226,224,0,0,0],"FLAG":0,"BASE":18} Surge Protector 3AC 2USB {"NAME":"C158","GPIO":[260,0,0,0,261,230,0,0,224,0,225,226,259,0],"FLAG":0,"BASE":18} SWB1 {"NAME":"SWB1","GPIO":[288,0,0,0,0,227,0,0,224,32,225,226,0,0],"FLAG":0,"BASE":18} @@ -1468,7 +1526,7 @@ ZLD64-EU-W {"NAME":"ZLD64-EU-W","GPIO":[0,320,0,32,225,224,0,0 ## RF Gateway ``` -Sonoff RF Gateway 433 {"NAME":"Sonoff Bridge","GPIO":[32,3200,1,3232,1,1,0,0,1,320,1,0,0,0],"FLAG":0,"BASE":25} +Sonoff RF Bridge 433 {"NAME":"Sonoff Bridge","GPIO":[32,3200,1,3232,1,1,0,0,1,320,1,0,0,0],"FLAG":0,"BASE":25} ``` ## RGB @@ -1495,9 +1553,10 @@ Aoycocr JL81 5W 400lm {"NAME":"AoycocrJLB1","GPIO":[0,0,0,0,418,0,0,0,417 Aoycocr Q10CWM BR30 9W 720lm {"NAME":"AoycocrBR30","GPIO":[0,0,0,0,0,418,0,0,417,0,416,419,0,0],"FLAG":0,"BASE":18} Arlec Smart 9.5W 806lm {"NAME":"Arlec RGBWW","GPIO":[0,0,0,0,416,419,0,0,417,420,418,0,0,0],"FLAG":0,"BASE":18} Arlec Smart 9.5W 806lm {"NAME":"Arlec RGBWW","GPIO":[0,0,0,0,416,419,0,0,417,420,418,0,0,0],"FLAG":0,"BASE":18} -Athom 15W 1400lm {"NAME":"Athom LB017W","GPIO":[0,0,0,0,416,419,0,0,417,452,418,0,0,0],"FLAG":0,"BASE":1,"CMND":"SO92 1 | DimmerRange 24,100"} +Athom 12W 1000lm {"NAME":"LB03-12W-E27-TAS","GPIO":[0,0,0,0,416,419,0,0,417,452,418,0,0,0],"FLAG":0,"BASE":18,"CMND":"SO92 1 | DimmerRange 24,100"} +Athom 15W 1400lm {"NAME":"LB01-15W-E27-TAS","GPIO":[0,0,0,0,416,419,0,0,417,452,418,0,0,0],"FLAG":0,"BASE":18,"CMND":"SO92 1 | DimmerRange 24 100"} Athom 4.5W 700lm {"NAME":"Athom LB10-5W-TAS","GPIO":[0,0,0,0,416,419,0,0,417,452,418,0,0,0],"FLAG":0,"BASE":18} -Athom 7W 600lm {"NAME":"Athom LB017W","GPIO":[0,0,0,0,416,419,0,0,417,420,418,0,0,0],"FLAG":0,"BASE":1} +Athom 7W 600lm {"NAME":"LB01-7W-E27-TAS","GPIO":[0,0,0,0,416,419,0,0,417,420,418,0,0,0],"FLAG":0,"BASE":18} Aunics 7W 600lm {"NAME":"Aunics RGBW","GPIO":[0,0,0,0,416,419,0,0,417,420,418,0,0,0],"FLAG":0,"BASE":18} Avatar 8W 800lm {"NAME":"Avatar 8W RGBCW","GPIO":[1,1,1,1,416,419,1,1,417,420,418,1,1,1],"FLAG":0,"BASE":18} Avatar ALB201W 720lm {"NAME":"AVATAR ALB201W","GPIO":[0,0,0,0,0,418,0,0,417,0,416,419,0,0],"FLAG":0,"BASE":18} @@ -1509,7 +1568,7 @@ Bardi 9W 900lm {"NAME":"Bardi 9W RGBWW","GPIO":[0,0,0,0,417,416,0, BAZZ BR30 650lm {"NAME":"BAZZrgb","GPIO":[0,0,0,0,416,419,0,0,417,420,418,0,0,0],"FLAG":0,"BASE":18} Beghelli dom-E 14W 1400lm {"NAME":"Beghelli Smart Bulb","GPIO":[0,0,0,0,416,417,0,0,418,419,420,0,0,0],"FLAG":3,"BASE":18,"CMND":"SO37 13"} BlitzWolf w/ remote 850lm {"NAME":"BW-LT27","GPIO":[0,0,0,0,420,417,0,0,418,1088,419,416,0,0],"FLAG":0,"BASE":18} -BNETA 8.5W 800lm {"NAME":"BNETA IO-WIFI60-E27P","GPIO":[0,0,0,0,416,419,0,0,417,452,418,0,0,0],"FLAG":0,"BASE":18} +BNETA 8.5W 800lm {"NAME":"BNETA IO-WIFI60-E27P","GPIO":[0,0,0,0,416,419,0,0,417,452,418,0,0,0],"FLAG":0,"BASE":48} BNETA 8.5W 800lm {"NAME":"OM60/RGBW","GPIO":[0,0,0,0,2912,416,0,0,417,2976,2944,0,0,0],"FLAG":0,"BASE":18} Bomcosy 600lm {"NAME":"Generic","GPIO":[0,0,0,0,416,419,0,0,417,420,418,0,0,4704],"FLAG":0,"BASE":18} Boxlood 9W 900lm {"NAME":"Boxlood 9w 900lm RGBCCT","GPIO":[0,0,0,0,416,419,0,0,417,420,418,0,0,0],"FLAG":0,"BASE":18} @@ -1517,6 +1576,7 @@ Calex 429004 A60 806lm {"NAME":"Calex E27 RGB ","GPIO":[0,0,0,0,416,419,0, Calex 429008 B35 5W 470lm {"NAME":"Calex E14 RGBW","GPIO":[0,0,0,0,0,0,0,0,4064,0,4032,0,0,0],"FLAG":0,"BASE":18} Calex 5W 350lm Reflector {"NAME":"Calex RGBW","GPIO":[0,0,0,0,0,0,0,0,4064,0,4032,0,0,0],"FLAG":0,"BASE":18} Candle 5W 450lm {"NAME":"Candela","GPIO":[0,0,0,0,416,419,0,0,417,420,418,0,0,0],"FLAG":0,"BASE":18} +Cleverio 400lm 5.5W {"NAME":"Cleverio 51573","GPIO":[0,0,0,0,0,0,0,0,4064,0,4032,0,0,0],"FLAG":0,"BASE":18} Cleverio 51395 806lm {"NAME":"CleverioE27RGB","GPIO":[0,0,0,0,2944,2912,0,0,417,2976,416,0,0,0],"FLAG":0,"BASE":18} CMARS 4W Reflector {"NAME":"RGBWW GU10","GPIO":[0,0,0,0,419,420,0,0,417,418,416,0,0,1],"FLAG":0,"BASE":18} Connect SmartHome 5W GU5.3 {"NAME":"CSH-GU53RGB5W","GPIO":[0,0,0,0,419,420,0,0,417,418,416,0,0,0],"FLAG":0,"BASE":18} @@ -1572,6 +1632,7 @@ Legelite 5W Candle {"NAME":"Legelite E12","GPIO":[0,0,0,0,416,419,0,0, Legelite A60 7W {"NAME":"Legelite A60 7","GPIO":[0,0,0,0,416,419,0,0,417,420,418,0,0,0],"FLAG":0,"BASE":18} Legelite A60 7W 600lm {"NAME":"Legelite E26","GPIO":[0,0,0,0,416,419,0,0,417,420,418,0,0,0],"FLAG":0,"BASE":18} Lenovo 800lm {"NAME":"Lenovo SE-241EB","GPIO":[0,0,0,0,416,419,0,0,417,452,418,0,0,0],"FLAG":0,"BASE":18} +Lloyd's 5W 400Lm {"NAME":"LLOYDS LC-1271","GPIO":[160,0,0,0,0,0,0,0,4064,0,4032,0,0,0],"FLAG":0,"BASE":18} Lohas ZN004 8W 680lm {"NAME":"Lohas B22 R63","GPIO":[0,0,0,0,417,416,0,0,420,418,419,0,0,0],"FLAG":0,"BASE":18} Lohas ZN011 5W 420lm {"NAME":"LohasZN011","GPIO":[0,0,0,0,417,416,0,0,420,418,419,0,0,0],"FLAG":0,"BASE":18} Lohas ZN014-2 5W 380lm {"NAME":"Lohas ZN014-2","GPIO":[0,0,0,0,417,416,0,0,420,418,419,0,0,0],"FLAG":0,"BASE":18} @@ -1829,11 +1890,14 @@ Zilotek A19 800lm {"NAME":"Zilotek RGBW","GPIO":[0,0,0,0,2912,416,0,0 ## Relay Board ``` +2 Channel Tuya {"NAME":"TY-DIY-S02","GPIO":[1,1,1,1,1,1,0,0,1,1,1,1,1,0],"FLAG":0,"BASE":54,"CMND":"TuyaMCU 11,1 | TuyaMCU 12,2 | TuyaMCU 13,13 | TuyaMCU 1,101"} Anmbest 2 Channel Inching Self-locking Switch Module {"NAME":"Generic","GPIO":[32,1,1,1,1,225,33,0,224,320,0,0,0,0],"FLAG":0,"BASE":1} +Aptinex IOT RelayNode 4 Channel {"NAME":"APTINEX","GPIO":[0,0,1,0,0,0,0,0,224,225,226,227,0,0],"FLAG":0,"BASE":18} Armtronix Quad {"NAME":"Armtronix Wifi Four Relay Board","GPIO":[1,0,0,0,224,1,0,0,225,226,227,0,1,0],"FLAG":0,"BASE":7} Athom 1Ch Inching/Self-locking {"NAME":"Athom R01","GPIO":[1,1,1,1,1,224,1,1,1,1,1,1,576,0],"FLAG":0,"BASE":18} Athom 8Ch Inching/Self-locking 10A {"NAME":"Athom R08","GPIO":[229,1,1,1,230,231,1,1,226,227,225,228,224,0],"FLAG":0,"BASE":18} Claudy 5V {"NAME":"CLAUDY","GPIO":[0,0,225,0,0,0,0,0,0,0,0,224,0,0],"FLAG":0,"BASE":18} +Devantech 8x16A {"NAME":"ESP32LR88","GPIO":[0,0,231,0,32,35,0,0,229,230,228,0,33,34,36,37,0,38,39,544,0,225,226,227,0,0,0,0,0,224,3232,3200,0,0,0,0],"FLAG":0,"BASE":1} DoHome HomeKit DIY Switch {"NAME":"DoHome DIY","GPIO":[1,1,0,1,1,544,0,0,224,0,0,0,0,0],"FLAG":0,"BASE":1} Eachen ST-DC2 {"NAME":"Garage Control","GPIO":[162,0,0,0,226,225,33,0,224,288,163,227,0,4704],"FLAG":0,"BASE":18} Eachen ST-DC4 {"NAME":"Eachen_ST-DC4","GPIO":[160,1,1,1,226,225,1,1,224,544,1,227,1,0],"FLAG":0,"BASE":54} @@ -1847,11 +1911,12 @@ ESP-12F 5V/7-28V 4 Channel 30A {"NAME":"ESP12F_Relay_30A_X4","GPIO":[1,1,1,1,32 ESP-12F 5V/7-28V 8 Channel {"NAME":"ESP12F_Relay_X8","GPIO":[229,1,1,1,230,231,0,0,226,227,225,228,224,1],"FLAG":0,"BASE":18} ESP-12F 5V/7-30V/220V 4 Channel {"NAME":"ESP12F_Relay_X4","GPIO":[1,1,320,1,1,321,1,1,226,227,225,1,224,1],"FLAG":0,"BASE":18} ESP-12F 5V/8-80V 2 Channel {"NAME":"LC-Relay-ESP12-2R-D8","GPIO":[1,1,1,1,224,225,1,1,1,1,1,1,1,1],"FLAG":0,"BASE":18} -ESP32 4 Channel {"NAME":"RobotDyn ESP32R4","GPIO":[1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,224,225,1,227,226,32,33,34,35],"FLAG":0,"BASE":1} +ESP32 4 Channel {"NAME":"RobotDyn ESP32R4","GPIO":[0,0,1,0,1,1,0,0,1,1,1,1,1,1,1,1,0,0,0,1,0,224,225,0,0,0,0,0,227,226,32,33,34,0,0,35],"FLAG":0,"BASE":2} eWeLink PSF-B04 5V 7-32V 4 Channel {"NAME":"eWeLink 4CH","GPIO":[160,0,0,0,226,225,161,162,224,288,163,227,0,0],"FLAG":0,"BASE":18} Geekcreit 5V DIY 4 Channel Jog Inching Self-Locking {"NAME":"Geekcreit-4ch","GPIO":[160,0,0,0,226,225,161,162,224,288,163,227,0,0],"FLAG":0,"BASE":18} Geekcreit Module 220V 10A {"NAME":"DIY ESP8266 Re","GPIO":[0,0,544,0,224,32,0,0,0,0,0,0,0,0],"FLAG":0,"BASE":18} HW-622 ESP8266 {"NAME":"HW-622","GPIO":[0,0,544,0,224,32,0,0,0,0,0,0,0,0],"FLAG":0,"BASE":18} +Kincony 8 Channel {"NAME":"KC868-A8","GPIO":[32,0,1120,0,640,608,0,0,0,1,1,1152,0,0,5600,0,0,0,0,5568,0,0,0,0,0,0,0,0,1,1,0,0,1,0,0,1],"FLAG":0,"BASE":1,"CMND":"EthClockMode 3 | EthAddress 0 | EthType 0 | I2CDriver2 1"} Kincony IR+RF 4 Channel {"NAME":"KC868-A4","GPIO":[32,0,227,0,224,225,0,0,0,1312,1,226,0,0,480,1152,0,1120,1056,1088,0,1,1,1,0,0,0,0,4706,4707,4704,4705,1,0,0,1],"FLAG":0,"BASE":1} LC Technology 12V 4 Channel {"NAME":"LC Technology 4CH Relay","GPIO":[224,0,225,0,226,227,0,0,0,0,0,0,0,0],"FLAG":0,"BASE":18} LC Technology 5V 2 Channel {"NAME":"LC-ESP01-2R-5V","GPIO":[0,3200,0,3232,0,0,0,0,224,225,0,0,0,0],"FLAG":0,"BASE":18} @@ -1865,18 +1930,13 @@ Mhcozy 5V {"NAME":"Portail","GPIO":[160,0,0,0,0,0,0,0,224,320 Sinilink DC5V Module {"NAME":"Sinilink XY-WF5V","GPIO":[0,0,0,0,224,1,0,0,32,288,0,0,1,0],"FLAG":0,"BASE":18} Sinilink DC6-36V Module {"NAME":"Sinilink XY-WF5V","GPIO":[0,0,0,0,224,1,0,0,32,288,0,0,1,0],"FLAG":0,"BASE":18} Sinilink MOS {"NAME":"Sinilink MOS","GPIO":[0,0,576,0,224,1,0,0,32,288,0,0,0,0],"FLAG":0,"BASE":18} +Sinilink Thermostat {"NAME":"XY-WFT1","GPIO":[0,0,544,0,480,224,0,0,320,1,32,0,0,4736],"FLAG":0,"BASE":18,"CMND":"BuzzerPwm 1"} Sonoff 1 Channel Inching/Self-Locking {"NAME":"1 Channel","GPIO":[32,0,0,0,0,0,0,0,224,320,0,0,0,0],"FLAG":0,"BASE":12} Sonoff RE5V1C 5V Inching/Selflock {"NAME":"Sonoff RE5V1C","GPIO":[32,1,1,1,1,1,0,0,224,320,0,0,0,0],"FLAG":0,"BASE":18} Sonoff SV {"NAME":"Sonoff SV","GPIO":[32,1,0,1,1,1,0,0,224,320,1,0,0,4704],"FLAG":0,"BASE":3} Yunshan 7-30V 10A {"NAME":"Yunshan 10A","GPIO":[32,1,288,1,224,161,0,0,225,0,0,0,0,0],"FLAG":0,"BASE":18} ``` -## Relay Module -``` -PPA Contatto Wi-Fi {"NAME":"PPA Contatto","GPIO":[0,0,32,0,224,162,0,0,288,225,0,0,0,0],"FLAG":0,"BASE":18} -Shelly Plus 1 {"NAME":"Shelly Plus 1 ","GPIO":[0,0,0,0,192,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,224,0,0,0,0,0,0,0,0,0,0,0,0,0],"FLAG":0,"BASE":1} -``` - ## Siren ``` Connex Smart Indoor {"NAME":"Connex Siren","GPIO":[0,2272,0,2304,0,0,0,0,0,0,0,0,0,0],"FLAG":0,"BASE":54} @@ -1900,7 +1960,7 @@ SmartBase E0260 {"NAME":"SmartBaseE0260","GPIO":[0,0,0,0,320,0,0,0, ## Switch ``` -3 Way Smart Light {"NAME":"Nexete KS-602F 3-Way","GPIO":[1,1,1,1,1,1,0,0,1,1,1,1,1,0],"FLAG":0,"BASE":54} +3 Way Smart Light {"NAME":"KS-602F","GPIO":[1,1,1,1,1,1,0,0,1,1,1,1,1,0],"FLAG":0,"BASE":54} 3A Smart Home {"NAME":"3A Smart Home ","GPIO":[544,0,290,33,225,34,0,0,32,224,289,226,288,0],"FLAG":0,"BASE":18} AGL 2 Gang {"NAME":"AGL WiFi 02","GPIO":[0,0,544,0,0,33,0,0,225,224,0,0,32,0],"FLAG":0,"BASE":18} AGL 3 Gang {"NAME":"AGL WiFi 03","GPIO":[0,0,544,0,34,33,0,0,225,224,226,0,32,0],"FLAG":0,"BASE":18} @@ -1908,12 +1968,16 @@ Aoycocr SW1 {"NAME":"Aoycocr SW1","GPIO":[576,1,321,1,1,1,1,1,3 Athom 1 Gang {"NAME":"Athom SW011EU","GPIO":[576,0,0,32,0,0,0,0,0,224,288,0,0,0],"FLAG":0,"BASE":1} Athom 1 Gang {"NAME":"Athom SW031US","GPIO":[576,0,0,32,0,0,0,0,0,224,288,0,0,0],"FLAG":0,"BASE":1} Athom 1 Gang No Neutral {"NAME":"Athom SW111EU","GPIO":[576,0,0,32,0,0,0,0,0,224,288,0,0,0],"FLAG":0,"BASE":1} +Athom 1 Gang No Neutral Touch {"NAME":"Athom SW33-1US","GPIO":[576,0,0,32,0,0,0,0,0,224,288,0,0,0],"FLAG":0,"BASE":18} Athom 2 Gang {"NAME":"Athom SW012EU","GPIO":[576,289,0,32,225,33,0,0,0,224,288,0,0,0],"FLAG":0,"BASE":1} Athom 2 Gang {"NAME":"Athom SW032US","GPIO":[576,289,0,32,225,33,0,0,0,224,288,0,0,0],"FLAG":0,"BASE":1} Athom 2 Gang No Neutral {"NAME":"Athom SW112EU","GPIO":[576,289,0,32,225,33,0,0,0,224,288,0,0,0],"FLAG":0,"BASE":1} +Athom 2 Gang No Neutral Touch {"NAME":"Athom SW33-2US","GPIO":[576,289,0,32,225,33,0,0,0,224,288,0,0,0],"FLAG":0,"BASE":18} Athom 3 Gang Key {"NAME":"Athom SW01-TAS-3EU","GPIO":[576,290,1,33,225,34,0,0,32,224,289,226,288,0],"FLAG":0,"BASE":18} +Athom 3 Gang No Neutral Touch {"NAME":"Athom SW33-3US","GPIO":[576,290,0,33,225,34,0,0,32,224,289,226,288,0],"FLAG":0,"BASE":18} Athom 3 Gang Touch {"NAME":"Athom SW03-TAS-3US","GPIO":[576,290,0,33,225,34,0,0,32,224,289,226,288,0],"FLAG":0,"BASE":18} Athom 3 Gang Touch {"NAME":"Athom SW11-TAS-3EU","GPIO":[576,290,1,33,225,34,0,0,32,224,289,226,288,0],"FLAG":0,"BASE":18} +Athom 4 Gang No Neutral Touch {"NAME":"Athom SW33-4US","GPIO":[576,0,0,33,225,34,0,0,32,224,227,226,35,0],"FLAG":0,"BASE":18} Athom 4 Gang Touch {"NAME":"Athom SW03-TAS-4US","GPIO":[576,0,0,33,225,34,0,0,32,224,227,226,35,0],"FLAG":0,"BASE":18} Athom 4 Gang Touch {"NAME":"Athom SW11-TAS-4EU","GPIO":[576,0,0,33,225,34,0,0,32,224,227,226,35,0],"FLAG":0,"BASE":18} Athom US Key Switch 1 Gang {"NAME":"Athom SW13","GPIO":[576,0,0,32,0,0,0,0,0,224,288,0,0,0],"FLAG":0,"BASE":1} @@ -1954,9 +2018,10 @@ Eachen CD303 3 Gang {"NAME":"ID Components","GPIO":[544,289,0,162,224,1 Eachen SWT-2Gang {"NAME":"ID Components","GPIO":[544,1,1,1,1,161,1,1,160,224,289,225,288,1],"FLAG":0,"BASE":18} Earda 3-Way {"NAME":"ESW-1WAA-US","GPIO":[160,0,0,0,320,0,0,0,0,224,0,0,0,0],"FLAG":0,"BASE":18} Enjowi WF-SK301 {"NAME":"Tuya 3 Channel","GPIO":[0,0,0,0,226,33,0,0,32,224,34,225,544,0],"FLAG":0,"BASE":18} +Esooli 1 Gang {"NAME":"Esooli 1G","GPIO":[0,288,0,0,0,32,0,0,224,0,0,0,0,0],"FLAG":0,"BASE":1} Esooli 2 Gang 1 Way {"NAME":"Esooli 2 gang","GPIO":[0,288,0,32,33,0,0,0,0,224,225,0,0,0],"FLAG":0,"BASE":1} -Etekcity ESWL01 {"NAME":"EtekCityESWL01","GPIO":[0,1,0,1,288,289,0,0,0,224,96,0,0,4704],"FLAG":0,"BASE":18} -Etekcity ESWL03 3-way {"NAME":"Etekcity 3Way","GPIO":[0,0,0,0,226,256,0,0,192,225,161,0,0,0],"FLAG":0,"BASE":18} +Etekcity {"NAME":"EtekCityESWL01","GPIO":[0,1,0,1,288,289,0,0,0,224,96,0,0,4704],"FLAG":0,"BASE":18} +Etekcity 3-way {"NAME":"Etekcity 3Way","GPIO":[0,0,0,0,226,256,0,0,192,225,161,0,0,0],"FLAG":0,"BASE":18} Eva Logik 3-Way {"NAME":"WF30 Switch","GPIO":[0,0,0,0,33,0,0,0,224,32,0,0,0,0],"FLAG":0,"BASE":18} FrankEver 4 Gang {"NAME":"FrankEver Wifi Smart Switch","GPIO":[0,0,0,32,224,33,1,1,34,226,227,225,35,0],"FLAG":0,"BASE":18} Freecube {"NAME":"Freecube","GPIO":[288,0,289,0,0,0,0,0,290,32,0,224,0,0],"FLAG":0,"BASE":18} @@ -1998,7 +2063,6 @@ Kuled K36 {"NAME":"KULED-B","GPIO":[160,1,1,1,1,1,224,288,256 Kuled KS602S {"NAME":"KULED","GPIO":[32,1,1,1,1,1,0,0,224,320,1,1,1,0],"FLAG":0,"BASE":18} Kygne CD-301 {"NAME":"KYGNE Touch","GPIO":[0,0,0,0,288,289,0,0,224,32,0,0,0,0],"FLAG":0,"BASE":10} Laghten SS02S {"NAME":"Laghten SS02S","GPIO":[0,0,0,0,288,321,0,0,224,32,0,0,0,0],"FLAG":0,"BASE":18} -Lanbon L8 5 in 1 LCD Touch {"NAME":"Lanbon L8","GPIO":[0,0,0,0,0,992,0,0,224,0,225,0,0,0,1024,896,0,6624,6592,864,0,832,416,226,0,0,0,0,417,418,0,352,0,0,0,4736],"FLAG":0,"BASE":1} LCARE Modular 2 Gang {"NAME":"2SW1-In","GPIO":[32,1,1,1,0,225,33,0,224,320,0,0,0,0],"FLAG":0,"BASE":29} LerLink 1 Gang No Neutral {"NAME":"LerLink X801-L","GPIO":[0,0,0,0,32,0,0,0,224,320,0,0,0,1],"FLAG":0,"BASE":18} Lerlink 2 Gang {"NAME":"Lerlink X802A","GPIO":[0,0,0,33,32,0,0,0,224,288,225,0,0,0],"FLAG":0,"BASE":18} @@ -2007,7 +2071,7 @@ Lerlink 3 Gang {"NAME":"X803A","GPIO":[0,0,0,33,32,34,0,0,224,259, Lerlink 3 Gang {"NAME":"X803A","GPIO":[0,0,0,33,32,34,0,0,224,288,225,226,0,0],"FLAG":0,"BASE":18} Lerlink 3 Gang No Neutral {"NAME":"X803K-L 3 Gang","GPIO":[0,0,320,0,32,34,33,0,224,0,225,226,0,0],"FLAG":0,"BASE":18} Lightstory WT02S {"NAME":"WT02S","GPIO":[0,0,0,0,321,320,0,0,224,32,0,0,0,0],"FLAG":0,"BASE":50} -Linkind 2-Way Single Pole {"NAME":"Linkind WS240010008","GPIO":[0,0,0,0,0,224,0,0,0,0,288,0,0,0,0,0,0,0,0,0,0,576,321,0,0,0,0,0,33,32,0,0,0,0,0,0],"FLAG":0,"BASE":1} +Linkind 2-Way {"NAME":"Linkind WS240010008","GPIO":[0,0,0,0,0,224,0,0,0,0,288,0,0,0,0,0,0,0,0,0,0,576,321,0,0,0,0,0,33,32,0,0,0,0,0,0],"FLAG":0,"BASE":1} Lonsonho SK3-01 {"NAME":"Tuya 1 Channel","GPIO":[0,0,0,0,0,32,0,0,0,0,0,224,288,0],"FLAG":0,"BASE":18} Lonsonho SK3-02 {"NAME":"Tuya 2 Channel","GPIO":[0,0,0,0,225,0,0,0,32,224,33,0,288,0],"FLAG":0,"BASE":18} Lonsonho SK3-03 {"NAME":"Tuya 3-ch v2","GPIO":[544,322,0,33,225,34,0,0,32,224,321,226,320,0],"FLAG":0,"BASE":18} @@ -2043,6 +2107,7 @@ Moes BS-US-W Boiler {"NAME":"BS-US-W","GPIO":[290,0,0,32,224,0,0,0,0,0, Moes Light and Fan {"NAME":"Moes WF-FL01","GPIO":[0,2272,0,2304,0,0,0,0,0,0,0,0,0,0],"FLAG":0,"BASE":54} Moes RF433 2 Gang Switch {"NAME":"WS-EUB2-WR","GPIO":[0,2272,0,2304,0,0,0,0,0,0,0,0,0,0],"FLAG":0,"BASE":54} Moes RF433 3 Gang {"NAME":"WS-EUB3-WR","GPIO":[0,2272,0,2304,0,0,0,0,0,0,0,0,0,0],"FLAG":0,"BASE":54} +Moes RF433 3 Gang Touch {"NAME":"WS-EU-RF","GPIO":[0,2272,0,2304,0,0,0,0,0,0,0,0,0,0],"FLAG":0,"BASE":54,"CMND":"TuyaMCU 11,1 | TuyaMCU 12,2 | TuyaMCU 13,3"} Moes SS01S-1 {"NAME":"Moes Switch","GPIO":[1,1,1,1,320,0,0,0,224,32,1,1,1,0],"FLAG":0,"BASE":18} Moes WS-EU1-LB 1 Gang No Neutral {"NAME":"Moes WS-EU1-LB","GPIO":[0,0,0,0,0,32,0,0,0,0,0,224,544,0],"FLAG":0,"BASE":18} Moes WS-EU2-LW 2 Gang No Neutral {"NAME":"Tuya 2 Channel","GPIO":[0,0,0,0,225,0,0,0,32,224,33,0,544,0],"FLAG":0,"BASE":18} @@ -2080,6 +2145,7 @@ Sesoo WIFI-EU-SK3-02 {"NAME":"Sesoo SK3-02","GPIO":[0,0,321,0,225,0,0,0, Sesoo WIFI-US-SK3-04 {"NAME":"Tuya 4 Channel","GPIO":[288,1,1,34,226,32,0,0,35,227,225,224,33,0],"FLAG":0,"BASE":18} Shawader 1Ch Touch Light {"NAME":"ShawaderTuya1C","GPIO":[0,0,0,0,0,32,0,0,0,0,0,224,288,0],"FLAG":0,"BASE":18} Shawader 2Ch Touch Light {"NAME":"ShawaderTuya2C","GPIO":[0,0,0,0,224,0,0,0,33,225,32,0,288,0],"FLAG":0,"BASE":18} +Shawader 3Ch Touch Light {"NAME":"ShawaderTuya3C","GPIO":[0,3872,0,66,64,65,0,0,225,226,224,0,0,0],"FLAG":0,"BASE":18} SK-A801-01-US 1 Gang {"NAME":"jsankou US Switch 1 Gang","GPIO":[544,0,0,0,0,0,0,0,32,256,0,0,0,0],"FLAG":0,"BASE":18} SK-W803-01-US 3 Gang {"NAME":"jsankou US Switch 3 Gang","GPIO":[544,0,0,33,257,34,0,0,32,256,0,258,0,0],"FLAG":0,"BASE":18} Smartlife Opard CD302 {"NAME":"CD302","GPIO":[0,0,0,0,288,321,0,0,256,32,0,0,0,0],"FLAG":0,"BASE":18} @@ -2106,6 +2172,7 @@ Sonoff TX T1 EU 1 Gang {"NAME":"Sonoff T1 TX 1CH","GPIO":[32,1,1,1,0,0,0,0 Sonoff TX T1 EU 2 Gang {"NAME":"Sonoff T1 TX 2CH","GPIO":[32,1,1,1,0,225,33,0,224,320,0,0,0,0],"FLAG":0,"BASE":29} Sonoff TX T2 EU 1 Gang {"NAME":"Sonoff T2 TX 1CH","GPIO":[32,1,1,1,0,0,0,0,224,320,0,0,0,0],"FLAG":0,"BASE":28} Sonoff TX T2 EU 2 Gang {"NAME":"Sonoff T2 TX 2CH","GPIO":[32,1,1,1,0,225,33,0,224,320,0,0,0,0],"FLAG":0,"BASE":29} +Sonoff TX T2 UK 2 Gang {"NAME":"Sonoff T1 TX 2CH","GPIO":[32,1,1,1,0,225,33,0,224,448,0,0,0,0],"FLAG":0,"BASE":29} Sonoff TX T3 EU 1 Gang {"NAME":"Sonoff T3 TX 1CH","GPIO":[32,1,1,1,0,0,0,0,224,320,0,0,0,0],"FLAG":0,"BASE":28} Sonoff TX T3 EU 2 Gang {"NAME":"Sonoff T3 TX 2CH","GPIO":[32,1,1,1,0,225,33,0,224,320,0,0,0,0],"FLAG":0,"BASE":29} Sonoff TX T3 EU 3 Gang {"NAME":"TX T3EU3C","GPIO":[32,1,0,1,226,225,33,34,224,576,0,0,0,0],"FLAG":0,"BASE":30} @@ -2120,7 +2187,7 @@ SSMS118-01A1 Scene Light Smart {"NAME":"RGB Switch","GPIO":[257,0,259,161,418,4 Steren Apagador {"NAME":"SHOME-115","GPIO":[32,0,0,0,0,0,0,0,224,320,0,0,0,0],"FLAG":0,"BASE":18} Steren Apagador Doble {"NAME":"STEREN SHOME-116","GPIO":[0,0,288,0,0,32,0,0,224,225,0,0,33,0],"FLAG":0,"BASE":18} Steren Apagador Triple {"NAME":"STEREN SHOME-117","GPIO":[0,0,288,0,34,32,0,0,224,225,226,0,33,0],"FLAG":0,"BASE":18} -STITCH {"NAME":"Tuya WF15S ","GPIO":[1,1,0,0,1,1,0,0,1,2304,1,2272,0,0],"FLAG":0,"BASE":54} +STITCH {"NAME":"Tuya WF15S ","GPIO":[0,0,0,0,0,0,0,0,0,2304,0,2272,0,0],"FLAG":0,"BASE":54} TCP Smart 1 Gang {"NAME":"TCP 1 Gang 1 Way","GPIO":[544,0,0,32,224,0,0,0,0,0,320,0,0,0],"FLAG":0,"BASE":18} Teckin 2 Gang {"NAME":"Teckin SR43","GPIO":[0,0,288,0,0,32,0,0,224,225,0,0,33,0],"FLAG":0,"BASE":18} Teckin SR-41 Single Pole {"NAME":"Teckin SR-41","GPIO":[32,0,0,0,0,0,0,0,224,576,0,0,0,0],"FLAG":0,"BASE":18} @@ -2134,10 +2201,10 @@ TopGreener Scene Controller {"NAME":"TGWF15RM","GPIO":[0,2272,0,2304,0,0,0,0,0, TopGreener TGWF15S {"NAME":"TopGreener-Switch","GPIO":[0,0,0,0,0,0,0,0,0,2304,0,2272,0,0],"FLAG":0,"BASE":54} Touch 3 Gang {"NAME":"Switch 3-Gang","GPIO":[0,0,0,0,226,33,0,0,32,224,34,225,544,0],"FLAG":0,"BASE":18} Touch Light Switch 1 Gang {"NAME":"Smart Touch Light Switch ","GPIO":[0,0,0,0,0,32,1,1,0,0,0,224,320,0],"FLAG":0,"BASE":18} +TreatLife {"NAME":"TL SS01S Swtch","GPIO":[0,0,0,0,288,576,0,0,224,32,0,0,0,0],"FLAG":0,"BASE":18} +Treatlife 3-Way {"NAME":"Treatlife SS01 3-Way","GPIO":[0,0,0,0,224,576,0,0,225,33,160,0,0,0],"FLAG":0,"BASE":18} TreatLife 3-Way {"NAME":"Treatlife 3-Way","GPIO":[0,0,0,0,224,576,0,0,225,33,160,0,0,0],"FLAG":0,"BASE":18} -Treatlife SS01 3-Way {"NAME":"Treatlife SS01 3-Way","GPIO":[0,0,0,0,224,576,0,0,225,33,160,0,0,0],"FLAG":0,"BASE":18} -TreatLife SS01S {"NAME":"TL SS01S Swtch","GPIO":[0,0,0,0,288,576,0,0,224,32,0,0,0,0],"FLAG":0,"BASE":18} -TreatLife SS02S {"NAME":"Treatlife SS02","GPIO":[0,0,0,0,288,576,0,0,224,32,0,0,0,0],"FLAG":0,"BASE":18} +TreatLife Single Pole ON/OFF {"NAME":"Treatlife SS02","GPIO":[0,0,0,0,288,576,0,0,224,32,0,0,0,0],"FLAG":0,"BASE":18} Tuya 3 Gang {"NAME":"KING-Tuya-key","GPIO":[0,0,0,0,226,225,0,0,224,32,34,0,33,0],"FLAG":0,"BASE":18} TY-US-L1-W {"NAME":"TY-US-L1-W","GPIO":[0,0,0,0,0,32,0,0,0,224,0,0,576,0],"FLAG":0,"BASE":18} TY-US-L3-W {"NAME":"TY-US-L3-W","GPIO":[0,0,0,0,224,33,0,0,34,226,32,225,576,1],"FLAG":0,"BASE":18} @@ -2148,6 +2215,7 @@ Vaticas 1 {"NAME":"Vaticas","GPIO":[0,0,0,32,224,0,0,0,0,0,28 VHome RF433 1 Gang {"NAME":"VH-TW-CL-01","GPIO":[0,0,0,0,0,32,0,0,0,0,0,224,544,1],"FLAG":0,"BASE":18} VHome RF433 2 Gang {"NAME":"VX-TW-CL-002","GPIO":[0,0,0,0,224,0,0,0,33,225,32,0,544,1],"FLAG":0,"BASE":18} vhome RF433 3 Gang {"NAME":"VH-TB-US-003","GPIO":[0,0,0,0,224,33,0,0,34,226,32,225,576,1],"FLAG":0,"BASE":18} +Virage Labs VirageSwitch Light {"NAME":"VirageSwitch","GPIO":[32,0,0,0,0,0,0,0,224,288,0,0,0,0],"FLAG":0,"BASE":18} Wall Touch Switch 2 Gang {"NAME":"VOVOWAY 120-WIFI-RF 2GANG","GPIO":[0,0,289,0,225,0,0,0,32,224,33,0,288,0],"FLAG":0,"BASE":18} Welaik 2-Gang 1-Way "Not available" WiFi Smart Switch 2 Gang {"NAME":"Kingart N2","GPIO":[32,1,0,1,0,225,33,0,224,0,0,0,0,1],"FLAG":0,"BASE":18} @@ -2178,7 +2246,7 @@ ZUCZUG 3 Gang {"NAME":"2ph105626a x3","GPIO":[0,288,0,32,34,33,0, ``` AGL Modulo Relay 01 Canal {"NAME":"AGL-Basic","GPIO":[0,1,0,0,224,32,0,0,0,0,320,0,0,0],"FLAG":0,"BASE":18} Albohes 2 Channel {"NAME":"Albohes SH-08","GPIO":[0,3200,33,3232,321,320,0,0,224,544,32,0,225,1],"FLAG":0,"BASE":18} -Athom 10A {"NAME":"Athom CB0110A","GPIO":[0,0,0,0,320,0,0,0,224,32,0,0,0,0],"FLAG":0,"BASE":1} +Athom 10A {"NAME":"CB01-TAS-1","GPIO":[0,0,0,32,576,0,0,0,0,224,160,0,0,1],"FLAG":0,"BASE":18} Athom 2Ch Inching/Self-locking {"NAME":"Athom R02","GPIO":[1,1,1,1,225,224,1,1,1,1,1,1,576,0],"FLAG":0,"BASE":18} Athom 3-Way Mini Relay {"NAME":"RS01-TAS-1","GPIO":[0,0,0,32,576,0,0,0,0,224,160,0,0,0],"FLAG":0,"BASE":18} Athom 4Ch Inching/Self-locking 10A {"NAME":"Athom R04","GPIO":[1,1,1,1,32,576,1,1,226,227,225,1,224,0],"FLAG":0,"BASE":18} @@ -2202,6 +2270,7 @@ Ener-J Outdoor Switch {"NAME":"Ener-J Smart WiFi Outdoor Relay","GPIO":[3 eWelink No Neutral {"NAME":"SA-018","GPIO":[0,0,0,0,160,0,0,0,224,288,0,0,0,0],"FLAG":0,"BASE":18} EX Store 2 Kanal V5 {"NAME":"EXS Relay V5","GPIO":[1,1,1,1,1,1,0,0,224,225,258,288,259,0],"FLAG":0,"BASE":16} Geekcreit 2 Channel AC 85V-250V {"NAME":"Geekcreit 2ch","GPIO":[32,0,0,0,0,225,33,0,224,288,0,0,0,4704],"FLAG":0,"BASE":18} +Gosund SW3 {"NAME":"Gosund WP3","GPIO":[0,0,0,32,0,0,0,0,320,321,224,0,0,0],"FLAG":0,"BASE":18} HomeMate 4 Node In-wall {"NAME":"HomeMate Wifi 4N ","GPIO":[1,1,1,160,224,163,1,1,161,225,226,227,162,1],"FLAG":0,"BASE":18} L-5A01 {"NAME":"L-5A01","GPIO":[32,1,0,1,0,0,0,0,224,320,0,0,0,0],"FLAG":0,"BASE":1} LoraTap 10A {"NAME":"LoraTap RR400W","GPIO":[0,0,0,0,544,0,0,0,224,32,0,0,0,0],"FLAG":0,"BASE":18} @@ -2211,17 +2280,20 @@ Luani HVIO {"NAME":"Luani HVIO","GPIO":[0,1,1,1,224,225,0,0,16 Milfra Smart {"NAME":"Milfra Smart Module TB41","GPIO":[576,0,0,225,2688,2656,0,0,2592,193,480,224,192,0],"FLAG":0,"BASE":18} Moes {"NAME":"Moes MS-104B","GPIO":[0,0,32,0,480,0,0,0,161,160,224,225,0,0],"FLAG":0,"BASE":18} Nova Digital Basic 1 MS101 {"NAME":"NovaDigBasic1","GPIO":[0,1,0,1,320,0,0,0,224,32,0,0,0,0],"FLAG":0,"BASE":18} +PPA Contatto Wi-Fi {"NAME":"PPA Contatto","GPIO":[0,0,32,0,224,162,0,0,288,225,0,0,0,0],"FLAG":0,"BASE":18} PS-1604 16A {"NAME":"PS-1604 16A","GPIO":[32,1,1,1,1,0,0,0,224,320,1,0,0,0],"FLAG":0,"BASE":1} QS-WIFI-S03 {"NAME":"QS-WIFI-S03","GPIO":[32,1,1,1,1,0,0,0,192,224,0,0,0,0],"FLAG":0,"BASE":1} QS-WIFI-S05 {"NAME":"QS-WIFI-S05","GPIO":[32,1,1,1,1,0,0,0,192,224,0,0,0,0],"FLAG":0,"BASE":1} Qualitel Breaker {"NAME":"Qualitel Smart Switch","GPIO":[0,0,0,0,224,0,0,0,32,321,288,0,0,0],"FLAG":0,"BASE":18} -Shelly 1 {"NAME":"Shelly 1","GPIO":[0,0,0,0,224,192,0,0,0,0,0,0,0,4736],"FLAG":0,"BASE":46} +Shelly 1 {"NAME":"Shelly 1","GPIO":[1,1,0,1,224,192,0,0,0,0,0,0,0,0],"FLAG":0,"BASE":46} Shelly 1L No Neutral {"NAME":"Shelly 1L","GPIO":[320,0,0,0,192,224,0,0,0,0,193,0,0,4736],"FLAG":0,"BASE":18} Shelly 1PM {"NAME":"Shelly 1PM","GPIO":[320,0,0,0,192,2720,0,0,0,0,0,224,0,4736],"FLAG":0,"BASE":18} Shelly 2 {"NAME":"Shelly 2","GPIO":[0,2752,0,2784,224,225,0,0,160,0,161,2816,0,0],"FLAG":0,"BASE":47} Shelly 2.5 {"NAME":"Shelly 2.5","GPIO":[320,0,32,0,224,193,0,0,640,192,608,225,3456,4736],"FLAG":0,"BASE":18} -Shelly EM {"NAME":"Shelly EM","GPIO":[0,0,0,0,0,0,0,0,640,3456,608,224,0,1],"FLAG":0,"BASE":18} +Shelly EM {"NAME":"Shelly EM","GPIO":[0,0,288,0,32,0,0,0,640,3456,608,224,0,1],"FLAG":0,"BASE":18} Shelly i3 Action and Scenes Activation Device {"NAME":"Shelly i3","GPIO":[0,0,0,0,0,320,0,0,193,194,192,0,0,4736],"FLAG":0,"BASE":18} +Shelly Plus 1 {"NAME":"Shelly Plus 1 ","GPIO":[0,0,0,0,192,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,224,0,0,0,0,0,0,0,0,0,0,0,0,0],"FLAG":0,"BASE":1} +Shelly Plus 1PM {"NAME":"Shelly Plus 1PM","GPIO":[0,0,0,0,192,2720,0,0,0,0,0,0,0,0,2656,0,0,0,0,2624,0,0,224,0,0,0,0,0,0,0,0,0,0,0,0,0],"FLAG":0,"BASE":1} Sinilink USB {"NAME":"XY-WFUSB","GPIO":[1,1,0,1,32,224,0,0,0,0,320,0,544,0],"FLAG":0,"BASE":18} Smart Home SS-8839-01 {"NAME":"SS-8839-01","GPIO":[0,1,0,1,224,0,0,0,32,321,0,320,0,0],"FLAG":0,"BASE":18} Sonoff 4CH (R2) {"NAME":"Sonoff 4CH","GPIO":[32,1,1,1,226,225,33,34,224,320,35,227,0,0],"FLAG":0,"BASE":7} @@ -2237,7 +2309,7 @@ Sonoff Dual R3 {"NAME":"Sonoff Dual R3","GPIO":[32,0,0,0,0,0,0,0,0 Sonoff Dual R3 Lite {"NAME":"Sonoff Dual R3 Lite","GPIO":[32,0,0,0,0,0,0,0,0,576,225,0,0,0,0,0,0,0,0,0,0,0,0,224,0,0,0,0,160,161,0,0,0,0,0,0],"FLAG":0,"BASE":1} Sonoff Dual R3 v2 {"NAME":"Sonoff Dual R3 v2","GPIO":[32,0,0,0,0,0,0,0,0,576,225,0,0,0,0,0,0,0,0,0,0,3200,8128,224,0,0,0,0,160,161,0,0,0,0,0,0],"FLAG":0,"BASE":1} Sonoff Mini {"NAME":"Sonoff Mini","GPIO":[32,0,0,0,160,0,0,0,224,320,0,0,1,0],"FLAG":0,"BASE":1} -Sonoff Mini R2 {"NAME":"Sonoff MINIR2","GPIO":[32,0,0,0,160,0,0,0,224,320,0,0,0,0],"FLAG":0,"BASE":1} +Sonoff Mini R2 {"NAME":"Sonoff MINIR2","GPIO":[32,0,0,0,160,0,0,0,224,544,0,0,0,0],"FLAG":0,"BASE":1} Sonoff Pow {"NAME":"Sonoff Pow","GPIO":[32,0,0,0,0,2592,0,0,224,2656,2688,288,0,0],"FLAG":0,"BASE":6} Sonoff Pow R2 {"NAME":"Sonoff Pow R2","GPIO":[32,3072,0,3104,0,0,0,0,224,320,0,0,0,0],"FLAG":0,"BASE":43} Sonoff POW R3 25A 5500W {"NAME":"Sonoff POWR3","GPIO":[32,3072,0,3104,0,0,0,0,256,320,0,1,1,1],"FLAG":0,"BASE":43} @@ -2252,6 +2324,7 @@ Switch Module 2x5A {"NAME":"QS-WIFI-S04-2C","GPIO":[1,1,32,1,480,0,0,0 Tinxy Single Node 7A {"NAME":"Tnxy07A","GPIO":[32,0,0,0,160,224,0,0,288,0,0,0,0,0],"FLAG":0,"BASE":18} WL-SW01_10 {"NAME":"WL-SW01_10","GPIO":[32,3232,0,3200,0,0,0,0,224,320,0,0,0,0],"FLAG":0,"BASE":1} Woox Integrational Switch {"NAME":"WOOXR4967","GPIO":[0,0,0,1,320,224,0,0,0,32,0,0,0,0],"FLAG":0,"BASE":18} +Yeelight Dual Control {"NAME":"YLAI002","GPIO":[0,0,0,0,0,0,0,0,96,0,224,0,0,320,320,160,0,160,0,0,0,0,0,225,0,0,0,0,162,163,0,0,0,0,0,0],"FLAG":0,"BASE":1,"CMND":"SO127 1"} Yuntong Smart {"NAME":"Yuntong Smart","GPIO":[0,0,0,0,224,0,0,0,96,320,0,576,0,0],"FLAG":0,"BASE":1} Zemismart ERC309 Kinetic {"NAME":"Kinetic Switch","GPIO":[1,1,1,1,1,1,0,0,1,2304,1,2272,1,0],"FLAG":0,"BASE":54} ``` @@ -2267,6 +2340,7 @@ Shelly Add-on {"NAME":"Shelly 1 Temp ","GPIO":[1344,0,0,1312,224, ## Thermostat ``` Floor Heating or Water/Gas Boiler {"NAME":"ME81H Thermostat","GPIO":[1,1,1,1,1,1,0,0,1,1,1,1,1,0],"FLAG":0,"BASE":54} +Mysa V1 Electric Baseboard Heater {"NAME":"Mysa Thermostat","GPIO":[0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,224,0,0,0,0,0,0,640,608,0,0,0,0,0,0],"FLAG":0,"BASE":1} ``` ## Valve @@ -2277,6 +2351,7 @@ Jinvoo SM-AW713 {"NAME":"Jinvoo Valve","GPIO":[0,0,0,0,0,288,0,0,22 Jinvoo SM-PW713 {"NAME":"Jinvoo Valve","GPIO":[0,0,0,0,224,288,0,0,32,289,0,0,0,4704],"FLAG":0,"BASE":18} Moes Gas-Water {"NAME":"MoesHouse WV-B","GPIO":[0,0,0,0,0,0,0,0,32,224,0,0,0,0],"FLAG":0,"BASE":18} Owfeel EN71 {"NAME":"SmartValve","GPIO":[224,0,0,0,0,0,0,0,32,288,0,0,0,0],"FLAG":0,"BASE":18} +Tuya Gas/Water {"NAME":"Valve FM101","GPIO":[320,0,0,0,224,0,0,0,0,0,32,0,225,0],"FLAG":0,"BASE":18} ``` ## Wall Outlet @@ -2290,10 +2365,13 @@ BSEED Smart Socket {"NAME":"BSEED Socket","GPIO":[0,0,0,0,544,288,0,0, CE Smart Home {"NAME":"CE Smart Wall","GPIO":[1,1,1,1,544,32,0,0,224,1,1,1,1,1],"FLAG":0,"BASE":18} CE Smart Home LQ-2-W3 {"NAME":"LITESUN","GPIO":[0,0,0,0,544,32,0,0,224,0,0,0,0,0],"FLAG":0,"BASE":18} ChilITec Pilota Casa IP44 {"NAME":"Outdoor IP44","GPIO":[0,0,0,0,0,224,0,0,0,288,32,0,0,0],"FLAG":0,"BASE":18} +DETA Double GPO + USB {"NAME":"DETA 6920HA","GPIO":[0,0,0,3104,32,288,0,0,33,224,225,0,0,0],"FLAG":0,"BASE":18} Deta Double Power Point {"NAME":"DETA 2G GPO","GPIO":[0,0,0,0,544,0,0,0,65,224,225,0,64,0],"FLAG":0,"BASE":18} +DETA Outdoor Double Powerpoint {"NAME":"DETA 6294HA","GPIO":[0,0,0,3104,32,288,0,0,33,224,225,0,0,0],"FLAG":0,"BASE":18} Deta Single Power Point {"NAME":"DETA 2G GPO USB","GPIO":[0,0,0,2720,64,576,0,0,65,224,225,0,0,0],"FLAG":0,"BASE":18} Ener-J 13A Twin Wall Sockets with USB {"NAME":"Ener-J 2-Gang ","GPIO":[32,0,0,0,0,224,33,0,225,320,0,0,0,0],"FLAG":0,"BASE":18} Gosund {"NAME":"Gosund WO1","GPIO":[320,0,576,0,2656,2720,0,0,2624,321,225,224,0,4704],"FLAG":0,"BASE":18} +Hevolta Glasense {"NAME":"Hevolta Socket","GPIO":[0,0,0,0,288,289,0,0,224,32,0,0,0,0],"FLAG":0,"BASE":18} Kapok T16 {"NAME":"tiltech-t16","GPIO":[0,320,0,32,192,0,0,0,224,225,0,0,0,0],"FLAG":0,"BASE":18} Kesen KS-604 {"NAME":"KS-604","GPIO":[1,1,288,1,1,33,0,0,225,224,1,1,32,0],"FLAG":0,"BASE":18} Kesen KS-604S {"NAME":"KS-604S","GPIO":[1,1,258,1,1,33,0,0,225,224,1,1,32,4704],"FLAG":0,"BASE":18} @@ -2302,18 +2380,21 @@ KS-621 {"NAME":"KS-621","GPIO":[32,0,0,0,2688,2656,0,0,259 Makegood MG-AUWF01 {"NAME":"MG-AUWF01","GPIO":[320,161,544,323,2720,2656,0,0,2624,225,321,224,160,0],"FLAG":0,"BASE":18} Makegood MG-UKWSG01 {"NAME":"Aseer 2-Gang","GPIO":[321,160,544,323,2720,2656,0,0,2624,224,320,225,161,0],"FLAG":0,"BASE":18} Makegood MG-UKWSW/B {"NAME":"Aseer 1-Gang","GPIO":[320,0,544,321,2720,2656,0,0,2624,0,0,224,160,0],"FLAG":0,"BASE":18} +Master Contacto WiFi de pared {"NAME":"Master_IOT-WLSOCKET","GPIO":[32,0,0,0,0,225,33,0,224,320,0,0,0,0],"FLAG":0,"BASE":18} Moes WWK Glass Panel {"NAME":"Smart Socket","GPIO":[0,0,0,0,288,289,0,0,224,32,0,0,0,0],"FLAG":0,"BASE":18} Oittm 120 {"NAME":"Oittm WS01","GPIO":[32,0,0,0,0,2592,0,0,224,2656,2688,288,0,0],"FLAG":0,"BASE":18} PS-1607 {"NAME":"PS-1607","GPIO":[32,0,0,0,0,225,33,0,224,0,0,0,0,0],"FLAG":0,"BASE":18} Smanergy KA10 {"NAME":"KA10","GPIO":[0,320,0,32,2720,2656,0,0,2624,289,224,0,0,0],"FLAG":0,"BASE":64} Sonoff IW100 {"NAME":"Sonoff IW100","GPIO":[32,3072,0,3104,0,0,0,0,224,544,0,0,0,0],"FLAG":0,"BASE":41} Sonoff S55 {"NAME":"Sonoff S55","GPIO":[32,1,0,1,1,0,0,0,224,320,0,0,0,0],"FLAG":0,"BASE":1} +Steren Dual Plug and USB Charger {"NAME":"Steren_SHOME-118","GPIO":[0,576,0,32,33,288,0,0,224,225,289,0,0,0],"FLAG":0,"BASE":18} T16E Dual USB 10A {"NAME":"T16E 10A","GPIO":[0,0,0,32,2720,2656,0,0,2624,320,224,0,0,0],"FLAG":0,"BASE":18} TCP Smart Dual {"NAME":"TCP TAUWIS2GUK","GPIO":[33,0,0,0,0,224,32,0,225,544,0,0,0,0],"FLAG":0,"BASE":18} Teckin SR40 {"NAME":"RF-SR40-US","GPIO":[576,0,0,32,320,33,0,0,225,224,321,226,0,0],"FLAG":0,"BASE":18} TopGreener Dual USB {"NAME":"TGWF215U2A","GPIO":[0,320,0,32,2720,2656,0,0,2624,225,224,321,0,0],"FLAG":0,"BASE":18} TopGreener TGWF15RM {"NAME":"TGWF15RM","GPIO":[0,320,0,32,2720,2656,0,0,2624,321,224,0,0,0],"FLAG":0,"BASE":55} Vigica VGSPK00815 {"NAME":"VIGICA outlet","GPIO":[32,1,1,1,1,225,33,1,224,1,1,1,1,4704],"FLAG":0,"BASE":18} +Virage Labs ViragePlug {"NAME":"ViragePlug","GPIO":[544,0,0,32,320,33,0,0,225,224,320,226,0,0],"FLAG":0,"BASE":18} Woox Dual {"NAME":"Woox R4053","GPIO":[33,0,0,0,0,224,32,0,225,320,0,0,0,0],"FLAG":0,"BASE":18} Xenon 2AC 1USB {"NAME":"Xenon SM-PW801-U1","GPIO":[0,0,0,0,288,32,0,0,224,0,225,0,226,0],"FLAG":0,"BASE":18} ``` diff --git a/lib/lib_audio/ESP8266Audio/src/AudioFileSourceICYStream.cpp b/lib/lib_audio/ESP8266Audio/src/AudioFileSourceICYStream.cpp index 63c84f328..bbc348d53 100644 --- a/lib/lib_audio/ESP8266Audio/src/AudioFileSourceICYStream.cpp +++ b/lib/lib_audio/ESP8266Audio/src/AudioFileSourceICYStream.cpp @@ -20,7 +20,9 @@ #if defined(ESP32) || defined(ESP8266) -#define _GNU_SOURCE +#ifndef _GNU_SOURCE + #define _GNU_SOURCE +#endif #include "AudioFileSourceICYStream.h" #include diff --git a/lib/lib_audio/ESP8266Audio/src/libflac/config.h b/lib/lib_audio/ESP8266Audio/src/libflac/config.h index cf6c07dfe..b0aebe44d 100644 --- a/lib/lib_audio/ESP8266Audio/src/libflac/config.h +++ b/lib/lib_audio/ESP8266Audio/src/libflac/config.h @@ -3,7 +3,9 @@ #ifdef DEBUG #undef NDEBUG #else - #define NDEBUG + #ifndef NDEBUG + #define NDEBUG + #endif #endif /* config.h. Generated from config.h.in by configure. */ diff --git a/lib/lib_display/Adafruit-GFX-Library-1.5.6-gemu-1.0/Adafruit_GFX.cpp b/lib/lib_display/Adafruit-GFX-Library-1.5.6-gemu-1.0/Adafruit_GFX.cpp index 5e88150cc..398dba0df 100644 --- a/lib/lib_display/Adafruit-GFX-Library-1.5.6-gemu-1.0/Adafruit_GFX.cpp +++ b/lib/lib_display/Adafruit-GFX-Library-1.5.6-gemu-1.0/Adafruit_GFX.cpp @@ -1610,10 +1610,12 @@ void Adafruit_GFX_Button::drawButton(boolean inverted) { text = _fillcolor; } + #if defined USE_UFILESYS if (_label[0]=='/') { draw_picture(_label, _x1, _y1, _w, _h, outline, inverted); _gfx->drawRect(_x1, _y1, _w, _h, text); } else { + #endif uint8_t r = min(_w, _h) / 4; // Corner radius _gfx->fillRoundRect(_x1, _y1, _w, _h, r, fill); _gfx->drawRoundRect(_x1, _y1, _w, _h, r, outline); @@ -1622,7 +1624,9 @@ void Adafruit_GFX_Button::drawButton(boolean inverted) { _gfx->setTextColor(text); _gfx->setTextSize(_textsize_x, _textsize_y); _gfx->print(_label); + #if defined USE_UFILESYS } + #endif } /**************************************************************************/ diff --git a/lib/lib_display/UDisplay/uDisplay.cpp b/lib/lib_display/UDisplay/uDisplay.cpp index 6f48d5796..8414795e0 100755 --- a/lib/lib_display/UDisplay/uDisplay.cpp +++ b/lib/lib_display/UDisplay/uDisplay.cpp @@ -76,6 +76,9 @@ uDisplay::uDisplay(char *lp) : Renderer(800, 600) { uint8_t section = 0; dsp_ncmds = 0; lut_num = 0; + lvgl_param.data = 0; + lvgl_param.fluslines = 40; + for (uint32_t cnt = 0; cnt < 5; cnt++) { lut_cnt[cnt] = 0; lut_cmd[cnt] = 0xff; diff --git a/lib/libesp32/Berry/default/be_driverlib.c b/lib/libesp32/Berry/default/be_driverlib.c deleted file mode 100644 index 13f1d211e..000000000 --- a/lib/libesp32/Berry/default/be_driverlib.c +++ /dev/null @@ -1,153 +0,0 @@ -/******************************************************************** - * Tasmota lib - * - * To use: `d = Driver()` - * - *******************************************************************/ -#include "be_constobj.h" - -/******************************************************************** -** Solidified function: init -********************************************************************/ -be_local_closure(init, /* name */ - be_nested_proto( - 1, /* nstack */ - 1, /* argc */ - 0, /* varg */ - 0, /* has upvals */ - NULL, /* no upvals */ - 0, /* has sup protos */ - NULL, /* no sub protos */ - 0, /* has constants */ - NULL, /* no const */ - ((bstring*) &be_const_str_init), - ((bstring*) &be_const_str_input), - ( &(const binstruction[ 1]) { /* code */ - 0x80000000, // 0000 RET 0 - }) - ) -); -/*******************************************************************/ - - -/******************************************************************** -** Solidified function: get_tasmota -********************************************************************/ -be_local_closure(get_tasmota, /* name */ - be_nested_proto( - 2, /* nstack */ - 1, /* argc */ - 0, /* varg */ - 0, /* has upvals */ - NULL, /* no upvals */ - 0, /* has sup protos */ - NULL, /* no sub protos */ - 1, /* has constants */ - ( &(const bvalue[ 1]) { /* constants */ - /* K0 */ be_nested_string("tasmota", 424643812, 7), - }), - (be_nested_const_str("get_tasmota", 334356779, 11)), - ((bstring*) &be_const_str_input), - ( &(const binstruction[ 2]) { /* code */ - 0xB8060000, // 0000 GETNGBL R1 K0 - 0x80040200, // 0001 RET 1 R1 - }) - ) -); -/*******************************************************************/ - - -/******************************************************************** -** Solidified function: add_cmd -********************************************************************/ -be_local_closure(add_cmd, /* name */ - be_nested_proto( - 7, /* nstack */ - 3, /* argc */ - 0, /* varg */ - 0, /* has upvals */ - NULL, /* no upvals */ - 1, /* has sup protos */ - ( &(const struct bproto*[ 1]) { - be_nested_proto( - 10, /* nstack */ - 4, /* argc */ - 0, /* varg */ - 1, /* has upvals */ - ( &(const bupvaldesc[ 2]) { /* upvals */ - be_local_const_upval(1, 2), - be_local_const_upval(1, 0), - }), - 0, /* has sup protos */ - NULL, /* no sub protos */ - 0, /* has constants */ - NULL, /* no const */ - (be_nested_const_str("", 607256038, 8)), - ((bstring*) &be_const_str_input), - ( &(const binstruction[ 8]) { /* code */ - 0x68100000, // 0000 GETUPV R4 U0 - 0x68140001, // 0001 GETUPV R5 U1 - 0x5C180000, // 0002 MOVE R6 R0 - 0x5C1C0200, // 0003 MOVE R7 R1 - 0x5C200400, // 0004 MOVE R8 R2 - 0x5C240600, // 0005 MOVE R9 R3 - 0x7C100A00, // 0006 CALL R4 5 - 0x80040800, // 0007 RET 1 R4 - }) - ), - }), - 1, /* has constants */ - ( &(const bvalue[ 2]) { /* constants */ - /* K0 */ be_nested_string("tasmota", 424643812, 7), - /* K1 */ be_nested_string("add_cmd", -933336417, 7), - }), - (be_nested_const_str("add_cmd", -933336417, 7)), - ((bstring*) &be_const_str_input), - ( &(const binstruction[ 7]) { /* code */ - 0xB80E0000, // 0000 GETNGBL R3 K0 - 0x8C0C0701, // 0001 GETMET R3 R3 K1 - 0x5C140200, // 0002 MOVE R5 R1 - 0x84180000, // 0003 CLOSURE R6 P0 - 0x7C0C0600, // 0004 CALL R3 3 - 0xA0000000, // 0005 CLOSE R0 - 0x80000000, // 0006 RET 0 - }) - ) -); -/*******************************************************************/ - - -/******************************************************************** -** Solidified class: Driver -********************************************************************/ -be_local_class(Driver, - 13, - NULL, - be_nested_map(16, - ( (struct bmapnode*) &(const bmapnode[]) { - { be_nested_key("web_add_main_button", -334599632, 19, 14), be_const_var(4) }, - { be_nested_key("web_add_console_button", -813531104, 22, -1), be_const_var(7) }, - { be_nested_key("web_add_management_button", -1556090110, 25, 8), be_const_var(5) }, - { be_nested_key("init", 380752755, 4, -1), be_const_closure(init_closure) }, - { be_nested_key("json_append", -1292948012, 11, -1), be_const_var(10) }, - { be_nested_key("web_add_config_button", 639674325, 21, 7), be_const_var(6) }, - { be_nested_key("every_100ms", 1546407804, 11, -1), be_const_var(1) }, - { be_nested_key("display", 1164572437, 7, -1), be_const_var(12) }, - { be_nested_key("web_add_button", -757092238, 14, 13), be_const_var(3) }, - { be_nested_key("every_second", 2075451465, 12, -1), be_const_var(0) }, - { be_nested_key("save_before_restart", 1253239338, 19, -1), be_const_var(8) }, - { be_nested_key("get_tasmota", 334356779, 11, -1), be_const_closure(get_tasmota_closure) }, - { be_nested_key("web_sensor", -1394870324, 10, 6), be_const_var(9) }, - { be_nested_key("web_add_handler", -304792334, 15, -1), be_const_var(2) }, - { be_nested_key("button_pressed", 1694209616, 14, 1), be_const_var(11) }, - { be_nested_key("add_cmd", -933336417, 7, -1), be_const_closure(add_cmd_closure) }, - })), - (be_nested_const_str("Driver", -718580993, 6)) -); -/*******************************************************************/ - -void be_load_Driver_class(bvm *vm) { - be_pushntvclass(vm, &be_class_Driver); - be_setglobal(vm, "Driver"); - be_pop(vm, 1); -} diff --git a/lib/libesp32/Berry/default/be_md5_lib.c b/lib/libesp32/Berry/default/be_md5_lib.c deleted file mode 100644 index 2c8dfd77b..000000000 --- a/lib/libesp32/Berry/default/be_md5_lib.c +++ /dev/null @@ -1,30 +0,0 @@ -/******************************************************************** - * Berry module `webserver` - * - * To use: `import webserver` - * - * Allows to respond to HTTP request - *******************************************************************/ -#include "be_constobj.h" - -extern int m_md5_init(bvm *vm); -extern int m_md5_update(bvm *vm); -extern int m_md5_finish(bvm *vm); - -#include "../generate/be_fixed_be_class_md5.h" - -void be_load_md5_lib(bvm *vm) { - be_pushntvclass(vm, &be_class_md5); - be_setglobal(vm, "MD5"); - be_pop(vm, 1); -} -/* @const_object_info_begin - -class be_class_md5 (scope: global, name: MD5) { - .p, var - - init, func(m_md5_init) - update, func(m_md5_update) - finish, func(m_md5_finish) -} -@const_object_info_end */ diff --git a/lib/libesp32/Berry/generate/be_const_strtab.h b/lib/libesp32/Berry/generate/be_const_strtab.h deleted file mode 100644 index daeb099fd..000000000 --- a/lib/libesp32/Berry/generate/be_const_strtab.h +++ /dev/null @@ -1,351 +0,0 @@ -extern const bcstring be_const_str_SERIAL_6N2; -extern const bcstring be_const_str__begin_transmission; -extern const bcstring be_const_str_set_light; -extern const bcstring be_const_str_time_reached; -extern const bcstring be_const_str_SERIAL_5E2; -extern const bcstring be_const_str___lower__; -extern const bcstring be_const_str_SERIAL_7O1; -extern const bcstring be_const_str_getbits; -extern const bcstring be_const_str_input; -extern const bcstring be_const_str_dot_size; -extern const bcstring be_const_str_publish_result; -extern const bcstring be_const_str_web_send_decimal; -extern const bcstring be_const_str_def; -extern const bcstring be_const_str__cmd; -extern const bcstring be_const_str_begin; -extern const bcstring be_const_str_resp_cmnd; -extern const bcstring be_const_str_assert; -extern const bcstring be_const_str_set; -extern const bcstring be_const_str_tag; -extern const bcstring be_const_str_check_privileged_access; -extern const bcstring be_const_str_kv; -extern const bcstring be_const_str_publish; -extern const bcstring be_const_str_read32; -extern const bcstring be_const_str_load; -extern const bcstring be_const_str_read13; -extern const bcstring be_const_str_search; -extern const bcstring be_const_str_dac_voltage; -extern const bcstring be_const_str_finish; -extern const bcstring be_const_str_hex; -extern const bcstring be_const_str_isinstance; -extern const bcstring be_const_str_rand; -extern const bcstring be_const_str_POST; -extern const bcstring be_const_str_SERIAL_6E2; -extern const bcstring be_const_str_classname; -extern const bcstring be_const_str__global_def; -extern const bcstring be_const_str_open; -extern const bcstring be_const_str_redirect; -extern const bcstring be_const_str_AES_GCM; -extern const bcstring be_const_str_resp_cmnd_failed; -extern const bcstring be_const_str_reverse_gamma10; -extern const bcstring be_const_str_strftime; -extern const bcstring be_const_str_insert; -extern const bcstring be_const_str_false; -extern const bcstring be_const_str_arg_size; -extern const bcstring be_const_str_serial; -extern const bcstring be_const_str_OneWire; -extern const bcstring be_const_str_scale_uint; -extern const bcstring be_const_str_return; -extern const bcstring be_const_str_wire; -extern const bcstring be_const_str_write_bytes; -extern const bcstring be_const_str__global_addr; -extern const bcstring be_const_str_exec_tele; -extern const bcstring be_const_str_target_search; -extern const bcstring be_const_str_gamma8; -extern const bcstring be_const_str_pi; -extern const bcstring be_const_str_state; -extern const bcstring be_const_str_depower; -extern const bcstring be_const_str_init; -extern const bcstring be_const_str_member; -extern const bcstring be_const_str__end_transmission; -extern const bcstring be_const_str_digital_read; -extern const bcstring be_const_str_imin; -extern const bcstring be_const_str_hs2rgb; -extern const bcstring be_const_str_keys; -extern const bcstring be_const_str_real; -extern const bcstring be_const_str_sin; -extern const bcstring be_const_str_SERIAL_7N1; -extern const bcstring be_const_str_ctypes_bytes; -extern const bcstring be_const_str_ctypes_bytes_dyn; -extern const bcstring be_const_str_raise; -extern const bcstring be_const_str_GET; -extern const bcstring be_const_str__settings_def; -extern const bcstring be_const_str_read24; -extern const bcstring be_const_str_cos; -extern const bcstring be_const_str_remove_driver; -extern const bcstring be_const_str__settings_ptr; -extern const bcstring be_const_str_memory; -extern const bcstring be_const_str_set_auth; -extern const bcstring be_const_str_content_send_style; -extern const bcstring be_const_str_class; -extern const bcstring be_const_str_SERIAL_7E2; -extern const bcstring be_const_str_shared_key; -extern const bcstring be_const_str_tanh; -extern const bcstring be_const_str_nil; -extern const bcstring be_const_str_get_power; -extern const bcstring be_const_str_last_modified; -extern const bcstring be_const_str_resolvecmnd; -extern const bcstring be_const_str__read; -extern const bcstring be_const_str_atan; -extern const bcstring be_const_str_content_button; -extern const bcstring be_const_str_setbits; -extern const bcstring be_const_str_upper; -extern const bcstring be_const_str_contains; -extern const bcstring be_const_str_time_str; -extern const bcstring be_const_str_arch; -extern const bcstring be_const_str_fromptr; -extern const bcstring be_const_str_push; -extern const bcstring be_const_str_srand; -extern const bcstring be_const_str_geti; -extern const bcstring be_const_str_seti; -extern const bcstring be_const_str_add_cmd; -extern const bcstring be_const_str_cmd; -extern const bcstring be_const_str_get_switch; -extern const bcstring be_const_str_size; -extern const bcstring be_const_str_try; -extern const bcstring be_const_str_web_send; -extern const bcstring be_const_str_except; -extern const bcstring be_const_str_SERIAL_5O1; -extern const bcstring be_const_str_SERIAL_8E2; -extern const bcstring be_const_str__available; -extern const bcstring be_const_str_codedump; -extern const bcstring be_const_str_wire2; -extern const bcstring be_const_str_dump; -extern const bcstring be_const_str_exec_cmd; -extern const bcstring be_const_str_add; -extern const bcstring be_const_str_exp; -extern const bcstring be_const_str_isrunning; -extern const bcstring be_const_str_remove_rule; -extern const bcstring be_const_str_run_deferred; -extern const bcstring be_const_str_scan; -extern const bcstring be_const_str_for; -extern const bcstring be_const_str_set_timer; -extern const bcstring be_const_str_url_encode; -extern const bcstring be_const_str_addr; -extern const bcstring be_const_str___upper__; -extern const bcstring be_const_str_loop; -extern const bcstring be_const_str_AudioGeneratorWAV; -extern const bcstring be_const_str_chars_in_string; -extern const bcstring be_const_str_cosh; -extern const bcstring be_const_str_import; -extern const bcstring be_const_str_SERIAL_5N2; -extern const bcstring be_const_str_type; -extern const bcstring be_const_str_clear; -extern const bcstring be_const_str_SERIAL_8N1; -extern const bcstring be_const_str_issubclass; -extern const bcstring be_const_str_remove_timer; -extern const bcstring be_const_str_sinh; -extern const bcstring be_const_str_AudioGeneratorMP3; -extern const bcstring be_const_str_Wire; -extern const bcstring be_const_str_get_light; -extern const bcstring be_const_str_get_option; -extern const bcstring be_const_str_list; -extern const bcstring be_const_str_stop; -extern const bcstring be_const_str_try_rule; -extern const bcstring be_const_str_webclient; -extern const bcstring be_const_str_dot_p2; -extern const bcstring be_const_str_has; -extern const bcstring be_const_str__request_from; -extern const bcstring be_const_str_setrange; -extern const bcstring be_const_str_I2C_Driver; -extern const bcstring be_const_str_ceil; -extern const bcstring be_const_str_else; -extern const bcstring be_const_str_concat; -extern const bcstring be_const_str_set_power; -extern const bcstring be_const_str_tomap; -extern const bcstring be_const_str_resp_cmnd_error; -extern const bcstring be_const_str_add_header; -extern const bcstring be_const_str_eth; -extern const bcstring be_const_str_write_bit; -extern const bcstring be_const_str_exists; -extern const bcstring be_const_str_pow; -extern const bcstring be_const_str_select; -extern const bcstring be_const_str_allocated; -extern const bcstring be_const_str_classof; -extern const bcstring be_const_str_if; -extern const bcstring be_const_str_SERIAL_5E1; -extern const bcstring be_const_str_arg; -extern const bcstring be_const_str_cb_dispatch; -extern const bcstring be_const_str_response_append; -extern const bcstring be_const_str_pin_used; -extern const bcstring be_const_str_write; -extern const bcstring be_const_str_write8; -extern const bcstring be_const_str_SERIAL_6O2; -extern const bcstring be_const_str_log; -extern const bcstring be_const_str_pin_mode; -extern const bcstring be_const_str_read12; -extern const bcstring be_const_str_resp_cmnd_str; -extern const bcstring be_const_str_abs; -extern const bcstring be_const_str_digital_write; -extern const bcstring be_const_str_static; -extern const bcstring be_const_str_bytes; -extern const bcstring be_const_str_find_op; -extern const bcstring be_const_str_call; -extern const bcstring be_const_str_cmd_res; -extern const bcstring be_const_str_opt_eq; -extern const bcstring be_const_str_save; -extern const bcstring be_const_str_find_key_i; -extern const bcstring be_const_str__cb; -extern const bcstring be_const_str_Tasmota; -extern const bcstring be_const_str_public_key; -extern const bcstring be_const_str_as; -extern const bcstring be_const_str_dot_w; -extern const bcstring be_const_str_SERIAL_8O1; -extern const bcstring be_const_str_compile; -extern const bcstring be_const_str_range; -extern const bcstring be_const_str_add_rule; -extern const bcstring be_const_str__ptr; -extern const bcstring be_const_str_delay; -extern const bcstring be_const_str_pop; -extern const bcstring be_const_str_reset; -extern const bcstring be_const_str_wire_scan; -extern const bcstring be_const_str_reset_search; -extern const bcstring be_const_str_tolower; -extern const bcstring be_const_str_SERIAL_7O2; -extern const bcstring be_const_str_asin; -extern const bcstring be_const_str_nan; -extern const bcstring be_const_str_deg; -extern const bcstring be_const_str_log10; -extern const bcstring be_const_str_char; -extern const bcstring be_const_str_get_size; -extern const bcstring be_const_str_opt_call; -extern const bcstring be_const_str_end; -extern const bcstring be_const_str_SERIAL_7N2; -extern const bcstring be_const_str_time_dump; -extern const bcstring be_const_str_listdir; -extern const bcstring be_const_str_wifi; -extern const bcstring be_const_str_read_bytes; -extern const bcstring be_const_str_reverse; -extern const bcstring be_const_str_SERIAL_6E1; -extern const bcstring be_const_str_SERIAL_5O2; -extern const bcstring be_const_str_SERIAL_8E1; -extern const bcstring be_const_str_asstring; -extern const bcstring be_const_str_deinit; -extern const bcstring be_const_str_encrypt; -extern const bcstring be_const_str_iter; -extern const bcstring be_const_str_millis; -extern const bcstring be_const_str_AudioOutput; -extern const bcstring be_const_str_members; -extern const bcstring be_const_str_rtc; -extern const bcstring be_const_str_SERIAL_6N1; -extern const bcstring be_const_str__write; -extern const bcstring be_const_str_content_start; -extern const bcstring be_const_str_module; -extern const bcstring be_const_str_item; -extern const bcstring be_const_str_remove_cmd; -extern const bcstring be_const_str_MD5; -extern const bcstring be_const_str_sqrt; -extern const bcstring be_const_str_SERIAL_5N1; -extern const bcstring be_const_str_break; -extern const bcstring be_const_str_map; -extern const bcstring be_const_str_setmember; -extern const bcstring be_const_str_tostring; -extern const bcstring be_const_str_AudioGenerator; -extern const bcstring be_const_str_while; -extern const bcstring be_const_str_event; -extern const bcstring be_const_str_resp_cmnd_done; -extern const bcstring be_const_str_AudioOutputI2S; -extern const bcstring be_const_str_has_arg; -extern const bcstring be_const_str_bool; -extern const bcstring be_const_str_floor; -extern const bcstring be_const_str_read; -extern const bcstring be_const_str_remove; -extern const bcstring be_const_str_calldepth; -extern const bcstring be_const_str_lower; -extern const bcstring be_const_str_path; -extern const bcstring be_const_str_gamma10; -extern const bcstring be_const_str_get; -extern const bcstring be_const_str_elif; -extern const bcstring be_const_str__buffer; -extern const bcstring be_const_str_exec_rules; -extern const bcstring be_const_str_pin; -extern const bcstring be_const_str_collect; -extern const bcstring be_const_str_enabled; -extern const bcstring be_const_str_global; -extern const bcstring be_const_str_acos; -extern const bcstring be_const_str_content_stop; -extern const bcstring be_const_str_read8; -extern const bcstring be_const_str_wire1; -extern const bcstring be_const_str_fromstring; -extern const bcstring be_const_str_setitem; -extern const bcstring be_const_str__debug_present; -extern const bcstring be_const_str_erase; -extern const bcstring be_const_str_i2c_enabled; -extern const bcstring be_const_str_resize; -extern const bcstring be_const_str_decrypt; -extern const bcstring be_const_str_escape; -extern const bcstring be_const_str_isnan; -extern const bcstring be_const_str_skip; -extern const bcstring be_const_str_var; -extern const bcstring be_const_str_dot_p; -extern const bcstring be_const_str_write_file; -extern const bcstring be_const_str_copy; -extern const bcstring be_const_str_str; -extern const bcstring be_const_str_super; -extern const bcstring be_const_str_update; -extern const bcstring be_const_str__def; -extern const bcstring be_const_str__drivers; -extern const bcstring be_const_str_imax; -extern const bcstring be_const_str_add_driver; -extern const bcstring be_const_str_dot_len; -extern const bcstring be_const_str_SERIAL_6O1; -extern const bcstring be_const_str_attrdump; -extern const bcstring be_const_str_on; -extern const bcstring be_const_str_rad; -extern const bcstring be_const_str_bus; -extern const bcstring be_const_str_yield; -extern const bcstring be_const_str_top; -extern const bcstring be_const_str_get_string; -extern const bcstring be_const_str_read_sensors; -extern const bcstring be_const_str_settings; -extern const bcstring be_const_str__get_cb; -extern const bcstring be_const_str_int; -extern const bcstring be_const_str_opt_neq; -extern const bcstring be_const_str_gen_cb; -extern const bcstring be_const_str__timers; -extern const bcstring be_const_str_continue; -extern const bcstring be_const_str_SERIAL_7E1; -extern const bcstring be_const_str_AudioFileSource; -extern const bcstring be_const_str_format; -extern const bcstring be_const_str_EC_C25519; -extern const bcstring be_const_str_close; -extern const bcstring be_const_str_content_flush; -extern const bcstring be_const_str_reduce; -extern const bcstring be_const_str_tr; -extern const bcstring be_const_str_available; -extern const bcstring be_const_str_traceback; -extern const bcstring be_const_str_opt_add; -extern const bcstring be_const_str_SERIAL_8N2; -extern const bcstring be_const_str_wd; -extern const bcstring be_const_str___iterator__; -extern const bcstring be_const_str_fromb64; -extern const bcstring be_const_str_number; -extern const bcstring be_const_str_print; -extern const bcstring be_const_str_set_useragent; -extern const bcstring be_const_str_tan; -extern const bcstring be_const_str_do; -extern const bcstring be_const_str_; -extern const bcstring be_const_str_opt_connect; -extern const bcstring be_const_str__rules; -extern const bcstring be_const_str_dot_p1; -extern const bcstring be_const_str_find; -extern const bcstring be_const_str_name; -extern const bcstring be_const_str_toptr; -extern const bcstring be_const_str_arg_name; -extern const bcstring be_const_str_byte; -extern const bcstring be_const_str_gc; -extern const bcstring be_const_str_count; -extern const bcstring be_const_str_counters; -extern const bcstring be_const_str_tob64; -extern const bcstring be_const_str_AudioFileSourceFS; -extern const bcstring be_const_str_get_free_heap; -extern const bcstring be_const_str_atan2; -extern const bcstring be_const_str_set_timeouts; -extern const bcstring be_const_str_toupper; -extern const bcstring be_const_str__ccmd; -extern const bcstring be_const_str_content_send; -extern const bcstring be_const_str_flush; -extern const bcstring be_const_str_true; -extern const bcstring be_const_str_detect; -extern const bcstring be_const_str_SERIAL_8O2; -extern const bcstring be_const_str_split; diff --git a/lib/libesp32/Berry/generate/be_const_strtab_def.h b/lib/libesp32/Berry/generate/be_const_strtab_def.h deleted file mode 100644 index 5b49d263b..000000000 --- a/lib/libesp32/Berry/generate/be_const_strtab_def.h +++ /dev/null @@ -1,524 +0,0 @@ -be_define_const_str(SERIAL_6N2, "SERIAL_6N2", 148562844u, 0, 10, &be_const_str__begin_transmission); -be_define_const_str(_begin_transmission, "_begin_transmission", 2779461176u, 0, 19, &be_const_str_set_light); -be_define_const_str(set_light, "set_light", 3176076152u, 0, 9, NULL); -be_define_const_str(time_reached, "time_reached", 2075136773u, 0, 12, NULL); -be_define_const_str(SERIAL_5E2, "SERIAL_5E2", 1180552854u, 0, 10, &be_const_str___lower__); -be_define_const_str(__lower__, "__lower__", 123855590u, 0, 9, NULL); -be_define_const_str(SERIAL_7O1, "SERIAL_7O1", 1823802675u, 0, 10, &be_const_str_getbits); -be_define_const_str(getbits, "getbits", 3094168979u, 0, 7, &be_const_str_input); -be_define_const_str(input, "input", 4191711099u, 0, 5, NULL); -be_define_const_str(dot_size, ".size", 1965188224u, 0, 5, &be_const_str_publish_result); -be_define_const_str(publish_result, "publish_result", 2013351252u, 0, 14, &be_const_str_web_send_decimal); -be_define_const_str(web_send_decimal, "web_send_decimal", 1407210204u, 0, 16, &be_const_str_def); -be_define_const_str(def, "def", 3310976652u, 55, 3, NULL); -be_define_const_str(_cmd, "_cmd", 3419822142u, 0, 4, &be_const_str_begin); -be_define_const_str(begin, "begin", 1748273790u, 0, 5, &be_const_str_resp_cmnd); -be_define_const_str(resp_cmnd, "resp_cmnd", 2869459626u, 0, 9, NULL); -be_define_const_str(assert, "assert", 2774883451u, 0, 6, &be_const_str_set); -be_define_const_str(set, "set", 3324446467u, 0, 3, &be_const_str_tag); -be_define_const_str(tag, "tag", 2516003219u, 0, 3, NULL); -be_define_const_str(check_privileged_access, "check_privileged_access", 3692933968u, 0, 23, &be_const_str_kv); -be_define_const_str(kv, "kv", 1497177492u, 0, 2, &be_const_str_publish); -be_define_const_str(publish, "publish", 264247304u, 0, 7, &be_const_str_read32); -be_define_const_str(read32, "read32", 1741276240u, 0, 6, NULL); -be_define_const_str(load, "load", 3859241449u, 0, 4, &be_const_str_read13); -be_define_const_str(read13, "read13", 12887293u, 0, 6, &be_const_str_search); -be_define_const_str(search, "search", 2150836393u, 0, 6, NULL); -be_define_const_str(dac_voltage, "dac_voltage", 1552257222u, 0, 11, &be_const_str_finish); -be_define_const_str(finish, "finish", 1494643858u, 0, 6, &be_const_str_hex); -be_define_const_str(hex, "hex", 4273249610u, 0, 3, &be_const_str_isinstance); -be_define_const_str(isinstance, "isinstance", 3669352738u, 0, 10, &be_const_str_rand); -be_define_const_str(rand, "rand", 2711325910u, 0, 4, NULL); -be_define_const_str(POST, "POST", 1929554311u, 0, 4, &be_const_str_SERIAL_6E2); -be_define_const_str(SERIAL_6E2, "SERIAL_6E2", 317471867u, 0, 10, NULL); -be_define_const_str(classname, "classname", 1998589948u, 0, 9, NULL); -be_define_const_str(_global_def, "_global_def", 646007001u, 0, 11, &be_const_str_open); -be_define_const_str(open, "open", 3546203337u, 0, 4, &be_const_str_redirect); -be_define_const_str(redirect, "redirect", 389758641u, 0, 8, NULL); -be_define_const_str(AES_GCM, "AES_GCM", 3832208678u, 0, 7, &be_const_str_resp_cmnd_failed); -be_define_const_str(resp_cmnd_failed, "resp_cmnd_failed", 2136281562u, 0, 16, &be_const_str_reverse_gamma10); -be_define_const_str(reverse_gamma10, "reverse_gamma10", 739112262u, 0, 15, NULL); -be_define_const_str(strftime, "strftime", 187738851u, 0, 8, NULL); -be_define_const_str(insert, "insert", 3332609576u, 0, 6, &be_const_str_false); -be_define_const_str(false, "false", 184981848u, 62, 5, NULL); -be_define_const_str(arg_size, "arg_size", 3310243257u, 0, 8, &be_const_str_serial); -be_define_const_str(serial, "serial", 3687697785u, 0, 6, NULL); -be_define_const_str(OneWire, "OneWire", 2298990722u, 0, 7, &be_const_str_scale_uint); -be_define_const_str(scale_uint, "scale_uint", 3090811094u, 0, 10, NULL); -be_define_const_str(return, "return", 2246981567u, 60, 6, NULL); -be_define_const_str(wire, "wire", 4082753944u, 0, 4, &be_const_str_write_bytes); -be_define_const_str(write_bytes, "write_bytes", 1227543792u, 0, 11, NULL); -be_define_const_str(_global_addr, "_global_addr", 533766721u, 0, 12, &be_const_str_exec_tele); -be_define_const_str(exec_tele, "exec_tele", 1020751601u, 0, 9, &be_const_str_target_search); -be_define_const_str(target_search, "target_search", 1947846553u, 0, 13, NULL); -be_define_const_str(gamma8, "gamma8", 3802843830u, 0, 6, &be_const_str_pi); -be_define_const_str(pi, "pi", 1213090802u, 0, 2, &be_const_str_state); -be_define_const_str(state, "state", 2016490230u, 0, 5, NULL); -be_define_const_str(depower, "depower", 3563819571u, 0, 7, &be_const_str_init); -be_define_const_str(init, "init", 380752755u, 0, 4, &be_const_str_member); -be_define_const_str(member, "member", 719708611u, 0, 6, NULL); -be_define_const_str(_end_transmission, "_end_transmission", 3237480400u, 0, 17, &be_const_str_digital_read); -be_define_const_str(digital_read, "digital_read", 3585496928u, 0, 12, &be_const_str_imin); -be_define_const_str(imin, "imin", 2714127864u, 0, 4, NULL); -be_define_const_str(hs2rgb, "hs2rgb", 1040816349u, 0, 6, &be_const_str_keys); -be_define_const_str(keys, "keys", 4182378701u, 0, 4, &be_const_str_real); -be_define_const_str(real, "real", 3604983901u, 0, 4, &be_const_str_sin); -be_define_const_str(sin, "sin", 3761252941u, 0, 3, NULL); -be_define_const_str(SERIAL_7N1, "SERIAL_7N1", 1891060246u, 0, 10, NULL); -be_define_const_str(ctypes_bytes, "ctypes_bytes", 3879019703u, 0, 12, &be_const_str_ctypes_bytes_dyn); -be_define_const_str(ctypes_bytes_dyn, "ctypes_bytes_dyn", 915205307u, 0, 16, &be_const_str_raise); -be_define_const_str(raise, "raise", 1593437475u, 70, 5, NULL); -be_define_const_str(GET, "GET", 2531704439u, 0, 3, &be_const_str__settings_def); -be_define_const_str(_settings_def, "_settings_def", 3775560307u, 0, 13, &be_const_str_read24); -be_define_const_str(read24, "read24", 1808533811u, 0, 6, NULL); -be_define_const_str(cos, "cos", 4220379804u, 0, 3, &be_const_str_remove_driver); -be_define_const_str(remove_driver, "remove_driver", 1030243768u, 0, 13, NULL); -be_define_const_str(_settings_ptr, "_settings_ptr", 1825772182u, 0, 13, &be_const_str_memory); -be_define_const_str(memory, "memory", 2229924270u, 0, 6, &be_const_str_set_auth); -be_define_const_str(set_auth, "set_auth", 1057170930u, 0, 8, NULL); -be_define_const_str(content_send_style, "content_send_style", 1087907647u, 0, 18, &be_const_str_class); -be_define_const_str(class, "class", 2872970239u, 57, 5, NULL); -be_define_const_str(SERIAL_7E2, "SERIAL_7E2", 97385204u, 0, 10, &be_const_str_shared_key); -be_define_const_str(shared_key, "shared_key", 2200833624u, 0, 10, &be_const_str_tanh); -be_define_const_str(tanh, "tanh", 153638352u, 0, 4, &be_const_str_nil); -be_define_const_str(nil, "nil", 228849900u, 63, 3, NULL); -be_define_const_str(get_power, "get_power", 3009799377u, 0, 9, &be_const_str_last_modified); -be_define_const_str(last_modified, "last_modified", 772177145u, 0, 13, &be_const_str_resolvecmnd); -be_define_const_str(resolvecmnd, "resolvecmnd", 993361485u, 0, 11, NULL); -be_define_const_str(_read, "_read", 346717030u, 0, 5, NULL); -be_define_const_str(atan, "atan", 108579519u, 0, 4, &be_const_str_content_button); -be_define_const_str(content_button, "content_button", 1956476087u, 0, 14, &be_const_str_setbits); -be_define_const_str(setbits, "setbits", 2762408167u, 0, 7, &be_const_str_upper); -be_define_const_str(upper, "upper", 176974407u, 0, 5, NULL); -be_define_const_str(contains, "contains", 1825239352u, 0, 8, &be_const_str_time_str); -be_define_const_str(time_str, "time_str", 2613827612u, 0, 8, NULL); -be_define_const_str(arch, "arch", 2952804297u, 0, 4, &be_const_str_fromptr); -be_define_const_str(fromptr, "fromptr", 666189689u, 0, 7, &be_const_str_push); -be_define_const_str(push, "push", 2272264157u, 0, 4, &be_const_str_srand); -be_define_const_str(srand, "srand", 465518633u, 0, 5, NULL); -be_define_const_str(geti, "geti", 2381006490u, 0, 4, &be_const_str_seti); -be_define_const_str(seti, "seti", 1500556254u, 0, 4, NULL); -be_define_const_str(add_cmd, "add_cmd", 3361630879u, 0, 7, &be_const_str_cmd); -be_define_const_str(cmd, "cmd", 4136785899u, 0, 3, NULL); -be_define_const_str(get_switch, "get_switch", 164821028u, 0, 10, &be_const_str_size); -be_define_const_str(size, "size", 597743964u, 0, 4, NULL); -be_define_const_str(try, "try", 2887626766u, 68, 3, NULL); -be_define_const_str(web_send, "web_send", 2989941448u, 0, 8, &be_const_str_except); -be_define_const_str(except, "except", 950914032u, 69, 6, NULL); -be_define_const_str(SERIAL_5O1, "SERIAL_5O1", 3782657917u, 0, 10, &be_const_str_SERIAL_8E2); -be_define_const_str(SERIAL_8E2, "SERIAL_8E2", 2421454473u, 0, 10, &be_const_str__available); -be_define_const_str(_available, "_available", 1306196581u, 0, 10, NULL); -be_define_const_str(codedump, "codedump", 1786337906u, 0, 8, &be_const_str_wire2); -be_define_const_str(wire2, "wire2", 3229499038u, 0, 5, NULL); -be_define_const_str(dump, "dump", 3663001223u, 0, 4, &be_const_str_exec_cmd); -be_define_const_str(exec_cmd, "exec_cmd", 493567399u, 0, 8, NULL); -be_define_const_str(add, "add", 993596020u, 0, 3, &be_const_str_exp); -be_define_const_str(exp, "exp", 1923516200u, 0, 3, &be_const_str_isrunning); -be_define_const_str(isrunning, "isrunning", 1688182268u, 0, 9, &be_const_str_remove_rule); -be_define_const_str(remove_rule, "remove_rule", 3456211328u, 0, 11, &be_const_str_run_deferred); -be_define_const_str(run_deferred, "run_deferred", 371594696u, 0, 12, &be_const_str_scan); -be_define_const_str(scan, "scan", 3974641896u, 0, 4, &be_const_str_for); -be_define_const_str(for, "for", 2901640080u, 54, 3, NULL); -be_define_const_str(set_timer, "set_timer", 2135414533u, 0, 9, &be_const_str_url_encode); -be_define_const_str(url_encode, "url_encode", 528392145u, 0, 10, NULL); -be_define_const_str(addr, "addr", 1087856498u, 0, 4, NULL); -be_define_const_str(__upper__, "__upper__", 3612202883u, 0, 9, &be_const_str_loop); -be_define_const_str(loop, "loop", 3723446379u, 0, 4, NULL); -be_define_const_str(AudioGeneratorWAV, "AudioGeneratorWAV", 2746509368u, 0, 17, &be_const_str_chars_in_string); -be_define_const_str(chars_in_string, "chars_in_string", 3148785132u, 0, 15, &be_const_str_cosh); -be_define_const_str(cosh, "cosh", 4099687964u, 0, 4, &be_const_str_import); -be_define_const_str(import, "import", 288002260u, 66, 6, NULL); -be_define_const_str(SERIAL_5N2, "SERIAL_5N2", 3363364537u, 0, 10, &be_const_str_type); -be_define_const_str(type, "type", 1361572173u, 0, 4, NULL); -be_define_const_str(clear, "clear", 1550717474u, 0, 5, NULL); -be_define_const_str(SERIAL_8N1, "SERIAL_8N1", 2369297235u, 0, 10, &be_const_str_issubclass); -be_define_const_str(issubclass, "issubclass", 4078395519u, 0, 10, &be_const_str_remove_timer); -be_define_const_str(remove_timer, "remove_timer", 4141472215u, 0, 12, &be_const_str_sinh); -be_define_const_str(sinh, "sinh", 282220607u, 0, 4, NULL); -be_define_const_str(AudioGeneratorMP3, "AudioGeneratorMP3", 2199818488u, 0, 17, &be_const_str_Wire); -be_define_const_str(Wire, "Wire", 1938276536u, 0, 4, &be_const_str_get_light); -be_define_const_str(get_light, "get_light", 381930476u, 0, 9, NULL); -be_define_const_str(get_option, "get_option", 2123730033u, 0, 10, &be_const_str_list); -be_define_const_str(list, "list", 217798785u, 0, 4, &be_const_str_stop); -be_define_const_str(stop, "stop", 3411225317u, 0, 4, &be_const_str_try_rule); -be_define_const_str(try_rule, "try_rule", 1986449405u, 0, 8, NULL); -be_define_const_str(webclient, "webclient", 4076389146u, 0, 9, NULL); -be_define_const_str(dot_p2, ".p2", 232398067u, 0, 3, &be_const_str_has); -be_define_const_str(has, "has", 3988721635u, 0, 3, NULL); -be_define_const_str(_request_from, "_request_from", 3965148604u, 0, 13, &be_const_str_setrange); -be_define_const_str(setrange, "setrange", 3794019032u, 0, 8, NULL); -be_define_const_str(I2C_Driver, "I2C_Driver", 1714501658u, 0, 10, NULL); -be_define_const_str(ceil, "ceil", 1659167240u, 0, 4, &be_const_str_else); -be_define_const_str(else, "else", 3183434736u, 52, 4, NULL); -be_define_const_str(concat, "concat", 4124019837u, 0, 6, &be_const_str_set_power); -be_define_const_str(set_power, "set_power", 549820893u, 0, 9, NULL); -be_define_const_str(tomap, "tomap", 612167626u, 0, 5, NULL); -be_define_const_str(resp_cmnd_error, "resp_cmnd_error", 2404088863u, 0, 15, NULL); -be_define_const_str(add_header, "add_header", 927130612u, 0, 10, &be_const_str_eth); -be_define_const_str(eth, "eth", 2191266556u, 0, 3, &be_const_str_write_bit); -be_define_const_str(write_bit, "write_bit", 2660990436u, 0, 9, NULL); -be_define_const_str(exists, "exists", 1002329533u, 0, 6, &be_const_str_pow); -be_define_const_str(pow, "pow", 1479764693u, 0, 3, &be_const_str_select); -be_define_const_str(select, "select", 297952813u, 0, 6, NULL); -be_define_const_str(allocated, "allocated", 429986098u, 0, 9, &be_const_str_classof); -be_define_const_str(classof, "classof", 1796577762u, 0, 7, &be_const_str_if); -be_define_const_str(if, "if", 959999494u, 50, 2, NULL); -be_define_const_str(SERIAL_5E1, "SERIAL_5E1", 1163775235u, 0, 10, &be_const_str_arg); -be_define_const_str(arg, "arg", 1047474471u, 0, 3, &be_const_str_cb_dispatch); -be_define_const_str(cb_dispatch, "cb_dispatch", 1741510499u, 0, 11, &be_const_str_response_append); -be_define_const_str(response_append, "response_append", 450346371u, 0, 15, NULL); -be_define_const_str(pin_used, "pin_used", 4033854612u, 0, 8, &be_const_str_write); -be_define_const_str(write, "write", 3190202204u, 0, 5, &be_const_str_write8); -be_define_const_str(write8, "write8", 3133991532u, 0, 6, NULL); -be_define_const_str(SERIAL_6O2, "SERIAL_6O2", 316486129u, 0, 10, &be_const_str_log); -be_define_const_str(log, "log", 1062293841u, 0, 3, NULL); -be_define_const_str(pin_mode, "pin_mode", 3258314030u, 0, 8, &be_const_str_read12); -be_define_const_str(read12, "read12", 4291076970u, 0, 6, &be_const_str_resp_cmnd_str); -be_define_const_str(resp_cmnd_str, "resp_cmnd_str", 737845590u, 0, 13, NULL); -be_define_const_str(abs, "abs", 709362235u, 0, 3, &be_const_str_digital_write); -be_define_const_str(digital_write, "digital_write", 3435877979u, 0, 13, &be_const_str_static); -be_define_const_str(static, "static", 3532702267u, 71, 6, NULL); -be_define_const_str(bytes, "bytes", 1706151940u, 0, 5, &be_const_str_find_op); -be_define_const_str(find_op, "find_op", 3766713376u, 0, 7, NULL); -be_define_const_str(call, "call", 3018949801u, 0, 4, NULL); -be_define_const_str(cmd_res, "cmd_res", 921166762u, 0, 7, NULL); -be_define_const_str(opt_eq, "==", 2431966415u, 0, 2, NULL); -be_define_const_str(save, "save", 3439296072u, 0, 4, NULL); -be_define_const_str(find_key_i, "find_key_i", 850136726u, 0, 10, NULL); -be_define_const_str(_cb, "_cb", 4043300367u, 0, 3, NULL); -be_define_const_str(Tasmota, "Tasmota", 4047617668u, 0, 7, &be_const_str_public_key); -be_define_const_str(public_key, "public_key", 4169142980u, 0, 10, NULL); -be_define_const_str(as, "as", 1579491469u, 67, 2, NULL); -be_define_const_str(dot_w, ".w", 1255414514u, 0, 2, &be_const_str_SERIAL_8O1); -be_define_const_str(SERIAL_8O1, "SERIAL_8O1", 289122742u, 0, 10, &be_const_str_compile); -be_define_const_str(compile, "compile", 1000265118u, 0, 7, &be_const_str_range); -be_define_const_str(range, "range", 4208725202u, 0, 5, NULL); -be_define_const_str(add_rule, "add_rule", 596540743u, 0, 8, NULL); -be_define_const_str(_ptr, "_ptr", 306235816u, 0, 4, &be_const_str_delay); -be_define_const_str(delay, "delay", 1322381784u, 0, 5, &be_const_str_pop); -be_define_const_str(pop, "pop", 1362321360u, 0, 3, &be_const_str_reset); -be_define_const_str(reset, "reset", 1695364032u, 0, 5, &be_const_str_wire_scan); -be_define_const_str(wire_scan, "wire_scan", 2671275880u, 0, 9, NULL); -be_define_const_str(reset_search, "reset_search", 1350414305u, 0, 12, &be_const_str_tolower); -be_define_const_str(tolower, "tolower", 1042520049u, 0, 7, NULL); -be_define_const_str(SERIAL_7O2, "SERIAL_7O2", 1840580294u, 0, 10, &be_const_str_asin); -be_define_const_str(asin, "asin", 4272848550u, 0, 4, &be_const_str_nan); -be_define_const_str(nan, "nan", 797905850u, 0, 3, NULL); -be_define_const_str(deg, "deg", 3327754271u, 0, 3, NULL); -be_define_const_str(log10, "log10", 2346846000u, 0, 5, NULL); -be_define_const_str(char, "char", 2823553821u, 0, 4, &be_const_str_get_size); -be_define_const_str(get_size, "get_size", 2803644713u, 0, 8, NULL); -be_define_const_str(opt_call, "()", 685372826u, 0, 2, &be_const_str_end); -be_define_const_str(end, "end", 1787721130u, 56, 3, NULL); -be_define_const_str(SERIAL_7N2, "SERIAL_7N2", 1874282627u, 0, 10, &be_const_str_time_dump); -be_define_const_str(time_dump, "time_dump", 3330410747u, 0, 9, NULL); -be_define_const_str(listdir, "listdir", 2005220720u, 0, 7, &be_const_str_wifi); -be_define_const_str(wifi, "wifi", 120087624u, 0, 4, NULL); -be_define_const_str(read_bytes, "read_bytes", 3576733173u, 0, 10, &be_const_str_reverse); -be_define_const_str(reverse, "reverse", 558918661u, 0, 7, NULL); -be_define_const_str(SERIAL_6E1, "SERIAL_6E1", 334249486u, 0, 10, NULL); -be_define_const_str(SERIAL_5O2, "SERIAL_5O2", 3732325060u, 0, 10, &be_const_str_SERIAL_8E1); -be_define_const_str(SERIAL_8E1, "SERIAL_8E1", 2371121616u, 0, 10, &be_const_str_asstring); -be_define_const_str(asstring, "asstring", 1298225088u, 0, 8, &be_const_str_deinit); -be_define_const_str(deinit, "deinit", 2345559592u, 0, 6, NULL); -be_define_const_str(encrypt, "encrypt", 2194327650u, 0, 7, NULL); -be_define_const_str(iter, "iter", 3124256359u, 0, 4, &be_const_str_millis); -be_define_const_str(millis, "millis", 1214679063u, 0, 6, NULL); -be_define_const_str(AudioOutput, "AudioOutput", 3257792048u, 0, 11, &be_const_str_members); -be_define_const_str(members, "members", 937576464u, 0, 7, &be_const_str_rtc); -be_define_const_str(rtc, "rtc", 1070575216u, 0, 3, NULL); -be_define_const_str(SERIAL_6N1, "SERIAL_6N1", 198895701u, 0, 10, &be_const_str__write); -be_define_const_str(_write, "_write", 2215462825u, 0, 6, &be_const_str_content_start); -be_define_const_str(content_start, "content_start", 2937509069u, 0, 13, &be_const_str_module); -be_define_const_str(module, "module", 3617558685u, 0, 6, NULL); -be_define_const_str(item, "item", 2671260646u, 0, 4, &be_const_str_remove_cmd); -be_define_const_str(remove_cmd, "remove_cmd", 3832315702u, 0, 10, NULL); -be_define_const_str(MD5, "MD5", 1935726387u, 0, 3, &be_const_str_sqrt); -be_define_const_str(sqrt, "sqrt", 2112764879u, 0, 4, NULL); -be_define_const_str(SERIAL_5N1, "SERIAL_5N1", 3313031680u, 0, 10, &be_const_str_break); -be_define_const_str(break, "break", 3378807160u, 58, 5, NULL); -be_define_const_str(map, "map", 3751997361u, 0, 3, &be_const_str_setmember); -be_define_const_str(setmember, "setmember", 1432909441u, 0, 9, &be_const_str_tostring); -be_define_const_str(tostring, "tostring", 2299708645u, 0, 8, NULL); -be_define_const_str(AudioGenerator, "AudioGenerator", 1839297342u, 0, 14, &be_const_str_while); -be_define_const_str(while, "while", 231090382u, 53, 5, NULL); -be_define_const_str(event, "event", 4264611999u, 0, 5, &be_const_str_resp_cmnd_done); -be_define_const_str(resp_cmnd_done, "resp_cmnd_done", 2601874875u, 0, 14, NULL); -be_define_const_str(AudioOutputI2S, "AudioOutputI2S", 638031784u, 0, 14, &be_const_str_has_arg); -be_define_const_str(has_arg, "has_arg", 424878688u, 0, 7, NULL); -be_define_const_str(bool, "bool", 3365180733u, 0, 4, &be_const_str_floor); -be_define_const_str(floor, "floor", 3102149661u, 0, 5, &be_const_str_read); -be_define_const_str(read, "read", 3470762949u, 0, 4, &be_const_str_remove); -be_define_const_str(remove, "remove", 3683784189u, 0, 6, NULL); -be_define_const_str(calldepth, "calldepth", 3122364302u, 0, 9, &be_const_str_lower); -be_define_const_str(lower, "lower", 3038577850u, 0, 5, &be_const_str_path); -be_define_const_str(path, "path", 2223459638u, 0, 4, NULL); -be_define_const_str(gamma10, "gamma10", 3472052483u, 0, 7, &be_const_str_get); -be_define_const_str(get, "get", 1410115415u, 0, 3, &be_const_str_elif); -be_define_const_str(elif, "elif", 3232090307u, 51, 4, NULL); -be_define_const_str(_buffer, "_buffer", 2044888568u, 0, 7, &be_const_str_exec_rules); -be_define_const_str(exec_rules, "exec_rules", 1445221092u, 0, 10, &be_const_str_pin); -be_define_const_str(pin, "pin", 1866532500u, 0, 3, NULL); -be_define_const_str(collect, "collect", 2399039025u, 0, 7, NULL); -be_define_const_str(enabled, "enabled", 49525662u, 0, 7, &be_const_str_global); -be_define_const_str(global, "global", 503252654u, 0, 6, NULL); -be_define_const_str(acos, "acos", 1006755615u, 0, 4, &be_const_str_content_stop); -be_define_const_str(content_stop, "content_stop", 658554751u, 0, 12, &be_const_str_read8); -be_define_const_str(read8, "read8", 2802788167u, 0, 5, &be_const_str_wire1); -be_define_const_str(wire1, "wire1", 3212721419u, 0, 5, NULL); -be_define_const_str(fromstring, "fromstring", 610302344u, 0, 10, &be_const_str_setitem); -be_define_const_str(setitem, "setitem", 1554834596u, 0, 7, NULL); -be_define_const_str(_debug_present, "_debug_present", 4063411725u, 0, 14, &be_const_str_erase); -be_define_const_str(erase, "erase", 1010949589u, 0, 5, &be_const_str_i2c_enabled); -be_define_const_str(i2c_enabled, "i2c_enabled", 218388101u, 0, 11, &be_const_str_resize); -be_define_const_str(resize, "resize", 3514612129u, 0, 6, NULL); -be_define_const_str(decrypt, "decrypt", 2886974618u, 0, 7, &be_const_str_escape); -be_define_const_str(escape, "escape", 2652972038u, 0, 6, &be_const_str_isnan); -be_define_const_str(isnan, "isnan", 2981347434u, 0, 5, &be_const_str_skip); -be_define_const_str(skip, "skip", 1097563074u, 0, 4, &be_const_str_var); -be_define_const_str(var, "var", 2317739966u, 64, 3, NULL); -be_define_const_str(dot_p, ".p", 1171526419u, 0, 2, &be_const_str_write_file); -be_define_const_str(write_file, "write_file", 3177658879u, 0, 10, NULL); -be_define_const_str(copy, "copy", 3848464964u, 0, 4, &be_const_str_str); -be_define_const_str(str, "str", 3259748752u, 0, 3, &be_const_str_super); -be_define_const_str(super, "super", 4152230356u, 0, 5, &be_const_str_update); -be_define_const_str(update, "update", 672109684u, 0, 6, NULL); -be_define_const_str(_def, "_def", 1985022181u, 0, 4, &be_const_str__drivers); -be_define_const_str(_drivers, "_drivers", 3260328985u, 0, 8, NULL); -be_define_const_str(imax, "imax", 3084515410u, 0, 4, NULL); -be_define_const_str(add_driver, "add_driver", 1654458371u, 0, 10, NULL); -be_define_const_str(dot_len, ".len", 850842136u, 0, 4, &be_const_str_SERIAL_6O1); -be_define_const_str(SERIAL_6O1, "SERIAL_6O1", 266153272u, 0, 10, &be_const_str_attrdump); -be_define_const_str(attrdump, "attrdump", 1521571304u, 0, 8, &be_const_str_on); -be_define_const_str(on, "on", 1630810064u, 0, 2, &be_const_str_rad); -be_define_const_str(rad, "rad", 1358899048u, 0, 3, NULL); -be_define_const_str(bus, "bus", 1607822841u, 0, 3, NULL); -be_define_const_str(yield, "yield", 1821831854u, 0, 5, NULL); -be_define_const_str(top, "top", 2802900028u, 0, 3, NULL); -be_define_const_str(get_string, "get_string", 4195847969u, 0, 10, &be_const_str_read_sensors); -be_define_const_str(read_sensors, "read_sensors", 892689201u, 0, 12, NULL); -be_define_const_str(settings, "settings", 1745255176u, 0, 8, NULL); -be_define_const_str(_get_cb, "_get_cb", 1448849122u, 0, 7, &be_const_str_int); -be_define_const_str(int, "int", 2515107422u, 0, 3, NULL); -be_define_const_str(opt_neq, "!=", 2428715011u, 0, 2, &be_const_str_gen_cb); -be_define_const_str(gen_cb, "gen_cb", 3245227551u, 0, 6, NULL); -be_define_const_str(_timers, "_timers", 2600100916u, 0, 7, &be_const_str_continue); -be_define_const_str(continue, "continue", 2977070660u, 59, 8, NULL); -be_define_const_str(SERIAL_7E1, "SERIAL_7E1", 147718061u, 0, 10, NULL); -be_define_const_str(AudioFileSource, "AudioFileSource", 2959980058u, 0, 15, &be_const_str_format); -be_define_const_str(format, "format", 3114108242u, 0, 6, NULL); -be_define_const_str(EC_C25519, "EC_C25519", 95492591u, 0, 9, &be_const_str_close); -be_define_const_str(close, "close", 667630371u, 0, 5, &be_const_str_content_flush); -be_define_const_str(content_flush, "content_flush", 214922475u, 0, 13, &be_const_str_reduce); -be_define_const_str(reduce, "reduce", 2002030311u, 0, 6, &be_const_str_tr); -be_define_const_str(tr, "tr", 1195724803u, 0, 2, NULL); -be_define_const_str(available, "available", 1727918744u, 0, 9, NULL); -be_define_const_str(traceback, "traceback", 3385188109u, 0, 9, NULL); -be_define_const_str(opt_add, "+", 772578730u, 0, 1, &be_const_str_SERIAL_8N2); -be_define_const_str(SERIAL_8N2, "SERIAL_8N2", 2386074854u, 0, 10, &be_const_str_wd); -be_define_const_str(wd, "wd", 1531424278u, 0, 2, NULL); -be_define_const_str(__iterator__, "__iterator__", 3884039703u, 0, 12, &be_const_str_fromb64); -be_define_const_str(fromb64, "fromb64", 2717019639u, 0, 7, NULL); -be_define_const_str(number, "number", 467038368u, 0, 6, &be_const_str_print); -be_define_const_str(print, "print", 372738696u, 0, 5, &be_const_str_set_useragent); -be_define_const_str(set_useragent, "set_useragent", 612237244u, 0, 13, &be_const_str_tan); -be_define_const_str(tan, "tan", 2633446552u, 0, 3, &be_const_str_do); -be_define_const_str(do, "do", 1646057492u, 65, 2, NULL); -be_define_const_str(, "", 2166136261u, 0, 0, &be_const_str_opt_connect); -be_define_const_str(opt_connect, "..", 2748622605u, 0, 2, &be_const_str__rules); -be_define_const_str(_rules, "_rules", 4266217105u, 0, 6, NULL); -be_define_const_str(dot_p1, ".p1", 249175686u, 0, 3, &be_const_str_find); -be_define_const_str(find, "find", 3186656602u, 0, 4, &be_const_str_name); -be_define_const_str(name, "name", 2369371622u, 0, 4, &be_const_str_toptr); -be_define_const_str(toptr, "toptr", 3379847454u, 0, 5, NULL); -be_define_const_str(arg_name, "arg_name", 1345046155u, 0, 8, &be_const_str_byte); -be_define_const_str(byte, "byte", 1683620383u, 0, 4, &be_const_str_gc); -be_define_const_str(gc, "gc", 1042313471u, 0, 2, NULL); -be_define_const_str(count, "count", 967958004u, 0, 5, &be_const_str_counters); -be_define_const_str(counters, "counters", 4095866864u, 0, 8, &be_const_str_tob64); -be_define_const_str(tob64, "tob64", 373777640u, 0, 5, NULL); -be_define_const_str(AudioFileSourceFS, "AudioFileSourceFS", 1839147653u, 0, 17, &be_const_str_get_free_heap); -be_define_const_str(get_free_heap, "get_free_heap", 625069757u, 0, 13, NULL); -be_define_const_str(atan2, "atan2", 3173440503u, 0, 5, NULL); -be_define_const_str(set_timeouts, "set_timeouts", 3732850900u, 0, 12, &be_const_str_toupper); -be_define_const_str(toupper, "toupper", 3691983576u, 0, 7, NULL); -be_define_const_str(_ccmd, "_ccmd", 2163421413u, 0, 5, &be_const_str_content_send); -be_define_const_str(content_send, "content_send", 1673733649u, 0, 12, &be_const_str_flush); -be_define_const_str(flush, "flush", 3002334877u, 0, 5, &be_const_str_true); -be_define_const_str(true, "true", 1303515621u, 61, 4, NULL); -be_define_const_str(detect, "detect", 8884370u, 0, 6, NULL); -be_define_const_str(SERIAL_8O2, "SERIAL_8O2", 272345123u, 0, 10, &be_const_str_split); -be_define_const_str(split, "split", 2276994531u, 0, 5, NULL); - -static const bstring* const m_string_table[] = { - (const bstring *)&be_const_str_SERIAL_6N2, - (const bstring *)&be_const_str_time_reached, - (const bstring *)&be_const_str_SERIAL_5E2, - (const bstring *)&be_const_str_SERIAL_7O1, - (const bstring *)&be_const_str_dot_size, - NULL, - (const bstring *)&be_const_str__cmd, - (const bstring *)&be_const_str_assert, - (const bstring *)&be_const_str_check_privileged_access, - (const bstring *)&be_const_str_load, - (const bstring *)&be_const_str_dac_voltage, - (const bstring *)&be_const_str_POST, - (const bstring *)&be_const_str_classname, - (const bstring *)&be_const_str__global_def, - (const bstring *)&be_const_str_AES_GCM, - (const bstring *)&be_const_str_strftime, - (const bstring *)&be_const_str_insert, - (const bstring *)&be_const_str_arg_size, - (const bstring *)&be_const_str_OneWire, - (const bstring *)&be_const_str_return, - (const bstring *)&be_const_str_wire, - (const bstring *)&be_const_str__global_addr, - (const bstring *)&be_const_str_gamma8, - (const bstring *)&be_const_str_depower, - (const bstring *)&be_const_str__end_transmission, - (const bstring *)&be_const_str_hs2rgb, - (const bstring *)&be_const_str_SERIAL_7N1, - (const bstring *)&be_const_str_ctypes_bytes, - NULL, - NULL, - NULL, - (const bstring *)&be_const_str_GET, - (const bstring *)&be_const_str_cos, - NULL, - (const bstring *)&be_const_str__settings_ptr, - (const bstring *)&be_const_str_content_send_style, - (const bstring *)&be_const_str_SERIAL_7E2, - (const bstring *)&be_const_str_get_power, - (const bstring *)&be_const_str__read, - (const bstring *)&be_const_str_atan, - (const bstring *)&be_const_str_contains, - (const bstring *)&be_const_str_arch, - (const bstring *)&be_const_str_geti, - (const bstring *)&be_const_str_add_cmd, - (const bstring *)&be_const_str_get_switch, - NULL, - (const bstring *)&be_const_str_try, - NULL, - (const bstring *)&be_const_str_web_send, - (const bstring *)&be_const_str_SERIAL_5O1, - (const bstring *)&be_const_str_codedump, - (const bstring *)&be_const_str_dump, - (const bstring *)&be_const_str_add, - (const bstring *)&be_const_str_set_timer, - (const bstring *)&be_const_str_addr, - (const bstring *)&be_const_str___upper__, - (const bstring *)&be_const_str_AudioGeneratorWAV, - (const bstring *)&be_const_str_SERIAL_5N2, - (const bstring *)&be_const_str_clear, - (const bstring *)&be_const_str_SERIAL_8N1, - (const bstring *)&be_const_str_AudioGeneratorMP3, - (const bstring *)&be_const_str_get_option, - (const bstring *)&be_const_str_webclient, - (const bstring *)&be_const_str_dot_p2, - (const bstring *)&be_const_str__request_from, - NULL, - (const bstring *)&be_const_str_I2C_Driver, - NULL, - (const bstring *)&be_const_str_ceil, - (const bstring *)&be_const_str_concat, - (const bstring *)&be_const_str_tomap, - (const bstring *)&be_const_str_resp_cmnd_error, - (const bstring *)&be_const_str_add_header, - (const bstring *)&be_const_str_exists, - (const bstring *)&be_const_str_allocated, - (const bstring *)&be_const_str_SERIAL_5E1, - (const bstring *)&be_const_str_pin_used, - (const bstring *)&be_const_str_SERIAL_6O2, - (const bstring *)&be_const_str_pin_mode, - (const bstring *)&be_const_str_abs, - (const bstring *)&be_const_str_bytes, - (const bstring *)&be_const_str_call, - (const bstring *)&be_const_str_cmd_res, - (const bstring *)&be_const_str_opt_eq, - (const bstring *)&be_const_str_save, - NULL, - (const bstring *)&be_const_str_find_key_i, - (const bstring *)&be_const_str__cb, - (const bstring *)&be_const_str_Tasmota, - (const bstring *)&be_const_str_as, - (const bstring *)&be_const_str_dot_w, - (const bstring *)&be_const_str_add_rule, - (const bstring *)&be_const_str__ptr, - (const bstring *)&be_const_str_reset_search, - (const bstring *)&be_const_str_SERIAL_7O2, - (const bstring *)&be_const_str_deg, - (const bstring *)&be_const_str_log10, - (const bstring *)&be_const_str_char, - (const bstring *)&be_const_str_opt_call, - (const bstring *)&be_const_str_SERIAL_7N2, - (const bstring *)&be_const_str_listdir, - (const bstring *)&be_const_str_read_bytes, - (const bstring *)&be_const_str_SERIAL_6E1, - NULL, - (const bstring *)&be_const_str_SERIAL_5O2, - NULL, - (const bstring *)&be_const_str_encrypt, - (const bstring *)&be_const_str_iter, - (const bstring *)&be_const_str_AudioOutput, - (const bstring *)&be_const_str_SERIAL_6N1, - (const bstring *)&be_const_str_item, - (const bstring *)&be_const_str_MD5, - (const bstring *)&be_const_str_SERIAL_5N1, - (const bstring *)&be_const_str_map, - (const bstring *)&be_const_str_AudioGenerator, - (const bstring *)&be_const_str_event, - (const bstring *)&be_const_str_AudioOutputI2S, - (const bstring *)&be_const_str_bool, - (const bstring *)&be_const_str_calldepth, - (const bstring *)&be_const_str_gamma10, - (const bstring *)&be_const_str__buffer, - (const bstring *)&be_const_str_collect, - (const bstring *)&be_const_str_enabled, - (const bstring *)&be_const_str_acos, - (const bstring *)&be_const_str_fromstring, - (const bstring *)&be_const_str__debug_present, - (const bstring *)&be_const_str_decrypt, - (const bstring *)&be_const_str_dot_p, - (const bstring *)&be_const_str_copy, - (const bstring *)&be_const_str__def, - (const bstring *)&be_const_str_imax, - (const bstring *)&be_const_str_add_driver, - (const bstring *)&be_const_str_dot_len, - (const bstring *)&be_const_str_bus, - (const bstring *)&be_const_str_yield, - NULL, - (const bstring *)&be_const_str_top, - (const bstring *)&be_const_str_get_string, - NULL, - NULL, - (const bstring *)&be_const_str_settings, - NULL, - (const bstring *)&be_const_str__get_cb, - (const bstring *)&be_const_str_opt_neq, - (const bstring *)&be_const_str__timers, - (const bstring *)&be_const_str_SERIAL_7E1, - (const bstring *)&be_const_str_AudioFileSource, - (const bstring *)&be_const_str_EC_C25519, - (const bstring *)&be_const_str_available, - (const bstring *)&be_const_str_traceback, - (const bstring *)&be_const_str_opt_add, - (const bstring *)&be_const_str___iterator__, - (const bstring *)&be_const_str_number, - (const bstring *)&be_const_str_, - (const bstring *)&be_const_str_dot_p1, - (const bstring *)&be_const_str_arg_name, - (const bstring *)&be_const_str_count, - (const bstring *)&be_const_str_AudioFileSourceFS, - NULL, - (const bstring *)&be_const_str_atan2, - (const bstring *)&be_const_str_set_timeouts, - (const bstring *)&be_const_str__ccmd, - (const bstring *)&be_const_str_detect, - (const bstring *)&be_const_str_SERIAL_8O2 -}; - -static const struct bconststrtab m_const_string_table = { - .size = 164, - .count = 329, - .table = m_string_table -}; diff --git a/lib/libesp32/Berry/generate/be_fixed_be_class_I2C_Driver.h b/lib/libesp32/Berry/generate/be_fixed_be_class_I2C_Driver.h deleted file mode 100644 index 4257b0850..000000000 --- a/lib/libesp32/Berry/generate/be_fixed_be_class_I2C_Driver.h +++ /dev/null @@ -1,27 +0,0 @@ -#include "be_constobj.h" - -static be_define_const_map_slots(be_class_I2C_Driver_map) { - { be_const_key(read32, -1), be_const_closure(read32_closure) }, - { be_const_key(write8, 6), be_const_closure(write8_closure) }, - { be_const_key(name, -1), be_const_var(0) }, - { be_const_key(addr, 10), be_const_var(1) }, - { be_const_key(read12, -1), be_const_closure(read12_closure) }, - { be_const_key(write_bit, 8), be_const_closure(write_bit_closure) }, - { be_const_key(read13, -1), be_const_closure(read13_closure) }, - { be_const_key(read24, -1), be_const_closure(read24_closure) }, - { be_const_key(wire, -1), be_const_var(2) }, - { be_const_key(init, -1), be_const_closure(init_closure) }, - { be_const_key(read8, -1), be_const_closure(read8_closure) }, -}; - -static be_define_const_map( - be_class_I2C_Driver_map, - 11 -); - -BE_EXPORT_VARIABLE be_define_const_class( - be_class_I2C_Driver, - 3, - (bclass *)&be_class_Driver, - I2C_Driver -); diff --git a/lib/libesp32/Berry/generate/be_fixed_be_class_tasmota.h b/lib/libesp32/Berry/generate/be_fixed_be_class_tasmota.h deleted file mode 100644 index c931a3bc0..000000000 --- a/lib/libesp32/Berry/generate/be_fixed_be_class_tasmota.h +++ /dev/null @@ -1,95 +0,0 @@ -#include "be_constobj.h" - -static be_define_const_map_slots(be_class_tasmota_map) { - { be_const_key(resp_cmnd_done, -1), be_const_func(l_respCmndDone) }, - { be_const_key(resolvecmnd, 42), be_const_func(l_resolveCmnd) }, - { be_const_key(add_driver, -1), be_const_closure(add_driver_closure) }, - { be_const_key(gc, -1), be_const_closure(gc_closure) }, - { be_const_key(find_op, -1), be_const_closure(find_op_closure) }, - { be_const_key(scale_uint, 15), be_const_func(l_scaleuint) }, - { be_const_key(try_rule, -1), be_const_closure(try_rule_closure) }, - { be_const_key(time_reached, -1), be_const_func(l_timereached) }, - { be_const_key(web_send, -1), be_const_func(l_webSend) }, - { be_const_key(eth, 21), be_const_func(l_eth) }, - { be_const_key(get_switch, 34), be_const_func(l_getswitch) }, - { be_const_key(set_power, -1), be_const_func(l_setpower) }, - { be_const_key(_drivers, 50), be_const_var(0) }, - { be_const_key(_rules, -1), be_const_var(1) }, - { be_const_key(_ccmd, 6), be_const_var(2) }, - { be_const_key(time_dump, -1), be_const_func(l_time_dump) }, - { be_const_key(gen_cb, 17), be_const_closure(gen_cb_closure) }, - { be_const_key(cmd_res, 20), be_const_var(3) }, - { be_const_key(set_light, 63), be_const_closure(set_light_closure) }, - { be_const_key(millis, -1), be_const_func(l_millis) }, - { be_const_key(global, -1), be_const_var(4) }, - { be_const_key(exec_tele, 67), be_const_closure(exec_tele_closure) }, - { be_const_key(_settings_ptr, -1), be_const_comptr(&Settings) }, - { be_const_key(get_power, -1), be_const_func(l_getpower) }, - { be_const_key(_cb, 57), be_const_var(5) }, - { be_const_key(save, -1), be_const_func(l_save) }, - { be_const_key(run_deferred, -1), be_const_closure(run_deferred_closure) }, - { be_const_key(i2c_enabled, 9), be_const_func(l_i2cenabled) }, - { be_const_key(remove_driver, -1), be_const_closure(remove_driver_closure) }, - { be_const_key(event, -1), be_const_closure(event_closure) }, - { be_const_key(find_key_i, -1), be_const_closure(find_key_i_closure) }, - { be_const_key(web_send_decimal, -1), be_const_func(l_webSendDecimal) }, - { be_const_key(get_free_heap, 3), be_const_func(l_getFreeHeap) }, - { be_const_key(wire_scan, -1), be_const_closure(wire_scan_closure) }, - { be_const_key(init, -1), be_const_closure(init_closure) }, - { be_const_key(wd, -1), be_const_var(6) }, - { be_const_key(_debug_present, -1), be_const_var(7) }, - { be_const_key(time_str, 45), be_const_closure(time_str_closure) }, - { be_const_key(remove_rule, 71), be_const_closure(remove_rule_closure) }, - { be_const_key(memory, 62), be_const_func(l_memory) }, - { be_const_key(wifi, -1), be_const_func(l_wifi) }, - { be_const_key(get_option, 44), be_const_func(l_getoption) }, - { be_const_key(rtc, -1), be_const_func(l_rtc) }, - { be_const_key(load, 72), be_const_closure(load_closure) }, - { be_const_key(chars_in_string, -1), be_const_closure(chars_in_string_closure) }, - { be_const_key(cmd, -1), be_const_closure(cmd_closure) }, - { be_const_key(publish, 43), be_const_func(l_publish) }, - { be_const_key(resp_cmnd_error, 18), be_const_func(l_respCmndError) }, - { be_const_key(add_cmd, -1), be_const_closure(add_cmd_closure) }, - { be_const_key(_settings_def, -1), be_const_comptr(&be_tasmota_settings_struct) }, - { be_const_key(strftime, 4), be_const_func(l_strftime) }, - { be_const_key(add_rule, 41), be_const_closure(add_rule_closure) }, - { be_const_key(wire2, -1), be_const_var(8) }, - { be_const_key(settings, -1), be_const_var(9) }, - { be_const_key(exec_rules, -1), be_const_closure(exec_rules_closure) }, - { be_const_key(cb_dispatch, -1), be_const_closure(cb_dispatch_closure) }, - { be_const_key(yield, 68), be_const_func(l_yield) }, - { be_const_key(_get_cb, 75), be_const_func(l_get_cb) }, - { be_const_key(wire1, 33), be_const_var(10) }, - { be_const_key(resp_cmnd, -1), be_const_func(l_respCmnd) }, - { be_const_key(resp_cmnd_failed, 16), be_const_func(l_respCmndFailed) }, - { be_const_key(_global_addr, -1), be_const_comptr(&TasmotaGlobal) }, - { be_const_key(hs2rgb, -1), be_const_closure(hs2rgb_closure) }, - { be_const_key(resp_cmnd_str, 76), be_const_func(l_respCmndStr) }, - { be_const_key(_global_def, -1), be_const_comptr(&be_tasmota_global_struct) }, - { be_const_key(kv, 74), be_const_closure(kv_closure) }, - { be_const_key(delay, -1), be_const_func(l_delay) }, - { be_const_key(remove_cmd, 19), be_const_closure(remove_cmd_closure) }, - { be_const_key(set_timer, -1), be_const_closure(set_timer_closure) }, - { be_const_key(_cmd, 54), be_const_func(l_cmd) }, - { be_const_key(publish_result, -1), be_const_func(l_publish_result) }, - { be_const_key(log, -1), be_const_func(l_logInfo) }, - { be_const_key(arch, -1), be_const_func(l_arch) }, - { be_const_key(remove_timer, 66), be_const_closure(remove_timer_closure) }, - { be_const_key(_timers, -1), be_const_var(11) }, - { be_const_key(read_sensors, -1), be_const_func(l_read_sensors) }, - { be_const_key(exec_cmd, -1), be_const_closure(exec_cmd_closure) }, - { be_const_key(response_append, -1), be_const_func(l_respAppend) }, - { be_const_key(get_light, -1), be_const_closure(get_light_closure) }, -}; - -static be_define_const_map( - be_class_tasmota_map, - 79 -); - -BE_EXPORT_VARIABLE be_define_const_class( - be_class_tasmota, - 12, - NULL, - Tasmota -); diff --git a/lib/libesp32/Berry/generate/be_fixed_energy.h b/lib/libesp32/Berry/generate/be_fixed_energy.h deleted file mode 100644 index 3af466055..000000000 --- a/lib/libesp32/Berry/generate/be_fixed_energy.h +++ /dev/null @@ -1,21 +0,0 @@ -#include "be_constobj.h" - -static be_define_const_map_slots(m_libenergy_map) { - { be_const_key(init, -1), be_const_closure(init_closure) }, - { be_const_key(_ptr, 3), be_const_comptr(&Energy) }, - { be_const_key(setmember, -1), be_const_closure(setmember_closure) }, - { be_const_key(member, 2), be_const_closure(member_closure) }, - { be_const_key(read, -1), be_const_closure(read_closure) }, -}; - -static be_define_const_map( - m_libenergy_map, - 5 -); - -static be_define_const_module( - m_libenergy, - "energy" -); - -BE_EXPORT_VARIABLE be_define_const_native_module(energy); diff --git a/lib/libesp32/Berry/include/be_lvgl.h b/lib/libesp32/Berry/include/be_lvgl.h deleted file mode 100644 index 52b5edc2d..000000000 --- a/lib/libesp32/Berry/include/be_lvgl.h +++ /dev/null @@ -1,40 +0,0 @@ -/******************************************************************** - * Tasmota LVGL Headers - *******************************************************************/ -#ifndef __BE_LVGL_H__ -#define __BE_LVGL_H__ - -#include "be_constobj.h" - -#ifdef USE_LVGL - -#include "lvgl.h" - -#ifdef __cplusplus -extern "C" { -#endif - // table of functions per class - typedef struct lvbe_call_c_t { - const char * name; - void * func; - const char * return_type; - const char * arg_type; - } lvbe_call_c_t; - - // list of classes and function tables - typedef struct lvbe_call_c_classes_t { - const char * name; - const bclass * cl; - const lvbe_call_c_t * func_table; - size_t size; - } lvbe_call_c_classes_t; - extern const lvbe_call_c_classes_t lv_classes[]; - extern const size_t lv_classes_size; - -#ifdef __cplusplus -} -#endif - -#endif // USE_LVGL - -#endif // __BE_LVGL_H__ \ No newline at end of file diff --git a/lib/libesp32/Zip-readonly-FS/src/ZipReadFS.cpp b/lib/libesp32/Zip-readonly-FS/src/ZipReadFS.cpp index 2f036ad8c..8b8df55c1 100644 --- a/lib/libesp32/Zip-readonly-FS/src/ZipReadFS.cpp +++ b/lib/libesp32/Zip-readonly-FS/src/ZipReadFS.cpp @@ -227,7 +227,7 @@ public: } bool seek(uint32_t pos, SeekMode mode) { - AddLog(LOG_LEVEL_DEBUG, "ZIP: seek pos=%i mode=%i", pos, mode); + // AddLog(LOG_LEVEL_DEBUG, "ZIP: seek pos=%i mode=%i", pos, mode); if (SeekSet == mode) { if (pos <= _len) { _seek = pos; @@ -246,12 +246,12 @@ public: } size_t position() const { - AddLog(LOG_LEVEL_DEBUG, "ZIP: position return=%i", _seek); + // AddLog(LOG_LEVEL_DEBUG, "ZIP: position return=%i", _seek); return _seek; } size_t size() const { - AddLog(LOG_LEVEL_DEBUG, "ZIP: size return=%i", _len); + // AddLog(LOG_LEVEL_DEBUG, "ZIP: size return=%i", _len); return _len; } @@ -322,7 +322,7 @@ bool ZipArchive::parse(void) { return false; } if (header.signature2 != 0x0403) { - AddLog(LOG_LEVEL_DEBUG, "ZIP: end of file section"); + // AddLog(LOG_LEVEL_DEBUG, "ZIP: end of file section"); break; } // Check no extra field @@ -371,7 +371,7 @@ bool ZipArchive::parse(void) { entry.last_mod = dos2unixtime((header.last_mod_date << 16) | header.last_mod_time); offset += header.size_uncompressed; - AddLog(LOG_LEVEL_DEBUG_MORE, "ZIP: found file '%s' (%i bytes - offset %i) - next entry %i", &fname[0], header.size_uncompressed, entry.file_start, offset); + // AddLog(LOG_LEVEL_DEBUG_MORE, "ZIP: found file '%s' (%i bytes - offset %i) - next entry %i", &fname[0], header.size_uncompressed, entry.file_start, offset); } return true; @@ -402,7 +402,7 @@ FileImplPtr ZipReadFSImpl::open(const char* path, const char* mode, const bool c char *suffix = strtok_r(NULL, "", &tok); // if suffix starts with '/', skip the first char if (*suffix == '/') { suffix++; } - AddLog(LOG_LEVEL_DEBUG, "ZIP: prefix=%s suffix=%s", prefix, suffix); + // AddLog(LOG_LEVEL_DEBUG, "ZIP: prefix=%s suffix=%s", prefix, suffix); // parse ZIP archive File zipfile = (*_fs)->open(prefix, "r", false); if ((bool)zipfile) { @@ -413,7 +413,7 @@ FileImplPtr ZipReadFSImpl::open(const char* path, const char* mode, const bool c for (auto & entry : zip_archive.entries) { if (entry.file_name.equals(suffix)) { // found - AddLog(LOG_LEVEL_DEBUG, "ZIP: file '%s' in archive (start=%i - len=%i - last_mod=%i)", suffix, entry.file_start, entry.file_len, entry.last_mod); + // AddLog(LOG_LEVEL_DEBUG, "ZIP: file '%s' in archive (start=%i - len=%i - last_mod=%i)", suffix, entry.file_start, entry.file_len, entry.last_mod); return ZipItemImplPtr(new ZipItemImpl((*_fs)->open(prefix, "r", false), entry.file_start, entry.file_len, entry.last_mod)); } } diff --git a/lib/libesp32/Berry/LICENSE b/lib/libesp32/berry/LICENSE similarity index 100% rename from lib/libesp32/Berry/LICENSE rename to lib/libesp32/berry/LICENSE diff --git a/lib/libesp32/Berry/Makefile b/lib/libesp32/berry/Makefile similarity index 94% rename from lib/libesp32/Berry/Makefile rename to lib/libesp32/berry/Makefile index 531661bc2..f9d61125d 100644 --- a/lib/libesp32/Berry/Makefile +++ b/lib/libesp32/berry/Makefile @@ -10,6 +10,8 @@ SRCPATH = src default GENERATE = generate CONFIG = default/berry_conf.h COC = tools/coc/coc +PY = python3 +PYCOC = tools/pycoc/main.py CONST_TAB = $(GENERATE)/be_const_strtab.h MAKE_COC = $(MAKE) -C tools/coc @@ -18,6 +20,7 @@ ifeq ($(OS), Windows_NT) # Windows LFLAGS += -Wl,--out-implib,berry.lib # export symbols lib for dll linked TARGET := $(TARGET).exe COC := $(COC).exe + PY := $(PY).exe else CFLAGS += -DUSE_READLINE_LIB LIBS += -lreadline -ldl @@ -92,7 +95,7 @@ uninstall: prebuild: $(COC) $(GENERATE) $(MSG) [Prebuild] generate resources - $(Q) $(COC) -o $(GENERATE) $(SRCPATH) -c $(CONFIG) + $(Q) $(PY) $(PYCOC) -o $(GENERATE) $(SRCPATH) -c $(CONFIG) $(MSG) done clean: diff --git a/lib/libesp32/Berry/README.md b/lib/libesp32/berry/README.md similarity index 100% rename from lib/libesp32/Berry/README.md rename to lib/libesp32/berry/README.md diff --git a/lib/libesp32/Berry/berry-logo.png b/lib/libesp32/berry/berry-logo.png similarity index 100% rename from lib/libesp32/Berry/berry-logo.png rename to lib/libesp32/berry/berry-logo.png diff --git a/lib/libesp32/Berry/default/be_animate_lib.c b/lib/libesp32/berry/default/be_animate_lib.c similarity index 73% rename from lib/libesp32/Berry/default/be_animate_lib.c rename to lib/libesp32/berry/default/be_animate_lib.c index db6052653..398f87b66 100644 --- a/lib/libesp32/Berry/default/be_animate_lib.c +++ b/lib/libesp32/berry/default/be_animate_lib.c @@ -20,17 +20,17 @@ be_local_closure(Animate_rotate_init, /* name */ NULL, /* no sub protos */ 1, /* has constants */ ( &(const bvalue[ 8]) { /* constants */ - /* K0 */ be_nested_string("init", 380752755, 4), - /* K1 */ be_nested_string("closure", 1548407746, 7), - /* K2 */ be_nested_string("code", -114201356, 4), - /* K3 */ be_nested_string("push", -2022703139, 4), - /* K4 */ be_nested_string("animate", -409180496, 7), - /* K5 */ be_nested_string("ins_ramp", 1068049360, 8), - /* K6 */ be_nested_string("ins_goto", 1342843963, 8), + /* K0 */ be_nested_str(init), + /* K1 */ be_nested_str(closure), + /* K2 */ be_nested_str(code), + /* K3 */ be_nested_str(push), + /* K4 */ be_nested_str(animate), + /* K5 */ be_nested_str(ins_ramp), + /* K6 */ be_nested_str(ins_goto), /* K7 */ be_const_int(0), }), - (be_nested_const_str("init", 380752755, 4)), - ((bstring*) &be_const_str_input), + &be_const_str_init, + &be_const_str_solidified, ( &(const binstruction[25]) { /* code */ 0x60140003, // 0000 GETGBL R5 G3 0x5C180000, // 0001 MOVE R6 R0 @@ -72,9 +72,9 @@ be_local_class(Animate_rotate, &be_class_Animate_engine, be_nested_map(1, ( (struct bmapnode*) &(const bmapnode[]) { - { be_nested_key("init", 380752755, 4, -1), be_const_closure(Animate_rotate_init_closure) }, + { be_const_key(init, -1), be_const_closure(Animate_rotate_init_closure) }, })), - (be_nested_const_str("Animate_rotate", -787188142, 14)) + be_str_literal("Animate_rotate") ); /******************************************************************** @@ -91,15 +91,15 @@ be_local_closure(Animate_from_to_init, /* name */ NULL, /* no sub protos */ 1, /* has constants */ ( &(const bvalue[ 6]) { /* constants */ - /* K0 */ be_nested_string("init", 380752755, 4), - /* K1 */ be_nested_string("closure", 1548407746, 7), - /* K2 */ be_nested_string("code", -114201356, 4), - /* K3 */ be_nested_string("push", -2022703139, 4), - /* K4 */ be_nested_string("animate", -409180496, 7), - /* K5 */ be_nested_string("ins_ramp", 1068049360, 8), + /* K0 */ be_nested_str(init), + /* K1 */ be_nested_str(closure), + /* K2 */ be_nested_str(code), + /* K3 */ be_nested_str(push), + /* K4 */ be_nested_str(animate), + /* K5 */ be_nested_str(ins_ramp), }), - (be_nested_const_str("init", 380752755, 4)), - ((bstring*) &be_const_str_input), + &be_const_str_init, + &be_const_str_solidified, ( &(const binstruction[16]) { /* code */ 0x60140003, // 0000 GETGBL R5 G3 0x5C180000, // 0001 MOVE R6 R0 @@ -132,9 +132,9 @@ be_local_class(Animate_from_to, &be_class_Animate_engine, be_nested_map(1, ( (struct bmapnode*) &(const bmapnode[]) { - { be_nested_key("init", 380752755, 4, -1), be_const_closure(Animate_from_to_init_closure) }, + { be_const_key(init, -1), be_const_closure(Animate_from_to_init_closure) }, })), - (be_nested_const_str("Animate_from_to", 1699049867, 15)) + be_str_literal("Animate_from_to") ); /******************************************************************** @@ -151,18 +151,18 @@ be_local_closure(Animate_back_forth_init, /* name */ NULL, /* no sub protos */ 1, /* has constants */ ( &(const bvalue[ 9]) { /* constants */ - /* K0 */ be_nested_string("init", 380752755, 4), - /* K1 */ be_nested_string("closure", 1548407746, 7), - /* K2 */ be_nested_string("code", -114201356, 4), - /* K3 */ be_nested_string("push", -2022703139, 4), - /* K4 */ be_nested_string("animate", -409180496, 7), - /* K5 */ be_nested_string("ins_ramp", 1068049360, 8), + /* K0 */ be_nested_str(init), + /* K1 */ be_nested_str(closure), + /* K2 */ be_nested_str(code), + /* K3 */ be_nested_str(push), + /* K4 */ be_nested_str(animate), + /* K5 */ be_nested_str(ins_ramp), /* K6 */ be_const_int(2), - /* K7 */ be_nested_string("ins_goto", 1342843963, 8), + /* K7 */ be_nested_str(ins_goto), /* K8 */ be_const_int(0), }), - (be_nested_const_str("init", 380752755, 4)), - ((bstring*) &be_const_str_input), + &be_const_str_init, + &be_const_str_solidified, ( &(const binstruction[34]) { /* code */ 0x60140003, // 0000 GETGBL R5 G3 0x5C180000, // 0001 MOVE R6 R0 @@ -213,9 +213,9 @@ be_local_class(Animate_back_forth, &be_class_Animate_engine, be_nested_map(1, ( (struct bmapnode*) &(const bmapnode[]) { - { be_nested_key("init", 380752755, 4, -1), be_const_closure(Animate_back_forth_init_closure) }, + { be_const_key(init, -1), be_const_closure(Animate_back_forth_init_closure) }, })), - (be_nested_const_str("Animate_back_forth", 5319526, 18)) + be_str_literal("Animate_back_forth") ); /******************************************************************** @@ -232,12 +232,12 @@ be_local_closure(Animate_ins_goto_init, /* name */ NULL, /* no sub protos */ 1, /* has constants */ ( &(const bvalue[ 3]) { /* constants */ - /* K0 */ be_nested_string("pc_rel", 991921176, 6), - /* K1 */ be_nested_string("pc_abs", 920256495, 6), - /* K2 */ be_nested_string("duration", 799079693, 8), + /* K0 */ be_nested_str(pc_rel), + /* K1 */ be_nested_str(pc_abs), + /* K2 */ be_nested_str(duration), }), - (be_nested_const_str("init", 380752755, 4)), - ((bstring*) &be_const_str_input), + &be_const_str_init, + &be_const_str_solidified, ( &(const binstruction[ 4]) { /* code */ 0x90020001, // 0000 SETMBR R0 K0 R1 0x90020202, // 0001 SETMBR R0 K1 R2 @@ -257,12 +257,12 @@ be_local_class(Animate_ins_goto, NULL, be_nested_map(4, ( (struct bmapnode*) &(const bmapnode[]) { - { be_nested_key("pc_rel", 991921176, 6, -1), be_const_var(0) }, - { be_nested_key("duration", 799079693, 8, -1), be_const_var(2) }, - { be_nested_key("pc_abs", 920256495, 6, -1), be_const_var(1) }, - { be_nested_key("init", 380752755, 4, 2), be_const_closure(Animate_ins_goto_init_closure) }, + { be_const_key(pc_rel, -1), be_const_var(0) }, + { be_const_key(duration, -1), be_const_var(2) }, + { be_const_key(pc_abs, -1), be_const_var(1) }, + { be_const_key(init, 2), be_const_closure(Animate_ins_goto_init_closure) }, })), - (be_nested_const_str("Animate_ins_goto", 1667367043, 16)) + be_str_literal("Animate_ins_goto") ); /******************************************************************** @@ -279,12 +279,12 @@ be_local_closure(Animate_ins_ramp_init, /* name */ NULL, /* no sub protos */ 1, /* has constants */ ( &(const bvalue[ 3]) { /* constants */ - /* K0 */ be_nested_string("a", -468965076, 1), - /* K1 */ be_nested_string("b", -418632219, 1), - /* K2 */ be_nested_string("duration", 799079693, 8), + /* K0 */ be_nested_str(a), + /* K1 */ be_nested_str(b), + /* K2 */ be_nested_str(duration), }), - (be_nested_const_str("init", 380752755, 4)), - ((bstring*) &be_const_str_input), + &be_const_str_init, + &be_const_str_solidified, ( &(const binstruction[ 4]) { /* code */ 0x90020001, // 0000 SETMBR R0 K0 R1 0x90020202, // 0001 SETMBR R0 K1 R2 @@ -304,12 +304,12 @@ be_local_class(Animate_ins_ramp, NULL, be_nested_map(4, ( (struct bmapnode*) &(const bmapnode[]) { - { be_nested_key("a", -468965076, 1, -1), be_const_var(0) }, - { be_nested_key("b", -418632219, 1, 2), be_const_var(1) }, - { be_nested_key("duration", 799079693, 8, -1), be_const_var(2) }, - { be_nested_key("init", 380752755, 4, -1), be_const_closure(Animate_ins_ramp_init_closure) }, + { be_const_key(a, -1), be_const_var(0) }, + { be_const_key(b, 2), be_const_var(1) }, + { be_const_key(duration, -1), be_const_var(2) }, + { be_const_key(init, -1), be_const_closure(Animate_ins_ramp_init_closure) }, })), - (be_nested_const_str("Animate_ins_ramp", 785058280, 16)) + be_str_literal("Animate_ins_ramp") ); /******************************************************************** @@ -326,15 +326,15 @@ be_local_closure(Animate_engine_run, /* name */ NULL, /* no sub protos */ 1, /* has constants */ ( &(const bvalue[ 6]) { /* constants */ - /* K0 */ be_nested_string("tasmota", 424643812, 7), - /* K1 */ be_nested_string("millis", 1214679063, 6), - /* K2 */ be_nested_string("value", 1113510858, 5), - /* K3 */ be_nested_string("ins_time", -1314721743, 8), - /* K4 */ be_nested_string("running", 343848780, 7), - /* K5 */ be_nested_string("add_driver", 1654458371, 10), + /* K0 */ be_nested_str(tasmota), + /* K1 */ be_nested_str(millis), + /* K2 */ be_nested_str(value), + /* K3 */ be_nested_str(ins_time), + /* K4 */ be_nested_str(running), + /* K5 */ be_nested_str(add_driver), }), - (be_nested_const_str("run", 718098122, 3)), - ((bstring*) &be_const_str_input), + &be_const_str_run, + &be_const_str_solidified, ( &(const binstruction[19]) { /* code */ 0x4C0C0000, // 0000 LDNIL R3 0x1C0C0203, // 0001 EQ R3 R1 R3 @@ -375,14 +375,14 @@ be_local_closure(Animate_engine_init, /* name */ NULL, /* no sub protos */ 1, /* has constants */ ( &(const bvalue[ 5]) { /* constants */ - /* K0 */ be_nested_string("code", -114201356, 4), - /* K1 */ be_nested_string("pc", 1313756516, 2), + /* K0 */ be_nested_str(code), + /* K1 */ be_nested_str(pc), /* K2 */ be_const_int(0), - /* K3 */ be_nested_string("ins_time", -1314721743, 8), - /* K4 */ be_nested_string("running", 343848780, 7), + /* K3 */ be_nested_str(ins_time), + /* K4 */ be_nested_str(running), }), - (be_nested_const_str("init", 380752755, 4)), - ((bstring*) &be_const_str_input), + &be_const_str_init, + &be_const_str_solidified, ( &(const binstruction[ 8]) { /* code */ 0x60040012, // 0000 GETGBL R1 G18 0x7C040000, // 0001 CALL R1 0 @@ -412,12 +412,12 @@ be_local_closure(Animate_engine_autorun, /* name */ NULL, /* no sub protos */ 1, /* has constants */ ( &(const bvalue[ 3]) { /* constants */ - /* K0 */ be_nested_string("run", 718098122, 3), - /* K1 */ be_nested_string("tasmota", 424643812, 7), - /* K2 */ be_nested_string("add_driver", 1654458371, 10), + /* K0 */ be_nested_str(run), + /* K1 */ be_nested_str(tasmota), + /* K2 */ be_nested_str(add_driver), }), - (be_nested_const_str("autorun", 1447527407, 7)), - ((bstring*) &be_const_str_input), + &be_const_str_autorun, + &be_const_str_solidified, ( &(const binstruction[ 9]) { /* code */ 0x8C0C0100, // 0000 GETMET R3 R0 K0 0x5C140200, // 0001 MOVE R5 R1 @@ -448,12 +448,12 @@ be_local_closure(Animate_engine_stop, /* name */ NULL, /* no sub protos */ 1, /* has constants */ ( &(const bvalue[ 3]) { /* constants */ - /* K0 */ be_nested_string("running", 343848780, 7), - /* K1 */ be_nested_string("tasmota", 424643812, 7), - /* K2 */ be_nested_string("remove_driver", 1030243768, 13), + /* K0 */ be_nested_str(running), + /* K1 */ be_nested_str(tasmota), + /* K2 */ be_nested_str(remove_driver), }), - (be_nested_const_str("stop", -883741979, 4)), - ((bstring*) &be_const_str_input), + &be_const_str_stop, + &be_const_str_solidified, ( &(const binstruction[ 7]) { /* code */ 0x50040000, // 0000 LDBOOL R1 0 0 0x90020001, // 0001 SETMBR R0 K0 R1 @@ -482,10 +482,10 @@ be_local_closure(Animate_engine_is_running, /* name */ NULL, /* no sub protos */ 1, /* has constants */ ( &(const bvalue[ 1]) { /* constants */ - /* K0 */ be_nested_string("running", 343848780, 7), + /* K0 */ be_nested_str(running), }), - (be_nested_const_str("is_running", -2068120035, 10)), - ((bstring*) &be_const_str_input), + &be_const_str_is_running, + &be_const_str_solidified, ( &(const binstruction[ 2]) { /* code */ 0x88040100, // 0000 GETMBR R1 R0 K0 0x80040200, // 0001 RET 1 R1 @@ -509,10 +509,10 @@ be_local_closure(Animate_engine_every_50ms, /* name */ NULL, /* no sub protos */ 1, /* has constants */ ( &(const bvalue[ 1]) { /* constants */ - /* K0 */ be_nested_string("animate", -409180496, 7), + /* K0 */ be_nested_str(animate), }), - (be_nested_const_str("every_50ms", -1911083288, 10)), - ((bstring*) &be_const_str_input), + &be_const_str_every_50ms, + &be_const_str_solidified, ( &(const binstruction[ 3]) { /* code */ 0x8C040100, // 0000 GETMET R1 R0 K0 0x7C040200, // 0001 CALL R1 1 @@ -537,31 +537,31 @@ be_local_closure(Animate_engine_animate, /* name */ NULL, /* no sub protos */ 1, /* has constants */ ( &(const bvalue[22]) { /* constants */ - /* K0 */ be_nested_string("running", 343848780, 7), - /* K1 */ be_nested_string("tasmota", 424643812, 7), - /* K2 */ be_nested_string("millis", 1214679063, 6), - /* K3 */ be_nested_string("ins_time", -1314721743, 8), - /* K4 */ be_nested_string("pc", 1313756516, 2), - /* K5 */ be_nested_string("code", -114201356, 4), + /* K0 */ be_nested_str(running), + /* K1 */ be_nested_str(tasmota), + /* K2 */ be_nested_str(millis), + /* K3 */ be_nested_str(ins_time), + /* K4 */ be_nested_str(pc), + /* K5 */ be_nested_str(code), /* K6 */ be_const_int(0), - /* K7 */ be_nested_string("internal_error", -1775809127, 14), - /* K8 */ be_nested_string("Animate pc is out of range", 1854929421, 26), - /* K9 */ be_nested_string("animate", -409180496, 7), - /* K10 */ be_nested_string("ins_ramp", 1068049360, 8), - /* K11 */ be_nested_string("closure", 1548407746, 7), - /* K12 */ be_nested_string("duration", 799079693, 8), - /* K13 */ be_nested_string("value", 1113510858, 5), - /* K14 */ be_nested_string("scale_uint", -1204156202, 10), - /* K15 */ be_nested_string("a", -468965076, 1), - /* K16 */ be_nested_string("b", -418632219, 1), + /* K7 */ be_nested_str(internal_error), + /* K8 */ be_nested_str(Animate_X20pc_X20is_X20out_X20of_X20range), + /* K9 */ be_nested_str(animate), + /* K10 */ be_nested_str(ins_ramp), + /* K11 */ be_nested_str(closure), + /* K12 */ be_nested_str(duration), + /* K13 */ be_nested_str(value), + /* K14 */ be_nested_str(scale_uint), + /* K15 */ be_nested_str(a), + /* K16 */ be_nested_str(b), /* K17 */ be_const_int(1), - /* K18 */ be_nested_string("ins_goto", 1342843963, 8), - /* K19 */ be_nested_string("pc_rel", 991921176, 6), - /* K20 */ be_nested_string("pc_abs", 920256495, 6), - /* K21 */ be_nested_string("unknown instruction", 1093911841, 19), + /* K18 */ be_nested_str(ins_goto), + /* K19 */ be_nested_str(pc_rel), + /* K20 */ be_nested_str(pc_abs), + /* K21 */ be_nested_str(unknown_X20instruction), }), - (be_nested_const_str("animate", -409180496, 7)), - ((bstring*) &be_const_str_input), + &be_const_str_animate, + &be_const_str_solidified, ( &(const binstruction[99]) { /* code */ 0x88080100, // 0000 GETMBR R2 R0 K0 0x740A0000, // 0001 JMPT R2 #0003 @@ -676,21 +676,21 @@ be_local_class(Animate_engine, NULL, be_nested_map(13, ( (struct bmapnode*) &(const bmapnode[]) { - { be_nested_key("code", -114201356, 4, -1), be_const_var(0) }, - { be_nested_key("run", 718098122, 3, 4), be_const_closure(Animate_engine_run_closure) }, - { be_nested_key("running", 343848780, 7, 8), be_const_var(4) }, - { be_nested_key("init", 380752755, 4, -1), be_const_closure(Animate_engine_init_closure) }, - { be_nested_key("autorun", 1447527407, 7, -1), be_const_closure(Animate_engine_autorun_closure) }, - { be_nested_key("value", 1113510858, 5, -1), be_const_var(5) }, - { be_nested_key("stop", -883741979, 4, 3), be_const_closure(Animate_engine_stop_closure) }, - { be_nested_key("pc", 1313756516, 2, -1), be_const_var(2) }, - { be_nested_key("is_running", -2068120035, 10, 11), be_const_closure(Animate_engine_is_running_closure) }, - { be_nested_key("every_50ms", -1911083288, 10, 10), be_const_closure(Animate_engine_every_50ms_closure) }, - { be_nested_key("animate", -409180496, 7, -1), be_const_closure(Animate_engine_animate_closure) }, - { be_nested_key("closure", 1548407746, 7, -1), be_const_var(1) }, - { be_nested_key("ins_time", -1314721743, 8, 9), be_const_var(3) }, + { be_const_key(code, -1), be_const_var(0) }, + { be_const_key(run, 4), be_const_closure(Animate_engine_run_closure) }, + { be_const_key(running, 8), be_const_var(4) }, + { be_const_key(init, -1), be_const_closure(Animate_engine_init_closure) }, + { be_const_key(autorun, -1), be_const_closure(Animate_engine_autorun_closure) }, + { be_const_key(value, -1), be_const_var(5) }, + { be_const_key(stop, 3), be_const_closure(Animate_engine_stop_closure) }, + { be_const_key(pc, -1), be_const_var(2) }, + { be_const_key(is_running, 11), be_const_closure(Animate_engine_is_running_closure) }, + { be_const_key(every_50ms, 10), be_const_closure(Animate_engine_every_50ms_closure) }, + { be_const_key(animate, -1), be_const_closure(Animate_engine_animate_closure) }, + { be_const_key(closure, -1), be_const_var(1) }, + { be_const_key(ins_time, 9), be_const_var(3) }, })), - (be_nested_const_str("Animate_engine", 1498417667, 14)) + be_str_literal("Animate_engine") ); /******************************************************************** @@ -700,12 +700,12 @@ be_local_module(animate, "animate", be_nested_map(6, ( (struct bmapnode*) &(const bmapnode[]) { - { be_nested_key("rotate", -1510671094, 6, 2), be_const_class(be_class_Animate_rotate) }, - { be_nested_key("from_to", 21625507, 7, 3), be_const_class(be_class_Animate_from_to) }, - { be_nested_key("back_forth", -1629925234, 10, -1), be_const_class(be_class_Animate_back_forth) }, - { be_nested_key("ins_goto", 1342843963, 8, -1), be_const_class(be_class_Animate_ins_goto) }, - { be_nested_key("ins_ramp", 1068049360, 8, -1), be_const_class(be_class_Animate_ins_ramp) }, - { be_nested_key("engine", -301606853, 6, -1), be_const_class(be_class_Animate_engine) }, + { be_const_key(rotate, 2), be_const_class(be_class_Animate_rotate) }, + { be_const_key(from_to, 3), be_const_class(be_class_Animate_from_to) }, + { be_const_key(back_forth, -1), be_const_class(be_class_Animate_back_forth) }, + { be_const_key(ins_goto, -1), be_const_class(be_class_Animate_ins_goto) }, + { be_const_key(ins_ramp, -1), be_const_class(be_class_Animate_ins_ramp) }, + { be_const_key(engine, -1), be_const_class(be_class_Animate_engine) }, })) ); BE_EXPORT_VARIABLE be_define_const_native_module(animate); diff --git a/lib/libesp32/Berry/default/be_autoconf_lib.c b/lib/libesp32/berry/default/be_autoconf_lib.c similarity index 70% rename from lib/libesp32/Berry/default/be_autoconf_lib.c rename to lib/libesp32/berry/default/be_autoconf_lib.c index 3d864a988..da41707c7 100644 --- a/lib/libesp32/Berry/default/be_autoconf_lib.c +++ b/lib/libesp32/berry/default/be_autoconf_lib.c @@ -10,7 +10,7 @@ /******************************************************************** ** Solidified function: page_autoconf_ctl ********************************************************************/ -be_local_closure(page_autoconf_ctl, /* name */ +be_local_closure(Autoconf_page_autoconf_ctl, /* name */ be_nested_proto( 13, /* nstack */ 1, /* argc */ @@ -21,50 +21,50 @@ be_local_closure(page_autoconf_ctl, /* name */ NULL, /* no sub protos */ 1, /* has constants */ ( &(const bvalue[41]) { /* constants */ - /* K0 */ be_nested_string("webserver", 1572454038, 9), - /* K1 */ be_nested_string("string", 398550328, 6), - /* K2 */ be_nested_string("path", -2071507658, 4), - /* K3 */ be_nested_string("check_privileged_access", -602033328, 23), - /* K4 */ be_nested_string("has_arg", 424878688, 7), - /* K5 */ be_nested_string("reapply", -516027964, 7), - /* K6 */ be_nested_string("tasmota", 424643812, 7), - /* K7 */ be_nested_string("log", 1062293841, 3), - /* K8 */ be_nested_string("CFG: removing first time marker", 2125556683, 31), + /* K0 */ be_nested_str(webserver), + /* K1 */ be_nested_str(string), + /* K2 */ be_nested_str(path), + /* K3 */ be_nested_str(check_privileged_access), + /* K4 */ be_nested_str(has_arg), + /* K5 */ be_nested_str(reapply), + /* K6 */ be_nested_str(tasmota), + /* K7 */ be_nested_str(log), + /* K8 */ be_nested_str(CFG_X3A_X20removing_X20first_X20time_X20marker), /* K9 */ be_const_int(2), - /* K10 */ be_nested_string("clear_first_time", 632769909, 16), - /* K11 */ be_nested_string("redirect", 389758641, 8), - /* K12 */ be_nested_string("/?rst=", 580074707, 6), - /* K13 */ be_nested_string("zip", -1417514060, 3), - /* K14 */ be_nested_string("CFG: removing autoconf files", -280262326, 28), - /* K15 */ be_nested_string("delete_all_configs", -1912899718, 18), - /* K16 */ be_nested_string("arg", 1047474471, 3), - /* K17 */ be_nested_string("reset", 1695364032, 5), - /* K18 */ be_nested_string("format", -1180859054, 6), - /* K19 */ be_nested_string("https://raw.githubusercontent.com/tasmota/autoconf/main/%s/%s.autoconf", -1551440987, 70), - /* K20 */ be_nested_string("arch", -1342162999, 4), - /* K21 */ be_nested_string("CFG: downloading '%s'", 589480701, 21), - /* K22 */ be_nested_string("%s.autoconf", -734583772, 11), - /* K23 */ be_nested_string("webclient", -218578150, 9), - /* K24 */ be_nested_string("begin", 1748273790, 5), - /* K25 */ be_nested_string("GET", -1763262857, 3), - /* K26 */ be_nested_string("return code=%i", 2127454401, 14), - /* K27 */ be_nested_string("connection_error", 1358926260, 16), - /* K28 */ be_nested_string("write_file", -1117308417, 10), - /* K29 */ be_nested_string("close", 667630371, 5), - /* K30 */ be_nested_string("value_error", 773297791, 11), - /* K31 */ be_nested_string("Unknown command", 1830905432, 15), - /* K32 */ be_nested_string("CFG: Exception> '%s' - %s", 1228874553, 25), - /* K33 */ be_nested_string("content_start", -1357458227, 13), - /* K34 */ be_nested_string("Parameter error", -454925258, 15), - /* K35 */ be_nested_string("content_send_style", 1087907647, 18), - /* K36 */ be_nested_string("content_send", 1673733649, 12), - /* K37 */ be_nested_string("

Exception:
'%s'
%s

", -42402214, 59), - /* K38 */ be_nested_string("content_button", 1956476087, 14), - /* K39 */ be_nested_string("BUTTON_CONFIGURATION", 70820856, 20), - /* K40 */ be_nested_string("content_stop", 658554751, 12), + /* K10 */ be_nested_str(clear_first_time), + /* K11 */ be_nested_str(redirect), + /* K12 */ be_nested_str(_X2F_X3Frst_X3D), + /* K13 */ be_nested_str(zip), + /* K14 */ be_nested_str(CFG_X3A_X20removing_X20autoconf_X20files), + /* K15 */ be_nested_str(delete_all_configs), + /* K16 */ be_nested_str(arg), + /* K17 */ be_nested_str(reset), + /* K18 */ be_nested_str(format), + /* K19 */ be_nested_str(https_X3A_X2F_X2Fraw_X2Egithubusercontent_X2Ecom_X2Ftasmota_X2Fautoconf_X2Fmain_X2F_X25s_X2F_X25s_X2Eautoconf), + /* K20 */ be_nested_str(arch), + /* K21 */ be_nested_str(CFG_X3A_X20downloading_X20_X27_X25s_X27), + /* K22 */ be_nested_str(_X25s_X2Eautoconf), + /* K23 */ be_nested_str(webclient), + /* K24 */ be_nested_str(begin), + /* K25 */ be_nested_str(GET), + /* K26 */ be_nested_str(return_X20code_X3D_X25i), + /* K27 */ be_nested_str(connection_error), + /* K28 */ be_nested_str(write_file), + /* K29 */ be_nested_str(close), + /* K30 */ be_nested_str(value_error), + /* K31 */ be_nested_str(Unknown_X20command), + /* K32 */ be_nested_str(CFG_X3A_X20Exception_X3E_X20_X27_X25s_X27_X20_X2D_X20_X25s), + /* K33 */ be_nested_str(content_start), + /* K34 */ be_nested_str(Parameter_X20error), + /* K35 */ be_nested_str(content_send_style), + /* K36 */ be_nested_str(content_send), + /* K37 */ be_nested_str(_X3Cp_X20style_X3D_X27width_X3A340px_X3B_X27_X3E_X3Cb_X3EException_X3A_X3C_X2Fb_X3E_X3Cbr_X3E_X27_X25s_X27_X3Cbr_X3E_X25s_X3C_X2Fp_X3E), + /* K38 */ be_nested_str(content_button), + /* K39 */ be_nested_str(BUTTON_CONFIGURATION), + /* K40 */ be_nested_str(content_stop), }), - (be_nested_const_str("page_autoconf_ctl", -1841585800, 17)), - ((bstring*) &be_const_str_input), + &be_const_str_page_autoconf_ctl, + &be_const_str_solidified, ( &(const binstruction[117]) { /* code */ 0xA4060000, // 0000 IMPORT R1 K0 0xA40A0200, // 0001 IMPORT R2 K1 @@ -192,7 +192,7 @@ be_local_closure(page_autoconf_ctl, /* name */ /******************************************************************** ** Solidified function: autoexec ********************************************************************/ -be_local_closure(autoexec, /* name */ +be_local_closure(Autoconf_autoexec, /* name */ be_nested_proto( 9, /* nstack */ 1, /* argc */ @@ -203,41 +203,41 @@ be_local_closure(autoexec, /* name */ NULL, /* no sub protos */ 1, /* has constants */ ( &(const bvalue[32]) { /* constants */ - /* K0 */ be_nested_string("_archive", -290407892, 8), - /* K1 */ be_nested_string("path", -2071507658, 4), - /* K2 */ be_nested_string("#init.bat", -997372219, 9), - /* K3 */ be_nested_string("is_first_time", 275242384, 13), - /* K4 */ be_nested_string("exists", 1002329533, 6), - /* K5 */ be_nested_string("set_first_time", -1183719746, 14), - /* K6 */ be_nested_string("run_bat", -1758063998, 7), - /* K7 */ be_nested_string("tasmota", 424643812, 7), - /* K8 */ be_nested_string("log", 1062293841, 3), - /* K9 */ be_nested_string("CFG: 'init.bat' done, restarting", 1569670677, 32), + /* K0 */ be_nested_str(_archive), + /* K1 */ be_nested_str(path), + /* K2 */ be_nested_str(_X23init_X2Ebat), + /* K3 */ be_nested_str(is_first_time), + /* K4 */ be_nested_str(exists), + /* K5 */ be_nested_str(set_first_time), + /* K6 */ be_nested_str(run_bat), + /* K7 */ be_nested_str(tasmota), + /* K8 */ be_nested_str(log), + /* K9 */ be_nested_str(CFG_X3A_X20_X27init_X2Ebat_X27_X20done_X2C_X20restarting), /* K10 */ be_const_int(2), - /* K11 */ be_nested_string("cmd", -158181397, 3), - /* K12 */ be_nested_string("Restart 1", -790511441, 9), - /* K13 */ be_nested_string("#display.ini", 182218220, 12), - /* K14 */ be_nested_string("gpio", -1656812038, 4), - /* K15 */ be_nested_string("pin_used", -261112684, 8), - /* K16 */ be_nested_string("OPTION_A", 1133299440, 8), - /* K17 */ be_nested_string("display.ini", -1648793295, 11), - /* K18 */ be_nested_string("CFG: skipping 'display.ini' because already present in file-system", -329418032, 66), - /* K19 */ be_nested_string("display", 1164572437, 7), - /* K20 */ be_nested_string("r", -150190315, 1), - /* K21 */ be_nested_string("read", -824204347, 4), - /* K22 */ be_nested_string("close", 667630371, 5), - /* K23 */ be_nested_string("start", 1697318111, 5), - /* K24 */ be_nested_string("#autoexec.bat", -912076799, 13), - /* K25 */ be_nested_string("CFG: running ", -1816632762, 13), + /* K11 */ be_nested_str(cmd), + /* K12 */ be_nested_str(Restart_X201), + /* K13 */ be_nested_str(_X23display_X2Eini), + /* K14 */ be_nested_str(gpio), + /* K15 */ be_nested_str(pin_used), + /* K16 */ be_nested_str(OPTION_A), + /* K17 */ be_nested_str(display_X2Eini), + /* K18 */ be_nested_str(CFG_X3A_X20skipping_X20_X27display_X2Eini_X27_X20because_X20already_X20present_X20in_X20file_X2Dsystem), + /* K19 */ be_nested_str(display), + /* K20 */ be_nested_str(r), + /* K21 */ be_nested_str(read), + /* K22 */ be_nested_str(close), + /* K23 */ be_nested_str(start), + /* K24 */ be_nested_str(_X23autoexec_X2Ebat), + /* K25 */ be_nested_str(CFG_X3A_X20running_X20), /* K26 */ be_const_int(3), - /* K27 */ be_nested_string("CFG: ran ", -715396824, 10), - /* K28 */ be_nested_string("#autoexec.be", 1181757091, 12), - /* K29 */ be_nested_string("CFG: loading ", -284605793, 13), - /* K30 */ be_nested_string("load", -435725847, 4), - /* K31 */ be_nested_string("CFG: loaded ", -584693758, 13), + /* K27 */ be_nested_str(CFG_X3A_X20ran_X20_X20), + /* K28 */ be_nested_str(_X23autoexec_X2Ebe), + /* K29 */ be_nested_str(CFG_X3A_X20loading_X20), + /* K30 */ be_nested_str(load), + /* K31 */ be_nested_str(CFG_X3A_X20loaded_X20_X20), }), - (be_nested_const_str("autoexec", -618105405, 8)), - ((bstring*) &be_const_str_input), + &be_const_str_autoexec, + &be_const_str_solidified, ( &(const binstruction[107]) { /* code */ 0x88040100, // 0000 GETMBR R1 R0 K0 0x4C080000, // 0001 LDNIL R2 @@ -355,7 +355,7 @@ be_local_closure(autoexec, /* name */ /******************************************************************** ** Solidified function: run_bat ********************************************************************/ -be_local_closure(run_bat, /* name */ +be_local_closure(Autoconf_run_bat, /* name */ be_nested_proto( 13, /* nstack */ 2, /* argc */ @@ -366,19 +366,19 @@ be_local_closure(run_bat, /* name */ NULL, /* no sub protos */ 1, /* has constants */ ( &(const bvalue[10]) { /* constants */ - /* K0 */ be_nested_string("string", 398550328, 6), - /* K1 */ be_nested_string("r", -150190315, 1), - /* K2 */ be_nested_string("readline", 1212709927, 8), + /* K0 */ be_nested_str(string), + /* K1 */ be_nested_str(r), + /* K2 */ be_nested_str(readline), /* K3 */ be_const_int(0), - /* K4 */ be_nested_string("\n", 252472541, 1), - /* K5 */ be_nested_string("tasmota", 424643812, 7), - /* K6 */ be_nested_string("cmd", -158181397, 3), - /* K7 */ be_nested_string("close", 667630371, 5), - /* K8 */ be_nested_string("format", -1180859054, 6), - /* K9 */ be_nested_string("CFG: could not run %s (%s - %s)", 1428829580, 31), + /* K4 */ be_nested_str(_X0A), + /* K5 */ be_nested_str(tasmota), + /* K6 */ be_nested_str(cmd), + /* K7 */ be_nested_str(close), + /* K8 */ be_nested_str(format), + /* K9 */ be_nested_str(CFG_X3A_X20could_X20not_X20run_X20_X25s_X20_X28_X25s_X20_X2D_X20_X25s_X29), }), - (be_nested_const_str("run_bat", -1758063998, 7)), - ((bstring*) &be_const_str_input), + &be_const_str_run_bat, + &be_const_str_solidified, ( &(const binstruction[54]) { /* code */ 0xA40A0000, // 0000 IMPORT R2 K0 0x4C0C0000, // 0001 LDNIL R3 @@ -443,7 +443,7 @@ be_local_closure(run_bat, /* name */ /******************************************************************** ** Solidified function: page_autoconf_mgr ********************************************************************/ -be_local_closure(page_autoconf_mgr, /* name */ +be_local_closure(Autoconf_page_autoconf_mgr, /* name */ be_nested_proto( 19, /* nstack */ 1, /* argc */ @@ -454,48 +454,48 @@ be_local_closure(page_autoconf_mgr, /* name */ NULL, /* no sub protos */ 1, /* has constants */ ( &(const bvalue[39]) { /* constants */ - /* K0 */ be_nested_string("webserver", 1572454038, 9), - /* K1 */ be_nested_string("string", 398550328, 6), - /* K2 */ be_nested_string("check_privileged_access", -602033328, 23), - /* K3 */ be_nested_string("content_start", -1357458227, 13), - /* K4 */ be_nested_string("Auto-configuration", 1665006109, 18), - /* K5 */ be_nested_string("content_send_style", 1087907647, 18), - /* K6 */ be_nested_string("content_send", 1673733649, 12), - /* K7 */ be_nested_string("

 (This feature requires an internet connection)

", -1575700810, 74), - /* K8 */ be_nested_string("get_current_module_path", -1088293888, 23), - /* K9 */ be_nested_string("tr", 1195724803, 2), - /* K10 */ be_nested_string("get_current_module_name", -1915696556, 23), - /* K11 */ be_nested_string("_", -636741266, 1), - /* K12 */ be_nested_string(" ", 621580159, 1), - /* K13 */ be_nested_string("_error", 1132109656, 6), - /* K14 */ be_nested_string("<Error: apply new or remove>", -1439459347, 34), - /* K15 */ be_nested_string("<None>", -1692801798, 12), - /* K16 */ be_nested_string("
", 842307168, 77), - /* K17 */ be_nested_string("format", -1180859054, 6), - /* K18 */ be_nested_string(" Current auto-configuration", -82466516, 82), - /* K19 */ be_nested_string("

Current configuration:

%s

", -179311535, 46), - /* K20 */ be_nested_string("

", 232646018, 57), - /* K22 */ be_nested_string("", -1147033080, 82), - /* K23 */ be_nested_string("

", -748395557, 11), - /* K24 */ be_nested_string("

", 2052843416, 25), - /* K25 */ be_nested_string(" Select new auto-configuration", 1926223891, 80), - /* K26 */ be_nested_string("

", -502554737, 94), - /* K28 */ be_nested_string("
", 1336654704, 49), - /* K29 */ be_nested_string("

", 1863865923, 16), - /* K35 */ be_nested_string("", 1205771629, 72), - /* K36 */ be_nested_string("content_button", 1956476087, 14), - /* K37 */ be_nested_string("BUTTON_CONFIGURATION", 70820856, 20), - /* K38 */ be_nested_string("content_stop", 658554751, 12), + /* K0 */ be_nested_str(webserver), + /* K1 */ be_nested_str(string), + /* K2 */ be_nested_str(check_privileged_access), + /* K3 */ be_nested_str(content_start), + /* K4 */ be_nested_str(Auto_X2Dconfiguration), + /* K5 */ be_nested_str(content_send_style), + /* K6 */ be_nested_str(content_send), + /* K7 */ be_nested_str(_X3Cp_X3E_X3Csmall_X3E_X26nbsp_X3B_X28This_X20feature_X20requires_X20an_X20internet_X20connection_X29_X3C_X2Fsmall_X3E_X3C_X2Fp_X3E), + /* K8 */ be_nested_str(get_current_module_path), + /* K9 */ be_nested_str(tr), + /* K10 */ be_nested_str(get_current_module_name), + /* K11 */ be_nested_str(_), + /* K12 */ be_nested_str(_X20), + /* K13 */ be_nested_str(_error), + /* K14 */ be_nested_str(_X26lt_X3BError_X3A_X20apply_X20new_X20or_X20remove_X26gt_X3B), + /* K15 */ be_nested_str(_X26lt_X3BNone_X26gt_X3B), + /* K16 */ be_nested_str(_X3Cfieldset_X3E_X3Cstyle_X3E_X2Ebdis_X7Bbackground_X3A_X23888_X3B_X7D_X2Ebdis_X3Ahover_X7Bbackground_X3A_X23888_X3B_X7D_X3C_X2Fstyle_X3E), + /* K17 */ be_nested_str(format), + /* K18 */ be_nested_str(_X3Clegend_X3E_X3Cb_X20title_X3D_X27Autoconfiguration_X27_X3E_X26nbsp_X3BCurrent_X20auto_X2Dconfiguration_X3C_X2Fb_X3E_X3C_X2Flegend_X3E), + /* K19 */ be_nested_str(_X3Cp_X3ECurrent_X20configuration_X3A_X20_X3C_X2Fp_X3E_X3Cp_X3E_X3Cb_X3E_X25s_X3C_X2Fb_X3E_X3C_X2Fp_X3E), + /* K20 */ be_nested_str(_X3Cp_X3E_X3Cform_X20id_X3Dreapply_X20style_X3D_X27display_X3A_X20block_X3B_X27_X20action_X3D_X27_X2Fac_X27_X20method_X3D_X27post_X27_X20), + /* K21 */ be_nested_str(onsubmit_X3D_X27return_X20confirm_X28_X22This_X20will_X20cause_X20a_X20restart_X2E_X22_X29_X3B_X27_X3E), + /* K22 */ be_nested_str(_X3Cbutton_X20name_X3D_X27reapply_X27_X20class_X3D_X27button_X20bgrn_X27_X3ERe_X2Dapply_X20current_X20configuration_X3C_X2Fbutton_X3E), + /* K23 */ be_nested_str(_X3C_X2Fform_X3E_X3C_X2Fp_X3E), + /* K24 */ be_nested_str(_X3Cp_X3E_X3C_X2Fp_X3E_X3C_X2Ffieldset_X3E_X3Cp_X3E_X3C_X2Fp_X3E), + /* K25 */ be_nested_str(_X3Clegend_X3E_X3Cb_X20title_X3D_X27New_X20autoconf_X27_X3E_X26nbsp_X3BSelect_X20new_X20auto_X2Dconfiguration_X3C_X2Fb_X3E_X3C_X2Flegend_X3E), + /* K26 */ be_nested_str(_X3Cp_X3E_X3Cform_X20id_X3Dzip_X20style_X3D_X27display_X3A_X20block_X3B_X27_X20action_X3D_X27_X2Fac_X27_X20method_X3D_X27post_X27_X20), + /* K27 */ be_nested_str(onsubmit_X3D_X27return_X20confirm_X28_X22This_X20will_X20change_X20the_X20current_X20configuration_X20and_X20cause_X20a_X20restart_X2E_X22_X29_X3B_X27_X3E), + /* K28 */ be_nested_str(_X3Clabel_X3EChoose_X20a_X20device_X20configuration_X3A_X3C_X2Flabel_X3E_X3Cbr_X3E), + /* K29 */ be_nested_str(_X3Cselect_X20name_X3D_X27zip_X27_X3E), + /* K30 */ be_nested_str(load_templates), + /* K31 */ be_nested_str(_X3Coption_X20value_X3D_X27reset_X27_X3E_X26lt_X3BRemove_X20autoconf_X26gt_X3B_X3C_X2Foption_X3E), + /* K32 */ be_nested_str(_X3Coption_X20value_X3D_X27_X25s_X27_X3E_X25s_X3C_X2Foption_X3E), + /* K33 */ be_nested_str(stop_iteration), + /* K34 */ be_nested_str(_X3C_X2Fselect_X3E_X3Cp_X3E_X3C_X2Fp_X3E), + /* K35 */ be_nested_str(_X3Cbutton_X20name_X3D_X27zipapply_X27_X20class_X3D_X27button_X20bgrn_X27_X3EApply_X20configuration_X3C_X2Fbutton_X3E), + /* K36 */ be_nested_str(content_button), + /* K37 */ be_nested_str(BUTTON_CONFIGURATION), + /* K38 */ be_nested_str(content_stop), }), - (be_nested_const_str("page_autoconf_mgr", -651030265, 17)), - ((bstring*) &be_const_str_input), + &be_const_str_page_autoconf_mgr, + &be_const_str_solidified, ( &(const binstruction[124]) { /* code */ 0xA4060000, // 0000 IMPORT R1 K0 0xA40A0200, // 0001 IMPORT R2 K1 @@ -630,7 +630,7 @@ be_local_closure(page_autoconf_mgr, /* name */ /******************************************************************** ** Solidified function: get_current_module_name ********************************************************************/ -be_local_closure(get_current_module_name, /* name */ +be_local_closure(Autoconf_get_current_module_name, /* name */ be_nested_proto( 3, /* nstack */ 1, /* argc */ @@ -641,11 +641,11 @@ be_local_closure(get_current_module_name, /* name */ NULL, /* no sub protos */ 1, /* has constants */ ( &(const bvalue[ 2]) { /* constants */ - /* K0 */ be_nested_string("_archive", -290407892, 8), + /* K0 */ be_nested_str(_archive), /* K1 */ be_const_int(0), }), - (be_nested_const_str("get_current_module_name", -1915696556, 23)), - ((bstring*) &be_const_str_input), + &be_const_str_get_current_module_name, + &be_const_str_solidified, ( &(const binstruction[ 5]) { /* code */ 0x5405FFF5, // 0000 LDINT R1 -10 0x40060201, // 0001 CONNECT R1 K1 R1 @@ -661,7 +661,7 @@ be_local_closure(get_current_module_name, /* name */ /******************************************************************** ** Solidified function: delete_all_configs ********************************************************************/ -be_local_closure(delete_all_configs, /* name */ +be_local_closure(Autoconf_delete_all_configs, /* name */ be_nested_proto( 10, /* nstack */ 1, /* argc */ @@ -672,18 +672,18 @@ be_local_closure(delete_all_configs, /* name */ NULL, /* no sub protos */ 1, /* has constants */ ( &(const bvalue[ 9]) { /* constants */ - /* K0 */ be_nested_string("path", -2071507658, 4), - /* K1 */ be_nested_string("string", 398550328, 6), - /* K2 */ be_nested_string("listdir", 2005220720, 7), - /* K3 */ be_nested_string("/", 705468254, 1), - /* K4 */ be_nested_string("find", -1108310694, 4), - /* K5 */ be_nested_string(".autoconf", -1770288208, 9), + /* K0 */ be_nested_str(path), + /* K1 */ be_nested_str(string), + /* K2 */ be_nested_str(listdir), + /* K3 */ be_nested_str(_X2F), + /* K4 */ be_nested_str(find), + /* K5 */ be_nested_str(_X2Eautoconf), /* K6 */ be_const_int(0), - /* K7 */ be_nested_string("remove", -611183107, 6), - /* K8 */ be_nested_string("stop_iteration", -121173395, 14), + /* K7 */ be_nested_str(remove), + /* K8 */ be_nested_str(stop_iteration), }), - (be_nested_const_str("delete_all_configs", -1912899718, 18)), - ((bstring*) &be_const_str_input), + &be_const_str_delete_all_configs, + &be_const_str_solidified, ( &(const binstruction[25]) { /* code */ 0xA4060000, // 0000 IMPORT R1 K0 0xA40A0200, // 0001 IMPORT R2 K1 @@ -719,7 +719,7 @@ be_local_closure(delete_all_configs, /* name */ /******************************************************************** ** Solidified function: set_first_time ********************************************************************/ -be_local_closure(set_first_time, /* name */ +be_local_closure(Autoconf_set_first_time, /* name */ be_nested_proto( 4, /* nstack */ 1, /* argc */ @@ -730,12 +730,12 @@ be_local_closure(set_first_time, /* name */ NULL, /* no sub protos */ 1, /* has constants */ ( &(const bvalue[ 3]) { /* constants */ - /* K0 */ be_nested_string("/.autoconf", -2082892903, 10), - /* K1 */ be_nested_string("w", -234078410, 1), - /* K2 */ be_nested_string("close", 667630371, 5), + /* K0 */ be_nested_str(_X2F_X2Eautoconf), + /* K1 */ be_nested_str(w), + /* K2 */ be_nested_str(close), }), - (be_nested_const_str("set_first_time", -1183719746, 14)), - ((bstring*) &be_const_str_input), + &be_const_str_set_first_time, + &be_const_str_solidified, ( &(const binstruction[ 7]) { /* code */ 0x60040011, // 0000 GETGBL R1 G17 0x58080000, // 0001 LDCONST R2 K0 @@ -753,7 +753,7 @@ be_local_closure(set_first_time, /* name */ /******************************************************************** ** Solidified function: load_templates ********************************************************************/ -be_local_closure(load_templates, /* name */ +be_local_closure(Autoconf_load_templates, /* name */ be_nested_proto( 15, /* nstack */ 1, /* argc */ @@ -764,30 +764,30 @@ be_local_closure(load_templates, /* name */ NULL, /* no sub protos */ 1, /* has constants */ ( &(const bvalue[21]) { /* constants */ - /* K0 */ be_nested_string("string", 398550328, 6), - /* K1 */ be_nested_string("json", 916562499, 4), - /* K2 */ be_nested_string("format", -1180859054, 6), - /* K3 */ be_nested_string("https://raw.githubusercontent.com/tasmota/autoconf/main/%s_manifest.json", -637415251, 72), - /* K4 */ be_nested_string("tasmota", 424643812, 7), - /* K5 */ be_nested_string("arch", -1342162999, 4), - /* K6 */ be_nested_string("log", 1062293841, 3), - /* K7 */ be_nested_string("CFG: loading '%s'", -2009661199, 17), + /* K0 */ be_nested_str(string), + /* K1 */ be_nested_str(json), + /* K2 */ be_nested_str(format), + /* K3 */ be_nested_str(https_X3A_X2F_X2Fraw_X2Egithubusercontent_X2Ecom_X2Ftasmota_X2Fautoconf_X2Fmain_X2F_X25s_manifest_X2Ejson), + /* K4 */ be_nested_str(tasmota), + /* K5 */ be_nested_str(arch), + /* K6 */ be_nested_str(log), + /* K7 */ be_nested_str(CFG_X3A_X20loading_X20_X27_X25s_X27), /* K8 */ be_const_int(3), - /* K9 */ be_nested_string("webclient", -218578150, 9), - /* K10 */ be_nested_string("begin", 1748273790, 5), - /* K11 */ be_nested_string("GET", -1763262857, 3), - /* K12 */ be_nested_string("CFG: return_code=%i", 2059897320, 19), + /* K9 */ be_nested_str(webclient), + /* K10 */ be_nested_str(begin), + /* K11 */ be_nested_str(GET), + /* K12 */ be_nested_str(CFG_X3A_X20return_code_X3D_X25i), /* K13 */ be_const_int(2), - /* K14 */ be_nested_string("get_string", -99119327, 10), - /* K15 */ be_nested_string("close", 667630371, 5), - /* K16 */ be_nested_string("load", -435725847, 4), - /* K17 */ be_nested_string("CFG: loaded '%s'", 1699028828, 16), - /* K18 */ be_nested_string("find", -1108310694, 4), - /* K19 */ be_nested_string("files", 1055342736, 5), - /* K20 */ be_nested_string("CFG: exception '%s' - '%s'", -199559383, 26), + /* K14 */ be_nested_str(get_string), + /* K15 */ be_nested_str(close), + /* K16 */ be_nested_str(load), + /* K17 */ be_nested_str(CFG_X3A_X20loaded_X20_X27_X25s_X27), + /* K18 */ be_nested_str(find), + /* K19 */ be_nested_str(files), + /* K20 */ be_nested_str(CFG_X3A_X20exception_X20_X27_X25s_X27_X20_X2D_X20_X27_X25s_X27), }), - (be_nested_const_str("load_templates", -781097163, 14)), - ((bstring*) &be_const_str_input), + &be_const_str_load_templates, + &be_const_str_solidified, ( &(const binstruction[86]) { /* code */ 0xA4060000, // 0000 IMPORT R1 K0 0xA40A0200, // 0001 IMPORT R2 K1 @@ -884,7 +884,7 @@ be_local_closure(load_templates, /* name */ /******************************************************************** ** Solidified function: web_add_config_button ********************************************************************/ -be_local_closure(web_add_config_button, /* name */ +be_local_closure(Autoconf_web_add_config_button, /* name */ be_nested_proto( 5, /* nstack */ 1, /* argc */ @@ -895,12 +895,12 @@ be_local_closure(web_add_config_button, /* name */ NULL, /* no sub protos */ 1, /* has constants */ ( &(const bvalue[ 3]) { /* constants */ - /* K0 */ be_nested_string("webserver", 1572454038, 9), - /* K1 */ be_nested_string("content_send", 1673733649, 12), - /* K2 */ be_nested_string("

", 452285201, 120), + /* K0 */ be_nested_str(webserver), + /* K1 */ be_nested_str(content_send), + /* K2 */ be_nested_str(_X3Cp_X3E_X3Cform_X20id_X3Dac_X20action_X3D_X27ac_X27_X20style_X3D_X27display_X3A_X20block_X3B_X27_X20method_X3D_X27get_X27_X3E_X3Cbutton_X3E_X26_X23129668_X3B_X20Auto_X2Dconfiguration_X3C_X2Fbutton_X3E_X3C_X2Fform_X3E_X3C_X2Fp_X3E), }), - (be_nested_const_str("web_add_config_button", 639674325, 21)), - ((bstring*) &be_const_str_input), + &be_const_str_web_add_config_button, + &be_const_str_solidified, ( &(const binstruction[ 5]) { /* code */ 0xA4060000, // 0000 IMPORT R1 K0 0x8C080301, // 0001 GETMET R2 R1 K1 @@ -916,7 +916,7 @@ be_local_closure(web_add_config_button, /* name */ /******************************************************************** ** Solidified function: is_first_time ********************************************************************/ -be_local_closure(is_first_time, /* name */ +be_local_closure(Autoconf_is_first_time, /* name */ be_nested_proto( 5, /* nstack */ 1, /* argc */ @@ -927,12 +927,12 @@ be_local_closure(is_first_time, /* name */ NULL, /* no sub protos */ 1, /* has constants */ ( &(const bvalue[ 3]) { /* constants */ - /* K0 */ be_nested_string("path", -2071507658, 4), - /* K1 */ be_nested_string("exists", 1002329533, 6), - /* K2 */ be_nested_string("/.autoconf", -2082892903, 10), + /* K0 */ be_nested_str(path), + /* K1 */ be_nested_str(exists), + /* K2 */ be_nested_str(_X2F_X2Eautoconf), }), - (be_nested_const_str("is_first_time", 275242384, 13)), - ((bstring*) &be_const_str_input), + &be_const_str_is_first_time, + &be_const_str_solidified, ( &(const binstruction[ 8]) { /* code */ 0xA4060000, // 0000 IMPORT R1 K0 0x8C080301, // 0001 GETMET R2 R1 K1 @@ -951,7 +951,7 @@ be_local_closure(is_first_time, /* name */ /******************************************************************** ** Solidified function: init ********************************************************************/ -be_local_closure(init, /* name */ +be_local_closure(Autoconf_init, /* name */ be_nested_proto( 12, /* nstack */ 1, /* argc */ @@ -962,26 +962,26 @@ be_local_closure(init, /* name */ NULL, /* no sub protos */ 1, /* has constants */ ( &(const bvalue[17]) { /* constants */ - /* K0 */ be_nested_str_literal("path"), - /* K1 */ be_nested_str_literal("string"), - /* K2 */ be_nested_str_literal("listdir"), - /* K3 */ be_nested_str_literal("/"), - /* K4 */ be_nested_str_literal("tasmota"), - /* K5 */ be_nested_str_literal("add_driver"), + /* K0 */ be_nested_str(path), + /* K1 */ be_nested_str(string), + /* K2 */ be_nested_str(listdir), + /* K3 */ be_nested_str(_X2F), + /* K4 */ be_nested_str(tasmota), + /* K5 */ be_nested_str(add_driver), /* K6 */ be_const_int(0), - /* K7 */ be_nested_str_literal("find"), - /* K8 */ be_nested_str_literal(".autoconf"), - /* K9 */ be_nested_str_literal("format"), - /* K10 */ be_nested_str_literal("CFG: multiple autoconf files found, aborting ('%s' + '%s')"), - /* K11 */ be_nested_str_literal("_error"), + /* K7 */ be_nested_str(find), + /* K8 */ be_nested_str(_X2Eautoconf), + /* K9 */ be_nested_str(format), + /* K10 */ be_nested_str(CFG_X3A_X20multiple_X20autoconf_X20files_X20found_X2C_X20aborting_X20_X28_X27_X25s_X27_X20_X2B_X20_X27_X25s_X27_X29), + /* K11 */ be_nested_str(_error), /* K12 */ be_const_int(1), - /* K13 */ be_nested_str_literal("log"), - /* K14 */ be_nested_str_literal("CFG: no '*.autoconf' file found"), + /* K13 */ be_nested_str(log), + /* K14 */ be_nested_str(CFG_X3A_X20no_X20_X27_X2A_X2Eautoconf_X27_X20file_X20found), /* K15 */ be_const_int(2), - /* K16 */ be_nested_str_literal("_archive"), + /* K16 */ be_nested_str(_archive), }), - (be_nested_const_str("init", 380752755, 4)), - ((bstring*) &be_const_str_input), + &be_const_str_init, + &be_const_str_solidified, ( &(const binstruction[51]) { /* code */ 0xA4060000, // 0000 IMPORT R1 K0 0xA40A0200, // 0001 IMPORT R2 K1 @@ -1043,7 +1043,7 @@ be_local_closure(init, /* name */ /******************************************************************** ** Solidified function: preinit ********************************************************************/ -be_local_closure(preinit, /* name */ +be_local_closure(Autoconf_preinit, /* name */ be_nested_proto( 7, /* nstack */ 1, /* argc */ @@ -1054,19 +1054,19 @@ be_local_closure(preinit, /* name */ NULL, /* no sub protos */ 1, /* has constants */ ( &(const bvalue[10]) { /* constants */ - /* K0 */ be_nested_string("_archive", -290407892, 8), - /* K1 */ be_nested_string("path", -2071507658, 4), - /* K2 */ be_nested_string("#preinit.be", 687035716, 11), - /* K3 */ be_nested_string("exists", 1002329533, 6), - /* K4 */ be_nested_string("tasmota", 424643812, 7), - /* K5 */ be_nested_string("log", 1062293841, 3), - /* K6 */ be_nested_string("CFG: loading ", -284605793, 13), + /* K0 */ be_nested_str(_archive), + /* K1 */ be_nested_str(path), + /* K2 */ be_nested_str(_X23preinit_X2Ebe), + /* K3 */ be_nested_str(exists), + /* K4 */ be_nested_str(tasmota), + /* K5 */ be_nested_str(log), + /* K6 */ be_nested_str(CFG_X3A_X20loading_X20), /* K7 */ be_const_int(3), - /* K8 */ be_nested_string("load", -435725847, 4), - /* K9 */ be_nested_string("CFG: loaded ", -584693758, 13), + /* K8 */ be_nested_str(load), + /* K9 */ be_nested_str(CFG_X3A_X20loaded_X20_X20), }), - (be_nested_const_str("preinit", -1572960196, 7)), - ((bstring*) &be_const_str_input), + &be_const_str_preinit, + &be_const_str_solidified, ( &(const binstruction[26]) { /* code */ 0x88040100, // 0000 GETMBR R1 R0 K0 0x4C080000, // 0001 LDNIL R2 @@ -1103,7 +1103,7 @@ be_local_closure(preinit, /* name */ /******************************************************************** ** Solidified function: reset ********************************************************************/ -be_local_closure(reset, /* name */ +be_local_closure(Autoconf_reset, /* name */ be_nested_proto( 12, /* nstack */ 1, /* argc */ @@ -1114,22 +1114,22 @@ be_local_closure(reset, /* name */ NULL, /* no sub protos */ 1, /* has constants */ ( &(const bvalue[13]) { /* constants */ - /* K0 */ be_nested_string("path", -2071507658, 4), - /* K1 */ be_nested_string("string", 398550328, 6), - /* K2 */ be_nested_string("listdir", 2005220720, 7), - /* K3 */ be_nested_string("/", 705468254, 1), + /* K0 */ be_nested_str(path), + /* K1 */ be_nested_str(string), + /* K2 */ be_nested_str(listdir), + /* K3 */ be_nested_str(_X2F), /* K4 */ be_const_int(0), - /* K5 */ be_nested_string("find", -1108310694, 4), - /* K6 */ be_nested_string(".autoconf", -1770288208, 9), - /* K7 */ be_nested_string("remove", -611183107, 6), - /* K8 */ be_nested_string("format", -1180859054, 6), - /* K9 */ be_nested_string("CFG: removed file '%s'", 2048602473, 22), + /* K5 */ be_nested_str(find), + /* K6 */ be_nested_str(_X2Eautoconf), + /* K7 */ be_nested_str(remove), + /* K8 */ be_nested_str(format), + /* K9 */ be_nested_str(CFG_X3A_X20removed_X20file_X20_X27_X25s_X27), /* K10 */ be_const_int(1), - /* K11 */ be_nested_string("_archive", -290407892, 8), - /* K12 */ be_nested_string("_error", 1132109656, 6), + /* K11 */ be_nested_str(_archive), + /* K12 */ be_nested_str(_error), }), - (be_nested_const_str("reset", 1695364032, 5)), - ((bstring*) &be_const_str_input), + &be_const_str_reset, + &be_const_str_solidified, ( &(const binstruction[35]) { /* code */ 0xA4060000, // 0000 IMPORT R1 K0 0xA40A0200, // 0001 IMPORT R2 K1 @@ -1175,7 +1175,7 @@ be_local_closure(reset, /* name */ /******************************************************************** ** Solidified function: web_add_handler ********************************************************************/ -be_local_closure(web_add_handler, /* name */ +be_local_closure(Autoconf_web_add_handler, /* name */ be_nested_proto( 7, /* nstack */ 1, /* argc */ @@ -1196,10 +1196,10 @@ be_local_closure(web_add_handler, /* name */ NULL, /* no sub protos */ 1, /* has constants */ ( &(const bvalue[ 1]) { /* constants */ - /* K0 */ be_nested_string("page_autoconf_mgr", -651030265, 17), + /* K0 */ be_nested_str(page_autoconf_mgr), }), - (be_nested_const_str("", 607256038, 8)), - ((bstring*) &be_const_str_input), + &be_const_str__X3Clambda_X3E, + &be_const_str_solidified, ( &(const binstruction[ 4]) { /* code */ 0x68000000, // 0000 GETUPV R0 U0 0x8C000100, // 0001 GETMET R0 R0 K0 @@ -1219,10 +1219,10 @@ be_local_closure(web_add_handler, /* name */ NULL, /* no sub protos */ 1, /* has constants */ ( &(const bvalue[ 1]) { /* constants */ - /* K0 */ be_nested_string("page_autoconf_ctl", -1841585800, 17), + /* K0 */ be_nested_str(page_autoconf_ctl), }), - (be_nested_const_str("", 607256038, 8)), - ((bstring*) &be_const_str_input), + &be_const_str__X3Clambda_X3E, + &be_const_str_solidified, ( &(const binstruction[ 4]) { /* code */ 0x68000000, // 0000 GETUPV R0 U0 0x8C000100, // 0001 GETMET R0 R0 K0 @@ -1233,14 +1233,14 @@ be_local_closure(web_add_handler, /* name */ }), 1, /* has constants */ ( &(const bvalue[ 5]) { /* constants */ - /* K0 */ be_nested_string("webserver", 1572454038, 9), - /* K1 */ be_nested_string("on", 1630810064, 2), - /* K2 */ be_nested_string("/ac", -390315318, 3), - /* K3 */ be_nested_string("HTTP_GET", 1722467738, 8), - /* K4 */ be_nested_string("HTTP_POST", 1999554144, 9), + /* K0 */ be_nested_str(webserver), + /* K1 */ be_nested_str(on), + /* K2 */ be_nested_str(_X2Fac), + /* K3 */ be_nested_str(HTTP_GET), + /* K4 */ be_nested_str(HTTP_POST), }), - (be_nested_const_str("web_add_handler", -304792334, 15)), - ((bstring*) &be_const_str_input), + &be_const_str_web_add_handler, + &be_const_str_solidified, ( &(const binstruction[13]) { /* code */ 0xA4060000, // 0000 IMPORT R1 K0 0x8C080301, // 0001 GETMET R2 R1 K1 @@ -1264,7 +1264,7 @@ be_local_closure(web_add_handler, /* name */ /******************************************************************** ** Solidified function: clear_first_time ********************************************************************/ -be_local_closure(clear_first_time, /* name */ +be_local_closure(Autoconf_clear_first_time, /* name */ be_nested_proto( 5, /* nstack */ 1, /* argc */ @@ -1275,12 +1275,12 @@ be_local_closure(clear_first_time, /* name */ NULL, /* no sub protos */ 1, /* has constants */ ( &(const bvalue[ 3]) { /* constants */ - /* K0 */ be_nested_string("path", -2071507658, 4), - /* K1 */ be_nested_string("remove", -611183107, 6), - /* K2 */ be_nested_string("/.autoconf", -2082892903, 10), + /* K0 */ be_nested_str(path), + /* K1 */ be_nested_str(remove), + /* K2 */ be_nested_str(_X2F_X2Eautoconf), }), - (be_nested_const_str("clear_first_time", 632769909, 16)), - ((bstring*) &be_const_str_input), + &be_const_str_clear_first_time, + &be_const_str_solidified, ( &(const binstruction[ 5]) { /* code */ 0xA4060000, // 0000 IMPORT R1 K0 0x8C080301, // 0001 GETMET R2 R1 K1 @@ -1296,7 +1296,7 @@ be_local_closure(clear_first_time, /* name */ /******************************************************************** ** Solidified function: get_current_module_path ********************************************************************/ -be_local_closure(get_current_module_path, /* name */ +be_local_closure(Autoconf_get_current_module_path, /* name */ be_nested_proto( 2, /* nstack */ 1, /* argc */ @@ -1307,10 +1307,10 @@ be_local_closure(get_current_module_path, /* name */ NULL, /* no sub protos */ 1, /* has constants */ ( &(const bvalue[ 1]) { /* constants */ - /* K0 */ be_nested_string("_archive", -290407892, 8), + /* K0 */ be_nested_str(_archive), }), - (be_nested_const_str("get_current_module_path", -1088293888, 23)), - ((bstring*) &be_const_str_input), + &be_const_str_get_current_module_path, + &be_const_str_solidified, ( &(const binstruction[ 2]) { /* code */ 0x88040100, // 0000 GETMBR R1 R0 K0 0x80040200, // 0001 RET 1 R1 @@ -1328,26 +1328,26 @@ be_local_class(Autoconf, NULL, be_nested_map(18, ( (struct bmapnode*) &(const bmapnode[]) { - { be_nested_key("page_autoconf_ctl", -1841585800, 17, -1), be_const_closure(page_autoconf_ctl_closure) }, - { be_nested_key("autoexec", -618105405, 8, -1), be_const_closure(autoexec_closure) }, - { be_nested_key("run_bat", -1758063998, 7, 6), be_const_closure(run_bat_closure) }, - { be_nested_key("page_autoconf_mgr", -651030265, 17, -1), be_const_closure(page_autoconf_mgr_closure) }, - { be_nested_key("get_current_module_name", -1915696556, 23, -1), be_const_closure(get_current_module_name_closure) }, - { be_nested_key("delete_all_configs", -1912899718, 18, 13), be_const_closure(delete_all_configs_closure) }, - { be_nested_key("set_first_time", -1183719746, 14, -1), be_const_closure(set_first_time_closure) }, - { be_nested_key("load_templates", -781097163, 14, -1), be_const_closure(load_templates_closure) }, - { be_nested_key("_archive", -290407892, 8, -1), be_const_var(0) }, - { be_nested_key("web_add_config_button", 639674325, 21, -1), be_const_closure(web_add_config_button_closure) }, - { be_nested_key("is_first_time", 275242384, 13, -1), be_const_closure(is_first_time_closure) }, - { be_nested_key("init", 380752755, 4, -1), be_const_closure(init_closure) }, - { be_nested_key("preinit", -1572960196, 7, 5), be_const_closure(preinit_closure) }, - { be_nested_key("reset", 1695364032, 5, 17), be_const_closure(reset_closure) }, - { be_nested_key("web_add_handler", -304792334, 15, 4), be_const_closure(web_add_handler_closure) }, - { be_nested_key("clear_first_time", 632769909, 16, 11), be_const_closure(clear_first_time_closure) }, - { be_nested_key("_error", 1132109656, 6, -1), be_const_var(1) }, - { be_nested_key("get_current_module_path", -1088293888, 23, -1), be_const_closure(get_current_module_path_closure) }, + { be_const_key(page_autoconf_ctl, -1), be_const_closure(Autoconf_page_autoconf_ctl_closure) }, + { be_const_key(autoexec, -1), be_const_closure(Autoconf_autoexec_closure) }, + { be_const_key(run_bat, 17), be_const_closure(Autoconf_run_bat_closure) }, + { be_const_key(page_autoconf_mgr, -1), be_const_closure(Autoconf_page_autoconf_mgr_closure) }, + { be_const_key(get_current_module_path, 13), be_const_closure(Autoconf_get_current_module_path_closure) }, + { be_const_key(preinit, -1), be_const_closure(Autoconf_preinit_closure) }, + { be_const_key(clear_first_time, -1), be_const_closure(Autoconf_clear_first_time_closure) }, + { be_const_key(load_templates, -1), be_const_closure(Autoconf_load_templates_closure) }, + { be_const_key(_archive, -1), be_const_var(0) }, + { be_const_key(web_add_config_button, -1), be_const_closure(Autoconf_web_add_config_button_closure) }, + { be_const_key(is_first_time, -1), be_const_closure(Autoconf_is_first_time_closure) }, + { be_const_key(web_add_handler, -1), be_const_closure(Autoconf_web_add_handler_closure) }, + { be_const_key(delete_all_configs, 4), be_const_closure(Autoconf_delete_all_configs_closure) }, + { be_const_key(reset, 5), be_const_closure(Autoconf_reset_closure) }, + { be_const_key(get_current_module_name, 11), be_const_closure(Autoconf_get_current_module_name_closure) }, + { be_const_key(init, 6), be_const_closure(Autoconf_init_closure) }, + { be_const_key(_error, -1), be_const_var(1) }, + { be_const_key(set_first_time, -1), be_const_closure(Autoconf_set_first_time_closure) }, })), - (be_nested_const_str("Autoconf", 984011268, 8)) + be_str_literal("Autoconf") ); /******************************************************************** @@ -1366,8 +1366,8 @@ be_local_closure(_anonymous_, /* name */ ( &(const bvalue[ 1]) { /* constants */ /* K0 */ be_const_class(be_class_Autoconf), }), - (be_nested_const_str("_anonymous_", 1957281476, 11)), - ((bstring*) &be_const_str_input), + &be_const_str__anonymous_, + &be_const_str_solidified, ( &(const binstruction[ 5]) { /* code */ 0x58040000, // 0000 LDCONST R1 K0 0xB4000000, // 0001 CLASS K0 @@ -1387,7 +1387,7 @@ be_local_module(autoconf, "autoconf", be_nested_map(1, ( (struct bmapnode*) &(const bmapnode[]) { - { be_nested_key("init", 380752755, 4, -1), be_const_closure(_anonymous__closure) }, + { be_const_key(init, -1), be_const_closure(_anonymous__closure) }, })) ); BE_EXPORT_VARIABLE be_define_const_native_module(autoconf); diff --git a/lib/libesp32/Berry/default/be_crypto_lib.c b/lib/libesp32/berry/default/be_crypto_lib.c similarity index 100% rename from lib/libesp32/Berry/default/be_crypto_lib.c rename to lib/libesp32/berry/default/be_crypto_lib.c diff --git a/lib/libesp32/Berry/default/be_ctypes.c b/lib/libesp32/berry/default/be_ctypes.c similarity index 100% rename from lib/libesp32/Berry/default/be_ctypes.c rename to lib/libesp32/berry/default/be_ctypes.c diff --git a/lib/libesp32/Berry/default/be_display_lib.c b/lib/libesp32/berry/default/be_display_lib.c similarity index 86% rename from lib/libesp32/Berry/default/be_display_lib.c rename to lib/libesp32/berry/default/be_display_lib.c index 2d8bf9ff7..3943396fc 100644 --- a/lib/libesp32/Berry/default/be_display_lib.c +++ b/lib/libesp32/berry/default/be_display_lib.c @@ -11,7 +11,7 @@ // Tasmota specific -extern int be_disp_start(bvm *vm); +extern int be_ntv_display_start(bvm *vm); /******************************************************************** ** Solidified module: display @@ -20,7 +20,7 @@ be_local_module(display, "display", be_nested_map(1, ( (struct bmapnode*) &(const bmapnode[]) { - { be_nested_key("start", 1697318111, 5, -1), be_const_func(be_disp_start) }, + { be_const_key(start, -1), be_const_func(be_ntv_display_start) }, })) ); BE_EXPORT_VARIABLE be_define_const_native_module(display); diff --git a/lib/libesp32/berry/default/be_driverlib.c b/lib/libesp32/berry/default/be_driverlib.c new file mode 100644 index 000000000..0d163f836 --- /dev/null +++ b/lib/libesp32/berry/default/be_driverlib.c @@ -0,0 +1,100 @@ +/******************************************************************** + * Tasmota lib + * + * To use: `d = Driver()` + * + *******************************************************************/ +#include "be_constobj.h" + +/******************************************************************** +** Solidified function: add_cmd +********************************************************************/ +be_local_closure(Driver_add_cmd, /* name */ + be_nested_proto( + 7, /* nstack */ + 3, /* argc */ + 0, /* varg */ + 0, /* has upvals */ + NULL, /* no upvals */ + 1, /* has sup protos */ + ( &(const struct bproto*[ 1]) { + be_nested_proto( + 10, /* nstack */ + 4, /* argc */ + 0, /* varg */ + 1, /* has upvals */ + ( &(const bupvaldesc[ 2]) { /* upvals */ + be_local_const_upval(1, 2), + be_local_const_upval(1, 0), + }), + 0, /* has sup protos */ + NULL, /* no sub protos */ + 0, /* has constants */ + NULL, /* no const */ + &be_const_str__X3Clambda_X3E, + &be_const_str_solidified, + ( &(const binstruction[ 8]) { /* code */ + 0x68100000, // 0000 GETUPV R4 U0 + 0x68140001, // 0001 GETUPV R5 U1 + 0x5C180000, // 0002 MOVE R6 R0 + 0x5C1C0200, // 0003 MOVE R7 R1 + 0x5C200400, // 0004 MOVE R8 R2 + 0x5C240600, // 0005 MOVE R9 R3 + 0x7C100A00, // 0006 CALL R4 5 + 0x80040800, // 0007 RET 1 R4 + }) + ), + }), + 1, /* has constants */ + ( &(const bvalue[ 2]) { /* constants */ + /* K0 */ be_nested_str(tasmota), + /* K1 */ be_nested_str(add_cmd), + }), + &be_const_str_add_cmd, + &be_const_str_solidified, + ( &(const binstruction[ 7]) { /* code */ + 0xB80E0000, // 0000 GETNGBL R3 K0 + 0x8C0C0701, // 0001 GETMET R3 R3 K1 + 0x5C140200, // 0002 MOVE R5 R1 + 0x84180000, // 0003 CLOSURE R6 P0 + 0x7C0C0600, // 0004 CALL R3 3 + 0xA0000000, // 0005 CLOSE R0 + 0x80000000, // 0006 RET 0 + }) + ) +); +/*******************************************************************/ + + +/******************************************************************** +** Solidified class: Driver +********************************************************************/ +be_local_class(Driver, + 13, + NULL, + be_nested_map(14, + ( (struct bmapnode*) &(const bmapnode[]) { + { be_const_key(web_add_console_button, 6), be_const_var(7) }, + { be_const_key(web_add_config_button, -1), be_const_var(6) }, + { be_const_key(button_pressed, 9), be_const_var(11) }, + { be_const_key(every_second, 1), be_const_var(0) }, + { be_const_key(web_add_handler, 11), be_const_var(2) }, + { be_const_key(add_cmd, -1), be_const_closure(Driver_add_cmd_closure) }, + { be_const_key(web_sensor, -1), be_const_var(9) }, + { be_const_key(display, -1), be_const_var(12) }, + { be_const_key(web_add_main_button, 2), be_const_var(4) }, + { be_const_key(save_before_restart, -1), be_const_var(8) }, + { be_const_key(web_add_management_button, 0), be_const_var(5) }, + { be_const_key(every_100ms, 13), be_const_var(1) }, + { be_const_key(json_append, -1), be_const_var(10) }, + { be_const_key(web_add_button, -1), be_const_var(3) }, + })), + be_str_literal("Driver") +); +/*******************************************************************/ + +void be_load_Driver_class(bvm *vm) { + be_pushntvclass(vm, &be_class_Driver); + be_setglobal(vm, "Driver"); + be_pop(vm, 1); +} diff --git a/lib/libesp32/Berry/default/be_energy_ctypes_definitions.c b/lib/libesp32/berry/default/be_energy_ctypes_definitions.c similarity index 100% rename from lib/libesp32/Berry/default/be_energy_ctypes_definitions.c rename to lib/libesp32/berry/default/be_energy_ctypes_definitions.c diff --git a/lib/libesp32/Berry/default/be_energylib.c b/lib/libesp32/berry/default/be_energylib.c similarity index 70% rename from lib/libesp32/Berry/default/be_energylib.c rename to lib/libesp32/berry/default/be_energylib.c index e115a8507..cbdddbfca 100644 --- a/lib/libesp32/Berry/default/be_energylib.c +++ b/lib/libesp32/berry/default/be_energylib.c @@ -12,32 +12,127 @@ extern struct ENERGY Energy; /* +_energy = nil # avoid compilation error +energy = module("energy") +energy._ptr = nil + def init(m) import global global._energy = energy_struct(m._ptr) return m end +energy.init = init def read() return _energy.tomap() end +energy.read = read def member(k) return _energy.(k) end +energy.member = member def setmember(k, v) _energy.(k) = v end +energy.setmember = setmember import solidify -solidify.dump(m.init) +solidify.dump(energy) */ + +/******************************************************************** +** Solidified function: member +********************************************************************/ +be_local_closure(energy_member, /* name */ + be_nested_proto( + 2, /* nstack */ + 1, /* argc */ + 0, /* varg */ + 0, /* has upvals */ + NULL, /* no upvals */ + 0, /* has sup protos */ + NULL, /* no sub protos */ + 1, /* has constants */ + ( &(const bvalue[ 1]) { /* constants */ + /* K0 */ be_nested_str(_energy), + }), + &be_const_str_member, + &be_const_str_solidified, + ( &(const binstruction[ 3]) { /* code */ + 0xB8060000, // 0000 GETNGBL R1 K0 + 0x88040200, // 0001 GETMBR R1 R1 R0 + 0x80040200, // 0002 RET 1 R1 + }) + ) +); +/*******************************************************************/ + + +/******************************************************************** +** Solidified function: setmember +********************************************************************/ +be_local_closure(energy_setmember, /* name */ + be_nested_proto( + 3, /* nstack */ + 2, /* argc */ + 0, /* varg */ + 0, /* has upvals */ + NULL, /* no upvals */ + 0, /* has sup protos */ + NULL, /* no sub protos */ + 1, /* has constants */ + ( &(const bvalue[ 1]) { /* constants */ + /* K0 */ be_nested_str(_energy), + }), + &be_const_str_setmember, + &be_const_str_solidified, + ( &(const binstruction[ 3]) { /* code */ + 0xB80A0000, // 0000 GETNGBL R2 K0 + 0x90080001, // 0001 SETMBR R2 R0 R1 + 0x80000000, // 0002 RET 0 + }) + ) +); +/*******************************************************************/ + + +/******************************************************************** +** Solidified function: read +********************************************************************/ +be_local_closure(energy_read, /* name */ + be_nested_proto( + 2, /* nstack */ + 0, /* argc */ + 0, /* varg */ + 0, /* has upvals */ + NULL, /* no upvals */ + 0, /* has sup protos */ + NULL, /* no sub protos */ + 1, /* has constants */ + ( &(const bvalue[ 2]) { /* constants */ + /* K0 */ be_nested_str(_energy), + /* K1 */ be_nested_str(tomap), + }), + &be_const_str_read, + &be_const_str_solidified, + ( &(const binstruction[ 4]) { /* code */ + 0xB8020000, // 0000 GETNGBL R0 K0 + 0x8C000101, // 0001 GETMET R0 R0 K1 + 0x7C000200, // 0002 CALL R0 1 + 0x80040000, // 0003 RET 1 R0 + }) + ) +); +/*******************************************************************/ + + /******************************************************************** ** Solidified function: init ********************************************************************/ -be_local_closure(init, /* name */ +be_local_closure(energy_init, /* name */ be_nested_proto( 4, /* nstack */ 1, /* argc */ @@ -48,13 +143,13 @@ be_local_closure(init, /* name */ NULL, /* no sub protos */ 1, /* has constants */ ( &(const bvalue[ 4]) { /* constants */ - /* K0 */ be_nested_string("global", 503252654, 6), - /* K1 */ be_nested_string("_energy", 535372070, 7), - /* K2 */ be_nested_string("energy_struct", 1655792843, 13), - /* K3 */ be_nested_string("_ptr", 306235816, 4), + /* K0 */ be_nested_str(global), + /* K1 */ be_nested_str(_energy), + /* K2 */ be_nested_str(energy_struct), + /* K3 */ be_nested_str(_ptr), }), - ((bstring*) &be_const_str_init), - ((bstring*) &be_const_str_input), + &be_const_str_init, + &be_const_str_solidified, ( &(const binstruction[ 6]) { /* code */ 0xA4060000, // 0000 IMPORT R1 K0 0xB80A0400, // 0001 GETNGBL R2 K2 @@ -69,100 +164,23 @@ be_local_closure(init, /* name */ /******************************************************************** -** Solidified function: read +** Solidified module: energy ********************************************************************/ -be_local_closure(read, /* name */ - be_nested_proto( - 2, /* nstack */ - 0, /* argc */ - 0, /* varg */ - 0, /* has upvals */ - NULL, /* no upvals */ - 0, /* has sup protos */ - NULL, /* no sub protos */ - 1, /* has constants */ - ( &(const bvalue[ 2]) { /* constants */ - /* K0 */ be_nested_string("_energy", 535372070, 7), - /* K1 */ be_nested_string("tomap", 612167626, 5), - }), - (be_nested_const_str("", 1160973142, 11)), - ((bstring*) &be_const_str_input), - ( &(const binstruction[ 4]) { /* code */ - 0xB8020000, // 0000 GETNGBL R0 K0 - 0x8C000101, // 0001 GETMET R0 R0 K1 - 0x7C000200, // 0002 CALL R0 1 - 0x80040000, // 0003 RET 1 R0 - }) - ) +be_local_module(energy, + "energy", + be_nested_map(5, + ( (struct bmapnode*) &(const bmapnode[]) { + { be_const_key(init, -1), be_const_closure(energy_init_closure) }, + { be_const_key(member, 2), be_const_closure(energy_member_closure) }, + { be_const_key(_ptr, 3), be_const_comptr(&Energy) }, + { be_const_key(setmember, -1), be_const_closure(energy_setmember_closure) }, + { be_const_key(read, -1), be_const_closure(energy_read_closure) }, + })) ); -/*******************************************************************/ - -/******************************************************************** -** Solidified function: member -********************************************************************/ -be_local_closure(member, /* name */ - be_nested_proto( - 2, /* nstack */ - 1, /* argc */ - 0, /* varg */ - 0, /* has upvals */ - NULL, /* no upvals */ - 0, /* has sup protos */ - NULL, /* no sub protos */ - 1, /* has constants */ - ( &(const bvalue[ 1]) { /* constants */ - /* K0 */ be_nested_string("_energy", 535372070, 7), - }), - (be_nested_const_str("member", 719708611, 6)), - ((bstring*) &be_const_str_input), - ( &(const binstruction[ 3]) { /* code */ - 0xB8060000, // 0000 GETNGBL R1 K0 - 0x88040200, // 0001 GETMBR R1 R1 R0 - 0x80040200, // 0002 RET 1 R1 - }) - ) -); -/*******************************************************************/ +BE_EXPORT_VARIABLE be_define_const_native_module(energy); +/********************************************************************/ -/******************************************************************** -** Solidified function: setmember -********************************************************************/ -be_local_closure(setmember, /* name */ - be_nested_proto( - 3, /* nstack */ - 2, /* argc */ - 0, /* varg */ - 0, /* has upvals */ - NULL, /* no upvals */ - 0, /* has sup protos */ - NULL, /* no sub protos */ - 1, /* has constants */ - ( &(const bvalue[ 1]) { /* constants */ - /* K0 */ be_nested_string("_energy", 535372070, 7), - }), - (be_nested_const_str("setmember", 1432909441, 9)), - ((bstring*) &be_const_str_input), - ( &(const binstruction[ 3]) { /* code */ - 0xB80A0000, // 0000 GETNGBL R2 K0 - 0x90080001, // 0001 SETMBR R2 R0 R1 - 0x80000000, // 0002 RET 0 - }) - ) -); -/*******************************************************************/ - - -/* @const_object_info_begin -module energy (scope: global) { - _ptr, comptr(&Energy) - init, closure(init_closure) - - read, closure(read_closure) - member, closure(member_closure) - setmember, closure(setmember_closure) -} -@const_object_info_end */ -#include "../generate/be_fixed_energy.h" +// { be_const_key(_ptr, 3), be_const_comptr(&Energy) }, /* patch */ #endif // USE_ENERGY_SENSOR \ No newline at end of file diff --git a/lib/libesp32/Berry/default/be_flash_lib.c b/lib/libesp32/berry/default/be_flash_lib.c similarity index 100% rename from lib/libesp32/Berry/default/be_flash_lib.c rename to lib/libesp32/berry/default/be_flash_lib.c diff --git a/lib/libesp32/Berry/default/be_gpio_lib.c b/lib/libesp32/berry/default/be_gpio_lib.c similarity index 100% rename from lib/libesp32/Berry/default/be_gpio_lib.c rename to lib/libesp32/berry/default/be_gpio_lib.c diff --git a/lib/libesp32/Berry/default/be_i2c_axp192_lib.c b/lib/libesp32/berry/default/be_i2c_axp192_lib.c similarity index 78% rename from lib/libesp32/Berry/default/be_i2c_axp192_lib.c rename to lib/libesp32/berry/default/be_i2c_axp192_lib.c index 7449780d6..298e7b3a2 100644 --- a/lib/libesp32/Berry/default/be_i2c_axp192_lib.c +++ b/lib/libesp32/berry/default/be_i2c_axp192_lib.c @@ -6,7 +6,7 @@ /******************************************************************** ** Solidified function: get_warning_level ********************************************************************/ -be_local_closure(get_warning_level, /* name */ +be_local_closure(AXP192_get_warning_level, /* name */ be_nested_proto( 4, /* nstack */ 1, /* argc */ @@ -17,11 +17,11 @@ be_local_closure(get_warning_level, /* name */ NULL, /* no sub protos */ 1, /* has constants */ ( &(const bvalue[ 2]) { /* constants */ - /* K0 */ be_nested_string("read12", -3890326, 6), + /* K0 */ be_nested_str(read12), /* K1 */ be_const_int(1), }), - (be_nested_const_str("get_warning_level", 1737834441, 17)), - ((bstring*) &be_const_str_input), + &be_const_str_get_warning_level, + &be_const_str_solidified, ( &(const binstruction[ 5]) { /* code */ 0x8C040100, // 0000 GETMET R1 R0 K0 0x540E0046, // 0001 LDINT R3 71 @@ -37,7 +37,7 @@ be_local_closure(get_warning_level, /* name */ /******************************************************************** ** Solidified function: get_vbus_current ********************************************************************/ -be_local_closure(get_vbus_current, /* name */ +be_local_closure(AXP192_get_vbus_current, /* name */ be_nested_proto( 4, /* nstack */ 1, /* argc */ @@ -48,11 +48,11 @@ be_local_closure(get_vbus_current, /* name */ NULL, /* no sub protos */ 1, /* has constants */ ( &(const bvalue[ 2]) { /* constants */ - /* K0 */ be_nested_string("read12", -3890326, 6), + /* K0 */ be_nested_str(read12), /* K1 */ be_const_real_hex(0x3EC00000), }), - (be_nested_const_str("get_vbus_current", 1205347942, 16)), - ((bstring*) &be_const_str_input), + &be_const_str_get_vbus_current, + &be_const_str_solidified, ( &(const binstruction[ 5]) { /* code */ 0x8C040100, // 0000 GETMET R1 R0 K0 0x540E005B, // 0001 LDINT R3 92 @@ -68,7 +68,7 @@ be_local_closure(get_vbus_current, /* name */ /******************************************************************** ** Solidified function: set_chg_current ********************************************************************/ -be_local_closure(set_chg_current, /* name */ +be_local_closure(AXP192_set_chg_current, /* name */ be_nested_proto( 8, /* nstack */ 2, /* argc */ @@ -79,11 +79,11 @@ be_local_closure(set_chg_current, /* name */ NULL, /* no sub protos */ 1, /* has constants */ ( &(const bvalue[ 2]) { /* constants */ - /* K0 */ be_nested_string("write8", -1160975764, 6), - /* K1 */ be_nested_string("read8", -1492179129, 5), + /* K0 */ be_nested_str(write8), + /* K1 */ be_nested_str(read8), }), - (be_nested_const_str("set_chg_current", 336304386, 15)), - ((bstring*) &be_const_str_input), + &be_const_str_set_chg_current, + &be_const_str_solidified, ( &(const binstruction[12]) { /* code */ 0x8C080100, // 0000 GETMET R2 R0 K0 0x54120032, // 0001 LDINT R4 51 @@ -106,7 +106,7 @@ be_local_closure(set_chg_current, /* name */ /******************************************************************** ** Solidified function: get_bat_current ********************************************************************/ -be_local_closure(get_bat_current, /* name */ +be_local_closure(AXP192_get_bat_current, /* name */ be_nested_proto( 5, /* nstack */ 1, /* argc */ @@ -117,11 +117,11 @@ be_local_closure(get_bat_current, /* name */ NULL, /* no sub protos */ 1, /* has constants */ ( &(const bvalue[ 2]) { /* constants */ - /* K0 */ be_nested_string("read13", 12887293, 6), + /* K0 */ be_nested_str(read13), /* K1 */ be_const_real_hex(0x3F000000), }), - (be_nested_const_str("get_bat_current", 1912106073, 15)), - ((bstring*) &be_const_str_input), + &be_const_str_get_bat_current, + &be_const_str_solidified, ( &(const binstruction[ 9]) { /* code */ 0x8C040100, // 0000 GETMET R1 R0 K0 0x540E0079, // 0001 LDINT R3 122 @@ -141,7 +141,7 @@ be_local_closure(get_bat_current, /* name */ /******************************************************************** ** Solidified function: get_bat_power ********************************************************************/ -be_local_closure(get_bat_power, /* name */ +be_local_closure(AXP192_get_bat_power, /* name */ be_nested_proto( 4, /* nstack */ 1, /* argc */ @@ -152,11 +152,11 @@ be_local_closure(get_bat_power, /* name */ NULL, /* no sub protos */ 1, /* has constants */ ( &(const bvalue[ 2]) { /* constants */ - /* K0 */ be_nested_string("read24", 1808533811, 6), + /* K0 */ be_nested_str(read24), /* K1 */ be_const_real_hex(0x3A102DE1), }), - (be_nested_const_str("get_bat_power", -1227592443, 13)), - ((bstring*) &be_const_str_input), + &be_const_str_get_bat_power, + &be_const_str_solidified, ( &(const binstruction[ 5]) { /* code */ 0x8C040100, // 0000 GETMET R1 R0 K0 0x540E006F, // 0001 LDINT R3 112 @@ -172,7 +172,7 @@ be_local_closure(get_bat_power, /* name */ /******************************************************************** ** Solidified function: json_append ********************************************************************/ -be_local_closure(json_append, /* name */ +be_local_closure(AXP192_json_append, /* name */ be_nested_proto( 2, /* nstack */ 1, /* argc */ @@ -183,10 +183,10 @@ be_local_closure(json_append, /* name */ NULL, /* no sub protos */ 1, /* has constants */ ( &(const bvalue[ 1]) { /* constants */ - /* K0 */ be_nested_string("wire", -212213352, 4), + /* K0 */ be_nested_str(wire), }), - (be_nested_const_str("json_append", -1292948012, 11)), - ((bstring*) &be_const_str_input), + &be_const_str_json_append, + &be_const_str_solidified, ( &(const binstruction[ 5]) { /* code */ 0x88040100, // 0000 GETMBR R1 R0 K0 0x74060001, // 0001 JMPT R1 #0004 @@ -202,7 +202,7 @@ be_local_closure(json_append, /* name */ /******************************************************************** ** Solidified function: get_vbus_voltage ********************************************************************/ -be_local_closure(get_vbus_voltage, /* name */ +be_local_closure(AXP192_get_vbus_voltage, /* name */ be_nested_proto( 4, /* nstack */ 1, /* argc */ @@ -213,11 +213,11 @@ be_local_closure(get_vbus_voltage, /* name */ NULL, /* no sub protos */ 1, /* has constants */ ( &(const bvalue[ 2]) { /* constants */ - /* K0 */ be_nested_string("read12", -3890326, 6), + /* K0 */ be_nested_str(read12), /* K1 */ be_const_real_hex(0x3ADED28A), }), - (be_nested_const_str("get_vbus_voltage", -1896756895, 16)), - ((bstring*) &be_const_str_input), + &be_const_str_get_vbus_voltage, + &be_const_str_solidified, ( &(const binstruction[ 5]) { /* code */ 0x8C040100, // 0000 GETMET R1 R0 K0 0x540E0059, // 0001 LDINT R3 90 @@ -233,7 +233,7 @@ be_local_closure(get_vbus_voltage, /* name */ /******************************************************************** ** Solidified function: get_temp ********************************************************************/ -be_local_closure(get_temp, /* name */ +be_local_closure(AXP192_get_temp, /* name */ be_nested_proto( 4, /* nstack */ 1, /* argc */ @@ -244,12 +244,12 @@ be_local_closure(get_temp, /* name */ NULL, /* no sub protos */ 1, /* has constants */ ( &(const bvalue[ 3]) { /* constants */ - /* K0 */ be_nested_string("read12", -3890326, 6), + /* K0 */ be_nested_str(read12), /* K1 */ be_const_real_hex(0x3DCCCCCD), /* K2 */ be_const_real_hex(0x4310B333), }), - (be_nested_const_str("get_temp", -924047810, 8)), - ((bstring*) &be_const_str_input), + &be_const_str_get_temp, + &be_const_str_solidified, ( &(const binstruction[ 6]) { /* code */ 0x8C040100, // 0000 GETMET R1 R0 K0 0x540E005D, // 0001 LDINT R3 94 @@ -266,7 +266,7 @@ be_local_closure(get_temp, /* name */ /******************************************************************** ** Solidified function: battery_present ********************************************************************/ -be_local_closure(battery_present, /* name */ +be_local_closure(AXP192_battery_present, /* name */ be_nested_proto( 6, /* nstack */ 1, /* argc */ @@ -277,13 +277,13 @@ be_local_closure(battery_present, /* name */ NULL, /* no sub protos */ 1, /* has constants */ ( &(const bvalue[ 4]) { /* constants */ - /* K0 */ be_nested_string("wire", -212213352, 4), - /* K1 */ be_nested_string("read", -824204347, 4), - /* K2 */ be_nested_string("addr", 1087856498, 4), + /* K0 */ be_nested_str(wire), + /* K1 */ be_nested_str(read), + /* K2 */ be_nested_str(addr), /* K3 */ be_const_int(1), }), - (be_nested_const_str("battery_present", -706570238, 15)), - ((bstring*) &be_const_str_input), + &be_const_str_battery_present, + &be_const_str_solidified, ( &(const binstruction[15]) { /* code */ 0x88040100, // 0000 GETMBR R1 R0 K0 0x8C040301, // 0001 GETMET R1 R1 K1 @@ -309,7 +309,7 @@ be_local_closure(battery_present, /* name */ /******************************************************************** ** Solidified function: get_aps_voltage ********************************************************************/ -be_local_closure(get_aps_voltage, /* name */ +be_local_closure(AXP192_get_aps_voltage, /* name */ be_nested_proto( 4, /* nstack */ 1, /* argc */ @@ -320,11 +320,11 @@ be_local_closure(get_aps_voltage, /* name */ NULL, /* no sub protos */ 1, /* has constants */ ( &(const bvalue[ 2]) { /* constants */ - /* K0 */ be_nested_string("read12", -3890326, 6), + /* K0 */ be_nested_str(read12), /* K1 */ be_const_real_hex(0x3AB78035), }), - (be_nested_const_str("get_aps_voltage", -2001930861, 15)), - ((bstring*) &be_const_str_input), + &be_const_str_get_aps_voltage, + &be_const_str_solidified, ( &(const binstruction[ 5]) { /* code */ 0x8C040100, // 0000 GETMET R1 R0 K0 0x540E007D, // 0001 LDINT R3 126 @@ -340,7 +340,7 @@ be_local_closure(get_aps_voltage, /* name */ /******************************************************************** ** Solidified function: set_dcdc_enable ********************************************************************/ -be_local_closure(set_dcdc_enable, /* name */ +be_local_closure(AXP192_set_dcdc_enable, /* name */ be_nested_proto( 8, /* nstack */ 3, /* argc */ @@ -352,13 +352,13 @@ be_local_closure(set_dcdc_enable, /* name */ 1, /* has constants */ ( &(const bvalue[ 5]) { /* constants */ /* K0 */ be_const_int(1), - /* K1 */ be_nested_string("write_bit", -1633976860, 9), + /* K1 */ be_nested_str(write_bit), /* K2 */ be_const_int(0), /* K3 */ be_const_int(2), /* K4 */ be_const_int(3), }), - (be_nested_const_str("set_dcdc_enable", 1594690786, 15)), - ((bstring*) &be_const_str_input), + &be_const_str_set_dcdc_enable, + &be_const_str_solidified, ( &(const binstruction[22]) { /* code */ 0x1C0C0300, // 0000 EQ R3 R1 K0 0x780E0004, // 0001 JMPF R3 #0007 @@ -391,7 +391,7 @@ be_local_closure(set_dcdc_enable, /* name */ /******************************************************************** ** Solidified function: set_ldo_voltage ********************************************************************/ -be_local_closure(set_ldo_voltage, /* name */ +be_local_closure(AXP192_set_ldo_voltage, /* name */ be_nested_proto( 9, /* nstack */ 3, /* argc */ @@ -403,12 +403,12 @@ be_local_closure(set_ldo_voltage, /* name */ 1, /* has constants */ ( &(const bvalue[ 4]) { /* constants */ /* K0 */ be_const_int(2), - /* K1 */ be_nested_string("write8", -1160975764, 6), - /* K2 */ be_nested_string("read8", -1492179129, 5), + /* K1 */ be_nested_str(write8), + /* K2 */ be_nested_str(read8), /* K3 */ be_const_int(3), }), - (be_nested_const_str("set_ldo_voltage", -204466136, 15)), - ((bstring*) &be_const_str_input), + &be_const_str_set_ldo_voltage, + &be_const_str_solidified, ( &(const binstruction[39]) { /* code */ 0x540E0CE3, // 0000 LDINT R3 3300 0x240C0403, // 0001 GT R3 R2 R3 @@ -458,7 +458,7 @@ be_local_closure(set_ldo_voltage, /* name */ /******************************************************************** ** Solidified function: init ********************************************************************/ -be_local_closure(init, /* name */ +be_local_closure(AXP192_init, /* name */ be_nested_proto( 5, /* nstack */ 1, /* argc */ @@ -469,12 +469,12 @@ be_local_closure(init, /* name */ NULL, /* no sub protos */ 1, /* has constants */ ( &(const bvalue[ 3]) { /* constants */ - /* K0 */ be_nested_string("I2C_Driver", 1714501658, 10), - /* K1 */ be_nested_string("init", 380752755, 4), - /* K2 */ be_nested_string("AXP192", 757230128, 6), + /* K0 */ be_nested_str(I2C_Driver), + /* K1 */ be_nested_str(init), + /* K2 */ be_nested_str(AXP192), }), - ((bstring*) &be_const_str_init), - ((bstring*) &be_const_str_input), + &be_const_str_init, + &be_const_str_solidified, ( &(const binstruction[ 9]) { /* code */ 0x60040003, // 0000 GETGBL R1 G3 0x5C080000, // 0001 MOVE R2 R0 @@ -494,7 +494,7 @@ be_local_closure(init, /* name */ /******************************************************************** ** Solidified function: get_bat_voltage ********************************************************************/ -be_local_closure(get_bat_voltage, /* name */ +be_local_closure(AXP192_get_bat_voltage, /* name */ be_nested_proto( 4, /* nstack */ 1, /* argc */ @@ -505,11 +505,11 @@ be_local_closure(get_bat_voltage, /* name */ NULL, /* no sub protos */ 1, /* has constants */ ( &(const bvalue[ 2]) { /* constants */ - /* K0 */ be_nested_string("read12", -3890326, 6), + /* K0 */ be_nested_str(read12), /* K1 */ be_const_real_hex(0x3A902DE0), }), - (be_nested_const_str("get_bat_voltage", 706676538, 15)), - ((bstring*) &be_const_str_input), + &be_const_str_get_bat_voltage, + &be_const_str_solidified, ( &(const binstruction[ 5]) { /* code */ 0x8C040100, // 0000 GETMET R1 R0 K0 0x540E0077, // 0001 LDINT R3 120 @@ -525,7 +525,7 @@ be_local_closure(get_bat_voltage, /* name */ /******************************************************************** ** Solidified function: set_ldo_enable ********************************************************************/ -be_local_closure(set_ldo_enable, /* name */ +be_local_closure(AXP192_set_ldo_enable, /* name */ be_nested_proto( 8, /* nstack */ 3, /* argc */ @@ -537,11 +537,11 @@ be_local_closure(set_ldo_enable, /* name */ 1, /* has constants */ ( &(const bvalue[ 3]) { /* constants */ /* K0 */ be_const_int(2), - /* K1 */ be_nested_string("write_bit", -1633976860, 9), + /* K1 */ be_nested_str(write_bit), /* K2 */ be_const_int(3), }), - (be_nested_const_str("set_ldo_enable", -1378465255, 14)), - ((bstring*) &be_const_str_input), + &be_const_str_set_ldo_enable, + &be_const_str_solidified, ( &(const binstruction[15]) { /* code */ 0x1C0C0300, // 0000 EQ R3 R1 K0 0x780E0004, // 0001 JMPF R3 #0007 @@ -567,7 +567,7 @@ be_local_closure(set_ldo_enable, /* name */ /******************************************************************** ** Solidified function: set_dc_voltage ********************************************************************/ -be_local_closure(set_dc_voltage, /* name */ +be_local_closure(AXP192_set_dc_voltage, /* name */ be_nested_proto( 11, /* nstack */ 3, /* argc */ @@ -582,11 +582,11 @@ be_local_closure(set_dc_voltage, /* name */ /* K1 */ be_const_int(3), /* K2 */ be_const_int(0), /* K3 */ be_const_int(2), - /* K4 */ be_nested_string("write8", -1160975764, 6), - /* K5 */ be_nested_string("read8", -1492179129, 5), + /* K4 */ be_nested_str(write8), + /* K5 */ be_nested_str(read8), }), - (be_nested_const_str("set_dc_voltage", -2112985360, 14)), - ((bstring*) &be_const_str_input), + &be_const_str_set_dc_voltage, + &be_const_str_solidified, ( &(const binstruction[48]) { /* code */ 0x140C0300, // 0000 LT R3 R1 K0 0x740E0001, // 0001 JMPT R3 #0004 @@ -645,7 +645,7 @@ be_local_closure(set_dc_voltage, /* name */ /******************************************************************** ** Solidified function: write_gpio ********************************************************************/ -be_local_closure(write_gpio, /* name */ +be_local_closure(AXP192_write_gpio, /* name */ be_nested_proto( 8, /* nstack */ 3, /* argc */ @@ -658,11 +658,11 @@ be_local_closure(write_gpio, /* name */ ( &(const bvalue[ 4]) { /* constants */ /* K0 */ be_const_int(0), /* K1 */ be_const_int(2), - /* K2 */ be_nested_string("write_bit", -1633976860, 9), + /* K2 */ be_nested_str(write_bit), /* K3 */ be_const_int(3), }), - (be_nested_const_str("write_gpio", -2027026962, 10)), - ((bstring*) &be_const_str_input), + &be_const_str_write_gpio, + &be_const_str_solidified, ( &(const binstruction[21]) { /* code */ 0x280C0300, // 0000 GE R3 R1 K0 0x780E0007, // 0001 JMPF R3 #000A @@ -694,7 +694,7 @@ be_local_closure(write_gpio, /* name */ /******************************************************************** ** Solidified function: web_sensor ********************************************************************/ -be_local_closure(web_sensor, /* name */ +be_local_closure(AXP192_web_sensor, /* name */ be_nested_proto( 11, /* nstack */ 1, /* argc */ @@ -705,23 +705,23 @@ be_local_closure(web_sensor, /* name */ NULL, /* no sub protos */ 1, /* has constants */ ( &(const bvalue[14]) { /* constants */ - /* K0 */ be_nested_string("wire", -212213352, 4), - /* K1 */ be_nested_string("string", 398550328, 6), - /* K2 */ be_nested_string("format", -1180859054, 6), - /* K3 */ be_nested_string("{s}VBus Voltage{m}%.3f V{e}", 165651270, 27), - /* K4 */ be_nested_string("{s}VBus Current{m}%.1f mA{e}", 1032721155, 28), - /* K5 */ be_nested_string("{s}Batt Voltage{m}%.3f V{e}", -1110659097, 27), - /* K6 */ be_nested_string("{s}Batt Current{m}%.1f mA{e}", 866537156, 28), - /* K7 */ be_nested_string("{s}Temp AXP{m}%.1f °C{e}", -1990510004, 25), - /* K8 */ be_nested_string("get_vbus_voltage", -1896756895, 16), - /* K9 */ be_nested_string("get_bat_voltage", 706676538, 15), - /* K10 */ be_nested_string("get_bat_current", 1912106073, 15), - /* K11 */ be_nested_string("get_temp", -924047810, 8), - /* K12 */ be_nested_string("tasmota", 424643812, 7), - /* K13 */ be_nested_string("web_send_decimal", 1407210204, 16), + /* K0 */ be_nested_str(wire), + /* K1 */ be_nested_str(string), + /* K2 */ be_nested_str(format), + /* K3 */ be_nested_str(_X7Bs_X7DVBus_X20Voltage_X7Bm_X7D_X25_X2E3f_X20V_X7Be_X7D), + /* K4 */ be_nested_str(_X7Bs_X7DVBus_X20Current_X7Bm_X7D_X25_X2E1f_X20mA_X7Be_X7D), + /* K5 */ be_nested_str(_X7Bs_X7DBatt_X20Voltage_X7Bm_X7D_X25_X2E3f_X20V_X7Be_X7D), + /* K6 */ be_nested_str(_X7Bs_X7DBatt_X20Current_X7Bm_X7D_X25_X2E1f_X20mA_X7Be_X7D), + /* K7 */ be_nested_str(_X7Bs_X7DTemp_X20AXP_X7Bm_X7D_X25_X2E1f_X20_X26deg_X3BC_X7Be_X7D), + /* K8 */ be_nested_str(get_vbus_voltage), + /* K9 */ be_nested_str(get_bat_voltage), + /* K10 */ be_nested_str(get_bat_current), + /* K11 */ be_nested_str(get_temp), + /* K12 */ be_nested_str(tasmota), + /* K13 */ be_nested_str(web_send_decimal), }), - (be_nested_const_str("web_sensor", -1394870324, 10)), - ((bstring*) &be_const_str_input), + &be_const_str_web_sensor, + &be_const_str_solidified, ( &(const binstruction[26]) { /* code */ 0x88040100, // 0000 GETMBR R1 R0 K0 0x74060001, // 0001 JMPT R1 #0004 @@ -758,7 +758,7 @@ be_local_closure(web_sensor, /* name */ /******************************************************************** ** Solidified function: get_bat_charge_current ********************************************************************/ -be_local_closure(get_bat_charge_current, /* name */ +be_local_closure(AXP192_get_bat_charge_current, /* name */ be_nested_proto( 4, /* nstack */ 1, /* argc */ @@ -769,11 +769,11 @@ be_local_closure(get_bat_charge_current, /* name */ NULL, /* no sub protos */ 1, /* has constants */ ( &(const bvalue[ 2]) { /* constants */ - /* K0 */ be_nested_string("read13", 12887293, 6), + /* K0 */ be_nested_str(read13), /* K1 */ be_const_real_hex(0x3F000000), }), - (be_nested_const_str("get_bat_charge_current", 1385293050, 22)), - ((bstring*) &be_const_str_input), + &be_const_str_get_bat_charge_current, + &be_const_str_solidified, ( &(const binstruction[ 5]) { /* code */ 0x8C040100, // 0000 GETMET R1 R0 K0 0x540E0079, // 0001 LDINT R3 122 @@ -789,7 +789,7 @@ be_local_closure(get_bat_charge_current, /* name */ /******************************************************************** ** Solidified function: get_battery_chargin_status ********************************************************************/ -be_local_closure(get_battery_chargin_status, /* name */ +be_local_closure(AXP192_get_battery_chargin_status, /* name */ be_nested_proto( 6, /* nstack */ 1, /* argc */ @@ -800,13 +800,13 @@ be_local_closure(get_battery_chargin_status, /* name */ NULL, /* no sub protos */ 1, /* has constants */ ( &(const bvalue[ 4]) { /* constants */ - /* K0 */ be_nested_string("wire", -212213352, 4), - /* K1 */ be_nested_string("read", -824204347, 4), - /* K2 */ be_nested_string("addr", 1087856498, 4), + /* K0 */ be_nested_str(wire), + /* K1 */ be_nested_str(read), + /* K2 */ be_nested_str(addr), /* K3 */ be_const_int(1), }), - (be_nested_const_str("get_battery_chargin_status", -2061725725, 26)), - ((bstring*) &be_const_str_input), + &be_const_str_get_battery_chargin_status, + &be_const_str_solidified, ( &(const binstruction[ 7]) { /* code */ 0x88040100, // 0000 GETMBR R1 R0 K0 0x8C040301, // 0001 GETMET R1 R1 K1 @@ -824,7 +824,7 @@ be_local_closure(get_battery_chargin_status, /* name */ /******************************************************************** ** Solidified function: get_input_power_status ********************************************************************/ -be_local_closure(get_input_power_status, /* name */ +be_local_closure(AXP192_get_input_power_status, /* name */ be_nested_proto( 6, /* nstack */ 1, /* argc */ @@ -835,14 +835,14 @@ be_local_closure(get_input_power_status, /* name */ NULL, /* no sub protos */ 1, /* has constants */ ( &(const bvalue[ 5]) { /* constants */ - /* K0 */ be_nested_string("wire", -212213352, 4), - /* K1 */ be_nested_string("read", -824204347, 4), - /* K2 */ be_nested_string("addr", 1087856498, 4), + /* K0 */ be_nested_str(wire), + /* K1 */ be_nested_str(read), + /* K2 */ be_nested_str(addr), /* K3 */ be_const_int(0), /* K4 */ be_const_int(1), }), - (be_nested_const_str("get_input_power_status", -192138119, 22)), - ((bstring*) &be_const_str_input), + &be_const_str_get_input_power_status, + &be_const_str_solidified, ( &(const binstruction[ 7]) { /* code */ 0x88040100, // 0000 GETMBR R1 R0 K0 0x8C040301, // 0001 GETMET R1 R1 K1 @@ -866,29 +866,29 @@ be_local_class(AXP192, &be_class_I2C_Driver, be_nested_map(21, ( (struct bmapnode*) &(const bmapnode[]) { - { be_nested_key("get_warning_level", 1737834441, 17, -1), be_const_closure(get_warning_level_closure) }, - { be_nested_key("get_vbus_current", 1205347942, 16, -1), be_const_closure(get_vbus_current_closure) }, - { be_nested_key("set_chg_current", 336304386, 15, 14), be_const_closure(set_chg_current_closure) }, - { be_nested_key("get_bat_current", 1912106073, 15, -1), be_const_closure(get_bat_current_closure) }, - { be_nested_key("get_bat_power", -1227592443, 13, 9), be_const_closure(get_bat_power_closure) }, - { be_nested_key("json_append", -1292948012, 11, -1), be_const_closure(json_append_closure) }, - { be_nested_key("get_vbus_voltage", -1896756895, 16, -1), be_const_closure(get_vbus_voltage_closure) }, - { be_nested_key("get_temp", -924047810, 8, -1), be_const_closure(get_temp_closure) }, - { be_nested_key("battery_present", -706570238, 15, -1), be_const_closure(battery_present_closure) }, - { be_nested_key("get_aps_voltage", -2001930861, 15, -1), be_const_closure(get_aps_voltage_closure) }, - { be_nested_key("set_dcdc_enable", 1594690786, 15, -1), be_const_closure(set_dcdc_enable_closure) }, - { be_nested_key("set_ldo_voltage", -204466136, 15, 7), be_const_closure(set_ldo_voltage_closure) }, - { be_nested_key("init", 380752755, 4, 2), be_const_closure(init_closure) }, - { be_nested_key("get_bat_voltage", 706676538, 15, 18), be_const_closure(get_bat_voltage_closure) }, - { be_nested_key("set_ldo_enable", -1378465255, 14, -1), be_const_closure(set_ldo_enable_closure) }, - { be_nested_key("set_dc_voltage", -2112985360, 14, 13), be_const_closure(set_dc_voltage_closure) }, - { be_nested_key("write_gpio", -2027026962, 10, -1), be_const_closure(write_gpio_closure) }, - { be_nested_key("web_sensor", -1394870324, 10, -1), be_const_closure(web_sensor_closure) }, - { be_nested_key("get_bat_charge_current", 1385293050, 22, 19), be_const_closure(get_bat_charge_current_closure) }, - { be_nested_key("get_battery_chargin_status", -2061725725, 26, -1), be_const_closure(get_battery_chargin_status_closure) }, - { be_nested_key("get_input_power_status", -192138119, 22, -1), be_const_closure(get_input_power_status_closure) }, + { be_const_key(get_warning_level, -1), be_const_closure(AXP192_get_warning_level_closure) }, + { be_const_key(get_vbus_current, -1), be_const_closure(AXP192_get_vbus_current_closure) }, + { be_const_key(get_aps_voltage, -1), be_const_closure(AXP192_get_aps_voltage_closure) }, + { be_const_key(get_bat_current, -1), be_const_closure(AXP192_get_bat_current_closure) }, + { be_const_key(get_bat_power, 2), be_const_closure(AXP192_get_bat_power_closure) }, + { be_const_key(json_append, -1), be_const_closure(AXP192_json_append_closure) }, + { be_const_key(get_vbus_voltage, -1), be_const_closure(AXP192_get_vbus_voltage_closure) }, + { be_const_key(get_battery_chargin_status, 9), be_const_closure(AXP192_get_battery_chargin_status_closure) }, + { be_const_key(battery_present, -1), be_const_closure(AXP192_battery_present_closure) }, + { be_const_key(get_bat_charge_current, 14), be_const_closure(AXP192_get_bat_charge_current_closure) }, + { be_const_key(set_dcdc_enable, -1), be_const_closure(AXP192_set_dcdc_enable_closure) }, + { be_const_key(get_temp, 19), be_const_closure(AXP192_get_temp_closure) }, + { be_const_key(set_chg_current, 13), be_const_closure(AXP192_set_chg_current_closure) }, + { be_const_key(set_ldo_enable, 18), be_const_closure(AXP192_set_ldo_enable_closure) }, + { be_const_key(set_dc_voltage, -1), be_const_closure(AXP192_set_dc_voltage_closure) }, + { be_const_key(get_bat_voltage, 7), be_const_closure(AXP192_get_bat_voltage_closure) }, + { be_const_key(write_gpio, -1), be_const_closure(AXP192_write_gpio_closure) }, + { be_const_key(web_sensor, -1), be_const_closure(AXP192_web_sensor_closure) }, + { be_const_key(init, -1), be_const_closure(AXP192_init_closure) }, + { be_const_key(set_ldo_voltage, -1), be_const_closure(AXP192_set_ldo_voltage_closure) }, + { be_const_key(get_input_power_status, -1), be_const_closure(AXP192_get_input_power_status_closure) }, })), - (be_nested_const_str("AXP192", 757230128, 6)) + be_str_literal("AXP192") ); /*******************************************************************/ diff --git a/lib/libesp32/Berry/default/be_i2c_driverlib.c b/lib/libesp32/berry/default/be_i2c_driverlib.c similarity index 68% rename from lib/libesp32/Berry/default/be_i2c_driverlib.c rename to lib/libesp32/berry/default/be_i2c_driverlib.c index f1cedfe8b..a61321c12 100644 --- a/lib/libesp32/Berry/default/be_i2c_driverlib.c +++ b/lib/libesp32/berry/default/be_i2c_driverlib.c @@ -9,12 +9,10 @@ *******************************************************************/ #include "be_constobj.h" -extern bclass* be_class_Driver; // Parent class - /******************************************************************** ** Solidified function: read32 ********************************************************************/ -be_local_closure(read32, /* name */ +be_local_closure(I2C_Driver_read32, /* name */ be_nested_proto( 7, /* nstack */ 2, /* argc */ @@ -25,16 +23,16 @@ be_local_closure(read32, /* name */ NULL, /* no sub protos */ 1, /* has constants */ ( &(const bvalue[ 7]) { /* constants */ - /* K0 */ be_nested_string("wire", -212213352, 4), - /* K1 */ be_nested_string("read_bytes", -718234123, 10), - /* K2 */ be_nested_string("addr", 1087856498, 4), + /* K0 */ be_nested_str(wire), + /* K1 */ be_nested_str(read_bytes), + /* K2 */ be_nested_str(addr), /* K3 */ be_const_int(0), /* K4 */ be_const_int(1), /* K5 */ be_const_int(2), /* K6 */ be_const_int(3), }), - (be_nested_const_str("read32", 1741276240, 6)), - ((bstring*) &be_const_str_input), + &be_const_str_read32, + &be_const_str_solidified, ( &(const binstruction[20]) { /* code */ 0x88080100, // 0000 GETMBR R2 R0 K0 0x8C080501, // 0001 GETMET R2 R2 K1 @@ -65,7 +63,7 @@ be_local_closure(read32, /* name */ /******************************************************************** ** Solidified function: write8 ********************************************************************/ -be_local_closure(write8, /* name */ +be_local_closure(I2C_Driver_write8, /* name */ be_nested_proto( 9, /* nstack */ 3, /* argc */ @@ -76,13 +74,13 @@ be_local_closure(write8, /* name */ NULL, /* no sub protos */ 1, /* has constants */ ( &(const bvalue[ 4]) { /* constants */ - /* K0 */ be_nested_string("wire", -212213352, 4), - /* K1 */ be_nested_string("write", -1104765092, 5), - /* K2 */ be_nested_string("addr", 1087856498, 4), + /* K0 */ be_nested_str(wire), + /* K1 */ be_nested_str(write), + /* K2 */ be_nested_str(addr), /* K3 */ be_const_int(1), }), - (be_nested_const_str("write8", -1160975764, 6)), - ((bstring*) &be_const_str_input), + &be_const_str_write8, + &be_const_str_solidified, ( &(const binstruction[ 8]) { /* code */ 0x880C0100, // 0000 GETMBR R3 R0 K0 0x8C0C0701, // 0001 GETMET R3 R3 K1 @@ -101,7 +99,7 @@ be_local_closure(write8, /* name */ /******************************************************************** ** Solidified function: read12 ********************************************************************/ -be_local_closure(read12, /* name */ +be_local_closure(I2C_Driver_read12, /* name */ be_nested_proto( 7, /* nstack */ 2, /* argc */ @@ -112,15 +110,15 @@ be_local_closure(read12, /* name */ NULL, /* no sub protos */ 1, /* has constants */ ( &(const bvalue[ 6]) { /* constants */ - /* K0 */ be_nested_string("wire", -212213352, 4), - /* K1 */ be_nested_string("read_bytes", -718234123, 10), - /* K2 */ be_nested_string("addr", 1087856498, 4), + /* K0 */ be_nested_str(wire), + /* K1 */ be_nested_str(read_bytes), + /* K2 */ be_nested_str(addr), /* K3 */ be_const_int(2), /* K4 */ be_const_int(0), /* K5 */ be_const_int(1), }), - (be_nested_const_str("read12", -3890326, 6)), - ((bstring*) &be_const_str_input), + &be_const_str_read12, + &be_const_str_solidified, ( &(const binstruction[12]) { /* code */ 0x88080100, // 0000 GETMBR R2 R0 K0 0x8C080501, // 0001 GETMET R2 R2 K1 @@ -143,7 +141,7 @@ be_local_closure(read12, /* name */ /******************************************************************** ** Solidified function: write_bit ********************************************************************/ -be_local_closure(write_bit, /* name */ +be_local_closure(I2C_Driver_write_bit, /* name */ be_nested_proto( 11, /* nstack */ 4, /* argc */ @@ -156,11 +154,11 @@ be_local_closure(write_bit, /* name */ ( &(const bvalue[ 4]) { /* constants */ /* K0 */ be_const_int(0), /* K1 */ be_const_int(1), - /* K2 */ be_nested_string("write8", -1160975764, 6), - /* K3 */ be_nested_string("read8", -1492179129, 5), + /* K2 */ be_nested_str(write8), + /* K3 */ be_nested_str(read8), }), - (be_nested_const_str("write_bit", -1633976860, 9)), - ((bstring*) &be_const_str_input), + &be_const_str_write_bit, + &be_const_str_solidified, ( &(const binstruction[26]) { /* code */ 0x14100500, // 0000 LT R4 R2 K0 0x74120002, // 0001 JMPT R4 #0005 @@ -197,7 +195,7 @@ be_local_closure(write_bit, /* name */ /******************************************************************** ** Solidified function: read24 ********************************************************************/ -be_local_closure(read24, /* name */ +be_local_closure(I2C_Driver_read24, /* name */ be_nested_proto( 7, /* nstack */ 2, /* argc */ @@ -208,16 +206,16 @@ be_local_closure(read24, /* name */ NULL, /* no sub protos */ 1, /* has constants */ ( &(const bvalue[ 7]) { /* constants */ - /* K0 */ be_nested_string("wire", -212213352, 4), - /* K1 */ be_nested_string("read_bytes", -718234123, 10), - /* K2 */ be_nested_string("addr", 1087856498, 4), + /* K0 */ be_nested_str(wire), + /* K1 */ be_nested_str(read_bytes), + /* K2 */ be_nested_str(addr), /* K3 */ be_const_int(3), /* K4 */ be_const_int(0), /* K5 */ be_const_int(1), /* K6 */ be_const_int(2), }), - (be_nested_const_str("read24", 1808533811, 6)), - ((bstring*) &be_const_str_input), + &be_const_str_read24, + &be_const_str_solidified, ( &(const binstruction[16]) { /* code */ 0x88080100, // 0000 GETMBR R2 R0 K0 0x8C080501, // 0001 GETMET R2 R2 K1 @@ -244,7 +242,7 @@ be_local_closure(read24, /* name */ /******************************************************************** ** Solidified function: read8 ********************************************************************/ -be_local_closure(read8, /* name */ +be_local_closure(I2C_Driver_read8, /* name */ be_nested_proto( 7, /* nstack */ 2, /* argc */ @@ -255,13 +253,13 @@ be_local_closure(read8, /* name */ NULL, /* no sub protos */ 1, /* has constants */ ( &(const bvalue[ 4]) { /* constants */ - /* K0 */ be_nested_string("wire", -212213352, 4), - /* K1 */ be_nested_string("read", -824204347, 4), - /* K2 */ be_nested_string("addr", 1087856498, 4), + /* K0 */ be_nested_str(wire), + /* K1 */ be_nested_str(read), + /* K2 */ be_nested_str(addr), /* K3 */ be_const_int(1), }), - (be_nested_const_str("read8", -1492179129, 5)), - ((bstring*) &be_const_str_input), + &be_const_str_read8, + &be_const_str_solidified, ( &(const binstruction[ 7]) { /* code */ 0x88080100, // 0000 GETMBR R2 R0 K0 0x8C080501, // 0001 GETMET R2 R2 K1 @@ -279,9 +277,9 @@ be_local_closure(read8, /* name */ /******************************************************************** ** Solidified function: init ********************************************************************/ -be_local_closure(init, /* name */ +be_local_closure(I2C_Driver_init, /* name */ be_nested_proto( - 10, /* nstack */ + 9, /* nstack */ 4, /* argc */ 0, /* varg */ 0, /* has upvals */ @@ -290,63 +288,63 @@ be_local_closure(init, /* name */ NULL, /* no sub protos */ 1, /* has constants */ ( &(const bvalue[10]) { /* constants */ - /* K0 */ be_nested_string("get_tasmota", 334356779, 11), - /* K1 */ be_nested_string("i2c_enabled", 218388101, 11), - /* K2 */ be_nested_string("addr", 1087856498, 4), - /* K3 */ be_nested_string("wire", -212213352, 4), - /* K4 */ be_nested_string("wire_scan", -1623691416, 9), - /* K5 */ be_nested_string("function", -1630125495, 8), - /* K6 */ be_nested_string("name", -1925595674, 4), - /* K7 */ be_nested_string("I2C:", 813483371, 4), - /* K8 */ be_nested_string("detected on bus", 1432002650, 15), - /* K9 */ be_nested_string("bus", 1607822841, 3), + /* K0 */ be_nested_str(tasmota), + /* K1 */ be_nested_str(i2c_enabled), + /* K2 */ be_nested_str(addr), + /* K3 */ be_nested_str(wire), + /* K4 */ be_nested_str(wire_scan), + /* K5 */ be_nested_str(function), + /* K6 */ be_nested_str(name), + /* K7 */ be_nested_str(I2C_X3A), + /* K8 */ be_nested_str(detected_X20on_X20bus), + /* K9 */ be_nested_str(bus), }), - ((bstring*) &be_const_str_init), - ((bstring*) &be_const_str_input), + &be_const_str_init, + &be_const_str_solidified, ( &(const binstruction[44]) { /* code */ - 0x8C100100, // 0000 GETMET R4 R0 K0 - 0x7C100200, // 0001 CALL R4 1 - 0x4C140000, // 0002 LDNIL R5 - 0x20140605, // 0003 NE R5 R3 R5 - 0x78160004, // 0004 JMPF R5 #000A - 0x8C140901, // 0005 GETMET R5 R4 K1 - 0x5C1C0600, // 0006 MOVE R7 R3 - 0x7C140400, // 0007 CALL R5 2 - 0x74160000, // 0008 JMPT R5 #000A - 0x80000A00, // 0009 RET 0 - 0x90020402, // 000A SETMBR R0 K2 R2 - 0x8C140904, // 000B GETMET R5 R4 K4 - 0x881C0102, // 000C GETMBR R7 R0 K2 - 0x7C140400, // 000D CALL R5 2 - 0x90020605, // 000E SETMBR R0 K3 R5 - 0x88140103, // 000F GETMBR R5 R0 K3 - 0x78160019, // 0010 JMPF R5 #002B - 0x60140004, // 0011 GETGBL R5 G4 - 0x5C180200, // 0012 MOVE R6 R1 - 0x7C140200, // 0013 CALL R5 1 - 0x1C140B05, // 0014 EQ R5 R5 K5 - 0x78160004, // 0015 JMPF R5 #001B - 0x5C140200, // 0016 MOVE R5 R1 - 0x5C180000, // 0017 MOVE R6 R0 - 0x7C140200, // 0018 CALL R5 1 - 0x90020C05, // 0019 SETMBR R0 K6 R5 + 0x4C100000, // 0000 LDNIL R4 + 0x20100604, // 0001 NE R4 R3 R4 + 0x78120005, // 0002 JMPF R4 #0009 + 0xB8120000, // 0003 GETNGBL R4 K0 + 0x8C100901, // 0004 GETMET R4 R4 K1 + 0x5C180600, // 0005 MOVE R6 R3 + 0x7C100400, // 0006 CALL R4 2 + 0x74120000, // 0007 JMPT R4 #0009 + 0x80000800, // 0008 RET 0 + 0x90020402, // 0009 SETMBR R0 K2 R2 + 0xB8120000, // 000A GETNGBL R4 K0 + 0x8C100904, // 000B GETMET R4 R4 K4 + 0x88180102, // 000C GETMBR R6 R0 K2 + 0x7C100400, // 000D CALL R4 2 + 0x90020604, // 000E SETMBR R0 K3 R4 + 0x88100103, // 000F GETMBR R4 R0 K3 + 0x78120019, // 0010 JMPF R4 #002B + 0x60100004, // 0011 GETGBL R4 G4 + 0x5C140200, // 0012 MOVE R5 R1 + 0x7C100200, // 0013 CALL R4 1 + 0x1C100905, // 0014 EQ R4 R4 K5 + 0x78120004, // 0015 JMPF R4 #001B + 0x5C100200, // 0016 MOVE R4 R1 + 0x5C140000, // 0017 MOVE R5 R0 + 0x7C100200, // 0018 CALL R4 1 + 0x90020C04, // 0019 SETMBR R0 K6 R4 0x70020000, // 001A JMP #001C 0x90020C01, // 001B SETMBR R0 K6 R1 - 0x88140106, // 001C GETMBR R5 R0 K6 - 0x4C180000, // 001D LDNIL R6 - 0x1C140A06, // 001E EQ R5 R5 R6 - 0x78160001, // 001F JMPF R5 #0022 - 0x4C140000, // 0020 LDNIL R5 - 0x90020605, // 0021 SETMBR R0 K3 R5 - 0x88140103, // 0022 GETMBR R5 R0 K3 - 0x78160006, // 0023 JMPF R5 #002B - 0x60140001, // 0024 GETGBL R5 G1 - 0x58180007, // 0025 LDCONST R6 K7 - 0x881C0106, // 0026 GETMBR R7 R0 K6 - 0x58200008, // 0027 LDCONST R8 K8 - 0x88240103, // 0028 GETMBR R9 R0 K3 - 0x88241309, // 0029 GETMBR R9 R9 K9 - 0x7C140800, // 002A CALL R5 4 + 0x88100106, // 001C GETMBR R4 R0 K6 + 0x4C140000, // 001D LDNIL R5 + 0x1C100805, // 001E EQ R4 R4 R5 + 0x78120001, // 001F JMPF R4 #0022 + 0x4C100000, // 0020 LDNIL R4 + 0x90020604, // 0021 SETMBR R0 K3 R4 + 0x88100103, // 0022 GETMBR R4 R0 K3 + 0x78120006, // 0023 JMPF R4 #002B + 0x60100001, // 0024 GETGBL R4 G1 + 0x58140007, // 0025 LDCONST R5 K7 + 0x88180106, // 0026 GETMBR R6 R0 K6 + 0x581C0008, // 0027 LDCONST R7 K8 + 0x88200103, // 0028 GETMBR R8 R0 K3 + 0x88201109, // 0029 GETMBR R8 R8 K9 + 0x7C100800, // 002A CALL R4 4 0x80000000, // 002B RET 0 }) ) @@ -357,7 +355,7 @@ be_local_closure(init, /* name */ /******************************************************************** ** Solidified function: read13 ********************************************************************/ -be_local_closure(read13, /* name */ +be_local_closure(I2C_Driver_read13, /* name */ be_nested_proto( 7, /* nstack */ 2, /* argc */ @@ -368,15 +366,15 @@ be_local_closure(read13, /* name */ NULL, /* no sub protos */ 1, /* has constants */ ( &(const bvalue[ 6]) { /* constants */ - /* K0 */ be_nested_string("wire", -212213352, 4), - /* K1 */ be_nested_string("read_bytes", -718234123, 10), - /* K2 */ be_nested_string("addr", 1087856498, 4), + /* K0 */ be_nested_str(wire), + /* K1 */ be_nested_str(read_bytes), + /* K2 */ be_nested_str(addr), /* K3 */ be_const_int(2), /* K4 */ be_const_int(0), /* K5 */ be_const_int(1), }), - (be_nested_const_str("read13", 12887293, 6)), - ((bstring*) &be_const_str_input), + &be_const_str_read13, + &be_const_str_solidified, ( &(const binstruction[12]) { /* code */ 0x88080100, // 0000 GETMBR R2 R0 K0 0x8C080501, // 0001 GETMET R2 R2 K1 @@ -395,27 +393,33 @@ be_local_closure(read13, /* name */ ); /*******************************************************************/ -#include "../generate/be_fixed_be_class_I2C_Driver.h" -void be_load_driver_i2c_lib(bvm *vm) { +/******************************************************************** +** Solidified class: I2C_Driver +********************************************************************/ +be_local_class(I2C_Driver, + 3, + NULL, + be_nested_map(11, + ( (struct bmapnode*) &(const bmapnode[]) { + { be_const_key(read32, -1), be_const_closure(I2C_Driver_read32_closure) }, + { be_const_key(write8, 6), be_const_closure(I2C_Driver_write8_closure) }, + { be_const_key(name, -1), be_const_var(2) }, + { be_const_key(addr, 8), be_const_var(1) }, + { be_const_key(read12, -1), be_const_closure(I2C_Driver_read12_closure) }, + { be_const_key(wire, 10), be_const_var(0) }, + { be_const_key(read13, -1), be_const_closure(I2C_Driver_read13_closure) }, + { be_const_key(read24, -1), be_const_closure(I2C_Driver_read24_closure) }, + { be_const_key(read8, -1), be_const_closure(I2C_Driver_read8_closure) }, + { be_const_key(init, -1), be_const_closure(I2C_Driver_init_closure) }, + { be_const_key(write_bit, -1), be_const_closure(I2C_Driver_write_bit_closure) }, + })), + be_str_literal("I2C_Driver") +); +/*******************************************************************/ + +void be_load_I2C_Driver_class(bvm *vm) { be_pushntvclass(vm, &be_class_I2C_Driver); be_setglobal(vm, "I2C_Driver"); be_pop(vm, 1); } -/* @const_object_info_begin - -class be_class_I2C_Driver (scope: global, name: I2C_Driver, super: be_class_Driver) { - wire, var - addr, var - name, var - - init, closure(init_closure) - write8, closure(write8_closure) - write_bit, closure(write_bit_closure) - read8, closure(read8_closure) - read12, closure(read12_closure) - read13, closure(read13_closure) - read24, closure(read24_closure) - read32, closure(read32_closure) -} -@const_object_info_end */ diff --git a/lib/libesp32/Berry/default/be_i2s_audio_lib.c b/lib/libesp32/berry/default/be_i2s_audio_lib.c similarity index 100% rename from lib/libesp32/Berry/default/be_i2s_audio_lib.c rename to lib/libesp32/berry/default/be_i2s_audio_lib.c diff --git a/lib/libesp32/Berry/default/be_leds_animator_lib.c b/lib/libesp32/berry/default/be_leds_animator_lib.c similarity index 75% rename from lib/libesp32/Berry/default/be_leds_animator_lib.c rename to lib/libesp32/berry/default/be_leds_animator_lib.c index c5783edb9..bd82193b9 100644 --- a/lib/libesp32/Berry/default/be_leds_animator_lib.c +++ b/lib/libesp32/berry/default/be_leds_animator_lib.c @@ -20,17 +20,17 @@ be_local_closure(Leds_animator_init, /* name */ NULL, /* no sub protos */ 1, /* has constants */ ( &(const bvalue[ 8]) { /* constants */ - /* K0 */ be_nested_string("strip", -48555823, 5), - /* K1 */ be_nested_string("bri", 2112284244, 3), - /* K2 */ be_nested_string("running", 343848780, 7), - /* K3 */ be_nested_string("pixel_count", -1855836553, 11), - /* K4 */ be_nested_string("animators", 279858213, 9), - /* K5 */ be_nested_string("clear", 1550717474, 5), - /* K6 */ be_nested_string("tasmota", 424643812, 7), - /* K7 */ be_nested_string("add_driver", 1654458371, 10), + /* K0 */ be_nested_str(strip), + /* K1 */ be_nested_str(bri), + /* K2 */ be_nested_str(running), + /* K3 */ be_nested_str(pixel_count), + /* K4 */ be_nested_str(animators), + /* K5 */ be_nested_str(clear), + /* K6 */ be_nested_str(tasmota), + /* K7 */ be_nested_str(add_driver), }), - (be_nested_const_str("init", 380752755, 4)), - ((bstring*) &be_const_str_input), + &be_const_str_init, + &be_const_str_solidified, ( &(const binstruction[18]) { /* code */ 0x90020001, // 0000 SETMBR R0 K0 R1 0x540A0031, // 0001 LDINT R2 50 @@ -70,10 +70,10 @@ be_local_closure(Leds_animator_set_bri, /* name */ NULL, /* no sub protos */ 1, /* has constants */ ( &(const bvalue[ 1]) { /* constants */ - /* K0 */ be_nested_string("bri", 2112284244, 3), + /* K0 */ be_nested_str(bri), }), - (be_nested_const_str("set_bri", -1505848517, 7)), - ((bstring*) &be_const_str_input), + &be_const_str_set_bri, + &be_const_str_solidified, ( &(const binstruction[ 2]) { /* code */ 0x90020001, // 0000 SETMBR R0 K0 R1 0x80000000, // 0001 RET 0 @@ -97,10 +97,10 @@ be_local_closure(Leds_animator_stop, /* name */ NULL, /* no sub protos */ 1, /* has constants */ ( &(const bvalue[ 1]) { /* constants */ - /* K0 */ be_nested_string("running", 343848780, 7), + /* K0 */ be_nested_str(running), }), - (be_nested_const_str("stop", -883741979, 4)), - ((bstring*) &be_const_str_input), + &be_const_str_stop, + &be_const_str_solidified, ( &(const binstruction[ 3]) { /* code */ 0x50040000, // 0000 LDBOOL R1 0 0 0x90020001, // 0001 SETMBR R0 K0 R1 @@ -125,8 +125,8 @@ be_local_closure(Leds_animator_animate, /* name */ NULL, /* no sub protos */ 0, /* has constants */ NULL, /* no const */ - (be_nested_const_str("animate", -409180496, 7)), - ((bstring*) &be_const_str_input), + &be_const_str_animate, + &be_const_str_solidified, ( &(const binstruction[ 1]) { /* code */ 0x80000000, // 0000 RET 0 }) @@ -149,11 +149,11 @@ be_local_closure(Leds_animator_remove, /* name */ NULL, /* no sub protos */ 1, /* has constants */ ( &(const bvalue[ 2]) { /* constants */ - /* K0 */ be_nested_string("tasmota", 424643812, 7), - /* K1 */ be_nested_string("remove_driver", 1030243768, 13), + /* K0 */ be_nested_str(tasmota), + /* K1 */ be_nested_str(remove_driver), }), - (be_nested_const_str("remove", -611183107, 6)), - ((bstring*) &be_const_str_input), + &be_const_str_remove, + &be_const_str_solidified, ( &(const binstruction[ 5]) { /* code */ 0xB8060000, // 0000 GETNGBL R1 K0 0x8C040301, // 0001 GETMET R1 R1 K1 @@ -180,16 +180,16 @@ be_local_closure(Leds_animator_every_50ms, /* name */ NULL, /* no sub protos */ 1, /* has constants */ ( &(const bvalue[ 7]) { /* constants */ - /* K0 */ be_nested_string("running", 343848780, 7), + /* K0 */ be_nested_str(running), /* K1 */ be_const_int(0), - /* K2 */ be_nested_string("animators", 279858213, 9), - /* K3 */ be_nested_string("is_running", -2068120035, 10), - /* K4 */ be_nested_string("animate", -409180496, 7), + /* K2 */ be_nested_str(animators), + /* K3 */ be_nested_str(is_running), + /* K4 */ be_nested_str(animate), /* K5 */ be_const_int(1), - /* K6 */ be_nested_string("remove", -611183107, 6), + /* K6 */ be_nested_str(remove), }), - (be_nested_const_str("every_50ms", -1911083288, 10)), - ((bstring*) &be_const_str_input), + &be_const_str_every_50ms, + &be_const_str_solidified, ( &(const binstruction[25]) { /* code */ 0x88040100, // 0000 GETMBR R1 R0 K0 0x78060015, // 0001 JMPF R1 #0018 @@ -236,10 +236,10 @@ be_local_closure(Leds_animator_get_bri, /* name */ NULL, /* no sub protos */ 1, /* has constants */ ( &(const bvalue[ 1]) { /* constants */ - /* K0 */ be_nested_string("bri", 2112284244, 3), + /* K0 */ be_nested_str(bri), }), - (be_nested_const_str("get_bri", 2041809895, 7)), - ((bstring*) &be_const_str_input), + &be_const_str_get_bri, + &be_const_str_solidified, ( &(const binstruction[ 2]) { /* code */ 0x88080100, // 0000 GETMBR R2 R0 K0 0x80040400, // 0001 RET 1 R2 @@ -263,10 +263,10 @@ be_local_closure(Leds_animator_start, /* name */ NULL, /* no sub protos */ 1, /* has constants */ ( &(const bvalue[ 1]) { /* constants */ - /* K0 */ be_nested_string("running", 343848780, 7), + /* K0 */ be_nested_str(running), }), - (be_nested_const_str("start", 1697318111, 5)), - ((bstring*) &be_const_str_input), + &be_const_str_start, + &be_const_str_solidified, ( &(const binstruction[ 3]) { /* code */ 0x50040200, // 0000 LDBOOL R1 1 0 0x90020001, // 0001 SETMBR R0 K0 R1 @@ -291,12 +291,12 @@ be_local_closure(Leds_animator_add_anim, /* name */ NULL, /* no sub protos */ 1, /* has constants */ ( &(const bvalue[ 3]) { /* constants */ - /* K0 */ be_nested_string("animators", 279858213, 9), - /* K1 */ be_nested_string("push", -2022703139, 4), - /* K2 */ be_nested_string("run", 718098122, 3), + /* K0 */ be_nested_str(animators), + /* K1 */ be_nested_str(push), + /* K2 */ be_nested_str(run), }), - (be_nested_const_str("add_anim", -314304628, 8)), - ((bstring*) &be_const_str_input), + &be_const_str_add_anim, + &be_const_str_solidified, ( &(const binstruction[ 7]) { /* code */ 0x88080100, // 0000 GETMBR R2 R0 K0 0x8C080501, // 0001 GETMET R2 R2 K1 @@ -325,12 +325,12 @@ be_local_closure(Leds_animator_clear, /* name */ NULL, /* no sub protos */ 1, /* has constants */ ( &(const bvalue[ 3]) { /* constants */ - /* K0 */ be_nested_string("stop", -883741979, 4), - /* K1 */ be_nested_string("strip", -48555823, 5), - /* K2 */ be_nested_string("clear", 1550717474, 5), + /* K0 */ be_nested_str(stop), + /* K1 */ be_nested_str(strip), + /* K2 */ be_nested_str(clear), }), - (be_nested_const_str("clear", 1550717474, 5)), - ((bstring*) &be_const_str_input), + &be_const_str_clear, + &be_const_str_solidified, ( &(const binstruction[ 6]) { /* code */ 0x8C040100, // 0000 GETMET R1 R0 K0 0x7C040200, // 0001 CALL R1 1 @@ -352,23 +352,23 @@ be_local_class(Leds_animator, NULL, be_nested_map(15, ( (struct bmapnode*) &(const bmapnode[]) { - { be_nested_key("init", 380752755, 4, 7), be_const_closure(Leds_animator_init_closure) }, - { be_nested_key("set_bri", -1505848517, 7, -1), be_const_closure(Leds_animator_set_bri_closure) }, - { be_nested_key("stop", -883741979, 4, -1), be_const_closure(Leds_animator_stop_closure) }, - { be_nested_key("strip", -48555823, 5, 4), be_const_var(0) }, - { be_nested_key("animators", 279858213, 9, 12), be_const_var(4) }, - { be_nested_key("animate", -409180496, 7, -1), be_const_closure(Leds_animator_animate_closure) }, - { be_nested_key("remove", -611183107, 6, -1), be_const_closure(Leds_animator_remove_closure) }, - { be_nested_key("running", 343848780, 7, -1), be_const_var(3) }, - { be_nested_key("every_50ms", -1911083288, 10, -1), be_const_closure(Leds_animator_every_50ms_closure) }, - { be_nested_key("bri", 2112284244, 3, 6), be_const_var(2) }, - { be_nested_key("get_bri", 2041809895, 7, -1), be_const_closure(Leds_animator_get_bri_closure) }, - { be_nested_key("start", 1697318111, 5, -1), be_const_closure(Leds_animator_start_closure) }, - { be_nested_key("add_anim", -314304628, 8, 13), be_const_closure(Leds_animator_add_anim_closure) }, - { be_nested_key("pixel_count", -1855836553, 11, -1), be_const_var(1) }, - { be_nested_key("clear", 1550717474, 5, 1), be_const_closure(Leds_animator_clear_closure) }, + { be_const_key(init, 12), be_const_closure(Leds_animator_init_closure) }, + { be_const_key(clear, -1), be_const_closure(Leds_animator_clear_closure) }, + { be_const_key(stop, -1), be_const_closure(Leds_animator_stop_closure) }, + { be_const_key(strip, 4), be_const_var(0) }, + { be_const_key(pixel_count, 6), be_const_var(1) }, + { be_const_key(animate, -1), be_const_closure(Leds_animator_animate_closure) }, + { be_const_key(add_anim, 13), be_const_closure(Leds_animator_add_anim_closure) }, + { be_const_key(bri, -1), be_const_var(2) }, + { be_const_key(every_50ms, -1), be_const_closure(Leds_animator_every_50ms_closure) }, + { be_const_key(remove, 7), be_const_closure(Leds_animator_remove_closure) }, + { be_const_key(get_bri, -1), be_const_closure(Leds_animator_get_bri_closure) }, + { be_const_key(start, -1), be_const_closure(Leds_animator_start_closure) }, + { be_const_key(running, -1), be_const_var(3) }, + { be_const_key(animators, -1), be_const_var(4) }, + { be_const_key(set_bri, 1), be_const_closure(Leds_animator_set_bri_closure) }, })), - (be_nested_const_str("Leds_animator", 142168673, 13)) + be_str_literal("Leds_animator") ); /*******************************************************************/ diff --git a/lib/libesp32/Berry/default/be_leds_lib.c b/lib/libesp32/berry/default/be_leds_lib.c similarity index 79% rename from lib/libesp32/Berry/default/be_leds_lib.c rename to lib/libesp32/berry/default/be_leds_lib.c index 06e322c13..58b0a991e 100644 --- a/lib/libesp32/Berry/default/be_leds_lib.c +++ b/lib/libesp32/berry/default/be_leds_lib.c @@ -20,11 +20,11 @@ be_local_closure(Leds_matrix_pixel_count, /* name */ NULL, /* no sub protos */ 1, /* has constants */ ( &(const bvalue[ 2]) { /* constants */ - /* K0 */ be_nested_str_literal("w"), - /* K1 */ be_nested_str_literal("h"), + /* K0 */ be_nested_str(w), + /* K1 */ be_nested_str(h), }), - (be_nested_const_str("pixel_count", -1855836553, 11)), - ((bstring*) &be_const_str_input), + &be_const_str_pixel_count, + &be_const_str_solidified, ( &(const binstruction[ 4]) { /* code */ 0x88040100, // 0000 GETMBR R1 R0 K0 0x88080101, // 0001 GETMBR R2 R0 K1 @@ -50,10 +50,10 @@ be_local_closure(Leds_matrix_set_alternate, /* name */ NULL, /* no sub protos */ 1, /* has constants */ ( &(const bvalue[ 1]) { /* constants */ - /* K0 */ be_nested_str_literal("alternate"), + /* K0 */ be_nested_str(alternate), }), - (be_nested_const_str("set_alternate", 1709680562, 13)), - ((bstring*) &be_const_str_input), + &be_const_str_set_alternate, + &be_const_str_solidified, ( &(const binstruction[ 2]) { /* code */ 0x90020001, // 0000 SETMBR R0 K0 R1 0x80000000, // 0001 RET 0 @@ -77,11 +77,11 @@ be_local_closure(Leds_matrix_pixel_size, /* name */ NULL, /* no sub protos */ 1, /* has constants */ ( &(const bvalue[ 2]) { /* constants */ - /* K0 */ be_nested_str_literal("strip"), - /* K1 */ be_nested_str_literal("pixel_size"), + /* K0 */ be_nested_str(strip), + /* K1 */ be_nested_str(pixel_size), }), - (be_nested_const_str("pixel_size", -2085831511, 10)), - ((bstring*) &be_const_str_input), + &be_const_str_pixel_size, + &be_const_str_solidified, ( &(const binstruction[ 4]) { /* code */ 0x88040100, // 0000 GETMBR R1 R0 K0 0x8C040301, // 0001 GETMET R1 R1 K1 @@ -107,12 +107,12 @@ be_local_closure(Leds_matrix_set_pixel_color, /* name */ NULL, /* no sub protos */ 1, /* has constants */ ( &(const bvalue[ 3]) { /* constants */ - /* K0 */ be_nested_str_literal("strip"), - /* K1 */ be_nested_str_literal("set_pixel_color"), - /* K2 */ be_nested_str_literal("offset"), + /* K0 */ be_nested_str(strip), + /* K1 */ be_nested_str(set_pixel_color), + /* K2 */ be_nested_str(offset), }), - (be_nested_const_str("set_pixel_color", 1275248356, 15)), - ((bstring*) &be_const_str_input), + &be_const_str_set_pixel_color, + &be_const_str_solidified, ( &(const binstruction[ 8]) { /* code */ 0x88100100, // 0000 GETMBR R4 R0 K0 0x8C100901, // 0001 GETMET R4 R4 K1 @@ -142,17 +142,17 @@ be_local_closure(Leds_matrix_set_matrix_pixel_color, /* name */ NULL, /* no sub protos */ 1, /* has constants */ ( &(const bvalue[ 8]) { /* constants */ - /* K0 */ be_nested_str_literal("alternate"), + /* K0 */ be_nested_str(alternate), /* K1 */ be_const_int(2), - /* K2 */ be_nested_str_literal("strip"), - /* K3 */ be_nested_str_literal("set_pixel_color"), - /* K4 */ be_nested_str_literal("w"), - /* K5 */ be_nested_str_literal("h"), + /* K2 */ be_nested_str(strip), + /* K3 */ be_nested_str(set_pixel_color), + /* K4 */ be_nested_str(w), + /* K5 */ be_nested_str(h), /* K6 */ be_const_int(1), - /* K7 */ be_nested_str_literal("offset"), + /* K7 */ be_nested_str(offset), }), - (be_nested_const_str("set_matrix_pixel_color", 1197149462, 22)), - ((bstring*) &be_const_str_input), + &be_const_str_set_matrix_pixel_color, + &be_const_str_solidified, ( &(const binstruction[29]) { /* code */ 0x88140100, // 0000 GETMBR R5 R0 K0 0x7816000F, // 0001 JMPF R5 #0012 @@ -203,16 +203,16 @@ be_local_closure(Leds_matrix_show, /* name */ NULL, /* no sub protos */ 1, /* has constants */ ( &(const bvalue[ 7]) { /* constants */ - /* K0 */ be_nested_str_literal("offset"), + /* K0 */ be_nested_str(offset), /* K1 */ be_const_int(0), - /* K2 */ be_nested_str_literal("w"), - /* K3 */ be_nested_str_literal("h"), - /* K4 */ be_nested_str_literal("strip"), - /* K5 */ be_nested_str_literal("leds"), - /* K6 */ be_nested_str_literal("show"), + /* K2 */ be_nested_str(w), + /* K3 */ be_nested_str(h), + /* K4 */ be_nested_str(strip), + /* K5 */ be_nested_str(leds), + /* K6 */ be_nested_str(show), }), - (be_nested_const_str("show", -1454906820, 4)), - ((bstring*) &be_const_str_input), + &be_const_str_show, + &be_const_str_solidified, ( &(const binstruction[18]) { /* code */ 0x60080017, // 0000 GETGBL R2 G23 0x5C0C0200, // 0001 MOVE R3 R1 @@ -252,11 +252,11 @@ be_local_closure(Leds_matrix_is_dirty, /* name */ NULL, /* no sub protos */ 1, /* has constants */ ( &(const bvalue[ 2]) { /* constants */ - /* K0 */ be_nested_str_literal("strip"), - /* K1 */ be_nested_str_literal("is_dirty"), + /* K0 */ be_nested_str(strip), + /* K1 */ be_nested_str(is_dirty), }), - (be_nested_const_str("is_dirty", 418034110, 8)), - ((bstring*) &be_const_str_input), + &be_const_str_is_dirty, + &be_const_str_solidified, ( &(const binstruction[ 4]) { /* code */ 0x88040100, // 0000 GETMBR R1 R0 K0 0x8C040301, // 0001 GETMET R1 R1 K1 @@ -283,15 +283,15 @@ be_local_closure(Leds_matrix_clear_to, /* name */ 1, /* has constants */ ( &(const bvalue[ 7]) { /* constants */ /* K0 */ be_const_int(0), - /* K1 */ be_nested_str_literal("w"), - /* K2 */ be_nested_str_literal("h"), - /* K3 */ be_nested_str_literal("strip"), - /* K4 */ be_nested_str_literal("set_pixel_color"), - /* K5 */ be_nested_str_literal("offset"), + /* K1 */ be_nested_str(w), + /* K2 */ be_nested_str(h), + /* K3 */ be_nested_str(strip), + /* K4 */ be_nested_str(set_pixel_color), + /* K5 */ be_nested_str(offset), /* K6 */ be_const_int(1), }), - (be_nested_const_str("clear_to", -766965166, 8)), - ((bstring*) &be_const_str_input), + &be_const_str_clear_to, + &be_const_str_solidified, ( &(const binstruction[16]) { /* code */ 0x580C0000, // 0000 LDCONST R3 K0 0x88100101, // 0001 GETMBR R4 R0 K1 @@ -329,12 +329,12 @@ be_local_closure(Leds_matrix_clear, /* name */ NULL, /* no sub protos */ 1, /* has constants */ ( &(const bvalue[ 3]) { /* constants */ - /* K0 */ be_nested_str_literal("clear_to"), + /* K0 */ be_nested_str(clear_to), /* K1 */ be_const_int(0), - /* K2 */ be_nested_str_literal("show"), + /* K2 */ be_nested_str(show), }), - (be_nested_const_str("clear", 1550717474, 5)), - ((bstring*) &be_const_str_input), + &be_const_str_clear, + &be_const_str_solidified, ( &(const binstruction[ 6]) { /* code */ 0x8C040100, // 0000 GETMET R1 R0 K0 0x580C0001, // 0001 LDCONST R3 K1 @@ -362,8 +362,8 @@ be_local_closure(Leds_matrix_pixels_buffer, /* name */ NULL, /* no sub protos */ 0, /* has constants */ NULL, /* no const */ - (be_nested_const_str("pixels_buffer", 1229555807, 13)), - ((bstring*) &be_const_str_input), + &be_const_str_pixels_buffer, + &be_const_str_solidified, ( &(const binstruction[ 2]) { /* code */ 0x4C040000, // 0000 LDNIL R1 0x80040200, // 0001 RET 1 R1 @@ -387,14 +387,14 @@ be_local_closure(Leds_matrix_init, /* name */ NULL, /* no sub protos */ 1, /* has constants */ ( &(const bvalue[ 5]) { /* constants */ - /* K0 */ be_nested_str_literal("strip"), - /* K1 */ be_nested_str_literal("offset"), - /* K2 */ be_nested_str_literal("h"), - /* K3 */ be_nested_str_literal("w"), - /* K4 */ be_nested_str_literal("alternate"), + /* K0 */ be_nested_str(strip), + /* K1 */ be_nested_str(offset), + /* K2 */ be_nested_str(h), + /* K3 */ be_nested_str(w), + /* K4 */ be_nested_str(alternate), }), - (be_nested_const_str("init", 380752755, 4)), - ((bstring*) &be_const_str_input), + &be_const_str_init, + &be_const_str_solidified, ( &(const binstruction[ 7]) { /* code */ 0x90020001, // 0000 SETMBR R0 K0 R1 0x90020204, // 0001 SETMBR R0 K1 R4 @@ -423,11 +423,11 @@ be_local_closure(Leds_matrix_dirty, /* name */ NULL, /* no sub protos */ 1, /* has constants */ ( &(const bvalue[ 2]) { /* constants */ - /* K0 */ be_nested_str_literal("strip"), - /* K1 */ be_nested_str_literal("dirty"), + /* K0 */ be_nested_str(strip), + /* K1 */ be_nested_str(dirty), }), - (be_nested_const_str("dirty", -1627386213, 5)), - ((bstring*) &be_const_str_input), + &be_const_str_dirty, + &be_const_str_solidified, ( &(const binstruction[ 4]) { /* code */ 0x88040100, // 0000 GETMBR R1 R0 K0 0x8C040301, // 0001 GETMET R1 R1 K1 @@ -453,12 +453,12 @@ be_local_closure(Leds_matrix_get_pixel_color, /* name */ NULL, /* no sub protos */ 1, /* has constants */ ( &(const bvalue[ 3]) { /* constants */ - /* K0 */ be_nested_str_literal("strip"), - /* K1 */ be_nested_str_literal("get_pixel_color"), - /* K2 */ be_nested_str_literal("offseta"), + /* K0 */ be_nested_str(strip), + /* K1 */ be_nested_str(get_pixel_color), + /* K2 */ be_nested_str(offseta), }), - (be_nested_const_str("get_pixel_color", 337490048, 15)), - ((bstring*) &be_const_str_input), + &be_const_str_get_pixel_color, + &be_const_str_solidified, ( &(const binstruction[ 6]) { /* code */ 0x88080100, // 0000 GETMBR R2 R0 K0 0x8C080501, // 0001 GETMET R2 R2 K1 @@ -486,10 +486,10 @@ be_local_closure(Leds_matrix_get_alternate, /* name */ NULL, /* no sub protos */ 1, /* has constants */ ( &(const bvalue[ 1]) { /* constants */ - /* K0 */ be_nested_str_literal("alternate"), + /* K0 */ be_nested_str(alternate), }), - (be_nested_const_str("get_alternate", 1450148894, 13)), - ((bstring*) &be_const_str_input), + &be_const_str_get_alternate, + &be_const_str_solidified, ( &(const binstruction[ 2]) { /* code */ 0x88040100, // 0000 GETMBR R1 R0 K0 0x80040200, // 0001 RET 1 R1 @@ -513,8 +513,8 @@ be_local_closure(Leds_matrix_begin, /* name */ NULL, /* no sub protos */ 0, /* has constants */ NULL, /* no const */ - (be_nested_const_str("begin", 1748273790, 5)), - ((bstring*) &be_const_str_input), + &be_const_str_begin, + &be_const_str_solidified, ( &(const binstruction[ 1]) { /* code */ 0x80000000, // 0000 RET 0 }) @@ -537,11 +537,11 @@ be_local_closure(Leds_matrix_can_show, /* name */ NULL, /* no sub protos */ 1, /* has constants */ ( &(const bvalue[ 2]) { /* constants */ - /* K0 */ be_nested_str_literal("strip"), - /* K1 */ be_nested_str_literal("can_show"), + /* K0 */ be_nested_str(strip), + /* K1 */ be_nested_str(can_show), }), - (be_nested_const_str("can_show", 960091187, 8)), - ((bstring*) &be_const_str_input), + &be_const_str_can_show, + &be_const_str_solidified, ( &(const binstruction[ 4]) { /* code */ 0x88040100, // 0000 GETMBR R1 R0 K0 0x8C040301, // 0001 GETMET R1 R1 K1 @@ -561,27 +561,27 @@ be_local_class(Leds_matrix, NULL, be_nested_map(21, ( (struct bmapnode*) &(const bmapnode[]) { - { be_nested_key("pixel_count", -1855836553, 11, -1), be_const_closure(Leds_matrix_pixel_count_closure) }, - { be_nested_key("h", -317966505, 1, 6), be_const_var(2) }, - { be_nested_key("set_alternate", 1709680562, 13, 7), be_const_closure(Leds_matrix_set_alternate_closure) }, - { be_nested_key("pixel_size", -2085831511, 10, 16), be_const_closure(Leds_matrix_pixel_size_closure) }, - { be_nested_key("set_pixel_color", 1275248356, 15, 19), be_const_closure(Leds_matrix_set_pixel_color_closure) }, - { be_nested_key("set_matrix_pixel_color", 1197149462, 22, 10), be_const_closure(Leds_matrix_set_matrix_pixel_color_closure) }, - { be_nested_key("show", -1454906820, 4, -1), be_const_closure(Leds_matrix_show_closure) }, - { be_nested_key("alternate", 1140253277, 9, -1), be_const_var(4) }, - { be_nested_key("strip", -48555823, 5, -1), be_const_var(0) }, - { be_nested_key("clear_to", -766965166, 8, -1), be_const_closure(Leds_matrix_clear_to_closure) }, - { be_nested_key("w", -234078410, 1, 15), be_const_var(3) }, - { be_nested_key("pixels_buffer", 1229555807, 13, -1), be_const_closure(Leds_matrix_pixels_buffer_closure) }, - { be_nested_key("init", 380752755, 4, -1), be_const_closure(Leds_matrix_init_closure) }, - { be_nested_key("dirty", -1627386213, 5, -1), be_const_closure(Leds_matrix_dirty_closure) }, - { be_nested_key("get_pixel_color", 337490048, 15, -1), be_const_closure(Leds_matrix_get_pixel_color_closure) }, - { be_nested_key("get_alternate", 1450148894, 13, 17), be_const_closure(Leds_matrix_get_alternate_closure) }, - { be_nested_key("offset", 348705738, 6, 8), be_const_var(1) }, - { be_nested_key("clear", 1550717474, 5, -1), be_const_closure(Leds_matrix_clear_closure) }, - { be_nested_key("begin", 1748273790, 5, -1), be_const_closure(Leds_matrix_begin_closure) }, - { be_nested_key("is_dirty", 418034110, 8, -1), be_const_closure(Leds_matrix_is_dirty_closure) }, - { be_nested_key("can_show", 960091187, 8, -1), be_const_closure(Leds_matrix_can_show_closure) }, + { be_const_key(pixel_count, -1), be_const_closure(Leds_matrix_pixel_count_closure) }, + { be_const_key(h, 6), be_const_var(2) }, + { be_const_key(set_alternate, 7), be_const_closure(Leds_matrix_set_alternate_closure) }, + { be_const_key(pixel_size, 16), be_const_closure(Leds_matrix_pixel_size_closure) }, + { be_const_key(set_pixel_color, 19), be_const_closure(Leds_matrix_set_pixel_color_closure) }, + { be_const_key(set_matrix_pixel_color, 10), be_const_closure(Leds_matrix_set_matrix_pixel_color_closure) }, + { be_const_key(show, -1), be_const_closure(Leds_matrix_show_closure) }, + { be_const_key(alternate, -1), be_const_var(4) }, + { be_const_key(strip, -1), be_const_var(0) }, + { be_const_key(clear_to, -1), be_const_closure(Leds_matrix_clear_to_closure) }, + { be_const_key(w, 15), be_const_var(3) }, + { be_const_key(pixels_buffer, -1), be_const_closure(Leds_matrix_pixels_buffer_closure) }, + { be_const_key(init, -1), be_const_closure(Leds_matrix_init_closure) }, + { be_const_key(dirty, -1), be_const_closure(Leds_matrix_dirty_closure) }, + { be_const_key(get_pixel_color, -1), be_const_closure(Leds_matrix_get_pixel_color_closure) }, + { be_const_key(get_alternate, 17), be_const_closure(Leds_matrix_get_alternate_closure) }, + { be_const_key(offset, 8), be_const_var(1) }, + { be_const_key(clear, -1), be_const_closure(Leds_matrix_clear_closure) }, + { be_const_key(begin, -1), be_const_closure(Leds_matrix_begin_closure) }, + { be_const_key(is_dirty, -1), be_const_closure(Leds_matrix_is_dirty_closure) }, + { be_const_key(can_show, -1), be_const_closure(Leds_matrix_can_show_closure) }, })), be_str_literal("Leds_matrix") ); @@ -601,13 +601,13 @@ be_local_closure(Leds_create_matrix, /* name */ 1, /* has constants */ ( &(const bvalue[ 5]) { /* constants */ /* K0 */ be_const_int(0), - /* K1 */ be_nested_str_literal("leds"), - /* K2 */ be_nested_str_literal("value_error"), - /* K3 */ be_nested_str_literal("out of range"), + /* K1 */ be_nested_str(leds), + /* K2 */ be_nested_str(value_error), + /* K3 */ be_nested_str(out_X20of_X20range), /* K4 */ be_const_class(be_class_Leds_matrix), }), - (be_nested_const_str("create_matrix", -766781373, 13)), - ((bstring*) &be_const_str_input), + &be_const_str_create_matrix, + &be_const_str_solidified, ( &(const binstruction[37]) { /* code */ 0x60100009, // 0000 GETGBL R4 G9 0x5C140600, // 0001 MOVE R5 R3 @@ -666,11 +666,11 @@ be_local_closure(Leds_begin, /* name */ NULL, /* no sub protos */ 1, /* has constants */ ( &(const bvalue[ 2]) { /* constants */ - /* K0 */ be_nested_str_literal("call_native"), + /* K0 */ be_nested_str(call_native), /* K1 */ be_const_int(1), }), - (be_nested_const_str("begin", 1748273790, 5)), - ((bstring*) &be_const_str_input), + &be_const_str_begin, + &be_const_str_solidified, ( &(const binstruction[ 4]) { /* code */ 0x8C040100, // 0000 GETMET R1 R0 K0 0x580C0001, // 0001 LDCONST R3 K1 @@ -696,16 +696,16 @@ be_local_closure(Leds_to_gamma, /* name */ NULL, /* no sub protos */ 1, /* has constants */ ( &(const bvalue[ 7]) { /* constants */ - /* K0 */ be_nested_str_literal("tasmota"), - /* K1 */ be_nested_str_literal("scale_uint"), + /* K0 */ be_nested_str(tasmota), + /* K1 */ be_nested_str(scale_uint), /* K2 */ be_const_int(0), /* K3 */ be_const_int(16711680), - /* K4 */ be_nested_str_literal("gamma"), - /* K5 */ be_nested_str_literal("light"), - /* K6 */ be_nested_str_literal("gamma8"), + /* K4 */ be_nested_str(gamma), + /* K5 */ be_nested_str(light), + /* K6 */ be_nested_str(gamma8), }), - (be_nested_const_str("to_gamma", 1597139862, 8)), - ((bstring*) &be_const_str_input), + &be_const_str_to_gamma, + &be_const_str_solidified, ( &(const binstruction[67]) { /* code */ 0x4C0C0000, // 0000 LDNIL R3 0x200C0403, // 0001 NE R3 R2 R3 @@ -794,10 +794,10 @@ be_local_closure(Leds_pixel_count, /* name */ NULL, /* no sub protos */ 1, /* has constants */ ( &(const bvalue[ 1]) { /* constants */ - /* K0 */ be_nested_str_literal("call_native"), + /* K0 */ be_nested_str(call_native), }), - (be_nested_const_str("pixel_count", -1855836553, 11)), - ((bstring*) &be_const_str_input), + &be_const_str_pixel_count, + &be_const_str_solidified, ( &(const binstruction[ 4]) { /* code */ 0x8C040100, // 0000 GETMET R1 R0 K0 0x540E0007, // 0001 LDINT R3 8 @@ -823,12 +823,12 @@ be_local_closure(Leds_matrix, /* name */ NULL, /* no sub protos */ 1, /* has constants */ ( &(const bvalue[ 3]) { /* constants */ - /* K0 */ be_nested_str_literal("Leds"), - /* K1 */ be_nested_str_literal("create_matrix"), + /* K0 */ be_nested_str(Leds), + /* K1 */ be_nested_str(create_matrix), /* K2 */ be_const_int(0), }), - (be_nested_const_str("matrix", 365099244, 6)), - ((bstring*) &be_const_str_input), + &be_const_str_matrix, + &be_const_str_solidified, ( &(const binstruction[11]) { /* code */ 0xB8120000, // 0000 GETNGBL R4 K0 0x08140001, // 0001 MUL R5 R0 R1 @@ -861,10 +861,10 @@ be_local_closure(Leds_pixel_size, /* name */ NULL, /* no sub protos */ 1, /* has constants */ ( &(const bvalue[ 1]) { /* constants */ - /* K0 */ be_nested_str_literal("call_native"), + /* K0 */ be_nested_str(call_native), }), - (be_nested_const_str("pixel_size", -2085831511, 10)), - ((bstring*) &be_const_str_input), + &be_const_str_pixel_size, + &be_const_str_solidified, ( &(const binstruction[ 4]) { /* code */ 0x8C040100, // 0000 GETMET R1 R0 K0 0x540E0006, // 0001 LDINT R3 7 @@ -890,10 +890,10 @@ be_local_closure(Leds_pixels_buffer, /* name */ NULL, /* no sub protos */ 1, /* has constants */ ( &(const bvalue[ 1]) { /* constants */ - /* K0 */ be_nested_str_literal("call_native"), + /* K0 */ be_nested_str(call_native), }), - (be_nested_const_str("pixels_buffer", 1229555807, 13)), - ((bstring*) &be_const_str_input), + &be_const_str_pixels_buffer, + &be_const_str_solidified, ( &(const binstruction[ 4]) { /* code */ 0x8C040100, // 0000 GETMET R1 R0 K0 0x540E0005, // 0001 LDINT R3 6 @@ -919,10 +919,10 @@ be_local_closure(Leds_get_pixel_color, /* name */ NULL, /* no sub protos */ 1, /* has constants */ ( &(const bvalue[ 1]) { /* constants */ - /* K0 */ be_nested_str_literal("call_native"), + /* K0 */ be_nested_str(call_native), }), - (be_nested_const_str("get_pixel_color", 337490048, 15)), - ((bstring*) &be_const_str_input), + &be_const_str_get_pixel_color, + &be_const_str_solidified, ( &(const binstruction[ 5]) { /* code */ 0x8C080100, // 0000 GETMET R2 R0 K0 0x5412000A, // 0001 LDINT R4 11 @@ -949,11 +949,11 @@ be_local_closure(Leds_set_pixel_color, /* name */ NULL, /* no sub protos */ 1, /* has constants */ ( &(const bvalue[ 2]) { /* constants */ - /* K0 */ be_nested_str_literal("call_native"), - /* K1 */ be_nested_str_literal("to_gamma"), + /* K0 */ be_nested_str(call_native), + /* K1 */ be_nested_str(to_gamma), }), - (be_nested_const_str("set_pixel_color", 1275248356, 15)), - ((bstring*) &be_const_str_input), + &be_const_str_set_pixel_color, + &be_const_str_solidified, ( &(const binstruction[ 9]) { /* code */ 0x8C100100, // 0000 GETMET R4 R0 K0 0x541A0009, // 0001 LDINT R6 10 @@ -984,10 +984,10 @@ be_local_closure(Leds_is_dirty, /* name */ NULL, /* no sub protos */ 1, /* has constants */ ( &(const bvalue[ 1]) { /* constants */ - /* K0 */ be_nested_str_literal("call_native"), + /* K0 */ be_nested_str(call_native), }), - (be_nested_const_str("is_dirty", 418034110, 8)), - ((bstring*) &be_const_str_input), + &be_const_str_is_dirty, + &be_const_str_solidified, ( &(const binstruction[ 4]) { /* code */ 0x8C040100, // 0000 GETMET R1 R0 K0 0x540E0003, // 0001 LDINT R3 4 @@ -1013,21 +1013,21 @@ be_local_closure(Leds_init, /* name */ NULL, /* no sub protos */ 1, /* has constants */ ( &(const bvalue[12]) { /* constants */ - /* K0 */ be_nested_str_literal("gamma"), - /* K1 */ be_nested_str_literal("leds"), - /* K2 */ be_nested_str_literal("pin"), - /* K3 */ be_nested_str_literal("WS2812"), + /* K0 */ be_nested_str(gamma), + /* K1 */ be_nested_str(leds), + /* K2 */ be_nested_str(pin), + /* K3 */ be_nested_str(WS2812), /* K4 */ be_const_int(0), - /* K5 */ be_nested_str_literal("valuer_error"), - /* K6 */ be_nested_str_literal("no GPIO specified for neopixelbus"), - /* K7 */ be_nested_str_literal("ctor"), - /* K8 */ be_nested_str_literal("_p"), - /* K9 */ be_nested_str_literal("internal_error"), - /* K10 */ be_nested_str_literal("couldn't not initialize noepixelbus"), - /* K11 */ be_nested_str_literal("begin"), + /* K5 */ be_nested_str(valuer_error), + /* K6 */ be_nested_str(no_X20GPIO_X20specified_X20for_X20neopixelbus), + /* K7 */ be_nested_str(ctor), + /* K8 */ be_nested_str(_p), + /* K9 */ be_nested_str(internal_error), + /* K10 */ be_nested_str(couldn_X27t_X20not_X20initialize_X20noepixelbus), + /* K11 */ be_nested_str(begin), }), - (be_nested_const_str("init", 380752755, 4)), - ((bstring*) &be_const_str_input), + &be_const_str_init, + &be_const_str_solidified, ( &(const binstruction[36]) { /* code */ 0x50140200, // 0000 LDBOOL R5 1 0 0x90020005, // 0001 SETMBR R0 K0 R5 @@ -1085,11 +1085,11 @@ be_local_closure(Leds_clear_to, /* name */ NULL, /* no sub protos */ 1, /* has constants */ ( &(const bvalue[ 2]) { /* constants */ - /* K0 */ be_nested_str_literal("call_native"), - /* K1 */ be_nested_str_literal("to_gamma"), + /* K0 */ be_nested_str(call_native), + /* K1 */ be_nested_str(to_gamma), }), - (be_nested_const_str("clear_to", -766965166, 8)), - ((bstring*) &be_const_str_input), + &be_const_str_clear_to, + &be_const_str_solidified, ( &(const binstruction[ 8]) { /* code */ 0x8C0C0100, // 0000 GETMET R3 R0 K0 0x54160008, // 0001 LDINT R5 9 @@ -1119,11 +1119,11 @@ be_local_closure(Leds_can_show, /* name */ NULL, /* no sub protos */ 1, /* has constants */ ( &(const bvalue[ 2]) { /* constants */ - /* K0 */ be_nested_str_literal("call_native"), + /* K0 */ be_nested_str(call_native), /* K1 */ be_const_int(3), }), - (be_nested_const_str("can_show", 960091187, 8)), - ((bstring*) &be_const_str_input), + &be_const_str_can_show, + &be_const_str_solidified, ( &(const binstruction[ 4]) { /* code */ 0x8C040100, // 0000 GETMET R1 R0 K0 0x580C0001, // 0001 LDCONST R3 K1 @@ -1149,12 +1149,12 @@ be_local_closure(Leds_clear, /* name */ NULL, /* no sub protos */ 1, /* has constants */ ( &(const bvalue[ 3]) { /* constants */ - /* K0 */ be_nested_str_literal("clear_to"), + /* K0 */ be_nested_str(clear_to), /* K1 */ be_const_int(0), - /* K2 */ be_nested_str_literal("show"), + /* K2 */ be_nested_str(show), }), - (be_nested_const_str("clear", 1550717474, 5)), - ((bstring*) &be_const_str_input), + &be_const_str_clear, + &be_const_str_solidified, ( &(const binstruction[ 6]) { /* code */ 0x8C040100, // 0000 GETMET R1 R0 K0 0x580C0001, // 0001 LDCONST R3 K1 @@ -1182,11 +1182,11 @@ be_local_closure(Leds_show, /* name */ NULL, /* no sub protos */ 1, /* has constants */ ( &(const bvalue[ 2]) { /* constants */ - /* K0 */ be_nested_str_literal("call_native"), + /* K0 */ be_nested_str(call_native), /* K1 */ be_const_int(2), }), - (be_nested_const_str("show", -1454906820, 4)), - ((bstring*) &be_const_str_input), + &be_const_str_show, + &be_const_str_solidified, ( &(const binstruction[ 4]) { /* code */ 0x8C040100, // 0000 GETMET R1 R0 K0 0x580C0001, // 0001 LDCONST R3 K1 @@ -1212,11 +1212,11 @@ be_local_closure(Leds_ctor, /* name */ NULL, /* no sub protos */ 1, /* has constants */ ( &(const bvalue[ 2]) { /* constants */ - /* K0 */ be_nested_str_literal("call_native"), + /* K0 */ be_nested_str(call_native), /* K1 */ be_const_int(0), }), - (be_nested_const_str("ctor", 375399343, 4)), - ((bstring*) &be_const_str_input), + &be_const_str_ctor, + &be_const_str_solidified, ( &(const binstruction[16]) { /* code */ 0x4C100000, // 0000 LDNIL R4 0x1C100604, // 0001 EQ R4 R3 R4 @@ -1254,10 +1254,10 @@ be_local_closure(Leds_dirty, /* name */ NULL, /* no sub protos */ 1, /* has constants */ ( &(const bvalue[ 1]) { /* constants */ - /* K0 */ be_nested_str_literal("call_native"), + /* K0 */ be_nested_str(call_native), }), - (be_nested_const_str("dirty", -1627386213, 5)), - ((bstring*) &be_const_str_input), + &be_const_str_dirty, + &be_const_str_solidified, ( &(const binstruction[ 4]) { /* code */ 0x8C040100, // 0000 GETMET R1 R0 K0 0x540E0004, // 0001 LDINT R3 5 @@ -1283,12 +1283,12 @@ be_local_closure(Leds_segment_get_pixel_color, /* name */ NULL, /* no sub protos */ 1, /* has constants */ ( &(const bvalue[ 3]) { /* constants */ - /* K0 */ be_nested_str_literal("strip"), - /* K1 */ be_nested_str_literal("get_pixel_color"), - /* K2 */ be_nested_str_literal("offseta"), + /* K0 */ be_nested_str(strip), + /* K1 */ be_nested_str(get_pixel_color), + /* K2 */ be_nested_str(offseta), }), - (be_nested_const_str("get_pixel_color", 337490048, 15)), - ((bstring*) &be_const_str_input), + &be_const_str_get_pixel_color, + &be_const_str_solidified, ( &(const binstruction[ 6]) { /* code */ 0x88080100, // 0000 GETMBR R2 R0 K0 0x8C080501, // 0001 GETMET R2 R2 K1 @@ -1317,14 +1317,14 @@ be_local_closure(Leds_segment_clear_to, /* name */ 1, /* has constants */ ( &(const bvalue[ 6]) { /* constants */ /* K0 */ be_const_int(0), - /* K1 */ be_nested_str_literal("leds"), - /* K2 */ be_nested_str_literal("strip"), - /* K3 */ be_nested_str_literal("set_pixel_color"), - /* K4 */ be_nested_str_literal("offset"), + /* K1 */ be_nested_str(leds), + /* K2 */ be_nested_str(strip), + /* K3 */ be_nested_str(set_pixel_color), + /* K4 */ be_nested_str(offset), /* K5 */ be_const_int(1), }), - (be_nested_const_str("clear_to", -766965166, 8)), - ((bstring*) &be_const_str_input), + &be_const_str_clear_to, + &be_const_str_solidified, ( &(const binstruction[14]) { /* code */ 0x580C0000, // 0000 LDCONST R3 K0 0x88100101, // 0001 GETMBR R4 R0 K1 @@ -1360,11 +1360,11 @@ be_local_closure(Leds_segment_can_show, /* name */ NULL, /* no sub protos */ 1, /* has constants */ ( &(const bvalue[ 2]) { /* constants */ - /* K0 */ be_nested_str_literal("strip"), - /* K1 */ be_nested_str_literal("can_show"), + /* K0 */ be_nested_str(strip), + /* K1 */ be_nested_str(can_show), }), - (be_nested_const_str("can_show", 960091187, 8)), - ((bstring*) &be_const_str_input), + &be_const_str_can_show, + &be_const_str_solidified, ( &(const binstruction[ 4]) { /* code */ 0x88040100, // 0000 GETMBR R1 R0 K0 0x8C040301, // 0001 GETMET R1 R1 K1 @@ -1390,12 +1390,12 @@ be_local_closure(Leds_segment_set_pixel_color, /* name */ NULL, /* no sub protos */ 1, /* has constants */ ( &(const bvalue[ 3]) { /* constants */ - /* K0 */ be_nested_str_literal("strip"), - /* K1 */ be_nested_str_literal("set_pixel_color"), - /* K2 */ be_nested_str_literal("offset"), + /* K0 */ be_nested_str(strip), + /* K1 */ be_nested_str(set_pixel_color), + /* K2 */ be_nested_str(offset), }), - (be_nested_const_str("set_pixel_color", 1275248356, 15)), - ((bstring*) &be_const_str_input), + &be_const_str_set_pixel_color, + &be_const_str_solidified, ( &(const binstruction[ 8]) { /* code */ 0x88100100, // 0000 GETMBR R4 R0 K0 0x8C100901, // 0001 GETMET R4 R4 K1 @@ -1425,12 +1425,12 @@ be_local_closure(Leds_segment_clear, /* name */ NULL, /* no sub protos */ 1, /* has constants */ ( &(const bvalue[ 3]) { /* constants */ - /* K0 */ be_nested_str_literal("clear_to"), + /* K0 */ be_nested_str(clear_to), /* K1 */ be_const_int(0), - /* K2 */ be_nested_str_literal("show"), + /* K2 */ be_nested_str(show), }), - (be_nested_const_str("clear", 1550717474, 5)), - ((bstring*) &be_const_str_input), + &be_const_str_clear, + &be_const_str_solidified, ( &(const binstruction[ 6]) { /* code */ 0x8C040100, // 0000 GETMET R1 R0 K0 0x580C0001, // 0001 LDCONST R3 K1 @@ -1458,8 +1458,8 @@ be_local_closure(Leds_segment_begin, /* name */ NULL, /* no sub protos */ 0, /* has constants */ NULL, /* no const */ - (be_nested_const_str("begin", 1748273790, 5)), - ((bstring*) &be_const_str_input), + &be_const_str_begin, + &be_const_str_solidified, ( &(const binstruction[ 1]) { /* code */ 0x80000000, // 0000 RET 0 }) @@ -1482,10 +1482,10 @@ be_local_closure(Leds_segment_pixel_count, /* name */ NULL, /* no sub protos */ 1, /* has constants */ ( &(const bvalue[ 1]) { /* constants */ - /* K0 */ be_nested_str_literal("leds"), + /* K0 */ be_nested_str(leds), }), - (be_nested_const_str("pixel_count", -1855836553, 11)), - ((bstring*) &be_const_str_input), + &be_const_str_pixel_count, + &be_const_str_solidified, ( &(const binstruction[ 2]) { /* code */ 0x88040100, // 0000 GETMBR R1 R0 K0 0x80040200, // 0001 RET 1 R1 @@ -1509,12 +1509,12 @@ be_local_closure(Leds_segment_init, /* name */ NULL, /* no sub protos */ 1, /* has constants */ ( &(const bvalue[ 3]) { /* constants */ - /* K0 */ be_nested_str_literal("strip"), - /* K1 */ be_nested_str_literal("offset"), - /* K2 */ be_nested_str_literal("leds"), + /* K0 */ be_nested_str(strip), + /* K1 */ be_nested_str(offset), + /* K2 */ be_nested_str(leds), }), - (be_nested_const_str("init", 380752755, 4)), - ((bstring*) &be_const_str_input), + &be_const_str_init, + &be_const_str_solidified, ( &(const binstruction[10]) { /* code */ 0x90020001, // 0000 SETMBR R0 K0 R1 0x60100009, // 0001 GETGBL R4 G9 @@ -1546,11 +1546,11 @@ be_local_closure(Leds_segment_pixel_size, /* name */ NULL, /* no sub protos */ 1, /* has constants */ ( &(const bvalue[ 2]) { /* constants */ - /* K0 */ be_nested_str_literal("strip"), - /* K1 */ be_nested_str_literal("pixel_size"), + /* K0 */ be_nested_str(strip), + /* K1 */ be_nested_str(pixel_size), }), - (be_nested_const_str("pixel_size", -2085831511, 10)), - ((bstring*) &be_const_str_input), + &be_const_str_pixel_size, + &be_const_str_solidified, ( &(const binstruction[ 4]) { /* code */ 0x88040100, // 0000 GETMBR R1 R0 K0 0x8C040301, // 0001 GETMET R1 R1 K1 @@ -1576,11 +1576,11 @@ be_local_closure(Leds_segment_dirty, /* name */ NULL, /* no sub protos */ 1, /* has constants */ ( &(const bvalue[ 2]) { /* constants */ - /* K0 */ be_nested_str_literal("strip"), - /* K1 */ be_nested_str_literal("dirty"), + /* K0 */ be_nested_str(strip), + /* K1 */ be_nested_str(dirty), }), - (be_nested_const_str("dirty", -1627386213, 5)), - ((bstring*) &be_const_str_input), + &be_const_str_dirty, + &be_const_str_solidified, ( &(const binstruction[ 4]) { /* code */ 0x88040100, // 0000 GETMBR R1 R0 K0 0x8C040301, // 0001 GETMET R1 R1 K1 @@ -1606,14 +1606,14 @@ be_local_closure(Leds_segment_show, /* name */ NULL, /* no sub protos */ 1, /* has constants */ ( &(const bvalue[ 5]) { /* constants */ - /* K0 */ be_nested_str_literal("offset"), + /* K0 */ be_nested_str(offset), /* K1 */ be_const_int(0), - /* K2 */ be_nested_str_literal("leds"), - /* K3 */ be_nested_str_literal("strip"), - /* K4 */ be_nested_str_literal("show"), + /* K2 */ be_nested_str(leds), + /* K3 */ be_nested_str(strip), + /* K4 */ be_nested_str(show), }), - (be_nested_const_str("show", -1454906820, 4)), - ((bstring*) &be_const_str_input), + &be_const_str_show, + &be_const_str_solidified, ( &(const binstruction[16]) { /* code */ 0x60080017, // 0000 GETGBL R2 G23 0x5C0C0200, // 0001 MOVE R3 R1 @@ -1651,11 +1651,11 @@ be_local_closure(Leds_segment_is_dirty, /* name */ NULL, /* no sub protos */ 1, /* has constants */ ( &(const bvalue[ 2]) { /* constants */ - /* K0 */ be_nested_str_literal("strip"), - /* K1 */ be_nested_str_literal("is_dirty"), + /* K0 */ be_nested_str(strip), + /* K1 */ be_nested_str(is_dirty), }), - (be_nested_const_str("is_dirty", 418034110, 8)), - ((bstring*) &be_const_str_input), + &be_const_str_is_dirty, + &be_const_str_solidified, ( &(const binstruction[ 4]) { /* code */ 0x88040100, // 0000 GETMBR R1 R0 K0 0x8C040301, // 0001 GETMET R1 R1 K1 @@ -1681,8 +1681,8 @@ be_local_closure(Leds_segment_pixels_buffer, /* name */ NULL, /* no sub protos */ 0, /* has constants */ NULL, /* no const */ - (be_nested_const_str("pixels_buffer", 1229555807, 13)), - ((bstring*) &be_const_str_input), + &be_const_str_pixels_buffer, + &be_const_str_solidified, ( &(const binstruction[ 2]) { /* code */ 0x4C040000, // 0000 LDNIL R1 0x80040200, // 0001 RET 1 R1 @@ -1700,22 +1700,22 @@ be_local_class(Leds_segment, NULL, be_nested_map(16, ( (struct bmapnode*) &(const bmapnode[]) { - { be_nested_key("get_pixel_color", 337490048, 15, -1), be_const_closure(Leds_segment_get_pixel_color_closure) }, - { be_nested_key("strip", -48555823, 5, -1), be_const_var(0) }, - { be_nested_key("clear_to", -766965166, 8, 5), be_const_closure(Leds_segment_clear_to_closure) }, - { be_nested_key("can_show", 960091187, 8, 13), be_const_closure(Leds_segment_can_show_closure) }, - { be_nested_key("set_pixel_color", 1275248356, 15, -1), be_const_closure(Leds_segment_set_pixel_color_closure) }, - { be_nested_key("clear", 1550717474, 5, -1), be_const_closure(Leds_segment_clear_closure) }, - { be_nested_key("is_dirty", 418034110, 8, -1), be_const_closure(Leds_segment_is_dirty_closure) }, - { be_nested_key("pixel_count", -1855836553, 11, -1), be_const_closure(Leds_segment_pixel_count_closure) }, - { be_nested_key("leds", 558858555, 4, -1), be_const_var(2) }, - { be_nested_key("pixel_size", -2085831511, 10, -1), be_const_closure(Leds_segment_pixel_size_closure) }, - { be_nested_key("offset", 348705738, 6, -1), be_const_var(1) }, - { be_nested_key("dirty", -1627386213, 5, 8), be_const_closure(Leds_segment_dirty_closure) }, - { be_nested_key("show", -1454906820, 4, -1), be_const_closure(Leds_segment_show_closure) }, - { be_nested_key("init", 380752755, 4, -1), be_const_closure(Leds_segment_init_closure) }, - { be_nested_key("begin", 1748273790, 5, 6), be_const_closure(Leds_segment_begin_closure) }, - { be_nested_key("pixels_buffer", 1229555807, 13, -1), be_const_closure(Leds_segment_pixels_buffer_closure) }, + { be_const_key(get_pixel_color, -1), be_const_closure(Leds_segment_get_pixel_color_closure) }, + { be_const_key(strip, -1), be_const_var(0) }, + { be_const_key(clear_to, 5), be_const_closure(Leds_segment_clear_to_closure) }, + { be_const_key(can_show, 13), be_const_closure(Leds_segment_can_show_closure) }, + { be_const_key(set_pixel_color, -1), be_const_closure(Leds_segment_set_pixel_color_closure) }, + { be_const_key(clear, -1), be_const_closure(Leds_segment_clear_closure) }, + { be_const_key(is_dirty, -1), be_const_closure(Leds_segment_is_dirty_closure) }, + { be_const_key(pixel_count, -1), be_const_closure(Leds_segment_pixel_count_closure) }, + { be_const_key(leds, -1), be_const_var(2) }, + { be_const_key(pixel_size, -1), be_const_closure(Leds_segment_pixel_size_closure) }, + { be_const_key(offset, -1), be_const_var(1) }, + { be_const_key(dirty, 8), be_const_closure(Leds_segment_dirty_closure) }, + { be_const_key(show, -1), be_const_closure(Leds_segment_show_closure) }, + { be_const_key(init, -1), be_const_closure(Leds_segment_init_closure) }, + { be_const_key(begin, 6), be_const_closure(Leds_segment_begin_closure) }, + { be_const_key(pixels_buffer, -1), be_const_closure(Leds_segment_pixels_buffer_closure) }, })), be_str_literal("Leds_segment") ); @@ -1734,14 +1734,14 @@ be_local_closure(Leds_create_segment, /* name */ NULL, /* no sub protos */ 1, /* has constants */ ( &(const bvalue[ 5]) { /* constants */ - /* K0 */ be_nested_str_literal("leds"), + /* K0 */ be_nested_str(leds), /* K1 */ be_const_int(0), - /* K2 */ be_nested_str_literal("value_error"), - /* K3 */ be_nested_str_literal("out of range"), + /* K2 */ be_nested_str(value_error), + /* K3 */ be_nested_str(out_X20of_X20range), /* K4 */ be_const_class(be_class_Leds_segment), }), - (be_nested_const_str("create_segment", -431444577, 14)), - ((bstring*) &be_const_str_input), + &be_const_str_create_segment, + &be_const_str_solidified, ( &(const binstruction[23]) { /* code */ 0x600C0009, // 0000 GETGBL R3 G9 0x5C100200, // 0001 MOVE R4 R1 @@ -1781,26 +1781,26 @@ be_local_class(Leds, &be_class_Leds_ntv, be_nested_map(20, ( (struct bmapnode*) &(const bmapnode[]) { - { be_nested_key("pixel_count", -1855836553, 11, -1), be_const_closure(Leds_pixel_count_closure) }, - { be_nested_key("dirty", -1627386213, 5, 6), be_const_closure(Leds_dirty_closure) }, - { be_nested_key("to_gamma", 1597139862, 8, -1), be_const_closure(Leds_to_gamma_closure) }, - { be_nested_key("create_matrix", -766781373, 13, 1), be_const_closure(Leds_create_matrix_closure) }, - { be_nested_key("matrix", 365099244, 6, -1), be_const_static_closure(Leds_matrix_closure) }, - { be_nested_key("pixel_size", -2085831511, 10, -1), be_const_closure(Leds_pixel_size_closure) }, - { be_nested_key("ctor", 375399343, 4, 0), be_const_closure(Leds_ctor_closure) }, - { be_nested_key("pixels_buffer", 1229555807, 13, 13), be_const_closure(Leds_pixels_buffer_closure) }, - { be_nested_key("get_pixel_color", 337490048, 15, -1), be_const_closure(Leds_get_pixel_color_closure) }, - { be_nested_key("show", -1454906820, 4, -1), be_const_closure(Leds_show_closure) }, - { be_nested_key("begin", 1748273790, 5, 17), be_const_closure(Leds_begin_closure) }, - { be_nested_key("leds", 558858555, 4, -1), be_const_var(1) }, - { be_nested_key("clear", 1550717474, 5, -1), be_const_closure(Leds_clear_closure) }, - { be_nested_key("can_show", 960091187, 8, -1), be_const_closure(Leds_can_show_closure) }, - { be_nested_key("gamma", -802614262, 5, 12), be_const_var(0) }, - { be_nested_key("init", 380752755, 4, 11), be_const_closure(Leds_init_closure) }, - { be_nested_key("set_pixel_color", 1275248356, 15, 9), be_const_closure(Leds_set_pixel_color_closure) }, - { be_nested_key("clear_to", -766965166, 8, 18), be_const_closure(Leds_clear_to_closure) }, - { be_nested_key("is_dirty", 418034110, 8, -1), be_const_closure(Leds_is_dirty_closure) }, - { be_nested_key("create_segment", -431444577, 14, -1), be_const_closure(Leds_create_segment_closure) }, + { be_const_key(pixel_count, -1), be_const_closure(Leds_pixel_count_closure) }, + { be_const_key(dirty, 6), be_const_closure(Leds_dirty_closure) }, + { be_const_key(to_gamma, -1), be_const_closure(Leds_to_gamma_closure) }, + { be_const_key(create_matrix, 1), be_const_closure(Leds_create_matrix_closure) }, + { be_const_key(matrix, -1), be_const_static_closure(Leds_matrix_closure) }, + { be_const_key(pixel_size, -1), be_const_closure(Leds_pixel_size_closure) }, + { be_const_key(ctor, 0), be_const_closure(Leds_ctor_closure) }, + { be_const_key(pixels_buffer, 13), be_const_closure(Leds_pixels_buffer_closure) }, + { be_const_key(get_pixel_color, -1), be_const_closure(Leds_get_pixel_color_closure) }, + { be_const_key(show, -1), be_const_closure(Leds_show_closure) }, + { be_const_key(begin, 17), be_const_closure(Leds_begin_closure) }, + { be_const_key(leds, -1), be_const_var(1) }, + { be_const_key(clear, -1), be_const_closure(Leds_clear_closure) }, + { be_const_key(can_show, -1), be_const_closure(Leds_can_show_closure) }, + { be_const_key(gamma, 12), be_const_var(0) }, + { be_const_key(init, 11), be_const_closure(Leds_init_closure) }, + { be_const_key(set_pixel_color, 9), be_const_closure(Leds_set_pixel_color_closure) }, + { be_const_key(clear_to, 18), be_const_closure(Leds_clear_to_closure) }, + { be_const_key(is_dirty, -1), be_const_closure(Leds_is_dirty_closure) }, + { be_const_key(create_segment, -1), be_const_closure(Leds_create_segment_closure) }, })), be_str_literal("Leds") ); diff --git a/lib/libesp32/Berry/default/be_leds_ntv_lib.c b/lib/libesp32/berry/default/be_leds_ntv_lib.c similarity index 74% rename from lib/libesp32/Berry/default/be_leds_ntv_lib.c rename to lib/libesp32/berry/default/be_leds_ntv_lib.c index 357786978..4d5b07bb6 100644 --- a/lib/libesp32/Berry/default/be_leds_ntv_lib.c +++ b/lib/libesp32/berry/default/be_leds_ntv_lib.c @@ -30,11 +30,11 @@ be_local_class(Leds_ntv, NULL, be_nested_map(5, ( (struct bmapnode*) &(const bmapnode[]) { - { be_nested_key("call_native", 1389147405, 11, -1), be_const_func(be_neopixelbus_call_native) }, - { be_nested_key("_t", 1527481326, 2, -1), be_const_var(1) }, - { be_nested_key("_p", 1594591802, 2, 3), be_const_var(0) }, - { be_nested_key("SK6812_GRBW", 81157857, 11, 4), be_const_int(2) }, - { be_nested_key("WS2812_GRB", 1736405692, 10, -1), be_const_int(1) }, + { be_const_key(call_native, -1), be_const_func(be_neopixelbus_call_native) }, + { be_const_key(_t, -1), be_const_var(1) }, + { be_const_key(_p, 3), be_const_var(0) }, + { be_const_key(SK6812_GRBW, 4), be_const_int(2) }, + { be_const_key(WS2812_GRB, -1), be_const_int(1) }, })), be_str_literal("Leds_ntv") ); diff --git a/lib/libesp32/Berry/default/be_light_lib.c b/lib/libesp32/berry/default/be_light_lib.c similarity index 100% rename from lib/libesp32/Berry/default/be_light_lib.c rename to lib/libesp32/berry/default/be_light_lib.c diff --git a/lib/libesp32/Berry/default/be_lvgl_clock_icon_lib.c b/lib/libesp32/berry/default/be_lvgl_clock_icon_lib.c similarity index 72% rename from lib/libesp32/Berry/default/be_lvgl_clock_icon_lib.c rename to lib/libesp32/berry/default/be_lvgl_clock_icon_lib.c index 4cef73ac9..c9cf7f207 100644 --- a/lib/libesp32/Berry/default/be_lvgl_clock_icon_lib.c +++ b/lib/libesp32/berry/default/be_lvgl_clock_icon_lib.c @@ -10,7 +10,7 @@ /******************************************************************** ** Solidified function: set_time ********************************************************************/ -be_local_closure(set_time, /* name */ +be_local_closure(lv_clock_icon_set_time, /* name */ be_nested_proto( 11, /* nstack */ 4, /* argc */ @@ -21,19 +21,19 @@ be_local_closure(set_time, /* name */ NULL, /* no sub protos */ 1, /* has constants */ ( &(const bvalue[10]) { /* constants */ - /* K0 */ be_nested_string("string", 398550328, 6), - /* K1 */ be_nested_string("hour", -1241306097, 4), - /* K2 */ be_nested_string("minute", 954666857, 6), - /* K3 */ be_nested_string("sec", -1155074638, 3), - /* K4 */ be_nested_string("format", -1180859054, 6), - /* K5 */ be_nested_string("%02d%s%02d", 1587999717, 10), + /* K0 */ be_nested_str(string), + /* K1 */ be_nested_str(hour), + /* K2 */ be_nested_str(minute), + /* K3 */ be_nested_str(sec), + /* K4 */ be_nested_str(format), + /* K5 */ be_nested_str(_X2502d_X25s_X2502d), /* K6 */ be_const_int(2), - /* K7 */ be_nested_string(":", 1057798253, 1), - /* K8 */ be_nested_string(" ", 621580159, 1), - /* K9 */ be_nested_string("set_text", 1849641155, 8), + /* K7 */ be_nested_str(_X3A), + /* K8 */ be_nested_str(_X20), + /* K9 */ be_nested_str(set_text), }), - (be_nested_const_str("set_time", 900236405, 8)), - ((bstring*) &be_const_str_input), + &be_const_str_set_time, + &be_const_str_solidified, ( &(const binstruction[27]) { /* code */ 0xA4120000, // 0000 IMPORT R4 K0 0x88140101, // 0001 GETMBR R5 R0 K1 @@ -71,7 +71,7 @@ be_local_closure(set_time, /* name */ /******************************************************************** ** Solidified function: every_second ********************************************************************/ -be_local_closure(every_second, /* name */ +be_local_closure(lv_clock_icon_every_second, /* name */ be_nested_proto( 7, /* nstack */ 1, /* argc */ @@ -82,18 +82,18 @@ be_local_closure(every_second, /* name */ NULL, /* no sub protos */ 1, /* has constants */ ( &(const bvalue[ 9]) { /* constants */ - /* K0 */ be_nested_string("tasmota", 424643812, 7), - /* K1 */ be_nested_string("time_dump", -964556549, 9), - /* K2 */ be_nested_string("rtc", 1070575216, 3), - /* K3 */ be_nested_string("local", -1673304312, 5), - /* K4 */ be_nested_string("year", -1367388900, 4), - /* K5 */ be_nested_string("set_time", 900236405, 8), - /* K6 */ be_nested_string("hour", -1241306097, 4), - /* K7 */ be_nested_string("min", -913357481, 3), - /* K8 */ be_nested_string("sec", -1155074638, 3), + /* K0 */ be_nested_str(tasmota), + /* K1 */ be_nested_str(time_dump), + /* K2 */ be_nested_str(rtc), + /* K3 */ be_nested_str(local), + /* K4 */ be_nested_str(year), + /* K5 */ be_nested_str(set_time), + /* K6 */ be_nested_str(hour), + /* K7 */ be_nested_str(min), + /* K8 */ be_nested_str(sec), }), - (be_nested_const_str("every_second", 2075451465, 12)), - ((bstring*) &be_const_str_input), + &be_const_str_every_second, + &be_const_str_solidified, ( &(const binstruction[17]) { /* code */ 0xB8060000, // 0000 GETNGBL R1 K0 0x8C040301, // 0001 GETMET R1 R1 K1 @@ -121,7 +121,7 @@ be_local_closure(every_second, /* name */ /******************************************************************** ** Solidified function: init ********************************************************************/ -be_local_closure(init, /* name */ +be_local_closure(lv_clock_icon_init, /* name */ be_nested_proto( 11, /* nstack */ 2, /* argc */ @@ -132,31 +132,31 @@ be_local_closure(init, /* name */ NULL, /* no sub protos */ 1, /* has constants */ ( &(const bvalue[22]) { /* constants */ - /* K0 */ be_nested_string("init", 380752755, 4), - /* K1 */ be_nested_string("lv", 1529997255, 2), - /* K2 */ be_nested_string("seg7_font", -195276607, 9), - /* K3 */ be_nested_string("set_style_text_font", 1028590019, 19), - /* K4 */ be_nested_string("PART_MAIN", -1821475788, 9), - /* K5 */ be_nested_string("STATE_DEFAULT", 712406428, 13), - /* K6 */ be_nested_string("get_height", -723211773, 10), - /* K7 */ be_nested_string("set_text", 1849641155, 8), - /* K8 */ be_nested_string("--:--", 1370615441, 5), - /* K9 */ be_nested_string("refr_size", 1958144468, 9), - /* K10 */ be_nested_string("get_width", -1001549996, 9), - /* K11 */ be_nested_string("set_y", 1866178391, 5), + /* K0 */ be_nested_str(init), + /* K1 */ be_nested_str(lv), + /* K2 */ be_nested_str(seg7_font), + /* K3 */ be_nested_str(set_style_text_font), + /* K4 */ be_nested_str(PART_MAIN), + /* K5 */ be_nested_str(STATE_DEFAULT), + /* K6 */ be_nested_str(get_height), + /* K7 */ be_nested_str(set_text), + /* K8 */ be_nested_str(_X2D_X2D_X3A_X2D_X2D), + /* K9 */ be_nested_str(refr_size), + /* K10 */ be_nested_str(get_width), + /* K11 */ be_nested_str(set_y), /* K12 */ be_const_int(2), - /* K13 */ be_nested_string("get_style_pad_right", -1144679830, 19), - /* K14 */ be_nested_string("set_x", 1849400772, 5), + /* K13 */ be_nested_str(get_style_pad_right), + /* K14 */ be_nested_str(set_x), /* K15 */ be_const_int(3), - /* K16 */ be_nested_string("set_style_pad_right", -980898242, 19), - /* K17 */ be_nested_string("set_style_bg_color", 1689513089, 18), - /* K18 */ be_nested_string("color", 1031692888, 5), - /* K19 */ be_nested_string("COLOR_BLACK", 264427940, 11), - /* K20 */ be_nested_string("tasmota", 424643812, 7), - /* K21 */ be_nested_string("add_driver", 1654458371, 10), + /* K16 */ be_nested_str(set_style_pad_right), + /* K17 */ be_nested_str(set_style_bg_color), + /* K18 */ be_nested_str(color), + /* K19 */ be_nested_str(COLOR_BLACK), + /* K20 */ be_nested_str(tasmota), + /* K21 */ be_nested_str(add_driver), }), - ((bstring*) &be_const_str_init), - ((bstring*) &be_const_str_input), + &be_const_str_init, + &be_const_str_solidified, ( &(const binstruction[82]) { /* code */ 0x60080003, // 0000 GETGBL R2 G3 0x5C0C0000, // 0001 MOVE R3 R0 @@ -249,7 +249,7 @@ be_local_closure(init, /* name */ /******************************************************************** ** Solidified function: del ********************************************************************/ -be_local_closure(del, /* name */ +be_local_closure(lv_clock_icon_del, /* name */ be_nested_proto( 4, /* nstack */ 1, /* argc */ @@ -260,12 +260,12 @@ be_local_closure(del, /* name */ NULL, /* no sub protos */ 1, /* has constants */ ( &(const bvalue[ 3]) { /* constants */ - /* K0 */ be_nested_string("del", -816214454, 3), - /* K1 */ be_nested_string("tasmota", 424643812, 7), - /* K2 */ be_nested_string("remove_driver", 1030243768, 13), + /* K0 */ be_nested_str(del), + /* K1 */ be_nested_str(tasmota), + /* K2 */ be_nested_str(remove_driver), }), - (be_nested_const_str("del", -816214454, 3)), - ((bstring*) &be_const_str_input), + &be_const_str_del, + &be_const_str_solidified, ( &(const binstruction[10]) { /* code */ 0x60040003, // 0000 GETGBL R1 G3 0x5C080000, // 0001 MOVE R2 R0 @@ -292,15 +292,15 @@ be_local_class(lv_clock_icon, &be_class_lv_label, be_nested_map(7, ( (struct bmapnode*) &(const bmapnode[]) { - { be_nested_key("sec", -1155074638, 3, -1), be_const_var(2) }, - { be_nested_key("hour", -1241306097, 4, -1), be_const_var(0) }, - { be_nested_key("set_time", 900236405, 8, 6), be_const_closure(set_time_closure) }, - { be_nested_key("every_second", 2075451465, 12, -1), be_const_closure(every_second_closure) }, - { be_nested_key("minute", 954666857, 6, -1), be_const_var(1) }, - { be_nested_key("init", 380752755, 4, 2), be_const_closure(init_closure) }, - { be_nested_key("del", -816214454, 3, -1), be_const_closure(del_closure) }, + { be_const_key(sec, -1), be_const_var(2) }, + { be_const_key(hour, -1), be_const_var(0) }, + { be_const_key(set_time, 6), be_const_closure(lv_clock_icon_set_time_closure) }, + { be_const_key(every_second, -1), be_const_closure(lv_clock_icon_every_second_closure) }, + { be_const_key(minute, -1), be_const_var(1) }, + { be_const_key(init, 2), be_const_closure(lv_clock_icon_init_closure) }, + { be_const_key(del, -1), be_const_closure(lv_clock_icon_del_closure) }, })), - (be_nested_const_str("lv_clock_icon", -1037751086, 13)) + be_str_literal("lv_clock_icon") ); /*******************************************************************/ diff --git a/lib/libesp32/Berry/default/be_lvgl_ctypes_definitions.c b/lib/libesp32/berry/default/be_lvgl_ctypes_definitions.c similarity index 99% rename from lib/libesp32/Berry/default/be_lvgl_ctypes_definitions.c rename to lib/libesp32/berry/default/be_lvgl_ctypes_definitions.c index bb1ffb65c..74797a760 100644 --- a/lib/libesp32/Berry/default/be_lvgl_ctypes_definitions.c +++ b/lib/libesp32/berry/default/be_lvgl_ctypes_definitions.c @@ -6,7 +6,7 @@ #ifdef USE_LVGL #include "lvgl.h" -#include "be_lvgl.h" +#include "be_mapping.h" /******************************************************************** * Generated code, don't edit diff --git a/lib/libesp32/Berry/default/be_lvgl_glob_lib.c b/lib/libesp32/berry/default/be_lvgl_glob_lib.c similarity index 63% rename from lib/libesp32/Berry/default/be_lvgl_glob_lib.c rename to lib/libesp32/berry/default/be_lvgl_glob_lib.c index 31619f1c4..49848e1dc 100644 --- a/lib/libesp32/Berry/default/be_lvgl_glob_lib.c +++ b/lib/libesp32/berry/default/be_lvgl_glob_lib.c @@ -10,7 +10,7 @@ /******************************************************************** ** Solidified function: get_object_from_ptr ********************************************************************/ -be_local_closure(get_object_from_ptr, /* name */ +be_local_closure(LVGL_glob_get_object_from_ptr, /* name */ be_nested_proto( 5, /* nstack */ 2, /* argc */ @@ -21,11 +21,11 @@ be_local_closure(get_object_from_ptr, /* name */ NULL, /* no sub protos */ 1, /* has constants */ ( &(const bvalue[ 2]) { /* constants */ - /* K0 */ be_nested_string("cb_obj", 1195696482, 6), - /* K1 */ be_nested_string("find", -1108310694, 4), + /* K0 */ be_nested_str(cb_obj), + /* K1 */ be_nested_str(find), }), - (be_nested_const_str("get_object_from_ptr", -1949948095, 19)), - ((bstring*) &be_const_str_input), + &be_const_str_get_object_from_ptr, + &be_const_str_solidified, ( &(const binstruction[10]) { /* code */ 0x88080100, // 0000 GETMBR R2 R0 K0 0x4C0C0000, // 0001 LDNIL R3 @@ -46,7 +46,7 @@ be_local_closure(get_object_from_ptr, /* name */ /******************************************************************** ** Solidified function: widget_event_impl ********************************************************************/ -be_local_closure(widget_event_impl, /* name */ +be_local_closure(LVGL_glob_widget_event_impl, /* name */ be_nested_proto( 12, /* nstack */ 3, /* argc */ @@ -57,19 +57,19 @@ be_local_closure(widget_event_impl, /* name */ NULL, /* no sub protos */ 1, /* has constants */ ( &(const bvalue[ 9]) { /* constants */ - /* K0 */ be_nested_string("introspect", 164638290, 10), - /* K1 */ be_nested_string("lv", 1529997255, 2), - /* K2 */ be_nested_string("lv_obj_class", -255311002, 12), - /* K3 */ be_nested_string("lv_event", -1860877328, 8), - /* K4 */ be_nested_string("target", 845187144, 6), - /* K5 */ be_nested_string("get_object_from_ptr", -1949948095, 19), - /* K6 */ be_nested_string("instance", 193386898, 8), - /* K7 */ be_nested_string("get", 1410115415, 3), - /* K8 */ be_nested_string("widget_event", 1951408186, 12), + /* K0 */ be_nested_str(introspect), + /* K1 */ be_nested_str(lv), + /* K2 */ be_nested_str(lv_obj_class), + /* K3 */ be_nested_str(lv_event), + /* K4 */ be_nested_str(target), + /* K5 */ be_nested_str(get_object_from_ptr), + /* K6 */ be_nested_str(instance), + /* K7 */ be_nested_str(get), + /* K8 */ be_nested_str(widget_event), }), - (be_nested_const_str("widget_event_impl", -2116536735, 17)), - ((bstring*) &be_const_str_input), - ( &(const binstruction[30]) { /* code */ + &be_const_str_widget_event_impl, + &be_const_str_solidified, + ( &(const binstruction[28]) { /* code */ 0xA40E0000, // 0000 IMPORT R3 K0 0xB8120200, // 0001 GETNGBL R4 K1 0x8C100902, // 0002 GETMET R4 R4 K2 @@ -81,25 +81,23 @@ be_local_closure(widget_event_impl, /* name */ 0x7C140400, // 0008 CALL R5 2 0x88180B04, // 0009 GETMBR R6 R5 K4 0x8C1C0105, // 000A GETMET R7 R0 K5 - 0x60240009, // 000B GETGBL R9 G9 - 0x5C280C00, // 000C MOVE R10 R6 - 0x7C240200, // 000D CALL R9 1 - 0x7C1C0400, // 000E CALL R7 2 - 0x60200004, // 000F GETGBL R8 G4 - 0x5C240E00, // 0010 MOVE R9 R7 - 0x7C200200, // 0011 CALL R8 1 - 0x1C201106, // 0012 EQ R8 R8 K6 - 0x78220008, // 0013 JMPF R8 #001D - 0x8C200707, // 0014 GETMET R8 R3 K7 - 0x5C280E00, // 0015 MOVE R10 R7 - 0x582C0008, // 0016 LDCONST R11 K8 - 0x7C200600, // 0017 CALL R8 3 - 0x78220003, // 0018 JMPF R8 #001D - 0x8C200F08, // 0019 GETMET R8 R7 K8 - 0x5C280800, // 001A MOVE R10 R4 - 0x5C2C0A00, // 001B MOVE R11 R5 - 0x7C200600, // 001C CALL R8 3 - 0x80000000, // 001D RET 0 + 0x5C240C00, // 000B MOVE R9 R6 + 0x7C1C0400, // 000C CALL R7 2 + 0x60200004, // 000D GETGBL R8 G4 + 0x5C240E00, // 000E MOVE R9 R7 + 0x7C200200, // 000F CALL R8 1 + 0x1C201106, // 0010 EQ R8 R8 K6 + 0x78220008, // 0011 JMPF R8 #001B + 0x8C200707, // 0012 GETMET R8 R3 K7 + 0x5C280E00, // 0013 MOVE R10 R7 + 0x582C0008, // 0014 LDCONST R11 K8 + 0x7C200600, // 0015 CALL R8 3 + 0x78220003, // 0016 JMPF R8 #001B + 0x8C200F08, // 0017 GETMET R8 R7 K8 + 0x5C280800, // 0018 MOVE R10 R4 + 0x5C2C0A00, // 0019 MOVE R11 R5 + 0x7C200600, // 001A CALL R8 3 + 0x80000000, // 001B RET 0 }) ) ); @@ -109,7 +107,7 @@ be_local_closure(widget_event_impl, /* name */ /******************************************************************** ** Solidified function: lvgl_event_dispatch ********************************************************************/ -be_local_closure(lvgl_event_dispatch, /* name */ +be_local_closure(LVGL_glob_lvgl_event_dispatch, /* name */ be_nested_proto( 10, /* nstack */ 2, /* argc */ @@ -120,17 +118,17 @@ be_local_closure(lvgl_event_dispatch, /* name */ NULL, /* no sub protos */ 1, /* has constants */ ( &(const bvalue[ 7]) { /* constants */ - /* K0 */ be_nested_string("introspect", 164638290, 10), - /* K1 */ be_nested_string("lv", 1529997255, 2), - /* K2 */ be_nested_string("lv_event", -1860877328, 8), - /* K3 */ be_nested_string("toptr", -915119842, 5), - /* K4 */ be_nested_string("target", 845187144, 6), - /* K5 */ be_nested_string("cb_event_closure", -466699971, 16), - /* K6 */ be_nested_string("get_object_from_ptr", -1949948095, 19), + /* K0 */ be_nested_str(introspect), + /* K1 */ be_nested_str(lv), + /* K2 */ be_nested_str(lv_event), + /* K3 */ be_nested_str(toptr), + /* K4 */ be_nested_str(target), + /* K5 */ be_nested_str(cb_event_closure), + /* K6 */ be_nested_str(get_object_from_ptr), }), - (be_nested_const_str("lvgl_event_dispatch", 2104396622, 19)), - ((bstring*) &be_const_str_input), - ( &(const binstruction[20]) { /* code */ + &be_const_str_lvgl_event_dispatch, + &be_const_str_solidified, + ( &(const binstruction[18]) { /* code */ 0xA40A0000, // 0000 IMPORT R2 K0 0xB80E0200, // 0001 GETNGBL R3 K1 0x8C0C0702, // 0002 GETMET R3 R3 K2 @@ -138,19 +136,17 @@ be_local_closure(lvgl_event_dispatch, /* name */ 0x5C1C0200, // 0004 MOVE R7 R1 0x7C140400, // 0005 CALL R5 2 0x7C0C0400, // 0006 CALL R3 2 - 0x60100009, // 0007 GETGBL R4 G9 - 0x88140704, // 0008 GETMBR R5 R3 K4 - 0x7C100200, // 0009 CALL R4 1 - 0x88140105, // 000A GETMBR R5 R0 K5 - 0x94140A04, // 000B GETIDX R5 R5 R4 - 0x8C180106, // 000C GETMET R6 R0 K6 - 0x5C200800, // 000D MOVE R8 R4 - 0x7C180400, // 000E CALL R6 2 - 0x5C1C0A00, // 000F MOVE R7 R5 - 0x5C200C00, // 0010 MOVE R8 R6 - 0x5C240600, // 0011 MOVE R9 R3 - 0x7C1C0400, // 0012 CALL R7 2 - 0x80000000, // 0013 RET 0 + 0x88100704, // 0007 GETMBR R4 R3 K4 + 0x88140105, // 0008 GETMBR R5 R0 K5 + 0x94140A04, // 0009 GETIDX R5 R5 R4 + 0x8C180106, // 000A GETMET R6 R0 K6 + 0x5C200800, // 000B MOVE R8 R4 + 0x7C180400, // 000C CALL R6 2 + 0x5C1C0A00, // 000D MOVE R7 R5 + 0x5C200C00, // 000E MOVE R8 R6 + 0x5C240600, // 000F MOVE R9 R3 + 0x7C1C0400, // 0010 CALL R7 2 + 0x80000000, // 0011 RET 0 }) ) ); @@ -160,7 +156,7 @@ be_local_closure(lvgl_event_dispatch, /* name */ /******************************************************************** ** Solidified function: widget_dtor_impl ********************************************************************/ -be_local_closure(widget_dtor_impl, /* name */ +be_local_closure(LVGL_glob_widget_dtor_impl, /* name */ be_nested_proto( 10, /* nstack */ 3, /* argc */ @@ -171,16 +167,16 @@ be_local_closure(widget_dtor_impl, /* name */ NULL, /* no sub protos */ 1, /* has constants */ ( &(const bvalue[ 7]) { /* constants */ - /* K0 */ be_nested_string("introspect", 164638290, 10), - /* K1 */ be_nested_string("lv", 1529997255, 2), - /* K2 */ be_nested_string("lv_obj_class", -255311002, 12), - /* K3 */ be_nested_string("get_object_from_ptr", -1949948095, 19), - /* K4 */ be_nested_string("instance", 193386898, 8), - /* K5 */ be_nested_string("get", 1410115415, 3), - /* K6 */ be_nested_string("widget_destructor", -87578951, 17), + /* K0 */ be_nested_str(introspect), + /* K1 */ be_nested_str(lv), + /* K2 */ be_nested_str(lv_obj_class), + /* K3 */ be_nested_str(get_object_from_ptr), + /* K4 */ be_nested_str(instance), + /* K5 */ be_nested_str(get), + /* K6 */ be_nested_str(widget_destructor), }), - (be_nested_const_str("widget_dtor_impl", 520430610, 16)), - ((bstring*) &be_const_str_input), + &be_const_str_widget_dtor_impl, + &be_const_str_solidified, ( &(const binstruction[22]) { /* code */ 0xA40E0000, // 0000 IMPORT R3 K0 0xB8120200, // 0001 GETNGBL R4 K1 @@ -213,7 +209,7 @@ be_local_closure(widget_dtor_impl, /* name */ /******************************************************************** ** Solidified function: register_obj ********************************************************************/ -be_local_closure(register_obj, /* name */ +be_local_closure(LVGL_glob_register_obj, /* name */ be_nested_proto( 4, /* nstack */ 2, /* argc */ @@ -224,12 +220,12 @@ be_local_closure(register_obj, /* name */ NULL, /* no sub protos */ 1, /* has constants */ ( &(const bvalue[ 2]) { /* constants */ - /* K0 */ be_nested_string("cb_obj", 1195696482, 6), - /* K1 */ be_nested_string("_p", 1594591802, 2), + /* K0 */ be_nested_str(cb_obj), + /* K1 */ be_nested_str(_p), }), - (be_nested_const_str("register_obj", -312352526, 12)), - ((bstring*) &be_const_str_input), - ( &(const binstruction[13]) { /* code */ + &be_const_str_register_obj, + &be_const_str_solidified, + ( &(const binstruction[11]) { /* code */ 0x88080100, // 0000 GETMBR R2 R0 K0 0x4C0C0000, // 0001 LDNIL R3 0x1C080403, // 0002 EQ R2 R2 R3 @@ -237,12 +233,10 @@ be_local_closure(register_obj, /* name */ 0x60080013, // 0004 GETGBL R2 G19 0x7C080000, // 0005 CALL R2 0 0x90020002, // 0006 SETMBR R0 K0 R2 - 0x60080009, // 0007 GETGBL R2 G9 - 0x880C0301, // 0008 GETMBR R3 R1 K1 - 0x7C080200, // 0009 CALL R2 1 - 0x880C0100, // 000A GETMBR R3 R0 K0 - 0x980C0401, // 000B SETIDX R3 R2 R1 - 0x80000000, // 000C RET 0 + 0x88080301, // 0007 GETMBR R2 R1 K1 + 0x880C0100, // 0008 GETMBR R3 R0 K0 + 0x980C0401, // 0009 SETIDX R3 R2 R1 + 0x80000000, // 000A RET 0 }) ) ); @@ -252,10 +246,10 @@ be_local_closure(register_obj, /* name */ /******************************************************************** ** Solidified function: gen_cb ********************************************************************/ -be_local_closure(gen_cb, /* name */ +be_local_closure(LVGL_glob_gen_cb, /* name */ be_nested_proto( 8, /* nstack */ - 5, /* argc */ + 4, /* argc */ 0, /* varg */ 0, /* has upvals */ NULL, /* no upvals */ @@ -273,10 +267,10 @@ be_local_closure(gen_cb, /* name */ NULL, /* no sub protos */ 1, /* has constants */ ( &(const bvalue[ 1]) { /* constants */ - /* K0 */ be_nested_string("lvgl_event_dispatch", 2104396622, 19), + /* K0 */ be_nested_str(lvgl_event_dispatch), }), - (be_nested_const_str("", 607256038, 8)), - ((bstring*) &be_const_str_input), + &be_const_str__X3Clambda_X3E, + &be_const_str_solidified, ( &(const binstruction[ 5]) { /* code */ 0x68040000, // 0000 GETUPV R1 U0 0x8C040300, // 0001 GETMET R1 R1 K0 @@ -287,56 +281,57 @@ be_local_closure(gen_cb, /* name */ ), }), 1, /* has constants */ - ( &(const bvalue[ 8]) { /* constants */ - /* K0 */ be_nested_string("lv_event_cb", -1814236280, 11), - /* K1 */ be_nested_string("cb_event_closure", -466699971, 16), - /* K2 */ be_nested_string("event_cb", -1166269279, 8), - /* K3 */ be_nested_string("tasmota", 424643812, 7), - /* K4 */ be_nested_string("gen_cb", -1049739745, 6), - /* K5 */ be_nested_string("register_obj", -312352526, 12), - /* K6 */ be_nested_string("null_cb", -1961430836, 7), - /* K7 */ be_nested_string("cb_do_nothing", 1488730702, 13), + ( &(const bvalue[ 9]) { /* constants */ + /* K0 */ be_nested_str(cb), + /* K1 */ be_nested_str(lv_event_cb), + /* K2 */ be_nested_str(cb_event_closure), + /* K3 */ be_nested_str(event_cb), + /* K4 */ be_nested_str(gen_cb), + /* K5 */ be_nested_str(register_obj), + /* K6 */ be_nested_str(_p), + /* K7 */ be_nested_str(null_cb), + /* K8 */ be_nested_str(cb_do_nothing), }), - (be_nested_const_str("gen_cb", -1049739745, 6)), - ((bstring*) &be_const_str_input), + &be_const_str_gen_cb, + &be_const_str_solidified, ( &(const binstruction[41]) { /* code */ - 0x1C140300, // 0000 EQ R5 R1 K0 - 0x78160018, // 0001 JMPF R5 #001B - 0x88140101, // 0002 GETMBR R5 R0 K1 - 0x4C180000, // 0003 LDNIL R6 - 0x1C140A06, // 0004 EQ R5 R5 R6 - 0x78160002, // 0005 JMPF R5 #0009 - 0x60140013, // 0006 GETGBL R5 G19 - 0x7C140000, // 0007 CALL R5 0 - 0x90020205, // 0008 SETMBR R0 K1 R5 - 0x88140102, // 0009 GETMBR R5 R0 K2 - 0x4C180000, // 000A LDNIL R6 - 0x1C140A06, // 000B EQ R5 R5 R6 - 0x78160004, // 000C JMPF R5 #0012 - 0xB8160600, // 000D GETNGBL R5 K3 - 0x8C140B04, // 000E GETMET R5 R5 K4 + 0xA4120000, // 0000 IMPORT R4 K0 + 0x1C140701, // 0001 EQ R5 R3 K1 + 0x78160018, // 0002 JMPF R5 #001C + 0x88140102, // 0003 GETMBR R5 R0 K2 + 0x4C180000, // 0004 LDNIL R6 + 0x1C140A06, // 0005 EQ R5 R5 R6 + 0x78160002, // 0006 JMPF R5 #000A + 0x60140013, // 0007 GETGBL R5 G19 + 0x7C140000, // 0008 CALL R5 0 + 0x90020405, // 0009 SETMBR R0 K2 R5 + 0x88140103, // 000A GETMBR R5 R0 K3 + 0x4C180000, // 000B LDNIL R6 + 0x1C140A06, // 000C EQ R5 R5 R6 + 0x78160003, // 000D JMPF R5 #0012 + 0x8C140904, // 000E GETMET R5 R4 K4 0x841C0000, // 000F CLOSURE R7 P0 0x7C140400, // 0010 CALL R5 2 - 0x90020405, // 0011 SETMBR R0 K2 R5 + 0x90020605, // 0011 SETMBR R0 K3 R5 0x8C140105, // 0012 GETMET R5 R0 K5 - 0x5C1C0600, // 0013 MOVE R7 R3 + 0x5C1C0400, // 0013 MOVE R7 R2 0x7C140400, // 0014 CALL R5 2 - 0x88140101, // 0015 GETMBR R5 R0 K1 - 0x98140802, // 0016 SETIDX R5 R4 R2 - 0x88140102, // 0017 GETMBR R5 R0 K2 - 0xA0000000, // 0018 CLOSE R0 - 0x80040A00, // 0019 RET 1 R5 - 0x7002000B, // 001A JMP #0027 - 0x88140106, // 001B GETMBR R5 R0 K6 - 0x4C180000, // 001C LDNIL R6 - 0x1C140A06, // 001D EQ R5 R5 R6 - 0x78160004, // 001E JMPF R5 #0024 - 0xB8160600, // 001F GETNGBL R5 K3 - 0x8C140B04, // 0020 GETMET R5 R5 K4 - 0x881C0107, // 0021 GETMBR R7 R0 K7 + 0x88140506, // 0015 GETMBR R5 R2 K6 + 0x88180102, // 0016 GETMBR R6 R0 K2 + 0x98180A01, // 0017 SETIDX R6 R5 R1 + 0x88140103, // 0018 GETMBR R5 R0 K3 + 0xA0000000, // 0019 CLOSE R0 + 0x80040A00, // 001A RET 1 R5 + 0x7002000A, // 001B JMP #0027 + 0x88140107, // 001C GETMBR R5 R0 K7 + 0x4C180000, // 001D LDNIL R6 + 0x1C140A06, // 001E EQ R5 R5 R6 + 0x78160003, // 001F JMPF R5 #0024 + 0x8C140904, // 0020 GETMET R5 R4 K4 + 0x881C0108, // 0021 GETMBR R7 R0 K8 0x7C140400, // 0022 CALL R5 2 - 0x90020C05, // 0023 SETMBR R0 K6 R5 - 0x88140106, // 0024 GETMBR R5 R0 K6 + 0x90020E05, // 0023 SETMBR R0 K7 R5 + 0x88140107, // 0024 GETMBR R5 R0 K7 0xA0000000, // 0025 CLOSE R0 0x80040A00, // 0026 RET 1 R5 0xA0000000, // 0027 CLOSE R0 @@ -350,7 +345,7 @@ be_local_closure(gen_cb, /* name */ /******************************************************************** ** Solidified function: deregister_obj ********************************************************************/ -be_local_closure(deregister_obj, /* name */ +be_local_closure(LVGL_glob_deregister_obj, /* name */ be_nested_proto( 5, /* nstack */ 2, /* argc */ @@ -361,12 +356,12 @@ be_local_closure(deregister_obj, /* name */ NULL, /* no sub protos */ 1, /* has constants */ ( &(const bvalue[ 3]) { /* constants */ - /* K0 */ be_nested_string("cb_obj", 1195696482, 6), - /* K1 */ be_nested_string("remove", -611183107, 6), - /* K2 */ be_nested_string("cb_event_closure", -466699971, 16), + /* K0 */ be_nested_str(cb_obj), + /* K1 */ be_nested_str(remove), + /* K2 */ be_nested_str(cb_event_closure), }), - (be_nested_const_str("deregister_obj", -385000303, 14)), - ((bstring*) &be_const_str_input), + &be_const_str_deregister_obj, + &be_const_str_solidified, ( &(const binstruction[17]) { /* code */ 0x88080100, // 0000 GETMBR R2 R0 K0 0x4C0C0000, // 0001 LDNIL R3 @@ -394,7 +389,7 @@ be_local_closure(deregister_obj, /* name */ /******************************************************************** ** Solidified function: widget_cb ********************************************************************/ -be_local_closure(widget_cb, /* name */ +be_local_closure(LVGL_glob_widget_cb, /* name */ be_nested_proto( 4, /* nstack */ 1, /* argc */ @@ -415,10 +410,10 @@ be_local_closure(widget_cb, /* name */ NULL, /* no sub protos */ 1, /* has constants */ ( &(const bvalue[ 1]) { /* constants */ - /* K0 */ be_nested_string("widget_ctor_impl", 194252479, 16), + /* K0 */ be_nested_str(widget_ctor_impl), }), - (be_nested_const_str("", 607256038, 8)), - ((bstring*) &be_const_str_input), + &be_const_str__X3Clambda_X3E, + &be_const_str_solidified, ( &(const binstruction[ 6]) { /* code */ 0x68080000, // 0000 GETUPV R2 U0 0x8C080500, // 0001 GETMET R2 R2 K0 @@ -440,10 +435,10 @@ be_local_closure(widget_cb, /* name */ NULL, /* no sub protos */ 1, /* has constants */ ( &(const bvalue[ 1]) { /* constants */ - /* K0 */ be_nested_string("widget_dtor_impl", 520430610, 16), + /* K0 */ be_nested_str(widget_dtor_impl), }), - (be_nested_const_str("", 607256038, 8)), - ((bstring*) &be_const_str_input), + &be_const_str__X3Clambda_X3E, + &be_const_str_solidified, ( &(const binstruction[ 6]) { /* code */ 0x68080000, // 0000 GETUPV R2 U0 0x8C080500, // 0001 GETMET R2 R2 K0 @@ -465,10 +460,10 @@ be_local_closure(widget_cb, /* name */ NULL, /* no sub protos */ 1, /* has constants */ ( &(const bvalue[ 1]) { /* constants */ - /* K0 */ be_nested_string("widget_event_impl", -2116536735, 17), + /* K0 */ be_nested_str(widget_event_impl), }), - (be_nested_const_str("", 607256038, 8)), - ((bstring*) &be_const_str_input), + &be_const_str__X3Clambda_X3E, + &be_const_str_solidified, ( &(const binstruction[ 6]) { /* code */ 0x68080000, // 0000 GETUPV R2 U0 0x8C080500, // 0001 GETMET R2 R2 K0 @@ -481,24 +476,24 @@ be_local_closure(widget_cb, /* name */ }), 1, /* has constants */ ( &(const bvalue[15]) { /* constants */ - /* K0 */ be_nested_string("widget_ctor_cb", 876007560, 14), - /* K1 */ be_nested_string("tasmota", 424643812, 7), - /* K2 */ be_nested_string("gen_cb", -1049739745, 6), - /* K3 */ be_nested_string("widget_dtor_cb", -1143421451, 14), - /* K4 */ be_nested_string("widget_event_cb", 1508466754, 15), - /* K5 */ be_nested_string("widget_struct_default", 781673633, 21), - /* K6 */ be_nested_string("lv", 1529997255, 2), - /* K7 */ be_nested_string("lv_obj_class", -255311002, 12), - /* K8 */ be_nested_string("lv_obj", -37134147, 6), - /* K9 */ be_nested_string("_class", -1562820946, 6), - /* K10 */ be_nested_string("copy", -446502332, 4), - /* K11 */ be_nested_string("base_class", 1107737279, 10), - /* K12 */ be_nested_string("constructor_cb", -1805861999, 14), - /* K13 */ be_nested_string("destructor_cb", 1930283190, 13), - /* K14 */ be_nested_string("event_cb", -1166269279, 8), + /* K0 */ be_nested_str(widget_ctor_cb), + /* K1 */ be_nested_str(tasmota), + /* K2 */ be_nested_str(gen_cb), + /* K3 */ be_nested_str(widget_dtor_cb), + /* K4 */ be_nested_str(widget_event_cb), + /* K5 */ be_nested_str(widget_struct_default), + /* K6 */ be_nested_str(lv), + /* K7 */ be_nested_str(lv_obj_class), + /* K8 */ be_nested_str(lv_obj), + /* K9 */ be_nested_str(_class), + /* K10 */ be_nested_str(copy), + /* K11 */ be_nested_str(base_class), + /* K12 */ be_nested_str(constructor_cb), + /* K13 */ be_nested_str(destructor_cb), + /* K14 */ be_nested_str(event_cb), }), - (be_nested_const_str("widget_cb", -1531384241, 9)), - ((bstring*) &be_const_str_input), + &be_const_str_widget_cb, + &be_const_str_solidified, ( &(const binstruction[56]) { /* code */ 0x88040100, // 0000 GETMBR R1 R0 K0 0x4C080000, // 0001 LDNIL R2 @@ -565,7 +560,7 @@ be_local_closure(widget_cb, /* name */ /******************************************************************** ** Solidified function: _anonymous_ ********************************************************************/ -be_local_closure(_anonymous_, /* name */ +be_local_closure(LVGL_glob__anonymous_, /* name */ be_nested_proto( 2, /* nstack */ 0, /* argc */ @@ -576,10 +571,10 @@ be_local_closure(_anonymous_, /* name */ NULL, /* no sub protos */ 1, /* has constants */ ( &(const bvalue[ 1]) { /* constants */ - /* K0 */ be_nested_string("LVG: call to unsupported callback", 504176819, 33), + /* K0 */ be_nested_str(LVG_X3A_X20call_X20to_X20unsupported_X20callback), }), - (be_nested_const_str("_anonymous_", 1957281476, 11)), - ((bstring*) &be_const_str_input), + &be_const_str__anonymous_, + &be_const_str_solidified, ( &(const binstruction[ 4]) { /* code */ 0x60000001, // 0000 GETGBL R0 G1 0x58040000, // 0001 LDCONST R1 K0 @@ -594,7 +589,7 @@ be_local_closure(_anonymous_, /* name */ /******************************************************************** ** Solidified function: create_custom_widget ********************************************************************/ -be_local_closure(create_custom_widget, /* name */ +be_local_closure(LVGL_glob_create_custom_widget, /* name */ be_nested_proto( 10, /* nstack */ 3, /* argc */ @@ -605,36 +600,36 @@ be_local_closure(create_custom_widget, /* name */ NULL, /* no sub protos */ 1, /* has constants */ ( &(const bvalue[27]) { /* constants */ - /* K0 */ be_nested_string("introspect", 164638290, 10), - /* K1 */ be_nested_string("lv", 1529997255, 2), - /* K2 */ be_nested_string("lv_obj", -37134147, 6), - /* K3 */ be_nested_string("value_error", 773297791, 11), - /* K4 */ be_nested_string("arg must be a subclass of lv_obj", 1641882079, 32), - /* K5 */ be_nested_string("widget_struct_by_class", -488593454, 22), - /* K6 */ be_nested_string("find", -1108310694, 4), - /* K7 */ be_nested_string("widget_cb", -1531384241, 9), - /* K8 */ be_nested_string("widget_struct_default", 781673633, 21), - /* K9 */ be_nested_string("copy", -446502332, 4), - /* K10 */ be_nested_string("base_class", 1107737279, 10), - /* K11 */ be_nested_string("_class", -1562820946, 6), - /* K12 */ be_nested_string("get", 1410115415, 3), - /* K13 */ be_nested_string("widget_width_def", -308888434, 16), - /* K14 */ be_nested_string("width_def", 1143717879, 9), - /* K15 */ be_nested_string("widget_height_def", -1163299483, 17), - /* K16 */ be_nested_string("height_def", -1946728458, 10), - /* K17 */ be_nested_string("widget_editable", -473174010, 15), - /* K18 */ be_nested_string("editable", 60532369, 8), - /* K19 */ be_nested_string("widget_group_def", 1246968785, 16), - /* K20 */ be_nested_string("group_def", 1524213328, 9), - /* K21 */ be_nested_string("widget_instance_size", 2055354779, 20), - /* K22 */ be_nested_string("instance_size", -14697778, 13), - /* K23 */ be_nested_string("obj_class_create_obj", -990576664, 20), - /* K24 */ be_nested_string("_p", 1594591802, 2), - /* K25 */ be_nested_string("register_obj", -312352526, 12), - /* K26 */ be_nested_string("class_init_obj", 178410604, 14), + /* K0 */ be_nested_str(introspect), + /* K1 */ be_nested_str(lv), + /* K2 */ be_nested_str(lv_obj), + /* K3 */ be_nested_str(value_error), + /* K4 */ be_nested_str(arg_X20must_X20be_X20a_X20subclass_X20of_X20lv_obj), + /* K5 */ be_nested_str(widget_struct_by_class), + /* K6 */ be_nested_str(find), + /* K7 */ be_nested_str(widget_cb), + /* K8 */ be_nested_str(widget_struct_default), + /* K9 */ be_nested_str(copy), + /* K10 */ be_nested_str(base_class), + /* K11 */ be_nested_str(_class), + /* K12 */ be_nested_str(get), + /* K13 */ be_nested_str(widget_width_def), + /* K14 */ be_nested_str(width_def), + /* K15 */ be_nested_str(widget_height_def), + /* K16 */ be_nested_str(height_def), + /* K17 */ be_nested_str(widget_editable), + /* K18 */ be_nested_str(editable), + /* K19 */ be_nested_str(widget_group_def), + /* K20 */ be_nested_str(group_def), + /* K21 */ be_nested_str(widget_instance_size), + /* K22 */ be_nested_str(instance_size), + /* K23 */ be_nested_str(obj_class_create_obj), + /* K24 */ be_nested_str(_p), + /* K25 */ be_nested_str(register_obj), + /* K26 */ be_nested_str(class_init_obj), }), - (be_nested_const_str("create_custom_widget", 1140594778, 20)), - ((bstring*) &be_const_str_input), + &be_const_str_create_custom_widget, + &be_const_str_solidified, ( &(const binstruction[86]) { /* code */ 0xA40E0000, // 0000 IMPORT R3 K0 0x6010000F, // 0001 GETGBL R4 G15 @@ -731,7 +726,7 @@ be_local_closure(create_custom_widget, /* name */ /******************************************************************** ** Solidified function: widget_ctor_impl ********************************************************************/ -be_local_closure(widget_ctor_impl, /* name */ +be_local_closure(LVGL_glob_widget_ctor_impl, /* name */ be_nested_proto( 10, /* nstack */ 3, /* argc */ @@ -742,18 +737,18 @@ be_local_closure(widget_ctor_impl, /* name */ NULL, /* no sub protos */ 1, /* has constants */ ( &(const bvalue[ 9]) { /* constants */ - /* K0 */ be_nested_string("introspect", 164638290, 10), - /* K1 */ be_nested_string("lv", 1529997255, 2), - /* K2 */ be_nested_string("lv_obj_class", -255311002, 12), - /* K3 */ be_nested_string("get_object_from_ptr", -1949948095, 19), - /* K4 */ be_nested_string("cb_obj", 1195696482, 6), - /* K5 */ be_nested_string("find", -1108310694, 4), - /* K6 */ be_nested_string("instance", 193386898, 8), - /* K7 */ be_nested_string("get", 1410115415, 3), - /* K8 */ be_nested_string("widget_constructor", -1751181362, 18), + /* K0 */ be_nested_str(introspect), + /* K1 */ be_nested_str(lv), + /* K2 */ be_nested_str(lv_obj_class), + /* K3 */ be_nested_str(get_object_from_ptr), + /* K4 */ be_nested_str(cb_obj), + /* K5 */ be_nested_str(find), + /* K6 */ be_nested_str(instance), + /* K7 */ be_nested_str(get), + /* K8 */ be_nested_str(widget_constructor), }), - (be_nested_const_str("widget_ctor_impl", 194252479, 16)), - ((bstring*) &be_const_str_input), + &be_const_str_widget_ctor_impl, + &be_const_str_solidified, ( &(const binstruction[29]) { /* code */ 0xA40E0000, // 0000 IMPORT R3 K0 0xB8120200, // 0001 GETNGBL R4 K1 @@ -798,28 +793,28 @@ be_local_class(LVGL_glob, NULL, be_nested_map(20, ( (struct bmapnode*) &(const bmapnode[]) { - { be_nested_key("widget_ctor_cb", 876007560, 14, 9), be_const_var(4) }, - { be_nested_key("get_object_from_ptr", -1949948095, 19, 4), be_const_closure(get_object_from_ptr_closure) }, - { be_nested_key("cb_obj", 1195696482, 6, 7), be_const_var(0) }, - { be_nested_key("widget_struct_by_class", -488593454, 22, -1), be_const_var(8) }, - { be_nested_key("widget_event_impl", -2116536735, 17, -1), be_const_closure(widget_event_impl_closure) }, - { be_nested_key("widget_dtor_cb", -1143421451, 14, 6), be_const_var(5) }, - { be_nested_key("cb_event_closure", -466699971, 16, -1), be_const_var(1) }, - { be_nested_key("lvgl_event_dispatch", 2104396622, 19, 16), be_const_closure(lvgl_event_dispatch_closure) }, - { be_nested_key("widget_dtor_impl", 520430610, 16, -1), be_const_closure(widget_dtor_impl_closure) }, - { be_nested_key("null_cb", -1961430836, 7, -1), be_const_var(3) }, - { be_nested_key("register_obj", -312352526, 12, 8), be_const_closure(register_obj_closure) }, - { be_nested_key("gen_cb", -1049739745, 6, -1), be_const_closure(gen_cb_closure) }, - { be_nested_key("widget_struct_default", 781673633, 21, -1), be_const_var(7) }, - { be_nested_key("deregister_obj", -385000303, 14, 12), be_const_closure(deregister_obj_closure) }, - { be_nested_key("widget_event_cb", 1508466754, 15, -1), be_const_var(6) }, - { be_nested_key("widget_cb", -1531384241, 9, -1), be_const_closure(widget_cb_closure) }, - { be_nested_key("cb_do_nothing", 1488730702, 13, 3), be_const_closure(_anonymous__closure) }, - { be_nested_key("event_cb", -1166269279, 8, -1), be_const_var(2) }, - { be_nested_key("create_custom_widget", 1140594778, 20, -1), be_const_closure(create_custom_widget_closure) }, - { be_nested_key("widget_ctor_impl", 194252479, 16, -1), be_const_closure(widget_ctor_impl_closure) }, + { be_const_key(widget_ctor_cb, 8), be_const_var(4) }, + { be_const_key(get_object_from_ptr, 4), be_const_closure(LVGL_glob_get_object_from_ptr_closure) }, + { be_const_key(cb_obj, 7), be_const_var(0) }, + { be_const_key(widget_struct_by_class, -1), be_const_var(8) }, + { be_const_key(widget_event_impl, -1), be_const_closure(LVGL_glob_widget_event_impl_closure) }, + { be_const_key(widget_dtor_cb, 6), be_const_var(5) }, + { be_const_key(cb_event_closure, -1), be_const_var(1) }, + { be_const_key(cb_do_nothing, 16), be_const_static_closure(LVGL_glob__anonymous__closure) }, + { be_const_key(null_cb, -1), be_const_var(3) }, + { be_const_key(register_obj, -1), be_const_closure(LVGL_glob_register_obj_closure) }, + { be_const_key(widget_dtor_impl, 9), be_const_closure(LVGL_glob_widget_dtor_impl_closure) }, + { be_const_key(gen_cb, -1), be_const_closure(LVGL_glob_gen_cb_closure) }, + { be_const_key(deregister_obj, -1), be_const_closure(LVGL_glob_deregister_obj_closure) }, + { be_const_key(widget_struct_default, 12), be_const_var(7) }, + { be_const_key(widget_event_cb, -1), be_const_var(6) }, + { be_const_key(widget_cb, -1), be_const_closure(LVGL_glob_widget_cb_closure) }, + { be_const_key(lvgl_event_dispatch, 3), be_const_closure(LVGL_glob_lvgl_event_dispatch_closure) }, + { be_const_key(event_cb, -1), be_const_var(2) }, + { be_const_key(create_custom_widget, -1), be_const_closure(LVGL_glob_create_custom_widget_closure) }, + { be_const_key(widget_ctor_impl, -1), be_const_closure(LVGL_glob_widget_ctor_impl_closure) }, })), - (be_nested_const_str("LVGL_glob", 315437079, 9)) + be_str_literal("LVGL_glob") ); /*******************************************************************/ diff --git a/lib/libesp32/Berry/default/be_lvgl_module.c b/lib/libesp32/berry/default/be_lvgl_module.c similarity index 99% rename from lib/libesp32/Berry/default/be_lvgl_module.c rename to lib/libesp32/berry/default/be_lvgl_module.c index 890efd2ff..bb9b86e3e 100644 --- a/lib/libesp32/Berry/default/be_lvgl_module.c +++ b/lib/libesp32/berry/default/be_lvgl_module.c @@ -9,7 +9,7 @@ #ifdef USE_LVGL #include "lvgl.h" -#include "be_lvgl.h" +#include "be_mapping.h" #include "lv_theme_openhasp.h" extern int lv0_member(bvm *vm); // resolve virtual members @@ -34,7 +34,7 @@ static int lv_get_ver_res(void) { } /* `lv` methods */ -const lvbe_call_c_t lv_func[] = { +const be_ntv_func_def_t lv_func[] = { { "clamp_height", (void*) &lv_clamp_height, "i", "iiii" }, { "clamp_width", (void*) &lv_clamp_width, "i", "iiii" }, @@ -111,12 +111,7 @@ const size_t lv_func_size = sizeof(lv_func) / sizeof(lv_func[0]); -typedef struct be_constint_t { - const char * name; - int32_t value; -} be_constint_t; - -const be_constint_t lv0_constants[] = { +const be_const_member_t lv0_constants[] = { { "ALIGN_BOTTOM_LEFT", LV_ALIGN_BOTTOM_LEFT }, { "ALIGN_BOTTOM_MID", LV_ALIGN_BOTTOM_MID }, diff --git a/lib/libesp32/Berry/default/be_lvgl_signal_arcs_lib.c b/lib/libesp32/berry/default/be_lvgl_signal_arcs_lib.c similarity index 78% rename from lib/libesp32/Berry/default/be_lvgl_signal_arcs_lib.c rename to lib/libesp32/berry/default/be_lvgl_signal_arcs_lib.c index f3452ba57..a127cddd9 100644 --- a/lib/libesp32/Berry/default/be_lvgl_signal_arcs_lib.c +++ b/lib/libesp32/berry/default/be_lvgl_signal_arcs_lib.c @@ -10,7 +10,7 @@ /******************************************************************** ** Solidified function: set_percentage ********************************************************************/ -be_local_closure(set_percentage, /* name */ +be_local_closure(lv_signal_arcs_set_percentage, /* name */ be_nested_proto( 5, /* nstack */ 2, /* argc */ @@ -21,12 +21,12 @@ be_local_closure(set_percentage, /* name */ NULL, /* no sub protos */ 1, /* has constants */ ( &(const bvalue[ 3]) { /* constants */ - /* K0 */ be_nested_string("percentage", -1756136011, 10), + /* K0 */ be_nested_str(percentage), /* K1 */ be_const_int(0), - /* K2 */ be_nested_string("invalidate", -1645232368, 10), + /* K2 */ be_nested_str(invalidate), }), - (be_nested_const_str("set_percentage", -1342944572, 14)), - ((bstring*) &be_const_str_input), + &be_const_str_set_percentage, + &be_const_str_solidified, ( &(const binstruction[18]) { /* code */ 0x88080100, // 0000 GETMBR R2 R0 K0 0x540E0018, // 0001 LDINT R3 25 @@ -55,7 +55,7 @@ be_local_closure(set_percentage, /* name */ /******************************************************************** ** Solidified function: init ********************************************************************/ -be_local_closure(init, /* name */ +be_local_closure(lv_signal_arcs_init, /* name */ be_nested_proto( 6, /* nstack */ 2, /* argc */ @@ -66,19 +66,19 @@ be_local_closure(init, /* name */ NULL, /* no sub protos */ 1, /* has constants */ ( &(const bvalue[10]) { /* constants */ - /* K0 */ be_nested_string("_lvgl", -1605747813, 5), - /* K1 */ be_nested_string("create_custom_widget", 1140594778, 20), - /* K2 */ be_nested_string("percentage", -1756136011, 10), - /* K3 */ be_nested_string("p1", -1605446022, 2), - /* K4 */ be_nested_string("lv", 1529997255, 2), - /* K5 */ be_nested_string("point", 414084241, 5), - /* K6 */ be_nested_string("p2", -1622223641, 2), - /* K7 */ be_nested_string("area", -1693507260, 4), - /* K8 */ be_nested_string("line_dsc", -200476318, 8), - /* K9 */ be_nested_string("draw_line_dsc", -74291093, 13), + /* K0 */ be_nested_str(_lvgl), + /* K1 */ be_nested_str(create_custom_widget), + /* K2 */ be_nested_str(percentage), + /* K3 */ be_nested_str(p1), + /* K4 */ be_nested_str(lv), + /* K5 */ be_nested_str(point), + /* K6 */ be_nested_str(p2), + /* K7 */ be_nested_str(area), + /* K8 */ be_nested_str(line_dsc), + /* K9 */ be_nested_str(draw_line_dsc), }), - ((bstring*) &be_const_str_init), - ((bstring*) &be_const_str_input), + &be_const_str_init, + &be_const_str_solidified, ( &(const binstruction[24]) { /* code */ 0xB80A0000, // 0000 GETNGBL R2 K0 0x8C080501, // 0001 GETMET R2 R2 K1 @@ -113,7 +113,7 @@ be_local_closure(init, /* name */ /******************************************************************** ** Solidified function: widget_event ********************************************************************/ -be_local_closure(widget_event, /* name */ +be_local_closure(lv_signal_arcs_widget_event, /* name */ be_nested_proto( 28, /* nstack */ 3, /* argc */ @@ -134,8 +134,8 @@ be_local_closure(widget_event, /* name */ ( &(const bvalue[ 1]) { /* constants */ /* K0 */ be_const_int(1), }), - (be_nested_const_str("atleast1", 1956331672, 8)), - ((bstring*) &be_const_str_input), + &be_const_str_atleast1, + &be_const_str_solidified, ( &(const binstruction[ 6]) { /* code */ 0x28040100, // 0000 GE R1 R0 K0 0x78060001, // 0001 JMPF R1 #0004 @@ -148,44 +148,44 @@ be_local_closure(widget_event, /* name */ }), 1, /* has constants */ ( &(const bvalue[35]) { /* constants */ - /* K0 */ be_nested_string("lv", 1529997255, 2), - /* K1 */ be_nested_string("obj_event_base", 1624064363, 14), - /* K2 */ be_nested_string("RES_OK", 1233817284, 6), - /* K3 */ be_nested_string("code", -114201356, 4), - /* K4 */ be_nested_string("math", -293037681, 4), - /* K5 */ be_nested_string("get_height", -723211773, 10), - /* K6 */ be_nested_string("get_width", -1001549996, 9), + /* K0 */ be_nested_str(lv), + /* K1 */ be_nested_str(obj_event_base), + /* K2 */ be_nested_str(RES_OK), + /* K3 */ be_nested_str(code), + /* K4 */ be_nested_str(math), + /* K5 */ be_nested_str(get_height), + /* K6 */ be_nested_str(get_width), /* K7 */ be_const_int(2), /* K8 */ be_const_int(3), - /* K9 */ be_nested_string("EVENT_DRAW_MAIN", 1955620614, 15), - /* K10 */ be_nested_string("area", -1693507260, 4), - /* K11 */ be_nested_string("param", 1309554226, 5), - /* K12 */ be_nested_string("get_coords", 1044089006, 10), - /* K13 */ be_nested_string("x1", 274927234, 2), - /* K14 */ be_nested_string("y1", -1939865569, 2), - /* K15 */ be_nested_string("draw_line_dsc_init", -428273650, 18), - /* K16 */ be_nested_string("line_dsc", -200476318, 8), - /* K17 */ be_nested_string("init_draw_line_dsc", -1787031256, 18), - /* K18 */ be_nested_string("PART_MAIN", -1821475788, 9), - /* K19 */ be_nested_string("round_start", -1345482912, 11), + /* K9 */ be_nested_str(EVENT_DRAW_MAIN), + /* K10 */ be_nested_str(area), + /* K11 */ be_nested_str(param), + /* K12 */ be_nested_str(get_coords), + /* K13 */ be_nested_str(x1), + /* K14 */ be_nested_str(y1), + /* K15 */ be_nested_str(draw_line_dsc_init), + /* K16 */ be_nested_str(line_dsc), + /* K17 */ be_nested_str(init_draw_line_dsc), + /* K18 */ be_nested_str(PART_MAIN), + /* K19 */ be_nested_str(round_start), /* K20 */ be_const_int(1), - /* K21 */ be_nested_string("round_end", 985288225, 9), - /* K22 */ be_nested_string("width", -1786286561, 5), - /* K23 */ be_nested_string("get_style_line_color", 805371932, 20), - /* K24 */ be_nested_string("STATE_DEFAULT", 712406428, 13), - /* K25 */ be_nested_string("get_style_bg_color", 964794381, 18), - /* K26 */ be_nested_string("deg", -967213025, 3), - /* K27 */ be_nested_string("acos", 1006755615, 4), - /* K28 */ be_nested_string("p1", -1605446022, 2), - /* K29 */ be_nested_string("x", -49524601, 1), - /* K30 */ be_nested_string("y", -66302220, 1), - /* K31 */ be_nested_string("color", 1031692888, 5), - /* K32 */ be_nested_string("percentage", -1756136011, 10), - /* K33 */ be_nested_string("draw_arc", 1828251676, 8), + /* K21 */ be_nested_str(round_end), + /* K22 */ be_nested_str(width), + /* K23 */ be_nested_str(get_style_line_color), + /* K24 */ be_nested_str(STATE_DEFAULT), + /* K25 */ be_nested_str(get_style_bg_color), + /* K26 */ be_nested_str(deg), + /* K27 */ be_nested_str(acos), + /* K28 */ be_nested_str(p1), + /* K29 */ be_nested_str(x), + /* K30 */ be_nested_str(y), + /* K31 */ be_nested_str(color), + /* K32 */ be_nested_str(percentage), + /* K33 */ be_nested_str(draw_arc), /* K34 */ be_const_int(0), }), - (be_nested_const_str("widget_event", 1951408186, 12)), - ((bstring*) &be_const_str_input), + &be_const_str_widget_event, + &be_const_str_solidified, ( &(const binstruction[182]) { /* code */ 0xB80E0000, // 0000 GETNGBL R3 K0 0x8C0C0701, // 0001 GETMET R3 R3 K1 @@ -378,7 +378,7 @@ be_local_closure(widget_event, /* name */ /******************************************************************** ** Solidified function: get_percentage ********************************************************************/ -be_local_closure(get_percentage, /* name */ +be_local_closure(lv_signal_arcs_get_percentage, /* name */ be_nested_proto( 2, /* nstack */ 1, /* argc */ @@ -389,10 +389,10 @@ be_local_closure(get_percentage, /* name */ NULL, /* no sub protos */ 1, /* has constants */ ( &(const bvalue[ 1]) { /* constants */ - /* K0 */ be_nested_string("percentage", -1756136011, 10), + /* K0 */ be_nested_str(percentage), }), - (be_nested_const_str("get_percentage", -1414483304, 14)), - ((bstring*) &be_const_str_input), + &be_const_str_get_percentage, + &be_const_str_solidified, ( &(const binstruction[ 2]) { /* code */ 0x88040100, // 0000 GETMBR R1 R0 K0 0x80040200, // 0001 RET 1 R1 @@ -411,17 +411,17 @@ be_local_class(lv_signal_arcs, &be_class_lv_obj, be_nested_map(9, ( (struct bmapnode*) &(const bmapnode[]) { - { be_nested_key("percentage", -1756136011, 10, 4), be_const_var(0) }, - { be_nested_key("p1", -1605446022, 2, 3), be_const_var(1) }, - { be_nested_key("p2", -1622223641, 2, -1), be_const_var(2) }, - { be_nested_key("area", -1693507260, 4, -1), be_const_var(3) }, - { be_nested_key("line_dsc", -200476318, 8, -1), be_const_var(4) }, - { be_nested_key("set_percentage", -1342944572, 14, -1), be_const_closure(set_percentage_closure) }, - { be_nested_key("init", 380752755, 4, -1), be_const_closure(init_closure) }, - { be_nested_key("widget_event", 1951408186, 12, -1), be_const_closure(widget_event_closure) }, - { be_nested_key("get_percentage", -1414483304, 14, 5), be_const_closure(get_percentage_closure) }, + { be_const_key(percentage, 4), be_const_var(0) }, + { be_const_key(p1, 3), be_const_var(1) }, + { be_const_key(p2, -1), be_const_var(2) }, + { be_const_key(area, -1), be_const_var(3) }, + { be_const_key(line_dsc, -1), be_const_var(4) }, + { be_const_key(set_percentage, -1), be_const_closure(lv_signal_arcs_set_percentage_closure) }, + { be_const_key(init, -1), be_const_closure(lv_signal_arcs_init_closure) }, + { be_const_key(widget_event, -1), be_const_closure(lv_signal_arcs_widget_event_closure) }, + { be_const_key(get_percentage, 5), be_const_closure(lv_signal_arcs_get_percentage_closure) }, })), - (be_nested_const_str("lv_signal_arcs", -1455810308, 14)) + be_str_literal("lv_signal_arcs") ); /*******************************************************************/ diff --git a/lib/libesp32/Berry/default/be_lvgl_signal_bars_lib.c b/lib/libesp32/berry/default/be_lvgl_signal_bars_lib.c similarity index 74% rename from lib/libesp32/Berry/default/be_lvgl_signal_bars_lib.c rename to lib/libesp32/berry/default/be_lvgl_signal_bars_lib.c index 161afc65d..18452ae34 100644 --- a/lib/libesp32/Berry/default/be_lvgl_signal_bars_lib.c +++ b/lib/libesp32/berry/default/be_lvgl_signal_bars_lib.c @@ -10,7 +10,7 @@ /******************************************************************** ** Solidified function: set_percentage ********************************************************************/ -be_local_closure(set_percentage, /* name */ +be_local_closure(lv_signal_bars_set_percentage, /* name */ be_nested_proto( 5, /* nstack */ 2, /* argc */ @@ -21,12 +21,12 @@ be_local_closure(set_percentage, /* name */ NULL, /* no sub protos */ 1, /* has constants */ ( &(const bvalue[ 3]) { /* constants */ - /* K0 */ be_nested_string("percentage", -1756136011, 10), + /* K0 */ be_nested_str(percentage), /* K1 */ be_const_int(0), - /* K2 */ be_nested_string("invalidate", -1645232368, 10), + /* K2 */ be_nested_str(invalidate), }), - (be_nested_const_str("set_percentage", -1342944572, 14)), - ((bstring*) &be_const_str_input), + &be_const_str_set_percentage, + &be_const_str_solidified, ( &(const binstruction[18]) { /* code */ 0x88080100, // 0000 GETMBR R2 R0 K0 0x540E0013, // 0001 LDINT R3 20 @@ -55,7 +55,7 @@ be_local_closure(set_percentage, /* name */ /******************************************************************** ** Solidified function: init ********************************************************************/ -be_local_closure(init, /* name */ +be_local_closure(lv_signal_bars_init, /* name */ be_nested_proto( 6, /* nstack */ 2, /* argc */ @@ -66,19 +66,19 @@ be_local_closure(init, /* name */ NULL, /* no sub protos */ 1, /* has constants */ ( &(const bvalue[10]) { /* constants */ - /* K0 */ be_nested_string("_lvgl", -1605747813, 5), - /* K1 */ be_nested_string("create_custom_widget", 1140594778, 20), - /* K2 */ be_nested_string("percentage", -1756136011, 10), - /* K3 */ be_nested_string("p1", -1605446022, 2), - /* K4 */ be_nested_string("lv", 1529997255, 2), - /* K5 */ be_nested_string("point", 414084241, 5), - /* K6 */ be_nested_string("p2", -1622223641, 2), - /* K7 */ be_nested_string("area", -1693507260, 4), - /* K8 */ be_nested_string("line_dsc", -200476318, 8), - /* K9 */ be_nested_string("draw_line_dsc", -74291093, 13), + /* K0 */ be_nested_str(_lvgl), + /* K1 */ be_nested_str(create_custom_widget), + /* K2 */ be_nested_str(percentage), + /* K3 */ be_nested_str(p1), + /* K4 */ be_nested_str(lv), + /* K5 */ be_nested_str(point), + /* K6 */ be_nested_str(p2), + /* K7 */ be_nested_str(area), + /* K8 */ be_nested_str(line_dsc), + /* K9 */ be_nested_str(draw_line_dsc), }), - ((bstring*) &be_const_str_init), - ((bstring*) &be_const_str_input), + &be_const_str_init, + &be_const_str_solidified, ( &(const binstruction[24]) { /* code */ 0xB80A0000, // 0000 GETNGBL R2 K0 0x8C080501, // 0001 GETMET R2 R2 K1 @@ -113,7 +113,7 @@ be_local_closure(init, /* name */ /******************************************************************** ** Solidified function: widget_event ********************************************************************/ -be_local_closure(widget_event, /* name */ +be_local_closure(lv_signal_bars_widget_event, /* name */ be_nested_proto( 23, /* nstack */ 3, /* argc */ @@ -134,8 +134,8 @@ be_local_closure(widget_event, /* name */ ( &(const bvalue[ 1]) { /* constants */ /* K0 */ be_const_int(1), }), - (be_nested_const_str("atleast1", 1956331672, 8)), - ((bstring*) &be_const_str_input), + &be_const_str_atleast1, + &be_const_str_solidified, ( &(const binstruction[ 6]) { /* code */ 0x28040100, // 0000 GE R1 R0 K0 0x78060001, // 0001 JMPF R1 #0004 @@ -148,46 +148,46 @@ be_local_closure(widget_event, /* name */ }), 1, /* has constants */ ( &(const bvalue[37]) { /* constants */ - /* K0 */ be_nested_string("lv", 1529997255, 2), - /* K1 */ be_nested_string("obj_event_base", 1624064363, 14), - /* K2 */ be_nested_string("RES_OK", 1233817284, 6), - /* K3 */ be_nested_string("code", -114201356, 4), - /* K4 */ be_nested_string("get_height", -723211773, 10), - /* K5 */ be_nested_string("get_width", -1001549996, 9), + /* K0 */ be_nested_str(lv), + /* K1 */ be_nested_str(obj_event_base), + /* K2 */ be_nested_str(RES_OK), + /* K3 */ be_nested_str(code), + /* K4 */ be_nested_str(get_height), + /* K5 */ be_nested_str(get_width), /* K6 */ be_const_int(3), /* K7 */ be_const_int(2), - /* K8 */ be_nested_string("EVENT_DRAW_MAIN", 1955620614, 15), - /* K9 */ be_nested_string("area", -1693507260, 4), - /* K10 */ be_nested_string("param", 1309554226, 5), - /* K11 */ be_nested_string("get_coords", 1044089006, 10), - /* K12 */ be_nested_string("x1", 274927234, 2), - /* K13 */ be_nested_string("y1", -1939865569, 2), - /* K14 */ be_nested_string("draw_line_dsc_init", -428273650, 18), - /* K15 */ be_nested_string("line_dsc", -200476318, 8), - /* K16 */ be_nested_string("init_draw_line_dsc", -1787031256, 18), - /* K17 */ be_nested_string("PART_MAIN", -1821475788, 9), - /* K18 */ be_nested_string("round_start", -1345482912, 11), + /* K8 */ be_nested_str(EVENT_DRAW_MAIN), + /* K9 */ be_nested_str(area), + /* K10 */ be_nested_str(param), + /* K11 */ be_nested_str(get_coords), + /* K12 */ be_nested_str(x1), + /* K13 */ be_nested_str(y1), + /* K14 */ be_nested_str(draw_line_dsc_init), + /* K15 */ be_nested_str(line_dsc), + /* K16 */ be_nested_str(init_draw_line_dsc), + /* K17 */ be_nested_str(PART_MAIN), + /* K18 */ be_nested_str(round_start), /* K19 */ be_const_int(1), - /* K20 */ be_nested_string("round_end", 985288225, 9), - /* K21 */ be_nested_string("width", -1786286561, 5), - /* K22 */ be_nested_string("get_style_line_color", 805371932, 20), - /* K23 */ be_nested_string("STATE_DEFAULT", 712406428, 13), - /* K24 */ be_nested_string("get_style_bg_color", 964794381, 18), - /* K25 */ be_nested_string("event_send", 598925582, 10), - /* K26 */ be_nested_string("EVENT_DRAW_PART_BEGIN", -903102272, 21), + /* K20 */ be_nested_str(round_end), + /* K21 */ be_nested_str(width), + /* K22 */ be_nested_str(get_style_line_color), + /* K23 */ be_nested_str(STATE_DEFAULT), + /* K24 */ be_nested_str(get_style_bg_color), + /* K25 */ be_nested_str(event_send), + /* K26 */ be_nested_str(EVENT_DRAW_PART_BEGIN), /* K27 */ be_const_int(0), - /* K28 */ be_nested_string("color", 1031692888, 5), - /* K29 */ be_nested_string("percentage", -1756136011, 10), - /* K30 */ be_nested_string("p1", -1605446022, 2), - /* K31 */ be_nested_string("y", -66302220, 1), - /* K32 */ be_nested_string("x", -49524601, 1), - /* K33 */ be_nested_string("p2", -1622223641, 2), - /* K34 */ be_nested_string("draw_line", 1634465686, 9), - /* K35 */ be_nested_string("stop_iteration", -121173395, 14), - /* K36 */ be_nested_string("EVENT_DRAW_PART_END", -993342004, 19), + /* K28 */ be_nested_str(color), + /* K29 */ be_nested_str(percentage), + /* K30 */ be_nested_str(p1), + /* K31 */ be_nested_str(y), + /* K32 */ be_nested_str(x), + /* K33 */ be_nested_str(p2), + /* K34 */ be_nested_str(draw_line), + /* K35 */ be_nested_str(stop_iteration), + /* K36 */ be_nested_str(EVENT_DRAW_PART_END), }), - (be_nested_const_str("widget_event", 1951408186, 12)), - ((bstring*) &be_const_str_input), + &be_const_str_widget_event, + &be_const_str_solidified, ( &(const binstruction[138]) { /* code */ 0xB80E0000, // 0000 GETNGBL R3 K0 0x8C0C0701, // 0001 GETMET R3 R3 K1 @@ -336,7 +336,7 @@ be_local_closure(widget_event, /* name */ /******************************************************************** ** Solidified function: get_percentage ********************************************************************/ -be_local_closure(get_percentage, /* name */ +be_local_closure(lv_signal_bars_get_percentage, /* name */ be_nested_proto( 2, /* nstack */ 1, /* argc */ @@ -347,10 +347,10 @@ be_local_closure(get_percentage, /* name */ NULL, /* no sub protos */ 1, /* has constants */ ( &(const bvalue[ 1]) { /* constants */ - /* K0 */ be_nested_string("percentage", -1756136011, 10), + /* K0 */ be_nested_str(percentage), }), - (be_nested_const_str("get_percentage", -1414483304, 14)), - ((bstring*) &be_const_str_input), + &be_const_str_get_percentage, + &be_const_str_solidified, ( &(const binstruction[ 2]) { /* code */ 0x88040100, // 0000 GETMBR R1 R0 K0 0x80040200, // 0001 RET 1 R1 @@ -369,17 +369,17 @@ be_local_class(lv_signal_bars, &be_class_lv_obj, be_nested_map(9, ( (struct bmapnode*) &(const bmapnode[]) { - { be_nested_key("percentage", -1756136011, 10, 4), be_const_var(0) }, - { be_nested_key("p1", -1605446022, 2, 3), be_const_var(1) }, - { be_nested_key("p2", -1622223641, 2, -1), be_const_var(2) }, - { be_nested_key("area", -1693507260, 4, -1), be_const_var(3) }, - { be_nested_key("line_dsc", -200476318, 8, -1), be_const_var(4) }, - { be_nested_key("set_percentage", -1342944572, 14, -1), be_const_closure(set_percentage_closure) }, - { be_nested_key("init", 380752755, 4, -1), be_const_closure(init_closure) }, - { be_nested_key("widget_event", 1951408186, 12, -1), be_const_closure(widget_event_closure) }, - { be_nested_key("get_percentage", -1414483304, 14, 5), be_const_closure(get_percentage_closure) }, + { be_const_key(percentage, 4), be_const_var(0) }, + { be_const_key(p1, 3), be_const_var(1) }, + { be_const_key(p2, -1), be_const_var(2) }, + { be_const_key(area, -1), be_const_var(3) }, + { be_const_key(line_dsc, -1), be_const_var(4) }, + { be_const_key(set_percentage, -1), be_const_closure(lv_signal_bars_set_percentage_closure) }, + { be_const_key(init, -1), be_const_closure(lv_signal_bars_init_closure) }, + { be_const_key(widget_event, -1), be_const_closure(lv_signal_bars_widget_event_closure) }, + { be_const_key(get_percentage, 5), be_const_closure(lv_signal_bars_get_percentage_closure) }, })), - (be_nested_const_str("lv_signal_bars", -780994737, 14)) + be_str_literal("lv_signal_bars") ); /*******************************************************************/ diff --git a/lib/libesp32/Berry/default/be_lvgl_widgets_lib.c b/lib/libesp32/berry/default/be_lvgl_widgets_lib.c similarity index 100% rename from lib/libesp32/Berry/default/be_lvgl_widgets_lib.c rename to lib/libesp32/berry/default/be_lvgl_widgets_lib.c diff --git a/lib/libesp32/Berry/default/be_lvgl_wifi_arcs_icon_lib.c b/lib/libesp32/berry/default/be_lvgl_wifi_arcs_icon_lib.c similarity index 77% rename from lib/libesp32/Berry/default/be_lvgl_wifi_arcs_icon_lib.c rename to lib/libesp32/berry/default/be_lvgl_wifi_arcs_icon_lib.c index 9a2c742ff..d8fe9ce08 100644 --- a/lib/libesp32/Berry/default/be_lvgl_wifi_arcs_icon_lib.c +++ b/lib/libesp32/berry/default/be_lvgl_wifi_arcs_icon_lib.c @@ -10,7 +10,7 @@ /******************************************************************** ** Solidified function: init ********************************************************************/ -be_local_closure(init, /* name */ +be_local_closure(lv_wifi_arcs_icon_init, /* name */ be_nested_proto( 10, /* nstack */ 2, /* argc */ @@ -21,27 +21,27 @@ be_local_closure(init, /* name */ NULL, /* no sub protos */ 1, /* has constants */ ( &(const bvalue[18]) { /* constants */ - /* K0 */ be_nested_string("init", 380752755, 4), - /* K1 */ be_nested_string("set_style_line_color", -629728320, 20), - /* K2 */ be_nested_string("lv", 1529997255, 2), - /* K3 */ be_nested_string("color", 1031692888, 5), - /* K4 */ be_nested_string("COLOR_WHITE", -1758096026, 11), - /* K5 */ be_nested_string("PART_MAIN", -1821475788, 9), - /* K6 */ be_nested_string("STATE_DEFAULT", 712406428, 13), - /* K7 */ be_nested_string("set_style_bg_color", 1689513089, 18), - /* K8 */ be_nested_string("COLOR_BLACK", 264427940, 11), - /* K9 */ be_nested_string("get_height", -723211773, 10), - /* K10 */ be_nested_string("get_style_pad_right", -1144679830, 19), - /* K11 */ be_nested_string("set_height", 1080207399, 10), + /* K0 */ be_nested_str(init), + /* K1 */ be_nested_str(set_style_line_color), + /* K2 */ be_nested_str(lv), + /* K3 */ be_nested_str(color), + /* K4 */ be_nested_str(COLOR_WHITE), + /* K5 */ be_nested_str(PART_MAIN), + /* K6 */ be_nested_str(STATE_DEFAULT), + /* K7 */ be_nested_str(set_style_bg_color), + /* K8 */ be_nested_str(COLOR_BLACK), + /* K9 */ be_nested_str(get_height), + /* K10 */ be_nested_str(get_style_pad_right), + /* K11 */ be_nested_str(set_height), /* K12 */ be_const_int(3), - /* K13 */ be_nested_string("set_width", 484671920, 9), - /* K14 */ be_nested_string("set_x", 1849400772, 5), - /* K15 */ be_nested_string("get_width", -1001549996, 9), - /* K16 */ be_nested_string("set_style_pad_right", -980898242, 19), + /* K13 */ be_nested_str(set_width), + /* K14 */ be_nested_str(set_x), + /* K15 */ be_nested_str(get_width), + /* K16 */ be_nested_str(set_style_pad_right), /* K17 */ be_const_int(1), }), - ((bstring*) &be_const_str_init), - ((bstring*) &be_const_str_input), + &be_const_str_init, + &be_const_str_solidified, ( &(const binstruction[67]) { /* code */ 0x60080003, // 0000 GETGBL R2 G3 0x5C0C0000, // 0001 MOVE R3 R0 @@ -125,9 +125,9 @@ be_local_class(lv_wifi_arcs_icon, &be_class_lv_wifi_arcs, be_nested_map(1, ( (struct bmapnode*) &(const bmapnode[]) { - { be_nested_key("init", 380752755, 4, -1), be_const_closure(init_closure) }, + { be_const_key(init, -1), be_const_closure(lv_wifi_arcs_icon_init_closure) }, })), - (be_nested_const_str("lv_wifi_arcs_icon", 1507982909, 17)) + be_str_literal("lv_wifi_arcs_icon") ); /*******************************************************************/ diff --git a/lib/libesp32/Berry/default/be_lvgl_wifi_arcs_lib.c b/lib/libesp32/berry/default/be_lvgl_wifi_arcs_lib.c similarity index 77% rename from lib/libesp32/Berry/default/be_lvgl_wifi_arcs_lib.c rename to lib/libesp32/berry/default/be_lvgl_wifi_arcs_lib.c index 59132af9e..57cbf18a9 100644 --- a/lib/libesp32/Berry/default/be_lvgl_wifi_arcs_lib.c +++ b/lib/libesp32/berry/default/be_lvgl_wifi_arcs_lib.c @@ -10,7 +10,7 @@ /******************************************************************** ** Solidified function: every_second ********************************************************************/ -be_local_closure(every_second, /* name */ +be_local_closure(lv_wifi_arcs_every_second, /* name */ be_nested_proto( 7, /* nstack */ 1, /* argc */ @@ -21,16 +21,16 @@ be_local_closure(every_second, /* name */ NULL, /* no sub protos */ 1, /* has constants */ ( &(const bvalue[ 7]) { /* constants */ - /* K0 */ be_nested_string("tasmota", 424643812, 7), - /* K1 */ be_nested_string("wifi", 120087624, 4), - /* K2 */ be_nested_string("find", -1108310694, 4), - /* K3 */ be_nested_string("quality", -1697296346, 7), - /* K4 */ be_nested_string("ip", 1261996636, 2), - /* K5 */ be_nested_string("set_percentage", -1342944572, 14), + /* K0 */ be_nested_str(tasmota), + /* K1 */ be_nested_str(wifi), + /* K2 */ be_nested_str(find), + /* K3 */ be_nested_str(quality), + /* K4 */ be_nested_str(ip), + /* K5 */ be_nested_str(set_percentage), /* K6 */ be_const_int(0), }), - (be_nested_const_str("every_second", 2075451465, 12)), - ((bstring*) &be_const_str_input), + &be_const_str_every_second, + &be_const_str_solidified, ( &(const binstruction[23]) { /* code */ 0xB8060000, // 0000 GETNGBL R1 K0 0x8C040301, // 0001 GETMET R1 R1 K1 @@ -64,7 +64,7 @@ be_local_closure(every_second, /* name */ /******************************************************************** ** Solidified function: init ********************************************************************/ -be_local_closure(init, /* name */ +be_local_closure(lv_wifi_arcs_init, /* name */ be_nested_proto( 5, /* nstack */ 2, /* argc */ @@ -75,14 +75,14 @@ be_local_closure(init, /* name */ NULL, /* no sub protos */ 1, /* has constants */ ( &(const bvalue[ 5]) { /* constants */ - /* K0 */ be_nested_string("init", 380752755, 4), - /* K1 */ be_nested_string("tasmota", 424643812, 7), - /* K2 */ be_nested_string("add_driver", 1654458371, 10), - /* K3 */ be_nested_string("set_percentage", -1342944572, 14), + /* K0 */ be_nested_str(init), + /* K1 */ be_nested_str(tasmota), + /* K2 */ be_nested_str(add_driver), + /* K3 */ be_nested_str(set_percentage), /* K4 */ be_const_int(0), }), - ((bstring*) &be_const_str_init), - ((bstring*) &be_const_str_input), + &be_const_str_init, + &be_const_str_solidified, ( &(const binstruction[14]) { /* code */ 0x60080003, // 0000 GETGBL R2 G3 0x5C0C0000, // 0001 MOVE R3 R0 @@ -107,7 +107,7 @@ be_local_closure(init, /* name */ /******************************************************************** ** Solidified function: del ********************************************************************/ -be_local_closure(del, /* name */ +be_local_closure(lv_wifi_arcs_del, /* name */ be_nested_proto( 4, /* nstack */ 1, /* argc */ @@ -118,12 +118,12 @@ be_local_closure(del, /* name */ NULL, /* no sub protos */ 1, /* has constants */ ( &(const bvalue[ 3]) { /* constants */ - /* K0 */ be_nested_string("del", -816214454, 3), - /* K1 */ be_nested_string("tasmota", 424643812, 7), - /* K2 */ be_nested_string("remove_driver", 1030243768, 13), + /* K0 */ be_nested_str(del), + /* K1 */ be_nested_str(tasmota), + /* K2 */ be_nested_str(remove_driver), }), - (be_nested_const_str("del", -816214454, 3)), - ((bstring*) &be_const_str_input), + &be_const_str_del, + &be_const_str_solidified, ( &(const binstruction[10]) { /* code */ 0x60040003, // 0000 GETGBL R1 G3 0x5C080000, // 0001 MOVE R2 R0 @@ -150,11 +150,11 @@ be_local_class(lv_wifi_arcs, &be_class_lv_signal_arcs, be_nested_map(3, ( (struct bmapnode*) &(const bmapnode[]) { - { be_nested_key("every_second", 2075451465, 12, 1), be_const_closure(every_second_closure) }, - { be_nested_key("init", 380752755, 4, -1), be_const_closure(init_closure) }, - { be_nested_key("del", -816214454, 3, -1), be_const_closure(del_closure) }, + { be_const_key(every_second, 1), be_const_closure(lv_wifi_arcs_every_second_closure) }, + { be_const_key(init, -1), be_const_closure(lv_wifi_arcs_init_closure) }, + { be_const_key(del, -1), be_const_closure(lv_wifi_arcs_del_closure) }, })), - (be_nested_const_str("lv_wifi_arcs", 2082091963, 12)) + be_str_literal("lv_wifi_arcs") ); /*******************************************************************/ diff --git a/lib/libesp32/Berry/default/be_lvgl_wifi_bars_icon_lib.c b/lib/libesp32/berry/default/be_lvgl_wifi_bars_icon_lib.c similarity index 77% rename from lib/libesp32/Berry/default/be_lvgl_wifi_bars_icon_lib.c rename to lib/libesp32/berry/default/be_lvgl_wifi_bars_icon_lib.c index 9adcdeba5..a1cf693e5 100644 --- a/lib/libesp32/Berry/default/be_lvgl_wifi_bars_icon_lib.c +++ b/lib/libesp32/berry/default/be_lvgl_wifi_bars_icon_lib.c @@ -10,7 +10,7 @@ /******************************************************************** ** Solidified function: init ********************************************************************/ -be_local_closure(init, /* name */ +be_local_closure(lv_wifi_bars_icon_init, /* name */ be_nested_proto( 9, /* nstack */ 2, /* argc */ @@ -21,26 +21,26 @@ be_local_closure(init, /* name */ NULL, /* no sub protos */ 1, /* has constants */ ( &(const bvalue[17]) { /* constants */ - /* K0 */ be_nested_string("init", 380752755, 4), - /* K1 */ be_nested_string("set_style_line_color", -629728320, 20), - /* K2 */ be_nested_string("lv", 1529997255, 2), - /* K3 */ be_nested_string("color", 1031692888, 5), - /* K4 */ be_nested_string("COLOR_WHITE", -1758096026, 11), - /* K5 */ be_nested_string("PART_MAIN", -1821475788, 9), - /* K6 */ be_nested_string("STATE_DEFAULT", 712406428, 13), - /* K7 */ be_nested_string("set_style_bg_color", 1689513089, 18), - /* K8 */ be_nested_string("COLOR_BLACK", 264427940, 11), - /* K9 */ be_nested_string("get_height", -723211773, 10), - /* K10 */ be_nested_string("get_style_pad_right", -1144679830, 19), - /* K11 */ be_nested_string("set_height", 1080207399, 10), - /* K12 */ be_nested_string("set_width", 484671920, 9), - /* K13 */ be_nested_string("set_x", 1849400772, 5), - /* K14 */ be_nested_string("get_width", -1001549996, 9), - /* K15 */ be_nested_string("set_style_pad_right", -980898242, 19), + /* K0 */ be_nested_str(init), + /* K1 */ be_nested_str(set_style_line_color), + /* K2 */ be_nested_str(lv), + /* K3 */ be_nested_str(color), + /* K4 */ be_nested_str(COLOR_WHITE), + /* K5 */ be_nested_str(PART_MAIN), + /* K6 */ be_nested_str(STATE_DEFAULT), + /* K7 */ be_nested_str(set_style_bg_color), + /* K8 */ be_nested_str(COLOR_BLACK), + /* K9 */ be_nested_str(get_height), + /* K10 */ be_nested_str(get_style_pad_right), + /* K11 */ be_nested_str(set_height), + /* K12 */ be_nested_str(set_width), + /* K13 */ be_nested_str(set_x), + /* K14 */ be_nested_str(get_width), + /* K15 */ be_nested_str(set_style_pad_right), /* K16 */ be_const_int(1), }), - ((bstring*) &be_const_str_init), - ((bstring*) &be_const_str_input), + &be_const_str_init, + &be_const_str_solidified, ( &(const binstruction[64]) { /* code */ 0x60080003, // 0000 GETGBL R2 G3 0x5C0C0000, // 0001 MOVE R3 R0 @@ -121,9 +121,9 @@ be_local_class(lv_wifi_bars_icon, &be_class_lv_wifi_bars, be_nested_map(1, ( (struct bmapnode*) &(const bmapnode[]) { - { be_nested_key("init", 380752755, 4, -1), be_const_closure(init_closure) }, + { be_const_key(init, -1), be_const_closure(lv_wifi_bars_icon_init_closure) }, })), - (be_nested_const_str("lv_wifi_bars_icon", -1489151756, 17)) + be_str_literal("lv_wifi_bars_icon") ); /*******************************************************************/ diff --git a/lib/libesp32/Berry/default/be_lvgl_wifi_bars_lib.c b/lib/libesp32/berry/default/be_lvgl_wifi_bars_lib.c similarity index 77% rename from lib/libesp32/Berry/default/be_lvgl_wifi_bars_lib.c rename to lib/libesp32/berry/default/be_lvgl_wifi_bars_lib.c index 9bbb51bf0..c61cb2bb3 100644 --- a/lib/libesp32/Berry/default/be_lvgl_wifi_bars_lib.c +++ b/lib/libesp32/berry/default/be_lvgl_wifi_bars_lib.c @@ -10,7 +10,7 @@ /******************************************************************** ** Solidified function: every_second ********************************************************************/ -be_local_closure(every_second, /* name */ +be_local_closure(lv_wifi_bars_every_second, /* name */ be_nested_proto( 7, /* nstack */ 1, /* argc */ @@ -21,16 +21,16 @@ be_local_closure(every_second, /* name */ NULL, /* no sub protos */ 1, /* has constants */ ( &(const bvalue[ 7]) { /* constants */ - /* K0 */ be_nested_string("tasmota", 424643812, 7), - /* K1 */ be_nested_string("wifi", 120087624, 4), - /* K2 */ be_nested_string("find", -1108310694, 4), - /* K3 */ be_nested_string("quality", -1697296346, 7), - /* K4 */ be_nested_string("ip", 1261996636, 2), - /* K5 */ be_nested_string("set_percentage", -1342944572, 14), + /* K0 */ be_nested_str(tasmota), + /* K1 */ be_nested_str(wifi), + /* K2 */ be_nested_str(find), + /* K3 */ be_nested_str(quality), + /* K4 */ be_nested_str(ip), + /* K5 */ be_nested_str(set_percentage), /* K6 */ be_const_int(0), }), - (be_nested_const_str("every_second", 2075451465, 12)), - ((bstring*) &be_const_str_input), + &be_const_str_every_second, + &be_const_str_solidified, ( &(const binstruction[23]) { /* code */ 0xB8060000, // 0000 GETNGBL R1 K0 0x8C040301, // 0001 GETMET R1 R1 K1 @@ -64,7 +64,7 @@ be_local_closure(every_second, /* name */ /******************************************************************** ** Solidified function: init ********************************************************************/ -be_local_closure(init, /* name */ +be_local_closure(lv_wifi_bars_init, /* name */ be_nested_proto( 5, /* nstack */ 2, /* argc */ @@ -75,14 +75,14 @@ be_local_closure(init, /* name */ NULL, /* no sub protos */ 1, /* has constants */ ( &(const bvalue[ 5]) { /* constants */ - /* K0 */ be_nested_string("init", 380752755, 4), - /* K1 */ be_nested_string("tasmota", 424643812, 7), - /* K2 */ be_nested_string("add_driver", 1654458371, 10), - /* K3 */ be_nested_string("set_percentage", -1342944572, 14), + /* K0 */ be_nested_str(init), + /* K1 */ be_nested_str(tasmota), + /* K2 */ be_nested_str(add_driver), + /* K3 */ be_nested_str(set_percentage), /* K4 */ be_const_int(0), }), - ((bstring*) &be_const_str_init), - ((bstring*) &be_const_str_input), + &be_const_str_init, + &be_const_str_solidified, ( &(const binstruction[14]) { /* code */ 0x60080003, // 0000 GETGBL R2 G3 0x5C0C0000, // 0001 MOVE R3 R0 @@ -107,7 +107,7 @@ be_local_closure(init, /* name */ /******************************************************************** ** Solidified function: del ********************************************************************/ -be_local_closure(del, /* name */ +be_local_closure(lv_wifi_bars_del, /* name */ be_nested_proto( 4, /* nstack */ 1, /* argc */ @@ -118,12 +118,12 @@ be_local_closure(del, /* name */ NULL, /* no sub protos */ 1, /* has constants */ ( &(const bvalue[ 3]) { /* constants */ - /* K0 */ be_nested_string("del", -816214454, 3), - /* K1 */ be_nested_string("tasmota", 424643812, 7), - /* K2 */ be_nested_string("remove_driver", 1030243768, 13), + /* K0 */ be_nested_str(del), + /* K1 */ be_nested_str(tasmota), + /* K2 */ be_nested_str(remove_driver), }), - (be_nested_const_str("del", -816214454, 3)), - ((bstring*) &be_const_str_input), + &be_const_str_del, + &be_const_str_solidified, ( &(const binstruction[10]) { /* code */ 0x60040003, // 0000 GETGBL R1 G3 0x5C080000, // 0001 MOVE R2 R0 @@ -150,11 +150,11 @@ be_local_class(lv_wifi_bars, &be_class_lv_signal_bars, be_nested_map(3, ( (struct bmapnode*) &(const bmapnode[]) { - { be_nested_key("every_second", 2075451465, 12, 1), be_const_closure(every_second_closure) }, - { be_nested_key("init", 380752755, 4, -1), be_const_closure(init_closure) }, - { be_nested_key("del", -816214454, 3, -1), be_const_closure(del_closure) }, + { be_const_key(every_second, 1), be_const_closure(lv_wifi_bars_every_second_closure) }, + { be_const_key(init, -1), be_const_closure(lv_wifi_bars_init_closure) }, + { be_const_key(del, -1), be_const_closure(lv_wifi_bars_del_closure) }, })), - (be_nested_const_str("lv_wifi_bars", 2109539196, 12)) + be_str_literal("lv_wifi_bars") ); /*******************************************************************/ diff --git a/lib/libesp32/berry/default/be_md5_lib.c b/lib/libesp32/berry/default/be_md5_lib.c new file mode 100644 index 000000000..2db161a0b --- /dev/null +++ b/lib/libesp32/berry/default/be_md5_lib.c @@ -0,0 +1,100 @@ +/******************************************************************** + * Berry module `webserver` + * + * To use: `import webserver` + * + * Allows to respond to HTTP request + *******************************************************************/ +#include "be_constobj.h" +#include "be_mem.h" +#include "be_exec.h" +#include "esp_rom_md5.h" + +int free_ctx(bvm* vm) { + int argc = be_top(vm); + if (argc > 0) { + be_getmember(vm, 1, ".p"); + md5_context_t * ctx = (md5_context_t *) be_tocomptr(vm, -1); + if (ctx != NULL) { + be_os_free(ctx); + } + } + be_return_nil(vm); +} + +// `Md5.init() -> ` +int32_t m_md5_init(struct bvm *vm); +int32_t m_md5_init(struct bvm *vm) { + + md5_context_t * ctx = (md5_context_t *) be_os_malloc(sizeof(md5_context_t)); + if (!ctx) { + be_throw(vm, BE_MALLOC_FAIL); + } + esp_rom_md5_init(ctx); + + be_newcomobj(vm, ctx, &free_ctx); + be_setmember(vm, 1, ".p"); + be_return_nil(vm); +} + +// `Md5.update(content:bytes()) -> nil` +// +// Add raw bytes to the MD5 calculation +int32_t m_md5_update(struct bvm *vm); +int32_t m_md5_update(struct bvm *vm) { + int32_t argc = be_top(vm); // Get the number of arguments + if (argc >= 2 && be_isinstance(vm, 2)) { + do { + be_getglobal(vm, "bytes"); /* get the bytes class */ /* TODO eventually replace with be_getbuiltin */ + if (!be_isderived(vm, 2)) break; + size_t length = 0; + const void * bytes = be_tobytes(vm, 2, &length); + if (!bytes) break; + + be_getmember(vm, 1, ".p"); + md5_context_t * ctx; + ctx = (md5_context_t *) be_tocomptr(vm, -1); + if (!ctx) break; + + if (length > 0) { + esp_rom_md5_update(ctx, (const uint8_t*) bytes, length); + } + be_return_nil(vm); + // success + } while (0); + } + be_raise(vm, "value_error", NULL); +} + +// `Md5.update(content:bytes()) -> nil` +// +// Add raw bytes to the MD5 calculation +int32_t m_md5_finish(struct bvm *vm); +int32_t m_md5_finish(struct bvm *vm) { + be_getmember(vm, 1, ".p"); + md5_context_t * ctx; + ctx = (md5_context_t *) be_tocomptr(vm, -1); + + uint8_t output[16]; + esp_rom_md5_final(output, ctx); + be_pushbytes(vm, output, sizeof(output)); + be_return(vm); +} + +#include "../generate/be_fixed_be_class_md5.h" + +void be_load_md5_lib(bvm *vm) { + be_pushntvclass(vm, &be_class_md5); + be_setglobal(vm, "MD5"); + be_pop(vm, 1); +} +/* @const_object_info_begin + +class be_class_md5 (scope: global, name: MD5) { + .p, var + + init, func(m_md5_init) + update, func(m_md5_update) + finish, func(m_md5_finish) +} +@const_object_info_end */ diff --git a/lib/libesp32/Berry/default/be_modtab.c b/lib/libesp32/berry/default/be_modtab.c similarity index 95% rename from lib/libesp32/Berry/default/be_modtab.c rename to lib/libesp32/berry/default/be_modtab.c index 0c54ce990..934400bbb 100644 --- a/lib/libesp32/Berry/default/be_modtab.c +++ b/lib/libesp32/berry/default/be_modtab.c @@ -23,6 +23,10 @@ be_extern_native_module(solidify); be_extern_native_module(introspect); be_extern_native_module(strict); +/* Berry extensions */ +#include "be_mapping.h" +be_extern_native_module(cb); + /* Tasmota specific */ be_extern_native_module(python_compat); be_extern_native_module(re); @@ -85,6 +89,10 @@ BERRY_LOCAL const bntvmodule* const be_module_table[] = { #if BE_USE_STRICT_MODULE &be_native_module(strict), #endif + + /* Berry extensions */ + &be_native_module(cb), + /* user-defined modules register start */ &be_native_module(python_compat), @@ -131,10 +139,11 @@ extern void be_load_onewirelib(bvm *vm); extern void be_load_serial_lib(bvm *vm); extern void be_load_Driver_class(bvm *vm); extern void be_load_Timer_class(bvm *vm); -extern void be_load_driver_i2c_lib(bvm *vm); +extern void be_load_I2C_Driver_class(bvm *vm); extern void be_load_AXP192_class(bvm *vm); extern void be_load_md5_lib(bvm *vm); extern void be_load_webclient_lib(bvm *vm); +extern void be_load_tcpclient_lib(bvm *vm); extern void be_load_crypto_lib(bvm *vm); extern void be_load_Leds_ntv_class(bvm *vm); extern void be_load_Leds_class(bvm *vm); @@ -181,7 +190,7 @@ BERRY_API void be_load_custom_libs(bvm *vm) #endif #ifdef USE_I2C be_load_wirelib(vm); - be_load_driver_i2c_lib(vm); + be_load_I2C_Driver_class(vm); be_load_AXP192_class(vm); #endif // USE_I2C #ifdef USE_ENERGY_SENSOR @@ -189,6 +198,7 @@ BERRY_API void be_load_custom_libs(bvm *vm) #endif // USE_ENERGY_SENSOR #ifdef USE_WEBCLIENT be_load_webclient_lib(vm); + be_load_tcpclient_lib(vm); #endif // USE_WEBCLIENT #if defined(USE_ONEWIRE) || defined(USE_DS18x20) be_load_onewirelib(vm); diff --git a/lib/libesp32/Berry/default/be_onewire_lib.c b/lib/libesp32/berry/default/be_onewire_lib.c similarity index 100% rename from lib/libesp32/Berry/default/be_onewire_lib.c rename to lib/libesp32/berry/default/be_onewire_lib.c diff --git a/lib/libesp32/Berry/default/be_path_tasmota_lib.c b/lib/libesp32/berry/default/be_path_tasmota_lib.c similarity index 100% rename from lib/libesp32/Berry/default/be_path_tasmota_lib.c rename to lib/libesp32/berry/default/be_path_tasmota_lib.c diff --git a/lib/libesp32/Berry/default/be_persist_lib.c b/lib/libesp32/berry/default/be_persist_lib.c similarity index 79% rename from lib/libesp32/Berry/default/be_persist_lib.c rename to lib/libesp32/berry/default/be_persist_lib.c index 4684283d4..0581081c7 100644 --- a/lib/libesp32/Berry/default/be_persist_lib.c +++ b/lib/libesp32/berry/default/be_persist_lib.c @@ -21,19 +21,19 @@ be_local_closure(Persist_json_fdump_map, /* name */ NULL, /* no sub protos */ 1, /* has constants */ ( &(const bvalue[10]) { /* constants */ - /* K0 */ be_nested_str_literal("json"), - /* K1 */ be_nested_str_literal("write"), - /* K2 */ be_nested_str_literal("{"), - /* K3 */ be_nested_str_literal("keys"), - /* K4 */ be_nested_str_literal("dump"), - /* K5 */ be_nested_str_literal(":"), - /* K6 */ be_nested_str_literal("json_fdump_any"), - /* K7 */ be_nested_str_literal(","), - /* K8 */ be_nested_str_literal("stop_iteration"), - /* K9 */ be_nested_str_literal("}"), + /* K0 */ be_nested_str(json), + /* K1 */ be_nested_str(write), + /* K2 */ be_nested_str(_X7B), + /* K3 */ be_nested_str(keys), + /* K4 */ be_nested_str(dump), + /* K5 */ be_nested_str(_X3A), + /* K6 */ be_nested_str(json_fdump_any), + /* K7 */ be_nested_str(_X2C), + /* K8 */ be_nested_str(stop_iteration), + /* K9 */ be_nested_str(_X7D), }), - (be_nested_const_str("json_fdump_map", -203012643, 14)), - ((bstring*) &be_const_str_input), + &be_const_str_json_fdump_map, + &be_const_str_solidified, ( &(const binstruction[41]) { /* code */ 0xA40E0000, // 0000 IMPORT R3 K0 0x8C100301, // 0001 GETMET R4 R1 K1 @@ -96,11 +96,11 @@ be_local_closure(Persist_setmember, /* name */ NULL, /* no sub protos */ 1, /* has constants */ ( &(const bvalue[ 2]) { /* constants */ - /* K0 */ be_nested_str_literal("_p"), - /* K1 */ be_nested_str_literal("_dirty"), + /* K0 */ be_nested_str(_p), + /* K1 */ be_nested_str(_dirty), }), - (be_nested_const_str("setmember", 1432909441, 9)), - ((bstring*) &be_const_str_input), + &be_const_str_setmember, + &be_const_str_solidified, ( &(const binstruction[ 5]) { /* code */ 0x880C0100, // 0000 GETMBR R3 R0 K0 0x980C0202, // 0001 SETIDX R3 R1 R2 @@ -127,11 +127,11 @@ be_local_closure(Persist_zero, /* name */ NULL, /* no sub protos */ 1, /* has constants */ ( &(const bvalue[ 2]) { /* constants */ - /* K0 */ be_nested_str_literal("_p"), - /* K1 */ be_nested_str_literal("_dirty"), + /* K0 */ be_nested_str(_p), + /* K1 */ be_nested_str(_dirty), }), - (be_nested_const_str("zero", -1955600541, 4)), - ((bstring*) &be_const_str_input), + &be_const_str_zero, + &be_const_str_solidified, ( &(const binstruction[ 6]) { /* code */ 0x60040013, // 0000 GETGBL R1 G19 0x7C040000, // 0001 CALL R1 0 @@ -159,11 +159,11 @@ be_local_closure(Persist_member, /* name */ NULL, /* no sub protos */ 1, /* has constants */ ( &(const bvalue[ 2]) { /* constants */ - /* K0 */ be_nested_str_literal("_p"), - /* K1 */ be_nested_str_literal("find"), + /* K0 */ be_nested_str(_p), + /* K1 */ be_nested_str(find), }), - (be_nested_const_str("member", 719708611, 6)), - ((bstring*) &be_const_str_input), + &be_const_str_member, + &be_const_str_solidified, ( &(const binstruction[ 5]) { /* code */ 0x88080100, // 0000 GETMBR R2 R0 K0 0x8C080501, // 0001 GETMET R2 R2 K1 @@ -190,14 +190,14 @@ be_local_closure(Persist_json_fdump, /* name */ NULL, /* no sub protos */ 1, /* has constants */ ( &(const bvalue[ 5]) { /* constants */ - /* K0 */ be_nested_str_literal("json"), - /* K1 */ be_nested_str_literal("_p"), - /* K2 */ be_nested_str_literal("json_fdump_map"), - /* K3 */ be_nested_str_literal("internal_error"), - /* K4 */ be_nested_str_literal("persist._p is not a map"), + /* K0 */ be_nested_str(json), + /* K1 */ be_nested_str(_p), + /* K2 */ be_nested_str(json_fdump_map), + /* K3 */ be_nested_str(internal_error), + /* K4 */ be_nested_str(persist_X2E_p_X20is_X20not_X20a_X20map), }), - (be_nested_const_str("json_fdump", 1694216580, 10)), - ((bstring*) &be_const_str_input), + &be_const_str_json_fdump, + &be_const_str_solidified, ( &(const binstruction[13]) { /* code */ 0xA40A0000, // 0000 IMPORT R2 K0 0x600C000F, // 0001 GETGBL R3 G15 @@ -232,12 +232,12 @@ be_local_closure(Persist_remove, /* name */ NULL, /* no sub protos */ 1, /* has constants */ ( &(const bvalue[ 3]) { /* constants */ - /* K0 */ be_nested_str_literal("_p"), - /* K1 */ be_nested_str_literal("remove"), - /* K2 */ be_nested_str_literal("_dirty"), + /* K0 */ be_nested_str(_p), + /* K1 */ be_nested_str(remove), + /* K2 */ be_nested_str(_dirty), }), - (be_nested_const_str("remove", -611183107, 6)), - ((bstring*) &be_const_str_input), + &be_const_str_remove, + &be_const_str_solidified, ( &(const binstruction[ 7]) { /* code */ 0x88080100, // 0000 GETMBR R2 R0 K0 0x8C080501, // 0001 GETMET R2 R2 K1 @@ -266,14 +266,14 @@ be_local_closure(Persist_json_fdump_any, /* name */ NULL, /* no sub protos */ 1, /* has constants */ ( &(const bvalue[ 5]) { /* constants */ - /* K0 */ be_nested_str_literal("json"), - /* K1 */ be_nested_str_literal("json_fdump_map"), - /* K2 */ be_nested_str_literal("json_fdump_list"), - /* K3 */ be_nested_str_literal("write"), - /* K4 */ be_nested_str_literal("dump"), + /* K0 */ be_nested_str(json), + /* K1 */ be_nested_str(json_fdump_map), + /* K2 */ be_nested_str(json_fdump_list), + /* K3 */ be_nested_str(write), + /* K4 */ be_nested_str(dump), }), - (be_nested_const_str("json_fdump_any", -946337911, 14)), - ((bstring*) &be_const_str_input), + &be_const_str_json_fdump_any, + &be_const_str_solidified, ( &(const binstruction[27]) { /* code */ 0xA40E0000, // 0000 IMPORT R3 K0 0x6010000F, // 0001 GETGBL R4 G15 @@ -322,16 +322,16 @@ be_local_closure(Persist_save, /* name */ NULL, /* no sub protos */ 1, /* has constants */ ( &(const bvalue[ 7]) { /* constants */ - /* K0 */ be_nested_str_literal("_filename"), - /* K1 */ be_nested_str_literal("w"), - /* K2 */ be_nested_str_literal("json_fdump"), - /* K3 */ be_nested_str_literal("close"), - /* K4 */ be_nested_str_literal("write"), - /* K5 */ be_nested_str_literal("{}"), - /* K6 */ be_nested_str_literal("_dirty"), + /* K0 */ be_nested_str(_filename), + /* K1 */ be_nested_str(w), + /* K2 */ be_nested_str(json_fdump), + /* K3 */ be_nested_str(close), + /* K4 */ be_nested_str(write), + /* K5 */ be_nested_str(_X7B_X7D), + /* K6 */ be_nested_str(_dirty), }), - (be_nested_const_str("save", -855671224, 4)), - ((bstring*) &be_const_str_input), + &be_const_str_save, + &be_const_str_solidified, ( &(const binstruction[37]) { /* code */ 0x4C040000, // 0000 LDNIL R1 0xA802000B, // 0001 EXBLK 0 #000E @@ -390,21 +390,21 @@ be_local_closure(Persist_load, /* name */ NULL, /* no sub protos */ 1, /* has constants */ ( &(const bvalue[12]) { /* constants */ - /* K0 */ be_nested_str_literal("json"), - /* K1 */ be_nested_str_literal("path"), - /* K2 */ be_nested_str_literal("exists"), - /* K3 */ be_nested_str_literal("_filename"), - /* K4 */ be_nested_str_literal("r"), - /* K5 */ be_nested_str_literal("load"), - /* K6 */ be_nested_str_literal("read"), - /* K7 */ be_nested_str_literal("close"), - /* K8 */ be_nested_str_literal("_p"), - /* K9 */ be_nested_str_literal("BRY: failed to load _persist.json"), - /* K10 */ be_nested_str_literal("_dirty"), - /* K11 */ be_nested_str_literal("save"), + /* K0 */ be_nested_str(json), + /* K1 */ be_nested_str(path), + /* K2 */ be_nested_str(exists), + /* K3 */ be_nested_str(_filename), + /* K4 */ be_nested_str(r), + /* K5 */ be_nested_str(load), + /* K6 */ be_nested_str(read), + /* K7 */ be_nested_str(close), + /* K8 */ be_nested_str(_p), + /* K9 */ be_nested_str(BRY_X3A_X20failed_X20to_X20load_X20_persist_X2Ejson), + /* K10 */ be_nested_str(_dirty), + /* K11 */ be_nested_str(save), }), - (be_nested_const_str("load", -435725847, 4)), - ((bstring*) &be_const_str_input), + &be_const_str_load, + &be_const_str_solidified, ( &(const binstruction[49]) { /* code */ 0xA4060000, // 0000 IMPORT R1 K0 0xA40A0200, // 0001 IMPORT R2 K1 @@ -475,11 +475,11 @@ be_local_closure(Persist_find, /* name */ NULL, /* no sub protos */ 1, /* has constants */ ( &(const bvalue[ 2]) { /* constants */ - /* K0 */ be_nested_str_literal("_p"), - /* K1 */ be_nested_str_literal("find"), + /* K0 */ be_nested_str(_p), + /* K1 */ be_nested_str(find), }), - (be_nested_const_str("find", -1108310694, 4)), - ((bstring*) &be_const_str_input), + &be_const_str_find, + &be_const_str_solidified, ( &(const binstruction[ 6]) { /* code */ 0x880C0100, // 0000 GETMBR R3 R0 K0 0x8C0C0701, // 0001 GETMET R3 R3 K1 @@ -507,15 +507,15 @@ be_local_closure(Persist_init, /* name */ NULL, /* no sub protos */ 1, /* has constants */ ( &(const bvalue[ 6]) { /* constants */ - /* K0 */ be_nested_str_literal("_filename"), - /* K1 */ be_nested_str_literal("_persist.json"), - /* K2 */ be_nested_str_literal("_p"), - /* K3 */ be_nested_str_literal("copy"), - /* K4 */ be_nested_str_literal("load"), - /* K5 */ be_nested_str_literal("_dirty"), + /* K0 */ be_nested_str(_filename), + /* K1 */ be_nested_str(_persist_X2Ejson), + /* K2 */ be_nested_str(_p), + /* K3 */ be_nested_str(copy), + /* K4 */ be_nested_str(load), + /* K5 */ be_nested_str(_dirty), }), - (be_nested_const_str("init", 380752755, 4)), - ((bstring*) &be_const_str_input), + &be_const_str_init, + &be_const_str_solidified, ( &(const binstruction[20]) { /* code */ 0x90020101, // 0000 SETMBR R0 K0 K1 0x6008000F, // 0001 GETGBL R2 G15 @@ -557,17 +557,17 @@ be_local_closure(Persist_json_fdump_list, /* name */ NULL, /* no sub protos */ 1, /* has constants */ ( &(const bvalue[ 8]) { /* constants */ - /* K0 */ be_nested_str_literal("json"), - /* K1 */ be_nested_str_literal("write"), - /* K2 */ be_nested_str_literal("["), + /* K0 */ be_nested_str(json), + /* K1 */ be_nested_str(write), + /* K2 */ be_nested_str(_X5B), /* K3 */ be_const_int(0), - /* K4 */ be_nested_str_literal(","), - /* K5 */ be_nested_str_literal("json_fdump_any"), + /* K4 */ be_nested_str(_X2C), + /* K5 */ be_nested_str(json_fdump_any), /* K6 */ be_const_int(1), - /* K7 */ be_nested_str_literal("]"), + /* K7 */ be_nested_str(_X5D), }), - (be_nested_const_str("json_fdump_list", -391087443, 15)), - ((bstring*) &be_const_str_input), + &be_const_str_json_fdump_list, + &be_const_str_solidified, ( &(const binstruction[25]) { /* code */ 0xA40E0000, // 0000 IMPORT R3 K0 0x8C100301, // 0001 GETMET R4 R1 K1 @@ -614,11 +614,11 @@ be_local_closure(Persist_has, /* name */ NULL, /* no sub protos */ 1, /* has constants */ ( &(const bvalue[ 2]) { /* constants */ - /* K0 */ be_nested_str_literal("_p"), - /* K1 */ be_nested_str_literal("has"), + /* K0 */ be_nested_str(_p), + /* K1 */ be_nested_str(has), }), - (be_nested_const_str("has", -306245661, 3)), - ((bstring*) &be_const_str_input), + &be_const_str_has, + &be_const_str_solidified, ( &(const binstruction[ 5]) { /* code */ 0x88080100, // 0000 GETMBR R2 R0 K0 0x8C080501, // 0001 GETMET R2 R2 K1 @@ -639,22 +639,22 @@ be_local_class(Persist, NULL, be_nested_map(16, ( (struct bmapnode*) &(const bmapnode[]) { - { be_nested_key("has", -306245661, 3, 6), be_const_closure(Persist_has_closure) }, - { be_nested_key("setmember", 1432909441, 9, -1), be_const_closure(Persist_setmember_closure) }, - { be_nested_key("remove", -611183107, 6, -1), be_const_closure(Persist_remove_closure) }, - { be_nested_key("zero", -1955600541, 4, 0), be_const_closure(Persist_zero_closure) }, - { be_nested_key("json_fdump", 1694216580, 10, -1), be_const_closure(Persist_json_fdump_closure) }, - { be_nested_key("json_fdump_list", -391087443, 15, 2), be_const_closure(Persist_json_fdump_list_closure) }, - { be_nested_key("init", 380752755, 4, 15), be_const_closure(Persist_init_closure) }, - { be_nested_key("find", -1108310694, 4, -1), be_const_closure(Persist_find_closure) }, - { be_nested_key("save", -855671224, 4, -1), be_const_closure(Persist_save_closure) }, - { be_nested_key("json_fdump_any", -946337911, 14, 12), be_const_closure(Persist_json_fdump_any_closure) }, - { be_nested_key("_p", 1594591802, 2, 7), be_const_var(1) }, - { be_nested_key("_filename", 1430813195, 9, -1), be_const_var(0) }, - { be_nested_key("load", -435725847, 4, -1), be_const_closure(Persist_load_closure) }, - { be_nested_key("json_fdump_map", -203012643, 14, 5), be_const_closure(Persist_json_fdump_map_closure) }, - { be_nested_key("_dirty", 283846766, 6, -1), be_const_var(2) }, - { be_nested_key("member", 719708611, 6, -1), be_const_closure(Persist_member_closure) }, + { be_const_key(has, 6), be_const_closure(Persist_has_closure) }, + { be_const_key(setmember, -1), be_const_closure(Persist_setmember_closure) }, + { be_const_key(remove, -1), be_const_closure(Persist_remove_closure) }, + { be_const_key(zero, 0), be_const_closure(Persist_zero_closure) }, + { be_const_key(json_fdump, -1), be_const_closure(Persist_json_fdump_closure) }, + { be_const_key(json_fdump_list, 2), be_const_closure(Persist_json_fdump_list_closure) }, + { be_const_key(init, 15), be_const_closure(Persist_init_closure) }, + { be_const_key(find, -1), be_const_closure(Persist_find_closure) }, + { be_const_key(save, -1), be_const_closure(Persist_save_closure) }, + { be_const_key(json_fdump_any, 12), be_const_closure(Persist_json_fdump_any_closure) }, + { be_const_key(_p, 7), be_const_var(1) }, + { be_const_key(_filename, -1), be_const_var(0) }, + { be_const_key(load, -1), be_const_closure(Persist_load_closure) }, + { be_const_key(json_fdump_map, 5), be_const_closure(Persist_json_fdump_map_closure) }, + { be_const_key(_dirty, -1), be_const_var(2) }, + { be_const_key(member, -1), be_const_closure(Persist_member_closure) }, })), be_str_literal("Persist") ); @@ -675,8 +675,8 @@ be_local_closure(persist__anonymous_, /* name */ ( &(const bvalue[ 1]) { /* constants */ /* K0 */ be_const_class(be_class_Persist), }), - (be_nested_const_str("_anonymous_", 1957281476, 11)), - ((bstring*) &be_const_str_input), + &be_const_str__anonymous_, + &be_const_str_solidified, ( &(const binstruction[ 5]) { /* code */ 0x58040000, // 0000 LDCONST R1 K0 0xB4000000, // 0001 CLASS K0 @@ -696,7 +696,7 @@ be_local_module(persist, "persist", be_nested_map(1, ( (struct bmapnode*) &(const bmapnode[]) { - { be_nested_key("init", 380752755, 4, -1), be_const_closure(persist__anonymous__closure) }, + { be_const_key(init, -1), be_const_closure(persist__anonymous__closure) }, })) ); BE_EXPORT_VARIABLE be_define_const_native_module(persist); diff --git a/lib/libesp32/Berry/default/be_port.cpp b/lib/libesp32/berry/default/be_port.cpp similarity index 100% rename from lib/libesp32/Berry/default/be_port.cpp rename to lib/libesp32/berry/default/be_port.cpp diff --git a/lib/libesp32/Berry/default/be_python_compat.c b/lib/libesp32/berry/default/be_python_compat.c similarity index 59% rename from lib/libesp32/Berry/default/be_python_compat.c rename to lib/libesp32/berry/default/be_python_compat.c index 7213c10ad..5b3ec64d0 100644 --- a/lib/libesp32/Berry/default/be_python_compat.c +++ b/lib/libesp32/berry/default/be_python_compat.c @@ -8,7 +8,7 @@ /******************************************************************** ** Solidified function: _anonymous_ ********************************************************************/ -be_local_closure(_anonymous_, /* name */ +be_local_closure(python_compat__anonymous_, /* name */ be_nested_proto( 3, /* nstack */ 1, /* argc */ @@ -19,25 +19,25 @@ be_local_closure(_anonymous_, /* name */ NULL, /* no sub protos */ 1, /* has constants */ ( &(const bvalue[ 5]) { /* constants */ - /* K0 */ be_nested_string("global", 503252654, 6), - /* K1 */ be_nested_string("True", -841064955, 4), - /* K2 */ be_nested_string("False", -1753917960, 5), - /* K3 */ be_nested_string("None", 810547195, 4), - /* K4 */ be_nested_string("b", -418632219, 1), + /* K0 */ be_nested_str(global), + /* K1 */ be_nested_str(True), + /* K2 */ be_nested_str(False), + /* K3 */ be_nested_str(None), + /* K4 */ be_nested_str(b), }), - (be_nested_const_str("_anonymous_", 1957281476, 11)), - (be_nested_const_str("python_compat.be", -225667571, 16)), + &be_const_str__anonymous_, + &be_const_str_solidified, ( &(const binstruction[10]) { /* code */ - 0xA4060000, // 0000 IMPORT R1 K0 - 0x50080200, // 0001 LDBOOL R2 1 0 - 0x90060202, // 0002 SETMBR R1 K1 R2 - 0x50080000, // 0003 LDBOOL R2 0 0 - 0x90060402, // 0004 SETMBR R1 K2 R2 - 0x4C080000, // 0005 LDNIL R2 - 0x90060602, // 0006 SETMBR R1 K3 R2 - 0x60080015, // 0007 GETGBL R2 G21 - 0x90060802, // 0008 SETMBR R1 K4 R2 - 0x80040000, // 0009 RET 1 R0 + 0xA4060000, // 0000 IMPORT R1 K0 + 0x50080200, // 0001 LDBOOL R2 1 0 + 0x90060202, // 0002 SETMBR R1 K1 R2 + 0x50080000, // 0003 LDBOOL R2 0 0 + 0x90060402, // 0004 SETMBR R1 K2 R2 + 0x4C080000, // 0005 LDNIL R2 + 0x90060602, // 0006 SETMBR R1 K3 R2 + 0x60080015, // 0007 GETGBL R2 G21 + 0x90060802, // 0008 SETMBR R1 K4 R2 + 0x80040000, // 0009 RET 1 R0 }) ) ); @@ -51,7 +51,7 @@ be_local_module(python_compat, "python_compat", be_nested_map(1, ( (struct bmapnode*) &(const bmapnode[]) { - { be_nested_key("init", 380752755, 4, -1), be_const_closure(_anonymous__closure) }, + { be_const_key(init, -1), be_const_closure(python_compat__anonymous__closure) }, })) ); BE_EXPORT_VARIABLE be_define_const_native_module(python_compat); diff --git a/lib/libesp32/Berry/default/be_re_lib.c b/lib/libesp32/berry/default/be_re_lib.c similarity index 100% rename from lib/libesp32/Berry/default/be_re_lib.c rename to lib/libesp32/berry/default/be_re_lib.c diff --git a/lib/libesp32/Berry/default/be_serial_lib.c b/lib/libesp32/berry/default/be_serial_lib.c similarity index 100% rename from lib/libesp32/Berry/default/be_serial_lib.c rename to lib/libesp32/berry/default/be_serial_lib.c diff --git a/lib/libesp32/Berry/default/be_tapp_lib.c b/lib/libesp32/berry/default/be_tapp_lib.c similarity index 80% rename from lib/libesp32/Berry/default/be_tapp_lib.c rename to lib/libesp32/berry/default/be_tapp_lib.c index 47ef170f7..1a312d110 100644 --- a/lib/libesp32/Berry/default/be_tapp_lib.c +++ b/lib/libesp32/berry/default/be_tapp_lib.c @@ -20,11 +20,11 @@ be_local_closure(Tapp_init, /* name */ NULL, /* no sub protos */ 1, /* has constants */ ( &(const bvalue[ 2]) { /* constants */ - /* K0 */ be_nested_str_literal("tasmota"), - /* K1 */ be_nested_str_literal("add_driver"), + /* K0 */ be_nested_str(tasmota), + /* K1 */ be_nested_str(add_driver), }), - (be_nested_const_str("init", 380752755, 4)), - ((bstring*) &be_const_str_input), + &be_const_str_init, + &be_const_str_solidified, ( &(const binstruction[ 5]) { /* code */ 0xB8060000, // 0000 GETNGBL R1 K0 0x8C040301, // 0001 GETMET R1 R1 K1 @@ -51,24 +51,24 @@ be_local_closure(Tapp_autoexec, /* name */ NULL, /* no sub protos */ 1, /* has constants */ ( &(const bvalue[15]) { /* constants */ - /* K0 */ be_nested_str_literal("path"), - /* K1 */ be_nested_str_literal("string"), - /* K2 */ be_nested_str_literal("listdir"), - /* K3 */ be_nested_str_literal("/"), - /* K4 */ be_nested_str_literal("find"), - /* K5 */ be_nested_str_literal(".tapp"), + /* K0 */ be_nested_str(path), + /* K1 */ be_nested_str(string), + /* K2 */ be_nested_str(listdir), + /* K3 */ be_nested_str(_X2F), + /* K4 */ be_nested_str(find), + /* K5 */ be_nested_str(_X2Etapp), /* K6 */ be_const_int(0), - /* K7 */ be_nested_str_literal("tasmota"), - /* K8 */ be_nested_str_literal("log"), - /* K9 */ be_nested_str_literal("format"), - /* K10 */ be_nested_str_literal("TAP: found Tasmota App '%s'"), + /* K7 */ be_nested_str(tasmota), + /* K8 */ be_nested_str(log), + /* K9 */ be_nested_str(format), + /* K10 */ be_nested_str(TAP_X3A_X20found_X20Tasmota_X20App_X20_X27_X25s_X27), /* K11 */ be_const_int(2), - /* K12 */ be_nested_str_literal("load"), - /* K13 */ be_nested_str_literal("#autoexec.be"), - /* K14 */ be_nested_str_literal("stop_iteration"), + /* K12 */ be_nested_str(load), + /* K13 */ be_nested_str(_X23autoexec_X2Ebe), + /* K14 */ be_nested_str(stop_iteration), }), - (be_nested_const_str("autoexec", -618105405, 8)), - ((bstring*) &be_const_str_input), + &be_const_str_autoexec, + &be_const_str_solidified, ( &(const binstruction[34]) { /* code */ 0xA4060000, // 0000 IMPORT R1 K0 0xA40A0200, // 0001 IMPORT R2 K1 @@ -118,8 +118,8 @@ be_local_class(Tapp, NULL, be_nested_map(2, ( (struct bmapnode*) &(const bmapnode[]) { - { be_nested_key("autoexec", -618105405, 8, -1), be_const_closure(Tapp_autoexec_closure) }, - { be_nested_key("init", 380752755, 4, 0), be_const_closure(Tapp_init_closure) }, + { be_const_key(autoexec, -1), be_const_closure(Tapp_autoexec_closure) }, + { be_const_key(init, 0), be_const_closure(Tapp_init_closure) }, })), be_str_literal("Tapp") ); @@ -140,8 +140,8 @@ be_local_closure(tapp__anonymous_, /* name */ ( &(const bvalue[ 1]) { /* constants */ /* K0 */ be_const_class(be_class_Tapp), }), - (be_nested_const_str("_anonymous_", 1957281476, 11)), - ((bstring*) &be_const_str_input), + &be_const_str__anonymous_, + &be_const_str_solidified, ( &(const binstruction[ 5]) { /* code */ 0x58040000, // 0000 LDCONST R1 K0 0xB4000000, // 0001 CLASS K0 @@ -161,7 +161,7 @@ be_local_module(tapp, "tapp", be_nested_map(1, ( (struct bmapnode*) &(const bmapnode[]) { - { be_nested_key("init", 380752755, 4, -1), be_const_closure(tapp__anonymous__closure) }, + { be_const_key(init, -1), be_const_closure(tapp__anonymous__closure) }, })) ); BE_EXPORT_VARIABLE be_define_const_native_module(tapp); diff --git a/lib/libesp32/Berry/default/be_tasmotalib.c b/lib/libesp32/berry/default/be_tasmotalib.c similarity index 66% rename from lib/libesp32/Berry/default/be_tasmotalib.c rename to lib/libesp32/berry/default/be_tasmotalib.c index a5c0307b8..6539b0de3 100644 --- a/lib/libesp32/Berry/default/be_tasmotalib.c +++ b/lib/libesp32/berry/default/be_tasmotalib.c @@ -16,13 +16,13 @@ extern int l_arch(bvm *vm); extern int l_publish(bvm *vm); extern int l_publish_result(bvm *vm); extern int l_cmd(bvm *vm); -extern int l_get_cb(bvm *vm); extern int l_getoption(bvm *vm); extern int l_millis(bvm *vm); extern int l_timereached(bvm *vm); extern int l_rtc(bvm *vm); extern int l_time_dump(bvm *vm); extern int l_strftime(bvm *vm); +extern int l_strptime(bvm *vm); extern int l_memory(bvm *vm); extern int l_wifi(bvm *vm); extern int l_eth(bvm *vm); @@ -53,161 +53,11 @@ extern int l_getswitch(bvm *vm); extern int l_i2cenabled(bvm *vm); -// KV class -/******************************************************************** -** Solidified function: init -********************************************************************/ -be_local_closure(kv_init, /* name */ - be_nested_proto( - 3, /* nstack */ - 3, /* argc */ - 0, /* varg */ - 0, /* has upvals */ - NULL, /* no upvals */ - 0, /* has sup protos */ - NULL, /* no sub protos */ - 1, /* has constants */ - ( &(const bvalue[ 2]) { /* constants */ - /* K0 */ be_nested_string("k", -301188886, 1), - /* K1 */ be_nested_string("v", -217300791, 1), - }), - ((bstring*) &be_const_str_init), - ((bstring*) &be_const_str_input), - ( &(const binstruction[ 3]) { /* code */ - 0x90020001, // 0000 SETMBR R0 K0 R1 - 0x90020202, // 0001 SETMBR R0 K1 R2 - 0x80000000, // 0002 RET 0 - }) - ) -); -/*******************************************************************/ - - -/******************************************************************** -** Solidified class: KV -********************************************************************/ -be_local_class(KV, - 2, - NULL, - be_nested_map(3, - ( (struct bmapnode*) &(const bmapnode[]) { - { be_nested_key("k", -301188886, 1, 2), be_const_var(0) }, - { be_nested_key("v", -217300791, 1, -1), be_const_var(1) }, - { be_nested_key("init", 380752755, 4, -1), be_const_closure(kv_init_closure) }, - })), - (be_nested_const_str("KV", 955173972, 2)) -); - -/******************************************************************** -** Solidified function: kv -********************************************************************/ -be_local_closure(kv, /* name */ - be_nested_proto( - 7, /* nstack */ - 3, /* argc */ - 0, /* varg */ - 0, /* has upvals */ - NULL, /* no upvals */ - 0, /* has sup protos */ - NULL, /* no sub protos */ - 1, /* has constants */ - ( &(const bvalue[ 1]) { /* constants */ - /* K0 */ be_const_class(be_class_KV), - }), - (be_nested_const_str("kv", 1497177492, 2)), - ((bstring*) &be_const_str_input), - ( &(const binstruction[ 7]) { /* code */ - 0x580C0000, // 0000 LDCONST R3 K0 - 0xB4000000, // 0001 CLASS K0 - 0x5C100600, // 0002 MOVE R4 R3 - 0x5C140200, // 0003 MOVE R5 R1 - 0x5C180400, // 0004 MOVE R6 R2 - 0x7C100400, // 0005 CALL R4 2 - 0x80040800, // 0006 RET 1 R4 - }) - ) -); -/*******************************************************************/ - - -/******************************************************************** -** Solidified function: init -********************************************************************/ -be_local_closure(init, /* name */ - be_nested_proto( - 7, /* nstack */ - 1, /* argc */ - 0, /* varg */ - 0, /* has upvals */ - NULL, /* no upvals */ - 0, /* has sup protos */ - NULL, /* no sub protos */ - 1, /* has constants */ - ( &(const bvalue[15]) { /* constants */ - /* K0 */ be_nested_str_literal("global"), - /* K1 */ be_nested_str_literal("ctypes_bytes_dyn"), - /* K2 */ be_nested_str_literal("_global_addr"), - /* K3 */ be_nested_str_literal("_global_def"), - /* K4 */ be_nested_str_literal("introspect"), - /* K5 */ be_nested_str_literal("_settings_ptr"), - /* K6 */ be_nested_str_literal("get"), - /* K7 */ be_const_int(0), - /* K8 */ be_nested_str_literal("settings"), - /* K9 */ be_nested_str_literal("toptr"), - /* K10 */ be_nested_str_literal("_settings_def"), - /* K11 */ be_nested_str_literal("wd"), - /* K12 */ be_nested_str_literal(""), - /* K13 */ be_nested_str_literal("_debug_present"), - /* K14 */ be_nested_str_literal("debug"), - }), - (be_nested_const_str("init", 380752755, 4)), - ((bstring*) &be_const_str_input), - ( &(const binstruction[36]) { /* code */ - 0xB8060200, // 0000 GETNGBL R1 K1 - 0x88080102, // 0001 GETMBR R2 R0 K2 - 0x880C0103, // 0002 GETMBR R3 R0 K3 - 0x7C040400, // 0003 CALL R1 2 - 0x90020001, // 0004 SETMBR R0 K0 R1 - 0xA4060800, // 0005 IMPORT R1 K4 - 0x60080015, // 0006 GETGBL R2 G21 - 0x880C0105, // 0007 GETMBR R3 R0 K5 - 0x54120003, // 0008 LDINT R4 4 - 0x7C080400, // 0009 CALL R2 2 - 0x8C080506, // 000A GETMET R2 R2 K6 - 0x58100007, // 000B LDCONST R4 K7 - 0x54160003, // 000C LDINT R5 4 - 0x7C080600, // 000D CALL R2 3 - 0x780A0006, // 000E JMPF R2 #0016 - 0xB80E0200, // 000F GETNGBL R3 K1 - 0x8C100309, // 0010 GETMET R4 R1 K9 - 0x5C180400, // 0011 MOVE R6 R2 - 0x7C100400, // 0012 CALL R4 2 - 0x8814010A, // 0013 GETMBR R5 R0 K10 - 0x7C0C0400, // 0014 CALL R3 2 - 0x90021003, // 0015 SETMBR R0 K8 R3 - 0x9002170C, // 0016 SETMBR R0 K11 K12 - 0x500C0000, // 0017 LDBOOL R3 0 0 - 0x90021A03, // 0018 SETMBR R0 K13 R3 - 0xA8020004, // 0019 EXBLK 0 #001F - 0xA40E1C00, // 001A IMPORT R3 K14 - 0x50100200, // 001B LDBOOL R4 1 0 - 0x90021A04, // 001C SETMBR R0 K13 R4 - 0xA8040001, // 001D EXBLK 1 1 - 0x70020003, // 001E JMP #0023 - 0xAC0C0000, // 001F CATCH R3 0 0 - 0x70020000, // 0020 JMP #0022 - 0x70020000, // 0021 JMP #0023 - 0xB0080000, // 0022 RAISE 2 R0 R0 - 0x80000000, // 0023 RET 0 - }) - ) -); -/*******************************************************************/ /******************************************************************** ** Solidified function: add_driver ********************************************************************/ -be_local_closure(add_driver, /* name */ +be_local_closure(Tasmota_add_driver, /* name */ be_nested_proto( 5, /* nstack */ 2, /* argc */ @@ -218,24 +68,24 @@ be_local_closure(add_driver, /* name */ NULL, /* no sub protos */ 1, /* has constants */ ( &(const bvalue[ 2]) { /* constants */ - /* K0 */ be_nested_string("_drivers", -1034638311, 8), - /* K1 */ be_nested_string("push", -2022703139, 4), + /* K0 */ be_nested_str(_drivers), + /* K1 */ be_nested_str(push), }), - (be_nested_const_str("add_driver", 1654458371, 10)), - ((bstring*) &be_const_str_input), + &be_const_str_add_driver, + &be_const_str_solidified, ( &(const binstruction[12]) { /* code */ - 0x88080100, // 0000 GETMBR R2 R0 K0 - 0x780A0004, // 0001 JMPF R2 #0007 - 0x88080100, // 0002 GETMBR R2 R0 K0 - 0x8C080501, // 0003 GETMET R2 R2 K1 - 0x5C100200, // 0004 MOVE R4 R1 - 0x7C080400, // 0005 CALL R2 2 - 0x70020003, // 0006 JMP #000B - 0x60080012, // 0007 GETGBL R2 G18 - 0x7C080000, // 0008 CALL R2 0 - 0x400C0401, // 0009 CONNECT R3 R2 R1 - 0x90020002, // 000A SETMBR R0 K0 R2 - 0x80000000, // 000B RET 0 + 0x88080100, // 0000 GETMBR R2 R0 K0 + 0x780A0004, // 0001 JMPF R2 #0007 + 0x88080100, // 0002 GETMBR R2 R0 K0 + 0x8C080501, // 0003 GETMET R2 R2 K1 + 0x5C100200, // 0004 MOVE R4 R1 + 0x7C080400, // 0005 CALL R2 2 + 0x70020003, // 0006 JMP #000B + 0x60080012, // 0007 GETGBL R2 G18 + 0x7C080000, // 0008 CALL R2 0 + 0x400C0401, // 0009 CONNECT R3 R2 R1 + 0x90020002, // 000A SETMBR R0 K0 R2 + 0x80000000, // 000B RET 0 }) ) ); @@ -243,77 +93,12 @@ be_local_closure(add_driver, /* name */ /******************************************************************** -** Solidified function: gen_cb +** Solidified function: gc ********************************************************************/ -be_local_closure(gen_cb, /* name */ +be_local_closure(Tasmota_gc, /* name */ be_nested_proto( - 7, /* nstack */ - 2, /* argc */ - 0, /* varg */ - 0, /* has upvals */ - NULL, /* no upvals */ - 0, /* has sup protos */ - NULL, /* no sub protos */ - 1, /* has constants */ - ( &(const bvalue[ 7]) { /* constants */ - /* K0 */ be_nested_string("_cb", -251666929, 3), - /* K1 */ be_const_int(0), - /* K2 */ be_nested_string("find", -1108310694, 4), - /* K3 */ be_nested_string("_get_cb", 1448849122, 7), - /* K4 */ be_nested_string("stop_iteration", -121173395, 14), - /* K5 */ be_nested_string("internal_error", -1775809127, 14), - /* K6 */ be_nested_string("No callback available", 633786138, 21), - }), - (be_nested_const_str("gen_cb", -1049739745, 6)), - ((bstring*) &be_const_str_input), - ( &(const binstruction[34]) { /* code */ - 0x88080100, // 0000 GETMBR R2 R0 K0 - 0x4C0C0000, // 0001 LDNIL R3 - 0x1C080403, // 0002 EQ R2 R2 R3 - 0x780A0002, // 0003 JMPF R2 #0007 - 0x60080013, // 0004 GETGBL R2 G19 - 0x7C080000, // 0005 CALL R2 0 - 0x90020002, // 0006 SETMBR R0 K0 R2 - 0x60080010, // 0007 GETGBL R2 G16 - 0x540E0012, // 0008 LDINT R3 19 - 0x400E0203, // 0009 CONNECT R3 K1 R3 - 0x7C080200, // 000A CALL R2 1 - 0xA8020010, // 000B EXBLK 0 #001D - 0x5C0C0400, // 000C MOVE R3 R2 - 0x7C0C0000, // 000D CALL R3 0 - 0x88100100, // 000E GETMBR R4 R0 K0 - 0x8C100902, // 000F GETMET R4 R4 K2 - 0x5C180600, // 0010 MOVE R6 R3 - 0x7C100400, // 0011 CALL R4 2 - 0x4C140000, // 0012 LDNIL R5 - 0x1C100805, // 0013 EQ R4 R4 R5 - 0x78120006, // 0014 JMPF R4 #001C - 0x88100100, // 0015 GETMBR R4 R0 K0 - 0x98100601, // 0016 SETIDX R4 R3 R1 - 0x8C100103, // 0017 GETMET R4 R0 K3 - 0x5C180600, // 0018 MOVE R6 R3 - 0x7C100400, // 0019 CALL R4 2 - 0xA8040001, // 001A EXBLK 1 1 - 0x80040800, // 001B RET 1 R4 - 0x7001FFEE, // 001C JMP #000C - 0x58080004, // 001D LDCONST R2 K4 - 0xAC080200, // 001E CATCH R2 1 0 - 0xB0080000, // 001F RAISE 2 R0 R0 - 0xB0060B06, // 0020 RAISE 1 K5 K6 - 0x80000000, // 0021 RET 0 - }) - ) -); -/*******************************************************************/ - - -/******************************************************************** -** Solidified function: set_light -********************************************************************/ -be_local_closure(set_light, /* name */ - be_nested_proto( - 8, /* nstack */ - 3, /* argc */ + 4, /* nstack */ + 1, /* argc */ 0, /* varg */ 0, /* has upvals */ NULL, /* no upvals */ @@ -321,776 +106,19 @@ be_local_closure(set_light, /* name */ NULL, /* no sub protos */ 1, /* has constants */ ( &(const bvalue[ 3]) { /* constants */ - /* K0 */ be_nested_string("tasmota.set_light() is deprecated, use light.set()", 2124937871, 50), - /* K1 */ be_nested_string("light", -493019601, 5), - /* K2 */ be_nested_string("set", -970520829, 3), + /* K0 */ be_nested_str(gc), + /* K1 */ be_nested_str(collect), + /* K2 */ be_nested_str(allocated), }), - (be_nested_const_str("set_light", -1118891144, 9)), - ((bstring*) &be_const_str_input), - ( &(const binstruction[18]) { /* code */ - 0x600C0001, // 0000 GETGBL R3 G1 - 0x58100000, // 0001 LDCONST R4 K0 - 0x7C0C0200, // 0002 CALL R3 1 - 0xA40E0200, // 0003 IMPORT R3 K1 - 0x4C100000, // 0004 LDNIL R4 - 0x20100404, // 0005 NE R4 R2 R4 - 0x78120005, // 0006 JMPF R4 #000D - 0x8C100702, // 0007 GETMET R4 R3 K2 - 0x5C180200, // 0008 MOVE R6 R1 - 0x5C1C0400, // 0009 MOVE R7 R2 - 0x7C100600, // 000A CALL R4 3 - 0x80040800, // 000B RET 1 R4 - 0x70020003, // 000C JMP #0011 - 0x8C100702, // 000D GETMET R4 R3 K2 - 0x5C180200, // 000E MOVE R6 R1 - 0x7C100400, // 000F CALL R4 2 - 0x80040800, // 0010 RET 1 R4 - 0x80000000, // 0011 RET 0 - }) - ) -); -/*******************************************************************/ - - -/******************************************************************** -** Solidified function: remove_rule -********************************************************************/ -be_local_closure(remove_rule, /* name */ - be_nested_proto( - 6, /* nstack */ - 2, /* argc */ - 0, /* varg */ - 0, /* has upvals */ - NULL, /* no upvals */ - 0, /* has sup protos */ - NULL, /* no sub protos */ - 1, /* has constants */ - ( &(const bvalue[ 5]) { /* constants */ - /* K0 */ be_nested_string("_rules", -28750191, 6), - /* K1 */ be_const_int(0), - /* K2 */ be_nested_string("k", -301188886, 1), - /* K3 */ be_nested_string("remove", -611183107, 6), - /* K4 */ be_const_int(1), - }), - (be_nested_const_str("remove_rule", -838755968, 11)), - ((bstring*) &be_const_str_input), - ( &(const binstruction[21]) { /* code */ - 0x88080100, // 0000 GETMBR R2 R0 K0 - 0x780A0011, // 0001 JMPF R2 #0014 - 0x58080001, // 0002 LDCONST R2 K1 - 0x600C000C, // 0003 GETGBL R3 G12 - 0x88100100, // 0004 GETMBR R4 R0 K0 - 0x7C0C0200, // 0005 CALL R3 1 - 0x140C0403, // 0006 LT R3 R2 R3 - 0x780E000B, // 0007 JMPF R3 #0014 - 0x880C0100, // 0008 GETMBR R3 R0 K0 - 0x940C0602, // 0009 GETIDX R3 R3 R2 - 0x880C0702, // 000A GETMBR R3 R3 K2 - 0x1C0C0601, // 000B EQ R3 R3 R1 - 0x780E0004, // 000C JMPF R3 #0012 - 0x880C0100, // 000D GETMBR R3 R0 K0 - 0x8C0C0703, // 000E GETMET R3 R3 K3 - 0x5C140400, // 000F MOVE R5 R2 - 0x7C0C0400, // 0010 CALL R3 2 - 0x70020000, // 0011 JMP #0013 - 0x00080504, // 0012 ADD R2 R2 K4 - 0x7001FFEE, // 0013 JMP #0003 - 0x80000000, // 0014 RET 0 - }) - ) -); -/*******************************************************************/ - - -/******************************************************************** -** Solidified function: add_cmd -********************************************************************/ -be_local_closure(add_cmd, /* name */ - be_nested_proto( - 5, /* nstack */ - 3, /* argc */ - 0, /* varg */ - 0, /* has upvals */ - NULL, /* no upvals */ - 0, /* has sup protos */ - NULL, /* no sub protos */ - 1, /* has constants */ - ( &(const bvalue[ 4]) { /* constants */ - /* K0 */ be_nested_string("_ccmd", -2131545883, 5), - /* K1 */ be_nested_string("function", -1630125495, 8), - /* K2 */ be_nested_string("value_error", 773297791, 11), - /* K3 */ be_nested_string("the second argument is not a function", -340392827, 37), - }), - (be_nested_const_str("add_cmd", -933336417, 7)), - ((bstring*) &be_const_str_input), - ( &(const binstruction[15]) { /* code */ - 0x880C0100, // 0000 GETMBR R3 R0 K0 - 0x740E0002, // 0001 JMPT R3 #0005 - 0x600C0013, // 0002 GETGBL R3 G19 - 0x7C0C0000, // 0003 CALL R3 0 - 0x90020003, // 0004 SETMBR R0 K0 R3 - 0x600C0004, // 0005 GETGBL R3 G4 - 0x5C100400, // 0006 MOVE R4 R2 - 0x7C0C0200, // 0007 CALL R3 1 - 0x1C0C0701, // 0008 EQ R3 R3 K1 - 0x780E0002, // 0009 JMPF R3 #000D - 0x880C0100, // 000A GETMBR R3 R0 K0 - 0x980C0202, // 000B SETIDX R3 R1 R2 - 0x70020000, // 000C JMP #000E - 0xB0060503, // 000D RAISE 1 K2 K3 - 0x80000000, // 000E RET 0 - }) - ) -); -/*******************************************************************/ - - -/******************************************************************** -** Solidified function: wire_scan -********************************************************************/ -be_local_closure(wire_scan, /* name */ - be_nested_proto( - 6, /* nstack */ - 3, /* argc */ - 0, /* varg */ - 0, /* has upvals */ - NULL, /* no upvals */ - 0, /* has sup protos */ - NULL, /* no sub protos */ - 1, /* has constants */ - ( &(const bvalue[ 5]) { /* constants */ - /* K0 */ be_nested_string("i2c_enabled", 218388101, 11), - /* K1 */ be_nested_string("wire1", -1082245877, 5), - /* K2 */ be_nested_string("enabled", 49525662, 7), - /* K3 */ be_nested_string("detect", 8884370, 6), - /* K4 */ be_nested_string("wire2", -1065468258, 5), - }), - (be_nested_const_str("wire_scan", -1623691416, 9)), - ((bstring*) &be_const_str_input), - ( &(const binstruction[33]) { /* code */ - 0x4C0C0000, // 0000 LDNIL R3 - 0x200C0403, // 0001 NE R3 R2 R3 - 0x780E0005, // 0002 JMPF R3 #0009 - 0x8C0C0100, // 0003 GETMET R3 R0 K0 - 0x5C140400, // 0004 MOVE R5 R2 - 0x7C0C0400, // 0005 CALL R3 2 - 0x740E0001, // 0006 JMPT R3 #0009 - 0x4C0C0000, // 0007 LDNIL R3 - 0x80040600, // 0008 RET 1 R3 - 0x880C0101, // 0009 GETMBR R3 R0 K1 - 0x8C0C0702, // 000A GETMET R3 R3 K2 - 0x7C0C0200, // 000B CALL R3 1 - 0x780E0006, // 000C JMPF R3 #0014 - 0x880C0101, // 000D GETMBR R3 R0 K1 - 0x8C0C0703, // 000E GETMET R3 R3 K3 - 0x5C140200, // 000F MOVE R5 R1 - 0x7C0C0400, // 0010 CALL R3 2 - 0x780E0001, // 0011 JMPF R3 #0014 - 0x880C0101, // 0012 GETMBR R3 R0 K1 - 0x80040600, // 0013 RET 1 R3 - 0x880C0104, // 0014 GETMBR R3 R0 K4 - 0x8C0C0702, // 0015 GETMET R3 R3 K2 - 0x7C0C0200, // 0016 CALL R3 1 - 0x780E0006, // 0017 JMPF R3 #001F - 0x880C0104, // 0018 GETMBR R3 R0 K4 - 0x8C0C0703, // 0019 GETMET R3 R3 K3 - 0x5C140200, // 001A MOVE R5 R1 - 0x7C0C0400, // 001B CALL R3 2 - 0x780E0001, // 001C JMPF R3 #001F - 0x880C0104, // 001D GETMBR R3 R0 K4 - 0x80040600, // 001E RET 1 R3 - 0x4C0C0000, // 001F LDNIL R3 - 0x80040600, // 0020 RET 1 R3 - }) - ) -); -/*******************************************************************/ - - -/******************************************************************** -** Solidified function: find_key_i -********************************************************************/ -be_local_closure(find_key_i, /* name */ - be_nested_proto( - 10, /* nstack */ - 3, /* argc */ - 0, /* varg */ - 0, /* has upvals */ - NULL, /* no upvals */ - 0, /* has sup protos */ - NULL, /* no sub protos */ - 1, /* has constants */ - ( &(const bvalue[ 5]) { /* constants */ - /* K0 */ be_nested_string("string", 398550328, 6), - /* K1 */ be_nested_string("toupper", -602983720, 7), - /* K2 */ be_nested_string("keys", -112588595, 4), - /* K3 */ be_nested_string("?", 973910158, 1), - /* K4 */ be_nested_string("stop_iteration", -121173395, 14), - }), - (be_nested_const_str("find_key_i", 850136726, 10)), - ((bstring*) &be_const_str_input), - ( &(const binstruction[30]) { /* code */ - 0xA40E0000, // 0000 IMPORT R3 K0 - 0x8C100701, // 0001 GETMET R4 R3 K1 - 0x5C180400, // 0002 MOVE R6 R2 - 0x7C100400, // 0003 CALL R4 2 - 0x6014000F, // 0004 GETGBL R5 G15 - 0x5C180200, // 0005 MOVE R6 R1 - 0x601C0013, // 0006 GETGBL R7 G19 - 0x7C140400, // 0007 CALL R5 2 - 0x78160013, // 0008 JMPF R5 #001D - 0x60140010, // 0009 GETGBL R5 G16 - 0x8C180302, // 000A GETMET R6 R1 K2 - 0x7C180200, // 000B CALL R6 1 - 0x7C140200, // 000C CALL R5 1 - 0xA802000B, // 000D EXBLK 0 #001A - 0x5C180A00, // 000E MOVE R6 R5 - 0x7C180000, // 000F CALL R6 0 - 0x8C1C0701, // 0010 GETMET R7 R3 K1 - 0x5C240C00, // 0011 MOVE R9 R6 - 0x7C1C0400, // 0012 CALL R7 2 - 0x1C1C0E04, // 0013 EQ R7 R7 R4 - 0x741E0001, // 0014 JMPT R7 #0017 - 0x1C1C0503, // 0015 EQ R7 R2 K3 - 0x781E0001, // 0016 JMPF R7 #0019 - 0xA8040001, // 0017 EXBLK 1 1 - 0x80040C00, // 0018 RET 1 R6 - 0x7001FFF3, // 0019 JMP #000E - 0x58140004, // 001A LDCONST R5 K4 - 0xAC140200, // 001B CATCH R5 1 0 - 0xB0080000, // 001C RAISE 2 R0 R0 - 0x80000000, // 001D RET 0 - }) - ) -); -/*******************************************************************/ - - -/******************************************************************** -** Solidified function: chars_in_string -********************************************************************/ -be_local_closure(chars_in_string, /* name */ - be_nested_proto( - 10, /* nstack */ - 4, /* argc */ - 0, /* varg */ - 0, /* has upvals */ - NULL, /* no upvals */ - 0, /* has sup protos */ - NULL, /* no sub protos */ - 1, /* has constants */ - ( &(const bvalue[ 2]) { /* constants */ - /* K0 */ be_const_int(0), - /* K1 */ be_const_int(1), - }), - (be_nested_const_str("chars_in_string", -1146182164, 15)), - ((bstring*) &be_const_str_input), - ( &(const binstruction[31]) { /* code */ - 0x780E0001, // 0000 JMPF R3 #0003 - 0x50100200, // 0001 LDBOOL R4 1 0 - 0x70020000, // 0002 JMP #0004 - 0x50100000, // 0003 LDBOOL R4 0 0 - 0x58140000, // 0004 LDCONST R5 K0 - 0x6018000C, // 0005 GETGBL R6 G12 - 0x5C1C0200, // 0006 MOVE R7 R1 - 0x7C180200, // 0007 CALL R6 1 - 0x14180A06, // 0008 LT R6 R5 R6 - 0x781A0012, // 0009 JMPF R6 #001D - 0x50180000, // 000A LDBOOL R6 0 0 - 0x581C0000, // 000B LDCONST R7 K0 - 0x6020000C, // 000C GETGBL R8 G12 - 0x5C240400, // 000D MOVE R9 R2 - 0x7C200200, // 000E CALL R8 1 - 0x14200E08, // 000F LT R8 R7 R8 - 0x78220006, // 0010 JMPF R8 #0018 - 0x94200205, // 0011 GETIDX R8 R1 R5 - 0x94240407, // 0012 GETIDX R9 R2 R7 - 0x1C201009, // 0013 EQ R8 R8 R9 - 0x78220000, // 0014 JMPF R8 #0016 - 0x50180200, // 0015 LDBOOL R6 1 0 - 0x001C0F01, // 0016 ADD R7 R7 K1 - 0x7001FFF3, // 0017 JMP #000C - 0x20200806, // 0018 NE R8 R4 R6 - 0x78220000, // 0019 JMPF R8 #001B - 0x80040A00, // 001A RET 1 R5 - 0x00140B01, // 001B ADD R5 R5 K1 - 0x7001FFE7, // 001C JMP #0005 - 0x5419FFFE, // 001D LDINT R6 -1 - 0x80040C00, // 001E RET 1 R6 - }) - ) -); -/*******************************************************************/ - - -/******************************************************************** -** Solidified function: set_timer -********************************************************************/ -be_local_closure(set_timer, /* name */ - be_nested_proto( - 10, /* nstack */ - 4, /* argc */ - 0, /* varg */ - 0, /* has upvals */ - NULL, /* no upvals */ - 0, /* has sup protos */ - NULL, /* no sub protos */ - 1, /* has constants */ - ( &(const bvalue[ 4]) { /* constants */ - /* K0 */ be_nested_string("_timers", -1694866380, 7), - /* K1 */ be_nested_string("push", -2022703139, 4), - /* K2 */ be_nested_string("Timer", -346839614, 5), - /* K3 */ be_nested_string("millis", 1214679063, 6), - }), - (be_nested_const_str("set_timer", 2135414533, 9)), - ((bstring*) &be_const_str_input), - ( &(const binstruction[16]) { /* code */ - 0x88100100, // 0000 GETMBR R4 R0 K0 - 0x74120002, // 0001 JMPT R4 #0005 - 0x60100012, // 0002 GETGBL R4 G18 - 0x7C100000, // 0003 CALL R4 0 - 0x90020004, // 0004 SETMBR R0 K0 R4 - 0x88100100, // 0005 GETMBR R4 R0 K0 - 0x8C100901, // 0006 GETMET R4 R4 K1 - 0xB81A0400, // 0007 GETNGBL R6 K2 - 0x8C1C0103, // 0008 GETMET R7 R0 K3 - 0x5C240200, // 0009 MOVE R9 R1 - 0x7C1C0400, // 000A CALL R7 2 - 0x5C200400, // 000B MOVE R8 R2 - 0x5C240600, // 000C MOVE R9 R3 - 0x7C180600, // 000D CALL R6 3 - 0x7C100400, // 000E CALL R4 2 - 0x80000000, // 000F RET 0 - }) - ) -); -/*******************************************************************/ - - -/******************************************************************** -** Solidified function: add_rule -********************************************************************/ -be_local_closure(add_rule, /* name */ - be_nested_proto( - 9, /* nstack */ - 3, /* argc */ - 0, /* varg */ - 0, /* has upvals */ - NULL, /* no upvals */ - 0, /* has sup protos */ - NULL, /* no sub protos */ - 1, /* has constants */ - ( &(const bvalue[ 6]) { /* constants */ - /* K0 */ be_nested_string("_rules", -28750191, 6), - /* K1 */ be_nested_string("function", -1630125495, 8), - /* K2 */ be_nested_string("push", -2022703139, 4), - /* K3 */ be_nested_string("kv", 1497177492, 2), - /* K4 */ be_nested_string("value_error", 773297791, 11), - /* K5 */ be_nested_string("the second argument is not a function", -340392827, 37), - }), - (be_nested_const_str("add_rule", 596540743, 8)), - ((bstring*) &be_const_str_input), - ( &(const binstruction[20]) { /* code */ - 0x880C0100, // 0000 GETMBR R3 R0 K0 - 0x740E0002, // 0001 JMPT R3 #0005 - 0x600C0012, // 0002 GETGBL R3 G18 - 0x7C0C0000, // 0003 CALL R3 0 - 0x90020003, // 0004 SETMBR R0 K0 R3 - 0x600C0004, // 0005 GETGBL R3 G4 - 0x5C100400, // 0006 MOVE R4 R2 - 0x7C0C0200, // 0007 CALL R3 1 - 0x1C0C0701, // 0008 EQ R3 R3 K1 - 0x780E0007, // 0009 JMPF R3 #0012 - 0x880C0100, // 000A GETMBR R3 R0 K0 - 0x8C0C0702, // 000B GETMET R3 R3 K2 - 0x8C140103, // 000C GETMET R5 R0 K3 - 0x5C1C0200, // 000D MOVE R7 R1 - 0x5C200400, // 000E MOVE R8 R2 - 0x7C140600, // 000F CALL R5 3 - 0x7C0C0400, // 0010 CALL R3 2 - 0x70020000, // 0011 JMP #0013 - 0xB0060905, // 0012 RAISE 1 K4 K5 - 0x80000000, // 0013 RET 0 - }) - ) -); -/*******************************************************************/ - - -/******************************************************************** -** Solidified function: run_deferred -********************************************************************/ -be_local_closure(run_deferred, /* name */ - be_nested_proto( - 6, /* nstack */ - 1, /* argc */ - 0, /* varg */ - 0, /* has upvals */ - NULL, /* no upvals */ - 0, /* has sup protos */ - NULL, /* no sub protos */ - 1, /* has constants */ - ( &(const bvalue[ 8]) { /* constants */ - /* K0 */ be_nested_string("_timers", -1694866380, 7), - /* K1 */ be_const_int(0), - /* K2 */ be_nested_string("size", 597743964, 4), - /* K3 */ be_nested_string("time_reached", 2075136773, 12), - /* K4 */ be_nested_string("due", -399437003, 3), - /* K5 */ be_nested_string("f", -485742695, 1), - /* K6 */ be_nested_string("remove", -611183107, 6), - /* K7 */ be_const_int(1), - }), - (be_nested_const_str("run_deferred", 371594696, 12)), - ((bstring*) &be_const_str_input), - ( &(const binstruction[27]) { /* code */ - 0x88040100, // 0000 GETMBR R1 R0 K0 - 0x78060017, // 0001 JMPF R1 #001A - 0x58040001, // 0002 LDCONST R1 K1 - 0x88080100, // 0003 GETMBR R2 R0 K0 - 0x8C080502, // 0004 GETMET R2 R2 K2 - 0x7C080200, // 0005 CALL R2 1 - 0x14080202, // 0006 LT R2 R1 R2 - 0x780A0011, // 0007 JMPF R2 #001A - 0x8C080103, // 0008 GETMET R2 R0 K3 - 0x88100100, // 0009 GETMBR R4 R0 K0 - 0x94100801, // 000A GETIDX R4 R4 R1 - 0x88100904, // 000B GETMBR R4 R4 K4 - 0x7C080400, // 000C CALL R2 2 - 0x780A0009, // 000D JMPF R2 #0018 - 0x88080100, // 000E GETMBR R2 R0 K0 - 0x94080401, // 000F GETIDX R2 R2 R1 - 0x88080505, // 0010 GETMBR R2 R2 K5 - 0x880C0100, // 0011 GETMBR R3 R0 K0 - 0x8C0C0706, // 0012 GETMET R3 R3 K6 - 0x5C140200, // 0013 MOVE R5 R1 - 0x7C0C0400, // 0014 CALL R3 2 - 0x5C0C0400, // 0015 MOVE R3 R2 - 0x7C0C0000, // 0016 CALL R3 0 - 0x70020000, // 0017 JMP #0019 - 0x00040307, // 0018 ADD R1 R1 K7 - 0x7001FFE8, // 0019 JMP #0003 - 0x80000000, // 001A RET 0 - }) - ) -); -/*******************************************************************/ - - -/******************************************************************** -** Solidified function: cmd -********************************************************************/ -be_local_closure(cmd, /* name */ - be_nested_proto( - 5, /* nstack */ - 2, /* argc */ - 0, /* varg */ - 0, /* has upvals */ - NULL, /* no upvals */ - 0, /* has sup protos */ - NULL, /* no sub protos */ - 1, /* has constants */ - ( &(const bvalue[ 2]) { /* constants */ - /* K0 */ be_nested_string("cmd_res", 921166762, 7), - /* K1 */ be_nested_string("_cmd", -875145154, 4), - }), - (be_nested_const_str("cmd", -158181397, 3)), - (be_nested_const_str("tasmota.be", 1128870755, 10)), - ( &(const binstruction[14]) { /* code */ - 0x50080200, // 0000 LDBOOL R2 1 0 - 0x90020002, // 0001 SETMBR R0 K0 R2 - 0x8C080101, // 0002 GETMET R2 R0 K1 - 0x5C100200, // 0003 MOVE R4 R1 - 0x7C080400, // 0004 CALL R2 2 - 0x4C080000, // 0005 LDNIL R2 - 0x880C0100, // 0006 GETMBR R3 R0 K0 - 0x50100200, // 0007 LDBOOL R4 1 0 - 0x200C0604, // 0008 NE R3 R3 R4 - 0x780E0000, // 0009 JMPF R3 #000B - 0x88080100, // 000A GETMBR R2 R0 K0 - 0x4C0C0000, // 000B LDNIL R3 - 0x90020003, // 000C SETMBR R0 K0 R3 - 0x80040400, // 000D RET 1 R2 - }) - ) -); -/*******************************************************************/ - - -/******************************************************************** -** Solidified function: time_str -********************************************************************/ -be_local_closure(time_str, /* name */ - be_nested_proto( - 13, /* nstack */ - 2, /* argc */ - 0, /* varg */ - 0, /* has upvals */ - NULL, /* no upvals */ - 0, /* has sup protos */ - NULL, /* no sub protos */ - 1, /* has constants */ - ( &(const bvalue[10]) { /* constants */ - /* K0 */ be_nested_string("string", 398550328, 6), - /* K1 */ be_nested_string("time_dump", -964556549, 9), - /* K2 */ be_nested_string("format", -1180859054, 6), - /* K3 */ be_nested_string("%04d-%02d-%02dT%02d:%02d:%02d", -869438695, 29), - /* K4 */ be_nested_string("year", -1367388900, 4), - /* K5 */ be_nested_string("month", -696646139, 5), - /* K6 */ be_nested_string("day", -464576003, 3), - /* K7 */ be_nested_string("hour", -1241306097, 4), - /* K8 */ be_nested_string("min", -913357481, 3), - /* K9 */ be_nested_string("sec", -1155074638, 3), - }), - (be_nested_const_str("time_str", -1681139684, 8)), - ((bstring*) &be_const_str_input), - ( &(const binstruction[14]) { /* code */ - 0xA40A0000, // 0000 IMPORT R2 K0 - 0x8C0C0101, // 0001 GETMET R3 R0 K1 - 0x5C140200, // 0002 MOVE R5 R1 - 0x7C0C0400, // 0003 CALL R3 2 - 0x8C100502, // 0004 GETMET R4 R2 K2 - 0x58180003, // 0005 LDCONST R6 K3 - 0x941C0704, // 0006 GETIDX R7 R3 K4 - 0x94200705, // 0007 GETIDX R8 R3 K5 - 0x94240706, // 0008 GETIDX R9 R3 K6 - 0x94280707, // 0009 GETIDX R10 R3 K7 - 0x942C0708, // 000A GETIDX R11 R3 K8 - 0x94300709, // 000B GETIDX R12 R3 K9 - 0x7C101000, // 000C CALL R4 8 - 0x80040800, // 000D RET 1 R4 - }) - ) -); -/*******************************************************************/ - - -/******************************************************************** -** Solidified function: load -********************************************************************/ -be_local_closure(load, /* name */ - be_nested_proto( - 21, /* nstack */ - 2, /* argc */ - 0, /* varg */ - 0, /* has upvals */ - NULL, /* no upvals */ - 1, /* has sup protos */ - ( &(const struct bproto*[ 2]) { - be_nested_proto( - 6, /* nstack */ - 1, /* argc */ - 0, /* varg */ - 0, /* has upvals */ - NULL, /* no upvals */ - 0, /* has sup protos */ - NULL, /* no sub protos */ - 1, /* has constants */ - ( &(const bvalue[ 4]) { /* constants */ - /* K0 */ be_nested_str_literal("sys"), - /* K1 */ be_nested_str_literal("path"), - /* K2 */ be_nested_str_literal("find"), - /* K3 */ be_nested_str_literal("push"), - }), - (be_nested_const_str("push_path", 1155254157, 9)), - ((bstring*) &be_const_str_input), - ( &(const binstruction[13]) { /* code */ - 0xA4060000, // 0000 IMPORT R1 K0 - 0x8C080301, // 0001 GETMET R2 R1 K1 - 0x7C080200, // 0002 CALL R2 1 - 0x8C0C0502, // 0003 GETMET R3 R2 K2 - 0x5C140000, // 0004 MOVE R5 R0 - 0x7C0C0400, // 0005 CALL R3 2 - 0x4C100000, // 0006 LDNIL R4 - 0x1C0C0604, // 0007 EQ R3 R3 R4 - 0x780E0002, // 0008 JMPF R3 #000C - 0x8C0C0503, // 0009 GETMET R3 R2 K3 - 0x5C140000, // 000A MOVE R5 R0 - 0x7C0C0400, // 000B CALL R3 2 - 0x80000000, // 000C RET 0 - }) - ), - be_nested_proto( - 7, /* nstack */ - 1, /* argc */ - 0, /* varg */ - 0, /* has upvals */ - NULL, /* no upvals */ - 0, /* has sup protos */ - NULL, /* no sub protos */ - 1, /* has constants */ - ( &(const bvalue[ 4]) { /* constants */ - /* K0 */ be_nested_str_literal("sys"), - /* K1 */ be_nested_str_literal("path"), - /* K2 */ be_nested_str_literal("find"), - /* K3 */ be_nested_str_literal("remove"), - }), - (be_nested_const_str("pop_path", -1891723298, 8)), - ((bstring*) &be_const_str_input), - ( &(const binstruction[13]) { /* code */ - 0xA4060000, // 0000 IMPORT R1 K0 - 0x8C080301, // 0001 GETMET R2 R1 K1 - 0x7C080200, // 0002 CALL R2 1 - 0x8C0C0502, // 0003 GETMET R3 R2 K2 - 0x5C140000, // 0004 MOVE R5 R0 - 0x7C0C0400, // 0005 CALL R3 2 - 0x4C100000, // 0006 LDNIL R4 - 0x20100604, // 0007 NE R4 R3 R4 - 0x78120002, // 0008 JMPF R4 #000C - 0x8C100503, // 0009 GETMET R4 R2 K3 - 0x5C180600, // 000A MOVE R6 R3 - 0x7C100400, // 000B CALL R4 2 - 0x80000000, // 000C RET 0 - }) - ), - }), - 1, /* has constants */ - ( &(const bvalue[21]) { /* constants */ - /* K0 */ be_nested_str_literal("string"), - /* K1 */ be_nested_str_literal("path"), - /* K2 */ be_const_int(0), - /* K3 */ be_nested_str_literal("/"), - /* K4 */ be_nested_str_literal("split"), - /* K5 */ be_nested_str_literal("#"), - /* K6 */ be_const_int(1), - /* K7 */ be_nested_str_literal("find"), - /* K8 */ be_nested_str_literal("."), - /* K9 */ be_nested_str_literal(".be"), - /* K10 */ be_nested_str_literal(".bec"), - /* K11 */ be_nested_str_literal("io_error"), - /* K12 */ be_nested_str_literal("file extension is not '.be' or '.bec'"), - /* K13 */ be_nested_str_literal("last_modified"), - /* K14 */ be_nested_str_literal("c"), - /* K15 */ be_nested_str_literal("wd"), - /* K16 */ be_nested_str_literal(""), - /* K17 */ be_nested_str_literal("file"), - /* K18 */ be_nested_str_literal("save"), - /* K19 */ be_nested_str_literal("format"), - /* K20 */ be_nested_str_literal("BRY: could not save compiled file %s (%s)"), - }), - (be_nested_const_str("load", -435725847, 4)), - ((bstring*) &be_const_str_input), - ( &(const binstruction[121]) { /* code */ - 0x84080000, // 0000 CLOSURE R2 P0 - 0x840C0001, // 0001 CLOSURE R3 P1 - 0xA4120000, // 0002 IMPORT R4 K0 - 0xA4160200, // 0003 IMPORT R5 K1 - 0x6018000C, // 0004 GETGBL R6 G12 - 0x5C1C0200, // 0005 MOVE R7 R1 - 0x7C180200, // 0006 CALL R6 1 - 0x1C180D02, // 0007 EQ R6 R6 K2 - 0x781A0001, // 0008 JMPF R6 #000B - 0x50180000, // 0009 LDBOOL R6 0 0 - 0x80040C00, // 000A RET 1 R6 - 0x94180302, // 000B GETIDX R6 R1 K2 - 0x20180D03, // 000C NE R6 R6 K3 - 0x781A0000, // 000D JMPF R6 #000F - 0x00060601, // 000E ADD R1 K3 R1 - 0x8C180904, // 000F GETMET R6 R4 K4 - 0x5C200200, // 0010 MOVE R8 R1 - 0x58240005, // 0011 LDCONST R9 K5 - 0x7C180600, // 0012 CALL R6 3 - 0x941C0D02, // 0013 GETIDX R7 R6 K2 - 0x5421FFFE, // 0014 LDINT R8 -1 - 0x94200C08, // 0015 GETIDX R8 R6 R8 - 0x6024000C, // 0016 GETGBL R9 G12 - 0x5C280C00, // 0017 MOVE R10 R6 - 0x7C240200, // 0018 CALL R9 1 - 0x24241306, // 0019 GT R9 R9 K6 - 0x8C280907, // 001A GETMET R10 R4 K7 - 0x5C301000, // 001B MOVE R12 R8 - 0x58340008, // 001C LDCONST R13 K8 - 0x7C280600, // 001D CALL R10 3 - 0x14281502, // 001E LT R10 R10 K2 - 0x782A0001, // 001F JMPF R10 #0022 - 0x00040309, // 0020 ADD R1 R1 K9 - 0x00201109, // 0021 ADD R8 R8 K9 - 0x5429FFFC, // 0022 LDINT R10 -3 - 0x542DFFFE, // 0023 LDINT R11 -1 - 0x4028140B, // 0024 CONNECT R10 R10 R11 - 0x9428100A, // 0025 GETIDX R10 R8 R10 - 0x1C281509, // 0026 EQ R10 R10 K9 - 0x542DFFFB, // 0027 LDINT R11 -4 - 0x5431FFFE, // 0028 LDINT R12 -1 - 0x402C160C, // 0029 CONNECT R11 R11 R12 - 0x942C100B, // 002A GETIDX R11 R8 R11 - 0x1C2C170A, // 002B EQ R11 R11 K10 - 0x5C301400, // 002C MOVE R12 R10 - 0x74320002, // 002D JMPT R12 #0031 - 0x5C301600, // 002E MOVE R12 R11 - 0x74320000, // 002F JMPT R12 #0031 - 0xB006170C, // 0030 RAISE 1 K11 K12 - 0x8C300B0D, // 0031 GETMET R12 R5 K13 - 0x5C380E00, // 0032 MOVE R14 R7 - 0x7C300400, // 0033 CALL R12 2 - 0x782E0005, // 0034 JMPF R11 #003B - 0x4C340000, // 0035 LDNIL R13 - 0x1C34180D, // 0036 EQ R13 R12 R13 - 0x78360001, // 0037 JMPF R13 #003A - 0x50340000, // 0038 LDBOOL R13 0 0 - 0x80041A00, // 0039 RET 1 R13 - 0x70020013, // 003A JMP #004F - 0x8C340B0D, // 003B GETMET R13 R5 K13 - 0x003C030E, // 003C ADD R15 R1 K14 - 0x7C340400, // 003D CALL R13 2 - 0x4C380000, // 003E LDNIL R14 - 0x1C38180E, // 003F EQ R14 R12 R14 - 0x783A0004, // 0040 JMPF R14 #0046 - 0x4C380000, // 0041 LDNIL R14 - 0x1C381A0E, // 0042 EQ R14 R13 R14 - 0x783A0001, // 0043 JMPF R14 #0046 - 0x50380000, // 0044 LDBOOL R14 0 0 - 0x80041C00, // 0045 RET 1 R14 - 0x4C380000, // 0046 LDNIL R14 - 0x20381A0E, // 0047 NE R14 R13 R14 - 0x783A0005, // 0048 JMPF R14 #004F - 0x4C380000, // 0049 LDNIL R14 - 0x1C38180E, // 004A EQ R14 R12 R14 - 0x743A0001, // 004B JMPT R14 #004E - 0x28381A0C, // 004C GE R14 R13 R12 - 0x783A0000, // 004D JMPF R14 #004F - 0x502C0200, // 004E LDBOOL R11 1 0 - 0x78260005, // 004F JMPF R9 #0056 - 0x00340F05, // 0050 ADD R13 R7 K5 - 0x90021E0D, // 0051 SETMBR R0 K15 R13 - 0x5C340400, // 0052 MOVE R13 R2 - 0x8838010F, // 0053 GETMBR R14 R0 K15 - 0x7C340200, // 0054 CALL R13 1 - 0x70020000, // 0055 JMP #0057 - 0x90021F10, // 0056 SETMBR R0 K15 K16 - 0x6034000D, // 0057 GETGBL R13 G13 - 0x5C380200, // 0058 MOVE R14 R1 - 0x583C0011, // 0059 LDCONST R15 K17 - 0x7C340400, // 005A CALL R13 2 - 0x5C381600, // 005B MOVE R14 R11 - 0x743A0013, // 005C JMPT R14 #0071 - 0x5C381200, // 005D MOVE R14 R9 - 0x743A0011, // 005E JMPT R14 #0071 - 0xA8020005, // 005F EXBLK 0 #0066 - 0x8C380112, // 0060 GETMET R14 R0 K18 - 0x0040030E, // 0061 ADD R16 R1 K14 - 0x5C441A00, // 0062 MOVE R17 R13 - 0x7C380600, // 0063 CALL R14 3 - 0xA8040001, // 0064 EXBLK 1 1 - 0x7002000A, // 0065 JMP #0071 - 0xAC380001, // 0066 CATCH R14 0 1 - 0x70020007, // 0067 JMP #0070 - 0x603C0001, // 0068 GETGBL R15 G1 - 0x8C400913, // 0069 GETMET R16 R4 K19 - 0x58480014, // 006A LDCONST R18 K20 - 0x004C030E, // 006B ADD R19 R1 K14 - 0x5C501C00, // 006C MOVE R20 R14 - 0x7C400800, // 006D CALL R16 4 - 0x7C3C0200, // 006E CALL R15 1 - 0x70020000, // 006F JMP #0071 - 0xB0080000, // 0070 RAISE 2 R0 R0 - 0x5C381A00, // 0071 MOVE R14 R13 - 0x7C380000, // 0072 CALL R14 0 - 0x78260002, // 0073 JMPF R9 #0077 - 0x5C380600, // 0074 MOVE R14 R3 - 0x003C0F05, // 0075 ADD R15 R7 K5 - 0x7C380200, // 0076 CALL R14 1 - 0x50380200, // 0077 LDBOOL R14 1 0 - 0x80041C00, // 0078 RET 1 R14 + &be_const_str_gc, + &be_const_str_solidified, + ( &(const binstruction[ 6]) { /* code */ + 0xA4060000, // 0000 IMPORT R1 K0 + 0x8C080301, // 0001 GETMET R2 R1 K1 + 0x7C080200, // 0002 CALL R2 1 + 0x8C080302, // 0003 GETMET R2 R1 K2 + 0x7C080200, // 0004 CALL R2 1 + 0x80040400, // 0005 RET 1 R2 }) ) ); @@ -1100,7 +128,7 @@ be_local_closure(load, /* name */ /******************************************************************** ** Solidified function: find_op ********************************************************************/ -be_local_closure(find_op, /* name */ +be_local_closure(Tasmota_find_op, /* name */ be_nested_proto( 13, /* nstack */ 2, /* argc */ @@ -1111,357 +139,58 @@ be_local_closure(find_op, /* name */ NULL, /* no sub protos */ 1, /* has constants */ ( &(const bvalue[ 6]) { /* constants */ - /* K0 */ be_nested_string("string", 398550328, 6), - /* K1 */ be_nested_string("=<>!", -1630497019, 4), - /* K2 */ be_nested_string("chars_in_string", -1146182164, 15), + /* K0 */ be_nested_str(string), + /* K1 */ be_nested_str(_X3D_X3C_X3E_X21), + /* K2 */ be_nested_str(chars_in_string), /* K3 */ be_const_int(0), - /* K4 */ be_nested_string("split", -2017972765, 5), + /* K4 */ be_nested_str(split), /* K5 */ be_const_int(1), }), - (be_nested_const_str("find_op", -528253920, 7)), - ((bstring*) &be_const_str_input), + &be_const_str_find_op, + &be_const_str_solidified, ( &(const binstruction[42]) { /* code */ - 0xA40A0000, // 0000 IMPORT R2 K0 - 0x580C0001, // 0001 LDCONST R3 K1 - 0x8C100102, // 0002 GETMET R4 R0 K2 - 0x5C180200, // 0003 MOVE R6 R1 - 0x5C1C0600, // 0004 MOVE R7 R3 - 0x7C100600, // 0005 CALL R4 3 - 0x28140903, // 0006 GE R5 R4 K3 - 0x78160019, // 0007 JMPF R5 #0022 - 0x8C140504, // 0008 GETMET R5 R2 K4 - 0x5C1C0200, // 0009 MOVE R7 R1 - 0x5C200800, // 000A MOVE R8 R4 - 0x7C140600, // 000B CALL R5 3 - 0x94180B03, // 000C GETIDX R6 R5 K3 - 0x941C0B05, // 000D GETIDX R7 R5 K5 - 0x8C200102, // 000E GETMET R8 R0 K2 - 0x5C280E00, // 000F MOVE R10 R7 - 0x5C2C0600, // 0010 MOVE R11 R3 - 0x50300200, // 0011 LDBOOL R12 1 0 - 0x7C200800, // 0012 CALL R8 4 - 0x5C101000, // 0013 MOVE R4 R8 - 0x28200903, // 0014 GE R8 R4 K3 - 0x7822000B, // 0015 JMPF R8 #0022 - 0x8C200504, // 0016 GETMET R8 R2 K4 - 0x5C280E00, // 0017 MOVE R10 R7 - 0x5C2C0800, // 0018 MOVE R11 R4 - 0x7C200600, // 0019 CALL R8 3 - 0x94241103, // 001A GETIDX R9 R8 K3 - 0x94281105, // 001B GETIDX R10 R8 K5 - 0x602C0012, // 001C GETGBL R11 G18 - 0x7C2C0000, // 001D CALL R11 0 - 0x40301606, // 001E CONNECT R12 R11 R6 - 0x40301609, // 001F CONNECT R12 R11 R9 - 0x4030160A, // 0020 CONNECT R12 R11 R10 - 0x80041600, // 0021 RET 1 R11 - 0x60140012, // 0022 GETGBL R5 G18 - 0x7C140000, // 0023 CALL R5 0 - 0x40180A01, // 0024 CONNECT R6 R5 R1 - 0x4C180000, // 0025 LDNIL R6 - 0x40180A06, // 0026 CONNECT R6 R5 R6 - 0x4C180000, // 0027 LDNIL R6 - 0x40180A06, // 0028 CONNECT R6 R5 R6 - 0x80040A00, // 0029 RET 1 R5 - }) - ) -); -/*******************************************************************/ - - -/******************************************************************** -** Solidified function: remove_timer -********************************************************************/ -be_local_closure(remove_timer, /* name */ - be_nested_proto( - 6, /* nstack */ - 2, /* argc */ - 0, /* varg */ - 0, /* has upvals */ - NULL, /* no upvals */ - 0, /* has sup protos */ - NULL, /* no sub protos */ - 1, /* has constants */ - ( &(const bvalue[ 7]) { /* constants */ - /* K0 */ be_nested_string("tasmota", 424643812, 7), - /* K1 */ be_nested_string("_timers", -1694866380, 7), - /* K2 */ be_const_int(0), - /* K3 */ be_nested_string("size", 597743964, 4), - /* K4 */ be_nested_string("id", 926444256, 2), - /* K5 */ be_nested_string("remove", -611183107, 6), - /* K6 */ be_const_int(1), - }), - (be_nested_const_str("remove_timer", -153495081, 12)), - ((bstring*) &be_const_str_input), - ( &(const binstruction[23]) { /* code */ - 0xB80A0000, // 0000 GETNGBL R2 K0 - 0x88080501, // 0001 GETMBR R2 R2 K1 - 0x780A0012, // 0002 JMPF R2 #0016 - 0x58080002, // 0003 LDCONST R2 K2 - 0xB80E0000, // 0004 GETNGBL R3 K0 - 0x880C0701, // 0005 GETMBR R3 R3 K1 - 0x8C0C0703, // 0006 GETMET R3 R3 K3 - 0x7C0C0200, // 0007 CALL R3 1 - 0x140C0403, // 0008 LT R3 R2 R3 - 0x780E000B, // 0009 JMPF R3 #0016 - 0x880C0101, // 000A GETMBR R3 R0 K1 - 0x940C0602, // 000B GETIDX R3 R3 R2 - 0x880C0704, // 000C GETMBR R3 R3 K4 - 0x1C0C0601, // 000D EQ R3 R3 R1 - 0x780E0004, // 000E JMPF R3 #0014 - 0x880C0101, // 000F GETMBR R3 R0 K1 - 0x8C0C0705, // 0010 GETMET R3 R3 K5 - 0x5C140400, // 0011 MOVE R5 R2 - 0x7C0C0400, // 0012 CALL R3 2 - 0x70020000, // 0013 JMP #0015 - 0x00080506, // 0014 ADD R2 R2 K6 - 0x7001FFED, // 0015 JMP #0004 - 0x80000000, // 0016 RET 0 - }) - ) -); -/*******************************************************************/ - - -/******************************************************************** -** Solidified function: get_light -********************************************************************/ -be_local_closure(get_light, /* name */ - be_nested_proto( - 6, /* nstack */ - 2, /* argc */ - 0, /* varg */ - 0, /* has upvals */ - NULL, /* no upvals */ - 0, /* has sup protos */ - NULL, /* no sub protos */ - 1, /* has constants */ - ( &(const bvalue[ 3]) { /* constants */ - /* K0 */ be_nested_string("tasmota.get_light() is deprecated, use light.get()", -769213649, 50), - /* K1 */ be_nested_string("light", -493019601, 5), - /* K2 */ be_nested_string("get", 1410115415, 3), - }), - (be_nested_const_str("get_light", 381930476, 9)), - ((bstring*) &be_const_str_input), - ( &(const binstruction[16]) { /* code */ - 0x60080001, // 0000 GETGBL R2 G1 - 0x580C0000, // 0001 LDCONST R3 K0 - 0x7C080200, // 0002 CALL R2 1 - 0xA40A0200, // 0003 IMPORT R2 K1 - 0x4C0C0000, // 0004 LDNIL R3 - 0x200C0203, // 0005 NE R3 R1 R3 - 0x780E0004, // 0006 JMPF R3 #000C - 0x8C0C0502, // 0007 GETMET R3 R2 K2 - 0x5C140200, // 0008 MOVE R5 R1 - 0x7C0C0400, // 0009 CALL R3 2 - 0x80040600, // 000A RET 1 R3 - 0x70020002, // 000B JMP #000F - 0x8C0C0502, // 000C GETMET R3 R2 K2 - 0x7C0C0200, // 000D CALL R3 1 - 0x80040600, // 000E RET 1 R3 - 0x80000000, // 000F RET 0 - }) - ) -); -/*******************************************************************/ - - -/******************************************************************** -** Solidified function: exec_rules -********************************************************************/ -be_local_closure(exec_rules, /* name */ - be_nested_proto( - 12, /* nstack */ - 2, /* argc */ - 0, /* varg */ - 0, /* has upvals */ - NULL, /* no upvals */ - 0, /* has sup protos */ - NULL, /* no sub protos */ - 1, /* has constants */ - ( &(const bvalue[12]) { /* constants */ - /* K0 */ be_nested_string("_rules", -28750191, 6), - /* K1 */ be_nested_string("cmd_res", 921166762, 7), - /* K2 */ be_nested_string("json", 916562499, 4), - /* K3 */ be_nested_string("load", -435725847, 4), - /* K4 */ be_nested_string("log", 1062293841, 3), - /* K5 */ be_nested_string("BRY: ERROR, bad json: ", -1579831487, 22), - /* K6 */ be_const_int(3), - /* K7 */ be_const_int(0), - /* K8 */ be_nested_string("try_rule", 1986449405, 8), - /* K9 */ be_nested_string("k", -301188886, 1), - /* K10 */ be_nested_string("v", -217300791, 1), - /* K11 */ be_const_int(1), - }), - (be_nested_const_str("exec_rules", 1445221092, 10)), - ((bstring*) &be_const_str_input), - ( &(const binstruction[48]) { /* code */ - 0x88080100, // 0000 GETMBR R2 R0 K0 - 0x740A0003, // 0001 JMPT R2 #0006 - 0x88080101, // 0002 GETMBR R2 R0 K1 - 0x4C0C0000, // 0003 LDNIL R3 - 0x20080403, // 0004 NE R2 R2 R3 - 0x780A0027, // 0005 JMPF R2 #002E - 0xA40A0400, // 0006 IMPORT R2 K2 - 0x8C0C0503, // 0007 GETMET R3 R2 K3 - 0x5C140200, // 0008 MOVE R5 R1 - 0x7C0C0400, // 0009 CALL R3 2 - 0x50100000, // 000A LDBOOL R4 0 0 - 0x4C140000, // 000B LDNIL R5 - 0x1C140605, // 000C EQ R5 R3 R5 - 0x78160004, // 000D JMPF R5 #0013 - 0x8C140104, // 000E GETMET R5 R0 K4 - 0x001E0A01, // 000F ADD R7 K5 R1 - 0x58200006, // 0010 LDCONST R8 K6 - 0x7C140600, // 0011 CALL R5 3 - 0x5C0C0200, // 0012 MOVE R3 R1 - 0x88140101, // 0013 GETMBR R5 R0 K1 - 0x4C180000, // 0014 LDNIL R6 - 0x20140A06, // 0015 NE R5 R5 R6 - 0x78160000, // 0016 JMPF R5 #0018 - 0x90020203, // 0017 SETMBR R0 K1 R3 - 0x88140100, // 0018 GETMBR R5 R0 K0 - 0x78160012, // 0019 JMPF R5 #002D - 0x58140007, // 001A LDCONST R5 K7 - 0x6018000C, // 001B GETGBL R6 G12 - 0x881C0100, // 001C GETMBR R7 R0 K0 - 0x7C180200, // 001D CALL R6 1 - 0x14180A06, // 001E LT R6 R5 R6 - 0x781A000C, // 001F JMPF R6 #002D - 0x88180100, // 0020 GETMBR R6 R0 K0 - 0x94180C05, // 0021 GETIDX R6 R6 R5 - 0x8C1C0108, // 0022 GETMET R7 R0 K8 - 0x5C240600, // 0023 MOVE R9 R3 - 0x88280D09, // 0024 GETMBR R10 R6 K9 - 0x882C0D0A, // 0025 GETMBR R11 R6 K10 - 0x7C1C0800, // 0026 CALL R7 4 - 0x741E0001, // 0027 JMPT R7 #002A - 0x74120000, // 0028 JMPT R4 #002A - 0x50100001, // 0029 LDBOOL R4 0 1 - 0x50100200, // 002A LDBOOL R4 1 0 - 0x00140B0B, // 002B ADD R5 R5 K11 - 0x7001FFED, // 002C JMP #001B - 0x80040800, // 002D RET 1 R4 - 0x50080000, // 002E LDBOOL R2 0 0 - 0x80040400, // 002F RET 1 R2 - }) - ) -); -/*******************************************************************/ - - -/******************************************************************** -** Solidified function: exec_tele -********************************************************************/ -be_local_closure(exec_tele, /* name */ - be_nested_proto( - 12, /* nstack */ - 2, /* argc */ - 0, /* varg */ - 0, /* has upvals */ - NULL, /* no upvals */ - 0, /* has sup protos */ - NULL, /* no sub protos */ - 1, /* has constants */ - ( &(const bvalue[12]) { /* constants */ - /* K0 */ be_nested_string("_rules", -28750191, 6), - /* K1 */ be_nested_string("json", 916562499, 4), - /* K2 */ be_nested_string("load", -435725847, 4), - /* K3 */ be_nested_string("log", 1062293841, 3), - /* K4 */ be_nested_string("BRY: ERROR, bad json: ", -1579831487, 22), - /* K5 */ be_const_int(3), - /* K6 */ be_nested_string("Tele", 1329980653, 4), - /* K7 */ be_const_int(0), - /* K8 */ be_nested_string("try_rule", 1986449405, 8), - /* K9 */ be_nested_string("k", -301188886, 1), - /* K10 */ be_nested_string("v", -217300791, 1), - /* K11 */ be_const_int(1), - }), - (be_nested_const_str("exec_tele", 1020751601, 9)), - ((bstring*) &be_const_str_input), - ( &(const binstruction[41]) { /* code */ - 0x88080100, // 0000 GETMBR R2 R0 K0 - 0x780A0024, // 0001 JMPF R2 #0027 - 0xA40A0200, // 0002 IMPORT R2 K1 - 0x8C0C0502, // 0003 GETMET R3 R2 K2 - 0x5C140200, // 0004 MOVE R5 R1 - 0x7C0C0400, // 0005 CALL R3 2 - 0x50100000, // 0006 LDBOOL R4 0 0 - 0x4C140000, // 0007 LDNIL R5 - 0x1C140605, // 0008 EQ R5 R3 R5 - 0x78160004, // 0009 JMPF R5 #000F - 0x8C140103, // 000A GETMET R5 R0 K3 - 0x001E0801, // 000B ADD R7 K4 R1 - 0x58200005, // 000C LDCONST R8 K5 - 0x7C140600, // 000D CALL R5 3 - 0x5C0C0200, // 000E MOVE R3 R1 - 0x60140013, // 000F GETGBL R5 G19 - 0x7C140000, // 0010 CALL R5 0 - 0x98160C03, // 0011 SETIDX R5 K6 R3 - 0x5C0C0A00, // 0012 MOVE R3 R5 - 0x58140007, // 0013 LDCONST R5 K7 - 0x6018000C, // 0014 GETGBL R6 G12 - 0x881C0100, // 0015 GETMBR R7 R0 K0 - 0x7C180200, // 0016 CALL R6 1 - 0x14180A06, // 0017 LT R6 R5 R6 - 0x781A000C, // 0018 JMPF R6 #0026 - 0x88180100, // 0019 GETMBR R6 R0 K0 - 0x94180C05, // 001A GETIDX R6 R6 R5 - 0x8C1C0108, // 001B GETMET R7 R0 K8 - 0x5C240600, // 001C MOVE R9 R3 - 0x88280D09, // 001D GETMBR R10 R6 K9 - 0x882C0D0A, // 001E GETMBR R11 R6 K10 - 0x7C1C0800, // 001F CALL R7 4 - 0x741E0001, // 0020 JMPT R7 #0023 - 0x74120000, // 0021 JMPT R4 #0023 - 0x50100001, // 0022 LDBOOL R4 0 1 - 0x50100200, // 0023 LDBOOL R4 1 0 - 0x00140B0B, // 0024 ADD R5 R5 K11 - 0x7001FFED, // 0025 JMP #0014 - 0x80040800, // 0026 RET 1 R4 - 0x50080000, // 0027 LDBOOL R2 0 0 - 0x80040400, // 0028 RET 1 R2 - }) - ) -); -/*******************************************************************/ - - -/******************************************************************** -** Solidified function: remove_driver -********************************************************************/ -be_local_closure(remove_driver, /* name */ - be_nested_proto( - 6, /* nstack */ - 2, /* argc */ - 0, /* varg */ - 0, /* has upvals */ - NULL, /* no upvals */ - 0, /* has sup protos */ - NULL, /* no sub protos */ - 1, /* has constants */ - ( &(const bvalue[ 3]) { /* constants */ - /* K0 */ be_nested_string("_drivers", -1034638311, 8), - /* K1 */ be_nested_string("find", -1108310694, 4), - /* K2 */ be_nested_string("pop", 1362321360, 3), - }), - (be_nested_const_str("remove_driver", 1030243768, 13)), - ((bstring*) &be_const_str_input), - ( &(const binstruction[14]) { /* code */ - 0x88080100, // 0000 GETMBR R2 R0 K0 - 0x780A000A, // 0001 JMPF R2 #000D - 0x88080100, // 0002 GETMBR R2 R0 K0 - 0x8C080501, // 0003 GETMET R2 R2 K1 - 0x5C100200, // 0004 MOVE R4 R1 - 0x7C080400, // 0005 CALL R2 2 - 0x4C0C0000, // 0006 LDNIL R3 - 0x200C0403, // 0007 NE R3 R2 R3 - 0x780E0003, // 0008 JMPF R3 #000D - 0x880C0100, // 0009 GETMBR R3 R0 K0 - 0x8C0C0702, // 000A GETMET R3 R3 K2 - 0x5C140400, // 000B MOVE R5 R2 - 0x7C0C0400, // 000C CALL R3 2 - 0x80000000, // 000D RET 0 + 0xA40A0000, // 0000 IMPORT R2 K0 + 0x580C0001, // 0001 LDCONST R3 K1 + 0x8C100102, // 0002 GETMET R4 R0 K2 + 0x5C180200, // 0003 MOVE R6 R1 + 0x5C1C0600, // 0004 MOVE R7 R3 + 0x7C100600, // 0005 CALL R4 3 + 0x28140903, // 0006 GE R5 R4 K3 + 0x78160019, // 0007 JMPF R5 #0022 + 0x8C140504, // 0008 GETMET R5 R2 K4 + 0x5C1C0200, // 0009 MOVE R7 R1 + 0x5C200800, // 000A MOVE R8 R4 + 0x7C140600, // 000B CALL R5 3 + 0x94180B03, // 000C GETIDX R6 R5 K3 + 0x941C0B05, // 000D GETIDX R7 R5 K5 + 0x8C200102, // 000E GETMET R8 R0 K2 + 0x5C280E00, // 000F MOVE R10 R7 + 0x5C2C0600, // 0010 MOVE R11 R3 + 0x50300200, // 0011 LDBOOL R12 1 0 + 0x7C200800, // 0012 CALL R8 4 + 0x5C101000, // 0013 MOVE R4 R8 + 0x28200903, // 0014 GE R8 R4 K3 + 0x7822000B, // 0015 JMPF R8 #0022 + 0x8C200504, // 0016 GETMET R8 R2 K4 + 0x5C280E00, // 0017 MOVE R10 R7 + 0x5C2C0800, // 0018 MOVE R11 R4 + 0x7C200600, // 0019 CALL R8 3 + 0x94241103, // 001A GETIDX R9 R8 K3 + 0x94281105, // 001B GETIDX R10 R8 K5 + 0x602C0012, // 001C GETGBL R11 G18 + 0x7C2C0000, // 001D CALL R11 0 + 0x40301606, // 001E CONNECT R12 R11 R6 + 0x40301609, // 001F CONNECT R12 R11 R9 + 0x4030160A, // 0020 CONNECT R12 R11 R10 + 0x80041600, // 0021 RET 1 R11 + 0x60140012, // 0022 GETGBL R5 G18 + 0x7C140000, // 0023 CALL R5 0 + 0x40180A01, // 0024 CONNECT R6 R5 R1 + 0x4C180000, // 0025 LDNIL R6 + 0x40180A06, // 0026 CONNECT R6 R5 R6 + 0x4C180000, // 0027 LDNIL R6 + 0x40180A06, // 0028 CONNECT R6 R5 R6 + 0x80040A00, // 0029 RET 1 R5 }) ) ); @@ -1471,7 +200,7 @@ be_local_closure(remove_driver, /* name */ /******************************************************************** ** Solidified function: try_rule ********************************************************************/ -be_local_closure(try_rule, /* name */ +be_local_closure(Tasmota_try_rule, /* name */ be_nested_proto( 15, /* nstack */ 4, /* argc */ @@ -1482,25 +211,25 @@ be_local_closure(try_rule, /* name */ NULL, /* no sub protos */ 1, /* has constants */ ( &(const bvalue[16]) { /* constants */ - /* K0 */ be_nested_string("string", 398550328, 6), - /* K1 */ be_nested_string("find_op", -528253920, 7), - /* K2 */ be_nested_string("split", -2017972765, 5), + /* K0 */ be_nested_str(string), + /* K1 */ be_nested_str(find_op), + /* K2 */ be_nested_str(split), /* K3 */ be_const_int(0), - /* K4 */ be_nested_string("#", 638357778, 1), - /* K5 */ be_nested_string("find_key_i", 850136726, 10), + /* K4 */ be_nested_str(_X23), + /* K5 */ be_nested_str(find_key_i), /* K6 */ be_const_int(1), /* K7 */ be_const_int(2), - /* K8 */ be_nested_string("==", -1863000881, 2), - /* K9 */ be_nested_string("!==", 559817114, 3), - /* K10 */ be_nested_string("=", 940354920, 1), - /* K11 */ be_nested_string("!=", -1866252285, 2), - /* K12 */ be_nested_string(">", 990687777, 1), - /* K13 */ be_nested_string(">=", 284975636, 2), - /* K14 */ be_nested_string("<", 957132539, 1), - /* K15 */ be_nested_string("<=", -1795743310, 2), + /* K8 */ be_nested_str(_X3D_X3D), + /* K9 */ be_nested_str(_X21_X3D_X3D), + /* K10 */ be_nested_str(_X3D), + /* K11 */ be_nested_str(_X21_X3D), + /* K12 */ be_nested_str(_X3E), + /* K13 */ be_nested_str(_X3E_X3D), + /* K14 */ be_nested_str(_X3C), + /* K15 */ be_nested_str(_X3C_X3D), }), - (be_nested_const_str("try_rule", 1986449405, 8)), - ((bstring*) &be_const_str_input), + &be_const_str_try_rule, + &be_const_str_solidified, ( &(const binstruction[141]) { /* code */ 0xA4120000, // 0000 IMPORT R4 K0 0x8C140101, // 0001 GETMET R5 R0 K1 @@ -1650,46 +379,30 @@ be_local_closure(try_rule, /* name */ /******************************************************************** -** Solidified function: cb_dispatch +** Solidified function: gen_cb ********************************************************************/ -be_local_closure(cb_dispatch, /* name */ +be_local_closure(Tasmota_gen_cb, /* name */ be_nested_proto( - 12, /* nstack */ - 6, /* argc */ + 6, /* nstack */ + 2, /* argc */ 0, /* varg */ 0, /* has upvals */ NULL, /* no upvals */ 0, /* has sup protos */ NULL, /* no sub protos */ 1, /* has constants */ - ( &(const bvalue[ 3]) { /* constants */ - /* K0 */ be_nested_string("_cb", -251666929, 3), - /* K1 */ be_const_int(0), - /* K2 */ be_nested_string("find", -1108310694, 4), + ( &(const bvalue[ 2]) { /* constants */ + /* K0 */ be_nested_str(cb), + /* K1 */ be_nested_str(gen_cb), }), - (be_nested_const_str("cb_dispatch", 1741510499, 11)), - ((bstring*) &be_const_str_input), - ( &(const binstruction[20]) { /* code */ - 0x88180100, // 0000 GETMBR R6 R0 K0 - 0x4C1C0000, // 0001 LDNIL R7 - 0x1C180C07, // 0002 EQ R6 R6 R7 - 0x781A0000, // 0003 JMPF R6 #0005 - 0x80060200, // 0004 RET 1 K1 - 0x88180100, // 0005 GETMBR R6 R0 K0 - 0x8C180D02, // 0006 GETMET R6 R6 K2 - 0x5C200200, // 0007 MOVE R8 R1 - 0x7C180400, // 0008 CALL R6 2 - 0x4C1C0000, // 0009 LDNIL R7 - 0x201C0C07, // 000A NE R7 R6 R7 - 0x781E0006, // 000B JMPF R7 #0013 - 0x5C1C0C00, // 000C MOVE R7 R6 - 0x5C200400, // 000D MOVE R8 R2 - 0x5C240600, // 000E MOVE R9 R3 - 0x5C280800, // 000F MOVE R10 R4 - 0x5C2C0A00, // 0010 MOVE R11 R5 - 0x7C1C0800, // 0011 CALL R7 4 - 0x80040E00, // 0012 RET 1 R7 - 0x80060200, // 0013 RET 1 K1 + &be_const_str_gen_cb, + &be_const_str_solidified, + ( &(const binstruction[ 5]) { /* code */ + 0xA40A0000, // 0000 IMPORT R2 K0 + 0x8C0C0501, // 0001 GETMET R3 R2 K1 + 0x5C140200, // 0002 MOVE R5 R1 + 0x7C0C0400, // 0003 CALL R3 2 + 0x80040600, // 0004 RET 1 R3 }) ) ); @@ -1697,12 +410,12 @@ be_local_closure(cb_dispatch, /* name */ /******************************************************************** -** Solidified function: gc +** Solidified function: set_light ********************************************************************/ -be_local_closure(gc, /* name */ +be_local_closure(Tasmota_set_light, /* name */ be_nested_proto( - 4, /* nstack */ - 1, /* argc */ + 8, /* nstack */ + 3, /* argc */ 0, /* varg */ 0, /* has upvals */ NULL, /* no upvals */ @@ -1710,19 +423,208 @@ be_local_closure(gc, /* name */ NULL, /* no sub protos */ 1, /* has constants */ ( &(const bvalue[ 3]) { /* constants */ - /* K0 */ be_nested_string("gc", 1042313471, 2), - /* K1 */ be_nested_string("collect", -1895928271, 7), - /* K2 */ be_nested_string("allocated", 429986098, 9), + /* K0 */ be_nested_str(tasmota_X2Eset_light_X28_X29_X20is_X20deprecated_X2C_X20use_X20light_X2Eset_X28_X29), + /* K1 */ be_nested_str(light), + /* K2 */ be_nested_str(set), }), - (be_nested_const_str("gc", 1042313471, 2)), - ((bstring*) &be_const_str_input), - ( &(const binstruction[ 6]) { /* code */ - 0xA4060000, // 0000 IMPORT R1 K0 - 0x8C080301, // 0001 GETMET R2 R1 K1 - 0x7C080200, // 0002 CALL R2 1 - 0x8C080302, // 0003 GETMET R2 R1 K2 - 0x7C080200, // 0004 CALL R2 1 - 0x80040400, // 0005 RET 1 R2 + &be_const_str_set_light, + &be_const_str_solidified, + ( &(const binstruction[18]) { /* code */ + 0x600C0001, // 0000 GETGBL R3 G1 + 0x58100000, // 0001 LDCONST R4 K0 + 0x7C0C0200, // 0002 CALL R3 1 + 0xA40E0200, // 0003 IMPORT R3 K1 + 0x4C100000, // 0004 LDNIL R4 + 0x20100404, // 0005 NE R4 R2 R4 + 0x78120005, // 0006 JMPF R4 #000D + 0x8C100702, // 0007 GETMET R4 R3 K2 + 0x5C180200, // 0008 MOVE R6 R1 + 0x5C1C0400, // 0009 MOVE R7 R2 + 0x7C100600, // 000A CALL R4 3 + 0x80040800, // 000B RET 1 R4 + 0x70020003, // 000C JMP #0011 + 0x8C100702, // 000D GETMET R4 R3 K2 + 0x5C180200, // 000E MOVE R6 R1 + 0x7C100400, // 000F CALL R4 2 + 0x80040800, // 0010 RET 1 R4 + 0x80000000, // 0011 RET 0 + }) + ) +); +/*******************************************************************/ + + +/******************************************************************** +** Solidified function: exec_tele +********************************************************************/ +be_local_closure(Tasmota_exec_tele, /* name */ + be_nested_proto( + 12, /* nstack */ + 2, /* argc */ + 0, /* varg */ + 0, /* has upvals */ + NULL, /* no upvals */ + 0, /* has sup protos */ + NULL, /* no sub protos */ + 1, /* has constants */ + ( &(const bvalue[12]) { /* constants */ + /* K0 */ be_nested_str(_rules), + /* K1 */ be_nested_str(json), + /* K2 */ be_nested_str(load), + /* K3 */ be_nested_str(log), + /* K4 */ be_nested_str(BRY_X3A_X20ERROR_X2C_X20bad_X20json_X3A_X20), + /* K5 */ be_const_int(3), + /* K6 */ be_nested_str(Tele), + /* K7 */ be_const_int(0), + /* K8 */ be_nested_str(try_rule), + /* K9 */ be_nested_str(k), + /* K10 */ be_nested_str(v), + /* K11 */ be_const_int(1), + }), + &be_const_str_exec_tele, + &be_const_str_solidified, + ( &(const binstruction[41]) { /* code */ + 0x88080100, // 0000 GETMBR R2 R0 K0 + 0x780A0024, // 0001 JMPF R2 #0027 + 0xA40A0200, // 0002 IMPORT R2 K1 + 0x8C0C0502, // 0003 GETMET R3 R2 K2 + 0x5C140200, // 0004 MOVE R5 R1 + 0x7C0C0400, // 0005 CALL R3 2 + 0x50100000, // 0006 LDBOOL R4 0 0 + 0x4C140000, // 0007 LDNIL R5 + 0x1C140605, // 0008 EQ R5 R3 R5 + 0x78160004, // 0009 JMPF R5 #000F + 0x8C140103, // 000A GETMET R5 R0 K3 + 0x001E0801, // 000B ADD R7 K4 R1 + 0x58200005, // 000C LDCONST R8 K5 + 0x7C140600, // 000D CALL R5 3 + 0x5C0C0200, // 000E MOVE R3 R1 + 0x60140013, // 000F GETGBL R5 G19 + 0x7C140000, // 0010 CALL R5 0 + 0x98160C03, // 0011 SETIDX R5 K6 R3 + 0x5C0C0A00, // 0012 MOVE R3 R5 + 0x58140007, // 0013 LDCONST R5 K7 + 0x6018000C, // 0014 GETGBL R6 G12 + 0x881C0100, // 0015 GETMBR R7 R0 K0 + 0x7C180200, // 0016 CALL R6 1 + 0x14180A06, // 0017 LT R6 R5 R6 + 0x781A000C, // 0018 JMPF R6 #0026 + 0x88180100, // 0019 GETMBR R6 R0 K0 + 0x94180C05, // 001A GETIDX R6 R6 R5 + 0x8C1C0108, // 001B GETMET R7 R0 K8 + 0x5C240600, // 001C MOVE R9 R3 + 0x88280D09, // 001D GETMBR R10 R6 K9 + 0x882C0D0A, // 001E GETMBR R11 R6 K10 + 0x7C1C0800, // 001F CALL R7 4 + 0x741E0001, // 0020 JMPT R7 #0023 + 0x74120000, // 0021 JMPT R4 #0023 + 0x50100001, // 0022 LDBOOL R4 0 1 + 0x50100200, // 0023 LDBOOL R4 1 0 + 0x00140B0B, // 0024 ADD R5 R5 K11 + 0x7001FFED, // 0025 JMP #0014 + 0x80040800, // 0026 RET 1 R4 + 0x50080000, // 0027 LDBOOL R2 0 0 + 0x80040400, // 0028 RET 1 R2 + }) + ) +); +/*******************************************************************/ + + +/******************************************************************** +** Solidified function: run_deferred +********************************************************************/ +be_local_closure(Tasmota_run_deferred, /* name */ + be_nested_proto( + 6, /* nstack */ + 1, /* argc */ + 0, /* varg */ + 0, /* has upvals */ + NULL, /* no upvals */ + 0, /* has sup protos */ + NULL, /* no sub protos */ + 1, /* has constants */ + ( &(const bvalue[ 8]) { /* constants */ + /* K0 */ be_nested_str(_timers), + /* K1 */ be_const_int(0), + /* K2 */ be_nested_str(size), + /* K3 */ be_nested_str(time_reached), + /* K4 */ be_nested_str(due), + /* K5 */ be_nested_str(f), + /* K6 */ be_nested_str(remove), + /* K7 */ be_const_int(1), + }), + &be_const_str_run_deferred, + &be_const_str_solidified, + ( &(const binstruction[27]) { /* code */ + 0x88040100, // 0000 GETMBR R1 R0 K0 + 0x78060017, // 0001 JMPF R1 #001A + 0x58040001, // 0002 LDCONST R1 K1 + 0x88080100, // 0003 GETMBR R2 R0 K0 + 0x8C080502, // 0004 GETMET R2 R2 K2 + 0x7C080200, // 0005 CALL R2 1 + 0x14080202, // 0006 LT R2 R1 R2 + 0x780A0011, // 0007 JMPF R2 #001A + 0x8C080103, // 0008 GETMET R2 R0 K3 + 0x88100100, // 0009 GETMBR R4 R0 K0 + 0x94100801, // 000A GETIDX R4 R4 R1 + 0x88100904, // 000B GETMBR R4 R4 K4 + 0x7C080400, // 000C CALL R2 2 + 0x780A0009, // 000D JMPF R2 #0018 + 0x88080100, // 000E GETMBR R2 R0 K0 + 0x94080401, // 000F GETIDX R2 R2 R1 + 0x88080505, // 0010 GETMBR R2 R2 K5 + 0x880C0100, // 0011 GETMBR R3 R0 K0 + 0x8C0C0706, // 0012 GETMET R3 R3 K6 + 0x5C140200, // 0013 MOVE R5 R1 + 0x7C0C0400, // 0014 CALL R3 2 + 0x5C0C0400, // 0015 MOVE R3 R2 + 0x7C0C0000, // 0016 CALL R3 0 + 0x70020000, // 0017 JMP #0019 + 0x00040307, // 0018 ADD R1 R1 K7 + 0x7001FFE8, // 0019 JMP #0003 + 0x80000000, // 001A RET 0 + }) + ) +); +/*******************************************************************/ + + +/******************************************************************** +** Solidified function: remove_driver +********************************************************************/ +be_local_closure(Tasmota_remove_driver, /* name */ + be_nested_proto( + 6, /* nstack */ + 2, /* argc */ + 0, /* varg */ + 0, /* has upvals */ + NULL, /* no upvals */ + 0, /* has sup protos */ + NULL, /* no sub protos */ + 1, /* has constants */ + ( &(const bvalue[ 3]) { /* constants */ + /* K0 */ be_nested_str(_drivers), + /* K1 */ be_nested_str(find), + /* K2 */ be_nested_str(pop), + }), + &be_const_str_remove_driver, + &be_const_str_solidified, + ( &(const binstruction[14]) { /* code */ + 0x88080100, // 0000 GETMBR R2 R0 K0 + 0x780A000A, // 0001 JMPF R2 #000D + 0x88080100, // 0002 GETMBR R2 R0 K0 + 0x8C080501, // 0003 GETMET R2 R2 K1 + 0x5C100200, // 0004 MOVE R4 R1 + 0x7C080400, // 0005 CALL R2 2 + 0x4C0C0000, // 0006 LDNIL R3 + 0x200C0403, // 0007 NE R3 R2 R3 + 0x780E0003, // 0008 JMPF R3 #000D + 0x880C0100, // 0009 GETMBR R3 R0 K0 + 0x8C0C0702, // 000A GETMET R3 R3 K2 + 0x5C140400, // 000B MOVE R5 R2 + 0x7C0C0400, // 000C CALL R3 2 + 0x80000000, // 000D RET 0 }) ) ); @@ -1732,7 +634,7 @@ be_local_closure(gc, /* name */ /******************************************************************** ** Solidified function: event ********************************************************************/ -be_local_closure(event, /* name */ +be_local_closure(Tasmota_event, /* name */ be_nested_proto( 20, /* nstack */ 6, /* argc */ @@ -1743,32 +645,32 @@ be_local_closure(event, /* name */ NULL, /* no sub protos */ 1, /* has constants */ ( &(const bvalue[23]) { /* constants */ - /* K0 */ be_nested_string("introspect", 164638290, 10), - /* K1 */ be_nested_string("string", 398550328, 6), - /* K2 */ be_nested_string("every_50ms", -1911083288, 10), - /* K3 */ be_nested_string("run_deferred", 371594696, 12), - /* K4 */ be_nested_string("cmd", -158181397, 3), - /* K5 */ be_nested_string("exec_cmd", 493567399, 8), - /* K6 */ be_nested_string("tele", -820509235, 4), - /* K7 */ be_nested_string("exec_tele", 1020751601, 9), - /* K8 */ be_nested_string("rule", -64077613, 4), - /* K9 */ be_nested_string("exec_rules", 1445221092, 10), - /* K10 */ be_nested_string("gc", 1042313471, 2), - /* K11 */ be_nested_string("_drivers", -1034638311, 8), + /* K0 */ be_nested_str(introspect), + /* K1 */ be_nested_str(string), + /* K2 */ be_nested_str(every_50ms), + /* K3 */ be_nested_str(run_deferred), + /* K4 */ be_nested_str(cmd), + /* K5 */ be_nested_str(exec_cmd), + /* K6 */ be_nested_str(tele), + /* K7 */ be_nested_str(exec_tele), + /* K8 */ be_nested_str(rule), + /* K9 */ be_nested_str(exec_rules), + /* K10 */ be_nested_str(gc), + /* K11 */ be_nested_str(_drivers), /* K12 */ be_const_int(0), - /* K13 */ be_nested_string("get", 1410115415, 3), - /* K14 */ be_nested_string("function", -1630125495, 8), - /* K15 */ be_nested_string("format", -1180859054, 6), - /* K16 */ be_nested_string("BRY: Exception> '%s' - %s", -2047976332, 25), - /* K17 */ be_nested_string("debug", 1483009432, 5), - /* K18 */ be_nested_string("traceback", -909779187, 9), + /* K13 */ be_nested_str(get), + /* K14 */ be_nested_str(function), + /* K15 */ be_nested_str(format), + /* K16 */ be_nested_str(BRY_X3A_X20Exception_X3E_X20_X27_X25s_X27_X20_X2D_X20_X25s), + /* K17 */ be_nested_str(debug), + /* K18 */ be_nested_str(traceback), /* K19 */ be_const_int(1), - /* K20 */ be_nested_string("save_before_restart", 1253239338, 19), - /* K21 */ be_nested_string("persist", -377883517, 7), - /* K22 */ be_nested_string("save", -855671224, 4), + /* K20 */ be_nested_str(save_before_restart), + /* K21 */ be_nested_str(persist), + /* K22 */ be_nested_str(save), }), - (be_nested_const_str("event", -30355297, 5)), - ((bstring*) &be_const_str_input), + &be_const_str_event, + &be_const_str_solidified, ( &(const binstruction[91]) { /* code */ 0xA41A0000, // 0000 IMPORT R6 K0 0xA41E0200, // 0001 IMPORT R7 K1 @@ -1868,9 +770,593 @@ be_local_closure(event, /* name */ /******************************************************************** -** Solidified function: remove_cmd +** Solidified function: find_key_i ********************************************************************/ -be_local_closure(remove_cmd, /* name */ +be_local_closure(Tasmota_find_key_i, /* name */ + be_nested_proto( + 10, /* nstack */ + 3, /* argc */ + 0, /* varg */ + 0, /* has upvals */ + NULL, /* no upvals */ + 0, /* has sup protos */ + NULL, /* no sub protos */ + 1, /* has constants */ + ( &(const bvalue[ 5]) { /* constants */ + /* K0 */ be_nested_str(string), + /* K1 */ be_nested_str(toupper), + /* K2 */ be_nested_str(keys), + /* K3 */ be_nested_str(_X3F), + /* K4 */ be_nested_str(stop_iteration), + }), + &be_const_str_find_key_i, + &be_const_str_solidified, + ( &(const binstruction[30]) { /* code */ + 0xA40E0000, // 0000 IMPORT R3 K0 + 0x8C100701, // 0001 GETMET R4 R3 K1 + 0x5C180400, // 0002 MOVE R6 R2 + 0x7C100400, // 0003 CALL R4 2 + 0x6014000F, // 0004 GETGBL R5 G15 + 0x5C180200, // 0005 MOVE R6 R1 + 0x601C0013, // 0006 GETGBL R7 G19 + 0x7C140400, // 0007 CALL R5 2 + 0x78160013, // 0008 JMPF R5 #001D + 0x60140010, // 0009 GETGBL R5 G16 + 0x8C180302, // 000A GETMET R6 R1 K2 + 0x7C180200, // 000B CALL R6 1 + 0x7C140200, // 000C CALL R5 1 + 0xA802000B, // 000D EXBLK 0 #001A + 0x5C180A00, // 000E MOVE R6 R5 + 0x7C180000, // 000F CALL R6 0 + 0x8C1C0701, // 0010 GETMET R7 R3 K1 + 0x5C240C00, // 0011 MOVE R9 R6 + 0x7C1C0400, // 0012 CALL R7 2 + 0x1C1C0E04, // 0013 EQ R7 R7 R4 + 0x741E0001, // 0014 JMPT R7 #0017 + 0x1C1C0503, // 0015 EQ R7 R2 K3 + 0x781E0001, // 0016 JMPF R7 #0019 + 0xA8040001, // 0017 EXBLK 1 1 + 0x80040C00, // 0018 RET 1 R6 + 0x7001FFF3, // 0019 JMP #000E + 0x58140004, // 001A LDCONST R5 K4 + 0xAC140200, // 001B CATCH R5 1 0 + 0xB0080000, // 001C RAISE 2 R0 R0 + 0x80000000, // 001D RET 0 + }) + ) +); +/*******************************************************************/ + + +/******************************************************************** +** Solidified function: wire_scan +********************************************************************/ +be_local_closure(Tasmota_wire_scan, /* name */ + be_nested_proto( + 6, /* nstack */ + 3, /* argc */ + 0, /* varg */ + 0, /* has upvals */ + NULL, /* no upvals */ + 0, /* has sup protos */ + NULL, /* no sub protos */ + 1, /* has constants */ + ( &(const bvalue[ 5]) { /* constants */ + /* K0 */ be_nested_str(i2c_enabled), + /* K1 */ be_nested_str(wire1), + /* K2 */ be_nested_str(enabled), + /* K3 */ be_nested_str(detect), + /* K4 */ be_nested_str(wire2), + }), + &be_const_str_wire_scan, + &be_const_str_solidified, + ( &(const binstruction[33]) { /* code */ + 0x4C0C0000, // 0000 LDNIL R3 + 0x200C0403, // 0001 NE R3 R2 R3 + 0x780E0005, // 0002 JMPF R3 #0009 + 0x8C0C0100, // 0003 GETMET R3 R0 K0 + 0x5C140400, // 0004 MOVE R5 R2 + 0x7C0C0400, // 0005 CALL R3 2 + 0x740E0001, // 0006 JMPT R3 #0009 + 0x4C0C0000, // 0007 LDNIL R3 + 0x80040600, // 0008 RET 1 R3 + 0x880C0101, // 0009 GETMBR R3 R0 K1 + 0x8C0C0702, // 000A GETMET R3 R3 K2 + 0x7C0C0200, // 000B CALL R3 1 + 0x780E0006, // 000C JMPF R3 #0014 + 0x880C0101, // 000D GETMBR R3 R0 K1 + 0x8C0C0703, // 000E GETMET R3 R3 K3 + 0x5C140200, // 000F MOVE R5 R1 + 0x7C0C0400, // 0010 CALL R3 2 + 0x780E0001, // 0011 JMPF R3 #0014 + 0x880C0101, // 0012 GETMBR R3 R0 K1 + 0x80040600, // 0013 RET 1 R3 + 0x880C0104, // 0014 GETMBR R3 R0 K4 + 0x8C0C0702, // 0015 GETMET R3 R3 K2 + 0x7C0C0200, // 0016 CALL R3 1 + 0x780E0006, // 0017 JMPF R3 #001F + 0x880C0104, // 0018 GETMBR R3 R0 K4 + 0x8C0C0703, // 0019 GETMET R3 R3 K3 + 0x5C140200, // 001A MOVE R5 R1 + 0x7C0C0400, // 001B CALL R3 2 + 0x780E0001, // 001C JMPF R3 #001F + 0x880C0104, // 001D GETMBR R3 R0 K4 + 0x80040600, // 001E RET 1 R3 + 0x4C0C0000, // 001F LDNIL R3 + 0x80040600, // 0020 RET 1 R3 + }) + ) +); +/*******************************************************************/ + + +/******************************************************************** +** Solidified function: init +********************************************************************/ +be_local_closure(Tasmota_init, /* name */ + be_nested_proto( + 7, /* nstack */ + 1, /* argc */ + 0, /* varg */ + 0, /* has upvals */ + NULL, /* no upvals */ + 0, /* has sup protos */ + NULL, /* no sub protos */ + 1, /* has constants */ + ( &(const bvalue[15]) { /* constants */ + /* K0 */ be_nested_str(global), + /* K1 */ be_nested_str(ctypes_bytes_dyn), + /* K2 */ be_nested_str(_global_addr), + /* K3 */ be_nested_str(_global_def), + /* K4 */ be_nested_str(introspect), + /* K5 */ be_nested_str(_settings_ptr), + /* K6 */ be_nested_str(get), + /* K7 */ be_const_int(0), + /* K8 */ be_nested_str(settings), + /* K9 */ be_nested_str(toptr), + /* K10 */ be_nested_str(_settings_def), + /* K11 */ be_nested_str(wd), + /* K12 */ be_nested_str(), + /* K13 */ be_nested_str(_debug_present), + /* K14 */ be_nested_str(debug), + }), + &be_const_str_init, + &be_const_str_solidified, + ( &(const binstruction[36]) { /* code */ + 0xB8060200, // 0000 GETNGBL R1 K1 + 0x88080102, // 0001 GETMBR R2 R0 K2 + 0x880C0103, // 0002 GETMBR R3 R0 K3 + 0x7C040400, // 0003 CALL R1 2 + 0x90020001, // 0004 SETMBR R0 K0 R1 + 0xA4060800, // 0005 IMPORT R1 K4 + 0x60080015, // 0006 GETGBL R2 G21 + 0x880C0105, // 0007 GETMBR R3 R0 K5 + 0x54120003, // 0008 LDINT R4 4 + 0x7C080400, // 0009 CALL R2 2 + 0x8C080506, // 000A GETMET R2 R2 K6 + 0x58100007, // 000B LDCONST R4 K7 + 0x54160003, // 000C LDINT R5 4 + 0x7C080600, // 000D CALL R2 3 + 0x780A0006, // 000E JMPF R2 #0016 + 0xB80E0200, // 000F GETNGBL R3 K1 + 0x8C100309, // 0010 GETMET R4 R1 K9 + 0x5C180400, // 0011 MOVE R6 R2 + 0x7C100400, // 0012 CALL R4 2 + 0x8814010A, // 0013 GETMBR R5 R0 K10 + 0x7C0C0400, // 0014 CALL R3 2 + 0x90021003, // 0015 SETMBR R0 K8 R3 + 0x9002170C, // 0016 SETMBR R0 K11 K12 + 0x500C0000, // 0017 LDBOOL R3 0 0 + 0x90021A03, // 0018 SETMBR R0 K13 R3 + 0xA8020004, // 0019 EXBLK 0 #001F + 0xA40E1C00, // 001A IMPORT R3 K14 + 0x50100200, // 001B LDBOOL R4 1 0 + 0x90021A04, // 001C SETMBR R0 K13 R4 + 0xA8040001, // 001D EXBLK 1 1 + 0x70020003, // 001E JMP #0023 + 0xAC0C0000, // 001F CATCH R3 0 0 + 0x70020000, // 0020 JMP #0022 + 0x70020000, // 0021 JMP #0023 + 0xB0080000, // 0022 RAISE 2 R0 R0 + 0x80000000, // 0023 RET 0 + }) + ) +); +/*******************************************************************/ + + +/******************************************************************** +** Solidified function: time_str +********************************************************************/ +be_local_closure(Tasmota_time_str, /* name */ + be_nested_proto( + 13, /* nstack */ + 2, /* argc */ + 0, /* varg */ + 0, /* has upvals */ + NULL, /* no upvals */ + 0, /* has sup protos */ + NULL, /* no sub protos */ + 1, /* has constants */ + ( &(const bvalue[10]) { /* constants */ + /* K0 */ be_nested_str(string), + /* K1 */ be_nested_str(time_dump), + /* K2 */ be_nested_str(format), + /* K3 */ be_nested_str(_X2504d_X2D_X2502d_X2D_X2502dT_X2502d_X3A_X2502d_X3A_X2502d), + /* K4 */ be_nested_str(year), + /* K5 */ be_nested_str(month), + /* K6 */ be_nested_str(day), + /* K7 */ be_nested_str(hour), + /* K8 */ be_nested_str(min), + /* K9 */ be_nested_str(sec), + }), + &be_const_str_time_str, + &be_const_str_solidified, + ( &(const binstruction[14]) { /* code */ + 0xA40A0000, // 0000 IMPORT R2 K0 + 0x8C0C0101, // 0001 GETMET R3 R0 K1 + 0x5C140200, // 0002 MOVE R5 R1 + 0x7C0C0400, // 0003 CALL R3 2 + 0x8C100502, // 0004 GETMET R4 R2 K2 + 0x58180003, // 0005 LDCONST R6 K3 + 0x941C0704, // 0006 GETIDX R7 R3 K4 + 0x94200705, // 0007 GETIDX R8 R3 K5 + 0x94240706, // 0008 GETIDX R9 R3 K6 + 0x94280707, // 0009 GETIDX R10 R3 K7 + 0x942C0708, // 000A GETIDX R11 R3 K8 + 0x94300709, // 000B GETIDX R12 R3 K9 + 0x7C101000, // 000C CALL R4 8 + 0x80040800, // 000D RET 1 R4 + }) + ) +); +/*******************************************************************/ + + +/******************************************************************** +** Solidified function: remove_rule +********************************************************************/ +be_local_closure(Tasmota_remove_rule, /* name */ + be_nested_proto( + 6, /* nstack */ + 2, /* argc */ + 0, /* varg */ + 0, /* has upvals */ + NULL, /* no upvals */ + 0, /* has sup protos */ + NULL, /* no sub protos */ + 1, /* has constants */ + ( &(const bvalue[ 5]) { /* constants */ + /* K0 */ be_nested_str(_rules), + /* K1 */ be_const_int(0), + /* K2 */ be_nested_str(k), + /* K3 */ be_nested_str(remove), + /* K4 */ be_const_int(1), + }), + &be_const_str_remove_rule, + &be_const_str_solidified, + ( &(const binstruction[21]) { /* code */ + 0x88080100, // 0000 GETMBR R2 R0 K0 + 0x780A0011, // 0001 JMPF R2 #0014 + 0x58080001, // 0002 LDCONST R2 K1 + 0x600C000C, // 0003 GETGBL R3 G12 + 0x88100100, // 0004 GETMBR R4 R0 K0 + 0x7C0C0200, // 0005 CALL R3 1 + 0x140C0403, // 0006 LT R3 R2 R3 + 0x780E000B, // 0007 JMPF R3 #0014 + 0x880C0100, // 0008 GETMBR R3 R0 K0 + 0x940C0602, // 0009 GETIDX R3 R3 R2 + 0x880C0702, // 000A GETMBR R3 R3 K2 + 0x1C0C0601, // 000B EQ R3 R3 R1 + 0x780E0004, // 000C JMPF R3 #0012 + 0x880C0100, // 000D GETMBR R3 R0 K0 + 0x8C0C0703, // 000E GETMET R3 R3 K3 + 0x5C140400, // 000F MOVE R5 R2 + 0x7C0C0400, // 0010 CALL R3 2 + 0x70020000, // 0011 JMP #0013 + 0x00080504, // 0012 ADD R2 R2 K4 + 0x7001FFEE, // 0013 JMP #0003 + 0x80000000, // 0014 RET 0 + }) + ) +); +/*******************************************************************/ + + +/******************************************************************** +** Solidified function: load +********************************************************************/ +be_local_closure(Tasmota_load, /* name */ + be_nested_proto( + 21, /* nstack */ + 2, /* argc */ + 0, /* varg */ + 0, /* has upvals */ + NULL, /* no upvals */ + 1, /* has sup protos */ + ( &(const struct bproto*[ 2]) { + be_nested_proto( + 6, /* nstack */ + 1, /* argc */ + 0, /* varg */ + 0, /* has upvals */ + NULL, /* no upvals */ + 0, /* has sup protos */ + NULL, /* no sub protos */ + 1, /* has constants */ + ( &(const bvalue[ 4]) { /* constants */ + /* K0 */ be_nested_str(sys), + /* K1 */ be_nested_str(path), + /* K2 */ be_nested_str(find), + /* K3 */ be_nested_str(push), + }), + &be_const_str_push_path, + &be_const_str_solidified, + ( &(const binstruction[13]) { /* code */ + 0xA4060000, // 0000 IMPORT R1 K0 + 0x8C080301, // 0001 GETMET R2 R1 K1 + 0x7C080200, // 0002 CALL R2 1 + 0x8C0C0502, // 0003 GETMET R3 R2 K2 + 0x5C140000, // 0004 MOVE R5 R0 + 0x7C0C0400, // 0005 CALL R3 2 + 0x4C100000, // 0006 LDNIL R4 + 0x1C0C0604, // 0007 EQ R3 R3 R4 + 0x780E0002, // 0008 JMPF R3 #000C + 0x8C0C0503, // 0009 GETMET R3 R2 K3 + 0x5C140000, // 000A MOVE R5 R0 + 0x7C0C0400, // 000B CALL R3 2 + 0x80000000, // 000C RET 0 + }) + ), + be_nested_proto( + 7, /* nstack */ + 1, /* argc */ + 0, /* varg */ + 0, /* has upvals */ + NULL, /* no upvals */ + 0, /* has sup protos */ + NULL, /* no sub protos */ + 1, /* has constants */ + ( &(const bvalue[ 4]) { /* constants */ + /* K0 */ be_nested_str(sys), + /* K1 */ be_nested_str(path), + /* K2 */ be_nested_str(find), + /* K3 */ be_nested_str(remove), + }), + &be_const_str_pop_path, + &be_const_str_solidified, + ( &(const binstruction[13]) { /* code */ + 0xA4060000, // 0000 IMPORT R1 K0 + 0x8C080301, // 0001 GETMET R2 R1 K1 + 0x7C080200, // 0002 CALL R2 1 + 0x8C0C0502, // 0003 GETMET R3 R2 K2 + 0x5C140000, // 0004 MOVE R5 R0 + 0x7C0C0400, // 0005 CALL R3 2 + 0x4C100000, // 0006 LDNIL R4 + 0x20100604, // 0007 NE R4 R3 R4 + 0x78120002, // 0008 JMPF R4 #000C + 0x8C100503, // 0009 GETMET R4 R2 K3 + 0x5C180600, // 000A MOVE R6 R3 + 0x7C100400, // 000B CALL R4 2 + 0x80000000, // 000C RET 0 + }) + ), + }), + 1, /* has constants */ + ( &(const bvalue[21]) { /* constants */ + /* K0 */ be_nested_str(string), + /* K1 */ be_nested_str(path), + /* K2 */ be_const_int(0), + /* K3 */ be_nested_str(_X2F), + /* K4 */ be_nested_str(split), + /* K5 */ be_nested_str(_X23), + /* K6 */ be_const_int(1), + /* K7 */ be_nested_str(find), + /* K8 */ be_nested_str(_X2E), + /* K9 */ be_nested_str(_X2Ebe), + /* K10 */ be_nested_str(_X2Ebec), + /* K11 */ be_nested_str(io_error), + /* K12 */ be_nested_str(file_X20extension_X20is_X20not_X20_X27_X2Ebe_X27_X20or_X20_X27_X2Ebec_X27), + /* K13 */ be_nested_str(last_modified), + /* K14 */ be_nested_str(c), + /* K15 */ be_nested_str(wd), + /* K16 */ be_nested_str(), + /* K17 */ be_nested_str(file), + /* K18 */ be_nested_str(save), + /* K19 */ be_nested_str(format), + /* K20 */ be_nested_str(BRY_X3A_X20could_X20not_X20save_X20compiled_X20file_X20_X25s_X20_X28_X25s_X29), + }), + &be_const_str_load, + &be_const_str_solidified, + ( &(const binstruction[121]) { /* code */ + 0x84080000, // 0000 CLOSURE R2 P0 + 0x840C0001, // 0001 CLOSURE R3 P1 + 0xA4120000, // 0002 IMPORT R4 K0 + 0xA4160200, // 0003 IMPORT R5 K1 + 0x6018000C, // 0004 GETGBL R6 G12 + 0x5C1C0200, // 0005 MOVE R7 R1 + 0x7C180200, // 0006 CALL R6 1 + 0x1C180D02, // 0007 EQ R6 R6 K2 + 0x781A0001, // 0008 JMPF R6 #000B + 0x50180000, // 0009 LDBOOL R6 0 0 + 0x80040C00, // 000A RET 1 R6 + 0x94180302, // 000B GETIDX R6 R1 K2 + 0x20180D03, // 000C NE R6 R6 K3 + 0x781A0000, // 000D JMPF R6 #000F + 0x00060601, // 000E ADD R1 K3 R1 + 0x8C180904, // 000F GETMET R6 R4 K4 + 0x5C200200, // 0010 MOVE R8 R1 + 0x58240005, // 0011 LDCONST R9 K5 + 0x7C180600, // 0012 CALL R6 3 + 0x941C0D02, // 0013 GETIDX R7 R6 K2 + 0x5421FFFE, // 0014 LDINT R8 -1 + 0x94200C08, // 0015 GETIDX R8 R6 R8 + 0x6024000C, // 0016 GETGBL R9 G12 + 0x5C280C00, // 0017 MOVE R10 R6 + 0x7C240200, // 0018 CALL R9 1 + 0x24241306, // 0019 GT R9 R9 K6 + 0x8C280907, // 001A GETMET R10 R4 K7 + 0x5C301000, // 001B MOVE R12 R8 + 0x58340008, // 001C LDCONST R13 K8 + 0x7C280600, // 001D CALL R10 3 + 0x14281502, // 001E LT R10 R10 K2 + 0x782A0001, // 001F JMPF R10 #0022 + 0x00040309, // 0020 ADD R1 R1 K9 + 0x00201109, // 0021 ADD R8 R8 K9 + 0x5429FFFC, // 0022 LDINT R10 -3 + 0x542DFFFE, // 0023 LDINT R11 -1 + 0x4028140B, // 0024 CONNECT R10 R10 R11 + 0x9428100A, // 0025 GETIDX R10 R8 R10 + 0x1C281509, // 0026 EQ R10 R10 K9 + 0x542DFFFB, // 0027 LDINT R11 -4 + 0x5431FFFE, // 0028 LDINT R12 -1 + 0x402C160C, // 0029 CONNECT R11 R11 R12 + 0x942C100B, // 002A GETIDX R11 R8 R11 + 0x1C2C170A, // 002B EQ R11 R11 K10 + 0x5C301400, // 002C MOVE R12 R10 + 0x74320002, // 002D JMPT R12 #0031 + 0x5C301600, // 002E MOVE R12 R11 + 0x74320000, // 002F JMPT R12 #0031 + 0xB006170C, // 0030 RAISE 1 K11 K12 + 0x8C300B0D, // 0031 GETMET R12 R5 K13 + 0x5C380E00, // 0032 MOVE R14 R7 + 0x7C300400, // 0033 CALL R12 2 + 0x782E0005, // 0034 JMPF R11 #003B + 0x4C340000, // 0035 LDNIL R13 + 0x1C34180D, // 0036 EQ R13 R12 R13 + 0x78360001, // 0037 JMPF R13 #003A + 0x50340000, // 0038 LDBOOL R13 0 0 + 0x80041A00, // 0039 RET 1 R13 + 0x70020013, // 003A JMP #004F + 0x8C340B0D, // 003B GETMET R13 R5 K13 + 0x003C030E, // 003C ADD R15 R1 K14 + 0x7C340400, // 003D CALL R13 2 + 0x4C380000, // 003E LDNIL R14 + 0x1C38180E, // 003F EQ R14 R12 R14 + 0x783A0004, // 0040 JMPF R14 #0046 + 0x4C380000, // 0041 LDNIL R14 + 0x1C381A0E, // 0042 EQ R14 R13 R14 + 0x783A0001, // 0043 JMPF R14 #0046 + 0x50380000, // 0044 LDBOOL R14 0 0 + 0x80041C00, // 0045 RET 1 R14 + 0x4C380000, // 0046 LDNIL R14 + 0x20381A0E, // 0047 NE R14 R13 R14 + 0x783A0005, // 0048 JMPF R14 #004F + 0x4C380000, // 0049 LDNIL R14 + 0x1C38180E, // 004A EQ R14 R12 R14 + 0x743A0001, // 004B JMPT R14 #004E + 0x28381A0C, // 004C GE R14 R13 R12 + 0x783A0000, // 004D JMPF R14 #004F + 0x502C0200, // 004E LDBOOL R11 1 0 + 0x78260005, // 004F JMPF R9 #0056 + 0x00340F05, // 0050 ADD R13 R7 K5 + 0x90021E0D, // 0051 SETMBR R0 K15 R13 + 0x5C340400, // 0052 MOVE R13 R2 + 0x8838010F, // 0053 GETMBR R14 R0 K15 + 0x7C340200, // 0054 CALL R13 1 + 0x70020000, // 0055 JMP #0057 + 0x90021F10, // 0056 SETMBR R0 K15 K16 + 0x6034000D, // 0057 GETGBL R13 G13 + 0x5C380200, // 0058 MOVE R14 R1 + 0x583C0011, // 0059 LDCONST R15 K17 + 0x7C340400, // 005A CALL R13 2 + 0x5C381600, // 005B MOVE R14 R11 + 0x743A0013, // 005C JMPT R14 #0071 + 0x5C381200, // 005D MOVE R14 R9 + 0x743A0011, // 005E JMPT R14 #0071 + 0xA8020005, // 005F EXBLK 0 #0066 + 0x8C380112, // 0060 GETMET R14 R0 K18 + 0x0040030E, // 0061 ADD R16 R1 K14 + 0x5C441A00, // 0062 MOVE R17 R13 + 0x7C380600, // 0063 CALL R14 3 + 0xA8040001, // 0064 EXBLK 1 1 + 0x7002000A, // 0065 JMP #0071 + 0xAC380001, // 0066 CATCH R14 0 1 + 0x70020007, // 0067 JMP #0070 + 0x603C0001, // 0068 GETGBL R15 G1 + 0x8C400913, // 0069 GETMET R16 R4 K19 + 0x58480014, // 006A LDCONST R18 K20 + 0x004C030E, // 006B ADD R19 R1 K14 + 0x5C501C00, // 006C MOVE R20 R14 + 0x7C400800, // 006D CALL R16 4 + 0x7C3C0200, // 006E CALL R15 1 + 0x70020000, // 006F JMP #0071 + 0xB0080000, // 0070 RAISE 2 R0 R0 + 0x5C381A00, // 0071 MOVE R14 R13 + 0x7C380000, // 0072 CALL R14 0 + 0x78260002, // 0073 JMPF R9 #0077 + 0x5C380600, // 0074 MOVE R14 R3 + 0x003C0F05, // 0075 ADD R15 R7 K5 + 0x7C380200, // 0076 CALL R14 1 + 0x50380200, // 0077 LDBOOL R14 1 0 + 0x80041C00, // 0078 RET 1 R14 + }) + ) +); +/*******************************************************************/ + + +/******************************************************************** +** Solidified function: chars_in_string +********************************************************************/ +be_local_closure(Tasmota_chars_in_string, /* name */ + be_nested_proto( + 10, /* nstack */ + 4, /* argc */ + 0, /* varg */ + 0, /* has upvals */ + NULL, /* no upvals */ + 0, /* has sup protos */ + NULL, /* no sub protos */ + 1, /* has constants */ + ( &(const bvalue[ 2]) { /* constants */ + /* K0 */ be_const_int(0), + /* K1 */ be_const_int(1), + }), + &be_const_str_chars_in_string, + &be_const_str_solidified, + ( &(const binstruction[31]) { /* code */ + 0x780E0001, // 0000 JMPF R3 #0003 + 0x50100200, // 0001 LDBOOL R4 1 0 + 0x70020000, // 0002 JMP #0004 + 0x50100000, // 0003 LDBOOL R4 0 0 + 0x58140000, // 0004 LDCONST R5 K0 + 0x6018000C, // 0005 GETGBL R6 G12 + 0x5C1C0200, // 0006 MOVE R7 R1 + 0x7C180200, // 0007 CALL R6 1 + 0x14180A06, // 0008 LT R6 R5 R6 + 0x781A0012, // 0009 JMPF R6 #001D + 0x50180000, // 000A LDBOOL R6 0 0 + 0x581C0000, // 000B LDCONST R7 K0 + 0x6020000C, // 000C GETGBL R8 G12 + 0x5C240400, // 000D MOVE R9 R2 + 0x7C200200, // 000E CALL R8 1 + 0x14200E08, // 000F LT R8 R7 R8 + 0x78220006, // 0010 JMPF R8 #0018 + 0x94200205, // 0011 GETIDX R8 R1 R5 + 0x94240407, // 0012 GETIDX R9 R2 R7 + 0x1C201009, // 0013 EQ R8 R8 R9 + 0x78220000, // 0014 JMPF R8 #0016 + 0x50180200, // 0015 LDBOOL R6 1 0 + 0x001C0F01, // 0016 ADD R7 R7 K1 + 0x7001FFF3, // 0017 JMP #000C + 0x20200806, // 0018 NE R8 R4 R6 + 0x78220000, // 0019 JMPF R8 #001B + 0x80040A00, // 001A RET 1 R5 + 0x00140B01, // 001B ADD R5 R5 K1 + 0x7001FFE7, // 001C JMP #0005 + 0x5419FFFE, // 001D LDINT R6 -1 + 0x80040C00, // 001E RET 1 R6 + }) + ) +); +/*******************************************************************/ + + +/******************************************************************** +** Solidified function: cmd +********************************************************************/ +be_local_closure(Tasmota_cmd, /* name */ be_nested_proto( 5, /* nstack */ 2, /* argc */ @@ -1881,19 +1367,26 @@ be_local_closure(remove_cmd, /* name */ NULL, /* no sub protos */ 1, /* has constants */ ( &(const bvalue[ 2]) { /* constants */ - /* K0 */ be_nested_string("_ccmd", -2131545883, 5), - /* K1 */ be_nested_string("remove", -611183107, 6), + /* K0 */ be_nested_str(cmd_res), + /* K1 */ be_nested_str(_cmd), }), - (be_nested_const_str("remove_cmd", -462651594, 10)), - ((bstring*) &be_const_str_input), - ( &(const binstruction[ 7]) { /* code */ - 0x88080100, // 0000 GETMBR R2 R0 K0 - 0x780A0003, // 0001 JMPF R2 #0006 - 0x88080100, // 0002 GETMBR R2 R0 K0 - 0x8C080501, // 0003 GETMET R2 R2 K1 - 0x5C100200, // 0004 MOVE R4 R1 - 0x7C080400, // 0005 CALL R2 2 - 0x80000000, // 0006 RET 0 + &be_const_str_cmd, + &be_const_str_solidified, + ( &(const binstruction[14]) { /* code */ + 0x50080200, // 0000 LDBOOL R2 1 0 + 0x90020002, // 0001 SETMBR R0 K0 R2 + 0x8C080101, // 0002 GETMET R2 R0 K1 + 0x5C100200, // 0003 MOVE R4 R1 + 0x7C080400, // 0004 CALL R2 2 + 0x4C080000, // 0005 LDNIL R2 + 0x880C0100, // 0006 GETMBR R3 R0 K0 + 0x50100200, // 0007 LDBOOL R4 1 0 + 0x200C0604, // 0008 NE R3 R3 R4 + 0x780E0000, // 0009 JMPF R3 #000B + 0x88080100, // 000A GETMBR R2 R0 K0 + 0x4C0C0000, // 000B LDNIL R3 + 0x90020003, // 000C SETMBR R0 K0 R3 + 0x80040400, // 000D RET 1 R2 }) ) ); @@ -1901,64 +1394,186 @@ be_local_closure(remove_cmd, /* name */ /******************************************************************** -** Solidified function: exec_cmd +** Solidified function: add_cmd ********************************************************************/ -be_local_closure(exec_cmd, /* name */ +be_local_closure(Tasmota_add_cmd, /* name */ be_nested_proto( - 12, /* nstack */ - 4, /* argc */ + 5, /* nstack */ + 3, /* argc */ 0, /* varg */ 0, /* has upvals */ NULL, /* no upvals */ 0, /* has sup protos */ NULL, /* no sub protos */ 1, /* has constants */ - ( &(const bvalue[ 5]) { /* constants */ - /* K0 */ be_nested_string("_ccmd", -2131545883, 5), - /* K1 */ be_nested_string("json", 916562499, 4), - /* K2 */ be_nested_string("load", -435725847, 4), - /* K3 */ be_nested_string("find_key_i", 850136726, 10), - /* K4 */ be_nested_string("resolvecmnd", 993361485, 11), + ( &(const bvalue[ 4]) { /* constants */ + /* K0 */ be_nested_str(_ccmd), + /* K1 */ be_nested_str(function), + /* K2 */ be_nested_str(value_error), + /* K3 */ be_nested_str(the_X20second_X20argument_X20is_X20not_X20a_X20function), }), - (be_nested_const_str("exec_cmd", 493567399, 8)), - ((bstring*) &be_const_str_input), - ( &(const binstruction[27]) { /* code */ - 0x88100100, // 0000 GETMBR R4 R0 K0 - 0x78120016, // 0001 JMPF R4 #0019 - 0xA4120200, // 0002 IMPORT R4 K1 - 0x8C140902, // 0003 GETMET R5 R4 K2 - 0x5C1C0600, // 0004 MOVE R7 R3 - 0x7C140400, // 0005 CALL R5 2 - 0x8C180103, // 0006 GETMET R6 R0 K3 - 0x88200100, // 0007 GETMBR R8 R0 K0 - 0x5C240200, // 0008 MOVE R9 R1 - 0x7C180600, // 0009 CALL R6 3 - 0x4C1C0000, // 000A LDNIL R7 - 0x201C0C07, // 000B NE R7 R6 R7 - 0x781E000B, // 000C JMPF R7 #0019 - 0x8C1C0104, // 000D GETMET R7 R0 K4 - 0x5C240C00, // 000E MOVE R9 R6 - 0x7C1C0400, // 000F CALL R7 2 - 0x881C0100, // 0010 GETMBR R7 R0 K0 - 0x941C0E06, // 0011 GETIDX R7 R7 R6 - 0x5C200C00, // 0012 MOVE R8 R6 - 0x5C240400, // 0013 MOVE R9 R2 - 0x5C280600, // 0014 MOVE R10 R3 - 0x5C2C0A00, // 0015 MOVE R11 R5 - 0x7C1C0800, // 0016 CALL R7 4 - 0x501C0200, // 0017 LDBOOL R7 1 0 - 0x80040E00, // 0018 RET 1 R7 - 0x50100000, // 0019 LDBOOL R4 0 0 - 0x80040800, // 001A RET 1 R4 + &be_const_str_add_cmd, + &be_const_str_solidified, + ( &(const binstruction[15]) { /* code */ + 0x880C0100, // 0000 GETMBR R3 R0 K0 + 0x740E0002, // 0001 JMPT R3 #0005 + 0x600C0013, // 0002 GETGBL R3 G19 + 0x7C0C0000, // 0003 CALL R3 0 + 0x90020003, // 0004 SETMBR R0 K0 R3 + 0x600C0004, // 0005 GETGBL R3 G4 + 0x5C100400, // 0006 MOVE R4 R2 + 0x7C0C0200, // 0007 CALL R3 1 + 0x1C0C0701, // 0008 EQ R3 R3 K1 + 0x780E0002, // 0009 JMPF R3 #000D + 0x880C0100, // 000A GETMBR R3 R0 K0 + 0x980C0202, // 000B SETIDX R3 R1 R2 + 0x70020000, // 000C JMP #000E + 0xB0060503, // 000D RAISE 1 K2 K3 + 0x80000000, // 000E RET 0 }) ) ); /*******************************************************************/ + +/******************************************************************** +** Solidified function: add_rule +********************************************************************/ +be_local_closure(Tasmota_add_rule, /* name */ + be_nested_proto( + 9, /* nstack */ + 3, /* argc */ + 0, /* varg */ + 0, /* has upvals */ + NULL, /* no upvals */ + 0, /* has sup protos */ + NULL, /* no sub protos */ + 1, /* has constants */ + ( &(const bvalue[ 6]) { /* constants */ + /* K0 */ be_nested_str(_rules), + /* K1 */ be_nested_str(function), + /* K2 */ be_nested_str(push), + /* K3 */ be_nested_str(kv), + /* K4 */ be_nested_str(value_error), + /* K5 */ be_nested_str(the_X20second_X20argument_X20is_X20not_X20a_X20function), + }), + &be_const_str_add_rule, + &be_const_str_solidified, + ( &(const binstruction[20]) { /* code */ + 0x880C0100, // 0000 GETMBR R3 R0 K0 + 0x740E0002, // 0001 JMPT R3 #0005 + 0x600C0012, // 0002 GETGBL R3 G18 + 0x7C0C0000, // 0003 CALL R3 0 + 0x90020003, // 0004 SETMBR R0 K0 R3 + 0x600C0004, // 0005 GETGBL R3 G4 + 0x5C100400, // 0006 MOVE R4 R2 + 0x7C0C0200, // 0007 CALL R3 1 + 0x1C0C0701, // 0008 EQ R3 R3 K1 + 0x780E0007, // 0009 JMPF R3 #0012 + 0x880C0100, // 000A GETMBR R3 R0 K0 + 0x8C0C0702, // 000B GETMET R3 R3 K2 + 0x8C140103, // 000C GETMET R5 R0 K3 + 0x5C1C0200, // 000D MOVE R7 R1 + 0x5C200400, // 000E MOVE R8 R2 + 0x7C140600, // 000F CALL R5 3 + 0x7C0C0400, // 0010 CALL R3 2 + 0x70020000, // 0011 JMP #0013 + 0xB0060905, // 0012 RAISE 1 K4 K5 + 0x80000000, // 0013 RET 0 + }) + ) +); +/*******************************************************************/ + + +/******************************************************************** +** Solidified function: exec_rules +********************************************************************/ +be_local_closure(Tasmota_exec_rules, /* name */ + be_nested_proto( + 12, /* nstack */ + 2, /* argc */ + 0, /* varg */ + 0, /* has upvals */ + NULL, /* no upvals */ + 0, /* has sup protos */ + NULL, /* no sub protos */ + 1, /* has constants */ + ( &(const bvalue[12]) { /* constants */ + /* K0 */ be_nested_str(_rules), + /* K1 */ be_nested_str(cmd_res), + /* K2 */ be_nested_str(json), + /* K3 */ be_nested_str(load), + /* K4 */ be_nested_str(log), + /* K5 */ be_nested_str(BRY_X3A_X20ERROR_X2C_X20bad_X20json_X3A_X20), + /* K6 */ be_const_int(3), + /* K7 */ be_const_int(0), + /* K8 */ be_nested_str(try_rule), + /* K9 */ be_nested_str(k), + /* K10 */ be_nested_str(v), + /* K11 */ be_const_int(1), + }), + &be_const_str_exec_rules, + &be_const_str_solidified, + ( &(const binstruction[48]) { /* code */ + 0x88080100, // 0000 GETMBR R2 R0 K0 + 0x740A0003, // 0001 JMPT R2 #0006 + 0x88080101, // 0002 GETMBR R2 R0 K1 + 0x4C0C0000, // 0003 LDNIL R3 + 0x20080403, // 0004 NE R2 R2 R3 + 0x780A0027, // 0005 JMPF R2 #002E + 0xA40A0400, // 0006 IMPORT R2 K2 + 0x8C0C0503, // 0007 GETMET R3 R2 K3 + 0x5C140200, // 0008 MOVE R5 R1 + 0x7C0C0400, // 0009 CALL R3 2 + 0x50100000, // 000A LDBOOL R4 0 0 + 0x4C140000, // 000B LDNIL R5 + 0x1C140605, // 000C EQ R5 R3 R5 + 0x78160004, // 000D JMPF R5 #0013 + 0x8C140104, // 000E GETMET R5 R0 K4 + 0x001E0A01, // 000F ADD R7 K5 R1 + 0x58200006, // 0010 LDCONST R8 K6 + 0x7C140600, // 0011 CALL R5 3 + 0x5C0C0200, // 0012 MOVE R3 R1 + 0x88140101, // 0013 GETMBR R5 R0 K1 + 0x4C180000, // 0014 LDNIL R6 + 0x20140A06, // 0015 NE R5 R5 R6 + 0x78160000, // 0016 JMPF R5 #0018 + 0x90020203, // 0017 SETMBR R0 K1 R3 + 0x88140100, // 0018 GETMBR R5 R0 K0 + 0x78160012, // 0019 JMPF R5 #002D + 0x58140007, // 001A LDCONST R5 K7 + 0x6018000C, // 001B GETGBL R6 G12 + 0x881C0100, // 001C GETMBR R7 R0 K0 + 0x7C180200, // 001D CALL R6 1 + 0x14180A06, // 001E LT R6 R5 R6 + 0x781A000C, // 001F JMPF R6 #002D + 0x88180100, // 0020 GETMBR R6 R0 K0 + 0x94180C05, // 0021 GETIDX R6 R6 R5 + 0x8C1C0108, // 0022 GETMET R7 R0 K8 + 0x5C240600, // 0023 MOVE R9 R3 + 0x88280D09, // 0024 GETMBR R10 R6 K9 + 0x882C0D0A, // 0025 GETMBR R11 R6 K10 + 0x7C1C0800, // 0026 CALL R7 4 + 0x741E0001, // 0027 JMPT R7 #002A + 0x74120000, // 0028 JMPT R4 #002A + 0x50100001, // 0029 LDBOOL R4 0 1 + 0x50100200, // 002A LDBOOL R4 1 0 + 0x00140B0B, // 002B ADD R5 R5 K11 + 0x7001FFED, // 002C JMP #001B + 0x80040800, // 002D RET 1 R4 + 0x50080000, // 002E LDBOOL R2 0 0 + 0x80040400, // 002F RET 1 R2 + }) + ) +); +/*******************************************************************/ + + /******************************************************************** ** Solidified function: hs2rgb ********************************************************************/ -be_local_closure(hs2rgb, /* name */ +be_local_closure(Tasmota_hs2rgb, /* name */ be_nested_proto( 17, /* nstack */ 3, /* argc */ @@ -1970,14 +1585,14 @@ be_local_closure(hs2rgb, /* name */ 1, /* has constants */ ( &(const bvalue[ 6]) { /* constants */ /* K0 */ be_const_int(0), - /* K1 */ be_nested_string("tasmota", 424643812, 7), - /* K2 */ be_nested_string("scale_uint", -1204156202, 10), + /* K1 */ be_nested_str(tasmota), + /* K2 */ be_nested_str(scale_uint), /* K3 */ be_const_int(1), /* K4 */ be_const_int(2), /* K5 */ be_const_int(3), }), - (be_nested_const_str("hs2rgb", 1040816349, 6)), - ((bstring*) &be_const_str_input), + &be_const_str_hs2rgb, + &be_const_str_solidified, ( &(const binstruction[68]) { /* code */ 0x4C0C0000, // 0000 LDNIL R3 0x1C0C0403, // 0001 EQ R3 R2 R3 @@ -2052,6 +1667,312 @@ be_local_closure(hs2rgb, /* name */ ); /*******************************************************************/ + +/******************************************************************** +** Solidified function: init +********************************************************************/ +be_local_closure(KV_init, /* name */ + be_nested_proto( + 3, /* nstack */ + 3, /* argc */ + 0, /* varg */ + 0, /* has upvals */ + NULL, /* no upvals */ + 0, /* has sup protos */ + NULL, /* no sub protos */ + 1, /* has constants */ + ( &(const bvalue[ 2]) { /* constants */ + /* K0 */ be_nested_str(k), + /* K1 */ be_nested_str(v), + }), + &be_const_str_init, + &be_const_str_solidified, + ( &(const binstruction[ 3]) { /* code */ + 0x90020001, // 0000 SETMBR R0 K0 R1 + 0x90020202, // 0001 SETMBR R0 K1 R2 + 0x80000000, // 0002 RET 0 + }) + ) +); +/*******************************************************************/ + + +/******************************************************************** +** Solidified class: KV +********************************************************************/ +be_local_class(KV, + 2, + NULL, + be_nested_map(3, + ( (struct bmapnode*) &(const bmapnode[]) { + { be_const_key(k, 2), be_const_var(0) }, + { be_const_key(v, -1), be_const_var(1) }, + { be_const_key(init, -1), be_const_closure(KV_init_closure) }, + })), + be_str_literal("KV") +); + +/******************************************************************** +** Solidified function: kv +********************************************************************/ +be_local_closure(Tasmota_kv, /* name */ + be_nested_proto( + 7, /* nstack */ + 3, /* argc */ + 0, /* varg */ + 0, /* has upvals */ + NULL, /* no upvals */ + 0, /* has sup protos */ + NULL, /* no sub protos */ + 1, /* has constants */ + ( &(const bvalue[ 1]) { /* constants */ + /* K0 */ be_const_class(be_class_KV), + }), + &be_const_str_kv, + &be_const_str_solidified, + ( &(const binstruction[ 7]) { /* code */ + 0x580C0000, // 0000 LDCONST R3 K0 + 0xB4000000, // 0001 CLASS K0 + 0x5C100600, // 0002 MOVE R4 R3 + 0x5C140200, // 0003 MOVE R5 R1 + 0x5C180400, // 0004 MOVE R6 R2 + 0x7C100400, // 0005 CALL R4 2 + 0x80040800, // 0006 RET 1 R4 + }) + ) +); +/*******************************************************************/ + + +/******************************************************************** +** Solidified function: remove_cmd +********************************************************************/ +be_local_closure(Tasmota_remove_cmd, /* name */ + be_nested_proto( + 5, /* nstack */ + 2, /* argc */ + 0, /* varg */ + 0, /* has upvals */ + NULL, /* no upvals */ + 0, /* has sup protos */ + NULL, /* no sub protos */ + 1, /* has constants */ + ( &(const bvalue[ 2]) { /* constants */ + /* K0 */ be_nested_str(_ccmd), + /* K1 */ be_nested_str(remove), + }), + &be_const_str_remove_cmd, + &be_const_str_solidified, + ( &(const binstruction[ 7]) { /* code */ + 0x88080100, // 0000 GETMBR R2 R0 K0 + 0x780A0003, // 0001 JMPF R2 #0006 + 0x88080100, // 0002 GETMBR R2 R0 K0 + 0x8C080501, // 0003 GETMET R2 R2 K1 + 0x5C100200, // 0004 MOVE R4 R1 + 0x7C080400, // 0005 CALL R2 2 + 0x80000000, // 0006 RET 0 + }) + ) +); +/*******************************************************************/ + + +/******************************************************************** +** Solidified function: set_timer +********************************************************************/ +be_local_closure(Tasmota_set_timer, /* name */ + be_nested_proto( + 10, /* nstack */ + 4, /* argc */ + 0, /* varg */ + 0, /* has upvals */ + NULL, /* no upvals */ + 0, /* has sup protos */ + NULL, /* no sub protos */ + 1, /* has constants */ + ( &(const bvalue[ 4]) { /* constants */ + /* K0 */ be_nested_str(_timers), + /* K1 */ be_nested_str(push), + /* K2 */ be_nested_str(Timer), + /* K3 */ be_nested_str(millis), + }), + &be_const_str_set_timer, + &be_const_str_solidified, + ( &(const binstruction[16]) { /* code */ + 0x88100100, // 0000 GETMBR R4 R0 K0 + 0x74120002, // 0001 JMPT R4 #0005 + 0x60100012, // 0002 GETGBL R4 G18 + 0x7C100000, // 0003 CALL R4 0 + 0x90020004, // 0004 SETMBR R0 K0 R4 + 0x88100100, // 0005 GETMBR R4 R0 K0 + 0x8C100901, // 0006 GETMET R4 R4 K1 + 0xB81A0400, // 0007 GETNGBL R6 K2 + 0x8C1C0103, // 0008 GETMET R7 R0 K3 + 0x5C240200, // 0009 MOVE R9 R1 + 0x7C1C0400, // 000A CALL R7 2 + 0x5C200400, // 000B MOVE R8 R2 + 0x5C240600, // 000C MOVE R9 R3 + 0x7C180600, // 000D CALL R6 3 + 0x7C100400, // 000E CALL R4 2 + 0x80000000, // 000F RET 0 + }) + ) +); +/*******************************************************************/ + + +/******************************************************************** +** Solidified function: remove_timer +********************************************************************/ +be_local_closure(Tasmota_remove_timer, /* name */ + be_nested_proto( + 6, /* nstack */ + 2, /* argc */ + 0, /* varg */ + 0, /* has upvals */ + NULL, /* no upvals */ + 0, /* has sup protos */ + NULL, /* no sub protos */ + 1, /* has constants */ + ( &(const bvalue[ 7]) { /* constants */ + /* K0 */ be_nested_str(tasmota), + /* K1 */ be_nested_str(_timers), + /* K2 */ be_const_int(0), + /* K3 */ be_nested_str(size), + /* K4 */ be_nested_str(id), + /* K5 */ be_nested_str(remove), + /* K6 */ be_const_int(1), + }), + &be_const_str_remove_timer, + &be_const_str_solidified, + ( &(const binstruction[23]) { /* code */ + 0xB80A0000, // 0000 GETNGBL R2 K0 + 0x88080501, // 0001 GETMBR R2 R2 K1 + 0x780A0012, // 0002 JMPF R2 #0016 + 0x58080002, // 0003 LDCONST R2 K2 + 0xB80E0000, // 0004 GETNGBL R3 K0 + 0x880C0701, // 0005 GETMBR R3 R3 K1 + 0x8C0C0703, // 0006 GETMET R3 R3 K3 + 0x7C0C0200, // 0007 CALL R3 1 + 0x140C0403, // 0008 LT R3 R2 R3 + 0x780E000B, // 0009 JMPF R3 #0016 + 0x880C0101, // 000A GETMBR R3 R0 K1 + 0x940C0602, // 000B GETIDX R3 R3 R2 + 0x880C0704, // 000C GETMBR R3 R3 K4 + 0x1C0C0601, // 000D EQ R3 R3 R1 + 0x780E0004, // 000E JMPF R3 #0014 + 0x880C0101, // 000F GETMBR R3 R0 K1 + 0x8C0C0705, // 0010 GETMET R3 R3 K5 + 0x5C140400, // 0011 MOVE R5 R2 + 0x7C0C0400, // 0012 CALL R3 2 + 0x70020000, // 0013 JMP #0015 + 0x00080506, // 0014 ADD R2 R2 K6 + 0x7001FFED, // 0015 JMP #0004 + 0x80000000, // 0016 RET 0 + }) + ) +); +/*******************************************************************/ + + +/******************************************************************** +** Solidified function: exec_cmd +********************************************************************/ +be_local_closure(Tasmota_exec_cmd, /* name */ + be_nested_proto( + 12, /* nstack */ + 4, /* argc */ + 0, /* varg */ + 0, /* has upvals */ + NULL, /* no upvals */ + 0, /* has sup protos */ + NULL, /* no sub protos */ + 1, /* has constants */ + ( &(const bvalue[ 5]) { /* constants */ + /* K0 */ be_nested_str(_ccmd), + /* K1 */ be_nested_str(json), + /* K2 */ be_nested_str(load), + /* K3 */ be_nested_str(find_key_i), + /* K4 */ be_nested_str(resolvecmnd), + }), + &be_const_str_exec_cmd, + &be_const_str_solidified, + ( &(const binstruction[27]) { /* code */ + 0x88100100, // 0000 GETMBR R4 R0 K0 + 0x78120016, // 0001 JMPF R4 #0019 + 0xA4120200, // 0002 IMPORT R4 K1 + 0x8C140902, // 0003 GETMET R5 R4 K2 + 0x5C1C0600, // 0004 MOVE R7 R3 + 0x7C140400, // 0005 CALL R5 2 + 0x8C180103, // 0006 GETMET R6 R0 K3 + 0x88200100, // 0007 GETMBR R8 R0 K0 + 0x5C240200, // 0008 MOVE R9 R1 + 0x7C180600, // 0009 CALL R6 3 + 0x4C1C0000, // 000A LDNIL R7 + 0x201C0C07, // 000B NE R7 R6 R7 + 0x781E000B, // 000C JMPF R7 #0019 + 0x8C1C0104, // 000D GETMET R7 R0 K4 + 0x5C240C00, // 000E MOVE R9 R6 + 0x7C1C0400, // 000F CALL R7 2 + 0x881C0100, // 0010 GETMBR R7 R0 K0 + 0x941C0E06, // 0011 GETIDX R7 R7 R6 + 0x5C200C00, // 0012 MOVE R8 R6 + 0x5C240400, // 0013 MOVE R9 R2 + 0x5C280600, // 0014 MOVE R10 R3 + 0x5C2C0A00, // 0015 MOVE R11 R5 + 0x7C1C0800, // 0016 CALL R7 4 + 0x501C0200, // 0017 LDBOOL R7 1 0 + 0x80040E00, // 0018 RET 1 R7 + 0x50100000, // 0019 LDBOOL R4 0 0 + 0x80040800, // 001A RET 1 R4 + }) + ) +); +/*******************************************************************/ + + +/******************************************************************** +** Solidified function: get_light +********************************************************************/ +be_local_closure(Tasmota_get_light, /* name */ + be_nested_proto( + 6, /* nstack */ + 2, /* argc */ + 0, /* varg */ + 0, /* has upvals */ + NULL, /* no upvals */ + 0, /* has sup protos */ + NULL, /* no sub protos */ + 1, /* has constants */ + ( &(const bvalue[ 3]) { /* constants */ + /* K0 */ be_nested_str(tasmota_X2Eget_light_X28_X29_X20is_X20deprecated_X2C_X20use_X20light_X2Eget_X28_X29), + /* K1 */ be_nested_str(light), + /* K2 */ be_nested_str(get), + }), + &be_const_str_get_light, + &be_const_str_solidified, + ( &(const binstruction[16]) { /* code */ + 0x60080001, // 0000 GETGBL R2 G1 + 0x580C0000, // 0001 LDCONST R3 K0 + 0x7C080200, // 0002 CALL R2 1 + 0xA40A0200, // 0003 IMPORT R2 K1 + 0x4C0C0000, // 0004 LDNIL R3 + 0x200C0203, // 0005 NE R3 R1 R3 + 0x780E0004, // 0006 JMPF R3 #000C + 0x8C0C0502, // 0007 GETMET R3 R2 K2 + 0x5C140200, // 0008 MOVE R5 R1 + 0x7C0C0400, // 0009 CALL R3 2 + 0x80040600, // 000A RET 1 R3 + 0x70020002, // 000B JMP #000F + 0x8C0C0502, // 000C GETMET R3 R2 K2 + 0x7C0C0200, // 000D CALL R3 1 + 0x80040600, // 000E RET 1 R3 + 0x80000000, // 000F RET 0 + }) + ) +); +/*******************************************************************/ + #include "../generate/be_fixed_be_class_tasmota.h" @@ -2069,7 +1990,6 @@ class be_class_tasmota (scope: global, name: Tasmota) { _timers, var _ccmd, var _drivers, var - _cb, var wire1, var wire2, var global, var @@ -2083,21 +2003,21 @@ class be_class_tasmota (scope: global, name: Tasmota) { _global_addr, comptr(&TasmotaGlobal) _settings_ptr, comptr(&Settings) - init, closure(init_closure) - kv, closure(kv_closure) + init, closure(Tasmota_init_closure) + kv, closure(Tasmota_kv_closure) get_free_heap, func(l_getFreeHeap) arch, func(l_arch) publish, func(l_publish) publish_result, func(l_publish_result) _cmd, func(l_cmd) - _get_cb, func(l_get_cb) get_option, func(l_getoption) millis, func(l_millis) time_reached, func(l_timereached) rtc, func(l_rtc) time_dump, func(l_time_dump) strftime, func(l_strftime) + strptime, func(l_strptime) memory, func(l_memory) wifi, func(l_wifi) eth, func(l_eth) @@ -2126,35 +2046,34 @@ class be_class_tasmota (scope: global, name: Tasmota) { i2c_enabled, func(l_i2cenabled) - cmd, closure(cmd_closure) - chars_in_string, closure(chars_in_string_closure) - find_key_i, closure(find_key_i_closure) - find_op, closure(find_op_closure) - add_rule, closure(add_rule_closure) - remove_rule, closure(remove_rule_closure) - try_rule, closure(try_rule_closure) - exec_rules, closure(exec_rules_closure) - exec_tele, closure(exec_tele_closure) - set_timer, closure(set_timer_closure) - run_deferred, closure(run_deferred_closure) - remove_timer, closure(remove_timer_closure) - add_cmd, closure(add_cmd_closure) - remove_cmd, closure(remove_cmd_closure) - exec_cmd, closure(exec_cmd_closure) - gc, closure(gc_closure) - event, closure(event_closure) - add_driver, closure(add_driver_closure) - remove_driver, closure(remove_driver_closure) - load, closure(load_closure) - wire_scan, closure(wire_scan_closure) - time_str, closure(time_str_closure) + cmd, closure(Tasmota_cmd_closure) + chars_in_string, closure(Tasmota_chars_in_string_closure) + find_key_i, closure(Tasmota_find_key_i_closure) + find_op, closure(Tasmota_find_op_closure) + add_rule, closure(Tasmota_add_rule_closure) + remove_rule, closure(Tasmota_remove_rule_closure) + try_rule, closure(Tasmota_try_rule_closure) + exec_rules, closure(Tasmota_exec_rules_closure) + exec_tele, closure(Tasmota_exec_tele_closure) + set_timer, closure(Tasmota_set_timer_closure) + run_deferred, closure(Tasmota_run_deferred_closure) + remove_timer, closure(Tasmota_remove_timer_closure) + add_cmd, closure(Tasmota_add_cmd_closure) + remove_cmd, closure(Tasmota_remove_cmd_closure) + exec_cmd, closure(Tasmota_exec_cmd_closure) + gc, closure(Tasmota_gc_closure) + event, closure(Tasmota_event_closure) + add_driver, closure(Tasmota_add_driver_closure) + remove_driver, closure(Tasmota_remove_driver_closure) + load, closure(Tasmota_load_closure) + wire_scan, closure(Tasmota_wire_scan_closure) + time_str, closure(Tasmota_time_str_closure) - hs2rgb, closure(hs2rgb_closure) + hs2rgb, closure(Tasmota_hs2rgb_closure) - cb_dispatch, closure(cb_dispatch_closure) - gen_cb, closure(gen_cb_closure) + gen_cb, closure(Tasmota_gen_cb_closure) - get_light, closure(get_light_closure) - set_light, closure(set_light_closure) + get_light, closure(Tasmota_get_light_closure) + set_light, closure(Tasmota_set_light_closure) } @const_object_info_end */ diff --git a/lib/libesp32/berry/default/be_tcpclient_lib.c b/lib/libesp32/berry/default/be_tcpclient_lib.c new file mode 100644 index 000000000..b39db458e --- /dev/null +++ b/lib/libesp32/berry/default/be_tcpclient_lib.c @@ -0,0 +1,48 @@ +/******************************************************************** + * Webclient mapped to Arduino framework + * + * To use: `d = webclient()` + * + *******************************************************************/ +#include "be_constobj.h" + +#ifdef USE_WEBCLIENT + +extern int wc_tcp_init(bvm *vm); +extern int wc_tcp_deinit(bvm *vm); + +extern int wc_tcp_connect(bvm *vm); +extern int wc_tcp_connected(bvm *vm); +extern int wc_tcp_close(bvm *vm); +extern int wc_tcp_available(bvm *vm); + +extern int wc_tcp_write(bvm *vm); +extern int wc_tcp_read(bvm *vm); +extern int wc_tcp_readbytes(bvm *vm); + +#include "../generate/be_fixed_be_class_tcpclient.h" + +void be_load_tcpclient_lib(bvm *vm) { + be_pushntvclass(vm, &be_class_tcpclient); + be_setglobal(vm, "tcpclient"); + be_pop(vm, 1); +} +/* @const_object_info_begin + +class be_class_tcpclient (scope: global, name: tcpclient) { + .w, var + init, func(wc_tcp_init) + deinit, func(wc_tcp_deinit) + + connect, func(wc_tcp_connect) + connected, func(wc_tcp_connected) + close, func(wc_tcp_close) + available, func(wc_tcp_available) + + write, func(wc_tcp_write) + read, func(wc_tcp_read) + readbytes, func(wc_tcp_readbytes) +} +@const_object_info_end */ + +#endif // USE_WEBCLIENT diff --git a/lib/libesp32/Berry/default/be_timer_class.c b/lib/libesp32/berry/default/be_timer_class.c similarity index 50% rename from lib/libesp32/Berry/default/be_timer_class.c rename to lib/libesp32/berry/default/be_timer_class.c index 2646fd6b2..6664e408e 100644 --- a/lib/libesp32/Berry/default/be_timer_class.c +++ b/lib/libesp32/berry/default/be_timer_class.c @@ -8,7 +8,7 @@ /******************************************************************** ** Solidified function: tostring ********************************************************************/ -be_local_closure(tostring, /* name */ +be_local_closure(Timer_tostring, /* name */ be_nested_proto( 10, /* nstack */ 1, /* argc */ @@ -19,35 +19,35 @@ be_local_closure(tostring, /* name */ NULL, /* no sub protos */ 1, /* has constants */ ( &(const bvalue[ 6]) { /* constants */ - /* K0 */ be_nested_string("string", 398550328, 6), - /* K1 */ be_nested_string("format", -1180859054, 6), - /* K2 */ be_nested_string(" f(self, cmd, idx, payload, payload_json)) end diff --git a/lib/libesp32/Berry/default/embedded/Tasmota.be b/lib/libesp32/berry/default/embedded/Tasmota.be similarity index 96% rename from lib/libesp32/Berry/default/embedded/Tasmota.be rename to lib/libesp32/berry/default/embedded/Tasmota.be index 3305d57ff..22752a47d 100644 --- a/lib/libesp32/Berry/default/embedded/Tasmota.be +++ b/lib/libesp32/berry/default/embedded/Tasmota.be @@ -21,7 +21,6 @@ class Tasmota var _timers var _ccmd var _drivers - var _cb var wire1 var wire2 var cmd_res # store the command result, nil if disables, true if capture enabled, contains return value @@ -520,28 +519,11 @@ class Tasmota end end - - #- dispatch callback number n, with parameters v0,v1,v2,v3 -# - def cb_dispatch(n,v0,v1,v2,v3) - if self._cb == nil return 0 end - var f = self._cb.find(n) - if f != nil - return f(v0,v1,v2,v3) - end - return 0 - end - #- generate a new C callback and record the associated Berry closure -# def gen_cb(f) - if self._cb == nil self._cb = {} end # create map if not already initialized - for i:0..19 - if self._cb.find(i) == nil - #- free slot -# - self._cb[i] = f - return self._get_cb(i) - end - end - raise "internal_error", "No callback available" + # DEPRECATED + import cb + return cb.gen_cb(f) end #- convert hue/sat to rgb -# diff --git a/lib/libesp32/Berry/default/embedded/Wire.be b/lib/libesp32/berry/default/embedded/Wire.be similarity index 100% rename from lib/libesp32/Berry/default/embedded/Wire.be rename to lib/libesp32/berry/default/embedded/Wire.be diff --git a/lib/libesp32/Berry/default/embedded/autoconf.be b/lib/libesp32/berry/default/embedded/autoconf.be similarity index 100% rename from lib/libesp32/Berry/default/embedded/autoconf.be rename to lib/libesp32/berry/default/embedded/autoconf.be diff --git a/lib/libesp32/Berry/default/embedded/i2c_axp192.be b/lib/libesp32/berry/default/embedded/i2c_axp192.be similarity index 99% rename from lib/libesp32/Berry/default/embedded/i2c_axp192.be rename to lib/libesp32/berry/default/embedded/i2c_axp192.be index 3d958334f..d762b0363 100644 --- a/lib/libesp32/Berry/default/embedded/i2c_axp192.be +++ b/lib/libesp32/berry/default/embedded/i2c_axp192.be @@ -153,7 +153,7 @@ class AXP192 : I2C_Driver "{s}Batt Voltage{m}%.3f V{e}".. "{s}Batt Current{m}%.1f mA{e}".. #"{s}Batt Power{m}%.3f{e}".. - "{s}Temp AXP{m}%.1f °C{e}", + "{s}Temp AXP{m}%.1f °C{e}", self.get_vbus_voltage(), self.get_vbus_voltage(), self.get_bat_voltage(), self.get_bat_current(), #self.get_bat_power(), diff --git a/lib/libesp32/Berry/default/embedded/i2c_driver.be b/lib/libesp32/berry/default/embedded/i2c_driver.be similarity index 96% rename from lib/libesp32/Berry/default/embedded/i2c_driver.be rename to lib/libesp32/berry/default/embedded/i2c_driver.be index a3210b766..816a4d9be 100644 --- a/lib/libesp32/Berry/default/embedded/i2c_driver.be +++ b/lib/libesp32/berry/default/embedded/i2c_driver.be @@ -14,7 +14,7 @@ - i2c_index: (optional) check is the device is not disabled -------------------------------------------------------------# -class I2C_Driver : Driver +class I2C_Driver var wire #- wire object to reach the device, if nil then the module is not initialized -# var addr #- I2C address of the device -# var name #- model namme of the device, cannot be nil -# @@ -29,8 +29,6 @@ class I2C_Driver : Driver - i2c_index : Tasmota I2C index, see `I2CDEVICES.md` (int) --# def init(name_or_detect, addr, i2c_index) - var tasmota = self.get_tasmota() #- retrieve the 'tasmota' singleton -# - #- check if the i2c index is disabled by Tasmota configuration -# if i2c_index != nil && !tasmota.i2c_enabled(i2c_index) return end diff --git a/lib/libesp32/Berry/default/embedded/leds.be b/lib/libesp32/berry/default/embedded/leds.be similarity index 100% rename from lib/libesp32/Berry/default/embedded/leds.be rename to lib/libesp32/berry/default/embedded/leds.be diff --git a/lib/libesp32/Berry/default/embedded/leds_animator.be b/lib/libesp32/berry/default/embedded/leds_animator.be similarity index 100% rename from lib/libesp32/Berry/default/embedded/leds_animator.be rename to lib/libesp32/berry/default/embedded/leds_animator.be diff --git a/lib/libesp32/Berry/default/embedded/lv_clock_icon.be b/lib/libesp32/berry/default/embedded/lv_clock_icon.be similarity index 100% rename from lib/libesp32/Berry/default/embedded/lv_clock_icon.be rename to lib/libesp32/berry/default/embedded/lv_clock_icon.be diff --git a/lib/libesp32/Berry/default/embedded/lv_signal_arcs.be b/lib/libesp32/berry/default/embedded/lv_signal_arcs.be similarity index 100% rename from lib/libesp32/Berry/default/embedded/lv_signal_arcs.be rename to lib/libesp32/berry/default/embedded/lv_signal_arcs.be diff --git a/lib/libesp32/Berry/default/embedded/lv_signal_bars.be b/lib/libesp32/berry/default/embedded/lv_signal_bars.be similarity index 100% rename from lib/libesp32/Berry/default/embedded/lv_signal_bars.be rename to lib/libesp32/berry/default/embedded/lv_signal_bars.be diff --git a/lib/libesp32/Berry/default/embedded/lvgl_glob.be b/lib/libesp32/berry/default/embedded/lvgl_glob.be similarity index 94% rename from lib/libesp32/Berry/default/embedded/lvgl_glob.be rename to lib/libesp32/berry/default/embedded/lvgl_glob.be index f7f6b8e84..17a62bf31 100644 --- a/lib/libesp32/Berry/default/embedded/lvgl_glob.be +++ b/lib/libesp32/berry/default/embedded/lvgl_glob.be @@ -23,8 +23,7 @@ class LVGL_glob #- register an lv.lv_* object in the mapping -# def register_obj(obj) if self.cb_obj == nil self.cb_obj = {} end - var native_ptr = int(obj._p) - self.cb_obj[native_ptr] = obj + self.cb_obj[obj._p] = obj end def get_object_from_ptr(ptr) @@ -38,27 +37,28 @@ class LVGL_glob var event = lv.lv_event(introspect.toptr(event_ptr)) - var target = int(event.target) + var target = event.target var f = self.cb_event_closure[target] var obj = self.get_object_from_ptr(target) #print('>> lvgl_event_dispatch', f, obj, event) f(obj, event) end - def gen_cb(name, f, obj, ptr) - #print('>> gen_cb', name, obj, ptr) + def gen_cb(f, obj, name) + import cb + # print('>> gen_cb', f, name, obj) # record the object, whatever the callback if name == "lv_event_cb" if self.cb_event_closure == nil self.cb_event_closure = {} end - if self.event_cb == nil self.event_cb = tasmota.gen_cb(/ event_ptr -> self.lvgl_event_dispatch(event_ptr)) end # encapsulate 'self' in closure + if self.event_cb == nil self.event_cb = cb.gen_cb(/ event_ptr -> self.lvgl_event_dispatch(event_ptr)) end # encapsulate 'self' in closure self.register_obj(obj) - self.cb_event_closure[ptr] = f + self.cb_event_closure[obj._p] = f return self.event_cb # elif name == "" else - if self.null_cb == nil self.null_cb = tasmota.gen_cb(self.cb_do_nothing) end + if self.null_cb == nil self.null_cb = cb.gen_cb(self.cb_do_nothing) end return self.null_cb end end @@ -87,7 +87,7 @@ class LVGL_glob var cl = lv.lv_obj_class(cl_ptr) var event = lv.lv_event(e_ptr) var obj_ptr = event.target - var obj = self.get_object_from_ptr(int(obj_ptr)) + var obj = self.get_object_from_ptr(obj_ptr) if type(obj) == 'instance' && introspect.get(obj, 'widget_event') obj.widget_event(cl, event) end diff --git a/lib/libesp32/Berry/default/embedded/openhasp.be b/lib/libesp32/berry/default/embedded/openhasp.be similarity index 100% rename from lib/libesp32/Berry/default/embedded/openhasp.be rename to lib/libesp32/berry/default/embedded/openhasp.be diff --git a/lib/libesp32/Berry/default/embedded/openhasp/demo-all.jsonl b/lib/libesp32/berry/default/embedded/openhasp/demo-all.jsonl similarity index 100% rename from lib/libesp32/Berry/default/embedded/openhasp/demo-all.jsonl rename to lib/libesp32/berry/default/embedded/openhasp/demo-all.jsonl diff --git a/lib/libesp32/Berry/default/embedded/openhasp/demo1.jsonl b/lib/libesp32/berry/default/embedded/openhasp/demo1.jsonl similarity index 100% rename from lib/libesp32/Berry/default/embedded/openhasp/demo1.jsonl rename to lib/libesp32/berry/default/embedded/openhasp/demo1.jsonl diff --git a/lib/libesp32/Berry/default/embedded/openhasp/demo2.jsonl b/lib/libesp32/berry/default/embedded/openhasp/demo2.jsonl similarity index 100% rename from lib/libesp32/Berry/default/embedded/openhasp/demo2.jsonl rename to lib/libesp32/berry/default/embedded/openhasp/demo2.jsonl diff --git a/lib/libesp32/Berry/default/embedded/openhasp/demo3.jsonl b/lib/libesp32/berry/default/embedded/openhasp/demo3.jsonl similarity index 100% rename from lib/libesp32/Berry/default/embedded/openhasp/demo3.jsonl rename to lib/libesp32/berry/default/embedded/openhasp/demo3.jsonl diff --git a/lib/libesp32/Berry/default/embedded/persist.be b/lib/libesp32/berry/default/embedded/persist.be similarity index 100% rename from lib/libesp32/Berry/default/embedded/persist.be rename to lib/libesp32/berry/default/embedded/persist.be diff --git a/lib/libesp32/Berry/default/embedded/tapp.be b/lib/libesp32/berry/default/embedded/tapp.be similarity index 100% rename from lib/libesp32/Berry/default/embedded/tapp.be rename to lib/libesp32/berry/default/embedded/tapp.be diff --git a/lib/libesp32/Berry/default/embedded/test_crypto.be b/lib/libesp32/berry/default/embedded/test_crypto.be similarity index 100% rename from lib/libesp32/Berry/default/embedded/test_crypto.be rename to lib/libesp32/berry/default/embedded/test_crypto.be diff --git a/lib/libesp32/Berry/default/static_block.hpp b/lib/libesp32/berry/default/static_block.hpp similarity index 100% rename from lib/libesp32/Berry/default/static_block.hpp rename to lib/libesp32/berry/default/static_block.hpp diff --git a/lib/libesp32/Berry/examples/anon_func.be b/lib/libesp32/berry/examples/anon_func.be similarity index 100% rename from lib/libesp32/Berry/examples/anon_func.be rename to lib/libesp32/berry/examples/anon_func.be diff --git a/lib/libesp32/Berry/examples/bigloop.be b/lib/libesp32/berry/examples/bigloop.be similarity index 100% rename from lib/libesp32/Berry/examples/bigloop.be rename to lib/libesp32/berry/examples/bigloop.be diff --git a/lib/libesp32/Berry/examples/bintree.be b/lib/libesp32/berry/examples/bintree.be similarity index 100% rename from lib/libesp32/Berry/examples/bintree.be rename to lib/libesp32/berry/examples/bintree.be diff --git a/lib/libesp32/Berry/examples/calcpi.be b/lib/libesp32/berry/examples/calcpi.be similarity index 100% rename from lib/libesp32/Berry/examples/calcpi.be rename to lib/libesp32/berry/examples/calcpi.be diff --git a/lib/libesp32/Berry/examples/exception.be b/lib/libesp32/berry/examples/exception.be similarity index 100% rename from lib/libesp32/Berry/examples/exception.be rename to lib/libesp32/berry/examples/exception.be diff --git a/lib/libesp32/Berry/examples/fib_rec.be b/lib/libesp32/berry/examples/fib_rec.be similarity index 100% rename from lib/libesp32/Berry/examples/fib_rec.be rename to lib/libesp32/berry/examples/fib_rec.be diff --git a/lib/libesp32/Berry/examples/guess_number.be b/lib/libesp32/berry/examples/guess_number.be similarity index 100% rename from lib/libesp32/Berry/examples/guess_number.be rename to lib/libesp32/berry/examples/guess_number.be diff --git a/lib/libesp32/Berry/examples/json.be b/lib/libesp32/berry/examples/json.be similarity index 100% rename from lib/libesp32/Berry/examples/json.be rename to lib/libesp32/berry/examples/json.be diff --git a/lib/libesp32/Berry/examples/lambda.be b/lib/libesp32/berry/examples/lambda.be similarity index 100% rename from lib/libesp32/Berry/examples/lambda.be rename to lib/libesp32/berry/examples/lambda.be diff --git a/lib/libesp32/Berry/examples/listdir.be b/lib/libesp32/berry/examples/listdir.be similarity index 100% rename from lib/libesp32/Berry/examples/listdir.be rename to lib/libesp32/berry/examples/listdir.be diff --git a/lib/libesp32/Berry/examples/qsort.be b/lib/libesp32/berry/examples/qsort.be similarity index 100% rename from lib/libesp32/Berry/examples/qsort.be rename to lib/libesp32/berry/examples/qsort.be diff --git a/lib/libesp32/Berry/examples/repl.be b/lib/libesp32/berry/examples/repl.be similarity index 100% rename from lib/libesp32/Berry/examples/repl.be rename to lib/libesp32/berry/examples/repl.be diff --git a/lib/libesp32/Berry/examples/string.be b/lib/libesp32/berry/examples/string.be similarity index 100% rename from lib/libesp32/Berry/examples/string.be rename to lib/libesp32/berry/examples/string.be diff --git a/lib/libesp32/Berry/examples/strmod.be b/lib/libesp32/berry/examples/strmod.be similarity index 100% rename from lib/libesp32/Berry/examples/strmod.be rename to lib/libesp32/berry/examples/strmod.be diff --git a/lib/libesp32/berry/gen.sh b/lib/libesp32/berry/gen.sh new file mode 100755 index 000000000..303a62c95 --- /dev/null +++ b/lib/libesp32/berry/gen.sh @@ -0,0 +1,2 @@ +#!/bin/bash +python3 tools/pycoc/main.py -o generate src default ../berry_mapping/src -c default/berry_conf.h diff --git a/lib/libesp32/berry/generate/be_const_strtab.h b/lib/libesp32/berry/generate/be_const_strtab.h new file mode 100644 index 000000000..cdf680ea3 --- /dev/null +++ b/lib/libesp32/berry/generate/be_const_strtab.h @@ -0,0 +1,739 @@ +extern const bcstring be_const_str_; +extern const bcstring be_const_str_AES_GCM; +extern const bcstring be_const_str_AXP192; +extern const bcstring be_const_str_Animate_X20pc_X20is_X20out_X20of_X20range; +extern const bcstring be_const_str_AudioFileSource; +extern const bcstring be_const_str_AudioFileSourceFS; +extern const bcstring be_const_str_AudioGenerator; +extern const bcstring be_const_str_AudioGeneratorMP3; +extern const bcstring be_const_str_AudioGeneratorWAV; +extern const bcstring be_const_str_AudioOutput; +extern const bcstring be_const_str_AudioOutputI2S; +extern const bcstring be_const_str_Auto_X2Dconfiguration; +extern const bcstring be_const_str_BRY_X3A_X20ERROR_X2C_X20bad_X20json_X3A_X20; +extern const bcstring be_const_str_BRY_X3A_X20Exception_X3E_X20_X27_X25s_X27_X20_X2D_X20_X25s; +extern const bcstring be_const_str_BRY_X3A_X20could_X20not_X20save_X20compiled_X20file_X20_X25s_X20_X28_X25s_X29; +extern const bcstring be_const_str_BRY_X3A_X20failed_X20to_X20load_X20_persist_X2Ejson; +extern const bcstring be_const_str_BUTTON_CONFIGURATION; +extern const bcstring be_const_str_CFG_X3A_X20Exception_X3E_X20_X27_X25s_X27_X20_X2D_X20_X25s; +extern const bcstring be_const_str_CFG_X3A_X20_X27init_X2Ebat_X27_X20done_X2C_X20restarting; +extern const bcstring be_const_str_CFG_X3A_X20could_X20not_X20run_X20_X25s_X20_X28_X25s_X20_X2D_X20_X25s_X29; +extern const bcstring be_const_str_CFG_X3A_X20downloading_X20_X27_X25s_X27; +extern const bcstring be_const_str_CFG_X3A_X20exception_X20_X27_X25s_X27_X20_X2D_X20_X27_X25s_X27; +extern const bcstring be_const_str_CFG_X3A_X20loaded_X20_X20; +extern const bcstring be_const_str_CFG_X3A_X20loaded_X20_X27_X25s_X27; +extern const bcstring be_const_str_CFG_X3A_X20loading_X20; +extern const bcstring be_const_str_CFG_X3A_X20loading_X20_X27_X25s_X27; +extern const bcstring be_const_str_CFG_X3A_X20multiple_X20autoconf_X20files_X20found_X2C_X20aborting_X20_X28_X27_X25s_X27_X20_X2B_X20_X27_X25s_X27_X29; +extern const bcstring be_const_str_CFG_X3A_X20no_X20_X27_X2A_X2Eautoconf_X27_X20file_X20found; +extern const bcstring be_const_str_CFG_X3A_X20ran_X20_X20; +extern const bcstring be_const_str_CFG_X3A_X20removed_X20file_X20_X27_X25s_X27; +extern const bcstring be_const_str_CFG_X3A_X20removing_X20autoconf_X20files; +extern const bcstring be_const_str_CFG_X3A_X20removing_X20first_X20time_X20marker; +extern const bcstring be_const_str_CFG_X3A_X20return_code_X3D_X25i; +extern const bcstring be_const_str_CFG_X3A_X20running_X20; +extern const bcstring be_const_str_CFG_X3A_X20skipping_X20_X27display_X2Eini_X27_X20because_X20already_X20present_X20in_X20file_X2Dsystem; +extern const bcstring be_const_str_COLOR_BLACK; +extern const bcstring be_const_str_COLOR_WHITE; +extern const bcstring be_const_str_EC_C25519; +extern const bcstring be_const_str_EVENT_DRAW_MAIN; +extern const bcstring be_const_str_EVENT_DRAW_PART_BEGIN; +extern const bcstring be_const_str_EVENT_DRAW_PART_END; +extern const bcstring be_const_str_False; +extern const bcstring be_const_str_GET; +extern const bcstring be_const_str_HTTP_GET; +extern const bcstring be_const_str_HTTP_POST; +extern const bcstring be_const_str_I2C_Driver; +extern const bcstring be_const_str_I2C_X3A; +extern const bcstring be_const_str_LVG_X3A_X20call_X20to_X20unsupported_X20callback; +extern const bcstring be_const_str_Leds; +extern const bcstring be_const_str_MD5; +extern const bcstring be_const_str_None; +extern const bcstring be_const_str_OPTION_A; +extern const bcstring be_const_str_OneWire; +extern const bcstring be_const_str_PART_MAIN; +extern const bcstring be_const_str_POST; +extern const bcstring be_const_str_Parameter_X20error; +extern const bcstring be_const_str_RES_OK; +extern const bcstring be_const_str_Restart_X201; +extern const bcstring be_const_str_SERIAL_5E1; +extern const bcstring be_const_str_SERIAL_5E2; +extern const bcstring be_const_str_SERIAL_5N1; +extern const bcstring be_const_str_SERIAL_5N2; +extern const bcstring be_const_str_SERIAL_5O1; +extern const bcstring be_const_str_SERIAL_5O2; +extern const bcstring be_const_str_SERIAL_6E1; +extern const bcstring be_const_str_SERIAL_6E2; +extern const bcstring be_const_str_SERIAL_6N1; +extern const bcstring be_const_str_SERIAL_6N2; +extern const bcstring be_const_str_SERIAL_6O1; +extern const bcstring be_const_str_SERIAL_6O2; +extern const bcstring be_const_str_SERIAL_7E1; +extern const bcstring be_const_str_SERIAL_7E2; +extern const bcstring be_const_str_SERIAL_7N1; +extern const bcstring be_const_str_SERIAL_7N2; +extern const bcstring be_const_str_SERIAL_7O1; +extern const bcstring be_const_str_SERIAL_7O2; +extern const bcstring be_const_str_SERIAL_8E1; +extern const bcstring be_const_str_SERIAL_8E2; +extern const bcstring be_const_str_SERIAL_8N1; +extern const bcstring be_const_str_SERIAL_8N2; +extern const bcstring be_const_str_SERIAL_8O1; +extern const bcstring be_const_str_SERIAL_8O2; +extern const bcstring be_const_str_SK6812_GRBW; +extern const bcstring be_const_str_STATE_DEFAULT; +extern const bcstring be_const_str_TAP_X3A_X20found_X20Tasmota_X20App_X20_X27_X25s_X27; +extern const bcstring be_const_str_Tasmota; +extern const bcstring be_const_str_Tele; +extern const bcstring be_const_str_Timer; +extern const bcstring be_const_str_True; +extern const bcstring be_const_str_Unknown_X20command; +extern const bcstring be_const_str_WS2812; +extern const bcstring be_const_str_WS2812_GRB; +extern const bcstring be_const_str_Wire; +extern const bcstring be_const_str__; +extern const bcstring be_const_str__X0A; +extern const bcstring be_const_str__X20; +extern const bcstring be_const_str__X21_X3D; +extern const bcstring be_const_str__X21_X3D_X3D; +extern const bcstring be_const_str__X23; +extern const bcstring be_const_str__X23autoexec_X2Ebat; +extern const bcstring be_const_str__X23autoexec_X2Ebe; +extern const bcstring be_const_str__X23display_X2Eini; +extern const bcstring be_const_str__X23init_X2Ebat; +extern const bcstring be_const_str__X23preinit_X2Ebe; +extern const bcstring be_const_str__X2502d_X25s_X2502d; +extern const bcstring be_const_str__X2504d_X2D_X2502d_X2D_X2502dT_X2502d_X3A_X2502d_X3A_X2502d; +extern const bcstring be_const_str__X25s_X2Eautoconf; +extern const bcstring be_const_str__X26lt_X3BError_X3A_X20apply_X20new_X20or_X20remove_X26gt_X3B; +extern const bcstring be_const_str__X26lt_X3BNone_X26gt_X3B; +extern const bcstring be_const_str__X28_X29; +extern const bcstring be_const_str__X2B; +extern const bcstring be_const_str__X2C; +extern const bcstring be_const_str__X2D_X2D_X3A_X2D_X2D; +extern const bcstring be_const_str__X2E; +extern const bcstring be_const_str__X2E_X2E; +extern const bcstring be_const_str__X2Eautoconf; +extern const bcstring be_const_str__X2Ebe; +extern const bcstring be_const_str__X2Ebec; +extern const bcstring be_const_str__X2Elen; +extern const bcstring be_const_str__X2Ep; +extern const bcstring be_const_str__X2Ep1; +extern const bcstring be_const_str__X2Ep2; +extern const bcstring be_const_str__X2Esize; +extern const bcstring be_const_str__X2Etapp; +extern const bcstring be_const_str__X2Ew; +extern const bcstring be_const_str__X2F; +extern const bcstring be_const_str__X2F_X2Eautoconf; +extern const bcstring be_const_str__X2F_X3Frst_X3D; +extern const bcstring be_const_str__X2Fac; +extern const bcstring be_const_str__X3A; +extern const bcstring be_const_str__X3C; +extern const bcstring be_const_str__X3C_X2Fform_X3E_X3C_X2Fp_X3E; +extern const bcstring be_const_str__X3C_X2Fselect_X3E_X3Cp_X3E_X3C_X2Fp_X3E; +extern const bcstring be_const_str__X3C_X3D; +extern const bcstring be_const_str__X3Cbutton_X20name_X3D_X27reapply_X27_X20class_X3D_X27button_X20bgrn_X27_X3ERe_X2Dapply_X20current_X20configuration_X3C_X2Fbutton_X3E; +extern const bcstring be_const_str__X3Cbutton_X20name_X3D_X27zipapply_X27_X20class_X3D_X27button_X20bgrn_X27_X3EApply_X20configuration_X3C_X2Fbutton_X3E; +extern const bcstring be_const_str__X3Cfieldset_X3E_X3Cstyle_X3E_X2Ebdis_X7Bbackground_X3A_X23888_X3B_X7D_X2Ebdis_X3Ahover_X7Bbackground_X3A_X23888_X3B_X7D_X3C_X2Fstyle_X3E; +extern const bcstring be_const_str__X3Cinstance_X3A_X20_X25s_X28_X25s_X2C_X20_X25s_X2C_X20_X25s_X29; +extern const bcstring be_const_str__X3Clabel_X3EChoose_X20a_X20device_X20configuration_X3A_X3C_X2Flabel_X3E_X3Cbr_X3E; +extern const bcstring be_const_str__X3Clambda_X3E; +extern const bcstring be_const_str__X3Clegend_X3E_X3Cb_X20title_X3D_X27Autoconfiguration_X27_X3E_X26nbsp_X3BCurrent_X20auto_X2Dconfiguration_X3C_X2Fb_X3E_X3C_X2Flegend_X3E; +extern const bcstring be_const_str__X3Clegend_X3E_X3Cb_X20title_X3D_X27New_X20autoconf_X27_X3E_X26nbsp_X3BSelect_X20new_X20auto_X2Dconfiguration_X3C_X2Fb_X3E_X3C_X2Flegend_X3E; +extern const bcstring be_const_str__X3Coption_X20value_X3D_X27_X25s_X27_X3E_X25s_X3C_X2Foption_X3E; +extern const bcstring be_const_str__X3Coption_X20value_X3D_X27reset_X27_X3E_X26lt_X3BRemove_X20autoconf_X26gt_X3B_X3C_X2Foption_X3E; +extern const bcstring be_const_str__X3Cp_X20style_X3D_X27width_X3A340px_X3B_X27_X3E_X3Cb_X3EException_X3A_X3C_X2Fb_X3E_X3Cbr_X3E_X27_X25s_X27_X3Cbr_X3E_X25s_X3C_X2Fp_X3E; +extern const bcstring be_const_str__X3Cp_X3ECurrent_X20configuration_X3A_X20_X3C_X2Fp_X3E_X3Cp_X3E_X3Cb_X3E_X25s_X3C_X2Fb_X3E_X3C_X2Fp_X3E; +extern const bcstring be_const_str__X3Cp_X3E_X3C_X2Fp_X3E_X3C_X2Ffieldset_X3E_X3Cp_X3E_X3C_X2Fp_X3E; +extern const bcstring be_const_str__X3Cp_X3E_X3Cform_X20id_X3Dac_X20action_X3D_X27ac_X27_X20style_X3D_X27display_X3A_X20block_X3B_X27_X20method_X3D_X27get_X27_X3E_X3Cbutton_X3E_X26_X23129668_X3B_X20Auto_X2Dconfiguration_X3C_X2Fbutton_X3E_X3C_X2Fform_X3E_X3C_X2Fp_X3E; +extern const bcstring be_const_str__X3Cp_X3E_X3Cform_X20id_X3Dreapply_X20style_X3D_X27display_X3A_X20block_X3B_X27_X20action_X3D_X27_X2Fac_X27_X20method_X3D_X27post_X27_X20; +extern const bcstring be_const_str__X3Cp_X3E_X3Cform_X20id_X3Dzip_X20style_X3D_X27display_X3A_X20block_X3B_X27_X20action_X3D_X27_X2Fac_X27_X20method_X3D_X27post_X27_X20; +extern const bcstring be_const_str__X3Cp_X3E_X3Csmall_X3E_X26nbsp_X3B_X28This_X20feature_X20requires_X20an_X20internet_X20connection_X29_X3C_X2Fsmall_X3E_X3C_X2Fp_X3E; +extern const bcstring be_const_str__X3Cselect_X20name_X3D_X27zip_X27_X3E; +extern const bcstring be_const_str__X3D; +extern const bcstring be_const_str__X3D_X3C_X3E_X21; +extern const bcstring be_const_str__X3D_X3D; +extern const bcstring be_const_str__X3E; +extern const bcstring be_const_str__X3E_X3D; +extern const bcstring be_const_str__X3F; +extern const bcstring be_const_str__X5B; +extern const bcstring be_const_str__X5D; +extern const bcstring be_const_str__X7B; +extern const bcstring be_const_str__X7B_X7D; +extern const bcstring be_const_str__X7Bs_X7DBatt_X20Current_X7Bm_X7D_X25_X2E1f_X20mA_X7Be_X7D; +extern const bcstring be_const_str__X7Bs_X7DBatt_X20Voltage_X7Bm_X7D_X25_X2E3f_X20V_X7Be_X7D; +extern const bcstring be_const_str__X7Bs_X7DTemp_X20AXP_X7Bm_X7D_X25_X2E1f_X20_X26deg_X3BC_X7Be_X7D; +extern const bcstring be_const_str__X7Bs_X7DVBus_X20Current_X7Bm_X7D_X25_X2E1f_X20mA_X7Be_X7D; +extern const bcstring be_const_str__X7Bs_X7DVBus_X20Voltage_X7Bm_X7D_X25_X2E3f_X20V_X7Be_X7D; +extern const bcstring be_const_str__X7D; +extern const bcstring be_const_str___iterator__; +extern const bcstring be_const_str___lower__; +extern const bcstring be_const_str___upper__; +extern const bcstring be_const_str__anonymous_; +extern const bcstring be_const_str__archive; +extern const bcstring be_const_str__available; +extern const bcstring be_const_str__begin_transmission; +extern const bcstring be_const_str__buffer; +extern const bcstring be_const_str__ccmd; +extern const bcstring be_const_str__class; +extern const bcstring be_const_str__cmd; +extern const bcstring be_const_str__debug_present; +extern const bcstring be_const_str__def; +extern const bcstring be_const_str__dirty; +extern const bcstring be_const_str__drivers; +extern const bcstring be_const_str__end_transmission; +extern const bcstring be_const_str__energy; +extern const bcstring be_const_str__error; +extern const bcstring be_const_str__filename; +extern const bcstring be_const_str__global_addr; +extern const bcstring be_const_str__global_def; +extern const bcstring be_const_str__lvgl; +extern const bcstring be_const_str__p; +extern const bcstring be_const_str__persist_X2Ejson; +extern const bcstring be_const_str__ptr; +extern const bcstring be_const_str__read; +extern const bcstring be_const_str__request_from; +extern const bcstring be_const_str__rules; +extern const bcstring be_const_str__settings_def; +extern const bcstring be_const_str__settings_ptr; +extern const bcstring be_const_str__t; +extern const bcstring be_const_str__timers; +extern const bcstring be_const_str__write; +extern const bcstring be_const_str_a; +extern const bcstring be_const_str_abs; +extern const bcstring be_const_str_acos; +extern const bcstring be_const_str_add; +extern const bcstring be_const_str_add_anim; +extern const bcstring be_const_str_add_cmd; +extern const bcstring be_const_str_add_driver; +extern const bcstring be_const_str_add_header; +extern const bcstring be_const_str_add_rule; +extern const bcstring be_const_str_addr; +extern const bcstring be_const_str_allocated; +extern const bcstring be_const_str_alternate; +extern const bcstring be_const_str_animate; +extern const bcstring be_const_str_animators; +extern const bcstring be_const_str_arch; +extern const bcstring be_const_str_area; +extern const bcstring be_const_str_arg; +extern const bcstring be_const_str_arg_X20must_X20be_X20a_X20subclass_X20of_X20lv_obj; +extern const bcstring be_const_str_arg_name; +extern const bcstring be_const_str_arg_size; +extern const bcstring be_const_str_as; +extern const bcstring be_const_str_asin; +extern const bcstring be_const_str_assert; +extern const bcstring be_const_str_asstring; +extern const bcstring be_const_str_atan; +extern const bcstring be_const_str_atan2; +extern const bcstring be_const_str_atleast1; +extern const bcstring be_const_str_attrdump; +extern const bcstring be_const_str_autoexec; +extern const bcstring be_const_str_autorun; +extern const bcstring be_const_str_available; +extern const bcstring be_const_str_b; +extern const bcstring be_const_str_back_forth; +extern const bcstring be_const_str_base_class; +extern const bcstring be_const_str_battery_present; +extern const bcstring be_const_str_begin; +extern const bcstring be_const_str_bool; +extern const bcstring be_const_str_break; +extern const bcstring be_const_str_bri; +extern const bcstring be_const_str_bus; +extern const bcstring be_const_str_button_pressed; +extern const bcstring be_const_str_byte; +extern const bcstring be_const_str_bytes; +extern const bcstring be_const_str_c; +extern const bcstring be_const_str_call; +extern const bcstring be_const_str_call_native; +extern const bcstring be_const_str_calldepth; +extern const bcstring be_const_str_can_show; +extern const bcstring be_const_str_cb; +extern const bcstring be_const_str_cb_do_nothing; +extern const bcstring be_const_str_cb_event_closure; +extern const bcstring be_const_str_cb_obj; +extern const bcstring be_const_str_ceil; +extern const bcstring be_const_str_char; +extern const bcstring be_const_str_chars_in_string; +extern const bcstring be_const_str_check_privileged_access; +extern const bcstring be_const_str_class; +extern const bcstring be_const_str_class_init_obj; +extern const bcstring be_const_str_classname; +extern const bcstring be_const_str_classof; +extern const bcstring be_const_str_clear; +extern const bcstring be_const_str_clear_first_time; +extern const bcstring be_const_str_clear_to; +extern const bcstring be_const_str_close; +extern const bcstring be_const_str_closure; +extern const bcstring be_const_str_cmd; +extern const bcstring be_const_str_cmd_res; +extern const bcstring be_const_str_code; +extern const bcstring be_const_str_codedump; +extern const bcstring be_const_str_collect; +extern const bcstring be_const_str_color; +extern const bcstring be_const_str_compile; +extern const bcstring be_const_str_compress; +extern const bcstring be_const_str_concat; +extern const bcstring be_const_str_connect; +extern const bcstring be_const_str_connected; +extern const bcstring be_const_str_connection_error; +extern const bcstring be_const_str_constructor_cb; +extern const bcstring be_const_str_contains; +extern const bcstring be_const_str_content_button; +extern const bcstring be_const_str_content_flush; +extern const bcstring be_const_str_content_send; +extern const bcstring be_const_str_content_send_style; +extern const bcstring be_const_str_content_start; +extern const bcstring be_const_str_content_stop; +extern const bcstring be_const_str_continue; +extern const bcstring be_const_str_copy; +extern const bcstring be_const_str_cos; +extern const bcstring be_const_str_cosh; +extern const bcstring be_const_str_couldn_X27t_X20not_X20initialize_X20noepixelbus; +extern const bcstring be_const_str_count; +extern const bcstring be_const_str_counters; +extern const bcstring be_const_str_create_custom_widget; +extern const bcstring be_const_str_create_matrix; +extern const bcstring be_const_str_create_segment; +extern const bcstring be_const_str_ctor; +extern const bcstring be_const_str_ctypes_bytes; +extern const bcstring be_const_str_ctypes_bytes_dyn; +extern const bcstring be_const_str_dac_voltage; +extern const bcstring be_const_str_day; +extern const bcstring be_const_str_debug; +extern const bcstring be_const_str_decompress; +extern const bcstring be_const_str_decrypt; +extern const bcstring be_const_str_def; +extern const bcstring be_const_str_deg; +extern const bcstring be_const_str_deinit; +extern const bcstring be_const_str_del; +extern const bcstring be_const_str_delay; +extern const bcstring be_const_str_delete_all_configs; +extern const bcstring be_const_str_depower; +extern const bcstring be_const_str_deregister_obj; +extern const bcstring be_const_str_destructor_cb; +extern const bcstring be_const_str_detect; +extern const bcstring be_const_str_detected_X20on_X20bus; +extern const bcstring be_const_str_digital_read; +extern const bcstring be_const_str_digital_write; +extern const bcstring be_const_str_dirty; +extern const bcstring be_const_str_display; +extern const bcstring be_const_str_display_X2Eini; +extern const bcstring be_const_str_do; +extern const bcstring be_const_str_draw_arc; +extern const bcstring be_const_str_draw_line; +extern const bcstring be_const_str_draw_line_dsc; +extern const bcstring be_const_str_draw_line_dsc_init; +extern const bcstring be_const_str_due; +extern const bcstring be_const_str_dump; +extern const bcstring be_const_str_duration; +extern const bcstring be_const_str_editable; +extern const bcstring be_const_str_elif; +extern const bcstring be_const_str_else; +extern const bcstring be_const_str_enabled; +extern const bcstring be_const_str_encrypt; +extern const bcstring be_const_str_end; +extern const bcstring be_const_str_energy_struct; +extern const bcstring be_const_str_engine; +extern const bcstring be_const_str_erase; +extern const bcstring be_const_str_escape; +extern const bcstring be_const_str_eth; +extern const bcstring be_const_str_event; +extern const bcstring be_const_str_event_cb; +extern const bcstring be_const_str_event_send; +extern const bcstring be_const_str_every_100ms; +extern const bcstring be_const_str_every_50ms; +extern const bcstring be_const_str_every_second; +extern const bcstring be_const_str_except; +extern const bcstring be_const_str_exec_cmd; +extern const bcstring be_const_str_exec_rules; +extern const bcstring be_const_str_exec_tele; +extern const bcstring be_const_str_exists; +extern const bcstring be_const_str_exp; +extern const bcstring be_const_str_f; +extern const bcstring be_const_str_false; +extern const bcstring be_const_str_file; +extern const bcstring be_const_str_file_X20extension_X20is_X20not_X20_X27_X2Ebe_X27_X20or_X20_X27_X2Ebec_X27; +extern const bcstring be_const_str_files; +extern const bcstring be_const_str_find; +extern const bcstring be_const_str_find_key_i; +extern const bcstring be_const_str_find_op; +extern const bcstring be_const_str_finish; +extern const bcstring be_const_str_floor; +extern const bcstring be_const_str_flush; +extern const bcstring be_const_str_for; +extern const bcstring be_const_str_format; +extern const bcstring be_const_str_from_to; +extern const bcstring be_const_str_fromb64; +extern const bcstring be_const_str_fromptr; +extern const bcstring be_const_str_fromstring; +extern const bcstring be_const_str_function; +extern const bcstring be_const_str_gamma; +extern const bcstring be_const_str_gamma10; +extern const bcstring be_const_str_gamma8; +extern const bcstring be_const_str_gc; +extern const bcstring be_const_str_gen_cb; +extern const bcstring be_const_str_get; +extern const bcstring be_const_str_get_alternate; +extern const bcstring be_const_str_get_aps_voltage; +extern const bcstring be_const_str_get_bat_charge_current; +extern const bcstring be_const_str_get_bat_current; +extern const bcstring be_const_str_get_bat_power; +extern const bcstring be_const_str_get_bat_voltage; +extern const bcstring be_const_str_get_battery_chargin_status; +extern const bcstring be_const_str_get_bri; +extern const bcstring be_const_str_get_cb_list; +extern const bcstring be_const_str_get_coords; +extern const bcstring be_const_str_get_current_module_name; +extern const bcstring be_const_str_get_current_module_path; +extern const bcstring be_const_str_get_free_heap; +extern const bcstring be_const_str_get_height; +extern const bcstring be_const_str_get_input_power_status; +extern const bcstring be_const_str_get_light; +extern const bcstring be_const_str_get_object_from_ptr; +extern const bcstring be_const_str_get_option; +extern const bcstring be_const_str_get_percentage; +extern const bcstring be_const_str_get_pixel_color; +extern const bcstring be_const_str_get_power; +extern const bcstring be_const_str_get_size; +extern const bcstring be_const_str_get_string; +extern const bcstring be_const_str_get_style_bg_color; +extern const bcstring be_const_str_get_style_line_color; +extern const bcstring be_const_str_get_style_pad_right; +extern const bcstring be_const_str_get_switch; +extern const bcstring be_const_str_get_temp; +extern const bcstring be_const_str_get_vbus_current; +extern const bcstring be_const_str_get_vbus_voltage; +extern const bcstring be_const_str_get_warning_level; +extern const bcstring be_const_str_get_width; +extern const bcstring be_const_str_getbits; +extern const bcstring be_const_str_geti; +extern const bcstring be_const_str_global; +extern const bcstring be_const_str_gpio; +extern const bcstring be_const_str_group_def; +extern const bcstring be_const_str_h; +extern const bcstring be_const_str_has; +extern const bcstring be_const_str_has_arg; +extern const bcstring be_const_str_height_def; +extern const bcstring be_const_str_hex; +extern const bcstring be_const_str_hour; +extern const bcstring be_const_str_hs2rgb; +extern const bcstring be_const_str_https_X3A_X2F_X2Fraw_X2Egithubusercontent_X2Ecom_X2Ftasmota_X2Fautoconf_X2Fmain_X2F_X25s_X2F_X25s_X2Eautoconf; +extern const bcstring be_const_str_https_X3A_X2F_X2Fraw_X2Egithubusercontent_X2Ecom_X2Ftasmota_X2Fautoconf_X2Fmain_X2F_X25s_manifest_X2Ejson; +extern const bcstring be_const_str_i2c_enabled; +extern const bcstring be_const_str_id; +extern const bcstring be_const_str_if; +extern const bcstring be_const_str_imax; +extern const bcstring be_const_str_imin; +extern const bcstring be_const_str_import; +extern const bcstring be_const_str_init; +extern const bcstring be_const_str_init_draw_line_dsc; +extern const bcstring be_const_str_input; +extern const bcstring be_const_str_ins_goto; +extern const bcstring be_const_str_ins_ramp; +extern const bcstring be_const_str_ins_time; +extern const bcstring be_const_str_insert; +extern const bcstring be_const_str_instance; +extern const bcstring be_const_str_instance_size; +extern const bcstring be_const_str_int; +extern const bcstring be_const_str_internal_error; +extern const bcstring be_const_str_introspect; +extern const bcstring be_const_str_invalidate; +extern const bcstring be_const_str_io_error; +extern const bcstring be_const_str_ip; +extern const bcstring be_const_str_is_dirty; +extern const bcstring be_const_str_is_first_time; +extern const bcstring be_const_str_is_running; +extern const bcstring be_const_str_isinstance; +extern const bcstring be_const_str_isnan; +extern const bcstring be_const_str_isrunning; +extern const bcstring be_const_str_issubclass; +extern const bcstring be_const_str_item; +extern const bcstring be_const_str_iter; +extern const bcstring be_const_str_json; +extern const bcstring be_const_str_json_append; +extern const bcstring be_const_str_json_fdump; +extern const bcstring be_const_str_json_fdump_any; +extern const bcstring be_const_str_json_fdump_list; +extern const bcstring be_const_str_json_fdump_map; +extern const bcstring be_const_str_k; +extern const bcstring be_const_str_keys; +extern const bcstring be_const_str_kv; +extern const bcstring be_const_str_last_modified; +extern const bcstring be_const_str_leds; +extern const bcstring be_const_str_length_X20in_X20bits_X20must_X20be_X20between_X200_X20and_X2032; +extern const bcstring be_const_str_light; +extern const bcstring be_const_str_line_dsc; +extern const bcstring be_const_str_list; +extern const bcstring be_const_str_listdir; +extern const bcstring be_const_str_load; +extern const bcstring be_const_str_load_templates; +extern const bcstring be_const_str_local; +extern const bcstring be_const_str_log; +extern const bcstring be_const_str_log10; +extern const bcstring be_const_str_loop; +extern const bcstring be_const_str_lower; +extern const bcstring be_const_str_lv; +extern const bcstring be_const_str_lv_event; +extern const bcstring be_const_str_lv_event_cb; +extern const bcstring be_const_str_lv_obj; +extern const bcstring be_const_str_lv_obj_class; +extern const bcstring be_const_str_lvgl_event_dispatch; +extern const bcstring be_const_str_map; +extern const bcstring be_const_str_math; +extern const bcstring be_const_str_matrix; +extern const bcstring be_const_str_member; +extern const bcstring be_const_str_members; +extern const bcstring be_const_str_memory; +extern const bcstring be_const_str_millis; +extern const bcstring be_const_str_min; +extern const bcstring be_const_str_minute; +extern const bcstring be_const_str_module; +extern const bcstring be_const_str_month; +extern const bcstring be_const_str_name; +extern const bcstring be_const_str_nan; +extern const bcstring be_const_str_nil; +extern const bcstring be_const_str_no_X20GPIO_X20specified_X20for_X20neopixelbus; +extern const bcstring be_const_str_null_cb; +extern const bcstring be_const_str_number; +extern const bcstring be_const_str_obj_class_create_obj; +extern const bcstring be_const_str_obj_event_base; +extern const bcstring be_const_str_offset; +extern const bcstring be_const_str_offseta; +extern const bcstring be_const_str_on; +extern const bcstring be_const_str_onsubmit_X3D_X27return_X20confirm_X28_X22This_X20will_X20cause_X20a_X20restart_X2E_X22_X29_X3B_X27_X3E; +extern const bcstring be_const_str_onsubmit_X3D_X27return_X20confirm_X28_X22This_X20will_X20change_X20the_X20current_X20configuration_X20and_X20cause_X20a_X20restart_X2E_X22_X29_X3B_X27_X3E; +extern const bcstring be_const_str_open; +extern const bcstring be_const_str_out_X20of_X20range; +extern const bcstring be_const_str_p1; +extern const bcstring be_const_str_p2; +extern const bcstring be_const_str_page_autoconf_ctl; +extern const bcstring be_const_str_page_autoconf_mgr; +extern const bcstring be_const_str_param; +extern const bcstring be_const_str_path; +extern const bcstring be_const_str_pc; +extern const bcstring be_const_str_pc_abs; +extern const bcstring be_const_str_pc_rel; +extern const bcstring be_const_str_percentage; +extern const bcstring be_const_str_persist; +extern const bcstring be_const_str_persist_X2E_p_X20is_X20not_X20a_X20map; +extern const bcstring be_const_str_pi; +extern const bcstring be_const_str_pin; +extern const bcstring be_const_str_pin_mode; +extern const bcstring be_const_str_pin_used; +extern const bcstring be_const_str_pixel_count; +extern const bcstring be_const_str_pixel_size; +extern const bcstring be_const_str_pixels_buffer; +extern const bcstring be_const_str_point; +extern const bcstring be_const_str_pop; +extern const bcstring be_const_str_pop_path; +extern const bcstring be_const_str_pow; +extern const bcstring be_const_str_preinit; +extern const bcstring be_const_str_print; +extern const bcstring be_const_str_public_key; +extern const bcstring be_const_str_publish; +extern const bcstring be_const_str_publish_result; +extern const bcstring be_const_str_push; +extern const bcstring be_const_str_push_path; +extern const bcstring be_const_str_quality; +extern const bcstring be_const_str_r; +extern const bcstring be_const_str_rad; +extern const bcstring be_const_str_raise; +extern const bcstring be_const_str_rand; +extern const bcstring be_const_str_range; +extern const bcstring be_const_str_read; +extern const bcstring be_const_str_read12; +extern const bcstring be_const_str_read13; +extern const bcstring be_const_str_read24; +extern const bcstring be_const_str_read32; +extern const bcstring be_const_str_read8; +extern const bcstring be_const_str_read_bytes; +extern const bcstring be_const_str_read_sensors; +extern const bcstring be_const_str_readbytes; +extern const bcstring be_const_str_readline; +extern const bcstring be_const_str_real; +extern const bcstring be_const_str_reapply; +extern const bcstring be_const_str_redirect; +extern const bcstring be_const_str_refr_size; +extern const bcstring be_const_str_register_obj; +extern const bcstring be_const_str_remove; +extern const bcstring be_const_str_remove_cmd; +extern const bcstring be_const_str_remove_driver; +extern const bcstring be_const_str_remove_rule; +extern const bcstring be_const_str_remove_timer; +extern const bcstring be_const_str_reset; +extern const bcstring be_const_str_reset_search; +extern const bcstring be_const_str_resize; +extern const bcstring be_const_str_resolvecmnd; +extern const bcstring be_const_str_resp_cmnd; +extern const bcstring be_const_str_resp_cmnd_done; +extern const bcstring be_const_str_resp_cmnd_error; +extern const bcstring be_const_str_resp_cmnd_failed; +extern const bcstring be_const_str_resp_cmnd_str; +extern const bcstring be_const_str_response_append; +extern const bcstring be_const_str_return; +extern const bcstring be_const_str_return_X20code_X3D_X25i; +extern const bcstring be_const_str_reverse; +extern const bcstring be_const_str_reverse_gamma10; +extern const bcstring be_const_str_rotate; +extern const bcstring be_const_str_round_end; +extern const bcstring be_const_str_round_start; +extern const bcstring be_const_str_rtc; +extern const bcstring be_const_str_rule; +extern const bcstring be_const_str_run; +extern const bcstring be_const_str_run_bat; +extern const bcstring be_const_str_run_deferred; +extern const bcstring be_const_str_running; +extern const bcstring be_const_str_save; +extern const bcstring be_const_str_save_before_restart; +extern const bcstring be_const_str_scale_uint; +extern const bcstring be_const_str_scan; +extern const bcstring be_const_str_search; +extern const bcstring be_const_str_sec; +extern const bcstring be_const_str_seg7_font; +extern const bcstring be_const_str_select; +extern const bcstring be_const_str_serial; +extern const bcstring be_const_str_set; +extern const bcstring be_const_str_set_alternate; +extern const bcstring be_const_str_set_auth; +extern const bcstring be_const_str_set_bri; +extern const bcstring be_const_str_set_chg_current; +extern const bcstring be_const_str_set_dc_voltage; +extern const bcstring be_const_str_set_dcdc_enable; +extern const bcstring be_const_str_set_first_time; +extern const bcstring be_const_str_set_height; +extern const bcstring be_const_str_set_ldo_enable; +extern const bcstring be_const_str_set_ldo_voltage; +extern const bcstring be_const_str_set_light; +extern const bcstring be_const_str_set_matrix_pixel_color; +extern const bcstring be_const_str_set_percentage; +extern const bcstring be_const_str_set_pixel_color; +extern const bcstring be_const_str_set_power; +extern const bcstring be_const_str_set_style_bg_color; +extern const bcstring be_const_str_set_style_line_color; +extern const bcstring be_const_str_set_style_pad_right; +extern const bcstring be_const_str_set_style_text_font; +extern const bcstring be_const_str_set_text; +extern const bcstring be_const_str_set_time; +extern const bcstring be_const_str_set_timeouts; +extern const bcstring be_const_str_set_timer; +extern const bcstring be_const_str_set_useragent; +extern const bcstring be_const_str_set_width; +extern const bcstring be_const_str_set_x; +extern const bcstring be_const_str_set_y; +extern const bcstring be_const_str_setbits; +extern const bcstring be_const_str_seti; +extern const bcstring be_const_str_setitem; +extern const bcstring be_const_str_setmember; +extern const bcstring be_const_str_setrange; +extern const bcstring be_const_str_settings; +extern const bcstring be_const_str_shared_key; +extern const bcstring be_const_str_show; +extern const bcstring be_const_str_sin; +extern const bcstring be_const_str_sinh; +extern const bcstring be_const_str_size; +extern const bcstring be_const_str_skip; +extern const bcstring be_const_str_solidified; +extern const bcstring be_const_str_split; +extern const bcstring be_const_str_sqrt; +extern const bcstring be_const_str_srand; +extern const bcstring be_const_str_start; +extern const bcstring be_const_str_state; +extern const bcstring be_const_str_static; +extern const bcstring be_const_str_stop; +extern const bcstring be_const_str_stop_iteration; +extern const bcstring be_const_str_str; +extern const bcstring be_const_str_strftime; +extern const bcstring be_const_str_string; +extern const bcstring be_const_str_strip; +extern const bcstring be_const_str_strptime; +extern const bcstring be_const_str_super; +extern const bcstring be_const_str_sys; +extern const bcstring be_const_str_tag; +extern const bcstring be_const_str_tan; +extern const bcstring be_const_str_tanh; +extern const bcstring be_const_str_target; +extern const bcstring be_const_str_target_search; +extern const bcstring be_const_str_tasmota; +extern const bcstring be_const_str_tasmota_X2Eget_light_X28_X29_X20is_X20deprecated_X2C_X20use_X20light_X2Eget_X28_X29; +extern const bcstring be_const_str_tasmota_X2Eset_light_X28_X29_X20is_X20deprecated_X2C_X20use_X20light_X2Eset_X28_X29; +extern const bcstring be_const_str_tcpclient; +extern const bcstring be_const_str_tele; +extern const bcstring be_const_str_the_X20second_X20argument_X20is_X20not_X20a_X20function; +extern const bcstring be_const_str_time_dump; +extern const bcstring be_const_str_time_reached; +extern const bcstring be_const_str_time_str; +extern const bcstring be_const_str_to_gamma; +extern const bcstring be_const_str_tob64; +extern const bcstring be_const_str_tolower; +extern const bcstring be_const_str_tomap; +extern const bcstring be_const_str_top; +extern const bcstring be_const_str_toptr; +extern const bcstring be_const_str_tostring; +extern const bcstring be_const_str_toupper; +extern const bcstring be_const_str_tr; +extern const bcstring be_const_str_traceback; +extern const bcstring be_const_str_true; +extern const bcstring be_const_str_try; +extern const bcstring be_const_str_try_rule; +extern const bcstring be_const_str_type; +extern const bcstring be_const_str_unknown_X20instruction; +extern const bcstring be_const_str_update; +extern const bcstring be_const_str_upper; +extern const bcstring be_const_str_url_encode; +extern const bcstring be_const_str_v; +extern const bcstring be_const_str_value; +extern const bcstring be_const_str_value_error; +extern const bcstring be_const_str_valuer_error; +extern const bcstring be_const_str_var; +extern const bcstring be_const_str_w; +extern const bcstring be_const_str_wd; +extern const bcstring be_const_str_web_add_button; +extern const bcstring be_const_str_web_add_config_button; +extern const bcstring be_const_str_web_add_console_button; +extern const bcstring be_const_str_web_add_handler; +extern const bcstring be_const_str_web_add_main_button; +extern const bcstring be_const_str_web_add_management_button; +extern const bcstring be_const_str_web_send; +extern const bcstring be_const_str_web_send_decimal; +extern const bcstring be_const_str_web_sensor; +extern const bcstring be_const_str_webclient; +extern const bcstring be_const_str_webserver; +extern const bcstring be_const_str_while; +extern const bcstring be_const_str_widget_cb; +extern const bcstring be_const_str_widget_constructor; +extern const bcstring be_const_str_widget_ctor_cb; +extern const bcstring be_const_str_widget_ctor_impl; +extern const bcstring be_const_str_widget_destructor; +extern const bcstring be_const_str_widget_dtor_cb; +extern const bcstring be_const_str_widget_dtor_impl; +extern const bcstring be_const_str_widget_editable; +extern const bcstring be_const_str_widget_event; +extern const bcstring be_const_str_widget_event_cb; +extern const bcstring be_const_str_widget_event_impl; +extern const bcstring be_const_str_widget_group_def; +extern const bcstring be_const_str_widget_height_def; +extern const bcstring be_const_str_widget_instance_size; +extern const bcstring be_const_str_widget_struct_by_class; +extern const bcstring be_const_str_widget_struct_default; +extern const bcstring be_const_str_widget_width_def; +extern const bcstring be_const_str_width; +extern const bcstring be_const_str_width_def; +extern const bcstring be_const_str_wifi; +extern const bcstring be_const_str_wire; +extern const bcstring be_const_str_wire1; +extern const bcstring be_const_str_wire2; +extern const bcstring be_const_str_wire_scan; +extern const bcstring be_const_str_write; +extern const bcstring be_const_str_write8; +extern const bcstring be_const_str_write_bit; +extern const bcstring be_const_str_write_bytes; +extern const bcstring be_const_str_write_file; +extern const bcstring be_const_str_write_gpio; +extern const bcstring be_const_str_x; +extern const bcstring be_const_str_x1; +extern const bcstring be_const_str_y; +extern const bcstring be_const_str_y1; +extern const bcstring be_const_str_year; +extern const bcstring be_const_str_yield; +extern const bcstring be_const_str_zero; +extern const bcstring be_const_str_zip; diff --git a/lib/libesp32/berry/generate/be_const_strtab_def.h b/lib/libesp32/berry/generate/be_const_strtab_def.h new file mode 100644 index 000000000..cd2198905 --- /dev/null +++ b/lib/libesp32/berry/generate/be_const_strtab_def.h @@ -0,0 +1,1106 @@ +be_define_const_str(, "", 2166136261u, 0, 0, &be_const_str_AudioFileSourceFS); +be_define_const_str(_X0A, "\n", 252472541u, 0, 1, &be_const_str_file_X20extension_X20is_X20not_X20_X27_X2Ebe_X27_X20or_X20_X27_X2Ebec_X27); +be_define_const_str(_X20, " ", 621580159u, 0, 1, &be_const_str_gen_cb); +be_define_const_str(_X21_X3D, "!=", 2428715011u, 0, 2, &be_const_str__X3Cp_X3ECurrent_X20configuration_X3A_X20_X3C_X2Fp_X3E_X3Cp_X3E_X3Cb_X3E_X25s_X3C_X2Fb_X3E_X3C_X2Fp_X3E); +be_define_const_str(_X21_X3D_X3D, "!==", 559817114u, 0, 3, &be_const_str__X3Clegend_X3E_X3Cb_X20title_X3D_X27Autoconfiguration_X27_X3E_X26nbsp_X3BCurrent_X20auto_X2Dconfiguration_X3C_X2Fb_X3E_X3C_X2Flegend_X3E); +be_define_const_str(_X23, "#", 638357778u, 0, 1, &be_const_str_refr_size); +be_define_const_str(_X23autoexec_X2Ebat, "#autoexec.bat", 3382890497u, 0, 13, &be_const_str_get_option); +be_define_const_str(_X23autoexec_X2Ebe, "#autoexec.be", 1181757091u, 0, 12, &be_const_str_every_second); +be_define_const_str(_X23display_X2Eini, "#display.ini", 182218220u, 0, 12, &be_const_str__X3Cp_X3E_X3Csmall_X3E_X26nbsp_X3B_X28This_X20feature_X20requires_X20an_X20internet_X20connection_X29_X3C_X2Fsmall_X3E_X3C_X2Fp_X3E); +be_define_const_str(_X23init_X2Ebat, "#init.bat", 3297595077u, 0, 9, &be_const_str_real); +be_define_const_str(_X23preinit_X2Ebe, "#preinit.be", 687035716u, 0, 11, &be_const_str_publish_result); +be_define_const_str(_X2502d_X25s_X2502d, "%02d%s%02d", 1587999717u, 0, 10, &be_const_str_last_modified); +be_define_const_str(_X2504d_X2D_X2502d_X2D_X2502dT_X2502d_X3A_X2502d_X3A_X2502d, "%04d-%02d-%02dT%02d:%02d:%02d", 3425528601u, 0, 29, &be_const_str__write); +be_define_const_str(_X25s_X2Eautoconf, "%s.autoconf", 3560383524u, 0, 11, &be_const_str_format); +be_define_const_str(_X26lt_X3BError_X3A_X20apply_X20new_X20or_X20remove_X26gt_X3B, "<Error: apply new or remove>", 2855507949u, 0, 34, &be_const_str___upper__); +be_define_const_str(_X26lt_X3BNone_X26gt_X3B, "<None>", 2602165498u, 0, 12, &be_const_str_SERIAL_7E2); +be_define_const_str(_X28_X29, "()", 685372826u, 0, 2, &be_const_str_get_alternate); +be_define_const_str(_X2B, "+", 772578730u, 0, 1, &be_const_str_area); +be_define_const_str(_X2C, ",", 688690635u, 0, 1, NULL); +be_define_const_str(_X2D_X2D_X3A_X2D_X2D, "--:--", 1370615441u, 0, 5, &be_const_str__X2F_X2Eautoconf); +be_define_const_str(_X2E, ".", 722245873u, 0, 1, &be_const_str__ccmd); +be_define_const_str(_X2E_X2E, "..", 2748622605u, 0, 2, NULL); +be_define_const_str(_X2Eautoconf, ".autoconf", 2524679088u, 0, 9, NULL); +be_define_const_str(_X2Ebe, ".be", 1325797348u, 0, 3, &be_const_str_digital_read); +be_define_const_str(_X2Ebec, ".bec", 3985273221u, 0, 4, &be_const_str_CFG_X3A_X20loading_X20); +be_define_const_str(_X2Elen, ".len", 850842136u, 0, 4, &be_const_str_SERIAL_6N2); +be_define_const_str(_X2Ep, ".p", 1171526419u, 0, 2, &be_const_str_arg_name); +be_define_const_str(_X2Ep1, ".p1", 249175686u, 0, 3, &be_const_str_battery_present); +be_define_const_str(_X2Ep2, ".p2", 232398067u, 0, 3, &be_const_str_b); +be_define_const_str(_X2Esize, ".size", 1965188224u, 0, 5, &be_const_str_CFG_X3A_X20loaded_X20_X27_X25s_X27); +be_define_const_str(_X2Etapp, ".tapp", 1363391594u, 0, 5, &be_const_str_Parameter_X20error); +be_define_const_str(_X2Ew, ".w", 1255414514u, 0, 2, &be_const_str_running); +be_define_const_str(_X2F, "/", 705468254u, 0, 1, &be_const_str__class); +be_define_const_str(_X2F_X2Eautoconf, "/.autoconf", 2212074393u, 0, 10, &be_const_str_connect); +be_define_const_str(_X2F_X3Frst_X3D, "/?rst=", 580074707u, 0, 6, &be_const_str_content_stop); +be_define_const_str(_X2Fac, "/ac", 3904651978u, 0, 3, &be_const_str_ins_ramp); +be_define_const_str(_X3A, ":", 1057798253u, 0, 1, &be_const_str_get_string); +be_define_const_str(_X3C, "<", 957132539u, 0, 1, &be_const_str_set_bri); +be_define_const_str(_X3C_X2Fform_X3E_X3C_X2Fp_X3E, "

", 3546571739u, 0, 11, &be_const_str_remove); +be_define_const_str(_X3C_X2Fselect_X3E_X3Cp_X3E_X3C_X2Fp_X3E, "

", 1863865923u, 0, 16, NULL); +be_define_const_str(_X3C_X3D, "<=", 2499223986u, 0, 2, &be_const_str_remove_rule); +be_define_const_str(_X3Cbutton_X20name_X3D_X27reapply_X27_X20class_X3D_X27button_X20bgrn_X27_X3ERe_X2Dapply_X20current_X20configuration_X3C_X2Fbutton_X3E, "", 3147934216u, 0, 82, &be_const_str___lower__); +be_define_const_str(_X3Cbutton_X20name_X3D_X27zipapply_X27_X20class_X3D_X27button_X20bgrn_X27_X3EApply_X20configuration_X3C_X2Fbutton_X3E, "", 1205771629u, 0, 72, &be_const_str_content_send_style); +be_define_const_str(_X3Cfieldset_X3E_X3Cstyle_X3E_X2Ebdis_X7Bbackground_X3A_X23888_X3B_X7D_X2Ebdis_X3Ahover_X7Bbackground_X3A_X23888_X3B_X7D_X3C_X2Fstyle_X3E, "
", 842307168u, 0, 77, &be_const_str_bri); +be_define_const_str(_X3Cinstance_X3A_X20_X25s_X28_X25s_X2C_X20_X25s_X2C_X20_X25s_X29, "Choose a device configuration:
", 1336654704u, 0, 49, &be_const_str_cosh); +be_define_const_str(_X3Clambda_X3E, "", 607256038u, 0, 8, &be_const_str_item); +be_define_const_str(_X3Clegend_X3E_X3Cb_X20title_X3D_X27Autoconfiguration_X27_X3E_X26nbsp_X3BCurrent_X20auto_X2Dconfiguration_X3C_X2Fb_X3E_X3C_X2Flegend_X3E, " Current auto-configuration", 4212500780u, 0, 82, &be_const_str_AXP192); +be_define_const_str(_X3Clegend_X3E_X3Cb_X20title_X3D_X27New_X20autoconf_X27_X3E_X26nbsp_X3BSelect_X20new_X20auto_X2Dconfiguration_X3C_X2Fb_X3E_X3C_X2Flegend_X3E, " Select new auto-configuration", 1926223891u, 0, 80, &be_const_str_internal_error); +be_define_const_str(_X3Coption_X20value_X3D_X27_X25s_X27_X3E_X25s_X3C_X2Foption_X3E, "", 510303524u, 0, 30, &be_const_str_enabled); +be_define_const_str(_X3Coption_X20value_X3D_X27reset_X27_X3E_X26lt_X3BRemove_X20autoconf_X26gt_X3B_X3C_X2Foption_X3E, "", 3994619755u, 0, 54, &be_const_str_widget_cb); +be_define_const_str(_X3Cp_X20style_X3D_X27width_X3A340px_X3B_X27_X3E_X3Cb_X3EException_X3A_X3C_X2Fb_X3E_X3Cbr_X3E_X27_X25s_X27_X3Cbr_X3E_X25s_X3C_X2Fp_X3E, "

Exception:
'%s'
%s

", 4252565082u, 0, 59, &be_const_str_EVENT_DRAW_MAIN); +be_define_const_str(_X3Cp_X3E_X3C_X2Fp_X3E_X3C_X2Ffieldset_X3E_X3Cp_X3E_X3C_X2Fp_X3E, "

", 2052843416u, 0, 25, &be_const_str_allocated); +be_define_const_str(_X3Cp_X3E_X3Cform_X20id_X3Dac_X20action_X3D_X27ac_X27_X20style_X3D_X27display_X3A_X20block_X3B_X27_X20method_X3D_X27get_X27_X3E_X3Cbutton_X3E_X26_X23129668_X3B_X20Auto_X2Dconfiguration_X3C_X2Fbutton_X3E_X3C_X2Fform_X3E_X3C_X2Fp_X3E, "

", 452285201u, 0, 120, &be_const_str_CFG_X3A_X20Exception_X3E_X20_X27_X25s_X27_X20_X2D_X20_X25s); +be_define_const_str(_X3Cp_X3E_X3Cform_X20id_X3Dreapply_X20style_X3D_X27display_X3A_X20block_X3B_X27_X20action_X3D_X27_X2Fac_X27_X20method_X3D_X27post_X27_X20, "

 (This feature requires an internet connection)

", 2719266486u, 0, 74, &be_const_str_str); +be_define_const_str(_X3Cp_X3ECurrent_X20configuration_X3A_X20_X3C_X2Fp_X3E_X3Cp_X3E_X3Cb_X3E_X25s_X3C_X2Fb_X3E_X3C_X2Fp_X3E, "

Current configuration:

%s

", 4115655761u, 0, 46, &be_const_str_gc); +be_define_const_str(_X3Cselect_X20name_X3D_X27zip_X27_X3E, ""; const char SCRIPT_MSG_PULLDOWNa[] PROGMEM = - "
"; const char SCRIPT_MSG_PULLDOWNb[] PROGMEM = ""; const char SCRIPT_MSG_PULLDOWNc[] PROGMEM = @@ -7051,6 +7431,10 @@ const char SCRIPT_MSG_PULLDOWNc[] PROGMEM = const char SCRIPT_MSG_TEXTINP[] PROGMEM = "
"; +const char SCRIPT_MSG_TEXTINP_U[] PROGMEM = + "
"; + + const char SCRIPT_MSG_NUMINP[] PROGMEM = "
"; @@ -7298,6 +7682,21 @@ void ScriptWebShow(char mc) { optflg = 0; } // check for input elements + // prescan for html tags + /* + restart: + //if (*lp == 0 || *lp == SCRIPT_EOL) + if (*lin == '<') { + char *cp = strchr(lin, '>'); + if (cp) { + char svd = *(cp + 1); + *(cp + 1) = 0; + WSContentSend_PD("%s", lin); + *(cp + 1) = svd; + lin = cp + 1; + } + }*/ + if (!strncmp(lin, "sl(", 3)) { // insert slider sl(min max var left mid right) char *lp = lin; @@ -7372,6 +7771,28 @@ void ScriptWebShow(char mc) { while (*lp) { SCRIPT_SKIP_SPACES lp = GetStringArgument(lp, OPER_EQU, pulabel, 0); + if (index == 1 && pulabel[0] == '#') { + // number range + char *cp = &pulabel[1]; + uint8_t from = strtol(cp, &cp, 10); + uint8_t to = from; + if (*cp == '-') { + cp++; + to = strtol(cp, &cp, 10); + } + for (uint32_t cnt = from; cnt <= to; cnt++) { + sprintf(pulabel, "%d", cnt); + if (val == index) { + cp = (char*)"selected"; + } else { + cp = (char*)""; + } + WSContentSend_PD(SCRIPT_MSG_PULLDOWNb, cp, index, pulabel); + index++; + } + break; + } + char *cp; if (val == index) { cp = (char*)"selected"; @@ -7450,11 +7871,26 @@ void ScriptWebShow(char mc) { SCRIPT_SKIP_SPACES char label[SCRIPT_MAXSSIZE]; lp = GetStringArgument(lp, OPER_EQU, label, 0); - char vname[16]; ScriptGetVarname(vname, slp, sizeof(vname)); - - WSContentSend_PD(SCRIPT_MSG_TEXTINP, label, str, vname); + SCRIPT_SKIP_SPACES + if (*lp != ')') { + char type[SCRIPT_MAXSSIZE]; + lp = GetStringArgument(lp, OPER_EQU, type, 0); + SCRIPT_SKIP_SPACES + // also requires min max values + char min[SCRIPT_MAXSSIZE]; + lp = GetStringArgument(lp, OPER_EQU, min, 0); + SCRIPT_SKIP_SPACES + char max[SCRIPT_MAXSSIZE]; + lp = GetStringArgument(lp, OPER_EQU, max, 0); + SCRIPT_SKIP_SPACES + WSContentSend_PD(SCRIPT_MSG_TEXTINP_U, label, type, str, min, max, vname); + } else { + WSContentSend_PD(SCRIPT_MSG_TEXTINP, label, str, vname); + } + lp++; + //goto restart; } else if (!strncmp(lin, "nm(", 3)) { char *lp = lin; @@ -7941,18 +8377,20 @@ void script_task2(void *arg) { } } } -uint32_t scripter_create_task(uint32_t num, uint32_t time, uint32_t core, uint32_t prio) { +uint32_t scripter_create_task(uint32_t num, uint32_t time, uint32_t core, int32_t prio) { //return 0; BaseType_t res = 0; if (core > 1) { core = 1; } - if (num == 1) { - if (esp32_tasks[0].task_t) { vTaskDelete(esp32_tasks[0].task_t); } - res = xTaskCreatePinnedToCore(script_task1, "T1", STASK_STACK, NULL, prio, &esp32_tasks[0].task_t, core); - esp32_tasks[0].task_timer = time; - } else { - if (esp32_tasks[1].task_t) { vTaskDelete(esp32_tasks[1].task_t); } - res = xTaskCreatePinnedToCore(script_task2, "T2", STASK_STACK, NULL, prio, &esp32_tasks[1].task_t, core); - esp32_tasks[1].task_timer = time; + if (num < 1) { num = 1; } + if (num > 2) { num = 2; } + num--; + if (esp32_tasks[num].task_t) { + vTaskDelete(esp32_tasks[num].task_t); + esp32_tasks[num].task_t = 0; + } + if (prio >= 0) { + res = xTaskCreatePinnedToCore(script_task1, num==0?"T1":"T2", STASK_STACK, NULL, prio, &esp32_tasks[num].task_t, core); + esp32_tasks[num].task_timer = time; } return res; } @@ -7977,7 +8415,7 @@ void script_task2(void *arg) { } } -uint32_t scripter_create_task(uint32_t num, uint32_t time, uint32_t core, uint32_t prio) { +uint32_t scripter_create_task(uint32_t num, uint32_t time, uint32_t core, int32_t prio) { //return 0; BaseType_t res = 0; if (core > 1) { core = 1; } @@ -7997,6 +8435,48 @@ uint32_t scripter_create_task(uint32_t num, uint32_t time, uint32_t core, uint32 #endif // USE_SCRIPT_TASK #endif // ESP32 + +#ifdef USE_UFILESYS +// read http content to file +int32_t url2file(uint8_t fref, char *url) { + WiFiClient http_client; + HTTPClient http; + int32_t httpCode = 0; + String weburl = "http://"+UrlEncode(url); + for (uint32_t retry = 0; retry < 15; retry++) { + http.begin(http_client, weburl); + httpCode = http.GET(); + if (httpCode > 0) { + break; + } + } + if (httpCode < 0) { + AddLog(LOG_LEVEL_INFO,PSTR("HTTP error %d = %s"), httpCode, http.errorToString(httpCode).c_str()); + } + if (httpCode == HTTP_CODE_OK || httpCode == HTTP_CODE_MOVED_PERMANENTLY) { + WiFiClient *stream = http.getStreamPtr(); + int32_t len = http.getSize(); + if (len < 0) len = 99999999; + uint8_t buff[512]; + while (http.connected() && (len > 0)) { + size_t size = stream->available(); + if (size) { + if (size > sizeof(buff)) { + size = sizeof(buff); + } + uint32_t read = stream->readBytes(buff, size); + glob_script_mem.files[fref].write(buff, read); + len -= read; + } + delayMicroseconds(1); + } + } + http.end(); + http_client.stop(); + return httpCode; +} +#endif + int32_t http_req(char *host, char *request) { WiFiClient http_client; HTTPClient http; @@ -8613,6 +9093,10 @@ int32_t retval = 0; case 7: retval = Settings->timer[index].arm; break; + case 8: + retval = Settings->flag3.timers_enable; + break; + } return retval; } diff --git a/tasmota/xdrv_13_display.ino b/tasmota/xdrv_13_display.ino index 4b4a988cf..ffded1fde 100755 --- a/tasmota/xdrv_13_display.ino +++ b/tasmota/xdrv_13_display.ino @@ -96,6 +96,11 @@ void Get_display(uint8_t index) { } #endif // USE_MULTI_DISPLAY +#ifndef TXT_MAX_SFAC +#define TXT_MAX_SFAC 4 +#endif // TXT_MAX_SFAC + + const uint8_t DISPLAY_MAX_DRIVERS = 32; // Max number of display drivers/models supported by xdsp_interface.ino const uint8_t DISPLAY_MAX_COLS = 64; // Max number of columns allowed with command DisplayCols const uint8_t DISPLAY_MAX_ROWS = 64; // Max number of lines allowed with command DisplayRows @@ -875,9 +880,11 @@ void DisplayText(void) break; case 's': // size sx - if (renderer) renderer->setTextSize(*cp&7); + var = atoiv(cp, &temp); + if (temp > TXT_MAX_SFAC) temp = TXT_MAX_SFAC; + if (renderer) renderer->setTextSize(temp); //else DisplaySetSize(*cp&3); - cp += 1; + cp+=var; break; case 'f': // font sx @@ -2011,7 +2018,7 @@ void CmndDisplayDimmer(void) { } void CmndDisplaySize(void) { - if ((XdrvMailbox.payload > 0) && (XdrvMailbox.payload <= 4)) { + if ((XdrvMailbox.payload > 0) && (XdrvMailbox.payload <= TXT_MAX_SFAC)) { Settings->display_size = XdrvMailbox.payload; if (renderer) renderer->setTextSize(Settings->display_size); //else DisplaySetSize(Settings->display_size); diff --git a/tasmota/xdrv_16_tuyamcu.ino b/tasmota/xdrv_16_tuyamcu.ino index 250c28b21..5750839c5 100644 --- a/tasmota/xdrv_16_tuyamcu.ino +++ b/tasmota/xdrv_16_tuyamcu.ino @@ -1442,15 +1442,31 @@ void TuyaSensorsShow(bool json) #endif // USE_WEBSERVER } } - #ifdef USE_WEBSERVER +#ifdef USE_WEBSERVER if (AsModuleTuyaMS()) { WSContentSend_P(PSTR("{s}" D_JSON_IRHVAC_MODE "{m}%d{e}"), Tuya.ModeSet); } - #endif // USE_WEBSERVER +#endif // USE_WEBSERVER if (RootName) { ResponseJsonEnd();} } +#ifdef USE_WEBSERVER + +void TuyaAddButton(void) { + if (AsModuleTuyaMS()) { + WSContentSend_P(HTTP_TABLE100); + WSContentSend_P(PSTR("
")); + char stemp[33]; + snprintf_P(stemp, sizeof(stemp), PSTR("" D_JSON_IRHVAC_MODE "")); + WSContentSend_P(HTTP_DEVICE_CONTROL, 26, TasmotaGlobal.devices_present + 1, + (strlen(SettingsText(SET_BUTTON1 + TasmotaGlobal.devices_present))) ? SettingsText(SET_BUTTON1 + TasmotaGlobal.devices_present) : stemp, ""); + WSContentSend_P(PSTR("")); + } +} + +#endif // USE_WEBSERVER + /*********************************************************************************************\ * Interface \*********************************************************************************************/ @@ -1507,6 +1523,9 @@ bool Xdrv16(uint8_t function) TuyaSensorsShow(1); break; #ifdef USE_WEBSERVER + case FUNC_WEB_ADD_MAIN_BUTTON: + TuyaAddButton(); + break; case FUNC_WEB_SENSOR: TuyaSensorsShow(0); break; diff --git a/tasmota/xdrv_35_pwm_dimmer.ino b/tasmota/xdrv_35_pwm_dimmer.ino index 85d76c0af..aad092643 100644 --- a/tasmota/xdrv_35_pwm_dimmer.ino +++ b/tasmota/xdrv_35_pwm_dimmer.ino @@ -67,6 +67,7 @@ uint8_t power_button_index = 0; uint8_t down_button_index = 1; uint8_t buttons_pressed = 0; uint8_t local_fixed_color_index = 128; +bool is_two_button; bool button_tapped = false; bool down_button_tapped = false; bool ignore_power_button = false; @@ -110,16 +111,19 @@ void PWMModulePreInit(void) // The relay initializes to on. If the power is supposed to be off, turn the relay off. // if (!TasmotaGlobal.power && PinUsed(GPIO_REL1)) digitalWrite(Pin(GPIO_REL1), bitRead(TasmotaGlobal.rel_inverted, 0) ? 1 : 0); + // Find out how many buttons we have. + uint8_t button_count = 0; + for (uint32_t button_index = 0; button_index < MAX_PWM_DIMMER_KEYS; button_index++) { + if (PinUsed(GPIO_KEY1, button_index)) button_count++; + } + if ((is_two_button = (button_count == 2))) down_button_index = 99; + #ifdef USE_PWM_DIMMER_REMOTE // If remote device mode is enabled, set the device group count to the number of buttons // present. if (Settings->flag4.multiple_device_groups) { Settings->flag4.device_groups_enabled = true; - - device_group_count = 0; - for (uint32_t button_index = 0; button_index < MAX_PWM_DIMMER_KEYS; button_index++) { - if (PinUsed(GPIO_KEY1, button_index)) device_group_count++; - } + device_group_count = button_count; // If no relay or PWM is defined, all buttons control remote devices. if (!PinUsed(GPIO_REL1) && !PinUsed(GPIO_PWM1)) { @@ -266,6 +270,22 @@ void PWMDimmerHandleDevGroupItem(void) } #endif // USE_DEVICE_GROUPS +/* +* ---------------- Single ----------------- ------------------------- Hold ------------------------- +* Off On Off On +* +* 3 Button: +* 1 Power on Power off Power on at low preset Alternately inc/dec brightness +* 2 Power on at low preset Dec brightness NOP Dec brightness +* 3 Power on at high preset Inc brightness NOP Inc brightness +* +* 2 Button: +* 1 NOP Power off Power on at low preset Dec brightness +* 2 Power on Inc brightness Power on at high preset Inc brightness +* +* 1 Button: +* 1 Power on Power off Power on at low preset Alternately inc/dec brightness +*/ void PWMDimmerHandleButton(uint32_t button_index, bool pressed) { bool handle_tap = false; @@ -286,7 +306,7 @@ void PWMDimmerHandleButton(uint32_t button_index, bool pressed) #else // USE_PWM_DIMMER_REMOTE bool power_is_on = TasmotaGlobal.power; bool is_power_button = !button_index; - bool is_down_button = (button_index == (power_button_index ? 0 : 1)); + bool is_down_button = (is_two_button ? false : button_index == (power_button_index ? 0 : 1)); #endif // USE_PWM_DIMMER_REMOTE // If the button is being held, ... @@ -313,12 +333,17 @@ void PWMDimmerHandleButton(uint32_t button_index, bool pressed) // direction for the device and then invert the direction when the power button is released. // The new brightness will be calculated below. if (power_is_on) { + if (is_two_button && !Settings->flag4.multiple_device_groups) { + bri_hold = -1; + } + else { #ifdef USE_PWM_DIMMER_REMOTE - bri_hold = (active_remote_pwm_dimmer ? (active_remote_pwm_dimmer->power_button_increases_bri ? 1 : -1) : (power_button_increases_bri ? 1 : -1)); + bri_hold = (active_remote_pwm_dimmer ? (active_remote_pwm_dimmer->power_button_increases_bri ? 1 : -1) : (power_button_increases_bri ? 1 : -1)); #else // USE_PWM_DIMMER_REMOTE - bri_hold = (power_button_increases_bri ? 1 : -1); + bri_hold = (power_button_increases_bri ? 1 : -1); #endif // USE_PWM_DIMMER_REMOTE - invert_power_button_bri_direction = true; + invert_power_button_bri_direction = true; + } } // If the power is not on, turn it on using an initial brightness of bri_preset_low and set @@ -364,8 +389,21 @@ void PWMDimmerHandleButton(uint32_t button_index, bool pressed) // Otherwise, if the power is on, adjust the brightness. Set the direction based on which // button is pressed. The new brightness will be calculated below. - else if (power_is_on && !button_tapped) { - bri_hold = (is_down_button ? -1 : 1); + if (!button_tapped) { + if (power_is_on) { + bri_hold = (is_down_button ? -1 : 1); + } + + // If the power is off and this ia a two button switch, turn the power + // on using a temporary brightness of bri_preset_high. + else { +#ifdef USE_PWM_DIMMER_REMOTE + if (active_remote_pwm_dimmer) + power_on_bri = active_remote_pwm_dimmer->bri = active_remote_pwm_dimmer->bri_preset_high; + else +#endif // USE_PWM_DIMMER_REMOTE + power_on_bri = Settings->bri_preset_high; + } } } } @@ -432,7 +470,8 @@ void PWMDimmerHandleButton(uint32_t button_index, bool pressed) power_on_bri = active_remote_pwm_dimmer->bri_power_on; else #endif // USE_PWM_DIMMER_REMOTE - power_on_bri = Settings->bri_power_on; + if (!is_two_button || Settings->flag4.multiple_device_groups || power_is_on) + power_on_bri = Settings->bri_power_on; } } @@ -478,8 +517,20 @@ void PWMDimmerHandleButton(uint32_t button_index, bool pressed) } } - // If the power is off, turn it on using a temporary brightness of bri_preset_low if the - // down button is pressed or bri_preset_low if the up button is pressed. + // If the power is off and this is a two button switch, turn the power + // on. + else if (is_two_button) { +#ifdef USE_PWM_DIMMER_REMOTE + if (active_remote_pwm_dimmer) + power_on_bri = active_remote_pwm_dimmer->bri_power_on; + else +#endif // USE_PWM_DIMMER_REMOTE + power_on_bri = Settings->bri_power_on; + } + + // If the power is off and this is not a two button switch, turn the + // power on using a temporary brightness of bri_preset_low if the down + // button is pressed or bri_preset_high if the up button is pressed. else { #ifdef USE_PWM_DIMMER_REMOTE if (active_remote_pwm_dimmer) @@ -563,12 +614,9 @@ void PWMDimmerHandleButton(uint32_t button_index, bool pressed) new_power = active_remote_pwm_dimmer->power_on; PWMDimmerSetBrightnessLeds(new_power ? -power_on_bri : 0); } - else { + else #endif // USE_PWM_DIMMER_REMOTE new_power = TasmotaGlobal.power ^ 1; -#ifdef USE_PWM_DIMMER_REMOTE - } -#endif // USE_PWM_DIMMER_REMOTE if (new_power) SendDeviceGroupMessage(negated_device_group_index, DGR_MSGTYP_UPDATE, DGR_ITEM_LIGHT_BRI, power_on_bri, DGR_ITEM_POWER, new_power); else @@ -777,7 +825,7 @@ bool Xdrv35(uint8_t function) // Bottom 15 3 15 1 if (!buttons_pressed && Settings->flag4.multiple_device_groups) { power_button_index = button_index; - down_button_index = (Pin(GPIO_KEY1, power_button_index) == 15 ? TasmotaGlobal.gpio_pin[1] : TasmotaGlobal.gpio_pin[15]) - 32; + down_button_index = (is_two_button ? 99 : Pin(GPIO_KEY1, power_button_index) == 15 ? TasmotaGlobal.gpio_pin[1] : TasmotaGlobal.gpio_pin[15]) - 32; active_remote_pwm_dimmer = nullptr; if (power_button_index || !first_device_group_is_local) active_remote_pwm_dimmer = &remote_pwm_dimmers[power_button_index]; diff --git a/tasmota/xdrv_39_thermostat.ino b/tasmota/xdrv_39_thermostat.ino index ae8d2d92f..414cb358b 100644 --- a/tasmota/xdrv_39_thermostat.ino +++ b/tasmota/xdrv_39_thermostat.ino @@ -1400,6 +1400,12 @@ void CmndThermostatModeSet(void) Thermostat[ctr_output].status.thermostat_mode = value; Thermostat[ctr_output].timestamp_input_on = 0; // Reset last manual switch timer if command set externally } + if ((value == THERMOSTAT_OFF) && (Thermostat[ctr_output].status.enable_output == IFACE_ON)) { + // Make sure the relay is switched to off once if the thermostat is being disabled, + // or it will get stuck on (danger!) + Thermostat[ctr_output].status.command_output = IFACE_OFF; + ThermostatOutputRelay(ctr_output, Thermostat[ctr_output].status.command_output); + } } ResponseCmndIdxNumber((int)Thermostat[ctr_output].status.thermostat_mode); } diff --git a/tasmota/xdrv_44_miel_hvac.ino b/tasmota/xdrv_44_miel_hvac.ino index dd7461d8c..66e034fec 100644 --- a/tasmota/xdrv_44_miel_hvac.ino +++ b/tasmota/xdrv_44_miel_hvac.ino @@ -42,6 +42,8 @@ #include /* from hvac */ +bool temp_type = false; + struct miel_hvac_header { uint8_t start; #define MIEL_HVAC_H_START 0xfc @@ -68,11 +70,14 @@ struct miel_hvac_data_settings { uint8_t widevane; #define MIEL_HVAC_SETTTINGS_WIDEVANE_MASK \ 0x0f + uint8_t temp05; }; struct miel_hvac_data_roomtemp { uint8_t _pad1[2]; uint8_t temp; + uint8_t _pad2[2]; + uint8_t temp05; }; struct miel_hvac_data_status { @@ -109,8 +114,10 @@ CTASSERT(offsetof(struct miel_hvac_data, data.settings.temp) == 5); CTASSERT(offsetof(struct miel_hvac_data, data.settings.fan) == 6); CTASSERT(offsetof(struct miel_hvac_data, data.settings.vane) == 7); CTASSERT(offsetof(struct miel_hvac_data, data.settings.widevane) == 10); +CTASSERT(offsetof(struct miel_hvac_data, data.settings.temp05) == 11); CTASSERT(offsetof(struct miel_hvac_data, data.roomtemp.temp) == 3); +CTASSERT(offsetof(struct miel_hvac_data, data.roomtemp.temp05) == 6); /* to hvac */ @@ -180,7 +187,8 @@ struct miel_hvac_msg_update { #define MIEL_HVAC_UPDATE_WIDEVANE_LR 0x08 #define MIEL_HVAC_UPDATE_WIDEVANE_SWING 0x0c #define MIEL_HVAC_UPDATE_WIDEVANE_ADJ 0x80 - uint8_t _pad2[2]; + uint8_t temp05; + uint8_t _pad2[1]; } __packed; CTASSERT(sizeof(struct miel_hvac_msg_update) == 16); @@ -192,23 +200,42 @@ CTASSERT(offsetof(struct miel_hvac_msg_update, temp) == MIEL_HVAC_OFFS(10)); CTASSERT(offsetof(struct miel_hvac_msg_update, fan) == MIEL_HVAC_OFFS(11)); CTASSERT(offsetof(struct miel_hvac_msg_update, vane) == MIEL_HVAC_OFFS(12)); CTASSERT(offsetof(struct miel_hvac_msg_update, widevane) == MIEL_HVAC_OFFS(18)); +CTASSERT(offsetof(struct miel_hvac_msg_update, temp05) == MIEL_HVAC_OFFS(19)); static inline uint8_t -miel_hvac_deg2temp(uint8_t deg) +miel_hvac_deg2temp(float deg) { - return (31 - deg); + if (!temp_type) { + return (31 - deg); + } + else { + deg = 2*deg + 128; + return ((uint8_t) deg); + } } -static inline uint8_t +static inline float miel_hvac_temp2deg(uint8_t temp) { - return (31 - temp); + if (!temp_type) { + return (31 - temp); + } + else { + temp -= 128; + return ((float) temp/2); + } } -static inline unsigned int +static inline float miel_hvac_roomtemp2deg(uint8_t roomtemp) { - return ((unsigned int)roomtemp + 10); + if (!temp_type) { + return ((unsigned int)roomtemp + 10); + } + else { + roomtemp -= 128; + return ((float) roomtemp/2); + } } struct miel_hvac_msg_remotetemp { @@ -682,20 +709,27 @@ miel_hvac_cmnd_settemp(void) { struct miel_hvac_softc *sc = miel_hvac_sc; struct miel_hvac_msg_update *update = &sc->sc_update; - unsigned long degc; + float degc; if (XdrvMailbox.data_len == 0) return; - - degc = strtoul(XdrvMailbox.data, nullptr, 0); + + degc = strtof(XdrvMailbox.data, nullptr); if (degc < MIEL_HVAC_UPDATE_TEMP_MIN || degc > MIEL_HVAC_UPDATE_TEMP_MAX) { miel_hvac_respond_unsupported(); return; } - update->flags |= htons(MIEL_HVAC_UPDATE_F_TEMP); - update->temp = miel_hvac_deg2temp(degc); + if (!temp_type) { + update->temp = miel_hvac_deg2temp(degc); + update->temp05 = 0; + } + + else { + update->temp = 0; + update->temp05 = miel_hvac_deg2temp(degc); + } ResponseCmndNumber(degc); } @@ -871,9 +905,15 @@ miel_hvac_publish_settings(struct miel_hvac_softc *sc) ResponseAppend_P(PSTR(",\"HA" D_JSON_IRHVAC_MODE "\":\"%s\""), set->power ? name : "off"); } - - dtostrfd(ConvertTemp(miel_hvac_temp2deg(set->temp)), - Settings->flag2.temperature_resolution, temp); + if (set->temp05 == 0) { + dtostrfd(ConvertTemp(miel_hvac_temp2deg(set->temp)), + Settings->flag2.temperature_resolution, temp); + } + else { + temp_type = true; + dtostrfd(ConvertTemp(miel_hvac_temp2deg(set->temp05)), + Settings->flag2.temperature_resolution, temp); + } ResponseAppend_P(PSTR(",\"" D_JSON_IRHVAC_TEMP "\":%s"), temp); name = miel_hvac_map_byval(set->fan, @@ -1074,11 +1114,18 @@ miel_hvac_sensor(struct miel_hvac_softc *sc) if (sc->sc_temp.type != 0) { const struct miel_hvac_data_roomtemp *rt = &sc->sc_temp.data.roomtemp; - unsigned int temp = miel_hvac_roomtemp2deg(rt->temp); char room_temp[33]; - - dtostrfd(ConvertTemp(temp), - Settings->flag2.temperature_resolution, room_temp); + if(rt->temp05 == 0) { + unsigned int temp = miel_hvac_roomtemp2deg(rt->temp); + dtostrfd(ConvertTemp(temp), + Settings->flag2.temperature_resolution, room_temp); + } + else { + temp_type = true; + float temp = miel_hvac_roomtemp2deg(rt->temp05); + dtostrfd(ConvertTemp(temp), + Settings->flag2.temperature_resolution, room_temp); + } ResponseAppend_P(PSTR("\"" D_JSON_TEMPERATURE "\":%s"), room_temp); diff --git a/tasmota/xdrv_50_filesystem.ino b/tasmota/xdrv_50_filesystem.ino index 8a0ed1d16..0785a7329 100644 --- a/tasmota/xdrv_50_filesystem.ino +++ b/tasmota/xdrv_50_filesystem.ino @@ -287,16 +287,40 @@ bool TfsFileExists(const char *fname){ bool TfsSaveFile(const char *fname, const uint8_t *buf, uint32_t len) { if (!ffs_type) { return false; } - +#ifdef USE_WEBCAM + WcInterrupt(0); // Stop stream if active to fix TG1WDT_SYS_RESET +#endif + bool result = false; File file = ffsp->open(fname, "w"); if (!file) { AddLog(LOG_LEVEL_INFO, PSTR("TFS: Save failed")); - return false; + } else { + // This will timeout on ESP32-webcam + // But now solved with WcInterrupt(0) in support_esp.ino + file.write(buf, len); + /* + // This will still timeout on ESP32-webcam when wcresolution 10 + uint32_t count = len / 512; + uint32_t chunk = len / count; + for (uint32_t i = 0; i < count; i++) { + file.write(buf + (i * chunk), chunk); + // do actually wait a little to allow ESP32 tasks to tick + // fixes task timeout in ESP32Solo1 style unicore code and webcam. + delay(10); + OsWatchLoop(); + } + uint32_t left = len % count; + if (left) { + file.write(buf + (count * chunk), left); + } + */ + file.close(); + result = true; } - - file.write(buf, len); - file.close(); - return true; +#ifdef USE_WEBCAM + WcInterrupt(1); +#endif + return result; } bool TfsInitFile(const char *fname, uint32_t len, uint8_t init_value) { diff --git a/tasmota/xdrv_52_0_berry_struct.ino b/tasmota/xdrv_52_0_berry_struct.ino index 70e443cb3..760358ab0 100644 --- a/tasmota/xdrv_52_0_berry_struct.ino +++ b/tasmota/xdrv_52_0_berry_struct.ino @@ -23,8 +23,14 @@ #include #include +#include "be_mapping.h" #include "re1.5.h" +/*********************************************************************************************\ + * Logging for Tasmota Berry console + * + * We need to declare the the log class first since it is used in structure +\*********************************************************************************************/ #define BERRY_CONSOLE_CMD_DELIMITER "\x01" class Log_line { @@ -71,6 +77,12 @@ public: LList log; }; +/*********************************************************************************************\ + * Berry global structure + * +\*********************************************************************************************/ +class BerryLog; + class BerrySupport { public: bvm *vm = nullptr; // berry vm @@ -84,5 +96,4 @@ public: }; BerrySupport berry; - #endif // USE_BERRY diff --git a/tasmota/xdrv_52_1_berry_native.ino b/tasmota/xdrv_52_1_berry_native.ino new file mode 100644 index 000000000..4481320d7 --- /dev/null +++ b/tasmota/xdrv_52_1_berry_native.ino @@ -0,0 +1,125 @@ +/* + xdrv_52_1_berry_native.ino - Berry scripting language, native fucnctions + + Copyright (C) 2021 Stephan Hadinger, Berry language by Guan Wenliang https://github.com/Skiars/berry + + This program is free software: you can redistribute it and/or modify + it under the terms of the GNU General Public License as published by + the Free Software Foundation, either version 3 of the License, or + (at your option) any later version. + + This program 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 General Public License for more details. + + You should have received a copy of the GNU General Public License + along with this program. If not, see . +*/ + + +#ifdef USE_BERRY + +#include +#include + +const char kTypeError[] PROGMEM = "type_error"; +const char kInternalError[] PROGMEM = "intenal_error"; + +/*********************************************************************************************\ + * LVGL top level virtual members + * + * Responds to virtual constants +\*********************************************************************************************/ +extern "C" { + #include "be_vm.h" + // Call error handler and pop all from stack + void be_error_pop_all(bvm *vm); + void be_error_pop_all(bvm *vm) { + if (vm->obshook != NULL) (*vm->obshook)(vm, BE_OBS_PCALL_ERROR); + be_pop(vm, be_top(vm)); // clear Berry stack + } + + #include "be_exec.h" + #include "be_debug.h" + void be_dumpstack(bvm *vm) { + int32_t top = be_top(vm); + AddLog(LOG_LEVEL_INFO, "BRY: top=%d", top); + be_tracestack(vm); + for (uint32_t i = 1; i <= top; i++) { + const char * tname = be_typename(vm, i); + const char * cname = be_classname(vm, i); + if (be_isstring(vm, i)) { + cname = be_tostring(vm, i); + } + AddLog(LOG_LEVEL_INFO, "BRY: stack[%d] = type='%s' (%s)", i, (tname != nullptr) ? tname : "", (cname != nullptr) ? cname : ""); + } + } + + // convert to unsigned 8 bits + static uint8_t to_u8(int32_t v) { + if (v < 0) { return 0; } + if (v > 0xFF) { return 0xFF; } + return v; + } + + int32_t member_find(bvm *vm, const char *key, int32_t default_value) { + int32_t ret = default_value; + if (be_getmember(vm, -1, key)) { + if (be_isint(vm, -1)) { + ret = be_toint(vm, -1); + } + } + be_pop(vm, 1); + return ret; + } + static bool map_find(bvm *vm, const char *key) + { + be_getmethod(vm, -1, "find"); // look for "find" method of "Map" instance + be_pushvalue(vm, -2); // put back instance as first argument (implicit instance) + be_pushstring(vm, key); // push string as second argument + be_call(vm, 2); // call wirn 2 parameters (implicit instance and key) + be_pop(vm, 2); // pop 2 arguments, the function is replaced by result + return !be_isnil(vm, -1); // true if not 'nil' + } + static int32_t get_list_size(bvm *vm) { + be_getmethod(vm, -1, "size"); // look for "size" method of "list" instance + be_pushvalue(vm, -2); // put back instance as first argument (implicit instance) + be_call(vm, 1); // call wirn 2 parameters (implicit instance and key) + int32_t ret = be_toint(vm, -2); + be_pop(vm, 2); // pop 1 argument and return value + return ret; + } + // get item number `index` from list, index must be valid or raises an exception + static void get_list_item(bvm *vm, int32_t index) { + be_getmethod(vm, -1, "item"); // look for "size" method of "list" instance + be_pushvalue(vm, -2); // put back instance as first argument (implicit instance) + be_pushint(vm, index); + // be_dumpstack(vm); + be_call(vm, 2); // call wirn 2 parameters (implicit instance and key) + be_pop(vm, 2); // pop 2 arguments and return value + } +} + +/*********************************************************************************************\ + * Manage timeout for Berry code + * +\*********************************************************************************************/ +void BrTimeoutStart(void) { + berry.timeout = millis() + USE_BERRY_TIMEOUT; + if (0 == berry.timeout) { + berry.timeout = 1; // rare case when value accidentally computes to zero + } +} + +void BrTimeoutYield(void) { + if (0 != berry.timeout) { + BrTimeoutStart(); + } +} + +void BrTimeoutReset(void) { + berry.timeout = 0; // remove timer +} + +#endif // USE_BERRY diff --git a/tasmota/xdrv_52_2_berry_native.ino b/tasmota/xdrv_52_2_berry_native.ino deleted file mode 100644 index e8acc8039..000000000 --- a/tasmota/xdrv_52_2_berry_native.ino +++ /dev/null @@ -1,562 +0,0 @@ -/* - xdrv_52_3_berry_native.ino - Berry scripting language, native fucnctions - - Copyright (C) 2021 Stephan Hadinger, Berry language by Guan Wenliang https://github.com/Skiars/berry - - This program is free software: you can redistribute it and/or modify - it under the terms of the GNU General Public License as published by - the Free Software Foundation, either version 3 of the License, or - (at your option) any later version. - - This program 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 General Public License for more details. - - You should have received a copy of the GNU General Public License - along with this program. If not, see . -*/ - - -#ifdef USE_BERRY - -#include -#include - -const char kTypeError[] PROGMEM = "type_error"; -const char kInternalError[] PROGMEM = "intenal_error"; - -extern "C" { - - /*********************************************************************************************\ - * Support for Berry int constants - * as virtual members - \*********************************************************************************************/ - typedef struct be_constint_t { - const char * name; - int32_t value; - } be_constint_t; - -} - -/*********************************************************************************************\ - * LVGL top level virtual members - * - * Responds to virtual constants -\*********************************************************************************************/ -extern "C" { - #include "be_exec.h" - #include "be_debug.h" - void be_dumpstack(bvm *vm) { - int32_t top = be_top(vm); - AddLog(LOG_LEVEL_INFO, "BRY: top=%d", top); - be_tracestack(vm); - for (uint32_t i = 1; i <= top; i++) { - const char * tname = be_typename(vm, i); - const char * cname = be_classname(vm, i); - if (be_isstring(vm, i)) { - cname = be_tostring(vm, i); - } - AddLog(LOG_LEVEL_INFO, "BRY: stack[%d] = type='%s' (%s)", i, (tname != nullptr) ? tname : "", (cname != nullptr) ? cname : ""); - } - } - - // convert to unsigned 8 bits - static uint8_t to_u8(int32_t v) { - if (v < 0) { return 0; } - if (v > 0xFF) { return 0xFF; } - return v; - } - - // variant of be_raise with string format - [[ noreturn ]] void be_raisef(bvm *vm, const char *except, const char *msg, ...) { - // To save stack space support logging for max text length of 128 characters - char log_data[128]; - - va_list arg; - va_start(arg, msg); - uint32_t len = ext_vsnprintf_P(log_data, sizeof(log_data)-3, msg, arg); - va_end(arg); - if (len+3 > sizeof(log_data)) { strcat(log_data, "..."); } // Actual data is more - be_raise(vm, except, log_data); - } - - static void map_insert_int(bvm *vm, const char *key, int value) - { - be_pushstring(vm, key); - be_pushint(vm, value); - be_data_insert(vm, -3); - be_pop(vm, 2); - } - static void map_insert_bool(bvm *vm, const char *key, bool value) - { - be_pushstring(vm, key); - be_pushbool(vm, value); - be_data_insert(vm, -3); - be_pop(vm, 2); - } - // if value == NAN, ignore - static void map_insert_float(bvm *vm, const char *key, float value) - { - if (!isnan(value)) { - be_pushstring(vm, key); - be_pushreal(vm, value); - be_data_insert(vm, -3); - be_pop(vm, 2); - } - } - static void map_insert_str(bvm *vm, const char *key, const char *value) - { - be_pushstring(vm, key); - be_pushstring(vm, value); - be_data_insert(vm, -3); - be_pop(vm, 2); - } - static void map_insert_list_uint8(bvm *vm, const char *key, const uint8_t *value, size_t size) - { - be_pushstring(vm, key); - - be_newobject(vm, "list"); - for (uint32_t i=0; i < size; i++) { - be_pushint(vm, value[i]); - be_data_push(vm, -2); - be_pop(vm, 1); - } - be_pop(vm, 1); // now list is on top - - be_data_insert(vm, -3); // insert into map, key/value - be_pop(vm, 2); // pop both key and value - } - int32_t member_find(bvm *vm, const char *key, int32_t default_value) { - int32_t ret = default_value; - if (be_getmember(vm, -1, key)) { - if (be_isint(vm, -1)) { - ret = be_toint(vm, -1); - } - } - be_pop(vm, 1); - return ret; - } - static bool map_find(bvm *vm, const char *key) - { - be_getmethod(vm, -1, "find"); // look for "find" method of "Map" instance - be_pushvalue(vm, -2); // put back instance as first argument (implicit instance) - be_pushstring(vm, key); // push string as second argument - be_call(vm, 2); // call wirn 2 parameters (implicit instance and key) - be_pop(vm, 2); // pop 2 arguments, the function is replaced by result - return !be_isnil(vm, -1); // true if not 'nil' - } - static int32_t get_list_size(bvm *vm) { - be_getmethod(vm, -1, "size"); // look for "size" method of "list" instance - be_pushvalue(vm, -2); // put back instance as first argument (implicit instance) - be_call(vm, 1); // call wirn 2 parameters (implicit instance and key) - int32_t ret = be_toint(vm, -2); - be_pop(vm, 2); // pop 1 argument and return value - return ret; - } - // get item number `index` from list, index must be valid or raises an exception - static void get_list_item(bvm *vm, int32_t index) { - be_getmethod(vm, -1, "item"); // look for "size" method of "list" instance - be_pushvalue(vm, -2); // put back instance as first argument (implicit instance) - be_pushint(vm, index); - // be_dumpstack(vm); - be_call(vm, 2); // call wirn 2 parameters (implicit instance and key) - be_pop(vm, 2); // pop 2 arguments and return value - } - - // create an object from the pointer and a class name - // on return, instance is pushed on the stack - void lv_create_object(bvm *vm, const char * class_name, void * ptr); - void lv_create_object(bvm *vm, const char * class_name, void * ptr) { - if (ptr == nullptr) { - be_throw(vm, BE_MALLOC_FAIL); - } - - be_getglobal(vm, class_name); // stack = class - be_call(vm, 0); // instanciate, stack = instance - be_getmember(vm, -1, "init"); // stack = instance, init_func - be_pushvalue(vm, -2); // stack = instance, init_func, instance - be_pushcomptr(vm, ptr); // stack = instance, init_func, instance, ptr - be_call(vm, 2); // stack = instance, ret, instance, ptr - be_pop(vm, 3); // stack = instance - } - - extern void berry_log_C(const char * berry_buf, ...); - // Create a class given a global name or a name within a module - // Case 1: (no dot in name) `lv_wifi_bars` will look for a global variable `lv_wifi_bars` - // Case 2: (dot in name) `lvgl.lv_obj` will import `lvgl` and look for `lv_obj` within this module - // returns true if successful and result is top of stack, or false if not found and `nil` is at top of stack - bbool be_find_class(bvm *vm, const char * cl_name); - bbool be_find_class(bvm *vm, const char * cl_name) { - char *saveptr; - bbool ret = false; - - if (cl_name == NULL) { - be_pushnil(vm); - return ret; - } - // berry_log_C(">> be_find_class %s", cl_name); - char cl_name_buf[strlen(cl_name)+1]; - strcpy(cl_name_buf, cl_name); - - char * prefix = strtok_r(cl_name_buf, ".", &saveptr); - char * suffix = strtok_r(NULL, ".", &saveptr); - if (suffix) { - // berry_log_C(">> be_find_class %s - %s", prefix, suffix); - be_getmodule(vm, prefix); - ret = be_getmember(vm, -1, suffix); - // berry_log_C(">> be_find_class ret=%i", ret); - be_remove(vm, -2); - } else { - ret = be_getglobal(vm, prefix); - } - return ret; - } -} - -/*********************************************************************************************\ - * Binary search for dynamic attributes - * - * Names need to be sorted -\*********************************************************************************************/ -// binary search within an array of sorted strings -// the first 4 bytes are a pointer to a string -// returns 0..total_elements-1 or -1 if not found -// -// This version skips the first character of the string if it's not a letter, -// the first character is used to indicate the type of the value associated to the key -extern "C" { - int32_t bin_search(const char * needle, const void * table, size_t elt_size, size_t total_elements); - int32_t bin_search(const char * needle, const void * table, size_t elt_size, size_t total_elements) { - int32_t low = 0; - int32_t high = total_elements - 1; - int32_t mid = (low + high) / 2; - // start a dissect - while (low <= high) { - const char * elt = *(const char **) ( ((uint8_t*)table) + mid * elt_size ); - char first_char = elt[0]; - if ( !(first_char >= 'a' && first_char <='z') && !(first_char >= 'A' && first_char <='Z') ) { - elt++; // skip first char - } - int32_t comp = strcmp(needle, elt); - if (comp < 0) { - high = mid - 1; - } else if (comp > 0) { - low = mid + 1; - } else { - break; - } - mid = (low + high) / 2; - } - if (low <= high) { - return mid; - } else { - return -1; - } - } -} - -/*********************************************************************************************\ - * Generalized callbacks - * -\*********************************************************************************************/ -extern "C" { - - typedef int32_t (*berry_callback_t)(int32_t v0, int32_t v1, int32_t v2, int32_t v3); - extern void BerryDumpErrorAndClear(bvm *vm, bool berry_console); - - int32_t call_berry_cb(int32_t num, int32_t v0, int32_t v1, int32_t v2, int32_t v3) { - // call berry cb dispatcher - int32_t ret = 0; - // get the 'tasmota' object (global) and call 'cb_dispatch' - be_getglobal(berry.vm, PSTR("tasmota")); - if (!be_isnil(berry.vm, -1)) { - be_getmethod(berry.vm, -1, PSTR("cb_dispatch")); - - if (!be_isnil(berry.vm, -1)) { - be_pushvalue(berry.vm, -2); // add instance as first arg - // push all args as ints (may be revised) - be_pushint(berry.vm, num); - be_pushint(berry.vm, v0); - be_pushint(berry.vm, v1); - be_pushint(berry.vm, v2); - be_pushint(berry.vm, v3); - - ret = be_pcall(berry.vm, 6); // 5 arguments - if (ret != 0) { - BerryDumpErrorAndClear(berry.vm, false); // log in Tasmota console only - return 0; - } - be_pop(berry.vm, 6); - - if (be_isint(berry.vm, -1) || be_isnil(berry.vm, -1)) { // sanity check - if (be_isint(berry.vm, -1)) { - ret = be_toint(berry.vm, -1); - } - // All good, we can proceed - be_pop(berry.vm, 2); // remove tasmota instance and result - return ret; - } - } - be_pop(berry.vm, 1); - } - be_pop(berry.vm, 1); - AddLog(LOG_LEVEL_ERROR, PSTR(D_LOG_BERRY "can't call 'tasmota.cb_dispatch'")); - return 0; - } - - #define BERRY_CB(n) int32_t berry_cb_##n(int32_t v0, int32_t v1, int32_t v2, int32_t v3) { return call_berry_cb(n, v0, v1, v2, v3); } - // list the callbacks - BERRY_CB(0); - BERRY_CB(1); - BERRY_CB(2); - BERRY_CB(3); - BERRY_CB(4); - BERRY_CB(5); - BERRY_CB(6); - BERRY_CB(7); - BERRY_CB(8); - BERRY_CB(9); - BERRY_CB(10); - BERRY_CB(11); - BERRY_CB(12); - BERRY_CB(13); - BERRY_CB(14); - BERRY_CB(15); - BERRY_CB(16); - BERRY_CB(17); - BERRY_CB(18); - BERRY_CB(19); - - // array of callbacks - berry_callback_t berry_callback_array[] { - berry_cb_0, - berry_cb_1, - berry_cb_2, - berry_cb_3, - berry_cb_4, - berry_cb_5, - berry_cb_6, - berry_cb_7, - berry_cb_8, - berry_cb_9, - berry_cb_10, - berry_cb_11, - berry_cb_12, - berry_cb_13, - berry_cb_14, - berry_cb_15, - berry_cb_16, - berry_cb_17, - berry_cb_18, - berry_cb_19, - }; -} - - -#define LV_OBJ_CLASS "lv_obj" -#define LV_MODULE "lvgl" // name of the lvgl module - -/*********************************************************************************************\ - * Automatically parse Berry stack and call the C function accordingly - * - * This function takes the n incoming arguments and pushes them as arguments - * on the stack for the C function: - * - be_int -> int32_t - * - be_bool -> int32_t with value 0/1 - * - be_string -> const char * - * - be_instance -> gets the member "_p" and pushes as void* - * - * This works because C silently ignores any unwanted arguments. - * There is a strong requirements that all ints and pointers are 32 bits. - * Float is not supported but could be added. Double cannot be supported because they are 64 bits - * - * Optional argument: - * - return_type: the C function return value is int32_t and is converted to the - * relevant Berry object depending on this char: - * '' (default): nil, no value - * 'i' be_int - * 'b' be_bool - * 's' be_str - * - * - arg_type: optionally check the types of input arguments, or throw an error - * string of argument types, '+' marks optional arguments - * '.' don't care - * 'i' be_int - * 'b' be_bool - * 's' be_string - * 'c' C callback - * 'lv_obj' be_instance of type or subtype - * '^lv_event_cb' callback of a named class - will call `_lvgl.gen_cb(arg_type, closure, self, lv native pointer)` and expects a callback address in return - * - * Ex: "oii+s" takes 3 mandatory arguments (obj_instance, int, int) and an optional fourth one [,string] -\*********************************************************************************************/ -// general form of lv_obj_t* function, up to 4 parameters -// We can only send 32 bits arguments (no 64 bits nor double) and we expect pointers to be 32 bits - -#define LVBE_LVGL_GLOB "_lvgl" -#define LVBE_LVGL_CB_GEN "gen_cb" - -// read a single value at stack position idx, convert to int. -// if object instance, get `_p` member and convert it recursively -int32_t be_convert_single_elt(bvm *vm, int32_t idx, const char * arg_type = nullptr, int32_t lv_obj_cb = 0) { - int32_t ret = 0; - char provided_type = 0; - idx = be_absindex(vm, idx); // make sure we have an absolute index - - // berry_log_C(">> 0 idx=%i arg_type=%s", idx, arg_type ? arg_type : "NULL"); - if (arg_type == nullptr) { arg_type = "."; } // if no type provided, replace with wildchar - size_t arg_type_len = strlen(arg_type); - - // handle callbacks first, since a wrong parameter will always yield to a crash - if (arg_type_len > 1 && arg_type[0] == '^') { // it is a callback - arg_type++; // skip first character - if (be_isclosure(vm, idx)) { - be_getglobal(vm, LVBE_LVGL_GLOB); - be_getmethod(vm, -1, LVBE_LVGL_CB_GEN); - be_pushvalue(vm, -2); - be_remove(vm, -3); // stack contains method + instance - be_pushstring(vm, arg_type); - be_pushvalue(vm, idx); - be_pushvalue(vm, 1); - be_pushint(vm, lv_obj_cb); - be_call(vm, 5); - const void * func = be_tocomptr(vm, -6); - be_pop(vm, 6); - - // berry_log_P("func=%p", func); - return (int32_t) func; - } else { - be_raise(vm, kTypeError, "Closure expected for callback type"); - } - } - - // first convert the value to int32 - if (be_isint(vm, idx)) { ret = be_toint(vm, idx); provided_type = 'i'; } - else if (be_isbool(vm, idx)) { ret = be_tobool(vm, idx); provided_type = 'b'; } - else if (be_isstring(vm, idx)) { ret = (int32_t) be_tostring(vm, idx); provided_type = 's'; } - else if (be_iscomptr(vm, idx)) { ret = (int32_t) be_tocomptr(vm, idx); provided_type = 'c'; } - - // check if simple type was a match - if (provided_type) { - bool type_ok = false; - type_ok = (arg_type[0] == '.'); // any type is accepted - type_ok = type_ok || (arg_type[0] == provided_type); // or type is a match - type_ok = type_ok || (ret == 0 && arg_type_len != 1); // or NULL is accepted for an instance - - if (!type_ok) { - berry_log_P("Unexpected argument type '%c', expected '%s'", provided_type, arg_type); - } - return ret; - } - - // non-simple type - if (be_isinstance(vm, idx)) { - // check if the instance is a subclass of `bytes()`` - be_getbuiltin(vm, "bytes"); // add "list" class - if (be_isderived(vm, idx)) { - be_pop(vm, 1); - be_getmember(vm, idx, "_buffer"); - be_pushvalue(vm, idx); - be_call(vm, 1); - int32_t ret = (int32_t) be_tocomptr(vm, -2); - be_pop(vm, 2); - return ret; - } else { - be_pop(vm, 1); - be_getmember(vm, idx, "_p"); - int32_t ret = be_convert_single_elt(vm, -1, nullptr); // recurse - be_pop(vm, 1); - - if (arg_type_len > 1) { - // Check type - be_classof(vm, idx); - bool class_found = be_find_class(vm, arg_type); - // Stack: class_of_idx, class_of_target (or nil) - if (class_found) { - if (!be_isderived(vm, -2)) { - berry_log_P("Unexpected class type '%s', expected '%s'", be_classname(vm, idx), arg_type); - } - } else { - berry_log_P("Unable to find class '%s' (%d)", arg_type, arg_type_len); - } - be_pop(vm, 2); - } else if (arg_type[0] != '.') { - berry_log_P("Unexpected instance type '%s', expected '%s'", be_classname(vm, idx), arg_type); - } - - return ret; - } - } else { - be_raise(vm, kTypeError, nullptr); - } - - return ret; -} - -extern "C" { - - /*********************************************************************************************\ - * Generalized virtual members for modules - * - * Takes a pointer to be_constint_t array and size - * Returns true if a match was found. In such case the result is on Berry stack - * - * Encoding depend on prefix (which is skipped when matching names): - * 1. `COLOR_WHITE` int value - * 3. `$SYMBOL_OK"` string pointer - * 4. `&seg7_font` comptr - \*********************************************************************************************/ - bool be_module_member(bvm *vm, const be_constint_t * definitions, size_t def_len); - bool be_module_member(bvm *vm, const be_constint_t * definitions, size_t def_len) { - int32_t argc = be_top(vm); // Get the number of arguments - if (argc == 1 && be_isstring(vm, 1)) { - const char * needle = be_tostring(vm, 1); - int32_t idx; - - idx = bin_search(needle, &definitions[0].name, sizeof(definitions[0]), def_len); - if (idx >= 0) { - // we did have a match - const char * key = definitions[idx].name; - switch (key[0]) { - // switch depending on the first char of the key, indicating the type - case '$': // string - be_pushstring(vm, (const char*) definitions[idx].value); - break; - case '&': // native function - be_pushntvfunction(vm, (bntvfunc) definitions[idx].value); - break; - default: // int - be_pushint(vm, definitions[idx].value); - break; - } - return true; - } - } - return false; - } -} - -/*********************************************************************************************\ - * Manage timeout for Berry code - * -\*********************************************************************************************/ -void BrTimeoutStart(void) { - berry.timeout = millis() + USE_BERRY_TIMEOUT; - if (0 == berry.timeout) { - berry.timeout = 1; // rare case when value accidentally computes to zero - } - -} - -void BrTimeoutYield(void) { - if (0 != berry.timeout) { - BrTimeoutStart(); - } -} - -void BrTimeoutReset(void) { - berry.timeout = 0; // remove timer -} - -#endif // USE_BERRY diff --git a/tasmota/xdrv_52_3_berry_display.ino b/tasmota/xdrv_52_3_berry_display.ino index ed930301d..7dc52031d 100644 --- a/tasmota/xdrv_52_3_berry_display.ino +++ b/tasmota/xdrv_52_3_berry_display.ino @@ -36,8 +36,8 @@ Renderer *Init_uDisplay(const char *desc); \*********************************************************************************************/ extern "C" { - int be_disp_start(bvm *vm); - int be_disp_start(bvm *vm) { + int be_ntv_display_start(bvm *vm); + int be_ntv_display_start(bvm *vm) { #ifdef USE_UNIVERSAL_DISPLAY int32_t argc = be_top(vm); // Get the number of arguments if (argc >= 1 && be_isstring(vm, 1)) { diff --git a/tasmota/xdrv_52_3_berry_gpio.ino b/tasmota/xdrv_52_3_berry_gpio.ino index f694b6444..63f29c258 100644 --- a/tasmota/xdrv_52_3_berry_gpio.ino +++ b/tasmota/xdrv_52_3_berry_gpio.ino @@ -39,7 +39,7 @@ extern "C" { // virtual member int gp_member(bvm *vm); int gp_member(bvm *vm) { - if (be_module_member(vm, lv_gpio_constants, lv_gpio_constants_size)) { + if (be_const_member(vm, lv_gpio_constants, lv_gpio_constants_size)) { be_return(vm); } else { be_return_nil(vm); diff --git a/tasmota/xdrv_52_3_berry_light.ino b/tasmota/xdrv_52_3_berry_light.ino index 19aa3cfb6..89ba735e3 100644 --- a/tasmota/xdrv_52_3_berry_light.ino +++ b/tasmota/xdrv_52_3_berry_light.ino @@ -50,11 +50,11 @@ extern "C" { light_controller.calcLevels(channels); uint8_t bri = light_state.getBri(); - // map_insert_int(vm, "_devices_present", TasmotaGlobal.devices_present); - // map_insert_int(vm, "_light_device", Light.device); - // map_insert_int(vm, "_light_subtype", Light.subtype); - // map_insert_int(vm, "_light_multi", Light.pwm_multi_channels); - // map_insert_int(vm, "_light_linked", light_controller.isCTRGBLinked()); + // be_map_insert_int(vm, "_devices_present", TasmotaGlobal.devices_present); + // be_map_insert_int(vm, "_light_device", Light.device); + // be_map_insert_int(vm, "_light_subtype", Light.subtype); + // be_map_insert_int(vm, "_light_multi", Light.pwm_multi_channels); + // be_map_insert_int(vm, "_light_linked", light_controller.isCTRGBLinked()); if (!Light.pwm_multi_channels) { uint32_t subtype = Light.subtype; // virtual sub-type, for SO37 128 @@ -64,7 +64,7 @@ extern "C" { if (light_controller.isCTRGBLinked() && (light_num == 0)) { data_present = true; // valid combination if (subtype >= LST_RGBW) { - map_insert_str(vm, "colormode", (light_state.getColorMode() & LCM_RGB ? "rgb" : "ct")); + be_map_insert_str(vm, "colormode", (light_state.getColorMode() & LCM_RGB ? "rgb" : "ct")); } } if (!light_controller.isCTRGBLinked()) { @@ -83,33 +83,33 @@ extern "C" { if (data_present) { // see ResponseLightState() - map_insert_bool(vm, "power", bitRead(TasmotaGlobal.power, light_num + Light.device - 1)); - map_insert_int(vm, "bri", bri); + be_map_insert_bool(vm, "power", bitRead(TasmotaGlobal.power, light_num + Light.device - 1)); + be_map_insert_int(vm, "bri", bri); if (subtype >= LST_RGB) { uint16_t hue; uint8_t sat, bri; light_state.getHSB(&hue, &sat, &bri); - map_insert_int(vm, "hue", hue); - map_insert_int(vm, "sat", sat); + be_map_insert_int(vm, "hue", hue); + be_map_insert_int(vm, "sat", sat); } if ((LST_COLDWARM == subtype) || (LST_RGBW <= subtype)) { - map_insert_int(vm, "ct", light_state.getCT()); + be_map_insert_int(vm, "ct", light_state.getCT()); } if (subtype >= LST_RGB) { snprintf(s_rgb, sizeof(s_rgb), PSTR("%02X%02X%02X"), channels[0], channels[1], channels[2]); - map_insert_str(vm, "rgb", s_rgb); + be_map_insert_str(vm, "rgb", s_rgb); } if (subtype > LST_NONE) { - map_insert_list_uint8(vm, "channels", &channels[chanidx], subtype); + be_map_insert_list_uint8(vm, "channels", &channels[chanidx], subtype); } } } else { // Light.pwm_multi_channels if ((light_num >= 0) && (light_num < LST_MAX)) { data_present = true; - map_insert_bool(vm, "power", Light.power & (1 << light_num)); - map_insert_int(vm, "bri", Light.current_color[light_num]); - map_insert_list_uint8(vm, "channels", &channels[light_num], 1); + be_map_insert_bool(vm, "power", Light.power & (1 << light_num)); + be_map_insert_int(vm, "bri", Light.current_color[light_num]); + be_map_insert_list_uint8(vm, "channels", &channels[light_num], 1); } } diff --git a/tasmota/xdrv_52_3_berry_lvgl.ino b/tasmota/xdrv_52_3_berry_lvgl.ino index af435851b..f86ed7db7 100644 --- a/tasmota/xdrv_52_3_berry_lvgl.ino +++ b/tasmota/xdrv_52_3_berry_lvgl.ino @@ -23,7 +23,7 @@ #include #include "lvgl.h" -#include "be_lvgl.h" +#include "be_mapping.h" #include "be_ctypes.h" #include "Adafruit_LvGL_Glue.h" @@ -35,6 +35,8 @@ // Berry easy logging extern "C" { extern void berry_log_C(const char * berry_buf, ...); + extern const be_ntv_class_def_t lv_classes[]; + extern const size_t lv_classes_size; } extern Adafruit_LvGL_Glue * glue; @@ -99,80 +101,6 @@ LVBE_globals lvbe; extern void start_lvgl(const char * uconfig); extern void lv_ex_get_started_1(void); -/*********************************************************************************************\ - * Calling any LVGL function with auto-mapping - * -\*********************************************************************************************/ - -// check input parameters, and create callbacks if needed -// change values in place -// -// Format: -// - either a lowercase character encoding for a simple type -// - 'b': bool -// - 'i': int (int32_t) -// - 's': string (const char *) -// -// - a class name surroungded by parenthesis -// - '(lv_button)' -> lv_button class or derived -// - '[lv_event_cb]' -> callback type, still prefixed with '^' to mark that it is cb -// -void be_check_arg_type(bvm *vm, int32_t arg_start, int32_t argc, const char * arg_type, int32_t p[8]); -void be_check_arg_type(bvm *vm, int32_t arg_start, int32_t argc, const char * arg_type, int32_t p[8]) { - bool arg_type_check = (arg_type != nullptr); // is type checking activated - int32_t arg_idx = 0; // position in arg_type string - char type_short_name[32]; - - for (uint32_t i = 0; i < argc; i++) { - type_short_name[0] = 0; // clear string - // extract individual type - if (nullptr != arg_type) { - switch (arg_type[arg_idx]) { - case '.': - case 'a'...'z': - type_short_name[0] = arg_type[arg_idx]; - type_short_name[1] = 0; - arg_idx++; - break; - case '(': - case '^': - { - uint32_t prefix = 0; - if (arg_type[arg_idx] == '^') { - type_short_name[0] = '^'; - type_short_name[1] = 0; - prefix = 1; - } - uint32_t offset = 0; - arg_idx++; - while (arg_type[arg_idx + offset] != ')' && arg_type[arg_idx + offset] != '^' && arg_type[arg_idx + offset] != 0 && offset+prefix+1 < sizeof(type_short_name)) { - type_short_name[offset+prefix] = arg_type[arg_idx + offset]; - type_short_name[offset+prefix+1] = 0; - offset++; - } - if (arg_type[arg_idx + offset] == 0) { - arg_type = nullptr; // no more parameters, stop iterations - } - arg_idx += offset + 1; - } - break; - case 0: - arg_type = nullptr; // stop iterations - break; - } - } - // AddLog(LOG_LEVEL_INFO, ">> be_call_c_func arg %i, type %s", i, arg_type_check ? type_short_name : ""); - p[i] = be_convert_single_elt(vm, i + arg_start, arg_type_check ? type_short_name : nullptr, p[0]); - } - - // check if we are missing arguments - if (arg_type != nullptr && arg_type[arg_idx] != 0) { - berry_log_P("Missing arguments, remaining type '%s'", &arg_type[arg_idx]); - } -} - -typedef int32_t (*fn_any_callable)(int32_t p0, int32_t p1, int32_t p2, int32_t p3, - int32_t p4, int32_t p5, int32_t p6, int32_t p7); extern "C" { void lv_init_set_member(bvm *vm, int index, void * ptr); @@ -205,15 +133,15 @@ extern "C" { // berry_log_C("lvx_member looking for method '%s' of class '%s'", method_name, class_name); // look for class descriptor - int32_t class_idx = bin_search(class_name, &lv_classes[0].name, sizeof(lv_classes[0]), lv_classes_size); + int32_t class_idx = be_map_bin_search(class_name, &lv_classes[0].name, sizeof(lv_classes[0]), lv_classes_size); if (class_idx >= 0) { - const lvbe_call_c_t * methods_calls = lv_classes[class_idx].func_table; + const be_ntv_func_def_t * methods_calls = lv_classes[class_idx].func_table; size_t methods_size = lv_classes[class_idx].size; - int32_t method_idx = bin_search(method_name, methods_calls, sizeof(lvbe_call_c_t), methods_size); + int32_t method_idx = be_map_bin_search(method_name, methods_calls, sizeof(be_ntv_func_def_t), methods_size); if (method_idx >= 0) { // method found - const lvbe_call_c_t * method = &methods_calls[method_idx]; + const be_ntv_func_def_t * method = &methods_calls[method_idx]; // berry_log_C("lvx_member method found func=%p return_type=%s arg_type=%s", method->func, method->return_type, method->arg_type); // push native closure be_pushntvclosure(vm, &lvx_call_c, 3); // 3 upvals @@ -245,63 +173,6 @@ extern "C" { } be_raise(vm, kTypeError, nullptr); } - - int be_call_c_func(bvm *vm, void * func, const char * return_type, const char * arg_type) { - // AddLog(LOG_LEVEL_INFO, ">> be_call_c_func, func=%p, return_type=%s, arg_type=%s", func, return_type ? return_type : "", arg_type ? arg_type : ""); - int32_t p[8] = {0,0,0,0,0,0,0,0}; - int32_t argc = be_top(vm); // Get the number of arguments - - // the following describe the active payload for the C function (start and count) - // this is because the `init()` constructor first arg is not passed to the C function - int32_t arg_start = 1; // start with standard values - int32_t arg_count = argc; - - // check if we call a constructor, in this case we store the return type into the new object - // check if we call a constructor with a comptr as first arg - if (return_type && return_type[0] == '+') { - if (argc > 1 && be_iscomptr(vm, 2)) { - lv_obj_t * obj = (lv_obj_t*) be_tocomptr(vm, 2); - lv_init_set_member(vm, 1, obj); - be_return_nil(vm); - } else { - // we need to discard the first arg - arg_start++; - arg_count--; - } - } - - fn_any_callable f = (fn_any_callable) func; - // AddLog(LOG_LEVEL_INFO, ">> before be_check_arg_type argc=%i - %i", arg_count, arg_start); - be_check_arg_type(vm, arg_start, arg_count, arg_type, p); - // AddLog(LOG_LEVEL_INFO, ">> be_call_c_func(%p) - %p,%p,%p,%p,%p - %s", f, p[0], p[1], p[2], p[3], p[4], return_type ? return_type : "NULL"); - int32_t ret = (*f)(p[0], p[1], p[2], p[3], p[4], p[5], p[6], p[7]); - // AddLog(LOG_LEVEL_INFO, ">> be_call_c_func, ret = %p", ret); - if ((return_type == nullptr) || (strlen(return_type) == 0)) { be_return_nil(vm); } // does not return - else if (return_type[0] == '+') { - lv_obj_t * obj = (lv_obj_t*) ret; - lv_init_set_member(vm, 1, obj); - be_return_nil(vm); - } - else if (strlen(return_type) == 1) { - switch (return_type[0]) { - case '.': // fallback next - case 'i': be_pushint(vm, ret); break; - case 'b': be_pushbool(vm, ret); break; - case 's': be_pushstring(vm, (const char*) ret); break; - case 'c': be_pushint(vm, ret); break; // TODO missing 'c' general callback type - default: be_raise(vm, "internal_error", "Unsupported return type"); break; - } - be_return(vm); - } else { // class name - // AddLog(LOG_LEVEL_INFO, ">> be_call_c_func, create_obj ret=%i return_type=%s", ret, return_type); - be_find_class(vm, return_type); - be_pushcomptr(vm, (void*) ret); // stack = class, ptr - be_pushcomptr(vm, (void*) -1); // stack = class, ptr, -1 - be_call(vm, 2); // instanciate with 2 arguments, stack = instance, -1, ptr - be_pop(vm, 2); // stack = instance - be_return(vm); - } - } } /*********************************************************************************************\ @@ -396,7 +267,7 @@ extern "C" { typedef lv_obj_t* (*fn_lvobj__void)(void); // f() -> newly created lv_obj() int lv0_lvobj__void_call(bvm *vm, fn_lvobj__void func) { lv_obj_t * obj = (*func)(); - be_find_class(vm, "lv.lv_obj"); + be_find_global_or_module_member(vm, "lv.lv_obj"); be_pushcomptr(vm, (void*) -1); // stack = class, -1 be_pushcomptr(vm, (void*) obj); // stack = class, -1, ptr be_call(vm, 2); // instanciate, stack = instance (don't call init() ) @@ -404,12 +275,16 @@ extern "C" { be_return(vm); } + /*********************************************************************************************\ + * Support for lv_fonts + \*********************************************************************************************/ + // load font by name on file-system int lv0_load_font(bvm *vm) { int argc = be_top(vm); if (argc == 1 && be_isstring(vm, 1)) { lv_font_t * font = lv_font_load(be_tostring(vm, 1)); if (font != nullptr) { - be_find_class(vm, "lv.lv_font"); + be_find_global_or_module_member(vm, "lv.lv_font"); be_pushcomptr(vm, font); be_call(vm, 1); be_pop(vm, 1); @@ -421,6 +296,10 @@ extern "C" { be_raise(vm, kTypeError, nullptr); } + /*********************************************************************************************\ + * Support for Freetype fonts + \*********************************************************************************************/ + // load freetype font by name in file-system int lv0_load_freetype_font(bvm *vm) { #ifdef USE_LVGL_FREETYPE int argc = be_top(vm); @@ -433,7 +312,7 @@ extern "C" { lv_font_t * font = info.font; if (font != nullptr) { - be_find_class(vm, "lv.lv_font"); + be_find_global_or_module_member(vm, "lv.lv_font"); be_pushcomptr(vm, font); be_call(vm, 1); be_pop(vm, 1); @@ -448,261 +327,212 @@ extern "C" { #endif // USE_LVGL_FREETYPE } - int lv0_load_montserrat_font(bvm *vm) { - int argc = be_top(vm); - if (argc == 1 && be_isint(vm, 1)) { - const lv_font_t * font = nullptr; - int32_t font_size = be_toindex(vm, 1); + /*********************************************************************************************\ + * Support for embedded fonts in Flash + \*********************************************************************************************/ + // We create tables for Font matching + // Size of `0` indicates end of table + typedef struct { + int16_t size; + const lv_font_t *font; + } lv_font_table_t; - switch (font_size) { + typedef struct { + const char * name; + const lv_font_table_t * table; + } lv_font_names_t; - #if LV_FONT_MONTSERRAT_8 - case 8: - font = &lv_font_montserrat_8; - break; - #endif + // Montserrat Font + const lv_font_table_t lv_montserrat_fonts[] = { + #if LV_FONT_MONTSERRAT_8 + { 8, &lv_font_montserrat_8 }, + #endif + #if LV_FONT_MONTSERRAT_10 + { 10, &lv_font_montserrat_10 }, + #endif + #if LV_FONT_MONTSERRAT_12 + { 12, &lv_font_montserrat_12 }, + #endif + #if LV_FONT_MONTSERRAT_14 + { 14, &lv_font_montserrat_14 }, + #endif + #if LV_FONT_MONTSERRAT_16 + { 16, &lv_font_montserrat_16 }, + #endif + #if LV_FONT_MONTSERRAT_18 + { 18, &lv_font_montserrat_18 }, + #endif + #if LV_FONT_MONTSERRAT_20 + { 20, &lv_font_montserrat_20 }, + #endif + #if LV_FONT_MONTSERRAT_22 + { 22, &lv_font_montserrat_22 }, + #endif + #if LV_FONT_MONTSERRAT_24 + { 24, &lv_font_montserrat_24 }, + #endif + #if LV_FONT_MONTSERRAT_26 + { 26, &lv_font_montserrat_26 }, + #endif + #if LV_FONT_MONTSERRAT_28 + { 28, &lv_font_montserrat_28 }, + #endif + #if LV_FONT_MONTSERRAT_28_COMPRESSED + { 28, &lv_font_montserrat_28_compressed, }, + #endif + #if LV_FONT_MONTSERRAT_30 + { 30, &lv_font_montserrat_30 }, + #endif + #if LV_FONT_MONTSERRAT_32 + { 32, &lv_font_montserrat_32 }, + #endif + #if LV_FONT_MONTSERRAT_34 + { 34, &lv_font_montserrat_34 }, + #endif + #if LV_FONT_MONTSERRAT_36 + { 36, &lv_font_montserrat_36 }, + #endif + #if LV_FONT_MONTSERRAT_38 + { 38, &lv_font_montserrat_38 }, + #endif + #if LV_FONT_MONTSERRAT_40 + { 40, &lv_font_montserrat_40 }, + #endif + #if LV_FONT_MONTSERRAT_42 + { 42, &lv_font_montserrat_42 }, + #endif + #if LV_FONT_MONTSERRAT_44 + { 44, &lv_font_montserrat_44 }, + #endif + #if LV_FONT_MONTSERRAT_46 + { 46, &lv_font_montserrat_46 }, + #endif + #if LV_FONT_MONTSERRAT_48 + { 48, &lv_font_montserrat_48 }, + #endif + { 0, nullptr} + }; - #if LV_FONT_MONTSERRAT_10 - case 10: - font = &lv_font_montserrat_10; - break; - #endif + // Seg7 Font + const lv_font_table_t lv_seg7_fonts[] = { + { 8, &seg7_8 }, + { 10, &seg7_10 }, + { 12, &seg7_12 }, + { 14, &seg7_14 }, + { 16, &seg7_16 }, + { 18, &seg7_18 }, + { 20, &seg7_20 }, + { 24, &seg7_24 }, + { 28, &seg7_28 }, + { 36, &seg7_36 }, + { 48, &seg7_48 }, + }; - #if LV_FONT_MONTSERRAT_12 - case 12: - font = &lv_font_montserrat_12; - break; - #endif + // robotocondensed-latin1 + const lv_font_table_t lv_robotocondensed_fonts[] = { +#if ROBOTOCONDENSED_REGULAR_12_LATIN1 + { 12, &robotocondensed_regular_12_latin1 }, +#endif +#if ROBOTOCONDENSED_REGULAR_14_LATIN1 + { 14, &robotocondensed_regular_14_latin1 }, +#endif +#if ROBOTOCONDENSED_REGULAR_16_LATIN1 + { 16, &robotocondensed_regular_16_latin1 }, +#endif +#if ROBOTOCONDENSED_REGULAR_20_LATIN1 + { 20, &robotocondensed_regular_20_latin1 }, +#endif +#if ROBOTOCONDENSED_REGULAR_22_LATIN1 + { 22, &robotocondensed_regular_22_latin1 }, +#endif +#if ROBOTOCONDENSED_REGULAR_24_LATIN1 + { 24, &robotocondensed_regular_24_latin1 }, +#endif +#if ROBOTOCONDENSED_REGULAR_28_LATIN1 + { 28, &robotocondensed_regular_28_latin1 }, +#endif +#if ROBOTOCONDENSED_REGULAR_32_LATIN1 + { 32, &robotocondensed_regular_32_latin1 }, +#endif +#if ROBOTOCONDENSED_REGULAR_36_LATIN1 + { 36, &robotocondensed_regular_36_latin1 }, +#endif +#if ROBOTOCONDENSED_REGULAR_38_LATIN1 + { 38, &robotocondensed_regular_38_latin1 }, +#endif +#if ROBOTOCONDENSED_REGULAR_40_LATIN1 + { 40, &robotocondensed_regular_40_latin1 }, +#endif +#if ROBOTOCONDENSED_REGULAR_44_LATIN1 + { 44, &robotocondensed_regular_44_latin1 }, +#endif +#if ROBOTOCONDENSED_REGULAR_48_LATIN1 + { 48, &robotocondensed_regular_48_latin1 }, +#endif + }; - #if LV_FONT_MONTSERRAT_14 - case 14: - font = &lv_font_montserrat_14; - break; - #endif + // register all included fonts + const lv_font_names_t lv_embedded_fonts[] = { + { "montserrat", lv_montserrat_fonts }, + { "seg7", lv_seg7_fonts }, +#ifdef USE_LVGL_OPENHASP + { "robotocondensed", lv_robotocondensed_fonts }, +#endif + { nullptr, nullptr} + }; - #if LV_FONT_MONTSERRAT_16 - case 16: - font = &lv_font_montserrat_16; - break; - #endif - - #if LV_FONT_MONTSERRAT_18 - case 18: - font = &lv_font_montserrat_18; - break; - #endif - - #if LV_FONT_MONTSERRAT_20 - case 20: - font = &lv_font_montserrat_20; - break; - #endif - - #if LV_FONT_MONTSERRAT_22 - case 22: - font = &lv_font_montserrat_22; - break; - #endif - - #if LV_FONT_MONTSERRAT_24 - case 24: - font = &lv_font_montserrat_24; - break; - #endif - - #if LV_FONT_MONTSERRAT_26 - case 26: - font = &lv_font_montserrat_26; - break; - #endif - - #if LV_FONT_MONTSERRAT_28 - case 28: - font = &lv_font_montserrat_28; - break; - #endif - - #if LV_FONT_MONTSERRAT_30 - case 30: - font = &lv_font_montserrat_30; - break; - #endif - - #if LV_FONT_MONTSERRAT_32 - case 32: - font = &lv_font_montserrat_32; - break; - #endif - - #if LV_FONT_MONTSERRAT_34 - case 34: - font = &lv_font_montserrat_34; - break; - #endif - - #if LV_FONT_MONTSERRAT_36 - case 36: - font = &lv_font_montserrat_36; - break; - #endif - - #if LV_FONT_MONTSERRAT_38 - case 38: - font = &lv_font_montserrat_38; - break; - #endif - - #if LV_FONT_MONTSERRAT_40 - case 40: - font = &lv_font_montserrat_40; - break; - #endif - - #if LV_FONT_MONTSERRAT_42 - case 42: - font = &lv_font_montserrat_42; - break; - #endif - - #if LV_FONT_MONTSERRAT_44 - case 44: - font = &lv_font_montserrat_44; - break; - #endif - - #if LV_FONT_MONTSERRAT_46 - case 46: - font = &lv_font_montserrat_46; - break; - #endif - - #if LV_FONT_MONTSERRAT_48 - case 48: - font = &lv_font_montserrat_48; - break; - #endif - - #if LV_FONT_MONTSERRAT_28_COMPRESSED - case 28: - font = &lv_font_montserrat_28_compressed; - break; - #endif - - default: - break; - } - - if (font != nullptr) { - be_find_class(vm, "lv.lv_font"); - be_pushcomptr(vm, (void*)font); - be_call(vm, 1); - be_pop(vm, 1); - be_return(vm); - } else { - be_return_nil(vm); + // If size is zero, it is read at arg 1 + int lv_load_embedded_font(bvm *vm, const char * name, int16_t size) { + if (0 == size) { + if (be_top(vm) >= 1 && be_isint(vm, 1)) { + size = be_toindex(vm, 1); } } - be_raise(vm, kTypeError, nullptr); + if (name == nullptr || 0 == size) { + be_raise(vm, "value_error", ""); + } + // first look for font + const lv_font_names_t * font_name_cursor = lv_embedded_fonts; + for (font_name_cursor = lv_embedded_fonts; font_name_cursor->name; font_name_cursor++) { + if (strcmp(name, font_name_cursor->name) == 0) break; // found + } + if (font_name_cursor->name == nullptr) { + be_raisef(vm, "value_error", "unknown font '%s'", name); + } + // scan for font size + const lv_font_table_t * font_entry = font_name_cursor->table; + for (font_entry = font_name_cursor->table; font_entry->size; font_entry++) { + if (font_entry->size == size) break; // found + } + if (font_entry->size == 0) { + be_raisef(vm, "value_error", "unknown font size '%s-%i'", name, size); + } + + be_find_global_or_module_member(vm, "lv.lv_font"); + be_pushcomptr(vm, (void*)font_entry->font); + be_call(vm, 1); + be_pop(vm, 1); + be_return(vm); + } + + int lv0_load_montserrat_font(bvm *vm) { + return lv_load_embedded_font(vm, "montserrat", 0); } int lv0_load_seg7_font(bvm *vm) { - int argc = be_top(vm); - if (argc == 1 && be_isint(vm, 1)) { - const lv_font_t * font = nullptr; - int32_t font_size = be_toindex(vm, 1); - - switch (font_size) { - case 8: font = &seg7_8; break; - case 10: font = &seg7_10; break; - case 12: font = &seg7_12; break; - case 14: font = &seg7_14; break; - case 16: font = &seg7_16; break; - case 18: font = &seg7_18; break; - case 20: font = &seg7_20; break; - case 24: font = &seg7_24; break; - case 28: font = &seg7_28; break; - case 36: font = &seg7_36; break; - case 48: font = &seg7_48; break; - default: break; - } - - if (font != nullptr) { - be_find_class(vm, "lv.lv_font"); - be_pushcomptr(vm, (void*)font); - be_call(vm, 1); - be_pop(vm, 1); - be_return(vm); - } else { - be_return_nil(vm); - } - } - be_raise(vm, kTypeError, nullptr); + return lv_load_embedded_font(vm, "seg7", 0); } int lv0_load_robotocondensed_latin1_font(bvm *vm) { #ifdef USE_LVGL_OPENHASP - int argc = be_top(vm); - if (argc == 1 && be_isint(vm, 1)) { - const lv_font_t * font = nullptr; - int32_t font_size = be_toindex(vm, 1); - - switch (font_size) { -#if ROBOTOCONDENSED_REGULAR_12_LATIN1 - case 12: font = &robotocondensed_regular_12_latin1; break; -#endif -#if ROBOTOCONDENSED_REGULAR_14_LATIN1 - case 14: font = &robotocondensed_regular_14_latin1; break; -#endif -#if ROBOTOCONDENSED_REGULAR_16_LATIN1 - case 16: font = &robotocondensed_regular_16_latin1; break; -#endif -#if ROBOTOCONDENSED_REGULAR_20_LATIN1 - case 20: font = &robotocondensed_regular_20_latin1; break; -#endif -#if ROBOTOCONDENSED_REGULAR_22_LATIN1 - case 22: font = &robotocondensed_regular_22_latin1; break; -#endif -#if ROBOTOCONDENSED_REGULAR_24_LATIN1 - case 24: font = &robotocondensed_regular_24_latin1; break; -#endif -#if ROBOTOCONDENSED_REGULAR_28_LATIN1 - case 28: font = &robotocondensed_regular_28_latin1; break; -#endif -#if ROBOTOCONDENSED_REGULAR_32_LATIN1 - case 32: font = &robotocondensed_regular_32_latin1; break; -#endif -#if ROBOTOCONDENSED_REGULAR_36_LATIN1 - case 36: font = &robotocondensed_regular_36_latin1; break; -#endif -#if ROBOTOCONDENSED_REGULAR_38_LATIN1 - case 38: font = &robotocondensed_regular_38_latin1; break; -#endif -#if ROBOTOCONDENSED_REGULAR_40_LATIN1 - case 40: font = &robotocondensed_regular_40_latin1; break; -#endif -#if ROBOTOCONDENSED_REGULAR_44_LATIN1 - case 44: font = &robotocondensed_regular_44_latin1; break; -#endif -#if ROBOTOCONDENSED_REGULAR_48_LATIN1 - case 48: font = &robotocondensed_regular_48_latin1; break; -#endif - default: break; - } - - if (font != nullptr) { - be_find_class(vm, "lv.lv_font"); - be_pushcomptr(vm, (void*)font); - be_call(vm, 1); - be_pop(vm, 1); - be_return(vm); - } else { - be_return_nil(vm); - } - } + return lv_load_embedded_font(vm, "robotocondensed", 0); #endif // USE_LVGL_OPENHASP be_raise(vm, kTypeError, nullptr); } + /*********************************************************************************************\ + * Tasmota Logo + \*********************************************************************************************/ #include "lvgl_berry/tasmota_logo_64_truecolor_alpha.h" void lv_img_set_tasmota_logo(lv_obj_t * img) { @@ -715,10 +545,10 @@ extern "C" { * Responds to virtual constants \*********************************************************************************************/ - extern const lvbe_call_c_t lv_func[]; + extern const be_ntv_func_def_t lv_func[]; extern const size_t lv_func_size; - extern const be_constint_t lv0_constants[]; + extern const be_const_member_t lv0_constants[]; extern const size_t lv0_constants_size; extern const be_ctypes_class_by_name_t be_ctypes_lvgl_classes[]; @@ -727,7 +557,7 @@ extern "C" { int lv0_member(bvm *vm); int lv0_member(bvm *vm) { // first try the standard way - if (be_module_member(vm, lv0_constants, lv0_constants_size)) { + if (be_const_member(vm, lv0_constants, lv0_constants_size)) { be_return(vm); } // try alternative members @@ -739,9 +569,9 @@ extern "C" { // search for a class with this name char cl_prefixed[32]; snprintf(cl_prefixed, sizeof(cl_prefixed), "lv_%s", needle); // we try both actual name and prefixed with `lv_` so both `lv.obj` and `lv.lv_obj` work - idx = bin_search(cl_prefixed, &lv_classes[0].name, sizeof(lv_classes[0]), lv_classes_size); + idx = be_map_bin_search(cl_prefixed, &lv_classes[0].name, sizeof(lv_classes[0]), lv_classes_size); if (idx < 0) { - idx = bin_search(needle, &lv_classes[0].name, sizeof(lv_classes[0]), lv_classes_size); + idx = be_map_bin_search(needle, &lv_classes[0].name, sizeof(lv_classes[0]), lv_classes_size); } if (idx >= 0) { // we did have a match @@ -749,9 +579,9 @@ extern "C" { be_return(vm); } // same search for ctypes - idx = bin_search(cl_prefixed, &be_ctypes_lvgl_classes[0].name, sizeof(be_ctypes_lvgl_classes[0]), be_ctypes_lvgl_classes_size); + idx = be_map_bin_search(cl_prefixed, &be_ctypes_lvgl_classes[0].name, sizeof(be_ctypes_lvgl_classes[0]), be_ctypes_lvgl_classes_size); if (idx < 0) { - idx = bin_search(needle, &be_ctypes_lvgl_classes[0].name, sizeof(be_ctypes_lvgl_classes[0]), be_ctypes_lvgl_classes_size); + idx = be_map_bin_search(needle, &be_ctypes_lvgl_classes[0].name, sizeof(be_ctypes_lvgl_classes[0]), be_ctypes_lvgl_classes_size); } if (idx >= 0) { // we did have a match @@ -760,9 +590,9 @@ extern "C" { } // search for a method with this name - idx = bin_search(needle, &lv_func[0].name, sizeof(lv_func[0]), lv_func_size); + idx = be_map_bin_search(needle, &lv_func[0].name, sizeof(lv_func[0]), lv_func_size); if (idx >= 0) { - const lvbe_call_c_t * method = &lv_func[idx]; + const be_ntv_func_def_t * method = &lv_func[idx]; // push native closure be_pushntvclosure(vm, &lvx_call_c, 3); // 3 upvals @@ -818,7 +648,7 @@ extern "C" { int lv0_register_button_encoder(bvm *vm) { int32_t argc = be_top(vm); // Get the number of arguments bool inverted = false; - // berry_log_P("lv0_register_button_encoder argc=%d inverted=%d", argc, be_tobool(vm, 1)); + // berry_log_C("lv0_register_button_encoder argc=%d inverted=%d", argc, be_tobool(vm, 1)); if (argc >= 1) { inverted = be_tobool(vm, 1); // get the inverted flag } @@ -835,7 +665,7 @@ extern "C" { lvbe.btn[1].set_inverted(inverted); lvbe.btn[2].set_gpio(btn2); lvbe.btn[2].set_inverted(inverted); - berry_log_P(D_LOG_LVGL "Button Rotary encoder using GPIOs %d,%d,%d%s", btn0, btn1, btn2, inverted ? " (inverted)" : ""); + berry_log_C(D_LOG_LVGL "Button Rotary encoder using GPIOs %d,%d,%d%s", btn0, btn1, btn2, inverted ? " (inverted)" : ""); lv_indev_drv_init(&lvbe.indev_drv); lvbe.indev_drv.type = LV_INDEV_TYPE_ENCODER; @@ -844,7 +674,7 @@ extern "C" { lv_indev_t * indev = lv_indev_drv_register(&lvbe.indev_drv); lvbe.indev_list.addHead(indev); // keep track of indevs - be_find_class(vm, "lv.lv_indev"); + be_find_global_or_module_member(vm, "lv.lv_indev"); be_pushint(vm, (int32_t) indev); be_call(vm, 1); be_pop(vm, 1); @@ -878,7 +708,7 @@ extern "C" { } bool state = lvbe.btn[i].clear_state_changed(); data->state = state ? LV_INDEV_STATE_PR : LV_INDEV_STATE_REL; - // berry_log_P("Button event key %d state %d,%d", data->key, state, data->state); + // berry_log_C("Button event key %d state %d,%d", data->key, state, data->state); break; } } @@ -900,7 +730,7 @@ extern "C" { void * obj = nullptr; int argc = be_top(vm); if (argc > 1) { - obj = (void*) be_convert_single_elt(vm, 2); + obj = (void*) be_convert_single_elt(vm, 2, NULL, NULL); } lv_init_set_member(vm, 1, obj); be_return_nil(vm); @@ -926,7 +756,7 @@ extern "C" { lv_style_t * style = nullptr; if (argc > 1) { - style = (lv_style_t*) be_convert_single_elt(vm, 2); + style = (lv_style_t*) be_convert_single_elt(vm, 2, NULL, NULL); } if (style == nullptr) { style = (lv_style_t*) be_malloc(vm, sizeof(lv_style_t)); @@ -956,11 +786,53 @@ extern "C" { if (!glue) { be_return_nil(vm); } char fname[32]; - snprintf(fname, sizeof(fname), "/screenshot-%d.raw", Rtc.utc_time); + snprintf(fname, sizeof(fname), "/screenshot-%d.bmp", Rtc.utc_time); File f = dfsp->open(fname, "w"); if (f) { glue->setScreenshotFile(&f); + uint32_t bmp_width = lv_disp_get_hor_res(nullptr); + uint32_t bmp_height = lv_disp_get_ver_res(nullptr); + + // write BMP header + static const uint8_t bmp_sign[] = { 0x42, 0x4d }; // BM = Windows + f.write(bmp_sign, sizeof(bmp_sign)); + size_t bmp_size = bmp_width * bmp_height * LV_COLOR_DEPTH / 8 + 0x44; + f.write((uint8_t*)&bmp_size, sizeof(bmp_size)); + uint32_t zero = 0; + f.write((uint8_t*) &zero, sizeof(zero)); // reserved 4-bytes + uint32_t bmp_offset_to_pixels = 0x44; // TODO + f.write((uint8_t*) &bmp_offset_to_pixels, sizeof(bmp_offset_to_pixels)); + + // DIB Header BITMAPINFOHEADER + size_t bmp_dib_header_size = 52; // BITMAPV2INFOHEADER + f.write((uint8_t*) &bmp_dib_header_size, sizeof(bmp_dib_header_size)); + + f.write((uint8_t*) &bmp_width, sizeof(bmp_width)); + f.write((uint8_t*) &bmp_height, sizeof(bmp_height)); + + // rest of header + // BITMAPV2INFOHEADER = 52 bytes header, 40 bytes sub-header + static const uint8_t bmp_dib_header[] = { + 0x01, 0x00, // planes + 16, 0x00, // bits per pixel = 16 + 0x03, 0x00, 0x00, 0x00, // compression = BI_BITFIELDS uncrompressed + 0x00, 0x00, 0x00, 0x00, // Image size, 0 is valid for BI_RGB (uncompressed) TODO + 0x00, 0x00, 0x00, 0x00, // X pixels per meter + 0x00, 0x00, 0x00, 0x00, // Y pixels per meter + 0x00, 0x00, 0x00, 0x00, // Colors in table + 0x00, 0x00, 0x00, 0x00, // Important color count + + // RGB masks + 0x00, 0xF8, 0x00, 0x00, // Red channel mask + 0xE0, 0x07, 0x00, 0x00, // Green channel mask + 0x1F, 0x00, 0x00, 0x00, // Blue channel mask + + 0x00, 0x00, // Padding to align on 4 bytes boundary + }; + f.write(bmp_dib_header, sizeof(bmp_dib_header)); + // now we can write the pixels array + // redraw screen lv_obj_invalidate(lv_scr_act()); lv_refr_now(lv_disp_get_default()); diff --git a/tasmota/xdrv_52_3_berry_md5.ino b/tasmota/xdrv_52_3_berry_md5.ino deleted file mode 100644 index a4adee029..000000000 --- a/tasmota/xdrv_52_3_berry_md5.ino +++ /dev/null @@ -1,105 +0,0 @@ -/* - xdrv_52_3_berry_md5.ino - Berry scripting language, Md5 class - - Copyright (C) 2021 Stephan Hadinger, Berry language by Guan Wenliang https://github.com/Skiars/berry - - This program is free software: you can redistribute it and/or modify - it under the terms of the GNU General Public License as published by - the Free Software Foundation, either version 3 of the License, or - (at your option) any later version. - - This program 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 General Public License for more details. - - You should have received a copy of the GNU General Public License - along with this program. If not, see . -*/ - - -#ifdef USE_BERRY - -#include -#include "MD5Builder.h" -#include "be_mem.h" - -/*********************************************************************************************\ - * Md5 class - * -\*********************************************************************************************/ -extern "C" { - - int free_ctx(bvm* vm) { - int argc = be_top(vm); - if (argc > 0) { - be_getmember(vm, 1, ".p"); - struct MD5Context * ctx = (struct MD5Context *) be_tocomptr(vm, -1); - if (ctx != NULL) { - be_os_free(ctx); - } - } - be_return_nil(vm); - } - - // `Md5.init() -> ` - int32_t m_md5_init(struct bvm *vm); - int32_t m_md5_init(struct bvm *vm) { - - struct MD5Context * ctx = (struct MD5Context *) be_os_malloc(sizeof(struct MD5Context)); - if (!ctx) { - be_throw(vm, BE_MALLOC_FAIL); - } - MD5Init(ctx); - - be_newcomobj(vm, ctx, &free_ctx); - be_setmember(vm, 1, ".p"); - be_return_nil(vm); - } - - // `Md5.update(content:bytes()) -> nil` - // - // Add raw bytes to the MD5 calculation - int32_t m_md5_update(struct bvm *vm); - int32_t m_md5_update(struct bvm *vm) { - int32_t argc = be_top(vm); // Get the number of arguments - if (argc >= 2 && be_isinstance(vm, 2)) { - do { - be_getglobal(vm, "bytes"); /* get the bytes class */ /* TODO eventually replace with be_getbuiltin */ - if (!be_isderived(vm, 2)) break; - size_t length = 0; - const void * bytes = be_tobytes(vm, 2, &length); - if (!bytes) break; - - be_getmember(vm, 1, ".p"); - struct MD5Context * ctx; - ctx = (struct MD5Context *) be_tocomptr(vm, -1); - if (!ctx) break; - - if (length > 0) { - MD5Update(ctx, (const uint8_t*) bytes, length); - } - be_return_nil(vm); - // success - } while (0); - } - be_raise(vm, kTypeError, nullptr); - } - - // `Md5.update(content:bytes()) -> nil` - // - // Add raw bytes to the MD5 calculation - int32_t m_md5_finish(struct bvm *vm); - int32_t m_md5_finish(struct bvm *vm) { - be_getmember(vm, 1, ".p"); - struct MD5Context * ctx; - ctx = (struct MD5Context *) be_tocomptr(vm, -1); - - uint8_t output[16]; - MD5Final(output, ctx); - be_pushbytes(vm, output, sizeof(output)); - be_return(vm); - } -} - -#endif // USE_BERRY diff --git a/tasmota/xdrv_52_3_berry_tasmota.ino b/tasmota/xdrv_52_3_berry_tasmota.ino index ee65d27a1..fdff25f1e 100644 --- a/tasmota/xdrv_52_3_berry_tasmota.ino +++ b/tasmota/xdrv_52_3_berry_tasmota.ino @@ -1,5 +1,5 @@ /* - xdrv_52_3_berry_native.ino - Berry scripting language, native fucnctions + xdrv_52_3_berry_tasmota.ino - Berry scripting language, native fucnctions Copyright (C) 2021 Stephan Hadinger, Berry language by Guan Wenliang https://github.com/Skiars/berry @@ -26,25 +26,25 @@ const uint32_t BERRY_MAX_LOGS = 16; // max number of print output recorded when outside of REPL, used to avoid infinite grow of logs const uint32_t BERRY_MAX_REPL_LOGS = 1024; // max number of print output recorded when inside REPL -/*********************************************************************************************\ - * Return C callback from index - * -\*********************************************************************************************/ -extern "C" { - int32_t l_get_cb(struct bvm *vm); - int32_t l_get_cb(struct bvm *vm) { - int32_t argc = be_top(vm); // Get the number of arguments - if (argc >= 2 && be_isint(vm, 2)) { - int32_t idx = be_toint(vm, 2); - if (idx >= 0 && idx < ARRAY_SIZE(berry_callback_array)) { - const berry_callback_t c_ptr = berry_callback_array[idx]; - be_pushcomptr(vm, (void*) c_ptr); - be_return(vm); - } - } - be_raise(vm, kTypeError, nullptr); - } -} +// /*********************************************************************************************\ +// * Return C callback from index +// * +// \*********************************************************************************************/ +// extern "C" { +// extern int32_t be_cb__get_cb(struct bvm *vm); +// int32_t be_cb__get_cb(struct bvm *vm) { +// int32_t argc = be_top(vm); // Get the number of arguments +// if (argc >= 2 && be_isint(vm, 2)) { +// int32_t idx = be_toint(vm, 2); +// if (idx >= 0 && idx < ARRAY_SIZE(berry_callback_array)) { +// const berry_callback_t c_ptr = berry_callback_array[idx]; +// be_pushcomptr(vm, (void*) c_ptr); +// be_return(vm); +// } +// } +// be_raise(vm, kTypeError, nullptr); +// } +// } /*********************************************************************************************\ * Native functions mapped to Berry functions @@ -181,10 +181,10 @@ extern "C" { int32_t top = be_top(vm); // Get the number of arguments if (top == 1) { // no argument (instance only) be_newobject(vm, "map"); - map_insert_int(vm, "utc", Rtc.utc_time); - map_insert_int(vm, "local", Rtc.local_time); - map_insert_int(vm, "restart", Rtc.restart_time); - map_insert_int(vm, "timezone", Rtc.time_timezone); + be_map_insert_int(vm, "utc", Rtc.utc_time); + be_map_insert_int(vm, "local", Rtc.local_time); + be_map_insert_int(vm, "restart", Rtc.restart_time); + be_map_insert_int(vm, "timezone", Rtc.time_timezone); be_pop(vm, 1); be_return(vm); } @@ -198,14 +198,14 @@ extern "C" { int32_t top = be_top(vm); // Get the number of arguments if (top == 1) { // no argument (instance only) be_newobject(vm, "map"); - map_insert_int(vm, "flash", ESP.getFlashChipSize() / 1024); - map_insert_int(vm, "program", ESP_getSketchSize() / 1024); - map_insert_int(vm, "program_free", ESP.getFreeSketchSpace() / 1024); - map_insert_int(vm, "heap_free", ESP_getFreeHeap() / 1024); - map_insert_int(vm, "frag", ESP_getHeapFragmentation()); + be_map_insert_int(vm, "flash", ESP.getFlashChipSize() / 1024); + be_map_insert_int(vm, "program", ESP_getSketchSize() / 1024); + be_map_insert_int(vm, "program_free", ESP.getFreeSketchSpace() / 1024); + be_map_insert_int(vm, "heap_free", ESP_getFreeHeap() / 1024); + be_map_insert_int(vm, "frag", ESP_getHeapFragmentation()); if (UsePSRAM()) { - map_insert_int(vm, "psram", ESP.getPsramSize() / 1024); - map_insert_int(vm, "psram_free", ESP.getFreePsram() / 1024); + be_map_insert_int(vm, "psram", ESP.getPsramSize() / 1024); + be_map_insert_int(vm, "psram_free", ESP.getFreePsram() / 1024); } be_pop(vm, 1); be_return(vm); @@ -222,17 +222,17 @@ extern "C" { be_newobject(vm, "map"); if (Settings->flag4.network_wifi) { int32_t rssi = WiFi.RSSI(); - map_insert_int(vm, "rssi", rssi); - map_insert_int(vm, "quality", WifiGetRssiAsQuality(rssi)); + be_map_insert_int(vm, "rssi", rssi); + be_map_insert_int(vm, "quality", WifiGetRssiAsQuality(rssi)); #if LWIP_IPV6 String ipv6_addr = WifiGetIPv6(); if (ipv6_addr != "") { - map_insert_str(vm, "ip6", ipv6_addr.c_str()); + be_map_insert_str(vm, "ip6", ipv6_addr.c_str()); } #endif if (static_cast(WiFi.localIP()) != 0) { - map_insert_str(vm, "mac", WiFi.macAddress().c_str()); - map_insert_str(vm, "ip", WiFi.localIP().toString().c_str()); + be_map_insert_str(vm, "mac", WiFi.macAddress().c_str()); + be_map_insert_str(vm, "ip", WiFi.localIP().toString().c_str()); } } be_pop(vm, 1); @@ -250,8 +250,8 @@ extern "C" { be_newobject(vm, "map"); #ifdef USE_ETHERNET if (static_cast(EthernetLocalIP()) != 0) { - map_insert_str(vm, "mac", EthernetMacAddress().c_str()); - map_insert_str(vm, "ip", EthernetLocalIP().toString().c_str()); + be_map_insert_str(vm, "mac", EthernetMacAddress().c_str()); + be_map_insert_str(vm, "ip", EthernetLocalIP().toString().c_str()); } #endif be_pop(vm, 1); @@ -260,20 +260,25 @@ extern "C" { be_raise(vm, kTypeError, nullptr); } + static void l_push_time(bvm *vm, struct tm *t, const char *unparsed) { + be_newobject(vm, "map"); + be_map_insert_int(vm, "year", t->tm_year + 1900); + be_map_insert_int(vm, "month", t->tm_mon + 1); + be_map_insert_int(vm, "day", t->tm_mday); + be_map_insert_int(vm, "hour", t->tm_hour); + be_map_insert_int(vm, "min", t->tm_min); + be_map_insert_int(vm, "sec", t->tm_sec); + be_map_insert_int(vm, "weekday", t->tm_wday); + if (unparsed) be_map_insert_str(vm, "unparsed", unparsed); + be_pop(vm, 1); + } + int32_t l_time_dump(bvm *vm) { int32_t top = be_top(vm); // Get the number of arguments if (top == 2 && be_isint(vm, 2)) { time_t ts = be_toint(vm, 2); struct tm *t = gmtime(&ts); - be_newobject(vm, "map"); - map_insert_int(vm, "year", t->tm_year + 1900); - map_insert_int(vm, "month", t->tm_mon + 1); - map_insert_int(vm, "day", t->tm_mday); - map_insert_int(vm, "hour", t->tm_hour); - map_insert_int(vm, "min", t->tm_min); - map_insert_int(vm, "sec", t->tm_sec); - map_insert_int(vm, "weekday", t->tm_wday); - be_pop(vm, 1); + l_push_time(vm, t, NULL); be_return(vm); } be_raise(vm, kTypeError, nullptr); @@ -293,6 +298,23 @@ extern "C" { be_raise(vm, kTypeError, nullptr); } + int32_t l_strptime(bvm *vm) { + int32_t argc = be_top(vm); // Get the number of arguments + if (argc == 3 && be_isstring(vm, 2) && be_isstring(vm, 3)) { + const char * input = be_tostring(vm, 2); + const char * format = be_tostring(vm, 3); + struct tm t = {0}; + char * ret = strptime(input, format, &t); + if (ret) { + l_push_time(vm, &t, ret); + be_return(vm); + } else { + be_return_nil(vm); + } + } + be_raise(vm, kTypeError, nullptr); + } + // Berry: tasmota.delay(timer:int) -> nil // int32_t l_delay(struct bvm *vm); @@ -310,27 +332,14 @@ extern "C" { // ESP object int32_t l_yield(bvm *vm); int32_t l_yield(bvm *vm) { - BrTimeoutYield(); // reset timeout - be_return_nil(vm); + return be_call_c_func(vm, (void*) &BrTimeoutYield, NULL, "-"); } // Berry: tasmota.scale_uint(int * 5) -> int // int32_t l_scaleuint(struct bvm *vm); int32_t l_scaleuint(struct bvm *vm) { - int32_t top = be_top(vm); // Get the number of arguments - if (top == 6 && be_isint(vm, 2) && be_isint(vm, 3) && be_isint(vm, 4) && be_isint(vm, 5) && be_isint(vm, 6)) { // only 1 argument of type string accepted - int32_t v = be_toint(vm, 2); - int32_t from1 = be_toint(vm, 3); - int32_t from2 = be_toint(vm, 4); - int32_t to1 = be_toint(vm, 5); - int32_t to2 = be_toint(vm, 6); - - int32_t ret = changeUIntScale(v, from1, from2, to1, to2); - be_pushint(vm, ret); - be_return(vm); - } - be_raise(vm, kTypeError, nullptr); + return be_call_c_func(vm, (void*) &changeUIntScale, "i", "-iiiii"); } int32_t l_respCmnd(bvm *vm); @@ -357,20 +366,17 @@ extern "C" { int32_t l_respCmndDone(bvm *vm); int32_t l_respCmndDone(bvm *vm) { - ResponseCmndDone(); - be_return_nil(vm); + return be_call_c_func(vm, (void*) &ResponseCmndDone, NULL, "-"); } int32_t l_respCmndError(bvm *vm); int32_t l_respCmndError(bvm *vm) { - ResponseCmndError(); - be_return_nil(vm); + return be_call_c_func(vm, (void*) &ResponseCmndError, NULL, "-"); } int32_t l_respCmndFailed(bvm *vm); int32_t l_respCmndFailed(bvm *vm) { - ResponseCmndFailed(); - be_return_nil(vm); + return be_call_c_func(vm, (void*) &ResponseCmndFailed, NULL, "-"); } // update XdrvMailbox.command with actual command @@ -614,17 +620,4 @@ extern "C" { } } - -void berry_log_P(const char * berry_buf, ...) { - // To save stack space support logging for max text length of 128 characters - char log_data[LOGSZ]; - - va_list arg; - va_start(arg, berry_buf); - uint32_t len = ext_vsnprintf_P(log_data, LOGSZ-3, berry_buf, arg); - va_end(arg); - if (len+3 > LOGSZ) { strcat(log_data, "..."); } // Actual data is more - berry_log(log_data); -} - #endif // USE_BERRY diff --git a/tasmota/xdrv_52_3_berry_unishox.ino b/tasmota/xdrv_52_3_berry_unishox.ino index a7664a960..c2ca1b5e7 100644 --- a/tasmota/xdrv_52_3_berry_unishox.ino +++ b/tasmota/xdrv_52_3_berry_unishox.ino @@ -35,8 +35,8 @@ extern Unishox compressor; \*********************************************************************************************/ extern "C" { - int be_unishox_compress(bvm *vm); - int be_unishox_compress(bvm *vm) { + int be_ntv_unishox_compress(bvm *vm); + int be_ntv_unishox_compress(bvm *vm) { int32_t argc = be_top(vm); // Get the number of arguments if (argc == 1 && be_isstring(vm, 1)) { const char * s = be_tostring(vm, 1); @@ -57,8 +57,8 @@ extern "C" { be_raise(vm, kTypeError, nullptr); } - int be_unishox_decompress(bvm *vm); - int be_unishox_decompress(bvm *vm) { + int be_ntv_unishox_decompress(bvm *vm); + int be_ntv_unishox_decompress(bvm *vm) { int32_t argc = be_top(vm); // Get the number of arguments if (argc == 1 && be_isbytes(vm, 1)) { size_t len; diff --git a/tasmota/xdrv_52_3_berry_webclient.ino b/tasmota/xdrv_52_3_berry_webclient.ino index b7b56a39e..625c54622 100644 --- a/tasmota/xdrv_52_3_berry_webclient.ino +++ b/tasmota/xdrv_52_3_berry_webclient.ino @@ -17,6 +17,7 @@ along with this program. If not, see . */ +// also includes tcp_client #ifdef USE_BERRY @@ -56,7 +57,7 @@ String wc_UrlEncode(const String& text) { /*********************************************************************************************\ * Int constants *********************************************************************************************/ -// const be_constint_t webserver_constants[] = { +// const be_const_member_t webserver_constants[] = { // { "BUTTON_CONFIGURATION", BUTTON_CONFIGURATION }, // { "BUTTON_INFORMATION", BUTTON_INFORMATION }, // { "BUTTON_MAIN", BUTTON_MAIN }, @@ -84,7 +85,6 @@ extern "C" { // int32_t wc_init(struct bvm *vm); int32_t wc_init(struct bvm *vm) { - // int32_t argc = be_top(vm); // Get the number of arguments WiFiClient * wcl = new WiFiClient(); be_pushcomptr(vm, (void*) wcl); be_setmember(vm, 1, ".w"); @@ -96,6 +96,14 @@ extern "C" { be_return_nil(vm); } + int32_t wc_tcp_init(struct bvm *vm); + int32_t wc_tcp_init(struct bvm *vm) { + WiFiClient * wcl = new WiFiClient(); + be_pushcomptr(vm, (void*) wcl); + be_setmember(vm, 1, ".w"); + be_return_nil(vm); + } + HTTPClientLight * wc_getclient(struct bvm *vm) { be_getmember(vm, 1, ".p"); void *p = be_tocomptr(vm, -1); @@ -123,6 +131,14 @@ extern "C" { be_return_nil(vm); } + int32_t wc_tcp_deinit(struct bvm *vm); + int32_t wc_tcp_deinit(struct bvm *vm) { + WiFiClient * wcl = wc_getwificlient(vm); + if (wcl != nullptr) { delete wcl; } + be_setmember(vm, 1, ".w"); + be_return_nil(vm); + } + // wc.url_encode(string) -> string int32_t wc_urlencode(struct bvm *vm); int32_t wc_urlencode(struct bvm *vm) { @@ -151,6 +167,26 @@ extern "C" { be_return(vm); /* return self */ } + // tcp.connect(address:string, port:int [, timeout_ms:int]) -> bool + int32_t wc_tcp_connect(struct bvm *vm); + int32_t wc_tcp_connect(struct bvm *vm) { + int32_t argc = be_top(vm); + if (argc >= 3 && be_isstring(vm, 2) && be_isint(vm, 3)) { + WiFiClient * tcp = wc_getwificlient(vm); + const char * address = be_tostring(vm, 2); + int32_t port = be_toint(vm, 3); + int32_t timeout = USE_BERRY_WEBCLIENT_TIMEOUT; // default timeout of 2 seconds + if (argc >= 4) { + timeout = be_toint(vm, 4); + } + // open connection + bool success = tcp->connect(address, port, timeout); + be_pushbool(vm, success); + be_return(vm); /* return self */ + } + be_raise(vm, "attribute_error", NULL); + } + // wc.close(void) -> nil int32_t wc_close(struct bvm *vm); int32_t wc_close(struct bvm *vm) { @@ -159,6 +195,23 @@ extern "C" { be_return_nil(vm); } + // tcp.close(void) -> nil + int32_t wc_tcp_close(struct bvm *vm); + int32_t wc_tcp_close(struct bvm *vm) { + WiFiClient * tcp = wc_getwificlient(vm); + tcp->stop(); + be_return_nil(vm); + } + + // tcp.available(void) -> int + int32_t wc_tcp_available(struct bvm *vm); + int32_t wc_tcp_available(struct bvm *vm) { + WiFiClient * tcp = wc_getwificlient(vm); + int32_t available = tcp->available(); + be_pushint(vm, available); + be_return(vm); + } + // wc.wc_set_timeouts([http_timeout_ms:int, tcp_timeout_ms:int]) -> self int32_t wc_set_timeouts(struct bvm *vm); int32_t wc_set_timeouts(struct bvm *vm) { @@ -239,6 +292,65 @@ extern "C" { be_return(vm); /* return code */ } + // tcp.connected(void) -> bool + int32_t wc_tcp_connected(struct bvm *vm); + int32_t wc_tcp_connected(struct bvm *vm) { + WiFiClient * tcp = wc_getwificlient(vm); + be_pushbool(vm, tcp->connected()); + be_return(vm); /* return code */ + } + + // tcp.write(bytes | string) -> int + int32_t wc_tcp_write(struct bvm *vm); + int32_t wc_tcp_write(struct bvm *vm) { + int32_t argc = be_top(vm); + if (argc >= 2 && (be_isstring(vm, 2) || be_isbytes(vm, 2))) { + WiFiClient * tcp = wc_getwificlient(vm); + const char * buf = nullptr; + size_t buf_len = 0; + if (be_isstring(vm, 2)) { // string + buf = be_tostring(vm, 2); + buf_len = strlen(buf); + } else { // bytes + buf = (const char*) be_tobytes(vm, 2, &buf_len); + } + size_t bw = tcp->write(buf, buf_len); + be_pushint(vm, bw); + be_return(vm); /* return code */ + } + be_raise(vm, kTypeError, nullptr); + } + + // tcp.read() -> string + int32_t wc_tcp_read(struct bvm *vm); + int32_t wc_tcp_read(struct bvm *vm) { + WiFiClient * tcp = wc_getwificlient(vm); + int32_t btr = tcp->available(); + if (btr <= 0) { + be_pushstring(vm, ""); + } else { + char * buf = (char*) be_pushbuffer(vm, btr); + int32_t btr2 = tcp->read((uint8_t*) buf, btr); + be_pushnstring(vm, buf, btr2); + } + be_return(vm); /* return code */ + } + + // tcp.readbytes() -> bytes + int32_t wc_tcp_readbytes(struct bvm *vm); + int32_t wc_tcp_readbytes(struct bvm *vm) { + WiFiClient * tcp = wc_getwificlient(vm); + int32_t btr = tcp->available(); + if (btr <= 0) { + be_pushbytes(vm, nullptr, 0); + } else { + uint8_t * buf = (uint8_t*) be_pushbuffer(vm, btr); + int32_t btr2 = tcp->read(buf, btr); + be_pushbytes(vm, buf, btr2); + } + be_return(vm); /* return code */ + } + void wc_errorCodeMessage(int32_t httpCode, uint32_t http_connect_time) { if (httpCode < 0) { if (httpCode <= -1000) { diff --git a/tasmota/xdrv_52_3_berry_webserver.ino b/tasmota/xdrv_52_3_berry_webserver.ino index 2faa223ba..00f260d5a 100644 --- a/tasmota/xdrv_52_3_berry_webserver.ino +++ b/tasmota/xdrv_52_3_berry_webserver.ino @@ -27,7 +27,7 @@ /*********************************************************************************************\ * Int constants *********************************************************************************************/ -const be_constint_t webserver_constants[] = { +const be_const_member_t webserver_constants[] = { { "BUTTON_CONFIGURATION", BUTTON_CONFIGURATION }, { "BUTTON_INFORMATION", BUTTON_INFORMATION }, { "BUTTON_MAIN", BUTTON_MAIN }, @@ -51,7 +51,7 @@ extern "C" { if (argc == 1 && be_isstring(vm, 1)) { const char * needle = be_tostring(vm, 1); - int32_t constant_idx = bin_search(needle, &webserver_constants[0].name, sizeof(webserver_constants[0]), ARRAY_SIZE(webserver_constants)); + int32_t constant_idx = be_map_bin_search(needle, &webserver_constants[0].name, sizeof(webserver_constants[0]), ARRAY_SIZE(webserver_constants)); if (constant_idx >= 0) { // we did have a match, low == high diff --git a/tasmota/xdrv_52_9_berry.ino b/tasmota/xdrv_52_9_berry.ino index 6596782c1..b48281fde 100644 --- a/tasmota/xdrv_52_9_berry.ino +++ b/tasmota/xdrv_52_9_berry.ino @@ -110,25 +110,6 @@ size_t callBerryGC(void) { return callBerryEventDispatcher(PSTR("gc"), nullptr, 0, nullptr); } -void BerryDumpErrorAndClear(bvm *vm, bool berry_console); -void BerryDumpErrorAndClear(bvm *vm, bool berry_console) { - int32_t top = be_top(vm); - // check if we have two strings for an Exception - if (top >= 2 && be_isstring(vm, -1) && be_isstring(vm, -2)) { - if (berry_console) { - berry_log_C(PSTR(D_LOG_BERRY "Exception> '%s' - %s"), be_tostring(berry.vm, -2), be_tostring(berry.vm, -1)); - be_tracestack(vm); - top = be_top(vm); // update top after dump - } else { - AddLog(LOG_LEVEL_ERROR, PSTR(D_LOG_BERRY "Exception> '%s' - %s"), be_tostring(berry.vm, -2), be_tostring(berry.vm, -1)); - be_tracestack(vm); - } - } else { - be_dumpstack(vm); - } - be_pop(vm, top); -} - // void callBerryMqttData(void) { // AddLog(LOG_LEVEL_INFO, D_LOG_BERRY "callBerryMqttData"); // if (nullptr == berry.vm) { return; } @@ -151,53 +132,6 @@ void BerryDumpErrorAndClear(bvm *vm, bool berry_console) { // checkBeTop(); // } -/* -// Call a method of a global object, with n args -// Before: stack must containt n args -// After: stack contains return value or nil if something wrong (args removes) -// returns true is successful, false if object or method not found -bool callMethodObjectWithArgs(const char * objname, const char * method, size_t argc) { - if (nullptr == berry.vm) { return false; } - int32_t top = be_top(berry.vm); - // stacks contains n x arg - be_getglobal(berry.vm, objname); - // stacks contains n x arg + object - if (!be_isnil(berry.vm, -1)) { - be_getmethod(berry.vm, -1, method); - // stacks contains n x arg + object + method - if (!be_isnil(berry.vm, -1)) { - // reshuffle the entire stack since we want: method + object + n x arg - be_pushvalue(berry.vm, -1); // add instance as first arg - // stacks contains n x arg + object + method + method - be_pushvalue(berry.vm, -3); // add instance as first arg - // stacks contains n x arg + object + method + method + object - // now move args 2 slots up to make room for method and object - for (uint32_t i = 1; i <= argc; i++) { - be_moveto(berry.vm, -4 - i, -2 - i); - } - // stacks contains free + free + n x arg + method + object - be_moveto(berry.vm, -2, -4 - argc); - be_moveto(berry.vm, -1, -3 - argc); - // stacks contains method + object + n x arg + method + object - be_pop(berry.vm, 2); - // stacks contains method + object + n x arg - be_pcall(berry.vm, argc + 1); - // stacks contains return_val + object + n x arg - be_pop(berry.vm, argc + 1); - // stacks contains return_val - return true; - } - be_pop(berry.vm, 1); // remove method - // stacks contains n x arg + object - } - // stacks contains n x arg + object - be_pop(berry.vm, argc + 1); // clear stack - be_pushnil(berry.vm); // put nil object - return false; -} -*/ - - // call the event dispatcher from Tasmota object // if data_len is non-zero, the event is also sent as raw `bytes()` object because the string may lose data int32_t callBerryEventDispatcher(const char *type, const char *cmd, int32_t idx, const char *payload, uint32_t data_len) { @@ -225,7 +159,7 @@ int32_t callBerryEventDispatcher(const char *type, const char *cmd, int32_t idx, } BrTimeoutReset(); if (ret != 0) { - BerryDumpErrorAndClear(vm, false); // log in Tasmota console only + be_error_pop_all(berry.vm); // clear Berry stack return ret; } be_pop(vm, 5); @@ -252,6 +186,17 @@ void BerryObservability(bvm *vm, int event...) { static uint32_t gc_time = 0; switch (event) { + case BE_OBS_PCALL_ERROR: // error after be_pcall + { + int32_t top = be_top(vm); + // check if we have two strings for an Exception + if (top >= 2 && be_isstring(vm, -1) && be_isstring(vm, -2)) { + berry_log_C(PSTR(D_LOG_BERRY "Exception> '%s' - %s"), be_tostring(berry.vm, -2), be_tostring(berry.vm, -1)); + be_tracestack(vm); + } else { + be_dumpstack(vm); + } + } case BE_OBS_GC_START: { gc_time = millis(); @@ -331,18 +276,18 @@ void BerryInit(void) { ret_code1 = be_loadstring(berry.vm, berry_prog); if (ret_code1 != 0) { - BerryDumpErrorAndClear(berry.vm, false); + be_error_pop_all(berry.vm); // clear Berry stack break; } // AddLog(LOG_LEVEL_DEBUG, PSTR(D_LOG_BERRY "Berry code loaded, RAM used=%u"), be_gc_memcount(berry.vm)); ret_code2 = be_pcall(berry.vm, 0); if (ret_code1 != 0) { - BerryDumpErrorAndClear(berry.vm, false); + be_error_pop_all(berry.vm); // clear Berry stack break; } // AddLog(LOG_LEVEL_DEBUG, PSTR(D_LOG_BERRY "Berry code ran, RAM used=%u"), be_gc_memcount(berry.vm)); if (be_top(berry.vm) > 1) { - BerryDumpErrorAndClear(berry.vm, false); + be_error_pop_all(berry.vm); // clear Berry stack } else { be_pop(berry.vm, 1); } @@ -386,7 +331,7 @@ void BrLoad(const char * script_name) { BrTimeoutStart(); if (be_pcall(berry.vm, 1) != 0) { - BerryDumpErrorAndClear(berry.vm, false); + be_error_pop_all(berry.vm); // clear Berry stack return; } BrTimeoutReset(); @@ -491,7 +436,7 @@ void BrREPLRun(char * cmd) { } } if (BE_EXCEPTION == ret_code) { - BerryDumpErrorAndClear(berry.vm, true); + be_error_pop_all(berry.vm); // clear Berry stack // be_dumpstack(berry.vm); // char exception_s[120]; // ext_snprintf_P(exception_s, sizeof(exception_s), PSTR("%s: %s"), be_tostring(berry.vm, -2), be_tostring(berry.vm, -1)); diff --git a/tasmota/xdrv_60_shift595.ino b/tasmota/xdrv_60_shift595.ino new file mode 100644 index 000000000..4e816fc7e --- /dev/null +++ b/tasmota/xdrv_60_shift595.ino @@ -0,0 +1,119 @@ +/* + xdrv_60_shift595.ino - 74x595 shift register family support for Tasmota + + Copyright (C) 2021 Jacek Ziółkowski + + This program is free software: you can redistribute it and/or modify + it under the terms of the GNU General Public License as published by + the Free Software Foundation, either version 3 of the License, or + (at your option) any later version. + + This program 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 General Public License for more details. + + You should have received a copy of the GNU General Public License + along with this program. If not, see . +*/ + +#ifdef USE_SHIFT595 + +#define XDRV_60 60 + +const char kShift595Commands[] PROGMEM = "|" D_CMND_SHIFT595_DEVICE_COUNT ; +void (* const Shift595Command[])(void) PROGMEM = { &CmndShift595Devices }; + +struct Shift595 { + uint8_t pinSRCLK; + uint8_t pinRCLK; + uint8_t pinSER; + uint8_t pinOE; + uint8_t outputs; + uint8_t first; + bool connected = false; +} *Shift595 = nullptr; + +void Shift595ConfigurePin(uint8_t pin, uint8_t value = 0) { + pinMode(pin, OUTPUT); + digitalWrite(pin, value); +} + +void Shift595Init(void) { + if (PinUsed(GPIO_SHIFT595_SRCLK) && PinUsed(GPIO_SHIFT595_RCLK) && PinUsed(GPIO_SHIFT595_SER)) { + Shift595 = (struct Shift595*)calloc(1, sizeof(struct Shift595)); + if (Shift595) { + Shift595->pinSRCLK = Pin(GPIO_SHIFT595_SRCLK); + Shift595->pinRCLK = Pin(GPIO_SHIFT595_RCLK); + Shift595->pinSER = Pin(GPIO_SHIFT595_SER); + + Shift595ConfigurePin(Shift595->pinSRCLK); + Shift595ConfigurePin(Shift595->pinRCLK); + Shift595ConfigurePin(Shift595->pinSER); + + if (PinUsed(GPIO_SHIFT595_OE)) { + Shift595->pinOE = Pin(GPIO_SHIFT595_OE); + Shift595ConfigurePin(Shift595->pinOE, 1); + } + + Shift595->first = TasmotaGlobal.devices_present; + Shift595->outputs = Settings->shift595_device_count * 8; + TasmotaGlobal.devices_present += Shift595->outputs; + Shift595->connected = true; + AddLog(LOG_LEVEL_DEBUG, PSTR("595: Controlling relays POWER%d to POWER%d"), Shift595->first + 1, Shift595->first + Shift595->outputs); + } + } +} + +void Shift595LatchPin(uint8_t pin) { + digitalWrite(pin, 1); + digitalWrite(pin, 0); +} + +void Shift595SwitchRelay(void) { + if (Shift595 && Shift595->connected == true) { + for (uint32_t i = 0; i < Shift595->outputs; i++) { + uint8_t relay_state = bitRead(XdrvMailbox.index, Shift595->first + Shift595->outputs -1 -i); + digitalWrite(Shift595->pinSER, Settings->flag5.shift595_invert_outputs ? !relay_state : relay_state); + Shift595LatchPin(Shift595->pinSRCLK); + } + + Shift595LatchPin(Shift595->pinRCLK); + + if (PinUsed(GPIO_SHIFT595_OE)) { + digitalWrite(Shift595->pinOE, 0); + } + } +} + +void CmndShift595Devices(void) { + if ((XdrvMailbox.payload > 0) && (XdrvMailbox.payload <= 3)) { + Settings->shift595_device_count = (1 == XdrvMailbox.payload) ? SHIFT595_DEVICE_COUNT : XdrvMailbox.payload; + TasmotaGlobal.restart_flag = 2; + } + ResponseCmndNumber(Settings->shift595_device_count); +} + +/*********************************************************************************************\ + * Interface +\*********************************************************************************************/ + +bool Xdrv60(uint8_t function) { + bool result = false; + + if (FUNC_PRE_INIT == function) { + Shift595Init(); + } else if (Shift595) { + switch (function) { + case FUNC_SET_POWER: + Shift595SwitchRelay(); + break; + case FUNC_COMMAND: + result = DecodeCommand(kShift595Commands, Shift595Command); + break; + } + } + return result; +} + +#endif // USE_SHIFT595 diff --git a/tasmota/xdrv_81_esp32_webcam.ino b/tasmota/xdrv_81_esp32_webcam.ino index dca8ec936..b89bc7930 100644 --- a/tasmota/xdrv_81_esp32_webcam.ino +++ b/tasmota/xdrv_81_esp32_webcam.ino @@ -26,7 +26,7 @@ * {"NAME":"AITHINKER CAM","GPIO":[4992,1,672,1,416,5088,1,1,1,6720,736,704,1,1,5089,5090,0,5091,5184,5152,0,5120,5024,5056,0,0,0,0,4928,1,5094,5095,5092,0,0,5093],"FLAG":0,"BASE":2} * * Supported commands: - * WcStream = Control streaming, 0 = stop, 1 = start + * WcInterrupt = Control streaming, 0 = stop, 1 = start * WcResolution = Set resolution 0 = FRAMESIZE_96X96, // 96x96 1 = FRAMESIZE_QQVGA, // 160x120 @@ -78,6 +78,7 @@ #define XDRV_81 81 +#include "cam_hal.h" #include "esp_camera.h" #include "sensor.h" #include "fb_gfx.h" @@ -162,10 +163,21 @@ struct { #endif // ENABLE_RTSPSERVER } Wc; - - /*********************************************************************************************/ +void WcInterrupt(uint32_t state) { + // Stop camera ISR if active to fix TG1WDT_SYS_RESET + if (!Wc.up) { return; } + + if (state) { + // Re-enable interrupts + cam_start(); + } else { + // Stop interrupts + cam_stop(); + } +} + bool WcPinUsed(void) { bool pin_used = true; for (uint32_t i = 0; i < MAX_WEBCAM_DATA; i++) { @@ -711,7 +723,7 @@ void HandleImageBasic(void) { if (Settings->webcam_config.stream) { if (!Wc.CamServer) { - WcStreamControl(); + WcInterruptControl(); } } @@ -871,7 +883,7 @@ uint32_t WcSetStreamserver(uint32_t flag) { return 0; } -void WcStreamControl() { +void WcInterruptControl() { WcSetStreamserver(Settings->webcam_config.stream); WcSetup(Settings->webcam_config.resolution); } @@ -880,6 +892,8 @@ void WcStreamControl() { void WcLoop(void) { + if (4 == Wc.stream_active) { return; } + if (Wc.CamServer) { Wc.CamServer->handleClient(); if (Wc.stream_active) { HandleWebcamMjpegTask(); } @@ -941,7 +955,7 @@ void WcShowStream(void) { if (Settings->webcam_config.stream) { // if (!Wc.CamServer || !Wc.up) { if (!Wc.CamServer) { - WcStreamControl(); + WcInterruptControl(); delay(50); // Give the webcam webserver some time to prepare the stream } if (Wc.CamServer && Wc.up) { @@ -1014,7 +1028,7 @@ void CmndWebcam(void) { void CmndWebcamStream(void) { if ((XdrvMailbox.payload >= 0) && (XdrvMailbox.payload <= 1)) { Settings->webcam_config.stream = XdrvMailbox.payload; - if (!Settings->webcam_config.stream) { WcStreamControl(); } // Stop stream + if (!Settings->webcam_config.stream) { WcInterruptControl(); } // Stop stream } ResponseCmndStateText(Settings->webcam_config.stream); } @@ -1068,7 +1082,7 @@ void CmndWebcamContrast(void) { } void CmndWebcamInit(void) { - WcStreamControl(); + WcInterruptControl(); ResponseCmndDone(); } diff --git a/tasmota/xdrv_85_BLE_EQ3_TRV.ino b/tasmota/xdrv_85_BLE_EQ3_TRV.ino index cfe3bb33d..d69368268 100644 --- a/tasmota/xdrv_85_BLE_EQ3_TRV.ino +++ b/tasmota/xdrv_85_BLE_EQ3_TRV.ino @@ -128,7 +128,6 @@ print("".join(pin)) // for testing of BLE_ESP32, we remove xsns_62_MI_ESP32.ino completely, and instead add this modified xsns_52_ibeacon_BLE_ESP32.ino #if CONFIG_IDF_TARGET_ESP32 -#if ESP_IDF_VERSION <= ESP_IDF_VERSION_VAL(4, 0, 0) #ifdef USE_EQ3_ESP32 #ifdef ESP32 // ESP32 only. Use define USE_HM10 for ESP8266 support #ifdef USE_BLE_ESP32 @@ -226,7 +225,7 @@ uint8_t pairing = 0; #define EQ3_NUM_DEVICESLOTS 16 eq3_device_tag EQ3Devices[EQ3_NUM_DEVICESLOTS]; -void *EQ3mutex = nullptr; +SemaphoreHandle_t EQ3mutex = nullptr; int EQ3Period = 300; uint8_t EQ3OnlyAliased = 0; @@ -1765,5 +1764,4 @@ bool Xdrv85(uint8_t function) #endif // ESP32 #endif -#endif // ESP_IDF_VERSION <= ESP_IDF_VERSION_VAL(4, 0, 0) #endif // CONFIG_IDF_TARGET_ESP32 diff --git a/tasmota/xdrv_86_esp32_sonoff_spm.ino b/tasmota/xdrv_86_esp32_sonoff_spm.ino index 9f858691b..dc770c7e4 100644 --- a/tasmota/xdrv_86_esp32_sonoff_spm.ino +++ b/tasmota/xdrv_86_esp32_sonoff_spm.ino @@ -28,6 +28,8 @@ * {"NAME":"Sonoff SPM (POC1)","GPIO":[1,1,1,1,3200,1,1,1,1,1,1,1,3232,1,1,1,0,1,1,1,0,1,1,1,0,0,0,0,544,1,1,32,1,0,0,1],"FLAG":0,"BASE":1} * Add ethernet support: * {"NAME":"Sonoff SPM (POC2)","GPIO":[1,0,1,0,3200,5536,0,0,1,1,1,0,3232,0,5600,0,0,0,0,5568,0,0,0,0,0,0,0,0,544,1,1,32,1,0,0,1],"FLAG":0,"BASE":1} + * Remove all user selectable GPIOs: + * {"NAME":"Sonoff SPM (POC2)","GPIO":[0,0,0,0,3200,5536,0,0,0,0,0,0,3232,0,5600,0,0,0,0,5568,0,0,0,0,0,0,0,0,544,0,0,32,0,0,0,0],"FLAG":0,"BASE":1} * * Things to know: * Bulk of the action is handled by ARM processors present in every unit communicating over modbus RS-485. @@ -45,15 +47,21 @@ * Tasmota POC2: * Ethernet support. * Gui optimized for energy display. + * Yellow led lights if no ARM connection can be made. + * Yellow led blinks 2 seconds if an ARM-ESP comms CRC error is detected. + * Supported commands: + * SspmDisplay 0|1 - Select alternative GUI rotating display either all or powered on only + * SspmIAmHere - Blink ERROR in SPM-4Relay where relay resides + * SspmScan - Rescan ARM modbus taking around 20 seconds + * SspmReset 1 - Reset ARM and restart ESP * * Todo: * Gui for Overload Protection entry (is handled by ARM processor). * Gui for Scheduling entry (is handled by ARM processor). - * Yellow led functionality. - * Interpretation of reset sequence on GPIO's 12-14. + * SPI master to ARM (ARM firmware upload from ESP using EasyFlash). * * Nice to have: - * Support for all 32 SPM4Relay units equals 128 relays + * Support for all 32 SPM-4Relay units equals 128 relays (restricted due to internal Tasmota register use) * * GPIO's used: * GPIO00 - Bootmode / serial flash @@ -61,9 +69,9 @@ * GPIO03 - Serial console RX * GPIO04 - ARM processor TX (115200bps8N1) * GPIO05 - ETH POWER - * GPIO12 - SPI MISO ARM pulsetrain code (input?) - * GPIO13 - SPI CLK - * GPIO14 - SPI CS ARM pulsetrain eoc (input?) + * GPIO12 - SPI MOSI ARM output (pin36 - PB15) - ESP input + * GPIO13 - SPI MISO ESP output - ARM input (pin35 - PB14) + * GPIO14 - SPI CLK ESP input (ARM pin34 - PB13) * GPIO15 - ARM reset (output) - 18ms low active 125ms after restart esp32 * GPIO16 - ARM processor RX * GPIO17 - EMAC_CLK_OUT_180 @@ -116,6 +124,7 @@ #define SSPM_FUNC_GET_ENERGY 24 // 0x18 #define SSPM_FUNC_GET_LOG 26 // 0x1A #define SSPM_FUNC_ENERGY_PERIOD 27 // 0x1B +#define SSPM_FUNC_RESET 28 // 0x1C - Remove device from eWelink and factory reset // Receive #define SSPM_FUNC_ENERGY_RESULT 6 // 0x06 @@ -125,6 +134,7 @@ #define SSPM_FUNC_SCAN_DONE 25 // 0x19 #define SSPM_GPIO_ARM_RESET 15 +#define SSPM_GPIO_LED_ERROR 33 #define SSPM_MODULE_NAME_SIZE 12 @@ -175,6 +185,7 @@ typedef struct { uint8_t command_sequence; uint8_t mstate; uint8_t last_button; + uint8_t error_led_blinks; bool discovery_triggered; } TSspm; @@ -427,7 +438,7 @@ void SSPMSendSetTime(void) { SspmBuffer[25] = time.second; SspmBuffer[26] = 0; SspmBuffer[27] = 0; - SspmBuffer[28] = 1 + (Rtc.time_timezone / 60); // Not sure why the "1" is needed but it is in my case + SspmBuffer[28] = Rtc.time_timezone / 60; SspmBuffer[29] = abs(Rtc.time_timezone % 60); Sspm->command_sequence++; SspmBuffer[30] = Sspm->command_sequence; @@ -667,9 +678,9 @@ void SSPMHandleReceivedData(void) { 03 <- L4 07 e5 0b 0d <- End date (Today) 2021 nov 13 07 e5 05 11 <- Start date 2021 may 17 - 00 05 <- 5kWh (13/11 Today) - 00 00 <- 0 (12/11 Yesterday) - 00 04 <- 4kWh (11/11 etc) + 00 05 <- 0.05kWh (13/11 Today) + 00 00 <- 0 (12/11 Yesterday) + 00 04 <- 0.04kWh (11/11 etc) 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 @@ -679,14 +690,14 @@ void SSPMHandleReceivedData(void) { 42 67 46 */ { - uint32_t energy_today = 0; - uint32_t energy_yesterday = 0; - uint32_t energy_total = 0; + float energy_today = 0; + float energy_yesterday = 0; + float energy_total = 0; uint32_t entries = (Sspm->expected_bytes - 22) / 2; for (uint32_t i = 0; i < entries; i++) { - uint32_t today_energy = (SspmBuffer[41 + (i*2)] << 8) + SspmBuffer[42 + (i*2)]; - if (28702 == today_energy) { today_energy = 0; } // Unknown why sometimes 0x701E (=28702kWh) pops up + float today_energy = SspmBuffer[41 + (i*2)] + (float)SspmBuffer[42 + (i*2)] / 100; // x.xxkWh + if (112.30 == today_energy) { today_energy = 0; } // Unknown why sometimes 0x701E (=112.30kWh) pops up if (0 == i) { energy_today = today_energy; } if (1 == i) { energy_yesterday = today_energy; } energy_total += today_energy; @@ -696,7 +707,7 @@ void SSPMHandleReceivedData(void) { if ((SspmBuffer[20] == Sspm->module[module][0]) && (SspmBuffer[21] == Sspm->module[module][1])) { Sspm->energy_today[module][channel] = energy_today; Sspm->energy_yesterday[module][channel] = energy_yesterday; - Sspm->energy_total[module][channel] = energy_total; // xkWh + Sspm->energy_total[module][channel] = energy_total; // x.xxkWh break; } } @@ -705,7 +716,7 @@ void SSPMHandleReceivedData(void) { break; case SSPM_FUNC_GET_LOG: /* 0x1A - 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 + 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 AA 55 01 00 00 00 00 00 00 00 00 00 00 00 00 80 1a 01 3a 00 6b 7e 32 37 39 37 34 13 4b 35 36 37 1e Number of log entries (1e = 30) 07 e5 0b 06 0f 25 19 02 01 00 10 byte log entry @@ -730,6 +741,10 @@ void SSPMHandleReceivedData(void) { 07 e5 0b 06 0e 36 37 01 01 00 ... 07 e5 0b 06 0d 30 2d 03 00 01 09 89 fe + + Error: + AA 55 01 00 00 00 00 00 00 00 00 00 00 00 00 80 1A 00 01 03 E5 45 EB + | | */ break; @@ -741,6 +756,12 @@ void SSPMHandleReceivedData(void) { AA 55 01 00 00 00 00 00 00 00 00 00 00 00 00 80 1b 00 11 [00] 8b 34 32 37 39 37 34 13 4b 35 36 37 [03] [00 00 00] f8 94 15 L4, kWh start period (0) */ + break; + case SSPM_FUNC_RESET: + /* 0x1C + AA 55 01 00 00 00 00 00 00 00 00 00 00 00 00 80 1c 00 01 00 0b f9 e3 + */ +// TasmotaGlobal.restart_flag = 2; break; } } else { @@ -879,6 +900,7 @@ void SSPMSerialInput(void) { if (crc_rcvd == crc_calc) { SSPMHandleReceivedData(); } else { + Sspm->error_led_blinks = 20; AddLog(LOG_LEVEL_DEBUG, PSTR("SPM: CRC error")); } Sspm->serial_in_byte_counter = 0; @@ -916,11 +938,14 @@ void SSPMInit(void) { pinMode(SSPM_GPIO_ARM_RESET, OUTPUT); digitalWrite(SSPM_GPIO_ARM_RESET, 1); + pinMode(SSPM_GPIO_LED_ERROR, OUTPUT); + digitalWrite(SSPM_GPIO_LED_ERROR, 0); + if (0 == Settings->flag2.voltage_resolution) { Settings->flag2.voltage_resolution = 1; // SPM has 2 decimals but this keeps the gui clean Settings->flag2.current_resolution = 2; // SPM has 2 decimals Settings->flag2.wattage_resolution = 1; // SPM has 2 decimals but this keeps the gui clean - Settings->flag2.energy_resolution = 0; // SPM has no decimals on total energy + Settings->flag2.energy_resolution = 1; // SPM has 2 decimals but this keeps the gui clean } #if CONFIG_IDF_TARGET_ESP32 @@ -949,11 +974,21 @@ void SSPMEvery100ms(void) { } } + if (Sspm->error_led_blinks) { + uint32_t state = 1; // Stay lit + if (Sspm->error_led_blinks < 255) { + Sspm->error_led_blinks--; + state = Sspm->error_led_blinks >> 1 &1; // Blink every 0.4s + } + digitalWrite(SSPM_GPIO_LED_ERROR, state); + } + // Fix race condition if the ARM doesn't respond if ((Sspm->mstate > SPM_NONE) && (Sspm->mstate < SPM_SEND_FUNC_UNITS)) { Sspm->counter++; if (Sspm->counter > 20) { Sspm->mstate = SPM_NONE; + Sspm->error_led_blinks = 255; } } switch (Sspm->mstate) { @@ -1082,29 +1117,30 @@ bool SSPMButton(void) { /*********************************************************************************************/ const uint16_t SSPM_SIZE = 128; -const char kSSPMEnergyPhases[] PROGMEM = "%*_f%*_f%*_f%*_f|[%*_f,%*_f,%*_f,%*_f]"; -char* SSPMEnergyFormat(char* result, float* input, uint32_t resolution, bool json) { - char layout[100]; - GetTextIndexed(layout, sizeof(layout), json, kSSPMEnergyPhases); - ext_snprintf_P(result, SSPM_SIZE, layout, resolution, &input[0], resolution, &input[1], resolution, &input[2], resolution, &input[3]); +char* SSPMEnergyFormat(char* result, float* input, uint32_t resolution, uint8_t* indirect, uint8_t offset, uint32_t count) { + result[0] = '\0'; + for (uint32_t i = 0; i < count; i++) { + ext_snprintf_P(result, SSPM_SIZE, PSTR("%s%*_f"), result, resolution, &input[indirect[offset +i]]); + } + ext_snprintf_P(result, SSPM_SIZE, PSTR("%s"), result); return result; } const char HTTP_SSPM_VOLTAGE[] PROGMEM = - "{s}" D_VOLTAGE "%s" D_UNIT_VOLT "{e}"; // {s} = , {m} = , {e} = + "{s}" D_VOLTAGE "%s" D_UNIT_VOLT "{e}"; // {s} = , {m} = , {e} = const char HTTP_SSPM_CURRENT[] PROGMEM = - "{s}" D_CURRENT "%s" D_UNIT_AMPERE "{e}"; + "{s}" D_CURRENT "%s" D_UNIT_AMPERE "{e}"; const char HTTP_SSPM_POWER[] PROGMEM = - "{s}" D_POWERUSAGE_ACTIVE "%s" D_UNIT_WATT "{e}"; + "{s}" D_POWERUSAGE_ACTIVE "%s" D_UNIT_WATT "{e}"; const char HTTP_SSPM_POWER2[] PROGMEM = - "{s}" D_POWERUSAGE_APPARENT "%s" D_UNIT_VA "{e}" - "{s}" D_POWERUSAGE_REACTIVE "%s" D_UNIT_VAR "{e}" - "{s}" D_POWER_FACTOR "%s{e}"; + "{s}" D_POWERUSAGE_APPARENT "%s" D_UNIT_VA "{e}" + "{s}" D_POWERUSAGE_REACTIVE "%s" D_UNIT_VAR "{e}" + "{s}" D_POWER_FACTOR "%s{e}"; const char HTTP_SSPM_ENERGY[] PROGMEM = - "{s}" D_ENERGY_TODAY "%s" D_UNIT_KILOWATTHOUR "{e}" - "{s}" D_ENERGY_YESTERDAY "%s" D_UNIT_KILOWATTHOUR "{e}" - "{s}" D_ENERGY_TOTAL "%s" D_UNIT_KILOWATTHOUR "{e}"; + "{s}" D_ENERGY_TODAY "%s" D_UNIT_KILOWATTHOUR "{e}" + "{s}" D_ENERGY_YESTERDAY "%s" D_UNIT_KILOWATTHOUR "{e}" + "{s}" D_ENERGY_TOTAL "%s" D_UNIT_KILOWATTHOUR "{e}"; void SSPMEnergyShow(bool json) { if (!TasmotaGlobal.devices_present) { return; } // Not ready yet @@ -1112,18 +1148,18 @@ void SSPMEnergyShow(bool json) { if (json) { ResponseAppend_P(PSTR(",\"SPM\":{\"" D_JSON_ENERGY "\":[")); for (uint32_t i = 0; i < TasmotaGlobal.devices_present; i++) { - ResponseAppend_P(PSTR("%s%*_f"), (i>0)?",":"", -1, &Sspm->energy_total[i >>2][i &3]); + ResponseAppend_P(PSTR("%s%*_f"), (i>0)?",":"", Settings->flag2.energy_resolution, &Sspm->energy_total[i >>2][i &3]); } #ifdef SSPM_JSON_ENERGY_YESTERDAY ResponseAppend_P(PSTR("],\"" D_JSON_YESTERDAY "\":[")); for (uint32_t i = 0; i < TasmotaGlobal.devices_present; i++) { - ResponseAppend_P(PSTR("%s%*_f"), (i>0)?",":"", -1, &Sspm->energy_yesterday[i >>2][i &3]); + ResponseAppend_P(PSTR("%s%*_f"), (i>0)?",":"", Settings->flag2.energy_resolution, &Sspm->energy_yesterday[i >>2][i &3]); } #endif #ifdef SSPM_JSON_ENERGY_TODAY ResponseAppend_P(PSTR("],\"" D_JSON_TODAY "\":[")); for (uint32_t i = 0; i < TasmotaGlobal.devices_present; i++) { - ResponseAppend_P(PSTR("%s%*_f"), (i>0)?",":"", -1, &Sspm->energy_today[i >>2][i &3]); + ResponseAppend_P(PSTR("%s%*_f"), (i>0)?",":"", Settings->flag2.energy_resolution, &Sspm->energy_today[i >>2][i &3]); } #endif ResponseAppend_P(PSTR("],\"" D_JSON_ACTIVE_POWERUSAGE "\":[")); @@ -1152,30 +1188,50 @@ void SSPMEnergyShow(bool json) { } ResponseAppend_P(PSTR("]}")); } else { - Sspm->rotate++; - if (Sspm->rotate >= TasmotaGlobal.devices_present) { - Sspm->rotate = 0; + uint8_t relay[SSPM_MAX_MODULES * 4]; + uint8_t indirect[SSPM_MAX_MODULES * 4]; + + uint32_t index = 0; + power_t power = TasmotaGlobal.power; + for (uint32_t i = 0; i < TasmotaGlobal.devices_present; i++) { + if ((0 == Settings->sbflag1.sspm_display) || + ((1 == Settings->sbflag1.sspm_display) && (power >> i) &1)) { + relay[index] = i +1; + indirect[index] = i; + index++; + } } - uint32_t module = Sspm->rotate >> 2; - uint32_t relay_base = module * 4; - WSContentSend_P(PSTR("{t}{s}")); // First column is empty ({t} = , {s} =
) - for (uint32_t i = 1; i < 5; i++) { - WSContentSend_P(PSTR("L%d"), relay_base +i); + + if (index) { + uint32_t offset = 0; + if (index > 4) { + Sspm->rotate++; + if (Sspm->rotate >= ((index -1) >> 2) << 3) { + Sspm->rotate = 0; + } + offset = (Sspm->rotate >> 2) * 4; + } + uint32_t count = index - offset; + if (count > 4) { count = 4; } + WSContentSend_P(PSTR("
{t}{s}")); // First column is empty ({t} = , {s} = ) + char value_chr[SSPM_SIZE]; + WSContentSend_PD(HTTP_SSPM_VOLTAGE, SSPMEnergyFormat(value_chr, Sspm->voltage[0], Settings->flag2.voltage_resolution, indirect, offset, count)); + WSContentSend_PD(HTTP_SSPM_CURRENT, SSPMEnergyFormat(value_chr, Sspm->current[0], Settings->flag2.current_resolution, indirect, offset, count)); + WSContentSend_PD(HTTP_SSPM_POWER, SSPMEnergyFormat(value_chr, Sspm->active_power[0], Settings->flag2.wattage_resolution, indirect, offset, count)); + char valu2_chr[SSPM_SIZE]; + char valu3_chr[SSPM_SIZE]; + WSContentSend_PD(HTTP_SSPM_POWER2, SSPMEnergyFormat(value_chr, Sspm->apparent_power[0], Settings->flag2.wattage_resolution, indirect, offset, count), + SSPMEnergyFormat(valu2_chr, Sspm->reactive_power[0], Settings->flag2.wattage_resolution, indirect, offset, count), + SSPMEnergyFormat(valu3_chr, Sspm->power_factor[0], 2, indirect, offset, count)); + WSContentSend_PD(HTTP_SSPM_ENERGY, SSPMEnergyFormat(value_chr, Sspm->energy_today[0], Settings->flag2.energy_resolution, indirect, offset, count), + SSPMEnergyFormat(valu2_chr, Sspm->energy_yesterday[0], Settings->flag2.energy_resolution, indirect, offset, count), + SSPMEnergyFormat(valu3_chr, Sspm->energy_total[0], Settings->flag2.energy_resolution, indirect, offset, count)); + WSContentSend_P(PSTR("
) + for (uint32_t i = 0; i < count; i++) { + WSContentSend_P(PSTR("L%d"), relay[offset +i]); + } + WSContentSend_P(PSTR("{e}")); // Last column is units ({e} =
{t}")); // {t} = - Define for next FUNC_WEB_SENSOR } - WSContentSend_P(PSTR(") - char value_chr[SSPM_SIZE]; - WSContentSend_PD(HTTP_SSPM_VOLTAGE, SSPMEnergyFormat(value_chr, Sspm->voltage[module], Settings->flag2.voltage_resolution, json)); - WSContentSend_PD(HTTP_SSPM_CURRENT, SSPMEnergyFormat(value_chr, Sspm->current[module], Settings->flag2.current_resolution, json)); - WSContentSend_PD(HTTP_SSPM_POWER, SSPMEnergyFormat(value_chr, Sspm->active_power[module], Settings->flag2.wattage_resolution, json)); - char valu2_chr[SSPM_SIZE]; - char valu3_chr[SSPM_SIZE]; - WSContentSend_PD(HTTP_SSPM_POWER2, SSPMEnergyFormat(value_chr, Sspm->apparent_power[module], Settings->flag2.wattage_resolution, json), - SSPMEnergyFormat(valu2_chr, Sspm->reactive_power[module], Settings->flag2.wattage_resolution, json), - SSPMEnergyFormat(valu3_chr, Sspm->power_factor[module], 2, json)); - WSContentSend_PD(HTTP_SSPM_ENERGY, SSPMEnergyFormat(value_chr, Sspm->energy_today[module], Settings->flag2.energy_resolution, json), - SSPMEnergyFormat(valu2_chr, Sspm->energy_yesterday[module], Settings->flag2.energy_resolution, json), - SSPMEnergyFormat(valu3_chr, Sspm->energy_total[module], Settings->flag2.energy_resolution, json)); - WSContentSend_P(PSTR("
{e}")); // Last column is units ({e} =
{t}")); // {t} = - Define for next FUNC_WEB_SENSOR } } @@ -1184,10 +1240,10 @@ void SSPMEnergyShow(bool json) { \*********************************************************************************************/ const char kSSPMCommands[] PROGMEM = "SSPM|" // Prefix - "Log|Energy|History|Scan|IamHere" ; + "Log|Energy|History|Scan|IamHere|Display|Reset" ; void (* const SSPMCommand[])(void) PROGMEM = { - &CmndSSPMLog, &CmndSSPMEnergy, &CmndSSPMEnergyHistory, &CmndSSPMScan, &CmndSSPMIamHere }; + &CmndSSPMLog, &CmndSSPMEnergy, &CmndSSPMEnergyHistory, &CmndSSPMScan, &CmndSSPMIamHere, &CmndSSPMDisplay, &CmndSSPMReset }; void CmndSSPMLog(void) { // Report 29 log entries @@ -1216,12 +1272,32 @@ void CmndSSPMScan(void) { } void CmndSSPMIamHere(void) { - // Blink module COMM led containing relay + // Blink module ERROR led containing relay if ((XdrvMailbox.payload < 1) || (XdrvMailbox.payload > TasmotaGlobal.devices_present)) { XdrvMailbox.payload = 1; } SSPMSendIAmHere(XdrvMailbox.payload -1); ResponseCmndDone(); } +void CmndSSPMDisplay(void) { + // Select either all relays or only powered on relays + if ((XdrvMailbox.payload >= 0) && (XdrvMailbox.payload <= 1)) { + Settings->sbflag1.sspm_display = XdrvMailbox.payload; + } + ResponseCmndNumber(Settings->sbflag1.sspm_display); +} + +void CmndSSPMReset(void) { + // Reset ARM and restart + if (1 == XdrvMailbox.payload) { + Sspm->mstate = SPM_NONE; + SSPMSendCmnd(SSPM_FUNC_RESET); + TasmotaGlobal.restart_flag = 3; + ResponseCmndChar(PSTR(D_JSON_RESET_AND_RESTARTING)); + } else { + ResponseCmndChar(PSTR(D_JSON_ONE_TO_RESET)); + } +} + /*********************************************************************************************\ * Interface \*********************************************************************************************/ diff --git a/tasmota/xdsp_17_universal.ino b/tasmota/xdsp_17_universal.ino index b80205029..a37d5af5e 100644 --- a/tasmota/xdsp_17_universal.ino +++ b/tasmota/xdsp_17_universal.ino @@ -55,7 +55,7 @@ void Core2DisplayDim(uint8_t dim); #ifndef DISP_DESC_FILE //#define DISP_DESC_FILE "/dispdesc.txt" #define DISP_DESC_FILE "/display.ini" -#endif +#endif // DISP_DESC_FILE /*********************************************************************************************/ #ifdef DSP_ROM_DESC @@ -95,7 +95,7 @@ int8_t cs; AddLog(LOG_LEVEL_INFO, PSTR("DSP: File descriptor used")); } } -#endif +#endif // USE_UFILESYS #ifdef USE_SCRIPT @@ -212,8 +212,8 @@ int8_t cs; replacepin(&cp, Pin(GPIO_SPI_CLK, 1)); replacepin(&cp, Pin(GPIO_SPI_MOSI, 1)); replacepin(&cp, Pin(GPIO_SPI_DC, 1)); - replacepin(&cp, Pin(GPIO_BACKLIGHT, 1)); - replacepin(&cp, Pin(GPIO_OLED_RESET, 1)); + replacepin(&cp, Pin(GPIO_BACKLIGHT)); + replacepin(&cp, Pin(GPIO_OLED_RESET)); replacepin(&cp, Pin(GPIO_SPI_MISO, 1)); } else { // soft spi pins @@ -280,9 +280,9 @@ int8_t cs; else FT5206_Touch_Init(Wire1); #else if (!wire_n) FT5206_Touch_Init(Wire); -#endif +#endif // ESP32 } -#endif +#endif // USE_FT5206 #ifdef USE_XPT2046 cp = strstr(ddesc, ":TS,"); @@ -291,7 +291,7 @@ int8_t cs; uint8_t touch_cs = replacepin(&cp, Pin(GPIO_XPT2046_CS)); XPT2046_Touch_Init(touch_cs); } -#endif +#endif // USE_XPT2046 uint8_t inirot = Settings->display_rotate; @@ -314,18 +314,18 @@ int8_t cs; #ifdef USE_M5STACK_CORE2 renderer->SetPwrCB(Core2DisplayPower); renderer->SetDimCB(Core2DisplayDim); -#endif +#endif // USE_M5STACK_CORE2 renderer->DisplayInit(DISPLAY_INIT_MODE, Settings->display_size, inirot, Settings->display_font); Settings->display_width = renderer->width(); Settings->display_height = renderer->height(); - + ApplyDisplayDimmer(); #ifdef SHOW_SPLASH renderer->Splash(); -#endif +#endif // SHOW_SPLASH udisp_init_done = true; AddLog(LOG_LEVEL_INFO, PSTR("DSP: %s!"), renderer->devname()); diff --git a/tasmota/xlgt_07_lsc_mcsl.ino b/tasmota/xlgt_07_lsc_mcsl.ino index 9e8ec00e6..d7c9bbfd2 100644 --- a/tasmota/xlgt_07_lsc_mcsl.ino +++ b/tasmota/xlgt_07_lsc_mcsl.ino @@ -17,6 +17,8 @@ along with this program. If not, see . */ +#define USE_LSC_MCSL_GUI + #ifdef USE_LIGHT #ifdef USE_LSC_MCSL /*********************************************************************************************\ @@ -27,6 +29,17 @@ * Template: * {"NAME":"LSC MC Lights","GPIO":[0,0,0,0,544,32,0,0,3840,0,3872,0,0,0],"FLAG":0,"BASE":18} * + * Webbutton: + * {"WebButton1":"On / Off", + * "WebButton2":"Bright", + * "WebButton3":"Slow", + * "WebButton4":"Star", + * "WebButton5":"Flower", + * "WebButton6":"Marquee", + * "WebButton7":"Fireworks", + * "WebButton8":"Meteor", + * "WebButton9":"Stream"} + * * NL: Action LSC Multi color smart lights * * Button usage: @@ -232,6 +245,51 @@ void LscMcModuleSelected(void) { // AddLog(LOG_LEVEL_DEBUG, PSTR("LGT: LSC Multi Color Found")); } +#ifdef USE_WEBSERVER +#ifdef USE_LSC_MCSL_GUI + +void LscMcAddFuctionButtons(void) { + uint32_t rows = 1; + uint32_t cols = 8; + for (uint32_t i = 0; i < 8; i++) { + if (strlen(SettingsText(SET_BUTTON1 + i +1))) { + rows <<= 1; + cols >>= 1; + break; + } + } + WSContentSend_P(HTTP_TABLE100); + WSContentSend_P(PSTR("")); + char number[4]; + uint32_t idx = 0; + for (uint32_t i = 0; i < rows; i++) { + if (idx > 0) { WSContentSend_P(PSTR("")); } + for (uint32_t j = 0; j < cols; j++) { + idx++; + WSContentSend_P(PSTR(""), // &lsc is related to WebGetArg("lsc", tmp, sizeof(tmp)); + 100 / cols, + idx -1, + (strlen(SettingsText(SET_BUTTON1 + idx))) ? SettingsText(SET_BUTTON1 + idx) : itoa(idx, number, 10)); + } + } + WSContentSend_P(PSTR("
")); +} + +void LscMcWebGetArg(void) { + char tmp[8]; // WebGetArg numbers only + WebGetArg(PSTR("lsc"), tmp, sizeof(tmp)); // 0 - 7 functions + if (strlen(tmp)) { + uint32_t function = atoi(tmp); + char command[20]; + snprintf_P(command, sizeof(command), PSTR(D_CMND_DIMMER " %d"), (function * (100 / 8)) + ((100 / 8) / 2)); + ExecuteWebCommand(command); + } +} + +#endif // USE_LSC_MCSL_GUI +#endif // USE_WEBSERVER + + /*********************************************************************************************\ * Interface \*********************************************************************************************/ @@ -247,6 +305,16 @@ bool Xlgt07(uint8_t function) case FUNC_BUTTON_MULTI_PRESSED: result = LscMcMultiButtonPressed(); break; +#ifdef USE_WEBSERVER +#ifdef USE_LSC_MCSL_GUI + case FUNC_WEB_ADD_MAIN_BUTTON: + LscMcAddFuctionButtons(); + break; + case FUNC_WEB_GET_ARG: + LscMcWebGetArg(); + break; +#endif // USE_LSC_MCSL_GUI +#endif // USE_WEBSERVER case FUNC_MODULE_INIT: LscMcModuleSelected(); break; diff --git a/tasmota/xsns_53_sml.ino b/tasmota/xsns_53_sml.ino index 7674f5cf0..7a184a4bb 100755 --- a/tasmota/xsns_53_sml.ino +++ b/tasmota/xsns_53_sml.ino @@ -79,7 +79,7 @@ #define DJ_COUNTER "Count" struct METER_DESC { - uint8_t srcpin; + int8_t srcpin; uint8_t type; uint16_t flag; int32_t params; @@ -499,9 +499,7 @@ uint16_t meter_spos[MAX_METERS]; #ifdef ESP8266 TasmotaSerial *meter_ss[MAX_METERS]; #endif // ESP8266 -#ifdef ESP32 -HardwareSerial *meter_ss[MAX_METERS]; -#endif // ESP32 + // serial buffers, may be made larger depending on telegram lenght #ifndef SML_BSIZ @@ -592,6 +590,229 @@ double sml_median(struct SML_MEDIAN_FILTER* mf, double in) { } #endif + +// ESP32 software serial read only +#ifdef ESP32 +#ifdef USE_ESP32_SW_SERIAL + +#ifndef ESP32_SWS_BUFFER_SIZE +#define ESP32_SWS_BUFFER_SIZE 256 +#endif + + +class SML_ESP32_SERIAL : public Stream { +public: + SML_ESP32_SERIAL(uint32_t uart_index); + virtual ~SML_ESP32_SERIAL(); + bool begin(uint32_t speed, uint32_t smode, int32_t recpin, int32_t trxpin); + int32_t peek(void); + int32_t read(void) override; + size_t write(uint8_t byte) override; + int32_t available(void) override; + void flush(void) override; + void setRxBufferSize(uint32_t size); + void updateBaudRate(uint32_t baud); + void rxRead(void); + using Print::write; +private: + // Member variables + void setbaud(uint32_t speed); + uint32_t uart_index; + int8_t m_rx_pin; + int8_t m_tx_pin; + uint32_t cfgmode; + uint32_t ss_byte; + uint32_t ss_bstart; + uint32_t ss_index; + uint32_t m_bit_time; + uint32_t m_in_pos; + uint32_t m_out_pos; + uint16_t serial_buffer_size; + bool m_valid; + uint8_t *m_buffer; + HardwareSerial *hws; +}; + + +void IRAM_ATTR sml_callRxRead(void *self) { ((SML_ESP32_SERIAL*)self)->rxRead(); }; + +SML_ESP32_SERIAL::SML_ESP32_SERIAL(uint32_t index) { + uart_index = index; + m_valid = true; +} + +SML_ESP32_SERIAL::~SML_ESP32_SERIAL(void) { + if (hws) { + hws->end(); + } else { + detachInterrupt(m_rx_pin); + if (m_buffer) { + free(m_buffer); + } + } +} + +void SML_ESP32_SERIAL::setbaud(uint32_t speed) { + m_bit_time = ESP.getCpuFreqMHz() * 1000000 / speed; +} + + +bool SML_ESP32_SERIAL::begin(uint32_t speed, uint32_t smode, int32_t recpin, int32_t trxpin) { + if (!m_valid) { return false; } + + m_buffer = 0; + if (recpin < 0) { + setbaud(speed); + m_rx_pin = -recpin; + serial_buffer_size = ESP32_SWS_BUFFER_SIZE; + m_buffer = (uint8_t*)malloc(serial_buffer_size); + if (m_buffer == NULL) return false; + pinMode(m_rx_pin, INPUT); + attachInterruptArg(m_rx_pin, sml_callRxRead, this, CHANGE); + m_in_pos = m_out_pos = 0; + hws = nullptr; + } else { + cfgmode = smode; + m_rx_pin = recpin; + m_tx_pin = trxpin; + hws = new HardwareSerial(uart_index); + if (hws) { + hws->begin(speed, cfgmode, m_rx_pin, m_tx_pin); + } + } + return true; +} + +void SML_ESP32_SERIAL::flush(void) { + if (hws) { + hws->flush(); + } else { + m_in_pos = m_out_pos = 0; + } +} + +int32_t SML_ESP32_SERIAL::peek(void) { + if (hws) { + return hws->peek(); + } else { + if (m_in_pos == m_out_pos) return -1; + return m_buffer[m_out_pos]; + } +} + +int32_t SML_ESP32_SERIAL::read(void) { + if (hws) { + return hws->read(); + } else { + if (m_in_pos == m_out_pos) return -1; + uint32_t ch = m_buffer[m_out_pos]; + m_out_pos = (m_out_pos +1) % serial_buffer_size; + return ch; + } +} + +int32_t SML_ESP32_SERIAL::available(void) { + if (hws) { + return hws->available(); + } else { + int avail = m_in_pos - m_out_pos; + if (avail < 0) avail += serial_buffer_size; + return avail; + } +} + +size_t SML_ESP32_SERIAL::write(uint8_t byte) { + if (hws) { + return hws->write(byte); + } + return 0; +} + +void SML_ESP32_SERIAL::setRxBufferSize(uint32_t size) { + if (hws) { + hws->setRxBufferSize(size); + } else { + if (m_buffer) { + free(m_buffer); + } + serial_buffer_size = size; + m_buffer = (uint8_t*)malloc(size); + } +} +void SML_ESP32_SERIAL::updateBaudRate(uint32_t baud) { + if (hws) { + hws->updateBaudRate(baud); + } else { + setbaud(baud); + } +} + +// no wait mode only 8N1 (or 7X1, obis only, ignoring parity) +void IRAM_ATTR SML_ESP32_SERIAL::rxRead(void) { + uint32_t diff; + uint32_t level; + +#define SML_LASTBIT 9 + + level = digitalRead(m_rx_pin); + + if (!level && !ss_index) { + // start condition + ss_bstart = ESP.getCycleCount() - (m_bit_time / 4); + ss_byte = 0; + ss_index++; + } else { + // now any bit changes go here + // calc bit number + diff = (ESP.getCycleCount() - ss_bstart) / m_bit_time; + + if (!level && diff > SML_LASTBIT) { + // start bit of next byte, store and restart + // leave irq at change + for (uint32_t i = ss_index; i <= SML_LASTBIT; i++) { + ss_byte |= (1 << i); + } + uint32_t next = (m_in_pos + 1) % serial_buffer_size; + if (next != (uint32_t)m_out_pos) { + m_buffer[m_in_pos] = ss_byte >> 1; + m_in_pos = next; + } + + ss_bstart = ESP.getCycleCount() - (m_bit_time / 4); + ss_byte = 0; + ss_index = 1; + return; + } + if (diff >= SML_LASTBIT) { + // bit zero was 0, + uint32_t next = (m_in_pos + 1) % serial_buffer_size; + if (next != (uint32_t)m_out_pos) { + m_buffer[m_in_pos] = ss_byte >> 1; + m_in_pos = next; + } + ss_byte = 0; + ss_index = 0; + } else { + // shift in + for (uint32_t i = ss_index; i < diff; i++) { + if (!level) ss_byte |= (1 << i); + } + ss_index = diff; + } + } +} +#endif // USE_ESP32_SW_SERIAL +#endif // ESP32 + +#ifdef ESP32 +#ifndef USE_ESP32_SW_SERIAL +HardwareSerial *meter_ss[MAX_METERS]; +#else +SML_ESP32_SERIAL *meter_ss[MAX_METERS]; +#endif +#endif // ESP32 + + #ifdef ANALOG_OPTO_SENSOR // sensor over ADS1115 with i2c Bus uint8_t ads1115_up; @@ -1398,12 +1619,12 @@ void sml_shift_in(uint32_t meters,uint32_t shard) { void SML_Poll(void) { uint32_t meters; - for (meters=0; metersavailable()) { - sml_shift_in(meters,0); + sml_shift_in(meters, 0); } } } @@ -1555,16 +1776,22 @@ void SML_Decode(uint8_t index) { double vdiff = meter_vars[ind - 1] - dvalues[dindex]; dvalues[dindex] = meter_vars[ind - 1]; double dres = (double)360000.0 * vdiff / ((double)dtime / 10000.0); -#ifdef USE_SML_MEDIAN_FILTER - if (meter_desc_p[mindex].flag & 16) { - meter_vars[vindex] = sml_median(&sml_mf[vindex], dres); - } else { - meter_vars[vindex] = dres; - } -#else - meter_vars[vindex] = dres; -#endif + dvalid[vindex] += 1; + + if (dvalid[vindex] >= 2) { + // differece is only valid after 2. calculation + dvalid[vindex] = 2; +#ifdef USE_SML_MEDIAN_FILTER + if (meter_desc_p[mindex].flag & 16) { + meter_vars[vindex] = sml_median(&sml_mf[vindex], dres); + } else { + meter_vars[vindex] = dres; + } +#else + meter_vars[vindex] = dres; +#endif + } mp=strchr(mp,'@'); if (mp) { mp++; @@ -1573,7 +1800,7 @@ void SML_Decode(uint8_t index) { SML_Immediate_MQTT((const char*)mp, vindex, mindex); } } - dvalid[vindex] = 1; + //dvalid[vindex] = 1; dindex++; } } else if (*mp == 'h') { @@ -2212,7 +2439,9 @@ uint8_t *script_meter; #ifdef SML_REPLACE_VARS +#ifndef SML_SRCBSIZE #define SML_SRCBSIZE 256 +#endif uint32_t SML_getlinelen(char *lp) { uint32_t cnt; @@ -2303,7 +2532,7 @@ void SML_Init(void) { uint8_t *tp = 0; uint16_t index = 0; uint8_t section = 0; - uint8_t srcpin = 0; + int8_t srcpin = 0; uint8_t dec_line = 0; char *lp = glob_script_mem.scriptptr; sml_send_blocks = 0; @@ -2340,7 +2569,7 @@ void SML_Init(void) { } index--; srcpin = strtol(lp,&lp,10); - if (Gpio_used(srcpin)) { + if (Gpio_used(abs(srcpin))) { AddLog(LOG_LEVEL_INFO, PSTR("gpio rx double define!")); dddef_exit: if (script_meter) free(script_meter); @@ -2404,10 +2633,53 @@ dddef_exit: script_meter_desc[index].tsecs = strtol(lp, &lp, 10); if (*lp == ',') { lp++; - char txbuff[256]; +#if 1 + // look ahead + uint16_t txlen = 0; + uint16_t tx_entries = 1; + char *txp = lp; + while (*txp) { + if (*txp == ',') tx_entries++; + if (*txp == SCRIPT_EOL) { + if (tx_entries > 1) { + if (*(txp - 1) != ',' ) { + break; + } + // line ends with , + } else { + // single entry + break; + } + } + txp++; + txlen++; + } + if (txlen) { + script_meter_desc[index].txmem = (char*)calloc(txlen + 2, 1); + if (script_meter_desc[index].txmem) { + // now copy send blocks + char *txp = lp; + uint16_t tind = 0; + for (uint32_t cnt = 0; cnt < txlen; cnt++) { + if (*txp == SCRIPT_EOL) { + txp++; + } else { + script_meter_desc[index].txmem[tind] = *txp++; + tind++; + } + } + } + //AddLog(LOG_LEVEL_INFO, PSTR(">>> %s - %d"), script_meter_desc[index].txmem, txlen); + script_meter_desc[index].index = 0; + script_meter_desc[index].max_index = tx_entries; + sml_send_blocks++; + lp += txlen; + } +#else + char txbuff[SML_SRCBSIZE]; uint32_t txlen = 0, tx_entries = 1; for (uint32_t cnt = 0; cnt < sizeof(txbuff); cnt++) { - if (*lp == SCRIPT_EOL) { + if (*lp == SCRIPT_EOL && *(lp - 1) != ',' ) { txbuff[cnt] = 0; txlen = cnt; break; @@ -2424,12 +2696,12 @@ dddef_exit: script_meter_desc[index].max_index = tx_entries; sml_send_blocks++; } +#endif } } if (*lp == SCRIPT_EOL) lp--; goto next_line; } - #ifdef SML_REPLACE_VARS char dstbuf[SML_SRCBSIZE*2]; Replace_Cmd_Vars(lp, 1, dstbuf,sizeof(dstbuf)); @@ -2518,13 +2790,13 @@ init10: uint8_t cindex=0; // preloud counters for (byte i = 0; i < MAX_COUNTERS; i++) { - RtcSettings.pulse_counter[i]=Settings->pulse_counter[i]; + RtcSettings.pulse_counter[i] = Settings->pulse_counter[i]; sml_counters[i].sml_cnt_last_ts=millis(); } - uint32_t uart_index=2; - for (uint8_t meters=0; meters= 0) { + if (uart_index == 0) { ClaimSerial(); } + uart_index--; + if (uart_index < 0) uart_index = 0; + } +#else meter_ss[meters] = new HardwareSerial(uart_index); - if (uart_index==0) { ClaimSerial(); } + if (uart_index == 0) { ClaimSerial(); } uart_index--; - if (uart_index<0) uart_index=0; + if (uart_index < 0) uart_index = 0; meter_ss[meters]->setRxBufferSize(TMSBSIZ); +#endif // USE_ESP32_SW_SERIAL + #endif // ESP32 -#endif +#endif // SPECIAL_SS SerialConfig smode = SERIAL_8N1; @@ -2612,10 +2895,10 @@ init10: #endif // ESP8266 #ifdef ESP32 meter_ss[meters]->begin(meter_desc_p[meters].params, smode, meter_desc_p[meters].srcpin, meter_desc_p[meters].trxpin); + //meter_ss[meters]->setRxBufferSize(TMSBSIZ); #endif // ESP32 } } - } @@ -2633,7 +2916,7 @@ uint32_t sml_getv(uint32_t sel) { return sel; } uint32_t SML_SetBaud(uint32_t meter, uint32_t br) { - if (meter<1 || meter>meters_used) return 0; + if (meter < 1 || meter > meters_used) return 0; meter--; if (!meter_ss[meter]) return 0; #ifdef ESP8266 @@ -3043,7 +3326,9 @@ bool Xsns53(byte function) { case FUNC_LOOP: SML_Counter_Poll(); if (dump2log) Dump2log(); - else SML_Poll(); + else { + SML_Poll(); + } break; // case FUNC_EVERY_50_MSECOND: // if (dump2log) Dump2log(); diff --git a/tasmota/xsns_62_esp32_mi_ble.ino b/tasmota/xsns_62_esp32_mi_ble.ino index 92fdf4de0..a1627cebe 100644 --- a/tasmota/xsns_62_esp32_mi_ble.ino +++ b/tasmota/xsns_62_esp32_mi_ble.ino @@ -2741,9 +2741,8 @@ void MI32ShowOneMISensor(){ kMI32DeviceType[p->type-1], p->MAC[3], p->MAC[4], p->MAC[5]); } - char SensorTopic[60]; - sprintf(SensorTopic, "tele/tasmota_ble/%s", - id); + char SensorTopic[TOPSZ]; + GetTopic_P(SensorTopic, TELE, (char*)"tasmota_ble", id); MqttPublish(SensorTopic, Settings->flag.mqtt_sensor_retain); //AddLog(LOG_LEVEL_DEBUG,PSTR("M32: %s: show some %d %s"),D_CMND_MI32, MI32.mqttCurrentSlot, ResponseData()); @@ -2868,10 +2867,8 @@ void MI32DiscoveryOneMISensor(){ p->MAC[3], p->MAC[4], p->MAC[5]); } - char SensorTopic[60]; - sprintf(SensorTopic, "tele/tasmota_ble/%s", - id); - + char SensorTopic[TOPSZ]; + GetTopic_P(SensorTopic, TELE, (char*)"tasmota_ble", id); //int i = p->nextDiscoveryData*3; for (int i = 0; i < datacount*3; i += 3){ @@ -3063,7 +3060,7 @@ void MI32ShowTriggeredSensors(){ #endif //USE_HOME_ASSISTANT MI32.option.MQTTType == 1 ){ - char SensorTopic[60]; + char SensorTopic[TOPSZ]; char idstr[32]; const char *alias = BLE_ESP32::getAlias(p->MAC); const char *id = idstr; @@ -3074,7 +3071,7 @@ void MI32ShowTriggeredSensors(){ kMI32DeviceType[p->type-1], p->MAC[3], p->MAC[4], p->MAC[5]); } - snprintf_P(SensorTopic, sizeof(SensorTopic), PSTR("tele/tasmota_ble/%s"), id); + GetTopic_P(SensorTopic, TELE, (char*)"tasmota_ble", id); MqttPublish(SensorTopic, Settings->flag.mqtt_sensor_retain); AddLog(LOG_LEVEL_DEBUG, PSTR("M32: triggered %d %s"), sensor, ResponseData()); XdrvRulesProcess(0); diff --git a/tasmota/xsns_78_ezoo2.ino b/tasmota/xsns_78_ezoo2.ino index ffeea4a86..81a40867e 100644 --- a/tasmota/xsns_78_ezoo2.ino +++ b/tasmota/xsns_78_ezoo2.ino @@ -39,7 +39,7 @@ struct EZOO2 : public EZOStruct { dtostrfd(O2, 2, str); if (json) { - ResponseAppend_P(PSTR(",\"%s\":{\"" D_JSON_O2 "\":%d}" ), name, str); + ResponseAppend_P(PSTR(",\"%s\":{\"" D_JSON_O2 "\":%s}" ), name, str); #ifdef USE_WEBSERVER }else { WSContentSend_PD(HTTP_SNS_O2, name, str); diff --git a/tasmota/xsns_90_hrg15.ino b/tasmota/xsns_90_hrg15.ino index f7ba63721..46c17b28a 100644 --- a/tasmota/xsns_90_hrg15.ino +++ b/tasmota/xsns_90_hrg15.ino @@ -53,8 +53,7 @@ struct RG15 { float rate = 0.0f; } Rg15; -void Rg15Init(void) -{ +void Rg15Init(void) { Rg15.ready = 0; if (PinUsed(GPIO_HRG15_RX) && PinUsed(GPIO_HRG15_TX)) { HydreonSerial = new TasmotaSerial(Pin(GPIO_HRG15_RX), Pin(GPIO_HRG15_TX)); @@ -92,8 +91,7 @@ bool Rg15Poll(void) { while (HydreonSerial->available()) { Rg15ReadLine(rg15_buffer); - AddLog(LOG_LEVEL_DEBUG_MORE,PSTR("%s:" D_JSON_SERIALRECEIVED " = %s"),"HRG", rg15_buffer); - + AddLog(LOG_LEVEL_DEBUG_MORE, PSTR("HRG: Received '%s'"), rg15_buffer); Rg15Process(rg15_buffer); } @@ -102,11 +100,11 @@ bool Rg15Poll(void) { return true; } -bool Rg15ReadLine(char* buffer) -{ +bool Rg15ReadLine(char* buffer) { char c; uint8_t i = 0; uint32_t cmillis = millis(); + buffer[0] = '\0'; while (1) { if (HydreonSerial->available()) { @@ -121,8 +119,7 @@ bool Rg15ReadLine(char* buffer) return false; } } - - buffer[i-2] = '\0'; + if (i > 1) { buffer[i-2] = '\0'; } return true; } @@ -163,14 +160,14 @@ bool Rg15Command(void) { HydreonSerial->flush(); if (send[0] == 'k' || send[0] == 'K' || send[0] == 'o' || send[0] == 'O') { - ResponseCmndDone(); - return serviced; + ResponseCmndDone(); + return serviced; } char rg15_buffer[255]; if (Rg15ReadLine(rg15_buffer)) { - Response_P(PSTR("{\"" D_JSON_SERIALRECEIVED "\":%s\"}"), rg15_buffer); - Rg15Process(rg15_buffer); + Response_P(PSTR("{\"" D_JSON_SERIALRECEIVED "\":\"%s\"}"), rg15_buffer); + Rg15Process(rg15_buffer); } } @@ -184,7 +181,7 @@ void Rg15Show(bool json) } if (json) { - ResponseAppend_P(PSTR(",\"" RG15_NAME "\":{\"" D_JSON_ACTIVE "\":%2_f, \"" D_JSON_EVENT "\":%2_f, \"" D_JSON_TOTAL "\":%2_f, \"" D_JSON_FLOWRATE "\":%2_f}"), &Rg15.acc, &Rg15.event, &Rg15.total, &Rg15.rate); + ResponseAppend_P(PSTR(",\"" RG15_NAME "\":{\"" D_JSON_ACTIVE "\":%2_f,\"" D_JSON_EVENT "\":%2_f,\"" D_JSON_TOTAL "\":%2_f,\"" D_JSON_FLOWRATE "\":%2_f}"), &Rg15.acc, &Rg15.event, &Rg15.total, &Rg15.rate); #ifdef USE_WEBSERVER } else { WSContentSend_PD(HTTP_RG15, &Rg15.acc, &Rg15.event, &Rg15.total, &Rg15.rate); diff --git a/tools/decode-status.py b/tools/decode-status.py index 6e70d8912..c234f8911 100755 --- a/tools/decode-status.py +++ b/tools/decode-status.py @@ -186,7 +186,8 @@ a_setoption = [[ "(Energy) Show phase information", "(Debug) Show heap with logging timestamp", "(Tuya) Allow save dimmer = 0 receved by MCU", - "","", + "(TLS) Use fingerprint validation instead of CA based", + "(Shift595) Invert outputs of 74x595 shift registers", "","","","", "","","","", "","","","" @@ -260,7 +261,7 @@ a_features = [[ "USE_BM8563","USE_ENERGY_DUMMY","USE_AM2320","USE_T67XX", "USE_MCP2515","USE_TASMESH","USE_WIFI_RANGE_EXTENDER","USE_INFLUXDB", "USE_HRG15","USE_VINDRIKTNING","USE_SCD40","USE_HM330X", - "USE_HDC2010","USE_LSC_MCSL","USE_SONOFF_SPM","", + "USE_HDC2010","USE_LSC_MCSL","USE_SONOFF_SPM","USE_SHIFT595", "","","","", "","","","", "","","","" @@ -291,7 +292,7 @@ else: obj = json.load(fp) def StartDecode(): - print ("\n*** decode-status.py v20211201 by Theo Arends and Jacek Ziolkowski ***") + print ("\n*** decode-status.py v20211205 by Theo Arends and Jacek Ziolkowski ***") # print("Decoding\n{}".format(obj)) diff --git a/tools/lv_berry/convert.py b/tools/lv_berry/convert.py index a814af381..86a4b86d4 100644 --- a/tools/lv_berry/convert.py +++ b/tools/lv_berry/convert.py @@ -320,13 +320,14 @@ extern "C" { #endif #include "be_ctypes.h" +#include "be_mapping.h" """) for subtype, flv in lv.items(): print(f"/* `lv_{subtype}` methods */") if subtype in lv_widgets: print(f"#ifdef BE_LV_WIDGET_{subtype.upper()}") - print(f"const lvbe_call_c_t lv_{subtype}_func[] = {{") + print(f"const be_ntv_func_def_t lv_{subtype}_func[] = {{") func_out = {} # used to sort output for f in flv: @@ -361,7 +362,7 @@ print() # print the global map of classes print(f""" // map of clases -const lvbe_call_c_classes_t lv_classes[] = {{""") +const be_ntv_class_def_t lv_classes[] = {{""") for subtype in sorted(lv): # for subtype, flv in lv.items(): @@ -391,7 +392,7 @@ for subtype, flv in lv.items(): if len(c_ret_type) > 1: c_ret_type = "lv." + c_ret_type if c_func_name.endswith("_create"): - c_ret_type = "+" # constructor, init method does not return any value + c_ret_type = "+_p" # constructor, init method does not return any value if subtype in lv_widgets: print(f"#ifdef BE_LV_WIDGET_{subtype.upper()}") print(f" int be_ntv_lv_{subtype}_init(bvm *vm) {{ return be_call_c_func(vm, (void*) &{orig_func_name}, \"{c_ret_type}\", { c_argc if c_argc else 'nullptr'}); }}") @@ -401,8 +402,8 @@ for subtype, flv in lv.items(): print(""" // create font either empty or from parameter on stack -int lvbe_font_create(bvm *vm) { return be_call_c_func(vm, NULL, "+lv_font", ""); } -int lvbe_theme_create(bvm *vm) { return be_call_c_func(vm, NULL, "+lv_theme", ""); } +int lvbe_font_create(bvm *vm) { return be_call_c_func(vm, NULL, "+_p", ""); } +int lvbe_theme_create(bvm *vm) { return be_call_c_func(vm, NULL, "+_p", ""); } """) print() @@ -660,7 +661,7 @@ print("""/******************************************************************** #ifdef USE_LVGL #include "lvgl.h" -#include "be_lvgl.h" +#include "be_mapping.h" #include "lv_theme_openhasp.h" extern int lv0_member(bvm *vm); // resolve virtual members @@ -685,7 +686,7 @@ static int lv_get_ver_res(void) { } /* `lv` methods */ -const lvbe_call_c_t lv_func[] = { +const be_ntv_func_def_t lv_func[] = { """) func_out = {} # used to sort output @@ -728,12 +729,7 @@ const size_t lv_func_size = sizeof(lv_func) / sizeof(lv_func[0]); print(""" -typedef struct be_constint_t { - const char * name; - int32_t value; -} be_constint_t; - -const be_constint_t lv0_constants[] = { +const be_const_member_t lv0_constants[] = { """) lv_module2 = {} diff --git a/tools/lv_gpio/gpio_convert.py b/tools/lv_gpio/gpio_convert.py index dfa3d78f0..6232fd287 100644 --- a/tools/lv_gpio/gpio_convert.py +++ b/tools/lv_gpio/gpio_convert.py @@ -56,7 +56,7 @@ print(" * Generated code, don't edit") print(" *******************************************************************/") print(""" -const be_constint_t lv_gpio_constants[] = { +const be_const_member_t lv_gpio_constants[] = { """) lv_module2 = {}