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.
Leds/LEDs.h
- Committer:
- HenryWTriff
- Date:
- 2020-03-28
- Revision:
- 15:944ef5ed4533
- Parent:
- 14:edaf69190fcc
- Child:
- 16:17f91f51358f
File content as of revision 15:944ef5ed4533:
#ifndef LEDS_H
#define LEDS_H
#include "mbed.h"
#include "Gamepad.h"
#include "N5110.h"
#include "FXOS8700CQ.h"
#include "Graphics.h"
#include "Mechanics.h"
#include "Menu.h"
#include "Ghost.h"
#include <string>
/** LEDs Class
* @brief Controls the LEDs on the device
* @author Henry W Triff
* @date Mar, 2020
*/
class LEDs
{
public:
/** Constructor */
LEDs();
/** Destructor */
~LEDs();
/** Changes the state of the LEDs depending on the speed of the vehicle
* @param leds_on If LEDs are enabled in settings (bool)
* @param speed The speed of the player (float)
* @param max_speed The maximum speed of the players chosen vehicle (float)
* @param Device The object for the gamepad class (object)
*/
void Speed(bool leds_on, float speed, float max_speed, Gamepad &Device);
/** Changes the state of the LEDs for race count down
* @param leds_on If LEDs are enabled in settings (bool)
* @param state The current number during countdown (int)
* @param Device The object for the gamepad class (object)
*/
void Start_Sequence(bool leds_on, int state, Gamepad &Device);
/** Turns off all LEDs
* @param Device The object for the gamepad class (object)
*/
void Clear(Gamepad &Device);
private:
};
#endif