Game
Embed:
(wiki syntax)
Show/hide line numbers
LEDs.h
00001 #ifndef LEDS_H 00002 #define LEDS_H 00003 00004 #include "mbed.h" 00005 #include "Gamepad.h" 00006 #include "N5110.h" 00007 #include "FXOS8700CQ.h" 00008 #include "Graphics.h" 00009 #include "Mechanics.h" 00010 #include "Menu.h" 00011 #include "Ghost.h" 00012 #include <string> 00013 00014 /** LEDs Class 00015 * @brief Controls the LEDs on the device. 00016 * @author Henry W Triff 00017 * @date Mar, 2020 00018 */ 00019 00020 class LEDs 00021 { 00022 public: 00023 /** Constructor */ 00024 LEDs(); 00025 00026 /** Destructor */ 00027 ~LEDs(); 00028 00029 /** Changes the state of the LEDs depending on the speed of the vehicle 00030 * @param leds_on If LEDs are enabled in settings (bool) 00031 * @param speed The speed of the player (float) 00032 * @param max_speed The maximum speed of the players chosen vehicle (float) 00033 * @param Device The object for the gamepad class (object) 00034 */ 00035 void Speed(bool leds_on, float speed, float max_speed, Gamepad &Device); 00036 00037 /** Changes the state of the LEDs for race count down 00038 * @param leds_on If LEDs are enabled in settings (bool) 00039 * @param state The current number during countdown (int) 00040 * @param Device The object for the gamepad class (object) 00041 */ 00042 void Start_Sequence(bool leds_on, int state, Gamepad &Device); 00043 00044 /** Turns off all LEDs 00045 * @param Device The object for the gamepad class (object) 00046 */ 00047 void Clear(Gamepad &Device); 00048 private: 00049 }; 00050 00051 #endif
Generated on Wed Jul 20 2022 17:42:24 by
1.7.2