Skip to content
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 2 additions & 0 deletions .gitattributes
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
# Auto detect text files and perform LF normalization
* text=auto
592 changes: 592 additions & 0 deletions .github/AGENTS.md

Large diffs are not rendered by default.

22 changes: 22 additions & 0 deletions .github/ISSUE_TEMPLATE/bug-report---.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,22 @@
---
name: "Bug report \U0001F41E"
about: Create a bug report
labels: bug

---

## Describe the bug
* A clear and concise description of what the bug is.

### Steps to reproduce
* Steps to reproduce the behavior.

### Expected behavior
* A clear and concise description of what you expected to happen.

### Environment
- OS: [e.g. Arch Linux]
- Other details that you think may affect.

### Additional context
* Add any other context about the problem here.
17 changes: 17 additions & 0 deletions .github/ISSUE_TEMPLATE/feature-request---.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,17 @@
---
name: "Feature request \U0001F680"
about: Suggest an idea
labels: enhancement

---

## Summary
* Brief explanation of the feature.

### Basic example
* Include a basic example or links here. Photos and diagrams are great!

### Motivation
* _Why are we doing this?_
* _What use cases does it support?_
* _What is the expected outcome?_
26 changes: 26 additions & 0 deletions .github/PULL_REQUEST_TEMPLATE.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,26 @@
## What does this PR do?

<!-- A clear, concise description of the change. -->

## Why?

<!-- Context, motivation, or link to the issue this fixes. -->
<!-- Closes #000 -->

## How was it tested?

<!-- How did you verify this works? Manual testing, unit tests, etc. -->

## Screenshots / recordings

<!-- If there's a visual change, show it. Delete this section if not applicable. -->

## Anything to call out?

<!-- Breaking changes, follow-up work needed, decisions made, etc. -->

## Checklist

- [ ] Tested locally
- [ ] No debug/temp code left in
- [ ] Docs updated if needed
34 changes: 34 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -31,3 +31,37 @@ wled-update.sh
/wled00/wled00.ino.cpp
/wled00/html_*.h
/wled00/js_*.h
### DPX KICAD GIT IGNORE v0.5.4
# Generic backup files
*~
\#*
.\#*
# Any dir that ends in -old or some that start wit zz
**/*_old/**
**/zz_reference/**
**/ZZ_IGNORE/**
**/zz_archive/**
# other stuff
**/.DS_Store
*.gsheet
##########------ KICAD SPECIFIC STUFF ------######
# KiCad backup files
*.bak
*.bck
*.kicad_pcb-bak
**/*.kicad_pcb-bak
**/*-backups/*.zip
**/*-backups/**
*-backups/**
**/template-inspiration/**
# KiCad generated files
*.erc
*.net
*-cache.lib
*-rescue.lib
*.lck
# all the footprints cache
fp-info-cache
*/fp-info-cache
# kicad local profile
*.kicad_prl
1 change: 1 addition & 0 deletions AGENTS.md
Original file line number Diff line number Diff line change
Expand Up @@ -234,6 +234,7 @@ No automated linting is configured. Match existing code style in files you edit.
## General Rules

