NordicSemiconductor / ble-sdk-arduino

MIT License
249 stars 97 forks source link

Set timing fields of aci_stat for ACI_EVT_CONNECTED in lib_aci_event_get... #12

Closed george-hawkins closed 9 years ago

george-hawkins commented 9 years ago

Both the ACI_EVT_TIMING and ACI_EVT_CONNECTED events include timing values, but currently they're only copied into the passed in aci_stat structure for ACI_EVT_TIMING.

So the timing calls like lib_aci_get_cx_interval_ms(...) return 0 after the ACI_EVT_CONNECTED is received and only report a proper value if you actively change the timing using lib_aci_change_timing(...) or lib_aci_change_timing_GAP_PPCP().

This small change copies the timing values for ACI_EVT_CONNECTED, just as is currently done for ACI_EVT_TIMING, so that the user can later retrieve the initial timing values received when the connection was established using lib_aci_get_cx_interval_ms(...) etc.

daviddedwin commented 9 years ago

This is correct, this should have been done but was missed in the ACI_EVT_CONNECTED. This should be merged in. Thanks.

Skjerve commented 9 years ago

Pulled into version 0.9.5.beta. Thanks for reporting this.