Game

Dependencies:   mbed

Embed: (wiki syntax)

« Back to documentation index

LEDs Class Reference

LEDs Class Reference

LEDs Class. More...

#include <LEDs.h>

Public Member Functions

 LEDs ()
 Constructor.
 ~LEDs ()
 Destructor.
void Speed (bool leds_on, float speed, float max_speed, Gamepad &Device)
 Changes the state of the LEDs depending on the speed of the vehicle.
void Start_Sequence (bool leds_on, int state, Gamepad &Device)
 Changes the state of the LEDs for race count down.
void Clear (Gamepad &Device)
 Turns off all LEDs.

Detailed Description

LEDs Class.

Controls the LEDs on the device.

Author:
Henry W Triff
Date:
Mar, 2020

Definition at line 20 of file LEDs.h.


Constructor & Destructor Documentation

LEDs (  )

Constructor.

Definition at line 3 of file LEDs.cpp.

~LEDs (  )

Destructor.

Definition at line 7 of file LEDs.cpp.


Member Function Documentation

void Clear ( Gamepad Device )

Turns off all LEDs.

Parameters:
DeviceThe object for the gamepad class (object)

Definition at line 65 of file LEDs.cpp.

void Speed ( bool  leds_on,
float  speed,
float  max_speed,
Gamepad Device 
)

Changes the state of the LEDs depending on the speed of the vehicle.

Parameters:
leds_onIf LEDs are enabled in settings (bool)
speedThe speed of the player (float)
max_speedThe maximum speed of the players chosen vehicle (float)
DeviceThe object for the gamepad class (object)

Definition at line 12 of file LEDs.cpp.

void Start_Sequence ( bool  leds_on,
int  state,
Gamepad Device 
)

Changes the state of the LEDs for race count down.

Parameters:
leds_onIf LEDs are enabled in settings (bool)
stateThe current number during countdown (int)
DeviceThe object for the gamepad class (object)

Definition at line 34 of file LEDs.cpp.