Skip to content

Commit 95dc0e7

Browse files
markirbMarkus Kirberg
authored and
Markus Kirberg
committed
zip files
1 parent 1c3bf75 commit 95dc0e7

File tree

2 files changed

+13
-2
lines changed

2 files changed

+13
-2
lines changed

.github/workflows/build.yaml

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -30,3 +30,12 @@ jobs:
3030
name: releases-${{ matrix.model }}
3131
path: releases/**/shelly-homekit-${{ matrix.model }}.zip
3232
if-no-files-found: warn
33+
merge:
34+
needs: build
35+
runs-on: ubuntu-latest
36+
steps:
37+
- name: Merge Artifacts
38+
uses: actions/download-artifact/merge@v4
39+
with:
40+
name: all-releases
41+
pattern: release-*

src/shelly_output.cpp

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -67,8 +67,10 @@ Status OutputPin::SetState(bool on, const char *source) {
6767

6868
Status OutputPin::SetStatePWM(float duty, const char *source) {
6969
LOG(LL_INFO, ("Duty: %.3f", duty));
70-
if (duty == 0 || duty == 1) {
71-
mgos_gpio_write(pin_, duty);
70+
if (duty == 0) {
71+
mgos_pwm_set(pin_, 0, 0);
72+
} else if ( duty == 1) {
73+
mgos_gpio_write(pin_, 1);
7274
LOG(LL_INFO,
7375
("Output %d: %s (%s)", id(), (duty == 0 ? "OFF" : "ON"), source));
7476
} else {

0 commit comments

Comments
 (0)