Permalink
Browse files

more robust support for the Replicator 2. version numbers have shifted

  • Loading branch information...
1 parent 570ede7 commit 1fe6c38ca2ab7edb84d704135c620b9ee208c7f5 @aleonard aleonard committed Oct 11, 2012
View
5 contributors.txt
@@ -28,7 +28,10 @@ the contributor's full name, I've listed their github handle instead.
* Ben Rockhold
* Far McKon
* Bill Canfield
-
+* Dan Newman
+* Jetty
+* Alison Leonard
+* Ted Branston
If I've left you off this list, let me know ASAP and I'll add your
name.
View
17 machines/replicator/onboard/nozzleCalibration.gcode
@@ -14,16 +14,17 @@ G1 Z0.0 (move Z to "0")
G161 Z F100 (home Z axis minimum)
M132 X Y Z A B (Recall stored home offsets for XYZAB axis)
(**** end homing ****)
-G1 X112 Y-73 Z150 F3300.0 (move to waiting position)
-G130 X0 Y0 A0 B0 (Lower stepper Vrefs while heating)
+G1 X-110.5 Y-74 Z150 F3300.0 (move to waiting position)
+G130 X20 Y20 Z20 A20 B20 (Lower stepper Vrefs while heating)
M6 T0 (wait for toolhead, and HBP to reach temperature)
M6 T1 (wait for toolhead, and HBP to reach temperature)
-M108 T0(Set tool)
-G130 X127 Y127 A127 B127 (Set Stepper motor Vref to defaults)
-G0 X112 Y-73 (Position Nozzle)
-G0 Z0.5 (Position Height)
-G1 E4 F50.0 (Create Anchor)
-G92 E0
+G130 X127 Y127 Z40 A127 B127 (Set Stepper motor Vref to defaults)
+M108 R3.0 T0
+G0 X-110.5 Y-74 (Position Nozzle)
+G0 Z0.2 (Position Height)
+M108 R4.0 (Set Extruder Speed)
+M101 (Start Extruder)
+G4 P1500 (Create Anchor)
(**** end of start.gcode ****)
(<layer> 0.175 )
G1 X-70 Y-60.60 Z0.9 F3300.0
View
4 src/replicatorg/app/ui/MainWindow.java
@@ -640,7 +640,7 @@ public void runToolpathGenerator(boolean skipConfig) {
spp.setStartCode(new MutableGCodeSource(machineLoader.getMachineInterface().getModel().getStartBookendCode()));
spp.setEndCode(new MutableGCodeSource(machineLoader.getMachineInterface().getModel().getEndBookendCode()));
spp.setMultiHead(isDualDriver());
- if(machineLoader.getMachineInterface().getMachineType() == MachineType.THE_REPLICATOR)
+ if((machineLoader.getMachineInterface().getMachineType() == MachineType.THE_REPLICATOR) || (machineLoader.getMachineInterface().getMachineType() == MachineType.REPLICATOR_2))
spp.setAddProgressUpdates(true);
}
else if (generator instanceof MiracleGrueGenerator) {
@@ -653,7 +653,7 @@ else if (generator instanceof MiracleGrueGenerator) {
spp.setMultiHead(isDualDriver());
spp.setPrependStart(true);
spp.setAppendEnd(true);
- if(machineLoader.getMachineInterface().getMachineType() == MachineType.THE_REPLICATOR)
+ if((machineLoader.getMachineInterface().getMachineType() == MachineType.THE_REPLICATOR) || (machineLoader.getMachineInterface().getMachineType() == MachineType.REPLICATOR_2))
spp.setAddProgressUpdates(true);
}
View
2 src/replicatorg/app/ui/controlpanel/ControlPanelWindow.java
@@ -167,7 +167,7 @@ public void actionPerformed(ActionEvent e){
jogPanel = new JogPanel(machine);
mainPanel.add(jogPanel,"split 4, growx, growy");
mainPanel.add(createActivationPanel(),"split, growx");
- if(newMachine.getMachineType() == MachineType.THE_REPLICATOR)
+ if((newMachine.getMachineType() == MachineType.THE_REPLICATOR) || (newMachine.getMachineType() == MachineType.REPLICATOR_2))
{
mainPanel.add(ledStripButton ,"growx");
// mainPanel.add(createBeepPanel(), "growx");
View
4 src/replicatorg/app/ui/controlpanel/JogPanel.java
@@ -623,7 +623,9 @@ public JogPanel(MachineInterface machine) {
}
ButtonArrangement arrangement;
- if(machine.getMachineType() == MachineType.THE_REPLICATOR)
+ if(machine.getMachineType() == MachineType.REPLICATOR_2)
+ arrangement = new ReplicatorArrangement(machine);
+ else if(machine.getMachineType() == MachineType.THE_REPLICATOR)
arrangement = new ReplicatorArrangement(machine);
else if(machine.getMachineType() == MachineType.THINGOMATIC)
arrangement = new ThingomaticArrangement(machine);
View
115 src/replicatorg/drivers/gen3/MightyBoard.java
@@ -194,7 +194,7 @@
-class MightyBoard6X1EEPROM extends MightyBoard5XEEPROM
+class MightyBoard6X2EEPROM extends MightyBoard5XEEPROM
{
/// EEPROM for Mightyboard in the 6.1+ firmware version with Jetty Acceleration
/// NOTE: this file needs to match the data in EepromMap.hh for all
@@ -218,9 +218,11 @@
final public static int BOTSTEP_TYPE = 0x0208;
/// Heater calibration byte
final public static int HEATER_CALIBRATION = 0x020A;
+ final public static int AXIS_LENGTHS_MM = 0x0210;
+ final public static int AXIS_HOME_POSITIONS_MM = 0x0224;
/// start of free space
- final public static int FREE_EEPROM_STARTS = 0x0210;
+ final public static int FREE_EEPROM_STARTS = 0x0238;
}
@@ -285,7 +287,7 @@ public MightyBoard() {
preferredVersion = new Version(6,1);
minimumAccelerationVersion = new Version(5,3);
minAdvancedFeatureVersion = new Version(6,0);
- minimumJettyAccelerationVersion = new Version(6,1);
+ minimumJettyAccelerationVersion = new Version(6,2);
}
public String getDriverName() {
@@ -329,6 +331,8 @@ public boolean initializeBot()
getMotorRPM(); //load our motor RPM from firmware if we can.
getAccelerationState();
+ machineId = VidPid.UNKNOWN;
+
if (verifyMachineId() == false ) //read and verify our PID/VID if we can
{
Base.logger.fine("Machine ID Mismatch. Please re-select your machine.");
@@ -441,7 +445,7 @@ public boolean checkAndWriteStepsPerMM() {
boolean needsReset = false;
int stepperCountMightyBoard = 5;
for(int i = 0; i < stepperCountMightyBoard; i++) {
- double firmwareAxisStepsPerMM = read32FromEEPROM(MightyBoard6X1EEPROM.AXIS_STEPS_PER_MM + i*4);
+ double firmwareAxisStepsPerMM = read32FromEEPROM(MightyBoard6X2EEPROM.AXIS_STEPS_PER_MM + i*4);
double val = 0.0;
@@ -469,7 +473,7 @@ public boolean checkAndWriteStepsPerMM() {
if ( firmwareAxisStepsPerMM != val ) {
Base.logger.info("Bot StepsPerMM Axis " + i + ": " + firmwareAxisStepsPerMM / 1000000.0 +
" machine xml has: " + val / 1000000.0+ ", updating bot");
- write32ToEEPROM32(MightyBoard6X1EEPROM.AXIS_STEPS_PER_MM + i*4, (int)val);
+ write32ToEEPROM32(MightyBoard6X2EEPROM.AXIS_STEPS_PER_MM + i*4, (int)val);
needsReset = true;
}
}
@@ -491,7 +495,7 @@ public boolean checkAndWriteMaxFeedRates() {
boolean needsReset = false;
int stepperCountMightyBoard = 5;
for(int i = 0; i < stepperCountMightyBoard; i++) {
- double firmwareAxisMaximumFeedRate = read32FromEEPROM(MightyBoard6X1EEPROM.AXIS_MAX_FEEDRATES + i*4);
+ double firmwareAxisMaximumFeedRate = read32FromEEPROM(MightyBoard6X2EEPROM.AXIS_MAX_FEEDRATES + i*4);
double val = 0.0;
@@ -517,7 +521,7 @@ public boolean checkAndWriteMaxFeedRates() {
if ( firmwareAxisMaximumFeedRate != val ) {
Base.logger.info("Bot Maximum Feed Rate Axis " + i + ": " + firmwareAxisMaximumFeedRate +
" machine xml has: " + val + ", updating bot");
- write32ToEEPROM32(MightyBoard6X1EEPROM.AXIS_MAX_FEEDRATES + i*4, (int)val);
+ write32ToEEPROM32(MightyBoard6X2EEPROM.AXIS_MAX_FEEDRATES + i*4, (int)val);
needsReset = true;
}
}
@@ -539,7 +543,7 @@ public boolean checkAndWriteAxisLengths() {
boolean needsReset = false;
int stepperCountMightyBoard = 5;
for(int i = 0; i < stepperCountMightyBoard; i++) {
- int firmwareAxisLength = read32FromEEPROM(MightyBoard5XEEPROM.AXIS_LENGTHS + i*4);
+ int firmwareAxisLength = read32FromEEPROM(MightyBoard6X2EEPROM.AXIS_LENGTHS_MM + i*4);
int val = 0;
switch (i) {
@@ -564,7 +568,7 @@ public boolean checkAndWriteAxisLengths() {
if ( firmwareAxisLength != val ) {
Base.logger.info("Bot Length Axis " + i + ": " + firmwareAxisLength +
" machine xml has: " + val + ", updating bot");
- write32ToEEPROM32(MightyBoard5XEEPROM.AXIS_LENGTHS + i*4, val);
+ write32ToEEPROM32(MightyBoard6X2EEPROM.AXIS_LENGTHS_MM + i*4, val);
needsReset = true;
}
}
@@ -943,11 +947,12 @@ public double getAxisHomeOffset(int axis) {
}
checkEEPROM();
-
- double val = read32FromEEPROM(MightyBoard5XEEPROM.AXIS_HOME_POSITIONS + axis*4);
+
+ double val;
if(!hasJettyAcceleration()){
+ val = read32FromEEPROM(MightyBoard5XEEPROM.AXIS_HOME_POSITIONS + axis*4);
Point5d stepsPerMM = getMachine().getStepsPerMM();
switch(axis) {
case 0:
@@ -966,7 +971,9 @@ public double getAxisHomeOffset(int axis) {
val = val/stepsPerMM.b();
break;
}
- }
+ }else{
+ val = read32FromEEPROM(MightyBoard6X2EEPROM.AXIS_HOME_POSITIONS_MM + axis*4);
+ }
return val;
@@ -1001,8 +1008,10 @@ public void setAxisHomeOffset(int axis, double offset) {
offsetSteps = (int)(offset*stepsPerMM.b());
break;
}
+ write32ToEEPROM32(MightyBoard5XEEPROM.AXIS_HOME_POSITIONS + axis*4,offsetSteps);
+ }else{
+ write32ToEEPROM32(MightyBoard6X2EEPROM.AXIS_HOME_POSITIONS_MM + axis*4,offsetSteps);
}
- write32ToEEPROM32(MightyBoard5XEEPROM.AXIS_HOME_POSITIONS + axis*4,offsetSteps);
}
@Override
@@ -1257,7 +1266,7 @@ public byte getAccelerationStatus(){
byte[] val;
if (hasJettyAcceleration())
- val = readFromEEPROM(MightyBoard6X1EEPROM.ACCELERATION_STATE, 1);
+ val = readFromEEPROM(MightyBoard6X2EEPROM.ACCELERATION_STATE, 1);
else
val = readFromEEPROM(MightyBoard5XEEPROM.ACCELERATION_SETTINGS,1);
@@ -1274,7 +1283,7 @@ public void setAccelerationStatus(byte status){
b[0] = status;
if (hasJettyAcceleration())
- writeToEEPROM(MightyBoard6X1EEPROM.ACCELERATION_STATE, b);
+ writeToEEPROM(MightyBoard6X2EEPROM.ACCELERATION_STATE, b);
else
writeToEEPROM(MightyBoard5XEEPROM.ACCELERATION_SETTINGS, b);
}
@@ -2078,7 +2087,7 @@ public void setOffsetZ(int offsetSystemNum, double j) {
public boolean hasHbp(){
- byte[] eeprom_hbp_present = readFromEEPROM(MightyBoard6X1EEPROM.HBP_PRESENT, 1);
+ byte[] eeprom_hbp_present = readFromEEPROM(MightyBoard6X2EEPROM.HBP_PRESENT, 1);
byte hbp_on_off = eeprom_hbp_present[0];
if(hbp_on_off >= 0)
return true;
@@ -2087,16 +2096,16 @@ public boolean hasHbp(){
}
public byte currentHbpSetting(){
- byte[] eeprom_hbp_present = readFromEEPROM(MightyBoard6X1EEPROM.HBP_PRESENT, 1);
+ byte[] eeprom_hbp_present = readFromEEPROM(MightyBoard6X2EEPROM.HBP_PRESENT, 1);
byte hbp_on_off = eeprom_hbp_present[0];
return hbp_on_off;
}
public void setHbpSetting(boolean on_off){
if(on_off)
- writeToEEPROM(MightyBoard6X1EEPROM.HBP_PRESENT, intToLE(1));
+ writeToEEPROM(MightyBoard6X2EEPROM.HBP_PRESENT, intToLE(1));
else
- writeToEEPROM(MightyBoard6X1EEPROM.HBP_PRESENT, intToLE(0));
+ writeToEEPROM(MightyBoard6X2EEPROM.HBP_PRESENT, intToLE(0));
}
/// read a 32 bit unsigned int from EEPROM at location 'offset'
@@ -2165,21 +2174,21 @@ private void setUInt32EEPROM(int offset, long val) {
@Override
public int getEEPROMParamInt(EEPROMParams param) {
switch (param) {
- case ACCEL_EXTRUDER_DEPRIME_A : return read16FromEEPROM(MightyBoard6X1EEPROM.EXTRUDER_DEPRIME_STEPS + 0*2);
- case ACCEL_EXTRUDER_DEPRIME_B : return read16FromEEPROM(MightyBoard6X1EEPROM.EXTRUDER_DEPRIME_STEPS + 1*2);
- case ACCEL_MAX_ACCELERATION_A : return read16FromEEPROM(MightyBoard6X1EEPROM.MAX_ACCELERATION_AXIS + 3*2);
- case ACCEL_MAX_ACCELERATION_B : return read16FromEEPROM(MightyBoard6X1EEPROM.MAX_ACCELERATION_AXIS + 4*2);
- case ACCEL_MAX_ACCELERATION_X : return read16FromEEPROM(MightyBoard6X1EEPROM.MAX_ACCELERATION_AXIS + 0*2);
- case ACCEL_MAX_ACCELERATION_Y : return read16FromEEPROM(MightyBoard6X1EEPROM.MAX_ACCELERATION_AXIS + 1*2);
- case ACCEL_MAX_ACCELERATION_Z : return read16FromEEPROM(MightyBoard6X1EEPROM.MAX_ACCELERATION_AXIS + 2*2);
- case ACCEL_MAX_EXTRUDER_NORM : return read16FromEEPROM(MightyBoard6X1EEPROM.MAX_ACCELERATION_NORMAL_MOVE);
- case ACCEL_MAX_EXTRUDER_RETRACT : return read16FromEEPROM(MightyBoard6X1EEPROM.MAX_ACCELERATION_EXTRUDER_MOVE);
- case ACCEL_MAX_SPEED_CHANGE_A : return read16FromEEPROM(MightyBoard6X1EEPROM.MAX_SPEED_CHANGE + 3*2);
- case ACCEL_MAX_SPEED_CHANGE_B : return read16FromEEPROM(MightyBoard6X1EEPROM.MAX_SPEED_CHANGE + 4*2);
- case ACCEL_MAX_SPEED_CHANGE_X : return read16FromEEPROM(MightyBoard6X1EEPROM.MAX_SPEED_CHANGE + 0*2);
- case ACCEL_MAX_SPEED_CHANGE_Y : return read16FromEEPROM(MightyBoard6X1EEPROM.MAX_SPEED_CHANGE + 1*2);
- case ACCEL_MAX_SPEED_CHANGE_Z : return read16FromEEPROM(MightyBoard6X1EEPROM.MAX_SPEED_CHANGE + 2*2);
- case ACCEL_SLOWDOWN_FLAG : return getUInt8EEPROM(MightyBoard6X1EEPROM.SLOWDOWN_FLAG);
+ case ACCEL_EXTRUDER_DEPRIME_A : return read16FromEEPROM(MightyBoard6X2EEPROM.EXTRUDER_DEPRIME_STEPS + 0*2);
+ case ACCEL_EXTRUDER_DEPRIME_B : return read16FromEEPROM(MightyBoard6X2EEPROM.EXTRUDER_DEPRIME_STEPS + 1*2);
+ case ACCEL_MAX_ACCELERATION_A : return read16FromEEPROM(MightyBoard6X2EEPROM.MAX_ACCELERATION_AXIS + 3*2);
+ case ACCEL_MAX_ACCELERATION_B : return read16FromEEPROM(MightyBoard6X2EEPROM.MAX_ACCELERATION_AXIS + 4*2);
+ case ACCEL_MAX_ACCELERATION_X : return read16FromEEPROM(MightyBoard6X2EEPROM.MAX_ACCELERATION_AXIS + 0*2);
+ case ACCEL_MAX_ACCELERATION_Y : return read16FromEEPROM(MightyBoard6X2EEPROM.MAX_ACCELERATION_AXIS + 1*2);
+ case ACCEL_MAX_ACCELERATION_Z : return read16FromEEPROM(MightyBoard6X2EEPROM.MAX_ACCELERATION_AXIS + 2*2);
+ case ACCEL_MAX_EXTRUDER_NORM : return read16FromEEPROM(MightyBoard6X2EEPROM.MAX_ACCELERATION_NORMAL_MOVE);
+ case ACCEL_MAX_EXTRUDER_RETRACT : return read16FromEEPROM(MightyBoard6X2EEPROM.MAX_ACCELERATION_EXTRUDER_MOVE);
+ case ACCEL_MAX_SPEED_CHANGE_A : return read16FromEEPROM(MightyBoard6X2EEPROM.MAX_SPEED_CHANGE + 3*2);
+ case ACCEL_MAX_SPEED_CHANGE_B : return read16FromEEPROM(MightyBoard6X2EEPROM.MAX_SPEED_CHANGE + 4*2);
+ case ACCEL_MAX_SPEED_CHANGE_X : return read16FromEEPROM(MightyBoard6X2EEPROM.MAX_SPEED_CHANGE + 0*2);
+ case ACCEL_MAX_SPEED_CHANGE_Y : return read16FromEEPROM(MightyBoard6X2EEPROM.MAX_SPEED_CHANGE + 1*2);
+ case ACCEL_MAX_SPEED_CHANGE_Z : return read16FromEEPROM(MightyBoard6X2EEPROM.MAX_SPEED_CHANGE + 2*2);
+ case ACCEL_SLOWDOWN_FLAG : return getUInt8EEPROM(MightyBoard6X2EEPROM.SLOWDOWN_FLAG);
default :
Base.logger.log(Level.WARNING, "getEEPROMParamInt(" + param + ") call failed");
return 0;
@@ -2198,8 +2207,8 @@ public long getEEPROMParamUInt(EEPROMParams param) {
@Override
public double getEEPROMParamFloat(EEPROMParams param) {
switch (param) {
- case ACCEL_ADVANCE_K : return (double)getUInt32EEPROM(MightyBoard6X1EEPROM.JKN_ADVANCE_K) / 100000.0d;
- case ACCEL_ADVANCE_K2 : return (double)getUInt32EEPROM(MightyBoard6X1EEPROM.JKN_ADVANCE_K2) / 100000.0d;
+ case ACCEL_ADVANCE_K : return (double)getUInt32EEPROM(MightyBoard6X2EEPROM.JKN_ADVANCE_K) / 100000.0d;
+ case ACCEL_ADVANCE_K2 : return (double)getUInt32EEPROM(MightyBoard6X2EEPROM.JKN_ADVANCE_K2) / 100000.0d;
default :
Base.logger.log(Level.WARNING, "getEEPROMParamFloat(" + param + ") call failed");
return 0d;
@@ -2211,21 +2220,21 @@ public void setEEPROMParam(EEPROMParams param, int val) {
if (val < 0)
val = 0;
switch (param) {
- case ACCEL_EXTRUDER_DEPRIME_A : write16ToEEPROM(MightyBoard6X1EEPROM.EXTRUDER_DEPRIME_STEPS + 0*2, val); break;
- case ACCEL_EXTRUDER_DEPRIME_B : write16ToEEPROM(MightyBoard6X1EEPROM.EXTRUDER_DEPRIME_STEPS + 1*2, val); break;
- case ACCEL_MAX_ACCELERATION_A : write16ToEEPROM(MightyBoard6X1EEPROM.MAX_ACCELERATION_AXIS + 3*2, val); break;
- case ACCEL_MAX_ACCELERATION_B : write16ToEEPROM(MightyBoard6X1EEPROM.MAX_ACCELERATION_AXIS + 4*2, val); break;
- case ACCEL_MAX_ACCELERATION_X : write16ToEEPROM(MightyBoard6X1EEPROM.MAX_ACCELERATION_AXIS + 0*2, val); break;
- case ACCEL_MAX_ACCELERATION_Y : write16ToEEPROM(MightyBoard6X1EEPROM.MAX_ACCELERATION_AXIS + 1*2, val); break;
- case ACCEL_MAX_ACCELERATION_Z : write16ToEEPROM(MightyBoard6X1EEPROM.MAX_ACCELERATION_AXIS + 2*2, val); break;
- case ACCEL_MAX_EXTRUDER_NORM : write16ToEEPROM(MightyBoard6X1EEPROM.MAX_ACCELERATION_NORMAL_MOVE, val); break;
- case ACCEL_MAX_EXTRUDER_RETRACT : write16ToEEPROM(MightyBoard6X1EEPROM.MAX_ACCELERATION_EXTRUDER_MOVE, val); break;
- case ACCEL_MAX_SPEED_CHANGE_A : write16ToEEPROM(MightyBoard6X1EEPROM.MAX_SPEED_CHANGE + 3*2, val); break;
- case ACCEL_MAX_SPEED_CHANGE_B : write16ToEEPROM(MightyBoard6X1EEPROM.MAX_SPEED_CHANGE + 4*2, val); break;
- case ACCEL_MAX_SPEED_CHANGE_X : write16ToEEPROM(MightyBoard6X1EEPROM.MAX_SPEED_CHANGE + 0*2, val); break;
- case ACCEL_MAX_SPEED_CHANGE_Y : write16ToEEPROM(MightyBoard6X1EEPROM.MAX_SPEED_CHANGE + 1*2, val); break;
- case ACCEL_MAX_SPEED_CHANGE_Z : write16ToEEPROM(MightyBoard6X1EEPROM.MAX_SPEED_CHANGE + 2*2, val); break;
- case ACCEL_SLOWDOWN_FLAG : setUInt8EEPROM(MightyBoard6X1EEPROM.SLOWDOWN_FLAG, (val != 0) ? 1 : 0); break;
+ case ACCEL_EXTRUDER_DEPRIME_A : write16ToEEPROM(MightyBoard6X2EEPROM.EXTRUDER_DEPRIME_STEPS + 0*2, val); break;
+ case ACCEL_EXTRUDER_DEPRIME_B : write16ToEEPROM(MightyBoard6X2EEPROM.EXTRUDER_DEPRIME_STEPS + 1*2, val); break;
+ case ACCEL_MAX_ACCELERATION_A : write16ToEEPROM(MightyBoard6X2EEPROM.MAX_ACCELERATION_AXIS + 3*2, val); break;
+ case ACCEL_MAX_ACCELERATION_B : write16ToEEPROM(MightyBoard6X2EEPROM.MAX_ACCELERATION_AXIS + 4*2, val); break;
+ case ACCEL_MAX_ACCELERATION_X : write16ToEEPROM(MightyBoard6X2EEPROM.MAX_ACCELERATION_AXIS + 0*2, val); break;
+ case ACCEL_MAX_ACCELERATION_Y : write16ToEEPROM(MightyBoard6X2EEPROM.MAX_ACCELERATION_AXIS + 1*2, val); break;
+ case ACCEL_MAX_ACCELERATION_Z : write16ToEEPROM(MightyBoard6X2EEPROM.MAX_ACCELERATION_AXIS + 2*2, val); break;
+ case ACCEL_MAX_EXTRUDER_NORM : write16ToEEPROM(MightyBoard6X2EEPROM.MAX_ACCELERATION_NORMAL_MOVE, val); break;
+ case ACCEL_MAX_EXTRUDER_RETRACT : write16ToEEPROM(MightyBoard6X2EEPROM.MAX_ACCELERATION_EXTRUDER_MOVE, val); break;
+ case ACCEL_MAX_SPEED_CHANGE_A : write16ToEEPROM(MightyBoard6X2EEPROM.MAX_SPEED_CHANGE + 3*2, val); break;
+ case ACCEL_MAX_SPEED_CHANGE_B : write16ToEEPROM(MightyBoard6X2EEPROM.MAX_SPEED_CHANGE + 4*2, val); break;
+ case ACCEL_MAX_SPEED_CHANGE_X : write16ToEEPROM(MightyBoard6X2EEPROM.MAX_SPEED_CHANGE + 0*2, val); break;
+ case ACCEL_MAX_SPEED_CHANGE_Y : write16ToEEPROM(MightyBoard6X2EEPROM.MAX_SPEED_CHANGE + 1*2, val); break;
+ case ACCEL_MAX_SPEED_CHANGE_Z : write16ToEEPROM(MightyBoard6X2EEPROM.MAX_SPEED_CHANGE + 2*2, val); break;
+ case ACCEL_SLOWDOWN_FLAG : setUInt8EEPROM(MightyBoard6X2EEPROM.SLOWDOWN_FLAG, (val != 0) ? 1 : 0); break;
default : Base.logger.log(Level.WARNING, "setEEPROMParam(" + param + ", " + val + ") call failed"); break;
}
}
@@ -2244,8 +2253,8 @@ public void setEEPROMParam(EEPROMParams param, double val) {
if (val < 0.0d)
val = 0.0d;
switch (param) {
- case ACCEL_ADVANCE_K : setUInt32EEPROM(MightyBoard6X1EEPROM.JKN_ADVANCE_K, (long)(val * 100000.0d)); break;
- case ACCEL_ADVANCE_K2 : setUInt32EEPROM(MightyBoard6X1EEPROM.JKN_ADVANCE_K2, (long)(val * 100000.0d)); break;
+ case ACCEL_ADVANCE_K : setUInt32EEPROM(MightyBoard6X2EEPROM.JKN_ADVANCE_K, (long)(val * 100000.0d)); break;
+ case ACCEL_ADVANCE_K2 : setUInt32EEPROM(MightyBoard6X2EEPROM.JKN_ADVANCE_K2, (long)(val * 100000.0d)); break;
default : Base.logger.log(Level.WARNING, "setEEPROMParam(" + param + ", " + val + ") call failed"); break;
}
}
View
2 src/replicatorg/drivers/gen3/Replicator2.java
@@ -33,7 +33,7 @@ public boolean verifyMachineId()
if ( this.machineId == VidPid.UNKNOWN ) {
readMachineVidPid();
}
- return this.machineId.equals(VidPid.THE_REPLICATOR_2);
+ return this.machineId.equals(VidPid.REPLICATOR_2);
}
/**
View
2 src/replicatorg/drivers/gen3/VidPid.java
@@ -10,7 +10,7 @@
UNKNOWN (0X0000, 0X000),
MIGHTY_BOARD (0x23C1, 0xB404), //Board 404!
THE_REPLICATOR(0x23C1, 0xD314), //Dean 314
- THE_REPLICATOR_2(0x23C1, 0xB015); // BOTS as leet
+ REPLICATOR_2(0x23C1, 0xB015); // BOTS as leet
final int pid; //productId (same as USB product id)
final int vid; //vendorId (same as USB vendor id)
View
2 src/replicatorg/machine/model/MachineModel.java
@@ -142,6 +142,8 @@ private void parseType() {
if (kid.getNodeName().equals("name")) {
String name = kid.getFirstChild().getNodeValue().trim();
+ if(name.startsWith("Replicator 2"))
+ machineType = MachineType.REPLICATOR_2;
if(name.startsWith("The Replicator"))
machineType = MachineType.THE_REPLICATOR;
else if(name.startsWith("Thingomatic"))
View
1 src/replicatorg/machine/model/MachineType.java
@@ -7,6 +7,7 @@
*/
public enum MachineType
{
+ REPLICATOR_2("Replicator 2"),
THE_REPLICATOR("The Replicator"),
THINGOMATIC("Thing-O-Matic"),
CUPCAKE("Cupcake");

0 comments on commit 1fe6c38

Please sign in to comment.