Skip to content
This repository has been archived by the owner on Jan 16, 2023. It is now read-only.

Commit

Permalink
ハンドの動作確認 #7
Browse files Browse the repository at this point in the history
  • Loading branch information
H1rono committed Sep 8, 2022
1 parent 0c9ff14 commit f7f8fb5
Showing 1 changed file with 3 additions and 2 deletions.
5 changes: 3 additions & 2 deletions src/ps4operation/Hand.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -10,8 +10,9 @@ void ps4operation::Hand::begin(uint8_t angle) {
}

void ps4operation::Hand::operate(const ssr::PS4Value & value) {
_angle += (value.l1 - value.r1) / float(_maxAngle - _minAngle);
_angle = max(_maxAngle, min(_minAngle, _angle));
// _angle += (value.l1 - value.r1) / float(_maxAngle - _minAngle);
_angle += (value.l1 - value.r1) / 3.0;
_angle = max(_minAngle, min(_maxAngle, _angle));
_syncServo.write(uint8_t(_angle));
#ifdef ps4operation_verbose
char buffer[256] = "";
Expand Down

0 comments on commit f7f8fb5

Please sign in to comment.