Skip to content
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 3 additions & 1 deletion src/BitWizard/bw.py
Original file line number Diff line number Diff line change
Expand Up @@ -619,6 +619,7 @@ class BitWizardLcd(BitWizardBase):
DefaultAddress = 0x82
Cursor = "Off" #Blink, On
_Backlight = 128
_Contrast = 128

def SetCursor(self,x,y):
"""
Expand Down Expand Up @@ -651,7 +652,8 @@ def Contrast(self, value=128):
"""
@brief Change LCD contrast, defaults to 128
"""
self.Bus.Write_uInt8(self.Address,Contrast,value)
if value > 0 : self._Contrast = value
self.Bus.Write_uInt8(self.Address,Contrast,self._Contrast)

# Set the BackLight of the LCD
def Backlight(self, value = 128):
Expand Down