Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
41 commits
Select commit Hold shift + click to select a range
a002009
Allows you to switch to native code, but not switch back
madhephaestus Mar 25, 2015
4d32fba
removing the github dir from build path
wtfrankian Mar 25, 2015
ed4828d
synchronus code loading
wtfrankian Mar 25, 2015
e086ed6
Adding a web browser with tabs
madhephaestus Mar 26, 2015
d8fc0aa
ignoring
madhephaestus Mar 26, 2015
d37cf8c
making the scripting engine a stand alone unit with a common print
madhephaestus Mar 27, 2015
57eccb4
adding the dwio and plugin manager to the browser
madhephaestus Mar 27, 2015
ab59e58
renamed the tabed browser
madhephaestus Mar 27, 2015
9bb5291
Gist scripting tab now loads without errors
madhephaestus Mar 27, 2015
b30eb18
Adding the navagation buttons and default url
madhephaestus Mar 27, 2015
3b0e68c
the output window scrolls to the bottom all the time now
madhephaestus Mar 27, 2015
18eb97b
tab popping for not doc pages now working
madhephaestus Mar 27, 2015
623716f
adding all the tab names
madhephaestus Mar 28, 2015
f8a1f96
reenabling the rest of the plugins
madhephaestus Mar 28, 2015
214bc5a
dyuio tab first
madhephaestus Mar 28, 2015
a238bea
made the plugin managet start and stop the plugins not erase them all
madhephaestus Mar 28, 2015
79c0011
prinuting out exceptions rather thad silent fail
madhephaestus Mar 29, 2015
ee50aca
Adding the local file text box
madhephaestus Mar 31, 2015
2559491
Now able to open local files
madhephaestus Mar 31, 2015
0d25759
removing unused imports
madhephaestus Apr 1, 2015
0fbabf9
ignor nrsdk
madhephaestus Apr 1, 2015
ba7c596
ignoing any nrsdk
madhephaestus Apr 1, 2015
6343b17
better forward/back button icoons
wtfrankian Apr 3, 2015
46c84c3
Merge branch 'GUI_Dev' of https://github.com/NeuronRobotics/NrConsole…
wtfrankian Apr 3, 2015
9b24299
Frcing the packet parser int default state before makiung a connection
madhephaestus Apr 6, 2015
eb262f4
kinematics no longer has external frame
madhephaestus Apr 8, 2015
869fed5
i think this was causing a repaint recoursion...
madhephaestus Apr 9, 2015
b3c062f
all tabs initialize from disconnect correctly
madhephaestus Apr 9, 2015
e18ae21
connection fail over in the plugin connector
madhephaestus Apr 10, 2015
5419e1a
post execution text now goes to system.out rather then the text box
madhephaestus Apr 11, 2015
21e6c46
fixed the tab loadign recoursion
madhephaestus Apr 11, 2015
fec7082
fix the open tabs on disconnect issue
madhephaestus Apr 12, 2015
eefe549
slow series add as thread speeds up startup, and the removal of old one
madhephaestus Apr 12, 2015
2dbb872
delay the remove to avoid a render collision
madhephaestus Apr 12, 2015
8c8255c
fixed the classpath
madhephaestus Apr 13, 2015
9e77f3c
slow down the print statements, it looks like the javafx thread that
madhephaestus Apr 14, 2015
17a7c3d
more stable graphs
madhephaestus Apr 14, 2015
2a38c39
removing the graphing function from the UI to test its effect on
madhephaestus Apr 15, 2015
44749ac
switched to the gradle build
madhephaestus May 2, 2015
865496a
referencing the git version of the java-bowler
madhephaestus May 2, 2015
800f246
classpath issues fixed
madhephaestus May 3, 2015
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
14 changes: 10 additions & 4 deletions application/nrconsole/.classpath
Original file line number Diff line number Diff line change
Expand Up @@ -6,12 +6,10 @@
</attributes>
</classpathentry>
<classpathentry kind="src" path="jMonkeySource"/>
<classpathentry kind="src" path="github-api"/>
<classpathentry kind="lib" path="lib/miglayout-3.7.2-swing.jar"/>
<classpathentry kind="lib" path="lib/jcommon-1.0.16.jar"/>
<classpathentry kind="lib" path="lib/jfreechart-1.0.13.jar"/>
<classpathentry kind="lib" path="lib/jxl.jar"/>
<classpathentry kind="lib" path="/NRSDK/lib_addons/smack.jar"/>
<classpathentry kind="con" path="org.dyno.visual.swing.VS_LIBRARY/layoutext"/>
<classpathentry kind="lib" path="lib/eventbus.jar"/>
<classpathentry kind="lib" path="lib/gluegen-rt.jar"/>
Expand Down Expand Up @@ -45,8 +43,6 @@
<classpathentry kind="lib" path="lib/stack-alloc.jar"/>
<classpathentry kind="lib" path="lib/vecmath.jar"/>
<classpathentry kind="lib" path="lib/xmlpull-xpp3.jar"/>
<classpathentry combineaccessrules="false" kind="src" path="/NRSDK"/>
<classpathentry kind="lib" path="/NRSDK/lib_addons/smackx.jar"/>
<classpathentry kind="lib" path="lib/mp3plugin.jar"/>
<classpathentry kind="lib" path="lib/groovy-2.3.7.jar"/>
<classpathentry kind="con" path="org.eclipse.jdt.launching.JRE_CONTAINER"/>
Expand All @@ -58,5 +54,15 @@
<classpathentry kind="lib" path="lib/okhttp-urlconnection-1.6.0.jar"/>
<classpathentry kind="lib" path="lib/jackson-annotations-2.5.1.jar"/>
<classpathentry kind="lib" path="lib/jackson-core-2.5.1.jar"/>
<classpathentry kind="lib" path="lib/richtextfx-0.6.jar"/>
<classpathentry kind="lib" path="lib/reactfx-2.0-M2u1.jar"/>
<classpathentry kind="lib" path="lib/controlsfx-8.0.6.jar"/>
<classpathentry kind="lib" path="lib/easybind-1.0.3.jar"/>
<classpathentry kind="lib" path="lib/flowless-0.4.jar"/>
<classpathentry kind="lib" path="lib/undofx-1.1.jar"/>
<classpathentry kind="lib" path="lib/wellbehavedfx-0.1.jar"/>
<classpathentry kind="lib" path="/java-bowler-git/libs/smack.jar"/>
<classpathentry kind="lib" path="/java-bowler-git/libs/smackx.jar"/>
<classpathentry combineaccessrules="false" kind="src" path="/java-bowler-git"/>
<classpathentry kind="output" path="bin"/>
</classpath>
7 changes: 7 additions & 0 deletions application/nrconsole/DigitalInputExampleSimple.java
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
//Create a digital input object
DigitalInputChannel dig = new DigitalInputChannel(dyio.getChannel(0));
//Loop forever printing out the state of the button
while(true){
System.out.println(dig.isHigh());
Thread.sleep(1000);
}
4 changes: 1 addition & 3 deletions application/nrconsole/lib/.gitignore
Original file line number Diff line number Diff line change
@@ -1,3 +1 @@
/nrsdk-3.9.1-jar-with-dependencies.jar
/nrsdk-3.10.0-jar-with-dependencies.jar
/nrsdk-3.11.0-jar-with-dependencies.jar
/nrsdk-*-jar-with-dependencies.jar
Binary file added application/nrconsole/lib/controlsfx-8.0.6.jar
Binary file not shown.
Binary file added application/nrconsole/lib/easybind-1.0.3.jar
Binary file not shown.
Binary file added application/nrconsole/lib/flowless-0.4.jar
Binary file not shown.
Binary file added application/nrconsole/lib/reactfx-2.0-M2u1.jar
Binary file not shown.
Binary file added application/nrconsole/lib/richtextfx-0.6.jar
Binary file not shown.
Binary file added application/nrconsole/lib/undofx-1.1.jar
Binary file not shown.
Binary file added application/nrconsole/lib/wellbehavedfx-0.1.jar
Binary file not shown.
Original file line number Diff line number Diff line change
@@ -1,11 +1,14 @@
package com.neuronrobotics.graphing;

