Skip to content

Commit 92f2907

Browse files
Fix (lost changes)
1 parent 1dec166 commit 92f2907

File tree

2 files changed

+25
-0
lines changed

2 files changed

+25
-0
lines changed

EmbUI/ui.cpp

+24
Original file line numberDiff line numberDiff line change
@@ -5,6 +5,30 @@
55

66
#include "ui.h"
77

8+
void Interface::frame(const String &id, const String &value){
9+
StaticJsonDocument<256> obj;
10+
obj[FPSTR(P_html)] = F("iframe");;
11+
obj[FPSTR(P_type)] = F("frame");
12+
obj[FPSTR(P_id)] = id;
13+
obj[FPSTR(P_value)] = value;
14+
15+
if (!json_frame_add(obj.as<JsonObject>())) {
16+
frame(id, value);
17+
}
18+
}
19+
20+
void Interface::frame2(const String &id, const String &value){
21+
StaticJsonDocument<256> obj;
22+
obj[FPSTR(P_html)] = F("iframe2");;
23+
obj[FPSTR(P_type)] = F("frame");
24+
obj[FPSTR(P_id)] = id;
25+
obj[FPSTR(P_value)] = value;
26+
27+
if (!json_frame_add(obj.as<JsonObject>())) {
28+
frame2(id, value);
29+
}
30+
}
31+
832
void Interface::frame(const String &id, const String &value){
933
StaticJsonDocument<256> obj;
1034
obj[FPSTR(P_id)] = id;

EmbUI/ui.h

+1
Original file line numberDiff line numberDiff line change
@@ -105,6 +105,7 @@ class Interface {
105105
void json_section_end();
106106

107107
void frame(const String &id, const String &value);
108+
void frame2(const String &id, const String &value);
108109
void value(const String &id, bool html = false);
109110
void value(const String &id, const String &val, bool html = false);
110111
void hidden(const String &id);

0 commit comments

Comments
 (0)