Motey Coppelion
Ramuh [Meteor]
You must be logged in to post comments.
Log In
Filter which items are to be displayed below.
* Notifications for standings updates are shared across all Worlds.
* Notifications for PvP team formations are shared for all languages.
* Notifications for free company formations are shared for all languages.
--------------
JOYSTICK_ENABLE = yes
JOYSTICK_DRIVER = analog
SRC += analog.c
--------------
config.h
--------------
#ifdef JOYSTICK_ENABLE
#define JOYSTICK_BUTTON_COUNT 0
#define JOYSTICK_AXES_COUNT 2
#define JOYSTICK_AXES_RESOLUTION 8
#endif
--------------
keymap.c
--------------
#ifdef JOYSTICK_ENABLE
#include "joystick.h"
#include "analog.h"
void send_joystick_packet(joystick_t *joystick);
void joystick_task(){
joystick_status.axes[0] = analogReadPin(B4)/4 - 128;
joystick_status.axes[1] = analogReadPin(B5)/4 - 128;
joystick_status.status |= JS_UPDATED;
send_joystick_packet(&joystick_status);
}
#endif
--------------