Bonjour,
Est il possible d inverser les boutons du nunchuck ?
Bouton du bas pour les axes X/Y et bouton du haut pour l axe Z.
Boutons nunchuck
Re: Boutons nunchuck
Dans le fichier nunchuk.cpp, il y a actuellement
uint8_t nunchuk_buttonZ() { // Checks the current state of button Z
return (~nunchuk_data[5] >> 0) & 1;
}
uint8_t nunchuk_buttonC() { // Checks the current state of button C
return (~nunchuk_data[5] >> 1) & 1;
}
Tu peux essayer d'inverser les 2 tests comme suit:
uint8_t nunchuk_buttonZ() { // Checks the current state of button Z
return (~nunchuk_data[5] >> 1) & 1;
}
uint8_t nunchuk_buttonC() { // Checks the current state of button C
return (~nunchuk_data[5] >> 0) & 1;
}
Je n'ai pas testé mais je pense que cela devrait marcher
uint8_t nunchuk_buttonZ() { // Checks the current state of button Z
return (~nunchuk_data[5] >> 0) & 1;
}
uint8_t nunchuk_buttonC() { // Checks the current state of button C
return (~nunchuk_data[5] >> 1) & 1;
}
Tu peux essayer d'inverser les 2 tests comme suit:
uint8_t nunchuk_buttonZ() { // Checks the current state of button Z
return (~nunchuk_data[5] >> 1) & 1;
}
uint8_t nunchuk_buttonC() { // Checks the current state of button C
return (~nunchuk_data[5] >> 0) & 1;
}
Je n'ai pas testé mais je pense que cela devrait marcher
Re: Boutons nunchuck
Et si l'on veux faire tourner l'axe "A", y'a t'il une commande déjà configurée?
Mes imprimantes 3D:
Ender 3 Pro
Voron 2.4 (350X350mm)
...I3RS32 en cours...
RS-CNC 32 finie! (1mX1m)
Ender 3 Pro
Voron 2.4 (350X350mm)
...I3RS32 en cours...
RS-CNC 32 finie! (1mX1m)
Re: Boutons nunchuck
Pour l'axe A, il faut presser le bouton prévu pour Z et bouger le joystick a gauche ou à droite
Re: Boutons nunchuck
Bonjour,
merci pour ta réponse mstrens cela fonctionne parfaitement.
Bonne journée, bon weekend
merci pour ta réponse mstrens cela fonctionne parfaitement.
Bonne journée, bon weekend
Re: Boutons nunchuck
Super merci
Mes imprimantes 3D:
Ender 3 Pro
Voron 2.4 (350X350mm)
...I3RS32 en cours...
RS-CNC 32 finie! (1mX1m)
Ender 3 Pro
Voron 2.4 (350X350mm)
...I3RS32 en cours...
RS-CNC 32 finie! (1mX1m)