summaryrefslogtreecommitdiff
path: root/main.cpp
diff options
context:
space:
mode:
authorBenjamin Chausse <benjamin@chausse.xyz>2023-03-21 00:57:34 -0400
committerBenjamin Chausse <benjamin@chausse.xyz>2023-03-21 00:57:34 -0400
commit433faac95e86a4ed61176061c4b0e8451cc58bf5 (patch)
treec814a7eeb61aca319c62681288c265a9419cd894 /main.cpp
parent141fd9b9b5b02257521e41e71562bed6da2523dc (diff)
Rename change() to toggle()
Diffstat (limited to 'main.cpp')
-rw-r--r--main.cpp18
1 files changed, 9 insertions, 9 deletions
diff --git a/main.cpp b/main.cpp
index b53a772..9c8c1b7 100644
--- a/main.cpp
+++ b/main.cpp
@@ -76,7 +76,7 @@ int main()
ChordNote note9(3, 8600, 8600);
ChordNote note10(4, 9000, 9000);*/
- note2.change(0);
+ note2.toggle(0);
const int FRAMERATE = 100;
int renderStart = FRAMERATE * (NB_SQUARES);
@@ -90,7 +90,7 @@ int main()
note8.setRenderStart(renderStart);
note9.setRenderStart(renderStart);
note10.setRenderStart(renderStart);*/
-
+
string displayArray[NB_SQUARES + 1][5];
for (int i = 0; i < NB_SQUARES + 1; i++)
{
@@ -99,7 +99,7 @@ int main()
displayArray[i][j] = " ";
}
}
-
+
const int NB_NOTES = 5;
ChordNote song[NB_NOTES] = {note1, note2, note3, note4, note5};
@@ -110,8 +110,8 @@ int main()
cerr << "Impossible de se connecter au port "<< string(com.c_str()) <<". Fermeture du programme!" <<endl;
exit(1);
}
-
- // Structure de donnees JSON pour envoie et reception
+
+ // Structure de donnees JSON pour envoie et reception
json j_msg_send, j_msg_rcv;
auto startTime = chrono::steady_clock::now();
@@ -211,7 +211,7 @@ int main()
}
- //Gestion affichage
+ //Gestion affichage
if(diffSinceBeginning % FRAMERATE == 0)
{
//system("cls");
@@ -272,7 +272,7 @@ int main()
}
displayString += "|\n";
}
-
+
//Reordering
int reorderingIndex = NB_SQUARES;
@@ -333,7 +333,7 @@ int main()
// Read serialport until '\n' character (Blocking)
// Version fonctionnel dans VScode, mais non fonctionnel avec Visual Studio
- /*
+ /*
while(msg.back()!='\n'){
if(msg.size()>MSG_MAX_SIZE){
return false;
@@ -463,7 +463,7 @@ int main()
{
bool compDown = CompareIndividualButton(true, StrumDown);
bool compUp = CompareIndividualButton(true, StrumUp);
-
+
if (compDown || compUp)
{
correctlyPlayed = true;