1
0
mirror of https://github.com/bdring/Grbl_Esp32.git synced 2025-08-31 01:59:54 +02:00
Commit Graph

768 Commits

Author SHA1 Message Date
Mitch Bradley
01aa028043 Implement stepping through Motors class (#636)
* Implement stepping through Motors class

WIP for discussion and review - not ready to merge yet

* Document Motor methods and variables

.. and remove some unused ones and move some
that are subclass-specific

* Move position_min/max to Limits.cpp

... and coalesced other uses thereof into a unified scheme.

* Call motor ->init() explicitly instead of implicitly

This makes it possible to inherit constructors without
spurious config messages.

* Fixed problems with I2S

* Changes in class method override syntax per atlaste

* Fixed oops

* More Motors simplification

a) Eliminated can_home() in favor of a return value from
set_homing_mode()
b) Eliminated axis_name() in favor of reportAxisNameMsg()

* Fixes to RcServo and Trinamic

- RC Servo was not handling disable ... probably old issue
- Display test after config

* More tweaks

* Define that variable!

* Move functions from Motors.cpp to subclasses

Created a Servo base class from which RcServo and
Dynamixel2 are derived.  This gets the servo update
task out of Motors.  It also eliminates the need for
type_id.  Now all of the functions that are specific
to particular kinds of motors are within their subclasses

* Adding Dynamixel to ABC axes.

* Removed second #ifndef SPINDLE_TYPE

* Fixed potential leak in Report.cpp

as reported by @atlaste

* Some servo cleanup. Has errors!

* min should be max

* Removed test rcservo machine definition.

* Removed obsolete #defines in machine defs for RcServo cal

Co-authored-by: bdring <barton.dring@gmail.com>
2020-10-15 09:05:12 -10:00
odaki
d9dba2c908 Fix i2s probing hang (#608)
* Fix I2S stepper hung just after the completion of motor moving

* Fix recompile issue

Fixed a problem with the recompile not being recompiled even if the files under the Custom folder are changed.

* More comment for macOS in debug.ini

* Fix the timing of calling I2S out's exclusion function and reset sequence

The reset sequence did not seem to be correct, so I changed it.
According to the ESP-IDF PR, the correct sequence is as follows:
1)TX module
2)DMA
3)FIFO
c7f33524b4 (diff-27688c6b3c29373d2a2b142b8471981c)

* Changed the message level for I2S swtiching from warning to debug

