void BaxterGripperController::update(const ros::Time& time, const ros::Duration& period) { // Debug info update_counter++; //TODO: Change to ROS Param (20 Hz) if (update_counter % 5 == 0) { updateCommands(); } // Apply joint commands for (size_t i = 0; i < n_joints; i++) { // Update the individual joint controllers gripper_controllers[i]->update(time, period); } }
void TEditor::setState( ushort aState, Boolean enable ) { TView::setState(aState, enable); switch( aState ) { case sfActive: if( hScrollBar != 0 ) hScrollBar->setState(sfVisible, enable); if( vScrollBar != 0 ) vScrollBar->setState(sfVisible, enable); if( indicator != 0 ) indicator->setState(sfVisible, enable); updateCommands(); break; case sfExposed: if( enable == True ) unlock(); } }
void TEditor::doUpdate() { if( updateFlags != 0 ) { setCursor(curPos.x - delta.x, curPos.y - delta.y); if( (updateFlags & ufView) != 0 ) drawView(); else if( (updateFlags & ufLine) != 0 ) drawLines( curPos.y-delta.y, 1, lineStart(curPtr) ); if( hScrollBar != 0 ) hScrollBar->setParams(delta.x, 0, limit.x - size.x, size.x / 2, 1); if( vScrollBar != 0 ) vScrollBar->setParams(delta.y, 0, limit.y - size.y, size.y - 1, 1); if( indicator != 0 ) indicator->setValue(curPos, modified); if( (state & sfActive) != 0 ) updateCommands(); updateFlags = 0; } }