@@ -48,7 +48,7 @@ void CurveDataEdit::update()
|
||||
uint8_t curvePointsCount = 5 + curve.points;
|
||||
|
||||
// Point number
|
||||
for (uint8_t i = 0; i < curvePointsCount; i++) {
|
||||
for (int i = 0; i < curvePointsCount; i++) {
|
||||
auto txt = new StaticText(
|
||||
this,
|
||||
{i * boxWidth + PAGE_PADDING, 10, boxWidth - PAGE_PADDING, boxHeight},
|
||||
@@ -60,7 +60,7 @@ void CurveDataEdit::update()
|
||||
// x value
|
||||
if (curve.type == CURVE_TYPE_CUSTOM) {
|
||||
// Adjustable points for custom curves
|
||||
for (uint8_t i = 0; i < curvePointsCount; i++) {
|
||||
for (int i = 0; i < curvePointsCount; i++) {
|
||||
int8_t* points = curveAddress(index);
|
||||
auto pointEdit = new NumberEdit(
|
||||
this,
|
||||
|
||||
@@ -174,7 +174,9 @@ class CurveEditWindow : public Page
|
||||
curve.type = newValue;
|
||||
}
|
||||
SET_DIRTY();
|
||||
curveEdit->update();
|
||||
curveEdit->updatePreview();
|
||||
curveDataEdit->clear();
|
||||
curveDataEdit->update();
|
||||
}
|
||||
});
|
||||
|
||||
@@ -196,7 +198,9 @@ class CurveEditWindow : public Page
|
||||
}
|
||||
curve.points = newValue;
|
||||
SET_DIRTY();
|
||||
curveEdit->update();
|
||||
curveEdit->updatePreview();
|
||||
curveDataEdit->clear();
|
||||
curveDataEdit->update();
|
||||
}
|
||||
});
|
||||
edit->setSuffix(STR_PTS);
|
||||
@@ -208,7 +212,7 @@ class CurveEditWindow : public Page
|
||||
[=](int32_t newValue) {
|
||||
g_model.curves[index].smooth = newValue;
|
||||
SET_DIRTY();
|
||||
curveEdit->update();
|
||||
curveEdit->updatePreview();
|
||||
});
|
||||
grid.nextLine();
|
||||
}
|
||||
|
||||
@@ -622,6 +622,16 @@ class ModuleWindow : public FormGroup {
|
||||
rfChoice->setFocus(SET_FOCUS_DEFAULT);
|
||||
});
|
||||
}
|
||||
else if (isModuleFlySky(moduleIdx)) {
|
||||
rfChoice = new Choice(this, grid.getFieldSlot(2, 1), STR_FLYSKY_PROTOCOLS, 0, MODULE_SUBTYPE_ISRM_PXX2_ACCST_LR12,
|
||||
GET_DEFAULT(g_model.moduleData[moduleIdx].subType),
|
||||
[=](int32_t newValue) {
|
||||
g_model.moduleData[moduleIdx].subType = newValue;
|
||||
SET_DIRTY();
|
||||
update();
|
||||
rfChoice->setFocus(SET_FOCUS_DEFAULT);
|
||||
});
|
||||
}
|
||||
#if defined(MULTIMODULE)
|
||||
else if (isModuleMultimodule(moduleIdx)) {
|
||||
Choice * mmSubProtocol = nullptr;
|
||||
|
||||
@@ -59,7 +59,7 @@ class RadioAnalogsDiagsWindow: public Window {
|
||||
dc->drawLine(touchState.x - 10, touchState.y - 8 - parent->top(), touchState.x + 10, touchState.y + 8 - parent->top(), SOLID, 0);
|
||||
dc->drawLine(touchState.x - 10, touchState.y + 8 - parent->top(), touchState.x + 10, touchState.y - 8- parent->top(), SOLID, 0);
|
||||
}
|
||||
#if !defined(SIMU)
|
||||
#if !defined(SIMU) && !defined(PCBNV14)
|
||||
constexpr coord_t y1 = MENU_CONTENT_TOP + 6 * FH;
|
||||
coord_t x1 = MENUS_MARGIN_LEFT;
|
||||
x1 = dc->drawText(x1, y1, "Touch GT911 FW ver:") + 8;
|
||||
|
||||
@@ -462,7 +462,7 @@ BitmapBuffer * Theme480::currentMenuBackground = nullptr;
|
||||
|
||||
Theme480 Theme480;
|
||||
|
||||
#if LCD_W == 480
|
||||
#if LCD_W == 480 || LCD_H == 480
|
||||
OpenTxTheme * defaultTheme = &Theme480;
|
||||
Theme * theme = &Theme480;
|
||||
#endif
|
||||
|
||||
@@ -454,9 +454,9 @@ BitmapBuffer * FlyskyTheme::menuIconNormal[MENUS_ICONS_COUNT] = { nullptr };
|
||||
BitmapBuffer * FlyskyTheme::menuIconSelected[MENUS_ICONS_COUNT] = { nullptr };
|
||||
BitmapBuffer * FlyskyTheme::currentMenuBackground = nullptr;
|
||||
|
||||
FlyskyTheme flyskyTheme;
|
||||
/*FlyskyTheme flyskyTheme;
|
||||
|
||||
#if defined(PCBFLYSKY)
|
||||
OpenTxTheme * defaultTheme = &flyskyTheme;
|
||||
Theme * theme = &flyskyTheme;
|
||||
#endif
|
||||
#endif*/
|
||||
|
||||
@@ -96,12 +96,15 @@ void ViewTextWindow::checkEvents()
|
||||
coord_t deltaY;
|
||||
event_t event = getWindowEvent();
|
||||
|
||||
#if defined(ROTARY_ENCODER_NAVIGATION)
|
||||
if (event == EVT_ROTARY_LEFT || event == EVT_ROTARY_RIGHT) {
|
||||
deltaY = ROTARY_ENCODER_SPEED() * step;
|
||||
} else {
|
||||
deltaY = step;
|
||||
}
|
||||
|
||||
#else
|
||||
deltaY = step;
|
||||
#endif
|
||||
switch (event) {
|
||||
CASE_EVT_KEY_NEXT_LINE:
|
||||
currentPos += deltaY;
|
||||
@@ -259,12 +262,16 @@ void ViewTextWindow::checkEvents()
|
||||
coord_t deltaY;
|
||||
event_t event = getWindowEvent();
|
||||
|
||||
#if defined(ROTARY_ENCODER_NAVIGATION)
|
||||
if (event == EVT_ROTARY_LEFT || event == EVT_ROTARY_RIGHT) {
|
||||
deltaY = ROTARY_ENCODER_SPEED() * step;
|
||||
} else {
|
||||
deltaY = step;
|
||||
}
|
||||
|
||||
#else
|
||||
deltaY = step;
|
||||
#endif
|
||||
|
||||
int lineStep = deltaY / step;
|
||||
if(lineStep > (maxScreenLines >> 1)) lineStep = maxScreenLines >> 1;
|
||||
/*
|
||||
|
||||
@@ -628,6 +628,13 @@ bool isInternalModuleAvailable(int moduleType)
|
||||
return true;
|
||||
#endif
|
||||
}
|
||||
|
||||
#if (defined(AFHDS3) || defined(AFHDS2A)) && (defined(INTERNAL_MODULE_AFHDS2A) || defined(INTERNAL_MODULE_AFHDS3))
|
||||
if (moduleType == MODULE_TYPE_AFHDS3) {
|
||||
return true;
|
||||
}
|
||||
#endif
|
||||
|
||||
return false;
|
||||
}
|
||||
#else
|
||||
|
||||
Reference in New Issue
Block a user