1 #include <lib/dvb/dvb.h>
2 #include <lib/dvb/sec.h>
3 #include <lib/dvb/rotor_calc.h>
4 #include <lib/dvb/dvbtime.h>
8 #if HAVE_DVB_API_VERSION < 3
9 #define FREQUENCY Frequency
11 #define FREQUENCY frequency
13 #include <lib/base/eerror.h>
18 #define eSecDebug(arg...) eDebug(arg)
20 #define eSecDebug(arg...)
23 DEFINE_REF(eDVBSatelliteEquipmentControl);
25 eDVBSatelliteEquipmentControl *eDVBSatelliteEquipmentControl::instance;
27 int eDVBSatelliteEquipmentControl::m_params[MAX_PARAMS];
29 defaults are set in python lib/python/Components/NimManager.py
30 in InitSecParams function via setParam call
33 void eDVBSatelliteEquipmentControl::setParam(int param, int value)
35 if (param >= 0 && param < MAX_PARAMS)
36 m_params[param]=value;
39 eDVBSatelliteEquipmentControl::eDVBSatelliteEquipmentControl(eSmartPtrList<eDVBRegisteredFrontend> &avail_frontends)
40 :m_lnbidx(-1), m_curSat(m_lnbs[0].m_satellites.end()), m_avail_frontends(avail_frontends), m_rotorMoving(false)
51 setLNBThreshold(11700000);
53 setDiSEqCMode(eDVBSatelliteDiseqcParameters::V1_0);
54 setToneburst(eDVBSatelliteDiseqcParameters::NO);
56 setCommittedCommand(eDVBSatelliteDiseqcParameters::BB);
57 setCommandOrder(0); // committed, toneburst
61 setVoltageMode(eDVBSatelliteSwitchParameters::HV);
62 setToneMode(eDVBSatelliteSwitchParameters::HILO);
68 setLNBThreshold(11700000);
70 setDiSEqCMode(eDVBSatelliteDiseqcParameters::V1_0);
71 setToneburst(eDVBSatelliteDiseqcParameters::NO);
73 setCommittedCommand(eDVBSatelliteDiseqcParameters::AB);
74 setCommandOrder(0); // committed, toneburst
78 setVoltageMode(eDVBSatelliteSwitchParameters::HV);
79 setToneMode(eDVBSatelliteSwitchParameters::HILO);
85 setLNBThreshold(11700000);
87 setDiSEqCMode(eDVBSatelliteDiseqcParameters::V1_2);
88 setToneburst(eDVBSatelliteDiseqcParameters::NO);
90 setCommittedCommand(eDVBSatelliteDiseqcParameters::AA);
91 setCommandOrder(0); // committed, toneburst
94 setLaDirection(eDVBSatelliteRotorParameters::NORTH);
95 setLoDirection(eDVBSatelliteRotorParameters::EAST);
98 setUseInputpower(true);
99 setInputpowerDelta(50);
102 setVoltageMode(eDVBSatelliteSwitchParameters::HV);
103 setToneMode(eDVBSatelliteSwitchParameters::HILO);
107 setVoltageMode(eDVBSatelliteSwitchParameters::HV);
108 setToneMode(eDVBSatelliteSwitchParameters::HILO);
112 setVoltageMode(eDVBSatelliteSwitchParameters::HV);
113 setToneMode(eDVBSatelliteSwitchParameters::HILO);
114 setRotorPosNum(1); // stored pos 1
117 int eDVBSatelliteEquipmentControl::canTune(const eDVBFrontendParametersSatellite &sat, iDVBFrontend *fe, int slot_id )
119 int ret=0, satcount=0;
121 for (int idx=0; idx <= m_lnbidx; ++idx )
124 eDVBSatelliteLNBParameters &lnb_param = m_lnbs[idx];
125 if ( lnb_param.slot_mask & slot_id ) // lnb for correct tuner?
127 eDVBSatelliteDiseqcParameters &di_param = lnb_param.m_diseqc_parameters;
129 satcount += lnb_param.m_satellites.size();
131 std::map<int, eDVBSatelliteSwitchParameters>::iterator sit =
132 lnb_param.m_satellites.find(sat.orbital_position);
133 if ( sit != lnb_param.m_satellites.end())
138 satpos_depends_ptr=-1,
139 csw = di_param.m_committed_cmd,
140 ucsw = di_param.m_uncommitted_cmd,
141 toneburst = di_param.m_toneburst_param,
144 fe->getData(eDVBFrontend::LINKED_PREV_PTR, linked_prev_ptr);
145 fe->getData(eDVBFrontend::SATPOS_DEPENDS_PTR, satpos_depends_ptr);
147 if ( sat.frequency > lnb_param.m_lof_threshold )
149 if (!(sat.polarisation & eDVBFrontendParametersSatellite::Polarisation::Vertical))
154 if (di_param.m_diseqc_mode >= eDVBSatelliteDiseqcParameters::V1_0)
157 if ( di_param.m_committed_cmd < eDVBSatelliteDiseqcParameters::SENDNO )
158 csw = 0xF0 | (csw << 2);
160 if (di_param.m_committed_cmd <= eDVBSatelliteDiseqcParameters::SENDNO)
163 if ( di_param.m_diseqc_mode == eDVBSatelliteDiseqcParameters::V1_2 ) // ROTOR
174 if (m_not_linked_slot_mask & slot_id) // frontend with direct connection?
179 fe->getData(eDVBFrontend::ROTOR_POS, curRotorPos);
180 fe->getData(eDVBFrontend::LINKED_NEXT_PTR, linked_next_ptr);
181 fe->getData(eDVBFrontend::CSW, ocsw);
182 fe->getData(eDVBFrontend::UCSW, oucsw);
183 fe->getData(eDVBFrontend::TONEBURST, oToneburst);
184 while (ret && linked_prev_ptr != -1) // check for linked tuners..
186 eDVBRegisteredFrontend *linked_fe = (eDVBRegisteredFrontend*) linked_prev_ptr;
187 if (linked_fe->m_inuse)
189 if ( (csw != ocsw) ||
190 ( diseqc && (ucsw != oucsw || toneburst != oToneburst) ) ||
191 ( rotor && curRotorPos != sat.orbital_position ) )
196 linked_fe->m_frontend->getData(eDVBFrontend::LINKED_PREV_PTR, (long&)linked_prev_ptr);
198 while (ret && linked_next_ptr != -1) // check for linked tuners..
200 eDVBRegisteredFrontend *linked_fe = (eDVBRegisteredFrontend*) linked_next_ptr;
201 if (linked_fe->m_inuse)
203 if ( (csw != ocsw) ||
204 ( diseqc && (ucsw != oucsw || toneburst != oToneburst) ) ||
205 ( rotor && curRotorPos != sat.orbital_position ) )
210 linked_fe->m_frontend->getData(eDVBFrontend::LINKED_NEXT_PTR, (long&)linked_next_ptr);
213 else // linked frontend..
218 while (linked_prev_ptr != -1)
220 eDVBRegisteredFrontend *linked_fe = (eDVBRegisteredFrontend*) linked_prev_ptr;
221 linked_fe->m_frontend->getData(eDVBFrontend::LINKED_PREV_PTR, (long&)linked_prev_ptr);
222 if (linked_prev_ptr == -1)
224 iDVBFrontend *sec_fe = linked_fe->m_frontend;
225 sec_fe->getData(eDVBFrontend::ROTOR_POS, curRotorPos);
226 if (linked_fe->m_inuse)
228 sec_fe->getData(eDVBFrontend::CSW, ocsw);
229 sec_fe->getData(eDVBFrontend::UCSW, oucsw);
230 sec_fe->getData(eDVBFrontend::TONEBURST, oToneburst);
231 if ( (csw != ocsw) ||
232 ( diseqc && (ucsw != oucsw || toneburst != oToneburst) ) ||
233 ( rotor && curRotorPos != sat.orbital_position ) )
242 if (ret && rotor && curRotorPos != -1)
243 ret -= abs(curRotorPos-sat.orbital_position);
246 if (satpos_depends_ptr != -1)
248 eDVBRegisteredFrontend *satpos_depends_to_fe = (eDVBRegisteredFrontend*) satpos_depends_ptr;
249 if ( satpos_depends_to_fe->m_inuse )
251 if (!rotor || curRotorPos != sat.orbital_position)
258 int lof = sat.frequency > lnb_param.m_lof_threshold ?
259 lnb_param.m_lof_hi : lnb_param.m_lof_lo;
260 int tuner_freq = abs(sat.frequency - lof);
261 if (tuner_freq < 900000 || tuner_freq > 2200000)
269 if (ret && m_not_linked_slot_mask & slot_id)
270 ret += 5; // increase score for tuners with direct sat connection
274 bool need_turn_fast(int turn_speed)
276 if (turn_speed == eDVBSatelliteRotorParameters::FAST)
278 else if (turn_speed != eDVBSatelliteRotorParameters::SLOW)
280 int begin = turn_speed >> 16; // high word is start time
281 int end = turn_speed&0xFFFF; // low word is end time
282 time_t now_time = ::time(0);
284 localtime_r(&now_time, &nowTime);
285 int now = (nowTime.tm_hour + 1) * 60 + nowTime.tm_min + 1;
286 bool neg = end <= begin;
292 if ((now >= begin && now < end) ^ neg)
298 #define VOLTAGE(x) (lnb_param.m_increased_voltage ? iDVBFrontend::voltage##x##_5 : iDVBFrontend::voltage##x)
300 RESULT eDVBSatelliteEquipmentControl::prepare(iDVBFrontend &frontend, FRONTENDPARAMETERS &parm, const eDVBFrontendParametersSatellite &sat, int slot_id, unsigned int tunetimeout)
302 for (int idx=0; idx <= m_lnbidx; ++idx )
304 eDVBSatelliteLNBParameters &lnb_param = m_lnbs[idx];
305 if (!(lnb_param.slot_mask & slot_id)) // lnb for correct tuner?
307 eDVBSatelliteDiseqcParameters &di_param = lnb_param.m_diseqc_parameters;
308 eDVBSatelliteRotorParameters &rotor_param = lnb_param.m_rotor_parameters;
310 std::map<int, eDVBSatelliteSwitchParameters>::iterator sit =
311 lnb_param.m_satellites.find(sat.orbital_position);
312 if ( sit != lnb_param.m_satellites.end())
314 eDVBSatelliteSwitchParameters &sw_param = sit->second;
315 bool doSetFrontend = true;
316 bool doSetVoltageToneFrontend = true;
317 bool allowDiseqc1_2 = true;
319 voltage = iDVBFrontend::voltageOff,
320 tone = iDVBFrontend::toneOff,
321 csw = di_param.m_committed_cmd,
322 ucsw = di_param.m_uncommitted_cmd,
323 toneburst = di_param.m_toneburst_param,
329 satposDependPtr = -1;
330 iDVBFrontend *sec_fe=&frontend;
332 frontend.getData(eDVBFrontend::SATPOS_DEPENDS_PTR, satposDependPtr);
334 if (!(m_not_linked_slot_mask & slot_id)) // frontend with direct connection?
336 long linked_prev_ptr;
337 frontend.getData(eDVBFrontend::LINKED_PREV_PTR, linked_prev_ptr);
338 while (linked_prev_ptr != -1)
340 eDVBRegisteredFrontend *linked_fe = (eDVBRegisteredFrontend*) linked_prev_ptr;
341 sec_fe = linked_fe->m_frontend;
342 sec_fe->getData(eDVBFrontend::LINKED_PREV_PTR, (long&)linked_prev_ptr);
344 if (satposDependPtr != -1)
345 allowDiseqc1_2 = false;
348 sec_fe->getData(eDVBFrontend::CSW, lastcsw);
349 sec_fe->getData(eDVBFrontend::UCSW, lastucsw);
350 sec_fe->getData(eDVBFrontend::TONEBURST, lastToneburst);
351 sec_fe->getData(eDVBFrontend::ROTOR_CMD, lastRotorCmd);
352 sec_fe->getData(eDVBFrontend::ROTOR_POS, curRotorPos);
354 if ( sat.frequency > lnb_param.m_lof_threshold )
358 parm.FREQUENCY = sat.frequency - lnb_param.m_lof_hi;
360 parm.FREQUENCY = sat.frequency - lnb_param.m_lof_lo;
362 parm.FREQUENCY = abs(parm.FREQUENCY);
364 frontend.setData(eDVBFrontend::FREQ_OFFSET, sat.frequency - parm.FREQUENCY);
366 if (!(sat.polarisation & eDVBFrontendParametersSatellite::Polarisation::Vertical))
369 if ( sw_param.m_voltage_mode == eDVBSatelliteSwitchParameters::_14V
370 || ( sat.polarisation & eDVBFrontendParametersSatellite::Polarisation::Vertical
371 && sw_param.m_voltage_mode == eDVBSatelliteSwitchParameters::HV ) )
372 voltage = VOLTAGE(13);
373 else if ( sw_param.m_voltage_mode == eDVBSatelliteSwitchParameters::_18V
374 || ( !(sat.polarisation & eDVBFrontendParametersSatellite::Polarisation::Vertical)
375 && sw_param.m_voltage_mode == eDVBSatelliteSwitchParameters::HV ) )
376 voltage = VOLTAGE(18);
377 if ( (sw_param.m_22khz_signal == eDVBSatelliteSwitchParameters::ON)
378 || ( sw_param.m_22khz_signal == eDVBSatelliteSwitchParameters::HILO && (band&1) ) )
379 tone = iDVBFrontend::toneOn;
380 else if ( (sw_param.m_22khz_signal == eDVBSatelliteSwitchParameters::OFF)
381 || ( sw_param.m_22khz_signal == eDVBSatelliteSwitchParameters::HILO && !(band&1) ) )
382 tone = iDVBFrontend::toneOff;
384 eSecCommandList sec_sequence;
386 if (di_param.m_diseqc_mode >= eDVBSatelliteDiseqcParameters::V1_0)
388 if ( di_param.m_committed_cmd < eDVBSatelliteDiseqcParameters::SENDNO )
389 csw = 0xF0 | (csw << 2);
391 if (di_param.m_committed_cmd <= eDVBSatelliteDiseqcParameters::SENDNO)
395 (di_param.m_committed_cmd != eDVBSatelliteDiseqcParameters::SENDNO);
396 bool changed_csw = send_csw && csw != lastcsw;
399 (di_param.m_uncommitted_cmd && di_param.m_diseqc_mode > eDVBSatelliteDiseqcParameters::V1_0);
400 bool changed_ucsw = send_ucsw && ucsw != lastucsw;
403 (di_param.m_toneburst_param != eDVBSatelliteDiseqcParameters::NO);
404 bool changed_burst = send_burst && toneburst != lastToneburst;
406 int send_mask = 0; /*
409 4 send toneburst first
410 8 send toneburst at end */
411 if (changed_burst) // toneburst first and toneburst changed
413 if (di_param.m_command_order&1)
427 if ((di_param.m_command_order&4) && send_csw)
429 if (di_param.m_command_order==4 && send_burst)
434 if ( di_param.m_use_fast
435 && di_param.m_committed_cmd < eDVBSatelliteDiseqcParameters::SENDNO
437 && ((csw / 4) == (lastcsw / 4)) )
438 eDebug("dont send committed cmd (fast diseqc)");
442 if (!(di_param.m_command_order&4) && send_ucsw)
444 if (!(di_param.m_command_order&1) && send_burst)
450 eDebugNoNewLine("sendmask: ");
451 for (int i=3; i >= 0; --i)
452 if ( send_mask & (1<<i) )
453 eDebugNoNewLine("1");
455 eDebugNoNewLine("0");
458 if (doSetVoltageToneFrontend)
461 bool useGotoXX = false;
462 if ( di_param.m_diseqc_mode == eDVBSatelliteDiseqcParameters::V1_2
463 && !sat.no_rotor_command_on_tune
466 if (sw_param.m_rotorPosNum) // we have stored rotor pos?
467 RotorCmd=sw_param.m_rotorPosNum;
468 else // we must calc gotoxx cmd
470 eDebug("Entry for %d,%d? not in Rotor Table found... i try gotoXX?", sat.orbital_position / 10, sat.orbital_position % 10 );
473 double SatLon = abs(sat.orbital_position)/10.00,
474 SiteLat = rotor_param.m_gotoxx_parameters.m_latitude,
475 SiteLon = rotor_param.m_gotoxx_parameters.m_longitude;
477 if ( rotor_param.m_gotoxx_parameters.m_la_direction == eDVBSatelliteRotorParameters::SOUTH )
480 if ( rotor_param.m_gotoxx_parameters.m_lo_direction == eDVBSatelliteRotorParameters::WEST )
481 SiteLon = 360 - SiteLon;
483 eDebug("siteLatitude = %lf, siteLongitude = %lf, %lf degrees", SiteLat, SiteLon, SatLon );
484 double satHourAngle =
485 calcSatHourangle( SatLon, SiteLat, SiteLon );
486 eDebug("PolarmountHourAngle=%lf", satHourAngle );
488 static int gotoXTable[10] =
489 { 0x00, 0x02, 0x03, 0x05, 0x06, 0x08, 0x0A, 0x0B, 0x0D, 0x0E };
491 if (SiteLat >= 0) // Northern Hemisphere
493 int tmp=(int)round( fabs( 180 - satHourAngle ) * 10.0 );
494 RotorCmd = (tmp/10)*0x10 + gotoXTable[ tmp % 10 ];
496 if (satHourAngle < 180) // the east
501 else // Southern Hemisphere
503 if (satHourAngle < 180) // the east
505 int tmp=(int)round( fabs( satHourAngle ) * 10.0 );
506 RotorCmd = (tmp/10)*0x10 + gotoXTable[ tmp % 10 ];
511 int tmp=(int)round( fabs( 360 - satHourAngle ) * 10.0 );
512 RotorCmd = (tmp/10)*0x10 + gotoXTable[ tmp % 10 ];
516 eDebug("RotorCmd = %04x", RotorCmd);
522 int vlt = iDVBFrontend::voltageOff;
523 eSecCommand::pair compare;
525 compare.tone = iDVBFrontend::toneOff;
526 sec_sequence.push_back( eSecCommand(eSecCommand::IF_TONE_GOTO, compare) );
527 sec_sequence.push_back( eSecCommand(eSecCommand::SET_TONE, iDVBFrontend::toneOff) );
528 sec_sequence.push_back( eSecCommand(eSecCommand::SLEEP, m_params[DELAY_AFTER_CONT_TONE]) );
530 if ( RotorCmd != -1 && RotorCmd != lastRotorCmd )
532 if (rotor_param.m_inputpower_parameters.m_use)
533 vlt = VOLTAGE(18); // in input power mode set 18V for measure input power
535 vlt = VOLTAGE(13); // in normal mode start turning with 13V
540 // check if voltage is already correct..
541 compare.voltage = vlt;
543 sec_sequence.push_back( eSecCommand(eSecCommand::IF_VOLTAGE_GOTO, compare) );
545 // check if voltage is disabled
546 compare.voltage = iDVBFrontend::voltageOff;
548 sec_sequence.push_back( eSecCommand(eSecCommand::IF_VOLTAGE_GOTO, compare) );
550 // voltage is changed... use DELAY_AFTER_VOLTAGE_CHANGE_BEFORE_SWITCH_CMDS
551 sec_sequence.push_back( eSecCommand(eSecCommand::SET_VOLTAGE, vlt) );
552 sec_sequence.push_back( eSecCommand(eSecCommand::SLEEP, m_params[DELAY_AFTER_VOLTAGE_CHANGE_BEFORE_SWITCH_CMDS]) );
553 sec_sequence.push_back( eSecCommand(eSecCommand::GOTO, +3) );
555 // voltage was disabled.. use DELAY_AFTER_ENABLE_VOLTAGE_BEFORE_SWITCH_CMDS
556 sec_sequence.push_back( eSecCommand(eSecCommand::SET_VOLTAGE, vlt) );
557 sec_sequence.push_back( eSecCommand(eSecCommand::SLEEP, m_params[DELAY_AFTER_ENABLE_VOLTAGE_BEFORE_SWITCH_CMDS]) );
559 for (int seq_repeat = 0; seq_repeat < (di_param.m_seq_repeat?2:1); ++seq_repeat)
563 sec_sequence.push_back( eSecCommand(eSecCommand::SEND_TONEBURST, di_param.m_toneburst_param) );
564 sec_sequence.push_back( eSecCommand(eSecCommand::SLEEP, m_params[DELAY_AFTER_TONEBURST]) );
574 loops <<= di_param.m_repeats;
576 for ( int i = 0; i < loops;) // fill commands...
578 eDVBDiseqcCommand diseqc;
579 memset(diseqc.data, 0, MAX_DISEQC_LENGTH);
581 diseqc.data[0] = i ? 0xE1 : 0xE0;
582 diseqc.data[1] = 0x10;
583 if ( (send_mask & 2) && (di_param.m_command_order & 4) )
585 diseqc.data[2] = 0x39;
586 diseqc.data[3] = ucsw;
588 else if ( send_mask & 1 )
590 diseqc.data[2] = 0x38;
591 diseqc.data[3] = csw;
593 else // no committed command confed.. so send uncommitted..
595 diseqc.data[2] = 0x39;
596 diseqc.data[3] = ucsw;
598 sec_sequence.push_back( eSecCommand(eSecCommand::SEND_DISEQC, diseqc) );
604 if (diseqc.data[2] == 0x38 && (send_mask & 2))
606 else if (diseqc.data[2] == 0x39 && (send_mask & 1))
608 int tmp = m_params[DELAY_BETWEEN_DISEQC_REPEATS];
611 int delay = di_param.m_repeats ? (tmp - 54) / 2 : tmp; // standard says 100msek between two repeated commands
612 sec_sequence.push_back( eSecCommand(eSecCommand::SLEEP, delay) );
614 diseqc.data[3]=(cmd==0x38) ? csw : ucsw;
615 sec_sequence.push_back( eSecCommand(eSecCommand::SEND_DISEQC, diseqc) );
618 sec_sequence.push_back( eSecCommand(eSecCommand::SLEEP, delay ) );
620 sec_sequence.push_back( eSecCommand(eSecCommand::SLEEP, m_params[DELAY_AFTER_LAST_DISEQC_CMD]) );
622 else // delay 120msek when no command is in repeat gap
623 sec_sequence.push_back( eSecCommand(eSecCommand::SLEEP, tmp) );
626 sec_sequence.push_back( eSecCommand(eSecCommand::SLEEP, m_params[DELAY_AFTER_LAST_DISEQC_CMD]) );
629 if ( send_mask & 8 ) // toneburst at end of sequence
631 sec_sequence.push_back( eSecCommand(eSecCommand::SEND_TONEBURST, di_param.m_toneburst_param) );
632 sec_sequence.push_back( eSecCommand(eSecCommand::SLEEP, m_params[DELAY_AFTER_TONEBURST]) );
637 eDebug("RotorCmd %02x, lastRotorCmd %02lx", RotorCmd, lastRotorCmd);
638 if ( RotorCmd != -1 && RotorCmd != lastRotorCmd )
640 eSecCommand::pair compare;
644 compare.tone = iDVBFrontend::toneOff;
645 sec_sequence.push_back( eSecCommand(eSecCommand::IF_TONE_GOTO, compare) );
646 sec_sequence.push_back( eSecCommand(eSecCommand::SET_TONE, iDVBFrontend::toneOff) );
647 sec_sequence.push_back( eSecCommand(eSecCommand::SLEEP, m_params[DELAY_AFTER_CONT_TONE]) );
649 compare.voltage = iDVBFrontend::voltageOff;
651 // the next is a check if voltage is switched off.. then we first set a voltage :)
652 // else we set voltage after all diseqc stuff..
653 sec_sequence.push_back( eSecCommand(eSecCommand::IF_NOT_VOLTAGE_GOTO, compare) );
655 if (rotor_param.m_inputpower_parameters.m_use)
656 sec_sequence.push_back( eSecCommand(eSecCommand::SET_VOLTAGE, VOLTAGE(18)) ); // set 18V for measure input power
658 sec_sequence.push_back( eSecCommand(eSecCommand::SET_VOLTAGE, VOLTAGE(13)) ); // in normal mode start turning with 13V
660 sec_sequence.push_back( eSecCommand(eSecCommand::SLEEP, m_params[DELAY_AFTER_ENABLE_VOLTAGE_BEFORE_MOTOR_CMD]) ); // wait 750ms when voltage was disabled
661 sec_sequence.push_back( eSecCommand(eSecCommand::GOTO, +9) ); // no need to send stop rotor cmd and recheck voltage
664 sec_sequence.push_back( eSecCommand(eSecCommand::SLEEP, m_params[DELAY_BETWEEN_SWITCH_AND_MOTOR_CMD]) ); // wait 700ms when diseqc changed
666 eDVBDiseqcCommand diseqc;
667 memset(diseqc.data, 0, MAX_DISEQC_LENGTH);
669 diseqc.data[0] = 0xE0;
670 diseqc.data[1] = 0x31; // positioner
671 diseqc.data[2] = 0x60; // stop
672 sec_sequence.push_back( eSecCommand(eSecCommand::IF_ROTORPOS_VALID_GOTO, +5) );
673 sec_sequence.push_back( eSecCommand(eSecCommand::SEND_DISEQC, diseqc) );
674 sec_sequence.push_back( eSecCommand(eSecCommand::SLEEP, 50) );
675 sec_sequence.push_back( eSecCommand(eSecCommand::SEND_DISEQC, diseqc) );
676 // wait 150msec after send rotor stop cmd
677 sec_sequence.push_back( eSecCommand(eSecCommand::SLEEP, m_params[DELAY_AFTER_MOTOR_STOP_CMD]) );
679 diseqc.data[0] = 0xE0;
680 diseqc.data[1] = 0x31; // positioner
684 diseqc.data[2] = 0x6E; // drive to angular position
685 diseqc.data[3] = ((RotorCmd & 0xFF00) / 0x100);
686 diseqc.data[4] = RotorCmd & 0xFF;
691 diseqc.data[2] = 0x6B; // goto stored sat position
692 diseqc.data[3] = RotorCmd;
693 diseqc.data[4] = 0x00;
696 if ( rotor_param.m_inputpower_parameters.m_use )
697 { // use measure rotor input power to detect rotor state
698 bool turn_fast = need_turn_fast(rotor_param.m_inputpower_parameters.m_turning_speed);
699 eSecCommand::rotor cmd;
700 eSecCommand::pair compare;
701 compare.voltage = VOLTAGE(18);
703 sec_sequence.push_back( eSecCommand(eSecCommand::IF_VOLTAGE_GOTO, compare) );
704 sec_sequence.push_back( eSecCommand(eSecCommand::SET_VOLTAGE, compare.voltage) );
705 // measure idle power values
706 sec_sequence.push_back( eSecCommand(eSecCommand::SLEEP, m_params[DELAY_AFTER_VOLTAGE_CHANGE_BEFORE_MEASURE_IDLE_INPUTPOWER]) ); // wait 150msec after voltage change
707 sec_sequence.push_back( eSecCommand(eSecCommand::MEASURE_IDLE_INPUTPOWER, 1) );
710 sec_sequence.push_back( eSecCommand(eSecCommand::IF_MEASURE_IDLE_WAS_NOT_OK_GOTO, compare) );
711 sec_sequence.push_back( eSecCommand(eSecCommand::SET_VOLTAGE, VOLTAGE(13)) );
712 sec_sequence.push_back( eSecCommand(eSecCommand::SLEEP, m_params[DELAY_AFTER_VOLTAGE_CHANGE_BEFORE_MEASURE_IDLE_INPUTPOWER]) ); // wait 150msec before measure
713 sec_sequence.push_back( eSecCommand(eSecCommand::MEASURE_IDLE_INPUTPOWER, 0) );
715 sec_sequence.push_back( eSecCommand(eSecCommand::IF_MEASURE_IDLE_WAS_NOT_OK_GOTO, compare) );
716 ////////////////////////////
717 sec_sequence.push_back( eSecCommand(eSecCommand::SET_POWER_LIMITING_MODE, eSecCommand::modeStatic) );
718 sec_sequence.push_back( eSecCommand(eSecCommand::SET_ROTOR_DISEQC_RETRYS, m_params[MOTOR_COMMAND_RETRIES]) ); // 2 retries
719 sec_sequence.push_back( eSecCommand(eSecCommand::INVALIDATE_CURRENT_ROTORPARMS) );
720 sec_sequence.push_back( eSecCommand(eSecCommand::SEND_DISEQC, diseqc) );
721 sec_sequence.push_back( eSecCommand(eSecCommand::SET_TIMEOUT, 40) ); // 2 seconds rotor start timout
723 sec_sequence.push_back( eSecCommand(eSecCommand::SLEEP, 50) ); // 50msec delay
724 sec_sequence.push_back( eSecCommand(eSecCommand::MEASURE_RUNNING_INPUTPOWER) );
725 cmd.direction=1; // check for running rotor
726 cmd.deltaA=rotor_param.m_inputpower_parameters.m_delta;
729 sec_sequence.push_back( eSecCommand(eSecCommand::IF_INPUTPOWER_DELTA_GOTO, cmd ) ); // check if rotor has started
730 sec_sequence.push_back( eSecCommand(eSecCommand::IF_TIMEOUT_GOTO, +2 ) ); // timeout .. we assume now the rotor is already at the correct position
731 sec_sequence.push_back( eSecCommand(eSecCommand::GOTO, -4) ); // goto loop start
732 sec_sequence.push_back( eSecCommand(eSecCommand::IF_NO_MORE_ROTOR_DISEQC_RETRYS_GOTO, turn_fast ? 9 : 8 ) ); // timeout .. we assume now the rotor is already at the correct position
733 sec_sequence.push_back( eSecCommand(eSecCommand::GOTO, -8) ); // goto loop start
736 sec_sequence.push_back( eSecCommand(eSecCommand::SET_VOLTAGE, VOLTAGE(18)) );
737 sec_sequence.push_back( eSecCommand(eSecCommand::SET_TIMEOUT, m_params[MOTOR_RUNNING_TIMEOUT]*20) ); // 2 minutes running timeout
738 // rotor running loop
739 sec_sequence.push_back( eSecCommand(eSecCommand::SLEEP, 50) ); // wait 50msec
740 sec_sequence.push_back( eSecCommand(eSecCommand::MEASURE_RUNNING_INPUTPOWER) );
741 cmd.direction=0; // check for stopped rotor
743 sec_sequence.push_back( eSecCommand(eSecCommand::IF_INPUTPOWER_DELTA_GOTO, cmd ) );
744 sec_sequence.push_back( eSecCommand(eSecCommand::IF_TIMEOUT_GOTO, +2 ) ); // timeout ? this should never happen
745 sec_sequence.push_back( eSecCommand(eSecCommand::GOTO, -4) ); // running loop start
746 /////////////////////
747 sec_sequence.push_back( eSecCommand(eSecCommand::UPDATE_CURRENT_ROTORPARAMS) );
748 sec_sequence.push_back( eSecCommand(eSecCommand::SET_POWER_LIMITING_MODE, eSecCommand::modeDynamic) );
751 { // use normal turning mode
752 doSetVoltageToneFrontend=false;
754 eSecCommand::rotor cmd;
755 eSecCommand::pair compare;
756 compare.voltage = VOLTAGE(13);
758 sec_sequence.push_back( eSecCommand(eSecCommand::IF_VOLTAGE_GOTO, compare) );
759 sec_sequence.push_back( eSecCommand(eSecCommand::SET_VOLTAGE, compare.voltage) );
760 sec_sequence.push_back( eSecCommand(eSecCommand::SLEEP, m_params[DELAY_AFTER_VOLTAGE_CHANGE_BEFORE_MOTOR_CMD]) ); // wait 150msec after voltage change
762 sec_sequence.push_back( eSecCommand(eSecCommand::SET_POWER_LIMITING_MODE, eSecCommand::modeStatic) );
763 sec_sequence.push_back( eSecCommand(eSecCommand::INVALIDATE_CURRENT_ROTORPARMS) );
764 sec_sequence.push_back( eSecCommand(eSecCommand::SEND_DISEQC, diseqc) );
766 compare.voltage = voltage;
768 sec_sequence.push_back( eSecCommand(eSecCommand::IF_VOLTAGE_GOTO, compare) ); // correct final voltage?
769 sec_sequence.push_back( eSecCommand(eSecCommand::SLEEP, 2000) ); // wait 2 second before set high voltage
770 sec_sequence.push_back( eSecCommand(eSecCommand::SET_VOLTAGE, voltage) );
773 sec_sequence.push_back( eSecCommand(eSecCommand::IF_TONE_GOTO, compare) );
774 sec_sequence.push_back( eSecCommand(eSecCommand::SET_TONE, tone) );
775 sec_sequence.push_back( eSecCommand(eSecCommand::SLEEP, m_params[DELAY_AFTER_CONT_TONE]) );
776 sec_sequence.push_back( eSecCommand(eSecCommand::SET_FRONTEND) );
778 cmd.direction=1; // check for running rotor
782 sec_sequence.push_back( eSecCommand(eSecCommand::SET_TIMEOUT, m_params[MOTOR_RUNNING_TIMEOUT]*4) ); // 2 minutes running timeout
783 sec_sequence.push_back( eSecCommand(eSecCommand::SLEEP, 250) ); // 250msec delay
784 sec_sequence.push_back( eSecCommand(eSecCommand::IF_TUNER_LOCKED_GOTO, cmd ) );
785 sec_sequence.push_back( eSecCommand(eSecCommand::IF_TIMEOUT_GOTO, +3 ) );
786 sec_sequence.push_back( eSecCommand(eSecCommand::GOTO, -3) ); // goto loop start
787 sec_sequence.push_back( eSecCommand(eSecCommand::UPDATE_CURRENT_ROTORPARAMS) );
788 sec_sequence.push_back( eSecCommand(eSecCommand::SET_POWER_LIMITING_MODE, eSecCommand::modeDynamic) );
790 sec_fe->setData(eDVBFrontend::NEW_ROTOR_CMD, RotorCmd);
791 sec_fe->setData(eDVBFrontend::NEW_ROTOR_POS, sat.orbital_position);
798 sec_fe->setData(eDVBFrontend::CSW, csw);
799 sec_fe->setData(eDVBFrontend::UCSW, ucsw);
800 sec_fe->setData(eDVBFrontend::TONEBURST, di_param.m_toneburst_param);
802 if (doSetVoltageToneFrontend)
804 eSecCommand::pair compare;
805 compare.voltage = voltage;
807 sec_sequence.push_back( eSecCommand(eSecCommand::IF_VOLTAGE_GOTO, compare) ); // voltage already correct ?
808 sec_sequence.push_back( eSecCommand(eSecCommand::SET_VOLTAGE, voltage) );
809 sec_sequence.push_back( eSecCommand(eSecCommand::SLEEP, m_params[DELAY_AFTER_FINAL_VOLTAGE_CHANGE]) );
811 sec_sequence.push_back( eSecCommand(eSecCommand::IF_TONE_GOTO, compare) );
812 sec_sequence.push_back( eSecCommand(eSecCommand::SET_TONE, tone) );
813 sec_sequence.push_back( eSecCommand(eSecCommand::SLEEP, m_params[DELAY_AFTER_CONT_TONE]) );
818 sec_sequence.push_back( eSecCommand(eSecCommand::START_TUNE_TIMEOUT, tunetimeout) );
819 sec_sequence.push_back( eSecCommand(eSecCommand::SET_FRONTEND) );
821 frontend.setSecSequence(sec_sequence);
827 eDebug("found no useable satellite configuration for orbital position (%d)", sat.orbital_position );
831 RESULT eDVBSatelliteEquipmentControl::clear()
833 eSecDebug("eDVBSatelliteEquipmentControl::clear()");
834 for (int i=0; i <= m_lnbidx; ++i)
836 m_lnbs[i].m_satellites.clear();
837 m_lnbs[i].slot_mask = 0;
841 m_not_linked_slot_mask=0;
843 //reset some tuner configuration
844 for (eSmartPtrList<eDVBRegisteredFrontend>::iterator it(m_avail_frontends.begin()); it != m_avail_frontends.end(); ++it)
847 if (!strcmp(it->m_frontend->getDescription(), "BCM4501 (internal)") && !it->m_frontend->getData(eDVBFrontend::LINKED_PREV_PTR, tmp) && tmp != -1)
849 FILE *f=fopen("/proc/stb/tsmux/lnb_b_input", "w");
850 if (!f || fwrite("B", 1, 1, f) != 1)
851 eDebug("set /proc/stb/tsmux/lnb_b_input to B failed!! (%m)");
854 eDebug("set /proc/stb/tsmux/lnb_b_input to B OK");
858 it->m_frontend->setData(eDVBFrontend::SATPOS_DEPENDS_PTR, -1);
859 it->m_frontend->setData(eDVBFrontend::LINKED_PREV_PTR, -1);
860 it->m_frontend->setData(eDVBFrontend::LINKED_NEXT_PTR, -1);
861 it->m_frontend->setData(eDVBFrontend::ROTOR_POS, -1);
862 it->m_frontend->setData(eDVBFrontend::ROTOR_CMD, -1);
868 /* LNB Specific Parameters */
869 RESULT eDVBSatelliteEquipmentControl::addLNB()
871 if ( (m_lnbidx+1) < (int)(sizeof(m_lnbs) / sizeof(eDVBSatelliteLNBParameters)))
872 m_curSat=m_lnbs[++m_lnbidx].m_satellites.end();
875 eDebug("no more LNB free... cnt is %d", m_lnbidx);
878 eSecDebug("eDVBSatelliteEquipmentControl::addLNB(%d)", m_lnbidx);
882 RESULT eDVBSatelliteEquipmentControl::setLNBSlotMask(int slotmask)
884 eSecDebug("eDVBSatelliteEquipmentControl::setLNBSlotMask(%d)", slotmask);
885 if ( currentLNBValid() )
886 m_lnbs[m_lnbidx].slot_mask = slotmask;
892 RESULT eDVBSatelliteEquipmentControl::setLNBLOFL(int lofl)
894 eSecDebug("eDVBSatelliteEquipmentControl::setLNBLOFL(%d)", lofl);
895 if ( currentLNBValid() )
896 m_lnbs[m_lnbidx].m_lof_lo = lofl;
902 RESULT eDVBSatelliteEquipmentControl::setLNBLOFH(int lofh)
904 eSecDebug("eDVBSatelliteEquipmentControl::setLNBLOFH(%d)", lofh);
905 if ( currentLNBValid() )
906 m_lnbs[m_lnbidx].m_lof_hi = lofh;
912 RESULT eDVBSatelliteEquipmentControl::setLNBThreshold(int threshold)
914 eSecDebug("eDVBSatelliteEquipmentControl::setLNBThreshold(%d)", threshold);
915 if ( currentLNBValid() )
916 m_lnbs[m_lnbidx].m_lof_threshold = threshold;
922 RESULT eDVBSatelliteEquipmentControl::setLNBIncreasedVoltage(bool onoff)
924 eSecDebug("eDVBSatelliteEquipmentControl::setLNBIncreasedVoltage(%d)", onoff);
925 if ( currentLNBValid() )
926 m_lnbs[m_lnbidx].m_increased_voltage = onoff;
932 /* DiSEqC Specific Parameters */
933 RESULT eDVBSatelliteEquipmentControl::setDiSEqCMode(int diseqcmode)
935 eSecDebug("eDVBSatelliteEquipmentControl::setDiSEqcMode(%d)", diseqcmode);
936 if ( currentLNBValid() )
937 m_lnbs[m_lnbidx].m_diseqc_parameters.m_diseqc_mode = (eDVBSatelliteDiseqcParameters::t_diseqc_mode)diseqcmode;
943 RESULT eDVBSatelliteEquipmentControl::setToneburst(int toneburst)
945 eSecDebug("eDVBSatelliteEquipmentControl::setToneburst(%d)", toneburst);
946 if ( currentLNBValid() )
947 m_lnbs[m_lnbidx].m_diseqc_parameters.m_toneburst_param = (eDVBSatelliteDiseqcParameters::t_toneburst_param)toneburst;
953 RESULT eDVBSatelliteEquipmentControl::setRepeats(int repeats)
955 eSecDebug("eDVBSatelliteEquipmentControl::setRepeats(%d)", repeats);
956 if ( currentLNBValid() )
957 m_lnbs[m_lnbidx].m_diseqc_parameters.m_repeats=repeats;
963 RESULT eDVBSatelliteEquipmentControl::setCommittedCommand(int command)
965 eSecDebug("eDVBSatelliteEquipmentControl::setCommittedCommand(%d)", command);
966 if ( currentLNBValid() )
967 m_lnbs[m_lnbidx].m_diseqc_parameters.m_committed_cmd=command;
973 RESULT eDVBSatelliteEquipmentControl::setUncommittedCommand(int command)
975 eSecDebug("eDVBSatelliteEquipmentControl::setUncommittedCommand(%d)", command);
976 if ( currentLNBValid() )
977 m_lnbs[m_lnbidx].m_diseqc_parameters.m_uncommitted_cmd = command;
983 RESULT eDVBSatelliteEquipmentControl::setCommandOrder(int order)
985 eSecDebug("eDVBSatelliteEquipmentControl::setCommandOrder(%d)", order);
986 if ( currentLNBValid() )
987 m_lnbs[m_lnbidx].m_diseqc_parameters.m_command_order=order;
993 RESULT eDVBSatelliteEquipmentControl::setFastDiSEqC(bool onoff)
995 eSecDebug("eDVBSatelliteEquipmentControl::setFastDiSEqc(%d)", onoff);
996 if ( currentLNBValid() )
997 m_lnbs[m_lnbidx].m_diseqc_parameters.m_use_fast=onoff;
1003 RESULT eDVBSatelliteEquipmentControl::setSeqRepeat(bool onoff)
1005 eSecDebug("eDVBSatelliteEquipmentControl::setSeqRepeat(%d)", onoff);
1006 if ( currentLNBValid() )
1007 m_lnbs[m_lnbidx].m_diseqc_parameters.m_seq_repeat = onoff;
1013 /* Rotor Specific Parameters */
1014 RESULT eDVBSatelliteEquipmentControl::setLongitude(float longitude)
1016 eSecDebug("eDVBSatelliteEquipmentControl::setLongitude(%f)", longitude);
1017 if ( currentLNBValid() )
1018 m_lnbs[m_lnbidx].m_rotor_parameters.m_gotoxx_parameters.m_longitude=longitude;
1024 RESULT eDVBSatelliteEquipmentControl::setLatitude(float latitude)
1026 eSecDebug("eDVBSatelliteEquipmentControl::setLatitude(%f)", latitude);
1027 if ( currentLNBValid() )
1028 m_lnbs[m_lnbidx].m_rotor_parameters.m_gotoxx_parameters.m_latitude=latitude;
1034 RESULT eDVBSatelliteEquipmentControl::setLoDirection(int direction)
1036 eSecDebug("eDVBSatelliteEquipmentControl::setLoDirection(%d)", direction);
1037 if ( currentLNBValid() )
1038 m_lnbs[m_lnbidx].m_rotor_parameters.m_gotoxx_parameters.m_lo_direction=direction;
1044 RESULT eDVBSatelliteEquipmentControl::setLaDirection(int direction)
1046 eSecDebug("eDVBSatelliteEquipmentControl::setLaDirection(%d)", direction);
1047 if ( currentLNBValid() )
1048 m_lnbs[m_lnbidx].m_rotor_parameters.m_gotoxx_parameters.m_la_direction=direction;
1054 RESULT eDVBSatelliteEquipmentControl::setUseInputpower(bool onoff)
1056 eSecDebug("eDVBSatelliteEquipmentControl::setUseInputpower(%d)", onoff);
1057 if ( currentLNBValid() )
1058 m_lnbs[m_lnbidx].m_rotor_parameters.m_inputpower_parameters.m_use=onoff;
1064 RESULT eDVBSatelliteEquipmentControl::setInputpowerDelta(int delta)
1066 eSecDebug("eDVBSatelliteEquipmentControl::setInputpowerDelta(%d)", delta);
1067 if ( currentLNBValid() )
1068 m_lnbs[m_lnbidx].m_rotor_parameters.m_inputpower_parameters.m_delta=delta;
1074 /* Satellite Specific Parameters */
1075 RESULT eDVBSatelliteEquipmentControl::addSatellite(int orbital_position)
1077 eSecDebug("eDVBSatelliteEquipmentControl::addSatellite(%d)", orbital_position);
1078 if ( currentLNBValid() )
1080 std::map<int, eDVBSatelliteSwitchParameters>::iterator it =
1081 m_lnbs[m_lnbidx].m_satellites.find(orbital_position);
1082 if ( it == m_lnbs[m_lnbidx].m_satellites.end() )
1084 std::pair<std::map<int, eDVBSatelliteSwitchParameters>::iterator, bool > ret =
1085 m_lnbs[m_lnbidx].m_satellites.insert(
1086 std::pair<int, eDVBSatelliteSwitchParameters>(orbital_position, eDVBSatelliteSwitchParameters())
1089 m_curSat = ret.first;
1101 RESULT eDVBSatelliteEquipmentControl::setVoltageMode(int mode)
1103 eSecDebug("eDVBSatelliteEquipmentControl::setVoltageMode(%d)", mode);
1104 if ( currentLNBValid() && m_curSat != m_lnbs[m_lnbidx].m_satellites.end() )
1105 m_curSat->second.m_voltage_mode = (eDVBSatelliteSwitchParameters::t_voltage_mode)mode;
1112 RESULT eDVBSatelliteEquipmentControl::setToneMode(int mode)
1114 eSecDebug("eDVBSatelliteEquipmentControl::setToneMode(%d)", mode);
1115 if ( currentLNBValid() )
1117 if ( m_curSat != m_lnbs[m_lnbidx].m_satellites.end() )
1118 m_curSat->second.m_22khz_signal = (eDVBSatelliteSwitchParameters::t_22khz_signal)mode;
1127 RESULT eDVBSatelliteEquipmentControl::setRotorPosNum(int rotor_pos_num)
1129 eSecDebug("eDVBSatelliteEquipmentControl::setRotorPosNum(%d)", rotor_pos_num);
1130 if ( currentLNBValid() )
1132 if ( m_curSat != m_lnbs[m_lnbidx].m_satellites.end() )
1133 m_curSat->second.m_rotorPosNum=rotor_pos_num;
1142 RESULT eDVBSatelliteEquipmentControl::setRotorTurningSpeed(int speed)
1144 eSecDebug("eDVBSatelliteEquipmentControl::setRotorTurningSpeed(%d)", speed);
1145 if ( currentLNBValid() )
1146 m_lnbs[m_lnbidx].m_rotor_parameters.m_inputpower_parameters.m_turning_speed = speed;
1154 int orb_pos, lofl, lofh;
1155 sat_compare(int o, int lofl, int lofh)
1156 :orb_pos(o), lofl(lofl), lofh(lofh)
1158 sat_compare(const sat_compare &x)
1159 :orb_pos(x.orb_pos), lofl(x.lofl), lofh(x.lofh)
1161 bool operator < (const sat_compare & cmp) const
1163 if (orb_pos == cmp.orb_pos)
1165 if ( abs(lofl-cmp.lofl) < 200000 )
1167 if (abs(lofh-cmp.lofh) < 200000)
1169 return lofh<cmp.lofh;
1171 return lofl<cmp.lofl;
1173 return orb_pos < cmp.orb_pos;
1177 RESULT eDVBSatelliteEquipmentControl::setTunerLinked(int tu1, int tu2)
1179 eSecDebug("eDVBSatelliteEquipmentControl::setTunerLinked(%d, %d)", tu1, tu2);
1182 eDVBRegisteredFrontend *p1=NULL, *p2=NULL;
1184 for (eSmartPtrList<eDVBRegisteredFrontend>::iterator it(m_avail_frontends.begin()); it != m_avail_frontends.end(); ++it)
1186 if (it->m_frontend->getSlotID() == tu1)
1188 else if (it->m_frontend->getSlotID() == tu2)
1193 p1->m_frontend->setData(eDVBFrontend::LINKED_PREV_PTR, (long)p2);
1194 p2->m_frontend->setData(eDVBFrontend::LINKED_NEXT_PTR, (long)p1);
1195 if (!strcmp(p1->m_frontend->getDescription(), p2->m_frontend->getDescription()) && !strcmp(p1->m_frontend->getDescription(), "BCM4501 (internal)"))
1197 FILE *f=fopen("/proc/stb/tsmux/lnb_b_input", "w");
1198 if (!f || fwrite("A", 1, 1, f) != 1)
1199 eDebug("set /proc/stb/tsmux/lnb_b_input to A failed!! (%m)");
1202 eDebug("set /proc/stb/tsmux/lnb_b_input to A OK");
1212 RESULT eDVBSatelliteEquipmentControl::setTunerDepends(int tu1, int tu2)
1214 eSecDebug("eDVBSatelliteEquipmentControl::setTunerDepends(%d, %d)", tu1, tu2);
1218 eDVBRegisteredFrontend *p1=NULL, *p2=NULL;
1220 for (eSmartPtrList<eDVBRegisteredFrontend>::iterator it(m_avail_frontends.begin()); it != m_avail_frontends.end(); ++it)
1222 if (it->m_frontend->getSlotID() == tu1)
1224 else if (it->m_frontend->getSlotID() == tu2)
1229 p1->m_frontend->setData(eDVBFrontend::SATPOS_DEPENDS_PTR, (long)p2);
1230 p2->m_frontend->setData(eDVBFrontend::SATPOS_DEPENDS_PTR, (long)p1);
1236 void eDVBSatelliteEquipmentControl::setSlotNotLinked(int slot_no)
1238 eSecDebug("eDVBSatelliteEquipmentControl::setSlotNotLinked(%d)", slot_no);
1239 m_not_linked_slot_mask |= (1 << slot_no);
1242 bool eDVBSatelliteEquipmentControl::isRotorMoving()
1244 return m_rotorMoving;
1247 void eDVBSatelliteEquipmentControl::setRotorMoving(bool b)