Use new functions

This commit is contained in:
3djc
2021-04-06 11:13:47 +02:00
parent a72f1491de
commit 6239a4000d
5 changed files with 4 additions and 34 deletions
@@ -21,12 +21,6 @@
#include "opentx.h"
#include "trims.h"
#define HAS_TOPBAR() (persistentData->options[0].value.boolValue == true)
#define HAS_FM() (persistentData->options[1].value.boolValue == true)
#define HAS_SLIDERS() (persistentData->options[2].value.boolValue == true)
#define HAS_TRIMS() (persistentData->options[3].value.boolValue == true)
#define IS_MIRRORED() (persistentData->options[4].value.boolValue == true)
constexpr coord_t border = 10;
const uint8_t LBM_LAYOUT_1x1[] = {
+1 -7
View File
@@ -22,12 +22,6 @@
#include "sliders.h"
#include "trims.h"
#define HAS_TOPBAR() (persistentData->options[0].value.boolValue == true)
#define HAS_FM() (persistentData->options[1].value.boolValue == true)
#define HAS_SLIDERS() (persistentData->options[2].value.boolValue == true)
#define HAS_TRIMS() (persistentData->options[3].value.boolValue == true)
#define IS_MIRRORED() (persistentData->options[4].value.boolValue == true)
constexpr coord_t border = 10;
const uint8_t LBM_LAYOUT_2P1[] = {
@@ -66,7 +60,7 @@ class Layout2P1: public Layout
rect_t getZone(unsigned int index) const override
{
if (IS_MIRRORED())
if (isMirrored())
index = 2 - index;
rect_t zone = getMainZone({border, border, LCD_W - 2 * border, LCD_H - 2 * border});
+1 -7
View File
@@ -22,12 +22,6 @@
#include "sliders.h"
#include "trims.h"
#define HAS_TOPBAR() (persistentData->options[0].value.boolValue == true)
#define HAS_FM() (persistentData->options[1].value.boolValue == true)
#define HAS_SLIDERS() (persistentData->options[2].value.boolValue == true)
#define HAS_TRIMS() (persistentData->options[3].value.boolValue == true)
#define IS_MIRRORED() (persistentData->options[4].value.boolValue == true)
constexpr coord_t border = 10;
const uint8_t LBM_LAYOUT_2x1[] = {
@@ -66,7 +60,7 @@ class Layout2x1: public Layout
rect_t getZone(unsigned int index) const override
{
if (IS_MIRRORED())
if (isMirrored())
index = 1 - index;
rect_t zone = getMainZone({border, border, LCD_W - 2 * border, LCD_H - 2 * border});
+1 -7
View File
@@ -22,12 +22,6 @@
#include "sliders.h"
#include "trims.h"
#define HAS_TOPBAR() (persistentData->options[0].value.boolValue == true)
#define HAS_FM() (persistentData->options[1].value.boolValue == true)
#define HAS_SLIDERS() (persistentData->options[2].value.boolValue == true)
#define HAS_TRIMS() (persistentData->options[3].value.boolValue == true)
#define IS_MIRRORED() (persistentData->options[4].value.boolValue == true)
constexpr coord_t border = 10;
const uint8_t LBM_LAYOUT_2x2[] = {
@@ -66,7 +60,7 @@ class Layout2x2: public Layout
rect_t getZone(unsigned int index) const override
{
if (IS_MIRRORED())
if (isMirrored())
index = 3 - index;
rect_t zone = getMainZone({border, border, LCD_W - 2 * border, LCD_H - 2 * border});
+1 -7
View File
@@ -20,12 +20,6 @@
#include "opentx.h"
#define HAS_TOPBAR() (persistentData->options[0].value.boolValue == true)
#define HAS_FM() (persistentData->options[1].value.boolValue == true)
#define HAS_SLIDERS() (persistentData->options[2].value.boolValue == true)
#define HAS_TRIMS() (persistentData->options[3].value.boolValue == true)
#define IS_MIRRORED() (persistentData->options[4].value.boolValue == true)
constexpr coord_t border = 10;
const uint8_t LBM_LAYOUT_2x4[] = {
@@ -69,7 +63,7 @@ class Layout2x4: public Layout
rect_t getZone(unsigned int index) const override
{
if (IS_MIRRORED())
if (isMirrored())
index = 7 - index;
rect_t zone = getMainZone({border, border, LCD_W - 2 * border, LCD_H - 2 * border});