mirror of
https://github.com/grblHAL/core.git
synced 2026-08-18 08:57:24 +08:00
NOTE: this is a relatively large change and may have introduced bugs and/or unintended side-effects. Please report any issues! Added setting $519 for binding spindle encoder to given spindle in multi spindle configurations. Added machine readable spindle enumeration report, $SPINDLESH. Increased default value for setting $398 (number of planner blocs) from 35 to 100 for faster laser engraving. NOTE: the $398 setting value will not change on an upgrade! NOTE: STM32F103 builds for the 128K flash variants does not have enough free RAM and will keep 35 as the default value. Increased allowed number of decimal places from 3 to 5 for $10x stepper step/mm settings. Ref. ioSender issue 346. Added setting $650 for filing system options. Ref. issue 397. Currently the following bits are available (depending on the configuration): 0 - Auto mount SD card on startup (1). 1 - Do not add littlefs files when listing the root directory (2). Added build option for lathe UVW mode. When enabled UVW words can be used to command relative moves for XYZ without switching to relative mode with G91. NOTE: This permanently sets lathe mode and disables the $32 mode setting. There are signature changes to some spindle, ioports enumeration and VFS filing system mount functions. Added events to allow plugin code to handle tool table data, possibly stored on a SD card.
43 lines
1.5 KiB
C
43 lines
1.5 KiB
C
/*
|
|
stepper2.h - secondary stepper motor driver
|
|
|
|
Part of grblHAL
|
|
|
|
Copyright (c) 2023 Terje Io
|
|
|
|
Grbl is free software: you can redistribute it and/or modify
|
|
it under the terms of the GNU General Public License as published by
|
|
the Free Software Foundation, either version 3 of the License, or
|
|
(at your option) any later version.
|
|
|
|
Grbl is distributed in the hope that it will be useful,
|
|
but WITHOUT ANY WARRANTY; without even the implied warranty of
|
|
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
|
GNU General Public License for more details.
|
|
|
|
You should have received a copy of the GNU General Public License
|
|
along with Grbl. If not, see <http://www.gnu.org/licenses/>.
|
|
*/
|
|
|
|
#include <stdint.h>
|
|
#include <stdbool.h>
|
|
|
|
typedef enum {
|
|
Stepper2_Steps = 0, //!< 0
|
|
Stepper2_InfiniteSteps, //!< 1
|
|
Stepper2_mm //!< 2
|
|
} position_t;
|
|
|
|
struct st2_motor; // members defined in stepper2.c
|
|
typedef struct st2_motor st2_motor_t;
|
|
|
|
st2_motor_t *st2_motor_init (uint_fast8_t axis_idx, bool is_spindle);
|
|
float st2_motor_set_speed (st2_motor_t *motor, float speed);
|
|
bool st2_motor_move (st2_motor_t *motor, const float move, const float speed, position_t type);
|
|
bool st2_motor_run (st2_motor_t *motor);
|
|
bool st2_motor_running (st2_motor_t *motor);
|
|
bool st2_motor_cruising (st2_motor_t *motor);
|
|
bool st2_motor_stop (st2_motor_t *motor);
|
|
int64_t st2_get_position (st2_motor_t *motor);
|
|
bool st2_set_position (st2_motor_t *motor, int64_t position);
|