Skip to content

Commit 31a3fca

Browse files
Merge pull request #19 from Valar-Systems/feat/space-firmware
Spacescope: a third firmware product (live space-data desk monitor)
2 parents cf2d511 + 7cfeb08 commit 31a3fca

14 files changed

Lines changed: 1410 additions & 26 deletions

.github/workflows/firmware.yml

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -29,6 +29,9 @@ jobs:
2929
# FEATURE_EAM product: same boards, EAM monitor firmware, own OTA channel
3030
# (firmware-eam-<slug>.bin -- the slug must match FW_OTA_PREFIX + variant::SLUG).
3131
- { env: blipscope-eam-s3-146, slug: eam-s3-146 }
32+
# FEATURE_SPACE product: same boards, Spacescope firmware, own OTA channel
33+
# (firmware-space-<slug>.bin -- the slug must match FW_OTA_PREFIX + variant::SLUG).
34+
- { env: blipscope-space-s3-146, slug: space-s3-146 }
3235
# - { env: blipscope-lite-s3-128, slug: s3-128 }
3336
# - { env: blipscope-pro-s3-175-amoled, slug: s3-175-amoled }
3437
steps:

CLAUDE.md

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -39,6 +39,10 @@ The radar SKUs are all S3: `blipscope-s3-146` (Waveshare ESP32-S3-Touch-LCD-1.46
3939
- **OTA channel:** `-DFW_OTA_PREFIX="eam-"` makes [OtaUpdater](src/OtaUpdater.cpp) fetch `firmware-eam-<slug>.bin`, so an EAM device never pulls a radar image for the same board. The shared `version.txt` gate is unchanged.
4040
- The config web page is feature-gated in [ConfigurationWebServer.cpp](src/ConfigurationWebServer.cpp) (`#ifdef FEATURE_EAM`): the EAM form + its NVS keys instead of the radar form; the shell (mDNS, `/reset-wifi`, save flag, secret masking) is shared. Adding an EAM SKU = a variant header + an `[env:*]` (with `-DFEATURE_EAM`, the `build_src_filter`, and `FW_OTA_PREFIX`) + a CI row whose slug is `eam-<board>`.
4141

42+
## FEATURE_SPACE — a third product (Spacescope)
43+
44+
`-DFEATURE_SPACE` (set on the `blipscope-space-*` envs) swaps the radar app for **Spacescope** — a desk window onto live space data (ISS, rocket launches, space weather, deep-space probes) — built from the same boards and the same shared infra as the radar and EAM. It compiles **no** radar/aircraft or EAM code: the SPACE env's `build_src_filter` drops the radar-only TUs **and** `src/eam/`, `[common]` drops `src/space/` from the radar builds (and the EAM env drops it too), and [main.cpp](src/main.cpp) picks `SpaceManager` vs `EamManager` vs `AircraftManager` at compile time (same `Initialise/Update/Draw` surface). Everything Spacescope lives in [src/space/](src/space/). The config page gains a `#elif defined(FEATURE_SPACE)` branch alongside the EAM one in [ConfigurationWebServer.cpp](src/ConfigurationWebServer.cpp). OTA channel: `-DFW_OTA_PREFIX="space-"` (its own `firmware-space-<slug>.bin`). It pulls directly from free public space APIs and **bakes in no backend**; the optional `valar-space-feed` backend is the runtime `space-base-url` config (default empty, from the `SPACE_FEED_BASE` flag). **Status: Stage-1 skeleton** — the product gate, config form, OTA channel, and the rotation/touch/brightness shell with a splash + UTC clock are in; the feed client + data screens land in later stages (each = a feed + a `DrawX()` + a `HasData()` case).
45+
4246
## The C3's three hard constraints — read before changing memory, networking, or touch
4347

4448
These applied to the now-**retired C3 Kit** SKU: a **single-core RISC-V** chip with a tight, fragmenting heap — most non-obvious shared code exists to live within that. The board is gone, but its guards stay in the tree (inert on S3, gated by capability flags), so this section stays as reference and a C3 could be revived: **don't "simplify" the guards away.** The S3 SKUs (dual-core + PSRAM) relax all three (full framebuffer, enrichment always-on, touch and network on separate cores) via the variant's capability flags rather than by deleting the guards:

RELEASING.md

Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -51,6 +51,18 @@ These ride the **same** `version.txt` gate (one `FW_VERSION` bump releases radar
5151
and a device only ever downloads its own `<prefix><slug>` binary. Releasing is otherwise identical
5252
— the matrix rows are already in [.github/workflows/firmware.yml](.github/workflows/firmware.yml).
5353

54+
## Spacescope builds — another separate OTA channel
55+
56+
The `blipscope-space-*` envs build a third **product** (Spacescope, `-DFEATURE_SPACE`; see
57+
[CLAUDE.md](CLAUDE.md)) from the same boards. Same arrangement as EAM: `-DFW_OTA_PREFIX="space-"`,
58+
and a CI slug prefixed to match so a Spacescope device never pulls a radar or EAM image:
59+
60+
| env | slug (CI + OTA asset) |
61+
| --- | --- |
62+
| `blipscope-space-s3-146` | `space-s3-146``firmware-space-s3-146.bin` |
63+
64+
Same `version.txt` gate (one `FW_VERSION` bump releases radar, EAM, and Spacescope together).
65+
5466
## Legacy note: the retired C3
5567

5668
The original ESP32-C3 Kit is retired — Blipscope is S3-only going forward. The workflow no

platformio.ini

Lines changed: 39 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -25,10 +25,10 @@ build_flags =
2525
; Shrink ESPAsyncWebServer's per-send buffer from 2x TCP_MSS (2872 B) to 1 KB so it
2626
; fits a fragmented heap on the tightest board; roomier boards are unaffected.
2727
-DASYNC_RESPONCE_BUFF_SIZE=1024
28-
; Default source set: the radar app. The FEATURE_EAM cluster (src/eam/) is a separate
29-
; compile-time product, so it's excluded here; the EAM envs below override this filter to
30-
; pull in src/eam/ and drop the radar-only sources instead.
31-
build_src_filter = +<*> -<eam/>
28+
; Default source set: the radar app. The FEATURE_EAM (src/eam/) and FEATURE_SPACE (src/space/)
29+
; clusters are separate compile-time products, so they're excluded here; the EAM / SPACE envs
30+
; below override this filter to pull in their dir and drop the radar-only sources instead.
31+
build_src_filter = +<*> -<eam/> -<space/>
3232
board_build.partitions = min_spiffs.csv
3333
lib_deps =
3434
lovyan03/LovyanGFX @ 1.2.21
@@ -121,6 +121,41 @@ build_src_filter =
121121
-<AircraftInfoFields.cpp>
122122
-<Logbook.cpp>
123123
-<models/>
124+
-<space/>
125+
126+
; ===================== Spacescope (live space-data monitor) ===========
127+
; A third compile-time PRODUCT from the same repo and boards: -DFEATURE_SPACE swaps the radar app
128+
; for Spacescope (src/space/) -- a desk window onto ISS / launches / space weather / deep-space
129+
; probes. Reuses all the shared infra (display, Wi-Fi, web config, storage, HTTP/TLS, OTA, ntfy)
130+
; but NOT the radar/aircraft/ADS-B code or the EAM cluster, which build_src_filter strips.
131+
; FW_OTA_PREFIX puts it on its own OTA channel (firmware-space-<slug>.bin). It pulls directly from
132+
; free public space APIs and bakes in NO backend; the optional valar-space-feed backend (Phase 3)
133+
; is the runtime "space-base-url" config, defaulting to the SPACE_FEED_BASE flag (empty by default).
134+
; Runs on the S3 1.46" AMOLED.
135+
[env:blipscope-space-s3-146]
136+
extends = common
137+
board = esp32-s3-devkitc-1
138+
board_build.arduino.memory_type = qio_opi
139+
board_build.flash_size = 16MB
140+
board_upload.flash_size = 16MB
141+
board_build.partitions = default_16MB.csv
142+
build_flags =
143+
${common.build_flags}
144+
-DBLIPSCOPE_VARIANT_S3_146
145+
-DFEATURE_SPACE
146+
-DFW_OTA_PREFIX=\"space-\"
147+
-DBOARD_HAS_PSRAM
148+
-DARDUINO_USB_MODE=1
149+
-DARDUINO_USB_CDC_ON_BOOT=1 ; native USB-CDC: upload + monitor over the USB-C port
150+
build_src_filter =
151+
+<*>
152+
-<AircraftManager.cpp>
153+
-<MqttPublisher.cpp>
154+
-<SpecialAircraft.cpp>
155+
-<AircraftInfoFields.cpp>
156+
-<Logbook.cpp>
157+
-<models/>
158+
-<eam/>
124159

125160
; ===================== Assembled S3 tiers (TODO) ======================
126161
; Added at hardware bring-up: each needs a variant header in include/variants/

0 commit comments

Comments
 (0)