mirror of https://github.com/arendst/Tasmota.git
Merge pull request #7177 from s-hadinger/h801
Fix flashing H801 led at boot (#7165, #649)
This commit is contained in:
commit
a9d8c8fde3
|
@ -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
|
||||
|
||||
|
|
|
@ -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);
|
||||
|
|
Loading…
Reference in New Issue