From 502271c9c6e1cd55d5ed6418e566edfd9f630448 Mon Sep 17 00:00:00 2001 From: Christoffer Martinsson Date: Mon, 5 Jun 2023 13:22:59 +0200 Subject: [PATCH] Code cleanup. Moved License to separate file --- firmware/src/cmdr_keyboard.cpp | 40 ++++------------------------------ 1 file changed, 4 insertions(+), 36 deletions(-) diff --git a/firmware/src/cmdr_keyboard.cpp b/firmware/src/cmdr_keyboard.cpp index ced529d..b9f3d1f 100755 --- a/firmware/src/cmdr_keyboard.cpp +++ b/firmware/src/cmdr_keyboard.cpp @@ -3,7 +3,7 @@ * Date: 2023-09-02 * Author: Christoffer Martinsson * Email: cm@cmtec.se - * License: Please refer to end of this file for license information + * License: Please refer to LICENSE in root directory */ #include "IndicatorLed.h" @@ -265,15 +265,13 @@ void loop() /* Scan buttons 1ms */ if (current_timestamp >= button_timestamp) { - button_timestamp = current_timestamp + 1; process_keys(); + button_timestamp = current_timestamp + 1; } /* Update indicator 200ms */ if (current_timestamp >= indicator_timestamp) { - indicator_timestamp = current_timestamp + 200; - /* Set status indication */ if (keyboard_leds & (1 << USB_LED_CAPS_LOCK)) { @@ -289,37 +287,7 @@ void loop() } status_led.update(); + + indicator_timestamp = current_timestamp + 200; } } - -/* @License - * ======================================================================================================= - * ------------------------------------------------------------------------------------------------------- - * ---####################-----###########-------###########-----############--############-############-- - * --######################---#############-----#############---- -- - --- - * --###### ##---##### ###-----### #####---------##-------#######------#------------- - * -- -------------- --- ----- --- ----- ---------##-------#------------#------------- - * --#####--------------------#####------####-####------#####---------##-------###########--############-- - * -- -------------------- ------ ------ --------- ------- -- -- - * --#####--------------------#####--------#####--------#####--------------------------------------------- - * -- -------------------- -------- -------- --------------------------------------------- - * --######--------------##---#####---------------------#####--------------------------------------------- - * --##################### ---#####---------------------#####--------------------------------------------- - * ---################### ----#####---------------------#####--------------------------------------------- - * --- ----- --------------------- --------------------------------------------- - * ------------------------------------------------------------------------------------------------------- - * ======================================================================================================= - * - * Copyright 2022 Christoffer Martinsson - * - * CMtec CMDR Keyboard 42 can be redistributed and/or modified under the terms of the GNU General - * Public License (Version 2), as published by the Free Software Foundation. - * A copy of the license can be found online at www.gnu.o urg/licenses. - * - * CMtec CMDR Keyboard 42 is distributed in the hope that it will be useful, but WITHOUT ANY - * WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR - * A PARTICULAR PURPOSE. See the GNU General Public License for more details. - * - * Keyboard/Mouse based on standard teensy "Keypad" library for button scanning, standard teensy - * "usb_keyboard" library for HID keyboard/mouse usb data communication. - */