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.
Dependencies: mbed Servo ros_lib_kinetic
Diff: Motors/Motor.h
- Revision:
- 7:8248af58df5a
- Parent:
- 6:2cc2aac35868
- Child:
- 8:262c6c40bff9
--- a/Motors/Motor.h Tue Nov 12 12:56:02 2019 +0000
+++ b/Motors/Motor.h Tue Nov 19 12:55:44 2019 +0000
@@ -7,7 +7,7 @@
#include "mbed.h"
#include "Buzzer.h"
-#include "LED.h"
+
/*--------------------------------------------------------------------------------
---------------------------------DEFINES------------------------------------------
@@ -37,9 +37,9 @@
{
public:
cMotor(PwmOut pwm, DigitalOut fwd, DigitalOut rev); //Constructor, initialised motor pinouts
- void Forwards(float speed);
- void Backwards(float speed);
- void Stop();
+ void Forwards(float speed); //Drives motor forwards
+ void Backwards(float speed);//Drives motor backwards
+ void Stop(); //Stops both motors
private:
PwmOut _pwm;
DigitalOut _fwd;
@@ -51,7 +51,7 @@
-----------------------------------Functions---------------------------------------
--------------------------------------------------------------------------------*/
void Check_for_obstacles(uint8_t TOFRange[4]); //Obstacle avoidance functionality
-
+void update_power_levels(float vBatt); //Sends power level to the LED class for further processing
/*--------------------------------------------------------------------------------
--------------------------------External Variables--------------------------------
--------------------------------------------------------------------------------*/