diff --git a/org.fortiss.af3.platform.raspberry/trunk/lib/src/Gamepad.c b/org.fortiss.af3.platform.raspberry/trunk/lib/src/Gamepad.c index a97edf9ec87e6fb7adfe89d81a803f4c92a18773..37a005c715b310cbc96da9dc15d2013cb84ea627 100644 --- a/org.fortiss.af3.platform.raspberry/trunk/lib/src/Gamepad.c +++ b/org.fortiss.af3.platform.raspberry/trunk/lib/src/Gamepad.c @@ -115,19 +115,19 @@ GEN_TYPE_boolean gp_btnR2_read() { } GEN_TYPE_double gp_btnLX_read() { - return 0.0; + return ie.btns.js1_lr; } GEN_TYPE_double gp_btnLY_read() { - return 0.0; + return ie.btns.js1_ud; } GEN_TYPE_double gp_btnRX_read() { - return 0.0; + return ie.btns.js2_lr; } GEN_TYPE_double gp_btnRY_read() { - return 0.0; + return ie.btns.js1_ud; } // noval diff --git a/org.fortiss.af3.platform.raspberry/trunk/lib/src/PWM.c b/org.fortiss.af3.platform.raspberry/trunk/lib/src/PWM.c index ea6ace0ff0a9fbc4fa6c7d46561053c494ce57ee..f00bc0aaca2f7c6ba490aaa858fa63976d9ee4d4 100644 --- a/org.fortiss.af3.platform.raspberry/trunk/lib/src/PWM.c +++ b/org.fortiss.af3.platform.raspberry/trunk/lib/src/PWM.c @@ -50,7 +50,7 @@ GEN_TYPE_boolean pwm_initialized = false; GEN_TYPE_boolean pwm_terminated = false; void pwm_init(PWM_CHANNEL_T channel) { - // important, since all btns are accessing the same method + // important, since all pwms are accessing the same method if(!pwm_initialized) { pwm_channel_values = calloc(sizeof(GEN_TYPE_int), PWM_MAX_NO_CHANNELS); pwm_channel_enabled = calloc(sizeof(GEN_TYPE_boolean), PWM_MAX_NO_CHANNELS); diff --git a/org.fortiss.af3.platform.raspberry/trunk/lib/src/main.c b/org.fortiss.af3.platform.raspberry/trunk/lib/src/main.c index f927d2eb38a24b0fea953fd1edc41d1455e38aab..1f21b16ceafc5784d74030f0997c39f48f8a8119 100644 --- a/org.fortiss.af3.platform.raspberry/trunk/lib/src/main.c +++ b/org.fortiss.af3.platform.raspberry/trunk/lib/src/main.c @@ -11,6 +11,9 @@ #include "inc/PWM.h" int main(int argc, char* argv[]) { + // init the system + initialize_system(); + // start a gamepad thread pthread_t pt_gamepad; pthread_create(&pt_gamepad, NULL, gp_worker, NULL);