Important changes to repositories hosted on mbed.com
Mbed hosted mercurial repositories are deprecated and are due to be permanently deleted in July 2026.
To keep a copy of this software download the repository Zip archive or clone locally using Mercurial.
It is also possible to export all your personal repositories from the account settings page.
Diff: SPI_Encoder.h
- Revision:
- 4:2331b7fcfe8d
- Parent:
- 3:d3694519bd73
- Child:
- 5:1458a8f024dc
--- a/SPI_Encoder.h Thu Sep 19 13:00:42 2019 +0000
+++ b/SPI_Encoder.h Thu Sep 26 13:49:51 2019 +0000
@@ -4,7 +4,7 @@
#include "mbed.h"
#define encoder_num 4
-#define PI 3.14159265359
+#define PI 3.14159265359f
/* cui amt203 */
@@ -12,7 +12,7 @@
{
public:
SPI_Encoder(PinName mosi, PinName miso, PinName sclk, PinName _cs0, PinName _cs1, PinName _cs2, PinName _cs3, float t);
- void getPosition(int num);
+ bool getPosition(int num);
bool setZero(int num);
void inverse(int num);