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.
thruster.h
- Committer:
- pmmccorkell
- Date:
- 2021-04-09
- Revision:
- 5:e0c525588568
- Parent:
- 4:d32183587460
File content as of revision 5:e0c525588568:
/*
* Thrust class for LPC1768
* US Naval Academy
* Robotics and Control TSD
* Patrick McCorkell
*
* Created: 2020 Nov 23
*
*/
#include "mbed.h"
class Thruster {
public:
Thruster(PinName pin, float dir);
void setEvent();
void clearEvent();
void set_period(double thruster_time);
void set_pw(double thruster_pw);
double get_pw();
double get_speed();
void set_max(int new_max);
int get_max();
uint32_t thruster_data();
int set_speed(double pntr);
protected:
PwmOut _pwm;
PinName _pin;
float _d;
int _lock;
int _max;
double _base_pw, _period;
};