diff --git a/control/bin/b15fcli b/control/bin/b15fcli deleted file mode 100755 index 864a09c..0000000 Binary files a/control/bin/b15fcli and /dev/null differ diff --git a/control/src/.idea/misc.xml b/control/src/.idea/misc.xml new file mode 100644 index 0000000..8822db8 --- /dev/null +++ b/control/src/.idea/misc.xml @@ -0,0 +1,7 @@ + + + + + + \ No newline at end of file diff --git a/control/src/.idea/modules.xml b/control/src/.idea/modules.xml new file mode 100644 index 0000000..f669a0e --- /dev/null +++ b/control/src/.idea/modules.xml @@ -0,0 +1,8 @@ + + + + + + + + \ No newline at end of file diff --git a/control/src/.idea/src.iml b/control/src/.idea/src.iml new file mode 100644 index 0000000..f08604b --- /dev/null +++ b/control/src/.idea/src.iml @@ -0,0 +1,2 @@ + + \ No newline at end of file diff --git a/control/src/.idea/vcs.xml b/control/src/.idea/vcs.xml new file mode 100644 index 0000000..b2bdec2 --- /dev/null +++ b/control/src/.idea/vcs.xml @@ -0,0 +1,6 @@ + + + + + + \ No newline at end of file diff --git a/control/src/.idea/workspace.xml b/control/src/.idea/workspace.xml new file mode 100644 index 0000000..b807b87 --- /dev/null +++ b/control/src/.idea/workspace.xml @@ -0,0 +1,424 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + read + read_timeout + read_timeout + write_timeout + + + ::read_timeout + USART::read_timeout + USART::write_timeout + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + ",e.querySelectorAll("[msallowcapture^='']").length&&y.push("[*^$]="+M+"*(?:''|\"\")"),e.querySelectorAll("[selected]").length||y.push("\\["+M+"*(?:value|"+P+")"),e.querySelectorAll("[id~="+b+"-]").length||y.push("~="),e.querySelectorAll(":checked").length||y.push(":checked"),e.querySelectorAll("a#"+b+"+*").length||y.push(".#.+[+~]")}),ue(function(e){e.innerHTML="";var t=d.createElement("input");t.setAttribute("type","hidden"),e.appendChild(t).setAttribute("name","D"),e.querySelectorAll("[name=d]").length&&y.push("name"+M+"*[*^$|!~]?="),2!==e.querySelectorAll(":enabled").length&&y.push(":enabled",":disabled"),h.appendChild(e).disabled=!0,2!==e.querySelectorAll(":disabled").length&&y.push(":enabled",":disabled"),e.querySelectorAll("*,:x"),y.push(",.*:")})),(n.matchesSelector=Q.test(m=h.matches||h.webkitMatchesSelector||h.mozMatchesSelector||h.oMatchesSelector||h.msMatchesSelector))&&ue(function(e){n.disconnectedMatch=m.call(e,"*"),m.call(e,"[s!='']:x"),v.push("!=",W)}),y=y.length&&new RegExp(y.join("|")),v=v.length&&new RegExp(v.join("|")),t=Q.test(h.compareDocumentPosition),x=t||Q.test(h.contains)?function(e,t){var n=9===e.nodeType?e.documentElement:e,r=t&&t.parentNode;return e===r||!(!r||1!==r.nodeType||!(n.contains?n.contains(r):e.compareDocumentPosition&&16&e.compareDocumentPosition(r)))}:function(e,t){if(t)while(t=t.parentNode)if(t===e)return!0;return!1},D=t?function(e,t){if(e===t)return f=!0,0;var r=!e.compareDocumentPosition-!t.compareDocumentPosition;return r||(1&(r=(e.ownerDocument||e)===(t.ownerDocument||t)?e.compareDocumentPosition(t):1)||!n.sortDetached&&t.compareDocumentPosition(e)===r?e===d||e.ownerDocument===w&&x(w,e)?-1:t===d||t.ownerDocument===w&&x(w,t)?1:c?O(c,e)-O(c,t):0:4&r?-1:1)}:function(e,t){if(e===t)return f=!0,0;var n,r=0,i=e.parentNode,o=t.parentNode,a=[e],s=[t];if(!i||!o)return e===d?-1:t===d?1:i?-1:o?1:c?O(c,e)-O(c,t):0;if(i===o)return ce(e,t);n=e;while(n=n.parentNode)a.unshift(n);n=t;while(n=n.parentNode)s.unshift(n);while(a[r]===s[r])r++;return r?ce(a[r],s[r]):a[r]===w?-1:s[r]===w?1:0},d):d},oe.matches=function(e,t){return oe(e,null,null,t)},oe.matchesSelector=function(e,t){if((e.ownerDocument||e)!==d&&p(e),t=t.replace(z,"='$1']"),n.matchesSelector&&g&&!S[t+" "]&&(!v||!v.test(t))&&(!y||!y.test(t)))try{var r=m.call(e,t);if(r||n.disconnectedMatch||e.document&&11!==e.document.nodeType)return r}catch(e){}return oe(t,d,null,[e]).length>0},oe.contains=function(e,t){return(e.ownerDocument||e)!==d&&p(e),x(e,t)},oe.attr=function(e,t){(e.ownerDocument||e)!==d&&p(e);var i=r.attrHandle[t.toLowerCase()],o=i&&N.call(r.attrHandle,t.toLowerCase())?i(e,t,!g):void 0;return void 0!==o?o:n.attributes||!g?e.getAttribute(t):(o=e.getAttributeNode(t))&&o.specified?o.value:null},oe.escape=function(e){return(e+"").replace(te,ne)},oe.error=function(e){throw new Error("Syntax error, unrecognized expression: "+e)},oe.uniqueSort=function(e){var t,r=[],i=0,o=0;if(f=!n.detectDuplicates,c=!n.sortStable&&e.slice(0),e.sort(D),f){while(t=e[o++])t===e[o]&&(i=r.push(o));while(i--)e.splice(r[i],1)}return c=null,e},i=oe.getText=function(e){var t,n="",r=0,o=e.nodeType;if(o){if(1===o||9===o||11===o){if("string"==typeof e.textContent)return e.textContent;for(e=e.firstChild;e;e=e.nextSibling)n+=i(e)}else if(3===o||4===o)return e.nodeValue}else while(t=e[r++])n+=i(t);return n},(r=oe.selectors={cacheLength:50,createPseudo:se,match:V,attrHandle:{},find:{},relative:{">":{dir:"parentNode",first:!0}," ":{dir:"parentNode"},"+":{dir:"previousSibling",first:!0},"~":{dir:"previousSibling"}},preFilter:{ATTR:function(e){return e[1]=e[1].replace(Z,ee),e[3]=(e[3]||e[4]||e[5]||"").replace(Z,ee),"~="===e[2]&&(e[3]=" "+e[3]+" "),e.slice(0,4)},CHILD:function(e){return e[1]=e[1].toLowerCase(),"nth"===e[1].slice(0,3)?(e[3]||oe.error(e[0]),e[4]=+(e[4]?e[5]+(e[6]||1):2*("even"===e[3]||"odd"===e[3])),e[5]=+(e[7]+e[8]||"odd"===e[3])):e[3]&&oe.error(e[0]),e},PSEUDO:function(e){var t,n=!e[6]&&e[2];return V.CHILD.test(e[0])?null:(e[3]?e[2]=e[4]||e[5]||"":n&&X.test(n)&&(t=a(n,!0))&&(t=n.indexOf(")",n.length-t)-n.length)&&(e[0]=e[0].slice(0,t),e[2]=n.slice(0,t)),e.slice(0,3))}},filter:{TAG:function(e){var t=e.replace(Z,ee).toLowerCase();return"*"===e?function(){return!0}:function(e){return e.nodeName&&e.nodeName.toLowerCase()===t}},CLASS:function(e){var t=E[e+" "];return t||(t=new RegExp("(^|"+M+")"+e+"("+M+"|$)"))&&E(e,function(e){return t.test("string"==typeof e.className&&e.className||"undefined"!=typeof e.getAttribute&&e.getAttribute("class")||"")})},ATTR:function(e,t,n){return function(r){var i=oe.attr(r,e);return null==i?"!="===t:!t||(i+="","="===t?i===n:"!="===t?i!==n:"^="===t?n&&0===i.indexOf(n):"*="===t?n&&i.indexOf(n)>-1:"$="===t?n&&i.slice(-n.length)===n:"~="===t?(" "+i.replace($," ")+" ").indexOf(n)>-1:"|="===t&&(i===n||i.slice(0,n.length+1)===n+"-"))}},CHILD:function(e,t,n,r,i){var o="nth"!==e.slice(0,3),a="last"!==e.slice(-4),s="of-type"===t;return 1===r&&0===i?function(e){return!!e.parentNode}:function(t,n,u){var l,c,f,p,d,h,g=o!==a?"nextSibling":"previousSibling",y=t.parentNode,v=s&&t.nodeName.toLowerCase(),m=!u&&!s,x=!1;if(y){if(o){while(g){p=t;while(p=p[g])if(s?p.nodeName.toLowerCase()===v:1===p.nodeType)return!1;h=g="only"===e&&!h&&"nextSibling"}return!0}if(h=[a?y.firstChild:y.lastChild],a&&m){x=(d=(l=(c=(f=(p=y)[b]||(p[b]={}))[p.uniqueID]||(f[p.uniqueID]={}))[e]||[])[0]===T&&l[1])&&l[2],p=d&&y.childNodes[d];while(p=++d&&p&&p[g]||(x=d=0)||h.pop())if(1===p.nodeType&&++x&&p===t){c[e]=[T,d,x];break}}else if(m&&(x=d=(l=(c=(f=(p=t)[b]||(p[b]={}))[p.uniqueID]||(f[p.uniqueID]={}))[e]||[])[0]===T&&l[1]),!1===x)while(p=++d&&p&&p[g]||(x=d=0)||h.pop())if((s?p.nodeName.toLowerCase()===v:1===p.nodeType)&&++x&&(m&&((c=(f=p[b]||(p[b]={}))[p.uniqueID]||(f[p.uniqueID]={}))[e]=[T,x]),p===t))break;return(x-=i)===r||x%r==0&&x/r>=0}}},PSEUDO:function(e,t){var n,i=r.pseudos[e]||r.setFilters[e.toLowerCase()]||oe.error("unsupported pseudo: "+e);return i[b]?i(t):i.length>1?(n=[e,e,"",t],r.setFilters.hasOwnProperty(e.toLowerCase())?se(function(e,n){var r,o=i(e,t),a=o.length;while(a--)e[r=O(e,o[a])]=!(n[r]=o[a])}):function(e){return i(e,0,n)}):i}},pseudos:{not:se(function(e){var t=[],n=[],r=s(e.replace(B,"$1"));return r[b]?se(function(e,t,n,i){var o,a=r(e,null,i,[]),s=e.length;while(s--)(o=a[s])&&(e[s]=!(t[s]=o))}):function(e,i,o){return t[0]=e,r(t,null,o,n),t[0]=null,!n.pop()}}),has:se(function(e){return function(t){return oe(e,t).length>0}}),contains:se(function(e){return e=e.replace(Z,ee),function(t){return(t.textContent||t.innerText||i(t)).indexOf(e)>-1}}),lang:se(function(e){return U.test(e||"")||oe.error("unsupported lang: "+e),e=e.replace(Z,ee).toLowerCase(),function(t){var n;do{if(n=g?t.lang:t.getAttribute("xml:lang")||t.getAttribute("lang"))return(n=n.toLowerCase())===e||0===n.indexOf(e+"-")}while((t=t.parentNode)&&1===t.nodeType);return!1}}),target:function(t){var n=e.location&&e.location.hash;return n&&n.slice(1)===t.id},root:function(e){return e===h},focus:function(e){return e===d.activeElement&&(!d.hasFocus||d.hasFocus())&&!!(e.type||e.href||~e.tabIndex)},enabled:de(!1),disabled:de(!0),checked:function(e){var t=e.nodeName.toLowerCase();return"input"===t&&!!e.checked||"option"===t&&!!e.selected},selected:function(e){return e.parentNode&&e.parentNode.selectedIndex,!0===e.selected},empty:function(e){for(e=e.firstChild;e;e=e.nextSibling)if(e.nodeType<6)return!1;return!0},parent:function(e){return!r.pseudos.empty(e)},header:function(e){return Y.test(e.nodeName)},input:function(e){return G.test(e.nodeName)},button:function(e){var t=e.nodeName.toLowerCase();return"input"===t&&"button"===e.type||"button"===t},text:function(e){var t;return"input"===e.nodeName.toLowerCase()&&"text"===e.type&&(null==(t=e.getAttribute("type"))||"text"===t.toLowerCase())},first:he(function(){return[0]}),last:he(function(e,t){return[t-1]}),eq:he(function(e,t,n){return[n<0?n+t:n]}),even:he(function(e,t){for(var n=0;n=0;)e.push(r);return e}),gt:he(function(e,t,n){for(var r=n<0?n+t:n;++r1?function(t,n,r){var i=e.length;while(i--)if(!e[i](t,n,r))return!1;return!0}:e[0]}function be(e,t,n){for(var r=0,i=t.length;r-1&&(o[l]=!(a[l]=f))}}else v=we(v===a?v.splice(h,v.length):v),i?i(null,a,v,u):L.apply(a,v)})}function Ce(e){for(var t,n,i,o=e.length,a=r.relative[e[0].type],s=a||r.relative[" "],u=a?1:0,c=me(function(e){return e===t},s,!0),f=me(function(e){return O(t,e)>-1},s,!0),p=[function(e,n,r){var i=!a&&(r||n!==l)||((t=n).nodeType?c(e,n,r):f(e,n,r));return t=null,i}];u1&&xe(p),u>1&&ve(e.slice(0,u-1).concat({value:" "===e[u-2].type?"*":""})).replace(B,"$1"),n,u0,i=e.length>0,o=function(o,a,s,u,c){var f,h,y,v=0,m="0",x=o&&[],b=[],w=l,C=o||i&&r.find.TAG("*",c),E=T+=null==w?1:Math.random()||.1,k=C.length;for(c&&(l=a===d||a||c);m!==k&&null!=(f=C[m]);m++){if(i&&f){h=0,a||f.ownerDocument===d||(p(f),s=!g);while(y=e[h++])if(y(f,a||d,s)){u.push(f);break}c&&(T=E)}n&&((f=!y&&f)&&v--,o&&x.push(f))}if(v+=m,n&&m!==v){h=0;while(y=t[h++])y(x,b,a,s);if(o){if(v>0)while(m--)x[m]||b[m]||(b[m]=j.call(u));b=we(b)}L.apply(u,b),c&&!o&&b.length>0&&v+t.length>1&&oe.uniqueSort(u)}return c&&(T=E,l=w),x};return n?se(o):o}return s=oe.compile=function(e,t){var n,r=[],i=[],o=S[e+" "];if(!o){t||(t=a(e)),n=t.length;while(n--)(o=Ce(t[n]))[b]?r.push(o):i.push(o);(o=S(e,Ee(i,r))).selector=e}return o},u=oe.select=function(e,t,n,i){var o,u,l,c,f,p="function"==typeof e&&e,d=!i&&a(e=p.selector||e);if(n=n||[],1===d.length){if((u=d[0]=d[0].slice(0)).length>2&&"ID"===(l=u[0]).type&&9===t.nodeType&&g&&r.relative[u[1].type]){if(!(t=(r.find.ID(l.matches[0].replace(Z,ee),t)||[])[0]))return n;p&&(t=t.parentNode),e=e.slice(u.shift().value.length)}o=V.needsContext.test(e)?0:u.length;while(o--){if(l=u[o],r.relative[c=l.type])break;if((f=r.find[c])&&(i=f(l.matches[0].replace(Z,ee),K.test(u[0].type)&&ge(t.parentNode)||t))){if(u.splice(o,1),!(e=i.length&&ve(u)))return L.apply(n,i),n;break}}}return(p||s(e,d))(i,t,!g,n,!t||K.test(e)&&ge(t.parentNode)||t),n},n.sortStable=b.split("").sort(D).join("")===b,n.detectDuplicates=!!f,p(),n.sortDetached=ue(function(e){return 1&e.compareDocumentPosition(d.createElement("fieldset"))}),ue(function(e){return e.innerHTML="","#"===e.firstChild.getAttribute("href")})||le("type|href|height|width",function(e,t,n){if(!n)return e.getAttribute(t,"type"===t.toLowerCase()?1:2)}),n.attributes&&ue(function(e){return e.innerHTML="",e.firstChild.setAttribute("value",""),""===e.firstChild.getAttribute("value")})||le("value",function(e,t,n){if(!n&&"input"===e.nodeName.toLowerCase())return e.defaultValue}),ue(function(e){return null==e.getAttribute("disabled")})||le(P,function(e,t,n){var r;if(!n)return!0===e[t]?t.toLowerCase():(r=e.getAttributeNode(t))&&r.specified?r.value:null}),oe}(e);w.find=E,w.expr=E.selectors,w.expr[":"]=w.expr.pseudos,w.uniqueSort=w.unique=E.uniqueSort,w.text=E.getText,w.isXMLDoc=E.isXML,w.contains=E.contains,w.escapeSelector=E.escape;var k=function(e,t,n){var r=[],i=void 0!==n;while((e=e[t])&&9!==e.nodeType)if(1===e.nodeType){if(i&&w(e).is(n))break;r.push(e)}return r},S=function(e,t){for(var n=[];e;e=e.nextSibling)1===e.nodeType&&e!==t&&n.push(e);return n},D=w.expr.match.needsContext;function N(e,t){return e.nodeName&&e.nodeName.toLowerCase()===t.toLowerCase()}var A=/^<([a-z][^\/\0>:\x20\t\r\n\f]*)[\x20\t\r\n\f]*\/?>(?:<\/\1>|)$/i;function j(e,t,n){return g(t)?w.grep(e,function(e,r){return!!t.call(e,r,e)!==n}):t.nodeType?w.grep(e,function(e){return e===t!==n}):"string"!=typeof t?w.grep(e,function(e){return u.call(t,e)>-1!==n}):w.filter(t,e,n)}w.filter=function(e,t,n){var r=t[0];return n&&(e=":not("+e+")"),1===t.length&&1===r.nodeType?w.find.matchesSelector(r,e)?[r]:[]:w.find.matches(e,w.grep(t,function(e){return 1===e.nodeType}))},w.fn.extend({find:function(e){var t,n,r=this.length,i=this;if("string"!=typeof e)return this.pushStack(w(e).filter(function(){for(t=0;t1?w.uniqueSort(n):n},filter:function(e){return this.pushStack(j(this,e||[],!1))},not:function(e){return this.pushStack(j(this,e||[],!0))},is:function(e){return!!j(this,"string"==typeof e&&D.test(e)?w(e):e||[],!1).length}});var q,L=/^(?:\s*(<[\w\W]+>)[^>]*|#([\w-]+))$/;(w.fn.init=function(e,t,n){var i,o;if(!e)return this;if(n=n||q,"string"==typeof e){if(!(i="<"===e[0]&&">"===e[e.length-1]&&e.length>=3?[null,e,null]:L.exec(e))||!i[1]&&t)return!t||t.jquery?(t||n).find(e):this.constructor(t).find(e);if(i[1]){if(t=t instanceof w?t[0]:t,w.merge(this,w.parseHTML(i[1],t&&t.nodeType?t.ownerDocument||t:r,!0)),A.test(i[1])&&w.isPlainObject(t))for(i in t)g(this[i])?this[i](t[i]):this.attr(i,t[i]);return this}return(o=r.getElementById(i[2]))&&(this[0]=o,this.length=1),this}return e.nodeType?(this[0]=e,this.length=1,this):g(e)?void 0!==n.ready?n.ready(e):e(w):w.makeArray(e,this)}).prototype=w.fn,q=w(r);var H=/^(?:parents|prev(?:Until|All))/,O={children:!0,contents:!0,next:!0,prev:!0};w.fn.extend({has:function(e){var t=w(e,this),n=t.length;return this.filter(function(){for(var e=0;e-1:1===n.nodeType&&w.find.matchesSelector(n,e))){o.push(n);break}return this.pushStack(o.length>1?w.uniqueSort(o):o)},index:function(e){return e?"string"==typeof e?u.call(w(e),this[0]):u.call(this,e.jquery?e[0]:e):this[0]&&this[0].parentNode?this.first().prevAll().length:-1},add:function(e,t){return this.pushStack(w.uniqueSort(w.merge(this.get(),w(e,t))))},addBack:function(e){return this.add(null==e?this.prevObject:this.prevObject.filter(e))}});function P(e,t){while((e=e[t])&&1!==e.nodeType);return e}w.each({parent:function(e){var t=e.parentNode;return t&&11!==t.nodeType?t:null},parents:function(e){return k(e,"parentNode")},parentsUntil:function(e,t,n){return k(e,"parentNode",n)},next:function(e){return P(e,"nextSibling")},prev:function(e){return P(e,"previousSibling")},nextAll:function(e){return k(e,"nextSibling")},prevAll:function(e){return k(e,"previousSibling")},nextUntil:function(e,t,n){return k(e,"nextSibling",n)},prevUntil:function(e,t,n){return k(e,"previousSibling",n)},siblings:function(e){return S((e.parentNode||{}).firstChild,e)},children:function(e){return S(e.firstChild)},contents:function(e){return N(e,"iframe")?e.contentDocument:(N(e,"template")&&(e=e.content||e),w.merge([],e.childNodes))}},function(e,t){w.fn[e]=function(n,r){var i=w.map(this,t,n);return"Until"!==e.slice(-5)&&(r=n),r&&"string"==typeof r&&(i=w.filter(r,i)),this.length>1&&(O[e]||w.uniqueSort(i),H.test(e)&&i.reverse()),this.pushStack(i)}});var M=/[^\x20\t\r\n\f]+/g;function R(e){var t={};return w.each(e.match(M)||[],function(e,n){t[n]=!0}),t}w.Callbacks=function(e){e="string"==typeof e?R(e):w.extend({},e);var t,n,r,i,o=[],a=[],s=-1,u=function(){for(i=i||e.once,r=t=!0;a.length;s=-1){n=a.shift();while(++s-1)o.splice(n,1),n<=s&&s--}),this},has:function(e){return e?w.inArray(e,o)>-1:o.length>0},empty:function(){return o&&(o=[]),this},disable:function(){return i=a=[],o=n="",this},disabled:function(){return!o},lock:function(){return i=a=[],n||t||(o=n=""),this},locked:function(){return!!i},fireWith:function(e,n){return i||(n=[e,(n=n||[]).slice?n.slice():n],a.push(n),t||u()),this},fire:function(){return l.fireWith(this,arguments),this},fired:function(){return!!r}};return l};function I(e){return e}function W(e){throw e}function $(e,t,n,r){var i;try{e&&g(i=e.promise)?i.call(e).done(t).fail(n):e&&g(i=e.then)?i.call(e,t,n):t.apply(void 0,[e].slice(r))}catch(e){n.apply(void 0,[e])}}w.extend({Deferred:function(t){var n=[["notify","progress",w.Callbacks("memory"),w.Callbacks("memory"),2],["resolve","done",w.Callbacks("once memory"),w.Callbacks("once memory"),0,"resolved"],["reject","fail",w.Callbacks("once memory"),w.Callbacks("once memory"),1,"rejected"]],r="pending",i={state:function(){return r},always:function(){return o.done(arguments).fail(arguments),this},"catch":function(e){return i.then(null,e)},pipe:function(){var e=arguments;return w.Deferred(function(t){w.each(n,function(n,r){var i=g(e[r[4]])&&e[r[4]];o[r[1]](function(){var e=i&&i.apply(this,arguments);e&&g(e.promise)?e.promise().progress(t.notify).done(t.resolve).fail(t.reject):t[r[0]+"With"](this,i?[e]:arguments)})}),e=null}).promise()},then:function(t,r,i){var o=0;function a(t,n,r,i){return function(){var s=this,u=arguments,l=function(){var e,l;if(!(t=o&&(r!==W&&(s=void 0,u=[e]),n.rejectWith(s,u))}};t?c():(w.Deferred.getStackHook&&(c.stackTrace=w.Deferred.getStackHook()),e.setTimeout(c))}}return w.Deferred(function(e){n[0][3].add(a(0,e,g(i)?i:I,e.notifyWith)),n[1][3].add(a(0,e,g(t)?t:I)),n[2][3].add(a(0,e,g(r)?r:W))}).promise()},promise:function(e){return null!=e?w.extend(e,i):i}},o={};return w.each(n,function(e,t){var a=t[2],s=t[5];i[t[1]]=a.add,s&&a.add(function(){r=s},n[3-e][2].disable,n[3-e][3].disable,n[0][2].lock,n[0][3].lock),a.add(t[3].fire),o[t[0]]=function(){return o[t[0]+"With"](this===o?void 0:this,arguments),this},o[t[0]+"With"]=a.fireWith}),i.promise(o),t&&t.call(o,o),o},when:function(e){var t=arguments.length,n=t,r=Array(n),i=o.call(arguments),a=w.Deferred(),s=function(e){return function(n){r[e]=this,i[e]=arguments.length>1?o.call(arguments):n,--t||a.resolveWith(r,i)}};if(t<=1&&($(e,a.done(s(n)).resolve,a.reject,!t),"pending"===a.state()||g(i[n]&&i[n].then)))return a.then();while(n--)$(i[n],s(n),a.reject);return a.promise()}});var B=/^(Eval|Internal|Range|Reference|Syntax|Type|URI)Error$/;w.Deferred.exceptionHook=function(t,n){e.console&&e.console.warn&&t&&B.test(t.name)&&e.console.warn("jQuery.Deferred exception: "+t.message,t.stack,n)},w.readyException=function(t){e.setTimeout(function(){throw t})};var F=w.Deferred();w.fn.ready=function(e){return F.then(e)["catch"](function(e){w.readyException(e)}),this},w.extend({isReady:!1,readyWait:1,ready:function(e){(!0===e?--w.readyWait:w.isReady)||(w.isReady=!0,!0!==e&&--w.readyWait>0||F.resolveWith(r,[w]))}}),w.ready.then=F.then;function _(){r.removeEventListener("DOMContentLoaded",_),e.removeEventListener("load",_),w.ready()}"complete"===r.readyState||"loading"!==r.readyState&&!r.documentElement.doScroll?e.setTimeout(w.ready):(r.addEventListener("DOMContentLoaded",_),e.addEventListener("load",_));var z=function(e,t,n,r,i,o,a){var s=0,u=e.length,l=null==n;if("object"===x(n)){i=!0;for(s in n)z(e,t,s,n[s],!0,o,a)}else if(void 0!==r&&(i=!0,g(r)||(a=!0),l&&(a?(t.call(e,r),t=null):(l=t,t=function(e,t,n){return l.call(w(e),n)})),t))for(;s1,null,!0)},removeData:function(e){return this.each(function(){K.remove(this,e)})}}),w.extend({queue:function(e,t,n){var r;if(e)return t=(t||"fx")+"queue",r=J.get(e,t),n&&(!r||Array.isArray(n)?r=J.access(e,t,w.makeArray(n)):r.push(n)),r||[]},dequeue:function(e,t){t=t||"fx";var n=w.queue(e,t),r=n.length,i=n.shift(),o=w._queueHooks(e,t),a=function(){w.dequeue(e,t)};"inprogress"===i&&(i=n.shift(),r--),i&&("fx"===t&&n.unshift("inprogress"),delete o.stop,i.call(e,a,o)),!r&&o&&o.empty.fire()},_queueHooks:function(e,t){var n=t+"queueHooks";return J.get(e,n)||J.access(e,n,{empty:w.Callbacks("once memory").add(function(){J.remove(e,[t+"queue",n])})})}}),w.fn.extend({queue:function(e,t){var n=2;return"string"!=typeof e&&(t=e,e="fx",n--),arguments.length\x20\t\r\n\f]+)/i,he=/^$|^module$|\/(?:java|ecma)script/i,ge={option:[1,""],thead:[1,"","
"],col:[2,"","
"],tr:[2,"","
"],td:[3,"","
"],_default:[0,"",""]};ge.optgroup=ge.option,ge.tbody=ge.tfoot=ge.colgroup=ge.caption=ge.thead,ge.th=ge.td;function ye(e,t){var n;return n="undefined"!=typeof e.getElementsByTagName?e.getElementsByTagName(t||"*"):"undefined"!=typeof e.querySelectorAll?e.querySelectorAll(t||"*"):[],void 0===t||t&&N(e,t)?w.merge([e],n):n}function ve(e,t){for(var n=0,r=e.length;n-1)i&&i.push(o);else if(l=w.contains(o.ownerDocument,o),a=ye(f.appendChild(o),"script"),l&&ve(a),n){c=0;while(o=a[c++])he.test(o.type||"")&&n.push(o)}return f}!function(){var e=r.createDocumentFragment().appendChild(r.createElement("div")),t=r.createElement("input");t.setAttribute("type","radio"),t.setAttribute("checked","checked"),t.setAttribute("name","t"),e.appendChild(t),h.checkClone=e.cloneNode(!0).cloneNode(!0).lastChild.checked,e.innerHTML="",h.noCloneChecked=!!e.cloneNode(!0).lastChild.defaultValue}();var be=r.documentElement,we=/^key/,Te=/^(?:mouse|pointer|contextmenu|drag|drop)|click/,Ce=/^([^.]*)(?:\.(.+)|)/;function Ee(){return!0}function ke(){return!1}function Se(){try{return r.activeElement}catch(e){}}function De(e,t,n,r,i,o){var a,s;if("object"==typeof t){"string"!=typeof n&&(r=r||n,n=void 0);for(s in t)De(e,s,n,r,t[s],o);return e}if(null==r&&null==i?(i=n,r=n=void 0):null==i&&("string"==typeof n?(i=r,r=void 0):(i=r,r=n,n=void 0)),!1===i)i=ke;else if(!i)return e;return 1===o&&(a=i,(i=function(e){return w().off(e),a.apply(this,arguments)}).guid=a.guid||(a.guid=w.guid++)),e.each(function(){w.event.add(this,t,i,r,n)})}w.event={global:{},add:function(e,t,n,r,i){var o,a,s,u,l,c,f,p,d,h,g,y=J.get(e);if(y){n.handler&&(n=(o=n).handler,i=o.selector),i&&w.find.matchesSelector(be,i),n.guid||(n.guid=w.guid++),(u=y.events)||(u=y.events={}),(a=y.handle)||(a=y.handle=function(t){return"undefined"!=typeof w&&w.event.triggered!==t.type?w.event.dispatch.apply(e,arguments):void 0}),l=(t=(t||"").match(M)||[""]).length;while(l--)d=g=(s=Ce.exec(t[l])||[])[1],h=(s[2]||"").split(".").sort(),d&&(f=w.event.special[d]||{},d=(i?f.delegateType:f.bindType)||d,f=w.event.special[d]||{},c=w.extend({type:d,origType:g,data:r,handler:n,guid:n.guid,selector:i,needsContext:i&&w.expr.match.needsContext.test(i),namespace:h.join(".")},o),(p=u[d])||((p=u[d]=[]).delegateCount=0,f.setup&&!1!==f.setup.call(e,r,h,a)||e.addEventListener&&e.addEventListener(d,a)),f.add&&(f.add.call(e,c),c.handler.guid||(c.handler.guid=n.guid)),i?p.splice(p.delegateCount++,0,c):p.push(c),w.event.global[d]=!0)}},remove:function(e,t,n,r,i){var o,a,s,u,l,c,f,p,d,h,g,y=J.hasData(e)&&J.get(e);if(y&&(u=y.events)){l=(t=(t||"").match(M)||[""]).length;while(l--)if(s=Ce.exec(t[l])||[],d=g=s[1],h=(s[2]||"").split(".").sort(),d){f=w.event.special[d]||{},p=u[d=(r?f.delegateType:f.bindType)||d]||[],s=s[2]&&new RegExp("(^|\\.)"+h.join("\\.(?:.*\\.|)")+"(\\.|$)"),a=o=p.length;while(o--)c=p[o],!i&&g!==c.origType||n&&n.guid!==c.guid||s&&!s.test(c.namespace)||r&&r!==c.selector&&("**"!==r||!c.selector)||(p.splice(o,1),c.selector&&p.delegateCount--,f.remove&&f.remove.call(e,c));a&&!p.length&&(f.teardown&&!1!==f.teardown.call(e,h,y.handle)||w.removeEvent(e,d,y.handle),delete u[d])}else for(d in u)w.event.remove(e,d+t[l],n,r,!0);w.isEmptyObject(u)&&J.remove(e,"handle events")}},dispatch:function(e){var t=w.event.fix(e),n,r,i,o,a,s,u=new Array(arguments.length),l=(J.get(this,"events")||{})[t.type]||[],c=w.event.special[t.type]||{};for(u[0]=t,n=1;n=1))for(;l!==this;l=l.parentNode||this)if(1===l.nodeType&&("click"!==e.type||!0!==l.disabled)){for(o=[],a={},n=0;n-1:w.find(i,this,null,[l]).length),a[i]&&o.push(r);o.length&&s.push({elem:l,handlers:o})}return l=this,u\x20\t\r\n\f]*)[^>]*)\/>/gi,Ae=/\s*$/g;function Le(e,t){return N(e,"table")&&N(11!==t.nodeType?t:t.firstChild,"tr")?w(e).children("tbody")[0]||e:e}function He(e){return e.type=(null!==e.getAttribute("type"))+"/"+e.type,e}function Oe(e){return"true/"===(e.type||"").slice(0,5)?e.type=e.type.slice(5):e.removeAttribute("type"),e}function Pe(e,t){var n,r,i,o,a,s,u,l;if(1===t.nodeType){if(J.hasData(e)&&(o=J.access(e),a=J.set(t,o),l=o.events)){delete a.handle,a.events={};for(i in l)for(n=0,r=l[i].length;n1&&"string"==typeof y&&!h.checkClone&&je.test(y))return e.each(function(i){var o=e.eq(i);v&&(t[0]=y.call(this,i,o.html())),Re(o,t,n,r)});if(p&&(i=xe(t,e[0].ownerDocument,!1,e,r),o=i.firstChild,1===i.childNodes.length&&(i=o),o||r)){for(u=(s=w.map(ye(i,"script"),He)).length;f")},clone:function(e,t,n){var r,i,o,a,s=e.cloneNode(!0),u=w.contains(e.ownerDocument,e);if(!(h.noCloneChecked||1!==e.nodeType&&11!==e.nodeType||w.isXMLDoc(e)))for(a=ye(s),r=0,i=(o=ye(e)).length;r0&&ve(a,!u&&ye(e,"script")),s},cleanData:function(e){for(var t,n,r,i=w.event.special,o=0;void 0!==(n=e[o]);o++)if(Y(n)){if(t=n[J.expando]){if(t.events)for(r in t.events)i[r]?w.event.remove(n,r):w.removeEvent(n,r,t.handle);n[J.expando]=void 0}n[K.expando]&&(n[K.expando]=void 0)}}}),w.fn.extend({detach:function(e){return Ie(this,e,!0)},remove:function(e){return Ie(this,e)},text:function(e){return z(this,function(e){return void 0===e?w.text(this):this.empty().each(function(){1!==this.nodeType&&11!==this.nodeType&&9!==this.nodeType||(this.textContent=e)})},null,e,arguments.length)},append:function(){return Re(this,arguments,function(e){1!==this.nodeType&&11!==this.nodeType&&9!==this.nodeType||Le(this,e).appendChild(e)})},prepend:function(){return Re(this,arguments,function(e){if(1===this.nodeType||11===this.nodeType||9===this.nodeType){var t=Le(this,e);t.insertBefore(e,t.firstChild)}})},before:function(){return Re(this,arguments,function(e){this.parentNode&&this.parentNode.insertBefore(e,this)})},after:function(){return Re(this,arguments,function(e){this.parentNode&&this.parentNode.insertBefore(e,this.nextSibling)})},empty:function(){for(var e,t=0;null!=(e=this[t]);t++)1===e.nodeType&&(w.cleanData(ye(e,!1)),e.textContent="");return this},clone:function(e,t){return e=null!=e&&e,t=null==t?e:t,this.map(function(){return w.clone(this,e,t)})},html:function(e){return z(this,function(e){var t=this[0]||{},n=0,r=this.length;if(void 0===e&&1===t.nodeType)return t.innerHTML;if("string"==typeof e&&!Ae.test(e)&&!ge[(de.exec(e)||["",""])[1].toLowerCase()]){e=w.htmlPrefilter(e);try{for(;n=0&&(u+=Math.max(0,Math.ceil(e["offset"+t[0].toUpperCase()+t.slice(1)]-o-u-s-.5))),u}function et(e,t,n){var r=$e(e),i=Fe(e,t,r),o="border-box"===w.css(e,"boxSizing",!1,r),a=o;if(We.test(i)){if(!n)return i;i="auto"}return a=a&&(h.boxSizingReliable()||i===e.style[t]),("auto"===i||!parseFloat(i)&&"inline"===w.css(e,"display",!1,r))&&(i=e["offset"+t[0].toUpperCase()+t.slice(1)],a=!0),(i=parseFloat(i)||0)+Ze(e,t,n||(o?"border":"content"),a,r,i)+"px"}w.extend({cssHooks:{opacity:{get:function(e,t){if(t){var n=Fe(e,"opacity");return""===n?"1":n}}}},cssNumber:{animationIterationCount:!0,columnCount:!0,fillOpacity:!0,flexGrow:!0,flexShrink:!0,fontWeight:!0,lineHeight:!0,opacity:!0,order:!0,orphans:!0,widows:!0,zIndex:!0,zoom:!0},cssProps:{},style:function(e,t,n,r){if(e&&3!==e.nodeType&&8!==e.nodeType&&e.style){var i,o,a,s=G(t),u=Xe.test(t),l=e.style;if(u||(t=Je(s)),a=w.cssHooks[t]||w.cssHooks[s],void 0===n)return a&&"get"in a&&void 0!==(i=a.get(e,!1,r))?i:l[t];"string"==(o=typeof n)&&(i=ie.exec(n))&&i[1]&&(n=ue(e,t,i),o="number"),null!=n&&n===n&&("number"===o&&(n+=i&&i[3]||(w.cssNumber[s]?"":"px")),h.clearCloneStyle||""!==n||0!==t.indexOf("background")||(l[t]="inherit"),a&&"set"in a&&void 0===(n=a.set(e,n,r))||(u?l.setProperty(t,n):l[t]=n))}},css:function(e,t,n,r){var i,o,a,s=G(t);return Xe.test(t)||(t=Je(s)),(a=w.cssHooks[t]||w.cssHooks[s])&&"get"in a&&(i=a.get(e,!0,n)),void 0===i&&(i=Fe(e,t,r)),"normal"===i&&t in Ve&&(i=Ve[t]),""===n||n?(o=parseFloat(i),!0===n||isFinite(o)?o||0:i):i}}),w.each(["height","width"],function(e,t){w.cssHooks[t]={get:function(e,n,r){if(n)return!ze.test(w.css(e,"display"))||e.getClientRects().length&&e.getBoundingClientRect().width?et(e,t,r):se(e,Ue,function(){return et(e,t,r)})},set:function(e,n,r){var i,o=$e(e),a="border-box"===w.css(e,"boxSizing",!1,o),s=r&&Ze(e,t,r,a,o);return a&&h.scrollboxSize()===o.position&&(s-=Math.ceil(e["offset"+t[0].toUpperCase()+t.slice(1)]-parseFloat(o[t])-Ze(e,t,"border",!1,o)-.5)),s&&(i=ie.exec(n))&&"px"!==(i[3]||"px")&&(e.style[t]=n,n=w.css(e,t)),Ke(e,n,s)}}}),w.cssHooks.marginLeft=_e(h.reliableMarginLeft,function(e,t){if(t)return(parseFloat(Fe(e,"marginLeft"))||e.getBoundingClientRect().left-se(e,{marginLeft:0},function(){return e.getBoundingClientRect().left}))+"px"}),w.each({margin:"",padding:"",border:"Width"},function(e,t){w.cssHooks[e+t]={expand:function(n){for(var r=0,i={},o="string"==typeof n?n.split(" "):[n];r<4;r++)i[e+oe[r]+t]=o[r]||o[r-2]||o[0];return i}},"margin"!==e&&(w.cssHooks[e+t].set=Ke)}),w.fn.extend({css:function(e,t){return z(this,function(e,t,n){var r,i,o={},a=0;if(Array.isArray(t)){for(r=$e(e),i=t.length;a1)}});function tt(e,t,n,r,i){return new tt.prototype.init(e,t,n,r,i)}w.Tween=tt,tt.prototype={constructor:tt,init:function(e,t,n,r,i,o){this.elem=e,this.prop=n,this.easing=i||w.easing._default,this.options=t,this.start=this.now=this.cur(),this.end=r,this.unit=o||(w.cssNumber[n]?"":"px")},cur:function(){var e=tt.propHooks[this.prop];return e&&e.get?e.get(this):tt.propHooks._default.get(this)},run:function(e){var t,n=tt.propHooks[this.prop];return this.options.duration?this.pos=t=w.easing[this.easing](e,this.options.duration*e,0,1,this.options.duration):this.pos=t=e,this.now=(this.end-this.start)*t+this.start,this.options.step&&this.options.step.call(this.elem,this.now,this),n&&n.set?n.set(this):tt.propHooks._default.set(this),this}},tt.prototype.init.prototype=tt.prototype,tt.propHooks={_default:{get:function(e){var t;return 1!==e.elem.nodeType||null!=e.elem[e.prop]&&null==e.elem.style[e.prop]?e.elem[e.prop]:(t=w.css(e.elem,e.prop,""))&&"auto"!==t?t:0},set:function(e){w.fx.step[e.prop]?w.fx.step[e.prop](e):1!==e.elem.nodeType||null==e.elem.style[w.cssProps[e.prop]]&&!w.cssHooks[e.prop]?e.elem[e.prop]=e.now:w.style(e.elem,e.prop,e.now+e.unit)}}},tt.propHooks.scrollTop=tt.propHooks.scrollLeft={set:function(e){e.elem.nodeType&&e.elem.parentNode&&(e.elem[e.prop]=e.now)}},w.easing={linear:function(e){return e},swing:function(e){return.5-Math.cos(e*Math.PI)/2},_default:"swing"},w.fx=tt.prototype.init,w.fx.step={};var nt,rt,it=/^(?:toggle|show|hide)$/,ot=/queueHooks$/;function at(){rt&&(!1===r.hidden&&e.requestAnimationFrame?e.requestAnimationFrame(at):e.setTimeout(at,w.fx.interval),w.fx.tick())}function st(){return e.setTimeout(function(){nt=void 0}),nt=Date.now()}function ut(e,t){var n,r=0,i={height:e};for(t=t?1:0;r<4;r+=2-t)i["margin"+(n=oe[r])]=i["padding"+n]=e;return t&&(i.opacity=i.width=e),i}function lt(e,t,n){for(var r,i=(pt.tweeners[t]||[]).concat(pt.tweeners["*"]),o=0,a=i.length;o1)},removeAttr:function(e){return this.each(function(){w.removeAttr(this,e)})}}),w.extend({attr:function(e,t,n){var r,i,o=e.nodeType;if(3!==o&&8!==o&&2!==o)return"undefined"==typeof e.getAttribute?w.prop(e,t,n):(1===o&&w.isXMLDoc(e)||(i=w.attrHooks[t.toLowerCase()]||(w.expr.match.bool.test(t)?dt:void 0)),void 0!==n?null===n?void w.removeAttr(e,t):i&&"set"in i&&void 0!==(r=i.set(e,n,t))?r:(e.setAttribute(t,n+""),n):i&&"get"in i&&null!==(r=i.get(e,t))?r:null==(r=w.find.attr(e,t))?void 0:r)},attrHooks:{type:{set:function(e,t){if(!h.radioValue&&"radio"===t&&N(e,"input")){var n=e.value;return e.setAttribute("type",t),n&&(e.value=n),t}}}},removeAttr:function(e,t){var n,r=0,i=t&&t.match(M);if(i&&1===e.nodeType)while(n=i[r++])e.removeAttribute(n)}}),dt={set:function(e,t,n){return!1===t?w.removeAttr(e,n):e.setAttribute(n,n),n}},w.each(w.expr.match.bool.source.match(/\w+/g),function(e,t){var n=ht[t]||w.find.attr;ht[t]=function(e,t,r){var i,o,a=t.toLowerCase();return r||(o=ht[a],ht[a]=i,i=null!=n(e,t,r)?a:null,ht[a]=o),i}});var gt=/^(?:input|select|textarea|button)$/i,yt=/^(?:a|area)$/i;w.fn.extend({prop:function(e,t){return z(this,w.prop,e,t,arguments.length>1)},removeProp:function(e){return this.each(function(){delete this[w.propFix[e]||e]})}}),w.extend({prop:function(e,t,n){var r,i,o=e.nodeType;if(3!==o&&8!==o&&2!==o)return 1===o&&w.isXMLDoc(e)||(t=w.propFix[t]||t,i=w.propHooks[t]),void 0!==n?i&&"set"in i&&void 0!==(r=i.set(e,n,t))?r:e[t]=n:i&&"get"in i&&null!==(r=i.get(e,t))?r:e[t]},propHooks:{tabIndex:{get:function(e){var t=w.find.attr(e,"tabindex");return t?parseInt(t,10):gt.test(e.nodeName)||yt.test(e.nodeName)&&e.href?0:-1}}},propFix:{"for":"htmlFor","class":"className"}}),h.optSelected||(w.propHooks.selected={get:function(e){var t=e.parentNode;return t&&t.parentNode&&t.parentNode.selectedIndex,null},set:function(e){var t=e.parentNode;t&&(t.selectedIndex,t.parentNode&&t.parentNode.selectedIndex)}}),w.each(["tabIndex","readOnly","maxLength","cellSpacing","cellPadding","rowSpan","colSpan","useMap","frameBorder","contentEditable"],function(){w.propFix[this.toLowerCase()]=this});function vt(e){return(e.match(M)||[]).join(" ")}function mt(e){return e.getAttribute&&e.getAttribute("class")||""}function xt(e){return Array.isArray(e)?e:"string"==typeof e?e.match(M)||[]:[]}w.fn.extend({addClass:function(e){var t,n,r,i,o,a,s,u=0;if(g(e))return this.each(function(t){w(this).addClass(e.call(this,t,mt(this)))});if((t=xt(e)).length)while(n=this[u++])if(i=mt(n),r=1===n.nodeType&&" "+vt(i)+" "){a=0;while(o=t[a++])r.indexOf(" "+o+" ")<0&&(r+=o+" ");i!==(s=vt(r))&&n.setAttribute("class",s)}return this},removeClass:function(e){var t,n,r,i,o,a,s,u=0;if(g(e))return this.each(function(t){w(this).removeClass(e.call(this,t,mt(this)))});if(!arguments.length)return this.attr("class","");if((t=xt(e)).length)while(n=this[u++])if(i=mt(n),r=1===n.nodeType&&" "+vt(i)+" "){a=0;while(o=t[a++])while(r.indexOf(" "+o+" ")>-1)r=r.replace(" "+o+" "," ");i!==(s=vt(r))&&n.setAttribute("class",s)}return this},toggleClass:function(e,t){var n=typeof e,r="string"===n||Array.isArray(e);return"boolean"==typeof t&&r?t?this.addClass(e):this.removeClass(e):g(e)?this.each(function(n){w(this).toggleClass(e.call(this,n,mt(this),t),t)}):this.each(function(){var t,i,o,a;if(r){i=0,o=w(this),a=xt(e);while(t=a[i++])o.hasClass(t)?o.removeClass(t):o.addClass(t)}else void 0!==e&&"boolean"!==n||((t=mt(this))&&J.set(this,"__className__",t),this.setAttribute&&this.setAttribute("class",t||!1===e?"":J.get(this,"__className__")||""))})},hasClass:function(e){var t,n,r=0;t=" "+e+" ";while(n=this[r++])if(1===n.nodeType&&(" "+vt(mt(n))+" ").indexOf(t)>-1)return!0;return!1}});var bt=/\r/g;w.fn.extend({val:function(e){var t,n,r,i=this[0];{if(arguments.length)return r=g(e),this.each(function(n){var i;1===this.nodeType&&(null==(i=r?e.call(this,n,w(this).val()):e)?i="":"number"==typeof i?i+="":Array.isArray(i)&&(i=w.map(i,function(e){return null==e?"":e+""})),(t=w.valHooks[this.type]||w.valHooks[this.nodeName.toLowerCase()])&&"set"in t&&void 0!==t.set(this,i,"value")||(this.value=i))});if(i)return(t=w.valHooks[i.type]||w.valHooks[i.nodeName.toLowerCase()])&&"get"in t&&void 0!==(n=t.get(i,"value"))?n:"string"==typeof(n=i.value)?n.replace(bt,""):null==n?"":n}}}),w.extend({valHooks:{option:{get:function(e){var t=w.find.attr(e,"value");return null!=t?t:vt(w.text(e))}},select:{get:function(e){var t,n,r,i=e.options,o=e.selectedIndex,a="select-one"===e.type,s=a?null:[],u=a?o+1:i.length;for(r=o<0?u:a?o:0;r-1)&&(n=!0);return n||(e.selectedIndex=-1),o}}}}),w.each(["radio","checkbox"],function(){w.valHooks[this]={set:function(e,t){if(Array.isArray(t))return e.checked=w.inArray(w(e).val(),t)>-1}},h.checkOn||(w.valHooks[this].get=function(e){return null===e.getAttribute("value")?"on":e.value})}),h.focusin="onfocusin"in e;var wt=/^(?:focusinfocus|focusoutblur)$/,Tt=function(e){e.stopPropagation()};w.extend(w.event,{trigger:function(t,n,i,o){var a,s,u,l,c,p,d,h,v=[i||r],m=f.call(t,"type")?t.type:t,x=f.call(t,"namespace")?t.namespace.split("."):[];if(s=h=u=i=i||r,3!==i.nodeType&&8!==i.nodeType&&!wt.test(m+w.event.triggered)&&(m.indexOf(".")>-1&&(m=(x=m.split(".")).shift(),x.sort()),c=m.indexOf(":")<0&&"on"+m,t=t[w.expando]?t:new w.Event(m,"object"==typeof t&&t),t.isTrigger=o?2:3,t.namespace=x.join("."),t.rnamespace=t.namespace?new RegExp("(^|\\.)"+x.join("\\.(?:.*\\.|)")+"(\\.|$)"):null,t.result=void 0,t.target||(t.target=i),n=null==n?[t]:w.makeArray(n,[t]),d=w.event.special[m]||{},o||!d.trigger||!1!==d.trigger.apply(i,n))){if(!o&&!d.noBubble&&!y(i)){for(l=d.delegateType||m,wt.test(l+m)||(s=s.parentNode);s;s=s.parentNode)v.push(s),u=s;u===(i.ownerDocument||r)&&v.push(u.defaultView||u.parentWindow||e)}a=0;while((s=v[a++])&&!t.isPropagationStopped())h=s,t.type=a>1?l:d.bindType||m,(p=(J.get(s,"events")||{})[t.type]&&J.get(s,"handle"))&&p.apply(s,n),(p=c&&s[c])&&p.apply&&Y(s)&&(t.result=p.apply(s,n),!1===t.result&&t.preventDefault());return t.type=m,o||t.isDefaultPrevented()||d._default&&!1!==d._default.apply(v.pop(),n)||!Y(i)||c&&g(i[m])&&!y(i)&&((u=i[c])&&(i[c]=null),w.event.triggered=m,t.isPropagationStopped()&&h.addEventListener(m,Tt),i[m](),t.isPropagationStopped()&&h.removeEventListener(m,Tt),w.event.triggered=void 0,u&&(i[c]=u)),t.result}},simulate:function(e,t,n){var r=w.extend(new w.Event,n,{type:e,isSimulated:!0});w.event.trigger(r,null,t)}}),w.fn.extend({trigger:function(e,t){return this.each(function(){w.event.trigger(e,t,this)})},triggerHandler:function(e,t){var n=this[0];if(n)return w.event.trigger(e,t,n,!0)}}),h.focusin||w.each({focus:"focusin",blur:"focusout"},function(e,t){var n=function(e){w.event.simulate(t,e.target,w.event.fix(e))};w.event.special[t]={setup:function(){var r=this.ownerDocument||this,i=J.access(r,t);i||r.addEventListener(e,n,!0),J.access(r,t,(i||0)+1)},teardown:function(){var r=this.ownerDocument||this,i=J.access(r,t)-1;i?J.access(r,t,i):(r.removeEventListener(e,n,!0),J.remove(r,t))}}});var Ct=e.location,Et=Date.now(),kt=/\?/;w.parseXML=function(t){var n;if(!t||"string"!=typeof t)return null;try{n=(new e.DOMParser).parseFromString(t,"text/xml")}catch(e){n=void 0}return n&&!n.getElementsByTagName("parsererror").length||w.error("Invalid XML: "+t),n};var St=/\[\]$/,Dt=/\r?\n/g,Nt=/^(?:submit|button|image|reset|file)$/i,At=/^(?:input|select|textarea|keygen)/i;function jt(e,t,n,r){var i;if(Array.isArray(t))w.each(t,function(t,i){n||St.test(e)?r(e,i):jt(e+"["+("object"==typeof i&&null!=i?t:"")+"]",i,n,r)});else if(n||"object"!==x(t))r(e,t);else for(i in t)jt(e+"["+i+"]",t[i],n,r)}w.param=function(e,t){var n,r=[],i=function(e,t){var n=g(t)?t():t;r[r.length]=encodeURIComponent(e)+"="+encodeURIComponent(null==n?"":n)};if(Array.isArray(e)||e.jquery&&!w.isPlainObject(e))w.each(e,function(){i(this.name,this.value)});else for(n in e)jt(n,e[n],t,i);return r.join("&")},w.fn.extend({serialize:function(){return w.param(this.serializeArray())},serializeArray:function(){return this.map(function(){var e=w.prop(this,"elements");return e?w.makeArray(e):this}).filter(function(){var e=this.type;return this.name&&!w(this).is(":disabled")&&At.test(this.nodeName)&&!Nt.test(e)&&(this.checked||!pe.test(e))}).map(function(e,t){var n=w(this).val();return null==n?null:Array.isArray(n)?w.map(n,function(e){return{name:t.name,value:e.replace(Dt,"\r\n")}}):{name:t.name,value:n.replace(Dt,"\r\n")}}).get()}});var qt=/%20/g,Lt=/#.*$/,Ht=/([?&])_=[^&]*/,Ot=/^(.*?):[ \t]*([^\r\n]*)$/gm,Pt=/^(?:about|app|app-storage|.+-extension|file|res|widget):$/,Mt=/^(?:GET|HEAD)$/,Rt=/^\/\//,It={},Wt={},$t="*/".concat("*"),Bt=r.createElement("a");Bt.href=Ct.href;function Ft(e){return function(t,n){"string"!=typeof t&&(n=t,t="*");var r,i=0,o=t.toLowerCase().match(M)||[];if(g(n))while(r=o[i++])"+"===r[0]?(r=r.slice(1)||"*",(e[r]=e[r]||[]).unshift(n)):(e[r]=e[r]||[]).push(n)}}function _t(e,t,n,r){var i={},o=e===Wt;function a(s){var u;return i[s]=!0,w.each(e[s]||[],function(e,s){var l=s(t,n,r);return"string"!=typeof l||o||i[l]?o?!(u=l):void 0:(t.dataTypes.unshift(l),a(l),!1)}),u}return a(t.dataTypes[0])||!i["*"]&&a("*")}function zt(e,t){var n,r,i=w.ajaxSettings.flatOptions||{};for(n in t)void 0!==t[n]&&((i[n]?e:r||(r={}))[n]=t[n]);return r&&w.extend(!0,e,r),e}function Xt(e,t,n){var r,i,o,a,s=e.contents,u=e.dataTypes;while("*"===u[0])u.shift(),void 0===r&&(r=e.mimeType||t.getResponseHeader("Content-Type"));if(r)for(i in s)if(s[i]&&s[i].test(r)){u.unshift(i);break}if(u[0]in n)o=u[0];else{for(i in n){if(!u[0]||e.converters[i+" "+u[0]]){o=i;break}a||(a=i)}o=o||a}if(o)return o!==u[0]&&u.unshift(o),n[o]}function Ut(e,t,n,r){var i,o,a,s,u,l={},c=e.dataTypes.slice();if(c[1])for(a in e.converters)l[a.toLowerCase()]=e.converters[a];o=c.shift();while(o)if(e.responseFields[o]&&(n[e.responseFields[o]]=t),!u&&r&&e.dataFilter&&(t=e.dataFilter(t,e.dataType)),u=o,o=c.shift())if("*"===o)o=u;else if("*"!==u&&u!==o){if(!(a=l[u+" "+o]||l["* "+o]))for(i in l)if((s=i.split(" "))[1]===o&&(a=l[u+" "+s[0]]||l["* "+s[0]])){!0===a?a=l[i]:!0!==l[i]&&(o=s[0],c.unshift(s[1]));break}if(!0!==a)if(a&&e["throws"])t=a(t);else try{t=a(t)}catch(e){return{state:"parsererror",error:a?e:"No conversion from "+u+" to "+o}}}return{state:"success",data:t}}w.extend({active:0,lastModified:{},etag:{},ajaxSettings:{url:Ct.href,type:"GET",isLocal:Pt.test(Ct.protocol),global:!0,processData:!0,async:!0,contentType:"application/x-www-form-urlencoded; charset=UTF-8",accepts:{"*":$t,text:"text/plain",html:"text/html",xml:"application/xml, text/xml",json:"application/json, text/javascript"},contents:{xml:/\bxml\b/,html:/\bhtml/,json:/\bjson\b/},responseFields:{xml:"responseXML",text:"responseText",json:"responseJSON"},converters:{"* text":String,"text html":!0,"text json":JSON.parse,"text xml":w.parseXML},flatOptions:{url:!0,context:!0}},ajaxSetup:function(e,t){return t?zt(zt(e,w.ajaxSettings),t):zt(w.ajaxSettings,e)},ajaxPrefilter:Ft(It),ajaxTransport:Ft(Wt),ajax:function(t,n){"object"==typeof t&&(n=t,t=void 0),n=n||{};var i,o,a,s,u,l,c,f,p,d,h=w.ajaxSetup({},n),g=h.context||h,y=h.context&&(g.nodeType||g.jquery)?w(g):w.event,v=w.Deferred(),m=w.Callbacks("once memory"),x=h.statusCode||{},b={},T={},C="canceled",E={readyState:0,getResponseHeader:function(e){var t;if(c){if(!s){s={};while(t=Ot.exec(a))s[t[1].toLowerCase()]=t[2]}t=s[e.toLowerCase()]}return null==t?null:t},getAllResponseHeaders:function(){return c?a:null},setRequestHeader:function(e,t){return null==c&&(e=T[e.toLowerCase()]=T[e.toLowerCase()]||e,b[e]=t),this},overrideMimeType:function(e){return null==c&&(h.mimeType=e),this},statusCode:function(e){var t;if(e)if(c)E.always(e[E.status]);else for(t in e)x[t]=[x[t],e[t]];return this},abort:function(e){var t=e||C;return i&&i.abort(t),k(0,t),this}};if(v.promise(E),h.url=((t||h.url||Ct.href)+"").replace(Rt,Ct.protocol+"//"),h.type=n.method||n.type||h.method||h.type,h.dataTypes=(h.dataType||"*").toLowerCase().match(M)||[""],null==h.crossDomain){l=r.createElement("a");try{l.href=h.url,l.href=l.href,h.crossDomain=Bt.protocol+"//"+Bt.host!=l.protocol+"//"+l.host}catch(e){h.crossDomain=!0}}if(h.data&&h.processData&&"string"!=typeof h.data&&(h.data=w.param(h.data,h.traditional)),_t(It,h,n,E),c)return E;(f=w.event&&h.global)&&0==w.active++&&w.event.trigger("ajaxStart"),h.type=h.type.toUpperCase(),h.hasContent=!Mt.test(h.type),o=h.url.replace(Lt,""),h.hasContent?h.data&&h.processData&&0===(h.contentType||"").indexOf("application/x-www-form-urlencoded")&&(h.data=h.data.replace(qt,"+")):(d=h.url.slice(o.length),h.data&&(h.processData||"string"==typeof h.data)&&(o+=(kt.test(o)?"&":"?")+h.data,delete h.data),!1===h.cache&&(o=o.replace(Ht,"$1"),d=(kt.test(o)?"&":"?")+"_="+Et+++d),h.url=o+d),h.ifModified&&(w.lastModified[o]&&E.setRequestHeader("If-Modified-Since",w.lastModified[o]),w.etag[o]&&E.setRequestHeader("If-None-Match",w.etag[o])),(h.data&&h.hasContent&&!1!==h.contentType||n.contentType)&&E.setRequestHeader("Content-Type",h.contentType),E.setRequestHeader("Accept",h.dataTypes[0]&&h.accepts[h.dataTypes[0]]?h.accepts[h.dataTypes[0]]+("*"!==h.dataTypes[0]?", "+$t+"; q=0.01":""):h.accepts["*"]);for(p in h.headers)E.setRequestHeader(p,h.headers[p]);if(h.beforeSend&&(!1===h.beforeSend.call(g,E,h)||c))return E.abort();if(C="abort",m.add(h.complete),E.done(h.success),E.fail(h.error),i=_t(Wt,h,n,E)){if(E.readyState=1,f&&y.trigger("ajaxSend",[E,h]),c)return E;h.async&&h.timeout>0&&(u=e.setTimeout(function(){E.abort("timeout")},h.timeout));try{c=!1,i.send(b,k)}catch(e){if(c)throw e;k(-1,e)}}else k(-1,"No Transport");function k(t,n,r,s){var l,p,d,b,T,C=n;c||(c=!0,u&&e.clearTimeout(u),i=void 0,a=s||"",E.readyState=t>0?4:0,l=t>=200&&t<300||304===t,r&&(b=Xt(h,E,r)),b=Ut(h,b,E,l),l?(h.ifModified&&((T=E.getResponseHeader("Last-Modified"))&&(w.lastModified[o]=T),(T=E.getResponseHeader("etag"))&&(w.etag[o]=T)),204===t||"HEAD"===h.type?C="nocontent":304===t?C="notmodified":(C=b.state,p=b.data,l=!(d=b.error))):(d=C,!t&&C||(C="error",t<0&&(t=0))),E.status=t,E.statusText=(n||C)+"",l?v.resolveWith(g,[p,C,E]):v.rejectWith(g,[E,C,d]),E.statusCode(x),x=void 0,f&&y.trigger(l?"ajaxSuccess":"ajaxError",[E,h,l?p:d]),m.fireWith(g,[E,C]),f&&(y.trigger("ajaxComplete",[E,h]),--w.active||w.event.trigger("ajaxStop")))}return E},getJSON:function(e,t,n){return w.get(e,t,n,"json")},getScript:function(e,t){return w.get(e,void 0,t,"script")}}),w.each(["get","post"],function(e,t){w[t]=function(e,n,r,i){return g(n)&&(i=i||r,r=n,n=void 0),w.ajax(w.extend({url:e,type:t,dataType:i,data:n,success:r},w.isPlainObject(e)&&e))}}),w._evalUrl=function(e){return w.ajax({url:e,type:"GET",dataType:"script",cache:!0,async:!1,global:!1,"throws":!0})},w.fn.extend({wrapAll:function(e){var t;return this[0]&&(g(e)&&(e=e.call(this[0])),t=w(e,this[0].ownerDocument).eq(0).clone(!0),this[0].parentNode&&t.insertBefore(this[0]),t.map(function(){var e=this;while(e.firstElementChild)e=e.firstElementChild;return e}).append(this)),this},wrapInner:function(e){return g(e)?this.each(function(t){w(this).wrapInner(e.call(this,t))}):this.each(function(){var t=w(this),n=t.contents();n.length?n.wrapAll(e):t.append(e)})},wrap:function(e){var t=g(e);return this.each(function(n){w(this).wrapAll(t?e.call(this,n):e)})},unwrap:function(e){return this.parent(e).not("body").each(function(){w(this).replaceWith(this.childNodes)}),this}}),w.expr.pseudos.hidden=function(e){return!w.expr.pseudos.visible(e)},w.expr.pseudos.visible=function(e){return!!(e.offsetWidth||e.offsetHeight||e.getClientRects().length)},w.ajaxSettings.xhr=function(){try{return new e.XMLHttpRequest}catch(e){}};var Vt={0:200,1223:204},Gt=w.ajaxSettings.xhr();h.cors=!!Gt&&"withCredentials"in Gt,h.ajax=Gt=!!Gt,w.ajaxTransport(function(t){var n,r;if(h.cors||Gt&&!t.crossDomain)return{send:function(i,o){var a,s=t.xhr();if(s.open(t.type,t.url,t.async,t.username,t.password),t.xhrFields)for(a in t.xhrFields)s[a]=t.xhrFields[a];t.mimeType&&s.overrideMimeType&&s.overrideMimeType(t.mimeType),t.crossDomain||i["X-Requested-With"]||(i["X-Requested-With"]="XMLHttpRequest");for(a in i)s.setRequestHeader(a,i[a]);n=function(e){return function(){n&&(n=r=s.onload=s.onerror=s.onabort=s.ontimeout=s.onreadystatechange=null,"abort"===e?s.abort():"error"===e?"number"!=typeof s.status?o(0,"error"):o(s.status,s.statusText):o(Vt[s.status]||s.status,s.statusText,"text"!==(s.responseType||"text")||"string"!=typeof s.responseText?{binary:s.response}:{text:s.responseText},s.getAllResponseHeaders()))}},s.onload=n(),r=s.onerror=s.ontimeout=n("error"),void 0!==s.onabort?s.onabort=r:s.onreadystatechange=function(){4===s.readyState&&e.setTimeout(function(){n&&r()})},n=n("abort");try{s.send(t.hasContent&&t.data||null)}catch(e){if(n)throw e}},abort:function(){n&&n()}}}),w.ajaxPrefilter(function(e){e.crossDomain&&(e.contents.script=!1)}),w.ajaxSetup({accepts:{script:"text/javascript, application/javascript, application/ecmascript, application/x-ecmascript"},contents:{script:/\b(?:java|ecma)script\b/},converters:{"text script":function(e){return w.globalEval(e),e}}}),w.ajaxPrefilter("script",function(e){void 0===e.cache&&(e.cache=!1),e.crossDomain&&(e.type="GET")}),w.ajaxTransport("script",function(e){if(e.crossDomain){var t,n;return{send:function(i,o){t=w(" - - - - - - - -
-
- - - - - - -
-
B15F -
-
Board 15 Famulus Edition
-
-
- - - - - - - - -
-
- - -
- -
- - -
-
-
-
plottyfile.cpp
-
-
-
1 #include "plottyfile.h"
2 
4 {
5  dots.push_back(dot);
6 }
7 
9 {
10  dots.push_back(dot);
11 }
12 
13 void PlottyFile::setFunctionType(FunctionType function_type)
14 {
15  this->function_type = function_type;
16 }
17 
18 void PlottyFile::setQuadrant(uint8_t quadrant)
19 {
20  if(quadrant < 1 || quadrant > 4)
21  throw std::range_error("Ungueltiger Quadrant");
22  this->quadrant = quadrant;
23 }
24 
25 void PlottyFile::setRefX(uint16_t ref_x)
26 {
27  this->ref_x = ref_x;
28 }
29 
30 void PlottyFile::setRefY(uint16_t ref_y)
31 {
32  this->ref_y = ref_y;
33 }
34 
35 void PlottyFile::setParaFirstCurve(uint16_t para_first)
36 {
37  this->para_first = para_first;
38 }
39 
40 void PlottyFile::setParaStepWidth(uint16_t para_stepwidth)
41 {
42  this->para_stepwidth = para_stepwidth;
43 }
44 
45 void PlottyFile::setUnitX(std::string unit_x)
46 {
47  this->unit_x = unit_x;
48 }
49 
50 void PlottyFile::setDescX(std::string desc_x)
51 {
52  this->desc_x = desc_x;
53 }
54 
55 void PlottyFile::setUnitY(std::string unit_y)
56 {
57  this->unit_y = unit_y;
58 }
59 
60 void PlottyFile::setDescY(std::string desc_y)
61 {
62  this->desc_y = desc_y;
63 }
64 
65 void PlottyFile::setUnitPara(std::string unit_para)
66 {
67  this->unit_para = unit_para;
68 }
69 
70 void PlottyFile::setDescPara(std::string desc_para)
71 {
72  this->desc_para = desc_para;
73 }
74 
75 FunctionType PlottyFile::getFunctionType() const
76 {
77  return function_type;
78 }
79 
80 uint8_t PlottyFile::getQuadrant() const
81 {
82  return quadrant;
83 }
84 
85 uint16_t PlottyFile::getRefX() const
86 {
87  return ref_x;
88 }
89 
90 uint16_t PlottyFile::getRefY() const
91 {
92  return ref_y;
93 }
94 
96 {
97  return para_first;
98 }
99 
101 {
102  return para_stepwidth;
103 }
104 
105 std::string PlottyFile::getUnitX() const
106 {
107  return unit_x;
108 }
109 
110 std::string PlottyFile::getDescX() const
111 {
112  return desc_x;
113 }
114 
115 std::string PlottyFile::getUnitY() const
116 {
117  return unit_y;
118 }
119 
120 std::string PlottyFile::getDescY() const
121 {
122  return desc_y;
123 }
124 
125 std::string PlottyFile::getUnitPara() const
126 {
127  return unit_para;
128 }
129 
130 std::string PlottyFile::getDescPara() const
131 {
132  return desc_para;
133 }
134 
135 void PlottyFile::prepStr(std::string& str, uint8_t len)
136 {
137  if(str.length() > len)
138  throw std::runtime_error("Zu grosser String.");
139 
140  if(str.length() != len)
141  str += '\n';
142 
143  while(str.length() < len)
144  str += '\0';
145 }
146 
147 void PlottyFile::writeToFile(std::string filename)
148 {
149  prepStr(unit_x, STR_LEN_SHORT);
150  prepStr(desc_x, STR_LEN_LARGE);
151  prepStr(unit_y, STR_LEN_SHORT);
152  prepStr(desc_y, STR_LEN_LARGE);
153  prepStr(unit_para, STR_LEN_SHORT);
154  prepStr(desc_para, STR_LEN_LARGE);
155 
156  std::ofstream file(filename);
157 
158  // write file header
159  file.write(reinterpret_cast<char*>(&command), 1);
160  file.write(head.c_str(), head.length());
161  file.write(filetype.c_str(), filetype.length());
162  file.write(reinterpret_cast<char*>(&version), 2);
163  file.write(reinterpret_cast<char*>(&subversion), 2);
164  file.put(static_cast<uint8_t>(function_type));
165  file.write(reinterpret_cast<char*>(&quadrant), 1);
166  file.write(reinterpret_cast<char*>(&ref_x), 2);
167  file.write(reinterpret_cast<char*>(&ref_y), 2);
168  file.write(reinterpret_cast<char*>(&para_first), 2);
169  file.write(reinterpret_cast<char*>(&para_stepwidth), 2);
170  file.write(unit_x.c_str(), unit_x.length());
171  file.write(desc_x.c_str(), desc_x.length());
172  file.write(unit_y.c_str(), unit_y.length());
173  file.write(desc_y.c_str(), desc_y.length());
174  file.write(unit_para.c_str(), unit_para.length());
175  file.write(desc_para.c_str(), desc_para.length());
176  file.write(reinterpret_cast<const char*>(&eof), 1);
177 
178  // make sure header size is 256 Byte
179  while(file.tellp() < 256)
180  file.put(0);
181 
182  for(Dot& dot : dots)
183  {
184  file.put((dot.getX() >> 8) | (static_cast<uint8_t>(dot.getCurve()) << 2));
185  file.put(dot.getX() & 0xFF);
186  file.put(dot.getY() >> 8);
187  file.put(dot.getY() & 0xFF);
188  }
189 
190  file.close();
191 }
192 
193 void PlottyFile::startPlotty(std::string filename)
194 {
195  int code = system(("plotty --in " + filename).c_str());
196  if(code)
197  throw std::runtime_error("Fehler beim Aufruf von plotty");
198 }
-
void setParaStepWidth(uint16_t para_stepwidth)
Definition: plottyfile.cpp:40
-
uint8_t getQuadrant(void) const
Definition: plottyfile.cpp:80
-
void startPlotty(std::string filename)
Definition: plottyfile.cpp:193
-
void writeToFile(std::string filename)
Definition: plottyfile.cpp:147
-
void setUnitX(std::string unit_x)
Definition: plottyfile.cpp:45
-
void setUnitPara(std::string unit_para)
Definition: plottyfile.cpp:65
-
void setDescY(std::string desc_y)
Definition: plottyfile.cpp:60
-
void setQuadrant(uint8_t quadrant)
Definition: plottyfile.cpp:18
-
std::string getDescY(void) const
Definition: plottyfile.cpp:120
-
void setRefY(uint16_t ref_y)
Definition: plottyfile.cpp:30
-
std::string getDescX(void) const
Definition: plottyfile.cpp:110
-
void setFunctionType(FunctionType function_type)
Definition: plottyfile.cpp:13
-
void setDescX(std::string desc_x)
Definition: plottyfile.cpp:50
-
Definition: dot.h:12
-
void setRefX(uint16_t ref_x)
Definition: plottyfile.cpp:25
-
void setUnitY(std::string unit_y)
Definition: plottyfile.cpp:55
-
void addDot(Dot &dot)
Definition: plottyfile.cpp:3
-
void setDescPara(std::string desc_para)
Definition: plottyfile.cpp:70
-
uint16_t getParaStepWidth(void) const
Definition: plottyfile.cpp:100
-
std::string getDescPara(void) const
Definition: plottyfile.cpp:130
-
void setParaFirstCurve(uint16_t para_first)
Definition: plottyfile.cpp:35
-
std::string getUnitY(void) const
Definition: plottyfile.cpp:115
-
uint16_t getParaFirstCurve(void) const
Definition: plottyfile.cpp:95
-
uint16_t getRefX(void) const
Definition: plottyfile.cpp:85
-
std::string getUnitPara(void) const
Definition: plottyfile.cpp:125
-
FunctionType getFunctionType(void) const
Definition: plottyfile.cpp:75
-
uint16_t getRefY(void) const
Definition: plottyfile.cpp:90
-
std::string getUnitX(void) const
Definition: plottyfile.cpp:105
- - - - diff --git a/docs/html/plottyfile_8h_source.html b/docs/html/plottyfile_8h_source.html deleted file mode 100644 index 1021496..0000000 --- a/docs/html/plottyfile_8h_source.html +++ /dev/null @@ -1,110 +0,0 @@ - - - - - - - -B15F: drv/plottyfile.h Source File - - - - - - - - - -
-
- - - - - - -
-
B15F -
-
Board 15 Famulus Edition
-
-
- - - - - - - - -
-
- - -
- -
- - -
-
-
-
plottyfile.h
-
-
-
1 #ifndef PLOTTYFILE_H
2 #define PLOTTYFILE_H
3 
4 #include <iostream>
5 #include <fstream>
6 #include <exception>
7 #include <vector>
8 #include "dot.h"
9 
10 enum FunctionType
11 {
12  CurveFamily = 'S',
13  Curve = 'C',
14  Level = 'P'
15 };
16 
20 {
21 public:
26  void addDot(Dot& dot);
27 
32  void addDot(Dot dot);
33 
38  void setFunctionType(FunctionType function_type);
39 
44  void setQuadrant(uint8_t quadrant);
45 
50  void setRefX(uint16_t ref_x);
51 
56  void setRefY(uint16_t ref_y);
57 
63  void setParaFirstCurve(uint16_t para_first);
64 
69  void setParaStepWidth(uint16_t para_stepwidth);
70 
75  void setUnitX(std::string unit_x);
76 
81  void setDescX(std::string desc_x);
82 
87  void setUnitY(std::string unit_y);
88 
93  void setDescY(std::string desc_y);
94 
99  void setUnitPara(std::string unit_para);
104  void setDescPara(std::string desc_para);
105 
106 
107 
111  FunctionType getFunctionType(void) const;
112 
116  uint8_t getQuadrant(void) const;
117 
121  uint16_t getRefX(void) const;
122 
126  uint16_t getRefY(void) const;
127 
131  uint16_t getParaFirstCurve(void) const;
132 
136  uint16_t getParaStepWidth(void) const;
137 
141  std::string getUnitX(void) const;
142 
146  std::string getDescX(void) const;
147 
151  std::string getUnitY(void) const;
152 
156  std::string getDescY(void) const;
157 
161  std::string getUnitPara(void) const;
162 
166  std::string getDescPara(void) const;
167 
168 
173  void writeToFile(std::string filename);
174 
179  void startPlotty(std::string filename);
180 private:
181  void prepStr(std::string& str, uint8_t len);
182 
183  std::vector<Dot> dots;
184 
185  int8_t command = 0x1D;
186  const std::string head = "HTWK-HWLab";
187  const std::string filetype = "MD";
188  int16_t version = 1;
189  int16_t subversion = 0;
190  FunctionType function_type = FunctionType::Curve;
191  uint8_t quadrant = 1;
192  uint16_t ref_x = 1023;
193  uint16_t ref_y = 1023;
194  uint16_t para_first = 1;
195  uint16_t para_stepwidth = 1;
196  std::string unit_x;
197  std::string desc_x;
198  std::string unit_y;
199  std::string desc_y;
200  std::string unit_para;
201  std::string desc_para;
202  const uint8_t eof = 0xD;
203 
204  constexpr static uint8_t STR_LEN_SHORT = 10;
205  constexpr static uint8_t STR_LEN_LARGE = 20;
206 };
207 
208 #endif // PLOTTYFILE_H
-
void setParaStepWidth(uint16_t para_stepwidth)
Definition: plottyfile.cpp:40
-
uint8_t getQuadrant(void) const
Definition: plottyfile.cpp:80
-
void startPlotty(std::string filename)
Definition: plottyfile.cpp:193
-
void writeToFile(std::string filename)
Definition: plottyfile.cpp:147
-
void setUnitX(std::string unit_x)
Definition: plottyfile.cpp:45
-
void setUnitPara(std::string unit_para)
Definition: plottyfile.cpp:65
-
void setDescY(std::string desc_y)
Definition: plottyfile.cpp:60
-
void setQuadrant(uint8_t quadrant)
Definition: plottyfile.cpp:18
-
std::string getDescY(void) const
Definition: plottyfile.cpp:120
- -
void setRefY(uint16_t ref_y)
Definition: plottyfile.cpp:30
-
std::string getDescX(void) const
Definition: plottyfile.cpp:110
-
void setFunctionType(FunctionType function_type)
Definition: plottyfile.cpp:13
-
void setDescX(std::string desc_x)
Definition: plottyfile.cpp:50
-
Definition: dot.h:12
-
void setRefX(uint16_t ref_x)
Definition: plottyfile.cpp:25
-
void setUnitY(std::string unit_y)
Definition: plottyfile.cpp:55
-
void addDot(Dot &dot)
Definition: plottyfile.cpp:3
-
void setDescPara(std::string desc_para)
Definition: plottyfile.cpp:70
-
uint16_t getParaStepWidth(void) const
Definition: plottyfile.cpp:100
-
std::string getDescPara(void) const
Definition: plottyfile.cpp:130
-
void setParaFirstCurve(uint16_t para_first)
Definition: plottyfile.cpp:35
-
std::string getUnitY(void) const
Definition: plottyfile.cpp:115
-
uint16_t getParaFirstCurve(void) const
Definition: plottyfile.cpp:95
-
uint16_t getRefX(void) const
Definition: plottyfile.cpp:85
-
std::string getUnitPara(void) const
Definition: plottyfile.cpp:125
-
FunctionType getFunctionType(void) const
Definition: plottyfile.cpp:75
-
uint16_t getRefY(void) const
Definition: plottyfile.cpp:90
-
std::string getUnitX(void) const
Definition: plottyfile.cpp:105
- - - - diff --git a/docs/html/search/all_0.html b/docs/html/search/all_0.html deleted file mode 100644 index a52d5f0..0000000 --- a/docs/html/search/all_0.html +++ /dev/null @@ -1,30 +0,0 @@ - - - - - - - - - -
-
Loading...
-
- -
Searching...
-
No Matches
- -
- - diff --git a/docs/html/search/all_0.js b/docs/html/search/all_0.js deleted file mode 100644 index c4bd927..0000000 --- a/docs/html/search/all_0.js +++ /dev/null @@ -1,10 +0,0 @@ -var searchData= -[ - ['abort',['abort',['../classB15F.html#a3f09a418f9e3be5d1d750e4515c96f1e',1,'B15F::abort(std::string msg)'],['../classB15F.html#ac962a6a49bddd0e261a8c7d3aded23f8',1,'B15F::abort(std::exception &ex)']]], - ['activateselftestmode',['activateSelfTestMode',['../classB15F.html#ad9bf80ee2485fb5aac9926c6ef0731f1',1,'B15F']]], - ['adddot',['addDot',['../classPlottyFile.html#ae091e6eaaca16302f17572ac7dec6f7c',1,'PlottyFile::addDot(Dot &dot)'],['../classPlottyFile.html#a80e4b45219b4e9571992edfc28a28568',1,'PlottyFile::addDot(Dot dot)']]], - ['analogread',['analogRead',['../classB15F.html#ae0bd1f69751e2dc3c462db9213fc4627',1,'B15F']]], - ['analogsequence',['analogSequence',['../classB15F.html#ab82a324426c3063318c6cafb3089ae02',1,'B15F']]], - ['analogwrite0',['analogWrite0',['../classB15F.html#afc55fd590c7fa5c942d100cb60c4b0d3',1,'B15F']]], - ['analogwrite1',['analogWrite1',['../classB15F.html#a7f1becceac744f5cd2ad529748fd836f',1,'B15F']]] -]; diff --git a/docs/html/search/all_1.html b/docs/html/search/all_1.html deleted file mode 100644 index 0fcb704..0000000 --- a/docs/html/search/all_1.html +++ /dev/null @@ -1,30 +0,0 @@ - - - - - - - - - -
-
Loading...
-
- -
Searching...
-
No Matches
- -
- - diff --git a/docs/html/search/all_1.js b/docs/html/search/all_1.js deleted file mode 100644 index 4a50fd7..0000000 --- a/docs/html/search/all_1.js +++ /dev/null @@ -1,5 +0,0 @@ -var searchData= -[ - ['b15f',['B15F',['../classB15F.html',1,'']]], - ['baudrate',['BAUDRATE',['../classB15F.html#a7d548d6861cfc69753161bf9cda14f87',1,'B15F']]] -]; diff --git a/docs/html/search/all_2.html b/docs/html/search/all_2.html deleted file mode 100644 index 19c530f..0000000 --- a/docs/html/search/all_2.html +++ /dev/null @@ -1,30 +0,0 @@ - - - - - - - - - -
-
Loading...
-
- -
Searching...
-
No Matches
- -
- - diff --git a/docs/html/search/all_2.js b/docs/html/search/all_2.js deleted file mode 100644 index 7200182..0000000 --- a/docs/html/search/all_2.js +++ /dev/null @@ -1,6 +0,0 @@ -var searchData= -[ - ['clearinputbuffer',['clearInputBuffer',['../classUSART.html#a28a2b4c5ed66b2c3a81196f76884f156',1,'USART']]], - ['clearoutputbuffer',['clearOutputBuffer',['../classUSART.html#a756d268a8762c316f91ca3238972b0c1',1,'USART']]], - ['closedevice',['closeDevice',['../classUSART.html#af80d6291ac1d2df04cfa1d8d27458cc5',1,'USART']]] -]; diff --git a/docs/html/search/all_3.html b/docs/html/search/all_3.html deleted file mode 100644 index 1ae887f..0000000 --- a/docs/html/search/all_3.html +++ /dev/null @@ -1,30 +0,0 @@ - - - - - - - - - -
-
Loading...
-
- -
Searching...
-
No Matches
- -
- - diff --git a/docs/html/search/all_3.js b/docs/html/search/all_3.js deleted file mode 100644 index 08afc23..0000000 --- a/docs/html/search/all_3.js +++ /dev/null @@ -1,12 +0,0 @@ -var searchData= -[ - ['delay_5fms',['delay_ms',['../classB15F.html#aaffce20afb9f06bc4b7556c70ce76416',1,'B15F']]], - ['delay_5fus',['delay_us',['../classB15F.html#adcaac8ae8db3c28eccb499fbd720361f',1,'B15F']]], - ['digitalread0',['digitalRead0',['../classB15F.html#ae0df6d423deeb2fd610968bd1c72060e',1,'B15F']]], - ['digitalread1',['digitalRead1',['../classB15F.html#afc76b612dd4faeee0ac02a66b65af5f2',1,'B15F']]], - ['digitalwrite0',['digitalWrite0',['../classB15F.html#a13797edea1c50278988373acbd110064',1,'B15F']]], - ['digitalwrite1',['digitalWrite1',['../classB15F.html#aa225e7fc813849634063e071ef25db1b',1,'B15F']]], - ['discard',['discard',['../classB15F.html#ae4740cd473f40a1a4121dfa66b25e1d5',1,'B15F']]], - ['dot',['Dot',['../classDot.html',1,'Dot'],['../classDot.html#ad975f119c0627a928790b3cd5ca6da05',1,'Dot::Dot()']]], - ['driverexception',['DriverException',['../classDriverException.html',1,'']]] -]; diff --git a/docs/html/search/all_4.html b/docs/html/search/all_4.html deleted file mode 100644 index 14c90ef..0000000 --- a/docs/html/search/all_4.html +++ /dev/null @@ -1,30 +0,0 @@ - - - - - - - - - -
-
Loading...
-
- -
Searching...
-
No Matches
- -
- - diff --git a/docs/html/search/all_4.js b/docs/html/search/all_4.js deleted file mode 100644 index 4acd298..0000000 --- a/docs/html/search/all_4.js +++ /dev/null @@ -1,5 +0,0 @@ -var searchData= -[ - ['exec',['exec',['../classB15F.html#a1a7ac52984ed7ecac008a3e4060eee3a',1,'B15F']]], - ['einführung',['Einführung',['../index.html',1,'']]] -]; diff --git a/docs/html/search/all_5.html b/docs/html/search/all_5.html deleted file mode 100644 index 60fa53e..0000000 --- a/docs/html/search/all_5.html +++ /dev/null @@ -1,30 +0,0 @@ - - - - - - - - - -
-
Loading...
-
- -
Searching...
-
No Matches
- -
- - diff --git a/docs/html/search/all_5.js b/docs/html/search/all_5.js deleted file mode 100644 index 3641ddc..0000000 --- a/docs/html/search/all_5.js +++ /dev/null @@ -1,4 +0,0 @@ -var searchData= -[ - ['flushoutputbuffer',['flushOutputBuffer',['../classUSART.html#adb6ff4d1cf1af79ca255c5a81780200d',1,'USART']]] -]; diff --git a/docs/html/search/all_6.html b/docs/html/search/all_6.html deleted file mode 100644 index 7180363..0000000 --- a/docs/html/search/all_6.html +++ /dev/null @@ -1,30 +0,0 @@ - - - - - - - - - -
-
Loading...
-
- -
Searching...
-
No Matches
- -
- - diff --git a/docs/html/search/all_6.js b/docs/html/search/all_6.js deleted file mode 100644 index 9518d98..0000000 --- a/docs/html/search/all_6.js +++ /dev/null @@ -1,23 +0,0 @@ -var searchData= -[ - ['getbaudrate',['getBaudrate',['../classUSART.html#a4918672d8069df205378a528b1892db3',1,'USART']]], - ['getboardinfo',['getBoardInfo',['../classB15F.html#a4f01677e73d6d172a2c1cae9427a591b',1,'B15F']]], - ['getcurve',['getCurve',['../classDot.html#ad0ae7dc1a9be3d8d985affc089b34396',1,'Dot']]], - ['getdescpara',['getDescPara',['../classPlottyFile.html#a536967daae3b382a5d6575f55450e198',1,'PlottyFile']]], - ['getdescx',['getDescX',['../classPlottyFile.html#a9cf7baa569be308c2cf6e07cadded09d',1,'PlottyFile']]], - ['getdescy',['getDescY',['../classPlottyFile.html#ab4a847fd71a804182f211233e194df45',1,'PlottyFile']]], - ['getfunctiontype',['getFunctionType',['../classPlottyFile.html#a88bb7d8350ed5fbc7a40e8d903c94bdb',1,'PlottyFile']]], - ['getinstance',['getInstance',['../classB15F.html#a8b4533d232c55ef2aa967e39e2d23380',1,'B15F']]], - ['getparafirstcurve',['getParaFirstCurve',['../classPlottyFile.html#a40828c93d66fe80166c4f603d5bdfa48',1,'PlottyFile']]], - ['getparastepwidth',['getParaStepWidth',['../classPlottyFile.html#a9da23f2bb8e6eb1837fc992ffd4057db',1,'PlottyFile']]], - ['getquadrant',['getQuadrant',['../classPlottyFile.html#a54e94e80061a27614f2d4d63697d3376',1,'PlottyFile']]], - ['getrefx',['getRefX',['../classPlottyFile.html#a7dd84b9f0826f3220fc6b5a4f1ce9890',1,'PlottyFile']]], - ['getrefy',['getRefY',['../classPlottyFile.html#ae6650c61a3b1a610ce716253418bd7f2',1,'PlottyFile']]], - ['getregister',['getRegister',['../classB15F.html#a43b477a9e2e5b1b2142958fa5e1a78b3',1,'B15F']]], - ['gettimeout',['getTimeout',['../classUSART.html#a19cf777956a038878fc2d2b58c3d2b41',1,'USART']]], - ['getunitpara',['getUnitPara',['../classPlottyFile.html#abcda4139adf8c5ab8a93b13b84ac097c',1,'PlottyFile']]], - ['getunitx',['getUnitX',['../classPlottyFile.html#af952ac5e2c40896acaf6a86063874fe3',1,'PlottyFile']]], - ['getunity',['getUnitY',['../classPlottyFile.html#a746b96036872dbece204e9739f3413b6',1,'PlottyFile']]], - ['getx',['getX',['../classDot.html#a029f0cc99c474122b77a708a317e7f77',1,'Dot']]], - ['gety',['getY',['../classDot.html#a8fcb987e6308d8184d1a2c8692227e58',1,'Dot']]] -]; diff --git a/docs/html/search/all_7.html b/docs/html/search/all_7.html deleted file mode 100644 index ee6d2e4..0000000 --- a/docs/html/search/all_7.html +++ /dev/null @@ -1,30 +0,0 @@ - - - - - - - - - -
-
Loading...
-
- -
Searching...
-
No Matches
- -
- - diff --git a/docs/html/search/all_7.js b/docs/html/search/all_7.js deleted file mode 100644 index fd5dff3..0000000 --- a/docs/html/search/all_7.js +++ /dev/null @@ -1,5 +0,0 @@ -var searchData= -[ - ['msg_5ffail',['MSG_FAIL',['../classB15F.html#a77d1ecf24b406c9204665d3b09c36f1e',1,'B15F']]], - ['msg_5fok',['MSG_OK',['../classB15F.html#ab01299858f74a6cec598688562e0ad02',1,'B15F']]] -]; diff --git a/docs/html/search/all_8.html b/docs/html/search/all_8.html deleted file mode 100644 index 7829aa4..0000000 --- a/docs/html/search/all_8.html +++ /dev/null @@ -1,30 +0,0 @@ - - - - - - - - - -
-
Loading...
-
- -
Searching...
-
No Matches
- -
- - diff --git a/docs/html/search/all_8.js b/docs/html/search/all_8.js deleted file mode 100644 index bd75d34..0000000 --- a/docs/html/search/all_8.js +++ /dev/null @@ -1,4 +0,0 @@ -var searchData= -[ - ['opendevice',['openDevice',['../classUSART.html#a5f7e2abda2ec4a68a5fdb8ee2f8a940a',1,'USART']]] -]; diff --git a/docs/html/search/all_9.html b/docs/html/search/all_9.html deleted file mode 100644 index e4242c7..0000000 --- a/docs/html/search/all_9.html +++ /dev/null @@ -1,30 +0,0 @@ - - - - - - - - - -
-
Loading...
-
- -
Searching...
-
No Matches
- -
- - diff --git a/docs/html/search/all_9.js b/docs/html/search/all_9.js deleted file mode 100644 index c3ed16c..0000000 --- a/docs/html/search/all_9.js +++ /dev/null @@ -1,8 +0,0 @@ -var searchData= -[ - ['plottyfile',['PlottyFile',['../classPlottyFile.html',1,'']]], - ['pre',['PRE',['../classB15F.html#a3b0fc1f85954b2d9c145af4a3af5b1ec',1,'B15F']]], - ['printstatistics',['printStatistics',['../classUSART.html#a33559bb8f0eda33a489d47b9c9227b59',1,'USART']]], - ['pwmsetfrequency',['pwmSetFrequency',['../classB15F.html#ac6f6532bb9550a0632c28b98c157d0a1',1,'B15F']]], - ['pwmsetvalue',['pwmSetValue',['../classB15F.html#af9aad3c0db5d5a8b37219d713e1977ee',1,'B15F']]] -]; diff --git a/docs/html/search/all_a.html b/docs/html/search/all_a.html deleted file mode 100644 index 47a4a78..0000000 --- a/docs/html/search/all_a.html +++ /dev/null @@ -1,30 +0,0 @@ - - - - - - - - - -
-
Loading...
-
- -
Searching...
-
No Matches
- -
- - diff --git a/docs/html/search/all_a.js b/docs/html/search/all_a.js deleted file mode 100644 index 9759958..0000000 --- a/docs/html/search/all_a.js +++ /dev/null @@ -1,9 +0,0 @@ -var searchData= -[ - ['readbyte',['readByte',['../classUSART.html#a8f54b98b26bfe084359a5604bda82562',1,'USART']]], - ['readdipswitch',['readDipSwitch',['../classB15F.html#a6f858f21ea81d491b5031b3644a2239a',1,'B15F']]], - ['readint',['readInt',['../classUSART.html#a1534c229db71a375e556cf1e7d0b8119',1,'USART']]], - ['reconnect',['reconnect',['../classB15F.html#a52557b375443c180a044e7d4e80a1ae7',1,'B15F']]], - ['reconnect_5ftimeout',['RECONNECT_TIMEOUT',['../classB15F.html#a040951746fbfd632e12bd1ad14578816',1,'B15F']]], - ['reconnect_5ftries',['RECONNECT_TRIES',['../classB15F.html#a6c4895bdbcd71ff6743becf97985c2dc',1,'B15F']]] -]; diff --git a/docs/html/search/all_b.html b/docs/html/search/all_b.html deleted file mode 100644 index 1320a43..0000000 --- a/docs/html/search/all_b.html +++ /dev/null @@ -1,30 +0,0 @@ - - - - - - - - - -
-
Loading...
-
- -
Searching...
-
No Matches
- -
- - diff --git a/docs/html/search/all_b.js b/docs/html/search/all_b.js deleted file mode 100644 index 552513c..0000000 --- a/docs/html/search/all_b.js +++ /dev/null @@ -1,20 +0,0 @@ -var searchData= -[ - ['setaborthandler',['setAbortHandler',['../classB15F.html#a55b0cd1ea582bda53d6979442640f8e9',1,'B15F']]], - ['setbaudrate',['setBaudrate',['../classUSART.html#aac63918a8b97ae63ee607cfa39e6d88d',1,'USART']]], - ['setdescpara',['setDescPara',['../classPlottyFile.html#a431904143c3c1164a2e8b8cfec3c77ab',1,'PlottyFile']]], - ['setdescx',['setDescX',['../classPlottyFile.html#aa0449c290265d55d6223b19cf0a88b0a',1,'PlottyFile']]], - ['setdescy',['setDescY',['../classPlottyFile.html#a38a3a4dfc76bc70523727584bf01d590',1,'PlottyFile']]], - ['setfunctiontype',['setFunctionType',['../classPlottyFile.html#a4e5ab1ebb012a5cc1a3d6458a4cd512f',1,'PlottyFile']]], - ['setparafirstcurve',['setParaFirstCurve',['../classPlottyFile.html#aa676414793becb975506f48d6e949dd0',1,'PlottyFile']]], - ['setparastepwidth',['setParaStepWidth',['../classPlottyFile.html#a6caebd31e04e2e7081cc007047350355',1,'PlottyFile']]], - ['setquadrant',['setQuadrant',['../classPlottyFile.html#a1953ee0d9a87b7353c16139584e9c2ae',1,'PlottyFile']]], - ['setrefx',['setRefX',['../classPlottyFile.html#a80c2c2e97a454566f9c1f2c51e1d7f3e',1,'PlottyFile']]], - ['setrefy',['setRefY',['../classPlottyFile.html#a3a371228ddcc007e97eebe7cc04dffc2',1,'PlottyFile']]], - ['setregister',['setRegister',['../classB15F.html#a2735424cf98bd0e2892b5a9b6eb24582',1,'B15F']]], - ['settimeout',['setTimeout',['../classUSART.html#ad7fe866cebe920784d2b17602824c7ff',1,'USART']]], - ['setunitpara',['setUnitPara',['../classPlottyFile.html#abbac84109a1e0958a4ca5c270fac0986',1,'PlottyFile']]], - ['setunitx',['setUnitX',['../classPlottyFile.html#ab8d35a841ca9c325fca671cf34e03527',1,'PlottyFile']]], - ['setunity',['setUnitY',['../classPlottyFile.html#abb18c814f435926f741f7ceb310f3059',1,'PlottyFile']]], - ['startplotty',['startPlotty',['../classPlottyFile.html#a08a115ef10458cadfe76077d623313df',1,'PlottyFile']]] -]; diff --git a/docs/html/search/all_c.html b/docs/html/search/all_c.html deleted file mode 100644 index 32a3a1b..0000000 --- a/docs/html/search/all_c.html +++ /dev/null @@ -1,30 +0,0 @@ - - - - - - - - - -
-
Loading...
-
- -
Searching...
-
No Matches
- -
- - diff --git a/docs/html/search/all_c.js b/docs/html/search/all_c.js deleted file mode 100644 index 57a58a5..0000000 --- a/docs/html/search/all_c.js +++ /dev/null @@ -1,6 +0,0 @@ -var searchData= -[ - ['testconnection',['testConnection',['../classB15F.html#af01983594f2af98ab2b1e514aa036a5d',1,'B15F']]], - ['testintconv',['testIntConv',['../classB15F.html#a7b8a0e2a9156f7dcb05d097f23666a78',1,'B15F']]], - ['timeoutexception',['TimeoutException',['../classTimeoutException.html',1,'']]] -]; diff --git a/docs/html/search/all_d.html b/docs/html/search/all_d.html deleted file mode 100644 index a386096..0000000 --- a/docs/html/search/all_d.html +++ /dev/null @@ -1,30 +0,0 @@ - - - - - - - - - -
-
Loading...
-
- -
Searching...
-
No Matches
- -
- - diff --git a/docs/html/search/all_d.js b/docs/html/search/all_d.js deleted file mode 100644 index c030e1b..0000000 --- a/docs/html/search/all_d.js +++ /dev/null @@ -1,5 +0,0 @@ -var searchData= -[ - ['usart',['USART',['../classUSART.html',1,'']]], - ['usartexception',['USARTException',['../classUSARTException.html',1,'']]] -]; diff --git a/docs/html/search/all_e.html b/docs/html/search/all_e.html deleted file mode 100644 index 2931618..0000000 --- a/docs/html/search/all_e.html +++ /dev/null @@ -1,30 +0,0 @@ - - - - - - - - - -
-
Loading...
-
- -
Searching...
-
No Matches
- -
- - diff --git a/docs/html/search/all_e.js b/docs/html/search/all_e.js deleted file mode 100644 index 27f785f..0000000 --- a/docs/html/search/all_e.js +++ /dev/null @@ -1,8 +0,0 @@ -var searchData= -[ - ['view',['View',['../classView.html',1,'']]], - ['viewinfo',['ViewInfo',['../classViewInfo.html',1,'']]], - ['viewmonitor',['ViewMonitor',['../classViewMonitor.html',1,'']]], - ['viewpromt',['ViewPromt',['../classViewPromt.html',1,'']]], - ['viewselection',['ViewSelection',['../classViewSelection.html',1,'']]] -]; diff --git a/docs/html/search/all_f.html b/docs/html/search/all_f.html deleted file mode 100644 index ca42a52..0000000 --- a/docs/html/search/all_f.html +++ /dev/null @@ -1,30 +0,0 @@ - - - - - - - - - -
-
Loading...
-
- -
Searching...
-
No Matches
- -
- - diff --git a/docs/html/search/all_f.js b/docs/html/search/all_f.js deleted file mode 100644 index 6a81098..0000000 --- a/docs/html/search/all_f.js +++ /dev/null @@ -1,8 +0,0 @@ -var searchData= -[ - ['wdt_5ftimeout',['WDT_TIMEOUT',['../classB15F.html#a158d13bc84aed6430cdede1396384e06',1,'B15F']]], - ['writebyte',['writeByte',['../classUSART.html#a60eadbe9956bab8144ee96d89eacd9f5',1,'USART']]], - ['writeint',['writeInt',['../classUSART.html#a78b30d9aa863f38745e982860392599a',1,'USART']]], - ['writetofile',['writeToFile',['../classPlottyFile.html#a82c348e7fade2edcbc907e7c2bc2e305',1,'PlottyFile']]], - ['writeu32',['writeU32',['../classUSART.html#a68c2d1cb7172813ae8ed61360fad47f6',1,'USART']]] -]; diff --git a/docs/html/search/classes_0.html b/docs/html/search/classes_0.html deleted file mode 100644 index d585e6a..0000000 --- a/docs/html/search/classes_0.html +++ /dev/null @@ -1,30 +0,0 @@ - - - - - - - - - -
-
Loading...
-
- -
Searching...
-
No Matches
- -
- - diff --git a/docs/html/search/classes_0.js b/docs/html/search/classes_0.js deleted file mode 100644 index 7622f87..0000000 --- a/docs/html/search/classes_0.js +++ /dev/null @@ -1,4 +0,0 @@ -var searchData= -[ - ['b15f',['B15F',['../classB15F.html',1,'']]] -]; diff --git a/docs/html/search/classes_1.html b/docs/html/search/classes_1.html deleted file mode 100644 index baeb182..0000000 --- a/docs/html/search/classes_1.html +++ /dev/null @@ -1,30 +0,0 @@ - - - - - - - - - -
-
Loading...
-
- -
Searching...
-
No Matches
- -
- - diff --git a/docs/html/search/classes_1.js b/docs/html/search/classes_1.js deleted file mode 100644 index c2d5cc3..0000000 --- a/docs/html/search/classes_1.js +++ /dev/null @@ -1,5 +0,0 @@ -var searchData= -[ - ['dot',['Dot',['../classDot.html',1,'']]], - ['driverexception',['DriverException',['../classDriverException.html',1,'']]] -]; diff --git a/docs/html/search/classes_2.html b/docs/html/search/classes_2.html deleted file mode 100644 index d267279..0000000 --- a/docs/html/search/classes_2.html +++ /dev/null @@ -1,30 +0,0 @@ - - - - - - - - - -
-
Loading...
-
- -
Searching...
-
No Matches
- -
- - diff --git a/docs/html/search/classes_2.js b/docs/html/search/classes_2.js deleted file mode 100644 index ca8950f..0000000 --- a/docs/html/search/classes_2.js +++ /dev/null @@ -1,4 +0,0 @@ -var searchData= -[ - ['plottyfile',['PlottyFile',['../classPlottyFile.html',1,'']]] -]; diff --git a/docs/html/search/classes_3.html b/docs/html/search/classes_3.html deleted file mode 100644 index 8a5cbe1..0000000 --- a/docs/html/search/classes_3.html +++ /dev/null @@ -1,30 +0,0 @@ - - - - - - - - - -
-
Loading...
-
- -
Searching...
-
No Matches
- -
- - diff --git a/docs/html/search/classes_3.js b/docs/html/search/classes_3.js deleted file mode 100644 index b7d0b63..0000000 --- a/docs/html/search/classes_3.js +++ /dev/null @@ -1,4 +0,0 @@ -var searchData= -[ - ['timeoutexception',['TimeoutException',['../classTimeoutException.html',1,'']]] -]; diff --git a/docs/html/search/classes_4.html b/docs/html/search/classes_4.html deleted file mode 100644 index 300b9ab..0000000 --- a/docs/html/search/classes_4.html +++ /dev/null @@ -1,30 +0,0 @@ - - - - - - - - - -
-
Loading...
-
- -
Searching...
-
No Matches
- -
- - diff --git a/docs/html/search/classes_4.js b/docs/html/search/classes_4.js deleted file mode 100644 index c030e1b..0000000 --- a/docs/html/search/classes_4.js +++ /dev/null @@ -1,5 +0,0 @@ -var searchData= -[ - ['usart',['USART',['../classUSART.html',1,'']]], - ['usartexception',['USARTException',['../classUSARTException.html',1,'']]] -]; diff --git a/docs/html/search/classes_5.html b/docs/html/search/classes_5.html deleted file mode 100644 index e7afb2c..0000000 --- a/docs/html/search/classes_5.html +++ /dev/null @@ -1,30 +0,0 @@ - - - - - - - - - -
-
Loading...
-
- -
Searching...
-
No Matches
- -
- - diff --git a/docs/html/search/classes_5.js b/docs/html/search/classes_5.js deleted file mode 100644 index 27f785f..0000000 --- a/docs/html/search/classes_5.js +++ /dev/null @@ -1,8 +0,0 @@ -var searchData= -[ - ['view',['View',['../classView.html',1,'']]], - ['viewinfo',['ViewInfo',['../classViewInfo.html',1,'']]], - ['viewmonitor',['ViewMonitor',['../classViewMonitor.html',1,'']]], - ['viewpromt',['ViewPromt',['../classViewPromt.html',1,'']]], - ['viewselection',['ViewSelection',['../classViewSelection.html',1,'']]] -]; diff --git a/docs/html/search/close.png b/docs/html/search/close.png deleted file mode 100644 index 9342d3d..0000000 Binary files a/docs/html/search/close.png and /dev/null differ diff --git a/docs/html/search/functions_0.html b/docs/html/search/functions_0.html deleted file mode 100644 index 8a729f7..0000000 --- a/docs/html/search/functions_0.html +++ /dev/null @@ -1,30 +0,0 @@ - - - - - - - - - -
-
Loading...
-
- -
Searching...
-
No Matches
- -
- - diff --git a/docs/html/search/functions_0.js b/docs/html/search/functions_0.js deleted file mode 100644 index c4bd927..0000000 --- a/docs/html/search/functions_0.js +++ /dev/null @@ -1,10 +0,0 @@ -var searchData= -[ - ['abort',['abort',['../classB15F.html#a3f09a418f9e3be5d1d750e4515c96f1e',1,'B15F::abort(std::string msg)'],['../classB15F.html#ac962a6a49bddd0e261a8c7d3aded23f8',1,'B15F::abort(std::exception &ex)']]], - ['activateselftestmode',['activateSelfTestMode',['../classB15F.html#ad9bf80ee2485fb5aac9926c6ef0731f1',1,'B15F']]], - ['adddot',['addDot',['../classPlottyFile.html#ae091e6eaaca16302f17572ac7dec6f7c',1,'PlottyFile::addDot(Dot &dot)'],['../classPlottyFile.html#a80e4b45219b4e9571992edfc28a28568',1,'PlottyFile::addDot(Dot dot)']]], - ['analogread',['analogRead',['../classB15F.html#ae0bd1f69751e2dc3c462db9213fc4627',1,'B15F']]], - ['analogsequence',['analogSequence',['../classB15F.html#ab82a324426c3063318c6cafb3089ae02',1,'B15F']]], - ['analogwrite0',['analogWrite0',['../classB15F.html#afc55fd590c7fa5c942d100cb60c4b0d3',1,'B15F']]], - ['analogwrite1',['analogWrite1',['../classB15F.html#a7f1becceac744f5cd2ad529748fd836f',1,'B15F']]] -]; diff --git a/docs/html/search/functions_1.html b/docs/html/search/functions_1.html deleted file mode 100644 index d4929aa..0000000 --- a/docs/html/search/functions_1.html +++ /dev/null @@ -1,30 +0,0 @@ - - - - - - - - - -
-
Loading...
-
- -
Searching...
-
No Matches
- -
- - diff --git a/docs/html/search/functions_1.js b/docs/html/search/functions_1.js deleted file mode 100644 index 7200182..0000000 --- a/docs/html/search/functions_1.js +++ /dev/null @@ -1,6 +0,0 @@ -var searchData= -[ - ['clearinputbuffer',['clearInputBuffer',['../classUSART.html#a28a2b4c5ed66b2c3a81196f76884f156',1,'USART']]], - ['clearoutputbuffer',['clearOutputBuffer',['../classUSART.html#a756d268a8762c316f91ca3238972b0c1',1,'USART']]], - ['closedevice',['closeDevice',['../classUSART.html#af80d6291ac1d2df04cfa1d8d27458cc5',1,'USART']]] -]; diff --git a/docs/html/search/functions_2.html b/docs/html/search/functions_2.html deleted file mode 100644 index 07e3fda..0000000 --- a/docs/html/search/functions_2.html +++ /dev/null @@ -1,30 +0,0 @@ - - - - - - - - - -
-
Loading...
-
- -
Searching...
-
No Matches
- -
- - diff --git a/docs/html/search/functions_2.js b/docs/html/search/functions_2.js deleted file mode 100644 index 7c01e06..0000000 --- a/docs/html/search/functions_2.js +++ /dev/null @@ -1,11 +0,0 @@ -var searchData= -[ - ['delay_5fms',['delay_ms',['../classB15F.html#aaffce20afb9f06bc4b7556c70ce76416',1,'B15F']]], - ['delay_5fus',['delay_us',['../classB15F.html#adcaac8ae8db3c28eccb499fbd720361f',1,'B15F']]], - ['digitalread0',['digitalRead0',['../classB15F.html#ae0df6d423deeb2fd610968bd1c72060e',1,'B15F']]], - ['digitalread1',['digitalRead1',['../classB15F.html#afc76b612dd4faeee0ac02a66b65af5f2',1,'B15F']]], - ['digitalwrite0',['digitalWrite0',['../classB15F.html#a13797edea1c50278988373acbd110064',1,'B15F']]], - ['digitalwrite1',['digitalWrite1',['../classB15F.html#aa225e7fc813849634063e071ef25db1b',1,'B15F']]], - ['discard',['discard',['../classB15F.html#ae4740cd473f40a1a4121dfa66b25e1d5',1,'B15F']]], - ['dot',['Dot',['../classDot.html#ad975f119c0627a928790b3cd5ca6da05',1,'Dot']]] -]; diff --git a/docs/html/search/functions_3.html b/docs/html/search/functions_3.html deleted file mode 100644 index 40bd389..0000000 --- a/docs/html/search/functions_3.html +++ /dev/null @@ -1,30 +0,0 @@ - - - - - - - - - -
-
Loading...
-
- -
Searching...
-
No Matches
- -
- - diff --git a/docs/html/search/functions_3.js b/docs/html/search/functions_3.js deleted file mode 100644 index fb3f662..0000000 --- a/docs/html/search/functions_3.js +++ /dev/null @@ -1,4 +0,0 @@ -var searchData= -[ - ['exec',['exec',['../classB15F.html#a1a7ac52984ed7ecac008a3e4060eee3a',1,'B15F']]] -]; diff --git a/docs/html/search/functions_4.html b/docs/html/search/functions_4.html deleted file mode 100644 index 8a4df4c..0000000 --- a/docs/html/search/functions_4.html +++ /dev/null @@ -1,30 +0,0 @@ - - - - - - - - - -
-
Loading...
-
- -
Searching...
-
No Matches
- -
- - diff --git a/docs/html/search/functions_4.js b/docs/html/search/functions_4.js deleted file mode 100644 index 3641ddc..0000000 --- a/docs/html/search/functions_4.js +++ /dev/null @@ -1,4 +0,0 @@ -var searchData= -[ - ['flushoutputbuffer',['flushOutputBuffer',['../classUSART.html#adb6ff4d1cf1af79ca255c5a81780200d',1,'USART']]] -]; diff --git a/docs/html/search/functions_5.html b/docs/html/search/functions_5.html deleted file mode 100644 index 2b983b2..0000000 --- a/docs/html/search/functions_5.html +++ /dev/null @@ -1,30 +0,0 @@ - - - - - - - - - -
-
Loading...
-
- -
Searching...
-
No Matches
- -
- - diff --git a/docs/html/search/functions_5.js b/docs/html/search/functions_5.js deleted file mode 100644 index 9518d98..0000000 --- a/docs/html/search/functions_5.js +++ /dev/null @@ -1,23 +0,0 @@ -var searchData= -[ - ['getbaudrate',['getBaudrate',['../classUSART.html#a4918672d8069df205378a528b1892db3',1,'USART']]], - ['getboardinfo',['getBoardInfo',['../classB15F.html#a4f01677e73d6d172a2c1cae9427a591b',1,'B15F']]], - ['getcurve',['getCurve',['../classDot.html#ad0ae7dc1a9be3d8d985affc089b34396',1,'Dot']]], - ['getdescpara',['getDescPara',['../classPlottyFile.html#a536967daae3b382a5d6575f55450e198',1,'PlottyFile']]], - ['getdescx',['getDescX',['../classPlottyFile.html#a9cf7baa569be308c2cf6e07cadded09d',1,'PlottyFile']]], - ['getdescy',['getDescY',['../classPlottyFile.html#ab4a847fd71a804182f211233e194df45',1,'PlottyFile']]], - ['getfunctiontype',['getFunctionType',['../classPlottyFile.html#a88bb7d8350ed5fbc7a40e8d903c94bdb',1,'PlottyFile']]], - ['getinstance',['getInstance',['../classB15F.html#a8b4533d232c55ef2aa967e39e2d23380',1,'B15F']]], - ['getparafirstcurve',['getParaFirstCurve',['../classPlottyFile.html#a40828c93d66fe80166c4f603d5bdfa48',1,'PlottyFile']]], - ['getparastepwidth',['getParaStepWidth',['../classPlottyFile.html#a9da23f2bb8e6eb1837fc992ffd4057db',1,'PlottyFile']]], - ['getquadrant',['getQuadrant',['../classPlottyFile.html#a54e94e80061a27614f2d4d63697d3376',1,'PlottyFile']]], - ['getrefx',['getRefX',['../classPlottyFile.html#a7dd84b9f0826f3220fc6b5a4f1ce9890',1,'PlottyFile']]], - ['getrefy',['getRefY',['../classPlottyFile.html#ae6650c61a3b1a610ce716253418bd7f2',1,'PlottyFile']]], - ['getregister',['getRegister',['../classB15F.html#a43b477a9e2e5b1b2142958fa5e1a78b3',1,'B15F']]], - ['gettimeout',['getTimeout',['../classUSART.html#a19cf777956a038878fc2d2b58c3d2b41',1,'USART']]], - ['getunitpara',['getUnitPara',['../classPlottyFile.html#abcda4139adf8c5ab8a93b13b84ac097c',1,'PlottyFile']]], - ['getunitx',['getUnitX',['../classPlottyFile.html#af952ac5e2c40896acaf6a86063874fe3',1,'PlottyFile']]], - ['getunity',['getUnitY',['../classPlottyFile.html#a746b96036872dbece204e9739f3413b6',1,'PlottyFile']]], - ['getx',['getX',['../classDot.html#a029f0cc99c474122b77a708a317e7f77',1,'Dot']]], - ['gety',['getY',['../classDot.html#a8fcb987e6308d8184d1a2c8692227e58',1,'Dot']]] -]; diff --git a/docs/html/search/functions_6.html b/docs/html/search/functions_6.html deleted file mode 100644 index f7d283d..0000000 --- a/docs/html/search/functions_6.html +++ /dev/null @@ -1,30 +0,0 @@ - - - - - - - - - -
-
Loading...
-
- -
Searching...
-
No Matches
- -
- - diff --git a/docs/html/search/functions_6.js b/docs/html/search/functions_6.js deleted file mode 100644 index bd75d34..0000000 --- a/docs/html/search/functions_6.js +++ /dev/null @@ -1,4 +0,0 @@ -var searchData= -[ - ['opendevice',['openDevice',['../classUSART.html#a5f7e2abda2ec4a68a5fdb8ee2f8a940a',1,'USART']]] -]; diff --git a/docs/html/search/functions_7.html b/docs/html/search/functions_7.html deleted file mode 100644 index a74fe44..0000000 --- a/docs/html/search/functions_7.html +++ /dev/null @@ -1,30 +0,0 @@ - - - - - - - - - -
-
Loading...
-
- -
Searching...
-
No Matches
- -
- - diff --git a/docs/html/search/functions_7.js b/docs/html/search/functions_7.js deleted file mode 100644 index 939b6a3..0000000 --- a/docs/html/search/functions_7.js +++ /dev/null @@ -1,6 +0,0 @@ -var searchData= -[ - ['printstatistics',['printStatistics',['../classUSART.html#a33559bb8f0eda33a489d47b9c9227b59',1,'USART']]], - ['pwmsetfrequency',['pwmSetFrequency',['../classB15F.html#ac6f6532bb9550a0632c28b98c157d0a1',1,'B15F']]], - ['pwmsetvalue',['pwmSetValue',['../classB15F.html#af9aad3c0db5d5a8b37219d713e1977ee',1,'B15F']]] -]; diff --git a/docs/html/search/functions_8.html b/docs/html/search/functions_8.html deleted file mode 100644 index 75fc0be..0000000 --- a/docs/html/search/functions_8.html +++ /dev/null @@ -1,30 +0,0 @@ - - - - - - - - - -
-
Loading...
-
- -
Searching...
-
No Matches
- -
- - diff --git a/docs/html/search/functions_8.js b/docs/html/search/functions_8.js deleted file mode 100644 index 5d35f1d..0000000 --- a/docs/html/search/functions_8.js +++ /dev/null @@ -1,7 +0,0 @@ -var searchData= -[ - ['readbyte',['readByte',['../classUSART.html#a8f54b98b26bfe084359a5604bda82562',1,'USART']]], - ['readdipswitch',['readDipSwitch',['../classB15F.html#a6f858f21ea81d491b5031b3644a2239a',1,'B15F']]], - ['readint',['readInt',['../classUSART.html#a1534c229db71a375e556cf1e7d0b8119',1,'USART']]], - ['reconnect',['reconnect',['../classB15F.html#a52557b375443c180a044e7d4e80a1ae7',1,'B15F']]] -]; diff --git a/docs/html/search/functions_9.html b/docs/html/search/functions_9.html deleted file mode 100644 index 7541c9e..0000000 --- a/docs/html/search/functions_9.html +++ /dev/null @@ -1,30 +0,0 @@ - - - - - - - - - -
-
Loading...
-
- -
Searching...
-
No Matches
- -
- - diff --git a/docs/html/search/functions_9.js b/docs/html/search/functions_9.js deleted file mode 100644 index 552513c..0000000 --- a/docs/html/search/functions_9.js +++ /dev/null @@ -1,20 +0,0 @@ -var searchData= -[ - ['setaborthandler',['setAbortHandler',['../classB15F.html#a55b0cd1ea582bda53d6979442640f8e9',1,'B15F']]], - ['setbaudrate',['setBaudrate',['../classUSART.html#aac63918a8b97ae63ee607cfa39e6d88d',1,'USART']]], - ['setdescpara',['setDescPara',['../classPlottyFile.html#a431904143c3c1164a2e8b8cfec3c77ab',1,'PlottyFile']]], - ['setdescx',['setDescX',['../classPlottyFile.html#aa0449c290265d55d6223b19cf0a88b0a',1,'PlottyFile']]], - ['setdescy',['setDescY',['../classPlottyFile.html#a38a3a4dfc76bc70523727584bf01d590',1,'PlottyFile']]], - ['setfunctiontype',['setFunctionType',['../classPlottyFile.html#a4e5ab1ebb012a5cc1a3d6458a4cd512f',1,'PlottyFile']]], - ['setparafirstcurve',['setParaFirstCurve',['../classPlottyFile.html#aa676414793becb975506f48d6e949dd0',1,'PlottyFile']]], - ['setparastepwidth',['setParaStepWidth',['../classPlottyFile.html#a6caebd31e04e2e7081cc007047350355',1,'PlottyFile']]], - ['setquadrant',['setQuadrant',['../classPlottyFile.html#a1953ee0d9a87b7353c16139584e9c2ae',1,'PlottyFile']]], - ['setrefx',['setRefX',['../classPlottyFile.html#a80c2c2e97a454566f9c1f2c51e1d7f3e',1,'PlottyFile']]], - ['setrefy',['setRefY',['../classPlottyFile.html#a3a371228ddcc007e97eebe7cc04dffc2',1,'PlottyFile']]], - ['setregister',['setRegister',['../classB15F.html#a2735424cf98bd0e2892b5a9b6eb24582',1,'B15F']]], - ['settimeout',['setTimeout',['../classUSART.html#ad7fe866cebe920784d2b17602824c7ff',1,'USART']]], - ['setunitpara',['setUnitPara',['../classPlottyFile.html#abbac84109a1e0958a4ca5c270fac0986',1,'PlottyFile']]], - ['setunitx',['setUnitX',['../classPlottyFile.html#ab8d35a841ca9c325fca671cf34e03527',1,'PlottyFile']]], - ['setunity',['setUnitY',['../classPlottyFile.html#abb18c814f435926f741f7ceb310f3059',1,'PlottyFile']]], - ['startplotty',['startPlotty',['../classPlottyFile.html#a08a115ef10458cadfe76077d623313df',1,'PlottyFile']]] -]; diff --git a/docs/html/search/functions_a.html b/docs/html/search/functions_a.html deleted file mode 100644 index 5a5be63..0000000 --- a/docs/html/search/functions_a.html +++ /dev/null @@ -1,30 +0,0 @@ - - - - - - - - - -
-
Loading...
-
- -
Searching...
-
No Matches
- -
- - diff --git a/docs/html/search/functions_a.js b/docs/html/search/functions_a.js deleted file mode 100644 index 4b801c0..0000000 --- a/docs/html/search/functions_a.js +++ /dev/null @@ -1,5 +0,0 @@ -var searchData= -[ - ['testconnection',['testConnection',['../classB15F.html#af01983594f2af98ab2b1e514aa036a5d',1,'B15F']]], - ['testintconv',['testIntConv',['../classB15F.html#a7b8a0e2a9156f7dcb05d097f23666a78',1,'B15F']]] -]; diff --git a/docs/html/search/functions_b.html b/docs/html/search/functions_b.html deleted file mode 100644 index fc2d5aa..0000000 --- a/docs/html/search/functions_b.html +++ /dev/null @@ -1,30 +0,0 @@ - - - - - - - - - -
-
Loading...
-
- -
Searching...
-
No Matches
- -
- - diff --git a/docs/html/search/functions_b.js b/docs/html/search/functions_b.js deleted file mode 100644 index 59b6148..0000000 --- a/docs/html/search/functions_b.js +++ /dev/null @@ -1,7 +0,0 @@ -var searchData= -[ - ['writebyte',['writeByte',['../classUSART.html#a60eadbe9956bab8144ee96d89eacd9f5',1,'USART']]], - ['writeint',['writeInt',['../classUSART.html#a78b30d9aa863f38745e982860392599a',1,'USART']]], - ['writetofile',['writeToFile',['../classPlottyFile.html#a82c348e7fade2edcbc907e7c2bc2e305',1,'PlottyFile']]], - ['writeu32',['writeU32',['../classUSART.html#a68c2d1cb7172813ae8ed61360fad47f6',1,'USART']]] -]; diff --git a/docs/html/search/mag_sel.png b/docs/html/search/mag_sel.png deleted file mode 100644 index 39c0ed5..0000000 Binary files a/docs/html/search/mag_sel.png and /dev/null differ diff --git a/docs/html/search/nomatches.html b/docs/html/search/nomatches.html deleted file mode 100644 index 4377320..0000000 --- a/docs/html/search/nomatches.html +++ /dev/null @@ -1,12 +0,0 @@ - - - - - - - -
-
No Matches
-
- - diff --git a/docs/html/search/pages_0.html b/docs/html/search/pages_0.html deleted file mode 100644 index 32cbf49..0000000 --- a/docs/html/search/pages_0.html +++ /dev/null @@ -1,30 +0,0 @@ - - - - - - - - - -
-
Loading...
-
- -
Searching...
-
No Matches
- -
- - diff --git a/docs/html/search/pages_0.js b/docs/html/search/pages_0.js deleted file mode 100644 index abe03ca..0000000 --- a/docs/html/search/pages_0.js +++ /dev/null @@ -1,4 +0,0 @@ -var searchData= -[ - ['einführung',['Einführung',['../index.html',1,'']]] -]; diff --git a/docs/html/search/search.css b/docs/html/search/search.css deleted file mode 100644 index 3cf9df9..0000000 --- a/docs/html/search/search.css +++ /dev/null @@ -1,271 +0,0 @@ -/*---------------- Search Box */ - -#FSearchBox { - float: left; -} - -#MSearchBox { - white-space : nowrap; - float: none; - margin-top: 8px; - right: 0px; - width: 170px; - height: 24px; - z-index: 102; -} - -#MSearchBox .left -{ - display:block; - position:absolute; - left:10px; - width:20px; - height:19px; - background:url('search_l.png') no-repeat; - background-position:right; -} - -#MSearchSelect { - display:block; - position:absolute; - width:20px; - height:19px; -} - -.left #MSearchSelect { - left:4px; -} - -.right #MSearchSelect { - right:5px; -} - -#MSearchField { - display:block; - position:absolute; - height:19px; - background:url('search_m.png') repeat-x; - border:none; - width:115px; - margin-left:20px; - padding-left:4px; - color: #909090; - outline: none; - font: 9pt Arial, Verdana, sans-serif; - -webkit-border-radius: 0px; -} - -#FSearchBox #MSearchField { - margin-left:15px; -} - -#MSearchBox .right { - display:block; - position:absolute; - right:10px; - top:8px; - width:20px; - height:19px; - background:url('search_r.png') no-repeat; - background-position:left; -} - -#MSearchClose { - display: none; - position: absolute; - top: 4px; - background : none; - border: none; - margin: 0px 4px 0px 0px; - padding: 0px 0px; - outline: none; -} - -.left #MSearchClose { - left: 6px; -} - -.right #MSearchClose { - right: 2px; -} - -.MSearchBoxActive #MSearchField { - color: #000000; -} - -/*---------------- Search filter selection */ - -#MSearchSelectWindow { - display: none; - position: absolute; - left: 0; top: 0; - border: 1px solid #90A5CE; - background-color: #F9FAFC; - z-index: 10001; - padding-top: 4px; - padding-bottom: 4px; - -moz-border-radius: 4px; - -webkit-border-top-left-radius: 4px; - -webkit-border-top-right-radius: 4px; - -webkit-border-bottom-left-radius: 4px; - -webkit-border-bottom-right-radius: 4px; - -webkit-box-shadow: 5px 5px 5px rgba(0, 0, 0, 0.15); -} - -.SelectItem { - font: 8pt Arial, Verdana, sans-serif; - padding-left: 2px; - padding-right: 12px; - border: 0px; -} - -span.SelectionMark { - margin-right: 4px; - font-family: monospace; - outline-style: none; - text-decoration: none; -} - -a.SelectItem { - display: block; - outline-style: none; - color: #000000; - text-decoration: none; - padding-left: 6px; - padding-right: 12px; -} - -a.SelectItem:focus, -a.SelectItem:active { - color: #000000; - outline-style: none; - text-decoration: none; -} - -a.SelectItem:hover { - color: #FFFFFF; - background-color: #3D578C; - outline-style: none; - text-decoration: none; - cursor: pointer; - display: block; -} - -/*---------------- Search results window */ - -iframe#MSearchResults { - width: 60ex; - height: 15em; -} - -#MSearchResultsWindow { - display: none; - position: absolute; - left: 0; top: 0; - border: 1px solid #000; - background-color: #EEF1F7; - z-index:10000; -} - -/* ----------------------------------- */ - - -#SRIndex { - clear:both; - padding-bottom: 15px; -} - -.SREntry { - font-size: 10pt; - padding-left: 1ex; -} - -.SRPage .SREntry { - font-size: 8pt; - padding: 1px 5px; -} - -body.SRPage { - margin: 5px 2px; -} - -.SRChildren { - padding-left: 3ex; padding-bottom: .5em -} - -.SRPage .SRChildren { - display: none; -} - -.SRSymbol { - font-weight: bold; - color: #425E97; - font-family: Arial, Verdana, sans-serif; - text-decoration: none; - outline: none; -} - -a.SRScope { - display: block; - color: #425E97; - font-family: Arial, Verdana, sans-serif; - text-decoration: none; - outline: none; -} - -a.SRSymbol:focus, a.SRSymbol:active, -a.SRScope:focus, a.SRScope:active { - text-decoration: underline; -} - -span.SRScope { - padding-left: 4px; -} - -.SRPage .SRStatus { - padding: 2px 5px; - font-size: 8pt; - font-style: italic; -} - -.SRResult { - display: none; -} - -DIV.searchresults { - margin-left: 10px; - margin-right: 10px; -} - -/*---------------- External search page results */ - -.searchresult { - background-color: #F0F3F8; -} - -.pages b { - color: white; - padding: 5px 5px 3px 5px; - background-image: url("../tab_a.png"); - background-repeat: repeat-x; - text-shadow: 0 1px 1px #000000; -} - -.pages { - line-height: 17px; - margin-left: 4px; - text-decoration: none; -} - -.hl { - font-weight: bold; -} - -#searchresults { - margin-bottom: 20px; -} - -.searchpages { - margin-top: 10px; -} - diff --git a/docs/html/search/search.js b/docs/html/search/search.js deleted file mode 100644 index a554ab9..0000000 --- a/docs/html/search/search.js +++ /dev/null @@ -1,814 +0,0 @@ -/* - @licstart The following is the entire license notice for the - JavaScript code in this file. - - Copyright (C) 1997-2017 by Dimitri van Heesch - - This program is free software; you can redistribute it and/or modify - it under the terms of the GNU General Public License as published by - the Free Software Foundation; either version 2 of the License, or - (at your option) any later version. - - This program is distributed in the hope that it will be useful, - but WITHOUT ANY WARRANTY; without even the implied warranty of - MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - GNU General Public License for more details. - - You should have received a copy of the GNU General Public License along - with this program; if not, write to the Free Software Foundation, Inc., - 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA. - - @licend The above is the entire license notice - for the JavaScript code in this file - */ -function convertToId(search) -{ - var result = ''; - for (i=0;i do a search - { - this.Search(); - } - } - - this.OnSearchSelectKey = function(evt) - { - var e = (evt) ? evt : window.event; // for IE - if (e.keyCode==40 && this.searchIndex0) // Up - { - this.searchIndex--; - this.OnSelectItem(this.searchIndex); - } - else if (e.keyCode==13 || e.keyCode==27) - { - this.OnSelectItem(this.searchIndex); - this.CloseSelectionWindow(); - this.DOMSearchField().focus(); - } - return false; - } - - // --------- Actions - - // Closes the results window. - this.CloseResultsWindow = function() - { - this.DOMPopupSearchResultsWindow().style.display = 'none'; - this.DOMSearchClose().style.display = 'none'; - this.Activate(false); - } - - this.CloseSelectionWindow = function() - { - this.DOMSearchSelectWindow().style.display = 'none'; - } - - // Performs a search. - this.Search = function() - { - this.keyTimeout = 0; - - // strip leading whitespace - var searchValue = this.DOMSearchField().value.replace(/^ +/, ""); - - var code = searchValue.toLowerCase().charCodeAt(0); - var idxChar = searchValue.substr(0, 1).toLowerCase(); - if ( 0xD800 <= code && code <= 0xDBFF && searchValue > 1) // surrogate pair - { - idxChar = searchValue.substr(0, 2); - } - - var resultsPage; - var resultsPageWithSearch; - var hasResultsPage; - - var idx = indexSectionsWithContent[this.searchIndex].indexOf(idxChar); - if (idx!=-1) - { - var hexCode=idx.toString(16); - resultsPage = this.resultsPath + '/' + indexSectionNames[this.searchIndex] + '_' + hexCode + '.html'; - resultsPageWithSearch = resultsPage+'?'+escape(searchValue); - hasResultsPage = true; - } - else // nothing available for this search term - { - resultsPage = this.resultsPath + '/nomatches.html'; - resultsPageWithSearch = resultsPage; - hasResultsPage = false; - } - - window.frames.MSearchResults.location = resultsPageWithSearch; - var domPopupSearchResultsWindow = this.DOMPopupSearchResultsWindow(); - - if (domPopupSearchResultsWindow.style.display!='block') - { - var domSearchBox = this.DOMSearchBox(); - this.DOMSearchClose().style.display = 'inline'; - if (this.insideFrame) - { - var domPopupSearchResults = this.DOMPopupSearchResults(); - domPopupSearchResultsWindow.style.position = 'relative'; - domPopupSearchResultsWindow.style.display = 'block'; - var width = document.body.clientWidth - 8; // the -8 is for IE :-( - domPopupSearchResultsWindow.style.width = width + 'px'; - domPopupSearchResults.style.width = width + 'px'; - } - else - { - var domPopupSearchResults = this.DOMPopupSearchResults(); - var left = getXPos(domSearchBox) + 150; // domSearchBox.offsetWidth; - var top = getYPos(domSearchBox) + 20; // domSearchBox.offsetHeight + 1; - domPopupSearchResultsWindow.style.display = 'block'; - left -= domPopupSearchResults.offsetWidth; - domPopupSearchResultsWindow.style.top = top + 'px'; - domPopupSearchResultsWindow.style.left = left + 'px'; - } - } - - this.lastSearchValue = searchValue; - this.lastResultsPage = resultsPage; - } - - // -------- Activation Functions - - // Activates or deactivates the search panel, resetting things to - // their default values if necessary. - this.Activate = function(isActive) - { - if (isActive || // open it - this.DOMPopupSearchResultsWindow().style.display == 'block' - ) - { - this.DOMSearchBox().className = 'MSearchBoxActive'; - - var searchField = this.DOMSearchField(); - - if (searchField.value == this.searchLabel) // clear "Search" term upon entry - { - searchField.value = ''; - this.searchActive = true; - } - } - else if (!isActive) // directly remove the panel - { - this.DOMSearchBox().className = 'MSearchBoxInactive'; - this.DOMSearchField().value = this.searchLabel; - this.searchActive = false; - this.lastSearchValue = '' - this.lastResultsPage = ''; - } - } -} - -// ----------------------------------------------------------------------- - -// The class that handles everything on the search results page. -function SearchResults(name) -{ - // The number of matches from the last run of . - this.lastMatchCount = 0; - this.lastKey = 0; - this.repeatOn = false; - - // Toggles the visibility of the passed element ID. - this.FindChildElement = function(id) - { - var parentElement = document.getElementById(id); - var element = parentElement.firstChild; - - while (element && element!=parentElement) - { - if (element.nodeName == 'DIV' && element.className == 'SRChildren') - { - return element; - } - - if (element.nodeName == 'DIV' && element.hasChildNodes()) - { - element = element.firstChild; - } - else if (element.nextSibling) - { - element = element.nextSibling; - } - else - { - do - { - element = element.parentNode; - } - while (element && element!=parentElement && !element.nextSibling); - - if (element && element!=parentElement) - { - element = element.nextSibling; - } - } - } - } - - this.Toggle = function(id) - { - var element = this.FindChildElement(id); - if (element) - { - if (element.style.display == 'block') - { - element.style.display = 'none'; - } - else - { - element.style.display = 'block'; - } - } - } - - // Searches for the passed string. If there is no parameter, - // it takes it from the URL query. - // - // Always returns true, since other documents may try to call it - // and that may or may not be possible. - this.Search = function(search) - { - if (!search) // get search word from URL - { - search = window.location.search; - search = search.substring(1); // Remove the leading '?' - search = unescape(search); - } - - search = search.replace(/^ +/, ""); // strip leading spaces - search = search.replace(/ +$/, ""); // strip trailing spaces - search = search.toLowerCase(); - search = convertToId(search); - - var resultRows = document.getElementsByTagName("div"); - var matches = 0; - - var i = 0; - while (i < resultRows.length) - { - var row = resultRows.item(i); - if (row.className == "SRResult") - { - var rowMatchName = row.id.toLowerCase(); - rowMatchName = rowMatchName.replace(/^sr\d*_/, ''); // strip 'sr123_' - - if (search.length<=rowMatchName.length && - rowMatchName.substr(0, search.length)==search) - { - row.style.display = 'block'; - matches++; - } - else - { - row.style.display = 'none'; - } - } - i++; - } - document.getElementById("Searching").style.display='none'; - if (matches == 0) // no results - { - document.getElementById("NoMatches").style.display='block'; - } - else // at least one result - { - document.getElementById("NoMatches").style.display='none'; - } - this.lastMatchCount = matches; - return true; - } - - // return the first item with index index or higher that is visible - this.NavNext = function(index) - { - var focusItem; - while (1) - { - var focusName = 'Item'+index; - focusItem = document.getElementById(focusName); - if (focusItem && focusItem.parentNode.parentNode.style.display=='block') - { - break; - } - else if (!focusItem) // last element - { - break; - } - focusItem=null; - index++; - } - return focusItem; - } - - this.NavPrev = function(index) - { - var focusItem; - while (1) - { - var focusName = 'Item'+index; - focusItem = document.getElementById(focusName); - if (focusItem && focusItem.parentNode.parentNode.style.display=='block') - { - break; - } - else if (!focusItem) // last element - { - break; - } - focusItem=null; - index--; - } - return focusItem; - } - - this.ProcessKeys = function(e) - { - if (e.type == "keydown") - { - this.repeatOn = false; - this.lastKey = e.keyCode; - } - else if (e.type == "keypress") - { - if (!this.repeatOn) - { - if (this.lastKey) this.repeatOn = true; - return false; // ignore first keypress after keydown - } - } - else if (e.type == "keyup") - { - this.lastKey = 0; - this.repeatOn = false; - } - return this.lastKey!=0; - } - - this.Nav = function(evt,itemIndex) - { - var e = (evt) ? evt : window.event; // for IE - if (e.keyCode==13) return true; - if (!this.ProcessKeys(e)) return false; - - if (this.lastKey==38) // Up - { - var newIndex = itemIndex-1; - var focusItem = this.NavPrev(newIndex); - if (focusItem) - { - var child = this.FindChildElement(focusItem.parentNode.parentNode.id); - if (child && child.style.display == 'block') // children visible - { - var n=0; - var tmpElem; - while (1) // search for last child - { - tmpElem = document.getElementById('Item'+newIndex+'_c'+n); - if (tmpElem) - { - focusItem = tmpElem; - } - else // found it! - { - break; - } - n++; - } - } - } - if (focusItem) - { - focusItem.focus(); - } - else // return focus to search field - { - parent.document.getElementById("MSearchField").focus(); - } - } - else if (this.lastKey==40) // Down - { - var newIndex = itemIndex+1; - var focusItem; - var item = document.getElementById('Item'+itemIndex); - var elem = this.FindChildElement(item.parentNode.parentNode.id); - if (elem && elem.style.display == 'block') // children visible - { - focusItem = document.getElementById('Item'+itemIndex+'_c0'); - } - if (!focusItem) focusItem = this.NavNext(newIndex); - if (focusItem) focusItem.focus(); - } - else if (this.lastKey==39) // Right - { - var item = document.getElementById('Item'+itemIndex); - var elem = this.FindChildElement(item.parentNode.parentNode.id); - if (elem) elem.style.display = 'block'; - } - else if (this.lastKey==37) // Left - { - var item = document.getElementById('Item'+itemIndex); - var elem = this.FindChildElement(item.parentNode.parentNode.id); - if (elem) elem.style.display = 'none'; - } - else if (this.lastKey==27) // Escape - { - parent.searchBox.CloseResultsWindow(); - parent.document.getElementById("MSearchField").focus(); - } - else if (this.lastKey==13) // Enter - { - return true; - } - return false; - } - - this.NavChild = function(evt,itemIndex,childIndex) - { - var e = (evt) ? evt : window.event; // for IE - if (e.keyCode==13) return true; - if (!this.ProcessKeys(e)) return false; - - if (this.lastKey==38) // Up - { - if (childIndex>0) - { - var newIndex = childIndex-1; - document.getElementById('Item'+itemIndex+'_c'+newIndex).focus(); - } - else // already at first child, jump to parent - { - document.getElementById('Item'+itemIndex).focus(); - } - } - else if (this.lastKey==40) // Down - { - var newIndex = childIndex+1; - var elem = document.getElementById('Item'+itemIndex+'_c'+newIndex); - if (!elem) // last child, jump to parent next parent - { - elem = this.NavNext(itemIndex+1); - } - if (elem) - { - elem.focus(); - } - } - else if (this.lastKey==27) // Escape - { - parent.searchBox.CloseResultsWindow(); - parent.document.getElementById("MSearchField").focus(); - } - else if (this.lastKey==13) // Enter - { - return true; - } - return false; - } -} - -function setKeyActions(elem,action) -{ - elem.setAttribute('onkeydown',action); - elem.setAttribute('onkeypress',action); - elem.setAttribute('onkeyup',action); -} - -function setClassAttr(elem,attr) -{ - elem.setAttribute('class',attr); - elem.setAttribute('className',attr); -} - -function createResults() -{ - var results = document.getElementById("SRResults"); - for (var e=0; e - - - - - - - - -
-
Loading...
-
- -
Searching...
-
No Matches
- -
- - diff --git a/docs/html/search/variables_0.js b/docs/html/search/variables_0.js deleted file mode 100644 index d1fd2cf..0000000 --- a/docs/html/search/variables_0.js +++ /dev/null @@ -1,4 +0,0 @@ -var searchData= -[ - ['baudrate',['BAUDRATE',['../classB15F.html#a7d548d6861cfc69753161bf9cda14f87',1,'B15F']]] -]; diff --git a/docs/html/search/variables_1.html b/docs/html/search/variables_1.html deleted file mode 100644 index b243c42..0000000 --- a/docs/html/search/variables_1.html +++ /dev/null @@ -1,30 +0,0 @@ - - - - - - - - - -
-
Loading...
-
- -
Searching...
-
No Matches
- -
- - diff --git a/docs/html/search/variables_1.js b/docs/html/search/variables_1.js deleted file mode 100644 index fd5dff3..0000000 --- a/docs/html/search/variables_1.js +++ /dev/null @@ -1,5 +0,0 @@ -var searchData= -[ - ['msg_5ffail',['MSG_FAIL',['../classB15F.html#a77d1ecf24b406c9204665d3b09c36f1e',1,'B15F']]], - ['msg_5fok',['MSG_OK',['../classB15F.html#ab01299858f74a6cec598688562e0ad02',1,'B15F']]] -]; diff --git a/docs/html/search/variables_2.html b/docs/html/search/variables_2.html deleted file mode 100644 index 647df20..0000000 --- a/docs/html/search/variables_2.html +++ /dev/null @@ -1,30 +0,0 @@ - - - - - - - - - -
-
Loading...
-
- -
Searching...
-
No Matches
- -
- - diff --git a/docs/html/search/variables_2.js b/docs/html/search/variables_2.js deleted file mode 100644 index 570beea..0000000 --- a/docs/html/search/variables_2.js +++ /dev/null @@ -1,4 +0,0 @@ -var searchData= -[ - ['pre',['PRE',['../classB15F.html#a3b0fc1f85954b2d9c145af4a3af5b1ec',1,'B15F']]] -]; diff --git a/docs/html/search/variables_3.html b/docs/html/search/variables_3.html deleted file mode 100644 index 9dc9b89..0000000 --- a/docs/html/search/variables_3.html +++ /dev/null @@ -1,30 +0,0 @@ - - - - - - - - - -
-
Loading...
-
- -
Searching...
-
No Matches
- -
- - diff --git a/docs/html/search/variables_3.js b/docs/html/search/variables_3.js deleted file mode 100644 index fbf0a47..0000000 --- a/docs/html/search/variables_3.js +++ /dev/null @@ -1,5 +0,0 @@ -var searchData= -[ - ['reconnect_5ftimeout',['RECONNECT_TIMEOUT',['../classB15F.html#a040951746fbfd632e12bd1ad14578816',1,'B15F']]], - ['reconnect_5ftries',['RECONNECT_TRIES',['../classB15F.html#a6c4895bdbcd71ff6743becf97985c2dc',1,'B15F']]] -]; diff --git a/docs/html/search/variables_4.html b/docs/html/search/variables_4.html deleted file mode 100644 index 78cc2c7..0000000 --- a/docs/html/search/variables_4.html +++ /dev/null @@ -1,30 +0,0 @@ - - - - - - - - - -
-
Loading...
-
- -
Searching...
-
No Matches
- -
- - diff --git a/docs/html/search/variables_4.js b/docs/html/search/variables_4.js deleted file mode 100644 index 9a9c561..0000000 --- a/docs/html/search/variables_4.js +++ /dev/null @@ -1,4 +0,0 @@ -var searchData= -[ - ['wdt_5ftimeout',['WDT_TIMEOUT',['../classB15F.html#a158d13bc84aed6430cdede1396384e06',1,'B15F']]] -]; diff --git a/docs/html/splitbar.png b/docs/html/splitbar.png deleted file mode 100644 index fe895f2..0000000 Binary files a/docs/html/splitbar.png and /dev/null differ diff --git a/docs/html/sync_off.png b/docs/html/sync_off.png deleted file mode 100644 index 3b443fc..0000000 Binary files a/docs/html/sync_off.png and /dev/null differ diff --git a/docs/html/sync_on.png b/docs/html/sync_on.png deleted file mode 100644 index e08320f..0000000 Binary files a/docs/html/sync_on.png and /dev/null differ diff --git a/docs/html/tab_a.png b/docs/html/tab_a.png deleted file mode 100644 index 3b725c4..0000000 Binary files a/docs/html/tab_a.png and /dev/null differ diff --git a/docs/html/tab_b.png b/docs/html/tab_b.png deleted file mode 100644 index e2b4a86..0000000 Binary files a/docs/html/tab_b.png and /dev/null differ diff --git a/docs/html/tab_h.png b/docs/html/tab_h.png deleted file mode 100644 index fd5cb70..0000000 Binary files a/docs/html/tab_h.png and /dev/null differ diff --git a/docs/html/tab_s.png b/docs/html/tab_s.png deleted file mode 100644 index ab478c9..0000000 Binary files a/docs/html/tab_s.png and /dev/null differ diff --git a/docs/html/tabs.css b/docs/html/tabs.css deleted file mode 100644 index 85a0cd5..0000000 --- a/docs/html/tabs.css +++ /dev/null @@ -1 +0,0 @@ -.sm{position:relative;z-index:9999}.sm,.sm ul,.sm li{display:block;list-style:none;margin:0;padding:0;line-height:normal;direction:ltr;text-align:left;-webkit-tap-highlight-color:rgba(0,0,0,0)}.sm-rtl,.sm-rtl ul,.sm-rtl li{direction:rtl;text-align:right}.sm>li>h1,.sm>li>h2,.sm>li>h3,.sm>li>h4,.sm>li>h5,.sm>li>h6{margin:0;padding:0}.sm ul{display:none}.sm li,.sm a{position:relative}.sm a{display:block}.sm a.disabled{cursor:not-allowed}.sm:after{content:"\00a0";display:block;height:0;font:0/0 serif;clear:both;visibility:hidden;overflow:hidden}.sm,.sm *,.sm *:before,.sm *:after{-moz-box-sizing:border-box;-webkit-box-sizing:border-box;box-sizing:border-box}.sm-dox{background-image:url("tab_b.png")}.sm-dox a,.sm-dox a:focus,.sm-dox a:hover,.sm-dox a:active{padding:0 12px;padding-right:43px;font-family:"Lucida Grande","Geneva","Helvetica",Arial,sans-serif;font-size:13px;font-weight:bold;line-height:36px;text-decoration:none;text-shadow:0 1px 1px rgba(255,255,255,0.9);color:#283a5d;outline:0}.sm-dox a:hover{background-image:url("tab_a.png");background-repeat:repeat-x;color:white;text-shadow:0 1px 1px black}.sm-dox a.current{color:#d23600}.sm-dox a.disabled{color:#bbb}.sm-dox a span.sub-arrow{position:absolute;top:50%;margin-top:-14px;left:auto;right:3px;width:28px;height:28px;overflow:hidden;font:bold 12px/28px monospace!important;text-align:center;text-shadow:none;background:rgba(255,255,255,0.5);-moz-border-radius:5px;-webkit-border-radius:5px;border-radius:5px}.sm-dox a.highlighted span.sub-arrow:before{display:block;content:'-'}.sm-dox>li:first-child>a,.sm-dox>li:first-child>:not(ul) a{-moz-border-radius:5px 5px 0 0;-webkit-border-radius:5px;border-radius:5px 5px 0 0}.sm-dox>li:last-child>a,.sm-dox>li:last-child>*:not(ul) a,.sm-dox>li:last-child>ul,.sm-dox>li:last-child>ul>li:last-child>a,.sm-dox>li:last-child>ul>li:last-child>*:not(ul) a,.sm-dox>li:last-child>ul>li:last-child>ul,.sm-dox>li:last-child>ul>li:last-child>ul>li:last-child>a,.sm-dox>li:last-child>ul>li:last-child>ul>li:last-child>*:not(ul) a,.sm-dox>li:last-child>ul>li:last-child>ul>li:last-child>ul,.sm-dox>li:last-child>ul>li:last-child>ul>li:last-child>ul>li:last-child>a,.sm-dox>li:last-child>ul>li:last-child>ul>li:last-child>ul>li:last-child>*:not(ul) a,.sm-dox>li:last-child>ul>li:last-child>ul>li:last-child>ul>li:last-child>ul,.sm-dox>li:last-child>ul>li:last-child>ul>li:last-child>ul>li:last-child>ul>li:last-child>a,.sm-dox>li:last-child>ul>li:last-child>ul>li:last-child>ul>li:last-child>ul>li:last-child>*:not(ul) a,.sm-dox>li:last-child>ul>li:last-child>ul>li:last-child>ul>li:last-child>ul>li:last-child>ul{-moz-border-radius:0 0 5px 5px;-webkit-border-radius:0;border-radius:0 0 5px 5px}.sm-dox>li:last-child>a.highlighted,.sm-dox>li:last-child>*:not(ul) a.highlighted,.sm-dox>li:last-child>ul>li:last-child>a.highlighted,.sm-dox>li:last-child>ul>li:last-child>*:not(ul) a.highlighted,.sm-dox>li:last-child>ul>li:last-child>ul>li:last-child>a.highlighted,.sm-dox>li:last-child>ul>li:last-child>ul>li:last-child>*:not(ul) a.highlighted,.sm-dox>li:last-child>ul>li:last-child>ul>li:last-child>ul>li:last-child>a.highlighted,.sm-dox>li:last-child>ul>li:last-child>ul>li:last-child>ul>li:last-child>*:not(ul) a.highlighted,.sm-dox>li:last-child>ul>li:last-child>ul>li:last-child>ul>li:last-child>ul>li:last-child>a.highlighted,.sm-dox>li:last-child>ul>li:last-child>ul>li:last-child>ul>li:last-child>ul>li:last-child>*:not(ul) a.highlighted{-moz-border-radius:0;-webkit-border-radius:0;border-radius:0}.sm-dox ul{background:rgba(162,162,162,0.1)}.sm-dox ul a,.sm-dox ul a:focus,.sm-dox ul a:hover,.sm-dox ul a:active{font-size:12px;border-left:8px solid transparent;line-height:36px;text-shadow:none;background-color:white;background-image:none}.sm-dox ul a:hover{background-image:url("tab_a.png");background-repeat:repeat-x;color:white;text-shadow:0 1px 1px black}.sm-dox ul ul a,.sm-dox ul ul a:hover,.sm-dox ul ul a:focus,.sm-dox ul ul a:active{border-left:16px solid transparent}.sm-dox ul ul ul a,.sm-dox ul ul ul a:hover,.sm-dox ul ul ul a:focus,.sm-dox ul ul ul a:active{border-left:24px solid transparent}.sm-dox ul ul ul ul a,.sm-dox ul ul ul ul a:hover,.sm-dox ul ul ul ul a:focus,.sm-dox ul ul ul ul a:active{border-left:32px solid transparent}.sm-dox ul ul ul ul ul a,.sm-dox ul ul ul ul ul a:hover,.sm-dox ul ul ul ul ul a:focus,.sm-dox ul ul ul ul ul a:active{border-left:40px solid transparent}@media(min-width:768px){.sm-dox ul{position:absolute;width:12em}.sm-dox li{float:left}.sm-dox.sm-rtl li{float:right}.sm-dox ul li,.sm-dox.sm-rtl ul li,.sm-dox.sm-vertical li{float:none}.sm-dox a{white-space:nowrap}.sm-dox ul a,.sm-dox.sm-vertical a{white-space:normal}.sm-dox .sm-nowrap>li>a,.sm-dox .sm-nowrap>li>:not(ul) a{white-space:nowrap}.sm-dox{padding:0 10px;background-image:url("tab_b.png");line-height:36px}.sm-dox a span.sub-arrow{top:50%;margin-top:-2px;right:12px;width:0;height:0;border-width:4px;border-style:solid dashed dashed dashed;border-color:#283a5d transparent transparent transparent;background:transparent;-moz-border-radius:0;-webkit-border-radius:0;border-radius:0}.sm-dox a,.sm-dox a:focus,.sm-dox a:active,.sm-dox a:hover,.sm-dox a.highlighted{padding:0 12px;background-image:url("tab_s.png");background-repeat:no-repeat;background-position:right;-moz-border-radius:0!important;-webkit-border-radius:0;border-radius:0!important}.sm-dox a:hover{background-image:url("tab_a.png");background-repeat:repeat-x;color:white;text-shadow:0 1px 1px black}.sm-dox a:hover span.sub-arrow{border-color:white transparent transparent transparent}.sm-dox a.has-submenu{padding-right:24px}.sm-dox li{border-top:0}.sm-dox>li>ul:before,.sm-dox>li>ul:after{content:'';position:absolute;top:-18px;left:30px;width:0;height:0;overflow:hidden;border-width:9px;border-style:dashed dashed solid dashed;border-color:transparent transparent #bbb transparent}.sm-dox>li>ul:after{top:-16px;left:31px;border-width:8px;border-color:transparent transparent #fff transparent}.sm-dox ul{border:1px solid #bbb;padding:5px 0;background:#fff;-moz-border-radius:5px!important;-webkit-border-radius:5px;border-radius:5px!important;-moz-box-shadow:0 5px 9px rgba(0,0,0,0.2);-webkit-box-shadow:0 5px 9px rgba(0,0,0,0.2);box-shadow:0 5px 9px rgba(0,0,0,0.2)}.sm-dox ul a span.sub-arrow{right:8px;top:50%;margin-top:-5px;border-width:5px;border-color:transparent transparent transparent #555;border-style:dashed dashed dashed solid}.sm-dox ul a,.sm-dox ul a:hover,.sm-dox ul a:focus,.sm-dox ul a:active,.sm-dox ul a.highlighted{color:#555;background-image:none;border:0!important;color:#555;background-image:none}.sm-dox ul a:hover{background-image:url("tab_a.png");background-repeat:repeat-x;color:white;text-shadow:0 1px 1px black}.sm-dox ul a:hover span.sub-arrow{border-color:transparent transparent transparent white}.sm-dox span.scroll-up,.sm-dox span.scroll-down{position:absolute;display:none;visibility:hidden;overflow:hidden;background:#fff;height:36px}.sm-dox span.scroll-up:hover,.sm-dox span.scroll-down:hover{background:#eee}.sm-dox span.scroll-up:hover span.scroll-up-arrow,.sm-dox span.scroll-up:hover span.scroll-down-arrow{border-color:transparent transparent #d23600 transparent}.sm-dox span.scroll-down:hover span.scroll-down-arrow{border-color:#d23600 transparent transparent transparent}.sm-dox span.scroll-up-arrow,.sm-dox span.scroll-down-arrow{position:absolute;top:0;left:50%;margin-left:-6px;width:0;height:0;overflow:hidden;border-width:6px;border-style:dashed dashed solid dashed;border-color:transparent transparent #555 transparent}.sm-dox span.scroll-down-arrow{top:8px;border-style:solid dashed dashed dashed;border-color:#555 transparent transparent transparent}.sm-dox.sm-rtl a.has-submenu{padding-right:12px;padding-left:24px}.sm-dox.sm-rtl a span.sub-arrow{right:auto;left:12px}.sm-dox.sm-rtl.sm-vertical a.has-submenu{padding:10px 20px}.sm-dox.sm-rtl.sm-vertical a span.sub-arrow{right:auto;left:8px;border-style:dashed solid dashed dashed;border-color:transparent #555 transparent transparent}.sm-dox.sm-rtl>li>ul:before{left:auto;right:30px}.sm-dox.sm-rtl>li>ul:after{left:auto;right:31px}.sm-dox.sm-rtl ul a.has-submenu{padding:10px 20px!important}.sm-dox.sm-rtl ul a span.sub-arrow{right:auto;left:8px;border-style:dashed solid dashed dashed;border-color:transparent #555 transparent transparent}.sm-dox.sm-vertical{padding:10px 0;-moz-border-radius:5px;-webkit-border-radius:5px;border-radius:5px}.sm-dox.sm-vertical a{padding:10px 20px}.sm-dox.sm-vertical a:hover,.sm-dox.sm-vertical a:focus,.sm-dox.sm-vertical a:active,.sm-dox.sm-vertical a.highlighted{background:#fff}.sm-dox.sm-vertical a.disabled{background-image:url("tab_b.png")}.sm-dox.sm-vertical a span.sub-arrow{right:8px;top:50%;margin-top:-5px;border-width:5px;border-style:dashed dashed dashed solid;border-color:transparent transparent transparent #555}.sm-dox.sm-vertical>li>ul:before,.sm-dox.sm-vertical>li>ul:after{display:none}.sm-dox.sm-vertical ul a{padding:10px 20px}.sm-dox.sm-vertical ul a:hover,.sm-dox.sm-vertical ul a:focus,.sm-dox.sm-vertical ul a:active,.sm-dox.sm-vertical ul a.highlighted{background:#eee}.sm-dox.sm-vertical ul a.disabled{background:#fff}} \ No newline at end of file diff --git a/docs/html/timeoutexception_8h_source.html b/docs/html/timeoutexception_8h_source.html deleted file mode 100644 index 0bfd0e2..0000000 --- a/docs/html/timeoutexception_8h_source.html +++ /dev/null @@ -1,82 +0,0 @@ - - - - - - - -B15F: drv/timeoutexception.h Source File - - - - - - - - - -
-
- - - - - - -
-
B15F -
-
Board 15 Famulus Edition
-
-
- - - - - - - - -
-
- - -
- -
- - -
-
-
-
timeoutexception.h
-
-
-
1 #ifndef TIMEOUTEXCEPTION_H
2 #define TIMEOUTEXCEPTION_H
3 
4 #include <exception>
5 
6 // SOURCE: https://stackoverflow.com/a/8152888
7 
10 class TimeoutException: public std::exception
11 {
12 public:
13  explicit TimeoutException(const char* message, int timeout) : TimeoutException(std::string(message), timeout)
14  {
15  }
16 
17  explicit TimeoutException(const std::string& message, int timeout) : msg(message), m_timeout(timeout)
18  {
19  if(!msg.length())
20  msg = "Timeout reached (" + std::to_string(m_timeout) + ")";
21  }
22 
23  virtual ~TimeoutException() throw ()
24  {
25  }
26 
27  virtual const char* what() const throw ()
28  {
29  return msg.c_str();
30  }
31 
32 protected:
33  std::string msg;
34  int m_timeout;
35 };
36 
37 #endif // TIMEOUTEXCEPTION_H
- - - - - diff --git a/docs/html/ui_8cpp_source.html b/docs/html/ui_8cpp_source.html deleted file mode 100644 index b82ff5f..0000000 --- a/docs/html/ui_8cpp_source.html +++ /dev/null @@ -1,96 +0,0 @@ - - - - - - - -B15F: ui/ui.cpp Source File - - - - - - - - - -
-
- - - - - - -
-
B15F -
-
Board 15 Famulus Edition
-
-
- - - - - - - - -
-
- - -
- -
- - -
-
-
-
ui.cpp
-
-
-
1 #include "ui.h"
2 #include "../drv/b15f.h"
3 
4 std::vector<View*> win_stack;
5 std::thread t_refresh;
6 
7 void show_main(int)
8 {
9  ViewSelection* view = new ViewSelection();
10  view->setTitle("B15F - Command Line Interface");
11  view->addChoice("[ Monitor - Eingaben beobachten ]", &show_monitor);
12  view->addChoice("[ Digitale Ausgabe BE0 ]", &show_digital_output0);
13  view->addChoice("[ Digitale Ausgabe BE1 ]", &show_digital_output1);
14  view->addChoice("[ Analoge Ausgabe AA0 ]", &show_analog_output0);
15  view->addChoice("[ Analoge Ausgabe AA1 ]", &show_analog_output1);
16  view->addChoice("[ Selbsttest des B15 ]", &show_selftest_info);
17  view->addChoice("[ Informationen ]", &show_info);
18  view->addChoice("", nullptr);
19  view->addChoice("[ Beenden ]", &finish);
20  view->repaint();
21 
22  win_stack.push_back(view);
23  input(0);
24 }
25 
26 void input(int)
27 {
28  call_t nextCall;
29  int key;
30  do
31  {
32  key = wgetch(View::getWinContext());
33  win_stack.back()->repaint();
34  nextCall = win_stack.back()->keypress(key);
35 
36  if(key == -1)
37  view_back(key);
38 
39  if(nextCall)
40  nextCall(key);
41  }
42  while(win_stack.size());
43 }
44 
45 void view_back(int)
46 {
47  if(win_stack.size())
48  {
49  delete win_stack.back();
50  win_stack.pop_back();
51  }
52  if(win_stack.size())
53  win_stack.back()->repaint();
54 }
55 
56 void finish(int)
57 {
58  cleanup();
59  exit(EXIT_SUCCESS);
60 }
61 
62 void cleanup()
63 {
64  if(t_refresh.joinable())
65  t_refresh.join();
66  clrtoeol();
67  refresh();
68  endwin();
69 }
70 
71 void show_info(int)
72 {
73  ViewInfo* view = new ViewInfo();
74  view->setTitle("Info");
75  view->setText("Informationen zu Board 15 Famulus Edition\nEs war einmal...");
76  view->setLabelClose("[ Zurueck ]");
77  view->repaint();
78 
79  win_stack.push_back(view);
80  input(0);
81 }
82 
83 void show_monitor(int)
84 {
85  ViewMonitor* view = new ViewMonitor();
86  view->setTitle("Monitor");
87  view->setText("\nErfasse Messwerte...");
88  view->setLabelClose("[ Zurueck ]");
89  view->repaint();
90 
91  win_stack.push_back(view);
92  input(0);
93 }
94 
95 void show_invalid_port_input(int)
96 {
97  ViewInfo* view = new ViewInfo();
98  view->setTitle("Falsche Eingabe");
99  view->setText("Bitte geben Sie einen Wert aus dem Intervall [0, FF] an.");
100  view->setLabelClose("[ Schliessen ]");
101  view->repaint();
102 
103  win_stack.push_back(view);
104  input(0);
105 }
106 
107 void show_invalid_dac_input(int)
108 {
109  ViewInfo* view = new ViewInfo();
110  view->setTitle("Falsche Eingabe");
111  view->setText("Bitte geben Sie einen Wert aus dem Intervall [0, 1023] an.");
112  view->setLabelClose("[ Schliessen ]");
113  view->repaint();
114 
115  win_stack.push_back(view);
116  input(0);
117 }
118 
119 void write_digital_output0(int)
120 {
121  try
122  {
123  int d = std::stoi(static_cast<ViewPromt*>(win_stack.back())->getInput(), 0, 16);
124  if(d > 255 || 0 > d)
125  throw std::invalid_argument("bad value");
126  uint8_t port = static_cast<uint8_t>(d);
127 
128  B15F& drv = B15F::getInstance();
129  drv.digitalWrite0(port);
130  view_back(0);
131  }
132  catch(std::invalid_argument& ex)
133  {
134  show_invalid_port_input(0);
135  }
136 }
137 
138 void write_digital_output1(int)
139 {
140  try
141  {
142  int d = std::stoi(static_cast<ViewPromt*>(win_stack.back())->getInput(), 0, 16);
143  if(d > 255 || 0 > d)
144  throw std::invalid_argument("bad value");
145  uint8_t port = static_cast<uint8_t>(d);
146 
147  B15F& drv = B15F::getInstance();
148  drv.digitalWrite1(port);
149  view_back(0);
150  }
151  catch(std::invalid_argument& ex)
152  {
153  show_invalid_port_input(0);
154  }
155 }
156 
157 void write_analog_output0(int)
158 {
159  try
160  {
161  uint16_t port = std::stoi(static_cast<ViewPromt*>(win_stack.back())->getInput());
162  if(port > 1023)
163  throw std::invalid_argument("bad value");
164 
165  B15F& drv = B15F::getInstance();
166  drv.analogWrite0(port);
167  view_back(0);
168  }
169  catch(std::invalid_argument& ex)
170  {
171  show_invalid_dac_input(0);
172  }
173 }
174 
175 void write_analog_output1(int)
176 {
177  try
178  {
179  uint16_t port = std::stoi(static_cast<ViewPromt*>(win_stack.back())->getInput());
180  if(port > 1023)
181  throw std::invalid_argument("bad value");
182 
183  B15F& drv = B15F::getInstance();
184  drv.analogWrite1(port);
185  view_back(0);
186  }
187  catch(std::invalid_argument& ex)
188  {
189  show_invalid_dac_input(0);
190  }
191 }
192 
193 void show_digital_output0(int)
194 {
195  ViewPromt* view = new ViewPromt();
196  view->setTitle("Digitale Ausgabe BE0");
197  view->setMessage("\nAusgabe Port-Wert (hex): 0x");
198  view->setCancel("[ Zurueck ]", true);
199  view->setConfirm("[ OK ]", &write_digital_output0);
200  view->repaint();
201 
202  win_stack.push_back(view);
203  input(0);
204 }
205 
206 void show_digital_output1(int)
207 {
208  ViewPromt* view = new ViewPromt();
209  view->setTitle("Digitale Ausgabe BE1");
210  view->setMessage("\nAusgabe Port-Wert (hex): 0x");
211  view->setCancel("[ Zurueck ]", true);
212  view->setConfirm("[ OK ]", &write_digital_output1);
213  view->repaint();
214 
215  win_stack.push_back(view);
216  input(0);
217 }
218 
219 void show_analog_output0(int)
220 {
221  ViewPromt* view = new ViewPromt();
222  view->setTitle("Analoge Ausgabe AA0");
223  view->setMessage("\nAusgabe 10-Bit-Wert (0...1023): ");
224  view->setCancel("[ Zurueck ]", true);
225  view->setConfirm("[ OK ]", &write_analog_output0);
226  view->repaint();
227 
228  win_stack.push_back(view);
229  input(0);
230 }
231 
232 void show_analog_output1(int)
233 {
234  ViewPromt* view = new ViewPromt();
235  view->setTitle("Analoge Ausgabe AA1");
236  view->setMessage("\nAusgabe 10-Bit-Wert (0...1023): ");
237  view->setCancel("[ Zurueck ]", true);
238  view->setConfirm("[ OK ]", &write_analog_output1);
239  view->repaint();
240 
241  win_stack.push_back(view);
242  input(0);
243 }
244 
245 void start_selftest(int)
246 {
247  B15F& drv = B15F::getInstance();
248  drv.activateSelfTestMode();
249 
250  ViewInfo* view = new ViewInfo();
251  view->setTitle("Selbsttest aktiv");
252  view->setText("Das B15 befindet sich jetzt im Selbsttestmodus.\n \nSelbsttest:\nZu Beginn geht der Reihe nach jede LED von BA0 bis BA1 an.\nDanach leuchten die LEDs an AA0 und AA1 kurz auf.\nZum Schluss spiegelt in einer Endlosschleife:\n* BA0 Port BE0\n* BA1 die DIP-Schalter S7\n* AA0 ADC0\n* AA1 ADC1");
253  view->setLabelClose("[ Selbsttest Beenden ]");
254  view->setCall(&stop_selftest);
255  view->repaint();
256 
257  win_stack.push_back(view);
258  input(0);
259 }
260 
261 void stop_selftest(int)
262 {
263  B15F& drv = B15F::getInstance();
264  drv.discard();
266  drv.reconnect();
267  drv.digitalWrite0(0);
268  drv.digitalWrite1(0);
269 }
270 
271 void show_selftest_info(int)
272 {
273  ViewInfo* view = new ViewInfo();
274  view->setTitle("Selbsttest");
275  view->setText("Bitte entfernen Sie jetzt alle Draehte von den Anschlussklemmen und bestaetigen\nmit Enter.");
276  view->setLabelClose("[ Weiter ]");
277  view->setCall(&start_selftest);
278  view->repaint();
279 
280  win_stack.push_back(view);
281  input(0);
282 }
- - -
void delay_ms(uint16_t ms)
Definition: b15f.cpp:373
-
static B15F & getInstance(void)
Definition: b15f.cpp:383
-
Definition: b15f.h:26
-
bool digitalWrite0(uint8_t)
Definition: b15f.cpp:153
-
bool activateSelfTestMode(void)
Definition: b15f.cpp:145
- -
bool analogWrite1(uint16_t port)
Definition: b15f.cpp:210
- -
bool digitalWrite1(uint8_t)
Definition: b15f.cpp:163
-
void discard(void)
Definition: b15f.cpp:72
-
constexpr static uint16_t WDT_TIMEOUT
Time in ms after which the watch dog timer resets the MCU.
Definition: b15f.h:235
-
void reconnect(void)
Definition: b15f.cpp:57
-
bool analogWrite0(uint16_t port)
Definition: b15f.cpp:200
- - - - diff --git a/docs/html/ui_8h_source.html b/docs/html/ui_8h_source.html deleted file mode 100644 index e3da44c..0000000 --- a/docs/html/ui_8h_source.html +++ /dev/null @@ -1,81 +0,0 @@ - - - - - - - -B15F: ui/ui.h Source File - - - - - - - - - -
-
- - - - - - -
-
B15F -
-
Board 15 Famulus Edition
-
-
- - - - - - - - -
-
- - -
- -
- - -
-
-
-
ui.h
-
-
-
1 #ifndef UI_H
2 #define UI_H
3 
4 #include <vector>
5 #include "view_selection.h"
6 #include "view_info.h"
7 #include "view_monitor.h"
8 #include "view_promt.h"
9 
10 void show_main(int);
11 void input(int);
12 void view_back(int);
13 void finish(int);
14 void cleanup();
15 
16 void show_info(int);
17 void show_monitor(int);
18 void show_invalid_port_input(int);
19 void show_invalid_dac_input(int);
20 void write_digital_output0(int);
21 void write_digital_output1(int);
22 void write_analog_output0(int);
23 void write_analog_output1(int);
24 void show_digital_output0(int);
25 void show_digital_output1(int);
26 void show_analog_output0(int);
27 void show_analog_output1(int);
28 
29 // selftest group
30 void show_selftest_info(int);
31 void start_selftest(int);
32 void stop_selftest(int);
33 
34 
35 extern std::vector<View*> win_stack;
36 extern std::thread t_refresh;
37 
38 #endif // UI_H
- - - - diff --git a/docs/html/usart_8cpp_source.html b/docs/html/usart_8cpp_source.html deleted file mode 100644 index 3c613ee..0000000 --- a/docs/html/usart_8cpp_source.html +++ /dev/null @@ -1,98 +0,0 @@ - - - - - - - -B15F: drv/usart.cpp Source File - - - - - - - - - -
-
- - - - - - -
-
B15F -
-
Board 15 Famulus Edition
-
-
- - - - - - - - -
-
- - -
- -
- - -
-
-
-
usart.cpp
-
-
-
1 #include "usart.h"
2 
3 void USART::openDevice(std::string device)
4 {
5  file_desc = open(device.c_str(), O_RDWR | O_NOCTTY | O_NDELAY /* | O_NONBLOCK*/);
6  if(file_desc <= 0)
7  throw USARTException("Fehler beim Öffnen des Gerätes");
8 
9  struct termios options;
10  int code = tcgetattr(file_desc, &options);
11  if(code)
12  throw USARTException("Fehler beim Lesen der Geräteparameter");
13 
14  options.c_cflag = CS8 | CLOCAL | CREAD;
15  options.c_iflag = IGNPAR;
16  options.c_oflag = 0;
17  options.c_lflag = 0;
18  options.c_cc[VMIN] = 0; // #bytes read returns at least
19  options.c_cc[VTIME] = timeout;
20  code = cfsetspeed(&options, baudrate);
21  if(code)
22  throw USARTException("Fehler beim Setzen der Baudrate");
23 
24  code = tcsetattr(file_desc, TCSANOW, &options);
25  if(code)
26  throw USARTException("Fehler beim Setzen der Geräteparameter");
27 
30 }
31 
33 {
34  int code = close(file_desc);
35  if(code)
36  throw USARTException("Fehler beim Schließen des Gerätes");
37 }
38 
40 {
41  int code = tcflush(file_desc, TCIFLUSH);
42  if(code)
43  throw USARTException("Fehler beim Leeren des Eingangspuffers");
44 }
45 
47 {
48  int code = tcflush(file_desc, TCOFLUSH);
49  if(code)
50  throw USARTException("Fehler beim Leeren des Ausgangspuffers");
51 }
52 
54 {
55  int code = tcdrain(file_desc);
56  if(code)
57  throw USARTException("Fehler beim Versenden des Ausgangspuffers");
58 }
59 
61 {
62  double pz = 1e2 * n_blocks_failed / n_blocks_total;
63  pz = std::round(pz * 1e2) / 1e2;
64  std::cout << "blocks total: " << n_blocks_total << " ok: " << (n_blocks_total - n_blocks_failed) << " failed: " << n_blocks_failed << " (" << pz << "%)" << std::endl;
65 }
66 
67 void USART::writeByte(uint8_t b)
68 {
69  int sent = write(file_desc, &b, 1);
70  if(sent != 1)
71  {
72  std::cout << "WARNUNG: Fehler beim Senden (" << sent << "): writeByte(), wiederhole..." << std::endl;
73  usleep(100000);
74  sent = write(file_desc, &b, 1);
75  if(sent != 1)
76  throw USARTException("Fehler beim Senden: writeByte()");
77  }
78 
79 }
80 
81 void USART::writeInt(uint16_t d)
82 {
83  int sent = write(file_desc, reinterpret_cast<char*>(&d), 2);
84  if(sent != 2)
85  throw USARTException("Fehler beim Senden: writeInt()");
86 }
87 
88 void USART::writeU32(uint32_t w)
89 {
90  int sent = write(file_desc, reinterpret_cast<char*>(&w), 4);
91  if(sent != 4)
92  throw USARTException("Fehler beim Senden: writeU32()");
93 }
94 
95 int USART::read_timeout(uint8_t* buffer, uint16_t offset, uint8_t len, uint32_t timeout)
96 {
97  uint32_t elapsed = 0;
98  int n_read = -1;
99  auto start = std::chrono::steady_clock::now();
100  auto end = start;
101  while(elapsed < timeout)
102  {
103  n_read = read(file_desc, buffer + offset, len);
104  if (n_read == len)
105  return n_read;
106 
107  end = std::chrono::steady_clock::now();
108  elapsed = std::chrono::duration_cast<std::chrono::microseconds>(end - start).count();
109  }
110 
111  return 0;
112 }
113 
114 int USART::write_timeout(uint8_t* buffer, uint16_t offset, uint8_t len, uint32_t timeout)
115 {
116  uint32_t elapsed = 0;
117  int n_sent = -1;
118  auto start = std::chrono::steady_clock::now();
119  auto end = start;
120  while(elapsed < timeout)
121  {
122  n_sent = write(file_desc, buffer + offset, len);
124  if (n_sent == len)
125  return n_sent;
126 
127  end = std::chrono::steady_clock::now();
128  elapsed = std::chrono::duration_cast<std::chrono::microseconds>(end - start).count();
129  }
130 
131  return n_sent;
132 }
133 
134 void USART::writeBlock(uint8_t* buffer, uint16_t offset, uint8_t len)
135 {
136  uint8_t crc;
137  uint8_t aw;
138  const uint16_t us_per_bit = (1000000 / baudrate) * 16;
139  const uint16_t n_total = len + 3;
140 
141  n_blocks_total++;
142  bool failed = false;
143 
144  do
145  {
146  // calc crc
147  crc = 0;
148  for(uint8_t i = 0; i < len; i++)
149  {
150  crc ^= buffer[i];
151  for (uint8_t k = 0; k < 8; k++)
152  {
153  if (crc & 1)
154  crc ^= CRC7_POLY;
155  crc >>= 1;
156  }
157  }
158 
159  // construct block
160  block_buffer[0] = len;
161  std::memcpy(&block_buffer[1], buffer + offset, len);
162  block_buffer[len + 1] = crc;
163  block_buffer[len + 2] = BLOCK_END;
164 
165  // send block
168  int n_sent = write_timeout(&block_buffer[0], 0, len + 3, us_per_bit * n_total);
169  if(n_sent != n_total)
170  throw std::runtime_error("fatal (send): " + std::to_string(n_sent));
171 
172  /*for(uint8_t i = 0; i < len + 3; i++)
173  {
174  write_timeout(&block_buffer[i], 0, 1, us_per_bit * n_total);
175  //tcdrain(file_desc);
176  //usleep(1000);
177  }*/
178 
179  // flush output data
180  tcdrain(file_desc);
181 
182  //usleep(us_per_bit * n_total * 10);
183 
184  // check response
185  int n_read = read_timeout(&aw, 0, 1, us_per_bit * n_blocks_total * 10);
186  for(uint16_t i = 0; i < 255 && n_read != 1; i++)
187  {
188  writeByte(0x80); // Stoppzeichen für Block
189  if(tcdrain(file_desc))
190  {
191  std::cout << "drain failed" << std::endl;
192  }
193  std::cout << "WARNING: read error (" << n_read << "), retry #" << (int) i << std::endl;
194  usleep(us_per_bit*100);
195  n_read = read_timeout(&aw, 0, 1, us_per_bit);
196  }
197 
198  if(n_read != 1)
199  throw std::runtime_error("fatal: " + std::to_string(n_read));
200 
201  //clearInputBuffer();
202 
203  if(aw != 0xFF)
204  {
205  if(!failed)
206  n_blocks_failed++;
207  failed = true;
208  std::cout << "block failed, retry" << std::endl;
209  }
210  }
211  while(aw != 0xFF);
212 
213  //std::cout << "OK" << std::endl;
214 }
215 
216 uint8_t USART::readByte(void)
217 {
218  char b;
219  auto start = std::chrono::steady_clock::now();
220  auto end = start;
221  uint16_t elapsed = 0;
222  while(elapsed < timeout * 100)
223  {
224  int code = read(file_desc, &b, 1);
225  if (code > 0)
226  return static_cast<uint8_t>(b);
227 
228  end = std::chrono::steady_clock::now();
229  elapsed = std::chrono::duration_cast<std::chrono::milliseconds>(end - start).count();
230  }
231 
232  throw TimeoutException("Verbindung unterbrochen.", timeout);
233 }
234 
235 uint16_t USART::readInt(void)
236 {
237  return readByte() | readByte() << 8;
238 }
239 
240 bool USART::readBlock(uint8_t* buffer, uint16_t offset)
241 {
242  uint8_t len = readByte();
243  uint8_t crc = 0;
244  buffer += offset;
245 
246  uint32_t block_timeout = timeout / 10;
247 
248  // wait for block
249  int n_ready;
250  uint16_t elapsed = 0;
251  auto start = std::chrono::steady_clock::now();
252  auto end = start;
253  while(elapsed < block_timeout)
254  {
255  int code = ioctl(file_desc, FIONREAD, &n_ready);
256  if(code != 0)
257  {
258  std::cout << "n_ready code: " << code << std::endl;
259  return false;
260  }
261 
262  if(n_ready >= len + 1)
263  break;
264 
265  end = std::chrono::steady_clock::now();
266  elapsed = std::chrono::duration_cast<std::chrono::milliseconds>(end - start).count();
267  }
268  if(elapsed >= timeout)
269  {
270  std::cout << "block timeout: " << std::endl;
271  return false;
272  }
273 
274  while(len--)
275  {
276  *buffer = readByte();
277 
278  crc ^= *buffer++;
279  for (uint8_t i = 0; i < 8; i++)
280  {
281  if (crc & 1)
282  crc ^= CRC7_POLY;
283  crc >>= 1;
284  }
285  }
286 
287  crc ^= readByte();
288  for (uint8_t i = 0; i < 8; i++)
289  {
290  if (crc & 1)
291  crc ^= CRC7_POLY;
292  crc >>= 1;
293  }
294 
295  if(TEST == 1)
296  crc = 1;
297  if(TEST > 100)
298  TEST = 0;
299 
300  if (crc == 0)
301  {
302  writeByte(0xFF);
303  return true;
304  }
305  else
306  {
307  writeByte(0xFE);
308  return false;
309  }
310 }
311 
313 {
314  return baudrate;
315 }
316 
318 {
319  return timeout;
320 }
321 
322 void USART::setBaudrate(uint32_t baudrate)
323 {
324  this->baudrate = baudrate;
325 }
326 
327 void USART::setTimeout(uint8_t timeout)
328 {
329  this->timeout = timeout;
330 }
-
void writeU32(uint32_t d)
Definition: usart.cpp:88
-
uint32_t getBaudrate(void)
Definition: usart.cpp:312
-
uint8_t readByte(void)
Definition: usart.cpp:216
- -
void printStatistics(void)
Definition: usart.cpp:60
-
void closeDevice(void)
Definition: usart.cpp:32
-
void clearInputBuffer(void)
Definition: usart.cpp:39
-
uint8_t getTimeout(void)
Definition: usart.cpp:317
-
void clearOutputBuffer(void)
Definition: usart.cpp:46
-
void setBaudrate(uint32_t baudrate)
Definition: usart.cpp:322
-
void writeByte(uint8_t b)
Definition: usart.cpp:67
-
void openDevice(std::string device)
Definition: usart.cpp:3
-
uint16_t readInt(void)
Definition: usart.cpp:235
-
void setTimeout(uint8_t timeout)
Definition: usart.cpp:327
-
void flushOutputBuffer(void)
Definition: usart.cpp:53
- -
void writeInt(uint16_t d)
Definition: usart.cpp:81
- - - - diff --git a/docs/html/usart_8h_source.html b/docs/html/usart_8h_source.html deleted file mode 100644 index fb279ff..0000000 --- a/docs/html/usart_8h_source.html +++ /dev/null @@ -1,97 +0,0 @@ - - - - - - - -B15F: drv/usart.h Source File - - - - - - - - - -
-
- - - - - - -
-
B15F -
-
Board 15 Famulus Edition
-
-
- - - - - - - - -
-
- - -
- -
- - -
-
-
-
usart.h
-
-
-
1 #ifndef USART_H
2 #define USART_H
3 
4 #include <iostream>
5 #include <cstdint>
6 #include <chrono>
7 #include <unistd.h>
8 #include <cstring>
9 #include <fcntl.h>
10 #include <sys/ioctl.h>
11 #include <termios.h>
12 #include <cmath>
13 #include "usartexception.h"
14 #include "timeoutexception.h"
15 
18 class USART
19 {
20 public:
21 
22  /*************************************************
23  * Methoden für die Verwaltung der Schnittstelle *
24  *************************************************/
25 
31  void openDevice(std::string device);
32 
37  void closeDevice(void);
38 
43  void clearInputBuffer(void);
44 
49  void clearOutputBuffer(void);
50 
55  void flushOutputBuffer(void);
56 
60  void printStatistics(void);
61 
62  /*************************************************/
63 
64 
65 
66  /*************************************
67  * Methoden für die Datenübertragung *
68  *************************************/
69 
75  void writeByte(uint8_t b);
76 
82  void writeInt(uint16_t d);
83 
89  void writeU32(uint32_t d);
90 
95  uint8_t readByte(void);
96 
101  uint16_t readInt(void);
102 
103  int read_timeout(uint8_t* buffer, uint16_t offset, uint8_t len, uint32_t timeout);
104  int write_timeout(uint8_t* buffer, uint16_t offset, uint8_t len, uint32_t timeout);
105  void writeBlock(uint8_t* buffer, uint16_t offset, uint8_t len);
106  bool readBlock(uint8_t* buffer, uint16_t offset);
107 
108  /*************************************/
109 
110 
111 
112  /***************************************
113  * Methoden für einstellbare Parameter *
114  ***************************************/
115 
120  uint32_t getBaudrate(void);
121 
126  uint8_t getTimeout(void);
127 
132  void setBaudrate(uint32_t baudrate);
133 
138  void setTimeout(uint8_t timeout);
139 
140  /***************************************/
141 
142  constexpr static uint8_t CRC7_POLY = 0x91;
143  constexpr static uint8_t MAX_BLOCK_SIZE = 64;
144  constexpr static uint8_t BLOCK_END = 0x80;
145 private:
146 
147  int file_desc = -1; // Linux Dateideskriptor
148  uint32_t baudrate = 9600; // Standard-Baudrate, sollte mit setBaudrate() überschrieben werden!
149  int TEST = 0;
150  uint8_t timeout = 10; // in Dezisekunden
151  uint8_t block_buffer[MAX_BLOCK_SIZE + 3];
152 
153  // debug statistics
154  uint32_t n_blocks_total = 0;
155  uint32_t n_blocks_failed = 0;
156 };
157 
158 
159 #endif // USART_H
-
void writeU32(uint32_t d)
Definition: usart.cpp:88
-
uint32_t getBaudrate(void)
Definition: usart.cpp:312
-
uint8_t readByte(void)
Definition: usart.cpp:216
-
void printStatistics(void)
Definition: usart.cpp:60
-
void closeDevice(void)
Definition: usart.cpp:32
-
void clearInputBuffer(void)
Definition: usart.cpp:39
-
uint8_t getTimeout(void)
Definition: usart.cpp:317
-
Definition: usart.h:18
-
void clearOutputBuffer(void)
Definition: usart.cpp:46
-
void setBaudrate(uint32_t baudrate)
Definition: usart.cpp:322
-
void writeByte(uint8_t b)
Definition: usart.cpp:67
-
void openDevice(std::string device)
Definition: usart.cpp:3
-
uint16_t readInt(void)
Definition: usart.cpp:235
-
void setTimeout(uint8_t timeout)
Definition: usart.cpp:327
-
void flushOutputBuffer(void)
Definition: usart.cpp:53
-
void writeInt(uint16_t d)
Definition: usart.cpp:81
- - - - diff --git a/docs/html/usartexception_8h_source.html b/docs/html/usartexception_8h_source.html deleted file mode 100644 index ce6e187..0000000 --- a/docs/html/usartexception_8h_source.html +++ /dev/null @@ -1,82 +0,0 @@ - - - - - - - -B15F: drv/usartexception.h Source File - - - - - - - - - -
-
- - - - - - -
-
B15F -
-
Board 15 Famulus Edition
-
-
- - - - - - - - -
-
- - -
- -
- - -
-
-
-
usartexception.h
-
-
-
1 #ifndef USARTEXCEPTION_H
2 #define USARTEXCEPTION_H
3 
4 #include <exception>
5 #include <string>
6 
7 // SOURCE: https://stackoverflow.com/a/8152888
8 
11 class USARTException: public std::exception
12 {
13 public:
14  explicit USARTException(const char* message) : msg(message)
15  {
16  }
17 
18  explicit USARTException(const std::string& message) : msg(message)
19  {
20  }
21 
22  virtual ~USARTException() throw ()
23  {
24  }
25 
26  virtual const char* what() const throw ()
27  {
28  return msg.c_str();
29  }
30 
31 protected:
32  std::string msg;
33 };
34 
35 #endif // USARTEXCEPTION_H
- - - - - diff --git a/docs/html/view_8cpp_source.html b/docs/html/view_8cpp_source.html deleted file mode 100644 index ce0f029..0000000 --- a/docs/html/view_8cpp_source.html +++ /dev/null @@ -1,82 +0,0 @@ - - - - - - - -B15F: ui/view.cpp Source File - - - - - - - - - -
-
- - - - - - -
-
B15F -
-
Board 15 Famulus Edition
-
-
- - - - - - - - -
-
- - -
- -
- - -
-
-
-
view.cpp
-
-
-
1 #include "view.h"
2 
3 WINDOW* View::win = nullptr;
4 
5 View::View()
6 {
7  if(!win)
8  {
9  B15F::abort("View::win not initialized, missing context");
10  }
11  getmaxyx(win, height, width); // init width and height
12  keypad(win, TRUE);
13 }
14 
15 View::~View()
16 {
17 }
18 
19 void View::setWinContext(WINDOW* win)
20 {
21  View::win = win;
22 }
23 
24 WINDOW* View::getWinContext()
25 {
26  return win;
27 }
28 
29 // from: https://stackoverflow.com/a/37454181
30 std::vector<std::string> View::str_split(const std::string& str, const std::string delim)
31 {
32  std::vector<std::string> tokens;
33  size_t prev = 0, pos = 0;
34  do
35  {
36  pos = str.find(delim, prev);
37  if (pos == std::string::npos) pos = str.length();
38  std::string token = str.substr(prev, pos-prev);
39  if (!token.empty()) tokens.push_back(token);
40  prev = pos + delim.length();
41  }
42  while (pos < str.length() && prev < str.length());
43  return tokens;
44 }
45 
46 
47 void View::setTitle(std::string title)
48 {
49  this->title = title;
50 }
51 
52 void View::repaint()
53 {
54  // get screen size
55  struct winsize size;
56  if (ioctl(0, TIOCGWINSZ, (char *) &size) < 0)
57  throw std::runtime_error("TIOCGWINSZ error");
58 
59 
60  start_x = floor((size.ws_col - width) / 2.);
61  start_y = floor((size.ws_row - height) / 2.);
62 
63  curs_set(0); // hide cursor
64  mvwin(win, start_y, start_x);
65  clear();
66  wclear(win);
67 
68  // generic draw
69  box(win, 0, 0);
70  int offset_x = (width - title.length()) / 2;
71  mvwprintw(win, 1, offset_x, "%s", title.c_str());
72 
73  // specific draw
74  draw();
75 
76  refresh();
77  wrefresh(win);
78 }
-
static void abort(std::string msg)
Definition: b15f.cpp:408
- - - - diff --git a/docs/html/view_8h_source.html b/docs/html/view_8h_source.html deleted file mode 100644 index 34219aa..0000000 --- a/docs/html/view_8h_source.html +++ /dev/null @@ -1,82 +0,0 @@ - - - - - - - -B15F: ui/view.h Source File - - - - - - - - - -
-
- - - - - - -
-
B15F -
-
Board 15 Famulus Edition
-
-
- - - - - - - - -
-
- - -
- -
- - -
-
-
-
view.h
-
-
-
1 #ifndef VIEW_H
2 #define VIEW_H
3 
4 #include <iostream>
5 #include <cmath>
6 #include <vector>
7 #include <functional>
8 #include <ncurses.h> // sudo apt-get install libncurses5-dev
9 #include <sys/ioctl.h>
10 #include <unistd.h>
11 #include <signal.h>
12 #include "../drv/b15f.h"
13 
14 extern std::string ERR_MSG;
15 typedef std::function<void(int)> call_t;
16 
19 class View
20 {
21 public:
22  View(void);
23  virtual ~View(void);
24 
25  static void setWinContext(WINDOW* win);
26  static WINDOW* getWinContext(void);
27  static std::vector<std::string> str_split(const std::string& str, const std::string delim);
28 
29  virtual void setTitle(std::string title);
30 
31  virtual void repaint(void);
32 
33  virtual void draw(void) = 0;
34  virtual call_t keypress(int& key) = 0;
35 
36 
37 protected:
38  int width, height;
39  int start_x = 0, start_y = 0;
40  std::string title;
41  std::vector<call_t> calls;
42 
43  static WINDOW* win;
44  constexpr static int KEY_ENT = 10;
45 };
46 
47 #endif // VIEW_H
-
Definition: view.h:19
- - - - diff --git a/docs/html/view__info_8cpp_source.html b/docs/html/view__info_8cpp_source.html deleted file mode 100644 index fc91695..0000000 --- a/docs/html/view__info_8cpp_source.html +++ /dev/null @@ -1,81 +0,0 @@ - - - - - - - -B15F: ui/view_info.cpp Source File - - - - - - - - - -
-
- - - - - - -
-
B15F -
-
Board 15 Famulus Edition
-
-
- - - - - - - - -
-
- - -
- -
- - -
-
-
-
view_info.cpp
-
-
-
1 #include "view_info.h"
2 
3 ViewInfo::ViewInfo()
4 {
5  calls.push_back(nullptr);
6 }
7 
8 void ViewInfo::setText(std::string text)
9 {
10  this->text = text;
11 }
12 
13 void ViewInfo::setLabelClose(std::string label)
14 {
15  this->label_close = label;
16 }
17 
18 void ViewInfo::setCall(call_t call)
19 {
20  calls[0] = call;
21 }
22 
23 void ViewInfo::draw()
24 {
25  int li = 0;
26  for(std::string line : str_split(text, "\n"))
27  mvwprintw(win, text_offset_y + li++, text_offset_x, "%s", line.c_str());
28 
29  close_offset_x = (width - label_close.length()) / 2;
30  close_offset_y = height - 2;
31 
32  wattron(win, A_REVERSE);
33  mvwprintw(win, close_offset_y, close_offset_x, "%s", label_close.c_str());
34  wattroff(win, A_REVERSE);
35 }
36 
37 call_t ViewInfo::keypress(int& key)
38 {
39  switch(key)
40  {
41 
42  case KEY_MOUSE:
43  {
44  // http://pronix.linuxdelta.de/C/Linuxprogrammierung/Linuxsystemprogrammieren_C_Kurs_Kapitel10b.shtml
45  MEVENT event;
46  if(getmouse(&event) == OK && event.bstate & (BUTTON1_CLICKED | BUTTON1_DOUBLE_CLICKED))
47  {
48  size_t column = start_x + close_offset_x;
49  size_t row = start_y + close_offset_y;
50  size_t mouse_x = event.x, mouse_y = event.y;
51  if(mouse_y == row && mouse_x >= column && mouse_x < column + label_close.length())
52  key = -1; // do return from view
53  }
54  break;
55  }
56  case KEY_ENT:
57  key = -1; // do return from view
58  break;
59  default:
60  break;
61  }
62  return calls[0];
63 }
- - - - diff --git a/docs/html/view__info_8h_source.html b/docs/html/view__info_8h_source.html deleted file mode 100644 index 253009d..0000000 --- a/docs/html/view__info_8h_source.html +++ /dev/null @@ -1,83 +0,0 @@ - - - - - - - -B15F: ui/view_info.h Source File - - - - - - - - - -
-
- - - - - - -
-
B15F -
-
Board 15 Famulus Edition
-
-
- - - - - - - - -
-
- - -
- -
- - -
-
-
-
view_info.h
-
-
-
1 #ifndef VIEW_INFO
2 #define VIEW_INFO
3 
4 #include "view.h"
5 
8 class ViewInfo : public View
9 {
10 public:
11  ViewInfo(void);
12  virtual void setText(std::string text);
13  virtual void setLabelClose(std::string label);;
14  virtual void setCall(call_t call);
15  virtual void draw(void) override;
16  virtual call_t keypress(int& key) override;
17 
18 protected:
19  std::string text;
20  std::string label_close;
21  int close_offset_x = 0;
22  int close_offset_y = 0;
23  constexpr static int text_offset_x = 2;
24  constexpr static int text_offset_y = 3;
25 };
26 
27 #endif // VIEW_INFO
- -
Definition: view.h:19
- - - - diff --git a/docs/html/view__monitor_8cpp_source.html b/docs/html/view__monitor_8cpp_source.html deleted file mode 100644 index 09f6315..0000000 --- a/docs/html/view__monitor_8cpp_source.html +++ /dev/null @@ -1,92 +0,0 @@ - - - - - - - -B15F: ui/view_monitor.cpp Source File - - - - - - - - - -
-
- - - - - - -
-
B15F -
-
Board 15 Famulus Edition
-
-
- - - - - - - - -
-
- - -
- -
- - -
-
-
-
view_monitor.cpp
-
-
-
1 #include "view_monitor.h"
2 
3 ViewMonitor::ViewMonitor() : t_worker(&ViewMonitor::worker, this)
4 {
5 }
6 
7 call_t ViewMonitor::keypress(int& key)
8 {
9  switch(key)
10  {
11 
12  case KEY_MOUSE:
13  {
14  // http://pronix.linuxdelta.de/C/Linuxprogrammierung/Linuxsystemprogrammieren_C_Kurs_Kapitel10b.shtml
15  MEVENT event;
16  bool hit = false;
17  if(getmouse(&event) == OK && event.bstate & (BUTTON1_CLICKED | BUTTON1_DOUBLE_CLICKED))
18  {
19  size_t column = start_x + close_offset_x;
20  size_t row = start_y + close_offset_y;
21  size_t mouse_x = event.x, mouse_y = event.y;
22  if(mouse_y == row && mouse_x >= column && mouse_x < column + label_close.length())
23  hit = true;
24  }
25  if(!hit)
26  break;
27 
28  // fall through to next case
29  [[fallthrough]];
30  }
31  case KEY_ENT:
32  run_worker = false;
33  key = -1; // do return from view
34  wclear(win);
35  wrefresh(win);
36  t_worker.join();
37  break;
38  default:
39  break;
40  }
41  return calls[0];
42 }
43 
44 std::string ViewMonitor::fancyDigitalString(uint8_t& b)
45 {
46  std::stringstream str;
47  str << std::bitset<8>(b).to_string();
48  str << " ";
49  str << "0x" << std::setfill ('0') << std::setw(2) << std::hex << (int) b << std::dec;
50  return str.str();
51 }
52 
53 std::string ViewMonitor::fancyAnalogString(uint16_t& v)
54 {
55  std::stringstream str;
56  double volt = round(v * 100.0 * 5.0 / 1023.0) / 100.0;
57 
58  str << std::setfill ('0') << std::setw(4) << (int) v << " " << std::fixed << std::setprecision(2) << volt << " V ";
59 
60  str << "[";
61  uint8_t p = round(v * 40.0 / 1023.0);
62  for(uint8_t i = 0; i < p; i++)
63  str << "X";
64  for(uint8_t i = 0; i < 40 - p; i++)
65  str << " ";
66  str << "]" << std::endl;
67 
68  return str.str();
69 }
70 
71 void ViewMonitor::worker()
72 {
73  B15F& drv = B15F::getInstance();
74  while(run_worker)
75  {
76  try
77  {
78  std::this_thread::sleep_for(std::chrono::milliseconds(100));
79 
80  uint8_t be0 = drv.digitalRead0();
81  uint8_t be1 = drv.digitalRead1();
82  uint8_t dsw = drv.readDipSwitch();
83  uint16_t adc[8];
84  for(uint8_t i = 0; i < sizeof(adc) / sizeof(adc[0]); i++)
85  adc[i] = drv.analogRead(i);
86 
87 
88  std::stringstream str;
89 
90  // hline
91  for(uint8_t i = 0; i < width - 2 * text_offset_x; i++)
92  if(i % 2 == 0)
93  str << "-";
94  else
95  str << " ";
96  str << std::endl;
97 
98  str << "Digitale Enigaenge:" << std::endl;
99  str << "Binaere Eingabe 0: " << fancyDigitalString(be0) << std::endl;
100  str << "Binaere Eingabe 1: " << fancyDigitalString(be1) << std::endl;
101  str << "Dip Schalter (S7): " << fancyDigitalString(dsw) << std::endl;
102 
103  // hline
104  for(uint8_t i = 0; i < width - 2 * text_offset_x; i++)
105  if(i % 2 == 0)
106  str << "-";
107  else
108  str << " ";
109  str << std::endl;
110 
111  str << "Analoge Eingaenge:" << std::endl;
112  for(uint8_t i = 0; i < sizeof(adc) / sizeof(adc[0]); i++)
113  {
114  str << "Kanal " << std::to_string((int) i) << ": ";
115  str << fancyAnalogString(adc[i]) << std::endl;
116  }
117 
118  text = str.str();
119  repaint();
120  }
121  catch(DriverException& ex)
122  {
123  std::cout << "DriverException: " << ex.what() << std::endl;
124  drv.delay_ms(1000);
125  }
126  catch(...)
127  {
128  try
129  {
130  drv.reconnect();
131  }
132  catch(...)
133  {
134  B15F::abort("yoho meine dudes");
135  return;
136  }
137  }
138  }
139 }
- -
uint8_t digitalRead0(void)
Definition: b15f.cpp:173
-
uint8_t readDipSwitch(void)
Definition: b15f.cpp:191
-
void delay_ms(uint16_t ms)
Definition: b15f.cpp:373
-
static B15F & getInstance(void)
Definition: b15f.cpp:383
-
Definition: b15f.h:26
-
static void abort(std::string msg)
Definition: b15f.cpp:408
-
uint16_t analogRead(uint8_t channel)
Definition: b15f.cpp:220
-
uint8_t digitalRead1(void)
Definition: b15f.cpp:182
-
void reconnect(void)
Definition: b15f.cpp:57
- - - - - diff --git a/docs/html/view__monitor_8h_source.html b/docs/html/view__monitor_8h_source.html deleted file mode 100644 index b311d44..0000000 --- a/docs/html/view__monitor_8h_source.html +++ /dev/null @@ -1,83 +0,0 @@ - - - - - - - -B15F: ui/view_monitor.h Source File - - - - - - - - - -
-
- - - - - - -
-
B15F -
-
Board 15 Famulus Edition
-
-
- - - - - - - - -
-
- - -
- -
- - -
-
-
-
view_monitor.h
-
-
-
1 #ifndef VIEW_MONITOR_H
2 #define VIEW_MONITOR_H
3 
4 #include <thread>
5 #include <chrono>
6 #include <sstream>
7 #include <bitset>
8 #include "view_info.h"
9 #include "../drv/b15f.h"
10 
13 class ViewMonitor : public ViewInfo
14 {
15 
16 public:
17  ViewMonitor(void);
18  virtual call_t keypress(int& key) override;
19 
20 private:
21  std::string fancyDigitalString(uint8_t& b);
22  std::string fancyAnalogString(uint16_t& v);
23 
24 protected:
25  virtual void worker(void);
26  volatile bool run_worker = true;
27  std::thread t_worker;
28 
29 };
30 
31 #endif // VIEW_MONITOR_H
- - - - - - diff --git a/docs/html/view__promt_8cpp_source.html b/docs/html/view__promt_8cpp_source.html deleted file mode 100644 index cb9f31c..0000000 --- a/docs/html/view__promt_8cpp_source.html +++ /dev/null @@ -1,81 +0,0 @@ - - - - - - - -B15F: ui/view_promt.cpp Source File - - - - - - - - - -
-
- - - - - - -
-
B15F -
-
Board 15 Famulus Edition
-
-
- - - - - - - - -
-
- - -
- -
- - -
-
-
-
view_promt.cpp
-
-
-
1 #include "view_promt.h"
2 
3 void ViewPromt::draw()
4 {
5  curs_set(1); // show cursor
6 
7  int li = text_offset_y;
8  int ci = 0;
9  for(std::string line : str_split(message + input, "\n"))
10  {
11  mvwprintw(win, ++li, text_offset_x, "%s", line.c_str());
12  ci = line.length() + text_offset_x;
13  }
14 
15  button_offset_x = (width - label_cancel.length() - sep.length() - label_confirm.length()) / 2;
16  button_offset_y = height - text_offset_y;
17 
18  if(selection == 0)
19  {
20  wattron(win, A_REVERSE);
21  mvwprintw(win, button_offset_y, button_offset_x, "%s", label_cancel.c_str());
22  wattroff(win, A_REVERSE);
23  mvwprintw(win, button_offset_y, button_offset_x + label_cancel.length(), "%s", sep.c_str());
24  mvwprintw(win, button_offset_y, button_offset_x + label_cancel.length() + sep.length(), "%s", label_confirm.c_str());
25  }
26  else
27  {
28  mvwprintw(win, button_offset_y, button_offset_x, "%s", label_cancel.c_str());
29  mvwprintw(win, button_offset_y, button_offset_x + label_cancel.length(), "%s", sep.c_str());
30  wattron(win, A_REVERSE);
31  mvwprintw(win, button_offset_y, button_offset_x + label_cancel.length() + sep.length(), "%s", label_confirm.c_str());
32  wattroff(win, A_REVERSE);
33  }
34  wmove(win, li, ci);
35 }
36 
37 void ViewPromt::setMessage(std::string message)
38 {
39  this->message = message;
40 }
41 
42 void ViewPromt::setConfirm(std::string name, std::function<void(int)> call)
43 {
44  label_confirm = name;
45  call_confirm = call;
46 }
47 
48 void ViewPromt::setCancel(std::string name, bool cancelable)
49 {
50  label_cancel = name;
51  this->cancelable = cancelable;
52 }
53 
54 std::string ViewPromt::getInput()
55 {
56  return input;
57 }
58 
59 std::function<void(int)> ViewPromt::keypress(int& key)
60 {
61  std::function<void(int)> ret = nullptr;
62  switch(key)
63  {
64  case KEY_BACKSPACE:
65  if(input.length())
66  input.pop_back();
67  break;
68  case '\t':
69  case KEY_LEFT:
70  case KEY_RIGHT:
71  selection = (selection + 1 ) % 2;
72  break;
73  case KEY_MOUSE:
74  {
75  // http://pronix.linuxdelta.de/C/Linuxprogrammierung/Linuxsystemprogrammieren_C_Kurs_Kapitel10b.shtml
76  MEVENT event;
77  bool hit = false;
78  if(getmouse(&event) == OK && event.bstate & (BUTTON1_CLICKED | BUTTON1_DOUBLE_CLICKED))
79  {
80  size_t column_start = start_x + button_offset_x;
81  size_t row_start = start_y + button_offset_y;
82  size_t mouse_x = event.x, mouse_y = event.y;
83  if(mouse_y == row_start)
84  {
85  if(cancelable && mouse_x >= column_start && mouse_x < column_start + label_cancel.length())
86  {
87  if(selection == 0 || event.bstate & BUTTON1_DOUBLE_CLICKED)
88  hit = true;
89  selection = 0;
90  }
91  if(mouse_x >= column_start + label_cancel.length() + sep.length() && mouse_x < column_start + label_cancel.length() + sep.length() + label_confirm.length())
92  {
93  if(selection == 1 || event.bstate & BUTTON1_DOUBLE_CLICKED)
94  hit = true;
95  selection = 1;
96  }
97  }
98  }
99  if(!hit)
100  break;
101 
102  // fall through to next case
103  [[fallthrough]];
104  }
105  case KEY_ENT:
106  if(selection == 0) // exit
107  key = -1; // do return from view
108  else
109  ret = call_confirm;
110  break;
111  default:
112  break;
113  }
114 
115  if(key >= ' ' && key <= '~')
116  input += (char) key;
117 
118  if(key != KEY_ENT)
119  repaint();
120  return ret;
121 }
- - - - diff --git a/docs/html/view__promt_8h_source.html b/docs/html/view__promt_8h_source.html deleted file mode 100644 index 3ffc2fc..0000000 --- a/docs/html/view__promt_8h_source.html +++ /dev/null @@ -1,83 +0,0 @@ - - - - - - - -B15F: ui/view_promt.h Source File - - - - - - - - - -
-
- - - - - - -
-
B15F -
-
Board 15 Famulus Edition
-
-
- - - - - - - - -
-
- - -
- -
- - -
-
-
-
view_promt.h
-
-
-
1 #ifndef VIEW_PROMT_H
2 #define VIEW_PROMT_H
3 
4 #include <vector>
5 #include <string>
6 #include "view.h"
7 
10 class ViewPromt : public View
11 {
12 public:
13  virtual void draw(void) override;
14  virtual void setMessage(std::string message);
15  virtual void setConfirm(std::string name, call_t call);
16  virtual void setCancel(std::string name, bool cancelable);
17  virtual std::string getInput(void);
18  virtual call_t keypress(int& key) override;
19 
20 protected:
21  size_t selection = 1;
22  std::string input;
23  std::string message = "Input";
24  std::string label_confirm = "[ OK ]";
25  std::string sep = " ";
26  std::string label_cancel = "[ Cancel ]";
27  call_t call_confirm = nullptr;
28  bool cancelable = true;
29  int button_offset_x = 0, button_offset_y = 0;
30  constexpr static int text_offset_x = 2;
31  constexpr static int text_offset_y = 2;
32 };
33 
34 #endif // VIEW_PROMT_H
-
Definition: view.h:19
- - - - - diff --git a/docs/html/view__selection_8cpp_source.html b/docs/html/view__selection_8cpp_source.html deleted file mode 100644 index 324fa41..0000000 --- a/docs/html/view__selection_8cpp_source.html +++ /dev/null @@ -1,81 +0,0 @@ - - - - - - - -B15F: ui/view_selection.cpp Source File - - - - - - - - - -
-
- - - - - - -
-
B15F -
-
Board 15 Famulus Edition
-
-
- - - - - - - - -
-
- - -
- -
- - -
-
-
-
view_selection.cpp
-
-
-
1 #include "view_selection.h"
2 
3 void ViewSelection::draw()
4 {
5  //curs_set(0); // hide cursor
6  for(size_t i = 0; i < choices.size(); i++)
7  {
8  if(selection == i)
9  wattron(win, A_REVERSE);
10  mvwprintw(win, i + choice_offset_y, choice_offset_x, "%s", choices[i].c_str());
11  if(selection == i)
12  wattroff(win, A_REVERSE);
13  }
14 }
15 
16 void ViewSelection::addChoice(std::string name, call_t call)
17 {
18  choices.push_back(name);
19  calls.push_back(call);
20 }
21 
22 call_t ViewSelection::keypress(int& key)
23 {
24  call_t ret = nullptr;
25  switch(key)
26  {
27  case KEY_UP:
28  do
29  selection = (selection - 1 + choices.size()) % choices.size();
30  while(!choices[selection].length() && choices.size());
31  break;
32 
33  case '\t':
34  case KEY_DOWN:
35  do
36  selection = (selection + 1) % choices.size();
37  while(!choices[selection].length() && choices.size());
38  break;
39 
40  case KEY_MOUSE:
41  {
42  // http://pronix.linuxdelta.de/C/Linuxprogrammierung/Linuxsystemprogrammieren_C_Kurs_Kapitel10b.shtml
43  MEVENT event;
44  bool hit = false;
45  if(getmouse(&event) == OK && event.bstate & (BUTTON1_CLICKED | BUTTON1_DOUBLE_CLICKED))
46  {
47  size_t column_start = start_x + choice_offset_x;
48  size_t row_start = start_y + choice_offset_y;
49  size_t mouse_x = event.x, mouse_y = event.y;
50  for(size_t i = 0; i < choices.size(); i++)
51  if(choices[i].length() && mouse_y == row_start + i && mouse_x >= column_start && mouse_x < column_start + choices[i].length())
52  {
53  if(selection == i || event.bstate & BUTTON1_DOUBLE_CLICKED)
54  hit = true;
55  selection = i;
56  }
57  }
58  if(!hit)
59  break;
60 
61  // fall through to next case
62  [[fallthrough]];
63  }
64 
65  case KEY_ENT:
66  if(selection == choices.size() - 1) // exit
67  key = -1; // do return from view
68  else
69  ret = calls[selection];
70  break;
71  default:
72  break;
73  }
74  repaint();
75  return ret;
76 }
- - - - diff --git a/docs/html/view__selection_8h_source.html b/docs/html/view__selection_8h_source.html deleted file mode 100644 index e284347..0000000 --- a/docs/html/view__selection_8h_source.html +++ /dev/null @@ -1,83 +0,0 @@ - - - - - - - -B15F: ui/view_selection.h Source File - - - - - - - - - -
-
- - - - - - -
-
B15F -
-
Board 15 Famulus Edition
-
-
- - - - - - - - -
-
- - -
- -
- - -
-
-
-
view_selection.h
-
-
-
1 #ifndef VIEW_SELECTION_H
2 #define VIEW_SELECTION_H
3 
4 #include <vector>
5 #include <string>
6 #include "view.h"
7 
10 class ViewSelection : public View
11 {
12 public:
13  virtual void draw(void) override;
14  virtual void addChoice(std::string name, call_t call);
15  virtual call_t keypress(int& key) override;
16 
17 
18 protected:
19  size_t selection = 0;
20  std::vector<std::string> choices;
21 
22  constexpr static int choice_offset_x = 2;
23  constexpr static int choice_offset_y = 3;
24 };
25 
26 #endif // VIEW_SELECTION_H
-
Definition: view.h:19
- - - - -