[Grbl_Esp32 Issue#728] Limit Invert Mask

未分类 bolang 6个月前 (10-14) 41次浏览

Issue #728 | 状态: 已关闭 | 作者: reynolds087 | 创建时间: 2021-01-03


Hi, I see this line in the roadmap under recently completed:

Automatically generate #define LIMIT_MASK from defined pins.

Does that mean that the feature is available, or is it still in progress? I have a mixture of normally open and normally closed limit switches. It would be difficult to change that. If not, is there another work around for my situation?


评论 (4)

#1 – bdring 于 2021-01-03

See this wiki page on how to do that.

Stay tuned: This is about to get way better in the next major update.


#2 – reynolds087 于 2021-01-03

Thanks, is the example on that page meant to be literal? for instance if I want to only invert the x and z limit switches, would I use this line?

#define INVERTLIMITPINMASK ((1<LIMITBIT)|(1<LIMIT_BIT))


#3 – reynolds087 于 2021-01-03

It won’t compile the way it’s shown on that page. I’m sure I’m doing something wrong, just can’t figure out what. I copy pasted the example line from the wiki and get this message:

sketch\src\Limits.cpp: In function ‘AxisMask limitsgetstate()’:

sketch\src\Machines/josh.h:108:36: error: ‘XLIMITBIT’ was not declared in this scope

#define INVERTLIMITPINMASK ((1<LIMITBIT)|(1<LIMIT_BIT))

^

sketch\src\Limits.cpp:331:16: note: in expansion of macro ‘INVERTLIMITPIN_MASK’

pinMask ^= INVERTLIMITPIN_MASK;

^

sketch\src\Machines/josh.h:108:53: error: ‘YLIMITBIT’ was not declared in this scope

#define INVERTLIMITPINMASK ((1<LIMITBIT)|(1<LIMIT_BIT))

^

sketch\src\Limits.cpp:331:16: note: in expansion of macro ‘INVERTLIMITPIN_MASK’

pinMask ^= INVERTLIMITPIN_MASK;


#4 – reynolds087 于 2021-01-03

I guess I was overthinking it. Set it like other axis masks, and it worked. I put 2, because I actually only needed to invert my Y axis.


原始Issue: https://github.com/bdring/Grbl_Esp32/issues/728

喜欢 (0)