Temporary compilation fix for VC++

This commit is contained in:
Bertrand Songis
2016-02-26 13:33:50 +01:00
parent 2b9242fac2
commit ee533c7950
9 changed files with 22 additions and 14 deletions
@@ -172,6 +172,7 @@ namespace NAMESPACE {
#include "radio/src/gui/horus/view_about.cpp"
#include "radio/src/gui/horus/lcd.cpp"
#include "radio/src/gui/horus/splash.cpp"
#include "radio/src/gui/horus/topbar.cpp"
#include "radio/src/gui/horus/theme.cpp"
#include "radio/src/gui/horus/layout.cpp"
#include "radio/src/gui/horus/widget.cpp"
+2 -2
View File
@@ -37,7 +37,7 @@ uint8_t currentZone;
#define SCREENS_SETUP_2ND_COLUMN 200
char fileSelection[sizeof(ZoneOptionValue::stringValue)];
char fileSelection[LEN_ZONE_OPTION_STRING];
uint8_t fileSelectionDone;
int updateMainviewsMenu();
@@ -47,7 +47,7 @@ void onScreenSetupMenu(const char * result);
void onZoneOptionFileSelectionMenu(const char * result)
{
if (result == STR_UPDATE_LIST) {
if (!sdListFiles(BITMAPS_PATH, BITMAPS_EXT, sizeof(ZoneOptionValue::stringValue), NULL)) {
if (!sdListFiles(BITMAPS_PATH, BITMAPS_EXT, LEN_ZONE_OPTION_STRING, NULL)) {
POPUP_WARNING(STR_NO_BITMAPS_ON_SD);
}
}
+1 -1
View File
@@ -25,7 +25,7 @@ const uint8_t LBM_TOPMENU_MASK_OPENTX[] = {
};
const ZoneOption OPTIONS_THEME_DEFAULT[] = {
{ "Background color", ZoneOption::Color, { .unsignedValue = WHITE } },
{ "Background color", ZoneOption::Color, OPTION_DEFAULT_VALUE({ .unsignedValue = WHITE }) },
{ NULL, ZoneOption::Bool }
};
+8 -1
View File
@@ -31,14 +31,21 @@ struct Zone
uint16_t x, y, w, h;
};
#define LEN_ZONE_OPTION_STRING 8
union ZoneOptionValue
{
bool boolValue;
uint32_t unsignedValue;
int32_t signedValue;
char stringValue[8];
char stringValue[LEN_ZONE_OPTION_STRING];
};
#if defined(_MSC_VER)
#define OPTION_DEFAULT_VALUE(x)
#else
#define OPTION_DEFAULT_VALUE(x) x
#endif
struct ZoneOption
{
enum Type {
+1 -1
View File
@@ -21,7 +21,7 @@
#ifndef _WIDGETS_H_
#define _WIDGETS_H_
#include "../../opentx.h"
#include "opentx.h"
#include <stdio.h>
#define OPTION_MENU_NO_FOOTER 0x01
+4 -4
View File
@@ -34,10 +34,10 @@ class GaugeWidget: public Widget
};
const ZoneOption GaugeWidget::options[] = {
{ "Source", ZoneOption::Source, { .unsignedValue = 1 } },
{ "Min", ZoneOption::Integer, { .signedValue = -RESX } },
{ "Max", ZoneOption::Integer, { .signedValue = RESX } },
{ "Color", ZoneOption::Color, { .unsignedValue = RED } },
{ "Source", ZoneOption::Source, OPTION_DEFAULT_VALUE({ .unsignedValue = 1 }) },
{ "Min", ZoneOption::Integer, OPTION_DEFAULT_VALUE({ .signedValue = -RESX }) },
{ "Max", ZoneOption::Integer, OPTION_DEFAULT_VALUE({ .signedValue = RESX }) },
{ "Color", ZoneOption::Color, OPTION_DEFAULT_VALUE({ .unsignedValue = RED }) },
{ NULL, ZoneOption::Bool }
};
+3 -3
View File
@@ -34,9 +34,9 @@ class TextWidget: public Widget
};
const ZoneOption TextWidget::options[] = {
{ "Text", ZoneOption::String, { .stringValue = { '\015', '\347', '\0', '\14', '\377', '\376', '\373', '\364' } } },
{ "Color", ZoneOption::Color, { .unsignedValue = RED } },
{ "Size", ZoneOption::TextSize, { .unsignedValue = 0 } },
{ "Text", ZoneOption::String, OPTION_DEFAULT_VALUE({ .stringValue = { '\015', '\347', '\0', '\14', '\377', '\376', '\373', '\364' } }) },
{ "Color", ZoneOption::Color, OPTION_DEFAULT_VALUE({ .unsignedValue = RED }) },
{ "Size", ZoneOption::TextSize, OPTION_DEFAULT_VALUE({ .unsignedValue = 0 }) },
{ NULL, ZoneOption::Bool }
};
+1 -1
View File
@@ -34,7 +34,7 @@ class TimerWidget: public Widget
};
const ZoneOption TimerWidget::options[] = {
{ "Timer source", ZoneOption::Timer, { .unsignedValue = 0 } },
{ "Timer source", ZoneOption::Timer, OPTION_DEFAULT_VALUE({ .unsignedValue = 0 }) },
{ NULL, ZoneOption::Bool }
};
+1 -1
View File
@@ -34,7 +34,7 @@ class ValueWidget: public Widget
};
const ZoneOption ValueWidget::options[] = {
{ "Source", ZoneOption::Source, { .unsignedValue = MIXSRC_Rud } },
{ "Source", ZoneOption::Source, OPTION_DEFAULT_VALUE({ .unsignedValue = MIXSRC_Rud }) },
{ NULL, ZoneOption::Bool }
};