Navigation Menu

Skip to content

Commit

Permalink
Use the ANSI vs ISO LED according to the layout.
Browse files Browse the repository at this point in the history
  • Loading branch information
mondalaci committed Sep 14, 2021
1 parent 9461a23 commit aebe208
Show file tree
Hide file tree
Showing 3 changed files with 14 additions and 0 deletions.
11 changes: 11 additions & 0 deletions right/src/ledmap.c
Expand Up @@ -3,6 +3,7 @@
#include "ledmap.h"
#include "slave_drivers/is31fl3xxx_driver.h"
#include "device.h"
#include "config_parser/config_globals.h"

rgb_t KeyActionColors[] = {
{.red=0, .green=0, .blue=0}, // KeyActionColor_None
Expand Down Expand Up @@ -180,3 +181,13 @@ void UpdateLayerLeds(void) {
}
#endif
}

void InitLedLayout(void) {
#if DEVICE_ID == DEVICE_ID_UHK60V2
if (HardwareConfig->isIso) {
LedMap[SlotId_LeftKeyboardHalf][21].red = 0x6D;
LedMap[SlotId_LeftKeyboardHalf][21].green = 0x7D;
LedMap[SlotId_LeftKeyboardHalf][21].blue = 0x8D;
}
#endif
}
1 change: 1 addition & 0 deletions right/src/ledmap.h
Expand Up @@ -32,5 +32,6 @@
// Functions:

extern void UpdateLayerLeds(void);
extern void InitLedLayout(void);

#endif
2 changes: 2 additions & 0 deletions right/src/main.c
Expand Up @@ -11,6 +11,7 @@
#include "peripherals/reset_button.h"
#include "config_parser/config_globals.h"
#include "usb_report_updater.h"
#include "ledmap.h"

static bool IsEepromInitialized = false;
static bool IsConfigInitialized = false;
Expand All @@ -22,6 +23,7 @@ static void userConfigurationReadFinished(void)

static void hardwareConfigurationReadFinished(void)
{
InitLedLayout();
if (IsFactoryResetModeEnabled) {
HardwareConfig->signatureLength = HARDWARE_CONFIG_SIGNATURE_LENGTH;
strncpy(HardwareConfig->signature, "FTY", HARDWARE_CONFIG_SIGNATURE_LENGTH);
Expand Down

0 comments on commit aebe208

Please sign in to comment.