From bb1a7623aa1171faf4cb1e46ad3f3b57b559a62b Mon Sep 17 00:00:00 2001 From: Pacerino Date: Fri, 28 Apr 2023 15:36:57 +0200 Subject: [PATCH 1/3] Add Extended CAN Bus Frame to SLCAN/LAWICEL --- connections/lawicel_serial.cpp | 26 ++++++++++++++++++++++++++ 1 file changed, 26 insertions(+) diff --git a/connections/lawicel_serial.cpp b/connections/lawicel_serial.cpp index b312bf7..7377151 100644 --- a/connections/lawicel_serial.cpp +++ b/connections/lawicel_serial.cpp @@ -475,6 +475,32 @@ void LAWICELSerial::readSerialData() } break; case 'T': //extended frame + //TIIIIIIIILDD. + buildFrame.setFrameId(mBuildLine.mid(1, 8).toInt(nullptr, 16)); + buildFrame.isReceived = true; + buildFrame.setFrameType(QCanBusFrame::FrameType::DataFrame); + buildFrame.setExtendedFrameFormat(true); + buildData.resize(mBuildLine.mid(9, 1).toInt()); + for (int c = 0; c < buildData.size(); c++) + { + buildData[c] = mBuildLine.mid(10 + (c*2), 2).toInt(nullptr, 16); + } + buildFrame.setPayload(buildData); + if (!isCapSuspended()) + { + /* get frame from queue */ + CANFrame* frame_p = getQueue().get(); + if(frame_p) { + //qDebug() << "Lawicel got frame on bus " << frame_p->bus; + /* copy frame */ + *frame_p = buildFrame; + checkTargettedFrame(buildFrame); + /* enqueue frame */ + getQueue().queue(); + } + else + qDebug() << "can't get a frame, ERROR"; + } break; } mBuildLine.clear(); From 356e66a80ed8aa8ea240e70929f212c27e3a304d Mon Sep 17 00:00:00 2001 From: Alexander Date: Fri, 28 Apr 2023 20:09:49 +0200 Subject: [PATCH 2/3] Update build.yml --- .github/workflows/build.yml | 93 ++----------------------------------- 1 file changed, 3 insertions(+), 90 deletions(-) diff --git a/.github/workflows/build.yml b/.github/workflows/build.yml index ae42763..871ad09 100644 --- a/.github/workflows/build.yml +++ b/.github/workflows/build.yml @@ -5,71 +5,10 @@ on: branches: - "master" -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@v3 - with: - name: SavvyCAN-Linux_x64.AppImage - path: SavvyCAN-*x86_64.AppImage - - buildmacos: - name: macOS x64 - runs-on: macos-11 - - 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@v3 - with: - name: SavvyCAN-macOS_x64.dmg - path: SavvyCAN.dmg - +jobs: buildwindows: name: Windows x64 - runs-on: windows-2019 + runs-on: self-hosted steps: - name: Prepare Qt Libraries @@ -121,7 +60,7 @@ jobs: pre-release: name: "pre-release" runs-on: "ubuntu-latest" - needs: [buildwindows, buildmacos, buildlinux] + needs: [buildwindows] steps: - uses: actions/checkout@v3 @@ -141,29 +80,3 @@ jobs: SavvyCAN-Windows_x64_CIBuild.zip SavvyCAN-macOS_x64.dmg/SavvyCAN.dmg - notify: - name: Notify Discord - runs-on: ubuntu-latest - needs: [buildwindows, buildmacos, buildlinux] - steps: - - id: msg_var - name: remove newlines - run: | - export release_msg=$(cat << EOF - ${{ github.event.head_commit.message }} - EOF - ) - release_msg="${release_msg//$'\n'/'-'}" - release_msg="${release_msg//$'\r'/'-'}" - release_msg="${release_msg//$'('/'-'}" - release_msg="${release_msg//$')'/'-'}" - echo $release_msg - echo "::set-output name=msg::$release_msg" - - - name: Notify Discord - run: | - curl -i -H "Accept: application/json" \ - -H "Content-Type:application/json" \ - -X POST \ - --data "{\"content\": null,\"embeds\": [{\"title\": \"${{ github.repository }} Build Complete\", \"description\": \"${{ steps.msg_var.outputs.msg }} \\nCommit: ${{ github.sha }}\\n[Build Artifacts](https://github.com/${{ github.repository }}/actions/runs/${{ github.run_id }}#artifacts)\", \"color\": 5131997, \"author\": { \"name\": \"Github Builds\" } } ]}" \ - https://discord.com/api/webhooks/${{ secrets.WEBHOOK_ID }}/${{ secrets.WEBHOOK_TOKEN }} From 165f8a8c6bc7aea7283a48c2fd56b9a64994b7a7 Mon Sep 17 00:00:00 2001 From: Pacerino Date: Fri, 28 Apr 2023 20:48:41 +0200 Subject: [PATCH 3/3] Revert "Update build.yml" This reverts commit 9d7e2fe77b6b1830e54e866e3dcc88e73639ecfe. --- .github/workflows/build.yml | 93 +++++++++++++++++++++++++++++++++++-- 1 file changed, 90 insertions(+), 3 deletions(-) diff --git a/.github/workflows/build.yml b/.github/workflows/build.yml index 871ad09..ae42763 100644 --- a/.github/workflows/build.yml +++ b/.github/workflows/build.yml @@ -5,10 +5,71 @@ on: branches: - "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@v3 + with: + name: SavvyCAN-Linux_x64.AppImage + path: SavvyCAN-*x86_64.AppImage + + buildmacos: + name: macOS x64 + runs-on: macos-11 + + 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@v3 + with: + name: SavvyCAN-macOS_x64.dmg + path: SavvyCAN.dmg + buildwindows: name: Windows x64 - runs-on: self-hosted + runs-on: windows-2019 steps: - name: Prepare Qt Libraries @@ -60,7 +121,7 @@ jobs: pre-release: name: "pre-release" runs-on: "ubuntu-latest" - needs: [buildwindows] + needs: [buildwindows, buildmacos, buildlinux] steps: - uses: actions/checkout@v3 @@ -80,3 +141,29 @@ jobs: SavvyCAN-Windows_x64_CIBuild.zip SavvyCAN-macOS_x64.dmg/SavvyCAN.dmg + notify: + name: Notify Discord + runs-on: ubuntu-latest + needs: [buildwindows, buildmacos, buildlinux] + steps: + - id: msg_var + name: remove newlines + run: | + export release_msg=$(cat << EOF + ${{ github.event.head_commit.message }} + EOF + ) + release_msg="${release_msg//$'\n'/'-'}" + release_msg="${release_msg//$'\r'/'-'}" + release_msg="${release_msg//$'('/'-'}" + release_msg="${release_msg//$')'/'-'}" + echo $release_msg + echo "::set-output name=msg::$release_msg" + + - name: Notify Discord + run: | + curl -i -H "Accept: application/json" \ + -H "Content-Type:application/json" \ + -X POST \ + --data "{\"content\": null,\"embeds\": [{\"title\": \"${{ github.repository }} Build Complete\", \"description\": \"${{ steps.msg_var.outputs.msg }} \\nCommit: ${{ github.sha }}\\n[Build Artifacts](https://github.com/${{ github.repository }}/actions/runs/${{ github.run_id }}#artifacts)\", \"color\": 5131997, \"author\": { \"name\": \"Github Builds\" } } ]}" \ + https://discord.com/api/webhooks/${{ secrets.WEBHOOK_ID }}/${{ secrets.WEBHOOK_TOKEN }}