Changes to silence compiler warnings on OSX
This commit is contained in:
parent
3f4b949aa2
commit
c8edec53d8
|
@ -70,7 +70,7 @@ namespace gr {
|
|||
unsigned int frame_nr = be32toh(header->frame_number);
|
||||
|
||||
if ((d_mode == FILTER_LESS_OR_EQUAL && frame_nr <= d_framenr)
|
||||
|| d_mode == FILTER_GREATER_OR_EQUAL && frame_nr >= d_framenr)
|
||||
|| (d_mode == FILTER_GREATER_OR_EQUAL && frame_nr >= d_framenr))
|
||||
{
|
||||
message_port_pub(pmt::mp("out"), msg);
|
||||
}
|
||||
|
|
|
@ -64,6 +64,17 @@ namespace gr {
|
|||
|
||||
void burst_sdcch_subslot_filter_impl::process_burst(pmt::pmt_t msg)
|
||||
{
|
||||
// hardcoded subslots of the channels, both SDCCH and the associated SACCH
|
||||
// -1 means that the particular position in the frame is not SDCCH
|
||||
static const int8_t subslots_sdcch4[102] = {
|
||||
-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1, 0, 0, 0, 0, 1, 1, 1, 1,-1,-1, 2, 2, 2, 2, 3, 3, 3, 3,-1,-1, 0, 0, 0, 0, 1, 1, 1, 1,-1,
|
||||
-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1, 0, 0, 0, 0, 1, 1, 1, 1,-1,-1, 2, 2, 2, 2, 3, 3, 3, 3,-1,-1, 2, 2, 2, 2, 3, 3, 3, 3,-1
|
||||
};
|
||||
static const int8_t subslots_sdcch8[102] = {
|
||||
0, 0, 0, 0, 1, 1, 1, 1, 2, 2, 2, 2, 3, 3, 3, 3, 4, 4, 4, 4, 5, 5, 5, 5, 6, 6, 6, 6, 7, 7, 7, 7, 0, 0, 0, 0, 1, 1, 1, 1, 2, 2, 2, 2, 3, 3, 3, 3,-1,-1,-1,
|
||||
0, 0, 0, 0, 1, 1, 1, 1, 2, 2, 2, 2, 3, 3, 3, 3, 4, 4, 4, 4, 5, 5, 5, 5, 6, 6, 6, 6, 7, 7, 7, 7, 4, 4, 4, 4, 5, 5, 5, 5, 6, 6, 6, 6, 7, 7, 7, 7,-1,-1,-1
|
||||
};
|
||||
|
||||
pmt::pmt_t header_plus_burst = pmt::cdr(msg);
|
||||
gsmtap_hdr * header = (gsmtap_hdr *)pmt::blob_data(header_plus_burst);
|
||||
|
||||
|
@ -74,11 +85,11 @@ namespace gr {
|
|||
|
||||
if (d_mode == SS_FILTER_SDCCH8)
|
||||
{
|
||||
subslot = d_subslots_sdcch8[fn_mod102];
|
||||
subslot = subslots_sdcch8[fn_mod102];
|
||||
}
|
||||
else if (d_mode == SS_FILTER_SDCCH4)
|
||||
{
|
||||
subslot = d_subslots_sdcch4[fn_mod102];
|
||||
subslot = subslots_sdcch4[fn_mod102];
|
||||
}
|
||||
|
||||
if ((subslot == -1) || (d_mode == SS_FILTER_SDCCH4 && subslot > 3))
|
||||
|
|
|
@ -31,16 +31,6 @@ namespace gr {
|
|||
class burst_sdcch_subslot_filter_impl : public burst_sdcch_subslot_filter
|
||||
{
|
||||
private:
|
||||
// hardcoded subslots of the channels, both SDCCH and the associated SACCH
|
||||
// -1 means that the particular position in the frame is not SDCCH
|
||||
const int8_t d_subslots_sdcch4[102] = {
|
||||
-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1, 0, 0, 0, 0, 1, 1, 1, 1,-1,-1, 2, 2, 2, 2, 3, 3, 3, 3,-1,-1, 0, 0, 0, 0, 1, 1, 1, 1,-1,
|
||||
-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1, 0, 0, 0, 0, 1, 1, 1, 1,-1,-1, 2, 2, 2, 2, 3, 3, 3, 3,-1,-1, 2, 2, 2, 2, 3, 3, 3, 3,-1
|
||||
};
|
||||
const int8_t d_subslots_sdcch8[102] = {
|
||||
0, 0, 0, 0, 1, 1, 1, 1, 2, 2, 2, 2, 3, 3, 3, 3, 4, 4, 4, 4, 5, 5, 5, 5, 6, 6, 6, 6, 7, 7, 7, 7, 0, 0, 0, 0, 1, 1, 1, 1, 2, 2, 2, 2, 3, 3, 3, 3,-1,-1,-1,
|
||||
0, 0, 0, 0, 1, 1, 1, 1, 2, 2, 2, 2, 3, 3, 3, 3, 4, 4, 4, 4, 5, 5, 5, 5, 6, 6, 6, 6, 7, 7, 7, 7, 4, 4, 4, 4, 5, 5, 5, 5, 6, 6, 6, 6, 7, 7, 7, 7,-1,-1,-1
|
||||
};
|
||||
subslot_filter_mode d_mode;
|
||||
unsigned int d_subslot;
|
||||
public:
|
||||
|
|
|
@ -74,6 +74,17 @@ namespace gr {
|
|||
|
||||
void burst_sdcch_subslot_splitter_impl::process_burst(pmt::pmt_t msg)
|
||||
{
|
||||
// hardcoded subslots of the channels, both SDCCH and the associated SACCH
|
||||
// -1 means that the particular position in the frame is not SDCCH
|
||||
static const int8_t subslots_sdcch4[102] = {
|
||||
-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1, 0, 0, 0, 0, 1, 1, 1, 1,-1,-1, 2, 2, 2, 2, 3, 3, 3, 3,-1,-1, 0, 0, 0, 0, 1, 1, 1, 1,-1,
|
||||
-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1, 0, 0, 0, 0, 1, 1, 1, 1,-1,-1, 2, 2, 2, 2, 3, 3, 3, 3,-1,-1, 2, 2, 2, 2, 3, 3, 3, 3,-1
|
||||
};
|
||||
static const int8_t subslots_sdcch8[102] = {
|
||||
0, 0, 0, 0, 1, 1, 1, 1, 2, 2, 2, 2, 3, 3, 3, 3, 4, 4, 4, 4, 5, 5, 5, 5, 6, 6, 6, 6, 7, 7, 7, 7, 0, 0, 0, 0, 1, 1, 1, 1, 2, 2, 2, 2, 3, 3, 3, 3,-1,-1,-1,
|
||||
0, 0, 0, 0, 1, 1, 1, 1, 2, 2, 2, 2, 3, 3, 3, 3, 4, 4, 4, 4, 5, 5, 5, 5, 6, 6, 6, 6, 7, 7, 7, 7, 4, 4, 4, 4, 5, 5, 5, 5, 6, 6, 6, 6, 7, 7, 7, 7,-1,-1,-1
|
||||
};
|
||||
|
||||
pmt::pmt_t header_plus_burst = pmt::cdr(msg);
|
||||
gsmtap_hdr * header = (gsmtap_hdr *)pmt::blob_data(header_plus_burst);
|
||||
|
||||
|
@ -81,14 +92,14 @@ namespace gr {
|
|||
uint32_t fn_mod102 = frame_nr % 102;
|
||||
|
||||
int8_t subslot;
|
||||
|
||||
|
||||
if (d_mode == SPLITTER_SDCCH8)
|
||||
{
|
||||
subslot = d_subslots_sdcch8[fn_mod102];
|
||||
subslot = subslots_sdcch8[fn_mod102];
|
||||
}
|
||||
else if (d_mode == SPLITTER_SDCCH4)
|
||||
{
|
||||
subslot = d_subslots_sdcch4[fn_mod102];
|
||||
subslot = subslots_sdcch4[fn_mod102];
|
||||
}
|
||||
|
||||
if ((subslot == -1) || (d_mode == SPLITTER_SDCCH4 && subslot > 3))
|
||||
|
|
|
@ -31,16 +31,6 @@ namespace gr {
|
|||
class burst_sdcch_subslot_splitter_impl : public burst_sdcch_subslot_splitter
|
||||
{
|
||||
private:
|
||||
// hardcoded subslots of the channels, both SDCCH and the associated SACCH
|
||||
// -1 means that the particular position in the frame is not SDCCH
|
||||
const int8_t d_subslots_sdcch4[102] = {
|
||||
-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1, 0, 0, 0, 0, 1, 1, 1, 1,-1,-1, 2, 2, 2, 2, 3, 3, 3, 3,-1,-1, 0, 0, 0, 0, 1, 1, 1, 1,-1,
|
||||
-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1, 0, 0, 0, 0, 1, 1, 1, 1,-1,-1, 2, 2, 2, 2, 3, 3, 3, 3,-1,-1, 2, 2, 2, 2, 3, 3, 3, 3,-1
|
||||
};
|
||||
const int8_t d_subslots_sdcch8[102] = {
|
||||
0, 0, 0, 0, 1, 1, 1, 1, 2, 2, 2, 2, 3, 3, 3, 3, 4, 4, 4, 4, 5, 5, 5, 5, 6, 6, 6, 6, 7, 7, 7, 7, 0, 0, 0, 0, 1, 1, 1, 1, 2, 2, 2, 2, 3, 3, 3, 3,-1,-1,-1,
|
||||
0, 0, 0, 0, 1, 1, 1, 1, 2, 2, 2, 2, 3, 3, 3, 3, 4, 4, 4, 4, 5, 5, 5, 5, 6, 6, 6, 6, 7, 7, 7, 7, 4, 4, 4, 4, 5, 5, 5, 5, 6, 6, 6, 6, 7, 7, 7, 7,-1,-1,-1
|
||||
};
|
||||
splitter_mode d_mode;
|
||||
public:
|
||||
burst_sdcch_subslot_splitter_impl(splitter_mode mode);
|
||||
|
|
|
@ -103,7 +103,7 @@ void clock_offset_control_impl::process_measurement(pmt::pmt_t msg)
|
|||
float ppm = -freq_offset/d_fc*1.0e6;
|
||||
std::string state = pmt::symbol_to_string(pmt::tuple_ref(msg,2));
|
||||
d_last_state = state;
|
||||
if(abs(ppm) > 100) //safeguard against flawed measurements
|
||||
if(std::abs(ppm) > 100.0) //safeguard against flawed measurements
|
||||
{
|
||||
ppm=0;
|
||||
reset();
|
||||
|
@ -132,7 +132,7 @@ void clock_offset_control_impl::process_measurement(pmt::pmt_t msg)
|
|||
if(d_counter == 5)
|
||||
{
|
||||
d_counter = 0;
|
||||
if(abs(d_last_ppm_estimate-d_ppm_estimate) > 0.1)
|
||||
if(std::abs(d_last_ppm_estimate-d_ppm_estimate) > 0.1)
|
||||
{
|
||||
pmt::pmt_t msg_ppm = pmt::from_double(ppm);
|
||||
message_port_pub(pmt::intern("ppm"), msg_ppm);
|
||||
|
|
|
@ -261,7 +261,7 @@ int decode_sch(const unsigned char *buf, int * t1_o, int * t2_o, int * t3_o, int
|
|||
memcpy(data + SCH_DATA_LEN, buf + SCH_DATA_LEN + N_SYNC_BITS, SCH_DATA_LEN);
|
||||
|
||||
// Viterbi decode
|
||||
if (errors = conv_decode(data, decoded_data)) {
|
||||
if ((errors = conv_decode(data, decoded_data))) {
|
||||
// fprintf(stderr, "error: sch: conv_decode (%d)\n", errors);
|
||||
//DEBUGF("ERR: conv_decode %d\n", errors);
|
||||
//return errors;
|
||||
|
|
Loading…
Reference in New Issue