* Add some comments
2020-10-09 16:32:32 -05:00
Mitch Bradley
27061bfca6 Fixed WebUI crash (#633)
While eliminating a redundant definition of is_realtime_command(),
I inadvertently introduced a recursion due to the similarity of
the names "is_realtime_command()" and "is_realtime_cmd()".  The
solution is to eliminate the latter entirely.
2020-10-08 09:13:52 -10:00
Mitch Bradley
994de40724 Most #defines are gone (#595)
* Many more #defines bite the dust

* Fixed botch in rt accessory logic

* Update Probe.cpp

* Update System.cpp

* Typo
2020-10-07 18:43:31 -10:00
Mitch Bradley
8c10709f21 Big BUILD_INFO fix (#632)
-- Changes that affect behavior

Fixed the bugs with report_build_info()

Build info is no longer stored in the fixed "EEPROM" section; instead it
is a proper Setting named $Firmware/Build .  You can change it in the
usual way with $Firmware/Build=<whatever>

$I without the = still works.

-- Changes that affect configurability for developers

Converted a couple more #defines into enums - SETTINGS_RESTORE_*
and BITFLAG_RT_STATUS_* .  A side effect of this is that it is
no longer possible to configure the behavior of $RST=* by defining
SETTINGS_RESTORE_ALL to include only a subset.  I think it is
a bad idea from a customer support perspective to have the meaning
of this command be different for different builds.

Changed some of the #define ENABLE_ names to eliminate "EEPROM"

-- Changes that are purely cosmetic

Clarified descriptions in Config.h, to eliminate spurious/incorrect mentions
of "EEPROM"

Eliminated all mentions of the name "EEPROM" except the ones
that truly mean the EEPROM section, as opposed to generalized
non-volatile storage.

The contents of SettingsStorage.h and SettingsStorage.cpp, which
were really related to coordinate storage in Eeprom, not proper
settings, were moved to Eeprom.h and Eeprom.cpp.  The SettingsStorage
files are gone.

Got rid of get_step_pin_mask() and get_direction_pin_mask() because
they were just aliases for bit().  That eliminated some junk from
the SettingsStorage/Eeprom files.  Those files now tightly contain
only the residual stuff related to the storage of coordinate data
in EEPROM.
2020-10-07 13:17:21 -10:00
bdring
78e988a34e Update bug-report.md 2020-10-07 07:59:07 -05:00
bdring
895eded6fc Changed sd_close to SD.end()
sd_close was a temporary function to check for memory usage
2020-10-07 07:37:30 -05:00
Mitch Bradley
78dc79aa4f $sd/show and handle settings in SD files (#629)
* $sd/show and handle settings in SD files

* Added $LocalFs/Show and fixed $LocalFs/Run output

* Infer / at beginning of SD path name

The LocalFS path processing code already inserts
a / at the beginning of the path is one isn't
present.  This patch does the same for SD files.

* Show $ command responses in WebUI console

* Added $Settings/ListChanged AKA $SC

This is useful for saving settings in a compact form that
leaves defaults unchanged.

* $sd/show works in idle or alarm state

* Apply idle/alarm checks to SPIFFS files too
2020-10-06 21:33:51 -05:00
Stefan de Bruijn
f0ea7c2c44 Changed buffer sizes to 256 throughout various parts of the program. (#626)
This is a patch necessary for F360 personal users, because they decided to add a very lengthy comment...

Co-authored-by: Stefan de Bruijn <stefan@nubilosoft.com>
2020-10-06 21:12:28 -05:00
Mitch Bradley
1ff44ae509 More sd_close() to free memory (#622) 2020-10-06 20:59:11 -05:00
bdring
e8e4d96759 Devt (#628)
* Fixed various small bugs (#605)

* Fixed various small bugs

* Fixed potential cast bug

* Fixed double reporting of errors

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

* Stallguard tuning (#607)

* 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>

* Update platformio.ini

Per PR 583

* Created an enum for mode

* Removing some unused machine defs

* Added test machine definition

* Clean up for PR

* Remove test machine def.

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>

* Basic testing Complete

* Made state variable volatile.

* Homing cycle settings (#613)

* Initial Tests Complete

* Update Grbl.h

* Update variables

Co-authored-by: Mitch Bradley <wmb@firmworks.com>

* fixed dual switches when inverted (#614)

* fixed dual switches when inverted

* Removed debug message

* Cleaning up the machine defs

Removed unused #defines.

* Store coordinate offsets in NVS (#611)

* Store coordinate offsets in NVS

* Handle both old Eeprom formats

* Implementing fixes (#616)

- Stop creating additional tasks when limit_init() gets called again from homing and resets
- Explicitly delete an object that was causing a memory loss.

* Update Grbl.h

* Tweak memory fix and add $H check for $Homing/Cycles

* Fix G28.1 and G30.1

* Update Grbl.h

* Homing cycle defaults (#624)

* Changed to add homing cycle defaults

There needs to be a way to set the homing cycle defaults in a machine definition.
There will likely be a better way to do this in the future.

* Update 10vSpindle.cpp

Had wrong error message

* Fixed typos and removed obsolete #defines

* Probe cleanup (#625)

* Cleanup probing code

* Update Grbl.h

* Update after review

* Update error_codes_en_US.csv

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-10-06 13:53:59 -05:00
bdring
6e715f8983 Merge branch 'main' into Devt 2020-10-06 13:27:52 -05:00
bdring
e04c289e6b Update error_codes_en_US.csv 2020-10-06 08:14:16 -05:00
bdring
885f57e970 Probe cleanup (#625)
* Cleanup probing code

* Update Grbl.h

* Update after review
2020-10-04 17:22:30 -05:00
bdring
5df1e5eb59 Fixed typos and removed obsolete #defines 2020-10-04 11:25:40 -05:00
bdring
9a5cd49187 Homing cycle defaults (#624)
* Changed to add homing cycle defaults

There needs to be a way to set the homing cycle defaults in a machine definition.
There will likely be a better way to do this in the future.

* Update 10vSpindle.cpp

Had wrong error message
2020-10-03 12:41:40 -05:00
bdring
1ccc8752bf Devt (#621)
* Fixed various small bugs (#605)

* Fixed various small bugs

* Fixed potential cast bug

* Fixed double reporting of errors

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

* Stallguard tuning (#607)

* 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>

* Update platformio.ini

Per PR 583

* Created an enum for mode

* Removing some unused machine defs

* Added test machine definition

* Clean up for PR

* Remove test machine def.

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>

* Basic testing Complete

* Made state variable volatile.

* Homing cycle settings (#613)

* Initial Tests Complete

* Update Grbl.h

* Update variables

Co-authored-by: Mitch Bradley <wmb@firmworks.com>

* fixed dual switches when inverted (#614)

* fixed dual switches when inverted

* Removed debug message

* Cleaning up the machine defs

Removed unused #defines.

* Store coordinate offsets in NVS (#611)

* Store coordinate offsets in NVS

* Handle both old Eeprom formats

* Implementing fixes (#616)

- Stop creating additional tasks when limit_init() gets called again from homing and resets
- Explicitly delete an object that was causing a memory loss.

* Update Grbl.h

* Tweak memory fix and add $H check for $Homing/Cycles

* Fix G28.1 and G30.1

* Update Grbl.h

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-30 11:11:02 -05:00
bdring
71bf7dadd0 Merge branch 'main' into Devt 2020-09-30 10:56:40 -05:00
Mitch Bradley
20002e382e Merge pull request #620 from bdring/G28G30Fix
Fix G28.1 and G30.1
2020-09-29 10:09:10 -10:00
bdring
d9a8cff12a Update Grbl.h 2020-09-29 13:52:41 -05:00
bdring
e0588ee377 Fix G28.1 and G30.1 2020-09-29 13:48:13 -05:00
bdring
d0acc9bef3 Devt (#618)
* Fixed various small bugs (#605)

* Fixed various small bugs

* Fixed potential cast bug

* Fixed double reporting of errors

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

* Stallguard tuning (#607)

* 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>

* Update platformio.ini

Per PR 583

* Created an enum for mode

* Removing some unused machine defs

* Added test machine definition

* Clean up for PR

* Remove test machine def.

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>

* Basic testing Complete

* Made state variable volatile.

* Homing cycle settings (#613)

* Initial Tests Complete

* Update Grbl.h

* Update variables

Co-authored-by: Mitch Bradley <wmb@firmworks.com>

* fixed dual switches when inverted (#614)

* fixed dual switches when inverted

* Removed debug message

* Cleaning up the machine defs

Removed unused #defines.

* Store coordinate offsets in NVS (#611)

* Store coordinate offsets in NVS

* Handle both old Eeprom formats

* Implementing fixes (#616)

- Stop creating additional tasks when limit_init() gets called again from homing and resets
- Explicitly delete an object that was causing a memory loss.

* Update Grbl.h

* Tweak memory fix and add $H check for $Homing/Cycles

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-28 15:52:30 -05:00
Mitch Bradley
a09ec1c9a3 Merge pull request #617 from bdring/NoHomingCycleAlarm
Tweak memory fix and add $H check for $Homing/Cycles
2020-09-28 10:05:43 -10:00
bdring
7a872874ad Tweak memory fix and add $H check for $Homing/Cycles 2020-09-28 14:35:47 -05:00
bdring
f460771931 Update Grbl.h 2020-09-28 10:34:17 -05:00
bdring
675b339f6a Implementing fixes (#616)
- Stop creating additional tasks when limit_init() gets called again from homing and resets
- Explicitly delete an object that was causing a memory loss.
2020-09-27 20:55:40 -05:00
Mitch Bradley
c0c3c20548 Store coordinate offsets in NVS (#611)
* Store coordinate offsets in NVS

* Handle both old Eeprom formats
2020-09-25 13:54:35 -05:00
bdring
b40fd88d16 Cleaning up the machine defs
Removed unused #defines.
2020-09-25 08:42:57 -05:00
bdring
1c12106869 fixed dual switches when inverted (#614)
* fixed dual switches when inverted

* Removed debug message
2020-09-24 18:22:36 -05:00
bdring
c656a62d41 Homing cycle settings (#613)
* Initial Tests Complete

* Update Grbl.h

* Update variables

Co-authored-by: Mitch Bradley <wmb@firmworks.com>
2020-09-24 18:16:47 -05:00
Mitch Bradley
9e3abdf5dc Merge pull request #612 from bdring/PauseResumeFix
Pause resume fix
2020-09-23 08:24:56 -10:00
bdring
cf21de847a Made state variable volatile. 2020-09-23 12:59:58 -05:00
bdring
286ed2a104 Basic testing Complete 2020-09-22 17:42:59 -05:00
bdring
da1d6b8372 Update README.md 2020-09-21 20:18:16 -05:00
bdring
639b6c1345 Devt (#609)
* Fixed various small bugs (#605)

* Fixed various small bugs

* Fixed potential cast bug

* Fixed double reporting of errors

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

* Stallguard tuning (#607)

* 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>

* Update platformio.ini

Per PR 583

* Created an enum for mode

* Removing some unused machine defs

* Added test machine definition

* Clean up for PR

* Remove test machine def.

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>

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-21 08:58:23 -05:00
bdring
cd8c3cb89b Stallguard tuning (#607)
* 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>

* Update platformio.ini

Per PR 583

* Created an enum for mode

* Removing some unused machine defs

* Added test machine definition

* Clean up for PR

* Remove test machine def.

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-20 08:28:02 -05:00
bdring
050aa19bff Fixed various small bugs (#605) (#606)
* Fixed various small bugs

* Fixed potential cast bug

* Fixed double reporting of errors

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

Co-authored-by: Stefan de Bruijn <atlaste@users.noreply.github.com>
Co-authored-by: Stefan de Bruijn <stefan@nubilosoft.com>
2020-09-19 17:53:54 -05:00
Stefan de Bruijn
8e6646f0e8 Fixed various small bugs (#605)
* Fixed various small bugs

* Fixed potential cast bug

* Fixed double reporting of errors

Co-authored-by: Stefan de Bruijn <stefan@nubilosoft.com>
2020-09-19 15:20:47 -05:00
bdring
c994819312 Merge branch 'Devt' into main 2020-09-18 12:32:08 -05:00
bdring
c2e04dbb89 Remove unused machine def. 2020-09-18 12:28:37 -05:00
bdring
9b38167ed0 Removing some unused machine defs 2020-09-18 12:25:33 -05:00
bdring
023d570b5c Cleanup machine defs (#602) 2020-09-17 21:20:04 -05:00
Stefan de Bruijn
cd22523e36 Changed the N_AXIS #define to the configurable number_axis setting (#594)
* Changed [N_AXIS] arrays to [MAX_N_AXIS].

* Changed all occurrences of N_AXIS to the configuration variant `number_axis->get()`

* Added fake setting class.

* Fixed minor bug with [N_AXIS] due to merge.

* Fixed some unrelated things that were fixed in Devt

Co-authored-by: Stefan de Bruijn <stefan@nubilosoft.com>
Co-authored-by: bdring <barton.dring@gmail.com>
2020-09-16 11:49:55 -05:00
bdring
359aa96c61 Fixed individual axis homing 2020-09-15 13:01:41 -05:00
bdring
d697d8d26f User I/O array error 2020-09-15 11:42:43 -05:00
bdring
adec46c753 Merge Dxl test (#596)
* Changes, not ready yet

* Some updates for M67

* WIP

* Updates

* Code cleanup and speed tweaks

* Prep for PR

* Cleaned up user I/O to use UNDEFINED_PIN as defaults.

* Cleaned up spurious code.
2020-09-14 20:23:56 -05:00
bdring
981ce50993 Update platformio.ini
Per PR 583
2020-09-11 16:19:12 -05:00
bdring
50bae92bfb M67 (#592)
* Implemented gcode parsing. No action yet.

* Added iImmediate version of commands.

* Analog I/O working - don't merge yet.

* Ready for review

* Fixing issues and mask variable size
2020-09-10 21:17:02 -05:00
Mitch Bradley
3ca84db178 Ran clang-format -i on all .cpp and .h files (#591)
To pick up new setting for case clauses
2020-09-10 20:05:00 -05:00
Mitch Bradley
daa8492769 Merge pull request #590 from odaki/fix_atari_custom
Suppress one-line case statements and fix atari custom
2020-09-10 14:05:57 -10:00