Skip to content

Cheat Sheet

greghulette edited this page Jul 28, 2026 · 1 revision

Cheat Sheet

The Cheat Sheet is a one-click, fully self-contained HTML page the config tool builds from the config you currently have loaded. It documents what every button, tap, switch, and knob does in each mode, embeds a tappable snapshot of your transmitter diagram, and can be saved as HTML, printed to PDF, or shared to your phone via a QR code.

Because it is a pure function of the loaded config, the sheet works entirely offline — the only thing that ever reaches the network is the optional QR share.


Overview

The Cheat Sheet reuses the same actionSummary() code the config tool draws the assignment UI with, so every description on the sheet matches what you configured, line for line. The generated page is a complete standalone <!doctype html> document with inlined CSS and JavaScript and no external CSS/JS dependencies (only the QR-image service is fetched, and only when you press Share). It carries its own inline script for the control popups, zoom, save, and share — it cannot call back into the config tool.

Use it to:

  • Print or PDF a field reference card of your control layout.
  • Pull the layout up on your phone at the field via a QR link.
  • Hand a plain-language "what does what" card to someone flying the droid.

⚠️ The sheet is a snapshot of the config currently loaded in the tool, not the live board. There is no live refresh — connect and pull the config (or import it) first, and regenerate after any change.


Generating one

In the config tool header, click 📋 Cheat Sheet. The sheet builds from the current config and opens in a new browser tab (it is served as a Blob URL, so nothing is written to disk yet).

  • If your browser blocks the pop-up, you get an alert asking you to allow pop-ups for the config tool, then click the button again.
  • The sheet always reflects the config loaded/edited in the tool at that moment. Connect over USB or Via-WCB and pull the config, or import a saved config, so the sheet is current. See Connecting.

The Blob URL is revoked ~60 s after opening; save or share the sheet if you want to keep it.


What's on the sheet

The sheet is a stack of card sections, each of which is omitted when it has nothing to show. If every trigger is empty it prints No triggers configured yet. Sections render in this order:

Section Contents
Transmitter Interactive snapshot of your TX diagram (see below). Only appears if the TX diagram is present.
Buttons Grouped by mode, one table per mode, columns Single tap / Double tap / Triple tap.
Switches One row per switch, columns Down / Mid / Up.
Knobs · Sliders · Joysticks Columns Control / Function / Outputs.
New-peer event The actions that fire when a new WCB joins the mesh.
Sequences · Animations Reverse index of recorded clips → where they are triggered.

Buttons are enumerated across modes 1–3 and all 36 matrix slots (21 physical + 15 logical). Mode headings read SW Down (Mode 1), SW Mid (Mode 2), SW Up (Mode 3). Only slots with assigned actions show a row.

Knob outputs describe what a knob drives, not its endpoint µs/volume ranges (that setup detail lives in the config tool). An HCR-volume knob shows V volume / A volume / B volume; any other knob shows Maestro <target> · Ch<channel>. A reversed knob is tagged (reversed), and a mode-aware knob lists its outputs per mode (M1: / M2: / M3:).

Sequences · Animations scans every button tap-tier, switch position, and the new-peer event for Record / Play actions and lists each clip name against every trigger that fires it. See Record and Replay.

Command summaries in the Commands view come straight from actionSummary(), e.g. WCB2: <cmd>, WCB*: <cmd>, Maestro 1: …, HCR …(…), MP3 … <track>, Play "wave", Record (toggle), Stop, WLED: <cmd>. An action's own inline note is appended in italics. For the full vocabulary see Actions Reference and WLED and HCR Audio.

On a phone the tables reflow: the header row is dropped and each row becomes a stacked card with the column name printed above each value.


Interactive transmitter diagram

Under Transmitter, the sheet embeds a snapshot of the live TX diagram — the model currently shown in the tool. Every control zone stays tappable:

  • Tap any button, switch, or knob to pop up its assignments in a modal. Popups respect the current notes/commands view. Press Escape or tap outside to close.
  • Only the controls the active transmitter model's diagram actually contains get popups — the popup content is precomputed at build time from the diagram's control zones.

The snapshot is built by deep-cloning the live diagram and flattening its computed styles inline, so it renders correctly without the config tool's stylesheet. If the transmitter diagram is not present when the sheet is built, there is no Transmitter section and no tap targets. See Transmitter Setup.

Zoom (scoped to the diagram box, which scrolls):

Control Effect
Zoom out (quarter steps)
Fit Reset to 1× (full width)
+ Zoom in (quarter steps)

Zoom is clamped to 1×–4×; Fit never zooms below full width. At 1× the diagram is full width (max 620 px); above 1× it scales inside a scrollable box (max height 82 vh). On touch devices you can also pinch-to-zoom inside the diagram box (iOS gesture events where available, two-finger distance elsewhere). On desktop only the −/Fit/+ buttons zoom — there is no wheel zoom.


Notes vs Commands view

