GithubHelp home page GithubHelp logo

tgolla / gcodeparser Goto Github PK

View Code? Open in Web Editor NEW
18.0 18.0 6.0 51 KB

The GCode parser is designed to parse GCode in order that it can then be processed.

Home Page: https://terencegolla.com/

License: MIT License

C++ 98.71% C 1.29%
arduino arduino-library eggbot gcode spherebot

gcodeparser's People

Contributors

tgolla avatar tiefseetauchner avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar

gcodeparser's Issues

ESP32 specific bug: GetWordValue returns wrong value

Bug_ESP32.zip
Bug_ESP32_fixed.zip

I found an issue with GetWordValue when I ran the provide example on an ESP32 cpu:
GetWordValue returns 288 for the input "G0X120". For "G00X120" I get the correct value of 0.

Running the same code on an Arduino I always got the correct value. I fixed this by using:

if ((line[pointer + 1] == '0') && (line[pointer + 2] == 'X'))
  return 0.0;
else
  return (double)strtod(&line[pointer + 1], NULL);

instead of:

return (double)strtod(&line[pointer + 1], NULL);

Please run the code in Bug_ESP32.zip to see this output on an ESP32:

Ready

Command Line: G0X120Z-10F30
Comment(s):
Process G code: 288

Command Line: G0X1
Comment(s):
Process G code: 1

Command Line: G0X12
Comment(s):
Process G code: 18

Command Line: G0X120
Comment(s):
Process G code: 288

Command Line: G00X120
Comment(s):
Process G code: 0

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo 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.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.