[Grbl_Esp32 PR#721] Pwm integer

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

Issue #721 | 状态: 已关闭 | 作者: atlaste | 创建时间: 2020-12-24


2 changes.

1. Changes spindle to volatile, because it’s used by multiple CPU’s. This is good enough for now, because the implementations basically just set pins off. In the long term, we need a better solution.

2. Changed PWM analog user output to integers. The reason is because of a crash in Devt when limits are hit:

0x400dee4d> 0x400dee4d is in UserOutput::AnalogOutput::setlevel(float) (GrblEsp32\src\UserOutput.cpp:92).
92 bool AnalogOutput::set_level(float percent) {
0x400dea4c> 0x400dea4c is in syspwmcontrol(unsigned char, float, bool) (Grbl_Esp32\src\System.cpp:295).
295 if (!myAnalogOutputs[ionum]->setlevel(duty))
0x400d53ac> 0x400d53ac is in mcreset() (GrblEsp32\src\MotionControl.cpp:509).
509 syspwmcontrol(0xFF, 0, false);
0x40081f17> 0x40081f17 is in isrlimitswitches() (Grbl_Esp32\src\Limits.cpp:62).
62 mc_reset(); // Initiate system kill.

[…]

Apparently floating point is not allowed in ISR’s. These changes should fix that.


评论 (1)

#1 – bdring 于 2021-01-01

fixed via #722


原始Issue: https://github.com/bdring/Grbl_Esp32/pull/721

喜欢 (0)