MarginallyClever / GcodeCNCDemo

a simple example of making a CNC machine from an Adafruit Motor Shield
213 stars 133 forks source link

iso c++ forbids comparison error #22

Closed ekaggrat closed 7 years ago

ekaggrat commented 7 years ago

i get this error on compiling gcodedemo2axis

iso C++ forbids comparison between a point and a integer

i-make-robots commented 7 years ago

in file what on line number what..?

ekaggrat commented 7 years ago

haults here

while(ptr>1 && *ptr && ptr<buffer+sofar) {

in this function

float parsenumber(char code,float val) { char ptr=buffer; while(ptr>1 && ptr && ptr<buffer+sofar) { if(*ptr==code) { return atof(ptr+1); } ptr=strchr(ptr,' '); } return val; }

but i guess the porblem is somewhere else

the same function compiles okay in the 4 axis version!

i-make-robots commented 7 years ago

the 4 axis version is probably fixed and has a subtle difference.

On Wed, Jul 26, 2017 at 2:33 AM, ekaggrat notifications@github.com wrote:

haults here

while(ptr>1 && *ptr && ptr<buffer+sofar) {

in this function

float parsenumber(char code,float val) { char ptr=buffer; while(ptr>1 && ptr && ptr<buffer+sofar) { if(*ptr==code) { return atof(ptr+1); } ptr=strchr(ptr,' '); } return val; }

but i guess the porblem is somewhere else

the same function compiles okay in the 4 axis version!

— You are receiving this because you commented. Reply to this email directly, view it on GitHub https://github.com/MarginallyClever/GcodeCNCDemo/issues/22#issuecomment-318001988, or mute the thread https://github.com/notifications/unsubscribe-auth/ABZYhibmxj7eiuKa1vt0YXDZy5E0XAcdks5sRwfjgaJpZM4OjZk0 .

-- Dan Royer, Owner, Marginally Clever Robots https://www.marginallyclever.com/ Ph: +1 (604) 259-9564 Mo: +1 (604) 916-2281

ekaggrat commented 7 years ago

yes got it to work now, just the gcode sender is a bit wonky and sometimes just wont connect. then i connect with the arduino serial window and it starts working.

i-make-robots commented 7 years ago

all gcodecncdemos have been updated with the new parseNumber used in makelangeloFirmware. Please let me know if that helps.