Comments (9)
edit included file motion_control.c
void mc_dwell(uint32_t milliseconds)
{
st_synchronize();
delay_ms(milliseconds);
}
/* function for long delay */
void delay_ms(uint32_t ms) {
while ( ms )
{
_delay_ms(1);
ms--;
}
}
I Think, probe :-/
from grbl.
Take a look at my grbl fork. I've effectively picked up the torch, as Simen has been busy with other things. A lot of lingering bugs have been fixed and improvements have been made to v0.7, which is now master status.
FYI, a new v0.8 version with run-time commands (decelerating feedhold, resume, reset, jogging(TBD)) will be released later tonight. This is an alpha release.
from grbl.
I just checked out your fork, but it seems to have the same problem. I looked into it a bit more, and it seems that it is due to a change in avr-libc. As of v1.7.1 it is not possible to use variables with the delay functions. Apparently you weren't supposed to do this with previous versions anyways, but now it is being enforced due to a change in how delays are implemented.
You're probably using an older version of the library, so you don't get this error. It's really quite trivial to fix, I just added a couple of inline functions to nuts_bolts to mimic the old functionality of _delay_ms() and _delay_us(). The function that Identy suggested above does the trick, and it seems to be what most people are using.
from grbl.
:)
from grbl.
Good to know! I haven't run into this problem, as I pretty much exclusively use the avrdude compiler that comes the Arduino software. It sounds like it still supports the variable in the delay. I'll try to work a fix in when I get some time.
from grbl.
I am having the exact same problem with the latest versions in Master and Edge.
avr-gcc -Wall -Os -DF_CPU=16000000 -mmcu=atmega328p -I. -ffunction-sections -c motion_control.c -o motion_control.o
avr-gcc -Wall -Os -DF_CPU=16000000 -mmcu=atmega328p -I. -ffunction-sections -c limits.c -o limits.o
In file included from limits.c:21:0:
/usr/lib/gcc/avr/4.5.3/../../../avr/include/util/delay.h: In function ‘homing_cycle’:
/usr/lib/gcc/avr/4.5.3/../../../avr/include/util/delay.h:230:28: error: __builtin_avr_delay_cycles expects an integer constant.
/usr/lib/gcc/avr/4.5.3/../../../avr/include/util/delay.h:230:28: error: __builtin_avr_delay_cycles expects an integer constant.
make: *** [limits.o] Error 1
from grbl.
Thanks! Looks like I missed the _delay_us() calls when I had fixed it for the _delay_ms(). I'll issue a fix for this later today. If you want to fix it immediately, look in nut_bolts.c and repeat the same procedure as did with _delay_ms().
from grbl.
Thanks that fixed it. For completeness I changed it to this in limits.c:
delay_us(settings.pulse_microseconds);
STEPPING_PORT ^= out_bits & STEP_MASK;
delay_us(step_delay);
and I added this function to nuts_bolts.h:
void delay_us(uint16_t us)
{
while (us--) { _delay_us(1);}
}
from grbl.
Good to hear. Sorry that I didn't post the fix when I stated. I've been sidetracked with other things. When I finally get this next edge push out, I'll make sure to update the master branch with this fix.
from grbl.
Related Issues (20)
- about connecting arduino uno to UGS HOT 1
- X axis losses position only when another axis is moving HOT 5
- ERROR Aurdude: my computer STK 500-getsync()
- grbl without disabling timer0 in stepper.c ??
- How to utilize GRBL for driving a single axis? HOT 1
- The spindle/laser output stuck HOT 7
- GRBL 1.1F ERROR WHILE PROCESSING RESPONSE (EMERGENCY HELP) HOT 1
- CO2 laser best and budget friendly controllers
- grbl 1.1h spindle with relay shield ( Buzzing Relay) HOT 3
- Error correction/checksum HOT 5
- GRBL return to origin
- Laser marking machine solution discussion by grbl
- Pen up/down is not working wit bachin draw software HOT 1
- Bachin draw software servo problem HOT 1
- Self-squaring with CNC Shiel 3.0
- How to disconnect the GRBL serial connection after the stepper motor has completed its entire operation HOT 1
- homing issue on my cnc 3018 pro using ugs HOT 4
- H-Bridge adaption for GRBL
- Different ports for Step and dir pins of each stepper motor
- Move generated path in same time
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from grbl.