Compare commits

...

2 Commits

Author SHA1 Message Date
SG cd345b8134 Attempts to fix build: 1 2023-09-22 15:33:49 +03:00
SG f7bf9072ca Web interface: firmware version 2023-09-22 15:12:39 +03:00
7 changed files with 28 additions and 7 deletions

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

View File

@ -39,8 +39,9 @@ export default {
},
plugins: [
replace({
development_mode: !production,
}),
development_mode: !production,
preventAssignment: true,
}),
svelte({
compilerOptions: {
// enable run-time checks when not in production
@ -58,7 +59,7 @@ export default {
// https://github.com/rollup/plugins/tree/master/packages/commonjs
resolve({
browser: true,
dedupe: ['svelte']
dedupe: ['svelte', 'stringview']
}),
commonjs(),

View File

@ -28,6 +28,13 @@
}
</script>
<!--
"firmware_commit": "03b806d",
"firmware_branch": "zlo/2630-logs-over-wifi",
"firmware_branch_num": "157",
"firmware_version": "0.1.1",
"firmware_build_date": "22-09-2023",
-->
<Grid>
{#await api.get("/api/v1/system/info")}
<Value name="IP"><Spinner /></Value>
@ -50,6 +57,12 @@
<Value name="IP" selectable="true">{print_ip(json.ip)}</Value>
<Value name="Mac">{print_mac(json.mac)}</Value>
<Value name="IDF ver">{json.idf_version}</Value>
<Value name="FW commit">
{json.firmware_branch}#{json.firmware_commit}
</Value>
<Value name="FW ver">
{json.firmware_version}/{json.firmware_branch_num}/{json.firmware_build_date}
</Value>
<Value name="Model">
{json.model}.{json.revision}
{json.cores}-core

View File

@ -77,4 +77,5 @@ message(STATUS "FW branch: ${FW_GIT_BRANCH}")
message(STATUS "FW branch num: ${FW_GIT_BRANCH_NUM}")
message(STATUS "FW version: ${FW_GIT_VERSION}")
set_property(SOURCE "cli/cli-commands-device-info.c" APPEND PROPERTY COMPILE_OPTIONS ${INFO_FLAGS})
set_property(SOURCE "cli/cli-commands-device-info.c" APPEND PROPERTY COMPILE_OPTIONS ${INFO_FLAGS})
set_property(SOURCE "network-http.c" APPEND PROPERTY COMPILE_OPTIONS ${INFO_FLAGS})

View File

@ -253,6 +253,12 @@ static esp_err_t system_info_get_handler(httpd_req_t* req) {
esp_chip_info(&chip_info);
cJSON_AddStringToObject(root, "idf_version", IDF_VER);
cJSON_AddStringToObject(root, "firmware_commit", FW_GIT_COMMIT);
cJSON_AddStringToObject(root, "firmware_branch", FW_GIT_BRANCH);
cJSON_AddStringToObject(root, "firmware_branch_num", FW_GIT_BRANCH_NUM);
cJSON_AddStringToObject(root, "firmware_version", FW_GIT_VERSION);
cJSON_AddStringToObject(root, "firmware_build_date", FW_BUILD_DATE);
switch(chip_info.model) {
case CHIP_ESP32:
cJSON_AddStringToObject(root, "model", "ESP32");