mesh: move gap config to main

This commit is contained in:
Matthias Ringwald 2019-07-12 14:37:19 +02:00
parent 320a7de48c
commit c0f27bf2a7

View File

@ -152,12 +152,6 @@ static void packet_handler (uint8_t packet_type, uint16_t channel, uint8_t *pack
mesh_access_setup_without_provisiong_data(test_device_uuid); mesh_access_setup_without_provisiong_data(test_device_uuid);
} }
#if defined(ENABLE_MESH_ADV_BEARER) || defined(ENABLE_MESH_PB_ADV)
// setup scanning
gap_set_scan_parameters(0, 0x300, 0x300);
gap_start_scan();
#endif
//
show_usage(); show_usage();
break; break;
@ -717,6 +711,12 @@ int btstack_main(void)
btstack_parse_hex(pts_device_uuid_string, 16, pts_device_uuid); btstack_parse_hex(pts_device_uuid_string, 16, pts_device_uuid);
btstack_print_hex(pts_device_uuid, 16, 0); btstack_print_hex(pts_device_uuid, 16, 0);
#if defined(ENABLE_MESH_ADV_BEARER)
// setup scanning when supporting ADV Bearer
gap_set_scan_parameters(0, 0x300, 0x300);
gap_start_scan();
#endif
// turn on! // turn on!
hci_power_control(HCI_POWER_ON); hci_power_control(HCI_POWER_ON);