1
0
Fork 0

[Bug] Develop - Change uint32_t to layer_state_t (#13596)

* fix sat75

* update uint32_t to layer_state
This commit is contained in:
Xelus22 2021-07-20 02:50:55 +10:00 committed by GitHub
parent f792aee954
commit b73a29aaea
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
122 changed files with 469 additions and 469 deletions

View file

@ -117,7 +117,7 @@ void tap_dance_process_keycode(uint16_t keycode) {
__attribute__ ((weak))
void layer_state_set_rgb(uint32_t state) {}
uint32_t layer_state_set_user(uint32_t state) {
layer_state_t layer_state_set_user(layer_state_t state) {
layer_state_set_rgb(state);
return state;
}

View file

@ -87,7 +87,7 @@ void rgblight_saveBase(void) {
base_sta = false; // If saving, that means base layer is being left
}
// Load the base state back
// Load the base state back
void rgblight_loadBase(void) {
// Don't do anything if not enabled
if ( !base_sta ) {
@ -248,7 +248,7 @@ bool process_record_user(uint16_t keycode, keyrecord_t *record) {
}
return false;
break;
#endif
#endif
// If these keys are pressed, load base layer config, and mark saving
#ifdef RGBLIGHT_ENABLE
@ -261,7 +261,7 @@ bool process_record_user(uint16_t keycode, keyrecord_t *record) {
case RGB_HUI:
case RGB_HUD:
if ( !base_sta ) {
rgblight_loadBase();
rgblight_loadBase();
}
return true;
break;
@ -301,7 +301,7 @@ bool process_record_user(uint16_t keycode, keyrecord_t *record) {
}
return false;
break;
// Layer switches with sound
case K_GAMES:
if (record->event.pressed) {
@ -622,7 +622,7 @@ bool process_record_user(uint16_t keycode, keyrecord_t *record) {
|*-----LAYER CHANGE-----*|
\*----------------------*/
uint32_t layer_state_set_user(uint32_t state) {
layer_state_t layer_state_set_user(layer_state_t state) {
state = layer_state_set_keymap (state);
#ifdef RGBLIGHT_ENABLE

View file

@ -27,6 +27,6 @@ uint32_t layer_state_set_keymap(uint32_t state) {
return state;
}
uint32_t layer_state_set_user(uint32_t state) {
layer_state_t layer_state_set_user(layer_state_t state) {
return layer_state_set_keymap(state);
}

View file

@ -7,7 +7,7 @@ void matrix_init_user(void) {
__attribute__((weak)) void matrix_init_keymap() {}
uint32_t layer_state_set_user(uint32_t state) {
layer_state_t layer_state_set_user(layer_state_t state) {
state = update_tri_layer_state(state, L_EDVORAKJP_LOWER, L_EDVORAKJP_RAISE, L_EDVORAKJP_ADJUST);
return layer_state_set_keymap(state);
}

View file

@ -67,7 +67,7 @@ enum tap_dance_code {
// base
void matrix_init_user(void);
void matrix_init_keymap(void);
uint32_t layer_state_set_user(uint32_t state);
layer_state_t layer_state_set_user(layer_state_t state);
uint32_t layer_state_set_keymap(uint32_t state);
bool process_record_user(uint16_t keycode, keyrecord_t *record);
bool process_record_keymap(uint16_t keycode, keyrecord_t *record);

View file

@ -97,7 +97,7 @@ uint32_t layer_state_set_keymap(uint32_t state) {
return state;
}
uint32_t layer_state_set_user(uint32_t state) {
layer_state_t layer_state_set_user(layer_state_t state) {
state = layer_state_set_keymap(state);
#ifdef LAYER_NUMPAD

View file

@ -1,5 +1,5 @@
/*
Copyright 2019 Andre Poley <andre.poley@mailbox.org>
Copyright 2019 Andre Poley <andre.poley@mailbox.org>
This program is free software: you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
@ -123,7 +123,7 @@ uint32_t layer_state_set_keymap (uint32_t state) {
// on layer change, no matter where the change was initiated
// Then runs keymap's layer change check
uint32_t layer_state_set_user(uint32_t state) {
layer_state_t layer_state_set_user(layer_state_t state) {
state = update_tri_layer_state(state, _RAISE, _LOWER, _ADJUST);
#ifdef RGBLIGHT_ENABLE
state = layer_state_set_rgb(state);

View file

@ -136,7 +136,7 @@ bool process_record_user(uint16_t keycode, keyrecord_t *record) {
return true;
};
uint32_t layer_state_set_user(uint32_t state) {
layer_state_t layer_state_set_user(layer_state_t state) {
switch (biton32(state)) {
case _RAISE:
#ifdef RGBLIGHT_ENABLE

View file

@ -10,7 +10,7 @@ float song_test[][2] = SONG(QWERTY_SOUND);
#endif
// SYMBOL + SYSCTL = KBCTL
uint32_t layer_state_set_user(uint32_t state) {
layer_state_t layer_state_set_user(layer_state_t state) {
uint32_t intermediate_state = update_tri_layer_state(state, LR_SYMBOL, LR_SYSCTL, LR_KBCTL);
intermediate_state = layer_state_set_user_keymap(intermediate_state);
return intermediate_state;

View file

@ -72,7 +72,7 @@ __attribute__ ((weak)) void led_set_keymap(uint8_t usb_led) { }
// Set RGBLIGHT state depending on layer
void rgblight_change( uint8_t this_layer ) {
// Enable RGB light; will not work without this
//rgblight_enable_noeeprom();
//rgblight_enable_noeeprom();
// Change RGB light
switch ( this_layer ) {
case _DV:
@ -83,21 +83,21 @@ void rgblight_change( uint8_t this_layer ) {
// Do yellow for alternate
rgblight_enable_noeeprom();
rgblight_sethsv_noeeprom( 60,255,255);
break;
case _GA:
// Do purple for game
rgblight_enable_noeeprom();
rgblight_sethsv_noeeprom(285,255,255);
break;
case _NU:
// Do azure for number
rgblight_enable_noeeprom();
rgblight_sethsv_noeeprom(186,200,255);
break;
case _SE:
@ -105,27 +105,27 @@ void rgblight_change( uint8_t this_layer ) {
rgblight_enable_noeeprom();
rgblight_sethsv_noeeprom( 16,255,255);
break;
case _MO:
// Do green for mouse
rgblight_enable_noeeprom();
rgblight_sethsv_noeeprom(120,255,255);
break;
case _MU:
// Do orange for music
rgblight_enable_noeeprom();
rgblight_sethsv_noeeprom( 39,255,255);
break;
default:
// Something went wrong
rgblight_enable_noeeprom();
rgblight_sethsv_noeeprom( 0,255,255);
break;
}
}
@ -189,7 +189,7 @@ bool process_record_user(uint16_t keycode, keyrecord_t *record) {
}
return false;
break;
#endif
#endif
// Lock functionality: These layers are locked if the LOCKED buttons are
// pressed. Otherwise, they are momentary toggles
@ -225,7 +225,7 @@ bool process_record_user(uint16_t keycode, keyrecord_t *record) {
}
return false;
break;
// Layer switches with sound
case K_GAMES:
if (record->event.pressed) {
@ -546,7 +546,7 @@ bool process_record_user(uint16_t keycode, keyrecord_t *record) {
|*-----LAYER CHANGE-----*|
\*----------------------*/
uint32_t layer_state_set_user(uint32_t state) {
layer_state_t layer_state_set_user(layer_state_t state) {
state = layer_state_set_keymap (state);
#ifdef RGBLIGHT_ENABLE
@ -554,4 +554,4 @@ uint32_t layer_state_set_user(uint32_t state) {
rgblight_change( biton32(state) );
#endif
return state;
}
}

View file

@ -4,7 +4,7 @@ void matrix_init_user(void) {
rgblight_setrgb(0xFF, 0x00, 0x00);
};
uint32_t layer_state_set_user(uint32_t state) {
layer_state_t layer_state_set_user(layer_state_t state) {
switch (biton32(state)) {
case 0:
rgblight_setrgb (0xFF, 0x00, 0x00);

View file

@ -126,7 +126,7 @@ layer_state_t layer_state_set_keymap (layer_state_t state) {
return state;
}
uint32_t layer_state_set_user(uint32_t state) {
layer_state_t layer_state_set_user(layer_state_t state) {
state = update_tri_layer_state(state, _LOWER, _RAISE, _ADJUST);
switch (biton32(state)) {
case _LOWER:

View file

@ -296,7 +296,7 @@ case RGB_MODE_GRADIENT:
}
uint32_t layer_state_set_user(uint32_t state) {
layer_state_t layer_state_set_user(layer_state_t state) {
#ifdef RGBLIGHT_ENABLE
uint8_t default_layer = eeconfig_read_default_layer();
if (rgb_layer_change) {

View file

@ -6,7 +6,7 @@
#endif
#ifdef TRILAYER_ENABLED
uint32_t layer_state_set_user(uint32_t state)
layer_state_t layer_state_set_user(layer_state_t state)
{
return update_tri_layer_state(state, _LOWER, _RAISE, _ADJUST);
}