Every trigger cell carries two views at once: a Commands view (the full action summaries) and a plain-language Notes view (your per-tier caption, falling back to the commands text when you haven't written one). The rightmost toolbar button toggles the whole sheet — including the tap popups — between the two, flipping its own label between Show notes and Show commands.

If you authored any per-tier note, the sheet opens in Notes view by default and the toggle reads Show commands; otherwise it opens in Commands view and the toggle reads Show notes.

Authoring the notes: each button tap-tier and switch position has a Note (for the cheat sheet) field in the action editor (placeholder "Plain-language caption — e.g. Happy greeting"). See Action Editor and Command Library.

Notes are capped at 19 characters — the field enforces maxLength=19, and anything longer is truncated on save. The cap mirrors the firmware's RcTier.note[20] storage (19 chars + null terminator); notes round-trip through the config as t<N>note (buttons) and p<N>note (switches).


Saving and printing

The generated sheet's own toolbar has four buttons: 📥 Save, 🖨 Save as PDF, 📱 Share (QR), and the notes/commands toggle. Print hides the toolbar and any open popup automatically.

  • 📥 Save — when the sheet is served over http/https (i.e. you opened it from a relay link on your phone), it downloads through the relay's ?dl route as a real file. When it was opened locally from the config tool (a blob: URL), it falls back to a client-side download of a self-contained HTML file named NaviCore_CheatSheet.html.
  • 🖨 Save as PDF — opens your browser's print dialog. The toolbar and popups are hidden in print, so you get a clean card.

Share via QR

📱 Share (QR) uploads the sheet to a self-hosted relay and shows a QR code plus a short link you can scan on your phone.

  1. The button POSTs the page's own HTML to the relay endpoint baked into the sheet (with the X-CS-Token header if a token is set).
  2. The relay stores it behind a random link and returns that link.
  3. The sheet renders a QR image of the link (from api.qrserver.com) in a modal, alongside the raw link and an "Auto-deletes in ~1 day" notice.
  4. Scan it on your phone to open the sheet, then tap the phone page's 📥 Save to download the file locally (that phone Save uses the relay's ?dl attachment route).

If the upload fails, the modal tells you to fall back to Save HTML and AirDrop / email it instead. If the endpoint was never configured (still the REPLACE-ME placeholder), the button shows "QR upload is not set up for this build. Use Save HTML instead."

This build ships with the relay live at https://navicore-cheatsheet.greg-hulette.workers.dev, so Share (QR) works out of the box. The share token is not a secret — it ships in the public config tool and in every generated sheet, and is only a bot speed-bump. The real abuse guards live in the relay (per-IP rate limit, size cap, 24 h expiry).


The relay Worker

Share (QR) uploads to a single Cloudflare Worker the project owner hosts once for everyone (tools/cheatsheet-relay-worker.js). It is CORS-open and account-free for end users.

Endpoints:

Method Route Behavior
POST / Store the uploaded HTML under a random key; return { link, expiresInSeconds }.
GET /<key> Serve the stored HTML as text/html (Cache-Control: no-store).
GET /<key>?dl Same, plus Content-Disposition: attachment; filename="NaviCore_CheatSheet.html" — the phone Save route.
OPTIONS any CORS preflight.

Limits and guards:

Constant Value Meaning
MAX_BYTES 1 MiB (1024*1024) Uploads over 1 MB are rejected 413.
TTL_SECONDS 24 h Links auto-delete after ~1 day.
RATE_MAX / RATE_WINDOW 20 per 1 h Per-IP upload cap; over it returns 429.
KEY_LEN 64 Max lookup path length.

CORS is open (*) for POST, GET, OPTIONS with allowed headers Content-Type, X-CS-Token. POST guards: missing KV binding → 500; bad/absent X-CS-Token when UPLOAD_TOKEN is set → 403; over the rate limit → 429; Content-Length or body over 1 MB → 413; empty body → 400. Stored keys are a randomUUID with dashes stripped, under KV key cs:<key>, with a 24 h expirationTtl.

Edge-propagation retry. Right after an upload, KV can take a few seconds to reach the edge your phone hits. Rather than a hard 404, an unknown key serves a small retry page that auto-reloads up to 8 times at 1.5 s intervals before showing "This cheat-sheet link has expired or does not exist." GET keys are validated against /^[a-z0-9]+$/i and length ≤ 64.


One-time setup for owners

If you host your own build of the config tool, you set the relay up once (~5 min, Cloudflare free tier):

  1. Deploy tools/cheatsheet-relay-worker.js as a Cloudflare Worker (e.g. navicore-cheatsheet).
  2. Create a KV namespace and bind it to the Worker under the variable name CS.
  3. (Recommended) Add an UPLOAD_TOKEN secret to the Worker.
  4. In config_tool/index.html, set CS_QR_ENDPOINT to your Worker URL and CS_QR_TOKEN to the same token.

Leaving the REPLACE-ME placeholder in CS_QR_ENDPOINT keeps the 📱 Share (QR) button in "not set up" mode — Save HTML and Save as PDF still work.

Free-tier headroom is large (each upload is ~2 KV writes), so a single Worker comfortably serves many droid builders.


Gotchas and limitations

  • It's a snapshot, not the live board. Regenerate after any config change — there is no live refresh.
  • Share (QR) needs the relay. It only works while the configured Worker and its KV namespace exist. If they go away, QR fails and you fall back to Save HTML.
  • The QR image comes from an external service. The device showing the modal needs internet to render the QR from api.qrserver.com; if the image fails to load it is hidden, but the raw link is still shown.
  • The share token is not a secret. It ships in the public tool and in every sheet. The relay's rate limit, size cap, and 24 h TTL are the real guards.
  • Shared links expire after ~24 h. Just after upload, the phone may briefly see a "Loading…" page that auto-reloads a few times while KV propagates.
  • Save's ?dl route only fires over http/https. Opened locally from the config tool (a blob: URL), 📥 Save silently uses a client-side download instead — same file, different path.
  • No Transmitter section without the diagram. The interactive diagram only appears if the TX diagram is present when the sheet is built, and only controls that model's diagram actually contains get tap popups.
  • Zoom is 1×–4×, Fit resets to full width, and desktop has no wheel zoom — only the −/Fit/+ buttons and touch pinch.
  • Notes are truncated to 19 characters to fit the firmware's caption storage.

See also: Config Tool Guide · Action Editor and Command Library · Record and Replay · Actions Reference · Transmitter Setup · Setup Guide

Clone this wiki locally