-
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?
Conversation
|
|
||
| //LEDs | ||
| CRGB leds[STRIP_LENGTH]; | ||
| CRGB *leds; |
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.
Moving to pointers & malloc for this and the universesReceived array so we can take strip length in from config
|
If you're going to use malloc, you may want to verify that it actually allocate the memory. Since the user is setting the config with the webpage, you won't know how much memory each config would take up at compile time. If someone inputs an obscene amount of LEDs or we have less memory as new features get added to the code, malloc may fail. Let me know if I missed something. I looked over the changed files but haven't combed through the whole code base yet :) |
fbbe1bb to
f7c03b9
Compare
000f212 to
6c6e02f
Compare
| jobs: | ||
| build: | ||
| docker: | ||
| - image: rnavt/esp32builder:1ff8208 |
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.
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
| name: build arduino binary | ||
| command: | | ||
| cd esp_pixel_driver | ||
| arduino-cli compile --fqbn esp32:esp32:esp32 --clean |
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.
are we storin these bad larrys anywhere after compiling?
| type: string | ||
| default: "0.0.1" | ||
| orbs: | ||
| docker: circleci/docker@1.7.0 |
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?
| DmxParameters(); | ||
| }; | ||
|
|
||
| #endif No newline at end of file |
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.
| #endif | |
| #endif | |
| //Network Config | ||
| const IPAddress ip(192, 168, 1, 200); | ||
| // Network Config | ||
| const IPAddress ip(192, 168, 1, 249); |
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.
sup wit dis?
| bool received[maxUniverses]; | ||
| universesReceived = (bool *)malloc(sizeof(bool) * maxUniverses); | ||
| if (!universesReceived) { // failed malloc returns null | ||
| Serial.println( |
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.
debugging mcus are such a pain sometimes... i wonder if theres another way to signify an error other than serial. like.... flashing first couple leds red or something? Youve done something similar in the past with other states
| @@ -0,0 +1,136 @@ | |||
| #include "wifimanager_adapter.h" | |||
|
|
|||
| void WifiManagerAdapter::setup(Configuration *config) | |||
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.
could this function be broken up into a couple different functions that describe the steps?
| } | ||
| } | ||
|
|
||
| // read universe and put into the right part of the display buffer |
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.
i feel like when inline comments seem necessary its a good sign that the logic should be broken out into a function.
| DmxParameters params = DmxParameters(universe, length, sequence, data, leds); | ||
| TaskHandle_t dxmHandle = NULL; | ||
| if (xQueueSend(dmxQueue, (void *)¶ms, (TickType_t)10) != pdPASS) { | ||
| /* Failed to post the message, even after 10 ticks. */ |
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.
is something supposed to happen here?
| params.leds[led] = CRGB(params.data[i * 3], params.data[i * 3 + 1], | ||
| params.data[i * 3 + 2]); | ||
|
|
||
| debug_led_output(i, params.data[i * 3], params.data[i * 3 + 1], |
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.
is this more like validate led output?
Updates
/reconfigure