Skip to content

Commit f00e67d

Browse files
committed
+2PM: fix reset behaviour by not using early reset button
1 parent 6abe15f commit f00e67d

File tree

2 files changed

+5
-2
lines changed

2 files changed

+5
-2
lines changed

mos.yml

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1437,7 +1437,6 @@ conds:
14371437
cdefs:
14381438
LED_GPIO: 0
14391439
LED_ON: 0
1440-
BTN_GPIO: 27
14411440
BTN_DOWN: 0
14421441
PRODUCT_HW_REV: "0.1.9"
14431442
STOCK_FW_MODEL: Plus2PM

src/ShellyPlus2PM/shelly_init.cpp

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -197,7 +197,11 @@ void CreatePeripherals(std::vector<std::unique_ptr<Input>> *inputs,
197197
InitSysLED(LED_GPIO, LED_ON);
198198
}
199199

200-
InitSysBtn(new_rev ? 4 : BTN_GPIO, BTN_DOWN);
200+
#if BTN_GPIO >= 0
201+
InitSysBtn(BTN_GPIO, BTN_DOWN);
202+
#else
203+
InitSysBtn(new_rev ? 4 : 27, BTN_DOWN);
204+
#endif
201205
}
202206

203207
void CreateComponents(std::vector<std::unique_ptr<Component>> *comps,

0 commit comments

Comments
 (0)