From 386f893829c489d596fdda29446792d60c92d383 Mon Sep 17 00:00:00 2001 From: Gergely Nagy Date: Fri, 27 Jan 2017 09:27:40 +0100 Subject: [PATCH] Updated to use Keyboardio-LEDControl Signed-off-by: Gergely Nagy --- examples/Heatmap/Heatmap.ino | 2 +- src/Akela/Heatmap.cpp | 2 +- src/Akela/Heatmap.h | 1 + 3 files changed, 3 insertions(+), 2 deletions(-) diff --git a/examples/Heatmap/Heatmap.ino b/examples/Heatmap/Heatmap.ino index 8ff990eb..4dcb83cb 100644 --- a/examples/Heatmap/Heatmap.ino +++ b/examples/Heatmap/Heatmap.ino @@ -41,7 +41,7 @@ const Key keymaps[][ROWS][COLS] PROGMEM = { void setup () { Keyboardio.setup (KEYMAP_SIZE); - Keyboardio.use (&HeatmapEffect, NULL); + Keyboardio.use (&LEDControl, &HeatmapEffect, NULL); HeatmapEffect.activate (); } diff --git a/src/Akela/Heatmap.cpp b/src/Akela/Heatmap.cpp index abd4fbf2..5131c8d5 100644 --- a/src/Akela/Heatmap.cpp +++ b/src/Akela/Heatmap.cpp @@ -114,7 +114,7 @@ namespace Akela { for (uint8_t c = 0; c < COLS; c++) { uint8_t cap = totalKeys || 1; float v = float(heatmap[r][c]) / cap; - led_set_crgb_at (r, c, computeColor (v)); + LEDControl.led_set_crgb_at (r, c, computeColor (v)); } } } diff --git a/src/Akela/Heatmap.h b/src/Akela/Heatmap.h index bdb64754..2ba1952f 100644 --- a/src/Akela/Heatmap.h +++ b/src/Akela/Heatmap.h @@ -19,6 +19,7 @@ #pragma once #include +#include namespace Akela { class Heatmap : public LEDMode {