Skip to content

Commit

Permalink
[Telink] Restyled
Browse files Browse the repository at this point in the history
  • Loading branch information
s07641069 committed Sep 20, 2022
1 parent 7ba87cc commit 2af38aa
Showing 1 changed file with 3 additions and 2 deletions.
5 changes: 3 additions & 2 deletions examples/lighting-app/telink/src/LightingManager.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -30,7 +30,8 @@ LOG_MODULE_DECLARE(app);

LightingManager LightingManager::sLight;

CHIP_ERROR LightingManager::Init(const device * pwmDevice, uint32_t pwmChannel, uint8_t aMinLevel, uint8_t aMaxLevel, uint8_t aDefaultLevel)
CHIP_ERROR LightingManager::Init(const device * pwmDevice, uint32_t pwmChannel, uint8_t aMinLevel, uint8_t aMaxLevel,
uint8_t aDefaultLevel)
{
// We use a gpioPin instead of a LEDWidget here because we want to use PWM
// and other features instead of just on/off.
Expand Down Expand Up @@ -127,7 +128,7 @@ void LightingManager::Set(bool aOn)

void LightingManager::UpdateLight()
{
constexpr uint32_t kPwmWidthUs = 20000u;
constexpr uint32_t kPwmWidthUs = 20000u;
const uint8_t maxEffectiveLevel = mMaxLevel - mMinLevel;
const uint8_t effectiveLevel = mState == kState_On ? chip::min<uint8_t>(mLevel - mMinLevel, maxEffectiveLevel) : 0;

Expand Down

0 comments on commit 2af38aa

Please sign in to comment.