ESP8266 part of the f105-motor-demo project (see f105-motor-demo_stm32)
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

1 line
28 KiB

function bool(t){return 1===t||"1"===t||t===!0||"true"===t}function numfmt(t,e){var n=Math.pow(10,e);return Math.round(t*n)/n}function estimateLoadTime(t,e){return 1e3/t*e+1500}function msNow(){return+new Date}function msElapsed(t){return msNow()-t}function copyToClipboard(t){if(!document.execCommand)return!1;var e="_hiddenCopyText_";if(n=document.getElementById(e),!n){var n=document.createElement("textarea");n.style.position="absolute",n.style.left="-9999px",n.style.top="0",n.id=e,document.body.appendChild(n)}n.textContent=t;var r=document.activeElement;n.focus(),n.setSelectionRange(0,n.value.length);var o;try{o=document.execCommand("copy")}catch(u){o=!1}return r&&"function"==typeof r.focus&&r.focus(),n.textContent="",o}function errorMsg(t,e){$("#notif").addClass("error"),notify.show(t,e||3e3)}function infoMsg(t,e){$("#notif").removeClass("error"),notify.show(t,e||3e3)}!function(){"use strict";function t(){var t;for(h=!0,t=0;t<p.length;t+=1)p[t]();p=[]}function e(){var e;for(v=!0,h||t(),e=0;e<d.length;e+=1)d[e]();d=[]}function n(t,e){var n;for(n=e.length-1;n>=0;n-=1)t(e[n])}function r(t){return t.replace(/-\w/g,function(t){return t.charAt(1).toUpperCase()})}function o(t,e){return t.currentStyle?t.currentStyle[r(e)]:m.getComputedStyle?m.getComputedStyle(t,null).getPropertyValue(e):null}function u(t,e){return encodeURIComponent(t).replace(/%20/g,"+")+"="+encodeURIComponent(e).replace(/%20/g,"+")}function a(t,e,n){try{t.style[r(e)]=n}catch(o){}}function i(t){t.style.display="","none"===o(t,"display")&&(t.style.display="block")}function c(t){var e,r,o,a="";if(t.constructor===Object){for(e in t)if(t.hasOwnProperty(e))if(t[e].constructor===Array)for(r=0;r<t[e].length;r+=1)a+="&"+u(e,t[e][r]);else a+="&"+u(e,t[e])}else n(function(t){if("FORM"===t.nodeName)for(r=0;r<t.elements.length;r+=1)if(e=t.elements[r],!e.disabled)switch(e.type){case"button":case"image":case"file":case"submit":case"reset":break;case"select-one":e.length>0&&(a+="&"+u(e.name,e.value));break;case"select-multiple":for(o=0;o<e.length;o+=1)e[o].selected&&(a+="&"+u(e.name,e[o].value));break;case"checkbox":case"radio":e.checked&&(a+="&"+u(e.name,e.value));break;default:a+="&"+u(e.name,e.value)}},t);return a.length>0?a.substring(1):""}function f(t,e,r){var o,u,a,i=!1;return t&&(o=t.split(/\s+/),n(function(t){for(a=0;a<o.length;a+=1)if(u=new RegExp("\\b"+o[a]+"\\b","g"),"remove"===e)t.className=t.className.replace(u,"");else if("toggle"===e)t.className=t.className.match(u)?t.className.replace(u,""):t.className+" "+o[a];else if("has"===e&&t.className.match(u)){i=!0;break}},r)),i}function s(t,e,r){var o,u;t&&n(function(n){for(o=g.createElement("div"),o.innerHTML=t;null!==(u=o.lastChild);)try{"before"===e?n.parentNode.insertBefore(u,n):"after"===e?n.parentNode.insertBefore(u,n.nextSibling):"append"===e?n.appendChild(u):"prepend"===e&&n.insertBefore(u,n.firstChild)}catch(r){break}},r)}function l(t){var e,u,y,b=[],w=!1;if(t)if(t.nodeType&&1===t.nodeType)b=[t];else if("object"==typeof t)w="number"!=typeof t.length,b=t;else if("string"==typeof t)for(g.querySelectorAll||(g.querySelectorAll=function(t){var e,n,r,u=g.getElementsByTagName("head")[0],a=[];if(e=g.createElement("STYLE"),e.type="text/css",e.styleSheet){for(e.styleSheet.cssText=t+" {a:b}",u.appendChild(e),n=g.getElementsByTagName("*"),r=0;r<n.length;r+=1)"b"===o(n[r],"a")&&a.push(n[r]);u.removeChild(e)}return a}),u=g.querySelectorAll(t),y=0;y<u.length;y+=1)b[y]=u[y];return e=w?{}:b,e.ready=function(t){if(t){if(h)return t(),e;p.push(t)}},e.loaded=function(t){if(t){if(v)return t(),e;d.push(t)}},e.each=function(t){return"function"==typeof t&&n(function(e){return t.apply(e,arguments)},b),e},e.first=function(){return l(b.shift())},e.last=function(){return l(b.pop())},e.odd=function(){var t,e=[];for(t=0;t<b.length;t+=2)e.push(b[t]);return l(e)},e.even=function(){var t,e=[];for(t=1;t<b.length;t+=2)e.push(b[t]);return l(e)},e.hide=function(){return n(function(t){t.style.display="none"},b),e},e.show=function(){return n(function(t){i(t)},b),e},e.toggle=function(t){return"undefined"!=typeof t?t?e.show():e.hide():n(function(t