summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorRaptor Engineering Development Team <support@raptorengineering.com>2018-01-25 03:12:42 -0600
committerRaptor Engineering Development Team <support@raptorengineering.com>2019-04-19 10:28:12 +0000
commitef0c83d753d0581f07d454be8c4161dbe6e36d21 (patch)
tree8ffe9d4aae2e9684d15d362e861e95136af5070d
parentf73678b55a17c16007392f8990405b2a0c854ce1 (diff)
downloadtalos-skeleton-ef0c83d753d0581f07d454be8c4161dbe6e36d21.tar.gz
talos-skeleton-ef0c83d753d0581f07d454be8c4161dbe6e36d21.zip
Sound beep on IPL completion
-rw-r--r--pyiplledmonitor/ipl_status_led_monitor.py15
1 files changed, 12 insertions, 3 deletions
diff --git a/pyiplledmonitor/ipl_status_led_monitor.py b/pyiplledmonitor/ipl_status_led_monitor.py
index 907ceeb..29f1ae6 100644
--- a/pyiplledmonitor/ipl_status_led_monitor.py
+++ b/pyiplledmonitor/ipl_status_led_monitor.py
@@ -54,7 +54,7 @@ class IPLStatusLEDMonitor(DbusProperties, DbusObjectManager):
for x in [114, 111, 116, 49, 51]])
random.seed(None)
- self.updateIPLLeds()
+ self.updateIPLLeds(True)
bus.add_signal_receiver(
self.IPLStatusChangeHandler,
@@ -142,9 +142,9 @@ class IPLStatusLEDMonitor(DbusProperties, DbusObjectManager):
self.current_ipl_istep_major = 0
self.current_ipl_istep_minor = 0
- self.updateIPLLeds()
+ self.updateIPLLeds(False)
- def updateIPLLeds(self):
+ def updateIPLLeds(self, initial_start):
if (self.current_ipl_status == "IPL_RUNNING"):
# Show major ISTEP on LED bank
# On Talos we only have three LEDs plus a fourth indicator modification bit, but the major ISTEPs range from 2 to 21
@@ -183,6 +183,15 @@ class IPLStatusLEDMonitor(DbusProperties, DbusObjectManager):
proc = subprocess.Popen(["i2cset", "-y", "12", "0x31", "0x10", "0x00"], stdout=subprocess.PIPE, stderr=open(os.devnull, 'wb'), shell=False)
(out, err) = proc.communicate()
+ if (self.current_ipl_status == "IPL_COMPLETE"):
+ if (initial_start == False):
+ # Sound IPL complete beep
+ try:
+ proc = subprocess.Popen(["beep.exe", "896", "100"], stdout=subprocess.PIPE, stderr=open(os.devnull, 'wb'), shell=False)
+ (out, err) = proc.communicate()
+ except:
+ pass
+
if __name__ == '__main__':
dbus.mainloop.glib.DBusGMainLoop(set_as_default=True)
bus = get_dbus()
OpenPOWER on IntegriCloud