import javafx.application.Platform;

import org.jfree.data.xy.XYSeries;

public class DataChannel {
private String title;
private XYSeries series;
private static long startTime = System.currentTimeMillis();
private long lastTime = System.currentTimeMillis();

public DataChannel(String title) {
this.title = title;
Expand All @@ -17,9 +20,23 @@ public String toString() {
}

public void graphValue(double value) {
long time = System.currentTimeMillis() - startTime ;
if(series != null)
series.add((double) time/1000, value);
if((lastTime+100)>System.currentTimeMillis())
return;
lastTime= System.currentTimeMillis();
// try{
// Platform.runLater(()-> {
// long time = System.currentTimeMillis() - startTime ;
// if(series != null)
// series.add((double) time/1000, value);
// while(series.getItemCount()>3000){
// Platform.runLater(()-> {
// series.remove(0);
// });
// }
// });
// }catch(IllegalStateException ex){
// //application not yet loaded
// }
}

public XYSeries getSeries() {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@
public class DyIOGraphPlugin extends AbstractNRConsoleTabedPanelPlugin {

public static final String[] myNames ={"neuronrobotics.dyio.*"};
private static final GraphingWindow gui = new GraphingWindow();
private final GraphingWindow gui = new GraphingWindow();
public DyIOGraphPlugin(PluginManager pm) {
this(myNames,pm);
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -161,7 +161,7 @@ private void setDefaultWindow() {
axis.setAutoRange(true);
axis.setFixedAutoRange(scale.getValue());
length.setText("" + scale.getValue());
invalidate();
//invalidate();
repaint();
}
private void setMovedWindow(double percent) {
Expand All @@ -177,8 +177,8 @@ private void setMovedWindow(double percent) {
double sUpper =loc+(scale.getValue()/2);
axis.setRange(sLower, sUpper);
length.setText("" + scale.getValue());
invalidate();
repaint();
//invalidate();
//repaint();
}

public void addDataset(DataChannel data) {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -209,6 +209,7 @@ void connect(){
}//clear any partial connection

connectionMenu.setEnabled(true);//Re-enable connection menu to allow access to menu items

manager.firePluginUpdate();
}

Expand All @@ -226,7 +227,7 @@ public void disconnect() {
ex.printStackTrace();
}
ThreadUtil.wait(75);
manager.firePluginUpdate();
//manager.firePluginUpdate();
}

/**
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -132,7 +132,7 @@ public void onPluginListUpdate(PluginManager m) {
//System.out.println("NRConsole is refreshing");
//new RuntimeException().printStackTrace();
if(nrcMenubar.isReady()){
System.out.println("Connection ready");
Log.debug("Connection ready");
SwingUtilities.invokeLater(() -> {
nrcMenubar.setMenues(manager.getMenueItems());
nrcFrame.setDeviceManager(manager);
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -81,10 +81,12 @@ public void ancestorResized(HierarchyEvent arg0) {
@Override
public void stateChanged(ChangeEvent e) {
try {
modePane.setMinimumSize(modePane.getSelectedComponent().getMinimumSize());
updateUI();
if(modePane != null){
modePane.setMinimumSize(modePane.getSelectedComponent().getMinimumSize());
updateUI();
}
} catch (Exception e2) {
e2.printStackTrace();
//e2.printStackTrace();
}


Expand All @@ -94,17 +96,17 @@ public void stateChanged(ChangeEvent e) {
logoPanel.add(new JLabel(logo),"[0,2]");
setIconImage( ConnectionImageIconFactory.getIcon("images/hat.png").getImage());
updateUI();
setSize(1050,1200);
setSize(1400, 1124);
}


public void repaint(){
logoPanel.repaint();
for(JPanel p: panels){
p.repaint();
}
super.repaint();
}
// public void repaint(){
// logoPanel.repaint();
// for(JPanel p: panels){
// p.repaint();
// }
// super.repaint();
// }
private void updateScroller(){
if(manager!=null)
scroller.setPreferredSize(getCurrentPanelMinSize());
Expand All @@ -121,11 +123,12 @@ private void updateUI(){
// }else {

//}

updateScroller();

invalidate();

// SwingUtilities.invokeLater(() -> {
// updateScroller();
// getContentPane().validate();
// getContentPane().repaint();
// });
}

public void setDeviceManager(PluginManager dm) {
Expand All @@ -136,6 +139,7 @@ public void setDeviceManager(PluginManager dm) {


manager.addIPluginUpdateListener(this);
manager.updateNamespaces();

Log.warning("Start Adding plugins ");
for(JPanel p: manager.getPanels()){
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -83,7 +83,7 @@ public void actionPerformed(ActionEvent e) {
}
});
int pr = Log.getMinimumPrintLevel();
Log.enableInfoPrint();
//Log.enableInfoPrint();
//brownOutDetect.setSelected(DyIORegestry.get().isServoPowerSafeMode());
Log.setMinimumPrintLevel(pr);
brownOutDetect.addActionListener(new ActionListener() {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -45,7 +45,7 @@ public class NRConsoleDyIOPlugin implements INRConsoleTabedPanelPlugin,IChannelP
private JMenuItem showSequencerConf = new JMenuItem("Show Sequencer Configuration");
private JMenuItem showPidConf = new JMenuItem("Show P.I.D. Configuration");
private JMenuItem showCloud = new JMenuItem("Show Cloud Computing Configuration");
private JMenuItem showGettingStarted = new JMenuItem("Getting Started");
//private JMenuItem showGettingStarted = new JMenuItem("Getting Started");
private JMenuItem graphOptionsMenuItem = new JMenuItem("Graphing Options");
private JMenuItem exportData = new JMenuItem("Export Data to File");
private boolean active=false;
Expand Down Expand Up @@ -105,7 +105,6 @@ public boolean setConnection(BowlerAbstractConnection connection){

DyIORegestry.setConnection(connection);
DyIORegestry.get().connect();

try {
DyIO.enableFWCheck();
DyIORegestry.get().checkFirmwareRev();
Expand Down Expand Up @@ -166,7 +165,7 @@ public boolean isAcvive() {

public ArrayList<JMenu> getMenueItems() {
JMenu collectionMenu = new JMenu("DyIO");
collectionMenu.add(showGettingStarted);
//collectionMenu.add(showGettingStarted);
//collectionMenu.add(showGraphMenuItem);
collectionMenu.add(exportData);
collectionMenu.add(showPidConf);
Expand Down Expand Up @@ -228,17 +227,17 @@ public void run() {
}.start();
}
});
showGettingStarted.addActionListener(new ActionListener() {

public void actionPerformed(ActionEvent e) {

INRConsoleTabedPanelPlugin p =new NRConsoleGettingStartedPlugin(manager);
p.setConnection(DyIORegestry.get().getConnection());
manager.firePluginUpdate();
showGettingStarted.setEnabled(false);

}
});
// showGettingStarted.addActionListener(new ActionListener() {
//
// public void actionPerformed(ActionEvent e) {
//
// INRConsoleTabedPanelPlugin p =new NRConsoleGettingStartedPlugin(manager);
// p.setConnection(DyIORegestry.get().getConnection());
// manager.firePluginUpdate();
// showGettingStarted.setEnabled(false);
//
// }
// });
showHexapodConf.addActionListener(new ActionListener() {

public void actionPerformed(ActionEvent e) {
Expand Down Expand Up @@ -401,6 +400,7 @@ public Dimension getMinimumWimdowDimentions() {

@Override
public void setActive(boolean b) {

if(active && DyIORegestry.get().isAvailable() && !b){
//DyIORegestry.get().killAllPidGroups();
for(int i =0;i<24;i++){
Expand Down

This file was deleted.

Loading