瀏覽代碼

removed GIT_BASE_BRANCH and instead use the autogenerated values in info.html

CaCO3 3 年之前
父節點
當前提交
39ec90895e
共有 3 個文件被更改,包括 10 次插入16 次删除
  1. 6 3
      code/main/server_main.cpp
  2. 0 9
      code/main/version.h
  3. 4 4
      sd-card/html/info.html

+ 6 - 3
code/main/server_main.cpp

@@ -80,9 +80,10 @@ esp_err_t info_get_handler(httpd_req_t *req)
         return ESP_OK;        
     }
 
+    // No longer used
     if (_task.compare("GitBaseBranch") == 0)
     {
-        httpd_resp_sendstr_chunk(req, git_base_branch());
+        httpd_resp_sendstr_chunk(req, "");
         httpd_resp_sendstr_chunk(req, NULL);  
         return ESP_OK;        
     }
@@ -285,7 +286,8 @@ esp_err_t sysinfo_handler(httpd_req_t *req)
     std::string gitversion = libfive_git_version();
     std::string buildtime = build_time();
     std::string gitbranch = libfive_git_branch();
-    std::string gitbasebranch = git_base_branch();
+    std::string gittag = libfive_git_version();
+    std::string gitrevision = libfive_git_revision();
     std::string htmlversion = getHTMLversion();
     char freeheapmem[11];
     sprintf(freeheapmem, "%zu", esp_get_free_heap_size());
@@ -300,7 +302,8 @@ esp_err_t sysinfo_handler(httpd_req_t *req)
                 \"firmware\" : \"" + gitversion + "\",\
                 \"buildtime\" : \"" + buildtime + "\",\
                 \"gitbranch\" : \"" + gitbranch + "\",\
-                \"gitbasebranch\" : \"" + gitbasebranch + "\",\
+                \"gittag\" : \"" + gittag + "\",\
+                \"gitrevision\" : \"" + gitrevision + "\",\
                 \"html\" : \"" + htmlversion + "\",\
                 \"cputemp\" : \"" + cputemp + "\",\
                 \"hostname\" : \"" + hostname + "\",\

+ 0 - 9
code/main/version.h

@@ -16,15 +16,6 @@ extern "C"
 #include "Helper.h"
 #include <fstream>
 
-// todo remove
-const char* GIT_BASE_BRANCH = "master - v11.3.0 - 2022-09-16";
-
-
-const char* git_base_branch(void)
-{
-    return GIT_BASE_BRANCH;
-}
-
 
 const char* build_time(void)
 {

+ 4 - 4
sd-card/html/info.html

@@ -93,22 +93,22 @@ div {
 
   <tr>
 	<td>
-		Git-Base-Branch:
+		Git-Tag:
 	</td>
 	<td>
 		<div>
-			<object data="/version?type=GitBaseBranch"></object>
+			<object data="/version?type=GitTag"></object>
 		</div>
 	</td>
   </tr>
 
   <tr>
 	<td>
-		Git-Version:
+		Git-Revision:
 	</td>
 	<td>
 		<div>
-			<object data="/version?type=GitVersion"></object>
+			<object data="/version?type=GitRevision"></object>
 		</div>
 	</td>
   </tr>