Will be called when station is fully operational
| 64 | |
| 65 | // Will be called when station is fully operational |
| 66 | void startWebServer() |
| 67 | { |
| 68 | // Initialize the camera |
| 69 | Vector<String> images; |
| 70 | for(unsigned int i = 1; i < 6; i++) { |
| 71 | String s = "img"; |
| 72 | s.concat(i, DEC, 2); |
| 73 | s += ".jpeg"; |
| 74 | images.add(s); |
| 75 | } |
| 76 | camera = new FakeCamera(images); |
| 77 | camera->init(); |
| 78 | |
| 79 | // .. and run the HTTP server |
| 80 | server.listen(80); |
| 81 | server.paths.set("/", onIndex); |
| 82 | server.paths.set("/stream", onStream); |
| 83 | server.paths.set("/favicon.ico", onFavicon); |
| 84 | server.paths.setDefault(onFile); |
| 85 | } |
| 86 | |
| 87 | } // namespace |
| 88 |