Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
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
14 changes: 11 additions & 3 deletions .github/workflows/linux-build.yml
Original file line number Diff line number Diff line change
Expand Up @@ -34,17 +34,25 @@ jobs:
- name: Determine version
id: version
run: |
BASE="$(head -n 1 VERSION | tr -d '[:space:]')"
[ -n "$BASE" ] || { echo "VERSION file is empty"; exit 1; }
if [[ "${GITHUB_REF}" == refs/tags/v* ]]; then
echo "version=${GITHUB_REF#refs/tags/v}" >> "$GITHUB_OUTPUT"
TAG="${GITHUB_REF#refs/tags/v}"
if [ "$TAG" != "$BASE" ]; then
echo "Tag v$TAG does not match VERSION file ($BASE)."
echo "Update VERSION and commit it before tagging."
exit 1
fi
echo "version=${BASE}" >> "$GITHUB_OUTPUT"
else
echo "version=0.0.0+git.$(git rev-parse --short HEAD)" >> "$GITHUB_OUTPUT"
echo "version=${BASE}+git.$(git rev-parse --short HEAD)" >> "$GITHUB_OUTPUT"
fi

- name: Build OpenEPT
run: |
mkdir -p build
cd build
qmake ../Source/OpenEPT.pro CONFIG+=release
qmake ../Source/OpenEPT.pro CONFIG+=release APP_VERSION="${{ steps.version.outputs.version }}"
make -j"$(nproc)"

- name: Create AppImage and Debian package
Expand Down
14 changes: 11 additions & 3 deletions .github/workflows/windows-build.yml
Original file line number Diff line number Diff line change
Expand Up @@ -19,10 +19,18 @@ jobs:
id: version
shell: bash
run: |
BASE="$(head -n 1 VERSION | tr -d '[:space:]')"
[ -n "$BASE" ] || { echo "VERSION file is empty"; exit 1; }
if [[ "${GITHUB_REF}" == refs/tags/v* ]]; then
echo "version=${GITHUB_REF#refs/tags/v}" >> "$GITHUB_OUTPUT"
TAG="${GITHUB_REF#refs/tags/v}"
if [ "$TAG" != "$BASE" ]; then
echo "Tag v$TAG does not match VERSION file ($BASE)."
echo "Update VERSION and commit it before tagging."
exit 1
fi
echo "version=${BASE}" >> "$GITHUB_OUTPUT"
else
echo "version=0.0.0-git.$(git rev-parse --short HEAD)" >> "$GITHUB_OUTPUT"
echo "version=${BASE}-git.$(git rev-parse --short HEAD)" >> "$GITHUB_OUTPUT"
fi

- name: Install Qt
Expand All @@ -42,7 +50,7 @@ jobs:
run: |
mkdir build
cd build
qmake ..\Source\OpenEPT.pro CONFIG+=release
qmake ..\Source\OpenEPT.pro CONFIG+=release APP_VERSION=${{ steps.version.outputs.version }}
nmake

- name: Deploy Qt runtime
Expand Down
36 changes: 36 additions & 0 deletions Source/OpenEPT.pro
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,15 @@ QT += svg
greaterThan(QT_MAJOR_VERSION, 4): QT += widgets printsupport

CONFIG += c++17

