Replace `::Kaleidoscope` with `kaleidoscope::Runtime`

Signed-off-by: Michael Richters <gedankenexperimenter@gmail.com>
pull/1139/head
Michael Richters 3 years ago committed by Jesse Vincent
parent e008b3240e
commit 8e29f3a705
No known key found for this signature in database
GPG Key ID: 122F5DF7108E4046

@ -41,7 +41,7 @@ void DynamicTapDance::updateDynamicTapDanceCache() {
map_[0] = 0;
while (pos < storage_base_ + storage_size_) {
uint16_t raw_key = Kaleidoscope.storage().read(pos);
uint16_t raw_key = Runtime.storage().read(pos);
pos += 2;
Key key(raw_key);
@ -67,7 +67,7 @@ bool DynamicTapDance::dance(uint8_t tap_dance_index, KeyAddr key_addr,
return false;
Key key;
Kaleidoscope.storage().get(storage_base_ + pos, key);
Runtime.storage().get(storage_base_ + pos, key);
switch (tap_dance_action) {
case TapDance::Tap:
@ -103,7 +103,7 @@ EventHandlerResult DynamicTapDance::onFocusEvent(const char *command) {
if (::Focus.isEOL()) {
for (uint16_t i = 0; i < storage_size_; i += 2) {
Key k;
Kaleidoscope.storage().get(storage_base_ + i, k);
Runtime.storage().get(storage_base_ + i, k);
::Focus.send(k);
}
} else {
@ -113,10 +113,10 @@ EventHandlerResult DynamicTapDance::onFocusEvent(const char *command) {
Key k;
::Focus.read(k);
Kaleidoscope.storage().put(storage_base_ + pos, k);
Runtime.storage().put(storage_base_ + pos, k);
pos += 2;
}
Kaleidoscope.storage().commit();
Runtime.storage().commit();
updateDynamicTapDanceCache();
}
}

@ -38,7 +38,7 @@ uint8_t MouseWrapper::speed_limit = 127;
void MouseWrapper::warpJump(uint16_t left, uint16_t top, uint16_t height, uint16_t width) {
uint16_t x_center = left + width / 2;
uint16_t y_center = top + height / 2;
Kaleidoscope.hid().absoluteMouse().moveTo(x_center, y_center, 0);
Runtime.hid().absoluteMouse().moveTo(x_center, y_center, 0);
}
void MouseWrapper::beginWarping() {
@ -131,7 +131,7 @@ void MouseWrapper::move(int8_t x, int8_t y) {
endWarping();
// move by whole pixels, not subpixels
Kaleidoscope.hid().mouse().move(moveX / subpixels_per_pixel, moveY / subpixels_per_pixel);
Runtime.hid().mouse().move(moveX / subpixels_per_pixel, moveY / subpixels_per_pixel);
// save leftover subpixel movements for later
remainderX = moveX - moveX / subpixels_per_pixel * subpixels_per_pixel;
remainderY = moveY - moveY / subpixels_per_pixel * subpixels_per_pixel;

Loading…
Cancel
Save