Publish VCC Plus OSS source distribution for 3.6.2 build 60
This commit is contained in:
commit
c652a5276d
1192 files changed
+272368
No files matched your search
@@ -0,0 +1,23 @@
|
||||
/* SPDX-License-Identifier: GPL-3.0-or-later */
|
||||
/* Fly the right stick to a position and press its first button. Link bcontrol. */
|
||||
#include <Joystick.h>
|
||||
|
||||
int main(void)
|
||||
{
|
||||
byte axes[4] = { 0, 0, 0, 0 };
|
||||
byte buttons;
|
||||
word start;
|
||||
printf("MOVE THE RIGHT STICK AND FIRE\n");
|
||||
Joystick_disableSound();
|
||||
start = getTimer();
|
||||
do
|
||||
{
|
||||
buttons = Joystick_getButtonStates();
|
||||
} while ((buttons & 1) && (word) (getTimer() - start) < 600);
|
||||
Joystick_getAxisValues(axes, 0x03);
|
||||
Joystick_selectAnalogMuxInputs(0);
|
||||
Joystick_enableSound();
|
||||
printf("RIGHT X=%u Y=%u\n", (unsigned) axes[0], (unsigned) axes[1]);
|
||||
printf("BUTTON %s\n", (buttons & 1) ? "UP" : "DOWN");
|
||||
return 0;
|
||||
}
|
||||
Reference in new issue
Block a user