1
0
mirror of https://github.com/bdring/Grbl_Esp32.git synced 2025-08-31 10:01:48 +02:00

714 Commits

Author SHA1 Message Date
Mitch Bradley
05e3e4028a Fixup new file Dynamixel2.cpp 2020-09-09 09:09:12 -10:00
Mitch Bradley
c9d8a9b2e5 STATE_ -> enum class State
The sys.state variable is always set with =, never |=,
so the values are guaranteed to be unique.  It was tested
sometimes by OR-ing with bitmasks, presumably for efficiency,
but that mixed usage led to code that could be confusing.
Splitting out those tests into chained comparisons is probably
marginally less efficient than the bitmask method, but in all
likelihood, not enough to matter.
2020-09-09 09:05:08 -10:00
Mitch Bradley
a274e04873 Merge branch 'Devt' into enumMsg 2020-09-09 08:11:30 -10:00
Stefan de Bruijn
a0222e2c5a Remove trivial defines (#588)
* Weeded out all the trivial defines.

* Fixed incorrect removal of define.

Co-authored-by: Stefan de Bruijn <stefan@nubilosoft.com>
2020-09-09 08:09:14 -10:00
bdring
42eab9d6e6 Fixing brackets 2020-09-08 21:22:32 -05:00
Mitch Bradley
785464e6a3 Merge branch 'Devt' into enumMsg 2020-09-08 15:23:58 -10:00
Mitch Bradley
47b7c50953 EXEC_ALARM -> enum class ExecAlarm 2020-09-08 13:16:54 -10:00
Mitch Bradley
94b6feecce Changed STATUS_ defines to enum class Error (#584)
* Changed STATUS_ defines  to enum class Error

* Added license blocks to new files

* Suppress  Compiling..Error.cpp  build script output

The filters that look for errors in the output were
triggering on the filename Error.cpp
2020-09-08 12:54:21 -10:00
bdring
0e4013c472 Machine Space, Dynamixel and RC Servo Updates (#586)
* Vewry Incomplete DO NOT USE

* Working on uart init

* Getting closer

Need to prevent multiple UART inits

* Basic functionality

* fixing variable

* Reading position is now working - Not ready for use though.

* Modified homing to add $<axis>/Home/Mpos feature

* Tweak to the debug reporting

* updates after homing

* added homing stuff

* Pulled in recent RC Servo changes

* cleanup machine defs

* updated servos

* Cleanup messages

* Update for PR

* Fixing travel vs. max_travel

* Formatting

* More cleanup

* Update after review

Co-authored-by: Bart Dring <bdring@buildlog.net>
2020-09-08 16:51:44 -05:00
Mitch Bradley
9207c895b2 enum for MESSAGE_ and MSG_LEVEL 2020-09-07 19:21:35 -10:00
Mitch Bradley
50ddc34d1e Fix #580 Coolant overrides (#581)
The approach was

a) Split up the CoolantMode enum, which had become complicated because
   it was trying to solve two incompatible requirements, into two
   enums GCodeCoolant (a pure enumeration for the use of the GCode
   parser) and CoolantState (a bitfield for runtime use where
   independent turn-off is possible via overrides)

b) Fixed coolant_set_state() so it can turn off coolant bits
   independently.  Previously it could turn them on independently,
   but only turn them off simultaneously.  That was fine for M7 M8 M9,
   but inadequate for realtime coolant overrides.

c) In the process, I refactored the code in CoolantControl.cpp with
   the goal of "saying things once", thus reducing the number of
   ifdefs.  When we have the Pin class, the ifdefs will be reduced
   even more, perhaps even eliminated.  Meanwhile, this cleans up the
   code and probably makes the transition to Pins easier.

d) I also fixed a bug in Report.cpp in which it was not possible to
   report both M7 and M8 at the same time.
