Ver Fonte

Change IP

Emil há 2 anos atrás
pai
commit
36f15cbc81
2 ficheiros alterados com 12 adições e 12 exclusões
  1. 11 11
      js/spotlight.js
  2. 1 1
      res/settings.json

+ 11 - 11
js/spotlight.js

@@ -56,7 +56,7 @@ function createCluster() {
         ["lights"]: shelves
     }
     console.log(JSON.stringify(sendDict))
-    sendWebRequest("http://192.168.1.170/api/create_cluster", JSON.stringify(sendDict), "POST")
+    sendWebRequest("http://192.168.1.17/api/create_cluster", JSON.stringify(sendDict), "POST")
 }
 
 
@@ -72,7 +72,7 @@ function deleteCluster() {
             ["cluster"]: chosenCluster,
         }
         chosenCluster = -1
-        sendWebRequest("http://192.168.1.170/api/delete_cluster", JSON.stringify(sendDict), "POST")
+        sendWebRequest("http://192.168.1.17/api/delete_cluster", JSON.stringify(sendDict), "POST")
     }
 }
 
@@ -82,7 +82,7 @@ function changeAnimation(animId) {
         ["animation"]: animId
     }
     console.log(JSON.stringify(sendDict))
-    sendWebRequest("http://192.168.1.170/api/change_animation", JSON.stringify(sendDict), "POST")
+    sendWebRequest("http://192.168.1.17/api/change_animation", JSON.stringify(sendDict), "POST")
 }
 
 function changeVar(value, setting) {
@@ -116,7 +116,7 @@ function changeVar(value, setting) {
             ["setting"]: setting
         }
         console.log(JSON.stringify(sendDict))
-        sendWebRequest("http://192.168.1.170/api/change_setting", JSON.stringify(sendDict), "POST")
+        sendWebRequest("http://192.168.1.17/api/change_setting", JSON.stringify(sendDict), "POST")
     }
 }
 
@@ -182,7 +182,7 @@ function unselectAll() {
 function updateConfig() {
     const preSelectCluster = chosenCluster
     unselectAll()
-    fetch("http://192.168.1.170/api/get_config")
+    fetch("http://192.168.1.17/api/get_config")
         .then(response => response.json())
         .then(data => {
             console.log(data)
@@ -226,7 +226,7 @@ function topBarClick(id) {
 
 
 function resetESP() {
-    sendWebRequest("http://192.168.1.170/admin/reset", "", "POST")
+    sendWebRequest("http://192.168.1.17/admin/reset", "", "POST")
 }
 
 
@@ -235,7 +235,7 @@ function updateFirmware() {
         const file = getEByID("updateFirmwareInput").files[0]
         let formData = new FormData();
         formData.set('update', file);
-        fetch("http://192.168.1.170/admin/doUpdate", {
+        fetch("http://192.168.1.17/admin/doUpdate", {
             method: "POST",
             body: formData
         })
@@ -248,7 +248,7 @@ function uploadFile() {
         const file = getEByID("fileUpload").files[0]
         let formData = new FormData();
         formData.set('data', file);
-        fetch("http://192.168.1.170/admin/upload_file", {
+        fetch("http://192.168.1.17/admin/upload_file", {
             method: "POST",
             body: formData
         }).then(_ => {
@@ -271,7 +271,7 @@ async function reloadFiles1Sec() {
 }
 
 function deleteFile(file) {
-    fetch("http://192.168.1.170/admin/del_file", {
+    fetch("http://192.168.1.17/admin/del_file", {
         method: 'POST',
         headers: new Headers({'name': file}),
     }).then(_ => {
@@ -283,7 +283,7 @@ async function setSDCursor() {
     let location = getEByID("cursorSet").value
     console.log(location)
     if (location === "/js" || location === "/css" || location === "/" || true) {
-        fetch("http://192.168.1.170/admin/set_sd_cursor", {
+        fetch("http://192.168.1.17/admin/set_sd_cursor", {
             method: 'POST',
             headers: new Headers({'value': location}),
         })
@@ -297,7 +297,7 @@ function openDirectory(path) {
 }
 
 function getCursorValue() {
-    fetch("http://192.168.1.170/admin/get_sd_cursor", {
+    fetch("http://192.168.1.17/admin/get_sd_cursor", {
         method: 'GET',
     }).then(res => res.text().then(t => {
         console.log(t)

+ 1 - 1
res/settings.json

@@ -30,7 +30,7 @@
     }
   },
   "settings": {
-    "ip": "http://192.168.1.160",
+    "ip": "http://192.168.1.16",
     "num_lights": "50"
   }
 }