Rename the test mode for clarity
This commit is contained in:
@@ -1,9 +1,9 @@
|
||||
#include "test_mode.h"
|
||||
#include "test_switches.h"
|
||||
#include "led_display.h"
|
||||
#include "key_action.h"
|
||||
#include "keymap.h"
|
||||
|
||||
bool TestModeActive = false;
|
||||
bool TestSwitches = false;
|
||||
|
||||
static const key_action_t TestKeymap[1][2][MAX_KEY_COUNT_PER_MODULE] = {
|
||||
// Base layer
|
||||
@@ -106,7 +106,7 @@ static const key_action_t TestKeymap[1][2][MAX_KEY_COUNT_PER_MODULE] = {
|
||||
}
|
||||
};
|
||||
|
||||
void TestMode_Activate(void)
|
||||
void TestSwitches_Activate(void)
|
||||
{
|
||||
memcpy(&CurrentKeymap, &TestKeymap, sizeof TestKeymap);
|
||||
LedDisplay_SetText(3, "TES");
|
||||
@@ -7,10 +7,10 @@
|
||||
|
||||
// Functions:
|
||||
|
||||
void TestMode_Activate(void);
|
||||
void TestSwitches_Activate(void);
|
||||
|
||||
// Variables:
|
||||
|
||||
extern bool TestModeActive;
|
||||
extern bool TestSwitches;
|
||||
|
||||
#endif
|
||||
@@ -1,7 +1,7 @@
|
||||
#include "usb_protocol_handler.h"
|
||||
#include "usb_commands/usb_command_get_variable.h"
|
||||
#include "key_matrix.h"
|
||||
#include "test_mode.h"
|
||||
#include "test_switches.h"
|
||||
#include "usb_report_updater.h"
|
||||
|
||||
void UsbCommand_GetVariable(void)
|
||||
@@ -9,8 +9,8 @@ void UsbCommand_GetVariable(void)
|
||||
usb_variable_id_t variableId = GetUsbRxBufferUint8(1);
|
||||
|
||||
switch (variableId) {
|
||||
case UsbVariable_TestModeActive:
|
||||
SetUsbTxBufferUint8(1, TestModeActive);
|
||||
case UsbVariable_TestSwitches:
|
||||
SetUsbTxBufferUint8(1, TestSwitches);
|
||||
break;
|
||||
case UsbVariable_TestUsbStack:
|
||||
SetUsbTxBufferUint8(1, TestUsbStack);
|
||||
|
||||
@@ -1,7 +1,7 @@
|
||||
#include "usb_protocol_handler.h"
|
||||
#include "usb_commands/usb_command_set_variable.h"
|
||||
#include "key_matrix.h"
|
||||
#include "test_mode.h"
|
||||
#include "test_switches.h"
|
||||
#include "usb_report_updater.h"
|
||||
|
||||
void UsbCommand_SetVariable(void)
|
||||
@@ -9,10 +9,10 @@ void UsbCommand_SetVariable(void)
|
||||
usb_variable_id_t variableId = GetUsbRxBufferUint8(1);
|
||||
|
||||
switch (variableId) {
|
||||
case UsbVariable_TestModeActive:
|
||||
case UsbVariable_TestSwitches:
|
||||
if (GetUsbRxBufferUint8(2)) {
|
||||
TestModeActive = true;
|
||||
TestMode_Activate();
|
||||
TestSwitches = true;
|
||||
TestSwitches_Activate();
|
||||
}
|
||||
break;
|
||||
case UsbVariable_TestUsbStack:
|
||||
|
||||
@@ -39,7 +39,7 @@
|
||||
} usb_command_id_t;
|
||||
|
||||
typedef enum {
|
||||
UsbVariable_TestModeActive,
|
||||
UsbVariable_TestSwitches,
|
||||
UsbVariable_TestUsbStack,
|
||||
UsbVariable_DebounceTimePress,
|
||||
UsbVariable_DebounceTimeRelease
|
||||
|
||||
Reference in New Issue
Block a user