mirror of
https://github.com/usatiuk/EggbotWireless.git
synced 2025-10-26 08:47:49 +01:00
@@ -5,7 +5,7 @@ float bytecode[4] = {-1, -1, -1, -1};
|
||||
|
||||
float* parseGCode(String gcode) {
|
||||
for (int i = 0; i < 4; i++) {
|
||||
bytecode[i] = -1.0F;
|
||||
bytecode[i] = nanf("");
|
||||
}
|
||||
|
||||
char commandStringIn[50];
|
||||
|
||||
@@ -6,7 +6,7 @@
|
||||
#include "common/Commands.h"
|
||||
|
||||
String inString;
|
||||
bool waitingForNext;
|
||||
bool waitingForNext = false;
|
||||
|
||||
void sendCommand(float *command) {
|
||||
if (command[0] != unk) {
|
||||
@@ -18,7 +18,7 @@ void sendCommand(float *command) {
|
||||
}
|
||||
Wire.endTransmission();
|
||||
} else {
|
||||
Serial.println("UNK");
|
||||
Serial.println("OK");
|
||||
return;
|
||||
}
|
||||
|
||||
|
||||
@@ -84,20 +84,22 @@ void execCommand(float *command) {
|
||||
needAdjust = false;
|
||||
}
|
||||
|
||||
if (command[X] != -1) {
|
||||
if (!isnan(command[X])) {
|
||||
servoStepper.moveTo(command[X]);
|
||||
}
|
||||
|
||||
if (command[Y] != -1) {
|
||||
if (!isnan(command[Y])) {
|
||||
eggStepper.moveTo(command[Y]);
|
||||
}
|
||||
|
||||
if (!isnan(command[Z])) {
|
||||
if (command[Z] < 0) {
|
||||
pen.engage();
|
||||
}
|
||||
if (command[Z] >= 0) {
|
||||
pen.disengage();
|
||||
}
|
||||
}
|
||||
|
||||
adjustRPM();
|
||||
|
||||
|
||||
@@ -34,8 +34,8 @@
|
||||
inkscape:pageopacity="0.0"
|
||||
inkscape:pageshadow="2"
|
||||
inkscape:zoom="0.7"
|
||||
inkscape:cx="770.76884"
|
||||
inkscape:cy="412.71372"
|
||||
inkscape:cx="661.33551"
|
||||
inkscape:cy="332.89105"
|
||||
inkscape:document-units="mm"
|
||||
inkscape:current-layer="layer2"
|
||||
showgrid="false"
|
||||
@@ -403,10 +403,6 @@
|
||||
x="150">(None)</tspan></text>
|
||||
</g>
|
||||
</g>
|
||||
<g
|
||||
id="g328" />
|
||||
<g
|
||||
id="g952" />
|
||||
</g>
|
||||
<g
|
||||
inkscape:groupmode="layer"
|
||||
|
||||
|
Before Width: | Height: | Size: 15 KiB After Width: | Height: | Size: 15 KiB |
@@ -6,14 +6,14 @@ if len(sys.argv) != 3:
|
||||
print("Not 2 arguments")
|
||||
exit()
|
||||
|
||||
gcode = sys.argv[1]
|
||||
gcode = sys.argv[2]
|
||||
if not os.path.isfile(gcode):
|
||||
print("File doesn't exist!")
|
||||
exit()
|
||||
|
||||
ser = serial.Serial()
|
||||
ser.baudrate = 115200
|
||||
ser.port = sys.argv[2]
|
||||
ser.port = sys.argv[1]
|
||||
ser.open()
|
||||
|
||||
if not ser.is_open:
|
||||
|
||||
Reference in New Issue
Block a user