Cosmetics
This commit is contained in:
@@ -27,7 +27,7 @@ const uint8_t LBM_LAYOUT_1x1[] = {
|
||||
const ZoneOption OPTIONS_LAYOUT_1x1[] = {
|
||||
{ "Top bar", ZoneOption::Bool },
|
||||
{ "Sliders+Trims", ZoneOption::Bool },
|
||||
{ NULL, ZoneOption::Bool }
|
||||
{ nullptr, ZoneOption::Bool }
|
||||
};
|
||||
|
||||
class Layout1x1: public Layout
|
||||
|
||||
@@ -26,7 +26,7 @@ const uint8_t LBM_LAYOUT_2x1[] = {
|
||||
|
||||
const ZoneOption OPTIONS_LAYOUT_2x1[] = {
|
||||
{ "Top bar", ZoneOption::Bool },
|
||||
{ NULL, ZoneOption::Bool }
|
||||
{ nullptr, ZoneOption::Bool }
|
||||
};
|
||||
|
||||
class Layout2x1: public Layout
|
||||
|
||||
@@ -33,7 +33,7 @@ const ZoneOption OPTIONS_LAYOUT_2x4[] = {
|
||||
{ " Color", ZoneOption::Color },
|
||||
{ "Panel2 background", ZoneOption::Bool },
|
||||
{ " Color", ZoneOption::Color },
|
||||
{ NULL, ZoneOption::Bool }
|
||||
{ nullptr, ZoneOption::Bool }
|
||||
};
|
||||
|
||||
class Layout2x4: public Layout
|
||||
|
||||
@@ -25,7 +25,7 @@ void onModelCustomScriptMenu(const char *result)
|
||||
ScriptData &sd = g_model.scriptsData[s_currIdx];
|
||||
|
||||
if (result == STR_UPDATE_LIST) {
|
||||
if (!sdListFiles(SCRIPTS_MIXES_PATH, SCRIPTS_EXT, sizeof(sd.file), NULL)) {
|
||||
if (!sdListFiles(SCRIPTS_MIXES_PATH, SCRIPTS_EXT, sizeof(sd.file), nullptr)) {
|
||||
POPUP_WARNING(STR_NO_SCRIPTS_ON_SD);
|
||||
}
|
||||
}
|
||||
@@ -157,7 +157,7 @@ bool menuModelCustomScripts(event_t event)
|
||||
lcdDrawText(SCRIPTS_COLUMN_STATE, y, "(killed)");
|
||||
break;
|
||||
default:
|
||||
lcdDrawNumber(SCRIPTS_COLUMN_STATE, y, luaGetCpuUsed(scriptIndex), LEFT|DEFAULT_COLOR, 0, NULL, "%");
|
||||
lcdDrawNumber(SCRIPTS_COLUMN_STATE, y, luaGetCpuUsed(scriptIndex), LEFT|DEFAULT_COLOR, 0, nullptr, "%");
|
||||
break;
|
||||
}
|
||||
scriptIndex++;
|
||||
|
||||
@@ -99,7 +99,7 @@ void setCurrentCategory(unsigned int index)
|
||||
/*if (currentCategory->size() > 0)
|
||||
setCurrentModel(0);
|
||||
else
|
||||
currentModel = NULL;*/
|
||||
currentModel = nullptr;*/
|
||||
}
|
||||
#endif
|
||||
|
||||
|
||||
@@ -95,7 +95,7 @@ void setCurrentCategory(unsigned int index)
|
||||
if (currentCategory->size() > 0)
|
||||
setCurrentModel(0);
|
||||
else
|
||||
currentModel = NULL;
|
||||
currentModel = nullptr;
|
||||
}
|
||||
|
||||
#if defined(LUA)
|
||||
@@ -511,7 +511,7 @@ bool menuModelSelect(event_t event)
|
||||
// Footer
|
||||
lcd->drawBitmap(5, LCD_H-FH-20, modelselSdFreeBitmap);
|
||||
uint32_t size = sdGetSize() / 100;
|
||||
lcdDrawNumber(22, LCD_H-FH-21, size, PREC1|FONT(XS), 0, NULL, "GB");
|
||||
lcdDrawNumber(22, LCD_H-FH-21, size, PREC1|FONT(XS), 0, nullptr, "GB");
|
||||
lcd->drawBitmap(70, LCD_H-FH-20, modelselModelQtyBitmap);
|
||||
lcdDrawNumber(92, LCD_H-FH-21, modelslist.getModelsCount(),FONT(XS));
|
||||
|
||||
|
||||
@@ -77,7 +77,7 @@ class SensorButton : public Button {
|
||||
dc->drawSolidFilledRect(2, 2, rect.w - 4, rect.h - 4, HIGHLIGHT_COLOR);
|
||||
}
|
||||
|
||||
dc->drawNumber(2, 1, number, LEFT, 0, NULL, ":");
|
||||
dc->drawNumber(2, 1, number, LEFT, 0, nullptr, ":");
|
||||
|
||||
dc->drawSizedText(SENSOR_COL1, line1, g_model.telemetrySensors[index].label, TELEM_LABEL_LEN);
|
||||
|
||||
|
||||
@@ -244,11 +244,11 @@ bool menuRadioSdManagerInfo(event_t event)
|
||||
lcdDrawText(100, 2*FH, SD_IS_HC() ? STR_SDHC_CARD : STR_SD_CARD);
|
||||
|
||||
lcdDrawText(MENUS_MARGIN_LEFT, 3*FH, STR_SD_SIZE);
|
||||
lcdDrawNumber(100, 3*FH, sdGetSize(), LEFT, 0, NULL, "M");
|
||||
lcdDrawNumber(100, 3*FH, sdGetSize(), LEFT, 0, nullptr, "M");
|
||||
|
||||
lcdDrawText(MENUS_MARGIN_LEFT, 4*FH, STR_SD_SECTORS);
|
||||
#if defined(SD_GET_FREE_BLOCKNR)
|
||||
lcdDrawNumber(100, 4*FH, SD_GET_FREE_BLOCKNR()/1000, LEFT, 0, NULL, "/");
|
||||
lcdDrawNumber(100, 4*FH, SD_GET_FREE_BLOCKNR()/1000, LEFT, 0, nullptr, "/");
|
||||
lcdDrawNumber(150, 4*FH, sdGetNoSectors()/1000, LEFT);
|
||||
#else
|
||||
lcdDrawNumber(100, 4*FH, sdGetNoSectors()/1000, LEFT, 0, NULL, "k");
|
||||
|
||||
@@ -49,7 +49,7 @@ void onScreenSetupMenu(const char * result);
|
||||
void onZoneOptionFileSelectionMenu(const char * result)
|
||||
{
|
||||
if (result == STR_UPDATE_LIST) {
|
||||
if (!sdListFiles(BITMAPS_PATH, BITMAPS_EXT, LEN_ZONE_OPTION_STRING, NULL)) {
|
||||
if (!sdListFiles(BITMAPS_PATH, BITMAPS_EXT, LEN_ZONE_OPTION_STRING, nullptr)) {
|
||||
POPUP_WARNING(STR_NO_BITMAPS_ON_SD);
|
||||
}
|
||||
}
|
||||
@@ -163,7 +163,7 @@ bool editZoneOption(coord_t y, const ZoneOption * option, ZoneOptionValue * valu
|
||||
|
||||
int getOptionsCount(const ZoneOption * options)
|
||||
{
|
||||
if (options == NULL) {
|
||||
if (options == nullptr) {
|
||||
return 0;
|
||||
}
|
||||
else {
|
||||
@@ -228,8 +228,8 @@ bool menuWidgetSettings(event_t event)
|
||||
|
||||
bool menuWidgetChoice(event_t event)
|
||||
{
|
||||
static Widget * previousWidget = NULL;
|
||||
static Widget * currentWidget = NULL;
|
||||
static Widget * previousWidget = nullptr;
|
||||
static Widget * currentWidget = nullptr;
|
||||
static std::list<const WidgetFactory *>::const_iterator iterator;
|
||||
static Widget::PersistentData tempData;
|
||||
|
||||
@@ -237,7 +237,7 @@ bool menuWidgetChoice(event_t event)
|
||||
case EVT_ENTRY:
|
||||
{
|
||||
previousWidget = currentContainer->getWidget(currentZone);
|
||||
currentContainer->setWidget(currentZone, NULL);
|
||||
currentContainer->setWidget(currentZone, nullptr);
|
||||
iterator = getRegisteredWidgets().cbegin();
|
||||
if (previousWidget) {
|
||||
const WidgetFactory * factory = previousWidget->getFactory();
|
||||
@@ -327,7 +327,7 @@ void onZoneMenu(const char * result)
|
||||
pushMenu(menuWidgetSettings);
|
||||
}
|
||||
else if (result == STR_REMOVE_WIDGET) {
|
||||
currentContainer->createWidget(currentZone, NULL);
|
||||
currentContainer->createWidget(currentZone, nullptr);
|
||||
storageDirty(EE_MODEL);
|
||||
}
|
||||
}
|
||||
@@ -403,7 +403,7 @@ T * editThemeChoice(coord_t x, coord_t y, std::list<T *> & elList, T * current,
|
||||
typename std::list<T *>::const_iterator elItr = elList.cbegin();
|
||||
|
||||
if (!elCount)
|
||||
return NULL;
|
||||
return nullptr;
|
||||
|
||||
for (; elItr != elList.cend(); ++elItr, ++currentIndex) {
|
||||
if ((*elItr) == current)
|
||||
@@ -461,10 +461,10 @@ T * editThemeChoice(coord_t x, coord_t y, std::list<T *> & elList, T * current,
|
||||
if (elItr != elList.cend())
|
||||
return (*elItr);
|
||||
else
|
||||
return NULL;
|
||||
return nullptr;
|
||||
}
|
||||
}
|
||||
return NULL;
|
||||
return nullptr;
|
||||
}
|
||||
|
||||
enum menuScreensThemeItems {
|
||||
@@ -550,7 +550,7 @@ enum MenuScreenSetupItems {
|
||||
|
||||
bool menuScreenSetup(int index, event_t event)
|
||||
{
|
||||
if (customScreens[index] == NULL) {
|
||||
if (customScreens[index] == nullptr) {
|
||||
return menuScreenAdd(event);
|
||||
}
|
||||
|
||||
@@ -625,7 +625,7 @@ bool menuScreenSetup(int index, event_t event)
|
||||
memmove(&customScreens[index], &customScreens[index + 1], sizeof(Layout *) * (MAX_CUSTOM_SCREENS - index - 1));
|
||||
}
|
||||
memset(&g_model.screenData[MAX_CUSTOM_SCREENS-1], 0, sizeof(CustomScreenData));
|
||||
customScreens[MAX_CUSTOM_SCREENS-1] = NULL;
|
||||
customScreens[MAX_CUSTOM_SCREENS-1] = nullptr;
|
||||
loadCustomScreens();
|
||||
killEvents(KEY_ENTER);
|
||||
chainMenu(menuTabScreensSetup[index > 0 ? index : 1]);
|
||||
|
||||
@@ -23,9 +23,9 @@
|
||||
//#include "modal_window.h"
|
||||
|
||||
extern ThemeBase * defaultTheme;
|
||||
const BitmapBuffer * ThemeBase::asterisk = NULL;
|
||||
const BitmapBuffer * ThemeBase::question = NULL;
|
||||
const BitmapBuffer * ThemeBase::busy = NULL;
|
||||
const BitmapBuffer * ThemeBase::asterisk = nullptr;
|
||||
const BitmapBuffer * ThemeBase::question = nullptr;
|
||||
const BitmapBuffer * ThemeBase::busy = nullptr;
|
||||
|
||||
const uint8_t LBM_FOLDER[] = {
|
||||
#include "mask_folder.lbm"
|
||||
|
||||
@@ -79,13 +79,13 @@ void drawSingleMixerBar(coord_t x, coord_t y, coord_t w, coord_t h, uint8_t chan
|
||||
lcdDrawSolidFilledRect(x, y, w, h, BARGRAPH_BGCOLOR);
|
||||
if (chanVal > 0) {
|
||||
lcdDrawSolidFilledRect(x + w / 2, y, divRoundClosest(chanVal * w, VIEW_CHANNELS_LIMIT_PCT * 2), h, BARGRAPH2_COLOR);
|
||||
lcdDrawNumber(x - 10 + w / 2, y - 2, displayVal, FONT(XS) | DEFAULT_COLOR | RIGHT, 0, NULL, "%");
|
||||
lcdDrawNumber(x - 10 + w / 2, y - 2, displayVal, FONT(XS) | DEFAULT_COLOR | RIGHT, 0, nullptr, "%");
|
||||
}
|
||||
else if (chanVal < 0) {
|
||||
const uint16_t endpoint = x + w / 2;
|
||||
const uint16_t size = divRoundClosest(-chanVal * w, VIEW_CHANNELS_LIMIT_PCT * 2);
|
||||
lcdDrawSolidFilledRect(endpoint - size, y, size, h, BARGRAPH2_COLOR);
|
||||
lcdDrawNumber(x + 10 + w / 2, y - 2, displayVal, FONT(XS) | DEFAULT_COLOR, 0, NULL, "%");
|
||||
lcdDrawNumber(x + 10 + w / 2, y - 2, displayVal, FONT(XS) | DEFAULT_COLOR, 0, nullptr, "%");
|
||||
}
|
||||
|
||||
lcd->drawSolidVerticalLine(x + w / 2, y, h, DEFAULT_COLOR);
|
||||
@@ -101,13 +101,13 @@ void drawSingleOutputBar(coord_t x, coord_t y, coord_t w, coord_t h, uint8_t cha
|
||||
lcdDrawSolidFilledRect(x, y, w, h, BARGRAPH_BGCOLOR);
|
||||
if (chanVal > 0) {
|
||||
lcdDrawSolidFilledRect(x + w / 2, y, divRoundClosest(chanVal * w, VIEW_CHANNELS_LIMIT_PCT * 2), h, BARGRAPH1_COLOR);
|
||||
lcdDrawNumber(x - 10 + w / 2, y - 2, displayVal, FONT(XS) | DEFAULT_COLOR | RIGHT, 0, NULL, "%");
|
||||
lcdDrawNumber(x - 10 + w / 2, y - 2, displayVal, FONT(XS) | DEFAULT_COLOR | RIGHT, 0, nullptr, "%");
|
||||
}
|
||||
else if (chanVal < 0) {
|
||||
uint16_t endpoint = x + w / 2;
|
||||
uint16_t size = divRoundClosest(-chanVal * w, VIEW_CHANNELS_LIMIT_PCT * 2);
|
||||
lcdDrawSolidFilledRect(endpoint - size, y, size, h, BARGRAPH1_COLOR);
|
||||
lcdDrawNumber(x + 10 + w / 2, y - 2, displayVal, FONT(XS) | DEFAULT_COLOR, 0, NULL, "%");
|
||||
lcdDrawNumber(x + 10 + w / 2, y - 2, displayVal, FONT(XS) | DEFAULT_COLOR, 0, nullptr, "%");
|
||||
}
|
||||
|
||||
lcd->drawSolidVerticalLine(x + w / 2, y, h, DEFAULT_COLOR);
|
||||
@@ -126,7 +126,7 @@ void drawComboOutputBar(coord_t x, coord_t y, coord_t w, coord_t h, uint8_t chan
|
||||
lcdDrawText(x, y, chanString, FONT(XS) | DEFAULT_COLOR | LEFT);
|
||||
|
||||
lcdDrawSizedText(x + 45, y, g_model.limitData[channel].name, sizeof(g_model.limitData[channel].name), FONT(XS) | DEFAULT_COLOR | LEFT | ZCHAR);
|
||||
lcdDrawNumber(x + w, y, usValue, FONT(XS) | DEFAULT_COLOR | RIGHT, 0, NULL, STR_US);
|
||||
lcdDrawNumber(x + w, y, usValue, FONT(XS) | DEFAULT_COLOR | RIGHT, 0, nullptr, STR_US);
|
||||
|
||||
lcdDrawSolidFilledRect(x, y + Y_OUTBAR, w, h, BARGRAPH_BGCOLOR);
|
||||
lcd->drawSolidVerticalLine(x + limPos, y + Y_OUTBAR, h, MAINVIEW_GRAPHICS_COLOR);
|
||||
@@ -156,9 +156,9 @@ void drawComboOutputBar(coord_t x, coord_t y, coord_t w, coord_t h, uint8_t chan
|
||||
#endif
|
||||
lcd->drawSolidVerticalLine(x + w / 2, y + Y_OUTBAR, h, DEFAULT_COLOR);
|
||||
if (chanVal > calcRESXto100((ld && ld->revert) ? -ld->offset : ld->offset))
|
||||
lcdDrawNumber(x + limPos, y + h, chanVal, FONT(XS) | DEFAULT_COLOR | RIGHT, 0, NULL, "%");
|
||||
lcdDrawNumber(x + limPos, y + h, chanVal, FONT(XS) | DEFAULT_COLOR | RIGHT, 0, nullptr, "%");
|
||||
else
|
||||
lcdDrawNumber(x + limPos, y + h, chanVal, FONT(XS) | DEFAULT_COLOR, 0, NULL, "%");
|
||||
lcdDrawNumber(x + limPos, y + h, chanVal, FONT(XS) | DEFAULT_COLOR, 0, nullptr, "%");
|
||||
}
|
||||
|
||||
coord_t drawChannelsMonitorLegend(coord_t x, const char * s, int color)
|
||||
|
||||
@@ -119,15 +119,15 @@ bool menuStatsDebug(event_t event)
|
||||
coord_t y = MENU_CONTENT_TOP;
|
||||
|
||||
lcdDrawText(MENUS_MARGIN_LEFT, y, "Free Mem");
|
||||
lcdDrawNumber(MENU_STATS_COLUMN1, y, availableMemory(), LEFT, 0, NULL, "b");
|
||||
lcdDrawNumber(MENU_STATS_COLUMN1, y, availableMemory(), LEFT, 0, nullptr, "b");
|
||||
y += FH;
|
||||
|
||||
#if defined(LUA)
|
||||
lcdDrawText(MENUS_MARGIN_LEFT, y, "Lua scripts");
|
||||
lcdDrawText(MENU_STATS_COLUMN1, y+1, "[Duration]", HEADER_COLOR|FONT(XS));
|
||||
lcdDrawNumber(lcdNextPos+5, y, 10*maxLuaDuration, LEFT, 0, NULL, "ms");
|
||||
lcdDrawNumber(lcdNextPos+5, y, 10*maxLuaDuration, LEFT, 0, nullptr, "ms");
|
||||
lcdDrawText(lcdNextPos+20, y+1, "[Interval]", HEADER_COLOR|FONT(XS));
|
||||
lcdDrawNumber(lcdNextPos+5, y, 10*maxLuaDuration, LEFT, 0, NULL, "ms");
|
||||
lcdDrawNumber(lcdNextPos+5, y, 10*maxLuaDuration, LEFT, 0, nullptr, "ms");
|
||||
y += FH;
|
||||
|
||||
// lcdDrawText(MENUS_MARGIN_LEFT, MENU_CONTENT_TOP+line*FH, "Lua memory");
|
||||
@@ -141,7 +141,7 @@ bool menuStatsDebug(event_t event)
|
||||
#endif
|
||||
|
||||
lcdDrawText(MENUS_MARGIN_LEFT, y, STR_TMIXMAXMS);
|
||||
lcdDrawNumber(MENU_STATS_COLUMN1, y, DURATION_MS_PREC2(maxMixerDuration), PREC2|LEFT, 0, NULL, "ms");
|
||||
lcdDrawNumber(MENU_STATS_COLUMN1, y, DURATION_MS_PREC2(maxMixerDuration), PREC2|LEFT, 0, nullptr, "ms");
|
||||
y += FH;
|
||||
|
||||
lcdDrawText(MENUS_MARGIN_LEFT, y, STR_FREE_STACK);
|
||||
@@ -155,7 +155,7 @@ bool menuStatsDebug(event_t event)
|
||||
|
||||
#if defined(DISK_CACHE) && defined(DEBUG)
|
||||
lcdDrawText(MENUS_MARGIN_LEFT, y, "SD cache hits");
|
||||
lcdDrawNumber(MENU_STATS_COLUMN1, y, diskCache.getHitRate(), PREC1|LEFT, 0, NULL, "%");
|
||||
lcdDrawNumber(MENU_STATS_COLUMN1, y, diskCache.getHitRate(), PREC1|LEFT, 0, nullptr, "%");
|
||||
y += FH;
|
||||
#endif
|
||||
|
||||
@@ -195,7 +195,7 @@ bool menuStatsAnalogs(event_t event)
|
||||
for (uint8_t i=0; i<NUM_ANALOGS; i++) {
|
||||
coord_t y = MENU_CONTENT_TOP + (i/2)*FH;
|
||||
coord_t x = MENUS_MARGIN_LEFT + (i & 1 ? LCD_W/2 : 0);
|
||||
lcdDrawNumber(x, y, i+1, LEADING0|LEFT, 2, NULL, ":");
|
||||
lcdDrawNumber(x, y, i+1, LEADING0|LEFT, 2, nullptr, ":");
|
||||
lcdDrawHexNumber(x+40, y, anaIn(i));
|
||||
#if defined(JITTER_MEASURE)
|
||||
lcdDrawNumber(x+100, y, rawJitter[i].get());
|
||||
|
||||
@@ -40,7 +40,7 @@ const WidgetFactory * getWidgetFactory(const char * name)
|
||||
return (*it);
|
||||
}
|
||||
}
|
||||
return NULL;
|
||||
return nullptr;
|
||||
}
|
||||
|
||||
Widget * loadWidget(const char * name, const Zone & zone, Widget::PersistentData * persistentData)
|
||||
@@ -49,5 +49,5 @@ Widget * loadWidget(const char * name, const Zone & zone, Widget::PersistentData
|
||||
if (factory) {
|
||||
return factory->create(zone, persistentData, false);
|
||||
}
|
||||
return NULL;
|
||||
return nullptr;
|
||||
}
|
||||
|
||||
@@ -38,7 +38,7 @@ const ZoneOption GaugeWidget::options[] = {
|
||||
{ "Min", ZoneOption::Integer, OPTION_VALUE_SIGNED(-RESX), OPTION_VALUE_SIGNED(-RESX), OPTION_VALUE_SIGNED(RESX) },
|
||||
{ "Max", ZoneOption::Integer, OPTION_VALUE_SIGNED(RESX), OPTION_VALUE_SIGNED(-RESX), OPTION_VALUE_SIGNED(RESX) },
|
||||
{ "Color", ZoneOption::Color, OPTION_VALUE_UNSIGNED(RED) },
|
||||
{ NULL, ZoneOption::Bool }
|
||||
{ nullptr, ZoneOption::Bool }
|
||||
};
|
||||
|
||||
void GaugeWidget::refresh()
|
||||
@@ -64,7 +64,7 @@ void GaugeWidget::refresh()
|
||||
// Gauge
|
||||
lcdSetColor(color);
|
||||
lcdDrawSolidFilledRect(zone.x, zone.y + 16, zone.w, 16, FOCUS_COLOR);
|
||||
lcdDrawNumber(zone.x+zone.w/2, zone.y + 17, percent, FONT(XS) | CUSTOM_COLOR | CENTERED, 0, NULL, "%");
|
||||
lcdDrawNumber(zone.x+zone.w/2, zone.y + 17, percent, FONT(XS) | CUSTOM_COLOR | CENTERED, 0, nullptr, "%");
|
||||
lcd->invertRect(zone.x + w, zone.y + 16, zone.w - w, 16, CUSTOM_COLOR);
|
||||
}
|
||||
|
||||
|
||||
@@ -25,7 +25,7 @@ class ModelBitmapWidget: public Widget
|
||||
public:
|
||||
ModelBitmapWidget(const WidgetFactory * factory, const Zone & zone, Widget::PersistentData * persistentData):
|
||||
Widget(factory, zone, persistentData),
|
||||
buffer(NULL),
|
||||
buffer(nullptr),
|
||||
deps_hash(0)
|
||||
{
|
||||
}
|
||||
@@ -83,5 +83,5 @@ class ModelBitmapWidget: public Widget
|
||||
uint32_t deps_hash;
|
||||
};
|
||||
|
||||
BaseWidgetFactory<ModelBitmapWidget> modelBitmapWidget("ModelBmp", NULL);
|
||||
BaseWidgetFactory<ModelBitmapWidget> modelBitmapWidget("ModelBmp", nullptr);
|
||||
const WidgetFactory * defaultWidget = &modelBitmapWidget;
|
||||
|
||||
@@ -59,7 +59,7 @@ class OutputsWidget: public Widget
|
||||
lcdDrawSolidFilledRect((chanVal > 0 ? barMid : barMid - fillW), barTop, fillW, barH, MAINVIEW_GRAPHICS_COLOR);
|
||||
lcd->drawSolidVerticalLine(barMid, barTop, barH, MAINVIEW_GRAPHICS_COLOR);
|
||||
lcdDrawRect(x, rowTop, w, rowH + 1);
|
||||
lcdDrawNumber(x + barW - 10, barTop, chanVal, FONT(XS) | DEFAULT_COLOR | RIGHT, 0, NULL, "%");
|
||||
lcdDrawNumber(x + barW - 10, barTop, chanVal, FONT(XS) | DEFAULT_COLOR | RIGHT, 0, nullptr, "%");
|
||||
if (g_model.limitData[curChan - 1].name[0] != 0) {
|
||||
lcdDrawNumber(barLft + 1, barTop, curChan, FONT(XS) | DEFAULT_COLOR | LEFT | LEADING0, 2);
|
||||
lcdDrawSizedText(barLft + 23, barTop, g_model.limitData[curChan - 1].name, sizeof(g_model.limitData[curChan - 1].name), FONT(XS) | DEFAULT_COLOR | LEFT | ZCHAR);
|
||||
@@ -98,7 +98,7 @@ const ZoneOption OutputsWidget::options[] = {
|
||||
{ "First channel", ZoneOption::Integer, OPTION_VALUE_UNSIGNED(1), OPTION_VALUE_UNSIGNED(1), OPTION_VALUE_UNSIGNED(32) },
|
||||
{ "Fill Background?", ZoneOption::Bool, OPTION_VALUE_BOOL(false) },
|
||||
{ "BG Color", ZoneOption::Color, OPTION_VALUE_UNSIGNED(LIGHTGREY) },
|
||||
{ NULL, ZoneOption::Bool }
|
||||
{ nullptr, ZoneOption::Bool }
|
||||
};
|
||||
|
||||
|
||||
|
||||
@@ -40,7 +40,7 @@ const ZoneOption TextWidget::options[] = {
|
||||
{ "Color", ZoneOption::Color, OPTION_VALUE_UNSIGNED(RED) },
|
||||
{ "Size", ZoneOption::TextSize, OPTION_VALUE_UNSIGNED(0) },
|
||||
{ "Shadow", ZoneOption::Bool, OPTION_VALUE_BOOL(false) },
|
||||
{ NULL, ZoneOption::Bool }
|
||||
{ nullptr, ZoneOption::Bool }
|
||||
};
|
||||
|
||||
void TextWidget::refresh()
|
||||
|
||||
@@ -35,7 +35,7 @@ class TimerWidget: public Widget
|
||||
|
||||
const ZoneOption TimerWidget::options[] = {
|
||||
{ "Timer source", ZoneOption::Timer, OPTION_VALUE_UNSIGNED(0) },
|
||||
{ NULL, ZoneOption::Bool }
|
||||
{ nullptr, ZoneOption::Bool }
|
||||
};
|
||||
|
||||
void TimerWidget::refresh()
|
||||
|
||||
@@ -37,7 +37,7 @@ const ZoneOption ValueWidget::options[] = {
|
||||
{ "Source", ZoneOption::Source, OPTION_VALUE_UNSIGNED(MIXSRC_Rud) },
|
||||
{ "Color", ZoneOption::Color, OPTION_VALUE_UNSIGNED(WHITE) },
|
||||
{ "Shadow", ZoneOption::Bool, OPTION_VALUE_BOOL(false) },
|
||||
{ NULL, ZoneOption::Bool }
|
||||
{ nullptr, ZoneOption::Bool }
|
||||
};
|
||||
|
||||
void ValueWidget::refresh()
|
||||
|
||||
@@ -89,7 +89,7 @@ class WidgetsContainer: public WidgetsContainerInterface
|
||||
widgets[index] = factory->create(getZone(index), &persistentData->zones[index].widgetData);
|
||||
}
|
||||
else {
|
||||
widgets[index] = NULL;
|
||||
widgets[index] = nullptr;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user