Skip to content
Open
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
4 changes: 4 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -49,6 +49,10 @@ embedded/**/.pio
embedded/**/.vscode
!embedded/**/.vscode/extensions.json

# Generated GraphQL types (regenerated from schema during build)
embedded/libs/graphql-types/src/graphql_types.h
embedded/libs/graphql-types/.schema_hash

# backend
packages/backend/dist

Expand Down
19 changes: 19 additions & 0 deletions embedded/libs/graphql-types/library.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,19 @@
{
"name": "graphql-types",
"version": "1.0.0",
"description": "Auto-generated GraphQL types for ESP32 controller firmware",
"keywords": ["graphql", "types", "codegen", "esp32"],
"authors": {
"name": "BoardSesh"
},
"frameworks": ["arduino"],
"platforms": ["espressif32"],
"dependencies": {
"bblanchon/ArduinoJson": "^7.0.0"
},
"build": {
"flags": [
"-I src"
]
}
}
9 changes: 7 additions & 2 deletions embedded/libs/led-controller/src/led_controller.h
Original file line number Diff line number Diff line change
Expand Up @@ -7,14 +7,19 @@
#define MAX_LEDS 500

/**
* LED command structure matching GraphQL LedCommand type
* LED command structure matching GraphQL LedCommand type.
* This is defined here for native test compatibility.
* The same struct is also generated in graphql_types.h with include guards.
*/
#ifndef LEDCOMMAND_DEFINED
#define LEDCOMMAND_DEFINED
struct LedCommand {
int position;
int32_t position;
uint8_t r;
uint8_t g;
uint8_t b;
};
#endif

class LedController {
public:
Expand Down
4 changes: 4 additions & 0 deletions embedded/projects/board-controller/platformio.ini
Original file line number Diff line number Diff line change
Expand Up @@ -22,13 +22,17 @@ lib_deps =
graphql-ws-client=symlink://../../libs/graphql-ws-client
nordic-uart-ble=symlink://../../libs/nordic-uart-ble
esp-web-server=symlink://../../libs/esp-web-server
graphql-types=symlink://../../libs/graphql-types
; External libraries from PlatformIO registry
fastled/FastLED@^3.6.0
bblanchon/ArduinoJson@^7.0.0
links2004/WebSockets@^2.4.0
tzapu/WiFiManager@^2.0.17
h2zero/NimBLE-Arduino@^1.4.1

; Pre-build script for GraphQL type generation
extra_scripts = pre:../../scripts/prebuild.py

build_flags =
-D CORE_DEBUG_LEVEL=3
-D CONFIG_NIMBLE_CPP_ATT_VALUE_INIT_LENGTH=512
Expand Down
Loading
Loading