Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
32 commits
Select commit Hold shift + click to select a range
b153743
gb0101010101-z-axis-ui: Add 'goto zero' and 'goto safe' buttons with …
Mar 2, 2020
dfa64ec
Rewrite actions to remove huge if->elif block at top of class to grou…
gb0101010101 Mar 11, 2020
0c0f416
Remove unused functions move() and moveZ() which have been replaced w…
gb0101010101 Mar 14, 2020
f40828e
Backup Webcontrol: Change datestamp format to make more legible, remo…
gb0101010101 Mar 16, 2020
9e91be1
Restore WebControl Backup: Pass '.zip' mimetype to importFile.html te…
gb0101010101 Mar 16, 2020
62de3ca
Import GroundControl.ini: Restrict file selection to *.ini files.
gb0101010101 Mar 16, 2020
82e8d57
logger.py -> deleteLogFiles() iterateates from 0 -> 1000 for no reaso…
gb0101010101 Mar 16, 2020
fbcf5ef
Import WebControl.json: Use title case for 'WebControl'. Restrict fil…
gb0101010101 Mar 16, 2020
ac32e86
ClearLogs: Remove unneccesary - for x in range (0, 1000).
gb0101010101 Mar 17, 2020
5c76a88
Improve Alert messages when methods fail.
gb0101010101 Mar 17, 2020
3d8930d
Fix macro execution.
gb0101010101 Mar 17, 2020
17c1aa5
Improve Alert message when creating directory fails.
gb0101010101 Mar 17, 2020
6b301dd
Remove duplicate variable declarartion, fix TODO comment so it works …
gb0101010101 Mar 17, 2020
5a539c7
Todo message.
gb0101010101 Mar 17, 2020
bfc8c09
Make all todo items use default uppercase TODO so they show up in IDE…
gb0101010101 Mar 17, 2020
eb8c665
Add pauseRun() back as it was accidentally deleted.
gb0101010101 Mar 17, 2020
02d595f
Code format.
gb0101010101 Mar 17, 2020
5817493
Fix check of safe commands during gcode upload.
gb0101010101 Mar 18, 2020
0b7f5d4
Fix merge conflict with upstream/master adding method 'optimizeGcode()'.
gb0101010101 Mar 18, 2020
0abdec1
Add 'head' block, move CSS includes into head, move Javascript includ…
gb0101010101 Mar 19, 2020
8a98c72
Remove error characters from button tags.
gb0101010101 Mar 19, 2020
e1fe12c
Source format and remove extra div closing tag.
gb0101010101 Mar 19, 2020
5fce1c8
Source format and remove extra closing div tag.
gb0101010101 Mar 19, 2020
67c802f
Source format only.
gb0101010101 Mar 19, 2020
897394d
Fix Controller message scroll box height.
gb0101010101 Mar 19, 2020
1d2099c
Source format only.
gb0101010101 Mar 19, 2020
bfd5a57
Layout rework to make full use of Bootstrap flexible layout so that h…
gb0101010101 Mar 20, 2020
fd3ee5c
Remove 'Controls' heading that is just taking up valuable space. Make…
gb0101010101 Mar 20, 2020
5a1b512
Merge changes from upstream/master.
gb0101010101 Mar 22, 2020
5650767
Merge remote-tracking branch 'upstream/master' into gb0101010101-acti…
gb0101010101 Mar 22, 2020
4f248b2
Merge branch 'gb0101010101-template-fixes' into gb0101010101-experime…
gb0101010101 Mar 23, 2020
1ad18cb
Merge branch 'gb0101010101-z-axis-ui' into gb0101010101-experimental-1
gb0101010101 Mar 23, 2020
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
1,679 changes: 983 additions & 696 deletions Actions/actions.py

Large diffs are not rendered by default.

4 changes: 2 additions & 2 deletions Background/UIProcessor.py
Original file line number Diff line number Diff line change
Expand Up @@ -522,8 +522,8 @@ def processMessage(self, _message):
elif msg["message"] == "distToMoveUpdateZ":
self.distToMoveUpdateZ()
elif msg["message"] == "updateTimer":
# Todo: clean this up .. edit: sendCalibrationMessage got deleted somewhere.
#self.sendCalibrationMessage("updateTimer", json.loads(msg["data"]))
# TODO: clean this up .. edit: sendCalibrationMessage got deleted somewhere.
# self.sendCalibrationMessage("updateTimer", json.loads(msg["data"]))
pass
elif msg["message"] == "updateCamera":
self.sendCameraMessage("updateCamera", json.loads(msg["data"]))
Expand Down
25 changes: 11 additions & 14 deletions DataStructures/logger.py
Original file line number Diff line number Diff line change
Expand Up @@ -155,23 +155,20 @@ def deleteLogFiles(self):
"""
Delete log files
"""

