mirror of
https://github.com/tuxbox-neutrino/neutrino.git
synced 2025-08-29 16:31:11 +02:00
zapit/include/zapit/getservices.h: cache satellitePosition in transponder struct
This commit is contained in:
@@ -42,6 +42,8 @@ struct transponder
|
|||||||
t_transport_stream_id transport_stream_id;
|
t_transport_stream_id transport_stream_id;
|
||||||
t_original_network_id original_network_id;
|
t_original_network_id original_network_id;
|
||||||
transponder_id_t transponder_id;
|
transponder_id_t transponder_id;
|
||||||
|
t_satellite_position satellitePosition;
|
||||||
|
|
||||||
struct dvb_frontend_parameters feparams;
|
struct dvb_frontend_parameters feparams;
|
||||||
unsigned char polarization;
|
unsigned char polarization;
|
||||||
bool updated;
|
bool updated;
|
||||||
@@ -58,11 +60,16 @@ struct transponder
|
|||||||
transponder(const transponder_id_t t_id, const struct dvb_frontend_parameters p_feparams, const uint8_t p_polarization = 0)
|
transponder(const transponder_id_t t_id, const struct dvb_frontend_parameters p_feparams, const uint8_t p_polarization = 0)
|
||||||
{
|
{
|
||||||
transponder_id = t_id;
|
transponder_id = t_id;
|
||||||
transport_stream_id = (t_id >> 16) & 0xFFFF;
|
transport_stream_id = GET_TRANSPORT_STREAM_ID_FROM_TRANSPONDER_ID(t_id);
|
||||||
original_network_id = t_id & 0xFFFF;
|
original_network_id = GET_ORIGINAL_NETWORK_ID_FROM_TRANSPONDER_ID(t_id);
|
||||||
feparams = p_feparams;
|
feparams = p_feparams;
|
||||||
polarization = p_polarization;
|
polarization = p_polarization;
|
||||||
updated = 0;
|
updated = 0;
|
||||||
|
satellitePosition = GET_SATELLITEPOSITION_FROM_TRANSPONDER_ID(transponder_id);
|
||||||
|
if(satellitePosition & 0xF000)
|
||||||
|
satellitePosition = -(satellitePosition & 0xFFF);
|
||||||
|
else
|
||||||
|
satellitePosition = satellitePosition & 0xFFF;
|
||||||
}
|
}
|
||||||
};
|
};
|
||||||
|
|
||||||
|
Reference in New Issue
Block a user