NordicSemiconductor / Nordic-Thingy52-FW

Nordic Thingy:52 software development kit. This kit is designed to assist users in developing their own custom firmware for Thingy. Please see http://www.nordicsemi.com/thingy for the latest news and software releases.
Other
210 stars 133 forks source link

hardcoded value in thingy_sdk_v1.1.0\project\pca20020_s132\main.c #2

Closed AryanNordic closed 6 years ago

AryanNordic commented 7 years ago

I am trying to add new service to thingy but i spent a lot of time debugging missing to see the hardcoded value.

in main.c->thingy_init() Please change ble_params.evt_handler = thingy_ble_evt_handler; ble_params.p_service_handles = m_ble_service_handles; ble_params.service_num = 5;

to

ble_params.evt_handler       = thingy_ble_evt_handler;
ble_params.p_service_handles = m_ble_service_handles;
ble_params.service_num       = THINGY_SERVICES_MAX;

This way it is convenient for users to add services by just edit the thingy_config.h file

joakimtoe commented 7 years ago

Thank you for the feedback, you are absolutely correct. We have the define for it as well.

jorgenmk commented 6 years ago

Resolved