summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorRaptor Engineering Development Team <support@raptorengineering.com>2019-04-26 02:08:24 +0000
committerRaptor Engineering Development Team <support@raptorengineering.com>2019-04-27 03:54:36 +0000
commit22ce0ab4009b952904f78b72d56b6c2b7e635c88 (patch)
treefcc02c7da3c4aec4187d8dd17f7c47f4f596ac10
parent0b85683a0462f3fe74af98ab9fef842448c161ec (diff)
downloadtalos-skeleton-04-16-2019.zip
talos-skeleton-04-16-2019.tar.gz
Update IPL progress bar along with LEDs04-16-2019
-rw-r--r--pyiplledmonitor/ipl_status_led_monitor.py26
1 files changed, 25 insertions, 1 deletions
diff --git a/pyiplledmonitor/ipl_status_led_monitor.py b/pyiplledmonitor/ipl_status_led_monitor.py
index de69e4c..34baff5 100644
--- a/pyiplledmonitor/ipl_status_led_monitor.py
+++ b/pyiplledmonitor/ipl_status_led_monitor.py
@@ -1,6 +1,6 @@
#!/usr/bin/env python
#
-# Copyright 2018 Raptor Engineering, LLC
+# Copyright 2018-2019 Raptor Engineering, LLC
# Released under the terms of the GPL v3
import gobject
@@ -205,6 +205,30 @@ class IPLStatusLEDMonitor(DbusProperties, DbusObjectManager):
self.IPLLEDWriteI2CByte(0x10, 0x80 + led_code)
except:
self.IPLLEDWriteI2CByte(0x10, 0x80)
+
+ # Update progress bar if splash screen is running
+ try:
+ progress_max_fifo = open("/var/run/fbterm_progress_max", "r+b")
+ progress_value_fifo = open("/var/run/fbterm_progress_value", "r+b")
+ try:
+ fbterm_pid = int(check_output(["pidof", "-s", "fbterm"]))
+ os.kill(os.getpid(), signal.SIGALRM)
+ except:
+ pass
+
+ progress_major_code = int(self.current_ipl_istep_major)
+ if (progress_major_code >= 128) and (progress_major_code < 254):
+ progress_major_code = 24
+ elif progress_major_code >= 254:
+ progress_major_code = 25
+ progress_value = ((progress_major_code << 6) | int(self.current_ipl_istep_minor)) / 8;
+ progress_data = bytearray(1)
+ progress_data[0] = 200
+ progress_max_fifo.write(progress_data)
+ progress_data[0] = progress_value
+ progress_value_fifo.write(progress_data)
+ except:
+ pass
else:
# Put LED bank back into normal operation
self.IPLLEDWriteI2CByte(0x10, 0x00)
OpenPOWER on IntegriCloud