mirror of
https://github.com/bluekitchen/btstack.git
synced 2025-02-06 12:39:51 +00:00
hfp: track have clip alpha
This commit is contained in:
parent
deac393b74
commit
125560b849
@ -577,6 +577,7 @@ void hfp_reset_context_flags(hfp_connection_t * hfp_connection){
|
||||
hfp_connection->call_waiting_notification_enabled = 0;
|
||||
hfp_connection->command = HFP_CMD_NONE;
|
||||
hfp_connection->enable_status_update_for_ag_indicators = 0xFF;
|
||||
hfp_connection->clip_have_alpha = false;
|
||||
hfp_reset_voice_recognition(hfp_connection);
|
||||
}
|
||||
|
||||
@ -1207,7 +1208,7 @@ static int hfp_parser_is_end_of_line(uint8_t byte){
|
||||
|
||||
static void hfp_parser_reset_line_buffer(hfp_connection_t *hfp_connection) {
|
||||
hfp_connection->line_size = 0;
|
||||
// hfp_connection->line_buffer[0] = 0;
|
||||
// we don't set the first byte to '\0' to allow access to last argument e.g. in hfp_hf_handle_rfcommand
|
||||
}
|
||||
|
||||
static void hfp_parser_store_if_token(hfp_connection_t * hfp_connection, uint8_t byte){
|
||||
@ -1420,6 +1421,10 @@ static bool hfp_parse_byte(hfp_connection_t * hfp_connection, uint8_t byte, int
|
||||
hfp_next_indicators_index(hfp_connection);
|
||||
hfp_connection->ag_indicators_nr = hfp_connection->parser_item_index;
|
||||
break;
|
||||
case HFP_CMD_AG_SENT_CLIP_INFORMATION:
|
||||
// track if last argument exists
|
||||
hfp_connection->clip_have_alpha = hfp_connection->line_size != 0;
|
||||
break;
|
||||
default:
|
||||
break;
|
||||
}
|
||||
|
@ -715,7 +715,8 @@ typedef struct hfp_connection {
|
||||
uint8_t call_index;
|
||||
// also used for CLCC, CCWA, CLIP if set
|
||||
uint8_t bnip_type; // 0 == not set
|
||||
char bnip_number[25]; //
|
||||
char bnip_number[25]; //
|
||||
bool clip_have_alpha;
|
||||
|
||||
#ifdef ENABLE_CC256X_ASSISTED_HFP
|
||||
bool cc256x_send_write_codec_config;
|
||||
|
@ -1269,6 +1269,8 @@ static void hfp_hf_handle_rfcomm_command(hfp_connection_t * hfp_connection){
|
||||
int i;
|
||||
bool event_emited;
|
||||
|
||||
// last argument is still in line_buffer
|
||||
|
||||
switch (hfp_connection->command){
|
||||
case HFP_CMD_GET_SUBSCRIBER_NUMBER_INFORMATION:
|
||||
hfp_connection->command = HFP_CMD_NONE;
|
||||
|
Loading…
x
Reference in New Issue
Block a user