-
Notifications
You must be signed in to change notification settings - Fork 0
Server, WifiManager Form, DC Integration #19
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
base: master
Are you sure you want to change the base?
Changes from all commits
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,60 @@ | ||
| version: 2.1 | ||
| parameters: | ||
| pixel-driver-version: | ||
| type: string | ||
| default: "0.0.1" | ||
| orbs: | ||
| docker: circleci/docker@1.7.0 | ||
| executors: | ||
| docker-publisher: | ||
| docker: | ||
| - image: circleci/buildpack-deps:latest-alpine | ||
| commands: | ||
| move-src: | ||
| steps: | ||
| - run: | ||
| name: move src into project folder | ||
| command: | | ||
| mkdir esp_pixel_driver | ||
| cp *.* esp_pixel_driver/ | ||
| cd esp_pixel_driver | ||
| deps-arduino: | ||
| steps: | ||
| - run: | ||
| name: install arduino deps | ||
| command: | | ||
| arduino-cli lib install "ArtnetWifi" | ||
| arduino-cli lib install "FastLED" | ||
| arduino-cli lib install "WiFiManager" | ||
| arduino-cli lib install "ArduinoJson" | ||
|
|
||
| jobs: | ||
| build: | ||
| docker: | ||
| - image: rnavt/esp32builder:1ff8208 | ||
|
Collaborator
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. this docker image is defined multiple times. to reduce duplicate hard coding itd be good to put the image into the executors list at the top |
||
| steps: | ||
| - checkout | ||
| - move-src | ||
| - deps-arduino | ||
| - run: | ||
| name: build arduino binary | ||
| command: | | ||
| cd esp_pixel_driver | ||
| arduino-cli compile --fqbn esp32:esp32:esp32 --clean | ||
|
Collaborator
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. are we storin these bad larrys anywhere after compiling? |
||
|
|
||
| lint: | ||
| docker: | ||
| - image: rnavt/esp32builder:1ff8208 | ||
| steps: | ||
| - checkout | ||
| - move-src | ||
| - run: | ||
| command: | | ||
| cd esp_pixel_driver | ||
| arduino-lint | ||
| workflows: | ||
| version: 2 | ||
| pixel-driver-build: | ||
| jobs: | ||
| - lint | ||
| - build | ||
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,12 @@ | ||
| #include "DmxParameters.h" | ||
|
|
||
| DmxParameters::DmxParameters() {} | ||
|
|
||
| DmxParameters::DmxParameters(uint16_t universe, uint16_t length, | ||
| uint8_t sequence, uint8_t *data, CRGB *leds) { | ||
| this->universe = universe; | ||
| this->length = length; | ||
| this->sequence = sequence; | ||
| this->data = data; | ||
| this->leds = leds; | ||
| } |
| Original file line number | Diff line number | Diff line change | ||||||
|---|---|---|---|---|---|---|---|---|
| @@ -0,0 +1,20 @@ | ||||||||
| #ifndef DMX_PARAMETERS_H | ||||||||
| #define DMX_PARAMETERS_H | ||||||||
|
|
||||||||
| #include <Arduino.h> | ||||||||
| #include "config.h" | ||||||||
| #include <FastLED.h> | ||||||||
|
|
||||||||
| class DmxParameters { | ||||||||
| public: | ||||||||
| uint16_t universe; | ||||||||
| uint16_t length; | ||||||||
| uint8_t sequence; | ||||||||
| uint8_t *data; | ||||||||
| CRGB *leds; | ||||||||
| DmxParameters(uint16_t universe, uint16_t length, uint8_t sequence, | ||||||||
| uint8_t *data, CRGB *leds); | ||||||||
| DmxParameters(); | ||||||||
| }; | ||||||||
|
|
||||||||
| #endif | ||||||||
|
Collaborator
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more.
Suggested change
|
||||||||
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,20 @@ | ||
| #include "config.h" | ||
|
|
||
| void Configuration::applyOverrides() | ||
| { | ||
| #ifdef DEBUG_LOGS | ||
| this->debug_logs = DEBUG_LOGS; | ||
| #endif | ||
| #ifdef START_UNIVERSE | ||
| this->start_universe = START_UNIVERSE; | ||
| #endif | ||
| #ifdef OUTPUT_LEDS | ||
| this->output_leds = OUTPUT_LEDS; | ||
| #endif | ||
| #ifdef STRIP_LENGTH | ||
| this->strip_length = STRIP_LENGTH; | ||
| #endif | ||
| #ifdef CHANNEL_OFFSET | ||
| this->channel_offset = CHANNEL_OFFSET; | ||
| #endif | ||
| } |
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -1,26 +1,48 @@ | ||
| #ifndef CONFIG_H | ||
| #define CONFIG_H | ||
|
|
||
| // TODO: replace with Wifi manger form config | ||
|
|
||
| #include "enums.h" | ||
| #include <Arduino.h> | ||
|
|
||
| #define OUTPUT_MODE OUTPUT_MODE_LED | ||
| #define ENABLE_DEMO_ANIMATIONS | ||
| #define OUTPUT_PIN 17 | ||
| //TODO: Determine true max strip length for 8266 and 32 | ||
| #define MAX_STRIP_LENGTH 500 | ||
|
|
||
| class Configuration | ||
| { | ||
| public: | ||
| uint32_t ip; | ||
| uint32_t gateway; | ||
| uint32_t subnet; | ||
| int strip_length; | ||
| int start_universe; | ||
| int channel_offset; | ||
| bool debug_logs; | ||
| bool output_leds; | ||
| void applyOverrides(); | ||
| }; | ||
|
|
||
| /* | ||
|
|
||
| //override with static values | ||
| #define DISABLE_WIFIMANAGER_SETUP | ||
|
|
||
| #define DEBUG_LOGS false | ||
| #define OUTPUT_LEDS true | ||
|
|
||
| #define NAME "Pixel Driver Deluxe" | ||
| #define DESCRIPTION "ESP Pixel Driver" | ||
| #define STRIP_LENGTH 250 | ||
|
|
||
| // Pixel Mapped Output Configuration | ||
| #define START_UNIVERSE 1 //DMX Universe to listen in | ||
| #define CHANNEL_OFFSET 0 //DMX Start Channel | ||
|
|
||
| #define LOG_LEVEL LOG_LEVEL_STANDARD // 0: normal, 1: debug | ||
|
|
||
| //Must define: | ||
| /* | ||
| #define WIFI_SSID "hfsjdkf" | ||
| #define PASSWORD "sdjfhdskjfn" | ||
| //#define WIFI_SSID "hfsjdkf" | ||
| //#define PASSWORD "sdjfhdskjfn" | ||
|
|
||
| */ | ||
| #include "secret.h" | ||
|
|
||
| #endif | ||
|
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
im not sure we are using this orb here?