Closed jesusbackflips closed 3 years ago
This is how the original creality code pushes data off the end of the buffer. Funky, but works as expected. I may eventually change the send underpinnings, but there is no technical reason to do so at this point.
Custom Build for Mega2560 - Ender 5 Plus UBL Stock Setup
Im getting this Yellow Flag (Compile success) :) :) But maybe causing with other Machines some Problems?
---------Message------ Marlin\src\lcd\extui\lib\Creality_DWIN.cpp: In member function 'void ExtUI::RTSSHOW::RTS_SndData(int, long unsigned int, unsigned char)':
Marlin\src\lcd\extui\lib\Creality_DWIN.cpp:527:26: warning: right shift count >= width of type [-Wshift-count-overflow]snddat.data[0] = n >> 16;^
------Line 519---- Creality_DWIN.cpp------
void RTSSHOW::RTS_SndData(unsigned char str, unsigned long addr, unsigned char cmd) { RTS_SndData((char )str, addr, cmd); }
void RTSSHOW::RTS_SndData(int n, unsigned long addr, unsigned char cmd /= VarAddr_W/) { if (cmd == VarAddr_W) { if ((uint8_t)n > 0xFFFF) { snddat.data[0] = n >> 16; snddat.data[1] = n & 0xFFFF; snddat.len = 7; ----529-------
Im just Testing "snddat.data[0] = n > 16;"
(deleted ">"). Quik and Dirty. Message gone :D . (Will Update)