Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
P
proview
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Issues
0
Issues
0
List
Boards
Labels
Milestones
Merge Requests
0
Merge Requests
0
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
Esteban Blanc
proview
Commits
14890c0d
Commit
14890c0d
authored
Jan 30, 2017
by
Claes Sjofors
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
IO Arduino sketch, size message check added
parent
8a6f5f81
Changes
1
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
5 additions
and
3 deletions
+5
-3
otherio/exp/rt/src/pwr_arduino_uno.ino
otherio/exp/rt/src/pwr_arduino_uno.ino
+5
-3
No files found.
otherio/exp/rt/src/pwr_arduino_uno.ino
View file @
14890c0d
...
@@ -47,7 +47,7 @@ int aoCnt;
...
@@ -47,7 +47,7 @@ int aoCnt;
byte
msgType
;
byte
msgType
;
byte
msgId
;
byte
msgId
;
byte
msgSize
;
byte
msgSize
;
byte
msgData
[
1
00
];
byte
msgData
[
1
28
];
byte
rmsg
[
40
];
byte
rmsg
[
40
];
int
sizeErrorCnt
=
0
;
int
sizeErrorCnt
=
0
;
int
noMessageCnt
=
0
;
int
noMessageCnt
=
0
;
...
@@ -151,9 +151,11 @@ int serialRead()
...
@@ -151,9 +151,11 @@ int serialRead()
msgType
=
Serial
.
read
();
msgType
=
Serial
.
read
();
msgSize
-=
3
;
msgSize
-=
3
;
for
(
int
i
=
0
;
i
<
msgSize
;
i
++
)
for
(
int
i
=
0
;
i
<
msgSize
;
i
++
)
{
if
(
i
>=
128
)
break
;
msgData
[
i
]
=
Serial
.
read
();
msgData
[
i
]
=
Serial
.
read
();
}
csum
=
check_checksum
(
msgSize
+
3
,
msgId
,
msgType
,
msgData
);
csum
=
check_checksum
(
msgSize
+
3
,
msgId
,
msgType
,
msgData
);
if
(
debug
)
{
if
(
debug
)
{
...
...
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