Use new functions
This commit is contained in:
@@ -21,12 +21,6 @@
|
|||||||
#include "opentx.h"
|
#include "opentx.h"
|
||||||
#include "trims.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;
|
constexpr coord_t border = 10;
|
||||||
|
|
||||||
const uint8_t LBM_LAYOUT_1x1[] = {
|
const uint8_t LBM_LAYOUT_1x1[] = {
|
||||||
|
|||||||
@@ -22,12 +22,6 @@
|
|||||||
#include "sliders.h"
|
#include "sliders.h"
|
||||||
#include "trims.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;
|
constexpr coord_t border = 10;
|
||||||
|
|
||||||
const uint8_t LBM_LAYOUT_2P1[] = {
|
const uint8_t LBM_LAYOUT_2P1[] = {
|
||||||
@@ -66,7 +60,7 @@ class Layout2P1: public Layout
|
|||||||
|
|
||||||
rect_t getZone(unsigned int index) const override
|
rect_t getZone(unsigned int index) const override
|
||||||
{
|
{
|
||||||
if (IS_MIRRORED())
|
if (isMirrored())
|
||||||
index = 2 - index;
|
index = 2 - index;
|
||||||
|
|
||||||
rect_t zone = getMainZone({border, border, LCD_W - 2 * border, LCD_H - 2 * border});
|
rect_t zone = getMainZone({border, border, LCD_W - 2 * border, LCD_H - 2 * border});
|
||||||
|
|||||||
@@ -22,12 +22,6 @@
|
|||||||
#include "sliders.h"
|
#include "sliders.h"
|
||||||
#include "trims.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;
|
constexpr coord_t border = 10;
|
||||||
|
|
||||||
const uint8_t LBM_LAYOUT_2x1[] = {
|
const uint8_t LBM_LAYOUT_2x1[] = {
|
||||||
@@ -66,7 +60,7 @@ class Layout2x1: public Layout
|
|||||||
|
|
||||||
rect_t getZone(unsigned int index) const override
|
rect_t getZone(unsigned int index) const override
|
||||||
{
|
{
|
||||||
if (IS_MIRRORED())
|
if (isMirrored())
|
||||||
index = 1 - index;
|
index = 1 - index;
|
||||||
|
|
||||||
rect_t zone = getMainZone({border, border, LCD_W - 2 * border, LCD_H - 2 * border});
|
rect_t zone = getMainZone({border, border, LCD_W - 2 * border, LCD_H - 2 * border});
|
||||||
|
|||||||
@@ -22,12 +22,6 @@
|
|||||||
#include "sliders.h"
|
#include "sliders.h"
|
||||||
#include "trims.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;
|
constexpr coord_t border = 10;
|
||||||
|
|
||||||
const uint8_t LBM_LAYOUT_2x2[] = {
|
const uint8_t LBM_LAYOUT_2x2[] = {
|
||||||
@@ -66,7 +60,7 @@ class Layout2x2: public Layout
|
|||||||
|
|
||||||
rect_t getZone(unsigned int index) const override
|
rect_t getZone(unsigned int index) const override
|
||||||
{
|
{
|
||||||
if (IS_MIRRORED())
|
if (isMirrored())
|
||||||
index = 3 - index;
|
index = 3 - index;
|
||||||
|
|
||||||
rect_t zone = getMainZone({border, border, LCD_W - 2 * border, LCD_H - 2 * border});
|
rect_t zone = getMainZone({border, border, LCD_W - 2 * border, LCD_H - 2 * border});
|
||||||
|
|||||||
@@ -20,12 +20,6 @@
|
|||||||
|
|
||||||
#include "opentx.h"
|
#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;
|
constexpr coord_t border = 10;
|
||||||
|
|
||||||
const uint8_t LBM_LAYOUT_2x4[] = {
|
const uint8_t LBM_LAYOUT_2x4[] = {
|
||||||
@@ -69,7 +63,7 @@ class Layout2x4: public Layout
|
|||||||
|
|
||||||
rect_t getZone(unsigned int index) const override
|
rect_t getZone(unsigned int index) const override
|
||||||
{
|
{
|
||||||
if (IS_MIRRORED())
|
if (isMirrored())
|
||||||
index = 7 - index;
|
index = 7 - index;
|
||||||
|
|
||||||
rect_t zone = getMainZone({border, border, LCD_W - 2 * border, LCD_H - 2 * border});
|
rect_t zone = getMainZone({border, border, LCD_W - 2 * border, LCD_H - 2 * border});
|
||||||
|
|||||||
Reference in New Issue
Block a user