Commit bf82a042 authored by 黄振令's avatar 黄振令

【修改内容】1. 网关配置文件目录/usr/kk/dev_config_table, db目录/usr/kk, tsl目录:/usr/kk ;2....

【修改内容】1. 网关配置文件目录/usr/kk/dev_config_table, db目录/usr/kk, tsl目录:/usr/kk ;2. 数据类强制转换:类型需要对上,不然大端系统转化会出问题,
parent 430e719a
......@@ -6,7 +6,7 @@
#include "kk_property_db.h"
#define KK_PROPERTIES_DB_FILE "kk_properties.db"
#define KK_PROPERTIES_DB_FILE "/usr/kk/kk_properties.db"
typedef struct {
void *mutex;
......
......@@ -7,7 +7,7 @@
#include "sqlite3.h"
#include "kk_log.h"
#define KK_SUB_DB_FILE "subDevice.db"
#define KK_SUB_DB_FILE "/usr/kk/subDevice.db"
typedef struct {
void *mutex;
......
......@@ -4,9 +4,9 @@
#include "kk_tsl_common.h"
#include "kk_dm_mng.h"
#include "kk_log.h"
#define TSL_SUBDEVICE_PATH_FILE "/home/kk/tsl/product_%s.json"
#define TSL_GATEWAY_PATH_FILE "/home/kk/tsl/gateway-%s.json"
#define TSL_CCU_PATH_FILE "/home/kk/tsl/ccu-%s.json"
#define TSL_SUBDEVICE_PATH_FILE "/usr/kk/tsl/product_%s.json"
#define TSL_GATEWAY_PATH_FILE "/usr/kk/tsl/gateway-%s.json"
#define TSL_CCU_PATH_FILE "/usr/kk/tsl/ccu-%s.json"
char* kk_load_json(const char *productCode,int type)
{
......
......@@ -254,7 +254,7 @@ error_return:
#define KK_DEVICE_MAP_TABLE_FILE "./ZB/dev_map_table.json"
#define KK_DEVICE_MAP_TABLE_FILE "/usr/kk/dev_config_table/dev_map_table.json"
#define KK_DEVICE_MAP_TABLE_ARRAY_IDENTIFY "mapTable"
#define KK_DEVICE_CONFIG_MAP_TABLE_ARRAY_IDENTIFY "config"
......@@ -422,7 +422,7 @@ char *kk_match_productCode(const char* modelId)
static kk_dev_config_map *dev_config_map = NULL;
#define KK_DEVICE_CONFIG_MAP_TABLE_FILE_PREFIX "./ZB/dev_config_table/device_%s.json"
#define KK_DEVICE_CONFIG_MAP_TABLE_FILE_PREFIX "/usr/kk/dev_config_table/device_%s.json"
......
......@@ -10,7 +10,7 @@
#define KK_DEVICE_DB_TABLE "kk_device"
#define KK_DEVICE_DB_FILE "kk_device.db"
#define KK_DEVICE_DB_FILE "/usr/kk/kk_device.db"
......
......@@ -172,7 +172,7 @@ int kk_tsl_set_gloabl_OnOff(jrpc_context * ctx,EmberNodeId node,unsigned char ep
uint8_t Onoff = 0;
EmberStatus status = 0;
Onoff = *(uint8_t*)data;
Onoff = *(int*)data;
emberAfAppPrintln("[tsl set:OnOff],Onoff=0x%02x",Onoff);
if(node==EMBER_AF_PLUGIN_DEVICE_TABLE_NULL_NODE_ID){
......@@ -206,7 +206,7 @@ int kk_tsl_set_windowCovering_OperationMode(jrpc_context * ctx,EmberNodeId node,
uint8_t Operation = 0;
EmberStatus status = 0;
Operation = *(uint8_t*)data;
Operation = *(int*)data;
emberAfAppPrintln("[tsl set:Window Covering Operation Mode],mode=0x%02x",Operation);
if(node==EMBER_AF_PLUGIN_DEVICE_TABLE_NULL_NODE_ID){
......@@ -242,7 +242,7 @@ int kk_tsl_set_windowCovering_mode(jrpc_context * ctx,EmberNodeId node,unsigned
uint8_t WCmode = 0;
EmberStatus status = 0;
mode = *(uint8_t*)data;
mode = *(int*)data;
emberAfAppPrintln("[tsl set:Window Covering Run Mode],mode=0x%02x",mode);
if(mode==WC_calibration_mode){
......@@ -288,7 +288,7 @@ int kk_tsl_set_windowCovering_position(jrpc_context * ctx,EmberNodeId node,unsig
uint8_t position = 0;
EmberStatus status = 0;
position = *(uint8_t*)data;
position = *(int*)data;
emberAfAppPrintln("[tsl set:Window Covering Position],position=0x%02x",position);
status = WindowCover_GotoLiftPercentage(node,ep,position);
......@@ -326,7 +326,7 @@ static int kk_zclColorControlMovetohueandsat(EmberNodeId node,unsigned char ep)
}
int kk_tsl_set_colorlight_RGB_red(jrpc_context * ctx,EmberNodeId node,unsigned char ep,void* data)
{
int value = *(uint8_t*)data;
int value = *(int*)data;
EmberStatus status = 0;
emberAfAppPrintln("[tsl set:kk_tsl_set_colorloght_RGB_red],value=0x%02x",value);
//s_Red = value;
......@@ -337,7 +337,7 @@ int kk_tsl_set_colorlight_RGB_red(jrpc_context * ctx,EmberNodeId node,unsigned c
}
int kk_tsl_set_colorlight_RGB_green(jrpc_context * ctx,EmberNodeId node,unsigned char ep,void* data)
{
int value = *(uint8_t*)data;
int value = *(int*)data;
EmberStatus status = 0;
emberAfAppPrintln("[tsl set:kk_tsl_set_colorloght_RGB_green],value=0x%02x",value);
//s_Green = value;
......@@ -348,7 +348,7 @@ int kk_tsl_set_colorlight_RGB_green(jrpc_context * ctx,EmberNodeId node,unsigned
}
int kk_tsl_set_colorlight_RGB_blue(jrpc_context * ctx,EmberNodeId node,unsigned char ep,void* data)
{
int value = *(uint8_t*)data;
int value = *(int*)data;
EmberStatus status = 0;
emberAfAppPrintln("[tsl set:kk_tsl_set_colorloght_RGB_blue],value=0x%02x",value);
//s_Blue = value;
......@@ -360,7 +360,7 @@ int kk_tsl_set_colorlight_RGB_blue(jrpc_context * ctx,EmberNodeId node,unsigned
int kk_tsl_set_colorlight_Brightness(jrpc_context * ctx,EmberNodeId node,unsigned char ep,void* data)
{
int value = *(uint8_t*)data;
int value = *(int*)data;
EmberStatus status = 0;
emberAfAppPrintln("[tsl set:kk_tsl_set_colorloght_Brightness],value=0x%02x",value);
if(node==EMBER_AF_PLUGIN_DEVICE_TABLE_NULL_NODE_ID){
......@@ -375,7 +375,7 @@ int kk_tsl_set_colorlight_Brightness(jrpc_context * ctx,EmberNodeId node,unsigne
int kk_tsl_set_colorlight_mode(jrpc_context * ctx,EmberNodeId node,unsigned char ep,void* data)
{
int value = *(uint8_t*)data;
int value = *(int*)data;
EmberStatus status = EMBER_ERR_FATAL;
kk_dev_config_item_extra_data *mode;
int ix = 1;
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment