Pat McC / thruster
Committer:
pmmccorkell
Date:
Fri Apr 09 12:16:30 2021 +0000
Revision:
5:e0c525588568
Parent:
4:d32183587460
adsf

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 4:d32183587460 22 void set_max(int new_max);
pmmccorkell 4:d32183587460 23 int get_max();
pmmccorkell 0:50cdd1590925 24 uint32_t thruster_data();
pmmccorkell 0:50cdd1590925 25 int set_speed(double pntr);
pmmccorkell 0:50cdd1590925 26
pmmccorkell 0:50cdd1590925 27 protected:
pmmccorkell 0:50cdd1590925 28 PwmOut _pwm;
pmmccorkell 0:50cdd1590925 29 PinName _pin;
pmmccorkell 0:50cdd1590925 30 float _d;
pmmccorkell 0:50cdd1590925 31 int _lock;
pmmccorkell 4:d32183587460 32 int _max;
pmmccorkell 0:50cdd1590925 33 double _base_pw, _period;
pmmccorkell 0:50cdd1590925 34 };