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: PolyServo.h
- Revision:
- 1:1135f0b1566e
- Parent:
- 0:6105cf98b610
- Child:
- 2:f982504e6e84
--- a/PolyServo.h Fri Jun 26 08:23:05 2015 +0000
+++ b/PolyServo.h Sat Jun 27 06:03:19 2015 +0000
@@ -2,6 +2,7 @@
#define POLYSERVO_H
#include "mbed.h"
+#include "FPointer.h"
#include <vector>
@@ -15,11 +16,11 @@
//DigitalOut * servos;
bool global_enable;
- int position[];
+ std::vector<int> positions;
int numservos;
Polyservo(DigitalOut servo_pins[], int num_pins);
- void set_position(int pos);
+ void set_position(int s, int pos);
@@ -28,9 +29,13 @@
private:
Ticker period_tick;
- std::vector<Timeout *> servo_times;
+ std::vector<Timeout *> servo_timers;
//Timeout * servo_times;
+ uint32_t servo_set(uint32_t);
+
+ void servos_reset(void);
+