Correction warning Intellisense + appel fonction reset pour les leds dans le main()

This commit is contained in:
Samuel 2023-04-16 19:39:27 +02:00
parent e40f285438
commit 41507f1227
2 changed files with 12 additions and 7 deletions

View File

@ -2,6 +2,7 @@
"env": {
"myDefaultIncludePath": [
"${workspaceFolder}",
"${workspaceFolder}/build",
"${env:PICO_SDK_PATH}/src/./common/pico_binary_info/include",
"${env:PICO_SDK_PATH}/src/./common/pico_base/include",
"${env:PICO_SDK_PATH}/src/./common/pico_time/include",
@ -73,7 +74,8 @@
"name": "Linux",
"intelliSenseMode": "linux-gcc-arm",
"includePath": [
"${myDefaultIncludePath}"
"${myDefaultIncludePath}",
"${workspaceFolder}/build/"
],
"compilerPath": "/usr/bin/arm-none-eabi-gcc",
"cStandard": "c11",

15
main.c
View File

@ -148,13 +148,16 @@ void main(void)
uint8_t couleur = tampon_commande_led[0];
uint16_t masque_led = (tampon_commande_led[1] << 8) | tampon_commande_led[2];
for(uint8_t led=0; led < 12; led++){
if((masque_led >> led) & 0x01){
ws2812_set_buffer_8bits(couleur, led);
}
if (masque_led == 0){
// Commande pour repasser les led en mode distance
reset_affichage_led();
}else{
for(uint8_t led=0; led < 12; led++){
if((masque_led >> led) & 0x01){
affiche_couleur_sur_led(couleur, led);
}
}
}
}
}