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

ManualZCalibrationStepButton.go « uiWidgets - github.com/Z-Bolt/OctoScreen.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
blob: b9b6614f1347e69dfe6150f58f1bc16088f301d6 (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
package uiWidgets

import (
	"github.com/Z-Bolt/OctoScreen/logger"
)

type ManualZCalibrationStepButton struct {
	*StepButton
}

func CreateManualZCalibrationStepButton() *ManualZCalibrationStepButton {
	base, err := CreateStepButton(
		1,
		Step{"Start Manual\nZ Calibration", "z-calibration.svg", nil, false},
		Step{"Stop Manual\nZ Calibration",  "z-calibration.svg", nil, true},
	)
	if err != nil {
		logger.LogError("PANIC!!! - CreateManualZCalibrationStepButton()", "CreateStepButton()", err)
		panic(err)
	}

	instance := &ManualZCalibrationStepButton{
		StepButton: base,
	}

	return instance
}

// The value returned represents if it is running (true) or if idle (false).
func (this *ManualZCalibrationStepButton) Value() bool {
	return this.StepButton.Value().(bool)
}

func (this *ManualZCalibrationStepButton) IsCalibrating() bool {
	return this.Value()
}