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
eb36d3cc
Commit
eb36d3cc
authored
Apr 03, 2023
by
captainwong
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
update
parent
e0566d53
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
10 additions
and
1 deletion
+10
-1
ademco.c
ademco.c
+8
-0
ademco.h
ademco.h
+2
-1
No files found.
ademco.c
View file @
eb36d3cc
...
...
@@ -60,6 +60,14 @@ int ademcoDecodeSignalStrength(uint8_t code) {
return
((
code
>>
4
)
&
0x0F
)
*
10
+
(
code
&
0x0F
);
}
int
ademcoIsValidAccount
(
const
char
*
acct
)
{
while
(
*
acct
)
{
if
(
!
isxdigit
(
*
acct
++
))
return
0
;
}
return
1
;
}
int
ademcoIsMachineStatusEvent
(
AdemcoEvent
ademcoEvent
)
{
return
ademcoEvent
==
EVENT_ARM
||
ademcoEvent
==
EVENT_HALFARM
...
...
ademco.h
View file @
eb36d3cc
...
...
@@ -364,7 +364,8 @@ ADEMCO_EXPORT_SYMBOL uint8_t ademcoEncodeSignalStrength(int strength);
ADEMCO_EXPORT_SYMBOL
int
ademcoDecodeSignalStrength
(
uint8_t
code
);
//////////////////////// AdemcoEvent functions ////////////////////////
//! 是否合法主机账号
ADEMCO_EXPORT_SYMBOL
int
ademcoIsValidAccount
(
const
char
*
acct
);
//! 是否主机状态事件
ADEMCO_EXPORT_SYMBOL
int
ademcoIsMachineStatusEvent
(
AdemcoEvent
ademcoEvent
);
//! 是否主机类型事件
...
...
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