Skip to content

Commit e4014e7

Browse files
committed
Touch mode sensitivity replaced by threshold
1 parent b8c7129 commit e4014e7

File tree

4 files changed

+7
-7
lines changed

4 files changed

+7
-7
lines changed

src/Endstops/RemoteZProbe.cpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -72,7 +72,7 @@ bool RemoteZProbe::SetProbing(bool isProbing) noexcept
7272
{
7373
// Send the sensitivity as a 16-bit integer in the lower half of the 32-bit parameter in the ChangeInputHandle message.
7474
// We keep the upper bits free for future touch mode parameters.
75-
rslt = CanInterface::ChangeHandleSetTouchMode(boardAddress, handle, (uint32_t)((uint16_t)(touchModeSensitivity * 65535.0)), reply.GetRef());
75+
rslt = CanInterface::ChangeHandleSetTouchMode(boardAddress, handle, (uint32_t)((uint16_t)(touchModeThreshold * (65535.0/5.0))), reply.GetRef());
7676
}
7777
}
7878
else

src/Endstops/ZProbe.cpp

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -114,8 +114,8 @@ constexpr ObjectModelTableEntry ZProbe::objectModelTable[] =
114114
#if SUPPORT_SCANNING_PROBES
115115
// 1. probe.touchMode members
116116
{ "active", OBJECT_MODEL_FUNC(self->useTouchMode), ObjectModelEntryFlags::none },
117-
{ "sensitivity", OBJECT_MODEL_FUNC(self->touchModeSensitivity, 2), ObjectModelEntryFlags::none },
118117
{ "speed", OBJECT_MODEL_FUNC(InverseConvertSpeedToMmPerMin(self->touchModeProbeSpeed), 1), ObjectModelEntryFlags::none },
118+
{ "threshold", OBJECT_MODEL_FUNC(self->touchModeThreshold, 2), ObjectModelEntryFlags::none },
119119
{ "triggerHeight", OBJECT_MODEL_FUNC(self->touchModeTriggerHeight, 3), ObjectModelEntryFlags::none },
120120
#endif
121121
};
@@ -574,7 +574,7 @@ GCodeResult ZProbe::SetTouchModeParameters(GCodeBuffer& gb, const StringRef& rep
574574
bool seen = false;
575575
gb.TryGetBValue('S', useTouchMode, seen);
576576
gb.TryGetFValue('H', touchModeTriggerHeight, seen);
577-
gb.TryGetLimitedFValue('V', touchModeSensitivity, seen, 0.0, 1.0);
577+
gb.TryGetLimitedFValue('V', touchModeThreshold, seen, 0.0, 5.0);
578578
{
579579
float speed;
580580
if (gb.TryGetPositiveFValue('F', speed, seen))
@@ -589,8 +589,8 @@ GCodeResult ZProbe::SetTouchModeParameters(GCodeBuffer& gb, const StringRef& rep
589589
}
590590
else
591591
{
592-
reply.printf("Z probe %u touch mode: %s" "active, speed %.1fmm/min, trigger height %.2fmm, sensitivity %.2f",
593-
number, (useTouchMode) ? "" : "not ", (double)InverseConvertSpeedToMmPerMin(touchModeProbeSpeed), (double)touchModeTriggerHeight, (double)touchModeSensitivity);
592+
reply.printf("Z probe %u touch mode: %s" "active, speed %.1fmm/min, trigger height %.2fmm, threshold %.2f",
593+
number, (useTouchMode) ? "" : "not ", (double)InverseConvertSpeedToMmPerMin(touchModeProbeSpeed), (double)touchModeTriggerHeight, (double)touchModeThreshold);
594594
}
595595
return GCodeResult::ok;
596596
}

src/Endstops/ZProbe.h

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -124,7 +124,7 @@ class ZProbe : public EndstopOrZProbe
124124
// Scanning support
125125
float scanCoefficients[4];
126126
float touchModeTriggerHeight = DefaultScanningProbeTouchModeTriggerHeight;
127-
float touchModeSensitivity = DefaultScanningProbeTouchModeSensitivity;
127+
float touchModeThreshold = DefaultScanningProbeTouchModeThreshold;
128128
float touchModeProbeSpeed = ConvertSpeedFromMmPerMin(DefaultScanningProbeTouchModeProbeSpeed);
129129
bool isCalibrated = false;
130130
bool useTouchMode = false;

src/Version.h

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,7 @@
1010

1111
#ifndef VERSION
1212
// Note: the complete VERSION string must be in standard version number format and must not contain spaces! This is so that DWC can parse it.
13-
# define MAIN_VERSION "3.6.0-beta.4+4"
13+
# define MAIN_VERSION "3.6.0-rc.1"
1414
# ifdef USE_CAN0
1515
# define VERSION_SUFFIX "(CAN0)"
1616
# else

0 commit comments

Comments
 (0)