Skip to content

Commit

Permalink
upd
Browse files Browse the repository at this point in the history
  • Loading branch information
GyverLibs committed Sep 18, 2021
1 parent 71ee91f commit 225d17b
Show file tree
Hide file tree
Showing 2 changed files with 10 additions and 3 deletions.
7 changes: 5 additions & 2 deletions Planner Simulation/Planner2/planner_v4.pde
Original file line number Diff line number Diff line change
Expand Up @@ -110,7 +110,7 @@ class Planner_v4 {
if (status > 1 && millis() - tmr >= us/1000) {
tmr = millis();
tickManual();

// ВЫВОД МАРШРУТА
int vel = us==0 ? 0 : 1000000/us;
int hue = int(map(vel, 0, V, 0, 70));
Expand Down Expand Up @@ -220,7 +220,10 @@ class Planner_v4 {
bufS.set(i, s1);

if (bufL.get(i + 1) == 1) break;

if (a == 0) {
bufV.set(i + 1, int(V));
continue;
}

if (i < bufV.available() - 2) {
int multSum = 0;
Expand Down
6 changes: 5 additions & 1 deletion src/GyverPlanner2.h
Original file line number Diff line number Diff line change
Expand Up @@ -307,8 +307,12 @@ class GPlanner2 {
}
uint32_t s1 = sqrt(sqSum);
bufS.set(i, s1);
if (s1 == 0) continue;
if (bufL.get(i + 1) == 1) break;
if (a == 0) {
bufV.set(i + 1, uint16_t(V));
continue;
}
if (s1 == 0) continue;

if (i < bufV.available() - 2) {
int32_t multSum = 0;
Expand Down

0 comments on commit 225d17b

Please sign in to comment.