success1 = False
for x in range(0, 1000):
try:
os.remove(self.home+"/.WebControl/"+"log.txt")
success1 = True
break
except:
success1 = False
try:
os.remove(self.home+"/.WebControl/"+"log.txt")
success1 = True
except:
success1 = False

success2 = False
for x in range(0, 1000):
try:
os.remove(self.home+"/.WebControl/"+"alog.txt")
success2 = True
break
except:
success2 = False
try:
os.remove(self.home+"/.WebControl/"+"alog.txt")
success2 = True
except:
success2 = False

if success1 and success2:
return True
Expand Down
9 changes: 5 additions & 4 deletions WebPageProcessor/webPageProcessor.py
Original file line number Diff line number Diff line change
Expand Up @@ -13,6 +13,7 @@
import socket
from github import Github
import markdown
import mimetypes


class WebPageProcessor:
Expand Down Expand Up @@ -226,15 +227,15 @@ def createWebPage(self, pageID, isMobile, args):
return page, "Upload GCode", False, "medium", "content", "footerSubmit"
elif pageID == "importGCini":
url = "importFile"
page = render_template("importFile.html", url=url)
page = render_template("importFile.html", url=url, mimetypes=".ini")
return page, "Import groundcontrol.ini", False, "medium", "content", False
elif pageID == "importWCJSON":
url = "importFileWCJSON"
page = render_template("importFile.html", url=url)
return page, "Import webcontrol.json", False, "medium", "content", False
page = render_template("importFile.html", url=url, mimetypes=".json")
return page, "Import WebControl.json", False, "medium", "content", False
elif pageID == "restoreWebControl":
url = "importRestoreWebControl"
page = render_template("importFile.html", url=url)
page = render_template("importFile.html", url=url, mimetypes=".zip")
return page, "Restore WebControl", False, "medium", "content", False
elif pageID == "actions":
if self.data.controllerFirmwareVersion < 100:
Expand Down
4 changes: 1 addition & 3 deletions main.py
Original file line number Diff line number Diff line change
Expand Up @@ -533,14 +533,12 @@ def backupWebControl():
if request.method == "GET":
returnVal = app.data.actions.backupWebControl()
if returnVal != False:
print(returnVal)
return send_file(returnVal)
return send_file(returnVal, as_attachment=True)
else:
resp = jsonify("failed")
resp.status_code = 500
return resp


@app.route("/editBoard", methods=["POST"])
def editBoard():
app.data.logger.resetIdler()
Expand Down
29 changes: 11 additions & 18 deletions static/scripts/baseSocket.js
Original file line number Diff line number Diff line change
Expand Up @@ -252,26 +252,19 @@ function setListeners(){

}

