Revert to the factory default state when the reset button is pressed upon firmware startup. Display FTY on the display in this case.
This commit is contained in:
@@ -8,7 +8,7 @@
|
||||
|
||||
// TODO: Restore Ctrl and Super keys and Mod+N.
|
||||
|
||||
keymap_reference_t AllKeymaps[MAX_KEYMAP_NUM] = { { "QTY", 0, 3 } };
|
||||
keymap_reference_t AllKeymaps[MAX_KEYMAP_NUM] = { { "FTY", 0, 3 } };
|
||||
uint8_t AllKeymapsCount;
|
||||
uint8_t DefaultKeymapIndex;
|
||||
uint8_t CurrentKeymapIndex = 0;
|
||||
|
||||
@@ -18,6 +18,7 @@
|
||||
#include "key_scanner.h"
|
||||
#include "key_states.h"
|
||||
#include "usb_commands/usb_command_apply_config.h"
|
||||
#include "peripherals/reset_button.h"
|
||||
|
||||
void updateUsbReports(void)
|
||||
{
|
||||
@@ -61,7 +62,10 @@ void main(void)
|
||||
{
|
||||
InitClock();
|
||||
InitPeripherals();
|
||||
|
||||
if (!RESET_BUTTON_IS_PRESSED) {
|
||||
EEPROM_LaunchTransfer(EepromOperation_Read, ConfigBufferId_HardwareConfig, hardwareConfigurationReadFinished);
|
||||
}
|
||||
|
||||
if (Wormhole.magicNumber == WORMHOLE_MAGIC_NUMBER && Wormhole.enumerationMode == EnumerationMode_BusPal) {
|
||||
Wormhole.magicNumber = 0;
|
||||
|
||||
Reference in New Issue
Block a user