bool SensorUpdater::sensorDownloadTo(REPOS &repo, const std::string path, const VersionList& requestedVersionList) {
  VersionList list;
  VersionList currentList;

  if(!getUpdateList(&list, requestedVersionList, repo)) {
    return false;
  }

  if(!downloadPackagesToPath(list, path)) {
    return false;
  }

  return true;
}
/* remove all old packages and install the newest/given version of all packages in the repo which are mandatory */
bool SensorUpdater::sensorUpdate(REPOS &repo, const VersionList& requestedVersionList) {
  VersionList list;
  VersionList currentList;
  std::string localPath = std::string("/tmp/");

  if(!getVersionInstalled(&currentList)) {
    std::cout << "No ViSensor packages were installed on the sensor. Please check your settings or flash your sensor manualy" << std::endl;
    return false;
  }

  if(!checkRepo(repo)) {
    return false;
  }

  if(!getUpdateList(&list, requestedVersionList, repo)) {
    return false;
  }

  if(!downloadPackagesToPath(list, localPath)) {
    return false;
  }

  if (!checkCalibrationConvertion(currentList, list)) {
    return false;
  }

  if(!sensorClean()) {
    return false;
  }

  // update to newest version
  if(!installPackagesFromPath(list, localPath)) {
    return false;
  }

  return true;
}
示例#3
0
文件: Mouth.cpp 项目: bog2k3/bugs
void Mouth::onAddedToParent() {
	assertDbg(getUpdateList() && "update list should be available to the body at this time");
	getUpdateList()->add(this);
}
示例#4
0
文件: Mouth.cpp 项目: bog2k3/bugs
void Mouth::die() {
	if (getUpdateList())
		getUpdateList()->remove(this);
	physBody_.onCollision.remove(onCollisionEventHandle);
	physBody_.collisionEventMask_ = 0;
}