#!/usr/bin/python3 # For Multithread from threading import Thread # For HTTP server from http.server import BaseHTTPRequestHandler, HTTPServer import os from urllib.parse import urlparse import socket import requests import configuration # For MQTT and plot part import time import csv2geojs import paho.mqtt.client as mqtt # Common import re import json from userio import * MAXLRR=4 server = None broker = None latestHtml = "" previousLastFcnt = 0 def htmlLatest(deveui,subID,FCnt,timeLatest,lat,lon,err,rssi,comment=None,solver=0): global latestHtml global previousLastFcnt htmlOutput="\n" htmlOutput+=csv2geojs.networkSurveyAddLeaflet() htmlOutput+="\n" htmlOutput+="
\n" htmlOutput+="\n
\n" htmlOutput+="\n" #htmlOutput+=" \n" htmlOutput+=" \n" if 0 != lat and 0 != lon: xmin=0.999999*lon xmax=1.000001*lon ymin=0.999999*lat ymax=1.000001*lat htmlOutput+="\n" htmlOutput+="\n" htmlOutput+="
\n
\n\n" htmlOutput+="\n" htmlOutput+="