mirror of
https://github.com/tuxbox-neutrino/neutrino.git
synced 2025-08-31 01:11:12 +02:00
getservices: improve upgrading from old neutrino-hd
This commit is contained in:
@@ -544,6 +544,8 @@ int CServiceManager::LoadMotorPositions(void)
|
|||||||
|
|
||||||
printf("[getservices] loading motor positions...\n");
|
printf("[getservices] loading motor positions...\n");
|
||||||
|
|
||||||
|
/* this is only read and never written, so it only serves for
|
||||||
|
* upgrading from old pre-multituner capable neutrino */
|
||||||
if ((fd = fopen(SATCONFIG, "r"))) {
|
if ((fd = fopen(SATCONFIG, "r"))) {
|
||||||
fgets(buffer, 255, fd);
|
fgets(buffer, 255, fd);
|
||||||
while(!feof(fd)) {
|
while(!feof(fd)) {
|
||||||
@@ -554,6 +556,9 @@ int CServiceManager::LoadMotorPositions(void)
|
|||||||
uniscr = -1;
|
uniscr = -1;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
int configured = 0;
|
||||||
|
if (diseqc != -1 || com != -1 || uncom != -1 || usals != 0 || mpos != 0)
|
||||||
|
configured = 1;
|
||||||
satellitePosition = spos;
|
satellitePosition = spos;
|
||||||
sat_iterator_t sit = satellitePositions.find(satellitePosition);
|
sat_iterator_t sit = satellitePositions.find(satellitePosition);
|
||||||
if(sit != satellitePositions.end()) {
|
if(sit != satellitePositions.end()) {
|
||||||
@@ -571,6 +576,7 @@ int CServiceManager::LoadMotorPositions(void)
|
|||||||
sit->second.unicable_scr = uniscr;
|
sit->second.unicable_scr = uniscr;
|
||||||
sit->second.unicable_qrg = uniqrg;
|
sit->second.unicable_qrg = uniqrg;
|
||||||
sit->second.unicable_lnb = unilnb;
|
sit->second.unicable_lnb = unilnb;
|
||||||
|
sit->second.configured = configured;
|
||||||
}
|
}
|
||||||
fgets(buffer, 255, fd);
|
fgets(buffer, 255, fd);
|
||||||
}
|
}
|
||||||
|
Reference in New Issue
Block a user