1.修改log;2.增加电池获取消息
This commit is contained in:
parent
d52cfa08d5
commit
b2b4d9eda7
|
@ -54,7 +54,7 @@ extern "C" {
|
||||||
//#include "sf_wifi_svr.h"
|
//#include "sf_wifi_svr.h"
|
||||||
#include <sf_file.h>
|
#include <sf_file.h>
|
||||||
#include <sf_commMng.h>
|
#include <sf_commMng.h>
|
||||||
|
#include "sf_battery.h"
|
||||||
extern pthread_mutex_t Param_mutexLock;
|
extern pthread_mutex_t Param_mutexLock;
|
||||||
SINT8 longClickhold = 0;
|
SINT8 longClickhold = 0;
|
||||||
SINT8 bmoduleupdate = 0;
|
SINT8 bmoduleupdate = 0;
|
||||||
|
@ -149,9 +149,9 @@ const SF_CHAR* app_process_message_getstatusstring(SF_MESSAGE_TYPE_E enType)
|
||||||
case CMD_GPRS:
|
case CMD_GPRS:
|
||||||
return "CMD_GPRS";
|
return "CMD_GPRS";
|
||||||
case CMD_WIFI:
|
case CMD_WIFI:
|
||||||
return "CMD_GPRS";
|
return "CMD_WIFI";
|
||||||
case CMD_DEV:
|
case CMD_DEV:
|
||||||
return "CMD_GPRS";
|
return "CMD_DEV";
|
||||||
default:
|
default:
|
||||||
return "Unknown";
|
return "Unknown";
|
||||||
}
|
}
|
||||||
|
@ -486,7 +486,7 @@ static SINT32 process_cmd_holdup(SF_MESSAGE_BUF_S *pMessageBuf)
|
||||||
static SINT32 sf_app_process_cmd_keyctrl(SF_MESSAGE_BUF_S *pMessageBuf)
|
static SINT32 sf_app_process_cmd_keyctrl(SF_MESSAGE_BUF_S *pMessageBuf)
|
||||||
{
|
{
|
||||||
SF_MESSAGE_CMD_KEY_E enEventkey = pMessageBuf->arg1;
|
SF_MESSAGE_CMD_KEY_E enEventkey = pMessageBuf->arg1;
|
||||||
MLOGI("[%d,%s],[%d,%s]\n", pMessageBuf->arg1,\
|
MLOGD("[%d,%s],[%d,%s]\n", pMessageBuf->arg1,\
|
||||||
sf_keyctrl_getstatusstring(pMessageBuf->arg1),\
|
sf_keyctrl_getstatusstring(pMessageBuf->arg1),\
|
||||||
pMessageBuf->arg2,\
|
pMessageBuf->arg2,\
|
||||||
sf_keypin_getstatusstring(pMessageBuf->arg2));
|
sf_keypin_getstatusstring(pMessageBuf->arg2));
|
||||||
|
@ -539,7 +539,7 @@ static SINT32 sf_app_process_cmd_SD(SF_MESSAGE_BUF_S *pMessageBuf)
|
||||||
//static SINT8 bsdstatus = 0;
|
//static SINT8 bsdstatus = 0;
|
||||||
//static SINT8 bsdoutstatus = 0;
|
//static SINT8 bsdoutstatus = 0;
|
||||||
UINT32 status;
|
UINT32 status;
|
||||||
MLOGI("[%d,%s]\n",pMessageBuf->arg1,app_process_SD_getstatusstring(pMessageBuf->arg1));
|
MLOGD("[%d,%s]\n",pMessageBuf->arg1,app_process_SD_getstatusstring(pMessageBuf->arg1));
|
||||||
switch(pMessageBuf->arg1)
|
switch(pMessageBuf->arg1)
|
||||||
{
|
{
|
||||||
case CMD_SD_STRG_CB_UNKNOWN:
|
case CMD_SD_STRG_CB_UNKNOWN:
|
||||||
|
@ -703,7 +703,7 @@ static SINT32 sf_app_proccess_cmd_poweroff(SF_MESSAGE_BUF_S *pMessageBuf)
|
||||||
|
|
||||||
static SINT32 sf_app_proccess_cmd_mcu(SF_MESSAGE_BUF_S *pMessageBuf)
|
static SINT32 sf_app_proccess_cmd_mcu(SF_MESSAGE_BUF_S *pMessageBuf)
|
||||||
{
|
{
|
||||||
MLOGI("ID = %#x\n",pMessageBuf->arg1);
|
MLOGD("ID = %#x\n",pMessageBuf->arg1);
|
||||||
SF_MESSAGE_BUF_S stMessageBuf = {0};
|
SF_MESSAGE_BUF_S stMessageBuf = {0};
|
||||||
|
|
||||||
switch(pMessageBuf->arg1)
|
switch(pMessageBuf->arg1)
|
||||||
|
@ -736,7 +736,7 @@ static SINT32 sf_app_proccess_cmd_mcu(SF_MESSAGE_BUF_S *pMessageBuf)
|
||||||
|
|
||||||
static SINT32 sf_app_proccess_cmd_para_update(SF_MESSAGE_BUF_S *pMessageBuf)
|
static SINT32 sf_app_proccess_cmd_para_update(SF_MESSAGE_BUF_S *pMessageBuf)
|
||||||
{
|
{
|
||||||
MLOGI("ID = %#x\n",pMessageBuf->arg1);
|
MLOGD("ID = %#x\n",pMessageBuf->arg1);
|
||||||
|
|
||||||
switch(pMessageBuf->arg1)
|
switch(pMessageBuf->arg1)
|
||||||
{
|
{
|
||||||
|
@ -760,7 +760,7 @@ static SINT32 sf_app_proccess_cmd_para_update(SF_MESSAGE_BUF_S *pMessageBuf)
|
||||||
|
|
||||||
static SINT32 sf_app_proccess_cmd_wifi(SF_MESSAGE_BUF_S *pMessageBuf)
|
static SINT32 sf_app_proccess_cmd_wifi(SF_MESSAGE_BUF_S *pMessageBuf)
|
||||||
{
|
{
|
||||||
MLOGI("ID = %#x\n",pMessageBuf->arg1);
|
MLOGD("ID = %#x\n",pMessageBuf->arg1);
|
||||||
|
|
||||||
switch(pMessageBuf->arg1)
|
switch(pMessageBuf->arg1)
|
||||||
{
|
{
|
||||||
|
@ -780,7 +780,7 @@ static SINT32 sf_app_proccess_cmd_wifi(SF_MESSAGE_BUF_S *pMessageBuf)
|
||||||
#if defined(CFG_LIVE_ENBLE)
|
#if defined(CFG_LIVE_ENBLE)
|
||||||
static SINT32 app_proccess_cmd_venc(SF_MESSAGE_BUF_S *pMessageBuf)
|
static SINT32 app_proccess_cmd_venc(SF_MESSAGE_BUF_S *pMessageBuf)
|
||||||
{
|
{
|
||||||
MLOGI("ID = %#x\n",pMessageBuf->arg1);
|
MLOGD("ID = %#x\n",pMessageBuf->arg1);
|
||||||
switch(pMessageBuf->arg1)
|
switch(pMessageBuf->arg1)
|
||||||
{
|
{
|
||||||
case CMD_VENC_START_SUCCESS:
|
case CMD_VENC_START_SUCCESS:
|
||||||
|
@ -819,7 +819,8 @@ static SINT32 app_proccess_cmd_venc(SF_MESSAGE_BUF_S *pMessageBuf)
|
||||||
|
|
||||||
static SINT32 sf_app_proccess_cmd_dev(SF_MESSAGE_BUF_S *pMessageBuf)
|
static SINT32 sf_app_proccess_cmd_dev(SF_MESSAGE_BUF_S *pMessageBuf)
|
||||||
{
|
{
|
||||||
MLOGI("ID = %#x\n",pMessageBuf->arg1);
|
MLOGD("ID = %#x\n",pMessageBuf->arg1);
|
||||||
|
SF_MESSAGE_BUF_S stMessageBuf = {0};
|
||||||
|
|
||||||
switch(pMessageBuf->arg1)
|
switch(pMessageBuf->arg1)
|
||||||
{
|
{
|
||||||
|
@ -827,7 +828,13 @@ static SINT32 sf_app_proccess_cmd_dev(SF_MESSAGE_BUF_S *pMessageBuf)
|
||||||
sf_app_set_temper(pMessageBuf->arg2);
|
sf_app_set_temper(pMessageBuf->arg2);
|
||||||
break;
|
break;
|
||||||
case SF_DEV_CMD_BAT:
|
case SF_DEV_CMD_BAT:
|
||||||
sf_app_set_battery(pMessageBuf->arg2, pMessageBuf->arg3);
|
stMessageBuf.cmdId = CMD_DEV;
|
||||||
|
stMessageBuf.arg1 = SF_DEV_CMD_BAT;
|
||||||
|
stMessageBuf.arg2 = sf_battery_value_get(0);
|
||||||
|
stMessageBuf.arg3 = (SINT32)sf_battery_type_get();
|
||||||
|
printf("[%s:%d]batteryVal=%d battery_type:%d\n",__FUNCTION__,__LINE__,stMessageBuf.arg2, stMessageBuf.arg3);
|
||||||
|
sf_com_message_send_to_cardv(&stMessageBuf);
|
||||||
|
//sf_app_set_battery(pMessageBuf->arg2, pMessageBuf->arg3);
|
||||||
break;
|
break;
|
||||||
default:
|
default:
|
||||||
break;
|
break;
|
||||||
|
@ -846,7 +853,7 @@ void* app_message_recv_thread(void *arg)
|
||||||
{
|
{
|
||||||
continue;
|
continue;
|
||||||
}
|
}
|
||||||
MLOGI("cmdId:[%#x,%s]\n",stMessagebuf.cmdId,app_process_message_getstatusstring(stMessagebuf.cmdId));
|
MLOGD("cmdId:[%#x,%s]\n",stMessagebuf.cmdId,app_process_message_getstatusstring(stMessagebuf.cmdId));
|
||||||
switch(stMessagebuf.cmdId)
|
switch(stMessagebuf.cmdId)
|
||||||
{
|
{
|
||||||
case CMD_KEY:
|
case CMD_KEY:
|
||||||
|
|
Loading…
Reference in New Issue
Block a user