Skip to content

Commit d8543aa

Browse files
authored
Merge pull request #1197 from OpenBCI/development
GUI v6.0.0-beta.1
2 parents 0a99b44 + 343c302 commit d8543aa

File tree

3 files changed

+62
-5
lines changed

3 files changed

+62
-5
lines changed

OpenBCI_GUI/OpenBCI_GUI.pde

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -62,7 +62,7 @@ import java.util.concurrent.atomic.AtomicBoolean;
6262
// Global Variables & Instances
6363
//------------------------------------------------------------------------
6464
//Used to check GUI version in TopNav.pde and displayed on the splash screen on startup
65-
String localGUIVersionString = "v6.0.0-beta.0";
65+
String localGUIVersionString = "v6.0.0-beta.1";
6666
String localGUIVersionDate = "September 2023";
6767
String guiLatestVersionGithubAPI = "https://api.github.com/repos/OpenBCI/OpenBCI_GUI/releases/latest";
6868
String guiLatestReleaseLocation = "https://github.com/OpenBCI/OpenBCI_GUI/releases/latest";

OpenBCI_GUI/W_Marker.pde

Lines changed: 2 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -27,8 +27,8 @@ class W_Marker extends Widget {
2727
private Textfield markerReceivePortTextfield;
2828
private String markerReceiveIP = "127.0.0.1";
2929
private int markerReceivePort = 12350;
30-
private final int MARKER_RECEIVE_TEXTFIELD_WIDTH = 100;
31-
private final int MARKER_RECEIVE_TEXTFIELD_HEIGHT = 20;
30+
private final int MARKER_RECEIVE_TEXTFIELD_WIDTH = 108;
31+
private final int MARKER_RECEIVE_TEXTFIELD_HEIGHT = 22;
3232

3333
private hypermedia.net.UDP udpReceiver;
3434

@@ -144,11 +144,9 @@ class W_Marker extends Widget {
144144

145145
RectDimensions ipTextfieldPosition = markerUIGrid.getCellDims(3, 1);
146146
markerReceiveIPTextfield.setPosition(ipTextfieldPosition.x, ipTextfieldPosition.y + HALF_CELL_PADDING);
147-
markerReceiveIPTextfield.setSize(ipTextfieldPosition.w, ipTextfieldPosition.h - CELL_PADDING);
148147

149148
RectDimensions portTextfieldPosition = markerUIGrid.getCellDims(3, 3);
150149
markerReceivePortTextfield.setPosition(portTextfieldPosition.x, portTextfieldPosition.y + HALF_CELL_PADDING);
151-
markerReceivePortTextfield.setSize(portTextfieldPosition.w, portTextfieldPosition.h - CELL_PADDING);
152150
}
153151

154152
private void createMarkerButtons() {

tools/graph_gui_downloads.py

Lines changed: 59 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,59 @@
1+
import requests
2+
import matplotlib.pyplot as plt
3+
from datetime import datetime
4+
5+
# Define the GitHub API URL for the OpenBCI releases
6+
api_url = "https://api.github.com/repos/OpenBCI/OpenBCI_GUI/releases"
7+
8+
# Send a GET request to the API
9+
response = requests.get(api_url)
10+
11+
# Check if the request was successful
12+
if response.status_code != 200:
13+
print(f"Failed to fetch data. Status code: {response.status_code}")
14+
exit()
15+
16+
# Parse the JSON data
17+
data = response.json()
18+
19+
# Initialize dictionaries to store download counts for each platform
20+
download_count_mac = {}
21+
download_count_linux = {}
22+
download_count_windows = {}
23+
24+
# Extract download counts over time for each platform
25+
for release in data:
26+
assets = release.get("assets", [])
27+
release_date = datetime.strptime(release["published_at"], "%Y-%m-%dT%H:%M:%SZ").date()
28+
29+
for asset in assets:
30+
if "mac" in asset["name"].lower():
31+
download_count_mac[release_date] = download_count_mac.get(release_date, 0) + asset["download_count"]
32+
elif "linux" in asset["name"].lower():
33+
download_count_linux[release_date] = download_count_linux.get(release_date, 0) + asset["download_count"]
34+
elif "win" in asset["name"].lower():
35+
download_count_windows[release_date] = download_count_windows.get(release_date, 0) + asset["download_count"]
36+
37+
# Extract dates and download counts for each platform
38+
dates_mac, counts_mac = zip(*sorted(download_count_mac.items()))
39+
dates_linux, counts_linux = zip(*sorted(download_count_linux.items()))
40+
dates_windows, counts_windows = zip(*sorted(download_count_windows.items()))
41+
42+
# Create the download count graphs
43+
plt.figure(figsize=(12, 6))
44+
plt.plot(dates_mac, counts_mac, label="Mac", marker='o')
45+
plt.plot(dates_linux, counts_linux, label="Linux", marker='o')
46+
plt.plot(dates_windows, counts_windows, label="Windows", marker='o')
47+
48+
plt.title("Download Count Over Time for OpenBCI GUI")
49+
plt.xlabel("Release Date")
50+
plt.ylabel("Download Count")
51+
plt.grid(True)
52+
plt.legend()
53+
54+
# Rotate x-axis labels for better readability
55+
plt.xticks(rotation=45)
56+
57+
# Show the graph
58+
plt.tight_layout()
59+
plt.show()

0 commit comments

Comments
 (0)