Skip to content
This repository has been archived by the owner on May 21, 2024. It is now read-only.

Commit

Permalink
Merge remote-tracking branch 'origin/dev'
Browse files Browse the repository at this point in the history
  • Loading branch information
jpzg committed Apr 9, 2014
2 parents 16f9536 + 8340ecc commit 4b8667f
Show file tree
Hide file tree
Showing 6 changed files with 280 additions and 140 deletions.
2 changes: 2 additions & 0 deletions python/linino.py
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,7 @@
yun = Arduino('/dev/ttyATH0', baudrate=115200);

cl = []

pin = [None]*14
class SocketHandler(websocket.WebSocketHandler):

Expand All @@ -27,6 +28,7 @@ def on_message(self, message):
self.write_message(str(value))
except Exception,e:
print '[ERROR]', e
self.write_message(e)

def on_close(self):
cl.remove(self)
Expand Down
44 changes: 44 additions & 0 deletions www/draggable_test.html
Original file line number Diff line number Diff line change
@@ -0,0 +1,44 @@
<!doctype html>
<html>
<head>
<meta charset="utf-8">
<title>Draggable</title>
<script src="js/jquery-2.1.0.min.js"></script>
<script src="js/draggabilly.pkgd.min.js"></script>
<script type="text/javascript"></script>
<link rel="stylesheet" href="index.css">
<style>
.draggable{
width:75px;
height:75px;
}
</style>
</head>

<body>
<div id="x-slider-c" class="touch-box">
<div id="x-slider" class="touch-slider"></div>
</div>
<script type="text/javascript">
var box = [];
function RandInt(m,mx){
return Math.floor(Math.random() * (mx - m + 1 + m));
}
$(function() {

for(var i = 0; i < 10; i++){ // Add divs
$('body').append('<div class="draggable"></div>')
}
s = $('.draggable');
for(var i = 0; i < 10; i++){ // Randomize colors for each and make it a Draggabilly
s[i].style.background = 'rgb(' + RandInt(0,255) + ',' + RandInt(0,255) + ',' + RandInt(0,255) + ')';
box[i] = new Draggabilly(s[i],{});
}
var slider = new Draggabilly(document.querySelector('#x-slider'),{
axis:'x',
containment:'#x-slider-c'
});
});
</script>
</body>
</html>
41 changes: 41 additions & 0 deletions www/index.css
Original file line number Diff line number Diff line change
@@ -1,3 +1,44 @@
/*
* My additions
*/
.touch-box {
-webkit-box-shadow: inset 0 0 15px #AAA;
-moz-box-shadow: inset 0 0 15px #AAA;
box-shadow: inset 0 0 15px #AAA;

-webkit-border-radius: 10px;
-moz-border-radius: 10px;
border-radius: 10px;

background: #F5F5F5;
display: block;
width: 300px;
height: 40px;
margin: 20px;
}
.touch-slider {
position:relative;
-webkit-border-radius: 10px;
-moz-border-radius: 10px;
border-radius: 10px;
border: thin solid #979797;
background: #E5E5E5;
display: block;
width: 15%;
height: 100%;
}
.touch-slider:hover {
border:thin solid #2369AB;
background:#59A4E9;
}
.touch-slider.is-dragging {
border: thin solid #0055C8;
background:#0077EE;
}




/*
* Base structure
*/
Expand Down
226 changes: 108 additions & 118 deletions www/index.html
Original file line number Diff line number Diff line change
@@ -1,22 +1,20 @@
<!DOCTYPE HTML>
<!-- saved from url=(0043)http://getbootstrap.com/examples/dashboard/ -->
<!DOCTYPE html PUBLIC "" "">
<HTML lang="en">
<HEAD>
<META content="IE=11.0000"
<!DOCTYPE html>
<html lang="en">
<head>
<meta content="IE=11.0000"
http-equiv="X-UA-Compatible">
<META charset="utf-8">
<META http-equiv="X-UA-Compatible" content="IE=edge">
<META name="viewport" content="width=device-width, initial-scale=1">
<META name="description" content="">
<META name="author" content="Jacob Grossbard">
<LINK href="../../assets/ico/favicon.ico"
<meta charset="utf-8">
<meta http-equiv="X-UA-Compatible" content="IE=edge">
<meta name="viewport" content="width=device-width, initial-scale=1">
<meta name="description" content="">
<meta name="author" content="Jacob Grossbard">
<link href="../../assets/ico/favicon.ico"
rel="shortcut icon">
<TITLE>Robot Manager</TITLE>
<title>Robot Manager</title>
<!-- Bootstrap core CSS -->
<LINK href="css/bootstrap.min.css" rel="stylesheet">
<link href="css/bootstrap.min.css" rel="stylesheet">
<!-- Custom styles for this template -->
<LINK href="index.css" rel="stylesheet">
<link href="index.css" rel="stylesheet">
<!-- Just for debugging purposes. Don't actually copy this line! -->
<!--[if lt IE 9]><script src="../../assets/js/ie8-responsive-file-warning.js"></script><![endif]-->
<!-- HTML5 shim and Respond.js IE8 support of HTML5 elements and media queries -->
Expand All @@ -25,108 +23,100 @@
<script src="https://oss.maxcdn.com/libs/respond.js/1.4.2/respond.min.js"></script>
<![endif]-->

