Unit test fix for RX TOA change

The change had an impact on unittests and we needed to adjust the test
cases a little to accomodate the change.
pull/10214/head
Hasnain Virk 2019-03-27 10:22:27 +02:00
parent 8fd791db49
commit cd3a032d2a
2 changed files with 7 additions and 0 deletions

View File

@ -77,6 +77,9 @@ TEST_F(Test_LoRaMac, initialize)
conn.connection_u.otaa.nb_trials = 2;
object->prepare_join(&conn, true);
channel_params_t params[] = {868300000, 0, { ((DR_5 << 4) | DR_0) }, 1};
LoRaPHY_stub::channel_params_ptr = params;
LoRaWANTimer_stub::call_cb_immediately = true;
EXPECT_TRUE(LORAWAN_STATUS_OK == object->initialize(NULL, my_cb));
}

View File

@ -416,4 +416,8 @@ uint8_t LoRaPHY::apply_DR_offset(int8_t dr, int8_t dr_offset)
return LoRaPHY_stub::uint8_value;
}
uint32_t LoRaPHY::get_rx_time_on_air(uint8_t modem, uint16_t pkt_len)
{
return LoRaPHY_stub::uint32_value;
}