diff --git a/src/kaleidoscope/device/dygma/Defy_wireless.cpp b/src/kaleidoscope/device/dygma/Defy_wireless.cpp index 14c27f6..13c9f57 100644 --- a/src/kaleidoscope/device/dygma/Defy_wireless.cpp +++ b/src/kaleidoscope/device/dygma/Defy_wireless.cpp @@ -201,8 +201,8 @@ void DefyHands::setup() }; Communications.callbacks.bind(CONNECTED, checkBrightness); Communications.callbacks.bind(DISCONNECTED, checkBrightness); + Communications.callbacks.bind(CONNECTED, ([](const Packet &) { ::LEDControl.set_mode(::LEDControl.get_mode_index()); })); - settings_interval_ = ::EEPROMSettings.requestSlice(sizeof(keyscan_interval_)); settings_base = ::EEPROMSettings.requestSlice(sizeof(DefyHands::Brightness)); diff --git a/src/kaleidoscope/driver/bootloader/nrf/NRF.h b/src/kaleidoscope/driver/bootloader/nrf/NRF.h index 5609653..f0724c2 100644 --- a/src/kaleidoscope/driver/bootloader/nrf/NRF.h +++ b/src/kaleidoscope/driver/bootloader/nrf/NRF.h @@ -3,9 +3,11 @@ #ifdef NRF52_ARCH -#include "kaleidoscope/driver/bootloader/Base.h" -#include "bootloader_drv.h" +#include "Adafruit_TinyUSB.h" #include "Arduino.h" +#include "bootloader_drv.h" +#include "kaleidoscope/driver/bootloader/Base.h" +#include "nrf_sdh.h" namespace kaleidoscope { @@ -16,9 +18,11 @@ namespace nrf { class nrfBoot : public kaleidoscope::driver::bootloader::Base { public: static void rebootBootloader() { - + TinyUSBDevice.detach(); bldrdrv_init(); bldrdrv_update_request(); + delay(100); + nrf_sdh_disable_request(); reset_mcu(); } };