Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

WIP - do not merge - dev env #301

Open
wants to merge 1 commit into
base: master
Choose a base branch
from
Open
Show file tree
Hide file tree
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
16 changes: 8 additions & 8 deletions Menu/GameShell/10_Settings/Airplane/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -122,7 +122,7 @@ def ScrollUp(self):
self._Scrolled += dis

def ToggleModeAni(self): ## with animation
out = commands.getstatusoutput('sudo rfkill list | grep yes | cut -d " " -f3')
out = commands.getstatusoutput('rfkill list | grep yes | cut -d " " -f3')
cuu marked this conversation as resolved.
Show resolved Hide resolved
if "yes" in out[1]:
data = self.EasingData(0,43)
for _,v in enumerate(data):
Expand All @@ -133,7 +133,7 @@ def ToggleModeAni(self): ## with animation
self._Screen.Draw()
self._Screen.SwapAndShow()

commands.getstatusoutput("sudo rfkill unblock all")
commands.getstatusoutput("rfkill unblock all")
self._Screen._TitleBar._InAirPlaneMode = False

else:
Expand All @@ -146,37 +146,37 @@ def ToggleModeAni(self): ## with animation
self._Screen.Draw()
self._Screen.SwapAndShow()

commands.getstatusoutput("sudo rfkill block all")
commands.getstatusoutput("rfkill block all")
self._Screen._TitleBar._InAirPlaneMode = True


def ToggleMode(self):
out = commands.getstatusoutput('sudo rfkill list | grep yes | cut -d " " -f3')
out = commands.getstatusoutput('rfkill list | grep yes | cut -d " " -f3')
print out
if "yes" in out[1]:
self._Screen._MsgBox.SetText("TurningOn")
self._Screen._MsgBox.Draw()
commands.getstatusoutput("sudo rfkill unblock all")
commands.getstatusoutput("rfkill unblock all")
self._Screen._TitleBar._InAirPlaneMode = False

else:
self._Screen._MsgBox.SetText("TurningOff")
self._Screen._MsgBox.Draw()
commands.getstatusoutput("sudo rfkill block all")
commands.getstatusoutput("rfkill block all")
self._Screen._TitleBar._InAirPlaneMode = True

def UnBlockAll(self):
self._Screen._MsgBox.SetText("TurningOn")
self._Screen._MsgBox.Draw()
commands.getstatusoutput("sudo rfkill unblock all")
commands.getstatusoutput("rfkill unblock all")
self._Screen._TitleBar._InAirPlaneMode = False


def OnLoadCb(self):
self._Scrolled = 0
self._PosY = 0
self._DrawOnce = False
out = commands.getstatusoutput('sudo rfkill list | grep yes | cut -d " " -f3')
out = commands.getstatusoutput('rfkill list | grep yes | cut -d " " -f3')
if "yes" in out[1]:
self._Screen._TitleBar._InAirPlaneMode = True
self._airwire_y = 50+43
Expand Down
Loading