Skip to content

Commit

Permalink
fix error
Browse files Browse the repository at this point in the history
  • Loading branch information
sabas1080 committed Dec 18, 2023
1 parent f873605 commit 99adac2
Show file tree
Hide file tree
Showing 5 changed files with 9 additions and 9 deletions.
4 changes: 2 additions & 2 deletions src/MPU6050_6Axis_MotionApps20.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -269,7 +269,7 @@ static const unsigned char dmpMemory[MPU6050_DMP_CODE_SIZE] PROGMEM = {
#endif

// I Simplified this:
uint8_t dmpInitialize(uint8_t rateDivisor = MPU6050_DMP_FIFO_RATE_DIVISOR, uint8_t mpuAddr = 0x68){
uint8_t MPU6050_6Axis_MotionApps20::dmpInitialize() {
// reset device
DEBUG_PRINTLN(F("\n\nResetting MPU6050..."));
reset();
Expand Down Expand Up @@ -613,4 +613,4 @@ uint16_t MPU6050_6Axis_MotionApps20::dmpGetFIFOPacketSize() {

uint8_t MPU6050_6Axis_MotionApps20::dmpGetCurrentFIFOPacket(uint8_t *data) { // overflow proof
return(GetCurrentFIFOPacket(data, dmpPacketSize));
}
}
4 changes: 2 additions & 2 deletions src/MPU6050_6Axis_MotionApps20.h
Original file line number Diff line number Diff line change
Expand Up @@ -47,7 +47,7 @@ class MPU6050_6Axis_MotionApps20 : public MPU6050_Base {
public:
MPU6050_6Axis_MotionApps20(uint8_t address=MPU6050_DEFAULT_ADDRESS, void *wireObj=0) : MPU6050_Base(address, wireObj) { }

uint8_t dmpInitialize(uint8_t rateDivisor = MPU6050_DMP_FIFO_RATE_DIVISOR, uint8_t mpuAddr = 0x68);
uint8_t dmpInitialize();
bool dmpPacketAvailable();

uint8_t dmpSetFIFORate(uint8_t fifoRate);
Expand Down Expand Up @@ -150,4 +150,4 @@ class MPU6050_6Axis_MotionApps20 : public MPU6050_Base {

typedef MPU6050_6Axis_MotionApps20 MPU6050;

#endif /* _MPU6050_6AXIS_MOTIONAPPS20_H_ */
#endif /* _MPU6050_6AXIS_MOTIONAPPS20_H_ */
2 changes: 1 addition & 1 deletion src/MPU6050_6Axis_MotionApps612.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -341,7 +341,7 @@ const unsigned char dmpMemory[MPU6050_DMP_CODE_SIZE] PROGMEM = {

// this is the most basic initialization I can create. with the intent that we access the register bytes as few times as needed to get the job done.
// for detailed descriptins of all registers and there purpose google "MPU-6000/MPU-6050 Register Map and Descriptions"
uint8_t MPU6050::dmpInitialize(uint8_t rateDivisor = 0x04, uint8_t mpuAddr = 0x68) { // Lets get it over with fast Write everything once and set it up necely
uint8_t MPU6050::dmpInitialize(uint8_t rateDivisor, uint8_t mpuAddr) { // Lets get it over with fast Write everything once and set it up necely
uint8_t val;
uint16_t ival;
// Reset procedure per instructions in the "MPU-6000/MPU-6050 Register Map and Descriptions" page 41
Expand Down
4 changes: 2 additions & 2 deletions src/MPU6050_9Axis_MotionApps41.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -334,7 +334,7 @@ const unsigned char dmpUpdates[MPU6050_DMP_UPDATES_SIZE] PROGMEM = {
0x00, 0x60, 0x04, 0x00, 0x40, 0x00, 0x00
};

uint8_t dmpInitialize(uint8_t rateDivisor = MPU6050_DMP_FIFO_RATE_DIVISOR, uint8_t mpuAddr = 0x68){
uint8_t MPU6050_9Axis_MotionApps41::dmpInitialize() {
// reset device
DEBUG_PRINTLN(F("\n\nResetting MPU6050..."));
reset();
Expand Down Expand Up @@ -884,4 +884,4 @@ uint8_t MPU6050_9Axis_MotionApps41::dmpReadAndProcessFIFOPacket(uint8_t numPacke
// void MPU6050_9Axis_MotionApps41::dmpOverrideQuaternion(long *q);
uint16_t MPU6050_9Axis_MotionApps41::dmpGetFIFOPacketSize() {
return dmpPacketSize;
}
}
4 changes: 2 additions & 2 deletions src/MPU6050_9Axis_MotionApps41.h
Original file line number Diff line number Diff line change
Expand Up @@ -47,7 +47,7 @@ class MPU6050_9Axis_MotionApps41 : public MPU6050_Base {
public:
MPU6050_9Axis_MotionApps41(uint8_t address=MPU6050_DEFAULT_ADDRESS, void *wireObj=0) : MPU6050_Base(address, wireObj) { }

uint8_t dmpInitialize(uint8_t rateDivisor = MPU6050_DMP_FIFO_RATE_DIVISOR, uint8_t mpuAddr = 0x68);
uint8_t dmpInitialize();
bool dmpPacketAvailable();

uint8_t dmpSetFIFORate(uint8_t fifoRate);
Expand Down Expand Up @@ -150,4 +150,4 @@ class MPU6050_9Axis_MotionApps41 : public MPU6050_Base {

typedef MPU6050_9Axis_MotionApps41 MPU6050;

#endif /* _MPU6050_6AXIS_MOTIONAPPS41_H_ */
#endif /* _MPU6050_6AXIS_MOTIONAPPS41_H_ */

0 comments on commit 99adac2

Please sign in to comment.