Skip to content

Commit

Permalink
Fix root_startup path, delay for ofono startup, and break panel to
Browse files Browse the repository at this point in the history
display signal even on pmos.
  • Loading branch information
pavelmachek committed Feb 8, 2018
1 parent bd249a2 commit 7b3e75f
Show file tree
Hide file tree
Showing 5 changed files with 7 additions and 4 deletions.
4 changes: 2 additions & 2 deletions desktop/panel.py
Original file line number Diff line number Diff line change
Expand Up @@ -141,14 +141,14 @@ def tick_battery(m):

def tick_phone(m):
m.wd.update()
if m.wd.status != "ok":
if False and m.wd.status != "ok":
m.signal_text.set_text(m.wd.status)
m.signal_bar.set_text("no signal")
m.signal_bar.set_fraction(0)
return

m.signal_text.set_text(m.wd.network)
m.signal_bar.set_text("")
m.signal_bar.set_text(m.wd.status)
m.signal_bar.set_fraction(m.wd.signal / 100.)

def tick(m):
Expand Down
2 changes: 2 additions & 0 deletions lib/watchdog.py
Original file line number Diff line number Diff line change
Expand Up @@ -19,6 +19,8 @@ def write(m, summary, details):
def read(m):
if not m.enabled:
return None
if not os.path.isfile(m.mypath):
return None
if time.time() - os.stat(m.mypath).st_mtime > m.timeout:
return None
# If mtime is newer than current time, there's probably something
Expand Down
1 change: 1 addition & 0 deletions ofone/ofono.py
Original file line number Diff line number Diff line change
Expand Up @@ -220,6 +220,7 @@ def modem_init(m):

def startup(m):
m.online_modem()
time.sleep(15)
reg = dbus.Interface(
m.bus.get_object('org.ofono', m.path), 'org.ofono.NetworkRegistration')
m.netreg = reg
Expand Down
2 changes: 1 addition & 1 deletion startup/phone.sudoers
Original file line number Diff line number Diff line change
@@ -1 +1 @@
%wheel ALL= NOPASSWD: /sbin/shutdown, /sbin/poweroff, /usr/sbin/iw, /sbin/ifconfig, /sbin/route, /sbin/reboot, /usr/sbin/alsactl, /usr/share/unicsy/ofone/ofone, /usr/share/unicsy/startup/root_startup, /usr/bin/amixer
%wheel ALL= NOPASSWD: /sbin/shutdown, /sbin/poweroff, /usr/sbin/iw, /sbin/ifconfig, /sbin/route, /sbin/reboot, /usr/sbin/alsactl, /usr/share/unicsy/ofone/ofone, /usr/share/unicsy/startup/root_startup.py, /usr/bin/amixer
2 changes: 1 addition & 1 deletion startup/x_startup.py
Original file line number Diff line number Diff line change
Expand Up @@ -48,7 +48,7 @@ def run(m):
wd.progress(10, "hardware")
p = "/usr/share/unicsy/"

sy("sudo "+p+"startup/root_startup")
sy("sudo "+p+"startup/root_startup.py")

# Enable autosleep
# instructions are at
Expand Down

0 comments on commit 7b3e75f

Please sign in to comment.