From 61ebe3e989a4c1152c804b881924adbdc38fe157 Mon Sep 17 00:00:00 2001 From: lumapu Date: Thu, 28 Dec 2023 21:36:35 +0100 Subject: [PATCH] 0.8.30 * added info if grid profile was not found --- src/CHANGES.md | 3 +++ src/defines.h | 2 +- src/web/html/grid_info.json | 1 + src/web/html/visualization.html | 19 +++++++++++++------ 4 files changed, 18 insertions(+), 7 deletions(-) diff --git a/src/CHANGES.md b/src/CHANGES.md index fc8566cc..17d0528c 100644 --- a/src/CHANGES.md +++ b/src/CHANGES.md @@ -1,5 +1,8 @@ # Development Changes +## 0.8.30 - 2023-12-28 +* added info if grid profile was not found + ## 0.8.29 - 2023-12-27 * fix MqTT generic topic `comm_disabled` #1265 #1286 * potential fix of #1285 (reset yield day) diff --git a/src/defines.h b/src/defines.h index 2b304f9f..d3936d62 100644 --- a/src/defines.h +++ b/src/defines.h @@ -13,7 +13,7 @@ //------------------------------------- #define VERSION_MAJOR 0 #define VERSION_MINOR 8 -#define VERSION_PATCH 29 +#define VERSION_PATCH 30 //------------------------------------- typedef struct { diff --git a/src/web/html/grid_info.json b/src/web/html/grid_info.json index adb68393..5dcdda65 100644 --- a/src/web/html/grid_info.json +++ b/src/web/html/grid_info.json @@ -159,6 +159,7 @@ { "name": "Nominal Voltage", "div": 10, + "def": 230, "unit": "V" }, { diff --git a/src/web/html/visualization.html b/src/web/html/visualization.html index b561d5cc..2c771f5a 100644 --- a/src/web/html/visualization.html +++ b/src/web/html/visualization.html @@ -355,12 +355,19 @@ getJSON("/grid_info.json").then(data => { var glob = {offs:0, grid:obj.grid, info: data} var content = []; - content.push(ml("div", {class: "row"}, - ml("div", {class: "col my-3"}, ml("h5", {}, getGridType(glob.info.type, getGridIdentifier(glob)) + " (Version " + getGridValue(glob).toString(16) + ")")) - )) - - while((glob.offs*3) < glob.grid.length) { - content.push(parseGridGroup(glob)) + var g = getGridType(glob.info.type, getGridIdentifier(glob)) + if(null === g) { + content.push(ml("div", {class: "row"}, ml("div", {class: "col"}, ml("h5", {}, "Unknown Profile")))) + content.push(ml("div", {class: "row"}, ml("div", {class: "col"}, ml("p", {}, "Please open a new issue at https://github.com/lumapu/ahoy and copy the raw data into it.")))) + content.push(ml("div", {class: "row"}, ml("div", {class: "col my-2"}, ml("pre", {}, obj.grid)))) + } else { + content.push(ml("div", {class: "row"}, + ml("div", {class: "col my-3"}, ml("h5", {}, g + " (Version " + getGridValue(glob).toString(16) + ")")) + )) + + while((glob.offs*3) < glob.grid.length) { + content.push(parseGridGroup(glob)) + } } modal("Grid Profile for inverter " + obj.name, ml("div", {}, ml("div", {class: "col mb-2"}, [...content])))