mirror of
https://github.com/bluekitchen/btstack.git
synced 2025-01-03 23:47:08 +00:00
hfp: remove trailing newline/carriage return in custom command event
This commit is contained in:
parent
c8149263fa
commit
8deec6605c
@ -44,6 +44,7 @@ and this project adheres to [Semantic Versioning](http://semver.org/spec/v2.0.0.
|
|||||||
- AVRCP: re-register for notification
|
- AVRCP: re-register for notification
|
||||||
- HFP: fix setup/accept of synchronous connection
|
- HFP: fix setup/accept of synchronous connection
|
||||||
- HFP: use mandatory safe settings considering BR/EDR Secure Connections to accept synchronous connections
|
- HFP: use mandatory safe settings considering BR/EDR Secure Connections to accept synchronous connections
|
||||||
|
- HFP: remove trailing newline/carriage return in custom command event
|
||||||
- PBAP Client: make pbap_set_property_selector work for Pull Phonebook
|
- PBAP Client: make pbap_set_property_selector work for Pull Phonebook
|
||||||
- esp32: fix power amplifier control on Lyra T v4.3
|
- esp32: fix power amplifier control on Lyra T v4.3
|
||||||
|
|
||||||
|
@ -1529,7 +1529,9 @@ static bool hfp_parse_byte(hfp_connection_t * hfp_connection, uint8_t byte, int
|
|||||||
return true;
|
return true;
|
||||||
|
|
||||||
case HFP_PARSER_CUSTOM_COMMAND:
|
case HFP_PARSER_CUSTOM_COMMAND:
|
||||||
hfp_parser_store_byte(hfp_connection, byte);
|
if (hfp_parser_is_end_of_line(byte) == false){
|
||||||
|
hfp_parser_store_byte(hfp_connection, byte);
|
||||||
|
}
|
||||||
return true;
|
return true;
|
||||||
|
|
||||||
default:
|
default:
|
||||||
|
@ -608,7 +608,7 @@ TEST(HFPParser, custom_command_hf){
|
|||||||
hfp_register_custom_hf_command(&custom_hf_command);
|
hfp_register_custom_hf_command(&custom_hf_command);
|
||||||
parse_hf(custom_hf_command_string);
|
parse_hf(custom_hf_command_string);
|
||||||
CHECK_EQUAL(1, context.custom_at_command_id);
|
CHECK_EQUAL(1, context.custom_at_command_id);
|
||||||
STRCMP_EQUAL("+FOO:1,2,3\r", (const char *)context.line_buffer);
|
STRCMP_EQUAL("+FOO:1,2,3", (const char *)context.line_buffer);
|
||||||
hfp_at_parser_test_dump_line_buffer();
|
hfp_at_parser_test_dump_line_buffer();
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -621,7 +621,7 @@ TEST(HFPParser, custom_command_ag_with_colon){
|
|||||||
hfp_register_custom_ag_command(&custom_ag_command);
|
hfp_register_custom_ag_command(&custom_ag_command);
|
||||||
parse_ag(custom_hf_command_string);
|
parse_ag(custom_hf_command_string);
|
||||||
CHECK_EQUAL(2, context.custom_at_command_id);
|
CHECK_EQUAL(2, context.custom_at_command_id);
|
||||||
STRCMP_EQUAL("AT+FOO:1,2,3\r", (const char *)context.line_buffer);
|
STRCMP_EQUAL("AT+FOO:1,2,3", (const char *)context.line_buffer);
|
||||||
hfp_at_parser_test_dump_line_buffer();
|
hfp_at_parser_test_dump_line_buffer();
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -634,7 +634,7 @@ TEST(HFPParser, custom_command_ag_with_question){
|
|||||||
hfp_register_custom_ag_command(&custom_ag_command);
|
hfp_register_custom_ag_command(&custom_ag_command);
|
||||||
parse_ag(custom_hf_command_string);
|
parse_ag(custom_hf_command_string);
|
||||||
CHECK_EQUAL(3, context.custom_at_command_id);
|
CHECK_EQUAL(3, context.custom_at_command_id);
|
||||||
STRCMP_EQUAL("AT+FOO?\r", (const char *)context.line_buffer);
|
STRCMP_EQUAL("AT+FOO?", (const char *)context.line_buffer);
|
||||||
hfp_at_parser_test_dump_line_buffer();
|
hfp_at_parser_test_dump_line_buffer();
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -647,7 +647,7 @@ TEST(HFPParser, custom_command_hf_with_assignment){
|
|||||||
hfp_register_custom_ag_command(&custom_ag_command);
|
hfp_register_custom_ag_command(&custom_ag_command);
|
||||||
parse_ag(custom_hf_command_string);
|
parse_ag(custom_hf_command_string);
|
||||||
CHECK_EQUAL(3, context.custom_at_command_id);
|
CHECK_EQUAL(3, context.custom_at_command_id);
|
||||||
STRCMP_EQUAL("AT+TEST=ABCDE\r", (const char *)context.line_buffer);
|
STRCMP_EQUAL("AT+TEST=ABCDE", (const char *)context.line_buffer);
|
||||||
hfp_at_parser_test_dump_line_buffer();
|
hfp_at_parser_test_dump_line_buffer();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user