refactor: move the v2 controller to the repository root

The ESP-IDF project, docs, tools, tests and web UI move from v2/ to the
root, and the Makefile, README, build scripts and test runner drop the
v2/ prefix.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
This commit is contained in:
jimmyandClaude Opus 5.5 committed 2026-11-02 23:44:58 +13:00
1 parent 71bd320661
commit 1c222771a5
66 files changed
+30 -31

No files matched your search

+27
View File
@@ -0,0 +1,27 @@
// Host test: pack a preset and a select with envelope.c and print hex
#include <stdio.h>
#include "../main/envelope.h"
static void hex(const uint8_t *b, size_t n)
{
for (size_t i = 0; i < n; i++) printf("%02x", b[i]);
printf("\n");
}
int main(void)
{
const char *json =
"{\"p\":\"chase\",\"c\":[\"#ff0000\",\"#0f8\"],\"d\":120,\"b\":200,\"a\":false,\"n1\":5,\"n2\":-3,\"n3\":0,\"n4\":7,\"n5\":0,\"n6\":300}";
const char *json2 = "{\"pattern\":\"on\",\"colors\":[\"#102030\"],\"delay\":0,\"brightness\":0,\"auto\":true}";
cJSON *p = cJSON_Parse(json), *p2 = cJSON_Parse(json2);
env_blob_t pb, sb;
uint8_t out[256];
env_blob_init(&pb); env_blob_init(&sb);
env_add_preset(&pb, "7", p);
env_add_preset(&pb, "8", p2);
env_add_select(&sb, "mirror", "7", -1);
env_add_select(&sb, "roof", "8", 12);
hex(out, env_frame(out, 128, &pb, NULL));
hex(out, env_frame(out, -1, NULL, &sb));
return 0;
}