master moved from 688449524ca3 to 1cb590f032a6
5 new revisions:
Revision: 5a4a12aa954c
Author: Andy Barry <
aba...@gmail.com>
Date: Thu Oct 30 15:40:32 2014 UTC
Log: Fixes two bugs related to opening an ObjectPanel when there is no
data...
https://code.google.com/p/lcm/source/detail?r=5a4a12aa954c
Revision: b24d0fb44256
Author: Andy Barry <
aba...@gmail.com>
Date: Thu Oct 30 18:44:16 2014 UTC
Log: Cleanup on code path that should never be used, now safer and
prints a...
https://code.google.com/p/lcm/source/detail?r=b24d0fb44256
Revision: b47fedb542a3
Author: ashuang <
ash...@gmail.com>
Date: Fri Oct 31 06:13:54 2014 UTC
Log: Merge pull request #2 from andybarry/master...
https://code.google.com/p/lcm/source/detail?r=b47fedb542a3
Revision: 1fa8cf0cce9b
Author: Albert Huang <
alb...@csail.mit.edu>
Date: Tue Oct 28 05:50:28 2014 UTC
Log: documentation update, remove .gitmodules
https://code.google.com/p/lcm/source/detail?r=1fa8cf0cce9b
Revision: 1cb590f032a6
Author: Albert Huang <
alb...@csail.mit.edu>
Date: Fri Oct 31 06:32:15 2014 UTC
Log: fix build.xml to work with jchart2d
https://code.google.com/p/lcm/source/detail?r=1cb590f032a6
==============================================================================
Revision: 5a4a12aa954c
Author: Andy Barry <
aba...@gmail.com>
Date: Thu Oct 30 15:40:32 2014 UTC
Log: Fixes two bugs related to opening an ObjectPanel when there is no
data flowing in. The first caused the panel to not draw itself correctly
until the mouse moved over it. The second caused an issue where requesting
a graph would hang the application. Finally, also fixes an issue where
axis ranges were computed incorrectly when there was only one point on the
graph.
https://code.google.com/p/lcm/source/detail?r=5a4a12aa954c
Modified:
/lcm-java/lcm/spy/ObjectPanel.java
/lcm-java/lcm/spy/Spy.java
/lcm-java/lcm/spy/ZoomableChartScrollWheel.java
=======================================
--- /lcm-java/lcm/spy/ObjectPanel.java Mon Oct 20 19:52:38 2014 UTC
+++ /lcm-java/lcm/spy/ObjectPanel.java Thu Oct 30 15:40:32 2014 UTC
@@ -27,7 +27,6 @@
long utime; // time of this message's arrival
int lastwidth = 500;
int lastheight = 100;
- boolean updateGraphs = false;
JViewport scrollViewport;
final int sparklineWidth = 150; // width in pixels of all sparklines
@@ -99,6 +98,8 @@
addMouseMotionListener(new MyMouseMotionListener());
+ repaint();
+
}
/**
@@ -364,7 +365,6 @@
if (collapse_depth > 0)
return;
-
Font of = g.getFont();
if (isstatic)
g.setFont(of.deriveFont(Font.ITALIC));
@@ -392,7 +392,6 @@
public void drawStringsAndGraph(Class cls, String name, Object o,
boolean isstatic,
int sec)
{
-
Section cs = sections.get(sec);
double value = Double.NaN;
@@ -414,7 +413,7 @@
// graphs being displayed
SparklineData data = cs.sparklines.get(name);
- if (data.chart != null && updateGraphs)
+ if (data.chart != null)
{
ITrace2D trace = data.chart.getTraces().first();
trace.addPoint((double)utime/1000000.0d, value);
@@ -476,10 +475,7 @@
data.xmax = x[3]+sparklineWidth;
// add the data to our trace
- if (updateGraphs)
- {
- trace.addPoint((double)utime/1000000.0d, value);
- }
+ trace.addPoint((double)utime/1000000.0d, value);
// draw the graph
DrawSparkline(x[3], y, trace, isHovering);
@@ -647,7 +643,6 @@
{
g.setColor(Color.white);
g.fillRect(0, y, getWidth(), getHeight());
- updateGraphs = false;
}
}
@@ -655,7 +650,6 @@
{
this.o = o;
this.utime = utime - chartData.getStartTime();
- this.updateGraphs = true;
repaint();
}
@@ -700,6 +694,8 @@
ps.x[1] = Math.min(200, width/4);
ps.x[2] = Math.min(ps.x[1]+200, 2*width/4);
ps.x[3] = ps.x[2]+150;
+
+ int previousNumSections = sections.size();
if (o != null)
paintRecurse(g, ps, "", o.getClass(), o, false, -1);
@@ -710,6 +706,12 @@
invalidate();
getParent().validate();
}
+
+ if (previousNumSections != sections.size()) {
+ // if the number of sections has changed, the system that
figures out
+ // what to draw based on user view needs to rerun to update
+ repaint();
+ }
}
void paintRecurse(Graphics g, PaintState ps, String name, Class cls,
Object o, boolean isstatic, int section)
@@ -743,7 +745,6 @@
data.ymin = ps.y - ps.textheight;
data.ymax = ps.y;
-
if (visibleSparklines.contains(data) ||
graphingSparklines.contains(data))
{
ps.drawStringsAndGraph(cls, name, o, isstatic, section);
@@ -872,7 +873,7 @@
{
/**
- * Check to see if we need to update the hightlight
+ * Check to see if we need to update the highlight
* on a row.
*
* @param e MouseEvent from the mouse move
@@ -899,14 +900,13 @@
*/
public void stateChanged(ChangeEvent e)
{
- //
JViewport viewport = (JViewport) e.getSource();
Rectangle view_rect = viewport.getViewRect();
visibleSparklines.clear();
-
+
for (int i = sections.size() -1; i > -1; i--)
{
Section section = sections.get(i);
=======================================
--- /lcm-java/lcm/spy/Spy.java Sun Oct 19 22:37:35 2014 UTC
+++ /lcm-java/lcm/spy/Spy.java Thu Oct 30 15:40:32 2014 UTC
@@ -1,17 +1,12 @@
package lcm.spy;
import javax.swing.*;
-import javax.swing.event.*;
import javax.swing.table.*;
-import javax.swing.tree.*;
import java.awt.*;
import java.awt.event.*;
import java.io.*;
import java.util.*;
-import java.util.jar.*;
-import java.util.zip.*;
-
import lcm.util.*;
import java.lang.reflect.*;
=======================================
--- /lcm-java/lcm/spy/ZoomableChartScrollWheel.java Sun Oct 19 23:06:36
2014 UTC
+++ /lcm-java/lcm/spy/ZoomableChartScrollWheel.java Thu Oct 30 15:40:32
2014 UTC
@@ -380,8 +380,7 @@
IAxis xAxis = this.getAxisX();
IAxis yAxis = this.getAxisY();
- double xAxisRange = xAxis.getMax() - xAxis.getMin();
-
+ double xAxisRange = xAxis.getRange().getExtent();
mouseDownValPerPxY.clear();
mouseDownMinY.clear();
@@ -395,11 +394,11 @@
mouseDownValPerPxX = xAxisRange / xAxisWidth;
-
mouseDownMinX = xAxis.getMin();
mouseDownMaxX = xAxis.getMax();
- double yAxisRange = yAxis.getMax() - yAxis.getMin();
+ double yAxisRange = yAxis.getRange().getExtent();
+
mouseDownValPerPxY.add(yAxisRange / yAxisHeight);
mouseDownMinY.add(yAxis.getMin());
mouseDownMaxY.add(yAxis.getMax());
@@ -503,8 +502,8 @@
IAxis xAxis = chart.getAxisX();
IAxis yAxis = chart.getAxisY();
- double xAxisRange = xAxis.getMax() - xAxis.getMin();
- double yAxisRange = yAxis.getMax() - yAxis.getMin();
+ double xAxisRange = xAxis.getRange().getExtent();
+ double yAxisRange = yAxis.getRange().getExtent();
double zoomFactor;
==============================================================================
Revision: b24d0fb44256
Author: Andy Barry <
aba...@gmail.com>
Date: Thu Oct 30 18:44:16 2014 UTC
Log: Cleanup on code path that should never be used, now safer and
prints a warning.
https://code.google.com/p/lcm/source/detail?r=b24d0fb44256
Modified:
/lcm-java/lcm/spy/ObjectPanel.java
=======================================
--- /lcm-java/lcm/spy/ObjectPanel.java Thu Oct 30 15:40:32 2014 UTC
+++ /lcm-java/lcm/spy/ObjectPanel.java Thu Oct 30 18:44:16 2014 UTC
@@ -171,13 +171,12 @@
*/
public void displayDetailedChart(SparklineData data, boolean
openNewChart, boolean newAxis)
{
- // ensure that a Chart2D object exists (if might not if the user
had a log playing,
- // stopped the log, then scrolled to a new location, and then
clicked on the entry
- // which would never have triggered a redraw
if (data.chart == null)
{
- data.chart = InitChart(
data.name);
+ // this should not happen, but catch it if it does because we
can at least safely ignore it
+ System.out.println("Warning: detailed chart display requested
on uninitialized chart " +
data.name);
+ return;
}
// check to see if we are already displaying this trace
==============================================================================
Revision: b47fedb542a3
Author: ashuang <
ash...@gmail.com>
Date: Fri Oct 31 06:13:54 2014 UTC
Log: Merge pull request #2 from andybarry/master
Fixes two bugs related to opening an ObjectPanel when there is no data
flowing in
https://code.google.com/p/lcm/source/detail?r=b47fedb542a3
==============================================================================
Revision: 1fa8cf0cce9b
Author: Albert Huang <
alb...@csail.mit.edu>
Date: Tue Oct 28 05:50:28 2014 UTC
Log: documentation update, remove .gitmodules
https://code.google.com/p/lcm/source/detail?r=1fa8cf0cce9b
Deleted:
/.gitmodules
Modified:
/docs/content/mainpage.md
/docs/release_checklist
=======================================
--- /.gitmodules Mon Oct 20 18:50:19 2014 UTC
+++ /dev/null
@@ -1,1 +0,0 @@
-
=======================================
--- /docs/content/mainpage.md Sat Oct 25 04:49:03 2014 UTC
+++ /docs/content/mainpage.md Tue Oct 28 05:50:28 2014 UTC
@@ -32,3 +32,24 @@
- \ref multicast_setup
- \ref java_notes
+
+# Examples
+
+Simple examples are provided with the source distribution of LCM.
+
+For each language, at least two examples are provided. One listens for a
+message, the other transmits a message. The LCM type used is defined in
+[example_t.lcm](
https://github.com/lcm-proj/lcm/blob/master/examples/types/example_t.lcm)
(`examples/types/example_t.lcm`
in the source distribution).
+
+Additional examples are distributed with the LCM source in the `examples/`
+directory.
+
+Language | Listener | Transmitter
+-------- | -------- | -----------
+C |
[listener.c](
https://github.com/lcm-proj/lcm/blob/master/examples/c/listener.c)
<br>[listener-async.c](
https://github.com/lcm-proj/lcm/blob/master/examples/c/listener-async.c)
|
[send_message.c](
https://github.com/lcm-proj/lcm/blob/master/examples/c/send_message.c)
+C++ |
[listener.cpp](
https://github.com/lcm-proj/lcm/blob/master/examples/cpp/listener.cpp)
|
[send_message.cpp](
https://github.com/lcm-proj/lcm/blob/master/examples/cpp/send_message.cpp)
+C# |
[example_t_display.cs](
https://github.com/lcm-proj/lcm/blob/master/examples/csharp/example_t_demo/example_t_display.cs)
|
[example_t_transmit.cs](
https://github.com/lcm-proj/lcm/blob/master/examples/csharp/example_t_demo/example_t_transmit.cs)
+Java |
[MySubscriber.java](
https://github.com/lcm-proj/lcm/blob/master/examples/java/example_t_demo/MySubscriber.java)
|
[SendMessage.java](
https://github.com/lcm-proj/lcm/blob/master/examples/java/example_t_demo/SendMessage.java)
+Lua |
[listener.lua](
https://github.com/lcm-proj/lcm/blob/master/examples/lua/listener.lua)
|
[send-message.lua](
https://github.com/lcm-proj/lcm/blob/master/examples/lua/send-message.lua)
+MATLAB |
[listener.m](
https://github.com/lcm-proj/lcm/blob/master/examples/matlab/listener.m)
|
[sendmessage.m](
https://github.com/lcm-proj/lcm/blob/master/examples/matlab/sendmessage.m)
+Python |
[listener.py](
https://github.com/lcm-proj/lcm/blob/master/examples/python/listener.py)
|
[send-message.py](
https://github.com/lcm-proj/lcm/blob/master/examples/python/send-message.py)
=======================================
--- /docs/release_checklist Sat Oct 25 04:49:03 2014 UTC
+++ /docs/release_checklist Tue Oct 28 05:50:28 2014 UTC
@@ -61,7 +61,7 @@
$ git clone
https://github.com/lcm-proj/lcm-proj.github.io
$ cd
lcm-proj.github.io
3. Copy the built docs to the lcm.www repository
- $ cp -r ../lcm/docs/html/* lcm
+ $ cp -r ../lcm/docs/html/* .
4. Commit the changes, tag the release, and push to origin
$ git commit -a -m "Release X.Y.Z"
$ git tag vX.Y.Z
==============================================================================
Revision: 1cb590f032a6
Author: Albert Huang <
alb...@csail.mit.edu>
Date: Fri Oct 31 06:32:15 2014 UTC
Log: fix build.xml to work with jchart2d
https://code.google.com/p/lcm/source/detail?r=1cb590f032a6
Modified:
/lcm-java/build.xml
=======================================
--- /lcm-java/build.xml Wed Aug 3 02:01:44 2011 UTC
+++ /lcm-java/build.xml Fri Oct 31 06:32:15 2014 UTC
@@ -27,10 +27,11 @@
<copy file="lcm.jar" todir="." />
</target>
-<target name="build-java">
+<target name="build-java" depends="build-jchart2d">
<!-- This compiles all the java -->
<javac
srcdir="lcm"
+ classpath="jchart2d-code/jchart2d-3.2.2.jar"
includes="**/*.java"
debug="on"
optimize="off"
@@ -39,7 +40,15 @@
</javac>
</target>
-<target name="clean-java" >
+<target name="build-jchart2d">
+ <ant dir="jchart2d-code" target="makejarFat"/>
+</target>
+
+<target name="clean-jchart2d">
+ <ant dir="jchart2d-code" target="delete.local"/>
+</target>
+
+<target name="clean-java" depends="clean-jchart2d">
<delete>
<fileset dir="build" includes="**/*.class"/>
<fileset dir="." includes="**/*~" defaultexcludes="no"/>