Code formatting and settings changes

This commit is contained in:
Rob Giseburt
2023-02-16 09:09:05 -06:00
parent 28e7286a8a
commit d3f903b5ef
17 changed files with 2098 additions and 1894 deletions
+15 -16
View File
@@ -1,18 +1,17 @@
{
"configurations": [
{
"name": "Mac",
"compileCommands": "${workspaceFolder}/g2core/compile_commands.json",
"compilerPath": "${workspaceFolder}/Motate/Tools/osx/gcc-arm-none-eabi-7u2/bin/arm-none-eabi-gcc",
"cStandard": "c11",
"cppStandard": "c++17",
"intelliSenseMode": "gcc-x64",
"browse": {
"path": [
"${workspaceFolder}"
]
}
}
],
"version": 4
"configurations": [
{
"name": "Mac",
"compileCommands": "${workspaceFolder}/g2core/compile_commands.json",
"compilerPath": "${workspaceFolder}/Motate/Tools/osx/gcc-arm-none-eabi-12.2r1/bin/arm-none-eabi-gcc",
"cStandard": "c11",
"cppStandard": "c++17",
"intelliSenseMode": "gcc-x64",
"browse": {
"path": ["${workspaceFolder}"]
},
"configurationProvider": "ms-vscode.makefile-tools"
}
],
"version": 4
}
+35 -35
View File
@@ -14,12 +14,12 @@
"device": "ATSAMS70N19",
"svdFile": "${workspaceRoot}/Motate/MotateProject/motate/cmsis/TARGET_Atmel/sams70/ATSAMS70N19.svd",
"interface": "swd",
"showDevDebugOutput": false,
"showDevDebugOutput": "none",
"osx": {
"armToolchainPath": "${workspaceRoot}/Motate/Tools/osx/gcc-arm-none-eabi-7u2/bin/"
"armToolchainPath": "${workspaceRoot}/Motate/Tools/osx/gcc-arm-none-eabi-12.2r1/bin/"
},
"linux": {
"armToolchainPath": "${workspaceRoot}/Motate/Tools/linux/gcc-arm-none-eabi-9m/bin/"
"armToolchainPath": "${workspaceRoot}/Motate/Tools/linux/gcc-arm-none-eabi-12.2r1/bin/"
},
"preLaunchTask": "Build CONFIG=fourcable"
},
@@ -33,12 +33,12 @@
"device": "ATSAMS70N19",
"svdFile": "${workspaceRoot}/Motate/MotateProject/motate/cmsis/TARGET_Atmel/sams70/ATSAMS70N19.svd",
"interface": "swd",
"showDevDebugOutput": false,
"showDevDebugOutput": "none",
"osx": {
"armToolchainPath": "${workspaceRoot}/Motate/Tools/osx/gcc-arm-none-eabi-7u2/bin/"
"armToolchainPath": "${workspaceRoot}/Motate/Tools/osx/gcc-arm-none-eabi-12.2r1/bin/"
},
"linux": {
"armToolchainPath": "${workspaceRoot}/Motate/Tools/linux/gcc-arm-none-eabi-9m/bin/"
"armToolchainPath": "${workspaceRoot}/Motate/Tools/linux/gcc-arm-none-eabi-12.2r1/bin/"
},
"preLaunchTask": "Build CONFIG=r7 Debug"
},
@@ -52,12 +52,12 @@
"device": "ATSAM3X8E",
"svdFile": "${workspaceRoot}/Motate/MotateProject/motate/cmsis/TARGET_Atmel/sam3x/ATSAM3X8E.svd",
"interface": "swd",
"showDevDebugOutput": false,
"showDevDebugOutput": "none",
"osx": {
"armToolchainPath": "${workspaceRoot}/Motate/Tools/osx/gcc-arm-none-eabi-7u2/bin/"
"armToolchainPath": "${workspaceRoot}/Motate/Tools/osx/gcc-arm-none-eabi-12.2r1/bin/"
},
"linux": {
"armToolchainPath": "${workspaceRoot}/Motate/Tools/linux/gcc-arm-none-eabi-9m/bin/"
"armToolchainPath": "${workspaceRoot}/Motate/Tools/linux/gcc-arm-none-eabi-12.2r1/bin/"
},
"preLaunchTask": "Build CONFIG=MiniMillgShield Debug"
},
@@ -71,12 +71,12 @@
"device": "ATSAM3X8E",
"svdFile": "${workspaceRoot}/Motate/MotateProject/motate/cmsis/TARGET_Atmel/sam3x/ATSAM3X8E.svd",
"interface": "swd",
"showDevDebugOutput": false,
"showDevDebugOutput": "none",
"osx": {
"armToolchainPath": "${workspaceRoot}/Motate/Tools/osx/gcc-arm-none-eabi-7u2/bin/"
"armToolchainPath": "${workspaceRoot}/Motate/Tools/osx/gcc-arm-none-eabi-12.2r1/bin/"
},
"linux": {
"armToolchainPath": "${workspaceRoot}/Motate/Tools/linux/gcc-arm-none-eabi-9m/bin/"
"armToolchainPath": "${workspaceRoot}/Motate/Tools/linux/gcc-arm-none-eabi-12.2r1/bin/"
},
"preLaunchTask": "Build CONFIG=ShapeokoDualY"
},
@@ -90,12 +90,12 @@
"device": "ATSAM3X8E",
"svdFile": "${workspaceRoot}/Motate/MotateProject/motate/cmsis/TARGET_Atmel/sam3x/ATSAM3X8E.svd",
"interface": "swd",
"showDevDebugOutput": false,
"showDevDebugOutput": "none",
"osx": {
"armToolchainPath": "${workspaceRoot}/Motate/Tools/osx/gcc-arm-none-eabi-7u2/bin/"
"armToolchainPath": "${workspaceRoot}/Motate/Tools/osx/gcc-arm-none-eabi-12.2r1/bin/"
},
"linux": {
"armToolchainPath": "${workspaceRoot}/Motate/Tools/linux/gcc-arm-none-eabi-9m/bin/"
"armToolchainPath": "${workspaceRoot}/Motate/Tools/linux/gcc-arm-none-eabi-12.2r1/bin/"
},
"preLaunchTask": "Build CONFIG=MiniMillv9 Debug"
},
@@ -105,16 +105,16 @@
"request": "launch",
"servertype": "jlink",
"cwd": "${workspaceRoot}/g2core/",
"executable": "./bin/MiniMill-gquintic-d/g2core.elf",
"executable": "./bin/MiniMill-gquintic-g/g2core.elf",
"device": "ATSAMS70N19",
"svdFile": "${workspaceRoot}/Motate/MotateProject/motate/cmsis/TARGET_Atmel/sams70/ATSAMS70N19.svd",
"interface": "swd",
"showDevDebugOutput": false,
"showDevDebugOutput": "none",
"osx": {
"armToolchainPath": "${workspaceRoot}/Motate/Tools/osx/gcc-arm-none-eabi-7u2/bin/"
"armToolchainPath": "${workspaceRoot}/Motate/Tools/osx/gcc-arm-none-eabi-12.2r1/bin/"
},
"linux": {
"armToolchainPath": "${workspaceRoot}/Motate/Tools/linux/gcc-arm-none-eabi-9m/bin/"
"armToolchainPath": "${workspaceRoot}/Motate/Tools/linux/gcc-arm-none-eabi-12.2r1/bin/"
},
"preLaunchTask": "Build CONFIG=MiniMill Debug"
},
@@ -128,16 +128,16 @@
"device": "ATSAMS70N20",
"svdFile": "${workspaceRoot}/Motate/MotateProject/motate/cmsis/TARGET_Atmel/sams70/ATSAMS70N20B.svd",
"interface": "swd",
"showDevDebugOutput": false,
"showDevDebugOutput": "none",
"osx": {
"armToolchainPath": "${workspaceRoot}/Motate/Tools/osx/gcc-arm-none-eabi-7u2/bin/"
"armToolchainPath": "${workspaceRoot}/Motate/Tools/osx/gcc-arm-none-eabi-12.2r1/bin/"
},
"linux": {
"armToolchainPath": "${workspaceRoot}/Motate/Tools/linux/gcc-arm-none-eabi-9m/bin/"
"armToolchainPath": "${workspaceRoot}/Motate/Tools/linux/gcc-arm-none-eabi-12.2r1/bin/"
},
"swoConfig": {
"enabled": true,
"source":"probe",
"source": "probe",
"swoFrequency": 8000000,
"decoders": [
{
@@ -198,12 +198,12 @@
"device": "ATSAMS70N20",
"svdFile": "${workspaceRoot}/Motate/MotateProject/motate/cmsis/TARGET_Atmel/sams70/ATSAMS70N20B.svd",
"interface": "swd",
"showDevDebugOutput": false,
"showDevDebugOutput": "none",
"osx": {
"armToolchainPath": "${workspaceRoot}/Motate/Tools/osx/gcc-arm-none-eabi-7u2/bin/"
"armToolchainPath": "${workspaceRoot}/Motate/Tools/osx/gcc-arm-none-eabi-12.2r1/bin/"
},
"linux": {
"armToolchainPath": "${workspaceRoot}/Motate/Tools/linux/gcc-arm-none-eabi-9m/bin/"
"armToolchainPath": "${workspaceRoot}/Motate/Tools/linux/gcc-arm-none-eabi-12.2r1/bin/"
},
"preLaunchTask": "Build CONFIG=MiniMill Debug"
},
@@ -217,12 +217,12 @@
"device": "ATSAMS70N19",
"svdFile": "${workspaceRoot}/Motate/MotateProject/motate/cmsis/TARGET_Atmel/sams70/ATSAMS70N19.svd",
"interface": "swd",
"showDevDebugOutput": false,
"showDevDebugOutput": "none",
"osx": {
"armToolchainPath": "${workspaceRoot}/Motate/Tools/osx/gcc-arm-none-eabi-7u2/bin/"
"armToolchainPath": "${workspaceRoot}/Motate/Tools/osx/gcc-arm-none-eabi-12.2r1/bin/"
},
"linux": {
"armToolchainPath": "${workspaceRoot}/Motate/Tools/linux/gcc-arm-none-eabi-9m/bin/"
"armToolchainPath": "${workspaceRoot}/Motate/Tools/linux/gcc-arm-none-eabi-12.2r1/bin/"
},
"preLaunchTask": "Build CONFIG=CheapoLaser Debug"
},
@@ -235,13 +235,13 @@
"executable": "./bin/OthermillPro-g2v9k/g2core.elf",
"device": "ATSAM3X8E",
"interface": "swd",
"showDevDebugOutput": false,
"showDevDebugOutput": "none",
"svdFile": "${workspaceRoot}/Motate/MotateProject/motate/cmsis/TARGET_Atmel/sam3x/ATSAM3X8E.svd",
"osx": {
"armToolchainPath": "${workspaceRoot}/Motate/Tools/osx/gcc-arm-none-eabi-7u2/bin/"
"armToolchainPath": "${workspaceRoot}/Motate/Tools/osx/gcc-arm-none-eabi-12.2r1/bin/"
},
"linux": {
"armToolchainPath": "${workspaceRoot}/Motate/Tools/linux/gcc-arm-none-eabi-9m/bin/"
"armToolchainPath": "${workspaceRoot}/Motate/Tools/linux/gcc-arm-none-eabi-12.2r1/bin/"
},
"preLaunchTask": "Build CONFIG=OthermillPro Debug"
},
@@ -255,12 +255,12 @@
"device": "ATSAMS70N20",
"svdFile": "${workspaceRoot}/Motate/MotateProject/motate/cmsis/TARGET_Atmel/sams70/ATSAMS70N20B.svd",
"interface": "swd",
"showDevDebugOutput": false,
"showDevDebugOutput": "none",
"osx": {
"armToolchainPath": "${workspaceRoot}/Motate/Tools/osx/gcc-arm-none-eabi-7u2/bin/"
"armToolchainPath": "${workspaceRoot}/Motate/Tools/osx/gcc-arm-none-eabi-12.2r1/bin/"
},
"linux": {
"armToolchainPath": "${workspaceRoot}/Motate/Tools/linux/gcc-arm-none-eabi-9m/bin/"
"armToolchainPath": "${workspaceRoot}/Motate/Tools/linux/gcc-arm-none-eabi-12.2r1/bin/"
},
"preLaunchTask": "Build CONFIG=AxiDrawv3-quint Debug"
}
+22
View File
@@ -309,6 +309,17 @@
"fileLocation": ["relative", "${workspaceRoot}/g2core"]
}
},
{
"label": "Build CONFIG=r7-v9k Production",
"type": "process",
"command": "make",
"args": ["CONFIG=r7-v9k", "VERBOSE=2", "COLOR=0", "RECORD=1"],
"group": "build",
"problemMatcher": {
"base": "$gcc",
"fileLocation": ["relative", "${workspaceRoot}/g2core"]
}
},
{
"label": "Clean CONFIG=r7",
"type": "process",
@@ -320,6 +331,17 @@
"fileLocation": ["relative", "${workspaceRoot}/g2core"]
}
},
{
"label": "Clean CONFIG=r7-v9k",
"type": "process",
"command": "make",
"args": ["CONFIG=r7-v9k", "clean"],
"group": "build",
"problemMatcher": {
"base": "$gcc",
"fileLocation": ["relative", "${workspaceRoot}/g2core"]
}
},
{
"label": "Build CONFIG=CheapoLaser Debug",
"type": "process",
+1 -3
View File
@@ -65,9 +65,7 @@ endif
# DEVICE_DEFINES += DEBUG=1 IN_DEBUGGER=1 DEBUG_SEMIHOSTING=1
#endif
#Switch this to 9m if you are compiling the g2core binary on a Raspberry Pi
TOOLS_VERSION = 7u2
# TOOLS_VERSION = 9m
TOOLS_VERSION = 12.2r1
# Now invoke the Motate compile system
include $(MOTATE_PATH)/Motate.mk
+28 -38
View File
@@ -37,64 +37,54 @@
*/
//--- change as required for board and switch hardware ---//
#define D_IN_CHANNELS 10 // v9 // number of digital inputs supported
#define D_OUT_CHANNELS 13 // number of digital outputs supported
#define A_IN_CHANNELS 0 // number of analog inputs supported
#define A_OUT_CHANNELS 0 // number of analog outputs supported
#define D_IN_CHANNELS 10 // v9 // number of digital inputs supported
#define D_OUT_CHANNELS 13 // number of digital outputs supported
#define A_IN_CHANNELS 0 // number of analog inputs supported
#define A_OUT_CHANNELS 0 // number of analog outputs supported
#define INPUT_LOCKOUT_MS 10 // milliseconds to go dead after input firing
// Setup spindle and coolant pin assignments
#define SPINDLE_ENABLE_OUTPUT_NUMBER 1
#define SPINDLE_DIRECTION_OUTPUT_NUMBER 2
#define SPINDLE_PWM_NUMBER 3
#define MIST_ENABLE_OUTPUT_NUMBER 4
#define FLOOD_ENABLE_OUTPUT_NUMBER 0
#define SECONDARY_PWM_OUTPUT_NUMBER 0
#define INPUT_LOCKOUT_MS 10 // milliseconds to go dead after input firing
/*
* The GPIO objects themselves - this must match up with board_gpio.cpp!
*/
extern gpioDigitalInput* const d_in[D_IN_CHANNELS];
extern gpioDigitalOutput* const d_out[D_OUT_CHANNELS];
extern gpioDigitalInput* const d_in[D_IN_CHANNELS];
extern gpioDigitalOutput* const d_out[D_OUT_CHANNELS];
// extern gpioAnalogInput* a_in[A_IN_CHANNELS];
// extern gpioAnalogOutput* a_out[A_OUT_CHANNELS];
// prepare the objects as externs (for config_app to not bloat)
using Motate::IRQPin;
using Motate::PWMOutputPin;
using Motate::PWMLikeOutputPin;
template<bool can_pwm, Motate::pin_number... V>
using Motate::PWMOutputPin;
template <bool can_pwm, Motate::pin_number... V>
using OutputType = typename std::conditional<can_pwm, PWMOutputPin<V...>, PWMLikeOutputPin<V...>>::type;
extern gpioDigitalInputPin<IRQPin<Motate::kInput1_PinNumber>> din1;
extern gpioDigitalInputPin<IRQPin<Motate::kInput2_PinNumber>> din2;
extern gpioDigitalInputPin<IRQPin<Motate::kInput3_PinNumber>> din3;
extern gpioDigitalInputPin<IRQPin<Motate::kInput4_PinNumber>> din4;
extern gpioDigitalInputPin<IRQPin<Motate::kInput5_PinNumber>> din5;
extern gpioDigitalInputPin<IRQPin<Motate::kInput6_PinNumber>> din6;
extern gpioDigitalInputPin<IRQPin<Motate::kInput7_PinNumber>> din7;
extern gpioDigitalInputPin<IRQPin<Motate::kInput8_PinNumber>> din8;
extern gpioDigitalInputPin<IRQPin<Motate::kInput9_PinNumber>> din9;
extern gpioDigitalInputPin<IRQPin<Motate::kInput1_PinNumber>> din1;
extern gpioDigitalInputPin<IRQPin<Motate::kInput2_PinNumber>> din2;
extern gpioDigitalInputPin<IRQPin<Motate::kInput3_PinNumber>> din3;
extern gpioDigitalInputPin<IRQPin<Motate::kInput4_PinNumber>> din4;
extern gpioDigitalInputPin<IRQPin<Motate::kInput5_PinNumber>> din5;
extern gpioDigitalInputPin<IRQPin<Motate::kInput6_PinNumber>> din6;
extern gpioDigitalInputPin<IRQPin<Motate::kInput7_PinNumber>> din7;
extern gpioDigitalInputPin<IRQPin<Motate::kInput8_PinNumber>> din8;
extern gpioDigitalInputPin<IRQPin<Motate::kInput9_PinNumber>> din9;
extern gpioDigitalInputPin<IRQPin<Motate::kSocket2_SPISlaveSelectPinNumber>> din10;
// extern gpioDigitalInputPin<IRQPin<Motate::kInput11_PinNumber>> din11;
// extern gpioDigitalInputPin<IRQPin<Motate::kInput12_PinNumber>> din12;
extern gpioDigitalOutputPin<OutputType<OUTPUT1_PWM, Motate::kOutput1_PinNumber>> dout1;
extern gpioDigitalOutputPin<OutputType<OUTPUT2_PWM, Motate::kOutput2_PinNumber>> dout2;
extern gpioDigitalOutputPin<OutputType<OUTPUT3_PWM, Motate::kOutput3_PinNumber>> dout3;
extern gpioDigitalOutputPin<OutputType<OUTPUT4_PWM, Motate::kOutput4_PinNumber>> dout4;
extern gpioDigitalOutputPin<OutputType<OUTPUT5_PWM, Motate::kOutput5_PinNumber>> dout5;
extern gpioDigitalOutputPin<OutputType<OUTPUT6_PWM, Motate::kOutput6_PinNumber>> dout6;
extern gpioDigitalOutputPin<OutputType<OUTPUT7_PWM, Motate::kOutput7_PinNumber>> dout7;
extern gpioDigitalOutputPin<OutputType<OUTPUT8_PWM, Motate::kOutput8_PinNumber>> dout8;
extern gpioDigitalOutputPin<OutputType<OUTPUT9_PWM, Motate::kOutput9_PinNumber>> dout9;
extern gpioDigitalOutputPin<OutputType<OUTPUT1_PWM, Motate::kOutput1_PinNumber>> dout1;
extern gpioDigitalOutputPin<OutputType<OUTPUT2_PWM, Motate::kOutput2_PinNumber>> dout2;
extern gpioDigitalOutputPin<OutputType<OUTPUT3_PWM, Motate::kOutput3_PinNumber>> dout3;
extern gpioDigitalOutputPin<OutputType<OUTPUT4_PWM, Motate::kOutput4_PinNumber>> dout4;
extern gpioDigitalOutputPin<OutputType<OUTPUT5_PWM, Motate::kOutput5_PinNumber>> dout5;
extern gpioDigitalOutputPin<OutputType<OUTPUT6_PWM, Motate::kOutput6_PinNumber>> dout6;
extern gpioDigitalOutputPin<OutputType<OUTPUT7_PWM, Motate::kOutput7_PinNumber>> dout7;
extern gpioDigitalOutputPin<OutputType<OUTPUT8_PWM, Motate::kOutput8_PinNumber>> dout8;
extern gpioDigitalOutputPin<OutputType<OUTPUT9_PWM, Motate::kOutput9_PinNumber>> dout9;
extern gpioDigitalOutputPin<OutputType<OUTPUT10_PWM, Motate::kOutput10_PinNumber>> dout10;
extern gpioDigitalOutputPin<OutputType<OUTPUT11_PWM, Motate::kOutput11_PinNumber>> dout11;
extern gpioDigitalOutputPin<OutputType<OUTPUT12_PWM, Motate::kOutput12_PinNumber>> dout12;
extern gpioDigitalOutputPin<OutputType<OUTPUT13_PWM, Motate::kOutput13_PinNumber>> dout13;
#endif // End of include guard: BOARD_GPIO_H_ONCE
#endif // End of include guard: BOARD_GPIO_H_ONCE
+7
View File
@@ -258,6 +258,13 @@ ifeq ("$(CONFIG)","r7")
SETTINGS_FILE="settings_smw3d_r7.h"
endif
ifeq ("$(CONFIG)","r7-v9k")
ifeq ("$(BOARD)","NONE")
BOARD=g2v9k
endif
SETTINGS_FILE="settings_smw3d_r7_v9k.h"
endif
##########
# Synthetos Pendulum v2 config:
File diff suppressed because it is too large Load Diff
+439 -442
View File
File diff suppressed because it is too large Load Diff
+39 -44
View File
@@ -25,15 +25,15 @@
* OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
*/
#include "g2core.h" // #1 dependency order
#include "config.h" // #2
#include "canonical_machine.h" // #3
#include "text_parser.h" // #4
#include "gpio.h"
#include "coolant.h"
#include "planner.h"
#include "canonical_machine.h" // #3
#include "config.h" // #2
#include "g2core.h" // #1 dependency order
#include "gpio.h"
#include "hardware.h"
#include "planner.h"
#include "text_parser.h" // #4
#include "util.h"
/**** Allocate structures ****/
@@ -57,7 +57,7 @@ coCoolant_t coolant;
/**** Static functions ****/
static void _exec_coolant_control(float* value, bool* flag);
static void _exec_coolant_control(float *value, bool *flag);
/****************************************************************************************
* coolant_init()
@@ -65,17 +65,17 @@ static void _exec_coolant_control(float* value, bool* flag);
*/
void coolant_init() {
if (MIST_ENABLE_OUTPUT_NUMBER > 0) {
coolant.mist.output = d_out[MIST_ENABLE_OUTPUT_NUMBER-1];
coolant.mist.output = d_out[MIST_ENABLE_OUTPUT_NUMBER - 1];
coolant.mist.output->setEnabled(IO_ENABLED);
coolant.mist.output->setPolarity((ioPolarity)COOLANT_MIST_POLARITY);
}
if (FLOOD_ENABLE_OUTPUT_NUMBER > 0) {
coolant.flood.output = d_out[FLOOD_ENABLE_OUTPUT_NUMBER-1];
coolant.flood.output = d_out[FLOOD_ENABLE_OUTPUT_NUMBER - 1];
coolant.flood.output->setEnabled(IO_ENABLED);
coolant.flood.output->setPolarity((ioPolarity)COOLANT_FLOOD_POLARITY);
}
coolant.mist.state = COOLANT_OFF;
coolant.mist.state = COOLANT_OFF;
coolant.flood.state = COOLANT_OFF;
}
@@ -90,16 +90,14 @@ void coolant_reset() {
* _exec_coolant_control() - actually execute the coolant command
*/
stat_t coolant_control_immediate(coControl control, coSelect select)
{
float value[] = { (float)control };
bool flags[] = { (select & COOLANT_MIST), (select & COOLANT_FLOOD) };
stat_t coolant_control_immediate(coControl control, coSelect select) {
float value[] = {(float)control};
bool flags[] = {(select & COOLANT_MIST), (select & COOLANT_FLOOD)};
_exec_coolant_control(value, flags);
return(STAT_OK);
return (STAT_OK);
}
stat_t coolant_control_sync(coControl control, coSelect select)
{
stat_t coolant_control_sync(coControl control, coSelect select) {
// Skip the PAUSE operation if pause_enable is not enabled (pause-on-hold)
// The pause setting in mist coolant is treated as the master even though it's replicated in flood
if ((control == COOLANT_PAUSE) && (!coolant.mist.pause_enable)) {
@@ -107,14 +105,13 @@ stat_t coolant_control_sync(coControl control, coSelect select)
}
// queue the coolant control
float value[] = { (float)control };
bool flags[] = { (select & COOLANT_MIST), (select & COOLANT_FLOOD) };
float value[] = {(float)control};
bool flags[] = {(select & COOLANT_MIST), (select & COOLANT_FLOOD)};
mp_queue_command(_exec_coolant_control, value, flags);
return(STAT_OK);
return (STAT_OK);
}
static void _exec_coolant_helper(coCoolantChannel_t &co, coControl control) {
bool action = true;
int8_t enable_bit = 0;
switch (control) {
@@ -152,16 +149,15 @@ static void _exec_coolant_helper(coCoolantChannel_t &co, coControl control) {
}
}
static void _exec_coolant_control(float* value, bool* flag) {
static void _exec_coolant_control(float *value, bool *flag) {
coControl control = (coControl)value[0];
if (control > COOLANT_ACTION_MAX) {
return;
}
if (flag[0]) { // Mist, M7
if (flag[0]) { // Mist, M7
_exec_coolant_helper(coolant.mist, control);
}
if (flag[1]) { // Flood, M8
if (flag[1]) { // Flood, M8
_exec_coolant_helper(coolant.flood, control);
}
}
@@ -176,31 +172,30 @@ bool coolant_ready() { return true; }
**** Coolant Settings ******************************************************************
****************************************************************************************/
stat_t co_get_com(nvObj_t *nv) { return(get_integer(nv, coolant.mist.state)); }
stat_t co_set_com(nvObj_t *nv) { return(coolant_control_immediate((coControl)nv->value_int, COOLANT_MIST)); }
stat_t co_get_cof(nvObj_t *nv) { return(get_integer(nv, coolant.flood.state)); }
stat_t co_set_cof(nvObj_t *nv) { return(coolant_control_immediate((coControl)nv->value_int, COOLANT_FLOOD)); }
stat_t co_get_com(nvObj_t *nv) { return (get_integer(nv, coolant.mist.state)); }
stat_t co_set_com(nvObj_t *nv) { return (coolant_control_immediate((coControl)nv->value_int, COOLANT_MIST)); }
stat_t co_get_cof(nvObj_t *nv) { return (get_integer(nv, coolant.flood.state)); }
stat_t co_set_cof(nvObj_t *nv) { return (coolant_control_immediate((coControl)nv->value_int, COOLANT_FLOOD)); }
stat_t co_get_coph(nvObj_t *nv) { return(get_integer(nv, coolant.mist.pause_enable)); }
stat_t co_set_coph(nvObj_t *nv)
{
stat_t co_get_coph(nvObj_t *nv) { return (get_integer(nv, coolant.mist.pause_enable)); }
stat_t co_set_coph(nvObj_t *nv) {
ritorno(set_integer(nv, (uint8_t &)coolant.mist.pause_enable, 0, 1));
return (set_integer(nv, (uint8_t &)coolant.flood.pause_enable, 0, 1));
}
stat_t co_get_comp(nvObj_t *nv) { return(get_integer(nv, coolant.mist.polarity)); }
stat_t co_get_comp(nvObj_t *nv) { return (get_integer(nv, coolant.mist.polarity)); }
stat_t co_set_comp(nvObj_t *nv) {
stat_t ret = set_integer(nv, (uint8_t &)coolant.mist.polarity, 0, 1);
if (ret == STAT_OK && coolant.mist.output) {
coolant.mist.output->setPolarity((ioPolarity) coolant.mist.polarity);
coolant.mist.output->setPolarity((ioPolarity)coolant.mist.polarity);
}
return ret;
}
stat_t co_get_cofp(nvObj_t *nv) { return(get_integer(nv, coolant.flood.polarity)); }
stat_t co_get_cofp(nvObj_t *nv) { return (get_integer(nv, coolant.flood.polarity)); }
stat_t co_set_cofp(nvObj_t *nv) {
stat_t ret = set_integer(nv, (uint8_t &)coolant.flood.polarity, 0, 1);
if (ret == STAT_OK && coolant.flood.output) {
coolant.flood.output->setPolarity((ioPolarity) coolant.flood.polarity);
coolant.flood.output->setPolarity((ioPolarity)coolant.flood.polarity);
}
return ret;
}
@@ -215,13 +210,13 @@ stat_t co_set_cofp(nvObj_t *nv) {
const char fmt_coph[] = "[coph] coolant pause on hold%7d [0=no,1=pause_on_hold]\n";
const char fmt_comp[] = "[comp] coolant mist polarity%7d [0=low is ON,1=high is ON]\n";
const char fmt_cofp[] = "[cofp] coolant flood polarity%6d [0=low is ON,1=high is ON]\n";
const char fmt_com[] = "[com] coolant mist%16d [0=OFF,1=ON]\n";
const char fmt_cof[] = "[cof] coolant flood%15d [0=OFF,1=ON]\n";
const char fmt_com[] = "[com] coolant mist%16d [0=OFF,1=ON]\n";
const char fmt_cof[] = "[cof] coolant flood%15d [0=OFF,1=ON]\n";
void co_print_coph(nvObj_t* nv) { text_print(nv, fmt_coph); } // TYPE_INT
void co_print_comp(nvObj_t* nv) { text_print(nv, fmt_comp); } // TYPE_INT
void co_print_cofp(nvObj_t* nv) { text_print(nv, fmt_cofp); } // TYPE_INT
void co_print_com(nvObj_t* nv) { text_print(nv, fmt_com); } // TYPE_INT
void co_print_cof(nvObj_t* nv) { text_print(nv, fmt_cof); } // TYPE_INT
void co_print_coph(nvObj_t *nv) { text_print(nv, fmt_coph); } // TYPE_INT
void co_print_comp(nvObj_t *nv) { text_print(nv, fmt_comp); } // TYPE_INT
void co_print_cofp(nvObj_t *nv) { text_print(nv, fmt_cofp); } // TYPE_INT
void co_print_com(nvObj_t *nv) { text_print(nv, fmt_com); } // TYPE_INT
void co_print_cof(nvObj_t *nv) { text_print(nv, fmt_cof); } // TYPE_INT
#endif // __TEXT_MODE
+243 -203
View File
File diff suppressed because it is too large Load Diff
+1 -1
View File
@@ -730,7 +730,7 @@ static stat_t _parse_gcode_block(char *buf, char *active_comment)
}
break;
}
case 49: SET_NON_MODAL (next_action, NEXT_ACTION_CANCEL_TL_OFFSET);
case 49: SET_NON_MODAL (next_action, NEXT_ACTION_CANCEL_TL_OFFSET);
case 53: SET_NON_MODAL (absolute_override, ABSOLUTE_OVERRIDE_ON_DISPLAY_WITH_NO_OFFSETS);
case 54: SET_MODAL (MODAL_GROUP_G12, coord_system, G54);
case 55: SET_MODAL (MODAL_GROUP_G12, coord_system, G55);
+171 -175
View File
File diff suppressed because it is too large Load Diff
+197 -235
View File
File diff suppressed because it is too large Load Diff
+1 -1
View File
@@ -47,7 +47,7 @@
#define SPINDLE_DIR_POLARITY 0 // 0=clockwise is low, 1=clockwise is high
#define SPINDLE_PAUSE_ON_HOLD true
#define SPINDLE_SPINUP_DELAY 1.0
#define SPINDLE_PWM_NUMBER 6
#define SPINDLE_PWM_NUMBER 3
#define SECONDARY_PWM_OUTPUT_NUMBER 0 // disabled
// #define LASER_FIRE_PIN_NUMBER Motate::kOutput3_PinNumber // note this is a MOTATE pin number, NOT a GPIO pin number
+15 -1
View File
@@ -35,6 +35,20 @@
//**** GLOBAL / GENERAL SETTINGS ******************************************************
#define MIST_ENABLE_OUTPUT_NUMBER 0
#define FLOOD_ENABLE_OUTPUT_NUMBER 0
// #define SPINDLE_ENABLE_OUTPUT_NUMBER 4
// #define SPINDLE_DIRECTION_OUTPUT_NUMBER 5
// #define SPINDLE_PWM_NUMBER 6
#define SPINDLE_ENABLE_OUTPUT_NUMBER 1
#define SPINDLE_DIRECTION_OUTPUT_NUMBER 2
#define SPINDLE_PWM_NUMBER 3
// #define FEEDHOLD_Z_LIFT 3 // mm to lift Z on feedhold
#define JUNCTION_INTEGRATION_TIME 0.1 // cornering - between 0.10 and 2.00 (higher is faster)
#define CHORDAL_TOLERANCE 0.01 // chordal accuracy for arc drawing (in mm)
@@ -46,7 +60,7 @@
#define SPINDLE_DIR_POLARITY 0 // 0=clockwise is low, 1=clockwise is high
#define SPINDLE_PAUSE_ON_HOLD true
#define SPINDLE_SPINUP_DELAY 0.1 // after unpausing and turning the spindle on, dwell for 1.5s
#define SPINDLE_SPEED_CHANGE_PER_MS 7.0
#define SPINDLE_SPEED_CHANGE_PER_MS 7.0 // external non-speed-controlled spindle, but we can use this as a built-in delay
#define ESC_BOOT_TIME 5000 // how long the ESC takes to boot, in milliseconds
#define ESC_LOCKOUT_TIME 900 // how long the interlock needs to be engaged before killing power... actually 1s, but be conservative
+12 -11
View File
@@ -43,14 +43,15 @@
#define HARD_LIMIT_ENABLE 0 // 0=off, 1=on
#define SAFETY_INTERLOCK_ENABLE 1 // 0=off, 1=on
#define SPINDLE_ENABLE_OUTPUT_NUMBER 4
#define SPINDLE_ENABLE_POLARITY 1 // 0=active low, 1=active high
#define SPINDLE_ENABLE_OUTPUT_NUMBER 4
#define SPINDLE_ENABLE_POLARITY 1 // 0=active low, 1=active high
#define SPINDLE_DIRECTION_OUTPUT_NUMBER 5
#define SPINDLE_DIR_POLARITY 0 // 0=clockwise is low, 1=clockwise is high
#define SPINDLE_PAUSE_ON_HOLD true
#define SPINDLE_SPINUP_DELAY 1.0
#define SPINDLE_PWM_NUMBER 6
#define SECONDARY_PWM_OUTPUT_NUMBER 0 // disabled
#define SPINDLE_DIR_POLARITY 0 // 0=clockwise is low, 1=clockwise is high
#define SPINDLE_PAUSE_ON_HOLD true
#define SPINDLE_SPINUP_DELAY 1.0
#define SPINDLE_PWM_NUMBER 6
#define SECONDARY_PWM_OUTPUT_NUMBER 0 // disabled
#define SPINDLE_SPEED_CHANGE_PER_MS 4 // 20k RPM in 5 seconds
#define COOLANT_MIST_POLARITY 1 // 0=active low, 1=active high
#define COOLANT_FLOOD_POLARITY 1 // 0=active low, 1=active high
@@ -60,7 +61,7 @@
// Communications and reporting settings
#define USB_SERIAL_PORTS_EXPOSED 1 // 1=single endpoint usb, 2=dual endpoint usb
#define USB_SERIAL_PORTS_EXPOSED 1 // 1=single endpoint usb, 2=dual endpoint usb
#define COMM_MODE JSON_MODE // one of: TEXT_MODE, JSON_MODE
#define XIO_ENABLE_FLOW_CONTROL FLOW_CONTROL_RTS // FLOW_CONTROL_OFF, FLOW_CONTROL_RTS
@@ -97,7 +98,7 @@
#define M1_TRAVEL_PER_REV 8.0934060625 // 1tr
#define M1_MICROSTEPS 64 // 1mi 1,2,4,8,16,32
#define M1_POLARITY 1 // 1po 0=normal, 1=reversed
#define M1_POWER_MODE MOTOR_ALWAYS_POWERED // 1pm TRUE=low power idle enabled
#define M1_POWER_MODE MOTOR_ALWAYS_POWERED // 1pm TRUE=low power idle enabled
#define M1_POWER_LEVEL 0.500
#define M2_MOTOR_MAP AXIS_Y
@@ -129,11 +130,11 @@
#define JERK_MAX 5000
#define X_AXIS_MODE AXIS_STANDARD // xam see canonical_machine.h cmAxisMode for valid values
#define X_VELOCITY_MAX 5000 // xvm G0 max velocity in mm/min
#define X_VELOCITY_MAX 5000 // xvm G0 max velocity in mm/min
#define X_FEEDRATE_MAX X_VELOCITY_MAX // xfr G1 max feed rate in mm/min
#define X_TRAVEL_MIN 0 // xtn minimum travel for soft limits
#define X_TRAVEL_MAX 824 // xtm travel between switches or crashes
#define X_JERK_MAX 3500 // xjm jerk * 1,000,000
#define X_JERK_MAX 3500 // xjm jerk * 1,000,000
#define X_JERK_HIGH_SPEED 20000 // xjh
#define X_HOMING_INPUT 1 // xhi input used for homing or 0 to disable
#define X_HOMING_DIRECTION 1 // xhd 0=search moves negative, 1= search moves positive
File diff suppressed because it is too large Load Diff