Skip to content

Commit

Permalink
Add workflow_dispatch to builds
Browse files Browse the repository at this point in the history
  • Loading branch information
HTRamsey authored and Holden committed Oct 23, 2024
1 parent b9ab7b2 commit ac3cbb1
Show file tree
Hide file tree
Showing 7 changed files with 82 additions and 64 deletions.
3 changes: 2 additions & 1 deletion .github/workflows/android-linux.yml
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
name: Android-Linux

on:
workflow_dispatch:
push:
branches:
- master
Expand Down Expand Up @@ -39,7 +40,7 @@ jobs:
QT_ANDROID_KEYSTORE_ALIAS: QGCAndroidKeyStore
QT_ANDROID_KEYSTORE_STORE_PASS: ${{ secrets.ANDROID_KEYSTORE_PASSWORD }}
QT_ANDROID_KEYSTORE_KEY_PASS: ${{ secrets.ANDROID_KEYSTORE_PASSWORD }}
QT_ANDROID_ABIS: ${{ matrix.BuildType == 'Release' && 'armeabi-v7a;arm64-v8a' || 'arm64-v8a' }}
QT_ANDROID_ABIS: 'arm64-v8a'

steps:
- name: Free Disk Space (Ubuntu)
Expand Down
36 changes: 18 additions & 18 deletions .github/workflows/android-windows.yml
Original file line number Diff line number Diff line change
@@ -1,23 +1,23 @@
name: Android-Windows

on:
push:
branches:
- master
- 'Stable*'
tags:
- 'v*'
paths-ignore:
- 'deploy/**'
- 'docs/**'
pull_request:
paths-ignore:
- 'deploy/**'
- 'docs/**'
- '.github/workflows/docs_deploy.yml'
- '.github/workflows/linux.yml'
- '.github/workflows/macos.yml'
- '.github/workflows/windows.yml'
# on:
# push:
# branches:
# - master
# - 'Stable*'
# tags:
# - 'v*'
# paths-ignore:
# - 'deploy/**'
# - 'docs/**'
# pull_request:
# paths-ignore:
# - 'deploy/**'
# - 'docs/**'
# - '.github/workflows/docs_deploy.yml'
# - '.github/workflows/linux.yml'
# - '.github/workflows/macos.yml'
# - '.github/workflows/windows.yml'

jobs:
build:
Expand Down
40 changes: 20 additions & 20 deletions .github/workflows/docker-linux.yml
Original file line number Diff line number Diff line change
@@ -1,25 +1,25 @@
name: Docker-Linux

on:
push:
branches:
- master
- 'Stable*'
tags:
- 'v*'
paths-ignore:
- 'android/**'
- 'deploy/**'
- 'docs/**'
pull_request:
paths-ignore:
- 'android/**'
- 'deploy/**'
- 'docs/**'
- '.github/workflows/docs_deploy.yml'
- '.github/workflows/android.yml'
- '.github/workflows/macos.yml'
- '.github/workflows/windows.yml'
# on:
# push:
# branches:
# - master
# - 'Stable*'
# tags:
# - 'v*'
# paths-ignore:
# - 'android/**'
# - 'deploy/**'
# - 'docs/**'
# pull_request:
# paths-ignore:
# - 'android/**'
# - 'deploy/**'
# - 'docs/**'
# - '.github/workflows/docs_deploy.yml'
# - '.github/workflows/android.yml'
# - '.github/workflows/macos.yml'
# - '.github/workflows/windows.yml'

jobs:
build:
Expand Down
1 change: 1 addition & 0 deletions .github/workflows/linux.yml
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
name: Linux

on:
workflow_dispatch:
push:
branches:
- master
Expand Down
40 changes: 20 additions & 20 deletions .github/workflows/macos.yml
Original file line number Diff line number Diff line change
@@ -1,25 +1,25 @@
name: MacOS

on:
push:
branches:
- master
- 'Stable*'
tags:
- 'v*'
paths-ignore:
- 'android/**'
- 'deploy/**'
- 'docs/**'
pull_request:
paths-ignore:
- 'android/**'
- 'deploy/**'
- 'docs/**'
- '.github/workflows/docs_deploy.yml'
- '.github/workflows/android.yml'
- '.github/workflows/linux.yml'
- '.github/workflows/windows.yml'
# on:
# push:
# branches:
# - master
# - 'Stable*'
# tags:
# - 'v*'
# paths-ignore:
# - 'android/**'
# - 'deploy/**'
# - 'docs/**'
# pull_request:
# paths-ignore:
# - 'android/**'
# - 'deploy/**'
# - 'docs/**'
# - '.github/workflows/docs_deploy.yml'
# - '.github/workflows/android.yml'
# - '.github/workflows/linux.yml'
# - '.github/workflows/windows.yml'

jobs:
build:
Expand Down
1 change: 1 addition & 0 deletions .github/workflows/windows.yml
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
name: Windows

on:
workflow_dispatch:
push:
branches:
- master
Expand Down
25 changes: 20 additions & 5 deletions custom/src/Drone/Drone.cc
Original file line number Diff line number Diff line change
Expand Up @@ -36,7 +36,21 @@ void Drone::adjustLights(Vehicle *vehicle, uint8_t intensity)
{
if (!readyForAdjustLights(vehicle)) return;

uint8_t current = qBound(0U, _droneFactGroup->spotlightStatus()->rawValue().toUInt(), 100U);
const uint16_t pwm = 1000 + (intensity * 9);
uint8_t count = 1;
for (const uint8_t port: _droneFactGroup->spotlightValues().keys()) {
QTimer* const porttimer = new QTimer(this);
porttimer->setInterval(50 * count);
porttimer->setSingleShot(true);
(void) porttimer->callOnTimeout([this, vehicle, porttimer, pwm, port]() {
_setServo(vehicle, port, pwm);
porttimer->deleteLater();
});
porttimer->start();
count++;
}

/*uint8_t current = qBound(0U, _droneFactGroup->spotlightStatus()->rawValue().toUInt(), 100U);
int8_t diff;
do {
diff = static_cast<int8_t>(current) - static_cast<int8_t>(intensity);
Expand All @@ -54,26 +68,27 @@ void Drone::adjustLights(Vehicle *vehicle, uint8_t intensity)
} while (diff != 0);
QTimer* const timer = new QTimer(this);
timer->setInterval(50);
timer->setInterval(100);
timer->setSingleShot(true);
(void) timer->callOnTimeout([this, vehicle, timer]() {
if (!_lightTargets.isEmpty()) {
// if (!_lightTargets.isEmpty()) {
const uint16_t pwm = 1000 + (_lightTargets.takeFirst() * 9);
for (const uint8_t port: _droneFactGroup->spotlightValues().keys()) {
QTimer* const porttimer = new QTimer(this);
porttimer->setInterval(25);
porttimer->setInterval(50);
porttimer->setSingleShot(true);
(void) porttimer->callOnTimeout([this, vehicle, porttimer, pwm, port]() {
_setServo(vehicle, port, pwm);
porttimer->deleteLater();
});
porttimer->start();
}
timer->start();
} else {
timer->deleteLater();
}
});
timer->start();
timer->start();*/
}

bool Drone::readyForToggleBeacon()
Expand Down

0 comments on commit ac3cbb1

Please sign in to comment.