- Important: Repository language is **English**. This applies to source code (including comments), commit messages and any kind of documentation for developer or users.
- **Check if WLED already does it before implementing it in a usermod.** WLED has built-in handling for: buttons, NTP time sync, MQTT, HTTP API, OTA, effects, segments, presets, and more. Adding parallel implementations will fight WLED and cause double-actions, wrong state, and bugs. Always check `wled00/button.cpp`, `wled00/ntp.cpp`, `wled00/fcn_declare.h`, and the Usermod base class hooks (`handleButton()`, `connected()`, `onMqttConnect()`, etc.) before writing new handling code. Use WLED's internal APIs (`toggleOnOff()`, `stateUpdated()`, `localTime`, `hour()`, `minute()`) rather than reimplementing the same functionality.
- The `docs/` folder is for developer/contributor information (coding conventions, architecture, etc.). User documentation is maintained in the [wled/WLED-Docs](https://github.com/wled/WLED-Docs) repository.
- Never edit or commit auto-generated `wled00/html_*.h` / `wled00/js_*.h`.
- When updating an existing PR, retain the original description. Only modify it to ensure technical accuracy. Add change logs after the existing description.
Expand Down
111 changes: 111 additions & 0 deletions ARCHITECTURE.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,111 @@
# dpx_tc002 — Architecture & Decisions

**Date:** 2026-07-17
**Status:** Firmware repo pending setup

---

## Repo Structure

| Repo | What it is |
|------|------------|
| `dpx_tc002` | Product repo — hardware, docs, tools, this file |
| `dpx_tc002_frm` | Firmware — fork of `wled/WLED` (MIT), separate GitHub repo |
| `dpx_tc001/dpx_reference` | Reference only — AWTRIX-derived, do not copy license-unsafe files |

`dpx_tc002_frm` is a clean fork of WLED mainline (`wled/WLED`, `main` branch). No nested git repos, no submodules.

---

## Why WLED Fork (not AWTRIX)

dpx_tc001 was a fork of AWTRIX 3 (CC BY-NC-SA 4.0) — that license blocks commercial use.
dpx_tc002_frm is a WLED fork (MIT) — commercially clean, no share-alike requirement.

### Why mainline WLED and not MoonModules/WLED-MM

MoonModules adds 2D effects and experimental features, but dpx_tc002 writes its own display layer on top. The extra effect catalog adds maintenance burden with no benefit. Mainline 2D matrix support is sufficient for a 32×8 pixel array.

---

## What dpx_tc002_frm Will Contain

Full WLED source with one custom usermod added:

**`usermods/dpx_matrix/`** — original work, MIT:
- 5×7 pixel bitmap font (new — NOT the AWTRIX font)
- Text rendering + scrolling (`renderText`, `renderScroll`)
- App loop system (named display slots, auto-rotation timer)
- Notification queue (interrupts loop, auto-dismisses)
- OSC receiver on UDP port 4210 — d3 disguise integration, `/tc` timecode
- HTTP API matching dpx_tc001 contract (`/api/custom`, `/api/notify`, `/api/tc`, etc.)
- Web UI pages served from PROGMEM: `/ctrl`, `/browse`, `/api-ref`
- TC display with frame-accurate progress bar (two render modes)
- 3 indicator pixels (corner dots, addressable via `/api/indicator1/2/3`)
- dev.json persistence (temp offsets, LDR config, TC dwell settings)
- OSC Listener Registry (d3 monitoring path → display channel mappings)

---

## What Gets Stripped / Disabled

Handled via compile-time flags in `platformio.ini` — no source deletion needed:

```ini
-D WLED_DISABLE_ALEXA
-D WLED_DISABLE_LOXONE
-D WLED_DISABLE_INFRARED
-D WLED_DISABLE_HUESYNC
-D WLED_DISABLE_ADALIGHT
-D WLED_DISABLE_ESPNOW
```

Most of the 100+ WLED effects can be pruned later if flash is tight. The WLED stock web UI (`wled00/data/`) is superseded by the custom pages served from the usermod — keep it in but redirect `/` to `/ctrl`.

---

## Hardware Target — Ulanzi TC001

ESP32-WROOM-32D · 240MHz · 4MB flash (1.75MB app + 256KB LittleFS) · CH340 USB-serial

| GPIO | Function |
|------|----------|
| 32 | LED matrix data (256× WS2812B, 32 cols × 8 rows) |
| 26 | Left button (active low) |
| 27 | Middle button (active low, inverted) |
| 14 | Right button (active low) |
| 15 | Passive buzzer — RTTTL via PWM |
| 34 | Battery ADC (read-only voltage divider) |
| 35 | LDR — auto-brightness (GL5516) |
| 21 / 22 | I²C SDA / SCL — SHT3x temp + humidity (addr 0x44) |
| 23 / 18 | DFPlayer Mini RX / TX (optional) |

**Matrix layout:** row-major, left-to-right, top-to-bottom. Pixel index = `row * 32 + col`.

---

## License Boundaries

**Do NOT copy (AWTRIX-derived, CC BY-NC-SA 4.0):**
- `AwtrixFont.h`
- `MatrixDisplayUi.cpp`
- `MQTTManager.cpp`
- The `/setup` page from `htmls.h`

**Safe to port (original work from dpx_tc001 session):**
- `tools/ltc_osc_bridge/` — copy verbatim, 100% original Python, MIT-clean
- `/ctrl`, `/browse`, `/api-ref` HTML pages from `htmls.h`
- OSC `handleOSC()` logic from `ServerManager.cpp`

---

## Next Steps

1. Fork `wled/WLED` → `dubpixel/dpx_tc002_frm` on GitHub, clone locally
2. Update `dpx_tc002.code-workspace` to include `dpx_tc002_frm` as the firmware folder
3. Verify WLED builds clean: `npm ci && npm run build && pio run -e esp32dev`
4. Create `usermods/dpx_matrix/` skeleton (header files only, empty stubs)
5. Configure `platformio.ini` env for Ulanzi TC001 with `custom_usermods = dpx_matrix`
6. Build Phase 1 — font + text rendering

See `⊘ dpx_reference/dpx_tc002.md` for the full phased build plan (Phases 1–8).
59 changes: 59 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -1626,3 +1626,62 @@
- Created changelog.md - make tracking changes to code easier
- Merged pull request #766 by @pille: Fix E1.31 out-of sequence detection

# Changelog
All notable changes to this project will be documented in this file.
The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.0.0/),
and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0.html).
## [Unreleased]
### Added
-
### Changed
-
### Deprecated
-
### Removed
-
### Fixed
-
### Security
-
---
## [0.1.0] - YYYY-MM-DD
- Initial release
- Core functionality implementation
---
## Version Guidelines
### Semantic Versioning (MAJOR.MINOR.PATCH)
- **MAJOR**: Breaking changes, incompatible API modifications
- **MINOR**: New features, backwards-compatible additions
- **PATCH**: Bug fixes, documentation updates, typos
### Change Categories
- **Added**: New features or capabilities
- **Changed**: Changes to existing functionality
- **Deprecated**: Features marked for future removal (still working)
- **Removed**: Removed features or functionality
- **Fixed**: Bug fixes
- **Security**: Security patches or vulnerability fixes
### Example Entry Format
```markdown
## [1.2.0] - 2026-03-15
- New authentication system with JWT tokens
- Export functionality for CSV and JSON formats
- Dark mode toggle in user preferences
- Improved database query performance by 40%
- Updated UI library from v2.1 to v3.0
- Fixed memory leak in background worker process
- Corrected timezone handling in date picker component
- Patched XSS vulnerability in user input validation
```
### Version Comparison Links
Add these at the bottom of the file (replace with your repo owner/name):
[Unreleased]: https://github.com/owner/repo/compare/v0.1.0...HEAD
[0.1.0]: https://github.com/owner/repo/releases/tag/v0.1.0
---
## Tips for Maintaining This Changelog
1. **Update as you work**: Add entries when making changes, not at release time
2. **Keep it scannable**: Use clear, concise descriptions
3. **Link to issues/PRs**: Include `(#123)` references when relevant
4. **Date format**: Use ISO 8601 (YYYY-MM-DD)
5. **Group by type**: Keep all Added items together, all Fixed items together, etc.
6. **User perspective**: Write what changed for users, not implementation details
7. **Unreleased section**: Keep active changes here, move to version section on release
4 changes: 4 additions & 0 deletions Gemfile
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
source "https://rubygems.org"

gem "github-pages", group: :jekyll_plugins
gem "jekyll-commonmark-ghpages" # This should work without needing a local build
1 change: 1 addition & 0 deletions VERSION
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
0.1.0
10 changes: 10 additions & 0 deletions _config.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,10 @@
title: dpx_readme_template
description: a readme template
remote_theme: pages-themes/midnight@v0.2.0
plugins:
- jekyll-remote-theme # add this line to the plugins list if you already have one
theme: jekyll-theme-minimal
markdown: kramdown
kramdown:
parse_block_html: true

Loading