@@ -109,10 +109,10 @@ def power_up(self):
109
109
self .command (_IL0373_PANEL_SETTING , bytearray ([0xCF ]))
110
110
self .command (_IL0373_CDI , bytearray ([0x37 ]))
111
111
self .command (_IL0373_PLL , bytearray ([0x29 ]))
112
- _b1 = self .width & 0xFF
113
- _b2 = (self .width >> 8 ) & 0xFF
114
- _b3 = self .height & 0xFF
115
- _b4 = (self .height >> 8 ) & 0xFF
112
+ _b1 = self ._width & 0xFF
113
+ _b2 = (self ._width >> 8 ) & 0xFF
114
+ _b3 = self ._height & 0xFF
115
+ _b4 = (self ._height >> 8 ) & 0xFF
116
116
self .command (_IL0373_RESOLUTION , bytearray ([_b1 , _b2 , _b3 , _b4 ]))
117
117
self .command (_IL0373_VCM_DC_SETTING , bytearray ([0x0A ]))
118
118
@@ -210,7 +210,7 @@ def image(self, image):
210
210
x = 1
211
211
pixel = pix [x , y ]
212
212
213
- addr = int (((self .width - x ) * self .height + y )/ 8 )
213
+ addr = int (((self ._width - x ) * self ._height + y )/ 8 )
214
214
215
215
if pixel == (0xFF , 0 , 0 ):
216
216
addr = addr + self .bw_bufsize
@@ -226,11 +226,11 @@ def image(self, image):
226
226
def pixel (self , x , y , color ):
227
227
"""draw a single pixel in the display buffer"""
228
228
if self .sram :
229
- if (x < 0 ) or (x >= self .width ) or (y < 0 ) or (y >= self .height ):
229
+ if (x < 0 ) or (x >= self ._width ) or (y < 0 ) or (y >= self ._height ):
230
230
return
231
231
if x == 0 :
232
232
x = 1
233
- addr = ((self .width - x ) * self .height + y ) // 8
233
+ addr = ((self ._width - x ) * self ._height + y ) // 8
234
234
if color == Adafruit_EPD .RED :
235
235
current = self .sram .read8 (addr + self .bw_bufsize )
236
236
else :
0 commit comments