Skip to content

Commit

Permalink
applied restyle
Browse files Browse the repository at this point in the history
  • Loading branch information
silabs-srishylam committed Apr 12, 2023
1 parent 9b6df37 commit 3ded43f
Showing 1 changed file with 10 additions and 5 deletions.
15 changes: 10 additions & 5 deletions examples/window-app/silabs/SiWx917/src/WindowAppImpl.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -533,15 +533,19 @@ WindowAppImpl::Button::Button(WindowApp::Button::Id id, const char * name) : Win
void WindowAppImpl::OnButtonChange(uint8_t Btn, uint8_t btnAction)
{
WindowApp::Button * btn = static_cast<Button *>((Btn == SIWx917_BTN0) ? sInstance.mButtonUp : sInstance.mButtonDown);
if (Btn == SIWx917_BTN1) {
if (Btn == SIWx917_BTN1)
{
btn->Press();
btn->Release();
}
else {
if (btnAction) {
else
{
if (btnAction)
{
btn->Press();
}
else {
else
{
btn->Release();
}
}
Expand All @@ -551,7 +555,8 @@ void WindowAppImpl::OnButtonChange(uint8_t Btn, uint8_t btnAction)
void sl_button_on_change(uint8_t btn, uint8_t btnAction)
{
WindowAppImpl * app = static_cast<WindowAppImpl *>(&WindowAppImpl::sInstance);
if (app->mWindowAppInit) {
if (app->mWindowAppInit)
{
app->OnButtonChange(btn, btnAction);
}
}

0 comments on commit 3ded43f

Please sign in to comment.