]> git.droids-corp.org - aversive.git/commitdiff
pwm interact
authorzer0 <zer0@carbon.local>
Wed, 5 May 2010 18:43:52 +0000 (20:43 +0200)
committerzer0 <zer0@carbon.local>
Wed, 5 May 2010 18:43:52 +0000 (20:43 +0200)
projects/microb2010/mainboard/commands_mainboard.c

index 06803c9f7e51a69369cdac8283edbd7d8c8c6c72..84ab748df4bb267439ae91aee806fc832bcc4ea1 100644 (file)
@@ -511,22 +511,27 @@ static void cmd_interact_parsed(void * parsed_result, void * data)
                        }
                }
                else {
+#ifdef HOST_VERSION
+#define PWM_INTERACT 300
+#else
+#define PWM_INTERACT 1200
+#endif
                        switch(cmd) {
                        case KEY_UP_ARR:
-                               pwm_set_and_save(LEFT_PWM, 1200);
-                               pwm_set_and_save(RIGHT_PWM, 1200);
+                               pwm_set_and_save(LEFT_PWM, PWM_INTERACT);
+                               pwm_set_and_save(RIGHT_PWM, PWM_INTERACT);
                                break;
                        case KEY_LEFT_ARR:
-                               pwm_set_and_save(LEFT_PWM, -1200);
-                               pwm_set_and_save(RIGHT_PWM, 1200);
+                               pwm_set_and_save(LEFT_PWM, -PWM_INTERACT);
+                               pwm_set_and_save(RIGHT_PWM, PWM_INTERACT);
                                break;
                        case KEY_DOWN_ARR:
-                               pwm_set_and_save(LEFT_PWM, -1200);
-                               pwm_set_and_save(RIGHT_PWM, -1200);
+                               pwm_set_and_save(LEFT_PWM, -PWM_INTERACT);
+                               pwm_set_and_save(RIGHT_PWM, -PWM_INTERACT);
                                break;
                        case KEY_RIGHT_ARR:
-                               pwm_set_and_save(LEFT_PWM, 1200);
-                               pwm_set_and_save(RIGHT_PWM, -1200);
+                               pwm_set_and_save(LEFT_PWM, PWM_INTERACT);
+                               pwm_set_and_save(RIGHT_PWM, -PWM_INTERACT);
                                break;
                        }
                }