Skip to content

Commit ab76652

Browse files
authored
Fix M5Core2 power LED on/off (was reversed) (#236)
1 parent cdab115 commit ab76652

File tree

1 file changed

+6
-6
lines changed

1 file changed

+6
-6
lines changed

M5StackCommon/Core2ToughCommon.cs

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -93,15 +93,15 @@ public static bool PowerLed
9393

9494
if (_powerLed)
9595
{
96-
// turn ON by setting duty cycle to 100%
97-
_power.Pwm1DutyCycleSetting1 = 10;
98-
_power.Pwm1DutyCycleSetting2 = 10;
96+
// turn ON by setting duty cycle to 0%
97+
_power.Pwm1DutyCycleSetting1 = 0;
98+
_power.Pwm1DutyCycleSetting2 = 0;
9999
}
100100
else
101101
{
102-
// tuen OFF by setting duty cycle to 0%
103-
_power.Pwm1DutyCycleSetting1 = 0;
104-
_power.Pwm1DutyCycleSetting2 = 0;
102+
// turn OFF by setting duty cycle to 100%
103+
_power.Pwm1DutyCycleSetting1 = 10;
104+
_power.Pwm1DutyCycleSetting2 = 10;
105105
}
106106
}
107107
}

0 commit comments

Comments
 (0)