isEmpty(APP_VERSION) {
APP_VERSION = $$cat($$PWD/../VERSION, lines)
}
isEmpty(APP_VERSION) {
APP_VERSION = 0.0.0-dev
}
VERSION = $$replace(APP_VERSION, "[-+].*", "")
DEFINES += APP_VERSION=\\\"$$APP_VERSION\\\"
#DEFINES += QCUSTOMPLOT_USE_OPENGL
# You can make your code fail to compile if it uses deprecated APIs.
# In order to do so, uncomment the following line.
Expand All @@ -28,19 +37,32 @@ SOURCES += \
Processing/Parameters/deviceparamdefs.cpp \
Processing/Parameters/deviceparameters.cpp \
Processing/Parameters/parameterstore.cpp \
Processing/batteryparamsextraction.cpp \
Processing/calibrationdata.cpp \
Processing/charginganalysis.cpp \
Processing/dataprocessing.cpp \
Processing/epprocessing.cpp \
Processing/fileprocessing.cpp \
Processing/waveform.cpp \
Utility/log.cpp \
Windows/About/aboutwnd.cpp \
Windows/BatteryParams/batterycyclewnd.cpp \
Windows/BatteryParams/batteryfitintervalwnd.cpp \
Windows/BatteryParams/batteryfitqualitywnd.cpp \
Windows/BatteryParams/batteryparamsbarwnd.cpp \
Windows/BatteryParams/batteryparamsplotsettings.cpp \
Windows/BatteryParams/batteryocvanalysiswnd.cpp \
Windows/BatteryParams/batteryparamssettingsdlg.cpp \
Windows/BatteryParams/batteryparamstrendwnd.cpp \
Windows/BatteryParams/batteryparamswnd.cpp \
Windows/AddDevice/adddevicewnd.cpp \
Windows/ApplicationConf/applicationconfwnd.cpp \
Windows/Console/consolewnd.cpp \
Windows/DataAnalyzer/dataanalyzer.cpp \
Windows/DataAnalyzer/dataanalyzerprofile.cpp \
Windows/DataAnalyzer/dataanalyzerstatistics.cpp \
Windows/Device/calibrationwnd.cpp \
Windows/Device/autocalibrationwnd.cpp \
Windows/Device/configurationwnd.cpp \
Windows/Device/datastatistics.cpp \
Windows/Device/devicewnd.cpp \
Expand All @@ -66,6 +88,7 @@ HEADERS += \
Processing/Parameters/deviceparameters.h \
Processing/Parameters/parameterdefs.h \
Processing/Parameters/parameterstore.h \
Processing/batteryparamsextraction.h \
Processing/calibrationdata.h \
Processing/charginganalysis.h \
Processing/dataprocessing.h \
Expand All @@ -74,12 +97,25 @@ HEADERS += \
Processing/fileprocessing.h \
Processing/waveform.h \
Utility/log.h \
Windows/About/aboutwnd.h \
Windows/BatteryParams/batterycyclewnd.h \
Windows/BatteryParams/batteryfitintervalwnd.h \
Windows/BatteryParams/batteryfitqualitywnd.h \
Windows/BatteryParams/batteryparamsbarwnd.h \
Windows/BatteryParams/batteryparamsplotsettings.h \
Windows/BatteryParams/batteryocvanalysiswnd.h \
Windows/BatteryParams/batteryparamssettingsdlg.h \
Windows/BatteryParams/batteryparamstrendwnd.h \
Windows/BatteryParams/batteryparamswnd.h \
Windows/AddDevice/adddevicewnd.h \
Windows/ApplicationConf/applicationconfwnd.h \
Windows/Console/consolewnd.h \
Windows/DataAnalyzer/dataanalyzer.h \
Windows/DataAnalyzer/dataanalyzerprofile.h \
Windows/DataAnalyzer/dataanalyzerworker.h \
Windows/DataAnalyzer/dataanalyzerstatistics.h \
Windows/Device/calibrationwnd.h \
Windows/Device/autocalibrationwnd.h \
Windows/Device/configurationwnd.h \
Windows/Device/datastatistics.h \
Windows/Device/devicewnd.h \
Expand Down
97 changes: 97 additions & 0 deletions Source/Processing/Parameters/deviceparamdefs.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -29,6 +29,12 @@ QList<Params::GroupMeta> defaultGroupMeta()
"Charger Configuration",
"Charger COnfiguration if it is connected",
4
},
{
DeviceParamDefs::AcquisitionConfig,
"Acquisition",
"Application side acquisition control rules.",
5
}
};
}
Expand Down Expand Up @@ -126,6 +132,12 @@ QList<Params::SubGroupMeta> defaultSubGroupMeta()
"Charger Memory Editing",
14
},
{
DeviceParamDefs::AcquisitionControl,
"Acquisition Control",
"Rules that automatically control the acquisition.",
15
},
};
}

Expand Down Expand Up @@ -615,6 +627,48 @@ QList<Params::Param> defaultParams()
0,
false
},
{
{
"loadDacOffset",
"Load DAC Offset",
"Offset added to the requested load current before it is converted to a DAC voltage, compensates the DAC offset circuit",
"mA",
DeviceParamDefs::DeviceConfig,
DeviceParamDefs::Calibration,
Params::Access::ReadOnly,
Params::Storage::SaveOnly,
Params::Target::Device,
{},
{},
{},
{},
true,
20
},
0,
false
},
{
{
"loadDacCor",
"Load DAC Correction",
"Requested load current is multiplied with this factor before the DAC offset is added, compensates gain of the load hardware",
"",
DeviceParamDefs::DeviceConfig,
DeviceParamDefs::Calibration,
Params::Access::ReadOnly,
Params::Storage::SaveOnly,
Params::Target::Device,
{},
{},
{},
{},
true,
21
},
0,
false
},
{
{
"shuntValue",
Expand Down Expand Up @@ -1078,6 +1132,49 @@ QList<Params::Param> defaultParams()
},
0,
false
},
{
{
"acqStopOnMarkerEnabled",
"Pause Acquisition On Marker",
"Pause the acquisition when the energy point marker with the configured name is received.",
"",
DeviceParamDefs::AcquisitionConfig,
DeviceParamDefs::AcquisitionControl,
Params::Access::ReadWrite,
Params::Storage::LoadSave,
Params::Target::Application,
false,
QVariant(),
QVariant(),
{},
true,
42,
Params::Editor::CheckBox
},
false,
true
},
{
{
"acqStopOnMarkerName",
"Pause Marker Name",
"Name of the energy point marker that pauses the acquisition.",
"",
DeviceParamDefs::AcquisitionConfig,
DeviceParamDefs::AcquisitionControl,
Params::Access::ReadWrite,
Params::Storage::LoadSave,
Params::Target::Application,
"",
QVariant(),
QVariant(),
{},
true,
43
},
"",
true
}
};
}
Expand Down
6 changes: 4 additions & 2 deletions Source/Processing/Parameters/deviceparamdefs.h
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,8 @@ namespace DeviceParamDefs
ApplicationConfig = 1,
RuntimeState = 2,
Calculated = 3,
ChargerConfig = 4
ChargerConfig = 4,
AcquisitionConfig = 5
};

enum SubGroup
Expand All @@ -30,7 +31,8 @@ namespace DeviceParamDefs
Statistics = 11,
FileStorage = 12,
ChargerConf = 13,
ChargerBD = 14
ChargerBD = 14,
AcquisitionControl = 15
};

QList<Params::GroupMeta> defaultGroupMeta();
Expand Down
3 changes: 2 additions & 1 deletion Source/Processing/Parameters/parameterdefs.h
Original file line number Diff line number Diff line change
Expand Up @@ -37,7 +37,8 @@ namespace Params
enum class Editor
{
LineEdit,
ComboBox
ComboBox,
CheckBox
};

struct GroupMeta
Expand Down
Loading
Loading