From ee9b3bf44f12cd9c0799b3a250811beb25310eee Mon Sep 17 00:00:00 2001 From: Ralph Metzler Date: Mon, 7 Sep 2015 02:20:17 +0200 Subject: [PATCH] add JESS support --- octoserve/dvb.c | 4 +--- octoserve/var/www/scif.html | 5 +++-- octoserve/var/www/scifdb.lua | 5 +++-- 3 files changed, 7 insertions(+), 7 deletions(-) diff --git a/octoserve/dvb.c b/octoserve/dvb.c index d1e0049..7ac11fd 100644 --- a/octoserve/dvb.c +++ b/octoserve/dvb.c @@ -262,7 +262,7 @@ static int set_en50607(int fd, uint32_t freq, uint32_t sr, .msg = {0x70, 0x00, 0x00, 0x00, 0x00}, .msg_len = 4 }; - uint32_t t = (freq / 1000) - 100; + uint32_t t = freq - 100; hor &= 1; cmd.msg[1] = slot << 3; @@ -1241,8 +1241,6 @@ void scif_config(struct octoserve *os, char *name, char *val) char *end; unsigned long int nr = strtoul(val, &end, 10), freq = 0; - if (nr > 8) - return; if (*end == ',') { val = end + 1; freq = strtoul(val, &end, 10); diff --git a/octoserve/var/www/scif.html b/octoserve/var/www/scif.html index 2ccce54..862d35f 100644 --- a/octoserve/var/www/scif.html +++ b/octoserve/var/www/scif.html @@ -65,11 +65,12 @@ function SaveSettings() { if( SCIFEnabled ) { - param = 'Manufacturer='+SelectedManufacturer+'&Unit='+SelectedUnit+'&Type=1'; + CurUnit = ManufacturerList[SelectedManufacturer].UnitList[SelectedUnit]; + Protocol = CurUnit.Protocol == "EN50607" ? '2' : '1'; + param = 'Manufacturer='+SelectedManufacturer+'&Unit='+SelectedUnit+'&Type='+Protocol; for( i = 0; i < TunerList.length; i++ ) { param += '&Tuner'+(i+1)+'='; - CurUnit = ManufacturerList[SelectedManufacturer].UnitList[SelectedUnit]; SelectedFrequency = TunerList[i].Select.selectedIndex; if( SelectedFrequency > 0 ) param += SelectedFrequency + ',' + CurUnit.Frequencies[SelectedFrequency-1]; diff --git a/octoserve/var/www/scifdb.lua b/octoserve/var/www/scifdb.lua index 1bd609c..b3702d1 100644 --- a/octoserve/var/www/scifdb.lua +++ b/octoserve/var/www/scifdb.lua @@ -27,7 +27,7 @@ for i,child in ipairs(dom.kids) do local Manufacturer = unit.attr["Manufacturer"]; local Type = unit.attr["Type"]; local Protocol = unit.attr["Protocol"]; - if not Protocol then Protocol = "" end + if not Protocol then Protocol = "EN50494" end if not Manufacturer then Manufacturer = "" end if not Type then Type = "LNB" end -- print ( " ",Name,Manufacturer,Type) @@ -39,7 +39,7 @@ for i,child in ipairs(dom.kids) do ManufacturerArray[ManufacturerCount] = CurManu end CurManu.UnitCount = CurManu.UnitCount + 1 - local CurUnit = { Name = Name, Type = Type, Frequencies = {} } + local CurUnit = { Name = Name, Type = Type, Protocol = Protocol, Frequencies = {} } CurManu.UnitList[CurManu.UnitCount] = CurUnit local fcount = 0 for k,Frequency in ipairs(unit.kids) do @@ -74,6 +74,7 @@ for i,CurManu in ipairs(ManufacturerArray) do print("") print(string.format("ManufacturerList[%d].UnitList[%d] = new Object();",i-1,j-1)) print(string.format("ManufacturerList[%d].UnitList[%d].Name = \"%s\";",i-1,j-1,CurUnit.Name)) + print(string.format("ManufacturerList[%d].UnitList[%d].Protocol = \"%s\";",i-1,j-1,CurUnit.Protocol)) print(string.format("ManufacturerList[%d].UnitList[%d].Frequencies = new Array();",i-1,j-1)) for k,Frequency in ipairs(CurUnit.Frequencies) do print(string.format("ManufacturerList[%d].UnitList[%d].Frequencies[%d] = %d;",i-1,j-1,k-1,Frequency))