make astyle

pull/18/head
Jesse Vincent 9 years ago
parent 4ab71d1bfc
commit 1ce8da0b8d

@ -3,7 +3,7 @@
HARDWARE_IMPLEMENTATION KeyboardHardware;
// These global proxy functions are a cheap hack to avoid
void led_set_crgb_at(uint8_t i, cRGB crgb) {
void led_set_crgb_at(uint8_t i, cRGB crgb) {
KeyboardHardware.led_set_crgb_at(i,crgb);
}
void led_sync(void) {

@ -222,7 +222,7 @@ void LEDControl_::type_letter(uint8_t letter) {
// From http://web.mit.edu/storborg/Public/hsvtorgb.c - talk to Scott about licensing
void LEDControl_::hsv_to_rgb(cRGB *cRGB, uint16_t h, uint16_t s, uint16_t v) {
/* HSV to RGB conversion function with only integer
/* HSV to RGB conversion function with only integer
* math */
uint16_t region, fpart, p, q, t;
@ -245,17 +245,35 @@ void LEDControl_::hsv_to_rgb(cRGB *cRGB, uint16_t h, uint16_t s, uint16_t v) {
/* assign temp vars based on color cone region */
switch(region) {
case 0:
cRGB->r = v; cRGB->g = t; cRGB->b = p; break;
cRGB->r = v;
cRGB->g = t;
cRGB->b = p;
break;
case 1:
cRGB->r = q; cRGB->g = v; cRGB->b = p; break;
cRGB->r = q;
cRGB->g = v;
cRGB->b = p;
break;
case 2:
cRGB->r = p; cRGB->g = v; cRGB->b = t; break;
cRGB->r = p;
cRGB->g = v;
cRGB->b = t;
break;
case 3:
cRGB->r = p; cRGB->g = q; cRGB->b = v; break;
cRGB->r = p;
cRGB->g = q;
cRGB->b = v;
break;
case 4:
cRGB->r = t; cRGB->g = p; cRGB->b = v; break;
cRGB->r = t;
cRGB->g = p;
cRGB->b = v;
break;
default:
cRGB->r = v; cRGB->g = p; cRGB->b = q; break;
cRGB->r = v;
cRGB->g = p;
cRGB->b = q;
break;
}
return;

@ -1,6 +1,6 @@
#include "Model01.h"
KeyboardioScanner Model01::leftHand(0);
KeyboardioScanner Model01::rightHand(3);
KeyboardioScanner Model01::leftHand(0);
KeyboardioScanner Model01::rightHand(3);
Model01::Model01(void) {

Loading…
Cancel
Save