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.

2 lines
48 KiB

function bool(t){return 1===t||"1"===t||t===!0||"true"===t}function e(t){return String(t).replace(/&/g,"&amp;").replace(/"/g,"&quot;").replace(/'/g,"&#39;").replace(/</g,"&lt;").replace(/>/g,"&gt;")}function isArray(t){return"[object Array]"===Object.prototype.toString.call(t)}function isObject(t){return"[object Object]"===Object.prototype.toString.call(t)}function regexEscape(t){return t.replace(/[-\/\\^$*+?.()|[\]{}]/g,"\\$&")}function rssiPerc(t){var e=parseInt(t);return e>-50?100:-100>e?0:Math.round(2*(e+100))}!function(){"use strict";function t(){var t;for(p=!0,t=0;t<d.length;t+=1)d[t]();d=[]}function e(){var e;for(m=!0,p||t(),e=0;e<f.length;e+=1)f[e]();f=[]}function n(t,e){var n;for(n=e.length-1;n>=0;n-=1)t(e[n])}function i(t){return t.replace(/-\w/g,function(t){return t.charAt(1).toUpperCase()})}function r(t,e){return t.currentStyle?t.currentStyle[i(e)]:x.getComputedStyle?x.getComputedStyle(t,null).getPropertyValue(e):null}function s(t,e){return encodeURIComponent(t).replace(/%20/g,"+")+"="+encodeURIComponent(e).replace(/%20/g,"+")}function a(t,e,n){try{t.style[i(e)]=n}catch(r){}}function o(t){t.style.display="","none"===r(t,"display")&&(t.style.display="block")}function c(t){var e,i,r,a="";if(t.constructor===Object){for(e in t)if(t.hasOwnProperty(e))if(t[e].constructor===Array)for(i=0;i<t[e].length;i+=1)a+="&"+s(e,t[e][i]);else a+="&"+s(e,t[e])}else n(function(t){if("FORM"===t.nodeName)for(i=0;i<t.elements.length;i+=1)if(e=t.elements[i],!e.disabled)switch(e.type){case"button":case"image":case"file":case"submit":case"reset":break;case"select-one":e.length>0&&(a+="&"+s(e.name,e.value));break;case"select-multiple":for(r=0;r<e.length;r+=1)e[r].selected&&(a+="&"+s(e.name,e[r].value));break;case"checkbox":case"radio":e.checked&&(a+="&"+s(e.name,e.value));break;default:a+="&"+s(e.name,e.value)}},t);return a.length>0?a.substring(1):""}function u(t,e,i){var r,s,a,o=!1;return t&&(r=t.split(/\s+/),n(function(t){for(a=0;a<r.length;a+=1)if(s=new RegExp("\\b"+r[a]+"\\b","g"),"remove"===e)t.className=t.className.replace(s,"");else if("toggle"===e)t.className=t.className.match(s)?t.className.replace(s,""):t.className+" "+r[a];else if("has"===e&&t.className.match(s)){o=!0;break}},i)),o}function l(t,e,i){var r,s;t&&n(function(n){for(r=v.createElement("div"),r.innerHTML=t;null!==(s=r.lastChild);)try{"before"===e?n.parentNode.insertBefore(s,n):"after"===e?n.parentNode.insertBefore(s,n.nextSibling):"append"===e?n.appendChild(s):"prepend"===e&&n.insertBefore(s,n.firstChild)}catch(i){break}},i)}function h(t){var e,s,y,w=[],b=!1;if(t)if(t.nodeType&&1===t.nodeType)w=[t];else if("object"==typeof t)b="number"!=typeof t.length,w=t;else if("string"==typeof t)for(v.querySelectorAll||(v.querySelectorAll=function(t){var e,n,i,s=v.getElementsByTagName("head")[0],a=[];if(e=v.createElement("STYLE"),e.type="text/css",e.styleSheet){for(e.styleSheet.cssText=t+" {a:b}",s.appendChild(e),n=v.getElementsByTagName("*"),i=0;i<n.length;i+=1)"b"===r(n[i],"a")&&a.push(n[i]);s.removeChild(e)}return a}),s=v.querySelectorAll(t),y=0;y<s.length;y+=1)w[y]=s[y];return e=b?{}:w,e.ready=function(t){if(t){if(p)return t(),e;d.push(t)}},e.loaded=function(t){if(t){if(m)return t(),e;f.push(t)}},e.each=function(t){return"function"==typeof t&&n(function(e){return t.apply(e,arguments)},w),e},e.first=function(){return h(w.shift())},e.last=function(){return h(w.pop())},e.odd=function(){var t,e=[];for(t=0;t<w.length;t+=2)e.push(w[t]);return h(e)},e.even=function(){var t,e=[];for(t=1;t<w.length;t+=2)e.push(w[t]);return h(e)},e.hide=function(){return n(function(t){t.style.display="none"},w),e},e.show=function(){return n(function(t){o(t)},w),e},e.toggle=function(t){return"undefined"!=typeof t?t?e.show():e.hide():n(function(t){"none"===r(t,"display")?o(t):t.style.display="none"},w),e},e.remove=function(){return n(function(t){try{t.parentNode.removeChild(t)}catch(e){}},w),h()},e.css=function(t,s){if(t){if(s||""===s)return n(function(e){a(e,t,s)},w),e;if(w[0]){if(w[0].style[i(t)])return w[0].style[i(t)];if(r(w[0],t))return r(w[0],t)}}},e.getClass=function(){return w[0]&&w[0].classNam
this.stepLength=this.axisLength/this.divisor}function r(t){return this.axisLength*(+n.getMultiValue(t,this.units.pos)-this.range.min)/(this.range.max-this.range.min)}n.FixedScaleAxis=n.Axis.extend({constructor:i,projectValue:r})}(window,document,t),function(t,e,n){"use strict";function i(t,e,i,r){n.StepAxis["super"].constructor.call(this,t,i,r.ticks,r),this.stepLength=this.axisLength/(r.ticks.length-(r.stretch?1:0))}function r(t,e){return this.stepLength*e}n.StepAxis=n.Axis.extend({constructor:i,projectValue:r})}(window,document,t),function(t,e,n){"use strict";function i(t){this.data=n.normalizeData(this.data);var e={raw:this.data,normalized:n.getDataArray(this.data,t.reverseData,!0)};this.svg=n.createSvg(this.container,t.width,t.height,t.classNames.chart);var i,r,a=this.svg.elem("g").addClass(t.classNames.gridGroup),o=this.svg.elem("g"),c=this.svg.elem("g").addClass(t.classNames.labelGroup),u=n.createChartRect(this.svg,t,s.padding);i=void 0===t.axisX.type?new n.StepAxis(n.Axis.units.x,e,u,n.extend({},t.axisX,{ticks:e.raw.labels,stretch:t.fullWidth})):t.axisX.type.call(n,n.Axis.units.x,e,u,t.axisX),r=void 0===t.axisY.type?new n.AutoScaleAxis(n.Axis.units.y,e,u,n.extend({},t.axisY,{high:n.isNum(t.high)?t.high:t.axisY.high,low:n.isNum(t.low)?t.low:t.axisY.low})):t.axisY.type.call(n,n.Axis.units.y,e,u,t.axisY),i.createGridAndLabels(a,c,this.supportsForeignObject,t,this.eventEmitter),r.createGridAndLabels(a,c,this.supportsForeignObject,t,this.eventEmitter),e.raw.series.forEach(function(s,a){var c=o.elem("g");c.attr({"ct:series-name":s.name,"ct:meta":n.serialize(s.meta)}),c.addClass([t.classNames.series,s.className||t.classNames.series+"-"+n.alphaNumerate(a)].join(" "));var l=[],h=[];e.normalized[a].forEach(function(t,o){var c={x:u.x1+i.projectValue(t,o,e.normalized[a]),y:u.y1-r.projectValue(t,o,e.normalized[a])};l.push(c.x,c.y),h.push({value:t,valueIndex:o,meta:n.getMetaData(s,o)})}.bind(this));var d={lineSmooth:n.getSeriesOption(s,t,"lineSmooth"),showPoint:n.getSeriesOption(s,t,"showPoint"),showLine:n.getSeriesOption(s,t,"showLine"),showArea:n.getSeriesOption(s,t,"showArea"),areaBase:n.getSeriesOption(s,t,"areaBase")},f="function"==typeof d.lineSmooth?d.lineSmooth:d.lineSmooth?n.Interpolation.cardinal():n.Interpolation.none(),p=f(l,h);if(d.showPoint&&p.pathElements.forEach(function(e){var o=c.elem("line",{x1:e.x,y1:e.y,x2:e.x+.01,y2:e.y},t.classNames.point).attr({"ct:value":[e.data.value.x,e.data.value.y].filter(n.isNum).join(","),"ct:meta":e.data.meta});this.eventEmitter.emit("draw",{type:"point",value:e.data.value,index:e.data.valueIndex,meta:e.data.meta,series:s,seriesIndex:a,axisX:i,axisY:r,group:c,element:o,x:e.x,y:e.y})}.bind(this)),d.showLine){var m=c.elem("path",{d:p.stringify()},t.classNames.line,!0);this.eventEmitter.emit("draw",{type:"line",values:e.normalized[a],path:p.clone(),chartRect:u,index:a,series:s,seriesIndex:a,axisX:i,axisY:r,group:c,element:m})}if(d.showArea&&r.range){var g=Math.max(Math.min(d.areaBase,r.range.max),r.range.min),v=u.y1-r.projectValue(g);p.splitByCommand("M").filter(function(t){return t.pathElements.length>1}).map(function(t){var e=t.pathElements[0],n=t.pathElements[t.pathElements.length-1];return t.clone(!0).position(0).remove(1).move(e.x,v).line(e.x,e.y).position(t.pathElements.length+1).line(n.x,v)}).forEach(function(n){var o=c.elem("path",{d:n.stringify()},t.classNames.area,!0);this.eventEmitter.emit("draw",{type:"area",values:e.normalized[a],path:n.clone(),series:s,seriesIndex:a,axisX:i,axisY:r,chartRect:u,index:a,group:c,element:o})}.bind(this))}}.bind(this)),this.eventEmitter.emit("created",{bounds:r.bounds,chartRect:u,axisX:i,axisY:r,svg:this.svg,options:t})}function r(t,e,i,r){n.Line["super"].constructor.call(this,t,e,s,n.extend({},s,i),r)}var s={axisX:{offset:30,position:"end",labelOffset:{x:0,y:0},showLabel:!0,showGrid:!0,labelInterpolationFnc:n.noop,type:void 0},axisY:{offset:40,position:"start",labelOffset:{x:0,y:0},showLabel:!0,showGrid:!0,labelInterpolationFnc:n.noop,type:void 0,scaleMinSpace:20,onlyInteger:!1},width:void 0,height:void 0,showLine:!0,showPoint:!0,showArea: