Skip to content
This repository was archived by the owner on May 23, 2023. It is now read-only.

Commit 6ffc81a

Browse files
author
Jarkko Paso
committed
FHSS unit tests: Fixed tests
- Reverts commit 45daec9. FHSS doesn't allow using broadcast queue with fixed channel.
1 parent 03f447a commit 6ffc81a

File tree

4 files changed

+1
-30
lines changed

4 files changed

+1
-30
lines changed

source/Service_Libs/fhss/fhss_ws.c

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -75,7 +75,6 @@ fhss_structure_t *fhss_ws_enable(fhss_api_t *fhss_api, const fhss_ws_configurati
7575
memset(fhss_struct->ws, 0, sizeof(fhss_ws_t));
7676

7777
fhss_struct->ws->fhss_configuration = *fhss_configuration;
78-
fhss_struct->ws->is_on_bc_channel = true;
7978
fhss_struct->number_of_channels = channel_count;
8079
ns_list_init(&fhss_struct->fhss_failed_tx_list);
8180
return fhss_struct;
@@ -206,7 +205,7 @@ static void fhss_ws_synch_state_set_callback(const fhss_api_t *api, fhss_states
206205
if ((fhss_state == FHSS_SYNCHRONIZED) && (fhss_structure->ws->fhss_configuration.ws_channel_function != WS_FIXED_CHANNEL)) {
207206
uint32_t fhss_broadcast_interval = fhss_structure->ws->fhss_configuration.fhss_broadcast_interval;
208207
uint8_t fhss_bc_dwell_interval = fhss_structure->ws->fhss_configuration.fhss_bc_dwell_interval;
209-
fhss_structure->ws->is_on_bc_channel = false;
208+
210209
// Start broadcast schedule when BC intervals are known
211210
if (fhss_broadcast_interval && fhss_bc_dwell_interval) {
212211
fhss_broadcast_handler(fhss_structure->fhss_api, 0);

test/nanostack/unittest/service_libs/fhss_common/fhsscommontest.cpp

Lines changed: 0 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -71,11 +71,6 @@ TEST(fhss_common, test_fhss_compare_with_synch_parent_address)
7171
CHECK(test_fhss_compare_with_synch_parent_address());
7272
}
7373

74-
TEST(fhss_common, test_fhss_use_broadcast_queue_cb)
75-
{
76-
CHECK(test_fhss_use_broadcast_queue_cb());
77-
}
78-
7974
TEST(fhss_common, test_fhss_read_timestamp_cb)
8075
{
8176
CHECK(test_fhss_read_timestamp_cb());

test/nanostack/unittest/service_libs/fhss_common/test_fhss_common.c

Lines changed: 0 additions & 22 deletions
Original file line numberDiff line numberDiff line change
@@ -245,28 +245,6 @@ bool test_fhss_compare_with_synch_parent_address()
245245
return true;
246246
}
247247

248-
bool test_fhss_use_broadcast_queue_cb()
249-
{
250-
nsdynmemlib_stub.returnCounter = 1;
251-
// Allocate instance
252-
fhss_structure_t *fhss_ptr = fhss_allocate_instance(&fhss_api, &fhss_timer);
253-
// Test without API
254-
if (false != fhss_use_broadcast_queue_cb(NULL, true, FHSS_DATA_FRAME)) {
255-
return false;
256-
}
257-
// Test synch request frame
258-
if (false != fhss_use_broadcast_queue_cb(&fhss_api, true, FHSS_SYNCH_REQUEST_FRAME)) {
259-
return false;
260-
}
261-
// Test data frame frame with broadcast address
262-
if (true != fhss_use_broadcast_queue_cb(&fhss_api, true, FHSS_DATA_FRAME)) {
263-
return false;
264-
}
265-
// Free allocated instance
266-
fhss_free_instance(&fhss_api);
267-
return true;
268-
}
269-
270248
bool test_fhss_read_timestamp_cb()
271249
{
272250
fhss_platform_stub.timestamp_value = 100000;

test/nanostack/unittest/service_libs/fhss_common/test_fhss_common.h

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -21,7 +21,6 @@ bool test_fhss_timeout_stop();
2121
bool test_fhss_update_synch_parent_address();
2222
bool test_fhss_trig_event();
2323
bool test_fhss_compare_with_synch_parent_address();
24-
bool test_fhss_use_broadcast_queue_cb();
2524
bool test_fhss_read_timestamp_cb();
2625
bool test_fhss_init_callbacks_cb();
2726
bool test_fhss_clear_active_event();

0 commit comments

Comments
 (0)