Руслан Бредун / Mbed 2 deprecated STM32-MC_node

Dependencies:   mbed Watchdog stm32-sensor-base2

Revision:
12:406f75196a12
Parent:
5:97117a837d2c
Child:
14:b3530522908e
--- a/AS5045/AS5045.h	Wed Aug 26 14:26:27 2020 +0530
+++ b/AS5045/AS5045.h	Sun Dec 06 11:05:19 2020 +0000
@@ -10,7 +10,7 @@
   AS5045(PinName cs);								// Constructor
 
   int getPosition();									// Read tick amount from encoder (position)
-  float getRotation();								// Convert position of the encoder to degrees
+  float getAngle();								// Convert position of the encoder to degrees
 
 private:
   SPI _spi;												// MBED SPI instance
@@ -18,8 +18,8 @@
   uint16_t EncoderByteData;										// MBED digital output pin
 
   static const float MAX_VALUE = 1024;			// Maximum possible encoder position value (ticks for full rotation)
-  static const float RESOLUTION = 0.08789;	// Encoder resolution (0.08789 degrees per tick)
-  static const float SPI_FREQ = 500000;		// Frequency of the SPI bus
+  static const float RESOLUTION = 0.3515625;	// Encoder resolution (0.08789 degrees per tick)
+  static const float SPI_FREQ = 5000;		// Frequency of the SPI bus
 };
 
 #endif	// AS5045_H