Capitalized class names
This commit is contained in:
parent
b7466d0c9d
commit
ef9aa12e39
@ -26,7 +26,7 @@ SOFTWARE.
|
||||
import smbus2 as smbus
|
||||
|
||||
|
||||
class device(object):
|
||||
class Device(object):
|
||||
"""
|
||||
Base class for OLED driver classes
|
||||
"""
|
||||
|
@ -25,10 +25,10 @@ SOFTWARE.
|
||||
|
||||
import smbus2 as smbus
|
||||
from PIL import Image, ImageDraw
|
||||
from .I2C_DEVICE import device
|
||||
from .I2C_DEVICE import Device
|
||||
|
||||
|
||||
class sh1106(device):
|
||||
class SH1106(Device):
|
||||
"""
|
||||
A device encapsulates the I2C connection (address/port) to the SH1106
|
||||
OLED display hardware. The init method pumps commands to the display
|
||||
@ -38,7 +38,7 @@ class sh1106(device):
|
||||
"""
|
||||
|
||||
def __init__(self, port=1, address=0x3C):
|
||||
super(sh1106, self).__init__(port, address)
|
||||
super(SH1106, self).__init__(port, address)
|
||||
self.width = 128
|
||||
self.height = 64
|
||||
self.pages = round(self.height / 8)
|
||||
|
@ -25,10 +25,10 @@ SOFTWARE.
|
||||
|
||||
import smbus2 as smbus
|
||||
from PIL import Image, ImageDraw
|
||||
from .I2C_DEVICE import device
|
||||
from .I2C_DEVICE import Device
|
||||
|
||||
|
||||
class ssd1306(device):
|
||||
class SSD1306(Device):
|
||||
"""
|
||||
A device encapsulates the I2C connection (address/port) to the SSD1306
|
||||
OLED display hardware. The init method pumps commands to the display
|
||||
@ -38,7 +38,7 @@ class ssd1306(device):
|
||||
"""
|
||||
|
||||
def __init__(self, port=1, address=0x3C):
|
||||
super(ssd1306, self).__init__(port, address)
|
||||
super(SSD1306, self).__init__(port, address)
|
||||
self.width = 128
|
||||
self.height = 64
|
||||
self.pages = round(self.height / 8)
|
||||
|
Loading…
Reference in New Issue
Block a user