Long hold => ANC
This commit is contained in:
parent
5af64d048c
commit
8838372781
|
@ -48,14 +48,14 @@ bestool write-image out/open_source/open_source.bin --port /dev/ttyACM1
|
||||||
|
|
||||||
- Single tap : Play/Pause
|
- Single tap : Play/Pause
|
||||||
- Double tap : Next track
|
- Double tap : Next track
|
||||||
- Hold : Fast-Forward (Currently non functional, WIP)
|
- Hold : Toggle ANC(Currently non functional, WIP)
|
||||||
- Triple tap : Volume Up
|
- Triple tap : Volume Up
|
||||||
|
|
||||||
#### Left Ear:
|
#### Left Ear:
|
||||||
|
|
||||||
- Single tap : Play/Pause
|
- Single tap : Play/Pause
|
||||||
- Double tap : Previous track
|
- Double tap : Previous track
|
||||||
- Hold : Rewind (Currently non functional, WIP)
|
- Hold : Toggle ANC(Currently non functional, WIP)
|
||||||
- Triple tap : Volume Down
|
- Triple tap : Volume Down
|
||||||
|
|
||||||
### Single pod active
|
### Single pod active
|
||||||
|
|
|
@ -1378,13 +1378,13 @@ void app_latency_switch_key_handler(void)
|
||||||
* Right Ear:
|
* Right Ear:
|
||||||
* Single tap : Play/Pause
|
* Single tap : Play/Pause
|
||||||
* Double tap : Next track
|
* Double tap : Next track
|
||||||
* Hold : Fast-Forward
|
* Hold : ANC on/off
|
||||||
* Triple tap : Volume Up
|
* Triple tap : Volume Up
|
||||||
*
|
*
|
||||||
* Left Ear:
|
* Left Ear:
|
||||||
* Single tap : Play/Pause
|
* Single tap : Play/Pause
|
||||||
* Double tap : Previous track
|
* Double tap : Previous track
|
||||||
* Hold : Rewind
|
* Hold : ANC on/off
|
||||||
* Triple tap : Volume Down
|
* Triple tap : Volume Down
|
||||||
|
|
||||||
* Single pod active:
|
* Single pod active:
|
||||||
|
@ -1522,37 +1522,11 @@ 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
|
||||||
if (app_tws_is_left_side()){
|
app_anc_key(status,param);
|
||||||
TRACE(0,"Handling %s as left bud",__func__);
|
|
||||||
//Lefty
|
|
||||||
|
|
||||||
}else {
|
|
||||||
TRACE(0,"Handling %s as right bud",__func__);
|
|
||||||
//Righty
|
|
||||||
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
void app_key_long_press_up(APP_KEY_STATUS *status, void *param)
|
|
||||||
{
|
|
||||||
TRACE(2,"%s event %d", __func__, status->event);
|
|
||||||
|
|
||||||
if (!app_tws_ibrt_tws_link_connected()){
|
|
||||||
//No other bud paired
|
|
||||||
TRACE(0,"Handling %s in single bud mode",__func__);
|
|
||||||
}else {
|
|
||||||
//Bud's are working as a pair
|
|
||||||
if (app_tws_is_left_side()){
|
|
||||||
TRACE(0,"Handling %s as left bud",__func__);
|
|
||||||
//Lefty
|
|
||||||
}else {
|
|
||||||
TRACE(0,"Handling %s as right bud",__func__);
|
|
||||||
//Righty
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
void app_key_reboot(APP_KEY_STATUS *status, void *param)
|
void app_key_reboot(APP_KEY_STATUS *status, void *param)
|
||||||
{
|
{
|
||||||
|
@ -1573,7 +1547,6 @@ void app_key_init(void)
|
||||||
{{APP_KEY_CODE_PWR,APP_KEY_EVENT_TRIPLECLICK},"",app_key_triple_tap, NULL},
|
{{APP_KEY_CODE_PWR,APP_KEY_EVENT_TRIPLECLICK},"",app_key_triple_tap, NULL},
|
||||||
{{APP_KEY_CODE_PWR,APP_KEY_EVENT_ULTRACLICK},"",app_key_quad_tap, NULL},
|
{{APP_KEY_CODE_PWR,APP_KEY_EVENT_ULTRACLICK},"",app_key_quad_tap, NULL},
|
||||||
{{APP_KEY_CODE_PWR,APP_KEY_EVENT_LONGPRESS},"",app_key_long_press_down, NULL},
|
{{APP_KEY_CODE_PWR,APP_KEY_EVENT_LONGPRESS},"",app_key_long_press_down, NULL},
|
||||||
{{APP_KEY_CODE_PWR,APP_KEY_EVENT_UP_AFTER_LONGPRESS},"",app_key_long_press_up, NULL},
|
|
||||||
};
|
};
|
||||||
|
|
||||||
app_key_handle_clear();
|
app_key_handle_clear();
|
||||||
|
|
Loading…
Reference in New Issue