refactor xbee complet
Fork of Repo_Noeud_Mobile by
Embed:
(wiki syntax)
Show/hide line numbers
Structure.h
00001 #pragma once 00002 00003 typedef char GantsID; 00004 typedef char GameID; 00005 typedef char PlayerID; 00006 typedef char SongID; 00007 typedef char GameMode; 00008 00009 enum GameMode_e { GUNNER, RPS, AirGuitar, WAITING, TEST}; 00010 enum AirGuitar_opMode_e {PICK, FRET}; 00011 enum AirGuitar_note_e {DO, RE, MI, FA, SOL, LA, SI}; 00012 00013 typedef struct { 00014 GameID game; 00015 PlayerID players[2]; 00016 PlayerID winner; 00017 int score_winner; 00018 int score_looser; 00019 } Game_Stats; 00020 00021 typedef struct { 00022 uint16_t x; 00023 uint16_t y; 00024 uint16_t z; 00025 } Accel_t; 00026 00027 typedef struct { 00028 GameID game; 00029 PlayerID players; 00030 SongID track_played; 00031 } Game_Stats_AirGuitar; 00032 00033 struct flex_t{ 00034 bool index; 00035 bool majeur; 00036 bool annulaire; 00037 00038 bool operator !=(const flex_t& a) 00039 { 00040 return( index != a.index && 00041 majeur != a.majeur && 00042 annulaire != a.annulaire 00043 ); 00044 } 00045 }; 00046 00047 00048 typedef struct { 00049 GameMode_e game; 00050 } Fixe_Vers_Mobile; 00051 00052 typedef struct { 00053 GantsID gants; 00054 flex_t flexSensor; 00055 } Mobile_Vers_Fixe; 00056 00057 //data structure 00058 typedef struct 00059 { 00060 char array[50]; 00061 int size; 00062 } data;
Generated on Thu Jul 21 2022 13:34:51 by
1.7.2
