Jump to content


Photo

Manual Scan add option "Predefined transponder" for DVB-T


  • Please log in to reply
45 replies to this topic

#1 Dimitrij

  • PLi® Core member
  • 10,331 posts

+350
Excellent

Posted 27 April 2014 - 21:41

Suggestion...

Manual Scan add option "Predefined transponder" for DVB-T.
Needs to be tested.

--- a/ScanSetup.py
+++ b/ScanSetup.py
@@ -76,6 +76,14 @@
 			parm = buildTerTransponder(x[1], x[9], x[2], x[4], x[5], x[3], x[7], x[6], x[8], x[10], x[11])
 			tlist.append(parm)
 
+def getRegionTerrestrialTransponderList(region):
+	tlist = []
+	for x in nimmanager.getTranspondersTerrestrial(region):
+		if x[0] == 2: #TERRESTRIAL
+			parm = buildTerTransponder(x[1], x[9], x[2], x[4], x[5], x[3], x[7], x[6], x[8], x[10], x[11])
+			tlist.append((parm, str(x[1] / 1000)))
+	return tlist
+
 cable_bands = {
 	"DVBC_BAND_EU_VHF_I" : 1 << 0,
 	"DVBC_BAND_EU_MID" : 1 << 1,
@@ -356,6 +364,7 @@
 		self.systemEntry = None
 		self.modulationEntry = None
 		self.preDefSatList = None
+		self.TerrestrialTransponders = None
 		nim = nimmanager.nim_slots[index_to_scan]
 		if nim.isCompatible("DVB-S"):
 			self.typeOfScanEntry = getConfigListEntry(_("Type of scan"), self.scan_type)
@@ -442,7 +451,10 @@
 						self.scan_ter.channel.value = int(channel.replace("+","").replace("-",""))
 					self.list.append(getConfigListEntry(_("Channel"), self.scan_ter.channel))
 				else:
+					prev_val = self.scan_ter.frequency.value
 					self.scan_ter.frequency.value = channelnumbers.channel2frequency(self.scan_ter.channel.value, self.ter_tnumber)/1000
+					if self.scan_ter.frequency.value == 474000:
+						self.scan_ter.frequency.value = prev_val
 					self.list.append(getConfigListEntry(_("Frequency"), self.scan_ter.frequency))
 				self.list.append(getConfigListEntry(_("Inversion"), self.scan_ter.inversion))
 				self.list.append(getConfigListEntry(_("Bandwidth"), self.scan_ter.bandwidth))
@@ -454,6 +466,11 @@
 				self.list.append(getConfigListEntry(_("Hierarchy info"), self.scan_ter.hierarchy))
 				if self.scan_ter.system.value == eDVBFrontendParametersTerrestrial.System_DVB_T2:
 					self.list.append(getConfigListEntry(_('PLP ID'), self.scan_ter.plp_id))
+			elif self.scan_typeterrestrial.value == "predefined_transponder":
+				tp_list = getRegionTerrestrialTransponderList(nimmanager.getTerrestrialDescription(index_to_scan))
+				if tp_list:
+					self.TerrestrialTransponders = ConfigSelection(choices=tp_list)
+					self.list.append(getConfigListEntry(_('Transponder'), self.TerrestrialTransponders))
 		self.list.append(getConfigListEntry(_("Network scan"), self.scan_networkScan))
 		self.list.append(getConfigListEntry(_("Clear before scan"), self.scan_clearallservices))
 		self.list.append(getConfigListEntry(_("Only free scan"), self.scan_onlyfree))
@@ -532,7 +549,7 @@
 					defaultCab["modulation"] = frontendData.get("modulation", eDVBFrontendParametersCable.Modulation_QAM16)
 					defaultTer["system"] = frontendData.get("system", eDVBFrontendParametersCable.System_DVB_C_ANNEX_A)
 				elif ttype == "DVB-T":
-					defaultTer["frequency"] = frontendData.get("frequency", 0)
+					defaultTer["frequency"] = frontendData.get("frequency", 47400000) / 1000
 					defaultTer["inversion"] = frontendData.get("inversion", eDVBFrontendParametersTerrestrial.Inversion_Unknown)
 					defaultTer["bandwidth"] = frontendData.get("bandwidth", 8000000)
 					defaultTer["fechigh"] = frontendData.get("code_rate_hp", eDVBFrontendParametersTerrestrial.FEC_Auto)
@@ -653,7 +670,7 @@
 				(eDVBFrontendParametersCable.System_DVB_C_ANNEX_C, _("DVB-C ANNEX C"))])
 
 			# terrestial
