| 906 | } |
| 907 | |
| 908 | std::string getButtonLayoutDefs() |
| 909 | { |
| 910 | const size_t capacity = JSON_OBJECT_SIZE(500); |
| 911 | DynamicJsonDocument doc(capacity); |
| 912 | uint16_t layoutCtr = 0; |
| 913 | |
| 914 | for (layoutCtr = _ButtonLayout_MIN; layoutCtr < _ButtonLayout_ARRAYSIZE; layoutCtr++) { |
| 915 | LayoutManager::LayoutList leftLayout = LayoutManager::getInstance().getLeftLayout((ButtonLayout)layoutCtr); |
| 916 | if ((leftLayout.size() > 0) || (layoutCtr == ButtonLayout::BUTTON_LAYOUT_BLANKA)) writeDoc(doc, "buttonLayout", LayoutManager::getInstance().getButtonLayoutName((ButtonLayout)layoutCtr), layoutCtr); |
| 917 | } |
| 918 | |
| 919 | for (layoutCtr = _ButtonLayoutRight_MIN; layoutCtr < _ButtonLayoutRight_ARRAYSIZE; layoutCtr++) { |
| 920 | LayoutManager::LayoutList rightLayout = LayoutManager::getInstance().getRightLayout((ButtonLayoutRight)layoutCtr); |
| 921 | if ((rightLayout.size() > 0) || (layoutCtr == ButtonLayoutRight::BUTTON_LAYOUT_BLANKB)) writeDoc(doc, "buttonLayoutRight", LayoutManager::getInstance().getButtonLayoutRightName((ButtonLayoutRight)layoutCtr), layoutCtr); |
| 922 | } |
| 923 | |
| 924 | return serialize_json(doc); |
| 925 | } |
| 926 | |
| 927 | std::string getButtonLayouts() |
| 928 | { |
nothing calls this directly
no test coverage detected