This reverts commit a45f264ada, reversing
changes made to 62349c3341.
This commit is contained in:
mogranjm
2017-10-27 17:39:52 +11:00
parent a45f264ada
commit eae54fb3be
343 changed files with 1406 additions and 11792 deletions
-12
View File
@@ -290,18 +290,6 @@ bool process_record_quantum(keyrecord_t *record) {
rgblight_step();
}
return false;
case RGB_SMOD:
// same as RBG_MOD, but if shift is pressed, it will use the reverese direction instead.
if (record->event.pressed) {
uint8_t shifted = get_mods() & (MOD_BIT(KC_LSHIFT)|MOD_BIT(KC_RSHIFT));
if(shifted) {
rgblight_step_reverse();
}
else {
rgblight_step();
}
}
return false;
case RGB_HUI:
if (record->event.pressed) {
rgblight_increase_hue();
-1
View File
@@ -400,7 +400,6 @@ enum quantum_keycodes {
// RGB functionality
RGB_TOG,
RGB_MOD,
RGB_SMOD,
RGB_HUI,
RGB_HUD,
RGB_SAI,
+1 -6
View File
@@ -13,7 +13,6 @@
* You should have received a copy of the GNU General Public License
* along with this program. If not, see <http://www.gnu.org/licenses/>.
*/
#include <math.h>
#include <avr/eeprom.h>
#include <avr/interrupt.h>
#include <util/delay.h>
@@ -466,17 +465,13 @@ void rgblight_task(void) {
void rgblight_effect_breathing(uint8_t interval) {
static uint8_t pos = 0;
static uint16_t last_timer = 0;
float val;
if (timer_elapsed(last_timer) < pgm_read_byte(&RGBLED_BREATHING_INTERVALS[interval])) {
return;
}
last_timer = timer_read();
// http://sean.voisen.org/blog/2011/10/breathing-led-with-arduino/
val = (exp(sin((pos/255.0)*M_PI)) - RGBLIGHT_EFFECT_BREATHE_CENTER/M_E)*(RGBLIGHT_EFFECT_BREATHE_MAX/(M_E-1/M_E));
rgblight_sethsv_noeeprom(rgblight_config.hue, rgblight_config.sat, val);
rgblight_sethsv_noeeprom(rgblight_config.hue, rgblight_config.sat, pgm_read_byte(&LED_BREATHING_TABLE[pos]));
pos = (pos + 1) % 256;
}
void rgblight_effect_rainbow_mood(uint8_t interval) {
-8
View File
@@ -22,14 +22,6 @@
#define RGBLIGHT_MODES 1
#endif
#ifndef RGBLIGHT_EFFECT_BREATHE_CENTER
#define RGBLIGHT_EFFECT_BREATHE_CENTER 1.85 // 1-2.7
#endif
#ifndef RGBLIGHT_EFFECT_BREATHE_MAX
#define RGBLIGHT_EFFECT_BREATHE_MAX 255 // 0-255
#endif
#ifndef RGBLIGHT_EFFECT_SNAKE_LENGTH
#define RGBLIGHT_EFFECT_SNAKE_LENGTH 4
#endif