Add files via upload
This commit is contained in:
parent
a8ca22f392
commit
54e28093b9
|
@ -4,5 +4,5 @@ $orientation = $_REQUEST["orientation"];
|
|||
$toggler = $_REQUEST["toggler"];
|
||||
|
||||
|
||||
$output = shell_exec('/usr/bin/python3 focus.py '.$nb_step.' '.$orientation.' '.$toggler);
|
||||
$output = shell_exec('/usr/bin/python3 /var/www/html/pipeline/focus.py '.$nb_step.' '.$orientation.' '.$toggler);
|
||||
?>
|
||||
|
|
1
pipeline/newfile.txt
Normal file
1
pipeline/newfile.txt
Normal file
|
@ -0,0 +1 @@
|
|||
ceciestuntexte
|
|
@ -9,23 +9,37 @@ $(document).ready(function(){
|
|||
pump()
|
||||
|
||||
});
|
||||
$( "#write" ).click(function() {
|
||||
write()
|
||||
|
||||
});
|
||||
|
||||
|
||||
|
||||
|
||||
function focus(toggler) {
|
||||
var value = $("#nb_step").val();
|
||||
var orientation = $("#orientation").val();
|
||||
var xmlhttp = new XMLHttpRequest();
|
||||
xmlhttp.open("GET", "focus.php?nb_step="+value+"&orientation="+orientation+"&toggler="+toggler, true);
|
||||
xmlhttp.send();
|
||||
function focus(toggler) {
|
||||
var value = $("#nb_step").val();
|
||||
var orientation = $("#orientation").val();
|
||||
var xmlhttp = new XMLHttpRequest();
|
||||
xmlhttp.open("GET", "pipeline/focus.php?nb_step="+value+"&orientation="+orientation+"&toggler="+toggler, true);
|
||||
xmlhttp.send();
|
||||
}
|
||||
|
||||
function pump() {
|
||||
var volume = $("#volume").val();
|
||||
var flowrate = $("#flowrate").val();
|
||||
var direction = $("#direction").val();
|
||||
var xmlhttp = new XMLHttpRequest();
|
||||
xmlhttp.open("GET", "pump.php?volume="+volume+"&flowrate="+flowrate+"&direction="+direction, true);
|
||||
xmlhttp.send();
|
||||
function pump() {
|
||||
var volume = $("#volume").val();
|
||||
var flowrate = $("#flowrate").val();
|
||||
var direction = $("#direction").val();
|
||||
var xmlhttp = new XMLHttpRequest();
|
||||
xmlhttp.open("GET", "pipeline/pump.php?volume="+volume+"&flowrate="+flowrate+"&direction="+direction, true);
|
||||
xmlhttp.send();
|
||||
}
|
||||
|
||||
function write(){
|
||||
|
||||
var xmlhttp = new XMLHttpRequest();
|
||||
xmlhttp.open("GET", "pipeline/write.php?txt=ceciestuntexte", true);
|
||||
xmlhttp.send();
|
||||
|
||||
}
|
||||
|
||||
});
|
||||
|
|
|
@ -4,5 +4,5 @@ $flowrate = $_REQUEST["flowrate"];
|
|||
$direction = $_REQUEST["direction"];
|
||||
|
||||
|
||||
$output = shell_exec('/usr/bin/python3 pump.py '.$volume.' '.$flowrate.' '.$direction);
|
||||
$output = shell_exec('/usr/bin/python3 /var/www/html/pipeline/pump.py '.$volume.' '.$flowrate.' '.$direction);
|
||||
?>
|
||||
|
|
|
@ -5,7 +5,7 @@ from time import sleep
|
|||
import sys
|
||||
|
||||
vol = int(sys.argv[1])
|
||||
flowrate = int(sys.argv[2])
|
||||
flowrate = float(sys.argv[2])
|
||||
dir = str(sys.argv[3])
|
||||
|
||||
kit = MotorKit()
|
||||
|
|
6
pipeline/write.php
Normal file
6
pipeline/write.php
Normal file
|
@ -0,0 +1,6 @@
|
|||
<?php
|
||||
$txt = $_REQUEST["txt"];
|
||||
$myfile = fopen("newfile.txt", "w") or die("Unable to open file!");
|
||||
fwrite($myfile, $txt);
|
||||
fclose($myfile);
|
||||
?>
|
Loading…
Reference in a new issue