Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Contribute to GitLab
Sign in / Register
Toggle navigation
A
ademco_hb
Project
Project
Details
Activity
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
captainwong
ademco_hb
Commits
c12eef54
Commit
c12eef54
authored
Feb 06, 2023
by
captainwong
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
fix
parent
189eb122
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
3 additions
and
3 deletions
+3
-3
ademco.c
ademco.c
+3
-3
No files found.
ademco.c
View file @
c12eef54
...
...
@@ -603,7 +603,7 @@ int ademcoMakeXData(AdemcoXDataSegment* xdata, AdemcoXDataLengthFormat xlf, Adem
xdata
->
lenghFormat
=
xlf
;
if
(
xlf
==
TWO_HEX
&&
translen
+
4
<
ADEMCO_PACKET_XDATA_MAX_LEN
)
{
uint8
_t
*
p
=
xdata
->
raw
;
char
_t
*
p
=
xdata
->
raw
;
*
p
++
=
'['
;
*
p
++
=
(
translen
&
0xFFFF
)
>>
8
;
*
p
++
=
(
translen
&
0xFFFF
)
&
0xFF
;
...
...
@@ -613,7 +613,7 @@ int ademcoMakeXData(AdemcoXDataSegment* xdata, AdemcoXDataLengthFormat xlf, Adem
xdata
->
raw_len
=
p
-
xdata
->
raw
;
return
ADEMCO_OK
;
}
else
if
(
xlf
==
FOUR_DECIMAL
&&
translen
+
6
<
ADEMCO_PACKET_XDATA_MAX_LEN
)
{
uint8
_t
*
p
=
xdata
->
raw
;
char
_t
*
p
=
xdata
->
raw
;
*
p
++
=
'['
;
char
temp
[
5
];
snprintf
(
temp
,
sizeof
(
temp
),
"%04zX"
,
translen
&
0xFFFF
);
...
...
@@ -1046,7 +1046,7 @@ size_t ademcoDecStrToHiLoArray(uint8_t* arr, size_t len, const char* str)
break
;
}
}
while
(
arr
+
len
>
p
)
{
while
(
(
char
*
)
arr
+
len
>
p
)
{
*
p
++
=
0xFF
;
}
return
len
;
...
...
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