Open islisis opened 1 month ago
Seems like the black screen is caused by a change in plus2 initialisation, so I modified the mstickcplus library TFT_eSPI class instead and got a quick build working attached to serial. I will post again when the patch is tweaked and connection tested.
Nice work @islisis! Look forward to seeing how you go...
OK I may not change this for a while so I'll post the quick fix here. The power hold when disconnected from USB fix is in my fork.
https://github.com/islisis/Magic-Pocket-Control-ESP32
The TFT_eSPI LCD pin fix is made to /.pio/libdeps/m5stick-c/M5StickCPlus/src/utility/In_eSPI_Setup.h after the M5StickCPlus library is installed.
/* existing definitions from plus
*/
// plus and plus2
// plus2
I have a feeling the M5StickCPlus library/inherited TFT_eSPI class will be deprecated, so future builds could move to M5unified
Great work and thank-you ;)
I am new to ESP32, and am trying to compile for a m5stickc plus2 on vs code linux. I first needed to edit main-m5stick-c.cpp with "#define USING_M5GFX 0" to fix "Error: token "=" is not valid in preprocessor expressions".
After that, it will then build but with warnings such as:
'void memcpy(void, const void*, size_t)' reading 8 bytes from a region of size 4 [-Wstringop-overflow=]
I have attached the output at the end of this post.
I tried uploading, and received a checksum error. The next attempt to upload was successful, however nothing comes on the m5stickc plus2 display. On reset, the serial terminal reads:
rst:0x10 (RTCWDT_RTC_RESET),boot:0x1W (SP:0xee clk_drv:0x00,q_drv:0x00,d_drv:0x00,cs0_drv:0x00,hd_drv:0x00,wp_drv:0x00 mode:DIO, clock div:2 load:0x3fff0030,len:1184 load:0x40078000,len:13232 load:0x40080400,len:3028 entry 0x400805e4
and stops.
As I said, I am new to this platform and will slowly try to understand the possible causes. I will start by trying to use the M5StickCPlus2.h header file and library. However, if you have any ideas what is required I would be very grateful for any response!
In file included from src/CCU/CCUEncodingFunctions.h:5, from src/CCU/CCUEncodingFunctions.cpp:1: In static member function 'static std::vector CCUUtility::ToByteArrayFromArray(T, size_t) [with T = short int]',
inlined from 'static CCUPacketTypes::Command CCUEncodingFunctions::CreateVideoWhiteBalanceCommand(short int, short int)' at src/CCU/CCUEncodingFunctions.cpp:13:98:
src/CCU/CCUUtility.h:47:15: warning: 'void memcpy(void, const void, size_t)' reading 8 bytes from a region of size 4 [-Wstringop-overflow=]
memcpy(result.data(), byteArray, length * sizeof(T));