Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add SF/LS custom names + new "SAFE" LS #2085

Open
wants to merge 127 commits into
base: main
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
127 commits
Select commit Hold shift + click to select a range
0c0acb8
special functions gui
shane-droid Jun 2, 2022
4edc814
Update yaml_datastructs_funcs.cpp
shane-droid Jun 4, 2022
6666406
Update special_functions.cpp
shane-droid Jun 4, 2022
219a16b
Update special_functions.cpp
shane-droid Jun 4, 2022
8e29612
Update en.h
shane-droid Jun 4, 2022
c82b319
Update translations.cpp
shane-droid Jun 4, 2022
2297c59
Update special_functions.cpp
shane-droid Jun 4, 2022
281c8f8
Update special_functions.cpp
shane-droid Jun 7, 2022
c49ef97
radio\src\translations\en.h
shane-droid Jun 7, 2022
3252edc
Update en.h
shane-droid Jun 7, 2022
d9e0dc6
radio\src\gui\colorlcd\special_functions.cpp
shane-droid Jun 7, 2022
f9627d0
new logic switch family
shane-droid Jun 12, 2022
dd0504c
new logical switch function in dropdown
shane-droid Jun 12, 2022
5033fde
English translations
shane-droid Jun 12, 2022
41548d8
new logic switch type Safe graphical display
shane-droid Jun 13, 2022
9d201a2
evaluation logic for LogicSwitchFunctionSafe: disassociates the AndSw…
shane-droid Jun 14, 2022
92018c9
removed AndSw for Logic Switch mode Safe
shane-droid Jun 14, 2022
5d060c2
update gui for new logic switch type
shane-droid Jun 14, 2022
2682362
translations non English Texts
shane-droid Jun 20, 2022
b4789a4
Merge branch '24Sept22MainMerge' into main-LogicSwitch2
shane-droid Sep 24, 2022
1b606c4
Merge pull request #2 from shane-droid/main-LogicSwitch2
shane-droid Sep 24, 2022
ddaaca3
chore: Set codename
pfeerick Sep 26, 2022
474790b
fix(color): Remove Main View - Main Zone left side offset (#2374)
banyaszg Sep 27, 2022
8f8dd9c
feat(color): More tuning of rotary encoder acc, enable for color pick…
raphaelcoeffic Sep 27, 2022
4b02532
fix(lua): lcd.drawGauge wide gauge error (#2375)
banyaszg Sep 27, 2022
1095de2
fix(color): Unify button colors (#2367)
raphaelcoeffic Sep 27, 2022
27c9800
fix(color): Lua vertical font alignment corrections (#2371)
gagarinlg Sep 27, 2022
ceac581
feat: Updated German translations 🇩🇪 (#2360)
ParkerEde Sep 27, 2022
021b603
fix(cpn): Calculated telemetery sensors in simulator not updating (#2…
mha1 Sep 27, 2022
58abf77
feat: Support for 8s Cell Sensor such as FrSky FLVS ADV (#2302)
mha1 Sep 27, 2022
f218d00
feat(lua): Add getSourceValue (#2316)
jfrickmann Sep 27, 2022
4b5c707
fix(cpn): Start up interface error 301 (#2378)
Sep 28, 2022
e9ba3fa
fix(color): Radio tools buttons fit screen better (#2377)
pfeerick Sep 28, 2022
15cb0ff
update x10 datastruct
shane-droid Oct 1, 2022
bd5874a
print logic switch safe
shane-droid Oct 1, 2022
7628fbd
bug: re enabled logic switch sticky.
shane-droid Oct 1, 2022
e145753
storage conversions for Logic switch Safe
shane-droid Oct 1, 2022
ae076ee
Companion: new Logic Switch & Friendly Name Label
shane-droid Oct 1, 2022
d397436
fix: volume controlled by I2C on taranis targets
raphaelcoeffic Sep 28, 2022
690efe4
fix(color): Deleting empty label caused EM/Hang (#2392)
dlktdr Sep 28, 2022
4e17445
fix(color): focus order after layout choice (#2394)
raphaelcoeffic Sep 28, 2022
6fe199e
fix: default input names on model creation (#2395)
raphaelcoeffic Sep 28, 2022
4fb843d
fix(gui): vertical tab title alignment on color lcd radios fixed (#2402)
gagarinlg Sep 28, 2022
235336e
feat: More Swedish translations 🇸🇪 (#2382)
ulfhedlund Sep 29, 2022
074fa23
chore: Add new radios to bug support form
pfeerick Sep 29, 2022
04d6a33
chore: Typo in bug template
pfeerick Sep 29, 2022
0b89066
fix(color): Trainer stick labels not updating (#2401)
pfeerick Sep 29, 2022
9b917f3
feat: More German translations 🇩🇪 (#2380)
ParkerEde Sep 29, 2022
d033b1e
fix(cpn): Model print pot warnings (#2421)
Sep 30, 2022
742628a
fix(color): Restore "go to channel monitor" Button (#2390)
eshifri Sep 30, 2022
d7a5411
fix(color): Add extra line in telemetry screen for vertical LCD (#2422)
eshifri Sep 30, 2022
baeb2cf
fix(cpn): Model print remove B&W EEPROM size (#2426)
Sep 30, 2022
d466bb1
fix(color): Move mdls not in models.yml to `/Models/Unused` (#2397)
dlktdr Oct 1, 2022
b7f46e4
feat: Change extension on models.yml to prevent second parsing (#2430)
dlktdr Oct 1, 2022
5d9e2af
fix(lua): drawTextLines line height now same as older ETX versions (#…
gagarinlg Oct 1, 2022
9dd697a
Companion: custom function Friendly Name Label
shane-droid Oct 1, 2022
c60f703
logic sw & custom fn: friendly name copy & paste
shane-droid Oct 2, 2022
b206052
fix: auto-switch timeout raised to 1s (#2433)
raphaelcoeffic Oct 1, 2022
074ed58
fix: "Show Channel Monitor" btn only on touch only radios
pfeerick Oct 1, 2022
0003f2a
feat(color): Bigger menu toolbar icons, outlines around menu (#2435)
gagarinlg Oct 1, 2022
bc01eaa
fix(color): Prevent occasional false duplicate models (#2429)
dlktdr Oct 2, 2022
723266e
fix(color): Logical switches monitor fix (#2410)
banyaszg Oct 2, 2022
5db27b0
fix(cpn): Crash when "Set Main Screen" GF used and no model exists (#…
eshifri Oct 2, 2022
e100500
fix(color): Remove rem. `Window::setTextFlags()` font change usage (#…
banyaszg Oct 2, 2022
8c6e475
fix(color): Unable to paste after Copy/Move of a mixer line (#2423)
eshifri Sep 30, 2022
d0a5235
fix: R9M access subtype (#2211)
raphaelcoeffic Oct 2, 2022
ab6e6de
fix: TW translation missing line (#2486)
richardclli Oct 6, 2022
0dff286
special funcns: stop data loss in selectin new ch
shane-droid Oct 6, 2022
9d9afeb
companion: display LS friendly name in Comboxes
shane-droid Oct 8, 2022
fecb6cf
Companion: bug: display correct name
shane-droid Oct 8, 2022
2eafa2d
feat: More Companion and Radio Danish translation tweaks (#2453)
HThuren Oct 3, 2022
dd5c5aa
feat: More Swedish Companion and Radio translation tweaks (#2450)
ulfhedlund Oct 3, 2022
8969bf2
fix: Correct errors in labels.yml if modelname is full length (#2448)
dlktdr Oct 3, 2022
86119f6
fix(color): various menu toolbar fixes (#2445)
raphaelcoeffic Oct 3, 2022
4df7e50
fix(lua): Touch events preventing rotary encoder events being detecte…
raphaelcoeffic Oct 3, 2022
037c4ad
fix(color): set current model after label update (#2476)
raphaelcoeffic Oct 6, 2022
085d4ae
fix(color): Changes to widget options not always being saved (#2475)
mha1 Oct 6, 2022
fec87e1
chore: Remove unnecessary BREAKSPACE (#2432)
raphaelcoeffic Oct 6, 2022
2c6f78e
fix(color): some lines containing boxes could be scrolled horizontall…
raphaelcoeffic Oct 6, 2022
5efadcc
fix(multi): set bind status explicitly when aborted manually (#2455)
raphaelcoeffic Oct 6, 2022
9d4fe9b
fix(color): Missing highlight of the Min/Max value in output editor (…
gagarinlg Oct 6, 2022
ea671e9
fix(color): Reduce menu outline to two pixels
pfeerick Oct 8, 2022
f988a82
companion: dynamily populate list with LS name
shane-droid Oct 8, 2022
21fc7a1
TODO: put LS friendly name on radio output window.
shane-droid Oct 8, 2022
593d99e
Merge branch '2.8' into main-LogicSwitch2
shane-droid Oct 9, 2022
b438f18
display friendly LS name on viewlayout
shane-droid Oct 9, 2022
56a0330
cpn: refresh all model refs to LS when name changed. UI tweaks.
Oct 9, 2022
b109d7d
Companion: model edit Mixes view shows Mix name in a column for easy …
shane-droid Oct 10, 2022
13581d1
special functions gui
shane-droid Jun 2, 2022
5c16aef
Update yaml_datastructs_funcs.cpp
shane-droid Jun 4, 2022
00030de
Update special_functions.cpp
shane-droid Jun 4, 2022
9d588e6
Update special_functions.cpp
shane-droid Jun 4, 2022
843ae4d
Update en.h
shane-droid Jun 4, 2022
114c69d
Update translations.cpp
shane-droid Jun 4, 2022
39661a0
Update special_functions.cpp
shane-droid Jun 4, 2022
ba8a0f7
Update special_functions.cpp
shane-droid Jun 7, 2022
41782df
radio\src\translations\en.h
shane-droid Jun 7, 2022
b372cd3
Update en.h
shane-droid Jun 7, 2022
195c325
radio\src\gui\colorlcd\special_functions.cpp
shane-droid Jun 7, 2022
d1ae63d
new logic switch family
shane-droid Jun 12, 2022
767b765
new logical switch function in dropdown
shane-droid Jun 12, 2022
90d27e7
English translations
shane-droid Jun 12, 2022
3da59ea
new logic switch type Safe graphical display
shane-droid Jun 13, 2022
c7c7512
evaluation logic for LogicSwitchFunctionSafe: disassociates the AndSw…
shane-droid Jun 14, 2022
5a631cd
removed AndSw for Logic Switch mode Safe
shane-droid Jun 14, 2022
19cdbfd
update gui for new logic switch type
shane-droid Jun 14, 2022
42331d9
translations non English Texts
shane-droid Jun 20, 2022
7c19f89
print logic switch safe
shane-droid Oct 1, 2022
52601fd
bug: re enabled logic switch sticky.
shane-droid Oct 1, 2022
f380a35
storage conversions for Logic switch Safe
shane-droid Oct 1, 2022
45b0b7b
Companion: new Logic Switch & Friendly Name Label
shane-droid Oct 1, 2022
207650e
Companion: custom function Friendly Name Label
shane-droid Oct 1, 2022
776ead9
logic sw & custom fn: friendly name copy & paste
shane-droid Oct 2, 2022
3e8b1ab
special funcns: stop data loss in selectin new ch
shane-droid Oct 6, 2022
a54b5e4
companion: display LS friendly name in Comboxes
shane-droid Oct 8, 2022
2fe540b
Companion: bug: display correct name
shane-droid Oct 8, 2022
29b35fd
companion: dynamily populate list with LS name
shane-droid Oct 8, 2022
6533374
TODO: put LS friendly name on radio output window.
shane-droid Oct 8, 2022
785c6b6
chore: Set codename
pfeerick Sep 26, 2022
a58c3a4
display friendly LS name on viewlayout
shane-droid Oct 9, 2022
ce36ca6
cpn: refresh all model refs to LS when name changed. UI tweaks.
Oct 9, 2022
55d0fa5
Companion: model edit Mixes view shows Mix name in a column for easy …
shane-droid Oct 10, 2022
68594e6
fix: Add missing LR3 and TX12MKII, rebase cleanup
pfeerick Dec 7, 2022
e0b2b3e
fix: Updated translation files
pfeerick Dec 7, 2022
e898e85
chore: Cleanup
pfeerick Dec 7, 2022
1391f0a
Merge branch 'main-LogicSwitch2' of https://github.com/shane-droid/ed…
shane-droid Aug 13, 2023
c6311d1
Merge branch 'main' of https://github.com/EdgeTX/edgetx into main-Log…
shane-droid Aug 13, 2023
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ project(EdgeTX)
set(VERSION_MAJOR "2")
set(VERSION_MINOR "10")
set(VERSION_REVISION "0")
set(CODENAME "dev")
set(CODENAME "FlyingDutchman")

if(MINGW OR WIN32)
set(CMAKE_OBJECT_PATH_MAX 200)
Expand Down
3 changes: 3 additions & 0 deletions companion/src/firmwares/customfunctiondata.h
Original file line number Diff line number Diff line change
Expand Up @@ -27,6 +27,8 @@
#include <QtCore>
#include <QComboBox>

#define CF_CUSTNAME_LEN 10

class Firmware;
class ModelData;
class GeneralSettings;
Expand Down Expand Up @@ -105,6 +107,7 @@ class CustomFunctionData {
unsigned int enabled; // TODO perhaps not any more the right name
unsigned int adjustMode;
int repeatParam;
char custName[CF_CUSTNAME_LEN + 1];

void convert(RadioDataConversionState & cstate);

Expand Down
4 changes: 4 additions & 0 deletions companion/src/firmwares/edgetx/yaml_customfunctiondata.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -241,6 +241,8 @@ Node convert<CustomFunctionData>::encode(const CustomFunctionData& rhs)
node["def"] = def;
}

node["custName"] = rhs.custName;

return node;
}

Expand All @@ -249,6 +251,8 @@ bool convert<CustomFunctionData>::decode(const Node& node,
{
node["swtch"] >> rhs.swtch;

node["custName"] >> rhs.custName;

int func = 0;
node["func"] >> customFnLut >> func;
rhs.func = (AssignFunc)func;
Expand Down
18 changes: 17 additions & 1 deletion companion/src/firmwares/edgetx/yaml_logicalswitchdata.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -41,6 +41,7 @@ static const YamlLookupTable funcLut = {
{LS_FN_DAPOS, "FUNC_ADIFFEGREATER"},
{LS_FN_TIMER, "FUNC_TIMER"},
{LS_FN_STICKY, "FUNC_STICKY"},
{LS_FN_SAFE, "FUNC_SAFE"},
};

static int timerValue2lsw(uint32_t t)
Expand Down Expand Up @@ -79,6 +80,12 @@ Node convert<LogicalSwitchData>::encode(const LogicalSwitchData& rhs)
def += YamlRawSwitchEncode(RawSwitch(rhs.val2));
} break;

case LS_FAMILY_SAFE: {
def += YamlRawSwitchEncode(RawSwitch(rhs.val1));
def += ",";
def += YamlRawSwitchEncode(RawSwitch(rhs.val2));
} break;

case LS_FAMILY_EDGE: {
def += YamlRawSwitchEncode(RawSwitch(rhs.val1));
def += ",";
Expand Down Expand Up @@ -116,14 +123,15 @@ Node convert<LogicalSwitchData>::encode(const LogicalSwitchData& rhs)
node["delay"] = rhs.delay;
node["duration"] = rhs.duration;
node["andsw"] = YamlRawSwitchEncode(RawSwitch(rhs.andsw));

node["custName"] = rhs.custName;
return node;
}

bool convert<LogicalSwitchData>::decode(const Node& node,
LogicalSwitchData& rhs)
{
node["func"] >> funcLut >> rhs.func;
node["custName"] >> rhs.custName;

std::string def_str;
node["def"] >> def_str;
Expand All @@ -139,6 +147,14 @@ bool convert<LogicalSwitchData>::decode(const Node& node,
rhs.val2 = YamlRawSwitchDecode(sw_str).toValue();
} break;

case LS_FAMILY_SAFE: {
std::string sw_str;
getline(def, sw_str, ',');
rhs.val1 = YamlRawSwitchDecode(sw_str).toValue();
getline(def, sw_str);
rhs.val2 = YamlRawSwitchDecode(sw_str).toValue();
} break;

case LS_FAMILY_EDGE: {
std::string sw_str;
getline(def, sw_str, ',');
Expand Down
12 changes: 10 additions & 2 deletions companion/src/firmwares/logicalswitchdata.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,7 @@

bool LogicalSwitchData::isEmpty() const
{
return (func == 0);
return (func == LS_FN_OFF);
}

CSFunctionFamily LogicalSwitchData::getFunctionFamily() const
Expand All @@ -38,6 +38,8 @@ CSFunctionFamily LogicalSwitchData::getFunctionFamily() const
return LS_FAMILY_TIMER;
else if (func == LS_FN_STICKY)
return LS_FAMILY_STICKY;
else if (func == LS_FN_SAFE)
return LS_FAMILY_SAFE;
else if (func < LS_FN_AND || func > LS_FN_ELESS)
return LS_FAMILY_VOFS;
else if (func < LS_FN_EQUAL)
Expand Down Expand Up @@ -102,6 +104,8 @@ QString LogicalSwitchData::funcToString() const
return tr("Timer");
case LS_FN_STICKY:
return tr("Sticky");
case LS_FN_SAFE:
return tr("Safe");
case LS_FN_EDGE:
return tr("Edge");
default:
Expand All @@ -111,7 +115,7 @@ QString LogicalSwitchData::funcToString() const

QString LogicalSwitchData::nameToString(int index) const
{
return RadioData::getElementName(tr("L"), index + 1, NULL, true);
return RadioData::getElementName(tr("L"), index + 1, custName, true);
}

void LogicalSwitchData::convert(RadioDataConversionState & cstate)
Expand All @@ -124,6 +128,10 @@ void LogicalSwitchData::convert(RadioDataConversionState & cstate)
val1 = RawSource(val1).convert(cstate.withComponentField("V1")).toValue();
break;
case LS_FAMILY_STICKY:
case LS_FAMILY_SAFE:
val1 = RawSwitch(val1).convert(cstate.withComponentField("V1")).toValue();
val2 = RawSwitch(val2).convert(cstate.withComponentField("V2")).toValue();
break;
case LS_FAMILY_VBOOL:
val1 = RawSwitch(val1).convert(cstate.withComponentField("V1")).toValue();
val2 = RawSwitch(val2).convert(cstate.withComponentField("V2")).toValue();
Expand Down
13 changes: 8 additions & 5 deletions companion/src/firmwares/logicalswitchdata.h
Original file line number Diff line number Diff line change
Expand Up @@ -18,11 +18,12 @@
* GNU General Public License for more details.
*/

#ifndef LOGICALSWITCHDATA_H
#define LOGICALSWITCHDATA_H
#pragma once

#include <QtCore>

#define LS_CUSTNAME_LEN 10

class RadioDataConversionState;

enum CSFunction {
Expand All @@ -47,8 +48,10 @@ enum CSFunction {
LS_FN_TIMER,
LS_FN_STICKY,
LS_FN_EDGE,
LS_FN_SAFE,
// later ... LS_FN_RANGE,
LS_FN_MAX
LS_FN_MAX,

};

enum CSFunctionFamily {
Expand All @@ -58,6 +61,7 @@ enum CSFunctionFamily {
LS_FAMILY_TIMER,
LS_FAMILY_STICKY,
LS_FAMILY_EDGE,
LS_FAMILY_SAFE,
};

class LogicalSwitchData {
Expand All @@ -76,6 +80,7 @@ class LogicalSwitchData {
unsigned int delay;
unsigned int duration;
int andsw;
char custName[LS_CUSTNAME_LEN + 1];

void clear() { memset(this, 0, sizeof(LogicalSwitchData)); }
bool isEmpty() const;
Expand All @@ -85,5 +90,3 @@ class LogicalSwitchData {
QString nameToString(int index) const;
void convert(RadioDataConversionState & cstate);
};

#endif // LOGICALSWITCHDATA_H
6 changes: 6 additions & 0 deletions companion/src/firmwares/modeldata.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -720,6 +720,12 @@ int ModelData::updateReference()
}
break;
case LS_FAMILY_STICKY:
case LS_FAMILY_SAFE:
if (lsd->val1 != 0)
updateSwitchIntRef(lsd->val1);
if (lsd->val2 != 0)
updateSwitchIntRef(lsd->val2);
break;
case LS_FAMILY_VBOOL:
oldval1 = lsd->val1;
oldval2 = lsd->val2;
Expand Down
5 changes: 3 additions & 2 deletions companion/src/firmwares/opentx/opentxeeprom.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -1355,6 +1355,7 @@ class LogicalSwitchesFunctionsTable: public ConversionTable {
addConversion(LS_FN_DAPOS, val++);
addConversion(LS_FN_TIMER, val++);
addConversion(LS_FN_STICKY, val++);
addConversion(LS_FN_SAFE, val++);
}
};

Expand Down Expand Up @@ -1410,7 +1411,7 @@ class LogicalSwitchField: public TransformedField {
v2 = csw.val2;
v3 = csw.val3;
}
else if ((csw.func >= LS_FN_AND && csw.func <= LS_FN_XOR) || csw.func == LS_FN_STICKY) {
else if ((csw.func >= LS_FN_AND && csw.func <= LS_FN_XOR) || csw.func == LS_FN_STICKY || csw.func == LS_FN_SAFE) {
switchesConversionTable->exportValue(csw.val1, v1);
switchesConversionTable->exportValue(csw.val2, v2);
}
Expand All @@ -1435,7 +1436,7 @@ class LogicalSwitchField: public TransformedField {
csw.val2 = v2;
csw.val3 = v3;
}
else if ((csw.func >= LS_FN_AND && csw.func <= LS_FN_XOR) || csw.func == LS_FN_STICKY) {
else if ((csw.func >= LS_FN_AND && csw.func <= LS_FN_XOR) || csw.func == LS_FN_STICKY || csw.func == LS_FN_SAFE) {
switchesConversionTable->importValue(v1, csw.val1);
switchesConversionTable->importValue(v2, csw.val2);
}
Expand Down
2 changes: 1 addition & 1 deletion companion/src/firmwares/rawsource.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -204,7 +204,7 @@ QString RawSource::toString(const ModelData * model, const GeneralSettings * con
return result;

case SOURCE_TYPE_CUSTOM_SWITCH:
return RawSwitch(SWITCH_TYPE_VIRTUAL, index + 1).toString();
return RawSwitch(SWITCH_TYPE_VIRTUAL, index + 1).toString(board, generalSettings, model);

case SOURCE_TYPE_CYC:
return tr("CYC%1").arg(index + 1);
Expand Down
4 changes: 2 additions & 2 deletions companion/src/firmwares/rawswitch.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -86,9 +86,9 @@ QString RawSwitch::toString(Board::Type board, const GeneralSettings * const gen

case SWITCH_TYPE_VIRTUAL:
if (modelData)
return modelData->logicalSw[index].nameToString(index-1);
return modelData->logicalSw[index - 1].nameToString(index - 1);
else
return LogicalSwitchData().nameToString(index-1);
return LogicalSwitchData().nameToString(index - 1);

case SWITCH_TYPE_FUNCTIONSWITCH:
if (!Boards::getCapability(board, Board::FunctionSwitches))
Expand Down
27 changes: 27 additions & 0 deletions companion/src/helpers.h
Original file line number Diff line number Diff line change
Expand Up @@ -250,6 +250,13 @@ extern Stopwatch gStopwatch;
class SemanticVersion
{
public:
<<<<<<< HEAD
explicit SemanticVersion(QString vers);
~SemanticVersion() = default;;

bool isValid(const QString vers);
QString toString() const;
=======
explicit SemanticVersion(const QString vers);
explicit SemanticVersion() {}
~SemanticVersion() {}
Expand All @@ -262,6 +269,7 @@ class SemanticVersion
bool fromInt(const unsigned int val);

SemanticVersion& operator=(const SemanticVersion& rhs);
>>>>>>> e898e851460f0b76873d4442cdc8144474863f5e

bool operator==(const SemanticVersion& rhs) {
return compare(rhs) == 0;
Expand All @@ -288,6 +296,21 @@ class SemanticVersion
}

private:
<<<<<<< HEAD
enum PreRelease {
PR_ALPHA = 0,
PR_BETA = 1,
PR_RC = 2,
PR_NONE = 3
};

struct Version {
int major = 0;
int minor = 1;
int patch = 0;
PreRelease preReleaseType = PR_NONE;
int preReleaseNumber = 0;
=======
enum PreReleaseTypes {
PR_ALPHA = 0,
PR_BETA,
Expand All @@ -303,13 +326,17 @@ class SemanticVersion
int patch = 0;
int preReleaseType = PR_NONE;
int preReleaseNumber = 0;
>>>>>>> e898e851460f0b76873d4442cdc8144474863f5e
};

Version version;

int compare(const SemanticVersion& other);
<<<<<<< HEAD
=======
inline QString preReleaseTypeToString() const { return PreReleaseTypesStringList.value(version.preReleaseType, ""); }
inline int preReleaseTypeToInt(QString preRelType) const { return PreReleaseTypesStringList.indexOf(preRelType); }
>>>>>>> e898e851460f0b76873d4442cdc8144474863f5e

};

Expand Down
2 changes: 2 additions & 0 deletions companion/src/modeledit/customfunctions.h
Original file line number Diff line number Diff line change
Expand Up @@ -46,6 +46,7 @@ class CustomFunctionsPanel : public GenericPanel

private slots:
void customFunctionEdited();
void onNameEdited();
void functionEdited();
void onCustomContextMenuRequested(QPoint pos);
void refreshCustomFunction(int index, bool modified=false);
Expand Down Expand Up @@ -93,6 +94,7 @@ class CustomFunctionsPanel : public GenericPanel
QSet<QString> tracksSet;
QSet<QString> scriptsSet;
int mediaPlayerCurrent;
QLineEdit * name[CPN_MAX_SPECIAL_FUNCTIONS];
QComboBox * fswtchSwtch[CPN_MAX_SPECIAL_FUNCTIONS];
QComboBox * fswtchFunc[CPN_MAX_SPECIAL_FUNCTIONS];
QCheckBox * fswtchParamGV[CPN_MAX_SPECIAL_FUNCTIONS];
Expand Down
Loading