mirror of
https://github.com/bluekitchen/btstack.git
synced 2025-02-24 21:39:55 +00:00
Merge branch 'master' of https://github.com/bluekitchen/btstack
This commit is contained in:
commit
7e23d729e3
12
src/hsp_hs.c
12
src/hsp_hs.c
@ -348,18 +348,26 @@ static void hsp_run(void){
|
||||
if (hs_ok_received) break;
|
||||
|
||||
if (hs_microphone_gain >= 0){
|
||||
int gain = hs_microphone_gain;
|
||||
hs_microphone_gain = -1;
|
||||
char buffer[20];
|
||||
sprintf(buffer, "%s=%d\r\n", HSP_HS_MICROPHONE_GAIN, hs_microphone_gain);
|
||||
err = hsp_hs_send_str_over_rfcomm(rfcomm_cid, buffer);
|
||||
if (!err) hs_microphone_gain = -1;
|
||||
if (err) {
|
||||
hs_microphone_gain = gain;
|
||||
}
|
||||
break;
|
||||
}
|
||||
|
||||
if (hs_speaker_gain >= 0){
|
||||
int gain = hs_speaker_gain;
|
||||
hs_speaker_gain = -1;
|
||||
char buffer[20];
|
||||
sprintf(buffer, "%s=%d\r\n", HSP_HS_SPEAKER_GAIN, hs_speaker_gain);
|
||||
err = hsp_hs_send_str_over_rfcomm(rfcomm_cid, buffer);
|
||||
if (!err) hs_speaker_gain = -1;
|
||||
if (err) {
|
||||
hs_speaker_gain = gain;
|
||||
}
|
||||
break;
|
||||
}
|
||||
|
||||
|
@ -46,7 +46,7 @@
|
||||
#include <stdlib.h>
|
||||
#include <string.h>
|
||||
|
||||
#include "hci_cmds.h"
|
||||
#include <btstack/hci_cmds.h>
|
||||
#include "hci.h"
|
||||
#include "debug.h"
|
||||
|
||||
|
Loading…
x
Reference in New Issue
Block a user