diff --git a/src/classic/hsp_ag.c b/src/classic/hsp_ag.c index cecb5ec49..90b52ae73 100644 --- a/src/classic/hsp_ag.c +++ b/src/classic/hsp_ag.c @@ -487,8 +487,8 @@ static void hsp_run(void){ } int gain = ag_microphone_gain; ag_microphone_gain = -1; - char buffer[10]; - sprintf(buffer, "%s=%d\r\n", HSP_MICROPHONE_GAIN, gain); + char buffer[12]; + sprintf(buffer, "\r\n%s=%d\r\n", HSP_MICROPHONE_GAIN, gain); hsp_ag_send_str_over_rfcomm(rfcomm_cid, buffer); break; } @@ -500,8 +500,8 @@ static void hsp_run(void){ } int gain = ag_speaker_gain; ag_speaker_gain = -1; - char buffer[10]; - sprintf(buffer, "%s=%d\r\n", HSP_SPEAKER_GAIN, gain); + char buffer[12]; + sprintf(buffer, "\r\n%s=%d\r\n", HSP_SPEAKER_GAIN, gain); hsp_ag_send_str_over_rfcomm(rfcomm_cid, buffer); break; } diff --git a/src/classic/hsp_hs.c b/src/classic/hsp_hs.c index 721b2f4e6..28df4d5ce 100644 --- a/src/classic/hsp_hs.c +++ b/src/classic/hsp_hs.c @@ -392,7 +392,7 @@ static void hsp_run_handle_state(void){ return; } char buffer[20]; - sprintf(buffer, "%s=%d\r\n", HSP_HS_MICROPHONE_GAIN, hs_microphone_gain); + sprintf(buffer, "%s=%d\r", HSP_HS_MICROPHONE_GAIN, hs_microphone_gain); hsp_hs_send_str_over_rfcomm(rfcomm_cid, buffer); hs_microphone_gain = -1; break; @@ -404,7 +404,7 @@ static void hsp_run_handle_state(void){ return; } char buffer[20]; - sprintf(buffer, "%s=%d\r\n", HSP_HS_SPEAKER_GAIN, hs_speaker_gain); + sprintf(buffer, "%s=%d\r", HSP_HS_SPEAKER_GAIN, hs_speaker_gain); hsp_hs_send_str_over_rfcomm(rfcomm_cid, buffer); hs_speaker_gain = -1; break;