Skip to content

Commit

Permalink
Merge pull request #20 from jonas-merkle/develop
Browse files Browse the repository at this point in the history
Develop
  • Loading branch information
jonas-merkle authored Mar 26, 2021
2 parents ed0ab77 + 5703d6d commit 333a9b9
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 5 deletions.
6 changes: 3 additions & 3 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -76,7 +76,7 @@ Sorry, this Feature is currently not supported. 😭
| MOSI | MOSI (Pin: 11) | - |
| MISO | MISO (Pin: 12) | - |
| CLK | SCK (Pin: 13) | - |
| CSn | 9 | Can be any unused digital pin on the arduino as log as it's configured here `AS5047P as5047p(<ChipSelectPort>);` |
| CSn | 9 | Can be any unused digital pin on the arduino as long as it's configured here `AS5047P as5047p(<ChipSelectPort>);` |

### Connect to an [Arduino Mega](https://store.arduino.cc/arduino-mega-2560-rev3)

Expand All @@ -88,7 +88,7 @@ Sorry, this Feature is currently not supported. 😭
| MOSI | MOSI (Pin: 51) | - |
| MISO | MISO (Pin: 50) | - |
| CLK | SCK (Pin: 52) | - |
| CSn | 9 | Can be any unused digital pin on the arduino as log as it's configured here `AS5047P as5047p(<ChipSelectPort>);` |
| CSn | 9 | Can be any unused digital pin on the arduino as long as it's configured here `AS5047P as5047p(<ChipSelectPort>);` |

### Connect to an [Adafruit Feather M0](https://www.adafruit.com/product/2772)

Expand All @@ -100,7 +100,7 @@ Sorry, this Feature is currently not supported. 😭
| MOSI | MOSI | - |
| MISO | MISO | - |
| CLK | SCK | - |
| CSn | 9 | Can be any unused digital pin on the arduino as log as it's configured here `AS5047P as5047p(<ChipSelectPort>);` |
| CSn | 9 | Can be any unused digital pin on the arduino as long as it's configured here `AS5047P as5047p(<ChipSelectPort>);` |

## Project Status & ToDo's

Expand Down
4 changes: 2 additions & 2 deletions src/AS5047P.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -207,11 +207,11 @@ float AS5047P::readAngleDegree(bool withDAEC, AS5047P_Types::ERROR_t *errorOut,

if (withDAEC) {
AS5047P_Types::ANGLECOM_t res = AS5047P::read_ANGLECOM(errorOut, verifyParity, checkForComError, checkForSensorError);
return (res.data.values.DAECANG/(float)0x3FFF)*360;
return (res.data.values.DAECANG/(float)16384)*360;
}
else {
AS5047P_Types::ANGLEUNC_t res = AS5047P::read_ANGLEUNC(errorOut, verifyParity, checkForComError, checkForSensorError);
return (res.data.values.CORDICANG/(float)0x3FFF)*360;
return (res.data.values.CORDICANG/(float)16384)*360;
}

}
Expand Down

0 comments on commit 333a9b9

Please sign in to comment.