Skip to content

Commit

Permalink
rename public touch members to their OG name
Browse files Browse the repository at this point in the history
  • Loading branch information
vberthiaume committed Jan 7, 2025
1 parent aaf8a44 commit f84f505
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 8 deletions.
8 changes: 4 additions & 4 deletions exampleProjects/touch/src/TinyTouch.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -134,11 +134,11 @@ class TinyTouch
*/
void printUpdate()
{
if(touch.totalBrush != prev_brush || touch.totalRub != prev_rub)
if(touch.brush != prev_brush || touch.rub != prev_rub)
{
Serial.println("brush;" + String(touch.totalBrush, 6) + ";rub;" + String(touch.totalRub, 6));
prev_brush = touch.totalBrush;
prev_rub = touch.totalRub;
Serial.println("brush;" + String(touch.brush, 6) + ";rub;" + String(touch.rub, 6));
prev_brush = touch.brush;
prev_rub = touch.rub;
}
}

Expand Down
8 changes: 4 additions & 4 deletions include/puara/descriptors/touch.h
Original file line number Diff line number Diff line change
Expand Up @@ -47,11 +47,11 @@ class Touch
float touchBottom{}; // f, 0--1

/** brush: direction and intensity of capsense brush motion in ~cm/s (distance between stripes = ~1.5cm) */
float totalBrush{}; // f, 0--? (~cm/s)
float brush{}; // f, 0--? (~cm/s)
Brush brushes[maxNumBlobs];

/** rub: intensity of rub motion in ~cm/s (distance between stripes = ~1.5cm) */
float totalRub{}; // f, 0--? (~cm/s)
float rub{}; // f, 0--? (~cm/s)
Rub rubs[maxNumBlobs];

// touch array
Expand Down Expand Up @@ -116,8 +116,8 @@ class Touch
}

// Calculate total brush and rub values
totalBrush = utils::arrayAverageZero(brushes, maxNumBlobs);
totalRub = utils::arrayAverageZero(rubs, maxNumBlobs);
brush = utils::arrayAverageZero(brushes, maxNumBlobs);
rub = utils::arrayAverageZero(rubs, maxNumBlobs);
}
};
}

0 comments on commit f84f505

Please sign in to comment.