Merge pull request #1 from cmet7/brightness-fix

fix brightness of m5core2 screen
This commit is contained in:
martydingo
2022-11-29 17:32:16 +00:00
committed by GitHub
2 changed files with 3 additions and 2 deletions

View File

@@ -207,7 +207,7 @@ void AXP192Component::UpdateBrightness()
case AXP192_M5CORE2:
{
uint8_t buf = Read8bit( 0x27 );
Write1Byte( 0x27 , ((buf & 0x0f) | (ubri << 4)) );
Write1Byte( 0x27 , ((buf & 0x80) | (ubri << 3)) );
}
}
}

View File

@@ -39,6 +39,7 @@ sensor:
address: 0x34
i2c_id: bus_a
update_interval: 30s
brightness: 75%
battery_level:
name: "${upper_devicename} Battery Level"
id: "${devicename}_batterylevel"
@@ -72,4 +73,4 @@ display:
cs_pin: 5
dc_pin: 15
lambda: |-
it.line(20, 20, 200, 200);
it.line(20, 20, 200, 200);