mirror of
https://github.com/tuxbox-neutrino/neutrino.git
synced 2025-08-30 17:01:15 +02:00
Explicit fec for upcoming drivers; Little fixes
git-svn-id: file:///home/bas/coolstream_public_svn/THIRDPARTY/applications/neutrino-experimental@537 e54a6e83-5905-42d5-8d5c-058d10e6a962
This commit is contained in:
@@ -975,6 +975,8 @@ extra.tp_pol Polarization
|
|||||||
extra.tp.pol_v V
|
extra.tp.pol_v V
|
||||||
extra.tp_pol_h H
|
extra.tp_pol_h H
|
||||||
extra.tp_fec FEC
|
extra.tp_fec FEC
|
||||||
|
extra.fec_auto Auto DVB-S
|
||||||
|
extra.fec_auto_s2 Auto DVB-S2
|
||||||
extra.fec_1_2 1/2
|
extra.fec_1_2 1/2
|
||||||
extra.fec_2_3 2/3
|
extra.fec_2_3 2/3
|
||||||
extra.fec_3_4 3/4
|
extra.fec_3_4 3/4
|
||||||
@@ -1269,7 +1271,7 @@ extra.fec_s2_qpsk_3_5 3/5 s2 qpsk
|
|||||||
extra.fec_s2_qpsk_4_5 4/5 s2 qpsk
|
extra.fec_s2_qpsk_4_5 4/5 s2 qpsk
|
||||||
extra.fec_s2_qpsk_9_10 9/10 s2 qpsk
|
extra.fec_s2_qpsk_9_10 9/10 s2 qpsk
|
||||||
extra.fec_s2_8psk_1_2 1/2 s2 8psk
|
extra.fec_s2_8psk_1_2 1/2 s2 8psk
|
||||||
extra.fec_s2_8psk_2_3 3/2 s2 8psk
|
extra.fec_s2_8psk_2_3 2/3 s2 8psk
|
||||||
extra.fec_s2_8psk_3_4 3/4 s2 8psk
|
extra.fec_s2_8psk_3_4 3/4 s2 8psk
|
||||||
extra.fec_s2_8psk_5_6 5/6 s2 8psk
|
extra.fec_s2_8psk_5_6 5/6 s2 8psk
|
||||||
extra.fec_s2_8psk_7_8 7/8 s2 8psk
|
extra.fec_s2_8psk_7_8 7/8 s2 8psk
|
||||||
|
@@ -169,13 +169,13 @@ int CMotorControl::exec(CMenuTarget* parent, const std::string &)
|
|||||||
wasgrow = 1;
|
wasgrow = 1;
|
||||||
}
|
}
|
||||||
//if((last_snr > g_snr) && last_snr > 37000)
|
//if((last_snr > g_snr) && last_snr > 37000)
|
||||||
if(wasgrow && (last_snr > g_snr) && last_snr > 50) {
|
if(wasgrow && (last_snr > g_snr) /* && last_snr > 50*/) {
|
||||||
//printf("Must stop rotor!!!\n");
|
//printf("Must stop rotor!!!\n");
|
||||||
g_Zapit->sendMotorCommand(0xE0, 0x31, 0x60, 0, 0, 0);
|
g_Zapit->sendMotorCommand(0xE0, 0x31, 0x60, 0, 0, 0);
|
||||||
moving = 0;
|
moving = 0;
|
||||||
paintStatus();
|
paintStatus();
|
||||||
last_snr = 0;
|
last_snr = 0;
|
||||||
g_Zapit->tune_TP(TP);
|
//g_Zapit->tune_TP(TP);
|
||||||
} else
|
} else
|
||||||
last_snr = g_snr;
|
last_snr = g_snr;
|
||||||
} else
|
} else
|
||||||
@@ -198,7 +198,7 @@ int CMotorControl::exec(CMenuTarget* parent, const std::string &)
|
|||||||
printf("[motorcontrol] left/1 key received... drive/Step motor west, stepMode: %d\n", stepMode);
|
printf("[motorcontrol] left/1 key received... drive/Step motor west, stepMode: %d\n", stepMode);
|
||||||
motorStepWest();
|
motorStepWest();
|
||||||
paintStatus();
|
paintStatus();
|
||||||
g_Zapit->tune_TP(TP);
|
//g_Zapit->tune_TP(TP);
|
||||||
break;
|
break;
|
||||||
|
|
||||||
case CRCInput::RC_red:
|
case CRCInput::RC_red:
|
||||||
@@ -207,7 +207,7 @@ int CMotorControl::exec(CMenuTarget* parent, const std::string &)
|
|||||||
g_Zapit->sendMotorCommand(0xE0, 0x31, 0x60, 0, 0, 0);
|
g_Zapit->sendMotorCommand(0xE0, 0x31, 0x60, 0, 0, 0);
|
||||||
moving = 0;
|
moving = 0;
|
||||||
paintStatus();
|
paintStatus();
|
||||||
g_Zapit->tune_TP(TP);
|
//g_Zapit->tune_TP(TP);
|
||||||
break;
|
break;
|
||||||
|
|
||||||
case CRCInput::RC_3:
|
case CRCInput::RC_3:
|
||||||
@@ -215,7 +215,7 @@ int CMotorControl::exec(CMenuTarget* parent, const std::string &)
|
|||||||
printf("[motorcontrol] right/3 key received... drive/Step motor east, stepMode: %d\n", stepMode);
|
printf("[motorcontrol] right/3 key received... drive/Step motor east, stepMode: %d\n", stepMode);
|
||||||
motorStepEast();
|
motorStepEast();
|
||||||
paintStatus();
|
paintStatus();
|
||||||
g_Zapit->tune_TP(TP);
|
//g_Zapit->tune_TP(TP);
|
||||||
break;
|
break;
|
||||||
|
|
||||||
case CRCInput::RC_4:
|
case CRCInput::RC_4:
|
||||||
@@ -223,13 +223,13 @@ int CMotorControl::exec(CMenuTarget* parent, const std::string &)
|
|||||||
if(g_settings.rotor_swap) lim_cmd = 0x66;
|
if(g_settings.rotor_swap) lim_cmd = 0x66;
|
||||||
else lim_cmd = 0x67;
|
else lim_cmd = 0x67;
|
||||||
g_Zapit->sendMotorCommand(0xE1, 0x31, lim_cmd, 0, 0, 0);
|
g_Zapit->sendMotorCommand(0xE1, 0x31, lim_cmd, 0, 0, 0);
|
||||||
g_Zapit->tune_TP(TP);
|
//g_Zapit->tune_TP(TP);
|
||||||
break;
|
break;
|
||||||
|
|
||||||
case CRCInput::RC_5:
|
case CRCInput::RC_5:
|
||||||
printf("[motorcontrol] 5 key received... disable (soft) limits\n");
|
printf("[motorcontrol] 5 key received... disable (soft) limits\n");
|
||||||
g_Zapit->sendMotorCommand(0xE0, 0x31, 0x63, 0, 0, 0);
|
g_Zapit->sendMotorCommand(0xE0, 0x31, 0x63, 0, 0, 0);
|
||||||
g_Zapit->tune_TP(TP);
|
//g_Zapit->tune_TP(TP);
|
||||||
break;
|
break;
|
||||||
|
|
||||||
case CRCInput::RC_6:
|
case CRCInput::RC_6:
|
||||||
@@ -237,7 +237,7 @@ int CMotorControl::exec(CMenuTarget* parent, const std::string &)
|
|||||||
if(g_settings.rotor_swap) lim_cmd = 0x67;
|
if(g_settings.rotor_swap) lim_cmd = 0x67;
|
||||||
else lim_cmd = 0x66;
|
else lim_cmd = 0x66;
|
||||||
g_Zapit->sendMotorCommand(0xE1, 0x31, lim_cmd, 0, 0, 0);
|
g_Zapit->sendMotorCommand(0xE1, 0x31, lim_cmd, 0, 0, 0);
|
||||||
g_Zapit->tune_TP(TP);
|
//g_Zapit->tune_TP(TP);
|
||||||
break;
|
break;
|
||||||
|
|
||||||
case CRCInput::RC_7:
|
case CRCInput::RC_7:
|
||||||
@@ -245,19 +245,19 @@ int CMotorControl::exec(CMenuTarget* parent, const std::string &)
|
|||||||
g_Zapit->sendMotorCommand(0xE0, 0x31, 0x6B, 1, 0, 0);
|
g_Zapit->sendMotorCommand(0xE0, 0x31, 0x6B, 1, 0, 0);
|
||||||
satellitePosition = 0;
|
satellitePosition = 0;
|
||||||
paintStatus();
|
paintStatus();
|
||||||
g_Zapit->tune_TP(TP);
|
//g_Zapit->tune_TP(TP);
|
||||||
break;
|
break;
|
||||||
|
|
||||||
case CRCInput::RC_8:
|
case CRCInput::RC_8:
|
||||||
printf("[motorcontrol] 8 key received... enable (soft) limits\n");
|
printf("[motorcontrol] 8 key received... enable (soft) limits\n");
|
||||||
g_Zapit->sendMotorCommand(0xE0, 0x31, 0x6A, 1, 0, 0);
|
g_Zapit->sendMotorCommand(0xE0, 0x31, 0x6A, 1, 0, 0);
|
||||||
g_Zapit->tune_TP(TP);
|
//g_Zapit->tune_TP(TP);
|
||||||
break;
|
break;
|
||||||
|
|
||||||
case CRCInput::RC_9:
|
case CRCInput::RC_9:
|
||||||
printf("[motorcontrol] 9 key received... (re)-calculate positions\n");
|
printf("[motorcontrol] 9 key received... (re)-calculate positions\n");
|
||||||
g_Zapit->sendMotorCommand(0xE0, 0x31, 0x6F, 1, 0, 0);
|
g_Zapit->sendMotorCommand(0xE0, 0x31, 0x6F, 1, 0, 0);
|
||||||
g_Zapit->tune_TP(TP);
|
//g_Zapit->tune_TP(TP);
|
||||||
break;
|
break;
|
||||||
|
|
||||||
case CRCInput::RC_plus:
|
case CRCInput::RC_plus:
|
||||||
@@ -309,14 +309,14 @@ int CMotorControl::exec(CMenuTarget* parent, const std::string &)
|
|||||||
printf("[motorcontrol] left/1 key received... drive/Step motor west, stepMode: %d\n", stepMode);
|
printf("[motorcontrol] left/1 key received... drive/Step motor west, stepMode: %d\n", stepMode);
|
||||||
motorStepWest();
|
motorStepWest();
|
||||||
paintStatus();
|
paintStatus();
|
||||||
g_Zapit->tune_TP(TP);
|
//g_Zapit->tune_TP(TP);
|
||||||
break;
|
break;
|
||||||
|
|
||||||
case CRCInput::RC_red:
|
case CRCInput::RC_red:
|
||||||
case CRCInput::RC_2:
|
case CRCInput::RC_2:
|
||||||
printf("[motorcontrol] 2 key received... halt motor\n");
|
printf("[motorcontrol] 2 key received... halt motor\n");
|
||||||
g_Zapit->sendMotorCommand(0xE0, 0x31, 0x60, 0, 0, 0);
|
g_Zapit->sendMotorCommand(0xE0, 0x31, 0x60, 0, 0, 0);
|
||||||
g_Zapit->tune_TP(TP);
|
//g_Zapit->tune_TP(TP);
|
||||||
break;
|
break;
|
||||||
|
|
||||||
case CRCInput::RC_3:
|
case CRCInput::RC_3:
|
||||||
@@ -324,14 +324,14 @@ int CMotorControl::exec(CMenuTarget* parent, const std::string &)
|
|||||||
printf("[motorcontrol] right/3 key received... drive/Step motor east, stepMode: %d\n", stepMode);
|
printf("[motorcontrol] right/3 key received... drive/Step motor east, stepMode: %d\n", stepMode);
|
||||||
motorStepEast();
|
motorStepEast();
|
||||||
paintStatus();
|
paintStatus();
|
||||||
g_Zapit->tune_TP(TP);
|
//g_Zapit->tune_TP(TP);
|
||||||
break;
|
break;
|
||||||
|
|
||||||
case CRCInput::RC_green:
|
case CRCInput::RC_green:
|
||||||
case CRCInput::RC_5:
|
case CRCInput::RC_5:
|
||||||
printf("[motorcontrol] 5 key received... store present satellite number: %d\n", motorPosition);
|
printf("[motorcontrol] 5 key received... store present satellite number: %d\n", motorPosition);
|
||||||
g_Zapit->sendMotorCommand(0xE0, 0x31, 0x6A, 1, motorPosition, 0);
|
g_Zapit->sendMotorCommand(0xE0, 0x31, 0x6A, 1, motorPosition, 0);
|
||||||
g_Zapit->tune_TP(TP);
|
//g_Zapit->tune_TP(TP);
|
||||||
break;
|
break;
|
||||||
|
|
||||||
case CRCInput::RC_6:
|
case CRCInput::RC_6:
|
||||||
@@ -346,7 +346,7 @@ int CMotorControl::exec(CMenuTarget* parent, const std::string &)
|
|||||||
g_Zapit->sendMotorCommand(0xE0, 0x31, 0x6B, 1, motorPosition, 0);
|
g_Zapit->sendMotorCommand(0xE0, 0x31, 0x6B, 1, motorPosition, 0);
|
||||||
satellitePosition = 0;
|
satellitePosition = 0;
|
||||||
paintStatus();
|
paintStatus();
|
||||||
g_Zapit->tune_TP(TP);
|
//g_Zapit->tune_TP(TP);
|
||||||
break;
|
break;
|
||||||
|
|
||||||
case CRCInput::RC_9:
|
case CRCInput::RC_9:
|
||||||
@@ -360,7 +360,7 @@ int CMotorControl::exec(CMenuTarget* parent, const std::string &)
|
|||||||
printf("[motorcontrol] up key received... increase satellite position: %d\n", ++motorPosition);
|
printf("[motorcontrol] up key received... increase satellite position: %d\n", ++motorPosition);
|
||||||
satellitePosition = 0;
|
satellitePosition = 0;
|
||||||
paintStatus();
|
paintStatus();
|
||||||
g_Zapit->tune_TP(TP);
|
//g_Zapit->tune_TP(TP);
|
||||||
break;
|
break;
|
||||||
|
|
||||||
case CRCInput::RC_minus:
|
case CRCInput::RC_minus:
|
||||||
@@ -369,7 +369,7 @@ int CMotorControl::exec(CMenuTarget* parent, const std::string &)
|
|||||||
printf("[motorcontrol] down key received... decrease satellite position: %d\n", motorPosition);
|
printf("[motorcontrol] down key received... decrease satellite position: %d\n", motorPosition);
|
||||||
satellitePosition = 0;
|
satellitePosition = 0;
|
||||||
paintStatus();
|
paintStatus();
|
||||||
g_Zapit->tune_TP(TP);
|
//g_Zapit->tune_TP(TP);
|
||||||
break;
|
break;
|
||||||
|
|
||||||
case CRCInput::RC_blue:
|
case CRCInput::RC_blue:
|
||||||
|
@@ -812,32 +812,37 @@ const CMenuOptionChooser::keyval SATSETUP_DISEQC_OPTIONS[SATSETUP_DISEQC_OPTION_
|
|||||||
{ SMATV_REMOTE_TUNING, LOCALE_SATSETUP_SMATVREMOTE }
|
{ SMATV_REMOTE_TUNING, LOCALE_SATSETUP_SMATVREMOTE }
|
||||||
};
|
};
|
||||||
|
|
||||||
#define SATSETUP_SCANTP_FEC_COUNT 23
|
#define SATSETUP_SCANTP_FEC_COUNT 21
|
||||||
#define CABLESETUP_SCANTP_FEC_COUNT 5
|
#define CABLESETUP_SCANTP_FEC_COUNT 5
|
||||||
const CMenuOptionChooser::keyval SATSETUP_SCANTP_FEC[SATSETUP_SCANTP_FEC_COUNT] =
|
const CMenuOptionChooser::keyval SATSETUP_SCANTP_FEC[SATSETUP_SCANTP_FEC_COUNT] =
|
||||||
{
|
{
|
||||||
|
{ FEC_AUTO, LOCALE_SCANTP_FEC_AUTO },
|
||||||
|
{ FEC_S2_AUTO, LOCALE_SCANTP_FEC_AUTO_S2 },
|
||||||
|
|
||||||
{ FEC_1_2, LOCALE_SCANTP_FEC_1_2 },
|
{ FEC_1_2, LOCALE_SCANTP_FEC_1_2 },
|
||||||
{ FEC_2_3, LOCALE_SCANTP_FEC_2_3 },
|
{ FEC_2_3, LOCALE_SCANTP_FEC_2_3 },
|
||||||
{ FEC_3_4, LOCALE_SCANTP_FEC_3_4 },
|
{ FEC_3_4, LOCALE_SCANTP_FEC_3_4 },
|
||||||
{ FEC_5_6, LOCALE_SCANTP_FEC_5_6 },
|
{ FEC_5_6, LOCALE_SCANTP_FEC_5_6 },
|
||||||
{ FEC_7_8, LOCALE_SCANTP_FEC_7_8 },
|
{ FEC_7_8, LOCALE_SCANTP_FEC_7_8 },
|
||||||
|
|
||||||
{ FEC_S2_QPSK_1_2, LOCALE_FEC_S2_QPSK_1_2 },
|
{ FEC_S2_QPSK_1_2, LOCALE_FEC_S2_QPSK_1_2 },
|
||||||
{ FEC_S2_QPSK_2_3, LOCALE_FEC_S2_QPSK_2_3 },
|
{ FEC_S2_QPSK_2_3, LOCALE_FEC_S2_QPSK_2_3 },
|
||||||
{ FEC_S2_QPSK_3_4, LOCALE_FEC_S2_QPSK_3_4 },
|
{ FEC_S2_QPSK_3_4, LOCALE_FEC_S2_QPSK_3_4 },
|
||||||
{ FEC_S2_QPSK_5_6, LOCALE_FEC_S2_QPSK_5_6 },
|
{ FEC_S2_QPSK_5_6, LOCALE_FEC_S2_QPSK_5_6 },
|
||||||
{ FEC_S2_QPSK_7_8, LOCALE_FEC_S2_QPSK_7_8 },
|
//{ FEC_S2_QPSK_7_8, LOCALE_FEC_S2_QPSK_7_8 },
|
||||||
{ FEC_S2_QPSK_8_9, LOCALE_FEC_S2_QPSK_8_9 },
|
{ FEC_S2_QPSK_8_9, LOCALE_FEC_S2_QPSK_8_9 },
|
||||||
{ FEC_S2_QPSK_3_5, LOCALE_FEC_S2_QPSK_3_5 },
|
{ FEC_S2_QPSK_3_5, LOCALE_FEC_S2_QPSK_3_5 },
|
||||||
{ FEC_S2_QPSK_4_5, LOCALE_FEC_S2_QPSK_4_5 },
|
{ FEC_S2_QPSK_4_5, LOCALE_FEC_S2_QPSK_4_5 },
|
||||||
{ FEC_S2_QPSK_9_10, LOCALE_FEC_S2_QPSK_9_10 },
|
{ FEC_S2_QPSK_9_10, LOCALE_FEC_S2_QPSK_9_10 },
|
||||||
{ FEC_S2_8PSK_1_2, LOCALE_FEC_S2_8PSK_1_2 },
|
|
||||||
|
//{ FEC_S2_8PSK_1_2, LOCALE_FEC_S2_8PSK_1_2 },
|
||||||
{ FEC_S2_8PSK_2_3, LOCALE_FEC_S2_8PSK_2_3 },
|
{ FEC_S2_8PSK_2_3, LOCALE_FEC_S2_8PSK_2_3 },
|
||||||
{ FEC_S2_8PSK_3_4, LOCALE_FEC_S2_8PSK_3_4 },
|
{ FEC_S2_8PSK_3_4, LOCALE_FEC_S2_8PSK_3_4 },
|
||||||
{ FEC_S2_8PSK_5_6, LOCALE_FEC_S2_8PSK_5_6 },
|
|
||||||
{ FEC_S2_8PSK_7_8, LOCALE_FEC_S2_8PSK_7_8 },
|
|
||||||
{ FEC_S2_8PSK_8_9, LOCALE_FEC_S2_8PSK_8_9 },
|
|
||||||
{ FEC_S2_8PSK_3_5, LOCALE_FEC_S2_8PSK_3_5 },
|
{ FEC_S2_8PSK_3_5, LOCALE_FEC_S2_8PSK_3_5 },
|
||||||
{ FEC_S2_8PSK_4_5, LOCALE_FEC_S2_8PSK_4_5 },
|
{ FEC_S2_8PSK_5_6, LOCALE_FEC_S2_8PSK_5_6 },
|
||||||
|
//{ FEC_S2_8PSK_7_8, LOCALE_FEC_S2_8PSK_7_8 },
|
||||||
|
{ FEC_S2_8PSK_8_9, LOCALE_FEC_S2_8PSK_8_9 },
|
||||||
|
//{ FEC_S2_8PSK_4_5, LOCALE_FEC_S2_8PSK_4_5 },
|
||||||
{ FEC_S2_8PSK_9_10, LOCALE_FEC_S2_8PSK_9_10 }
|
{ FEC_S2_8PSK_9_10, LOCALE_FEC_S2_8PSK_9_10 }
|
||||||
};
|
};
|
||||||
|
|
||||||
|
@@ -1248,6 +1248,8 @@ typedef enum {
|
|||||||
LOCALE_EXTRA_POL_V,
|
LOCALE_EXTRA_POL_V,
|
||||||
LOCALE_EXTRA_POL_H,
|
LOCALE_EXTRA_POL_H,
|
||||||
LOCALE_EXTRA_FEC,
|
LOCALE_EXTRA_FEC,
|
||||||
|
LOCALE_SCANTP_FEC_AUTO,
|
||||||
|
LOCALE_SCANTP_FEC_AUTO_S2,
|
||||||
LOCALE_SCANTP_FEC_1_2,
|
LOCALE_SCANTP_FEC_1_2,
|
||||||
LOCALE_SCANTP_FEC_2_3,
|
LOCALE_SCANTP_FEC_2_3,
|
||||||
LOCALE_SCANTP_FEC_3_4,
|
LOCALE_SCANTP_FEC_3_4,
|
||||||
|
@@ -1248,6 +1248,8 @@ const char *locale_real_names[] = {
|
|||||||
"extra.tp.pol_v",
|
"extra.tp.pol_v",
|
||||||
"extra.tp_pol_h",
|
"extra.tp_pol_h",
|
||||||
"extra.tp_fec",
|
"extra.tp_fec",
|
||||||
|
"extra.fec_auto",
|
||||||
|
"extra.fec_auto_s2",
|
||||||
"extra.fec_1_2",
|
"extra.fec_1_2",
|
||||||
"extra.fec_2_3",
|
"extra.fec_2_3",
|
||||||
"extra.fec_3_4",
|
"extra.fec_3_4",
|
||||||
|
@@ -45,6 +45,7 @@
|
|||||||
#define FEC_S2_8PSK_3_5 (fe_code_rate_t)(FEC_S2_8PSK_8_9+1) //25
|
#define FEC_S2_8PSK_3_5 (fe_code_rate_t)(FEC_S2_8PSK_8_9+1) //25
|
||||||
#define FEC_S2_8PSK_4_5 (fe_code_rate_t)(FEC_S2_8PSK_3_5+1) //26
|
#define FEC_S2_8PSK_4_5 (fe_code_rate_t)(FEC_S2_8PSK_3_5+1) //26
|
||||||
#define FEC_S2_8PSK_9_10 (fe_code_rate_t)(FEC_S2_8PSK_4_5+1) //27
|
#define FEC_S2_8PSK_9_10 (fe_code_rate_t)(FEC_S2_8PSK_4_5+1) //27
|
||||||
|
#define FEC_S2_AUTO (fe_code_rate_t)(FEC_S2_8PSK_9_10+1) //28
|
||||||
|
|
||||||
static inline fe_modulation_t dvbs_get_modulation(fe_code_rate_t fec)
|
static inline fe_modulation_t dvbs_get_modulation(fe_code_rate_t fec)
|
||||||
{
|
{
|
||||||
|
@@ -53,6 +53,15 @@ extern CEventServer *eventServer;
|
|||||||
#define WEST 1
|
#define WEST 1
|
||||||
#define USALS
|
#define USALS
|
||||||
|
|
||||||
|
#define FREQUENCY 1
|
||||||
|
#define MODULATION 2
|
||||||
|
#define INVERSION 3
|
||||||
|
#define SYMBOL_RATE 4
|
||||||
|
#define INNER_FEC 5
|
||||||
|
#define DELIVERY_SYSTEM 6
|
||||||
|
#define PILOTS 7
|
||||||
|
#define ROLLOFF 8
|
||||||
|
|
||||||
static struct dtv_property clr_cmdargs[] = {
|
static struct dtv_property clr_cmdargs[] = {
|
||||||
{ DTV_CLEAR, {0,0,0}, { 0 },0 },
|
{ DTV_CLEAR, {0,0,0}, { 0 },0 },
|
||||||
};
|
};
|
||||||
@@ -63,12 +72,11 @@ static struct dtv_properties clr_cmdseq = {
|
|||||||
|
|
||||||
/* stolen from dvb.c from vlc */
|
/* stolen from dvb.c from vlc */
|
||||||
static struct dtv_property dvbs_cmdargs[] = {
|
static struct dtv_property dvbs_cmdargs[] = {
|
||||||
|
{ DTV_CLEAR, {0,0,0}, { 0 },0 },
|
||||||
{ DTV_FREQUENCY, {0,0,0}, { 0 },0 },
|
{ DTV_FREQUENCY, {0,0,0}, { 0 },0 },
|
||||||
{ DTV_MODULATION, {0,0,0}, { QPSK },0 },
|
{ DTV_MODULATION, {0,0,0}, { QPSK },0 },
|
||||||
{ DTV_INVERSION, {0,0,0}, { INVERSION_AUTO },0 },
|
{ DTV_INVERSION, {0,0,0}, { INVERSION_AUTO },0 },
|
||||||
{ DTV_SYMBOL_RATE, {0,0,0}, { 27500000 },0 },
|
{ DTV_SYMBOL_RATE, {0,0,0}, { 27500000 },0 },
|
||||||
{ DTV_VOLTAGE, {0,0,0}, { SEC_VOLTAGE_OFF },0 },
|
|
||||||
{ DTV_TONE, {0,0,0}, { SEC_TONE_OFF },0 },
|
|
||||||
{ DTV_INNER_FEC, {0,0,0}, { FEC_AUTO },0 },
|
{ DTV_INNER_FEC, {0,0,0}, { FEC_AUTO },0 },
|
||||||
{ DTV_DELIVERY_SYSTEM, {0,0,0}, { SYS_DVBS },0 },
|
{ DTV_DELIVERY_SYSTEM, {0,0,0}, { SYS_DVBS },0 },
|
||||||
{ DTV_TUNE, {0,0,0}, { 0 },0 },
|
{ DTV_TUNE, {0,0,0}, { 0 },0 },
|
||||||
@@ -79,12 +87,11 @@ static struct dtv_properties dvbs_cmdseq = {
|
|||||||
};
|
};
|
||||||
|
|
||||||
static struct dtv_property dvbs2_cmdargs[] = {
|
static struct dtv_property dvbs2_cmdargs[] = {
|
||||||
|
{ DTV_CLEAR, {0,0,0}, { 0 },0 },
|
||||||
{ DTV_FREQUENCY, {}, { 0 },0 },
|
{ DTV_FREQUENCY, {}, { 0 },0 },
|
||||||
{ DTV_MODULATION, {}, { PSK_8 } ,0},
|
{ DTV_MODULATION, {}, { PSK_8 } ,0},
|
||||||
{ DTV_INVERSION, {}, { INVERSION_AUTO } ,0},
|
{ DTV_INVERSION, {}, { INVERSION_AUTO } ,0},
|
||||||
{ DTV_SYMBOL_RATE, {}, { 27500000 } ,0},
|
{ DTV_SYMBOL_RATE, {}, { 27500000 } ,0},
|
||||||
{ DTV_VOLTAGE, {}, { SEC_VOLTAGE_OFF } ,0},
|
|
||||||
{ DTV_TONE, {}, { SEC_TONE_OFF } ,0},
|
|
||||||
{ DTV_INNER_FEC, {}, { FEC_AUTO } ,0},
|
{ DTV_INNER_FEC, {}, { FEC_AUTO } ,0},
|
||||||
{ DTV_DELIVERY_SYSTEM, {}, { SYS_DVBS2 } ,0},
|
{ DTV_DELIVERY_SYSTEM, {}, { SYS_DVBS2 } ,0},
|
||||||
{ DTV_PILOT, {}, { PILOT_AUTO } ,0},
|
{ DTV_PILOT, {}, { PILOT_AUTO } ,0},
|
||||||
@@ -97,6 +104,7 @@ static struct dtv_properties dvbs2_cmdseq = {
|
|||||||
};
|
};
|
||||||
|
|
||||||
static struct dtv_property dvbc_cmdargs[] = {
|
static struct dtv_property dvbc_cmdargs[] = {
|
||||||
|
{ DTV_CLEAR, {0,0,0}, { 0 },0 },
|
||||||
{ DTV_FREQUENCY, {}, { 0 } ,0},
|
{ DTV_FREQUENCY, {}, { 0 } ,0},
|
||||||
{ DTV_MODULATION, {}, { QAM_AUTO } ,0},
|
{ DTV_MODULATION, {}, { QAM_AUTO } ,0},
|
||||||
{ DTV_INVERSION, {}, { INVERSION_AUTO } ,0},
|
{ DTV_INVERSION, {}, { INVERSION_AUTO } ,0},
|
||||||
@@ -109,16 +117,6 @@ static struct dtv_properties dvbc_cmdseq = {
|
|||||||
sizeof(dvbc_cmdargs) / sizeof(struct dtv_property), dvbc_cmdargs
|
sizeof(dvbc_cmdargs) / sizeof(struct dtv_property), dvbc_cmdargs
|
||||||
};
|
};
|
||||||
|
|
||||||
#define FREQUENCY 0
|
|
||||||
#define MODULATION 1
|
|
||||||
#define INVERSION 2
|
|
||||||
#define SYMBOL_RATE 3
|
|
||||||
#define BANDWIDTH 3
|
|
||||||
#define VOLTAGE 4
|
|
||||||
#define TONE 5
|
|
||||||
#define INNER_FEC 6
|
|
||||||
#define PILOTS 8
|
|
||||||
#define ROLLOFF 9
|
|
||||||
|
|
||||||
#define diff(x,y) (max(x,y) - min(x,y))
|
#define diff(x,y) (max(x,y) - min(x,y))
|
||||||
|
|
||||||
@@ -399,6 +397,7 @@ struct dvb_frontend_event CFrontend::getEvent(void)
|
|||||||
{
|
{
|
||||||
struct dvb_frontend_event event;
|
struct dvb_frontend_event event;
|
||||||
struct pollfd pfd;
|
struct pollfd pfd;
|
||||||
|
static unsigned int timedout = 0;
|
||||||
|
|
||||||
TIMER_INIT();
|
TIMER_INIT();
|
||||||
|
|
||||||
@@ -434,14 +433,16 @@ struct dvb_frontend_event CFrontend::getEvent(void)
|
|||||||
perror("CFrontend::getEvent ioctl");
|
perror("CFrontend::getEvent ioctl");
|
||||||
continue;
|
continue;
|
||||||
}
|
}
|
||||||
//printf("[fe0] poll events %d status %d\n", pfd.revents, event.status);
|
//printf("[fe0] poll events %d status %x\n", pfd.revents, event.status);
|
||||||
|
|
||||||
if (event.status & FE_HAS_LOCK) {
|
if (event.status & FE_HAS_LOCK) {
|
||||||
printf("[fe%d] ****************************** FE_HAS_LOCK: freq %lu\n", fenumber, (long unsigned int)event.parameters.frequency);
|
printf("[fe%d] ****************************** FE_HAS_LOCK: freq %lu\n", fenumber, (long unsigned int)event.parameters.frequency);
|
||||||
tuned = true;
|
tuned = true;
|
||||||
break;
|
break;
|
||||||
} else if (event.status & FE_TIMEDOUT) {
|
} else if (event.status & FE_TIMEDOUT) {
|
||||||
printf("[fe%d] ############################## FE_TIMEDOUT\n", fenumber);
|
if(timedout < timer_msec)
|
||||||
|
timedout = timer_msec;
|
||||||
|
printf("[fe%d] ############################## FE_TIMEDOUT (max %d)\n", fenumber, timedout);
|
||||||
/*break;*/
|
/*break;*/
|
||||||
} else {
|
} else {
|
||||||
if (event.status & FE_HAS_SIGNAL)
|
if (event.status & FE_HAS_SIGNAL)
|
||||||
@@ -645,6 +646,7 @@ int CFrontend::setFrontend(const struct dvb_frontend_parameters *feparams, bool
|
|||||||
default:
|
default:
|
||||||
printf("[fe0] DEMOD: unknown FEC: %d\n", fec_inner);
|
printf("[fe0] DEMOD: unknown FEC: %d\n", fec_inner);
|
||||||
case FEC_AUTO:
|
case FEC_AUTO:
|
||||||
|
case FEC_S2_AUTO:
|
||||||
fec = FEC_AUTO;
|
fec = FEC_AUTO;
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
@@ -653,7 +655,7 @@ int CFrontend::setFrontend(const struct dvb_frontend_parameters *feparams, bool
|
|||||||
getDelSys(fec_inner, modulation, f, s, m);
|
getDelSys(fec_inner, modulation, f, s, m);
|
||||||
//printf("[fe0] DEMOD: FEC %s system %s modulation %s pilot %s\n", f, s, m, pilot == PILOT_ON ? "on" : "off");
|
//printf("[fe0] DEMOD: FEC %s system %s modulation %s pilot %s\n", f, s, m, pilot == PILOT_ON ? "on" : "off");
|
||||||
|
|
||||||
{
|
if(0) {
|
||||||
//TIMER_INIT();
|
//TIMER_INIT();
|
||||||
//TIMER_START();
|
//TIMER_START();
|
||||||
if ((ioctl(fd, FE_SET_PROPERTY, &clr_cmdseq)) == -1) {
|
if ((ioctl(fd, FE_SET_PROPERTY, &clr_cmdseq)) == -1) {
|
||||||
@@ -674,8 +676,10 @@ int CFrontend::setFrontend(const struct dvb_frontend_parameters *feparams, bool
|
|||||||
} else {
|
} else {
|
||||||
p = &dvbs_cmdseq;
|
p = &dvbs_cmdseq;
|
||||||
}
|
}
|
||||||
|
#if 0 // we set this before
|
||||||
p->props[VOLTAGE].u.data = currentVoltage;
|
p->props[VOLTAGE].u.data = currentVoltage;
|
||||||
p->props[TONE].u.data = currentToneMode;
|
p->props[TONE].u.data = currentToneMode;
|
||||||
|
#endif
|
||||||
p->props[FREQUENCY].u.data = feparams->frequency;
|
p->props[FREQUENCY].u.data = feparams->frequency;
|
||||||
p->props[SYMBOL_RATE].u.data = feparams->u.qpsk.symbol_rate;
|
p->props[SYMBOL_RATE].u.data = feparams->u.qpsk.symbol_rate;
|
||||||
p->props[INNER_FEC].u.data = fec; /*_inner*/ ;
|
p->props[INNER_FEC].u.data = fec; /*_inner*/ ;
|
||||||
@@ -707,13 +711,13 @@ int CFrontend::setFrontend(const struct dvb_frontend_parameters *feparams, bool
|
|||||||
printf("[fe0] DEMOD: FEC %s system %s modulation %s pilot %s\n", f, s, m, pilot == PILOT_ON ? "on" : "off");
|
printf("[fe0] DEMOD: FEC %s system %s modulation %s pilot %s\n", f, s, m, pilot == PILOT_ON ? "on" : "off");
|
||||||
|
|
||||||
{
|
{
|
||||||
//TIMER_INIT();
|
TIMER_INIT();
|
||||||
//TIMER_START();
|
TIMER_START();
|
||||||
if ((ioctl(fd, FE_SET_PROPERTY, p)) == -1) {
|
if ((ioctl(fd, FE_SET_PROPERTY, p)) < 0) {
|
||||||
perror("FE_SET_PROPERTY failed");
|
perror("FE_SET_PROPERTY failed");
|
||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
//TIMER_STOP("[fe0] FE_SET_PROPERTY took");
|
TIMER_STOP("[fe0] FE_SET_PROPERTY took");
|
||||||
}
|
}
|
||||||
{
|
{
|
||||||
TIMER_INIT();
|
TIMER_INIT();
|
||||||
@@ -859,6 +863,8 @@ void CFrontend::sendMotorCommand(uint8_t cmdtype, uint8_t address, uint8_t comma
|
|||||||
{
|
{
|
||||||
struct dvb_diseqc_master_cmd cmd;
|
struct dvb_diseqc_master_cmd cmd;
|
||||||
int i;
|
int i;
|
||||||
|
fe_sec_tone_mode_t oldTone = currentToneMode;
|
||||||
|
fe_sec_voltage_t oldVoltage = currentVoltage;
|
||||||
|
|
||||||
printf("[fe%d] sendMotorCommand: cmdtype = %x, address = %x, cmd = %x\n", fenumber, cmdtype, address, command);
|
printf("[fe%d] sendMotorCommand: cmdtype = %x, address = %x, cmd = %x\n", fenumber, cmdtype, address, command);
|
||||||
printf("[fe%d] sendMotorCommand: num_parms = %d, parm1 = %x, parm2 = %x\n", fenumber, num_parameters, parameter1, parameter2);
|
printf("[fe%d] sendMotorCommand: num_parms = %d, parm1 = %x, parm2 = %x\n", fenumber, num_parameters, parameter1, parameter2);
|
||||||
@@ -869,12 +875,16 @@ void CFrontend::sendMotorCommand(uint8_t cmdtype, uint8_t address, uint8_t comma
|
|||||||
cmd.msg[3] = parameter1;
|
cmd.msg[3] = parameter1;
|
||||||
cmd.msg[4] = parameter2;
|
cmd.msg[4] = parameter2;
|
||||||
cmd.msg_len = 3 + num_parameters;
|
cmd.msg_len = 3 + num_parameters;
|
||||||
secSetVoltage(highVoltage ? SEC_VOLTAGE_18 : SEC_VOLTAGE_13, 15);
|
|
||||||
secSetTone(SEC_TONE_OFF, 25);
|
//secSetVoltage(highVoltage ? SEC_VOLTAGE_18 : SEC_VOLTAGE_13, 15);
|
||||||
|
secSetVoltage(SEC_VOLTAGE_13, 15);
|
||||||
|
secSetTone(SEC_TONE_OFF, 15);
|
||||||
|
|
||||||
for(i = 0; i <= repeat; i++)
|
for(i = 0; i <= repeat; i++)
|
||||||
sendDiseqcCommand(&cmd, 50);
|
sendDiseqcCommand(&cmd, 50);
|
||||||
|
|
||||||
|
secSetVoltage(oldVoltage, 15);
|
||||||
|
secSetTone(oldTone, 15);
|
||||||
printf("[fe%d] motor command sent.\n", fenumber);
|
printf("[fe%d] motor command sent.\n", fenumber);
|
||||||
|
|
||||||
}
|
}
|
||||||
@@ -1544,4 +1554,5 @@ void CFrontend::gotoXX(t_satellite_position pos)
|
|||||||
|
|
||||||
printf("RotorCmd = %04x\n", RotorCmd);
|
printf("RotorCmd = %04x\n", RotorCmd);
|
||||||
sendMotorCommand(0xE0, 0x31, 0x6E, 2, ((RotorCmd & 0xFF00) / 0x100), RotorCmd & 0xFF, repeatUsals);
|
sendMotorCommand(0xE0, 0x31, 0x6E, 2, ((RotorCmd & 0xFF00) / 0x100), RotorCmd & 0xFF, repeatUsals);
|
||||||
|
secSetVoltage(highVoltage ? SEC_VOLTAGE_18 : SEC_VOLTAGE_13, 15); //FIXME ?
|
||||||
}
|
}
|
||||||
|
@@ -30,6 +30,7 @@
|
|||||||
#include <zapit/types.h>
|
#include <zapit/types.h>
|
||||||
#include <zapit/bouquets.h>
|
#include <zapit/bouquets.h>
|
||||||
#include <zapit/frontend_c.h>
|
#include <zapit/frontend_c.h>
|
||||||
|
#include <zapit/satconfig.h>
|
||||||
#include <dmx_cs.h>
|
#include <dmx_cs.h>
|
||||||
|
|
||||||
#define SDT_SIZE 1026
|
#define SDT_SIZE 1026
|
||||||
@@ -360,6 +361,9 @@ _repeat:
|
|||||||
}
|
}
|
||||||
delete dmx;
|
delete dmx;
|
||||||
|
|
||||||
|
sat_iterator_t sit = satellitePositions.find(satellitePosition);
|
||||||
|
if(sit != satellitePositions.end())
|
||||||
|
sit->second.have_channels = true;
|
||||||
return 0;
|
return 0;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Reference in New Issue
Block a user