Skip to content

Commit

Permalink
Clean up following item #410 (#431)
Browse files Browse the repository at this point in the history
* Clean up following item #410

Remove unused variables
Updated Tilt calc on line 1232 in line with item #410

* Upversion firmware ID
  • Loading branch information
thegreatgunbantoad authored Nov 13, 2020
1 parent c0c8447 commit 02952dd
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 5 deletions.
2 changes: 1 addition & 1 deletion pio/lib/Globals/Globals.h
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@
extern Ticker flasher;

// defines go here
#define FIRMWAREVERSION "6.3.1"
#define FIRMWAREVERSION "6.4.1"

#define API_FHEM true
#define API_UBIDOTS true
Expand Down
5 changes: 1 addition & 4 deletions pio/src/iSpindel.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -89,7 +89,6 @@ uint8_t my_tempscale = TEMP_CELSIUS;
int8_t my_OWpin = -1;

uint32_t DSreqTime = 0;
float pitch, roll;

int16_t ax, ay, az;
float Volt, Temperatur, Tilt, Gravity; // , corrGravity;
Expand Down Expand Up @@ -1230,9 +1229,7 @@ void setup()
float _ax = ax;
float _ay = ay;
float _az = az;
float pitch = (atan2(_ay, sqrt(_ax * _ax + _az * _az))) * 180.0 / M_PI;
float roll = (atan2(_ax, sqrt(_ay * _ay + _az * _az))) * 180.0 / M_PI;
Tilt = sqrt(pitch * pitch + roll * roll);
Tilt = acos(_az / (sqrt(_ax * _ax + _ay * _ay + _az * _az))) * 180.0 / M_PI;
}
#endif

Expand Down

0 comments on commit 02952dd

Please sign in to comment.