using proper method
This commit is contained in:
@@ -7,7 +7,68 @@ on:
|
|||||||
branches:
|
branches:
|
||||||
- "master"
|
- "master"
|
||||||
|
|
||||||
jobs:
|
jobs:
|
||||||
|
buildlinux:
|
||||||
|
name: Linux x64
|
||||||
|
runs-on: ubuntu-20.04
|
||||||
|
|
||||||
|
steps:
|
||||||
|
- name: Prepare Environment
|
||||||
|
run: |
|
||||||
|
sudo apt-get install libxcb-icccm4 libxcb-image0 libxcb-keysyms1 libxcb-render-util0 libxcb-xinerama0 libxcb-randr0 libxkbcommon-x11-0
|
||||||
|
|
||||||
|
- name: Prepare Qt Libraries
|
||||||
|
uses: jurplel/install-qt-action@v3
|
||||||
|
|
||||||
|
- name: Clone
|
||||||
|
uses: actions/checkout@v3
|
||||||
|
|
||||||
|
- name: Compile
|
||||||
|
run: |
|
||||||
|
qmake CONFIG+=release PREFIX=/usr SavvyCAN.pro
|
||||||
|
make -j`grep -c ^processor /proc/cpuinfo`
|
||||||
|
|
||||||
|
- name: Package
|
||||||
|
run: |
|
||||||
|
make INSTALL_ROOT=appdir install
|
||||||
|
wget -c -nv "https://github.com/probonopd/linuxdeployqt/releases/download/continuous/linuxdeployqt-continuous-x86_64.AppImage"
|
||||||
|
chmod a+x linuxdeployqt-continuous-x86_64.AppImage
|
||||||
|
./linuxdeployqt-continuous-x86_64.AppImage appdir/usr/share/applications/SavvyCAN.desktop -appimage -extra-plugins=iconengines,platformthemes/libqgtk3.so,canbus
|
||||||
|
|
||||||
|
- uses: actions/upload-artifact@v4
|
||||||
|
with:
|
||||||
|
name: SavvyCAN-Linux_x64.AppImage
|
||||||
|
path: SavvyCAN-*x86_64.AppImage
|
||||||
|
|
||||||
|
buildmacos:
|
||||||
|
name: macOS x64
|
||||||
|
runs-on: macos-12
|
||||||
|
|
||||||
|
steps:
|
||||||
|
- name: Prepare macOS Environment
|
||||||
|
run: |
|
||||||
|
brew install qt5
|
||||||
|
brew link qt5 --force
|
||||||
|
|
||||||
|
- name: Clone
|
||||||
|
uses: actions/checkout@v3
|
||||||
|
|
||||||
|
- name: Compile
|
||||||
|
run: |
|
||||||
|
qmake CONFIG+=release CONFIG+=sdk_no_version_check SavvyCAN.pro
|
||||||
|
make -j`sysctl kern.aioprocmax | awk '{print $2}'`
|
||||||
|
|
||||||
|
- name: Package
|
||||||
|
run: |
|
||||||
|
mkdir -p SavvyCAN.app/Contents/MacOS/help
|
||||||
|
cp -R help/* SavvyCAN.app/Contents/MacOS/help
|
||||||
|
macdeployqt SavvyCAN.app -dmg
|
||||||
|
|
||||||
|
- uses: actions/upload-artifact@v4
|
||||||
|
with:
|
||||||
|
name: SavvyCAN-macOS_x64.dmg
|
||||||
|
path: SavvyCAN.dmg
|
||||||
|
|
||||||
buildwindows:
|
buildwindows:
|
||||||
name: Windows x64
|
name: Windows x64
|
||||||
runs-on: windows-2019
|
runs-on: windows-2019
|
||||||
@@ -62,7 +123,7 @@ jobs:
|
|||||||
pre-release:
|
pre-release:
|
||||||
name: "pre-release"
|
name: "pre-release"
|
||||||
runs-on: "ubuntu-latest"
|
runs-on: "ubuntu-latest"
|
||||||
needs: [buildwindows]
|
needs: [buildwindows, buildmacos, buildlinux]
|
||||||
|
|
||||||
steps:
|
steps:
|
||||||
- uses: actions/checkout@v3
|
- uses: actions/checkout@v3
|
||||||
@@ -78,5 +139,6 @@ jobs:
|
|||||||
prerelease: true
|
prerelease: true
|
||||||
title: "Development Build"
|
title: "Development Build"
|
||||||
files: |
|
files: |
|
||||||
|
SavvyCAN-Linux_x64.AppImage/SavvyCAN-*x86_64.AppImage
|
||||||
SavvyCAN-Windows_x64_CIBuild.zip
|
SavvyCAN-Windows_x64_CIBuild.zip
|
||||||
|
SavvyCAN-macOS_x64.dmg/SavvyCAN.dmg
|
||||||
|
|||||||
@@ -222,7 +222,7 @@ bool CANConManager::sendFrame(const CANFrame& pFrame)
|
|||||||
workingFrame.isReceived = false;
|
workingFrame.isReceived = false;
|
||||||
if (useSystemTime)
|
if (useSystemTime)
|
||||||
{
|
{
|
||||||
workingFrame.setTimeStamp(QCanBusFrame::TimeStamp::fromMicroSeconds(QDateTime::currentMSecsSinceEpoch()));
|
workingFrame.setTimeStamp(QCanBusFrame::TimeStamp::fromMicroSeconds(QDateTime::currentMSecsSinceEpoch() * 1000ul));
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
|
|||||||
@@ -214,7 +214,7 @@ void CANserver::readNetworkData()
|
|||||||
frame_p->setFrameType(QCanBusFrame::DataFrame);
|
frame_p->setFrameType(QCanBusFrame::DataFrame);
|
||||||
frame_p->isReceived = true;
|
frame_p->isReceived = true;
|
||||||
|
|
||||||
frame_p->setTimeStamp(QCanBusFrame::TimeStamp(0, QDateTime::currentMSecsSinceEpoch() * 1000ul));
|
frame_p->setTimeStamp(QCanBusFrame::TimeStamp::fromMicroSeconds(QDateTime::currentMSecsSinceEpoch() * 1000ul));
|
||||||
|
|
||||||
frame_p->setPayload(datagram.mid(dataByteLocation, length));
|
frame_p->setPayload(datagram.mid(dataByteLocation, length));
|
||||||
|
|
||||||
|
|||||||
@@ -685,7 +685,7 @@ void GVRetSerial::procRXChar(unsigned char c)
|
|||||||
buildTimestamp += timeBasis;
|
buildTimestamp += timeBasis;
|
||||||
if (useSystemTime)
|
if (useSystemTime)
|
||||||
{
|
{
|
||||||
buildFrame.setTimeStamp(QCanBusFrame::TimeStamp::fromMicroSeconds(QDateTime::currentMSecsSinceEpoch()));
|
buildFrame.setTimeStamp(QCanBusFrame::TimeStamp::fromMicroSeconds(QDateTime::currentMSecsSinceEpoch() * 1000ul));
|
||||||
} else {
|
} else {
|
||||||
buildFrame.setTimeStamp(QCanBusFrame::TimeStamp(0, buildTimestamp));
|
buildFrame.setTimeStamp(QCanBusFrame::TimeStamp(0, buildTimestamp));
|
||||||
}
|
}
|
||||||
@@ -771,7 +771,7 @@ void GVRetSerial::procRXChar(unsigned char c)
|
|||||||
buildTimestamp += timeBasis;
|
buildTimestamp += timeBasis;
|
||||||
if (useSystemTime)
|
if (useSystemTime)
|
||||||
{
|
{
|
||||||
buildFrame.setTimeStamp(QCanBusFrame::TimeStamp::fromMicroSeconds(QDateTime::currentMSecsSinceEpoch()));
|
buildFrame.setTimeStamp(QCanBusFrame::TimeStamp::fromMicroSeconds(QDateTime::currentMSecsSinceEpoch() * 1000ul));
|
||||||
} else {
|
} else {
|
||||||
buildFrame.setTimeStamp(QCanBusFrame::TimeStamp(0, buildTimestamp));
|
buildFrame.setTimeStamp(QCanBusFrame::TimeStamp(0, buildTimestamp));
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -493,7 +493,7 @@ void LAWICELSerial::readSerialData()
|
|||||||
|
|
||||||
if (useSystemTime)
|
if (useSystemTime)
|
||||||
{
|
{
|
||||||
buildFrame.setTimeStamp(QCanBusFrame::TimeStamp::fromMicroSeconds(QDateTime::currentMSecsSinceEpoch()));
|
buildFrame.setTimeStamp(QCanBusFrame::TimeStamp::fromMicroSeconds(QDateTime::currentMSecsSinceEpoch() * 1000ul));
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
@@ -502,13 +502,13 @@ void LAWICELSerial::readSerialData()
|
|||||||
{
|
{
|
||||||
//Four bytes after the end of the data bytes.
|
//Four bytes after the end of the data bytes.
|
||||||
buildTimestamp = mBuildLine.mid(5 + mBuildLine.mid(4, 1).toInt() * 2, 4).toInt(nullptr, 16) * 1000l;
|
buildTimestamp = mBuildLine.mid(5 + mBuildLine.mid(4, 1).toInt() * 2, 4).toInt(nullptr, 16) * 1000l;
|
||||||
|
buildFrame.setTimeStamp(QCanBusFrame::TimeStamp(0, buildTimestamp));
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
//Default to system time if timestamps are disabled.
|
//Default to system time if timestamps are disabled.
|
||||||
buildTimestamp = QDateTime::currentMSecsSinceEpoch() * 1000l;
|
buildFrame.setTimeStamp(QCanBusFrame::TimeStamp::fromMicroSeconds(QDateTime::currentMSecsSinceEpoch() * 1000ul));
|
||||||
}
|
}
|
||||||
buildFrame.setTimeStamp(QCanBusFrame::TimeStamp(0, buildTimestamp));
|
|
||||||
}
|
}
|
||||||
|
|
||||||
switch (mBuildLine[0].toLatin1())
|
switch (mBuildLine[0].toLatin1())
|
||||||
|
|||||||
@@ -302,7 +302,7 @@ void MQTT_BUS::clientMessageReceived(const QMQTT::Message& message)
|
|||||||
frame_p->isReceived = true;
|
frame_p->isReceived = true;
|
||||||
if (useSystemTime)
|
if (useSystemTime)
|
||||||
{
|
{
|
||||||
frame_p->setTimeStamp(QCanBusFrame::TimeStamp::fromMicroSeconds(QDateTime::currentMSecsSinceEpoch()));
|
frame_p->setTimeStamp(QCanBusFrame::TimeStamp::fromMicroSeconds(QDateTime::currentMSecsSinceEpoch() * 1000ul));
|
||||||
}
|
}
|
||||||
else frame_p->setTimeStamp(QCanBusFrame::TimeStamp(0, timeStamp));
|
else frame_p->setTimeStamp(QCanBusFrame::TimeStamp(0, timeStamp));
|
||||||
|
|
||||||
|
|||||||
@@ -211,7 +211,7 @@ void SerialBusConnection::framesReceived()
|
|||||||
frame_p->isReceived = !recFrame.hasLocalEcho();
|
frame_p->isReceived = !recFrame.hasLocalEcho();
|
||||||
|
|
||||||
if (useSystemTime) {
|
if (useSystemTime) {
|
||||||
frame_p->setTimeStamp(QCanBusFrame::TimeStamp::fromMicroSeconds(QDateTime::currentMSecsSinceEpoch()));
|
frame_p->setTimeStamp(QCanBusFrame::TimeStamp::fromMicroSeconds(QDateTime::currentMSecsSinceEpoch() * 1000ul));
|
||||||
}
|
}
|
||||||
else frame_p->setTimeStamp(QCanBusFrame::TimeStamp(0, (recFrame.timeStamp().seconds() * 1000000ul + recFrame.timeStamp().microSeconds()) - timeBasis));
|
else frame_p->setTimeStamp(QCanBusFrame::TimeStamp(0, (recFrame.timeStamp().seconds() * 1000000ul + recFrame.timeStamp().microSeconds()) - timeBasis));
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user