Skip to content

Latest commit

Β 

History

History
47 lines (32 loc) Β· 2.28 KB

File metadata and controls

47 lines (32 loc) Β· 2.28 KB

Contributing to FPV Dashboard

Thanks for your interest! This project controls real hardware (flight controllers, radios), so contributions follow a few safety-driven rules.

Getting started

git clone https://github.com/SoCloseSociety/radiomaster.git
cd radiomaster
npm install
npm run dev        # http://localhost:3000

No hardware is required for most development: every tab has an empty/disconnected state, and the protocol/template/validation libraries are covered by unit tests with a mocked serial port.

Before you open a PR

All three must pass locally (CI enforces them):

npm run lint   # ESLint (eslint-config-next 16, React Compiler rules)
npm test       # Vitest unit tests
npm run build  # Next.js production build

Hardware safety rules (non-negotiable)

These encode real incidents documented in tasks/lessons.md:

  1. Never bypass src/lib/api-guards.ts. Every Betaflight CLI command sent to a flight controller goes through its allowlist. motor values are capped at a safe test throttle, and dfu/erase/bare defaults are rejected.
  2. One Save Rule. Generated Betaflight CLI batches must contain exactly one save, as the last command.
  3. EdgeTX writes go through src/lib/edgetx-injector.ts. Model files must be modelN.yml and listed in MODELS/models.yml β€” anything else is invisible to the radio.
  4. Never leave the FC in CLI mode. CLI mode blocks arming; sendBetaflightCLI guarantees an exit and any new code path must too.
  5. Backup before destructive SD operations.

If a PR touches src/lib/msp-protocol.ts, betaflight-cli.ts, config-templates.ts or edgetx-injector.ts, please explain in the PR description how you verified it (unit tests at minimum; hardware read-back if you have the gear).

Code style

  • TypeScript strict, no any
  • Files kebab-case.ts, components PascalCase, constants UPPER_SNAKE_CASE
  • UI strings are in French (the dashboard's audience), code comments in English or French
  • Match the existing patterns: API routes return { success, ...payload } with proper HTTP status codes

Reporting bugs

Use the issue templates. For hardware-related bugs, include: OS version, radio model + EdgeTX version, FC board + Betaflight version, and the dashboard's API response if visible.