We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 47cf91c commit 5faf8e1Copy full SHA for 5faf8e1
src/AMS_AS5600.cpp
@@ -14,7 +14,7 @@
14
** GitHub - https://github.com/S-LABc
15
** Gmail - romansklyar15@gmail.com
16
*
17
- * Copyright (C) 2022. v1.8 / License MIT / Скляр Роман S-LAB
+ * Copyright (C) 2022. v1.9 / License MIT / Скляр Роман S-LAB
18
*/
19
20
#include "AMS_AS5600.h"
@@ -1261,7 +1261,7 @@ word AS5600::getScaledAngle(void) {
1261
1262
AS5600StatusReports AS5600::getStatus(void) {
1263
AS_SendFirstRegister(AS5600_STATUS_REG);
1264
- return (AS5600StatusReports)AS_RequestSingleRegister();
+ return (AS5600StatusReports)((AS_RequestSingleRegister() >> AS5600_STATUS_BIT_MH_3) & 0x07); // 0x07 = 0b00000111
1265
}
1266
/*
1267
* @brief: определить наличие магнита. регистр STATUS (MD:5)
0 commit comments