Conversation
|
|
||
| //LEDs | ||
| CRGB leds[STRIP_LENGTH]; | ||
| CRGB *leds; |
There was a problem hiding this comment.
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.
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.
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.
im not sure we are using this orb here?
| DmxParameters(); | ||
| }; | ||
|
|
||
| #endif No newline at end of file |
There was a problem hiding this comment.
| #endif | |
| #endif | |
| //Network Config | ||
| const IPAddress ip(192, 168, 1, 200); | ||
| // Network Config | ||
| const IPAddress ip(192, 168, 1, 249); |
| bool received[maxUniverses]; | ||
| universesReceived = (bool *)malloc(sizeof(bool) * maxUniverses); | ||
| if (!universesReceived) { // failed malloc returns null | ||
| Serial.println( |
There was a problem hiding this comment.
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.
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.
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.
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.
is this more like validate led output?
Updates
/reconfigure