Skip to content

Commit

Permalink
styles: format
Browse files Browse the repository at this point in the history
  • Loading branch information
MistEO committed Dec 5, 2024
1 parent 5afb54d commit 26bd885
Showing 1 changed file with 5 additions and 3 deletions.
8 changes: 5 additions & 3 deletions source/include/Utils/MicroControl.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -61,12 +61,14 @@ inline void micro_multi_swipe(
constexpr double kInterval = 10; // ms
const std::chrono::milliseconds delay(static_cast<int>(kInterval));

struct Operating {
struct Operating
{
double total_step = 0;
double x_step_len = 0;
double y_step_len = 0;
int step = 0;
};

std::vector<Operating> operating(swipes.size());

for (size_t i = 0; i < swipes.size(); ++i) {
Expand Down Expand Up @@ -99,7 +101,7 @@ inline void micro_multi_swipe(
}
else if (o.step < o.total_step) {
int mx = static_cast<int>(s.x1 + o.step * o.x_step_len);
int my = static_cast<int>(s.y1 + o.step *o.y_step_len);
int my = static_cast<int>(s.y1 + o.step * o.y_step_len);
touch_move(contact, mx, my);
++o.step;
}
Expand All @@ -108,7 +110,7 @@ inline void micro_multi_swipe(
++o.step;
++over_count;
}
else { // step > total
else { // step > total
continue;
}
}
Expand Down

0 comments on commit 26bd885

Please sign in to comment.