资源简介
设备采用开源GRBL 0.8c固件,只是因为几年前用的固件比较方便修改,所以沿用下来。新加入舵机控制代码,可以模拟抬笔动作,
代码片段和文件信息
/*
coolant_control.c - coolant control methods
Part of Grbl
Copyright (c) 2012 Sungeun K. Jeon
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 .
*/
#include “coolant_control.h“
#include “settings.h“
#include “config.h“
#include “planner.h“
#include
static uint8_t current_coolant_mode;
void coolant_init()
{
current_coolant_mode = COOLANT_DISABLE;
#if ENABLE_M7
COOLANT_MIST_DDR |= (1 << COOLANT_MIST_BIT);
#endif
COOLANT_FLOOD_DDR |= (1 << COOLANT_FLOOD_BIT);
coolant_stop();
}
void coolant_stop()
{
#ifdef ENABLE_M7
COOLANT_MIST_PORT &= ~(1 << COOLANT_MIST_BIT);
#endif
COOLANT_FLOOD_PORT &= ~(1 << COOLANT_FLOOD_BIT);
}
void coolant_run(uint8_t mode)
{
if (mode != current_coolant_mode)
{
plan_synchronize(); // Ensure coolant turns on when specified in program.
if (mode == COOLANT_FLOOD_ENABLE) {
COOLANT_FLOOD_PORT |= (1 << COOLANT_FLOOD_BIT);
#ifdef ENABLE_M7
} else if (mode == COOLANT_MIST_ENABLE) {
COOLANT_MIST_PORT |= (1 << COOLANT_MIST_BIT);
#endif
} else {
coolant_stop();
}
current_coolant_mode = mode;
}
}
属性 大小 日期 时间 名称
----------- --------- ---------- ----- ----
目录 0 2017-04-15 12:01 GRBL\
目录 0 2017-04-13 22:12 GRBL\.vs\
目录 0 2017-04-13 22:12 GRBL\.vs\GRBL\
目录 0 2017-04-13 22:12 GRBL\.vs\GRBL\v14\
文件 32768 2017-04-15 15:12 GRBL\.vs\GRBL\v14\.suo
文件 13851 2013-04-27 12:57 GRBL\config.h
文件 1696 2013-04-27 12:57 GRBL\coolant_control.cpp
文件 976 2013-04-27 12:57 GRBL\coolant_control.h
目录 0 2017-04-15 11:55 GRBL\Debug\
文件 28472 2017-04-15 15:12 GRBL\Debug\board.buildinfo
文件 400 2017-04-15 11:55 GRBL\Debug\coolant_control.cpp.d
文件 5068 2017-04-15 11:55 GRBL\Debug\coolant_control.cpp.o
文件 316156 2017-04-15 11:55 GRBL\Debug\core.a
文件 94 2017-04-15 11:55 GRBL\Debug\eeprom.cpp.d
文件 7000 2017-04-15 11:55 GRBL\Debug\eeprom.cpp.o
文件 623 2017-04-15 11:55 GRBL\Debug\gcode.cpp.d
文件 30616 2017-04-15 11:55 GRBL\Debug\gcode.cpp.o
文件 1055 2017-04-15 11:55 GRBL\Debug\GRBL.cpp.d
文件 2832 2017-04-15 11:55 GRBL\Debug\GRBL.cpp.o
文件 111688 2017-04-15 15:12 GRBL\Debug\GRBL.elf
文件 72946 2017-04-15 15:12 GRBL\Debug\GRBL.hex
文件 111688 2017-04-15 15:12 GRBL\Debug\GRBL.ino.elf
文件 72946 2017-04-15 15:12 GRBL\Debug\GRBL.ino.hex
文件 72743 2017-04-15 15:12 GRBL\Debug\GRBL.ino.with_bootloader.hex
目录 0 2017-04-13 22:05 GRBL\Debug\GRBL.tlog\
文件 72743 2017-04-15 15:12 GRBL\Debug\GRBL.with_bootloader.hex
文件 765 2017-04-15 11:55 GRBL\Debug\grblmain.cpp.d
文件 7772 2017-04-15 11:55 GRBL\Debug\grblmain.cpp.o
文件 618 2017-04-15 11:55 GRBL\Debug\limits.cpp.d
文件 14652 2017-04-15 11:55 GRBL\Debug\limits.cpp.o
文件 687 2017-04-15 11:55 GRBL\Debug\motion_control.cpp.d
............此处省略64个文件信息
- 上一篇:指纹模块as608上位机软件
- 下一篇:GD5F4G.zip
评论
共有 条评论