void net_msg_cmd_do(void) { CHECKPOINT(0x44) delay100(2); // commands 40-49 are special AT commands, thus, disable net_msg here if ((net_msg_cmd_code < 40) || (net_msg_cmd_code > 49)) net_msg_start(); // Execute cmd: ask car module to execute first: if ((vehicle_fn_commandhandler == NULL)|| (! vehicle_fn_commandhandler(TRUE, net_msg_cmd_code,net_msg_cmd_msg))) { // Car module does not feel responsible, fall back to standard: if( !net_msg_cmd_exec() ) { // No standard as well => return "unimplemented" STP_UNIMPLEMENTED(net_scratchpad, net_msg_cmd_code); net_msg_encode_puts(); } } // terminate IPSEND by Ctrl-Z (should this be disabled for commands 40-49 as well?) net_msg_send(); #ifdef OVMS_ACCMODULE acc_handle_msg(TRUE, net_msg_cmd_code, net_msg_cmd_msg); #endif // clear command net_msg_cmd_code = 0; net_msg_cmd_msg[0] = 0; }
BOOL net_sms_handle_cooldown(char *caller, char *command, char *arguments) { if (vehicle_fn_commandhandler != NULL) vehicle_fn_commandhandler(FALSE, 25, NULL); net_send_sms_start(caller); net_puts_rom(NET_MSG_COOLDOWN); #ifdef OVMS_ACCMODULE acc_handle_msg(FALSE, 25, NULL); #endif return TRUE; }
BOOL net_sms_handle_chargestop(char *caller, char *command, char *arguments) { if (vehicle_fn_commandhandler != NULL) vehicle_fn_commandhandler(FALSE, 12, NULL); net_notify_suppresscount = 30; // Suppress notifications for 30 seconds net_send_sms_start(caller); net_puts_rom(NET_MSG_CHARGESTOP); #ifdef OVMS_ACCMODULE acc_handle_msg(FALSE, 12, NULL); #endif return TRUE; }