<META name="GENERATOR" content="MSHTML 11.00.9600.16521">
</HEAD>
<BODY>
<DIV class="navbar navbar-inverse navbar-fixed-top" role="navigation">
<DIV class="container-fluid">
<DIV class="navbar-header">
<BUTTON class="navbar-toggle" type="button"
data-toggle="collapse" data-target=".navbar-collapse"><SPAN
class="sr-only">Toggle navigation</SPAN> <SPAN
class="icon-bar"></SPAN><SPAN class="icon-bar"></SPAN><SPAN
class="icon-bar"></SPAN></BUTTON>
<A id="nav-title" class="navbar-brand" href="#"></A> </DIV>
<DIV class="navbar-collapse collapse">
<UL class="nav navbar-nav navbar-right">
<LI><A href="#">Robot Manager</A></LI>
<LI><A href="config.html">Arduino Webpanel</A></LI>
<LI><A href="/cgi-bin/luci/;stok=d2a12883d15d3ff6fc652e6a836dab37">LuCI</A></LI>
</UL>
<FORM
<meta name="GENERATOR" content="MSHTML 11.00.9600.16521">
</head>
<body>
<div class="navbar navbar-inverse navbar-fixed-top" role="navigation">
<div class="container-fluid">
<div class="navbar-header">
<button class="navbar-toggle" type="button"
data-toggle="collapse" data-target=".navbar-collapse"><span
class="sr-only">Toggle navigation</span> <span
class="icon-bar"></span><span class="icon-bar"></span><span
class="icon-bar"></span></button>
<a id="nav-title" class="navbar-brand" href="#"></a> </div>
<div class="navbar-collapse collapse">
<ul class="nav navbar-nav navbar-right">
<li><a href="#">Robot Manager</a></li>
<li><a href="config.html">Arduino Webpanel</a></li>
<li><a href="/cgi-bin/luci/;stok=d2a12883d15d3ff6fc652e6a836dab37">LuCI</a></li>
</ul>
<form
class="navbar-form navbar-right">
<INPUT class="form-control" type="text" placeholder="Search..." value="">
</FORM>
</DIV>
</DIV>
</DIV>
<DIV class="container-fluid">
<DIV class="row">
<DIV class="col-sm-3 col-md-2 sidebar">
<UL class="nav nav-sidebar">
<LI class="active"><A
href="http://getbootstrap.com/examples/dashboard/#">Overview</A></LI>
<LI><A href="http://getbootstrap.com/examples/dashboard/#">Reports</A></LI>
<LI><A href="http://getbootstrap.com/examples/dashboard/#">Analytics</A></LI>
<LI><A href="http://getbootstrap.com/examples/dashboard/#">Export</A></LI>
</UL>
</DIV>
<DIV class="col-sm-9 col-sm-offset-3 col-md-10 col-md-offset-2 main">
<H1 class="page-header">Dashboard</H1>
<DIV class="row placeholders">
<DIV class="col-xs-6 col-sm-3 placeholder"><IMG class="img-responsive" alt="Generic placeholder thumbnail"
data-src="holder.js/200x200/auto/sky">
<H4>Label</H4>
<SPAN class="text-muted">Something else</SPAN> </DIV>
<DIV class="col-xs-6 col-sm-3 placeholder"><IMG class="img-responsive" alt="Generic placeholder thumbnail"
data-src="holder.js/200x200/auto/vine">
<H4>Label</H4>
<SPAN class="text-muted">Something else</SPAN> </DIV>
<DIV class="col-xs-6 col-sm-3 placeholder"><IMG class="img-responsive" alt="Generic placeholder thumbnail"
data-src="holder.js/200x200/auto/sky">
<H4>Label</H4>
<SPAN class="text-muted">Something else</SPAN> </DIV>
<DIV class="col-xs-6 col-sm-3 placeholder"><IMG class="img-responsive" alt="Generic placeholder thumbnail"
data-src="holder.js/200x200/auto/vine">
<H4>Label</H4>
<SPAN class="text-muted">Something else</SPAN> </DIV>
</DIV>
<H2 class="sub-header">Pin Info</H2>
<DIV class="table-responsive">
<table id="digital" class="table table-striped">
<thead>
<tr>
<th colspan="4" style="text-align: center">Digital</th>
</tr>
<tr>
<th>Pin #</th>
<th>Type</th>
<th>Mode</th>
<th>Value</th>
</tr>
</thead>
<tbody>
</tbody>
</table>
</DIV>
<div class="table-responsive">
<table id="analog" class="table table-striped">
<thead>
<tr>
<th colspan="4" style="text-align:center">Analog</th>
</tr>
<tr>
<th>Pin #</th>
<th>Type</th>
<th>Mode</th>
<th>Value</th>
</tr>
</thead>
<tbody>
</tbody>
</table>
</div>
</DIV>
</DIV>
</DIV>
</DIV>
<input class="form-control" type="text" placeholder="Search..." value="">
</form>
</div>
</div>
</div>
<div class="container-fluid">
<div class="row">
<div class="col-sm-3 col-md-2 sidebar">
<ul class="nav nav-sidebar">
<li class="active"><a
href="http://getbootstrap.com/examples/dashboard/#">Overview</a></li>
<li><a href="http://getbootstrap.com/examples/dashboard/#">Reports</a></li>
<li><a href="http://getbootstrap.com/examples/dashboard/#">Analytics</a></li>
<li><a href="http://getbootstrap.com/examples/dashboard/#">Export</a></li>
<li>
<div id="conn-status" class="alert alert-warning">Not connected</div>
</li>
</ul>
</div>
<div class="col-sm-9 col-sm-offset-3 col-md-10 col-md-offset-2 main">
<h1 class="page-header">Dashboard</h1>
<div class="row placeholders">
<div id="x-slider-c" class="touch-box">
<div id="x-slider" class="touch-slider"></div>
</div>
<div id="pos"></div>
</div>
<h2 class="sub-header">Pin Info</h2>
<div class="table-responsive">
<table id="digital" class="table table-striped">
<thead>
<tr>
<th colspan="4" style="text-align: center">Digital</th>
</tr>
<tr>
<th>Pin #</th>
<th>Type</th>
<th>Mode</th>
<th>Value</th>
</tr>
</thead>
<tbody>
</tbody>
</table>
</div>
<div class="table-responsive">
<table id="analog" class="table table-striped">
<thead>
<tr>
<th colspan="4" style="text-align:center">Analog</th>
</tr>
<tr>
<th>Pin #</th>
<th>Type</th>
<th>Mode</th>
<th>Value</th>
</tr>
</thead>
<tbody>
</tbody>
</table>
</div>
</div>
</div>
</div>
</body>
<!-- Bootstrap core JavaScript
================================================== -->
<!-- Placed at the end of the document so the pages load faster -->
<SCRIPT src="js/jquery-2.1.0.min.js"></SCRIPT>
<SCRIPT src="js/bootstrap.min.js"></SCRIPT>
<SCRIPT src="js/docs.min.js"></SCRIPT>
<script src="js/d3.v3.min.js"></script>
<script src="index.js"></script>
</BODY>
</HTML>
================================================== -->
<!-- Placed at the end of the document so the pages load faster -->
<script src="js/jquery-2.1.0.min.js"></script>
<script src="js/bootstrap.min.js"></script>
<script src="js/docs.min.js"></script>
<!--<script src="js/d3.v3.min.js"></script>-->
<script src="js/draggabilly.pkgd.min.js"></script>
<script src="index.js"></script>
</body>
</html>
Loading

0 comments on commit 4b8667f

Please sign in to comment.