deadzone.comp
来自「CNC 的开放码,EMC2 V2.2.8版」· COMP 代码 · 共 21 行
COMP
21 行
component deadzone;param rw float center = 0.0 "The center of the dead zone";param rw float threshhold = 1.0 "The dead zone is \\fBcenter\\fR \\(+- (\\fBthreshhold\\fR/2)";pin in float in;pin out float out;function _ "Update \\fBout\\fR based on \\fBin\\fR and the parameters.";license "GPL";;;FUNCTION(_) { double th2 = threshhold / 2; double lo = center - th2; double hi = center + th2; double in_ = in; if(in_ < lo) out = in_ + th2; else if(in_ > hi) out = in_ - th2; else out = center;}
⌨️ 快捷键说明
复制代码Ctrl + C
搜索代码Ctrl + F
全屏模式F11
增大字号Ctrl + =
减小字号Ctrl + -
显示快捷键?