Skip to content
Snippets Groups Projects
Commit ec2a7f82 authored by rec1g18's avatar rec1g18
Browse files

Update DancingCrocs.cpp added correct places to send

parent 29c8a75e
No related branches found
No related tags found
No related merge requests found
......@@ -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;
sendDirection=InAir;
sendJumping=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
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment