First commit
This commit is contained in:
12
IUT/Saé/robot arduino/main.h
Normal file
12
IUT/Saé/robot arduino/main.h
Normal file
@@ -0,0 +1,12 @@
|
||||
#define SIZE 30
|
||||
|
||||
void push(int value, unsigned int *queue) {
|
||||
|
||||
// décaler les valeurs vers la droite
|
||||
for(int i = SIZE - 1; i > 0; i--) {
|
||||
queue[i] = queue[i - 1];
|
||||
}
|
||||
|
||||
// mettre la nouvelle valeur au début
|
||||
queue[0] = value;
|
||||
}
|
||||
Reference in New Issue
Block a user