xz_console.html 8.5 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261
  1. <!DOCTYPE html>
  2. <html lang="en">
  3. <head>
  4. <meta charset="UTF-8">
  5. <title>Aisky-coffee</title>
  6. <meta name="viewport" content="width=device-width, initial-scale=1, shrink-to-fit=no">
  7. <!-- 新 Bootstrap4 核心 CSS 文件 -->
  8. <link rel="stylesheet" href="https://cdn.bootcss.com/bootstrap/4.1.0/css/bootstrap.min.css">
  9. <!-- jQuery文件。务必在bootstrap.min.js 之前引入 -->
  10. <script src="https://cdn.bootcss.com/jquery/3.2.1/jquery.min.js"></script>
  11. <!-- popper.min.js 用于弹窗、提示、下拉菜单 -->
  12. <script src="https://cdn.bootcss.com/popper.js/1.12.5/umd/popper.min.js"></script>
  13. <!-- 最新的 Bootstrap4 核心 JavaScript 文件 -->
  14. <script src="https://cdn.bootcss.com/bootstrap/4.1.0/js/bootstrap.min.js"></script>
  15. <style>
  16. body {
  17. margin:0;
  18. }
  19. .navbar-dark .navbar-nav .nav-link {
  20. color: white;
  21. cursor: pointer;
  22. text-decoration:none;
  23. width: 100px;
  24. height: 46px;
  25. }
  26. .nav-top {
  27. line-height:40px;
  28. background-color: #C4C4C4;
  29. }
  30. .website_title{
  31. font-family: Roboto;
  32. font-style: normal;
  33. font-weight: normal;
  34. font-size: 30px;
  35. color: #000000;
  36. }
  37. .navbar-nav > li{
  38. float: none;
  39. display: inline-block;
  40. width: 100px;
  41. margin: 0 auto;
  42. text-align: center;
  43. }
  44. .navbar-nav > li a{
  45. font-size: 20px;
  46. }
  47. .main-page {
  48. margin-top: 200px;
  49. }
  50. .page-title {
  51. font-family: Roboto;
  52. font-style: normal;
  53. font-weight: bold;
  54. font-size: 36px;
  55. }
  56. .flex {
  57. display: flex;
  58. flex-direction: row;
  59. flex-wrap: wrap;
  60. justify-content: center;
  61. }
  62. .set-link {
  63. display: inline-block;
  64. width: 350px;
  65. height: 100px;
  66. line-height: 100px;
  67. background: #008CBA;
  68. border: 1px solid #CFCFCF;
  69. box-sizing: border-box;
  70. color: #FFFFFF;
  71. border-radius: 10px;
  72. font-size: 36px;
  73. }
  74. button {
  75. cursor:pointer;
  76. }
  77. @media(max-width:373px){
  78. .card {
  79. margin-right: 0px;
  80. }
  81. }
  82. @media(max-width:577px){
  83. }
  84. @media(min-width:576px){
  85. }
  86. @media(min-width:768px){
  87. .navbar-nav > li {
  88. margin-left: 0px;
  89. }
  90. .navbar-nav .li-block {
  91. display:none;
  92. }
  93. }
  94. @media(min-width:991px){
  95. .navbar-nav > li {
  96. margin-left: 20px;
  97. }
  98. .navbar-nav .li-block {
  99. display:none;
  100. }
  101. }
  102. @media(min-width:1200px){
  103. .navbar-nav > li {
  104. margin-left: 50px;
  105. }
  106. .navbar-nav .li-block {
  107. display: inline-block;
  108. width: 100px;
  109. }
  110. }
  111. @media(min-width:1400px){
  112. .navbar-nav .li-block {
  113. display: inline-block;
  114. width: 200px;
  115. }
  116. }
  117. @media(min-width:1689px) {
  118. .navbar-nav > li {
  119. margin-left: 50px;
  120. }
  121. .navbar-nav .li-block {
  122. display: inline-block;
  123. width: 500px;
  124. }
  125. }
  126. </style>
  127. <script>
  128. function MotorControl (evt){
  129. var name = evt.getAttribute('name');
  130. if(name == 'z_up'){
  131. var ros_msg = 4.0;
  132. }else if(name == 'z_down'){
  133. var ros_msg = 8.0;
  134. }else if(name == 'x_left'){
  135. var ros_msg = 2.0;
  136. }else if(name == 'x_right'){
  137. var ros_msg = 6.0;
  138. };
  139. var json = {'ros_msg':ros_msg};
  140. $.post('/ros_msg',json,function(resText){},'text');
  141. };
  142. $(function(){
  143. });
  144. </script>
  145. </head>
  146. <body>
  147. <nav class="fixed-top">
  148. <nav class="navbar navbar-expand-md nav-top justify-content-center">
  149. <div>
  150. <span class="website_title">XZ控制</span>
  151. </div>
  152. </nav>
  153. <nav class="navbar navbar-expand-md bg-dark navbar-dark nav-bottom">
  154. <button class="navbar-toggler" type="button" data-toggle="collapse" data-target="#collapsibleNavbar">
  155. <span class="navbar-toggler-icon"></span>
  156. </button>
  157. <div class="collapse navbar-collapse" id="collapsibleNavbar">
  158. <ul class="navbar-nav">
  159. <li class="nav-item">
  160. <a class="nav-link" href="/">首頁</a>
  161. </li>
  162. <li class="nav-item">
  163. <a class="nav-link" href="#">關於我們</a>
  164. </li>
  165. <li class="nav-item">
  166. <a class="nav-link" href="#">資訊</a>
  167. </li>
  168. <li class="nav-item">
  169. <a class="nav-link" href="#">聯絡方法</a>
  170. </li>
  171. <li class="nav-item">
  172. <a class="nav-link" href="/xz_console">XZ控制</a>
  173. </li>
  174. <li class="nav-item">
  175. <a class="nav-link" href="#">驅動馬達</a>
  176. </li>
  177. <li class="nav-item">
  178. <a class="nav-link" href="#">轉向馬達</a>
  179. </li>
  180. <!--<li class="li-block"></li>-->
  181. <li class="nav-item">
  182. <a class="nav-link" href="#">{{params.username}}</a>
  183. </li>
  184. <li class="nav-item">
  185. <a class="nav-link" href="/logout">Logout</a>
  186. </li>
  187. </ul>
  188. </div>
  189. </nav>
  190. </nav>
  191. <div class="main-page">
  192. <div class="container">
  193. <form action="/ashoot_setting" method="post">
  194. <div id="control_panel" style="display: block;">
  195. <div class="row">
  196. <div class="col-md-4" style="text-align:center;margin-top:5px;"></div>
  197. <!-- 拍攝控制板外觀 -->
  198. <div class="col-md-4" style="text-align:center;margin-top:5px;">
  199. <div class="col-md-12" style="text-align:center;margin-top:5px;">
  200. <button type="button" name="z_up" class="sub_1" onclick="MotorControl(z_up);" style="width:49px;height:49px;font-size:20px;border-radius:10px;">▲</button>
  201. </div>
  202. <div class="col-md-12 row" style="text-align:center;margin-top:5px;margin-bottom:5px;margin-left:0px;">
  203. <div class="col-md-4" style="text-align:center;margin-top:5px;padding:0px">
  204. <button type="button" name="x_left" class="sub_3" onclick="MotorControl(x_left);" style="width:49px;height:49px;font-size:20px;border-radius:10px;padding:0px">◄</button>
  205. </div>
  206. <div class="col-md-4" style="text-align:center;margin-top:5px;padding:0px"></div>
  207. <div class="col-md-4" style="text-align:center;margin-top:5px;padding:0px">
  208. <button type="button" name="x_right" class="sub_4" onclick="MotorControl(x_right);" style="width:49px;height:49px;font-size:20px;border-radius:10px;padding:0px">►</button>
  209. </div>
  210. </div>
  211. <div class="col-md-12" style="text-align:center;margin-top:5px;">
  212. <button type="button" name="z_down" class="sub_2" onclick="MotorControl(z_down);" style="width:49px;height:49px;font-size:20px;border-radius:10px;">▼</button>
  213. </div>
  214. <input type="hidden" name="tilt-angle">
  215. <input type="hidden" name="pan-angle">
  216. </div>
  217. <div class="col-md-4" style="text-align:center;margin-top:5px;"></div>
  218. </div>
  219. </div>
  220. </form>
  221. </div>
  222. </div>
  223. </body>
  224. </html>