Skip to content

Commit 70a76b7

Browse files
UPdate
1 parent c72faed commit 70a76b7

25 files changed

+361
-163
lines changed

cam.png

-140 KB
Binary file not shown.

cam2.png

-154 KB
Binary file not shown.

cam3.png

-133 KB
Binary file not shown.

driver.png

-44.2 KB
Binary file not shown.

driver2.png

-37.9 KB
Binary file not shown.

driver3.png

-28.7 KB
Binary file not shown.

driver4.png

-45.5 KB
Binary file not shown.

gifs/simulator.gif

-12.8 MB
Binary file not shown.

gifs/steps-per-mm-calib.gif

-4.49 MB
Binary file not shown.

gifs/z0probe.gif

-20.1 MB
Binary file not shown.

icon-transparent.png

137 KB
Loading

img/cam/cam1.png

157 KB
Loading

img/cam/cam2.png

149 KB
Loading

img/cam/cam3.png

11.2 KB
Loading

img/cam/cam4.png

41.9 KB
Loading

img/cam/cam5.png

41.5 KB
Loading

img/control/control1.png

87.7 KB
Loading

img/control/control2.png

79.2 KB
Loading

img/control/control3.png

21.8 KB
Loading

img/control/control4.png

45.1 KB
Loading

img/control/control5.png

76 KB
Loading

img/control/control6.PNG

41.5 KB
Loading

index.html

+290-155
Large diffs are not rendered by default.

index.js

+70-7
Original file line numberDiff line numberDiff line change
@@ -83,15 +83,16 @@ function checkIfDriverIsInstalled() {
8383

8484
$(document).ready(function() {
8585

86-
// // Check if Driver is running
87-
// var DriverCheckinterval = setInterval(function() {
88-
// checkIfDriverIsInstalled();
89-
// }, 1000);
86+
87+
var downloadCountInterval = setInterval(function() {
88+
getTotalDownload();
89+
}, 60000);
9090

9191
noDriver();
92-
getAvailableDriverVersion()
93-
getCAMChangelog()
94-
getCONTROLChangelog()
92+
getAvailableDriverVersion();
93+
getCAMChangelog();
94+
getCONTROLChangelog();
95+
getTotalDownload();
9596
});
9697

9798
function hasDriver(version) {
@@ -166,6 +167,8 @@ function downloadDrivers(os) {
166167
window.location = url
167168
// }
168169
}
170+
171+
169172
}
170173
var oneHour = 60 * 60 * 1000;
171174
var oneDay = 24 * oneHour;
@@ -292,4 +295,64 @@ function versionCompare(v1, v2, options) {
292295
}
293296

294297
return 0;
298+
}
299+
300+
function showStats(data) {
301+
var err = false;
302+
var errMessage = '';
303+
304+
if (data.status == 404) {
305+
err = true;
306+
errMessage = "The project does not exist!";
307+
}
308+
309+
if (data.status == 403) {
310+
err = true;
311+
errMessage = "You've exceeded GitHub's rate limiting.<br />Please try again in about an hour.";
312+
}
313+
314+
if (data.length == 0) {
315+
err = true;
316+
errMessage = "There are no releases for this project";
317+
}
318+
319+
var html = "";
320+
321+
if (err) {
322+
console.log(errMessage)
323+
} else {
324+
var isLatestRelease = true;
325+
var totalDownloadCount = 0;
326+
$.each(data, function(index, item) {
327+
var releaseTag = item.tag_name;
328+
var releaseBadge = "";
329+
var releaseClassNames = "release";
330+
var releaseURL = item.html_url;
331+
var isPreRelease = item.prerelease;
332+
var releaseAssets = item.assets;
333+
var releaseDownloadCount = 0;
334+
var releaseAuthor = item.author;
335+
var publishDate = item.published_at.split("T")[0];
336+
337+
if (releaseAssets.length) {
338+
$.each(releaseAssets, function(index, asset) {
339+
var assetSize = (asset.size / 1048576.0).toFixed(2);
340+
var lastUpdate = asset.updated_at.split("T")[0];
341+
totalDownloadCount += asset.download_count;
342+
releaseDownloadCount += asset.download_count;
343+
});
344+
}
345+
});
346+
347+
if (totalDownloadCount) {
348+
console.log(totalDownloadCount)
349+
$('#totalDownloadCount').html("<span class='tally bg-gray fg-white'>Did you know? OpenBuilds CONTROL has been downloaded " + totalDownloadCount + " times!</span>")
350+
}
351+
352+
}
353+
}
354+
355+
function getTotalDownload() {
356+
var url = "https://api.github.com/repos/OpenBuilds/OpenBuilds-CONTROL/releases?client_id=fbbb80debc1197222169&client_secret=7dc6e463422e933448f9a3a4150c8d2bbdd0f87c";
357+
$.getJSON(url, showStats).fail(showStats);
295358
}

reviews.txt

+1-1
Original file line numberDiff line numberDiff line change
@@ -14,4 +14,4 @@
1414

1515
"[The Fine Tuning Wizard ] ... That makes things super easy." - Dmhaes https://openbuilds.com/threads/openbuilds-lead-cnc.13307/page-11#post-77372
1616

17-
"The software to run this thing is EXCELLENT. I work at a large company that produces software and this was very, very professionally done. The drivers for the USB connnection, the Control software for the machine, and the web-based CAM software all worked together first shot. Very, very well done. I'm already seeing where I want to venture off into Fusion 360 soon for my CAM work, but this is a great jumping off point." - RoosterTX https://openbuilds.com/builds/lead-cnc-build-mansfield-texas-build-completed-with-review-of-the-kit.8385/
17+
"The software to run this thing is EXCELLENT. I work at a large company that produces software and this was very, very professionally done. The drivers for the USB connnection, the Control software for the machine, and the web-based CAM software all worked together first shot. Very, very well done. I'm already seeing where I want to venture off into Fusion 360 soon for my CAM work, but this is a great jumping off point." - RoosterTX https://openbuilds.com/builds/lead-cnc-build-mansfield-texas-build-completed-with-review-of-the-kit.8385/

0 commit comments

Comments
 (0)