2020-09-07 14:26:13 -10:00
odaki
ed6c31be41 Use local libs with pio (#583)
* To use a local library, simplify lib_deps

* Avoid using an incompatible version of the API

Change the version specification of TMCStepper to avoid the compatibility issues @teemuatlut mentioned before.

* Update the version
2020-09-07 14:24:14 -10:00
Mitch Bradley
89fa85dac0 Tightened up sloppy returns (#577)
* Tightened up sloppy returns

No semantic change.

* Added parentheses
2020-09-05 08:28:59 -10:00
Stefan de Bruijn
c7ff176ec4 Braces (#576)
* Fixed all the braces

* Weeded out all `return (...);` with no additional value to the parenthesis.

* Fixed coolant control flags

Co-authored-by: Stefan de Bruijn <stefan@nubilosoft.com>
2020-09-05 07:51:11 -10:00
Mitch Bradley
df90e64171 Replaced #defines with enums in GCode.h (#572)
* Replaced #defines with enums in GCode.h

* More #defines bit the dust

* Resolved review comments

* Some fixes

* Added parser test

* Fixed braces in GCode.cpp

* Clang format

* Revised delay value in tests/parser.nc
2020-09-03 18:46:49 -05:00
bdring
fbf1732efa Devt (#571)
* Handles Tranimic drivers errors better

- If an unsupported driver is specified, it will give a message and not crash.

* Cleaned up unused files

Got rid of old unipolar files
Got rid of servo axis feature - it is a motor class now
Got rid of solenoid pen feature - never really used and it should be a motor class if it is.

* Fix ENABLE_AUTHENTICATION (#569)

* Fixed authentication code.

* Removed another const cast

Co-authored-by: Stefan de Bruijn <stefan@nubilosoft.com>

* Fix step leakage with inverted steps (#570)

* Fix step leakage with inverted steps

* Update build date for merge

Co-authored-by: Bart Dring <bdring@buildlog.net>

Co-authored-by: Stefan de Bruijn <atlaste@users.noreply.github.com>
Co-authored-by: Stefan de Bruijn <stefan@nubilosoft.com>
Co-authored-by: Mitch Bradley <wmb@firmworks.com>
Co-authored-by: Bart Dring <bdring@buildlog.net>
2020-09-01 16:53:53 -05:00
Mitch Bradley
42195ef01c Fix step leakage with inverted steps (#570)
* Fix step leakage with inverted steps

* Update build date for merge

Co-authored-by: Bart Dring <bdring@buildlog.net>
2020-08-29 07:56:51 -05:00
Stefan de Bruijn
32b005acad Fix ENABLE_AUTHENTICATION (#569)
* Fixed authentication code.

* Removed another const cast

Co-authored-by: Stefan de Bruijn <stefan@nubilosoft.com>
2020-08-27 11:03:23 -10:00
bdring
cd8ba02d88 Cleaned up unused files
Got rid of old unipolar files
Got rid of servo axis feature - it is a motor class now
Got rid of solenoid pen feature - never really used and it should be a motor class if it is.
2020-08-27 12:36:05 -05:00
bdring
e7b4e5c8f2 Handles Tranimic drivers errors better
- If an unsupported driver is specified, it will give a message and not crash.
2020-08-26 15:30:28 -05:00
bdring
f4f7b948a5 MPCNC Laser Module fix
Some laser modules can fire with no signal. The level shift was enabled by spindle enable. This forces it on all the time so it does not float.
2020-08-23 07:07:34 -05:00
bdring
a9cfdda7a6 fixes to lowrider 2020-08-22 11:15:14 -05:00
Mitch Bradley
5899526c90 Run-time squaring setup (#540)
* Improved coding of squaring mode

* 2 Definitions of ganged_mode

Co-authored-by: bdring <barton.dring@gmail.com>
2020-08-20 08:33:13 -10:00
odaki
7bc59aa0f2 Dynamically changing the mode of I2S (#547)
* Dynamically changing the mode of I2S

* Fix invalid step pulse width in I2S static

* More accurate I2S stream stepping

Co-authored-by: bdring <barton.dring@gmail.com>
2020-08-19 12:37:07 -05:00
bdring
1f27377ce6 Trinamic status (#563)
* Adding extended testing and status

- checks for shorts, opens, temt, p/s issues

* Update

- test function now looks for
  - connectiviy
  - motor power
  - coil shorts
  - temp issues

* Update Machine.h

* Update spi_daisy_4axis_xyyz.h
2020-08-19 12:32:58 -05:00
Mitch Bradley
0956f3edb9 Fixed else formatting (#558)
by using a ternary operator assignment
2020-08-18 15:27:12 -05:00
Mitch Bradley
6d45ee4515 Casts (#556)
* Killed casts and .c_str() in WebServer.cpp

Most of them were unnecessary, as the methods
with which they were used accept String arguments.

* More casts gone in WebSettings.cpp

* Another one bites the dust
2020-08-18 06:35:28 -10:00
Stefan de Bruijn
84e16c7d54 WebUI namespace (#552)
* Introduced namespace WebUI

* Fixed Custom code that depends on WebUI. Cleaned up WebUI code: fixed braces around 'if's, introduced enum classes where appropriate and moved a bit of code around.

* Removed 'using namespace'.

* Updated polar coaster code.

* Fixed WebUI:: bug in atari_1020. Added Grbl.ino.cpp to gitignore, as it shouldn't be committed.

* Fixed auth_level

Co-authored-by: Stefan de Bruijn <stefan@nubilosoft.com>
2020-08-17 14:37:22 -10:00
bdring
9278695535 Update 6_pack_stepstick_v1.h
- Added a refernce to the i/o pin number for each module socket.
2020-08-17 18:44:26 -05:00
bdring
f1a93ed144 Update 3axis_v4.h
- Error in pin names
- Other machine defs are OK
2020-08-17 09:19:31 -05:00
Stefan de Bruijn
a436ddfece Changed workings of VFD code, added H2A VFD (#544)
* Renamed Huanyang to VFD for H2A work

* Fixed Huanyang spindle implementation again.
Fixed includes in vcxproj generator

* Changed the VFD implementation. Implemented H2A along the way.
UNTESTED!

* Fixed retry loop in VFD. Added SettingsDefinition. Fixed name conflict within GRBL (`init()`).

* Added VFD_DEBUG_MODE.

* Fixed usability of VFD_DEBUG_MODE. Added a TODO in the H2ASpindle code.
Removed it from the test machine config

* Fixed bug in VFD spindle: the uart should be set up first, before running the rs485 task.

* Fixed bug in VFD_DEBUG_MODE output. Fixed bug in RX length of set_speed command for Huanyang VFD.

* Fixed a bug in the spindle code with states. Also, VFD didn't update state correctly.
Updated TODO/FIXME

* Added some more functionality to the Null spindle, to aid testing purposes.
Fixed report compatibility with vanilla grbl. Some values were reported in a slightly different format.

* Fixed commands.h

* Fixed review by Mitch

Co-authored-by: Stefan de Bruijn <stefan@nubilosoft.com>
2020-08-16 10:20:35 -10:00
odaki
4c0edf9e93 Fix configurator (#549)
* Update configure-features.py

to match the latest file names.

* Update configure-features.py

to adopt the latest source tree.
2020-08-15 14:47:18 -10:00
Stefan de Bruijn
727c84a08e Fixed include in Commands.h (#548)
Co-authored-by: Stefan de Bruijn <stefan@nubilosoft.com>
2020-08-15 08:47:35 -10:00
bdring
3a4de4ec19 Added some more boot messages. 2020-08-13 16:04:32 -05:00
bdring
654cc166cf In Grbl.h Grbl.cpp renamed init() to grbl_init(). It was getting double called. 2020-08-13 09:15:12 -05:00
bdring
bb6ca867b2 Laser mode fix (#543)
* Fixed Laser Mode

Enablin pin was turning off, but not back on in laser mode

* Added Settings

- $Spindle/Enable/Invert=Off
- $Spindle/Enable/OffWithSpeed=Off
- $Spindle/PWM/Invert=Off

* Update build date
2020-08-13 07:41:35 -05:00
Mitch Bradley
61663ff938 Cleaned up the .ino file in favor of Grbl.h (#538)
... while moving some variable definitions
where they belong.
2020-08-12 07:03:58 -10:00
bdring
11ceeebc0d Added second limit switch I/O option (#537)
- Added X2_LIMIT_PIN thru C2_LIMIT_PIN
- The 2 switches are simply or'd in the logic
- Limit pin difintion now prints in boot MSG's
- Cleaned up MS3 logic to use an array and defaults like limit switches
- Added a new machine definition file to test new features
2020-08-12 07:54:36 -05:00
Mitch Bradley
46793d3638 Fix file names in comment blocks (#536)
The recent rename made nearly all of the
file names included in header comments incorrect.
2020-08-11 08:34:57 -10:00
Mitch Bradley
89f157eb88 A few more interior name fixes 2020-08-11 08:33:01 -10:00
Mitch Bradley
e97c83c7f4 Fixed .c -> .cpp interior names 2020-08-11 08:20:03 -10:00
Mitch Bradley
d89bb0d4a1 Fix file names in comment blocks
The recent rename made nearly all of the
file names included in header comments incorrect.
2020-08-11 08:11:12 -10:00
Mitch Bradley
6ff3e28541 Move more files to WebUI (#534)
Now everything with Luc's copyright is in WebUI/
2020-08-11 07:23:56 -10:00
Stefan de Bruijn
8d5dea9dfa File name changes (#532)
* Renamed files in the root folder. Haven't fixed includes yet.

* Renamed SD to SDCard to avoid name conflict

* Fixed all includes

* Fixed some "..." / <...> includes.

* Updated <Print.h> (caps!).

Co-authored-by: Stefan de Bruijn <stefan@nubilosoft.com>
2020-08-11 10:02:51 -05:00
Mitch Bradley
77dfa95555 Avoid reiterationIteration in spindle names (#530) 2020-08-10 10:37:32 -10:00
Stefan de Bruijn
898edc7f95 Updated style of Spindles according to style doc. Added namespace Spindles. (#529)
* Renamed spindleclass file.

* Added (empty) header files; renamed SpindleClass.cpp

* Moved spindle classes, introduced namespaces

* Fixed forward declaration.

* Removed obsolete commented out code

* Fixed overrides and constructors

* Applied clang-format

* Fixed 10vspindle set_spindle_dir_pin and set_enable_pin.

Co-authored-by: Stefan de Bruijn <stefan@nubilosoft.com>
2020-08-09 10:22:14 -10:00
Mitch Bradley
3e15fb3409 Eliminated unused USE_GANGED_AXES (#526) 2020-08-08 13:15:35 -10:00
Mitch Bradley
7c2d8f01ea Bump build date 2020-08-08 11:47:46 -10:00
Mitch Bradley
9361c09c4e Fix the I2S stream generates a 3x faster pulse. (#525)
I completely misunderstood the calculation of the interruption interval.
Change to calculate the correct μsec interval from the tick value.
2020-08-08 11:41:36 -10:00
Mitch Bradley
a3793de20b Fixed compile error with parking enabled (#524) 2020-08-08 11:22:59 -10:00