-			self.scan_ter.frequency = ConfigInteger(default = 474000, limits = (50000, 999000))
+			self.scan_ter.frequency = ConfigInteger(default = defaultTer["frequency"], limits = (50000, 999000))
 			self.scan_ter.channel = ConfigInteger(default = 21, limits = (1, 99))
 			self.scan_ter.inversion = ConfigSelection(default = defaultTer["inversion"], choices = [
 				(eDVBFrontendParametersTerrestrial.Inversion_Off, _("Off")),
@@ -728,7 +745,7 @@
 
 			self.scan_type = ConfigSelection(default = defaultSatSearchType, choices = [("single_transponder", _("User defined transponder")), ("predefined_transponder", _("Predefined transponder")), ("single_satellite", _("Single satellite")), ("multisat", _("Multisat")), ("multisat_yes", _("Multisat all select"))])
 			self.scan_typecable = ConfigSelection(default = "single_transponder", choices = [("single_transponder", _("Single transponder")), ("complete", _("Complete"))])
-			self.scan_typeterrestrial = ConfigSelection(default = "single_transponder", choices = [("single_transponder", _("Single transponder")), ("complete", _("Complete"))])
+			self.scan_typeterrestrial = ConfigSelection(default = "single_transponder", choices = [("single_transponder", _("User defined transponder")), ("predefined_transponder", _("Predefined transponder")), ("complete", _("Complete"))])
 			self.scan_input_as = ConfigSelection(default = "channel", choices = [("frequency", _("Frequency")), ("channel", _("Channel"))])
 			self.scan_clearallservices = ConfigSelection(default = "no", choices = [("no", _("no")), ("yes", _("yes")), ("yes_hold_feeds", _("yes (keep feeds)"))])
 			self.scan_onlyfree = ConfigYesNo(default = False)
@@ -894,6 +911,10 @@
 						hierarchy = self.scan_ter.hierarchy.value,
 						system = self.scan_ter.system.value,
 						plpid = self.scan_ter.plp_id.value)
+				removeAll = False
+			elif self.scan_typeterrestrial.value == "predefined_transponder":
+				if self.TerrestrialTransponders is not None:
+					tlist = [self.TerrestrialTransponders.value]
 				removeAll = False
 			elif self.scan_typeterrestrial.value == "complete":
 				getInitialTerrestrialTransponderList(tlist, nimmanager.getTerrestrialDescription(index_to_scan))

 


GigaBlue UHD Quad 4K /Lunix3-4K/Duo 4K


Re: Manual Scan add option "Predefined transponder" for DVB-T #2 Dimitrij

  • PLi® Core member
  • 10,331 posts

+350
Excellent

Posted 29 April 2014 - 05:15

littlesat

thanks.


GigaBlue UHD Quad 4K /Lunix3-4K/Duo 4K


Re: Manual Scan add option "Predefined transponder" for DVB-T #3 markbenson

  • Member
  • 1 posts

0
Neutral

Posted 13 May 2014 - 13:21

thanks ...it was good for me



Re: Manual Scan add option "Predefined transponder" for DVB-T #4 Huevos

  • PLi® Contributor
  • 4,663 posts

+163
Excellent

Posted 5 October 2014 - 16:50

Dima73, can you look at adding a default value to the predefined transponder so that if a DVB-T channel is active it will go directly to the same frequency. I did it with DVB-S predefined transponder a while back so try that to see what I mean.



Re: Manual Scan add option "Predefined transponder" for DVB-T #5 Huevos

  • PLi® Contributor
  • 4,663 posts

+163
Excellent

Posted 6 October 2014 - 23:11

Done that myself now. Also changed predefined list so it holds the index, rather than a list of tuner objects. This is how predefined list works for satellites (and in other plugins too, Sat finder for example). I can't see a need to re-invent the wheel (except to confuse people reading the code).

 

Code here,

https://github.com/O...b14db28ec3a7053


Edited by Huevos, 6 October 2014 - 23:12.


Re: Manual Scan add option "Predefined transponder" for DVB-T #6 littlesat

  • PLi® Core member
  • 57,186 posts

+699
Excellent

Posted 6 October 2014 - 23:21

Can you also create a patch for openpli?

WaveFrontier 28.2E | 23.5E | 19.2E | 16E | 13E | 10/9E | 7E | 5E | 1W | 4/5W | 15W


Re: Manual Scan add option "Predefined transponder" for DVB-T #7 Huevos

  • PLi® Contributor
  • 4,663 posts

+163
Excellent

Posted 7 October 2014 - 01:45

Yes, ok, when I get a minute.

 

A diff and a .py so you can test in OpenPLi.



Re: Manual Scan add option "Predefined transponder" for DVB-T #8 littlesat

  • PLi® Core member
  • 57,186 posts

+699
Excellent

Posted 7 October 2014 - 06:29

That is also ok...

WaveFrontier 28.2E | 23.5E | 19.2E | 16E | 13E | 10/9E | 7E | 5E | 1W | 4/5W | 15W


Re: Manual Scan add option "Predefined transponder" for DVB-T #9 Erik Slagter

  • PLi® Core member
  • 46,969 posts

+542
Excellent

Posted 7 October 2014 - 16:53

Thx!


* Wavefrontier T90 with 28E/23E/19E/13E via SCR switches 2 x 2 x 6 user bands
I don't read PM -> if you have something to ask or to report, do it in the forum so others can benefit. I don't take freelance jobs.
Ik lees geen PM -> als je iets te vragen of te melden hebt, doe het op het forum, zodat anderen er ook wat aan hebben.


Re: Manual Scan add option "Predefined transponder" for DVB-T #10 littlesat

  • PLi® Core member
  • 57,186 posts

+699
Excellent

Posted 7 October 2014 - 22:02

I suggest we simply should be a bit patient.... ;)


