-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathmain.py
More file actions
23 lines (22 loc) · 1018 Bytes
/
main.py
File metadata and controls
23 lines (22 loc) · 1018 Bytes
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
import service.db as db
if __name__ == '__main__':
while True:
txt = input('Enter or a or s or e: ')
if txt == '':
user = input('Enter the user who should receive the information: ')
task = db.read_data_for_new_task(user)
print(task)
if txt == 'a':
latitude = input('Enter the latitude coordinate: ')
longitude = input('Enter the longitude coordinate: ')
priority = input('Enter the priority: ')
db.add_task_to_db(latitude, longitude, priority)
if txt == 's':
drone_id = input('Enter the drone id: ')
battery = input('Enter the battery level: ')
d_latitude = input('Enter the departure latitude coordinate: ')
d_longitude = input('Enter the departure longitude coordinate: ')
db.add_dron_status(drone_id, battery, d_latitude, d_longitude)
db.update_task_info(d_latitude, d_longitude)
if txt == 'e':
break