Skip to content

Conversation

@twoshark
Copy link
Collaborator

@twoshark twoshark commented Jan 18, 2021

Updates

  • Save & load config to eeprom
  • use wifimanager portal to pull configuration
  • trigger wifimanager portal at /reconfigure

@twoshark twoshark requested review from dtp263 and natnafu January 18, 2021 05:32

//LEDs
CRGB leds[STRIP_LENGTH];
CRGB *leds;
Copy link
Collaborator Author

@twoshark twoshark Jan 18, 2021

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

@twoshark twoshark changed the title Configuration Updates Configuration Updates & Demo Animations Jan 18, 2021
@natnafu
Copy link
Collaborator

natnafu commented Jan 23, 2021

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 :)

@twoshark twoshark force-pushed the wifimanager-and-client branch 4 times, most recently from fbbe1bb to f7c03b9 Compare January 10, 2022 02:18
@twoshark twoshark force-pushed the wifimanager-and-client branch from 000f212 to 6c6e02f Compare January 17, 2022 03:30
@twoshark twoshark changed the title Configuration Updates & Demo Animations Server, WifiManager Form, DC Integration Jan 17, 2022
jobs:
build:
docker:
- image: rnavt/esp32builder:1ff8208
Copy link
Collaborator

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
Copy link
Collaborator

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
Copy link
Collaborator

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
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
#endif
#endif

//Network Config
const IPAddress ip(192, 168, 1, 200);
// Network Config
const IPAddress ip(192, 168, 1, 249);
Copy link
Collaborator

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(
Copy link
Collaborator

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)
Copy link
Collaborator

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
Copy link
Collaborator

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 *)&params, (TickType_t)10) != pdPASS) {
/* Failed to post the message, even after 10 ticks. */
Copy link
Collaborator

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],
Copy link
Collaborator

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?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants