Pat McC / thruster
Committer:
pmmccorkell
Date:
Mon Nov 23 15:12:08 2020 +0000
Revision:
1:94191f7e9b27
Parent:
0:50cdd1590925
Child:
4:d32183587460
dzfg

Who changed what in which revision?

UserRevisionLine numberNew contents of line
pmmccorkell 0:50cdd1590925 1 /*
pmmccorkell 0:50cdd1590925 2 * Thrust class for LPC1768
pmmccorkell 0:50cdd1590925 3 * US Naval Academy
pmmccorkell 0:50cdd1590925 4 * Robotics and Control TSD
pmmccorkell 0:50cdd1590925 5 * Patrick McCorkell
pmmccorkell 0:50cdd1590925 6 *
pmmccorkell 0:50cdd1590925 7 * Created: 2020 Nov 23
pmmccorkell 0:50cdd1590925 8 *
pmmccorkell 0:50cdd1590925 9 */
pmmccorkell 0:50cdd1590925 10
pmmccorkell 0:50cdd1590925 11 #include "mbed.h"
pmmccorkell 0:50cdd1590925 12
pmmccorkell 0:50cdd1590925 13 class Thruster {
pmmccorkell 0:50cdd1590925 14 public:
pmmccorkell 0:50cdd1590925 15 Thruster(PinName pin, float dir);
pmmccorkell 0:50cdd1590925 16 void setEvent();
pmmccorkell 0:50cdd1590925 17 void clearEvent();
pmmccorkell 0:50cdd1590925 18 void set_period(double thruster_time);
pmmccorkell 0:50cdd1590925 19 void set_pw(double thruster_pw);
pmmccorkell 0:50cdd1590925 20 double get_pw();
pmmccorkell 0:50cdd1590925 21 double get_speed();
pmmccorkell 0:50cdd1590925 22 int set_max(double new_max);
pmmccorkell 0:50cdd1590925 23 uint32_t thruster_data();
pmmccorkell 0:50cdd1590925 24 int set_speed(double pntr);
pmmccorkell 0:50cdd1590925 25
pmmccorkell 0:50cdd1590925 26 protected:
pmmccorkell 0:50cdd1590925 27 PwmOut _pwm;
pmmccorkell 0:50cdd1590925 28 PinName _pin;
pmmccorkell 0:50cdd1590925 29 float _d;
pmmccorkell 0:50cdd1590925 30 int _lock;
pmmccorkell 1:94191f7e9b27 31 double _max;
pmmccorkell 0:50cdd1590925 32 double _base_pw, _period;
pmmccorkell 0:50cdd1590925 33 };