Lines Matching full:context
173 struct processing_context *context = (struct processing_context *)user_data; in process_step_data() local
179 if (context->local_steps) { in process_step_data()
180 for (uint8_t i = 0; i < (context->n_ap + 1); i++) { in process_step_data()
186 mode_2_data[context->mode_2_data_index].channel = step->channel; in process_step_data()
187 mode_2_data[context->mode_2_data_index].antenna_permutation = in process_step_data()
189 mode_2_data[context->mode_2_data_index].local_iq_sample = in process_step_data()
196 mode_2_data[context->mode_2_data_index].failed = true; in process_step_data()
199 context->mode_2_data_index++; in process_step_data()
202 for (uint8_t i = 0; i < (context->n_ap + 1); i++) { in process_step_data()
208 mode_2_data[context->mode_2_data_index].peer_iq_sample = in process_step_data()
215 mode_2_data[context->mode_2_data_index].failed = true; in process_step_data()
218 context->mode_2_data_index++; in process_step_data()
229 mode_1_data[context->mode_1_data_index].failed = true; in process_step_data()
232 if (context->local_steps) { in process_step_data()
233 if (context->role == BT_CONN_LE_CS_ROLE_INITIATOR) { in process_step_data()
234 mode_1_data[context->mode_1_data_index].toa_tod_initiator = in process_step_data()
236 } else if (context->role == BT_CONN_LE_CS_ROLE_REFLECTOR) { in process_step_data()
237 mode_1_data[context->mode_1_data_index].tod_toa_reflector = in process_step_data()
241 if (context->role == BT_CONN_LE_CS_ROLE_INITIATOR) { in process_step_data()
242 mode_1_data[context->mode_1_data_index].tod_toa_reflector = in process_step_data()
244 } else if (context->role == BT_CONN_LE_CS_ROLE_REFLECTOR) { in process_step_data()
245 mode_1_data[context->mode_1_data_index].toa_tod_initiator = in process_step_data()
250 context->mode_1_data_index++; in process_step_data()
261 struct processing_context context = { in estimate_distance() local
274 bt_le_cs_step_data_parse(&buf, process_step_data, &context); in estimate_distance()
276 context.mode_1_data_index = 0; in estimate_distance()
277 context.mode_2_data_index = 0; in estimate_distance()
278 context.local_steps = false; in estimate_distance()
282 bt_le_cs_step_data_parse(&buf, process_step_data, &context); in estimate_distance()
285 estimate_distance_using_phase_slope(mode_2_data, context.mode_2_data_index); in estimate_distance()
288 estimate_distance_using_time_of_flight(context.mode_1_data_index); in estimate_distance()
298 (double)rtt_based_distance, context.mode_1_data_index); in estimate_distance()
302 (double)phase_slope_based_distance, context.mode_2_data_index); in estimate_distance()