Skip to content

Commit

Permalink
Fix issue #1375 and #1376 (#1377)
Browse files Browse the repository at this point in the history
* 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: '#99')

* 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 b83c7db.

* Revert "Update obk_config.h"

This reverts commit 7b7d979.

* Revert "Update http_fns.c"

This reverts commit d81e4b3.

* Revert "Update drv_charts.c"

This reverts commit c5d1229.
  • Loading branch information
ehorvat1 authored Oct 3, 2024
1 parent 0783916 commit 52efa43
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion src/driver/drv_charts.c
Original file line number Diff line number Diff line change
Expand Up @@ -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>");
Expand Down Expand Up @@ -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;
}
Expand Down

0 comments on commit 52efa43

Please sign in to comment.