Skip to content

Commit 46b84fc

Browse files
committed
Update models
1 parent 2627ec5 commit 46b84fc

File tree

6 files changed

+5
-4
lines changed

6 files changed

+5
-4
lines changed

extras/cad/btn_holder.FCStd

38.2 KB
Binary file not shown.

extras/cad/btn_holder.stl

4.77 KB
Binary file not shown.
29.6 KB
Binary file not shown.

extras/cad/electronics_holder.stl

51.1 KB
Binary file not shown.

include/capctrl.h

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -44,8 +44,9 @@ class CapCtrl
4444
const int ConfigSpeed = 64;
4545
const int ConfigStep = 20;
4646
const int ConfigStepLarge = 100;
47-
const int ConfigStepCompensate = 20;
47+
const int ConfigStepCompensate = 14;
4848
const int ConfigMaxPos = 5200;
49+
const int ConfigBtnDisabled = 1;
4950

5051
const int ConfigCalPoints = 23;
5152
const int ConfigCalAddr = 0x0;

src/capctrl.cpp

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -97,7 +97,7 @@ bool CapCtrl::setFreq(long freqKhz)
9797

9898
void CapCtrl::park()
9999
{
100-
while (digitalRead(pinBtn_) == 0)
100+
while (digitalRead(pinBtn_) == ConfigBtnDisabled)
101101
stepper_.step(1);
102102

103103
releaseMotor();
@@ -129,7 +129,7 @@ void CapCtrl::up()
129129

130130
void CapCtrl::down()
131131
{
132-
if (digitalRead(pinBtn_) == 0 && pos_ - ConfigStep >= 0)
132+
if (digitalRead(pinBtn_) == ConfigBtnDisabled && pos_ - ConfigStep >= 0)
133133
{
134134
stepper_.setSpeed(ConfigSpeed/8);
135135
stepper_.step(ConfigStep);
@@ -155,7 +155,7 @@ void CapCtrl::upLarge()
155155

156156
void CapCtrl::downLarge()
157157
{
158-
if (digitalRead(pinBtn_) == 0 && pos_ - ConfigStepLarge >= 0)
158+
if (digitalRead(pinBtn_) == ConfigBtnDisabled && pos_ - ConfigStepLarge >= 0)
159159
{
160160
stepper_.setSpeed(ConfigSpeed/4);
161161
stepper_.step(ConfigStepLarge);

0 commit comments

Comments
 (0)