Skip to content
Merged
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
8 changes: 2 additions & 6 deletions installer.sh
Original file line number Diff line number Diff line change
Expand Up @@ -3,14 +3,10 @@

######### Only These two lines to edit with new version ######
# next veriosn do not missing to add "" to version number
version=18.7
version=18.8
description="
What is NEW:
- Change the way the quick button is selected

ما هو الجديد:
- تغيير طريقة اختيار الزر السريع
"
- [FrontendInfo] Add AGC fallback for unsupported frontends"
##############################################################

BACKUPPATH=/tmp/Backup
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -38,6 +38,27 @@ def __init__(self, type):
else:
self.type = self.LOCK

def getAGC(self):
agc = self.source.agc
if agc:
return agc

# Some frontends do not expose signal strength through either
# DTV_STAT_SIGNAL_STRENGTH or FE_READ_SIGNAL_STRENGTH. Keep using
# the driver's value when available and estimate a display value
# from signal quality only as a fallback.
snr = self.source.snr
if not snr:
return agc
snr_percent = snr * 100.0 / 65535.0
if snr_percent < 35:
agc_percent = snr_percent * 1.8
elif snr_percent < 70:
agc_percent = 63 + ((snr_percent - 35) * 0.8)
else:
agc_percent = 91 + ((snr_percent - 70) * 0.3)
return round(min(100, agc_percent) * self.range / 100.0)

@cached
def getText(self):
assert self.type not in (self.LOCK, self.SLOT_NUMBER), "the text output of FrontendInfo cannot be used for lock info"
Expand All @@ -49,7 +70,7 @@ def getText(self):
else:
return "N/A"
elif self.type == self.AGC:
percent = self.source.agc
percent = self.getAGC()
elif self.type == self.SNR:
percent = self.source.snr
elif self.type == self.SNRdB:
Expand Down Expand Up @@ -88,11 +109,11 @@ def getValue(self):
assert self.type != self.LOCK, "the value/range output of FrontendInfo can not be used for lock info"
_local = 0
if self.type == self.AGC:
return self.source.agc or 0
return self.getAGC() or 0
elif self.type == self.AGC_ANALOG:
if self.source.agc is None:
if self.getAGC() is None:
return 50
_local = int(((self.source.agc * 60) / 65536.0) / 3)
_local = int(((self.getAGC() * 60) / 65536.0) / 3)
if _local < 10:
return _local + 50
elif _local >= 10:
Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
# RAED(fairbird)
# Support (www.tunisia-sat.com)

version=18.7
version=18.8