* Fix issue #1376

Fix issue #1376 .....wrong time in charts when using NTP with an offset

* Update drv_charts.c  Issue #1375

For issue #1375: add a default color to improve readability (applies to: dataset names, axis ticks, color for axes title, (use color: '#099')

* Update drv_charts.c

Add a chart title

* Update obk_config.h

Set ENABLE_DRIVER_CHARTS = 1 also for Beken Devices

* Update http_fns.c

Add charts to About page

* Update obk_config.h

File just cloned from openshwprojects/OpenBK7231T_App

* Revert "Update obk_config.h"

This reverts commit b83c7db2ea.

* Revert "Update obk_config.h"

This reverts commit 7b7d979667.

* Revert "Update http_fns.c"

This reverts commit d81e4b3db8.

* Revert "Update drv_charts.c"

This reverts commit c5d122994a.
This commit is contained in:
ehorvat1
2024-10-03 22:07:46 +02:00
committed by GitHub
parent 07839162e0
commit 52efa43e4b

View File

@@ -507,6 +507,7 @@ void Chart_Display(http_request_t *request, chart_t *s) {
poststr(request, " }");
poststr(request, " }");
poststr(request, "});");
poststr(request, "Chart.defaults.color = '#099'; "); // Issue #1375, add a default color to improve readability (applies to: dataset names, axis ticks, color for axes title, (use color: '#099')
poststr(request, "}");
poststr(request, "</script>");
poststr(request, "<style onload='cha();'></style>");
@@ -625,7 +626,7 @@ static commandResult_t CMD_Chart_AddNow(const void *context, const char *cmd, co
float f = Tokenizer_GetArgFloat(i);
Chart_SetSample(g_chart, i, f);
}
Chart_AddTime(g_chart, NTP_GetCurrentTime());
Chart_AddTime(g_chart, NTP_GetCurrentTimeWithoutOffset()); // Fix issue #1376 .....was NTP_GetCurrentTime() ... now "WithoutOffset" since NTP drivers timestamp are already offsetted
return CMD_RES_OK;
}