Example #1
0
void
RasterWeather::ScanAll(const GeoPoint &location)
{
  /* not holding the lock here, because this method is only called
     during startup, when the other threads aren't running yet */

  TCHAR fname[MAX_PATH];
  LocalPath(fname, _T("xcsoar-rasp.dat"));
  if (!File::Exists(fname))
    return;

  ProgressGlue::SetRange(MAX_WEATHER_TIMES);
  for (unsigned i = 0; i < MAX_WEATHER_TIMES; i++) {
    ProgressGlue::SetValue(i);
    weather_available[i] = ExistsItem(_T("wstar"), i) ||
      ExistsItem(_T("wstar_bsratio"), i);
  }
}
Example #2
0
bool
RasterWeatherStore::ScanMapItem(struct zzip_dir *dir, MapItem &item)
{
    bool found = false;
    for (unsigned i = 0; i < MAX_WEATHER_TIMES; i++)
        if (ExistsItem(dir, Path(item.name), i))
            found = item.times[i] = true;

    return found;
}