Revision 7ed40bef src/server/eyelid_motion_generator.cpp

View differences:

src/server/eyelid_motion_generator.cpp
102 102
    handle_eyeblink_timeout();
103 103

  
104 104
    //eyeblinks override position target (if necessary)
105
    override_lids_for_eyeblink();    
105
    override_lids_for_eyeblink();
106 106
}
107 107

  
108 108
//! process any external blink requests
109 109
void EyelidMotionGenerator::start_external_eyeblinks(int duration_left, int duration_right){
110 110
    //manual eyeblinks will ALWAYs get executed as we use a negative block timeout (=timout has already passed)
111 111
    if ((duration_left != 0) || (duration_right != 0)){
112
	eyeblink_blocked_timeout = get_system_time() - posix_time::seconds(100);
112
        eyeblink_blocked_timeout = get_system_time() - posix_time::seconds(100);
113 113
    }
114 114

  
115 115

  
......
212 212
    //set upper to minimal allowed value (=as closed as possible) + a small offset
213 213
    //set lower to the same value (instead of max) in order to avoid collisions
214 214
    switch(joint_id){
215
        default:
216
            //no eyelid -> return
217
            return;
218

  
219
        case(JointInterface::ID_EYES_LEFT_LID_UPPER):
220
        case(JointInterface::ID_EYES_LEFT_LID_LOWER):
221
            //use the upper value + 10 deg as close state:
222
            value = joint_interface->get_joint_min(JointInterface::ID_EYES_LEFT_LID_UPPER) + 10.0;
223
            //overwrite last target_
224
            joint_interface->set_target_position(joint_id, value);
225
            break;
226

  
227
        case(JointInterface::ID_EYES_RIGHT_LID_UPPER):
228
        case(JointInterface::ID_EYES_RIGHT_LID_LOWER):
229
            //use the upper value + 10 deg as close state:
230
            value = joint_interface->get_joint_min(JointInterface::ID_EYES_RIGHT_LID_UPPER) + 10.0;
231
            //overwrite last target_
232
            joint_interface->set_target_position(joint_id, value);
233
            break;
215
    default:
216
        //no eyelid -> return
217
        return;
218

  
219
    case(JointInterface::ID_EYES_LEFT_LID_UPPER):
220
    case(JointInterface::ID_EYES_LEFT_LID_LOWER):
221
        //use the upper value + 10 deg as close state:
222
        value = joint_interface->get_joint_min(JointInterface::ID_EYES_LEFT_LID_UPPER) + 10.0;
223
        //overwrite last target_
224
        joint_interface->set_target_position(joint_id, value);
225
        break;
226

  
227
    case(JointInterface::ID_EYES_RIGHT_LID_UPPER):
228
    case(JointInterface::ID_EYES_RIGHT_LID_LOWER):
229
        //use the upper value + 10 deg as close state:
230
        value = joint_interface->get_joint_min(JointInterface::ID_EYES_RIGHT_LID_UPPER) + 10.0;
231
        //overwrite last target_
232
        joint_interface->set_target_position(joint_id, value);
233
        break;
234 234
    }
235 235
}
236 236

  

Also available in: Unified diff