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

Fix getAGC and autostart #7

Open
wants to merge 2 commits 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
7 changes: 5 additions & 2 deletions plugin/bitrate.py
Original file line number Diff line number Diff line change
Expand Up @@ -87,8 +87,11 @@ def dataAvail(self, str):
if len(line):
self.datalines.append(line)
if len(self.datalines) >= 2:
self.vmin, self.vmax, self.vavg, self.vcur = self.datalines[0].split(' ')
self.amin, self.amax, self.aavg, self.acur = self.datalines[1].split(' ')
try:
self.vmin, self.vmax, self.vavg, self.vcur = self.datalines[0].split(' ')
self.amin, self.amax, self.aavg, self.acur = self.datalines[1].split(' ')
except:
self.clearValues()
self.datalines = []
if self.refresh_func:
self.refresh_func()
4 changes: 3 additions & 1 deletion plugin/plugin.py
Original file line number Diff line number Diff line change
Expand Up @@ -676,7 +676,8 @@ def getBER(self):
def getAGC(self):
if self.session and self.session.nav and self.session.nav.getCurrentService():
feinfo = self.session.nav.getCurrentService().frontendInfo()
return feinfo.getFrontendInfo(iFrontendInformation.signalPower) * 100 / 65536
if feinfo:
return feinfo.getFrontendInfo(iFrontendInformation.signalPower) * 100 / 65536
return 0

def getSNR(self):
Expand Down Expand Up @@ -1003,6 +1004,7 @@ def startSNMPserver(session):
def sessionstart(reason, session):
global global_session
global_session = session
autostartEntry(True)

#===============================================================================
# autostart
Expand Down