Capitalized class names

This commit is contained in:
BlueFox 2021-12-04 17:10:09 +00:00
parent b7466d0c9d
commit ef9aa12e39
3 changed files with 7 additions and 7 deletions

View File

@ -26,7 +26,7 @@ SOFTWARE.
import smbus2 as smbus import smbus2 as smbus
class device(object): class Device(object):
""" """
Base class for OLED driver classes Base class for OLED driver classes
""" """

View File

@ -25,10 +25,10 @@ SOFTWARE.
import smbus2 as smbus import smbus2 as smbus
from PIL import Image, ImageDraw 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 A device encapsulates the I2C connection (address/port) to the SH1106
OLED display hardware. The init method pumps commands to the display 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): def __init__(self, port=1, address=0x3C):
super(sh1106, self).__init__(port, address) super(SH1106, self).__init__(port, address)
self.width = 128 self.width = 128
self.height = 64 self.height = 64
self.pages = round(self.height / 8) self.pages = round(self.height / 8)

View File

@ -25,10 +25,10 @@ SOFTWARE.
import smbus2 as smbus import smbus2 as smbus
from PIL import Image, ImageDraw 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 A device encapsulates the I2C connection (address/port) to the SSD1306
OLED display hardware. The init method pumps commands to the display 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): def __init__(self, port=1, address=0x3C):
super(ssd1306, self).__init__(port, address) super(SSD1306, self).__init__(port, address)
self.width = 128 self.width = 128
self.height = 64 self.height = 64
self.pages = round(self.height / 8) self.pages = round(self.height / 8)