mirror of
https://github.com/euphy/polargraphcontroller
synced 2024-11-15 10:47:56 +01:00
Fixed conflict
This commit is contained in:
commit
9dca343ed1
@ -2222,12 +2222,12 @@ void drawStatusText(int x, int y)
|
|||||||
if (drawbotReady)
|
if (drawbotReady)
|
||||||
{
|
{
|
||||||
fill(0, 200, 0);
|
fill(0, 200, 0);
|
||||||
if (currentHardware >= HARDWARE_VER_MEGA_POLARSHIELD)
|
if (currentHardware >= HARDWARE_VER_POLARPRO)
|
||||||
|
drawbotStatus = "Polargraph READY! (PRO)";
|
||||||
|
else if (currentHardware >= HARDWARE_VER_MEGA_POLARSHIELD)
|
||||||
drawbotStatus = "Polargraph READY! (PolargraphSD)";
|
drawbotStatus = "Polargraph READY! (PolargraphSD)";
|
||||||
else if (currentHardware >= HARDWARE_VER_MEGA)
|
else if (currentHardware >= HARDWARE_VER_MEGA)
|
||||||
drawbotStatus = "Polargraph READY! (Mega)";
|
drawbotStatus = "Polargraph READY! (Mega)";
|
||||||
else if (currentHardware >= HARDWARE_VER_POLARPRO)
|
|
||||||
drawbotStatus = "Polargraph READY! (PRO)";
|
|
||||||
else
|
else
|
||||||
drawbotStatus = "Polargraph READY! (Uno)";
|
drawbotStatus = "Polargraph READY! (Uno)";
|
||||||
}
|
}
|
||||||
@ -2549,7 +2549,8 @@ void setHardwareVersionFromIncoming(String readyString)
|
|||||||
}
|
}
|
||||||
|
|
||||||
if (HARDWARE_VER_MEGA == verInt
|
if (HARDWARE_VER_MEGA == verInt
|
||||||
|| HARDWARE_VER_MEGA_POLARSHIELD == verInt)
|
|| HARDWARE_VER_MEGA_POLARSHIELD == verInt
|
||||||
|
|| HARDWARE_VER_POLARPRO == verInt)
|
||||||
newHardwareVersion = verInt;
|
newHardwareVersion = verInt;
|
||||||
else
|
else
|
||||||
newHardwareVersion = HARDWARE_VER_UNO;
|
newHardwareVersion = HARDWARE_VER_UNO;
|
||||||
@ -2802,9 +2803,11 @@ void dispatchCommandQueue()
|
|||||||
commandQueue.remove(0);
|
commandQueue.remove(0);
|
||||||
println("Dispatching command: " + command);
|
println("Dispatching command: " + command);
|
||||||
}
|
}
|
||||||
// Checksum crc = new CRC32();
|
if (useChecksum()) {
|
||||||
// crc.update(lastCommand.getBytes(), 0, lastCommand.length());
|
Checksum crc = new CRC32();
|
||||||
// lastCommand = lastCommand+":"+crc.getValue();
|
crc.update(lastCommand.getBytes(), 0, lastCommand.length());
|
||||||
|
lastCommand = lastCommand+":"+crc.getValue();
|
||||||
|
}
|
||||||
println("Last command:" + lastCommand);
|
println("Last command:" + lastCommand);
|
||||||
myPort.write(lastCommand);
|
myPort.write(lastCommand);
|
||||||
myPort.write(10); // OH *$%! of COURSE you should terminate it.
|
myPort.write(10); // OH *$%! of COURSE you should terminate it.
|
||||||
@ -2816,6 +2819,10 @@ void dispatchCommandQueue()
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
boolean useChecksum() {
|
||||||
|
return currentHardware == 200;
|
||||||
|
}
|
||||||
|
|
||||||
void addToCommandQueue(String command)
|
void addToCommandQueue(String command)
|
||||||
{
|
{
|
||||||
synchronized (commandQueue)
|
synchronized (commandQueue)
|
||||||
|
Loading…
Reference in New Issue
Block a user