-
Notifications
You must be signed in to change notification settings - Fork 4
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Fix some compiler errors/warnings and add -p option to specify printer via the command line. #7
Conversation
The *buntu's come with dash as the default shell and build-local.sh fails to build because of it as it requires bash. Signed-off-by: Olliver Schinagl <o.schinagl@ultimaker.com>
*~ and .*.swp files are backup files used by editors. Git should always ignore them. Signed-off-by: Olliver Schinagl <o.schinagl@ultimaker.com>
std::count requires algorithm.h to be included or the compiler gives an error. Signed-off-by: Olliver Schinagl <o.schinagl@ultimaker.com>
The compiler warns and errors due to the mis-use of unsigned vs signed and size_t vs int in the unittests. Signed-off-by: Olliver Schinagl <o.schinagl@ultimaker.com>
currentLine, totalLines, bufferedLines are all ints and thus do not require the 'z' length modifier that is required for size_t. Signed-off-by: Olliver Schinagl <o.schinagl@ultimaker.com>
Hi oliv3r, thanks for your contributions, they are greatly appreciated! |
Hey Olliver, Thanks for your contributions! They're greatly appreciated.
Btw, I'll be happy to make these changes myself if you have no objections to them. |
When not using UCI to obtain the configuration settings, a dummy variable forces a makerbot (or whatever printer) as default. Using -p one of the available printers can be configured via the commandline. When -p is not supplied, uci (or the dummy var) is used instead. Missing still is to print the list of available printers when using -p help or an empty -p. Since there is a function in the 'TODO' area to print a list of printers, this item is also TODO. Signed-off-by: Olliver Schinagl <o.schinagl@ultimaker.com>
THe AT_GET_TEST an AT_GET_PROGRESS actions require a device ID when, also when called from -g. If this is not done, calling these actions via -g causes segfaults. Signed-off-by: Olliver Schinagl <o.schinagl@ultimaker.com>
The serial module does not account for the \0 character when mallocing. Request 1 extra byte of memory to account for \0. Signed-off-by: Olliver Schinagl <o.schinagl@ultimaker.com>
getopt returns an integer which is -1 when there is no more options left to be parsed. Currently this result is stored in a char, which by definition is undefined whether it is signed or unsigned. On ARM it may be unsigned and thus -1 never happens. Signed-off-by: Olliver Schinagl <o.schinagl@ultimaker.com>
I've updated the pull request with your recommendations, but a view points:
Olliver |
I've made several extra changes along the lines of the pull request including the possibility to list all available printer drivers/models. |
Hey Doodle3D guys,
Let me start by introducing myself, I'm Olliver and I started working for Ultimaker. I was testing some things with print3d and found a few issues and patches those in this pull request. Also I added a new command line option to the server, that allows one to chose a printer from startup rather then depending on UCI. I haven't made the UCI dependancies fully optional yet, but removing/commenting them out does make everything work without UCI. Maybe more on that later.
Thanks,
Olliver