From 9b44df41325c326ca82691f6f697bade183472d8 Mon Sep 17 00:00:00 2001 From: yellows8 Date: Sat, 19 Oct 2019 19:53:56 -0400 Subject: [PATCH] Updated notification-led example for using hidsysSetNotificationLedPatternWithTimeout. --- hid/notification-led/source/main.c | 14 ++++++++++---- 1 file changed, 10 insertions(+), 4 deletions(-) diff --git a/hid/notification-led/source/main.c b/hid/notification-led/source/main.c index e99497a..0e045f7 100644 --- a/hid/notification-led/source/main.c +++ b/hid/notification-led/source/main.c @@ -50,7 +50,7 @@ int main(int argc, char* argv[]) u64 kDown = hidKeysDown(CONTROLLER_P1_AUTO); if (kDown & KEY_PLUS) { - // Disable notification led. + // Disable notification led. Only needed with hidsysSetNotificationLedPattern, with hidsysSetNotificationLedPatternWithTimeout the LED will be automatically disabled via the timeout. memset(&pattern, 0, sizeof(pattern)); } else if (kDown & KEY_A) { @@ -106,7 +106,7 @@ int main(int argc, char* argv[]) total_entries = 0; memset(UniquePadIds, 0, sizeof(UniquePadIds)); - // Get the UniquePadIds for the specified controller, which will then be used with hidsysSetNotificationLedPattern. + // Get the UniquePadIds for the specified controller, which will then be used with hidsysSetNotificationLedPattern*. // If you want to get the UniquePadIds for all controllers, you can use hidsysGetUniquePadIds instead. rc = hidsysGetUniquePadsFromNpad(hidGetHandheldMode() ? CONTROLLER_HANDHELD : CONTROLLER_PLAYER_1, UniquePadIds, 2, &total_entries); printf("hidsysGetUniquePadsFromNpad(): 0x%x", rc); @@ -116,8 +116,14 @@ int main(int argc, char* argv[]) if (R_SUCCEEDED(rc)) { for(i=0; i