Skip to content
GitLab
Explore
Sign in
Register
Primary navigation
Search or go to…
Project
D
DLPTS Code
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
Wiki
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Snippets
Deploy
Releases
Package registry
Model registry
Operate
Terraform modules
Monitor
Incidents
Analyze
Value stream analytics
Contributor analytics
Repository analytics
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
GitLab community forum
Contribute to GitLab
Provide feedback
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
Joseph Schaefer
DLPTS Code
Commits
a64d09fa
Commit
a64d09fa
authored
3 years ago
by
Joseph Schaefer
Browse files
Options
Downloads
Patches
Plain Diff
Upload New File
parent
f266a5bc
No related branches found
No related tags found
No related merge requests found
Changes
1
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
helper.ino
+176
-0
176 additions, 0 deletions
helper.ino
with
176 additions
and
0 deletions
helper.ino
0 → 100644
+
176
−
0
View file @
a64d09fa
#include
"helper.h"
void
enableINT6
(){
EICRB
|=
(
0x1
<<
ISC60
);
EICRB
&=
~
(
0x1
<<
ISC61
);
EIMSK
|=
(
0x1
<<
INT6
);
}
void
disableINT6
(){
EIFR
|=
(
0x1
<<
INTF6
);
EIMSK
&=
~
(
0x1
<<
INT6
);
}
void
triggerINT6
(){
INT6_vect
();
}
int
processTrigR
(){
long
result
=
Serial
.
parseInt
(
SKIP_ALL
);
if
(
result
>=
0
&&
result
<
resolution
){
//sprintf(message,"Red trigger is now on segment %i",result);
//Serial.print(message);
}
else
{
//Serial.print(
// "WARNING: The Red trigger is out of range and may never fire"
// );
}
Serial
.
print
(
result
);
return
result
;
}
int
processTrigG
(){
long
result
=
Serial
.
parseInt
(
SKIP_ALL
);
if
(
result
>=
0
&&
result
<
resolution
){
//sprintf(message,"Green trigger is now on segment %i",result);
//Serial.print(message));
}
else
{
//Serial.print(
// "WARNING: The green trigger is out of range and may never fire"
// );
}
Serial
.
print
(
result
);
return
result
;
}
int
processTrigB
(){
long
result
=
Serial
.
parseInt
(
SKIP_ALL
);
if
(
result
>=
0
&&
result
<
resolution
){
//sprintf(message,"Blue trigger is now on segment %i",result);
//Serial.print(message));
}
else
{
//Serial.print(
// "WARNING: The Blue trigger is out of range and may never fire"
// );
}
Serial
.
print
(
result
);
return
result
;
}
unsigned
processPrescaler
(){
long
result
=
Serial
.
parseInt
(
SKIP_ALL
);
if
(
result
>=
0
&&
result
<=
1024
){
switch
(
result
){
case
0
:
return
PRESCALER0
;
break
;
case
1
:
return
PRESCALER1
;
break
;
case
8
:
return
PRESCALER8
;
break
;
case
64
:
return
PRESCALER64
;
break
;
case
256
:
return
PRESCALER256
;
break
;
case
1024
:
return
PRESCALER1024
;
break
;
default:
Serial
.
print
(
"!"
);
return
-
1
;
break
;
}
}
Serial
.
print
(
result
);
}
int
processMaxFrames
(){
long
result
=
Serial
.
parseInt
(
SKIP_ALL
);
if
(
result
>
0
&&
result
<=
UINT_MAX
){
return
result
;
//sprintf(message,"Frame limit is now %i",result);
//Serial.print(message));
}
else
{
Serial
.
print
(
"!"
);
return
-
1
;
}
Serial
.
print
(
result
);
}
int
processResolution
(){
long
result
=
Serial
.
parseInt
(
SKIP_ALL
);
if
(
result
>
0
&&
result
<=
UINT_MAX
){
return
result
;
//sprintf(message,"Reesolution is now %i",result);
}
else
{
Serial
.
print
(
"!"
);
return
-
1
;
}
Serial
.
print
(
result
);
}
int
processCMRA
(){
long
result
=
Serial
.
parseInt
(
SKIP_ALL
);
if
(
result
>
0
&&
result
<=
UINT_MAX
){
return
result
;
//sprintf(message,"cmra is now %i",result);
//Serial.print(message));
}
else
{
Serial
.
print
(
"!"
);
return
-
1
;
}
Serial
.
print
(
result
);
}
int
processCMRB
(){
long
result
=
Serial
.
parseInt
(
SKIP_ALL
);
if
(
result
>
0
&&
result
<=
UINT_MAX
){
return
result
;
//sprintf(message,"cmrb is now %i",result);
}
else
{
Serial
.
print
(
"!"
);
}
return
-
1
;
Serial
.
print
(
result
);
}
\ No newline at end of file
This diff is collapsed.
Click to expand it.
Preview
0%
Loading
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Save comment
Cancel
Please
register
or
sign in
to comment