]> git.donarmstrong.com Git - qmk_firmware.git/blobdiff - keyboard/preonic/keymaps/default/keymap.c
audio enable stored in eeprom
[qmk_firmware.git] / keyboard / preonic / keymaps / default / keymap.c
index 392197f1d88180b28807e84b4158618d01fbebc7..3da69c2155c0579635222976060f5dd109b54346 100644 (file)
@@ -59,15 +59,11 @@ const uint16_t PROGMEM fn_actions[] = {
 };
 
 float start_up[][2] = {
-  {440.0*pow(2.0,(67)/12.0), 600},
-  {0, 50},
-  {440.0*pow(2.0,(64)/12.0), 400},
-  {0, 50},
-  {440.0*pow(2.0,(55)/12.0), 400},
-  {0, 50},
-  {440.0*pow(2.0,(60)/12.0), 400},
-  {0, 50},
-  {440.0*pow(2.0,(64)/12.0), 1000},
+  {440.0*pow(2.0,(67)/12.0), 4},
+  {440.0*pow(2.0,(64)/12.0), 8},
+  {440.0*pow(2.0,(55)/12.0), 8},
+  {440.0*pow(2.0,(60)/12.0), 8},
+  {440.0*pow(2.0,(64)/12.0), 10},
 };
 
 const macro_t *action_get_macro(keyrecord_t *record, uint8_t id, uint8_t opt)
@@ -80,17 +76,19 @@ const macro_t *action_get_macro(keyrecord_t *record, uint8_t id, uint8_t opt)
             #ifdef BACKLIGHT_ENABLE
               backlight_step();
             #endif
+            audio_toggle();
           } else {
             unregister_code(KC_RSFT);
+            play_notes(&start_up, 5, false);
           }
         break;
       }
     return MACRO_NONE;
 };
 
-void matrix_init_user(void) {
+void matrix_init_user(void) {
 #ifdef AUDIO_ENABLE
     init_notes();
-    play_notes(&start_up, 9, false);
+    play_notes(&start_up, 5, false);
 #endif
 }