diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index be9a6e59..a734bbf8 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -35,3 +35,14 @@ jobs: - name: Build CrossPoint run: pio run + + - name: Upload Firmware Artifacts + if: github.event_name == 'pull_request' + uses: actions/upload-artifact@v4 + with: + name: firmware-pr-${{ github.event.pull_request.number }} + path: | + .pio/build/default/firmware.bin + .pio/build/default/bootloader.bin + .pio/build/default/partitions.bin + retention-days: 7 diff --git a/.github/workflows/manual-build.yml b/.github/workflows/manual-build.yml new file mode 100644 index 00000000..1a07a7c3 --- /dev/null +++ b/.github/workflows/manual-build.yml @@ -0,0 +1,47 @@ +name: Manual Build Firmware + +on: + workflow_dispatch: + inputs: + branch: + description: 'Branch to build' + required: true + default: 'claude/fix-firmware-bug-fVdvb' + +jobs: + build: + runs-on: ubuntu-latest + + steps: + - uses: actions/checkout@v6 + with: + ref: ${{ github.event.inputs.branch }} + submodules: recursive + + - uses: actions/cache@v5 + with: + path: | + ~/.cache/pip + ~/.platformio/.cache + key: ${{ runner.os }}-pio + + - uses: actions/setup-python@v6 + with: + python-version: '3.14' + + - name: Install PlatformIO Core + run: pip install --upgrade platformio + + - name: Build CrossPoint + run: pio run -e default + + - name: Upload Firmware Artifact + uses: actions/upload-artifact@v4 + with: + name: crosspoint-firmware-${{ github.event.inputs.branch }} + path: | + .pio/build/default/bootloader.bin + .pio/build/default/firmware.bin + .pio/build/default/firmware.elf + .pio/build/default/partitions.bin + retention-days: 7 diff --git a/src/activities/network/CrossPointWebServerActivity.cpp b/src/activities/network/CrossPointWebServerActivity.cpp index dde05614..e3d4ddd3 100644 --- a/src/activities/network/CrossPointWebServerActivity.cpp +++ b/src/activities/network/CrossPointWebServerActivity.cpp @@ -138,7 +138,8 @@ void CrossPointWebServerActivity::onNetworkModeSelected(const NetworkMode mode) // STA mode - launch WiFi selection Serial.printf("[%lu] [WEBACT] Turning on WiFi (STA mode)...\n", millis()); WiFi.mode(WIFI_STA); - + delay(100); // Allow WiFi hardware to initialize before proceeding + state = WebServerActivityState::WIFI_SELECTION; Serial.printf("[%lu] [WEBACT] Launching WifiSelectionActivity...\n", millis()); enterNewActivity(new WifiSelectionActivity(renderer, mappedInput, @@ -186,6 +187,7 @@ void CrossPointWebServerActivity::startAccessPoint() { // Configure and start the AP WiFi.mode(WIFI_AP); delay(100); + WiFi.setSleep(false); // Disable WiFi sleep immediately to prevent crashes // Start soft AP bool apStarted;