server_tflite.cpp 18 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527528529530531532533534535536537538539540541542543544545546547548549550551552553554555556557558559560561562563564565566567568569570571572573574575576577578579580581582583584585586587588589590591592593594595596597598599600601602603604605606607608609610611612613614615616617618619620621622623624625626627628629630631632633634635636637638639640641642643644645646647648649650651652653654655656657658659660661662663664665666667668669670671672673674675676677678679680681682683684685
  1. #include "server_tflite.h"
  2. #include <string>
  3. #include <vector>
  4. #include "string.h"
  5. #include "esp_log.h"
  6. #include <iomanip>
  7. #include <sstream>
  8. #include "Helper.h"
  9. #include "esp_camera.h"
  10. #include "time_sntp.h"
  11. #include "ClassControllCamera.h"
  12. #include "ClassFlowControll.h"
  13. #include "ClassLogFile.h"
  14. // #define DEBUG_DETAIL_ON
  15. ClassFlowControll tfliteflow;
  16. TaskHandle_t xHandleblink_task_doFlow = NULL;
  17. TaskHandle_t xHandletask_autodoFlow = NULL;
  18. bool flowisrunning = false;
  19. long auto_intervall = 0;
  20. bool auto_isrunning = false;
  21. int countRounds = 0;
  22. int getCountFlowRounds() {
  23. return countRounds;
  24. }
  25. esp_err_t GetJPG(std::string _filename, httpd_req_t *req)
  26. {
  27. return tfliteflow.GetJPGStream(_filename, req);
  28. }
  29. esp_err_t GetRawJPG(httpd_req_t *req)
  30. {
  31. return tfliteflow.SendRawJPG(req);
  32. }
  33. bool isSetupModusActive() {
  34. return tfliteflow.getStatusSetupModus();
  35. return false;
  36. }
  37. void KillTFliteTasks()
  38. {
  39. #ifdef DEBUG_DETAIL_ON
  40. printf("Handle: xHandleblink_task_doFlow: %ld\n", (long) xHandleblink_task_doFlow);
  41. #endif
  42. if (xHandleblink_task_doFlow)
  43. {
  44. vTaskDelete(xHandleblink_task_doFlow);
  45. #ifdef DEBUG_DETAIL_ON
  46. printf("Killed: xHandleblink_task_doFlow\n");
  47. #endif
  48. }
  49. #ifdef DEBUG_DETAIL_ON
  50. printf("Handle: xHandletask_autodoFlow: %ld\n", (long) xHandletask_autodoFlow);
  51. #endif
  52. if (xHandletask_autodoFlow)
  53. {
  54. vTaskDelete(xHandletask_autodoFlow);
  55. #ifdef DEBUG_DETAIL_ON
  56. printf("Killed: xHandletask_autodoFlow\n");
  57. #endif
  58. }
  59. }
  60. void doInit(void)
  61. {
  62. string config = "/sdcard/config/config.ini";
  63. #ifdef DEBUG_DETAIL_ON
  64. printf("Start tfliteflow.InitFlow(config);\n");
  65. #endif
  66. tfliteflow.InitFlow(config);
  67. #ifdef DEBUG_DETAIL_ON
  68. printf("Finished tfliteflow.InitFlow(config);\n");
  69. #endif
  70. }
  71. bool doflow(void)
  72. {
  73. std::string zw_time = gettimestring(LOGFILE_TIME_FORMAT);
  74. printf("doflow - start %s\n", zw_time.c_str());
  75. flowisrunning = true;
  76. tfliteflow.doFlow(zw_time);
  77. flowisrunning = false;
  78. #ifdef DEBUG_DETAIL_ON
  79. printf("doflow - end %s\n", zw_time.c_str());
  80. #endif
  81. return true;
  82. }
  83. void blink_task_doFlow(void *pvParameter)
  84. {
  85. #ifdef DEBUG_DETAIL_ON
  86. printf("blink_task_doFlow\n");
  87. #endif
  88. if (!flowisrunning)
  89. {
  90. flowisrunning = true;
  91. doflow();
  92. flowisrunning = false;
  93. }
  94. vTaskDelete(NULL); //Delete this task if it exits from the loop above
  95. xHandleblink_task_doFlow = NULL;
  96. }
  97. esp_err_t handler_init(httpd_req_t *req)
  98. {
  99. #ifdef DEBUG_DETAIL_ON
  100. LogFile.WriteHeapInfo("handler_init - Start");
  101. printf("handler_doinit uri:\n"); printf(req->uri); printf("\n");
  102. #endif
  103. char* resp_str = "Init started<br>";
  104. httpd_resp_send(req, resp_str, strlen(resp_str));
  105. doInit();
  106. resp_str = "Init done<br>";
  107. httpd_resp_send(req, resp_str, strlen(resp_str));
  108. /* Respond with an empty chunk to signal HTTP response completion */
  109. httpd_resp_send_chunk(req, NULL, 0);
  110. #ifdef DEBUG_DETAIL_ON
  111. LogFile.WriteHeapInfo("handler_init - Done");
  112. #endif
  113. return ESP_OK;
  114. };
  115. esp_err_t handler_doflow(httpd_req_t *req)
  116. {
  117. #ifdef DEBUG_DETAIL_ON
  118. LogFile.WriteHeapInfo("handler_doflow - Start");
  119. #endif
  120. char* resp_str;
  121. printf("handler_doFlow uri: "); printf(req->uri); printf("\n");
  122. if (flowisrunning)
  123. {
  124. const char* resp_str = "doFlow läuft bereits und kann nicht nochmal gestartet werden";
  125. httpd_resp_send(req, resp_str, strlen(resp_str));
  126. return 2;
  127. }
  128. else
  129. {
  130. xTaskCreate(&blink_task_doFlow, "blink_doFlow", configMINIMAL_STACK_SIZE * 64, NULL, tskIDLE_PRIORITY+1, &xHandleblink_task_doFlow);
  131. }
  132. resp_str = "doFlow gestartet - dauert ca. 60 Sekunden";
  133. httpd_resp_send(req, resp_str, strlen(resp_str));
  134. /* Respond with an empty chunk to signal HTTP response completion */
  135. httpd_resp_send_chunk(req, NULL, 0);
  136. #ifdef DEBUG_DETAIL_ON
  137. LogFile.WriteHeapInfo("handler_doflow - Done");
  138. #endif
  139. return ESP_OK;
  140. };
  141. esp_err_t handler_wasserzaehler(httpd_req_t *req)
  142. {
  143. #ifdef DEBUG_DETAIL_ON
  144. LogFile.WriteHeapInfo("handler_wasserzaehler - Start");
  145. #endif
  146. bool _rawValue = false;
  147. bool _noerror = false;
  148. bool _all = false;
  149. std::string _type = "value";
  150. string zw;
  151. printf("handler_wasserzaehler uri:\n"); printf(req->uri); printf("\n");
  152. char _query[100];
  153. char _size[10];
  154. if (httpd_req_get_url_query_str(req, _query, 100) == ESP_OK)
  155. {
  156. // printf("Query: "); printf(_query); printf("\n");
  157. if (httpd_query_key_value(_query, "all", _size, 10) == ESP_OK)
  158. {
  159. #ifdef DEBUG_DETAIL_ON
  160. printf("all is found"); printf(_size); printf("\n");
  161. #endif
  162. _all = true;
  163. }
  164. if (httpd_query_key_value(_query, "type", _size, 10) == ESP_OK)
  165. {
  166. #ifdef DEBUG_DETAIL_ON
  167. printf("all is found"); printf(_size); printf("\n");
  168. #endif
  169. _type = std::string(_size);
  170. }
  171. if (httpd_query_key_value(_query, "rawvalue", _size, 10) == ESP_OK)
  172. {
  173. #ifdef DEBUG_DETAIL_ON
  174. printf("rawvalue is found"); printf(_size); printf("\n");
  175. #endif
  176. _rawValue = true;
  177. }
  178. if (httpd_query_key_value(_query, "noerror", _size, 10) == ESP_OK)
  179. {
  180. #ifdef DEBUG_DETAIL_ON
  181. printf("noerror is found"); printf(_size); printf("\n");
  182. #endif
  183. _noerror = true;
  184. }
  185. }
  186. httpd_resp_set_hdr(req, "Access-Control-Allow-Origin", "*");
  187. if (_all)
  188. {
  189. httpd_resp_set_type(req, "text/plain");
  190. printf("TYPE: %s\n", _type.c_str());
  191. int _intype = READOUT_TYPE_VALUE;
  192. if (_type == "prevalue")
  193. _intype = READOUT_TYPE_PREVALUE;
  194. if (_type == "raw")
  195. _intype = READOUT_TYPE_RAWVALUE;
  196. if (_type == "error")
  197. _intype = READOUT_TYPE_ERROR;
  198. zw = tfliteflow.getReadoutAll(_intype);
  199. printf("ZW: %s\n", zw.c_str());
  200. if (zw.length() > 0)
  201. httpd_resp_sendstr_chunk(req, zw.c_str());
  202. httpd_resp_sendstr_chunk(req, NULL);
  203. return ESP_OK;
  204. }
  205. zw = tfliteflow.getReadout(_rawValue, _noerror);
  206. if (zw.length() > 0)
  207. httpd_resp_sendstr_chunk(req, zw.c_str());
  208. string query = std::string(_query);
  209. // printf("Query: %s\n", query.c_str());
  210. if (query.find("full") != std::string::npos)
  211. {
  212. string txt, zw;
  213. txt = "<p>Aligned Image: <p><img src=\"/img_tmp/alg_roi.jpg\"> <p>\n";
  214. txt = txt + "Digital Counter: <p> ";
  215. httpd_resp_sendstr_chunk(req, txt.c_str());
  216. std::vector<HTMLInfo*> htmlinfo;
  217. htmlinfo = tfliteflow.GetAllDigital();
  218. for (int i = 0; i < htmlinfo.size(); ++i)
  219. {
  220. if (htmlinfo[i]->val == 10)
  221. zw = "NaN";
  222. else
  223. {
  224. zw = to_string((int) htmlinfo[i]->val);
  225. }
  226. txt = "<img src=\"/img_tmp/" + htmlinfo[i]->filename + "\"> " + zw;
  227. httpd_resp_sendstr_chunk(req, txt.c_str());
  228. delete htmlinfo[i];
  229. }
  230. htmlinfo.clear();
  231. txt = " <p> Analog Meter: <p> ";
  232. httpd_resp_sendstr_chunk(req, txt.c_str());
  233. htmlinfo = tfliteflow.GetAllAnalog();
  234. for (int i = 0; i < htmlinfo.size(); ++i)
  235. {
  236. std::stringstream stream;
  237. stream << std::fixed << std::setprecision(1) << htmlinfo[i]->val;
  238. zw = stream.str();
  239. txt = "<img src=\"/img_tmp/" + htmlinfo[i]->filename + "\"> " + zw;
  240. httpd_resp_sendstr_chunk(req, txt.c_str());
  241. delete htmlinfo[i];
  242. }
  243. htmlinfo.clear();
  244. }
  245. /* Respond with an empty chunk to signal HTTP response completion */
  246. httpd_resp_sendstr_chunk(req, NULL);
  247. #ifdef DEBUG_DETAIL_ON
  248. LogFile.WriteHeapInfo("handler_wasserzaehler - Done");
  249. #endif
  250. return ESP_OK;
  251. };
  252. esp_err_t handler_editflow(httpd_req_t *req)
  253. {
  254. #ifdef DEBUG_DETAIL_ON
  255. LogFile.WriteHeapInfo("handler_editflow - Start");
  256. #endif
  257. printf("handler_editflow uri: "); printf(req->uri); printf("\n");
  258. char _query[200];
  259. char _valuechar[30];
  260. string _task;
  261. if (httpd_req_get_url_query_str(req, _query, 200) == ESP_OK)
  262. {
  263. if (httpd_query_key_value(_query, "task", _valuechar, 30) == ESP_OK)
  264. {
  265. #ifdef DEBUG_DETAIL_ON
  266. printf("task is found: %s\n", _valuechar);
  267. #endif
  268. _task = string(_valuechar);
  269. }
  270. }
  271. if (_task.compare("copy") == 0)
  272. {
  273. string in, out, zw;
  274. httpd_query_key_value(_query, "in", _valuechar, 30);
  275. in = string(_valuechar);
  276. httpd_query_key_value(_query, "out", _valuechar, 30);
  277. out = string(_valuechar);
  278. #ifdef DEBUG_DETAIL_ON
  279. printf("in: "); printf(in.c_str()); printf("\n");
  280. printf("out: "); printf(out.c_str()); printf("\n");
  281. #endif
  282. in = "/sdcard" + in;
  283. out = "/sdcard" + out;
  284. CopyFile(in, out);
  285. zw = "Copy Done";
  286. httpd_resp_sendstr_chunk(req, zw.c_str());
  287. }
  288. if (_task.compare("cutref") == 0)
  289. {
  290. string in, out, zw;
  291. int x, y, dx, dy;
  292. bool enhance = false;
  293. httpd_query_key_value(_query, "in", _valuechar, 30);
  294. in = string(_valuechar);
  295. httpd_query_key_value(_query, "out", _valuechar, 30);
  296. out = string(_valuechar);
  297. httpd_query_key_value(_query, "x", _valuechar, 30);
  298. zw = string(_valuechar);
  299. x = stoi(zw);
  300. httpd_query_key_value(_query, "y", _valuechar, 30);
  301. zw = string(_valuechar);
  302. y = stoi(zw);
  303. httpd_query_key_value(_query, "dx", _valuechar, 30);
  304. zw = string(_valuechar);
  305. dx = stoi(zw);
  306. httpd_query_key_value(_query, "dy", _valuechar, 30);
  307. zw = string(_valuechar);
  308. dy = stoi(zw);
  309. #ifdef DEBUG_DETAIL_ON
  310. printf("in: "); printf(in.c_str()); printf("\n");
  311. printf("out: "); printf(out.c_str()); printf("\n");
  312. printf("x: "); printf(zw.c_str()); printf("\n");
  313. printf("y: "); printf(zw.c_str()); printf("\n");
  314. printf("dx: "); printf(zw.c_str()); printf("\n");
  315. printf("dy: "); printf(zw.c_str()); printf("\n");
  316. #endif
  317. if (httpd_query_key_value(_query, "enhance", _valuechar, 10) == ESP_OK)
  318. {
  319. zw = string(_valuechar);
  320. if (zw.compare("true") == 0)
  321. {
  322. enhance = true;
  323. }
  324. }
  325. in = "/sdcard" + in;
  326. out = "/sdcard" + out;
  327. string out2 = out.substr(0, out.length() - 4) + "_org.jpg";
  328. CAlignAndCutImage *caic = new CAlignAndCutImage(in);
  329. caic->CutAndSave(out2, x, y, dx, dy);
  330. delete caic;
  331. CImageBasis *cim = new CImageBasis(out2);
  332. if (enhance)
  333. {
  334. cim->Contrast(90);
  335. }
  336. cim->SaveToFile(out);
  337. delete cim;
  338. zw = "CutImage Done";
  339. httpd_resp_sendstr_chunk(req, zw.c_str());
  340. }
  341. if (_task.compare("test_take") == 0)
  342. {
  343. std::string _host = "";
  344. std::string _bri = "";
  345. std::string _con = "";
  346. std::string _sat = "";
  347. int bri = -100;
  348. int sat = -100;
  349. int con = -100;
  350. if (httpd_query_key_value(_query, "host", _valuechar, 30) == ESP_OK) {
  351. _host = std::string(_valuechar);
  352. }
  353. if (httpd_query_key_value(_query, "bri", _valuechar, 30) == ESP_OK) {
  354. _bri = std::string(_valuechar);
  355. bri = stoi(_bri);
  356. }
  357. if (httpd_query_key_value(_query, "con", _valuechar, 30) == ESP_OK) {
  358. _con = std::string(_valuechar);
  359. con = stoi(_con);
  360. }
  361. if (httpd_query_key_value(_query, "sat", _valuechar, 30) == ESP_OK) {
  362. _sat = std::string(_valuechar);
  363. sat = stoi(_sat);
  364. }
  365. // printf("Parameter host: "); printf(_host.c_str()); printf("\n");
  366. // string zwzw = "Do " + _task + " start\n"; printf(zwzw.c_str());
  367. bool changed = Camera.SetBrightnessContrastSaturation(bri, con, sat);
  368. std::string zw = tfliteflow.doSingleStep("[MakeImage]", _host);
  369. httpd_resp_sendstr_chunk(req, zw.c_str());
  370. }
  371. if (_task.compare("test_align") == 0)
  372. {
  373. std::string _host = "";
  374. if (httpd_query_key_value(_query, "host", _valuechar, 30) == ESP_OK) {
  375. _host = std::string(_valuechar);
  376. }
  377. // printf("Parameter host: "); printf(_host.c_str()); printf("\n");
  378. // string zwzw = "Do " + _task + " start\n"; printf(zwzw.c_str());
  379. std::string zw = tfliteflow.doSingleStep("[Alignment]", _host);
  380. httpd_resp_sendstr_chunk(req, zw.c_str());
  381. }
  382. if (_task.compare("test_analog") == 0)
  383. {
  384. std::string _host = "";
  385. if (httpd_query_key_value(_query, "host", _valuechar, 30) == ESP_OK) {
  386. _host = std::string(_valuechar);
  387. }
  388. // printf("Parameter host: "); printf(_host.c_str()); printf("\n");
  389. // string zwzw = "Do " + _task + " start\n"; printf(zwzw.c_str());
  390. std::string zw = tfliteflow.doSingleStep("[Analog]", _host);
  391. httpd_resp_sendstr_chunk(req, zw.c_str());
  392. }
  393. if (_task.compare("test_digits") == 0)
  394. {
  395. std::string _host = "";
  396. if (httpd_query_key_value(_query, "host", _valuechar, 30) == ESP_OK) {
  397. _host = std::string(_valuechar);
  398. }
  399. // printf("Parameter host: "); printf(_host.c_str()); printf("\n");
  400. // string zwzw = "Do " + _task + " start\n"; printf(zwzw.c_str());
  401. std::string zw = tfliteflow.doSingleStep("[Digits]", _host);
  402. httpd_resp_sendstr_chunk(req, zw.c_str());
  403. }
  404. /* Respond with an empty chunk to signal HTTP response completion */
  405. httpd_resp_sendstr_chunk(req, NULL);
  406. #ifdef DEBUG_DETAIL_ON
  407. LogFile.WriteHeapInfo("handler_editflow - Done");
  408. #endif
  409. return ESP_OK;
  410. };
  411. esp_err_t handler_prevalue(httpd_req_t *req)
  412. {
  413. #ifdef DEBUG_DETAIL_ON
  414. LogFile.WriteHeapInfo("handler_prevalue - Start");
  415. #endif
  416. const char* resp_str;
  417. string zw;
  418. #ifdef DEBUG_DETAIL_ON
  419. printf("handler_prevalue:\n"); printf(req->uri); printf("\n");
  420. #endif
  421. char _query[100];
  422. char _size[10] = "";
  423. char _numbers[50] = "default";
  424. if (httpd_req_get_url_query_str(req, _query, 100) == ESP_OK)
  425. {
  426. #ifdef DEBUG_DETAIL_ON
  427. printf("Query: "); printf(_query); printf("\n");
  428. #endif
  429. if (httpd_query_key_value(_query, "value", _size, 10) == ESP_OK)
  430. {
  431. #ifdef DEBUG_DETAIL_ON
  432. printf("Value: "); printf(_size); printf("\n");
  433. #endif
  434. }
  435. httpd_query_key_value(_query, "numbers", _numbers, 50);
  436. }
  437. if (strlen(_size) == 0)
  438. {
  439. zw = tfliteflow.GetPrevalue(std::string(_numbers));
  440. }
  441. else
  442. {
  443. zw = "SetPrevalue to " + tfliteflow.UpdatePrevalue(_size, _numbers);
  444. }
  445. resp_str = zw.c_str();
  446. httpd_resp_set_hdr(req, "Access-Control-Allow-Origin", "*");
  447. httpd_resp_send(req, resp_str, strlen(resp_str));
  448. /* Respond with an empty chunk to signal HTTP response completion */
  449. httpd_resp_send_chunk(req, NULL, 0);
  450. #ifdef DEBUG_DETAIL_ON
  451. LogFile.WriteHeapInfo("handler_prevalue - Start");
  452. #endif
  453. return ESP_OK;
  454. };
  455. void task_autodoFlow(void *pvParameter)
  456. {
  457. int64_t fr_start, fr_delta_ms;
  458. doInit();
  459. auto_isrunning = tfliteflow.isAutoStart(auto_intervall);
  460. if (isSetupModusActive()) {
  461. auto_isrunning = false;
  462. std::string zw_time = gettimestring(LOGFILE_TIME_FORMAT);
  463. tfliteflow.doFlowMakeImageOnly(zw_time);
  464. }
  465. while (auto_isrunning)
  466. {
  467. std::string _zw = "task_autodoFlow - next round - Round #" + std::to_string(++countRounds);
  468. LogFile.WriteToFile(_zw);
  469. printf("Autoflow: start\n");
  470. fr_start = esp_timer_get_time();
  471. if (flowisrunning)
  472. {
  473. #ifdef DEBUG_DETAIL_ON
  474. printf("Autoflow: doFLow laeuft bereits!\n");
  475. #endif
  476. }
  477. else
  478. {
  479. #ifdef DEBUG_DETAIL_ON
  480. printf("Autoflow: doFLow wird gestartet\n");
  481. #endif
  482. flowisrunning = true;
  483. doflow();
  484. #ifdef DEBUG_DETAIL_ON
  485. printf("Remove older log files\n");
  486. #endif
  487. LogFile.RemoveOld();
  488. }
  489. LogFile.WriteToFile("task_autodoFlow - round done");
  490. //CPU Temp
  491. float cputmp = temperatureRead();
  492. std::stringstream stream;
  493. stream << std::fixed << std::setprecision(1) << cputmp;
  494. string zwtemp = "CPU Temperature: " + stream.str();
  495. LogFile.WriteToFile(zwtemp);
  496. printf("CPU Temperature: %.2f\n", cputmp);
  497. fr_delta_ms = (esp_timer_get_time() - fr_start) / 1000;
  498. if (auto_intervall > fr_delta_ms)
  499. {
  500. const TickType_t xDelay = (auto_intervall - fr_delta_ms) / portTICK_PERIOD_MS;
  501. printf("Autoflow: sleep for : %ldms\n", (long) xDelay);
  502. vTaskDelay( xDelay );
  503. }
  504. }
  505. vTaskDelete(NULL); //Delete this task if it exits from the loop above
  506. xHandletask_autodoFlow = NULL;
  507. }
  508. void TFliteDoAutoStart()
  509. {
  510. xTaskCreate(&task_autodoFlow, "task_autodoFlow", configMINIMAL_STACK_SIZE * 64, NULL, tskIDLE_PRIORITY+1, &xHandletask_autodoFlow);
  511. }
  512. void register_server_tflite_uri(httpd_handle_t server)
  513. {
  514. ESP_LOGI(TAGTFLITE, "server_part_camera - Registering URI handlers");
  515. httpd_uri_t camuri = { };
  516. camuri.method = HTTP_GET;
  517. camuri.uri = "/doinit";
  518. camuri.handler = handler_init;
  519. camuri.user_ctx = (void*) "Light On";
  520. httpd_register_uri_handler(server, &camuri);
  521. camuri.uri = "/setPreValue.html";
  522. camuri.handler = handler_prevalue;
  523. camuri.user_ctx = (void*) "Prevalue";
  524. httpd_register_uri_handler(server, &camuri);
  525. camuri.uri = "/doflow";
  526. camuri.handler = handler_doflow;
  527. camuri.user_ctx = (void*) "Light Off";
  528. httpd_register_uri_handler(server, &camuri);
  529. camuri.uri = "/editflow.html";
  530. camuri.handler = handler_editflow;
  531. camuri.user_ctx = (void*) "EditFlow";
  532. httpd_register_uri_handler(server, &camuri);
  533. camuri.uri = "/wasserzaehler.html";
  534. camuri.handler = handler_wasserzaehler;
  535. camuri.user_ctx = (void*) "Wasserzaehler";
  536. httpd_register_uri_handler(server, &camuri);
  537. }