From bea45d696a698dccdef1962386b940b501aec6d9 Mon Sep 17 00:00:00 2001 From: Gergely Nagy Date: Sat, 4 Jan 2020 18:25:10 +0100 Subject: [PATCH] device/Raise: Remove two unused methods from an internal class The (internal) `::dygma::raise::Hand` class had two methods that weren't used by Kaleidoscope at all: `.setAllLEDsTo` and `.setOneLEDTo`. Since they're unused, remove them. We weren't going to use them anyway, because they immediately sync to the LED driver, while we want to do that in `syncLeds()`, and in there only. Signed-off-by: Gergely Nagy --- src/kaleidoscope/device/dygma/raise/Hand.cpp | 19 ------------------- src/kaleidoscope/device/dygma/raise/Hand.h | 2 -- 2 files changed, 21 deletions(-) diff --git a/src/kaleidoscope/device/dygma/raise/Hand.cpp b/src/kaleidoscope/device/dygma/raise/Hand.cpp index 33d9b387..b10a9143 100644 --- a/src/kaleidoscope/device/dygma/raise/Hand.cpp +++ b/src/kaleidoscope/device/dygma/raise/Hand.cpp @@ -228,25 +228,6 @@ void Hand::sendLEDBank(uint8_t bank) { uint8_t result = twi_.writeTo(data, ELEMENTS(data)); } -void Hand::setAllLEDsTo(cRGB color) { - uint8_t data[] = {TWI_CMD_LED_SET_ALL_TO, - pgm_read_byte(&gamma8[color.r]), - pgm_read_byte(&gamma8[color.g]), - pgm_read_byte(&gamma8[color.b]) - }; - twi_.writeTo(data, ELEMENTS(data)); -} - -void Hand::setOneLEDTo(byte led, cRGB color) { - uint8_t data[] = {TWI_CMD_LED_SET_ONE_TO, - led, - pgm_read_byte(&gamma8[color.r]), - pgm_read_byte(&gamma8[color.g]), - pgm_read_byte(&gamma8[color.b]) - }; - twi_.writeTo(data, ELEMENTS(data)); -} - } } } diff --git a/src/kaleidoscope/device/dygma/raise/Hand.h b/src/kaleidoscope/device/dygma/raise/Hand.h index 261fb6ed..543d89ab 100644 --- a/src/kaleidoscope/device/dygma/raise/Hand.h +++ b/src/kaleidoscope/device/dygma/raise/Hand.h @@ -74,8 +74,6 @@ class Hand { bool moreKeysWaiting(); void sendLEDData(); void sendLEDBank(uint8_t bank); - void setOneLEDTo(byte led, cRGB color); - void setAllLEDsTo(cRGB color); keydata_t getKeyData(); bool readKeys(); uint8_t controllerAddress();