Merge pull request #61 from Hoggormino/esp-worker-url

ESP32: make the worker URL a build option instead of a source edit
This commit is contained in:
I12BP8
2026-09-17 17:16:57 +02:00
committed by GitHub
4 changed files with 33 additions and 8 deletions
+1 -1
View File
@@ -60,7 +60,7 @@ Only test tags you own or are allowed to test.
- **TagTinker Image Prep (web):** Single-file, dependency-free HTML page that lists every supported tag profile, runs a full image pipeline (tone, contrast, detail, sharpen, dither, photo-grade Oklab 3-colour quantisation) and exports a Flipper-ready BMP. Hosted at **[i12bp8.github.io/TagTinker](https://i12bp8.github.io/TagTinker/)** (source: `web-image-prep/`).
- **Drop-folder image flow:** Drop a prepared BMP into `apps_data/tagtinker/dropped/` on the Flipper SD card, then open `Targeted Payloads → <tag> → Set Image` and pick it. The Flipper rescales the 1-bit and two-plane BMPs that the image preparer exports, so one file can be sent to graphics tags of other sizes and to any page. Type 1626 (SmartTAG Color 2.6) targets only accept files up to 24 KB.
- **NFC Tag Scan:** Add a target by scanning the tag's NFC chip instead of typing its barcode. This works when the tag's NFC data carries an ID TagTinker can decode; otherwise use `+ Type Barcode`.
- **WiFi Plugins (optional):** Plug a Flipper WiFi Dev Board (ESP32-S2) into the GPIO header to unlock live, network-rendered tag designs — crypto price cards, weather tiles, identicons, and more — auto-discovered by the FAP. New plugins live entirely on the cloud worker; the Flipper firmware never has to be re-flashed to add one.
- **WiFi Plugins (optional):** Plug a Flipper WiFi Dev Board (ESP32-S2) into the GPIO header to unlock live, network-rendered tag designs — crypto price cards, weather tiles, identicons, and more — auto-discovered by the FAP. New plugins live entirely on the cloud worker; the Flipper firmware never has to be re-flashed to add one. The dev board firmware talks to the worker named by `CONFIG_TT_CLOUD_URL`, so you can point it at your own deployment of `cloud-plugins/` instead.
<img alt="image" src="https://raw.githubusercontent.com/i12bp8/TagTinker/refs/heads/main/PXL_20260427_092219442.jpg" />
- Display text and custom images.
+4 -3
View File
@@ -3,6 +3,7 @@ main = "src/index.ts"
compatibility_date = "2024-09-23"
# `npm run deploy` will publish to <name>.<account-subdomain>.workers.dev.
# The dev board firmware has no runtime URL setting yet. To use your own
# deployment, set TT_CLOUD_DEFAULT_URL in esp32-wifi-fw/main/cloud_client.h,
# then rebuild and reflash the ESP32-S2.
# The dev board firmware has no runtime URL setting. To use your own
# deployment, set CONFIG_TT_CLOUD_URL (idf.py menuconfig, under TagTinker,
# or in esp32-wifi-fw/sdkconfig.defaults), then rebuild and reflash the
# ESP32-S2.
+18
View File
@@ -0,0 +1,18 @@
menu "TagTinker"
config TT_CLOUD_URL
string "Cloud worker base URL"
default "https://tagtinker.jhackerr.workers.dev"
help
Base URL of the Cloudflare Worker that serves /plugins and /render
for the WiFi Plugins feature.
Point this at your own deployment (see cloud-plugins/) if you would
rather not send plugin parameters to someone else's worker. Set it
with `idf.py menuconfig` under TagTinker, or put
CONFIG_TT_CLOUD_URL="https://your-worker.example.workers.dev" in
sdkconfig.defaults, then rebuild and reflash the board.
No trailing slash.
endmenu
+10 -4
View File
@@ -2,10 +2,11 @@
* Cloud plugin client.
*
* Talks to the TagTinker Cloudflare Worker that hosts plugin manifests
* and renders. The base URL is TT_CLOUD_DEFAULT_URL below unless NVS
* already holds one. cloud_client_set_url() can store a different URL, but
* nothing calls it yet, so pointing the board at another worker currently
* means editing TT_CLOUD_DEFAULT_URL and reflashing.
* and renders. The base URL comes from CONFIG_TT_CLOUD_URL, which is set
* with `idf.py menuconfig` under TagTinker or in sdkconfig.defaults, unless
* NVS already holds one. cloud_client_set_url() can store a different URL
* at run time, but nothing calls it yet, so changing worker means
* rebuilding and reflashing.
*
* GET <base>/plugins -> JSON manifest list
* GET <base>/render/<id>?...-> binary framebuffer (see worker docs)
@@ -21,8 +22,13 @@
#include <stdbool.h>
#include <stdint.h>
#include <stddef.h>
#include "sdkconfig.h"
#ifdef CONFIG_TT_CLOUD_URL
#define TT_CLOUD_DEFAULT_URL CONFIG_TT_CLOUD_URL
#else
#define TT_CLOUD_DEFAULT_URL "https://tagtinker.jhackerr.workers.dev"
#endif
/* Persisted base URL (no trailing slash). */
const char* cloud_client_url(void);