Skip to content

Commit

Permalink
Fix flashing H801 led at boot (arendst#7165, arendst#649)
Browse files Browse the repository at this point in the history
  • Loading branch information
Hadinger committed Dec 10, 2019
1 parent f031568 commit 96cc933
Show file tree
Hide file tree
Showing 2 changed files with 9 additions and 4 deletions.
1 change: 1 addition & 0 deletions tasmota/CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,7 @@
- Add Wifi Signal Strength in dBm in addition to RSSI Wifi Experience by Andreas Schultz (#7145)
- Add Yaw, Pitch and Roll support for MPU6050 by Philip Barclay (#7058)
- Add reporting of raw weight to JSON from HX711 to overcome auto-tare functionality by @tobox (#7171)
- Fix flashing H801 led at boot (#7165, #649)

### 7.1.2.3 20191208

Expand Down
12 changes: 8 additions & 4 deletions tasmota/support_tasmota.ino
Original file line number Diff line number Diff line change
Expand Up @@ -1286,15 +1286,19 @@ void GpioInit(void)
}
#endif // USE_SONOFF_SC

if (!light_type) {
for (uint32_t i = 0; i < MAX_PWMS; i++) { // Basic PWM control only
if (pin[GPIO_PWM1 +i] < 99) {
for (uint32_t i = 0; i < MAX_PWMS; i++) { // Basic PWM control only
if (pin[GPIO_PWM1 +i] < 99) {
pinMode(pin[GPIO_PWM1 +i], OUTPUT);
if (light_type) {
// force PWM GPIOs to low or high mode, see #7165
analogWrite(pin[GPIO_PWM1 +i], bitRead(pwm_inverted, i) ? Settings.pwm_range : 0);
} else {
pwm_present = true;
pinMode(pin[GPIO_PWM1 +i], OUTPUT);
analogWrite(pin[GPIO_PWM1 +i], bitRead(pwm_inverted, i) ? Settings.pwm_range - Settings.pwm_value[i] : Settings.pwm_value[i]);
}
}
}

for (uint32_t i = 0; i < MAX_RELAYS; i++) {
if (pin[GPIO_REL1 +i] < 99) {
pinMode(pin[GPIO_REL1 +i], OUTPUT);
Expand Down

0 comments on commit 96cc933

Please sign in to comment.