[Grbl_Esp32 Issue#348] “defaults.h” overrides values defined in “cpu_map.h”

未分类 bolang 4个月前 (10-14) 46次浏览

Issue #348 | 状态: 已关闭 | 作者: Stefano-Orsolini | 创建时间: 2020-03-14

标签: bug


I’m using the pin map CPUMAPESP32ESCSPINDLE with great success but I noticed that “defaults.h” overrides the values defined in “cpu_map.h” for:
DEFAULTSPINDLEOFF_VALUE
DEFAULTSPINDLEMIN_VALUE
DEFAULTSPINDLEMAX_VALUE

when commenting this definitions in “defaults.h” I successfully control the brushless motor thanks to the values defined in “cpu_maps.h”.

DEFAULTSPINDLEFREQ instead is not overridden

no clue why this is happening


评论 (2)

#1 – MitchBradley 于 2020-03-15

Which version are you using? In the latest master, those definitions are guarded by ifndef like this:


#ifndef DEFAULTSPINDLEOFF_VALUE
#define DEFAULTSPINDLEOFF_VALUE 0.0 // $34 Percent (extended set)
#endif

The ifndef guards are supposed to prevent defaults.h from overriding values that are already set in cpu_map.h. The guards have been present since at least 4 months ago (commit 8f4e7c20).


#2 – Stefano-Orsolini 于 2020-03-15

I guess I must have edited the parameters and created the problem myself.
I confirm that everything works using latest master as you stated!


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

喜欢 (0)