Thanks for the advice both of you.
@ScruffR I had though so but this section from the guide confused me
Using const variables is the same as using #define in terms of flash and RAM, however they're better because they have an explicit type.
Though I now understand this to mean variables with actual values and not simple mappings.
@armor I do prefer using switch()case instead of if-then-else trees, unfortunately bools don't work in switch statements. I am likely going to need to re-implement a bunch of libraries myself as I'm not doing SoftAP on the device side (we are hosting a page on our website for that purpose).
Not sure if this is worth breaking into a separate thread or not (as I haven't seen any discussion on here about it), but I'm having a hard time figuring out how to load "images" off a SD card to be used on an ePaper display.
The "images" are currently hard coded into firmware like this:
const unsigned char gImage_plug[72] = { /* 0X00,0X01,0X1A,0X00,0X12,0X00, */
0X00,0X40,0X80,0X00,0X00,0X40,0X80,0X00,0X00,0X40,0X80,0X00,0X00,0X40,0X80,0X00,
0X00,0X40,0X80,0X00,0X03,0XFF,0XF0,0X00,0X03,0XFF,0XF0,0X00,0X03,0X00,0X30,0X00,
0X03,0X80,0X70,0X00,0X01,0X80,0X60,0X00,0X01,0X80,0X60,0X00,0X00,0X80,0X40,0X00,
0X00,0XC0,0XC0,0X00,0X00,0X73,0X80,0X00,0X00,0X3F,0X00,0X00,0X00,0X0C,0X00,0X00,
0X00,0X0C,0X00,0X00,0X00,0X0C,0X00,0X00,};
And the function to display the images takes a
const uint8_t[]
My thought was to store each image in a separate file as just the comma separated hex values on a single line, read that line into a String with SDFat, then cast it to the proper data type
const uint8_t* bmp = reinterpret_cast<const uint8_t*>(bmpStr.c_str());
However this is clearly not working as the image comes out as random pixels.
Any suggestion on how to do this?