@@ -72,10 +72,10 @@ <h2 id="demo1">Demo #1: About ftDuinoBlue</h2>
7272 < header > < h3 > Values for the < tt > place</ tt > attribute</ h3 > </ header >
7373
7474 < p > The possible values to be used inside a place attribute are
75- listed below. Most values only affect the horizontal or the
76- vertical placement. Two values can therefore be combined in a
77- place attribute using a semicolor like
78- e.g. < tt > place='top;hcenter'</ tt > .</ p >
75+ listed below. Most values only affect only the horizontal or
76+ only the vertical placement. Two values can therefore be
77+ combined in a < tt > place</ tt > attribute using a semicolon
78+ like e.g. < tt > place='top;hcenter'</ tt > .</ p >
7979
8080 < dl >
8181 < dt > < tt > < b > center</ b > </ tt > </ dt > < dd > Center the element
@@ -161,15 +161,15 @@ <h2 id="demo2">Demo #2: Buttons</h2>
161161 like user interface consisting of six buttons. The buttons are
162162 arranged relative to each other using the
163163 < tt > place</ tt > attribute as explained in demo #1. Placement
164- starts with the ▲ button which places it in the very center of
164+ starts with the ▲ button which is placed in the very center of
165165 the screen. Left and right below this are the ◀ and ▶ buttons
166166 and the ▼ is placed below these and horizontally centered.</ p >
167167
168168 < p > We want the A and B buttons to be slighly above the ▲
169169 button. This is accomplished using a < tt > space</ tt >
170170 element. This element is invisible and serves no other purpose
171- than to take up some screen space. In this example a 50 pixels
172- high space is placed above the ▲ button. The A and B buttons are
171+ than to take up some screen space. In this example a 50 pixel
172+ tall space is placed above the ▲ button. The A and B buttons are
173173 then placed above this space but left and right of the first ▲
174174 button just like the ◀ and ▶ buttons previously.</ p >
175175
@@ -196,7 +196,6 @@ <h2 id="demo2">Demo #2: Buttons</h2>
196196 < button id ='2 ' size ='45 ' color ='white ' bgcolor ='#00BCD4 ' place ='below:1;left_of:1 '> ◀</ button >
197197 < button id ='3 ' size ='45 ' color ='white ' bgcolor ='#00BCD4 ' place ='below:1;right_of:1 '> ▶</ button >
198198 < button id ='4 ' size ='45 ' color ='white ' bgcolor ='#FF5722 ' place ='hcenter;below:3 '> ▼</ button >
199-
200199 < space id ='5 ' height ='50 ' place ='hcenter;above:1 '/>
201200 < button id ='6 ' size ='45 ' color ='#ffffff ' bgcolor ='#FF5722 ' place ='above:5;left_of:1 '> A</ button >
202201 < button id ='7 ' size ='45 ' color ='white ' bgcolor ='#673AB7 ' place ='above:5;right_of:1 '> B</ button >
@@ -225,9 +224,7 @@ <h2 id="demo3">Demo #3: Joysticks</h2>
225224 < xmp style ="overflow-x:scroll; " class ="prettyprint ">
226225 < layout orientation ='portrait ' name ='Demo #3: Joysticks '>
227226 < joystick id ='1 ' color ='#FF9800 ' bgcolor ='#03A9F4 ' place ='hcenter;bottom '/>
228-
229227 < space id ='2 ' width ='100 ' place ='hcenter;above:1 '/>
230-
231228 < button id ='3 ' size ='60 ' color ='#ffffff ' bgcolor ='#009688 ' place ='above:1;left_of:2 '> A</ button >
232229 < button id ='4 ' size ='60 ' color ='#ffffff ' bgcolor ='#F44336 ' place ='above:1;right_of:2 '> B</ button >
233230 </ layout >
@@ -244,16 +241,16 @@ <h2 id="demo4">Demo #4: Switches</h2>
244241 < p > Another common element for user interfaces is the
245242 switch. Switches share the basic functions with buttons and can
246243 also be used to turn things on or off. But unlike buttons they
247- keep their state. Once switched on they stay "on" until they are
244+ keep their state. Once switched on they stay on until they are
248245 explicitely switched off again.</ p >
249246
250247 < p > The fact that a switch can permanently change its state makes
251248 it desireable to set the correct switch state whenever the app
252- connects to the Arduino. The app therefore request the
249+ reconnects to the Arduino. The app therefore requests the
253250 current < tt > STATE</ tt > from the arduino before it paints the
254251 user interface. Upon receiving the < tt > STATE</ tt > request the
255- Arduino can send the state of the switched to the app to
256- initialize them
252+ Arduino can send the state of the switches to the app in order
253+ to initialize them
257254 properly. The < a href ="https://github.com/harbaum/ftDuinoBlue/tree/master/sketch/ftduinoblue_demo "> example
258255 sketch</ a > does this in
259256 the < tt > ftduinoblue_state_callback()</ tt > function.</ p >
@@ -281,7 +278,7 @@ <h2 id="demo4">Demo #4: Switches</h2>
281278 < h2 id ="demo5 "> Demo #5: Landscape</ h2 >
282279
283280 < p > All demos so far were expecting to use the smart device in vertical portrait orientation.
284- To e.g. place to joysticks side by side a horizontal landscape layout would be more
281+ To e.g. place two joysticks side by side a horizontal landscape layout would be more
285282 appropriate. This demo achieves exactly that.</ p >
286283
287284 < div >
@@ -301,7 +298,7 @@ <h2 id="demo5">Demo #5: Landscape</h2>
301298
302299 < h2 id ="demo6 "> Demo #6: Slider</ h2 >
303300
304- < p > Sliders are another common user interface element. They can use used to set a value within
301+ < p > Sliders are another common user interface element. They can be used to set a value within
305302 a given range. The range always starts with 0. The maximum value can explicitely be specifed
306303 using the < tt > max</ tt > attribute. By default the sliders range from 0 to 100.</ p >
307304
@@ -311,6 +308,14 @@ <h2 id="demo6">Demo #6: Slider</h2>
311308 sketch</ a > also does this in
312309 the < tt > ftduinoblue_state_callback()</ tt > function.</ p >
313310
311+ < p > Furthermore this demo shows how to disable an element by
312+ setting its < tt > enabled</ tt > attribute to < tt > false</ tt > making
313+ the element unresponsive to user input. This may either be used
314+ to indicate that manual interaction is not possible at this
315+ moment. But this may also be used to create a display-only
316+ element as the Arduino can still change the value and alter the
317+ visual appearence of a disabled element.</ p >
318+
314319 < div >
315320 < article class ="card ">
316321 < xmp style ="overflow-x:scroll; " class ="prettyprint ">
0 commit comments