@@ -10,6 +10,43 @@ | |||
"vector": "cpp", | |||
"string_view": "cpp", | |||
"memory": "cpp", | |||
"ranges": "cpp" | |||
"ranges": "cpp", | |||
"initializer_list": "cpp", | |||
"utility": "cpp", | |||
"atomic": "cpp", | |||
"bit": "cpp", | |||
"cctype": "cpp", | |||
"clocale": "cpp", | |||
"cmath": "cpp", | |||
"compare": "cpp", | |||
"concepts": "cpp", | |||
"cstdarg": "cpp", | |||
"cstddef": "cpp", | |||
"cstdint": "cpp", | |||
"cstdio": "cpp", | |||
"cstdlib": "cpp", | |||
"cstring": "cpp", | |||
"cwchar": "cpp", | |||
"cwctype": "cpp", | |||
"map": "cpp", | |||
"set": "cpp", | |||
"exception": "cpp", | |||
"algorithm": "cpp", | |||
"functional": "cpp", | |||
"iterator": "cpp", | |||
"memory_resource": "cpp", | |||
"numeric": "cpp", | |||
"optional": "cpp", | |||
"system_error": "cpp", | |||
"tuple": "cpp", | |||
"type_traits": "cpp", | |||
"iosfwd": "cpp", | |||
"limits": "cpp", | |||
"new": "cpp", | |||
"ostream": "cpp", | |||
"stdexcept": "cpp", | |||
"streambuf": "cpp", | |||
"cinttypes": "cpp", | |||
"typeinfo": "cpp" | |||
} | |||
} |
@@ -0,0 +1,59 @@ | |||
// filename: favicon.png.gz.h | |||
#define favicon_png_gz_len 554 | |||
const char favicon_png_gz[] = { | |||
0x1F, 0x8B, 0x08, 0x00, 0x6E, 0x48, 0xD3, 0x60, 0x02, 0xFF, | |||
0x01, 0x13, 0x02, 0xEC, 0xFD, 0x89, 0x50, 0x4E, 0x47, 0x0D, | |||
0x0A, 0x1A, 0x0A, 0x00, 0x00, 0x00, 0x0D, 0x49, 0x48, 0x44, | |||
0x52, 0x00, 0x00, 0x00, 0x10, 0x00, 0x00, 0x00, 0x10, 0x08, | |||
0x06, 0x00, 0x00, 0x00, 0x1F, 0xF3, 0xFF, 0x61, 0x00, 0x00, | |||
0x01, 0xDA, 0x49, 0x44, 0x41, 0x54, 0x38, 0x4F, 0x85, 0x93, | |||
0x4F, 0x68, 0x13, 0x41, 0x14, 0x87, 0xBF, 0xB7, 0xD9, 0xFC, | |||
0xB1, 0x0A, 0xD5, 0x56, 0x8A, 0x20, 0xA8, 0xA1, 0xBA, 0x49, | |||
0x05, 0x7B, 0x89, 0x20, 0xEA, 0x41, 0x04, 0x8F, 0xE2, 0x55, | |||
0x29, 0x78, 0xB3, 0x60, 0x0F, 0xA2, 0x07, 0x3D, 0x6E, 0x90, | |||
0xA4, 0x37, 0x3D, 0xE9, 0x41, 0xD4, 0xB3, 0x07, 0x3D, 0x79, | |||
0x15, 0xC1, 0x83, 0x60, 0x35, 0xC5, 0x4B, 0xD4, 0xA6, 0x26, | |||
0x39, 0x94, 0x1E, 0xA4, 0x20, 0x82, 0xB5, 0x75, 0xDB, 0x24, | |||
0xBB, 0x3B, 0x23, 0xBB, 0x21, 0xD5, 0xAE, 0x9B, 0x74, 0x4E, | |||
0x33, 0xEF, 0xFD, 0x7E, 0xDF, 0xCC, 0x7B, 0x33, 0x23, 0xC4, | |||
0x0C, 0xFD, 0x75, 0xF6, 0x24, 0xA2, 0xEF, 0x00, 0x67, 0x00, | |||
0x03, 0x98, 0x47, 0xEB, 0xFB, 0x92, 0x2F, 0xBE, 0x8B, 0xCA, | |||
0x25, 0x1A, 0xD0, 0xCD, 0xD2, 0x35, 0x94, 0x3C, 0x02, 0xCC, | |||
0x48, 0x4E, 0xA1, 0xB8, 0x25, 0x13, 0xF6, 0xC3, 0x7F, 0xE3, | |||
0xDB, 0x00, 0x7A, 0xB1, 0x54, 0xC0, 0x90, 0x0F, 0x31, 0xE6, | |||
0xAE, 0x47, 0xC4, 0x07, 0x75, 0x56, 0xAC, 0x62, 0xA5, 0x07, | |||
0xD9, 0x0E, 0x68, 0x94, 0x9F, 0xA1, 0x99, 0x8A, 0x2B, 0x6B, | |||
0x2B, 0xA6, 0x79, 0x2E, 0x79, 0xFB, 0x4A, 0x3F, 0x40, 0x03, | |||
0xCD, 0x31, 0xB4, 0x0B, 0xDE, 0x2F, 0x48, 0xEE, 0xEF, 0xEA, | |||
0xDC, 0x1F, 0x60, 0x0E, 0x83, 0x24, 0x41, 0x68, 0x8A, 0x65, | |||
0x5B, 0xF1, 0x80, 0x7A, 0xB9, 0x06, 0x4C, 0xA0, 0x15, 0x6C, | |||
0xD6, 0xC1, 0xDC, 0xDB, 0xD5, 0x79, 0xAB, 0xB0, 0x2B, 0x07, | |||
0x12, 0xF4, 0x93, 0x45, 0xC9, 0xD9, 0xC7, 0xFB, 0x01, 0x9E, | |||
0x00, 0xD3, 0x61, 0xB2, 0x07, 0x09, 0xE6, 0x7F, 0xCD, 0xC1, | |||
0x09, 0x1E, 0x8B, 0x65, 0x5F, 0x8F, 0x07, 0x34, 0xCB, 0xE3, | |||
0x28, 0x3E, 0x07, 0x96, 0x50, 0xD0, 0x59, 0x09, 0x3A, 0x07, | |||
0xA9, 0x03, 0x3D, 0xBD, 0x83, 0xE6, 0x84, 0xE4, 0xED, 0xA5, | |||
0x58, 0x40, 0xB8, 0x71, 0xA3, 0x74, 0x1B, 0x2D, 0xF7, 0x62, | |||
0x01, 0xA2, 0x6F, 0x8A, 0x55, 0x7C, 0xD0, 0xF7, 0x1A, 0x43, | |||
0x40, 0xF3, 0x46, 0x1A, 0x35, 0xF6, 0x0D, 0x18, 0x8D, 0x9C, | |||
0x60, 0x05, 0xCB, 0x3F, 0x24, 0x72, 0xD7, 0x1B, 0x08, 0x08, | |||
0x21, 0xF5, 0xF2, 0x6B, 0xE0, 0x42, 0x00, 0xD0, 0x18, 0xB4, | |||
0x93, 0x47, 0x71, 0x18, 0x99, 0x1F, 0xCD, 0x5D, 0x3D, 0x2D, | |||
0x22, 0x6A, 0x20, 0xE0, 0xA3, 0xD6, 0x49, 0xA7, 0x52, 0x79, | |||
0x6F, 0x26, 0xA4, 0x90, 0x49, 0x9B, 0x78, 0x64, 0xD8, 0x68, | |||
0x2B, 0x7C, 0xE5, 0xD7, 0xC6, 0xC7, 0x86, 0x0B, 0xD9, 0x6C, | |||
0xB6, 0x35, 0x10, 0xF0, 0x62, 0x61, 0x21, 0x95, 0xF9, 0xBE, | |||
0x3E, 0xF7, 0x7B, 0x63, 0xB3, 0xD0, 0xEE, 0xB8, 0x98, 0x66, | |||
0x82, 0x4C, 0x3A, 0xC5, 0x9E, 0xA1, 0xA1, 0x5A, 0xFE, 0xE0, | |||
0xC8, 0xCE, 0x80, 0x6A, 0xB5, 0xBA, 0x7B, 0xD5, 0x33, 0xBF, | |||
0x24, 0x0C, 0xE3, 0x48, 0xB0, 0x53, 0xAB, 0xD3, 0xA1, 0xD5, | |||
0x6A, 0xE3, 0x6B, 0xF5, 0xF6, 0xD2, 0xB9, 0x53, 0xE7, 0x77, | |||
0x2C, 0x21, 0x30, 0xBD, 0x7C, 0x33, 0x37, 0xD5, 0x6A, 0xBB, | |||
0xB3, 0x86, 0x48, 0x36, 0x7C, 0x88, 0x9E, 0xBF, 0xB4, 0xE6, | |||
0x38, 0x33, 0x33, 0x97, 0x2F, 0xBE, 0x8A, 0x3E, 0xF3, 0xFF, | |||
0x7E, 0x63, 0x4F, 0xF0, 0x69, 0x79, 0x79, 0x9F, 0xEB, 0xB8, | |||
0xD3, 0x41, 0xC7, 0xD2, 0x5E, 0xF2, 0xE9, 0xE4, 0xE4, 0xE1, | |||
0x9F, 0x51, 0x73, 0xB0, 0xFE, 0x03, 0xD7, 0x38, 0xAF, 0x11, | |||
0x77, 0x41, 0x94, 0x64, 0x00, 0x00, 0x00, 0x00, 0x49, 0x45, | |||
0x4E, 0x44, 0xAE, 0x42, 0x60, 0x82, 0xF3, 0x2E, 0x2C, 0x55, | |||
0x13, 0x02, 0x00, 0x00}; |
@@ -0,0 +1,42 @@ | |||
// filename: index.html.gz.h | |||
#define index_html_gz_len 388 | |||
const char index_html_gz[] = { | |||
0x1F, 0x8B, 0x08, 0x00, 0x6E, 0x48, 0xD3, 0x60, 0x02, 0xFF, | |||
0xC5, 0x53, 0x3D, 0x4F, 0xC3, 0x30, 0x10, 0xDD, 0x91, 0xF8, | |||
0x0F, 0x57, 0xEF, 0x69, 0x52, 0x86, 0x0A, 0x81, 0x93, 0x05, | |||
0x2A, 0x31, 0x20, 0x51, 0x89, 0x2E, 0x4C, 0xC8, 0x49, 0x2E, | |||
0xC9, 0x51, 0xC7, 0x8D, 0x6C, 0xF7, 0xF3, 0xD7, 0xE3, 0xDA, | |||
0x09, 0xB4, 0xC0, 0x82, 0x84, 0x84, 0x17, 0xBF, 0xBB, 0x67, | |||
0xBD, 0xE7, 0x73, 0x5E, 0xF8, 0xE8, 0xFE, 0xE9, 0x6E, 0xF1, | |||
0x32, 0x9F, 0x41, 0x63, 0x5B, 0x99, 0x5D, 0x5E, 0xF0, 0x7E, | |||
0x07, 0xE0, 0x0D, 0x8A, 0xD2, 0x23, 0x87, 0x2D, 0x59, 0x89, | |||
0xD9, 0xEC, 0x79, 0x7E, 0x7D, 0x35, 0x9D, 0xC2, 0x42, 0x63, | |||
0xD7, 0xA1, 0x92, 0x54, 0x34, 0x96, 0xC7, 0x81, 0xEB, 0x0F, | |||
0x8E, 0xA2, 0x08, 0x5A, 0x41, 0x0A, 0x8C, 0xDD, 0x4B, 0x04, | |||
0xD3, 0x20, 0x5A, 0x88, 0xA2, 0x81, 0x96, 0xA4, 0x96, 0xD0, | |||
0x68, 0xAC, 0x52, 0x16, 0x57, 0x62, 0x43, 0xC5, 0x4A, 0x8D, | |||
0x3B, 0x55, 0x33, 0xD0, 0x28, 0x53, 0x76, 0x2C, 0x19, 0xD8, | |||
0x7D, 0x87, 0x0E, 0xB7, 0xA2, 0xC6, 0xD8, 0x73, 0x86, 0x0E, | |||
0x68, 0x52, 0x36, 0x49, 0x76, 0x93, 0x84, 0xFD, 0xA4, 0xE4, | |||
0xBD, 0xC6, 0x85, 0x31, 0xBD, 0x8E, 0xAF, 0xBD, 0xF5, 0xA0, | |||
0x66, 0x71, 0x67, 0xE3, 0xE3, 0x81, 0x30, 0x5A, 0xFC, 0x31, | |||
0x9B, 0x2F, 0xF3, 0x55, 0xB9, 0x1F, 0x74, 0x4B, 0xDA, 0x40, | |||
0x21, 0x85, 0x71, 0x86, 0xCB, 0x55, 0x57, 0x1D, 0x90, 0x24, | |||
0xB2, 0xC0, 0x85, 0xE5, 0xC5, 0x83, 0x62, 0x24, 0x24, 0xD5, | |||
0xEA, 0x06, 0x0A, 0x54, 0x16, 0xF5, 0xED, 0x70, 0xB7, 0xB0, | |||
0x78, 0x9E, 0x9D, 0xBF, 0x53, 0x3E, 0x58, 0xC4, 0xCE, 0xC3, | |||
0xE1, 0xEF, 0x86, 0x6B, 0xCC, 0x51, 0x9B, 0xA2, 0xD1, 0x54, | |||
0xD9, 0x8F, 0x41, 0x83, 0x78, 0xF6, 0x80, 0xD2, 0x99, 0x2D, | |||
0x91, 0x9C, 0x52, 0xDF, 0x1A, 0xDC, 0x4E, 0x25, 0x8C, 0xA4, | |||
0x12, 0xF5, 0xE9, 0x4D, 0xB8, 0x14, 0x39, 0x4A, 0xA0, 0x32, | |||
0x65, 0x1E, 0xBD, 0x76, 0xDB, 0xF6, 0x8C, 0x8F, 0x7D, 0xFB, | |||
0xB4, 0x43, 0xAA, 0x5B, 0xDB, 0xFE, 0xE5, 0xB4, 0x50, 0x35, | |||
0xB2, 0x41, 0xDE, 0xA2, 0xB1, 0x1A, 0x6B, 0xE9, 0x2C, 0xA0, | |||
0x25, 0x95, 0xB2, 0xC4, 0xED, 0x62, 0x77, 0xFC, 0x38, 0xC9, | |||
0xA7, 0xE8, 0x30, 0xE1, 0x29, 0xE6, 0xB9, 0xCE, 0x7E, 0x37, | |||
0xF1, 0xA3, 0x58, 0x57, 0x35, 0x3A, 0x72, 0x4B, 0xAA, 0xFC, | |||
0x9B, 0xD1, 0xBF, 0xC8, 0xFD, 0xC3, 0x33, 0x1C, 0x71, 0x88, | |||
0xA0, 0x0F, 0x1D, 0x84, 0x18, 0x70, 0x53, 0x68, 0xEA, 0x2C, | |||
0x18, 0x5D, 0xB8, 0x38, 0x7B, 0xDF, 0xF1, 0x9B, 0x0B, 0x2B, | |||
0x8F, 0x03, 0xE1, 0xD3, 0xE2, 0x52, 0x1B, 0xFE, 0xCD, 0x77, | |||
0xB3, 0xBD, 0x0A, 0x24, 0xB5, 0x03, 0x00, 0x00}; |
@@ -0,0 +1,24 @@ | |||
// filename: input.js.gz.h | |||
#define input_js_gz_len 205 | |||
const char input_js_gz[] = { | |||
0x1F, 0x8B, 0x08, 0x00, 0x6E, 0x48, 0xD3, 0x60, 0x02, 0xFF, | |||
0x7D, 0xCF, 0x31, 0x0B, 0xC2, 0x30, 0x10, 0x05, 0xE0, 0x3D, | |||
0x90, 0xFF, 0x70, 0x38, 0xB5, 0x4B, 0x8B, 0xB3, 0xB8, 0x88, | |||
0x82, 0x82, 0x6E, 0x3A, 0xCB, 0xD1, 0x9C, 0x6D, 0x20, 0xBD, | |||
0x94, 0xF4, 0x52, 0x29, 0xE2, 0x7F, 0xB7, 0xB6, 0x75, 0x10, | |||
0xC4, 0xED, 0x86, 0xEF, 0xF1, 0xDE, 0x75, 0x18, 0xA0, 0x75, | |||
0xD6, 0x50, 0x80, 0x35, 0x18, 0x5F, 0xC4, 0x9A, 0x58, 0xB2, | |||
0x92, 0x64, 0xE7, 0xE8, 0x7D, 0x6E, 0xFA, 0x83, 0x49, 0x16, | |||
0x01, 0xB9, 0xA4, 0xE5, 0x22, 0x5D, 0x69, 0xD5, 0x0D, 0x01, | |||
0x1F, 0xA5, 0x89, 0xF2, 0x2F, 0xE0, 0xAE, 0xCD, 0xBD, 0x1E, | |||
0xFD, 0x64, 0x33, 0xCB, 0x4C, 0x61, 0x7F, 0x3E, 0x1D, 0x87, | |||
0xD4, 0xD4, 0x97, 0x75, 0xE8, 0x22, 0xAD, 0x20, 0xCF, 0x61, | |||
0x6B, 0xDB, 0xC6, 0x61, 0x0F, 0x52, 0x11, 0x18, 0xBA, 0x61, | |||
0x74, 0xF2, 0x19, 0x35, 0x22, 0xAD, 0xB4, 0x1A, 0xD8, 0xA5, | |||
0x31, 0x28, 0x34, 0xAA, 0x22, 0x86, 0x30, 0x94, 0x7D, 0x29, | |||
0x48, 0x08, 0x8B, 0x0A, 0xC4, 0xD6, 0x04, 0xBD, 0x8F, 0x60, | |||
0x02, 0x96, 0x23, 0x9E, 0x51, 0x85, 0x6C, 0x1C, 0xA5, 0x5A, | |||
0xCD, 0xFD, 0x9E, 0x2D, 0x4F, 0x6F, 0xDC, 0x22, 0x17, 0x62, | |||
0x3D, 0x27, 0x29, 0x3C, 0xB4, 0x02, 0xF8, 0xB1, 0x59, 0x2A, | |||
0xDB, 0xCE, 0x8B, 0xB5, 0x7A, 0xBE, 0x00, 0x11, 0xEE, 0x3B, | |||
0x97, 0x36, 0x01, 0x00, 0x00}; |
@@ -0,0 +1,116 @@ | |||
// filename: style.css.gz.h | |||
#define style_css_gz_len 1121 | |||
const char style_css_gz[] = { | |||
0x1F, 0x8B, 0x08, 0x00, 0x6E, 0x48, 0xD3, 0x60, 0x02, 0xFF, | |||
0xBD, 0x56, 0x4D, 0x6F, 0xDB, 0x46, 0x10, 0xBD, 0x1B, 0xF0, | |||
0x7F, 0x98, 0x26, 0x08, 0x60, 0xA5, 0xA2, 0x43, 0xC9, 0xB2, | |||
0xAD, 0xD0, 0xE8, 0xC1, 0x70, 0x93, 0xF8, 0xD0, 0x20, 0x40, | |||
0xED, 0x43, 0x81, 0xA2, 0x87, 0x25, 0x39, 0x14, 0x17, 0x5E, | |||
0x72, 0x89, 0xDD, 0xA5, 0x25, 0xD9, 0xF0, 0x7F, 0xEF, 0x7E, | |||
0x91, 0x22, 0x29, 0xCA, 0x2E, 0x0A, 0xB4, 0x26, 0x60, 0x48, | |||
0xB3, 0xF3, 0xF1, 0xDE, 0xEC, 0x9B, 0x11, 0x73, 0x55, 0x30, | |||
0x78, 0x3E, 0x3E, 0x02, 0xC8, 0x78, 0xA9, 0x02, 0x49, 0x9F, | |||
0x30, 0x82, 0xD9, 0x45, 0xB5, 0xB9, 0x6A, 0x6D, 0x19, 0x29, | |||
0x28, 0xDB, 0x46, 0x20, 0x49, 0x29, 0x03, 0x89, 0x82, 0x66, | |||
0x53, 0xB8, 0x16, 0x94, 0xB0, 0x29, 0xDC, 0x22, 0x7B, 0x44, | |||
0x45, 0x13, 0x62, 0xBD, 0x63, 0x92, 0x3C, 0xAC, 0x04, 0xAF, | |||
0xCB, 0x34, 0x48, 0x38, 0xE3, 0x22, 0x82, 0xF7, 0xE9, 0xC2, | |||
0x3C, 0xFA, 0xF4, 0xE5, 0xF8, 0xE8, 0xF8, 0xE8, 0x54, 0xF1, | |||
0x2A, 0x26, 0xC2, 0xD5, 0xAB, 0x48, 0x9A, 0xD2, 0x72, 0xA5, | |||
0xAB, 0x61, 0x71, 0x28, 0x7C, 0x96, 0x99, 0xE7, 0xCA, 0xC4, | |||
0x02, 0x78, 0xE3, 0x3A, 0xA7, 0x0A, 0xAF, 0x06, 0x88, 0x37, | |||
0x01, 0x23, 0x62, 0xE5, 0xCC, 0x0A, 0x37, 0x2A, 0x20, 0x8C, | |||
0xAE, 0xCA, 0x08, 0x12, 0x2C, 0x15, 0x8A, 0xB6, 0x7E, 0xA2, | |||
0x23, 0x04, 0x67, 0xA3, 0x00, 0x9C, 0x47, 0x8D, 0x31, 0x0A, | |||
0x99, 0xE4, 0x9A, 0xA5, 0x7A, 0xEE, 0x54, 0x7D, 0x9F, 0xD9, | |||
0xBF, 0x61, 0xDD, 0xF3, 0xD0, 0x77, 0x6A, 0x4D, 0x53, 0x95, | |||
0x47, 0xB0, 0x08, 0x3F, 0x1C, 0xE2, 0x72, 0x9E, 0x99, 0x67, | |||
0xD7, 0x0A, 0x94, 0x4A, 0xE0, 0x8A, 0xA1, 0xB0, 0x65, 0x82, | |||
0x35, 0xC6, 0x0F, 0x54, 0xE3, 0xAE, 0x2A, 0x24, 0x82, 0x94, | |||
0x89, 0x4E, 0x5E, 0xF2, 0xD2, 0x31, 0xCA, 0x91, 0xAE, 0x72, | |||
0x15, 0xC1, 0x7C, 0x50, 0xED, 0xF3, 0xD2, 0x57, 0xE3, 0x22, | |||
0x45, 0x11, 0x08, 0x92, 0xD2, 0x5A, 0x76, 0xDC, 0x78, 0xAD, | |||
0x18, 0x2D, 0x75, 0xA6, 0x98, 0x69, 0x3C, 0x07, 0x80, 0x89, | |||
0x55, 0x7C, 0x32, 0xBB, 0xBC, 0x98, 0xC2, 0x6C, 0xB9, 0x9C, | |||
0xC2, 0x7C, 0xBE, 0x9C, 0x38, 0x8C, 0x1D, 0x84, 0x51, 0xD4, | |||
0xC0, 0x93, 0x8C, 0x9A, 0x4A, 0x2A, 0xAF, 0x8B, 0xF8, 0x6D, | |||
0xDC, 0xA3, 0x46, 0x8F, 0xFD, 0xFC, 0xC3, 0x38, 0xB5, 0x01, | |||
0x97, 0x59, 0x6B, 0x1F, 0x07, 0x1E, 0x5E, 0x6A, 0xE0, 0xF3, | |||
0xB9, 0xFE, 0xF7, 0x79, 0x3E, 0xB1, 0x8E, 0x49, 0x2D, 0xA4, | |||
0x3E, 0xAE, 0x38, 0xDD, 0x5D, 0x3D, 0x2D, 0xAB, 0x5A, 0xFD, | |||
0xA9, 0xB6, 0x15, 0xFE, 0xA2, 0xE1, 0xAC, 0xF0, 0xAF, 0x7F, | |||
0xCB, 0xC8, 0xA1, 0x8B, 0xF6, 0x6E, 0x66, 0x16, 0x0E, 0xAE, | |||
0x66, 0x67, 0xD8, 0x01, 0x8F, 0x56, 0x9C, 0xA5, 0x58, 0x0A, | |||
0x9E, 0xDA, 0x83, 0x42, 0x2B, 0x96, 0x96, 0x81, 0x9E, 0x89, | |||
0x08, 0x82, 0xD9, 0xF9, 0x38, 0x7F, 0xFE, 0x13, 0x2D, 0x2A, | |||
0x2E, 0x14, 0x29, 0x95, 0x1D, 0x03, 0x27, 0x9E, 0x07, 0x5E, | |||
0x65, 0x4F, 0x48, 0x19, 0xF6, 0x24, 0xDA, 0x4E, 0xCB, 0xAB, | |||
0x12, 0xD5, 0xC8, 0x0E, 0x6A, 0x74, 0x99, 0x2E, 0xC9, 0x92, | |||
0x34, 0x85, 0xAA, 0x29, 0x30, 0x7A, 0x78, 0x39, 0x18, 0x69, | |||
0x05, 0xED, 0xFD, 0x39, 0x13, 0x2A, 0xDD, 0xF3, 0x40, 0x56, | |||
0x24, 0x71, 0x93, 0x65, 0x5D, 0x2D, 0xE6, 0xE3, 0xA3, 0x98, | |||
0xA7, 0x5B, 0x97, 0xCD, 0x31, 0x8F, 0x20, 0x04, 0x52, 0x2B, | |||
0xDE, 0x6D, 0xEC, 0xB0, 0xD3, 0x6D, 0x1F, 0xCE, 0x76, 0x79, | |||
0x8E, 0x8F, 0x3E, 0x7D, 0x84, 0xFB, 0x1C, 0x41, 0xAE, 0xA9, | |||
0x4A, 0x72, 0x08, 0x40, 0xE9, 0x2F, 0x31, 0xDF, 0x00, 0xB1, | |||
0x6C, 0xEC, 0x57, 0x77, 0xAD, 0xF0, 0xF1, 0x93, 0xEE, 0x96, | |||
0xF7, 0x73, 0x43, 0xCF, 0x25, 0x55, 0x94, 0xEB, 0xE2, 0x02, | |||
0x19, 0x51, 0xF4, 0xD1, 0x55, 0x4B, 0xA9, 0xAC, 0x18, 0xD1, | |||
0x4B, 0x8E, 0x96, 0x96, 0x56, 0xCC, 0xB8, 0x1F, 0x18, 0xDF, | |||
0xB5, 0x8B, 0xA6, 0x8B, 0x0D, 0xE1, 0xB3, 0xC5, 0x8E, 0x9B, | |||
0xC6, 0x73, 0xAB, 0xCB, 0x41, 0x8A, 0x19, 0xA9, 0x99, 0x82, | |||
0xDB, 0xFB, 0xEF, 0xBF, 0x41, 0x92, 0x63, 0xF2, 0x60, 0x50, | |||
0x75, 0x31, 0x58, 0x21, 0x3A, 0x24, 0xDC, 0x34, 0x49, 0xE9, | |||
0x92, 0x61, 0xB7, 0x4E, 0xD8, 0x2B, 0x12, 0x76, 0x2A, 0xDC, | |||
0x0F, 0x59, 0xB9, 0xCF, 0xCF, 0xFB, 0x57, 0xEB, 0x23, 0xBC, | |||
0x47, 0x14, 0x63, 0xC6, 0x05, 0x0E, 0xE9, 0x93, 0x58, 0x72, | |||
0x56, 0xFB, 0x4D, 0x6A, 0xF6, 0xA2, 0xDE, 0x94, 0x11, 0xBC, | |||
0x7B, 0xD7, 0x9F, 0xCA, 0x8B, 0xBE, 0x76, 0xDA, 0xEF, 0x0C, | |||
0x33, 0x7D, 0xBC, 0x68, 0x35, 0xAB, 0x14, 0x2F, 0x3A, 0xDF, | |||
0xF7, 0x94, 0xB5, 0x5B, 0xDA, 0xCD, 0x78, 0x29, 0x3D, 0x5A, | |||
0x0D, 0x96, 0xD3, 0x85, 0x74, 0x9B, 0x7B, 0xCF, 0xF6, 0x62, | |||
0xA8, 0xFA, 0xF9, 0x8D, 0x6C, 0x47, 0x31, 0x85, 0x9F, 0xA1, | |||
0x47, 0x7E, 0x44, 0xC7, 0xE1, 0xE2, 0xFA, 0xFA, 0xE2, 0xD7, | |||
0xA6, 0x15, 0x2E, 0x3A, 0xE3, 0x49, 0x2D, 0xF7, 0x62, 0xF9, | |||
0x26, 0x90, 0x39, 0x49, 0xF9, 0xDA, 0xA8, 0x31, 0x34, 0x82, | |||
0x1D, 0x8F, 0xDE, 0xAB, 0xDD, 0x6B, 0x6B, 0x8F, 0x94, 0x36, | |||
0xEB, 0x5E, 0xD8, 0x8F, 0x5A, 0x61, 0xF8, 0xC7, 0x89, 0xE9, | |||
0x9A, 0xDB, 0x4D, 0x41, 0x21, 0xDF, 0xF4, 0x79, 0xFD, 0xFC, | |||
0xC5, 0x6A, 0xE1, 0x77, 0xC3, 0x56, 0xA3, 0x71, 0x50, 0x64, | |||
0x57, 0x10, 0xA7, 0x6E, 0x06, 0x9E, 0xC7, 0x66, 0xA8, 0x95, | |||
0x6C, 0xCF, 0xB7, 0xC7, 0x64, 0x10, 0x72, 0xBE, 0x13, 0xD4, | |||
0x50, 0x84, 0x54, 0x49, 0x64, 0x99, 0x2B, 0x6D, 0x97, 0x6A, | |||
0xB7, 0xAF, 0x07, 0x97, 0x28, 0x80, 0xCE, 0xF2, 0xE3, 0x11, | |||
0x85, 0xE8, 0x0E, 0xCC, 0xCD, 0xDD, 0x1D, 0x48, 0xB5, 0x65, | |||
0xE8, 0xA8, 0xBC, 0xF1, 0xCB, 0xA1, 0x31, 0x99, 0x2C, 0x5F, | |||
0x6B, 0xC6, 0x02, 0x6B, 0xF3, 0x41, 0xBD, 0xD1, 0x34, 0x1E, | |||
0x77, 0x15, 0x26, 0x34, 0xA3, 0xBA, 0x51, 0xEE, 0xC8, 0xFB, | |||
0x8D, 0xB5, 0xC5, 0xB8, 0x5B, 0x16, 0xE0, 0xFA, 0x97, 0x70, | |||
0x51, 0x36, 0x9D, 0xED, 0xED, 0x70, 0xFD, 0x4E, 0x73, 0x66, | |||
0x1E, 0x1B, 0xF1, 0x4D, 0xE0, 0xB6, 0x73, 0xE8, 0xBD, 0xDB, | |||
0x9F, 0x5D, 0xC7, 0xD8, 0xDC, 0x17, 0x16, 0xFC, 0x11, 0x9B, | |||
0x83, 0xC6, 0xAD, 0x5D, 0x00, 0xA7, 0x97, 0x0E, 0x2E, 0x2A, | |||
0x77, 0xE5, 0x15, 0x11, 0x58, 0x26, 0x5B, 0x38, 0xD1, 0xF7, | |||
0x02, 0x05, 0xAF, 0x25, 0x06, 0x3A, 0x5C, 0x00, 0x66, 0x19, | |||
0x26, 0x4A, 0x02, 0x2F, 0x21, 0x37, 0x86, 0x89, 0xCF, 0x34, | |||
0x3A, 0x53, 0x73, 0x69, 0x93, 0x86, 0xA7, 0x73, 0x90, 0xA8, | |||
0x07, 0x3C, 0x95, 0x9D, 0xF9, 0x6A, 0x53, 0xF8, 0x0C, 0xDD, | |||
0x48, 0x8F, 0xCB, 0x66, 0xF0, 0xBF, 0x04, 0x3A, 0xCF, 0xF7, | |||
0x7D, 0x18, 0xC3, 0xAB, 0x8F, 0x5C, 0xC6, 0xFE, 0x76, 0x9B, | |||
0xB5, 0x77, 0xB5, 0x05, 0x99, 0xF3, 0xB5, 0x2D, 0xDD, 0xE1, | |||
0x64, 0x92, 0xBC, 0x0C, 0xB5, 0x95, 0x93, 0x32, 0x65, 0x08, | |||
0x27, 0xDA, 0xAB, 0x25, 0x07, 0x27, 0x37, 0xB9, 0xE0, 0x05, | |||
0x4E, 0xE1, 0x47, 0x85, 0x82, 0x4C, 0xE1, 0x8E, 0x64, 0x44, | |||
0xD0, 0x29, 0x7C, 0x49, 0x57, 0x38, 0x01, 0x1D, 0xA1, 0xC7, | |||
0x8B, 0x3F, 0x69, 0xBF, 0xAF, 0x54, 0x68, 0x45, 0x6F, 0x26, | |||
0xA0, 0x38, 0xF0, 0xA1, 0xD4, 0x18, 0xE7, 0x0F, 0x93, 0x7D, | |||
0xE8, 0xA3, 0xEF, 0x03, 0x6F, 0x69, 0x79, 0x4C, 0xCA, 0x26, | |||
0xFF, 0x3F, 0x10, 0xB1, 0xDD, 0xA4, 0xCD, 0xA5, 0x13, 0x90, | |||
0x4E, 0xA9, 0xC9, 0xA0, 0x01, 0x63, 0xEA, 0xDE, 0x45, 0xF6, | |||
0x5C, 0x5F, 0x53, 0x78, 0x33, 0x31, 0x76, 0x6D, 0xC0, 0x17, | |||
0x86, 0x85, 0x5E, 0xF6, 0x63, 0xD2, 0xF6, 0x9B, 0xCF, 0x4B, | |||
0x1B, 0xCB, 0x7D, 0x6D, 0xFB, 0xB7, 0x2B, 0x68, 0x5E, 0xAF, | |||
0x8C, 0xEB, 0x8D, 0xB5, 0xF5, 0x25, 0xF5, 0xB2, 0xD7, 0x5F, | |||
0x73, 0x37, 0xD6, 0xD2, 0xED, 0xED, 0xFF, 0xD3, 0x8D, 0xFF, | |||
0x8C, 0xE2, 0xDF, 0xDC, 0xC7, 0xFB, 0xE9, 0x3E, 0x0D, 0x00, | |||
0x00}; |
@@ -28,8 +28,8 @@ def convert_to_gzip(src, out, f): | |||
f_out.write(top.encode(encoding='utf-8')) | |||
src='include/http/' | |||
out='include/' | |||
src='data/' | |||
out='compress/' | |||
for f in os.listdir(src): | |||
convert_to_gzip(src, out, f) |
@@ -0,0 +1,38 @@ | |||
<!DOCTYPE html> | |||
<html> | |||
<head> | |||
<title>ESP8266 Treppenlicht</title> | |||
<!-- main style sheet --> | |||
<link href="/favicon.png" rel="icon" type="image/png" sizes="10x10"> | |||
<link href="/style.css" rel="stylesheet" type="text/css"> | |||
</head> | |||
<body> | |||
<div class="kopfzeile" | |||
style="text-align: center;"> | |||
<b>Treppenlicht</b> | |||
</div> | |||
<div class="ueberschrift"> | |||
<center>Helligkeit</center> | |||
<div class="slider"> | |||
<label id="label_pwm"> | |||
</label> | |||
<input type="range" class="testregler" min="0" max="100"> | |||
</div> | |||
</div> | |||
<br> | |||
<div class="ueberschrift"> | |||
<center>Laufgeschwindigkeit</center> | |||
<div class="slider"> | |||
<label id="label_geschwindigkeit"> | |||
</label> | |||
<input type="range" class="testregler" min="0" max="100"> | |||
</div> | |||
</div> | |||
</body> | |||
<script src="/input.js"></script> | |||
</html> |
@@ -1,7 +1,7 @@ | |||
html { | |||
font-size: 10px; | |||
font-size: 16px; | |||
font-family: sans-serif, Arial, Helvetica; | |||
background-color: #b3b3b3; | |||
background-color: #d4d4d4; | |||
} | |||
.topbar { | |||
@@ -17,6 +17,48 @@ html { | |||
padding: 1em; | |||
} | |||
.ueberschrift{ | |||
color: #ffffff; | |||
font-size: 50px; | |||
width: 40%; | |||
background-color: #5f5f5f; | |||
} | |||
.testregler{ | |||
-webkit-appearance: none; | |||
height: 20px; | |||
width: 98%; | |||
border-radius: 20px; | |||
outline: black; | |||
background-color: rgb(176, 188, 228); | |||
} | |||
.testregler::-webkit-slider-thumb{ | |||
-webkit-appearance: none; | |||
appearance: none; | |||
width: 5%; | |||
height: 20px; | |||
border-radius: 10px; | |||
background-color: rgb(107, 122, 192); | |||
cursor:pointer; | |||
} | |||
input[type=range]::-webkit-slider-thumb{ | |||
-webkit-appearance: none; | |||
border:none; | |||
height: 100px; | |||
width: 100px; | |||
background:goldenrod; | |||
margin-top: -15px; | |||
border-radius: o!important; | |||
} | |||
.kopfzeile{ | |||
color: #1f1f1f; | |||
font-size: 50px; | |||
width: 100%; | |||
background-color: #8d8a8a; | |||
} | |||
p, li { | |||
font-size: 16px; | |||
line-height: 2; | |||
@@ -26,7 +68,7 @@ p, li { | |||
body { | |||
margin: 0 auto; | |||
border: 1px solid black; | |||
border: none; | |||
border-radius: 3; | |||
} | |||
@@ -49,18 +91,10 @@ body { | |||
/* The slider */ | |||
.slider { | |||
position: absolute; | |||
cursor: pointer; | |||
top: 0; | |||
left: 0; | |||
right: 0; | |||
bottom: 0; | |||
background-color: #ccc; | |||
-webkit-transition: .4s; | |||
transition: .4s; | |||
width: 100%; | |||
} | |||
.slider:before { | |||
/*.slider:before { | |||
position: absolute; | |||
content: ""; | |||
height: 26px; | |||
@@ -70,7 +104,7 @@ body { | |||
background-color: white; | |||
-webkit-transition: .4s; | |||
transition: .4s; | |||
} | |||
}*/ | |||
input:checked + .slider { | |||
background-color: #04AA6D; | |||
@@ -94,8 +128,6 @@ input:checked + .slider:before { | |||
} | |||
/* The slider itself */ | |||
.rangeslider { | |||
-webkit-appearance: none; /* Override default CSS styles */ |
@@ -22,4 +22,42 @@ GDB-Version aus Arduino Toolchain hat Support | |||
```sh | |||
$ ./start_xtensa_gdb_stub.sh | |||
``` | |||
``` | |||
### __Achtung !__ | |||
Don`t forget __\r__ | |||
ESP-OTA wird von ufw oder Defender geblockt. | |||
- Windows -> Python needs to be granted with rights | |||
- Linux -> open udp port in ufw -> | |||
```sh | |||
platform.ini | |||
upload_flags = | |||
--host-port <PORT> | |||
... | |||
$ sudo ufw allow tcp/<PORT> | |||
``` | |||
```c++ | |||
server.streamFile(f, mime::getContentType(SRH::_path), requestMethod); | |||
=====> | |||
const String& p = SRH::_path; | |||
if(p.endsWith(".gzip")) { | |||
server.sendHeader("Content-Encoding", "gzip"); | |||
server.streamFile(f, mime::getContentType(p.substring(0, p.length()-5)), requestMethod); | |||
} | |||
else | |||
server.streamFile(f, mime::getContentType(SRH::_path), requestMethod); | |||
``` | |||
Webserver on v0.3.0 now working with LittleFS | |||
TODO: | |||
- check dir for files automatic | |||
- move handleNotFound to httpserver.h | |||
- maybe compress files ? | |||
@@ -0,0 +1,16 @@ | |||
#ifndef __FILESYS_H | |||
#define __FILESYS_H | |||
#include <LittleFS.h> | |||
bool mount_fs(); | |||
bool format_fs(); | |||
void ls(const char * dirname); | |||
void readFile(const char * path); | |||
void writeFile(const char * path, const char * message); | |||
void appendFile(const char * path, const char * message); | |||
void renameFile(const char * path1, const char * path2); | |||
void deleteFile(const char * path); | |||
#endif // __FILESYS_H |
@@ -1,40 +0,0 @@ | |||
<!DOCTYPE html> | |||
<html> | |||
<head> | |||
<title>ESP8266 Treppenlicht</title> | |||
<!-- main style sheet --> | |||
<link href="/favicon.png" rel="icon" type="image/png" sizes="16x16"> | |||
<link href="/style.css" rel="stylesheet" type="text/css"> | |||
</head> | |||
<body> | |||
<div class="topbar"> | |||
ESP8266 Treppenlicht Controller | |||
</div> | |||
<div class="control"> | |||
<div class="brightness"> | |||
</div> | |||
<div class="onoff"> | |||
toggle all | |||
<label id="l_onoff"></label> | |||
<label class="switch"> | |||
<input type="checkbox"> | |||
<span class="slider round"></span> | |||
</label> | |||
</div> | |||
<div class="pwm"> | |||
<label id="label_pwm"></label> | |||
<input type="range" min="1" max="100" value="50" class="rangeslider" id="range1"> | |||
</div> | |||
<div class="timer"> | |||
<label id="label_timer"></label> | |||
<input type="range" min="1" max="100" value="50" class="rangeslider" id="timer_range"> | |||
</div> | |||
</div> | |||
</body> | |||
<script src="/input.js"></script> | |||
</html> |
@@ -1,37 +1,48 @@ | |||
#ifndef __HTTPSERVER_H | |||
#define __HTTPSERVER_H | |||
#include "filesys.h" | |||
#include <ESP8266WebServer.h> | |||
class HTTPServer { | |||
private: | |||
int port; | |||
ESP8266WebServer* server; | |||
public: | |||
HTTPServer(int port) { | |||
server = new ESP8266WebServer; | |||
// server->on("/", handleRootGz); | |||
// server->on("/style.css", handleCssGz); | |||
// server->on("/favicon.png", handleFaviconGz); | |||
// server->onNotFound(handleNotFound); | |||
server->begin(port); | |||
class HTTPServer : public ESP8266WebServer { | |||
private: | |||
const char* rootDir; | |||
bool addRootFileHandler(); | |||
bool formatFS() { | |||
return format_fs(); | |||
} | |||
~HTTPServer() { | |||
server->stop(); | |||
delete server; | |||
void listRoot() { | |||
ls(rootDir); | |||
} | |||
void initialize() { | |||
server->begin(port); | |||
public: | |||
HTTPServer(const int _port, const char* _rootDir) : | |||
ESP8266WebServer(_port), rootDir(_rootDir) | |||
{ } | |||
~HTTPServer() | |||
{ | |||
Serial.printf("[HTTPServer] shut down ...\n\r"); | |||
} | |||
void handleClient() { | |||
server->handleClient(); | |||
bool start() { | |||
if(!mount_fs()) | |||
return false; | |||
Serial.printf("[HTTPServer] LittleFS mounted !\n\r"); | |||
Serial.printf("[HTTPServer] root:\n\r"); | |||
this->listRoot(); | |||
Serial.printf("\n\r"); | |||
if( this->addRootFileHandler() ){ | |||
this->begin(); | |||
Serial.printf("[HTTPServer] Server active on Port 80 !\n\r"); | |||
return true; | |||
} | |||
Serial.printf("[HTTPServer] Not starting Server, something went wrong !\n\r"); | |||
return false; | |||
} | |||
}; | |||
#endif // __HTTPSERVER_H |
@@ -0,0 +1,48 @@ | |||
#ifndef __OTA_H | |||
#define __OTA_H | |||
void ota_setup() { | |||
ArduinoOTA.setPort(8266); | |||
ArduinoOTA.setHostname("ESP_Treppenlicht"); | |||
ArduinoOTA.setPassword("admin"); | |||
// Password can be set with it's md5 value as well | |||
// MD5(admin) = 21232f297a57a5a743894a0e4a801fc3 | |||
// ArduinoOTA.setPasswordHash("21232f297a57a5a743894a0e4a801fc3"); | |||
ArduinoOTA.onStart([]() { | |||
String type; | |||
if (ArduinoOTA.getCommand() == U_FLASH) { | |||
type = "sketch"; | |||
} else { // U_FS | |||
type = "filesystem"; | |||
} | |||
// NOTE: if updating FS this would be the place to unmount FS using FS.end() | |||
Serial.println("Start updating " + type); | |||
}); | |||
ArduinoOTA.onEnd([]() { | |||
Serial.println("\nEnd"); | |||
}); | |||
ArduinoOTA.onProgress([](unsigned int progress, unsigned int total) { | |||
Serial.printf("Progress: %u%%\r", (progress / (total / 100))); | |||
}); | |||
ArduinoOTA.onError([](ota_error_t error) { | |||
Serial.printf("Error[%u]: ", error); | |||
if (error == OTA_AUTH_ERROR) { | |||
Serial.println("Auth Failed"); | |||
} else if (error == OTA_BEGIN_ERROR) { | |||
Serial.println("Begin Failed"); | |||
} else if (error == OTA_CONNECT_ERROR) { | |||
Serial.println("Connect Failed"); | |||
} else if (error == OTA_RECEIVE_ERROR) { | |||
Serial.println("Receive Failed"); | |||
} else if (error == OTA_END_ERROR) { | |||
Serial.println("End Failed"); | |||
} | |||
}); | |||
ArduinoOTA.begin(); | |||
} | |||
#endif // __OTA_H |
@@ -0,0 +1,130 @@ | |||
#include "filesys.h" | |||
// listDir("/"); | |||
// deleteFile("/hello.txt"); | |||
// writeFile("/hello.txt", "Hello "); | |||
// appendFile("/hello.txt", "World!\n\r"); | |||
// readFile("/hello.txt"); | |||
// listDir("/"); | |||
FSInfo fsinfo; | |||
bool mount_fs() { | |||
if(!LittleFS.begin()) { | |||
Serial.println("[ERROR] LittleFS.info(), reset ..."); | |||
return false; | |||
} | |||
if(!LittleFS.info(fsinfo)) { | |||
Serial.println("[ERROR] LittleFS.info(), reset ..."); | |||
return false; | |||
} | |||
printf("Filesystem opened:\n\r"); | |||
printf("\ttotalBytes:\t%d\n\r", fsinfo.totalBytes); | |||
printf("\tusedBytes:\t%d\n\r", fsinfo.usedBytes); | |||
printf("\tblockSize:\t%d\n\r", fsinfo.blockSize); | |||
printf("\tpageSize:\t%d\n\r", fsinfo.pageSize); | |||
printf("\tmaxOpenFiles:\t%d\n\r", fsinfo.maxOpenFiles); | |||
printf("\tmaxPathLength:\t%d\n\r", fsinfo.maxPathLength); | |||
printf("\n\r"); | |||
return true; | |||
} | |||
bool format_fs() { | |||
printf("Formatting FS ! \n\r"); | |||
return LittleFS.format(); | |||
} | |||
void ls(const char * dirname) { | |||
Serial.printf("ls -l %s\n\r", dirname); | |||
Dir root = LittleFS.openDir(dirname); | |||
while (root.next()) { | |||
File file = root.openFile("r"); | |||
time_t lw = file.getLastWrite(); | |||
struct tm * tmstruct = localtime(&lw); | |||
Serial.printf("%8d %02d %02d %02d:%02d %s\n\r", | |||
file.size(), | |||
tmstruct->tm_mon + 1, | |||
tmstruct->tm_mday, | |||
tmstruct->tm_hour, | |||
tmstruct->tm_min, | |||
root.fileName().c_str()); | |||
file.close(); | |||
} | |||
Serial.println(); | |||
} | |||
void readFile(const char * path) { | |||
Serial.printf("Reading file: %s\n\r", path); | |||
File file = LittleFS.open(path, "r"); | |||
if (!file) { | |||
Serial.println("Failed to open file for reading"); | |||
return; | |||
} | |||
Serial.print("Read from file: "); | |||
while (file.available()) { | |||
Serial.write(file.read()); | |||
} | |||
file.close(); | |||
} | |||
void writeFile(const char * path, const char * message) { | |||
Serial.printf("Writing file: %s\n\r", path); | |||
File file = LittleFS.open(path, "w"); | |||
if (!file) { | |||
Serial.println("Failed to open file for writing"); | |||
return; | |||
} | |||
if (file.print(message)) { | |||
Serial.println("File written"); | |||
} else { | |||
Serial.println("Write failed"); | |||
} | |||
delay(2000); // Make sure the CREATE and LASTWRITE times are different | |||
file.close(); | |||
} | |||
void appendFile(const char * path, const char * message) { | |||
Serial.printf("Appending to file: %s\n\r", path); | |||
File file = LittleFS.open(path, "a"); | |||
if (!file) { | |||
Serial.println("Failed to open file for appending"); | |||
return; | |||
} | |||
if(file.print(message)) { | |||
Serial.println("Message appended"); | |||
} else { | |||
Serial.println("Append failed"); | |||
} | |||
file.close(); | |||
} | |||
void renameFile(const char * path1, const char * path2) { | |||
Serial.printf("Renaming file %s to %s\n\r", path1, path2); | |||
if (LittleFS.rename(path1, path2)) { | |||
Serial.println("File renamed"); | |||
} else { | |||
Serial.println("Rename failed"); | |||
} | |||
} | |||
void deleteFile(const char * path) { | |||
Serial.printf("Deleting file: %s\n\r", path); | |||
if (LittleFS.remove(path)) { | |||
Serial.println("File deleted"); | |||
} else { | |||
Serial.println("Delete failed"); | |||
} | |||
} | |||
@@ -0,0 +1,17 @@ | |||
#include "httpserver.h" | |||
bool HTTPServer::addRootFileHandler() { | |||
// //experimental, see doku.md | |||
// server.serveStatic("/compressed", LittleFS, "/compressed.html.gzip"); | |||
this->serveStatic("", LittleFS, "/index.html"); | |||
this->serveStatic("/", LittleFS, "/index.html"); | |||
this->serveStatic("/#", LittleFS, "/index.html"); | |||
this->serveStatic("/style.css", LittleFS, "/style.css"); | |||
this->serveStatic("/input.js", LittleFS, "/input.js"); | |||
this->serveStatic("/favicon.png", LittleFS, "/favicon.png"); | |||
return true; | |||
} |
@@ -1,25 +1,38 @@ | |||
#include <Arduino.h> | |||
// debugging support via GDBStub over UART | |||
#ifdef WITH_DEBUGGING_ON | |||
#include <GDBStub.h> | |||
#include <GDBStub.h> // debugging support via GDBStub over UART | |||
#endif | |||
#include "PCA9685.h" | |||
extern "C" { | |||
#include "user_interface.h" | |||
extern "C" { | |||
#include "user_interface.h" | |||
} | |||
// OTA & WEB | |||
#include <ESP8266WiFi.h> | |||
#include <WiFiUdp.h> | |||
#include <ArduinoOTA.h> | |||
#include "ota.h" | |||
#include "wifi_credentials.h" | |||
#include "httpserver.h" | |||
// BOARD | |||
#define ESP12_LED 2 | |||
#define NODEMCU_LED 16 | |||
// PWM | |||
os_timer_t timer1; | |||
uint8_t timer_flag = 0; | |||
PCA9685 pwmController; | |||
os_timer_t Timer1; // Verwaltungsstruktur des Timers | |||
void setup_pwm_pca9685(); | |||
int c; | |||
bool toggle = false; | |||
uint32_t m=0; | |||
// WIFI | |||
const char* ssid = STASSID; | |||
const char* password = STAPSK; | |||
// PWM | |||
uint32_t dimmtimer = 0; | |||
uint16_t time_per_stair = 500; // global parameter: dimmtime per stair [ms] | |||
uint8_t direction = 1; | |||
@@ -40,138 +53,28 @@ void timerCallback(void *pArg) | |||
// m = micros(); | |||
} | |||
// OTA & WEB | |||
#include "wifi_credentials.h" | |||
#include <ESP8266WiFi.h> | |||
#include <WiFiUdp.h> | |||
#include <ArduinoOTA.h> | |||
#include <ESP8266WebServer.h> | |||
#include <WiFiClient.h> | |||
#include "index.html.gz.h" | |||
#include "style.css.gz.h" | |||
#include "favicon.png.gz.h" | |||
// images are possible | |||
// maybe check out FS <- SPIFFS | |||
const char* ssid = STASSID; | |||
const char* password = STAPSK; | |||
void setup_webserver(); | |||
void setup_ota(); | |||
void setup_pwm_pca9685(); | |||
void handleRootGz(); | |||
void handleCssGz(); | |||
// HTTP | |||
void handleNotFound(); | |||
HTTPServer httpServer(80, "/"); | |||
const int led = 13; | |||
ESP8266WebServer server(80); | |||
PCA9685 pwmController; | |||
// =============================================== | |||
void handleRootGz() { | |||
const char* dataType = "text/html"; | |||
server.sendHeader(F("Content-Encoding"), F("gzip")); | |||
server.send(200, dataType, (const char*)index_html_gz, index_html_gz_len); | |||
} | |||
void handleCssGz() { | |||
const char* dataType = "text/css"; | |||
server.sendHeader(F("Content-Encoding"), F("gzip")); | |||
server.send(200, dataType, (const char*)style_css_gz, style_css_gz_len); | |||
} | |||
void handleFaviconGz() { | |||
const char* dataType = "image/png"; | |||
server.sendHeader(F("Content-Encoding"), F("gzip")); | |||
server.send(200, dataType, (const char*)favicon_png_gz, favicon_png_gz_len); | |||
} | |||
void handleNotFound() { | |||
digitalWrite(led, 1); | |||
String message = "File Not Found\n\n"; | |||
message += "URI: "; | |||
message += server.uri(); | |||
message += httpServer.uri(); | |||
message += "\nMethod: "; | |||
message += (server.method() == HTTP_GET) ? "GET" : "POST"; | |||
message += (httpServer.method() == HTTP_GET) ? "GET" : "POST"; | |||
message += "\nArguments: "; | |||
message += server.args(); | |||
message += httpServer.args(); | |||
message += "\n"; | |||
for (uint8_t i = 0; i < server.args(); i++) { | |||
message += " " + server.argName(i) + ": " + server.arg(i) + "\n"; | |||
for (uint8_t i = 0; i < httpServer.args(); i++) { | |||
message += " " + httpServer.argName(i) + ": " + httpServer.arg(i) + "\n"; | |||
} | |||
server.send(404, "text/plain", message); | |||
digitalWrite(led, 0); | |||
} | |||
void setup_webserver() { | |||
pinMode(led, OUTPUT); | |||
digitalWrite(led, 0); | |||
Serial.println(""); | |||
// Wait for connection | |||
while (WiFi.status() != WL_CONNECTED) { | |||
delay(500); | |||
Serial.print("."); | |||
} | |||
Serial.println(""); | |||
Serial.print("Connected to "); | |||
Serial.println(ssid); | |||
Serial.print("IP address: "); | |||
Serial.println(WiFi.localIP()); | |||
server.on("/", handleRootGz); | |||
server.on("/style.css", handleCssGz); | |||
server.on("/favicon.png", handleFaviconGz); | |||
server.onNotFound(handleNotFound); | |||
server.begin(); | |||
Serial.println("HTTP server started"); | |||
} | |||
void setup_ota() { | |||
ArduinoOTA.setPort(8266); | |||
ArduinoOTA.setHostname("ESP_Treppenlicht"); | |||
ArduinoOTA.setPassword("admin"); | |||
// Password can be set with it's md5 value as well | |||
// MD5(admin) = 21232f297a57a5a743894a0e4a801fc3 | |||
// ArduinoOTA.setPasswordHash("21232f297a57a5a743894a0e4a801fc3"); | |||
ArduinoOTA.onStart([]() { | |||
String type; | |||
if (ArduinoOTA.getCommand() == U_FLASH) { | |||
type = "sketch"; | |||
} else { // U_FS | |||
type = "filesystem"; | |||
} | |||
// NOTE: if updating FS this would be the place to unmount FS using FS.end() | |||
Serial.println("Start updating " + type); | |||
}); | |||
ArduinoOTA.onEnd([]() { | |||
Serial.println("\nEnd"); | |||
}); | |||
ArduinoOTA.onProgress([](unsigned int progress, unsigned int total) { | |||
Serial.printf("Progress: %u%%\r", (progress / (total / 100))); | |||
}); | |||
ArduinoOTA.onError([](ota_error_t error) { | |||
Serial.printf("Error[%u]: ", error); | |||
if (error == OTA_AUTH_ERROR) { | |||
Serial.println("Auth Failed"); | |||
} else if (error == OTA_BEGIN_ERROR) { | |||
Serial.println("Begin Failed"); | |||
} else if (error == OTA_CONNECT_ERROR) { | |||
Serial.println("Connect Failed"); | |||
} else if (error == OTA_RECEIVE_ERROR) { | |||
Serial.println("Receive Failed"); | |||
} else if (error == OTA_END_ERROR) { | |||
Serial.println("End Failed"); | |||
} | |||
}); | |||
ArduinoOTA.begin(); | |||
httpServer.send(404, "text/plain", message); | |||
} | |||
void setup_pwm_pca9685() { | |||
@@ -183,6 +86,7 @@ void setup_pwm_pca9685() { | |||
Serial.println(pwmController.getChannelPWM(0)); // Should output 2048, which is 128 << 4 | |||
} | |||
void setup() { | |||
#ifdef WITH_DEBUGGING_ON | |||
Serial.begin(460800); | |||
@@ -208,17 +112,27 @@ void setup() { | |||
ESP.restart(); | |||
} | |||
os_timer_setfn(&Timer1, timerCallback, &c); | |||
os_timer_arm(&Timer1, 20, true); | |||
Serial.println(""); | |||
Serial.print("Connected to "); | |||
Serial.println(ssid); | |||
Serial.print("IP address: "); | |||
Serial.println(WiFi.localIP()); | |||
os_timer_setfn(&timer1, timerCallback, &timer_flag); | |||
os_timer_arm(&timer1, 20, true); | |||
Serial.println("Ready"); | |||
Serial.print("IP address: "); | |||
Serial.println(WiFi.localIP()); | |||
setup_ota(); | |||
setup_webserver(); | |||
ota_setup(); | |||
httpServer.start(); | |||
httpServer.onNotFound(handleNotFound); | |||
Serial.println("HTTP server started !"); | |||
setup_pwm_pca9685(); | |||
Serial.println("PCA9685 connected !"); | |||
} | |||
uint32_t t; | |||
@@ -319,6 +233,9 @@ void ledsequence(uint8_t direction, uint8_t onoff){ | |||
} | |||
} | |||
uint32_t _t=0; | |||
#define SP_US(_str,_a) Serial.print(_str); Serial.print(" took: "); Serial.print(_a); Serial.println("us") | |||
#define TIMEIF_US(_f, _l, _str) _t=micros(); _f; _t=micros()-_t; if(_t > _l) { SP_US(_str, _t); } | |||
void loop() { | |||
@@ -326,10 +243,9 @@ void loop() { | |||
if(millis() > 25000 && onoff == 1 && direction == 1) onoff = 0; | |||
if(millis() > 45000 && direction == 1){ | |||
onoff = 1; | |||
direction = 0; | |||
direction = 0; | |||
} | |||
TIMEIF_US(ArduinoOTA.handle(), 1000, "OTA"); | |||
TIMEIF_US(httpServer.handleClient(), 1000, "HTTP"); | |||
TIMEIF_US("OTA", ArduinoOTA.handle(), 1000); | |||
TIMEIF_US("HTTP", server.handleClient(), 1000); | |||
} |
@@ -12,23 +12,29 @@ | |||
platform = espressif8266 | |||
board = nodemcuv2 | |||
framework = arduino | |||
; for http files | |||
board_build.filesystem = littlefs | |||
board_build.ldscript = eagle.flash.4m1m.ld | |||
extra_scripts = pre:create_gz_files.py | |||
monitor_speed = 115200 | |||
extra_scripts = pre:extra_script.py | |||
[env:serial] | |||
upload_protocol = esptool | |||
upload_speed = 921600 | |||
[env:ota] | |||
; stuff for OTA | |||
; https://docs.platformio.org/en/latest/platforms/espressif8266.html#over-the-air-ota-update | |||
; OTA => https://docs.platformio.org/en/latest/platforms/espressif8266.html#over-the-air-ota-update | |||
upload_protocol = espota | |||
upload_port = <!! IP ADDRESS !!> | |||
upload_flags = | |||
--port=8266 | |||
--host_port=<!! PORT !!> | |||
--auth=admin | |||
[env:debug] | |||
; look at doku.md | |||
build_flags = -DWITH_DEBUGGING_ON -Os -g3 -ggdb3 | |||
upload_protocol = esptool | |||
upload_speed = 921600 |
@@ -1,2 +1,2 @@ | |||
CD .\include\http | |||
CD .\data | |||
py.exe -m http.server |
@@ -1,2 +1,2 @@ | |||
cd include/http | |||
cd data | |||
python3 -m http.server |