1
0
Fork 0

Implement battery level indicator

This commit is contained in:
Priyadi Iman Nurcahyo 2017-02-10 21:28:46 +07:00
parent 07879bf66b
commit 5944ab246a
6 changed files with 97 additions and 11 deletions

View file

@ -25,6 +25,7 @@ enum glow_modes {
GLOW_MIN,
GLOW_FULL
};
uint8_t glow_mode = GLOW_MIN;
extern keymap_config_t keymap_config;
@ -505,11 +506,6 @@ void led_init(void) {
rgbsps_set(LED_TRACKPOINT2, 0, 0, 15);
rgbsps_set(LED_TRACKPOINT3, 15, 0, 0);
// // hardcode indicator for now
rgbsps_set(LED_IND_BLUETOOTH, 0, 0, 15);
rgbsps_set(LED_IND_USB, 15, 15, 15);
rgbsps_set(LED_IND_BATTERY, 0, 15, 0);
led_layer_normal();
}
@ -996,6 +992,11 @@ void matrix_init_user(void) {
}
}
void battery_poll(float percentage) {
rgbsps_sethsv(LED_IND_BATTERY, percentage*120/100, 255, 15);
rgbsps_send();
}
void ps2_mouse_init_user() {
uint8_t rcv;