File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -135,6 +135,19 @@ local function show(page)
135135 end
136136 end
137137
138+ if page .isReady and not page .readOnly then
139+ children [# children + 1 ] = {
140+ type = " button" ,
141+ x = 5 ,
142+ y = children [# children ].y + 35 ,
143+ w = LCD_W - 20 ,
144+ text = " Save" ,
145+ press = function ()
146+ page :write ()
147+ end ,
148+ }
149+ end
150+
138151 for _ , child in ipairs (children ) do
139152 child .x = child .x * 1.75
140153 child .y = (child .y - rf2 .radio .yMinLimit + 5 ) * 1.75
Original file line number Diff line number Diff line change @@ -51,6 +51,7 @@ local function receivedEscParameters(page, data)
5151 addField (" LED color" , escParameters .led_color )
5252 addField (" Smart fan" , escParameters .smart_fan )
5353
54+ page .readOnly = false
5455 rf2 .onPageReady (page )
5556end
5657
@@ -66,4 +67,5 @@ return {
6667 title = " XDFly Setup" ,
6768 labels = labels ,
6869 fields = fields ,
70+ readOnly = true
6971}
You can’t perform that action at this time.
0 commit comments