-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathmodify.txt
More file actions
60 lines (45 loc) · 2.24 KB
/
modify.txt
File metadata and controls
60 lines (45 loc) · 2.24 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
lib dir: C:\Users\{YOU}\Documents\Arduino\libraries
===================================================================
Adafruit_GFX.cpp add:
/**************************************************************************/
/*!
@brief Draw a mirrored PROGMEM-resident 1-bit image at the specified (x,y)
position, using the specified foreground color (unset bits are transparent).
@param x Top left corner x coordinate
@param y Top left corner y coordinate
@param bitmap byte array with monochrome bitmap
@param w Width of bitmap in pixels
@param h Height of bitmap in pixels
@param color 16-bit 5-6-5 Color to draw with
*/
/**************************************************************************/
void Adafruit_GFX::drawBitmapMirrored(int16_t x, int16_t y, uint8_t *bitmap, int16_t w,
int16_t h, uint16_t color) {
int16_t byteWidth = (w + 7) / 8; // Bitmap scanline pad = whole byte
uint8_t b = 0;
startWrite();
for (int16_t j = 0; j < h; j++, y++) {
for (int16_t i = w; i >= 0; i--) {
// Calculate the mirrored position
int16_t mirrored_i = w - 1 - i;
if (mirrored_i & 7)
b <<= 1;
else
b = bitmap[j * byteWidth + mirrored_i / 8];
if (b & 0x80)
writePixel(x + i, y, color);
}
}
endWrite();
}
===================================================================
Adafruit_GFX.h add:
void drawBitmapMirrored(int16_t x, int16_t y, uint8_t *bitmap, int16_t w,
int16_t h, uint16_t color);
===================================================================
for esp32
Patching platform.txt
The platform.txt for the ESP32 is commonly located under: ~/.arduino15/packages/esp32/hardware/esp32/{version}/platform.txt. Make sure you to replace {version} with the currently installed version of the ESP32 dev enviroment (for example 2.0.9). Open the file in your favourite text editor and add:
-zmuldefs to compiler.c.elf.libs.esp32 or compiler.c.elf.libs(any text)
-w to build.extra_flags.esp32
This will allow the c compiler to tolerate multiple definitions, which are used to bypass the deauthentication frame check in the ESP32's firmware. After this you can hit upload in the Arduino-ide.