]> rtime.felk.cvut.cz Git - eurobot/public.git/commitdiff
joyd: Remove hokuyo pitch support
authorMichal Sojka <sojkam1@fel.cvut.cz>
Thu, 29 Apr 2010 04:10:31 +0000 (06:10 +0200)
committerMichal Sojka <sojkam1@fel.cvut.cz>
Thu, 29 Apr 2010 04:10:31 +0000 (06:10 +0200)
src/joyd/joyd.cc

index 7aa6842f5ad97ff7e85e6cf0fa5b92596968e632..bb7f9ab9a88d6f2419f650e2ecd20a2b60943a2d 100644 (file)
@@ -55,29 +55,6 @@ static void set_robot_speed(void)
        printf("Publishing commands: right %d left %d\n", orte.motion_speed.right, orte.motion_speed.left);
 }
 
-/* Hokuyo handling ********************************** */
-
-static int hokuyo_pitch_angle = HOKUYO_PITCH_HORIZONTAL;
-#define HOKUYO_STEP 8
-
-static void change_hokuyo_pitch_angle_by(signed char delta)
-{
-       hokuyo_pitch_angle += delta;
-       if (hokuyo_pitch_angle > HOKUYO_PITCH_MAX)
-               hokuyo_pitch_angle = HOKUYO_PITCH_MAX;
-       else if (hokuyo_pitch_angle < HOKUYO_PITCH_MIN)
-               hokuyo_pitch_angle = HOKUYO_PITCH_MIN;
-       act_hokuyo(hokuyo_pitch_angle);
-       printf("hokuyo pitch angle set to %d\n", hokuyo_pitch_angle);
-}
-
-static void set_hokuyo_pitch_horizontal()
-{
-       hokuyo_pitch_angle = HOKUYO_PITCH_HORIZONTAL;
-       act_hokuyo(hokuyo_pitch_angle);
-       printf("hokuyo pitch angle set to %d\n", hokuyo_pitch_angle);
-}
-
 /* ************************************************** */
 
 static void button_act(char state, int id)
@@ -278,7 +255,6 @@ int main(int argc, char *argv[])
 
        /* creating publishers */
        robottype_publisher_motion_speed_create(&orte, send_dummy_cb, &orte);
-       robottype_publisher_hokuyo_pitch_create(&orte, send_dummy_cb, &orte);
        
        if(open_joystick(joy_name, &num_of_axis, &num_of_buttons) == -1) {
                printf("Joystick not found, exiting...\n");
@@ -293,9 +269,6 @@ int main(int argc, char *argv[])
        axis_prev = (int *) calloc( num_of_axis, sizeof( int ) );
        buttons_prev = (char *) calloc( num_of_buttons, sizeof( char ) );
        
-       /* hokuyo pitch angle initialization */
-       set_hokuyo_pitch_horizontal();
-
        while(1) {
                timer.tv_sec = 0;
                timer.tv_nsec = 100000000;