computerscare-vcv-modules

computerscare modules for VCV Rack
Log | Files | Refs

commit 08c67c06ababc09ea593c6fc88f81dec754184a1
parent 02745cba6c0d176d445d186849ffa09d447d2017
Author: Adam M <aemalone@gmail.com>
Date:   Sun, 17 Feb 2019 00:08:30 -0600

View All Poly mode of Debug

Diffstat:
Mres/ComputerscareDebugPanel.svg | 75++++++++++++++++++---------------------------------------------------------
Msrc/Computerscare.hpp | 2++
Msrc/ComputerscareDebug.cpp | 83+++++++++++++++++++++++++++++++++++++++++++++++++------------------------------
3 files changed, 72 insertions(+), 88 deletions(-)

diff --git a/res/ComputerscareDebugPanel.svg b/res/ComputerscareDebugPanel.svg @@ -34,11 +34,11 @@ borderopacity="1.0" inkscape:pageopacity="0.0" inkscape:pageshadow="2" - inkscape:zoom="8.0000004" - inkscape:cx="36.534855" - inkscape:cy="364.83589" + inkscape:zoom="5.6568545" + inkscape:cx="46.719213" + inkscape:cy="54.426326" inkscape:document-units="mm" - inkscape:current-layer="text1667" + inkscape:current-layer="g1669" showgrid="false" units="px" inkscape:snap-bbox="true" @@ -50,7 +50,9 @@ inkscape:window-x="0" inkscape:window-y="0" inkscape:window-maximized="0" - inkscape:snap-global="false" /> + inkscape:snap-global="false" + showguides="false" + inkscape:lockguides="false" /> <metadata id="metadata5"> <rdf:RDF> @@ -223,63 +225,22 @@ sodipodi:nodetypes="ccccscccsscscscccccsccc" /> </g> <g - aria-label="trg" - transform="rotate(-5.9989835,-64.42517,-5.2329589)" - style="font-style:normal;font-weight:normal;font-size:10.58333302px;line-height:1.25;font-family:sans-serif;letter-spacing:0px;word-spacing:0px;fill:#200000;fill-opacity:1;stroke:none;stroke-width:0.26458332" - id="text1655" - inkscape:transform-center-x="0.93544338"> - <path - d="m -28.193511,286.04978 v 0.43822 h 0.522276 v 0.19706 h -0.522276 v 0.83785 q 0,0.18879 0.05099,0.24253 0.05237,0.0537 0.21084,0.0537 h 0.260449 v 0.21222 h -0.260449 q -0.293522,0 -0.405143,-0.10886 -0.111621,-0.11025 -0.111621,-0.39963 v -0.83785 h -0.186036 V 286.488 h 0.186036 v -0.43822 z" - style="font-style:normal;font-variant:normal;font-weight:normal;font-stretch:normal;font-size:2.82222223px;font-family:sans-serif;-inkscape-font-specification:'sans-serif, Normal';font-variant-ligatures:normal;font-variant-caps:normal;font-variant-numeric:normal;font-feature-settings:normal;text-align:start;writing-mode:lr-tb;text-anchor:start;fill:#200000;fill-opacity:1;stroke-width:0.26458332" - id="path1694" - inkscape:connector-curvature="0" /> - <path - d="m -26.442025,286.72502 q -0.04272,-0.0248 -0.09371,-0.0358 -0.04961,-0.0124 -0.110243,-0.0124 -0.214974,0 -0.33073,0.14056 -0.114377,0.13918 -0.114377,0.40101 v 0.81304 h -0.254937 v -1.5434 h 0.254937 v 0.23978 q 0.07993,-0.14056 0.208084,-0.20809 0.128158,-0.0689 0.311437,-0.0689 0.02618,0 0.05788,0.004 0.03169,0.003 0.07028,0.01 z" - style="font-style:normal;font-variant:normal;font-weight:normal;font-stretch:normal;font-size:2.82222223px;font-family:sans-serif;-inkscape-font-specification:'sans-serif, Normal';font-variant-ligatures:normal;font-variant-caps:normal;font-variant-numeric:normal;font-feature-settings:normal;text-align:start;writing-mode:lr-tb;text-anchor:start;fill:#200000;fill-opacity:1;stroke-width:0.26458332" - id="path1696" - inkscape:connector-curvature="0" /> - <path - d="m -25.204546,287.24179 q 0,-0.27561 -0.114378,-0.4272 -0.112999,-0.15158 -0.318326,-0.15158 -0.20395,0 -0.318327,0.15158 -0.112999,0.15159 -0.112999,0.4272 0,0.27423 0.112999,0.42581 0.114377,0.15158 0.318327,0.15158 0.205327,0 0.318326,-0.15158 0.114378,-0.15158 0.114378,-0.42581 z m 0.253559,0.59807 q 0,0.39411 -0.175011,0.58566 -0.175011,0.19293 -0.536057,0.19293 -0.13367,0 -0.252181,-0.0207 -0.118511,-0.0193 -0.230132,-0.0606 v -0.24667 q 0.111621,0.0606 0.220486,0.0896 0.108865,0.0289 0.221864,0.0289 0.249425,0 0.373448,-0.13092 0.124024,-0.12953 0.124024,-0.39274 v -0.1254 q -0.07855,0.13642 -0.201194,0.20395 -0.122645,0.0675 -0.293522,0.0675 -0.283876,0 -0.457509,-0.21635 -0.173633,-0.21635 -0.173633,-0.57326 0,-0.35829 0.173633,-0.57465 0.173633,-0.21635 0.457509,-0.21635 0.170877,0 0.293522,0.0675 0.122645,0.0675 0.201194,0.20395 V 286.488 h 0.253559 z" - style="font-style:normal;font-variant:normal;font-weight:normal;font-stretch:normal;font-size:2.82222223px;font-family:sans-serif;-inkscape-font-specification:'sans-serif, Normal';font-variant-ligatures:normal;font-variant-caps:normal;font-variant-numeric:normal;font-feature-settings:normal;text-align:start;writing-mode:lr-tb;text-anchor:start;fill:#200000;fill-opacity:1;stroke-width:0.26458332" - id="path1698" - inkscape:connector-curvature="0" /> - </g> - <g aria-label="in" - transform="matrix(0.99940808,-0.06015529,-0.0344019,1.002663,0.19409248,-5.6192236)" + transform="matrix(1.0058386,-0.11250462,0.18306476,1.875217,-62.527051,-254.77112)" style="font-style:normal;font-weight:normal;font-size:10.58333302px;line-height:1.25;font-family:sans-serif;letter-spacing:0px;word-spacing:0px;fill:#200000;fill-opacity:1;stroke:none;stroke-width:0.26458332" id="text1659"> <path - d="m 20.97762,287.32903 h 0.253559 v 1.54341 H 20.97762 Z m 0,-0.60082 h 0.253559 v 0.32108 H 20.97762 Z" + d="m 20.97762,287.32903 0.338042,0.075 -0.03879,1.43613 -0.299249,0.0322 z m 0,-0.60082 0.66381,0.023 0.264762,0.32529 -0.928573,-0.0272 z" style="font-style:normal;font-variant:normal;font-weight:normal;font-stretch:normal;font-size:2.82222223px;font-family:sans-serif;-inkscape-font-specification:'sans-serif, Normal';font-variant-ligatures:normal;font-variant-caps:normal;font-variant-numeric:normal;font-feature-settings:normal;text-align:start;writing-mode:lr-tb;text-anchor:start;fill:#200000;fill-opacity:1;stroke-width:0.26458332" id="path1689" - inkscape:connector-curvature="0" /> + inkscape:connector-curvature="0" + sodipodi:nodetypes="cccccccccc" /> <path - d="m 23.043299,287.94088 v 0.93156 H 22.78974 v -0.92329 q 0,-0.21911 -0.08544,-0.32797 -0.08544,-0.10887 -0.256315,-0.10887 -0.205328,0 -0.323839,0.13092 -0.118512,0.13091 -0.118512,0.35691 v 0.8723 h -0.254937 v -1.54341 h 0.254937 v 0.23978 q 0.09095,-0.13918 0.213596,-0.20808 0.124024,-0.0689 0.285254,-0.0689 0.265962,0 0.402387,0.16536 0.136426,0.16399 0.136426,0.48369 z" - style="font-style:normal;font-variant:normal;font-weight:normal;font-stretch:normal;font-size:2.82222223px;font-family:sans-serif;-inkscape-font-specification:'sans-serif, Normal';font-variant-ligatures:normal;font-variant-caps:normal;font-variant-numeric:normal;font-feature-settings:normal;text-align:start;writing-mode:lr-tb;text-anchor:start;fill:#200000;fill-opacity:1;stroke-width:0.26458332" + d="m 23.347906,288.14324 -0.01308,0.76084 -0.310745,-0.006 0.01297,-0.75408 c 0.0021,-0.1193 -0.0313,-0.20928 -0.100104,-0.26995 -0.06879,-0.0607 -0.172985,-0.0924 -0.312594,-0.0952 -0.167757,-0.003 -0.300662,0.0297 -0.398714,0.099 -0.09805,0.0693 -0.148137,0.16555 -0.150252,0.2886 l -0.01225,0.71243 -0.312434,-0.006 -0.03494,-1.20564 0.369044,-0.0489 -0.0034,0.19584 c 0.07561,-0.0743 0.163841,-0.12921 0.264691,-0.16472 0.101975,-0.0355 0.218827,-0.0519 0.350556,-0.0493 0.217297,0.005 0.380902,0.053 0.490816,0.1449 0.109928,0.0915 0.163395,0.22431 0.160402,0.39838 z" + style="font-style:normal;font-variant:normal;font-weight:normal;font-stretch:normal;font-size:2.82222223px;font-family:sans-serif;-inkscape-font-specification:'sans-serif, Normal';font-variant-ligatures:normal;font-variant-caps:normal;font-variant-numeric:normal;font-feature-settings:normal;text-align:start;writing-mode:lr-tb;text-anchor:start;fill:#200000;fill-opacity:1;stroke-width:0.2647517" id="path1691" - inkscape:connector-curvature="0" /> - </g> - <g - aria-label="clr" - transform="matrix(1.000666,0.00868223,0.07236619,0.99996231,-23.161485,-6.7617837)" - style="font-style:normal;font-weight:normal;font-size:10.58333302px;line-height:1.25;font-family:sans-serif;letter-spacing:0px;word-spacing:0px;fill:#200000;fill-opacity:1;stroke:none;stroke-width:0.26458332" - id="text1663"> - <path - d="m 21.863366,287.49247 v 0.26665 q -0.120923,-0.0667 -0.243396,-0.0992 -0.120923,-0.0341 -0.244947,-0.0341 -0.277502,0 -0.430981,0.17673 -0.153479,0.17519 -0.153479,0.493 0,0.31781 0.153479,0.49454 0.153479,0.17518 0.430981,0.17518 0.124024,0 0.244947,-0.0326 0.122473,-0.0341 0.243396,-0.10077 v 0.26355 q -0.119373,0.0558 -0.248047,0.0837 -0.127124,0.0279 -0.271302,0.0279 -0.392224,0 -0.623217,-0.2465 -0.230994,-0.24649 -0.230994,-0.66507 0,-0.42478 0.232544,-0.66818 0.234094,-0.2434 0.640271,-0.2434 0.131775,0 0.257349,0.0279 0.125573,0.0264 0.243396,0.0806 z" - style="font-style:normal;font-variant:normal;font-weight:normal;font-stretch:normal;font-size:3.17499995px;font-family:sans-serif;-inkscape-font-specification:'sans-serif, Normal';font-variant-ligatures:normal;font-variant-caps:normal;font-variant-numeric:normal;font-feature-settings:normal;text-align:start;writing-mode:lr-tb;text-anchor:start;fill:#200000;fill-opacity:1;stroke-width:0.26458332" - id="path1682" - inkscape:connector-curvature="0" /> - <path - d="m 22.36256,286.74988 h 0.285254 v 2.41226 H 22.36256 Z" - style="font-style:normal;font-variant:normal;font-weight:normal;font-stretch:normal;font-size:3.17499995px;font-family:sans-serif;-inkscape-font-specification:'sans-serif, Normal';font-variant-ligatures:normal;font-variant-caps:normal;font-variant-numeric:normal;font-feature-settings:normal;text-align:start;writing-mode:lr-tb;text-anchor:start;fill:#200000;fill-opacity:1;stroke-width:0.26458332" - id="path1684" - inkscape:connector-curvature="0" /> - <path - d="m 24.249266,287.69246 q -0.04806,-0.0279 -0.10542,-0.0403 -0.05581,-0.014 -0.124023,-0.014 -0.241846,0 -0.37207,0.15813 -0.128675,0.15658 -0.128675,0.45114 v 0.91467 h -0.286804 v -1.73633 h 0.286804 v 0.26975 q 0.08992,-0.15813 0.234095,-0.23409 0.144177,-0.0775 0.350366,-0.0775 0.02945,0 0.06511,0.005 0.03566,0.003 0.07906,0.0109 z" - style="font-style:normal;font-variant:normal;font-weight:normal;font-stretch:normal;font-size:3.17499995px;font-family:sans-serif;-inkscape-font-specification:'sans-serif, Normal';font-variant-ligatures:normal;font-variant-caps:normal;font-variant-numeric:normal;font-feature-settings:normal;text-align:start;writing-mode:lr-tb;text-anchor:start;fill:#200000;fill-opacity:1;stroke-width:0.26458332" - id="path1686" - inkscape:connector-curvature="0" /> + inkscape:connector-curvature="0" + sodipodi:nodetypes="cccccccccccccccccc" /> </g> <g aria-label="debug" @@ -287,7 +248,7 @@ style="font-style:normal;font-weight:normal;font-size:10.74719143px;line-height:1.25;font-family:sans-serif;letter-spacing:0px;word-spacing:0px;fill:#000000;fill-opacity:1;stroke:none;stroke-width:0.26867977" id="text1667"> <path - d="m -11.553796,199.77619 0.109394,-1.58794 0.50487,6.3e-4 -0.280817,4.07727 -0.504869,-6.3e-4 c 0.0083,-0.14551 -0.484924,0.0531 0.0303,-0.44022 -0.118127,0.17456 -0.26154,0.30454 -0.430238,0.38993 -0.166748,0.0837 -0.363535,0.12534 -0.590361,0.12505 -0.371335,-4.5e-4 -0.664328,-0.14233 -0.878979,-0.42562 -0.212823,-0.28328 -0.303354,-0.65551 -0.271591,-1.11669 0.03177,-0.46118 0.33502,-0.99006 0.586815,-1.27277 0.253634,-0.28271 0.404657,-0.2669 0.775992,-0.26644 0.226826,2.8e-4 0.222764,0.13868 0.377841,0.2245 0.157027,0.084 0.477587,0.11811 0.57165,0.29293 z m -1.790964,1.02242 c -0.02446,0.35463 0.03226,0.63335 0.17017,0.83617 0.139821,0.20109 0.343265,0.3018 0.610333,0.30213 0.267069,3.3e-4 0.48435,-0.0999 0.651842,-0.30056 0.167613,-0.20245 0.263631,-0.48099 0.288055,-0.8356 0.02446,-0.35462 -0.233705,-0.45646 -0.373559,-0.65755 -0.139699,-0.20283 -0.207512,-0.0784 -0.474581,-0.0787 -0.267069,-3.3e-4 -0.430419,-0.14007 -0.598032,0.0624 -0.165662,0.2007 -0.249803,0.31711 -0.274228,0.67173 z" + d="m -11.909757,199.46304 0.328421,-1.48067 0.730711,0.007 -0.369724,4.27667 -0.504869,-6.3e-4 c 0.0083,-0.14551 -0.484924,0.0531 0.0303,-0.44022 -0.118127,0.17456 -0.26154,0.30454 -0.430238,0.38993 -0.166748,0.0837 -0.363535,0.12534 -0.590361,0.12505 -0.371335,-4.5e-4 -0.664328,-0.14233 -0.878979,-0.42562 -0.212823,-0.28328 -0.303354,-0.65551 -0.271591,-1.11669 0.03177,-0.46118 0.33502,-0.99006 0.586815,-1.27277 0.253634,-0.28271 0.404657,-0.2669 0.775992,-0.26644 0.226826,2.8e-4 0.222764,0.13868 0.377841,0.2245 0.157027,0.084 0.121626,-0.19504 0.215689,-0.0202 z m -1.435003,1.33557 c -0.02446,0.35463 0.03226,0.63335 0.17017,0.83617 0.139821,0.20109 0.343265,0.3018 0.610333,0.30213 0.267069,3.3e-4 0.48435,-0.0999 0.651842,-0.30056 0.167613,-0.20245 0.263631,-0.48099 0.288055,-0.8356 0.02446,-0.35462 -0.233705,-0.45646 -0.373559,-0.65755 -0.139699,-0.20283 -0.207512,-0.0784 -0.474581,-0.0787 -0.267069,-3.3e-4 -0.430419,-0.14007 -0.598032,0.0624 -0.165662,0.2007 -0.249803,0.31711 -0.274228,0.67173 z" style="font-style:normal;font-variant:normal;font-weight:normal;font-stretch:normal;font-size:5.01535606px;font-family:sans-serif;-inkscape-font-specification:'sans-serif, Normal';font-variant-ligatures:normal;font-variant-caps:normal;font-variant-numeric:normal;font-feature-settings:normal;text-align:start;writing-mode:lr-tb;text-anchor:start;stroke-width:0.29419962" id="path1671" inkscape:connector-curvature="0" @@ -305,8 +266,8 @@ inkscape:connector-curvature="0" sodipodi:nodetypes="scccscccscccccccccccccc" /> <path - d="m -4.2026675,200.67851 0.047494,-1.049 0.6936507,-0.0658 -0.2501469,1.12327 c -0.00743,0.164 0.042082,0.28942 0.148539,0.37626 0.106497,0.0858 0.4730837,0.0479 0.6934557,0.0566 0.2648264,0.0102 0.2727063,0.0546 0.4299802,-0.0374 0.1590548,-0.0919 0.4455596,-0.30757 0.453219,-0.47674 l -0.158662,-0.89738 0.6936508,-0.0657 -0.2816044,1.81795 -0.4905085,-0.0193 0.012052,-0.26611 c -0.1238369,0.10054 -0.2660087,0.17349 -0.4265178,0.21888 -0.1586846,0.0444 -0.3419956,0.0626 -0.5499317,0.0544 -0.3430212,-0.0133 -0.6005669,-0.0855 -0.772683,-0.21627 -0.1721187,-0.13073 -0.2527835,-0.31524 -0.2419945,-0.55352 z" - style="font-style:normal;font-variant:normal;font-weight:normal;font-stretch:normal;font-size:5.01535606px;font-family:sans-serif;-inkscape-font-specification:'sans-serif, Normal';font-variant-ligatures:normal;font-variant-caps:normal;font-variant-numeric:normal;font-feature-settings:normal;text-align:start;writing-mode:lr-tb;text-anchor:start;stroke-width:0.22301689" + d="m -4.2092392,200.57122 -0.4847638,-1.2161 0.6770831,-0.0788 0.3149372,1.30289 c 0.075784,0.19013 0.1902782,0.33533 0.343489,0.43563 0.1527062,0.099 0.5089884,0.054 0.7391429,0.0632 0.2764691,0.0109 0.3071356,0.0624 0.4214344,-0.0448 0.1161889,-0.10713 0.095756,-0.35574 0.01758,-0.55186 l -0.4145837,-1.04196 0.6771311,-0.0787 0.6359599,2.10824 -0.5122586,-0.0206 -0.1229709,-0.3085 c -0.07573,0.11697 -0.1842726,0.20202 -0.3256129,0.25518 -0.1399628,0.0521 -0.31848,0.0739 -0.5356668,0.065 -0.3581398,-0.0142 -0.6586658,-0.0969 -0.9014906,-0.24802 -0.2427901,-0.15095 -0.4192454,-0.36455 -0.5293578,-0.64078 z" + style="font-style:normal;font-variant:normal;font-weight:normal;font-stretch:normal;font-size:5.01535606px;font-family:sans-serif;-inkscape-font-specification:'sans-serif, Normal';font-variant-ligatures:normal;font-variant-caps:normal;font-variant-numeric:normal;font-feature-settings:normal;text-align:start;writing-mode:lr-tb;text-anchor:start;stroke-width:0.24319558" id="path1677" inkscape:connector-curvature="0" sodipodi:nodetypes="cccccccccccccccccc" /> diff --git a/src/Computerscare.hpp b/src/Computerscare.hpp @@ -57,6 +57,7 @@ struct IsoButton : SvgSwitch { struct ComputerscareResetButton : SvgSwitch { ComputerscareResetButton() { + momentary=true; addFrame(APP->window->loadSvg(asset::plugin(pluginInstance,"res/computerscare-rst-text.svg"))); addFrame(APP->window->loadSvg(asset::plugin(pluginInstance,"res/computerscare-rst-text-red.svg"))); //APP->window->loadSvg(asset::plugin(pluginInstance, "res/computerscare-pentagon-jack-1-outline-flipped.svg")); @@ -65,6 +66,7 @@ struct ComputerscareResetButton : SvgSwitch { struct ComputerscareClockButton : SvgSwitch { ComputerscareClockButton() { + momentary=true; addFrame(APP->window->loadSvg(asset::plugin(pluginInstance,"res/computerscare-clk-text.svg"))); addFrame(APP->window->loadSvg(asset::plugin(pluginInstance,"res/computerscare-clk-text-red.svg"))); } diff --git a/src/ComputerscareDebug.cpp b/src/ComputerscareDebug.cpp @@ -33,7 +33,7 @@ struct ComputerscareDebug : Module { NUM_LIGHTS }; - std::string defaultStrValue = "0.000000\n0.000000\n0.000000\n0.000000\n0.000000\n0.000000\n0.000000\n0.000000\n0.000000\n0.000000\n0.000000\n0.000000\n0.000000\n0.000000\n0.000000\n0.000000\n"; + std::string defaultStrValue = "+0.000000\n+0.000000\n+0.000000\n+0.000000\n+0.000000\n+0.000000\n+0.000000\n+0.000000\n+0.000000\n+0.000000\n+0.000000\n+0.000000\n+0.000000\n+0.000000\n+0.000000\n+0.000000\n"; std::string strValue = "0.000000\n0.000000\n0.000000\n0.000000\n0.000000\n0.000000\n0.000000\n0.000000\n0.000000\n0.000000\n0.000000\n0.000000\n0.000000\n0.000000\n0.000000\n0.000000\n"; float logLines[NUM_LINES] = {0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0}; @@ -42,6 +42,7 @@ struct ComputerscareDebug : Module { int inputChannel = 0; + int stepCounter = 0; dsp::SchmittTrigger clockTrigger; dsp::SchmittTrigger clearTrigger; dsp::SchmittTrigger manualClockTrigger; @@ -71,27 +72,27 @@ struct ComputerscareDebug : Module { void ComputerscareDebug::step() { std::string thisVal; - if (clockTrigger.process(inputs[TRG_INPUT].getVoltage() / 2.f) || manualClockTrigger.process(params[MANUAL_TRIGGER].value)) { - for( unsigned int a = NUM_LINES-1; a > 0; a = a - 1 ) - { - logLines[a] = logLines[a-1]; - } - inputChannel = floor(params[CHANNEL_FOCUS].value); - logLines[0] = inputs[VAL_INPUT].getVoltage(inputChannel); - - //thisVal = std::to_string(logLines[0]).substr(0,10); - //outputs[POLY_OUTPUT].setVoltage(logLines[0],0); - - thisVal = ""; - for( unsigned int a = 0; a < NUM_LINES; a = a + 1 ) - { - thisVal += a > 0 ? "\n" : ""; - thisVal+=logLines[a] >=0 ? "+" : ""; - thisVal+= std::to_string(logLines[a]).substr(0,10); - outputs[POLY_OUTPUT].setVoltage(logLines[a],a); - } - strValue = thisVal; - } + bool polyViewMode = params[SWITCH_VIEW].value < 0.5; + if (clockTrigger.process(inputs[TRG_INPUT].getVoltage() / 2.f) || manualClockTrigger.process(params[MANUAL_TRIGGER].value) || polyViewMode) { + if(polyViewMode) { + for(int i = 0; i < 16; i++) { + logLines[i] = inputs[VAL_INPUT].getVoltage(i); + } + } + else { + for( unsigned int a = NUM_LINES-1; a > 0; a = a - 1 ) + { + logLines[a] = logLines[a-1]; + } + + inputChannel = floor(params[CHANNEL_FOCUS].value); + logLines[0] = inputs[VAL_INPUT].getVoltage(inputChannel); + } + //thisVal = std::to_string(logLines[0]).substr(0,10); + //outputs[POLY_OUTPUT].setVoltage(logLines[0],0); + + + } if(clearTrigger.process(inputs[CLR_INPUT].getVoltage() / 2.f) || manualClearTrigger.process(params[MANUAL_CLEAR_TRIGGER].value)) { for( unsigned int a = 0; a < NUM_LINES; a++ ) { @@ -99,6 +100,20 @@ void ComputerscareDebug::step() { } strValue = defaultStrValue; } + stepCounter++; + if(stepCounter > 1025) { + stepCounter = 0; + + thisVal = ""; + for( unsigned int a = 0; a < NUM_LINES; a = a + 1 ) + { + thisVal += a > 0 ? "\n" : ""; + thisVal+=logLines[a] >=0 ? "+" : ""; + thisVal+= std::to_string(logLines[a]).substr(0,10); + outputs[POLY_OUTPUT].setVoltage(logLines[a],a); + } + strValue = thisVal; + } } @@ -152,19 +167,25 @@ struct ComputerscareDebugWidget : ModuleWidget { addInput(createInput<InPort>(Vec(33, 330), module, ComputerscareDebug::VAL_INPUT)); addInput(createInput<InPort>(Vec(63, 330), module, ComputerscareDebug::CLR_INPUT)); - addParam(createParam<LEDButton>(Vec(6, 290), module, ComputerscareDebug::MANUAL_TRIGGER)); - addParam(createParam<LEDButton>(Vec(66, 290), module, ComputerscareDebug::MANUAL_CLEAR_TRIGGER)); - - addParam(createParam<MediumSnapKnob>(Vec(36,290),module,ComputerscareDebug::CHANNEL_FOCUS)); + + + addParam(createParam<ComputerscareClockButton>(Vec(2, 315), module, ComputerscareDebug::MANUAL_TRIGGER)); + - //addParam(createParam<IsoButton>(Vec(20,280),module,ComputerscareDebug::SWITCH_VIEW)); + addParam(createParam<ComputerscareResetButton>(Vec(62, 315), module, ComputerscareDebug::MANUAL_CLEAR_TRIGGER)); + - addOutput(createOutput<OutPort>(Vec(57, 1), module, ComputerscareDebug::POLY_OUTPUT)); - StringDisplayWidget3 *stringDisplay = createWidget<StringDisplayWidget3>(Vec(1,34)); - stringDisplay->box.size = Vec(88, 250); + addParam(createParam<MediumSnapKnob>(Vec(36,290),module,ComputerscareDebug::CHANNEL_FOCUS)); + addOutput(createOutput<OutPort>(Vec(57, 1), module, ComputerscareDebug::POLY_OUTPUT)); + + StringDisplayWidget3 *stringDisplay = createWidget<StringDisplayWidget3>(Vec(11,34)); + stringDisplay->box.size = Vec(77, 245); stringDisplay->module = module; - addChild(stringDisplay); + addChild(stringDisplay); + + addParam(createParam<IsoButton>(Vec(4,279),module,ComputerscareDebug::SWITCH_VIEW)); + } };