diff --git a/src/modules/navigationd/navigationd.py b/src/modules/navigationd/navigationd.py index 9356578..3de2280 100644 --- a/src/modules/navigationd/navigationd.py +++ b/src/modules/navigationd/navigationd.py @@ -49,7 +49,9 @@ def getMapImage(distance): # I'm not sure how to handle this short of saving it and then reading it. :( filepath = uuid+".png" - ox.plot_graph(G, show=True, node_size=0, edge_linewidth=2, bgcolor="#0B1629", edge_color="#5FE0E9", save=True, filepath=filepath) + fig, ax = ox.plot_graph(G, show=True, node_size=0, edge_linewidth=2, bgcolor="#0B1629", edge_color="#5FE0E9", save=True, filepath=filepath, close=True) + #fig.close() + except ox._errors.InsufficientResponseError: print("Insufficient response. Skipping.") diff --git a/src/templates/index.html b/src/templates/index.html index 38aa5ed..b95c420 100644 --- a/src/templates/index.html +++ b/src/templates/index.html @@ -20,7 +20,7 @@ margin-right: 1%; margin-left: 1%; height: 96%; - border: 1px solid #F00; /* TODO: Remove this later. */ + /*border: 1px solid #F00; TODO: Remove this later. */ } /* Below are all top elements - Vitals, Top Message, and Map */ @@ -63,7 +63,7 @@ flex-grow: 2; margin-left: 2px; margin-right: 2px; - border: 1px solid #F00; /* TODO: Remove this later */ + /*border: 1px solid #F00; TODO: Remove this later */ } #environmentTemperature { @@ -103,7 +103,7 @@ height: 0; padding-bottom: 100%; width: 100%; - border: 1px solid #F00; /* TODO: Remove later */ + /*border: 1px solid #F00; TODO: Remove later */ margin-left: 8px; flex-shrink: 0; } @@ -159,28 +159,28 @@ flex-grow: 2; display: flex; margin-top: 2px; - border: 1px solid #0FF; /* TODO: Remove this later */ + /*border: 1px solid #0FF; TODO: Remove this later */ } #commsPanel { width: 20%; /*flex-grow: 1;*/ margin-left: 2px; - border: 1px solid #F00; /* TODO: Remove this later */ + /*border: 1px solid #F00; TODO: Remove this later */ } #popupPanel { flex-grow: 2; margin-left: 2px; margin-right: 2px; - border: 1px soild #0F0; /* TODO: Remove this later */ + /*border: 1px soild #0F0; TODO: Remove this later */ } #infoPanel { width: 20%; /*flex-grow: 1;*/ margin-right: 2px; - border: 1px solid #00F; /* TODO: Remove this later */ + /*border: 1px solid #00F; TODO: Remove this later */ } @@ -188,7 +188,7 @@ flex-grow: 1; margin-top: 2px; margin-bottom: 2px; - border: 1px solid #0FF; /* TODO: Remove this later */ + /*border: 1px solid #0FF; TODO: Remove this later */ } </style> </head> @@ -202,7 +202,7 @@ <div id="bodyTemperature"></div> </div> <div id="topMessage"> - <p>Top message - Notifications, warnings, and malfunctions and such</p> + <!--<p>Top message - Notifications, warnings, and malfunctions and such</p>--> </div> <div id="map"> <div id="mapElements"> @@ -220,24 +220,24 @@ <div id="mapDot"></div> </div> <div id="mapTime"> - <p id="time">00:00:00</p> + <p id="time">00:00</p> </div> </div> </div> </div> <div id="centerElements"> <div id="commsPanel"> - <p>Comms</p> + <!--<p>Comms</p>--> </div> <div id="popupPanel"> - <p>Popup</p> + <!--<p>Popup</p>--> </div> <div id="infoPanel"> - <p>Info</p> + <!--<p>Info</p>--> </div> </div> <div id="bottomElements"> - <p>Test2</p> + <!--<p>Test2</p>--> </div> </div> <script src="https://cdnjs.cloudflare.com/ajax/libs/jquery/3.6.2/jquery.min.js" integrity="sha512-tWHlutFnuG0C6nQRlpvrEhE4QpkG1nn2MOUMWmUeRePl4e3Aki0VB6W1v3oLjFtd0hVOtRQ9PHpSfN6u6/QXkQ==" crossorigin="anonymous" referrerpolicy="no-referrer"></script> @@ -354,6 +354,14 @@ } } + function updateTime() { + var timeText = document.getElementById("time"); + var time = new Date(); + var newTime = time.getHours()+":"+time.getMinutes(); + + timeText.innerHTML = newTime; + } + function updateAll() { $.get(vitalsUrl, (data, status) => { if(status == "success") { @@ -389,6 +397,8 @@ //stopInterval(t) updateNavigationImage() + + updateTime() } var t=setInterval(updateAll, 1000) </script>