hfp ag: wrap gsm model function

This commit is contained in:
Milanka Ringwald 2016-01-21 14:44:55 +01:00
parent b0d2e4a3d5
commit 81ee2c99de
4 changed files with 14 additions and 9 deletions

View File

@ -1454,7 +1454,6 @@ static void hfp_ag_call_sm(hfp_ag_call_event_t event, hfp_connection_t * connect
break;
}
case HFP_AG_OUTGOING_CALL_RINGING:
// hfp_gsm_handle_event();
connection = hfp_ag_connection_for_call_state(HFP_CALL_OUTGOING_DIALING);
if (!connection){
log_info("hfp_ag_call_sm: did not find outgoing connection in dialing state");
@ -2274,5 +2273,8 @@ void hfp_ag_set_subcriber_number_information(hfp_phone_number_t * numbers, int n
subscriber_numbers_count = numbers_count;
}
void hfp_ag_clear_last_dialed_number(void){
hfp_gsm_clear_last_dialed_number();
}

View File

@ -302,6 +302,11 @@ void hfp_ag_accept_held_incoming_call(void);
*/
void hfp_ag_reject_held_incoming_call(void);
/*
* @brief
*/
void hfp_ag_clear_last_dialed_number(void);
/* API_END */
#if defined __cplusplus

View File

@ -218,10 +218,11 @@ static void user_command(char cmd){
break;
case 'l':
printf("Last dialed number cleared\n");
hfp_gsm_clear_last_dialed_number();
hfp_ag_clear_last_dialed_number();
break;
case 'L':
printf("Last dialed number set\n");
printf("Outgoing call connected, ringing\n");
hfp_ag_outgoing_call_ringing();
break;
case 'n':
printf("Disable Voice Recognition\n");
@ -394,8 +395,6 @@ void packet_handler(uint8_t * event, uint16_t event_size){
|| (memory_1_enabled && strcmp(">1", (char*) &event[3]) == 0)){
printf("Dialstring valid: accept call\n");
hfp_ag_outgoing_call_accepted();
// TODO: calling ringing right away leads to callstatus=2 being skipped. don't call for now
// hfp_ag_outgoing_call_ringing();
} else {
printf("Dialstring invalid: reject call\n");
hfp_ag_outgoing_call_rejected();

View File

@ -469,11 +469,12 @@ static int stdin_process(struct data_source *ds){
case 'l':
log_info("USER:\'%c\'", cmd);
printf("Last dialed number cleared\n");
hfp_gsm_clear_last_dialed_number();
hfp_af_clear_last_dialed_number();
break;
case 'L':
log_info("USER:\'%c\'", cmd);
printf("Last dialed number set\n");
printf("Outgoing call connected, ringing\n");
hfp_ag_outgoing_call_ringing();
break;
case 'n':
log_info("USER:\'%c\'", cmd);
@ -631,8 +632,6 @@ static void packet_handler(uint8_t * event, uint16_t event_size){
|| (memory_1_enabled && strcmp(">1", (char*) &event[3]) == 0)){
printf("Dialstring valid: accept call\n");
hfp_ag_outgoing_call_accepted();
// TODO: calling ringing right away leads to callstatus=2 being skipped. don't call for now
// hfp_ag_outgoing_call_ringing();
} else {
printf("Dialstring invalid: reject call\n");
hfp_ag_outgoing_call_rejected();