[Grbl_Esp32 PR#595] Most #defines are gone

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

Issue #595 | 状态: 已关闭 | 作者: MitchBradley | 创建时间: 2020-09-12


The various uint8t data types and their associated #define lists in System.h have now been replaced by enums where possible or bitfields where necessary. The system variables are now typed to show their meaning and value sets. The underlying storage type is still uint8t in all cases, but the variables are now declared with fine-grained types.

The changes are mostly “transliterations”, but there is one area where a more substantive change occurred, namely rate overrides. The existing rate override code set bits from Serial.cpp that were processed later. The new code modifies a copy of the rate variables in Serial.cpp and propagates it to the real variables later. This avoids ordering ambiguities and is likely to be faster, since the modifications that are done at the Serial driver level are just adds and subtracts.

This patch completes the job of weeding out #defines from the core protocol code.

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

喜欢 (0)