WIP
This commit is contained in:
@@ -120,6 +120,8 @@ typedef struct Joystick {
|
||||
int errno;
|
||||
Button calibration_button;
|
||||
Joystick js;
|
||||
|
||||
alignas(Freenove_ESP32_WS2812) uint8_t strip_storage[sizeof(Freenove_ESP32_WS2812)];
|
||||
Freenove_ESP32_WS2812 *strip;
|
||||
|
||||
/******************************************************************************/
|
||||
@@ -131,7 +133,7 @@ void initSerial()
|
||||
|
||||
int init2812(Freenove_ESP32_WS2812 **strip)
|
||||
{
|
||||
Freenove_ESP32_WS2812 *obj = new Freenove_ESP32_WS2812(8, PIN_2812, 0, TYPE_GRB);
|
||||
Freenove_ESP32_WS2812 *obj = new(strip_storage) Freenove_ESP32_WS2812(8, PIN_2812, 0, TYPE_GRB);
|
||||
if ( obj == NULL ) {
|
||||
ERROR(ERRNO_NULLPOINTER);
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user