void update(Flywheel *flywheel) { float timeChange = timeUpdate(&flywheel->microTime); measureRpm(flywheel, timeChange); controllerUpdate(flywheel, timeChange); updateMotor(flywheel); // TODO: update smart motor group. }
void ShadowPID::controlspin() { while (private_nh_.ok()) { alterSetPoint(); controllerUpdate(set_point_); //setTarget(set_point); //publishSetPoint(); ros::spinOnce(); loop_rate.sleep(); } }
PackageModel::PackageModel( QObject* parent ) : QAbstractItemModel( parent ) , storage( 0 ) { networked = AbstractPackageController::factory( AbstractPackageController::network, this ); installed = AbstractPackageController::factory( AbstractPackageController::installed, this ); // can only have a max of 15 top level items rootItems << installed << networked; //this must stay in sync with installedIndex //and networkedIndex for ( int i = 0; i < rootItems.count(); i++ ) connect( rootItems[i], SIGNAL(updated()), this, SLOT(controllerUpdate()) ); connect( networked, SIGNAL(packageInstalled(InstallControl::PackageInfo)), installed, SLOT(addPackage(InstallControl::PackageInfo)) ); connect( networked, SIGNAL(rowsAboutToBeRemoved(QModelIndex,int,int)), this, SIGNAL(rowsAboutToBeRemoved(QModelIndex,int,int))); connect( networked, SIGNAL(rowsRemoved(QModelIndex,int,int)), this, SIGNAL(rowsRemoved(QModelIndex,int,int))); connect( networked, SIGNAL(packageInstalled(InstallControl::PackageInfo)), this, SLOT(packageInstalled(InstallControl::PackageInfo)) ); connect( networked, SIGNAL(serverStatus(QString)), this, SLOT(serverStatusUpdated(QString)) ); // can only have a max of 4 columns, if more are needed, change the // macros used for PackageModel::index(...) below // columnHeads << "Name" << "Size"; QStorageMetaInfo *s = QStorageMetaInfo::instance(); connect( s, SIGNAL(disksChanged()), this, SLOT(publishTargets()) ); connect( this, SIGNAL(targetsUpdated(QStringList)), installed, SLOT(reloadInstalledLocations(QStringList)) ); if ( !QDir( Qtopia::packagePath() ).exists() ) QDir::root().mkpath( Qtopia::packagePath() ); }