Skip to content

Commit

Permalink
Integrated makerbot 0011 changes; Estimating no longer sends tweets; …
Browse files Browse the repository at this point in the history
…Upgraded twitter4j library to 2.0.10
  • Loading branch information
TeamTeamUSA committed Nov 26, 2009
1 parent abd9347 commit 1a09754
Show file tree
Hide file tree
Showing 7 changed files with 54 additions and 11 deletions.
9 changes: 7 additions & 2 deletions build.xml
Original file line number Diff line number Diff line change
Expand Up @@ -29,8 +29,13 @@
</target>

<target name="compile">
<mkdir dir="${classes.dir}"/>
<javac srcdir="${src.dir}" destdir="${classes.dir}" classpathref="classpath" debug="true" debuglevel="lines,vars,source" source="1.5"/>
<mkdir dir="${classes.dir}"/>
<javac srcdir="${src.dir}" destdir="${classes.dir}" classpathref="classpath" debug="true" debuglevel="lines,vars,source" source="1.5">
<!-- Uncomment to aid in Java debugging
<compilerarg value="-Xlint:deprecation" />
<compilerarg value="-Xlint:unchecked" />
-->
</javac>
</target>

<target name="jar" depends="compile">
Expand Down
Binary file added build/shared/lib/twitter4j-2.0.10.jar
Binary file not shown.
Binary file removed build/shared/lib/twitter4j-2.0.9.jar
Binary file not shown.
2 changes: 2 additions & 0 deletions changelog.txt
100755 → 100644
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,8 @@

* Support for heated build platform
* On startup, ReplicatorG now not only prints the Motherboard's firmware version on the console, but also the Extruder controller's firmware version
* Estimating no longer sends tweets
* Upgraded twitter4j library to 2.0.10

0010 ReplicatorG

Expand Down
27 changes: 27 additions & 0 deletions dist-all.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,27 @@
#!/bin/sh
# I created this because I couldn't get the ant target dist to compile on OS X =ml=

if [[ `uname` != 'Darwin' ]]; then
echo "OS X is required to build all distros."
echo "You have been warned!"
fi

rm -rf dist-all
mkdir dist-all

echo "===> Compiling Linux distro..."
./dist-linux.sh &
wait
mv dist/* dist-all/.
echo "===> done"
echo "===> Compiling Windows distro..."
./dist-windows.sh &
wait
mv dist/* dist-all/.
echo "===> done"
echo "===> Compiling OS X distro..."
./dist-mac.sh &
wait
mv dist/* dist-all/.
rm -rf dist
echo "===> done"
16 changes: 10 additions & 6 deletions src/replicatorg/app/GCodeParser.java
Original file line number Diff line number Diff line change
Expand Up @@ -126,9 +126,13 @@ public class GCodeParser {
protected double drillPecksize = 0.0;

// TwitterBot extension variables
protected Class extClass;
protected Object objExtClass;

protected Class extClass;
protected Object objExtClass;
public static final String TB_CODE = "M";
public static final int TB_INIT = 997;
public static final int TB_MESSAGE = 998;
public static final int TB_CLEANUP = 999;

/**
* Creates the driver object.
*/
Expand Down Expand Up @@ -575,7 +579,7 @@ else if (hasCode("R"))
// driver.pause();
break;

case 997:
case TB_INIT:
// initialize extension
// Syntax: M997 ClassName param,param,param,etc
// your class needs to know how to process the params as it will just
Expand All @@ -596,7 +600,7 @@ else if (hasCode("R"))
}
break;

case 998:
case TB_MESSAGE:
// call extension
// Syntax: M998 Method_name 'Content goes here'
// passed content is single quote delimited
Expand All @@ -614,7 +618,7 @@ else if (hasCode("R"))
}
break;

case 999:
case TB_CLEANUP:
// cleanup extension
// are explicit nulls needed?
extClass = null;
Expand Down
11 changes: 8 additions & 3 deletions src/replicatorg/app/MachineController.java
Original file line number Diff line number Diff line change
Expand Up @@ -618,9 +618,14 @@ public void estimate() {

// run each line through the estimator
for (String line : source) {
// use our parser to handle the stuff.
estimator.parse(line);
estimator.execute();
// parse only if line is NOT a Twitterbot M code
if ((line.indexOf(GCodeParser.TB_CODE + Integer.toString(GCodeParser.TB_INIT)) == -1) &&
(line.indexOf(GCodeParser.TB_CODE + Integer.toString(GCodeParser.TB_MESSAGE)) == -1) &&
(line.indexOf(GCodeParser.TB_CODE + Integer.toString(GCodeParser.TB_CLEANUP)) == -1)) {
// use our parser to handle the stuff.
estimator.parse(line);
estimator.execute();
}
}

if (simulator != null) {
Expand Down

0 comments on commit 1a09754

Please sign in to comment.