Skip to content

Commit

Permalink
Webclient refactoring
Browse files Browse the repository at this point in the history
  • Loading branch information
abratchik committed Dec 17, 2022
1 parent d152aec commit 1cab1f5
Show file tree
Hide file tree
Showing 64 changed files with 1,777 additions and 2,139 deletions.
10 changes: 3 additions & 7 deletions API.md
Original file line number Diff line number Diff line change
Expand Up @@ -4,10 +4,8 @@ this makes controlling all functions of the camera via GET requests possible.

## URI's
### Web UI pages
* `/` or `/portal` - Default index (portal)
* `/view?mode=full|simple|stream|still` - Go direct to specific page:
* - full: taking still and video with complete set of camera controls
* - simple: taking still and video with limited set of camera controls
* `/` Default index (camera view)
* `/view?mode=stream|still` - Go direct to specific page:
* - stream: starting video capture with full screen mode
* - still: taking a still image with full screen mode
* `/dump` - Status page (automatically refreshed every 5 sec)
Expand Down Expand Up @@ -50,8 +48,6 @@ vflip - 0 = disable, 1 = enable
rotate - Rotation Angle; integer, only -90, 0, 90 values are recognised
dcw - 0 = disable, 1 = enable
colorbar - Overlays a color test pattern on the stream; integer, 1 = enabled
face_detect - Face Detection; 1 = enabled, Only settable if framesize <= 4 (CIF)
face_recognize - Face recognition; 1 = enabled, only settable if Face detection is already enabled
```

##### Framesize values
Expand Down Expand Up @@ -81,7 +77,7 @@ the `<key>` parameter.
* save_prefs - Saves preferences
`val=cam` or not specified will save camera preferences
`val=conn` will save network preferences
* clear_prefs - Deletes camera the preferences
* remove_prefs - Deletes camera the preferences
`val=cam` or not specified will reset camera preferences
`val=conn` will reset network preferences. Attention! after this the server will boot as access point after restart, and all
connection settings will be lost.
Expand Down
17 changes: 9 additions & 8 deletions Docs/html/annotated.html
Original file line number Diff line number Diff line change
Expand Up @@ -69,15 +69,16 @@
<div class="contents">
<div class="textblock">Here are the data structures with brief descriptions:</div><div class="directory">
<table class="directory">
<tr id="row_0_" class="even"><td class="entry"><span style="width:16px;display:inline-block;">&#160;</span><span class="icona"><span class="icon">C</span></span><a class="el" href="class_c_l_app_cam.html" target="_self">CLAppCam</a></td><td class="desc">Camera Manager Manages all interactions with camera </td></tr>
<tr id="row_1_"><td class="entry"><span style="width:16px;display:inline-block;">&#160;</span><span class="icona"><span class="icon">C</span></span><a class="el" href="class_c_l_app_component.html" target="_self">CLAppComponent</a></td><td class="desc">Abstract root class for the appication components </td></tr>
<tr id="row_2_" class="even"><td class="entry"><span style="width:16px;display:inline-block;">&#160;</span><span class="icona"><span class="icon">C</span></span><a class="el" href="class_c_l_app_conn.html" target="_self">CLAppConn</a></td><td class="desc">Connection Manager This class manages everything related to connectivity of the application: WiFi, OTA etc </td></tr>
<tr id="row_3_"><td class="entry"><span style="width:16px;display:inline-block;">&#160;</span><span class="icona"><span class="icon">C</span></span><a class="el" href="class_c_l_app_httpd.html" target="_self">CLAppHttpd</a></td><td class="desc">WebServer Manager Class for handling web server requests. The web pages are assumed to be stored in the file system (can be SD card or LittleFS). <br />
<tr id="row_0_" class="even"><td class="entry"><span style="width:16px;display:inline-block;">&#160;</span><span class="icona"><span class="icon">C</span></span><a class="el" href="struct_app_servo.html" target="_self">AppServo</a></td><td class="desc"></td></tr>
<tr id="row_1_"><td class="entry"><span style="width:16px;display:inline-block;">&#160;</span><span class="icona"><span class="icon">C</span></span><a class="el" href="class_c_l_app_cam.html" target="_self">CLAppCam</a></td><td class="desc">Camera Manager Manages all interactions with camera </td></tr>
<tr id="row_2_" class="even"><td class="entry"><span style="width:16px;display:inline-block;">&#160;</span><span class="icona"><span class="icon">C</span></span><a class="el" href="class_c_l_app_component.html" target="_self">CLAppComponent</a></td><td class="desc">Abstract root class for the appication components </td></tr>
<tr id="row_3_"><td class="entry"><span style="width:16px;display:inline-block;">&#160;</span><span class="icona"><span class="icon">C</span></span><a class="el" href="class_c_l_app_conn.html" target="_self">CLAppConn</a></td><td class="desc">Connection Manager This class manages everything related to connectivity of the application: WiFi, OTA etc </td></tr>
<tr id="row_4_" class="even"><td class="entry"><span style="width:16px;display:inline-block;">&#160;</span><span class="icona"><span class="icon">C</span></span><a class="el" href="class_c_l_app_httpd.html" target="_self">CLAppHttpd</a></td><td class="desc">WebServer Manager Class for handling web server requests. The web pages are assumed to be stored in the file system (can be SD card or LittleFS). <br />
</td></tr>
<tr id="row_4_" class="even"><td class="entry"><span style="width:16px;display:inline-block;">&#160;</span><span class="icona"><span class="icon">C</span></span><a class="el" href="class_c_l_storage.html" target="_self">CLStorage</a></td><td class="desc">Storage Manager Encapsulates access to the file system, which can be either external (SD card) or internal (LittleFS) </td></tr>
<tr id="row_5_"><td class="entry"><span style="width:16px;display:inline-block;">&#160;</span><span class="icona"><span class="icon">C</span></span><a class="el" href="struct_static_i_p.html" target="_self">StaticIP</a></td><td class="desc"></td></tr>
<tr id="row_6_" class="even"><td class="entry"><span style="width:16px;display:inline-block;">&#160;</span><span class="icona"><span class="icon">C</span></span><a class="el" href="struct_station.html" target="_self">Station</a></td><td class="desc"></td></tr>
<tr id="row_7_"><td class="entry"><span style="width:16px;display:inline-block;">&#160;</span><span class="icona"><span class="icon">C</span></span><a class="el" href="struct_uri_mapping.html" target="_self">UriMapping</a></td><td class="desc">Static URI to path mapping </td></tr>
<tr id="row_5_"><td class="entry"><span style="width:16px;display:inline-block;">&#160;</span><span class="icona"><span class="icon">C</span></span><a class="el" href="class_c_l_storage.html" target="_self">CLStorage</a></td><td class="desc">Storage Manager Encapsulates access to the file system, which can be either external (SD card) or internal (LittleFS) </td></tr>
<tr id="row_6_" class="even"><td class="entry"><span style="width:16px;display:inline-block;">&#160;</span><span class="icona"><span class="icon">C</span></span><a class="el" href="struct_static_i_p.html" target="_self">StaticIP</a></td><td class="desc">Static IP strcuture for configuring AP and WiFi parameters </td></tr>
<tr id="row_7_"><td class="entry"><span style="width:16px;display:inline-block;">&#160;</span><span class="icona"><span class="icon">C</span></span><a class="el" href="struct_station.html" target="_self">Station</a></td><td class="desc">WiFi connectivity details (SSID/password) </td></tr>
<tr id="row_8_" class="even"><td class="entry"><span style="width:16px;display:inline-block;">&#160;</span><span class="icona"><span class="icon">C</span></span><a class="el" href="struct_uri_mapping.html" target="_self">UriMapping</a></td><td class="desc">Static URI to path mapping </td></tr>
</table>
</div><!-- directory -->
</div><!-- contents -->
Expand Down
14 changes: 7 additions & 7 deletions Docs/html/app__cam_8h_source.html
Original file line number Diff line number Diff line change
Expand Up @@ -174,31 +174,31 @@
<div class="line"><a id="l00105" name="l00105"></a><span class="lineno"> 105</span><span class="keyword">extern</span> <a class="code hl_class" href="class_c_l_app_cam.html">CLAppCam</a> <a class="code hl_variable" href="app__cam_8h.html#a2c40f09444d86a4ed61c53c20f0c9825">AppCam</a>;</div>
<div class="line"><a id="l00106" name="l00106"></a><span class="lineno"> 106</span> </div>
<div class="line"><a id="l00107" name="l00107"></a><span class="lineno"> 107</span><span class="preprocessor">#endif</span></div>
<div class="ttc" id="aapp__cam_8h_html_a2c40f09444d86a4ed61c53c20f0c9825"><div class="ttname"><a href="app__cam_8h.html#a2c40f09444d86a4ed61c53c20f0c9825">AppCam</a></div><div class="ttdeci">CLAppCam AppCam</div><div class="ttdef"><b>Definition:</b> app_cam.cpp:233</div></div>
<div class="ttc" id="aapp__cam_8h_html_a2c40f09444d86a4ed61c53c20f0c9825"><div class="ttname"><a href="app__cam_8h.html#a2c40f09444d86a4ed61c53c20f0c9825">AppCam</a></div><div class="ttdeci">CLAppCam AppCam</div><div class="ttdef"><b>Definition:</b> app_cam.cpp:248</div></div>
<div class="ttc" id="aapp__cam_8h_html_a8dcb31f6ec7707e22c63090318ca951f"><div class="ttname"><a href="app__cam_8h.html#a8dcb31f6ec7707e22c63090318ca951f">LAMP_DEFAULT</a></div><div class="ttdeci">#define LAMP_DEFAULT</div><div class="ttdef"><b>Definition:</b> app_cam.h:11</div></div>
<div class="ttc" id="aapp__component_8h_html"><div class="ttname"><a href="app__component_8h.html">app_component.h</a></div></div>
<div class="ttc" id="acamera__pins_8h_html"><div class="ttname"><a href="camera__pins_8h.html">camera_pins.h</a></div></div>
<div class="ttc" id="aclass_c_l_app_cam_html"><div class="ttname"><a href="class_c_l_app_cam.html">CLAppCam</a></div><div class="ttdoc">Camera Manager Manages all interactions with camera.</div><div class="ttdef"><b>Definition:</b> app_cam.h:22</div></div>
<div class="ttc" id="aclass_c_l_app_cam_html_a0f2bc29dea9609204871b7b5bc281c4f"><div class="ttname"><a href="class_c_l_app_cam.html#a0f2bc29dea9609204871b7b5bc281c4f">CLAppCam::savePrefs</a></div><div class="ttdeci">int savePrefs()</div><div class="ttdef"><b>Definition:</b> app_cam.cpp:157</div></div>
<div class="ttc" id="aclass_c_l_app_cam_html_a0f2bc29dea9609204871b7b5bc281c4f"><div class="ttname"><a href="class_c_l_app_cam.html#a0f2bc29dea9609204871b7b5bc281c4f">CLAppCam::savePrefs</a></div><div class="ttdeci">int savePrefs()</div><div class="ttdef"><b>Definition:</b> app_cam.cpp:170</div></div>
<div class="ttc" id="aclass_c_l_app_cam_html_a1f01a309f73eb36142ab8b449c81a381"><div class="ttname"><a href="class_c_l_app_cam.html#a1f01a309f73eb36142ab8b449c81a381">CLAppCam::isJPEGinBuffer</a></div><div class="ttdeci">bool isJPEGinBuffer()</div><div class="ttdef"><b>Definition:</b> app_cam.h:54</div></div>
<div class="ttc" id="aclass_c_l_app_cam_html_a26a9c706c7c9f86adbfa3cfb748760df"><div class="ttname"><a href="class_c_l_app_cam.html#a26a9c706c7c9f86adbfa3cfb748760df">CLAppCam::loadPrefs</a></div><div class="ttdeci">int loadPrefs()</div><div class="ttdef"><b>Definition:</b> app_cam.cpp:98</div></div>
<div class="ttc" id="aclass_c_l_app_cam_html_a26a9c706c7c9f86adbfa3cfb748760df"><div class="ttname"><a href="class_c_l_app_cam.html#a26a9c706c7c9f86adbfa3cfb748760df">CLAppCam::loadPrefs</a></div><div class="ttdeci">int loadPrefs()</div><div class="ttdef"><b>Definition:</b> app_cam.cpp:109</div></div>
<div class="ttc" id="aclass_c_l_app_cam_html_a27d4c05b87660b0e04b6a8902f0f173e"><div class="ttname"><a href="class_c_l_app_cam.html#a27d4c05b87660b0e04b6a8902f0f173e">CLAppCam::setRotation</a></div><div class="ttdeci">void setRotation(int val)</div><div class="ttdef"><b>Definition:</b> app_cam.h:48</div></div>
<div class="ttc" id="aclass_c_l_app_cam_html_a5489d93c51c1b4f3457af58970ff953d"><div class="ttname"><a href="class_c_l_app_cam.html#a5489d93c51c1b4f3457af58970ff953d">CLAppCam::CLAppCam</a></div><div class="ttdeci">CLAppCam()</div><div class="ttdef"><b>Definition:</b> app_cam.cpp:3</div></div>
<div class="ttc" id="aclass_c_l_app_cam_html_a6581e369883546817a1edaedf4af1734"><div class="ttname"><a href="class_c_l_app_cam.html#a6581e369883546817a1edaedf4af1734">CLAppCam::setFrameRate</a></div><div class="ttdeci">void setFrameRate(int newFrameRate)</div><div class="ttdef"><b>Definition:</b> app_cam.h:43</div></div>
<div class="ttc" id="aclass_c_l_app_cam_html_a65918dca872c1d5bdcb0bb556451127f"><div class="ttname"><a href="class_c_l_app_cam.html#a65918dca872c1d5bdcb0bb556451127f">CLAppCam::getRotation</a></div><div class="ttdeci">int getRotation()</div><div class="ttdef"><b>Definition:</b> app_cam.h:49</div></div>
<div class="ttc" id="aclass_c_l_app_cam_html_a790db89fdbe6524175ad6f447b863c26"><div class="ttname"><a href="class_c_l_app_cam.html#a790db89fdbe6524175ad6f447b863c26">CLAppCam::getFrameRate</a></div><div class="ttdeci">int getFrameRate()</div><div class="ttdef"><b>Definition:</b> app_cam.h:42</div></div>
<div class="ttc" id="aclass_c_l_app_cam_html_a84dc1e1b593b3d4b67889cc88893c92f"><div class="ttname"><a href="class_c_l_app_cam.html#a84dc1e1b593b3d4b67889cc88893c92f">CLAppCam::getLamp</a></div><div class="ttdeci">int getLamp()</div><div class="ttdef"><b>Definition:</b> app_cam.h:33</div></div>
<div class="ttc" id="aclass_c_l_app_cam_html_a89a7a39bd89130cab06fd7139fc9b6d9"><div class="ttname"><a href="class_c_l_app_cam.html#a89a7a39bd89130cab06fd7139fc9b6d9">CLAppCam::snapToBufer</a></div><div class="ttdeci">int snapToBufer()</div><div class="ttdef"><b>Definition:</b> app_cam.cpp:218</div></div>
<div class="ttc" id="aclass_c_l_app_cam_html_a8cab0636ce5e566a7b89016c477aec2b"><div class="ttname"><a href="class_c_l_app_cam.html#a8cab0636ce5e566a7b89016c477aec2b">CLAppCam::setLamp</a></div><div class="ttdeci">void setLamp(int newVal=LAMP_DEFAULT)</div><div class="ttdef"><b>Definition:</b> app_cam.cpp:85</div></div>
<div class="ttc" id="aclass_c_l_app_cam_html_a89a7a39bd89130cab06fd7139fc9b6d9"><div class="ttname"><a href="class_c_l_app_cam.html#a89a7a39bd89130cab06fd7139fc9b6d9">CLAppCam::snapToBufer</a></div><div class="ttdeci">int snapToBufer()</div><div class="ttdef"><b>Definition:</b> app_cam.cpp:233</div></div>
<div class="ttc" id="aclass_c_l_app_cam_html_a8cab0636ce5e566a7b89016c477aec2b"><div class="ttname"><a href="class_c_l_app_cam.html#a8cab0636ce5e566a7b89016c477aec2b">CLAppCam::setLamp</a></div><div class="ttdeci">void setLamp(int newVal=LAMP_DEFAULT)</div><div class="ttdef"><b>Definition:</b> app_cam.cpp:96</div></div>
<div class="ttc" id="aclass_c_l_app_cam_html_a8e19e1d337c7d7406d713a42615005aa"><div class="ttname"><a href="class_c_l_app_cam.html#a8e19e1d337c7d7406d713a42615005aa">CLAppCam::getXclk</a></div><div class="ttdeci">int getXclk()</div><div class="ttdef"><b>Definition:</b> app_cam.h:46</div></div>
<div class="ttc" id="aclass_c_l_app_cam_html_a8f1da94b3efb536a15419e5983fcac81"><div class="ttname"><a href="class_c_l_app_cam.html#a8f1da94b3efb536a15419e5983fcac81">CLAppCam::stop</a></div><div class="ttdeci">int stop()</div><div class="ttdef"><b>Definition:</b> app_cam.cpp:78</div></div>
<div class="ttc" id="aclass_c_l_app_cam_html_a8f1da94b3efb536a15419e5983fcac81"><div class="ttname"><a href="class_c_l_app_cam.html#a8f1da94b3efb536a15419e5983fcac81">CLAppCam::stop</a></div><div class="ttdeci">int stop()</div><div class="ttdef"><b>Definition:</b> app_cam.cpp:89</div></div>
<div class="ttc" id="aclass_c_l_app_cam_html_a97ffe4ceb1fc0ae537d4e5f96cb7691e"><div class="ttname"><a href="class_c_l_app_cam.html#a97ffe4ceb1fc0ae537d4e5f96cb7691e">CLAppCam::getErr</a></div><div class="ttdeci">String getErr()</div><div class="ttdef"><b>Definition:</b> app_cam.h:40</div></div>
<div class="ttc" id="aclass_c_l_app_cam_html_a9ccd0763eb8eeb559b46e747df25d268"><div class="ttname"><a href="class_c_l_app_cam.html#a9ccd0763eb8eeb559b46e747df25d268">CLAppCam::setXclk</a></div><div class="ttdeci">void setXclk(int val)</div><div class="ttdef"><b>Definition:</b> app_cam.h:45</div></div>
<div class="ttc" id="aclass_c_l_app_cam_html_aa0f1c434be24055bab3abb459a071abd"><div class="ttname"><a href="class_c_l_app_cam.html#aa0f1c434be24055bab3abb459a071abd">CLAppCam::getBufferSize</a></div><div class="ttdeci">size_t getBufferSize()</div><div class="ttdef"><b>Definition:</b> app_cam.h:53</div></div>
<div class="ttc" id="aclass_c_l_app_cam_html_aa5bd4f968fd8345d3d2a5d8a121586c3"><div class="ttname"><a href="class_c_l_app_cam.html#aa5bd4f968fd8345d3d2a5d8a121586c3">CLAppCam::setAutoLamp</a></div><div class="ttdeci">void setAutoLamp(bool val)</div><div class="ttdef"><b>Definition:</b> app_cam.h:35</div></div>
<div class="ttc" id="aclass_c_l_app_cam_html_aa68f9714fa1c5bdf77708279c8da081b"><div class="ttname"><a href="class_c_l_app_cam.html#aa68f9714fa1c5bdf77708279c8da081b">CLAppCam::isAutoLamp</a></div><div class="ttdeci">bool isAutoLamp()</div><div class="ttdef"><b>Definition:</b> app_cam.h:36</div></div>
<div class="ttc" id="aclass_c_l_app_cam_html_aac54409dcd9344abbbe434b237dc505f"><div class="ttname"><a href="class_c_l_app_cam.html#aac54409dcd9344abbbe434b237dc505f">CLAppCam::getBuffer</a></div><div class="ttdeci">uint8_t * getBuffer()</div><div class="ttdef"><b>Definition:</b> app_cam.h:52</div></div>
<div class="ttc" id="aclass_c_l_app_cam_html_aaf9c6d7306c5122eb6766011b8fc4c4c"><div class="ttname"><a href="class_c_l_app_cam.html#aaf9c6d7306c5122eb6766011b8fc4c4c">CLAppCam::releaseBuffer</a></div><div class="ttdeci">void releaseBuffer()</div><div class="ttdef"><b>Definition:</b> app_cam.cpp:224</div></div>
<div class="ttc" id="aclass_c_l_app_cam_html_aaf9c6d7306c5122eb6766011b8fc4c4c"><div class="ttname"><a href="class_c_l_app_cam.html#aaf9c6d7306c5122eb6766011b8fc4c4c">CLAppCam::releaseBuffer</a></div><div class="ttdeci">void releaseBuffer()</div><div class="ttdef"><b>Definition:</b> app_cam.cpp:239</div></div>
<div class="ttc" id="aclass_c_l_app_cam_html_ac20c8599dfc6112502b2ca9e446e6af5"><div class="ttname"><a href="class_c_l_app_cam.html#ac20c8599dfc6112502b2ca9e446e6af5">CLAppCam::getSensorPID</a></div><div class="ttdeci">int getSensorPID()</div><div class="ttdef"><b>Definition:</b> app_cam.h:38</div></div>
<div class="ttc" id="aclass_c_l_app_cam_html_af277f42041c7c0a561bd8c8b087f4b3a"><div class="ttname"><a href="class_c_l_app_cam.html#af277f42041c7c0a561bd8c8b087f4b3a">CLAppCam::start</a></div><div class="ttdeci">int start()</div><div class="ttdef"><b>Definition:</b> app_cam.cpp:8</div></div>
<div class="ttc" id="aclass_c_l_app_cam_html_af812f50b9e35bcdb56af399c4fafd8f2"><div class="ttname"><a href="class_c_l_app_cam.html#af812f50b9e35bcdb56af399c4fafd8f2">CLAppCam::getSensor</a></div><div class="ttdeci">sensor_t * getSensor()</div><div class="ttdef"><b>Definition:</b> app_cam.h:39</div></div>
Expand Down
2 changes: 2 additions & 0 deletions Docs/html/app__conn_8h.html
Original file line number Diff line number Diff line change
Expand Up @@ -90,8 +90,10 @@
<tr class="heading"><td colspan="2"><h2 class="groupheader"><a id="nested-classes" name="nested-classes"></a>
Data Structures</h2></td></tr>
<tr class="memitem:"><td class="memItemLeft" align="right" valign="top">struct &#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="struct_station.html">Station</a></td></tr>
<tr class="memdesc:"><td class="mdescLeft">&#160;</td><td class="mdescRight">WiFi connectivity details (SSID/password). <a href="struct_station.html#details">More...</a><br /></td></tr>
<tr class="separator:"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:"><td class="memItemLeft" align="right" valign="top">struct &#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="struct_static_i_p.html">StaticIP</a></td></tr>
<tr class="memdesc:"><td class="mdescLeft">&#160;</td><td class="mdescRight">Static IP strcuture for configuring AP and WiFi parameters. <a href="struct_static_i_p.html#details">More...</a><br /></td></tr>
<tr class="separator:"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:"><td class="memItemLeft" align="right" valign="top">class &#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="class_c_l_app_conn.html">CLAppConn</a></td></tr>
<tr class="memdesc:"><td class="mdescLeft">&#160;</td><td class="mdescRight">Connection Manager This class manages everything related to connectivity of the application: WiFi, OTA etc. <a href="class_c_l_app_conn.html#details">More...</a><br /></td></tr>
Expand Down
Loading

0 comments on commit 1cab1f5

Please sign in to comment.