Bsongis/move everything (#3669)
* Directories moved * Directories moved * Directories moved * Directories moved * Directories moved * rename horus directories in gui to 480x272 * Directories moved * Rename taranis to 212x64 * Directories moved - TARANIS target removed, it's now X9E / X9D+ / X9D * Directories moved - TARANIS target removed, it's now X9E / X9D+ / X9D * Directories moved - TARANIS target removed, it's now X9E / X9D+ / X9D * Directories moved - TARANIS target removed, it's now X9E / X9D+ / X9D * Directories moved - TARANIS target removed, it's now X9E / X9D+ / X9D * Directories moved - TARANIS target removed, it's now X9E / X9D+ / X9D * Directories moved - TARANIS target removed, it's now X9E / X9D+ / X9D * Fix x9e compile * Directories moved - TARANIS target removed, it's now X9E / X9D+ / X9D * Directories moved - TARANIS target removed, it's now X9E / X9D+ / X9D * Directories moved - TARANIS target removed, it's now X9E / X9D+ / X9D * Directories moved - TARANIS target removed, it's now X9E / X9D+ / X9D * Directories moved - TARANIS target removed, it's now X9E / X9D+ / X9D * Minor improvement of path handling * Another bunch of files renamed :) * Another bunch of files renamed :) * Another bunch of files renamed :) * Another bunch of files renamed :) * Another bunch of files renamed :) * Rename 9x to 128x64 * Compilation fixes * Compilation fixes * Compilation fixes * Compilation fixes * Compilation fixes * Compilation fixes
This commit is contained in:
@@ -0,0 +1,92 @@
|
||||
/*
|
||||
* Copyright (C) OpenTX
|
||||
*
|
||||
* Based on code named
|
||||
* th9x - http://code.google.com/p/th9x
|
||||
* er9x - http://code.google.com/p/er9x
|
||||
* gruvin9x - http://code.google.com/p/gruvin9x
|
||||
*
|
||||
* License GPLv2: http://www.gnu.org/licenses/gpl-2.0.html
|
||||
*
|
||||
* This program is free software; you can redistribute it and/or modify
|
||||
* it under the terms of the GNU General Public License version 2 as
|
||||
* published by the Free Software Foundation.
|
||||
*
|
||||
* This program is distributed in the hope that it will be useful,
|
||||
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||
* GNU General Public License for more details.
|
||||
*/
|
||||
|
||||
#include "opentx.h"
|
||||
|
||||
const uint8_t LBM_LAYOUT_1x1[] = {
|
||||
#include "mask_layout1x1.lbm"
|
||||
};
|
||||
|
||||
const ZoneOption OPTIONS_LAYOUT_1x1[] = {
|
||||
{ "Top bar", ZoneOption::Bool },
|
||||
{ "Sliders+Trims", ZoneOption::Bool },
|
||||
{ NULL, ZoneOption::Bool }
|
||||
};
|
||||
|
||||
class Layout1x1: public Layout
|
||||
{
|
||||
public:
|
||||
Layout1x1(const LayoutFactory * factory, Layout::PersistentData * persistentData):
|
||||
Layout(factory, persistentData)
|
||||
{
|
||||
}
|
||||
|
||||
virtual void create()
|
||||
{
|
||||
Layout::create();
|
||||
persistentData->options[0].boolValue = true;
|
||||
persistentData->options[1].boolValue = true;
|
||||
}
|
||||
|
||||
virtual unsigned int getZonesCount() const
|
||||
{
|
||||
return 1;
|
||||
}
|
||||
|
||||
virtual Zone getZone(unsigned int index) const
|
||||
{
|
||||
Zone zone = { 10, 10, LCD_W - 2*10, LCD_H - 2*10 };
|
||||
if (persistentData->options[0].boolValue) {
|
||||
zone.y += MENU_HEADER_HEIGHT;
|
||||
zone.h -= MENU_HEADER_HEIGHT;
|
||||
}
|
||||
if (persistentData->options[1].boolValue) {
|
||||
zone.x += 35;
|
||||
zone.w -= 2*35;
|
||||
zone.h -= 35;
|
||||
}
|
||||
return zone;
|
||||
}
|
||||
|
||||
virtual void refresh();
|
||||
};
|
||||
|
||||
void Layout1x1::refresh()
|
||||
{
|
||||
theme->drawBackground();
|
||||
|
||||
if (persistentData->options[0].boolValue) {
|
||||
drawTopBar();
|
||||
}
|
||||
|
||||
if (persistentData->options[1].boolValue) {
|
||||
// Sliders + Trims + Flight mode
|
||||
lcdDrawSizedText(LCD_W / 2 - getTextWidth(g_model.flightModeData[mixerCurrentFlightMode].name, sizeof(g_model.flightModeData[mixerCurrentFlightMode].name), ZCHAR | SMLSIZE) / 2,
|
||||
237,
|
||||
g_model.flightModeData[mixerCurrentFlightMode].name,
|
||||
sizeof(g_model.flightModeData[mixerCurrentFlightMode].name), ZCHAR | SMLSIZE);
|
||||
drawMainPots();
|
||||
drawTrims(mixerCurrentFlightMode);
|
||||
}
|
||||
|
||||
Layout::refresh();
|
||||
}
|
||||
|
||||
BaseLayoutFactory<Layout1x1> layout1x1("Layout1x1", LBM_LAYOUT_1x1, OPTIONS_LAYOUT_1x1);
|
||||
@@ -0,0 +1,103 @@
|
||||
/*
|
||||
* Copyright (C) OpenTX
|
||||
*
|
||||
* Based on code named
|
||||
* th9x - http://code.google.com/p/th9x
|
||||
* er9x - http://code.google.com/p/er9x
|
||||
* gruvin9x - http://code.google.com/p/gruvin9x
|
||||
*
|
||||
* License GPLv2: http://www.gnu.org/licenses/gpl-2.0.html
|
||||
*
|
||||
* This program is free software; you can redistribute it and/or modify
|
||||
* it under the terms of the GNU General Public License version 2 as
|
||||
* published by the Free Software Foundation.
|
||||
*
|
||||
* This program is distributed in the hope that it will be useful,
|
||||
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||
* GNU General Public License for more details.
|
||||
*/
|
||||
|
||||
#include "opentx.h"
|
||||
|
||||
const uint8_t LBM_LAYOUT_2P1[] = {
|
||||
#include "mask_layout2+1.lbm"
|
||||
};
|
||||
|
||||
const ZoneOption OPTIONS_LAYOUT_2P1[] = {
|
||||
{ "Top bar", ZoneOption::Bool },
|
||||
{ "Flight mode", ZoneOption::Bool },
|
||||
{ "Sliders", ZoneOption::Bool },
|
||||
{ "Trims", ZoneOption::Bool },
|
||||
{ NULL, ZoneOption::Bool }
|
||||
};
|
||||
|
||||
const Zone ZONES_LAYOUT_2P1[3] = {
|
||||
{ 240, 60, 192, 152 },
|
||||
{ 48, 60, 180, 70 },
|
||||
{ 48, 142, 180, 70 }
|
||||
};
|
||||
|
||||
class Layout2P1: public Layout
|
||||
{
|
||||
public:
|
||||
Layout2P1(const LayoutFactory * factory, Layout::PersistentData * persistentData):
|
||||
Layout(factory, persistentData)
|
||||
{
|
||||
}
|
||||
|
||||
virtual void create()
|
||||
{
|
||||
Layout::create();
|
||||
persistentData->options[0].boolValue = true;
|
||||
persistentData->options[1].boolValue = true;
|
||||
persistentData->options[2].boolValue = true;
|
||||
persistentData->options[3].boolValue = true;
|
||||
}
|
||||
|
||||
virtual unsigned int getZonesCount() const
|
||||
{
|
||||
return DIM(ZONES_LAYOUT_2P1);
|
||||
}
|
||||
|
||||
virtual Zone getZone(unsigned int index) const
|
||||
{
|
||||
return ZONES_LAYOUT_2P1[index];
|
||||
}
|
||||
|
||||
virtual void refresh();
|
||||
};
|
||||
|
||||
void Layout2P1::refresh()
|
||||
{
|
||||
theme->drawBackground();
|
||||
|
||||
if (persistentData->options[0].boolValue) {
|
||||
drawTopBar();
|
||||
}
|
||||
|
||||
if (persistentData->options[1].boolValue) {
|
||||
// Flight mode
|
||||
lcdDrawSizedText(LCD_W / 2 - getTextWidth(g_model.flightModeData[mixerCurrentFlightMode].name,
|
||||
sizeof(g_model.flightModeData[mixerCurrentFlightMode].name),
|
||||
ZCHAR | SMLSIZE) / 2,
|
||||
237,
|
||||
g_model.flightModeData[mixerCurrentFlightMode].name,
|
||||
sizeof(g_model.flightModeData[mixerCurrentFlightMode].name), ZCHAR | SMLSIZE);
|
||||
}
|
||||
|
||||
if (persistentData->options[2].boolValue) {
|
||||
// Pots and rear sliders positions
|
||||
drawMainPots();
|
||||
}
|
||||
|
||||
if (persistentData->options[3].boolValue) {
|
||||
// Trims
|
||||
drawTrims(mixerCurrentFlightMode);
|
||||
}
|
||||
|
||||
Layout::refresh();
|
||||
}
|
||||
|
||||
BaseLayoutFactory<Layout2P1> layout2P1("Layout2P1", LBM_LAYOUT_2P1, OPTIONS_LAYOUT_2P1);
|
||||
const LayoutFactory * defaultLayout = &layout2P1;
|
||||
@@ -0,0 +1,81 @@
|
||||
/*
|
||||
* Copyright (C) OpenTX
|
||||
*
|
||||
* Based on code named
|
||||
* th9x - http://code.google.com/p/th9x
|
||||
* er9x - http://code.google.com/p/er9x
|
||||
* gruvin9x - http://code.google.com/p/gruvin9x
|
||||
*
|
||||
* License GPLv2: http://www.gnu.org/licenses/gpl-2.0.html
|
||||
*
|
||||
* This program is free software; you can redistribute it and/or modify
|
||||
* it under the terms of the GNU General Public License version 2 as
|
||||
* published by the Free Software Foundation.
|
||||
*
|
||||
* This program is distributed in the hope that it will be useful,
|
||||
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||
* GNU General Public License for more details.
|
||||
*/
|
||||
|
||||
#include "opentx.h"
|
||||
|
||||
const uint8_t LBM_LAYOUT_2x1[] = {
|
||||
#include "mask_layout2x1.lbm"
|
||||
};
|
||||
|
||||
const ZoneOption OPTIONS_LAYOUT_2x1[] = {
|
||||
{ "Top bar", ZoneOption::Bool },
|
||||
{ NULL, ZoneOption::Bool }
|
||||
};
|
||||
|
||||
class Layout2x1: public Layout
|
||||
{
|
||||
public:
|
||||
Layout2x1(const LayoutFactory * factory, Layout::PersistentData * persistentData):
|
||||
Layout(factory, persistentData)
|
||||
{
|
||||
}
|
||||
|
||||
virtual void create()
|
||||
{
|
||||
Layout::create();
|
||||
persistentData->options[0].boolValue = true;
|
||||
}
|
||||
|
||||
virtual unsigned int getZonesCount() const
|
||||
{
|
||||
return 4;
|
||||
}
|
||||
|
||||
virtual Zone getZone(unsigned int index) const
|
||||
{
|
||||
Zone zone;
|
||||
zone.w = (LCD_W-3*10) / 2;
|
||||
zone.x = (index & 1) ? 20 + zone.w : 10;
|
||||
if (persistentData->options[0].boolValue) {
|
||||
zone.h = (LCD_H-MENU_HEADER_HEIGHT-2*10);
|
||||
zone.y = MENU_HEADER_HEIGHT + 10;
|
||||
}
|
||||
else {
|
||||
zone.h = (LCD_H-2*10);
|
||||
zone.y = 10;
|
||||
}
|
||||
return zone;
|
||||
}
|
||||
|
||||
virtual void refresh();
|
||||
};
|
||||
|
||||
void Layout2x1::refresh()
|
||||
{
|
||||
theme->drawBackground();
|
||||
|
||||
if (persistentData->options[0].boolValue) {
|
||||
drawTopBar();
|
||||
}
|
||||
|
||||
Layout::refresh();
|
||||
}
|
||||
|
||||
BaseLayoutFactory<Layout2x1> Layout2x1("Layout2x1", LBM_LAYOUT_2x1, OPTIONS_LAYOUT_2x1);
|
||||
@@ -0,0 +1,84 @@
|
||||
/*
|
||||
* Copyright (C) OpenTX
|
||||
*
|
||||
* Based on code named
|
||||
* th9x - http://code.google.com/p/th9x
|
||||
* er9x - http://code.google.com/p/er9x
|
||||
* gruvin9x - http://code.google.com/p/gruvin9x
|
||||
*
|
||||
* License GPLv2: http://www.gnu.org/licenses/gpl-2.0.html
|
||||
*
|
||||
* This program is free software; you can redistribute it and/or modify
|
||||
* it under the terms of the GNU General Public License version 2 as
|
||||
* published by the Free Software Foundation.
|
||||
*
|
||||
* This program is distributed in the hope that it will be useful,
|
||||
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||
* GNU General Public License for more details.
|
||||
*/
|
||||
|
||||
#include "opentx.h"
|
||||
|
||||
const uint8_t LBM_LAYOUT_2x2[] = {
|
||||
#include "mask_layout2x2.lbm"
|
||||
};
|
||||
|
||||
const ZoneOption OPTIONS_LAYOUT_2x2[] = {
|
||||
{ "Top bar", ZoneOption::Bool },
|
||||
{ NULL, ZoneOption::Bool }
|
||||
};
|
||||
|
||||
class Layout2x2: public Layout
|
||||
{
|
||||
public:
|
||||
Layout2x2(const LayoutFactory * factory, Layout::PersistentData * persistentData):
|
||||
Layout(factory, persistentData)
|
||||
{
|
||||
}
|
||||
|
||||
virtual void create()
|
||||
{
|
||||
Layout::create();
|
||||
persistentData->options[0].boolValue = true;
|
||||
}
|
||||
|
||||
virtual unsigned int getZonesCount() const
|
||||
{
|
||||
return 4;
|
||||
}
|
||||
|
||||
virtual Zone getZone(unsigned int index) const
|
||||
{
|
||||
Zone zone;
|
||||
zone.w = (LCD_W-3*10) / 2;
|
||||
zone.x = (index & 1) ? 20 + zone.w : 10;
|
||||
if (persistentData->options[0].boolValue) {
|
||||
zone.h = (LCD_H-MENU_HEADER_HEIGHT-3*10) / 2;
|
||||
zone.y = MENU_HEADER_HEIGHT + 10;
|
||||
}
|
||||
else {
|
||||
zone.h = (LCD_H-3*10) / 2;
|
||||
zone.y = 10;
|
||||
}
|
||||
if (index >= 2) {
|
||||
zone.y += 10 + zone.h;
|
||||
}
|
||||
return zone;
|
||||
}
|
||||
|
||||
virtual void refresh();
|
||||
};
|
||||
|
||||
void Layout2x2::refresh()
|
||||
{
|
||||
theme->drawBackground();
|
||||
|
||||
if (persistentData->options[0].boolValue) {
|
||||
drawTopBar();
|
||||
}
|
||||
|
||||
Layout::refresh();
|
||||
}
|
||||
|
||||
BaseLayoutFactory<Layout2x2> layout2x2("Layout2x2", LBM_LAYOUT_2x2, OPTIONS_LAYOUT_2x2);
|
||||
@@ -0,0 +1,119 @@
|
||||
/*
|
||||
* Copyright (C) OpenTX
|
||||
*
|
||||
* Based on code named
|
||||
* th9x - http://code.google.com/p/th9x
|
||||
* er9x - http://code.google.com/p/er9x
|
||||
* gruvin9x - http://code.google.com/p/gruvin9x
|
||||
*
|
||||
* License GPLv2: http://www.gnu.org/licenses/gpl-2.0.html
|
||||
*
|
||||
* This program is free software; you can redistribute it and/or modify
|
||||
* it under the terms of the GNU General Public License version 2 as
|
||||
* published by the Free Software Foundation.
|
||||
*
|
||||
* This program is distributed in the hope that it will be useful,
|
||||
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||
* GNU General Public License for more details.
|
||||
*/
|
||||
|
||||
#include "opentx.h"
|
||||
|
||||
const uint8_t LBM_LAYOUT_2x4[] = {
|
||||
#include "mask_layout2x4.lbm"
|
||||
};
|
||||
|
||||
const ZoneOption OPTIONS_LAYOUT_2x4[] = {
|
||||
{ "Top bar", ZoneOption::Bool },
|
||||
{ "Flight mode", ZoneOption::Bool },
|
||||
{ "Sliders", ZoneOption::Bool },
|
||||
{ "Trims", ZoneOption::Bool },
|
||||
{ "Panel1 background", ZoneOption::Bool },
|
||||
{ " Color", ZoneOption::Color },
|
||||
{ "Panel2 background", ZoneOption::Bool },
|
||||
{ " Color", ZoneOption::Color },
|
||||
{ NULL, ZoneOption::Bool }
|
||||
};
|
||||
|
||||
class Layout2x4: public Layout
|
||||
{
|
||||
public:
|
||||
Layout2x4(const LayoutFactory * factory, Layout::PersistentData * persistentData):
|
||||
Layout(factory, persistentData)
|
||||
{
|
||||
}
|
||||
|
||||
virtual void create()
|
||||
{
|
||||
Layout::create();
|
||||
persistentData->options[0].boolValue = true;
|
||||
persistentData->options[1].boolValue = true;
|
||||
persistentData->options[2].boolValue = true;
|
||||
persistentData->options[3].boolValue = true;
|
||||
persistentData->options[4].boolValue = true;
|
||||
persistentData->options[5].unsignedValue = RGB(77, 112, 203);
|
||||
persistentData->options[6].boolValue = false;
|
||||
persistentData->options[7].unsignedValue = RGB(77, 112, 203);
|
||||
}
|
||||
|
||||
virtual unsigned int getZonesCount() const
|
||||
{
|
||||
return 8;
|
||||
}
|
||||
|
||||
virtual Zone getZone(unsigned int index) const
|
||||
{
|
||||
Zone zone;
|
||||
zone.x = (index >= 4) ? 260 : 60;
|
||||
zone.y = 56 + (index % 4) * 42;
|
||||
zone.w = 160;
|
||||
zone.h = 32;
|
||||
return zone;
|
||||
}
|
||||
|
||||
virtual void refresh();
|
||||
};
|
||||
|
||||
void Layout2x4::refresh()
|
||||
{
|
||||
theme->drawBackground();
|
||||
|
||||
if (persistentData->options[0].boolValue) {
|
||||
drawTopBar();
|
||||
}
|
||||
|
||||
if (persistentData->options[1].boolValue) {
|
||||
// Flight mode
|
||||
lcdDrawSizedText(LCD_W / 2 - getTextWidth(g_model.flightModeData[mixerCurrentFlightMode].name,
|
||||
sizeof(g_model.flightModeData[mixerCurrentFlightMode].name),
|
||||
ZCHAR | SMLSIZE) / 2,
|
||||
237,
|
||||
g_model.flightModeData[mixerCurrentFlightMode].name,
|
||||
sizeof(g_model.flightModeData[mixerCurrentFlightMode].name), ZCHAR | SMLSIZE);
|
||||
}
|
||||
|
||||
if (persistentData->options[2].boolValue) {
|
||||
// Pots and rear sliders positions
|
||||
drawMainPots();
|
||||
}
|
||||
|
||||
if (persistentData->options[3].boolValue) {
|
||||
// Trims
|
||||
drawTrims(mixerCurrentFlightMode);
|
||||
}
|
||||
|
||||
if (persistentData->options[4].boolValue) {
|
||||
lcdSetColor(persistentData->options[5].unsignedValue);
|
||||
lcdDrawSolidFilledRect(50, 50, 180, 170, CUSTOM_COLOR);
|
||||
}
|
||||
|
||||
if (persistentData->options[6].boolValue) {
|
||||
lcdSetColor(persistentData->options[7].unsignedValue);
|
||||
lcdDrawSolidFilledRect(250, 50, 180, 170, CUSTOM_COLOR);
|
||||
}
|
||||
|
||||
Layout::refresh();
|
||||
}
|
||||
|
||||
BaseLayoutFactory<Layout2x4> layout2x4("Layout2x4", LBM_LAYOUT_2x4, OPTIONS_LAYOUT_2x4);
|
||||
Binary file not shown.
|
After Width: | Height: | Size: 169 B |
Binary file not shown.
|
After Width: | Height: | Size: 233 B |
Binary file not shown.
|
After Width: | Height: | Size: 178 B |
Binary file not shown.
|
After Width: | Height: | Size: 208 B |
Binary file not shown.
|
After Width: | Height: | Size: 212 B |
Reference in New Issue
Block a user