diff --git a/OpenBCI_GUI/OpenBCI_GUI.pde b/OpenBCI_GUI/OpenBCI_GUI.pde index 934b8a34b..0d2281425 100644 --- a/OpenBCI_GUI/OpenBCI_GUI.pde +++ b/OpenBCI_GUI/OpenBCI_GUI.pde @@ -62,7 +62,7 @@ import java.util.concurrent.atomic.AtomicBoolean; // Global Variables & Instances //------------------------------------------------------------------------ //Used to check GUI version in TopNav.pde and displayed on the splash screen on startup -String localGUIVersionString = "v6.0.0-beta.0"; +String localGUIVersionString = "v6.0.0-beta.1"; String localGUIVersionDate = "September 2023"; String guiLatestVersionGithubAPI = "https://api.github.com/repos/OpenBCI/OpenBCI_GUI/releases/latest"; String guiLatestReleaseLocation = "https://github.com/OpenBCI/OpenBCI_GUI/releases/latest"; diff --git a/OpenBCI_GUI/W_Marker.pde b/OpenBCI_GUI/W_Marker.pde index 7930ded5f..599449c74 100644 --- a/OpenBCI_GUI/W_Marker.pde +++ b/OpenBCI_GUI/W_Marker.pde @@ -27,8 +27,8 @@ class W_Marker extends Widget { private Textfield markerReceivePortTextfield; private String markerReceiveIP = "127.0.0.1"; private int markerReceivePort = 12350; - private final int MARKER_RECEIVE_TEXTFIELD_WIDTH = 100; - private final int MARKER_RECEIVE_TEXTFIELD_HEIGHT = 20; + private final int MARKER_RECEIVE_TEXTFIELD_WIDTH = 108; + private final int MARKER_RECEIVE_TEXTFIELD_HEIGHT = 22; private hypermedia.net.UDP udpReceiver; @@ -144,11 +144,9 @@ class W_Marker extends Widget { RectDimensions ipTextfieldPosition = markerUIGrid.getCellDims(3, 1); markerReceiveIPTextfield.setPosition(ipTextfieldPosition.x, ipTextfieldPosition.y + HALF_CELL_PADDING); - markerReceiveIPTextfield.setSize(ipTextfieldPosition.w, ipTextfieldPosition.h - CELL_PADDING); RectDimensions portTextfieldPosition = markerUIGrid.getCellDims(3, 3); markerReceivePortTextfield.setPosition(portTextfieldPosition.x, portTextfieldPosition.y + HALF_CELL_PADDING); - markerReceivePortTextfield.setSize(portTextfieldPosition.w, portTextfieldPosition.h - CELL_PADDING); } private void createMarkerButtons() { diff --git a/tools/graph_gui_downloads.py b/tools/graph_gui_downloads.py new file mode 100644 index 000000000..c269236c1 --- /dev/null +++ b/tools/graph_gui_downloads.py @@ -0,0 +1,59 @@ +import requests +import matplotlib.pyplot as plt +from datetime import datetime + +# Define the GitHub API URL for the OpenBCI releases +api_url = "https://api.github.com/repos/OpenBCI/OpenBCI_GUI/releases" + +# Send a GET request to the API +response = requests.get(api_url) + +# Check if the request was successful +if response.status_code != 200: + print(f"Failed to fetch data. Status code: {response.status_code}") + exit() + +# Parse the JSON data +data = response.json() + +# Initialize dictionaries to store download counts for each platform +download_count_mac = {} +download_count_linux = {} +download_count_windows = {} + +# Extract download counts over time for each platform +for release in data: + assets = release.get("assets", []) + release_date = datetime.strptime(release["published_at"], "%Y-%m-%dT%H:%M:%SZ").date() + + for asset in assets: + if "mac" in asset["name"].lower(): + download_count_mac[release_date] = download_count_mac.get(release_date, 0) + asset["download_count"] + elif "linux" in asset["name"].lower(): + download_count_linux[release_date] = download_count_linux.get(release_date, 0) + asset["download_count"] + elif "win" in asset["name"].lower(): + download_count_windows[release_date] = download_count_windows.get(release_date, 0) + asset["download_count"] + +# Extract dates and download counts for each platform +dates_mac, counts_mac = zip(*sorted(download_count_mac.items())) +dates_linux, counts_linux = zip(*sorted(download_count_linux.items())) +dates_windows, counts_windows = zip(*sorted(download_count_windows.items())) + +# Create the download count graphs +plt.figure(figsize=(12, 6)) +plt.plot(dates_mac, counts_mac, label="Mac", marker='o') +plt.plot(dates_linux, counts_linux, label="Linux", marker='o') +plt.plot(dates_windows, counts_windows, label="Windows", marker='o') + +plt.title("Download Count Over Time for OpenBCI GUI") +plt.xlabel("Release Date") +plt.ylabel("Download Count") +plt.grid(True) +plt.legend() + +# Rotate x-axis labels for better readability +plt.xticks(rotation=45) + +# Show the graph +plt.tight_layout() +plt.show()