From 4533d7c27538571cc72fc7450359e4565a6b7e10 Mon Sep 17 00:00:00 2001 From: Guo-Rong <5484552+gkoh@users.noreply.github.com> Date: Tue, 27 Aug 2024 17:30:59 +0930 Subject: [PATCH] Use runtime board detection to set screen parameters. Move the compile parameters for various UI elements to runtime detection. Remove the M5StickC firmware variants, now there is only one M5StickC firmware for all hardware variants. --- .github/workflows/main.yml | 1 - .github/workflows/release.yml | 1 - README.md | 4 +- lib/M5ez/src/M5ez.cpp | 140 +++++++++++++++++++++--------- lib/M5ez/src/M5ez.h | 79 ++++++----------- lib/M5ez/src/themes/dark.h | 48 ---------- lib/M5ez/src/themes/mono_furble.h | 40 --------- platformio.ini | 6 +- web-installer/index.html | 9 +- 9 files changed, 131 insertions(+), 197 deletions(-) diff --git a/.github/workflows/main.yml b/.github/workflows/main.yml index 72eb497..ddae157 100644 --- a/.github/workflows/main.yml +++ b/.github/workflows/main.yml @@ -29,7 +29,6 @@ jobs: matrix: platform: - m5stick-c - - m5stick-c-plus - m5stack-core - m5stack-core2 diff --git a/.github/workflows/release.yml b/.github/workflows/release.yml index 33edc1a..18af06d 100644 --- a/.github/workflows/release.yml +++ b/.github/workflows/release.yml @@ -14,7 +14,6 @@ jobs: matrix: platform: - m5stick-c - - m5stick-c-plus - m5stack-core - m5stack-core2 diff --git a/README.md b/README.md index 9936ebe..697798c 100644 --- a/README.md +++ b/README.md @@ -67,10 +67,8 @@ Follow the instructions on the wiki: [Easy Web Install](https://github.com/gkoh/ PlatformIO does everything assuming things are installed and connected properly. In most cases it should be: - clone the repository -- plug in the M5StickC +- plug in the M5StickC or M5StickC Plus/Plus2 - `platformio run -e m5stick-c -t upload` -- OR plug in the M5StickC Plus/Plus2 - - `platformio run -e m5stick-c-plus -t upload` - OR plug in the M5Stack Core2 - `platformio run -e m5stack-core2 -t upload` diff --git a/lib/M5ez/src/M5ez.cpp b/lib/M5ez/src/M5ez.cpp index 72692a3..c7c8e74 100644 --- a/lib/M5ez/src/M5ez.cpp +++ b/lib/M5ez/src/M5ez.cpp @@ -12,12 +12,51 @@ // ////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////// +void ezTheme::update(void) { + const GFXfont *font; + uint8_t radius; + + switch (M5.getBoard()) { + case m5::board_t::board_M5StickC: + font = hzk16; + ez.theme->header_height = 12; + ez.theme->button_height = 11; + radius = 3; + break; + case m5::board_t::board_M5StickCPlus: + case m5::board_t::board_M5StickCPlus2: + font = sans16; + ez.theme->header_height = 23; + ez.theme->button_height = 19; + radius = 8; + break; + case m5::board_t::board_M5StackCore2: + case m5::board_t::board_M5Stack: + default: + font = (&FreeMono12pt7b); + ez.theme->header_height = 23; + ez.theme->button_height = 24; + radius = 8; + } + + ez.theme->header_font = font; + ez.theme->print_font = font; + ez.theme->button_font = font; + ez.theme->menu_big_font = font; + ez.theme->menu_small_font = font; + ez.theme->msg_font = font = font; + + ez.theme->button_radius = radius; + ez.theme->menu_item_radius = radius; +} + void ezTheme::begin() { if (!ez.themes.size()) { ezTheme defaultTheme; defaultTheme.add(); } ez.theme = &ez.themes[0]; + update(); Preferences prefs; prefs.begin("M5ez", true); // read-only select(prefs.getString("theme", "").c_str()); @@ -32,6 +71,7 @@ bool ezTheme::select(std::string name) { for (uint8_t n = 0; n < ez.themes.size(); n++) { if (ez.themes[n].name == name) { ez.theme = &ez.themes[n]; + update(); return true; } } @@ -95,7 +135,7 @@ void ezScreen::clear(uint16_t color) { ez.header.clear(false); ez.buttons.clear(false); ez.canvas.reset(); - M5.Lcd.fillRect(0, 0, TFT_W, TFT_H, color); + M5.Lcd.fillRect(0, 0, ez.canvas.tft.width, ez.canvas.tft.height, color); } ////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////// @@ -127,7 +167,7 @@ void ezHeader::_recalculate() { x += _widgets[n].w; } if (we_have_leftover) { // Then start from right setting x values - x = TFT_W; + x = ez.canvas.tft.width; for (int8_t n = _widgets.size() - 1; n >= 0; n--) { if (_widgets[n].leftover) { // and set width of leftover widget to remainder _widgets[n].w = x - _widgets[n].x; @@ -185,7 +225,7 @@ void ezHeader::show(std::string t /* = "" */) { _shown = true; if (t != "") _title = t; // only change title if provided - M5.Lcd.fillRect(0, 0, TFT_W, ez.theme->header_height, + M5.Lcd.fillRect(0, 0, ez.canvas.tft.width, ez.theme->header_height, ez.theme->header_bgcolor); // Clear header area for (uint8_t n = 0; n < _widgets.size(); n++) { (_widgets[n].function)(_widgets[n].x, _widgets[n].w); // Tell all header widgets to draw @@ -205,7 +245,7 @@ void ezHeader::draw(std::string name) { void ezHeader::clear(bool wipe /* = true */) { if (wipe) - M5.Lcd.fillRect(0, 0, TFT_W, ez.theme->header_height, ez.theme->background); + M5.Lcd.fillRect(0, 0, ez.canvas.tft.width, ez.theme->header_height, ez.theme->background); _shown = false; ez.canvas.top(0); } @@ -240,6 +280,7 @@ void ezHeader::_drawTitle(uint16_t x, uint16_t w) { // ////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////// +ezTFT ezCanvas::tft; uint8_t ezCanvas::_y, ezCanvas::_top, ezCanvas::_bottom; uint16_t ezCanvas::_x, ezCanvas::_left, ezCanvas::_right, ezCanvas::_lmargin; const GFXfont *ezCanvas::_font; @@ -249,10 +290,29 @@ std::vector ezCanvas::_printed; uint32_t ezCanvas::_next_scroll; void ezCanvas::begin() { + switch (M5.getBoard()) { + case m5::board_t::board_M5StickC: + tft.width = 160; + tft.height = 80; + M5.Lcd.setRotation(3); + break; + case m5::board_t::board_M5StickCPlus: + case m5::board_t::board_M5StickCPlus2: + tft.width = 240; + tft.height = 135; + M5.Lcd.setRotation(3); + break; + case m5::board_t::board_M5StackCore2: + case m5::board_t::board_M5Stack: + default: + tft.width = 320; + tft.height = 240; + } + _left = 0; - _right = TFT_W - 1; + _right = ez.canvas.tft.width - 1; _top = 0; - _bottom = TFT_H - 1; + _bottom = ez.canvas.tft.height - 1; ez.addEvent(ez.canvas.loop); reset(); } @@ -526,24 +586,25 @@ std::vector ezButtons::get() { void ezButtons::clear(bool wipe /* = true */) { if (wipe && (_lower_button_row || _upper_button_row)) { - M5.Lcd.fillRect(0, ez.canvas.bottom() + 1, TFT_H - ez.canvas.bottom() - 1, TFT_W, - ez.screen.background()); + M5.Lcd.fillRect(0, ez.canvas.bottom() + 1, ez.canvas.tft.height - ez.canvas.bottom() - 1, + ez.canvas.tft.width, ez.screen.background()); } _btn_a = _btn_b = _btn_c = ""; _lower_button_row = false; _upper_button_row = false; - ez.canvas.bottom(TFT_H - 1); + ez.canvas.bottom(ez.canvas.tft.height - 1); } void ezButtons::_drawButtons(std::string btn_a, std::string btn_b, std::string btn_c) { - int16_t btnwidth = int16_t((TFT_W - 4 * ez.theme->button_gap) / 3); + int16_t btnwidth = int16_t((ez.canvas.tft.width - 4 * ez.theme->button_gap) / 3); // See if any buttons are used on the bottom row if (btn_a != "" || btn_b != "" || btn_c != "") { if (!_lower_button_row) { // If the lower button row wasn't there before, clear the area first - M5.Lcd.fillRect(0, TFT_H - ez.theme->button_height - ez.theme->button_gap, TFT_W, - ez.theme->button_height + ez.theme->button_gap, ez.screen.background()); + M5.Lcd.fillRect(0, ez.canvas.tft.height - ez.theme->button_height - ez.theme->button_gap, + ez.canvas.tft.width, ez.theme->button_height + ez.theme->button_gap, + ez.screen.background()); } // Then draw the three buttons there. (drawButton erases single buttons if unused.) if (_btn_a != btn_a) { @@ -562,25 +623,27 @@ void ezButtons::_drawButtons(std::string btn_a, std::string btn_b, std::string b } else { if (_lower_button_row) { // If there was a lower button row before and it's now gone, clear the area - M5.Lcd.fillRect(0, TFT_H - ez.theme->button_height - ez.theme->button_gap, TFT_W, - ez.theme->button_height + ez.theme->button_gap, ez.screen.background()); + M5.Lcd.fillRect(0, ez.canvas.tft.height - ez.theme->button_height - ez.theme->button_gap, + ez.canvas.tft.width, ez.theme->button_height + ez.theme->button_gap, + ez.screen.background()); _btn_a = _btn_b = _btn_c = ""; _lower_button_row = false; } } uint8_t button_rows = _upper_button_row ? 2 : (_lower_button_row ? 1 : 0); - ez.canvas.bottom(TFT_H - (button_rows * (ez.theme->button_height + ez.theme->button_gap))); + ez.canvas.bottom(ez.canvas.tft.height + - (button_rows * (ez.theme->button_height + ez.theme->button_gap))); } void ezButtons::_drawButton(int16_t row, std::string text, int16_t x, int16_t w) { // row = 1 for lower and 2 for upper row int16_t y, bg_color; if (row == 1) { - y = TFT_H - ez.theme->button_height; + y = ez.canvas.tft.height - ez.theme->button_height; bg_color = ez.theme->button_bgcolor_b; } else { - y = TFT_H - 2 * ez.theme->button_height - ez.theme->button_gap; + y = ez.canvas.tft.height - 2 * ez.theme->button_height - ez.theme->button_gap; bg_color = ez.theme->button_bgcolor_t; } if (text != "") { @@ -991,9 +1054,6 @@ void M5ez::begin() { cfg.internal_spk = false; cfg.internal_mic = false; M5.begin(cfg); -#if ARDUINO_M5STICK_C || ARDUINO_M5STICK_C_PLUS - M5.Lcd.setRotation(3); -#endif ezTheme::begin(); ez.screen.begin(); ez.settings.begin(); @@ -1077,9 +1137,9 @@ std::string M5ez::msgBox(std::string header, int16_t y = ez.canvas.top() + ez.canvas.height() / 2 - ((lines.size() - 1) * font_h / 2) + n * font_h; if (!clear) { - M5.Lcd.fillRect(0, y - font_h / 2, TFT_W, font_h, ez.theme->background); + M5.Lcd.fillRect(0, y - font_h / 2, ez.canvas.tft.width, font_h, ez.theme->background); } - M5.Lcd.drawString(lines[n].line.c_str(), TFT_W / 2, y); + M5.Lcd.drawString(lines[n].line.c_str(), ez.canvas.tft.width / 2, y); } if (buttons.size() != 0 && blocking) { std::string ret = ez.buttons.wait(); @@ -1168,11 +1228,12 @@ void M5ez::setFont(const GFXfont *font) { } int16_t M5ez::fontHeight() { -#if ARDUINO_M5STICK_C_PLUS || ARDUINO_M5STACK_CORE_ESP32 - return M5.Lcd.fontHeight(M5.Lcd.getFont()); -#else - return 11; -#endif + switch (M5.getBoard()) { + case m5::board_t::board_M5StickC: + return 11; + default: + return M5.Lcd.fontHeight(M5.Lcd.getFont()); + } } std::string M5ez::version() { @@ -1397,7 +1458,7 @@ int16_t ezMenu::_runTextOnce(bool dynamic) { ez.setFont(_font); (_items[old_selected].drawFunction)( this, ez.theme->menu_lmargin, top_item_h + (old_selected - _offset) * _per_item_h, - TFT_W - ez.theme->menu_lmargin - ez.theme->menu_rmargin, _per_item_h); + ez.canvas.tft.width - ez.theme->menu_lmargin - ez.theme->menu_rmargin, _per_item_h); } else { MenuItem_t *item = &_items[old_selected]; std::string text = item->caption != "" ? item->caption : item->name; @@ -1407,7 +1468,7 @@ int16_t ezMenu::_runTextOnce(bool dynamic) { ez.setFont(_font); (_items[_selected].drawFunction)( this, ez.theme->menu_lmargin, top_item_h + (_selected - _offset) * _per_item_h, - TFT_W - ez.theme->menu_lmargin - ez.theme->menu_rmargin, _per_item_h); + ez.canvas.tft.width - ez.theme->menu_lmargin - ez.theme->menu_rmargin, _per_item_h); } else { MenuItem_t *item = &_items[_selected]; std::string text = item->caption != "" ? item->caption : item->name; @@ -1430,9 +1491,9 @@ void ezMenu::_drawItems() { + (ez.canvas.height() % _per_item_h) / 2; // remainder of screen left over by last item // not fitting split to center menu ez.setFont(_font); - (_items[item_ref].drawFunction)(this, ez.theme->menu_lmargin, top_item_h + n * _per_item_h, - TFT_W - ez.theme->menu_lmargin - ez.theme->menu_rmargin, - _per_item_h); + (_items[item_ref].drawFunction)( + this, ez.theme->menu_lmargin, top_item_h + n * _per_item_h, + ez.canvas.tft.width - ez.theme->menu_lmargin - ez.theme->menu_rmargin, _per_item_h); } else { MenuItem_t *item = &_items[item_ref]; std::string text = item->caption != "" ? item->caption : item->name; @@ -1461,18 +1522,19 @@ void ezMenu::_drawItem(int16_t n, std::string text, bool selected) { fill_color = ez.screen.background(); M5.Lcd.setTextColor(ez.theme->menu_item_color); } - text = ez.clipString(text, TFT_W - ez.theme->menu_lmargin - 2 * ez.theme->menu_item_hmargin - - ez.theme->menu_rmargin); + text = ez.clipString(text, ez.canvas.tft.width - ez.theme->menu_lmargin + - 2 * ez.theme->menu_item_hmargin - ez.theme->menu_rmargin); M5.Lcd.fillRoundRect(ez.theme->menu_lmargin, top_item_h + n * _per_item_h, - TFT_W - ez.theme->menu_lmargin - ez.theme->menu_rmargin, _per_item_h, - ez.theme->menu_item_radius, fill_color); + ez.canvas.tft.width - ez.theme->menu_lmargin - ez.theme->menu_rmargin, + _per_item_h, ez.theme->menu_item_radius, fill_color); auto tabpos = text.find("\t"); M5.Lcd.drawString(text.substr(0, tabpos).c_str(), ez.theme->menu_lmargin + ez.theme->menu_item_hmargin, menu_text_y); if (tabpos != std::string::npos) { M5.Lcd.setTextDatum(CR_DATUM); M5.Lcd.drawString(text.substr(tabpos, std::string::npos).c_str(), - TFT_W - ez.theme->menu_rmargin - ez.theme->menu_item_hmargin, menu_text_y); + ez.canvas.tft.width - ez.theme->menu_rmargin - ez.theme->menu_item_hmargin, + menu_text_y); } } @@ -1689,7 +1751,7 @@ ezProgressBar::ezProgressBar(const std::string header /* = "" */, bar_color = ez.theme->progressbar_color; _bar_color = bar_color; ez.screen.clear(); - M5.Lcd.fillRect(0, 0, TFT_W, TFT_H, ez.screen.background()); + M5.Lcd.fillRect(0, 0, ez.canvas.tft.width, ez.canvas.tft.height, ez.screen.background()); if (header != "") ez.header.show(header); @@ -1704,7 +1766,7 @@ ezProgressBar::ezProgressBar(const std::string header /* = "" */, for (uint8_t n = 0; n < lines.size(); n++) { int16_t y = ez.canvas.top() + ez.canvas.height() / 2 - ((num_lines - 1) * font_h / 2) + n * font_h; - M5.Lcd.drawString(lines[n].line.c_str(), TFT_W / 2, y); + M5.Lcd.drawString(lines[n].line.c_str(), ez.canvas.tft.width / 2, y); } _bar_y = ez.canvas.top() + ez.canvas.height() / 2 + ((num_lines - 1) * font_h / 2) - ez.theme->progressbar_width / 2; diff --git a/lib/M5ez/src/M5ez.h b/lib/M5ez/src/M5ez.h index 5af2847..a01613f 100644 --- a/lib/M5ez/src/M5ez.h +++ b/lib/M5ez/src/M5ez.h @@ -32,33 +32,6 @@ #define NO_COLOR TFT_TRANSPARENT -#if ARDUINO_M5STICK_C_PLUS -#define TFT_W 240 -#define TFT_H 135 -#define TFT_FONT sans16 -#define TFT_HEADER_HEIGHT 23 -#define TFT_BUTTON_HEIGHT 19 -#define TFT_RADIUS 8 -#endif - -#if ARDUINO_M5STICK_C -#define TFT_W 160 -#define TFT_H 80 -#define TFT_FONT hzk16 -#define TFT_HEADER_HEIGHT 12 -#define TFT_BUTTON_HEIGHT 11 -#define TFT_RADIUS 3 -#endif - -#if ARDUINO_M5STACK_CORE_ESP32 || ARDUINO_M5STACK_CORE2 -#define TFT_W 320 -#define TFT_H 240 -#define TFT_FONT (&FreeMono12pt7b) -#define TFT_HEADER_HEIGHT 23 -#define TFT_BUTTON_HEIGHT 24 -#define TFT_RADIUS 8 -#endif - struct line_t { int16_t position; std::string line; @@ -81,55 +54,39 @@ class ezTheme { std::string name = "Default"; // Change this when making theme uint16_t background = 0xEF7D; uint16_t foreground = TFT_BLACK; - uint8_t header_height = TFT_HEADER_HEIGHT; - const GFXfont *header_font = TFT_FONT; + uint8_t header_height; + const GFXfont *header_font; uint8_t header_hmargin = 5; uint8_t header_tmargin = 3; uint16_t header_bgcolor = TFT_BLUE; uint16_t header_fgcolor = TFT_WHITE; - const GFXfont *print_font = TFT_FONT; + const GFXfont *print_font; uint16_t print_color = foreground; - const GFXfont *clock_font = TFT_FONT; - - uint8_t button_height = TFT_BUTTON_HEIGHT; - const GFXfont *button_font = TFT_FONT; + uint8_t button_height; + const GFXfont *button_font; uint8_t button_tmargin = 1; uint8_t button_hmargin = 5; uint8_t button_gap = 3; - uint8_t button_radius = TFT_RADIUS; + uint8_t button_radius; uint16_t button_bgcolor_b = TFT_BLUE; uint16_t button_bgcolor_t = TFT_PURPLE; uint16_t button_fgcolor = TFT_WHITE; uint16_t button_longcolor = TFT_CYAN; - uint8_t input_top = 50; // pixels below ez.canvas.top() - uint8_t input_hmargin = 10; // The distance between text box and edge of screen - uint8_t input_vmargin = 10; // Vertical margin _inside_ the text box - const GFXfont *input_font = TFT_FONT; - const GFXfont *input_keylock_font = TFT_FONT; - uint16_t input_bgcolor = TFT_BLACK; - uint16_t input_fgcolor = TFT_GREEN; - uint16_t input_cursor_blink = 500; // milliseconds - uint8_t input_faces_btns = 18; - - const GFXfont *tb_font = TFT_FONT; - uint16_t tb_color = foreground; - uint8_t tb_hmargin = 5; - uint8_t menu_lmargin = 15; uint8_t menu_rmargin = 10; uint8_t menu_arrows_lmargin = 4; uint16_t menu_item_color = foreground; uint16_t menu_sel_bgcolor = foreground; uint16_t menu_sel_fgcolor = background; - const GFXfont *menu_big_font = TFT_FONT; - const GFXfont *menu_small_font = TFT_FONT; + const GFXfont *menu_big_font; + const GFXfont *menu_small_font; uint8_t menu_item_hmargin = 10; - uint8_t menu_item_radius = TFT_RADIUS; + uint8_t menu_item_radius; - const GFXfont *msg_font = TFT_FONT; + const GFXfont *msg_font; uint16_t msg_color = foreground; uint8_t msg_hmargin = 20; @@ -148,7 +105,9 @@ class ezTheme { uint16_t battery_50_fgcolor = TFT_YELLOW; uint16_t battery_75_fgcolor = TFT_GREENYELLOW; uint16_t battery_100_fgcolor = TFT_GREEN; - // + + private: + static void update(void); }; ////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////// @@ -229,9 +188,19 @@ struct print_t { std::string text; }; +class ezTFT { + public: + int32_t width; + int32_t height; +}; + class ezCanvas: public Print { friend class ezHeader; friend class ezButtons; + friend class ezProgressBar; + friend class ezMenu; + friend class ezScreen; + friend class M5ez; public: static void begin(); @@ -265,6 +234,7 @@ class ezCanvas: public Print { static uint16_t loop(void *private_data); private: + static ezTFT tft; static std::vector _printed; static uint32_t _next_scroll; static void top(uint8_t newtop); @@ -502,6 +472,7 @@ struct event_t { void *private_data; uint32_t when; }; + class M5ez { friend class ezProgressBar; friend class ezHeader; // TMP? diff --git a/lib/M5ez/src/themes/dark.h b/lib/M5ez/src/themes/dark.h index 0894a3c..86febbc 100644 --- a/lib/M5ez/src/themes/dark.h +++ b/lib/M5ez/src/themes/dark.h @@ -6,62 +6,14 @@ theme.name = "Dark"; // Change this when making theme theme.background = TFT_BLACK; theme.foreground = TFT_WHITE; - // theme.header_height = 23; - // theme.GFXfont* header_font = &FreeSansBold9pt7b; - // theme.header_hmargin = 5; - // theme.header_tmargin = 3; theme.header_bgcolor = TFT_DARKGREY; theme.header_fgcolor = TFT_WHITE; - // theme.GFXfont* print_font = mono6x8; theme.print_color = theme.foreground; - // theme.GFXfont* clock_font = mono12x16; - // theme.longpress_time = 250; - // //milliseconds theme.button_height = 19; theme.GFXfont* button_font = &FreeSans9pt7b; - // theme.button_tmargin = 1; - // theme.button_hmargin = 5; - // theme.button_gap = 3; - // theme.button_radius = 8; - // theme.button_bgcolor_b = TFT_BLUE; - // theme.button_bgcolor_t = TFT_PURPLE; - // theme.button_fgcolor = TFT_WHITE; - // theme.button_longcolor = TFT_CYAN; - // theme.input_top = 50; // - // pixels below ez.canvas.top() theme.input_hmargin = 10; - // // The distance between text box and edge of screen theme.input_vmargin = 10; - // // Vertical margin _inside_ the text box theme.GFXfont* input_font = &FreeMonoBold12pt7b; - // theme.GFXfont* input_keylock_font = &FreeSansBold9pt7b; - theme.input_bgcolor = TFT_DARKGREY; - // theme.input_fgcolor = TFT_GREEN; - // theme.input_cursor_blink = 500; // - // milliseconds theme.input_faces_btns = 18; theme.GFXfont* tb_font = &FreeSans9pt7b; - theme.tb_color = theme.foreground; - // theme.tb_hmargin = 5; - // theme.menu_lmargin = 20; - // theme.menu_rmargin = 10; - // theme.menu_arrows_lmargin = 5; theme.menu_item_color = theme.foreground; theme.menu_sel_bgcolor = theme.foreground; theme.menu_sel_fgcolor = theme.background; - // theme.GFXfont* menu_big_font = &FreeSans12pt7b; - // theme.GFXfont* menu_small_font = &FreeSans9pt7b; - // theme.menu_item_hmargin = 10; - // theme.menu_item_radius = 8; - // theme.GFXfont* msg_font = &FreeSans12pt7b; theme.msg_color = theme.foreground; - // theme.msg_hmargin = 20; - // theme.progressbar_line_width = 4; - // theme.progressbar_width = 25; theme.progressbar_color = theme.foreground; - // theme.signal_interval = 2000; - // theme.signal_bar_width = 4; - // theme.signal_bar_gap = 2; - // theme.battery_bar_width = 26; - // theme.battery_bar_gap = 2; - // theme.battery_0_fgcolor = TFT_RED; - // theme.battery_25_fgcolor = TFT_ORANGE; - // theme.battery_50_fgcolor = TFT_YELLOW; - // theme.battery_75_fgcolor = TFT_GREENYELLOW; - // theme.battery_100_fgcolor = TFT_GREEN; theme.add(); } diff --git a/lib/M5ez/src/themes/mono_furble.h b/lib/M5ez/src/themes/mono_furble.h index 684ac9c..d26adf1 100644 --- a/lib/M5ez/src/themes/mono_furble.h +++ b/lib/M5ez/src/themes/mono_furble.h @@ -7,57 +7,17 @@ theme.name = "Mono Furble"; // Change this when making theme theme.background = TFT_BLACK; theme.foreground = TFT_WHITE; - // theme.header_height = 23; - // theme.GFXfont* header_font = &FreeSansBold9pt7b; - // theme.header_hmargin = 5; - // theme.header_tmargin = 3; theme.header_bgcolor = TFT_BLACK; theme.header_fgcolor = TFT_FURBLE; - // theme.GFXfont* print_font = mono6x8; theme.print_color = theme.foreground; - // theme.GFXfont* clock_font = mono12x16; - // theme.longpress_time = 250; - // //milliseconds theme.button_height = 19; theme.GFXfont* button_font = &FreeSans9pt7b; - // theme.button_tmargin = 1; - // theme.button_hmargin = 5; - // theme.button_gap = 3; - // theme.button_radius = 8; theme.button_bgcolor_b = TFT_WHITE; theme.button_bgcolor_t = TFT_WHITE; theme.button_fgcolor = TFT_BLACK; - // theme.button_longcolor = TFT_WHITE; - // theme.input_top = 50; // - // pixels below ez.canvas.top() theme.input_hmargin = 10; - // // The distance between text box and edge of screen theme.input_vmargin = 10; - // // Vertical margin _inside_ the text box theme.GFXfont* input_font = &FreeMonoBold12pt7b; - // theme.GFXfont* input_keylock_font = &FreeSansBold9pt7b; - theme.input_bgcolor = TFT_BLACK; - // theme.input_fgcolor = TFT_GREEN; - // theme.input_cursor_blink = 500; // - // milliseconds theme.input_faces_btns = 18; theme.GFXfont* tb_font = &FreeSans9pt7b; - theme.tb_color = theme.foreground; - // theme.tb_hmargin = 5; - // theme.menu_lmargin = 20; - // theme.menu_rmargin = 10; - // theme.menu_arrows_lmargin = 5; theme.menu_item_color = theme.foreground; theme.menu_sel_bgcolor = theme.foreground; theme.menu_sel_fgcolor = theme.background; - // theme.GFXfont* menu_big_font = &FreeSans12pt7b; - // theme.GFXfont* menu_small_font = &FreeSans9pt7b; - // theme.menu_item_hmargin = 10; - // theme.menu_item_radius = 8; - // theme.GFXfont* msg_font = &FreeSans12pt7b; theme.msg_color = theme.foreground; - // theme.msg_hmargin = 20; - // theme.progressbar_line_width = 4; - // theme.progressbar_width = 25; theme.progressbar_color = theme.foreground; - // theme.signal_interval = 2000; - // theme.signal_bar_width = 4; - // theme.signal_bar_gap = 2; - // theme.battery_bar_width = 26; - // theme.battery_bar_gap = 2; theme.battery_0_fgcolor = TFT_FURBLE; theme.battery_25_fgcolor = TFT_FURBLE; theme.battery_50_fgcolor = TFT_FURBLE; diff --git a/platformio.ini b/platformio.ini index fff51b1..73a7838 100644 --- a/platformio.ini +++ b/platformio.ini @@ -14,11 +14,7 @@ lib_deps = [env:m5stick-c] board = m5stick-c -build_flags = ${furble.build_flags} -D ARDUINO_M5STICK_C=1 - -[env:m5stick-c-plus] -board = m5stick-c -build_flags = ${furble.build_flags} -D ARDUINO_M5STICK_C_PLUS=1 +build_flags = ${furble.build_flags} [env:m5stack-core] board = m5stack-core-esp32 diff --git a/web-installer/index.html b/web-installer/index.html index 3e08b86..1367e1e 100644 --- a/web-installer/index.html +++ b/web-installer/index.html @@ -11,18 +11,15 @@

furble web installer

-

A wireless remote shutter release/button for Fujifilm (eg. GFX100II, - GFX100S, X-H2S, X-S10, X-T3, X-T30, X-T4, X-T5, X100V) and Canon EOS (eg. +

A bluetooth wireless remote shutter release/button for Fujifilm (eg. GFX100II, + GFX100S, X-H1, X-H2S, X-S10, X-T3, X-T30, X-T4, X-T5, X100V) and Canon EOS (eg. M6, RP) cameras.


Flash furble firmware to a supported M5Stack device.

Select your device:

  • - -
  • -
  • - +