From b891cb853e7913ecde969b44948d0180e674d97d Mon Sep 17 00:00:00 2001 From: Dmitry Shishkin Date: Tue, 17 Sep 2024 12:12:56 +0200 Subject: [PATCH] Format code --- examples/KeyboardAdapter/KeyboardAdapter.ino | 2 +- src/ItemCommand.h | 2 +- src/ItemInput.h | 2 +- src/ItemInputCharset.h | 3 +-- src/ItemList.h | 1 - src/ItemToggle.h | 7 +++---- 6 files changed, 7 insertions(+), 10 deletions(-) diff --git a/examples/KeyboardAdapter/KeyboardAdapter.ino b/examples/KeyboardAdapter/KeyboardAdapter.ino index a9628424..0bd03571 100644 --- a/examples/KeyboardAdapter/KeyboardAdapter.ino +++ b/examples/KeyboardAdapter/KeyboardAdapter.ino @@ -5,8 +5,8 @@ #include #include -#include #include +#include #define LCD_ROWS 2 #define LCD_COLS 16 diff --git a/src/ItemCommand.h b/src/ItemCommand.h index 6470bc4a..ea178fd4 100644 --- a/src/ItemCommand.h +++ b/src/ItemCommand.h @@ -55,7 +55,7 @@ class ItemCommand : public MenuItem { } } - protected: + protected: bool enter() { if (callback != NULL) { callback(); diff --git a/src/ItemInput.h b/src/ItemInput.h index 7569c078..0eb06e7d 100644 --- a/src/ItemInput.h +++ b/src/ItemInput.h @@ -163,7 +163,7 @@ class ItemInput : public MenuItem { display->drawItem(row, text, ':', buf); } - protected: + protected: bool enter() { if (display->getEditModeEnabled()) { return false; diff --git a/src/ItemInputCharset.h b/src/ItemInputCharset.h index 17b02d58..ae9dd116 100644 --- a/src/ItemInputCharset.h +++ b/src/ItemInputCharset.h @@ -61,7 +61,7 @@ class ItemInputCharset : public ItemInput { } } - protected: + protected: bool enter() { if (!display->getEditModeEnabled()) { return ItemInput::enter(); @@ -137,7 +137,6 @@ class ItemInputCharset : public ItemInput { display->drawChar(charset[charsetPosition]); return true; } - }; #define ITEM_INPUT_CHARSET(...) (new ItemInputCharset(__VA_ARGS__)) diff --git a/src/ItemList.h b/src/ItemList.h index 2896b5ca..f02037f0 100644 --- a/src/ItemList.h +++ b/src/ItemList.h @@ -147,7 +147,6 @@ class ItemList : public MenuItem { } return true; }; - }; #define ITEM_STRING_LIST(...) (new ItemList(__VA_ARGS__)) diff --git a/src/ItemToggle.h b/src/ItemToggle.h index c6f4a6d5..2d3aba55 100644 --- a/src/ItemToggle.h +++ b/src/ItemToggle.h @@ -83,13 +83,13 @@ class ItemToggle : public MenuItem { display->drawItem(row, text, ':', buf); }; - bool process(const unsigned char c) override { - switch(c) { + bool process(const unsigned char c) override { + switch (c) { case ENTER: return enter(); default: return false; } }; - + protected: bool enter() { enabled = !enabled; @@ -99,7 +99,6 @@ class ItemToggle : public MenuItem { MenuItem::draw(); return true; }; - }; #define ITEM_TOGGLE(...) (new ItemToggle(__VA_ARGS__))