Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
K
k-sdk
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Issues
0
Issues
0
List
Boards
Labels
Milestones
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Analytics
Analytics
CI / CD
Repository
Value Stream
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
陈伟灿
k-sdk
Commits
30d7c7dd
Commit
30d7c7dd
authored
Aug 18, 2020
by
黄振令
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
【修改内容】1. 解决对于物模型要求bool型的数据,如果传string型处理不了;
【提交人】huang.zhenling
parent
1f23e599
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
5 additions
and
2 deletions
+5
-2
midware/tsl/tsl_handle/kk_tsl_api.c
midware/tsl/tsl_handle/kk_tsl_api.c
+3
-0
platform/zigbee/app/builder/Z3GatewayHost/kk_test.c
platform/zigbee/app/builder/Z3GatewayHost/kk_test.c
+2
-2
No files found.
midware/tsl/tsl_handle/kk_tsl_api.c
View file @
30d7c7dd
...
@@ -283,6 +283,9 @@ static int _kk_msg_set_numberOrStr(kk_msg_set_type_t type, int devid, char *key,
...
@@ -283,6 +283,9 @@ static int _kk_msg_set_numberOrStr(kk_msg_set_type_t type, int devid, char *key,
case
KK_TSL_DATA_TYPE_INT
:
case
KK_TSL_DATA_TYPE_INT
:
case
KK_TSL_DATA_TYPE_ENUM
:
case
KK_TSL_DATA_TYPE_ENUM
:
case
KK_TSL_DATA_TYPE_BOOL
:
{
case
KK_TSL_DATA_TYPE_BOOL
:
{
if
(
root
->
type
==
cJSON_String
&&
root
->
value_length
>
0
){
root
->
value_int
=
atoi
(
root
->
value
);
}
res
=
set_shadow_data_func
(
devid
,
key
,
strlen
(
key
),
&
root
->
value_int
,
0
);
res
=
set_shadow_data_func
(
devid
,
key
,
strlen
(
key
),
&
root
->
value_int
,
0
);
}
}
break
;
break
;
...
...
platform/zigbee/app/builder/Z3GatewayHost/kk_test.c
View file @
30d7c7dd
...
@@ -64,9 +64,9 @@ bool kk_rpc_report_LightStatus(EmberEUI64 mac,bool LightStatus)
...
@@ -64,9 +64,9 @@ bool kk_rpc_report_LightStatus(EmberEUI64 mac,bool LightStatus)
root
=
rpc_cJSON_CreateObject
();
root
=
rpc_cJSON_CreateObject
();
if
(
LightStatus
==
true
){
if
(
LightStatus
==
true
){
rpc_cJSON_Add
StringToObject
(
root
,
"LightStatus"
,
"1"
);
rpc_cJSON_Add
NumberToObject
(
root
,
"LightStatus"
,
1
);
}
else
{
}
else
{
rpc_cJSON_Add
StringToObject
(
root
,
"LightStatus"
,
"0"
);
rpc_cJSON_Add
NumberToObject
(
root
,
"LightStatus"
,
0
);
}
}
kk_rpc_report_status
(
root
,
mac
);
kk_rpc_report_status
(
root
,
mac
);
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment