Commit edfe0f22 authored by Ernest's avatar Ernest
Browse files

Update interface

parent 4ab91d16
......@@ -14,6 +14,9 @@
#You should have received a copy of the GNU General Public License
#along with this program. If not, see <http://www.gnu.org/licenses/>.
# 0.1 intial release
# 0.2 update UI
import time
import subprocess
import re
......@@ -25,6 +28,8 @@ import requests
import os
import multiprocessing
release = "0.2"
i = 0
def read_gps():
......@@ -127,31 +132,31 @@ def read_wifi(lat, lon, acc):
json.dump(data, outfile)
try:
os.system('clear')
print("\n***************************")
print("** UTouch-MLS tool **")
print("** UTouch-MLS tool " + str(release)+" **")
print("***************************")
print("\nWelcome to the UTouch-MLS tool to enhance the Mozilla Location Service database for your own convience.")
print("The scan will start automatically, scan result will be recorder in the data.txt file next to this file.")
print("The scan will start automatically, scan result will be recorded in the data.txt file next to this tool.")
print("To close the application simply select Ctrl+c virtual key, the data will be automatically uploaded to https://location.services.mozilla.com")
print("Be sure your phone is connected to internet for the upload.")
print("Enjoy !")
print("\n")
while True:
# p = multiprocessing.Process(target=read_gps)
# p.start()
# Wait for 10 seconds or until process finishes
# p.join(40)
# If thread is still active
# if p.is_alive():
# print("Process is hanging, let's restart it...")
# Terminate
# p.terminate()
# p.join()
read_gps()
print("Scan No : " + str(i))
print("lat : " + latitude + " lon : " + longitude)
os.system('clear')
print("\n***************************")
print("** UTouch-MLS tool " + str(release)+" **")
print("***************************")
#print("\nWelcome to the UTouch-MLS tool to enhance the Mozilla Location Service database for your own convience.")
#print("The scan will start automatically, scan result will be recorder in the data.txt file next to this file.")
print("To close the application simply select Ctrl+c virtual key, the data will be automatically uploaded to https://location.services.mozilla.com")
print("Be sure your phone is connected to internet for the upload.")
#print("Enjoy !")
print("\n")
# read_gps()
print("Scan Number : " + str(i))
print("latitude : " + latitude + " longitude : " + longitude)
read_wifi(latitude,longitude,accuracy)
time.sleep(3)
i = i + 1
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment