Compare commits
16 Commits
c7372d21d2
...
daaaadc56d
Author | SHA1 | Date |
---|---|---|
Haxk20 | daaaadc56d | |
Ben V. Brown | 15fe2d36ea | |
Ben V. Brown | ab6679d5cb | |
Ben V. Brown | 514f942f9f | |
Ben V. Brown | 1ac4814fdf | |
Ben V. Brown | f12e474b2f | |
Ben V. Brown | ced171a5c5 | |
Ben V. Brown | 2e4460b504 | |
Ben V. Brown | 5ee687b4eb | |
Ben V. Brown | b54f408983 | |
Ben V. Brown | 66ab43c6a6 | |
Ben V. Brown | 162614ee8a | |
Ben V. Brown | 981883459a | |
Ben V. Brown | 258bc5efe4 | |
Ben V. Brown | 11b9eb7fc5 | |
Ben V. Brown | 6f1c846969 |
|
@ -1531,13 +1531,6 @@ void app_anc_key(APP_KEY_STATUS *status, void *param) {
|
||||||
bool flag = app_anc_work_status();
|
bool flag = app_anc_work_status();
|
||||||
|
|
||||||
#if defined(IBRT)
|
#if defined(IBRT)
|
||||||
ibrt_ctrl_t *p_ibrt_ctrl = app_tws_ibrt_get_bt_ctrl_ctx();
|
|
||||||
|
|
||||||
TRACE(2, "[%s] current_role: %d", __func__, p_ibrt_ctrl->current_role);
|
|
||||||
if (p_ibrt_ctrl->current_role == IBRT_SLAVE) {
|
|
||||||
app_anc_notify_master_to_exchange_coef(0, 0);
|
|
||||||
return;
|
|
||||||
}
|
|
||||||
app_anc_status_sync(!flag);
|
app_anc_status_sync(!flag);
|
||||||
#endif
|
#endif
|
||||||
app_anc_status_post(!flag);
|
app_anc_status_post(!flag);
|
||||||
|
|
|
@ -118,6 +118,12 @@ void send_prev_track(void) {
|
||||||
uint8_t action[] = {IBRT_ACTION_BACKWARD};
|
uint8_t action[] = {IBRT_ACTION_BACKWARD};
|
||||||
app_ibrt_if_start_user_action(action, sizeof(action));
|
app_ibrt_if_start_user_action(action, sizeof(action));
|
||||||
}
|
}
|
||||||
|
|
||||||
|
void send_enable_disable_anc(void) {
|
||||||
|
uint8_t action[] = {IBRT_ACTION_ANC_NOTIRY_MASTER_EXCHANGE_COEF};
|
||||||
|
app_ibrt_if_start_user_action(action, sizeof(action));
|
||||||
|
}
|
||||||
|
|
||||||
void app_key_single_tap(APP_KEY_STATUS *status, void *param) {
|
void app_key_single_tap(APP_KEY_STATUS *status, void *param) {
|
||||||
TRACE(2, "%s event %d", __func__, status->event);
|
TRACE(2, "%s event %d", __func__, status->event);
|
||||||
|
|
||||||
|
@ -138,6 +144,7 @@ void app_key_single_tap(APP_KEY_STATUS *status, void *param) {
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
void app_key_double_tap(APP_KEY_STATUS *status, void *param) {
|
void app_key_double_tap(APP_KEY_STATUS *status, void *param) {
|
||||||
TRACE(2, "%s event %d", __func__, status->event);
|
TRACE(2, "%s event %d", __func__, status->event);
|
||||||
|
|
||||||
|
@ -179,6 +186,7 @@ void app_key_triple_tap(APP_KEY_STATUS *status, void *param) {
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
void app_key_quad_tap(APP_KEY_STATUS *status, void *param) {
|
void app_key_quad_tap(APP_KEY_STATUS *status, void *param) {
|
||||||
TRACE(2, "%s event %d", __func__, status->event);
|
TRACE(2, "%s event %d", __func__, status->event);
|
||||||
|
|
||||||
|
@ -207,7 +215,7 @@ void app_key_long_press_down(APP_KEY_STATUS *status, void *param) {
|
||||||
send_prev_track();
|
send_prev_track();
|
||||||
} else {
|
} else {
|
||||||
// Bud's are working as a pair
|
// Bud's are working as a pair
|
||||||
app_anc_key(status, param);
|
send_enable_disable_anc();
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -268,4 +276,4 @@ void app_key_init_on_charging(void) {
|
||||||
for (i = 0; i < (sizeof(key_cfg) / sizeof(APP_KEY_HANDLE)); i++) {
|
for (i = 0; i < (sizeof(key_cfg) / sizeof(APP_KEY_HANDLE)); i++) {
|
||||||
app_key_handle_registration(&key_cfg[i]);
|
app_key_handle_registration(&key_cfg[i]);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
|
@ -279,6 +279,7 @@ void app_ibrt_ui_perform_user_action(uint8_t *p_buff, uint16_t length) {
|
||||||
ibrt_ctrl_t *p_ibrt_ctrl = app_tws_ibrt_get_bt_ctrl_ctx();
|
ibrt_ctrl_t *p_ibrt_ctrl = app_tws_ibrt_get_bt_ctrl_ctx();
|
||||||
|
|
||||||
#ifdef ANC_APP
|
#ifdef ANC_APP
|
||||||
|
//Doesnt actully get used!!!
|
||||||
app_anc_cmd_receive_process(p_buff, length);
|
app_anc_cmd_receive_process(p_buff, length);
|
||||||
#endif
|
#endif
|
||||||
#ifdef ANC_WNR_ENABLED
|
#ifdef ANC_WNR_ENABLED
|
||||||
|
@ -352,6 +353,9 @@ void app_ibrt_ui_perform_user_action(uint8_t *p_buff, uint16_t length) {
|
||||||
app_bt_volumedown();
|
app_bt_volumedown();
|
||||||
app_ibrt_sync_volume_info();
|
app_ibrt_sync_volume_info();
|
||||||
break;
|
break;
|
||||||
|
case IBRT_ACTION_ANC_NOTIRY_MASTER_EXCHANGE_COEF:
|
||||||
|
app_anc_key(NULL, NULL);
|
||||||
|
break;
|
||||||
default:
|
default:
|
||||||
TRACE(2, "%s unknown user action %d\n", __func__, p_buff[0]);
|
TRACE(2, "%s unknown user action %d\n", __func__, p_buff[0]);
|
||||||
break;
|
break;
|
||||||
|
|
Loading…
Reference in New Issue