makerbase-mks / MKS-SERVO42B

MKS SERVO42B is 3d printer closed loop stepper motor NEMA17 MKS SERVO42 developed by Makerbase that prevents losing steps. CPU is STM32F103C8T6 ARM 32-bit Cortex™-M3 CPU Core,72 MHz. Magnetic encoder is Allegro's A1333LLETR-T Contactless 0° to 360° angle sensor IC ,12bit .This Project open source hardware and code,support platformio build and upload firmware...
https://www.aliexpress.com/item/33032696338.html?spm=a2g0o.store_home.productList_8356958.pic_1
GNU General Public License v3.0
166 stars 70 forks source link

undefined compiler behavior #23

Closed dzid26 closed 3 years ago

dzid26 commented 3 years ago

https://github.com/dzid26/MKS-SERVO42B/blob/5238b53deeac7e8d9e6819bb8fbb31df3eea47c9/firmware/src/BSP/stepper_controller.c x = a - (currentLocation & (int64_t) ANGLE_MAX); bitwise operator with signed integer