Welcome to mirror list, hosted at ThFree Co, Russian Federation.

StraightProbeSettings.cpp « Movement « src - github.com/Duet3D/RepRapFirmware.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
blob: a1d90f64b79b6c169356e480a1aaa2063eeed600 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
/*
 * StraightProbeSettings.cpp
 *
 *  Created on: 4 Oct 2019
 *      Author: manuel
 */

#include "StraightProbeSettings.h"
#include "RepRap.h"

StraightProbeSettings::StraightProbeSettings() noexcept
{
	Reset();
}

void StraightProbeSettings::Reset() noexcept
{
	movingAxes = (AxesBitmap) 0;
	type = StraightProbeType::unset;
	for (size_t axis = 0; axis < MaxAxes; ++axis)
	{
		target[axis] = 0;
	}
}

void StraightProbeSettings::SetTarget(const float coords[MaxAxes]) noexcept
{
	for (size_t axis = 0; axis < MaxAxes; ++axis)
	{
		target[axis] = coords[axis];
	}
}

void StraightProbeSettings::SetCoordsToTarget(float coords[MaxAxes]) const noexcept
{
	for (size_t axis = 0; axis < MaxAxes; ++axis)
	{
		coords[axis] = target[axis];
	}
}

// End