Skip to content
GitLab
Explore
Sign in
Register
Primary navigation
Search or go to…
Project
D
D4-Embedded
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
D4-Furlough
D4-Embedded
Commits
ec2a7f82
Commit
ec2a7f82
authored
4 years ago
by
rec1g18
Browse files
Options
Downloads
Patches
Plain Diff
Update DancingCrocs.cpp added correct places to send
parent
29c8a75e
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
src/DancingCrocs.cpp
+9
-4
9 additions, 4 deletions
src/DancingCrocs.cpp
with
9 additions
and
4 deletions
src/DancingCrocs.cpp
+
9
−
4
View file @
ec2a7f82
...
...
@@ -108,11 +108,14 @@
#include
"DenisBluetooth.hpp"
static
uint8_t
sendDirection
;
// Left 192 Right 48 Backward 12 Forward 3
Jump 240 InAir 15 Landed 0
static
uint8_t
sendDirection
;
// Left 192 Right 48 Backward 12 Forward 3
current line 144 163
extern
BLECharacteristic
*
jumpCounterChar
;
static
uint8_t
sendJumping
;
// Jump 240 InAir 15 Landed 0 (current line 248 235 241)
int16_t
xRaw
,
yRaw
,
zRaw
;
// Outputs
static
unsigned
int
state
;
float
xCal
,
yCal
,
zCal
,
rCal
;
...
...
@@ -225,7 +228,7 @@ void _robADXL375_jump()
{
// A cross over of values to allow debounce
state
=
Above
;
first
=
true
;
send
Direction
=
InAir
;
send
Jumping
=
InAir
;
#ifdef ADXL375_JUMPING_SERIAL_PRINT
Serial
.
println
(
"In Air"
);
#endif
...
...
@@ -235,12 +238,14 @@ void _robADXL375_jump()
if
(
rCal
<=
1
)
//(analogRead(potPin)<minADC) // Potentially change to analogue(read) if the code says "Landed" at bad times.
{
state
=
Flat
;
sendJumping
=
Landed
;
#ifdef ADXL375_JUMPING_SERIAL_PRINT
Serial
.
println
(
"Landed"
);
Serial
.
println
();
Serial
.
println
();
Serial
.
println
();
#endif
}
else
if
(
first
&&
(
xSum
>=
100
))
{
sendJumping
=
Jumping
;
#ifdef ADXL375_JUMPING_SERIAL_PRINT
Serial
.
println
(
"Jumping"
);
#endif
...
...
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