Configurable wait period added

This commit is contained in:
Pax1601 2024-04-06 15:47:27 +02:00
parent 61dc9c8b31
commit 19c1ae82a2
2 changed files with 3 additions and 3 deletions

View File

@ -26,8 +26,8 @@ parser.add_argument('-e', '--extraction_only', action='store_true', help='if pro
parser.add_argument('-m', '--merging_only', action='store_true', help='if provided, the script will only run the tiles merging algorithm.')
parser.add_argument('-c', '--compression_only', action='store_true', help='if provided, the script will only run the compression algorithm.')
parser.add_argument('-n', '--colors_number', type=int, default=256, help='number of colors used by the png quantization algorithm. By default, 256. Must be less than 256.')
parser.add_argument('-w', '--wait_period', type=float, default=5.0, help='sleep time, in seconds, the algorithm will wait when a large jump is done in the map. To allow texture loading.')
args = parser.parse_args()
# Port on which the camera control module is listening

View File

@ -232,7 +232,7 @@ def take_screenshot(XY, n_width, n_height, map_config, zoom, screenshots_folder,
geo_data = json.loads(r.text)
if last_screenshot_position is None or distance.geodesic(last_screenshot_position, (lat, lng)).km > SLEEP_DISTANCE:
time.sleep(5.0)
time.sleep(map_config['wait_period'])
else:
time.sleep(0.2)