mirror of
https://github.com/bluekitchen/btstack.git
synced 2025-03-01 10:13:29 +00:00
test/le_audio: stop sending on exit
This commit is contained in:
parent
5ade665741
commit
b9b9e477fc
@ -271,7 +271,8 @@ static enum {
|
||||
APP_IDLE,
|
||||
APP_W4_PERIODIC_ENABLED,
|
||||
APP_W4_CREATE_BIG_COMPLETE,
|
||||
APP_STREAMING
|
||||
APP_STREAMING,
|
||||
APP_W4_POWER_OFF,
|
||||
} app_state = APP_IDLE;
|
||||
|
||||
// enumerate default codec configs
|
||||
@ -457,6 +458,8 @@ static void encode_and_send(uint8_t bis_index){
|
||||
}
|
||||
|
||||
static void try_send(void){
|
||||
if (app_state != APP_STREAMING) return;
|
||||
|
||||
bool all_can_send = true;
|
||||
uint8_t i;
|
||||
for (i=0; i<num_bis;i++) {
|
||||
@ -707,6 +710,7 @@ static void stdin_process(char c){
|
||||
}
|
||||
#endif
|
||||
printf("Shutdown...\n");
|
||||
app_state = APP_W4_POWER_OFF;
|
||||
hci_power_control(HCI_POWER_OFF);
|
||||
break;
|
||||
case 's':
|
||||
|
@ -187,7 +187,8 @@ static enum {
|
||||
APP_IDLE,
|
||||
APP_W4_CIS_COMPLETE,
|
||||
APP_SET_ISO_PATH,
|
||||
APP_STREAMING
|
||||
APP_STREAMING,
|
||||
APP_W4_POWER_OFF,
|
||||
} app_state = APP_W4_WORKING;
|
||||
|
||||
// enumerate default codec configs
|
||||
@ -378,6 +379,8 @@ static void encode_and_send(uint8_t cis_index){
|
||||
}
|
||||
|
||||
static void try_send(void){
|
||||
if (app_state != APP_STREAMING) return;
|
||||
|
||||
bool all_can_send = true;
|
||||
uint8_t i;
|
||||
for (i=0; i < num_cis; i++) {
|
||||
@ -653,6 +656,7 @@ static void stdin_process(char c){
|
||||
}
|
||||
#endif
|
||||
printf("Shutdown...\n");
|
||||
app_state = APP_W4_POWER_OFF;
|
||||
hci_power_control(HCI_POWER_OFF);
|
||||
break;
|
||||
case 's':
|
||||
|
Loading…
x
Reference in New Issue
Block a user