From 9eb69ac3297cc21eaf64f22101f5171f138f5343 Mon Sep 17 00:00:00 2001 From: jedi Date: Mon, 19 Jul 2021 23:58:00 +0200 Subject: [PATCH] stash --- firmware/constcat.h | 65 +++++++++++++ firmware/fsdata/fs/index.html | 171 ++++++++++++++++++++++++++++++++++ firmware/web.cpp | 85 +++++++++++++++++ 3 files changed, 321 insertions(+) create mode 100644 firmware/constcat.h diff --git a/firmware/constcat.h b/firmware/constcat.h new file mode 100644 index 0000000..b111512 --- /dev/null +++ b/firmware/constcat.h @@ -0,0 +1,65 @@ +// +// Created by jedi on 23.07.21. +// + +#ifdef __cplusplus + +template +using size=std::integral_constant; + +template +constexpr size length( T const(&)[N] ) { return {}; } +template +constexpr size length( std::array const& ) { return {}; } + +template +using length_t = decltype(length(std::declval())); + +constexpr size_t string_size() { return 0; } +template +constexpr size_t string_size( size_t i, Ts... ts ) { +return (i?i-1:0) + string_size(ts...); +} +template +using string_length=size< string_size( length_t{}... )>; + +template +using combined_string = std::array{}+1>; + +template +constexpr const combined_string +concat_impl( Lhs const& lhs, Rhs const& rhs, seq, seq) +{ +// the '\0' adds to symmetry: +return {{ lhs[I1]..., rhs[I2]..., '\0' }}; +} + +template +constexpr const combined_string +concat(Lhs const& lhs, Rhs const& rhs) +{ +return concat_impl( + lhs, rhs, + gen_seq{}>{}, +gen_seq{}>{} +); +} + +template +constexpr const combined_string +concat(T0 const&t0, T1 const&t1, Ts const&...ts) +{ +return concat(t0, concat(t1, ts...)); +} + +template +constexpr const combined_string +concat(T const&t) { +return concat(t, ""); +} +constexpr const combined_string<> +concat() { + return concat(""); +} + +#endif \ No newline at end of file diff --git a/firmware/fsdata/fs/index.html b/firmware/fsdata/fs/index.html index 8ceefa7..ead57e6 100644 --- a/firmware/fsdata/fs/index.html +++ b/firmware/fsdata/fs/index.html @@ -16,6 +16,8 @@ @@ -58,6 +60,125 @@ +
+

I/O

+
+
+

Protocols

+
+
+
+ + +
+
+ + +
+
+
+
+
+

Station Mode current connection

+
+
+
+ + + +
+
+ + + +
+
+ + + +
+
+ + + +
+
+ + + +
+
+ + +
+
+
+
+
+

Wifi Settings

+
+
+

AP Mode

+
+
+
+ + +
+
+ + +
+
+ + +
+
+ AP IP + N/A +
+
+ AP MAC + N/A +
+
+ + +
+
+
+
+
+

Station Mode current connection

+
+
+
+ + +
+
+ + +
+
+ + +
+
+ Sation IP + N/A +
+
+ Station MAC + N/A +
+
+ + +
+
+
+

Status

@@ -158,6 +279,16 @@

I/O

+
+
+ Channel 1-6 + SPI Dimmer +
+
+ Channel 7-127 + WS2812 via I2S +
+