diff --git a/Firmware/.envrc b/Firmware/.envrc new file mode 100644 index 0000000..3550a30 --- /dev/null +++ b/Firmware/.envrc @@ -0,0 +1 @@ +use flake diff --git a/Firmware/.gitignore b/Firmware/.gitignore index de7cf74..7b727c0 100644 --- a/Firmware/.gitignore +++ b/Firmware/.gitignore @@ -1,6 +1,9 @@ .pio +.direnv +.cache .vscode/.browse.c_cpp.db* .vscode/c_cpp_properties.json .vscode/launch.json .vscode/ipch -include/Credentials/Credentials.h \ No newline at end of file +include/Credentials/Credentials.h +compile_commands.json diff --git a/Firmware/Makefile b/Firmware/Makefile new file mode 100644 index 0000000..b31df6c --- /dev/null +++ b/Firmware/Makefile @@ -0,0 +1,7 @@ +build: + pio run + pio run --target compiledb + cp ./.pio/build/esp32dev/ . + +program: + pio run --target upload diff --git a/Firmware/README.md b/Firmware/README.md new file mode 100644 index 0000000..03c6e0d --- /dev/null +++ b/Firmware/README.md @@ -0,0 +1,6 @@ +# Firmware + +```sh +pio run --target compiledb +pio run --target upload +``` diff --git a/Firmware/flake.lock b/Firmware/flake.lock index 345ae5a..ecdb710 100644 --- a/Firmware/flake.lock +++ b/Firmware/flake.lock @@ -5,11 +5,11 @@ "systems": "systems" }, "locked": { - "lastModified": 1701680307, - "narHash": "sha256-kAuep2h5ajznlPMD9rnQyffWG8EM/C73lejGofXvdM8=", + "lastModified": 1731533236, + "narHash": "sha256-l0KFg5HjrsfsO/JpG+r7fRrqm12kzFHyUHqHCVpMMbI=", "owner": "numtide", "repo": "flake-utils", - "rev": "4022d587cbbfd70fe950c1e2083a02621806a725", + "rev": "11707dc2f618dd54ca8739b309ec4fc024de578b", "type": "github" }, "original": { diff --git a/Firmware/flake.nix b/Firmware/flake.nix index b1ba434..46c9da0 100644 --- a/Firmware/flake.nix +++ b/Firmware/flake.nix @@ -21,6 +21,7 @@ devShell = pkgs.mkShell { buildInputs = with pkgs; [ platformio + gnumake ]; }; } diff --git a/Firmware/src/main.cpp b/Firmware/src/main.cpp index 58b344c..45118c6 100644 --- a/Firmware/src/main.cpp +++ b/Firmware/src/main.cpp @@ -1,9 +1,13 @@ -#include +#include +#include +#include +#include -void setup() { - // put your setup code here, to run once: -} +auto controller = + LightController::Controller(128, 1, 1, 1, 1); +auto parser = message::parser::Parser(controller.getActionQueue(), 128, 1, 1); +auto receiver = + comm::serial::SerialReceiver<128>(Serial, parser.getMessageQueue(), 1, 1); -void loop() { - // put your main code here, to run repeatedly: -} \ No newline at end of file +void setup() { Serial.begin(115200); } +void loop() {}