WaveFrontier 28.2E | 23.5E | 19.2E | 16E | 13E | 10/9E | 7E | 5E | 1W | 4/5W | 15W


Re: Manual Scan add option "Predefined transponder" for DVB-T #11 Huevos

  • PLi® Contributor
  • 4,663 posts

+163
Excellent

Posted 8 October 2014 - 08:06

I suggest we simply should be a bit patient.... ;)

I'll try to do it later today.



Re: Manual Scan add option "Predefined transponder" for DVB-T #12 Huevos

  • PLi® Contributor
  • 4,663 posts

+163
Excellent

Posted 8 October 2014 - 17:15

I've merged my changes into OpenPLi's ScanSetup.py but not tested on OpenPLi. Changes mean predefined terrestrial transponder list now opens on the currently active service.

 

Also, now there is continuity between how predefined satellite transponder list works and how predefined terrestrial transponder list works. Similar code. ;)

 

And cures at least one potential GSoD.

Attached Files


Edited by Huevos, 8 October 2014 - 17:16.


Re: Manual Scan add option "Predefined transponder" for DVB-T #13 littlesat

  • PLi® Core member
  • 57,186 posts

+699
Excellent

Posted 8 October 2014 - 21:36

Why not tested?

WaveFrontier 28.2E | 23.5E | 19.2E | 16E | 13E | 10/9E | 7E | 5E | 1W | 4/5W | 15W


Re: Manual Scan add option "Predefined transponder" for DVB-T #14 Huevos

  • PLi® Contributor
  • 4,663 posts

+163
Excellent

Posted 8 October 2014 - 23:55

Why not tested?

Littlesat, it is well tested code, it's just that I don't currently have OpenPLi loaded on any of my STB's. File version is latest OpenPLi from OpenPLi git.


Edited by Huevos, 8 October 2014 - 23:57.


Re: Manual Scan add option "Predefined transponder" for DVB-T #15 Erik Slagter

  • PLi® Core member
  • 46,969 posts

+542
Excellent

Posted 9 October 2014 - 14:33

Littlesat if you test, I will apply tomorrow.


* Wavefrontier T90 with 28E/23E/19E/13E via SCR switches 2 x 2 x 6 user bands
I don't read PM -> if you have something to ask or to report, do it in the forum so others can benefit. I don't take freelance jobs.
Ik lees geen PM -> als je iets te vragen of te melden hebt, doe het op het forum, zodat anderen er ook wat aan hebben.


Re: Manual Scan add option "Predefined transponder" for DVB-T #16 Rob van der Does

  • Senior Member
  • 7,766 posts

+184
Excellent

Posted 9 October 2014 - 15:04

It has been applied at 07.33 today.



Re: Manual Scan add option "Predefined transponder" for DVB-T #17 Erik Slagter

  • PLi® Core member
  • 46,969 posts

+542
Excellent

Posted 9 October 2014 - 15:07

And Littlesat forgot to mention that :mellow:


* Wavefrontier T90 with 28E/23E/19E/13E via SCR switches 2 x 2 x 6 user bands
I don't read PM -> if you have something to ask or to report, do it in the forum so others can benefit. I don't take freelance jobs.
Ik lees geen PM -> als je iets te vragen of te melden hebt, doe het op het forum, zodat anderen er ook wat aan hebben.


Re: Manual Scan add option "Predefined transponder" for DVB-T #18 littlesat

  • PLi® Core member
  • 57,186 posts

+699
Excellent

Posted 9 October 2014 - 16:58

Sorry Erik...


WaveFrontier 28.2E | 23.5E | 19.2E | 16E | 13E | 10/9E | 7E | 5E | 1W | 4/5W | 15W


Re: Manual Scan add option "Predefined transponder" for DVB-T #19 Rob van der Does

  • Senior Member
  • 7,766 posts

+184
Excellent

Posted 9 October 2014 - 17:44

mod edit:  removed



Re: Manual Scan add option "Predefined transponder" for DVB-T #20 Rob van der Does

  • Senior Member
  • 7,766 posts

+184
Excellent

Posted 9 October 2014 - 17:46

And Littlesat forgot to mention that :mellow:

That's what the repos is for :P




5 user(s) are reading this topic

0 members, 5 guests, 0 anonymous users