Skip to content

Commit

Permalink
mv hd44780 seeed-hd44780
Browse files Browse the repository at this point in the history
  • Loading branch information
Hansen0314 committed Apr 1, 2020
1 parent c612089 commit bad2bee
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 2 deletions.
3 changes: 2 additions & 1 deletion PocketBeagle/Grove/LCD.py
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@ def __init__(self):
while not os.path.exists(self.Path):
time.sleep(0.1)
#Reinstall hd44780 module to support hot plug
ReinstallModule('hd44780')
ReinstallModule('seeed-hd44780')
try:
#Open the /dev/lcd0 using file python library
self.f = open(self.Lcd0, 'w')
Expand All @@ -38,6 +38,7 @@ def SetText(self, text):
"""
try:
self.f.write('\x1b[H')
self.f.flush()
self.f.write('%s'%text)
self.f.flush()
except IOError as err:
Expand Down
4 changes: 3 additions & 1 deletion PocketBeagle/Grove/Shell.py
Original file line number Diff line number Diff line change
Expand Up @@ -36,15 +36,17 @@ def InstallModule(Module):
Module : Name of Module
"""
GetCmdReturn('sudo modprobe -s %s'%Module)
Module = Module.replace('-','_')
while not Module in GetCmdReturn('lsmod | grep %s'%Module):
time.sleep(0.1)
def RemoveModule(Module):
"""Install Module
Module : Name of Module
"""
Module = Module.replace('-','_')
GetCmdReturn('sudo rmmod -s %s || true '%Module)
while Module in GetCmdReturn('lsmod | grep %s'%Module):
time.sleep(0.1)
time.sleep(0.1)
def ReinstallModule(Module):
"""Reinstall Module using InstallModule and RemoveModule
Module : Name of Module
Expand Down

0 comments on commit bad2bee

Please sign in to comment.