Skip to content

Commit

Permalink
Updated Readme images and remember last used directory
Browse files Browse the repository at this point in the history
  • Loading branch information
chillibasket committed Feb 3, 2024
1 parent 4bb242c commit 5422bc9
Show file tree
Hide file tree
Showing 5 changed files with 17 additions and 8 deletions.
Binary file modified Images/FileGraph_tab.jpg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file modified Images/LiveGraph_tab.jpg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file modified Images/SerialMonitor_tab.jpg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
16 changes: 12 additions & 4 deletions ProcessingGrapher/ProcessingGrapher.pde
Original file line number Diff line number Diff line change
Expand Up @@ -210,6 +210,7 @@ DisposeHandler dh;
// JavaFX pop-up dialogues
Stage stage;
FileChooser fileChooser;
File currentDirectory = null;
String userInputString = null;
int startTime;
PGraphics mainCanvas;
Expand Down Expand Up @@ -534,12 +535,14 @@ void drawProgram() {
textAlign(CENTER, CENTER);
String frameRateText = "FPS: " + round(frameRate);
fill(c_tabbar);
rect(width - ((20 + sidebarWidth) * uimult) - textWidth(frameRateText), height - (bottombarHeight * uimult), width - (sidebarWidth * uimult), height);
final int cL = width - round((sidebarWidth + 4 + 175) * uimult + textWidth(frameRateText));
final int cR = width - round((sidebarWidth + 2 + 175) * uimult);
rect(cL, height - (bottombarHeight * uimult), cR, height);
fill(c_idletab_text);
text(frameRateText, width - ((20 + sidebarWidth) * uimult) - textWidth(frameRateText), height - (bottombarHeight * uimult), width - (sidebarWidth * uimult), height - 3);
text(frameRateText, cL, height - (bottombarHeight * uimult), cR, height - round(4*uimult));
if (alertActive && !redrawAlert) {
fill(c_white, 80);
rect(width - ((20 + sidebarWidth) * uimult) - textWidth(frameRateText), height - (bottombarHeight * uimult), width - (sidebarWidth * uimult), height);
rect(cL, height - (bottombarHeight * uimult), cR, height);
}
}

Expand Down Expand Up @@ -2043,6 +2046,9 @@ void selectOutput(final String message, final String callbackMethod) {
if (activeRenderer == FX2D) {
fileChooser.setTitle(message);

if (currentDirectory != null)
fileChooser.setInitialDirectory(currentDirectory);

fileChooser.getExtensionFilters().clear();
if (message.contains("CSV")) {
fileChooser.getExtensionFilters().add(new FileChooser.ExtensionFilter("Comma Separated", "*.csv"));
Expand Down Expand Up @@ -2093,7 +2099,7 @@ void selectInput(final String message, final String callbackMethod) {
}
});
} else {
selectInput(message, callbackMethod, null);
selectInput(message, callbackMethod, currentDirectory);
}
}

Expand All @@ -2111,6 +2117,8 @@ void mySelectCallback(File selectedFile, String callbackMethod) {
Class<?> callbackClass = this.getClass();
Method selectMethod = callbackClass.getMethod(callbackMethod, new Class[] { File.class });
selectMethod.invoke(this, new Object[] { selectedFile });
if (selectedFile != null)
currentDirectory = selectedFile.getParentFile();

} catch (IllegalAccessException iae) {
System.err.println(callbackMethod + "() must be public");
Expand Down
9 changes: 5 additions & 4 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,7 @@
This project is a Processing-based serial terminal and graphing program for the analysis and recording of data from serial devices, such as Arduinos. This program is designed as a replacement for the serial monitor contained within the Arduino IDE. The program contains easy-to-use tools to record data received from serial devices, and to plot numerical data on up to 4 separate graphs in real-time. This makes it useful for quickly analysing sensor data from a micro-controller.

Please let me know if you come across any issues or bugs which need to be fixed!

A full description and set of instructions can be found on my website: [https://wired.chillibasket.com/processing-grapher/](https://wired.chillibasket.com/processing-grapher/)
</br>
</br>
Expand All @@ -16,8 +17,7 @@ A full description and set of instructions can be found on my website: [https://
</br>
</br>

## Features
1. Easy UI scale and colour theme changing
## Features
1. Serial terminal monitor
1. Connect to any serial port at any baud rate
1. Send and receive serial communication
Expand All @@ -37,6 +37,7 @@ A full description and set of instructions can be found on my website: [https://
1. Add vertical markers/labels to the data
1. Apply various filters to remove noise and transform the data
1. Save the edited data to a comma delimited file
1. Easy UI scaling and colour theme switching
</br>
</br>

Expand All @@ -53,7 +54,7 @@ A full description and set of instructions can be found on my website: [https://

### Using the Program on Linux
To use the program on Linux, there are two additional steps that need to be taken:
1. Change the renderer on line 217 to `final String activeRenderer = JAVA2D`. Unfortunately the renderer used on the other platforms (JavaFX) currently has some compatibility issues on Linux.
1. Change the renderer on line 218 to `final String activeRenderer = JAVA2D`. Unfortunately the renderer used on the other platforms (JavaFX) currently has some compatibility issues on Linux.
2. If the error message `Permission Denied` appears when trying to connect to a serial port, this means that your current user account doesn't have the permissions set up to access the serial ports. To solve you can either run the program using `sudo`, or you can set up your user so that it has access to the ports using these two commands (replace `<user>` with the account username):
- `sudo usermod -a -G dialout <user>`
- `sudo usermod -a -G tty <user>`
Expand Down Expand Up @@ -116,7 +117,7 @@ A full set of instructions and documentation can be found on my website at: [htt
1. ([#36](https://github.com/chillibasket/processing-grapher/issues/36)) Added new buttons to the bottom info bar to quickly connect/disconnect and change the settings of the serial port.
2. ([#38](https://github.com/chillibasket/processing-grapher/issues/38)) Fixed issue with saving CSV files when the file row count was exceeded.
3. ([#29](https://github.com/chillibasket/processing-grapher/issues/29)) Fixed graph bug which was introduced when implementing custom x-axis display.
4. Implemented additional keyboard shortcuts: CTRL-TAB to change tab, CTRL-S to save file or set output file, CTRL-Q to connect/disconnect serial port, CTRL-R to start/stop data recording, CTRL-O to open a file, CTRL-M to send a serial message from any tab.
4. Implemented additional keyboard shortcuts: `CTRL-TAB` to change tab, `CTRL-S` to save file or set output file, `CTRL-Q` to connect/disconnect serial port, `CTRL-R` to start/stop data recording, `CTRL-O` to open a file, `CTRL-M` to send a serial message from any tab.
5. Fixed some minor bugs and implemented minor improvements to the user experience (UX).
1. (2nd September 2022) Version 1.5.0
1. ([#29](https://github.com/chillibasket/processing-grapher/issues/29)) Implemented option to use one of the data signals as the x-axis on the "Live Graph" tab.
Expand Down

0 comments on commit 5422bc9

Please sign in to comment.