function action(command, arg, arg1){
if (arg==null)
arg = "";
if (arg1==null)
arg1 = "";
console.log("action="+command);
socket.emit('action',{data:{command:command,arg:arg, arg1:arg1}});
function action() {
var msg = {"command": arguments[0]};
if (arguments.length > 1 ) {
var args = new Array()
for (var i=1; i < arguments.length; i++) {
args[i-1] = arguments[i];
}
msg["args"] = args;
}
console.log("action=" + arguments[0]);
socket.emit('action', msg);
}

function move(direction){
distToMove = $("#distToMove").val();
console.log(distToMove)
socket.emit('move',{data:{direction:direction,distToMove:distToMove}});
}

function moveZ(direction){
distToMoveZ = $("#distToMoveZ").val();
console.log(distToMoveZ)
socket.emit('moveZ',{data:{direction:direction,distToMoveZ:distToMoveZ}});
}

function settingRequest(section,setting){
console.log("requesting..")
Expand Down
21 changes: 10 additions & 11 deletions static/scripts/frontpage3d.js
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@ var homeY = 0;

var renderer = new THREE.WebGLRenderer();
var w = $("#workarea").width();//-20;
var h = $("#workarea").height();//-20;
var h = $("#workarea").height()- 10;//-20;
renderer.setSize( w, h );
//console.log("w="+w+", h="+h);

Expand Down Expand Up @@ -245,26 +245,25 @@ animate();
window.addEventListener( 'resize', onWindowResize, false );

function onWindowResize(){

//w=window.innerWidth;
//h=window.innerHeight;
//console.log("wr="+w+", hr="+h);
we = $("#workarea").width(); //-20;
he = $("#workarea").height(); //-20;
// Make canvas tiny so the container can shrink.
renderer.setSize( 10, 10 );
// Get new size of fluid container.
we = $("#workarea").width();
// Can't find the source of this 10px offset.
// Needed to stop unneccesary scrool bar on main window.
he = $("#workarea").height() - 10;
//console.log("we="+we+", he="+he);

//cameraO.aspect = window.innerWidth / window.innerHeight;
cameraO.left = we/-2*scale;
cameraO.right = we/2*scale;
cameraO.top = he/2*scale;
cameraO.bottom = he/-2*scale;
cameraO.updateProjectionMatrix();
//cameraP.aspect = window.innerWidth / window.innerHeight;

cameraP.aspect = we / he;
cameraP.updateProjectionMatrix();

// Finally resize the canvas.
renderer.setSize( we, he );

}


Expand Down
125 changes: 62 additions & 63 deletions static/styles/base.css
Original file line number Diff line number Diff line change
@@ -1,101 +1,100 @@
.modalxlg > .modal-dialog {
max-width: 90% !important;
width: 90% !important;
}
.modalxlg>.modal-dialog {
max-width: 90% !important;
width: 90% !important;
}

.disabler {
}

.alert {
margin-bottom: 1px;
height: 30px;
line-height:30px;
padding:0px 15px;
line-height: 30px;
padding: 0px 15px;
}


#contentModalText {
max-height: 70vh;
overflow-y: auto;
max-height: 70vh;
overflow-y: auto;
}

#fpCircle {
position: absolute;
top: 50%;
left: 50%;
transform: translate(-50%,-50%);
width: 150px;
height: 150px;
position: absolute;
top: 50%;
left: 50%;
transform: translate(-50%, -50%);
width: 150px;
height: 150px;
}

#gcCircle {
position: absolute;
top: 50%;
left: 50%;
transform: translate(-50%,-50%);
width: 150px;
height: 150px;
position: absolute;
top: 50%;
left: 50%;
transform: translate(-50%, -50%);
width: 150px;
height: 150px;
}

#notificationCircle {
position: absolute;
top: 70%;
left: 50%;
transform: translate(-50%,-30%);
width: 80px;
height: 80px;
position: absolute;
top: 70%;
left: 50%;
transform: translate(-50%, -30%);
width: 80px;
height: 80px;
}

#notificationModal {
z-index: 1051;
z-index: 1051;
}


.loader {
width: calc(100% - 0px);
height: calc(100% - 0px);
border: 8px solid #162534;
border-top: 8px solid #09f;
border-radius: 50%;
animation: rotate 5s linear infinite;
width: calc(100% - 0px);
height: calc(100% - 0px);
border: 8px solid #162534;
border-top: 8px solid #09f;
border-radius: 50%;
animation: rotate 5s linear infinite;
}

@keyframes rotate {
100% {transform: rotate(360deg);}
}

#editor {
margin: 0;
position: relative;
top: 0;
bottom: 0;
left: 0;
right: 0;
height: 60vh;
}
#editor {
margin: 0;
position: relative;
top: 0;
bottom: 0;
left: 0;
right: 0;
height: 60vh;
}

.alert-circle.alert-sm {
width: 16px;
height: 16px;
padding: 6px 0px;
border-radius: 8px;
font-size: 8px;
text-align: center;
width: 16px;
height: 16px;
padding: 6px 0px;
border-radius: 8px;
font-size: 8px;
text-align: center;
}

.dot {
height: 15px;
width: 15px;
background-color: red;
border-radius: 50%;
display: inline-block;
}
height: 15px;
width: 15px;
background-color: red;
border-radius: 50%;
display: inline-block;
}

input::-webkit-outer-spin-button,
input::-webkit-inner-spin-button {
/* display: none; <- Crashes Chrome on hover */
-webkit-appearance: none;
margin: 0; /* <-- Apparently some margin are still there even though it's hidden */
input::-webkit-outer-spin-button, input::-webkit-inner-spin-button {
/* display: none; <- Crashes Chrome on hover */
-webkit-appearance: none;
margin: 0; /* <-- Apparently some margin are still there even though it's hidden */
}

input[type=number] {
-moz-appearance:textfield; /* Firefox */
}
-moz-appearance: textfield; /* Firefox */
}
Loading