Skip to content
This repository was archived by the owner on Jun 2, 2025. It is now read-only.

Commit fa8600a

Browse files
committed
LOG
1 parent e36fb39 commit fa8600a

File tree

1 file changed

+5
-7
lines changed

1 file changed

+5
-7
lines changed

modules/recieve_statustext.py

Lines changed: 5 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -4,14 +4,13 @@
44
"""
55

66
import argparse
7-
from pathlib import Path
87

98

109
from pymavlink import mavutil
1110
from modules.common.modules.data_encoding import message_encoding_decoding
1211
from modules.common.modules.data_encoding import metadata_encoding_decoding
1312
from modules.common.modules.data_encoding import worker_enum
14-
import modules.common.modules.kml.kml_conversion
13+
import modules.common.modules.kml
1514

1615

1716
CONNECTION_ADDRESS = "tcp:localhost:14550"
@@ -32,9 +31,6 @@ def main(save_directory: str, document_name_prefix: str) -> int:
3231
Returns:
3332
int: 0 on success, -1 on error (connection failure, invalid data, or failure to save KML).
3433
"""
35-
save_directory = Path(args.save_directory)
36-
document_name_prefix = args.document_name_prefix
37-
3834
vehicle = mavutil.mavlink_connection(CONNECTION_ADDRESS, source_system=255, source_component=0)
3935
# Catch library and other unexpected errors
4036
# pylint: disable=broad-exception-caught
@@ -83,7 +79,7 @@ def main(save_directory: str, document_name_prefix: str) -> int:
8379
)
8480
positions.append(global_position)
8581
received_positions_count += 1
86-
success, kml_path = kml_conversion.positions_to_kml(
82+
success, kml_path = modules.common.modules.kml.kml_conversion.positions_to_kml(
8783
positions, document_name_prefix, save_directory
8884
)
8985
if not success:
@@ -95,6 +91,7 @@ def main(save_directory: str, document_name_prefix: str) -> int:
9591

9692
DEFAULT_SAVE_DIRECTORY = "logs"
9793
DEFAULT_DOCUMENT_NAME_PREFIX = "IR hotspot locations"
94+
9895
if __name__ == "__main__":
9996
parser = argparse.ArgumentParser(description="Collect drone GPS positions and save as KML.")
10097
parser.add_argument(
@@ -110,4 +107,5 @@ def main(save_directory: str, document_name_prefix: str) -> int:
110107
help="Prefix for the KML document name.",
111108
)
112109
args = parser.parse_args()
113-
main(save_directory, document_name_prefix)
110+
111+
main(args.save_directory, args.document_name_prefix)

0 commit comments

Comments
 (0)