Skip to content

Commit

Permalink
improve initialization
Browse files Browse the repository at this point in the history
  • Loading branch information
RobTillaart committed Jul 25, 2024
1 parent e23401c commit e30d950
Show file tree
Hide file tree
Showing 5 changed files with 11 additions and 11 deletions.
4 changes: 4 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,10 @@ The format is based on [Keep a Changelog](http://keepachangelog.com/)
and this project adheres to [Semantic Versioning](http://semver.org/).


## [0.6.1] - 2024-07-25
- explicit initialization of gax, gay and gaz


## [0.6.0] - 2024-06-22
- fix #54, calibrate() function, Kudos to jens-kuerten and MArimont3
- minor edits
Expand Down
10 changes: 3 additions & 7 deletions GY521.cpp
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
//
// FILE: GY521.cpp
// AUTHOR: Rob Tillaart
// VERSION: 0.6.0
// VERSION: 0.6.1
// PURPOSE: Arduino library for I2C GY521 accelerometer-gyroscope sensor
// URL: https://github.com/RobTillaart/GY521

Expand All @@ -26,12 +26,7 @@ GY521::GY521(uint8_t address, TwoWire *wire)
_address = address;
_wire = wire;

_ax = _ay = _az = 0;
_aax = _aay = _aaz = 0;
_gx = _gy = _gz = 0;
_pitch = 0;
_roll = 0;
_yaw = 0;
reset();
}


Expand Down Expand Up @@ -66,6 +61,7 @@ void GY521::reset()
_ax = _ay = _az = 0;
_aax = _aay = _aaz = 0;
_gx = _gy = _gz = 0;
_gax = _gay = _gaz = 0;
_pitch = 0;
_roll = 0;
_yaw = 0;
Expand Down
4 changes: 2 additions & 2 deletions GY521.h
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
//
// FILE: GY521.h
// AUTHOR: Rob Tillaart
// VERSION: 0.6.0
// VERSION: 0.6.1
// PURPOSE: Arduino library for I2C GY521 accelerometer-gyroscope sensor
// URL: https://github.com/RobTillaart/GY521

Expand All @@ -11,7 +11,7 @@
#include "Wire.h"


#define GY521_LIB_VERSION (F("0.6.0"))
#define GY521_LIB_VERSION (F("0.6.1"))

const float GRAVITY = 9.80655;

Expand Down
2 changes: 1 addition & 1 deletion library.json
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@
"type": "git",
"url": "https://github.com/RobTillaart/GY521.git"
},
"version": "0.6.0",
"version": "0.6.1",
"license": "MIT",
"frameworks": "*",
"platforms": "*",
Expand Down
2 changes: 1 addition & 1 deletion library.properties
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
name=GY521
version=0.6.0
version=0.6.1
author=Rob Tillaart <[email protected]>
maintainer=Rob Tillaart <[email protected]>
sentence=Arduino library for GY521 angle measurement
Expand Down

0 comments on commit e30d950

Please sign in to comment.