commit 02080599f553e6943a1f75eeac054b804cb110b2
parent 79395649cb164f1804a53938b4ceed15b95346fb
Author: Adam M <aemalone@gmail.com>
Date: Fri, 26 Oct 2018 20:44:02 -0500
LaundrySoup update panel, better input checking
Diffstat:
4 files changed, 100 insertions(+), 31 deletions(-)
diff --git a/res/ComputerscareLaundrySoupPanel.svg b/res/ComputerscareLaundrySoupPanel.svg
@@ -35,10 +35,10 @@
inkscape:pageopacity="0.0"
inkscape:pageshadow="2"
inkscape:zoom="4.0000001"
- inkscape:cx="73.409121"
+ inkscape:cx="101.90912"
inkscape:cy="365.51563"
inkscape:document-units="mm"
- inkscape:current-layer="g1669"
+ inkscape:current-layer="text917"
showgrid="false"
units="px"
inkscape:snap-bbox="true"
@@ -148,62 +148,62 @@
inkscape:connector-curvature="0" />
<g
aria-label="Laundry Soup"
- transform="matrix(0.90564519,-0.03962266,0.17899209,1.4041179,-4.5120953,-83.688431)"
+ transform="matrix(0.90202646,-0.03946435,0.10737602,0.84231979,9.6830795,28.3576)"
style="font-style:normal;font-weight:normal;font-size:5.44763088px;line-height:1.25;font-family:sans-serif;letter-spacing:0px;word-spacing:0px;fill:#000000;fill-opacity:1;stroke:none;stroke-width:0.03603381"
id="text917">
<path
- d="m -42.563738,199.95988 0.537374,4.1e-4 -0.0549,3.8305 1.934026,7.2e-4 -0.0071,0.49222 -2.471404,-9.4e-4 z"
- style="stroke-width:0.03759631"
+ d="m -43.477761,201.13438 0.943721,-0.1 -0.09642,7.48641 3.396484,-0.36172 -0.01251,0.96203 -4.340215,0.4625 z"
+ style="stroke-width:0.06960488"
id="path919"
inkscape:connector-curvature="0" />
<path
- d="m -38.224723,203.10076 q -0.597271,0 -0.827609,0.16338 -0.230338,0.16338 -0.230338,0.55741 0,0.31395 0.171414,0.49974 0.174093,0.1826 0.471389,0.1826 0.409787,0 0.656196,-0.34597 0.249086,-0.34918 0.249086,-0.92582 v -0.13134 z m 0.982955,-0.24346 v 2.04703 h -0.492817 v -0.5446 q -0.168735,0.32676 -0.4205,0.48374 -0.251765,0.15377 -0.616021,0.15377 -0.460676,0 -0.733867,-0.30754 -0.270514,-0.31074 -0.270514,-0.8297 0,-0.60547 0.337472,-0.91301 0.34015,-0.30753 1.012416,-0.30753 h 0.691014 v -0.0577 q 0,-0.40685 -0.224981,-0.62789 -0.222303,-0.22425 -0.626733,-0.22425 -0.257122,0 -0.500852,0.0737 -0.24373,0.0737 -0.468711,0.22105 v -0.54459 q 0.270513,-0.12494 0.524957,-0.18581 0.254442,-0.0641 0.495494,-0.0641 0.650839,0 0.97224,0.40364 0.321403,0.40364 0.321403,1.22374 z"
- style="stroke-width:0.03968061"
+ d="m -39.020817,204.38995 q -0.639226,0 -0.930621,0.2574 -0.291394,0.25739 -0.399627,0.87817 -0.08624,0.49463 0.04618,0.78733 0.136167,0.28767 0.454346,0.28767 0.438572,0 0.797321,-0.54506 0.362497,-0.55012 0.520887,-1.45858 l 0.03608,-0.20693 z m 1.118876,-0.38356 -0.562281,3.22501 h -0.527435 l 0.149591,-0.85799 q -0.270342,0.51479 -0.582914,0.76212 -0.311686,0.24225 -0.701529,0.24225 -0.493035,0 -0.700943,-0.48451 -0.204161,-0.48956 -0.06161,-1.30717 0.166311,-0.95389 0.611965,-1.43841 0.448514,-0.48449 1.168003,-0.48449 h 0.739554 l 0.01587,-0.091 q 0.111752,-0.64096 -0.06832,-0.9892 -0.176321,-0.3533 -0.60916,-0.3533 -0.275183,0 -0.556284,0.11615 -0.2811,0.11614 -0.562354,0.34826 l 0.149589,-0.85798 q 0.323834,-0.19684 0.612871,-0.29274 0.289922,-0.10099 0.547907,-0.10099 0.696556,0 0.92966,0.63593 0.233109,0.63591 0.0078,1.92795 z"
+ style="stroke-width:0.05152563"
id="path921"
inkscape:connector-curvature="0" />
<path
- d="m -36.28117,203.2356 0.02833,-2.36412 0.492866,8.3e-4 -0.02804,2.33972 q -0.0066,0.55441 0.15609,0.83346 0.162775,0.27552 0.494929,0.27569 0.399121,2.4e-4 0.633455,-0.33096 0.237014,-0.33116 0.243867,-0.903 l 0.02653,-2.2142 0.492866,8.4e-4 -0.0468,3.90536 -0.492866,-8.5e-4 0.0071,-0.59976 q -0.183732,0.3556 -0.424223,0.52983 -0.237769,0.17074 -0.551173,0.1706 -0.516984,-1e-5 -0.779833,-0.4188 -0.262851,-0.41856 -0.253198,-1.22403 z"
- style="stroke-width:0.04140124"
+ d="m -36.944252,205.30129 0.03032,-2.71906 0.527487,7.3e-4 -0.03001,2.69101 q -0.0071,0.63764 0.167055,0.95858 0.174209,0.3169 0.529695,0.3171 0.427157,2.7e-4 0.677951,-0.38066 0.253663,-0.38088 0.260998,-1.03858 l 0.02839,-2.54664 0.527487,7.3e-4 -0.05009,4.49172 -0.527487,-7.3e-4 0.0076,-0.68981 q -0.196638,0.409 -0.454022,0.60938 -0.254471,0.19638 -0.58989,0.19623 -0.553299,-2e-5 -0.834611,-0.48169 -0.281315,-0.4814 -0.270984,-1.40781 z"
+ style="stroke-width:0.04593363"
id="path923"
inkscape:connector-curvature="0" />
<path
- d="m -30.248598,202.73877 v 2.16556 h -0.492817 v -2.14634 q 0,-0.50936 -0.166057,-0.76243 -0.166058,-0.25308 -0.498174,-0.25308 -0.399073,0 -0.629411,0.30433 -0.230338,0.30434 -0.230338,0.82972 v 2.0278 h -0.495495 v -3.58791 h 0.495495 v 0.5574 q 0.17677,-0.32354 0.415144,-0.48372 0.241051,-0.16018 0.554418,-0.16018 0.516921,0 0.782078,0.38442 0.265157,0.38122 0.265157,1.12443 z"
- style="stroke-width:0.03968061"
+ d="m -30.487927,205.12433 v 2.72685 h -0.527434 v -2.70265 q 0,-0.64139 -0.177722,-0.96004 -0.177722,-0.31868 -0.533167,-0.31868 -0.427106,0 -0.673624,0.38321 -0.246518,0.38323 -0.246518,1.04478 v 2.55338 h -0.530301 v -4.51787 h 0.530301 v 0.70188 q 0.189187,-0.4074 0.444306,-0.60909 0.257983,-0.2017 0.593362,-0.2017 0.553232,0 0.837015,0.48406 0.283782,0.48003 0.283782,1.41587 z"
+ style="stroke-width:0.04606442"
id="path925"
inkscape:connector-curvature="0" />
<path
- d="m -27.356143,201.53802 0.02515,-1.75456 0.489486,7e-4 -0.06457,4.50509 -0.489486,-6.9e-4 0.007,-0.48642 q -0.158446,0.28947 -0.397245,0.43125 -0.236097,0.13888 -0.565973,0.13876 -0.540034,-4.6e-4 -0.873831,-0.46939 -0.331133,-0.46917 -0.320176,-1.23353 0.01096,-0.76436 0.355535,-1.23327 0.34724,-0.46891 0.887277,-0.46869 0.329875,1.5e-4 0.561947,0.14209 0.234774,0.13907 0.38492,0.42866 z m -1.684226,1.13139 q -0.0084,0.58776 0.207565,0.92372 0.218692,0.33303 0.607094,0.33319 0.388402,5e-5 0.616637,-0.33271 0.228278,-0.33578 0.236703,-0.92353 0.0084,-0.58775 -0.210267,-0.9208 -0.21865,-0.33594 -0.607051,-0.33609 -0.388403,-7e-5 -0.61668,0.33561 -0.225576,0.33288 -0.234001,0.92061 z"
- style="stroke-width:0.03759631"
+ d="m -27.448553,202.5477 0.02967,-2.76424 0.57738,0.001 -0.07617,7.0976 -0.577379,-0.001 0.0083,-0.76634 q -0.186896,0.45604 -0.468576,0.67941 -0.27849,0.21881 -0.6676,0.21862 -0.637004,-7.3e-4 -1.030739,-0.73951 -0.390593,-0.73916 -0.377668,-1.94337 0.01293,-1.20422 0.419376,-1.94297 0.409592,-0.73875 1.046599,-0.7384 0.389109,2.4e-4 0.662853,0.22386 0.27693,0.2191 0.454037,0.67533 z m -1.986651,1.78245 q -0.0099,0.926 0.244836,1.45529 0.257961,0.52467 0.716106,0.52492 0.458145,9e-5 0.727362,-0.52417 0.269268,-0.52901 0.279206,-1.45498 0.0099,-0.92598 -0.248023,-1.45068 -0.257912,-0.52926 -0.716055,-0.5295 -0.458146,-1.1e-4 -0.727413,0.52874 -0.266082,0.52445 -0.276019,1.45038 z"
+ style="stroke-width:0.05125185"
id="path927"
inkscape:connector-curvature="0" />
<path
- d="m -24.040184,201.86741 q -0.08303,-0.0577 -0.182127,-0.0833 -0.09642,-0.0288 -0.214269,-0.0288 -0.417822,0 -0.642804,0.32676 -0.222303,0.32356 -0.222303,0.93221 v 1.89007 h -0.495494 v -3.58791 h 0.495494 v 0.5574 q 0.155345,-0.32675 0.404432,-0.48372 0.249085,-0.16018 0.605306,-0.16018 0.05089,0 0.112491,0.01 0.0616,0.006 0.136596,0.0224 z"
- style="stroke-width:0.03968061"
+ d="m -24.631518,201.77574 q -0.08303,-0.0845 -0.182127,-0.12194 -0.09642,-0.0421 -0.214269,-0.0421 -0.417822,0 -0.642804,0.47833 -0.222303,0.47365 -0.222303,1.36462 v 2.7668 h -0.495494 v -5.2522 h 0.495494 v 0.81597 q 0.155345,-0.47832 0.404432,-0.70811 0.249085,-0.23447 0.605306,-0.23447 0.05089,0 0.112491,0.0146 0.0616,0.009 0.136596,0.0328 z"
+ style="stroke-width:0.04800957"
id="path929"
inkscape:connector-curvature="0" />
<path
- d="m -22.417171,204.59163 q -0.215802,0.57897 -0.415194,0.75551 -0.199393,0.17654 -0.529268,0.17641 l -0.391063,-1.1e-4 0.0064,-0.44588 0.287305,5.2e-4 q 0.202181,1.8e-4 0.315409,-0.10418 0.113225,-0.10407 0.25446,-0.49209 l 0.09128,-0.24317 -1.159375,-3.19111 0.518756,1e-4 0.894745,2.53667 0.967454,-2.53593 0.518757,1e-4 z"
- style="stroke-width:0.03759631"
+ d="m -21.592765,204.59163 q -0.331323,0.57897 -0.637453,0.75551 -0.30613,0.17654 -0.812591,0.17641 l -0.600404,-1.1e-4 0.0098,-0.44588 0.441103,5.2e-4 q 0.310411,1.8e-4 0.484251,-0.10418 0.173836,-0.10407 0.390676,-0.49209 l 0.140143,-0.24317 -1.780003,-3.19111 0.796453,1e-4 1.373713,2.53667 1.485344,-2.53593 0.796454,1e-4 z"
+ style="stroke-width:0.04658474"
id="path931"
inkscape:connector-curvature="0" />
<path
- d="m -16.106914,200.27848 v 0.63109 q -0.30801,-0.17619 -0.581201,-0.26269 -0.273192,-0.0865 -0.527636,-0.0865 -0.441927,0 -0.682979,0.20503 -0.238372,0.20502 -0.238372,0.58304 0,0.31714 0.158022,0.48052 0.160701,0.16017 0.605307,0.25948 l 0.326759,0.0801 q 0.605306,0.13775 0.89189,0.48694 0.289261,0.34596 0.289261,0.92901 0,0.69515 -0.391038,1.05394 -0.388361,0.3588 -1.140977,0.3588 -0.283905,0 -0.605308,-0.0768 -0.318723,-0.0768 -0.661552,-0.22745 v -0.66632 q 0.329437,0.22104 0.645483,0.33316 0.316045,0.11212 0.621377,0.11212 0.463354,0 0.715119,-0.21783 0.251764,-0.21784 0.251764,-0.62148 0,-0.35239 -0.182127,-0.55101 -0.179449,-0.19861 -0.591915,-0.29791 l -0.329437,-0.0768 q -0.605307,-0.14416 -0.87582,-0.4517 -0.270514,-0.30754 -0.270514,-0.85533 0,-0.6343 0.372291,-0.9995 0.374969,-0.36519 1.031165,-0.36519 0.281226,0 0.573166,0.0608 0.29194,0.0608 0.597272,0.18259 z"
- style="stroke-width:0.03968061"
+ d="m -16.106914,200.37344 v 0.87742 q -0.30801,-0.24496 -0.581201,-0.36522 -0.273192,-0.12027 -0.527636,-0.12027 -0.441927,0 -0.682979,0.28506 -0.238372,0.28505 -0.238372,0.81062 0,0.44093 0.158022,0.66808 0.160701,0.22269 0.605307,0.36076 l 0.326759,0.11137 q 0.605306,0.19151 0.89189,0.677 0.289261,0.481 0.289261,1.29163 0,0.96649 -0.391038,1.46532 -0.388361,0.49885 -1.140977,0.49885 -0.283905,0 -0.605308,-0.10677 -0.318723,-0.10678 -0.661552,-0.31623 v -0.92641 q 0.329437,0.30732 0.645483,0.46321 0.316045,0.15588 0.621377,0.15588 0.463354,0 0.715119,-0.30286 0.251764,-0.30287 0.251764,-0.86406 0,-0.48994 -0.182127,-0.76608 -0.179449,-0.27614 -0.591915,-0.41419 l -0.329437,-0.10678 q -0.605307,-0.20043 -0.87582,-0.62801 -0.270514,-0.42758 -0.270514,-1.18919 0,-0.88189 0.372291,-1.38964 0.374969,-0.50773 1.031165,-0.50773 0.281226,0 0.573166,0.0845 0.29194,0.0845 0.597272,0.25386 z"
+ style="stroke-width:0.04678828"
id="path933"
inkscape:connector-curvature="0" />
<path
- d="m -13.861952,201.3318 q -0.396442,-1.8e-4 -0.631653,0.4042 -0.235171,0.4009 -0.24357,1.10176 -0.0084,0.70087 0.214439,1.10547 0.225559,0.4011 0.624679,0.40128 0.393764,1.3e-4 0.628976,-0.40419 0.235213,-0.40437 0.24357,-1.10176 0.0084,-0.69388 -0.217202,-1.09848 -0.225476,-0.40809 -0.619239,-0.40828 z m 0.0065,-0.54394 q 0.642883,-6e-5 1.003336,0.54442 0.360458,0.54414 0.348924,1.50653 -0.01149,0.9589 -0.385028,1.50617 -0.373495,0.54379 -1.016374,0.54348 -0.645561,0 -1.006014,-0.54442 -0.357738,-0.54762 -0.346246,-1.50654 0.01153,-0.96238 0.38235,-1.50616 0.373494,-0.54378 1.019052,-0.54348 z"
- style="stroke-width:0.04140124"
+ d="m -13.861952,201.8379 q -0.396442,-2.5e-4 -0.631653,0.56197 -0.235171,0.55738 -0.24357,1.53181 -0.0084,0.97444 0.214439,1.53696 0.225559,0.55767 0.624679,0.55792 0.393764,1.8e-4 0.628976,-0.56196 0.235213,-0.56221 0.24357,-1.53181 0.0084,-0.96472 -0.217202,-1.52725 -0.225476,-0.56738 -0.619239,-0.56764 z m 0.0065,-0.75626 q 0.642883,-8e-5 1.003336,0.75693 0.360458,0.75653 0.348924,2.09457 -0.01149,1.33318 -0.385028,2.09407 -0.373495,0.75605 -1.016374,0.75561 -0.645561,0 -1.006014,-0.75692 -0.357738,-0.76137 -0.346246,-2.09458 0.01153,-1.33803 0.38235,-2.09406 0.373494,-0.75603 1.019052,-0.75562 z"
+ style="stroke-width:0.04881711"
id="path935"
inkscape:connector-curvature="0" />
<path
- d="m -11.933519,203.21522 v -1.80346 h 0.489436 v 1.78484 q 0,0.42294 0.164918,0.63574 0.164919,0.21013 0.494756,0.21013 0.396336,0 0.625094,-0.25269 0.2314181,-0.2527 0.2314181,-0.68894 v -1.68908 h 0.4894356 v 2.97917 h -0.4894356 v -0.45752 q -0.1782181,0.27132 -0.4149561,0.40432 -0.234078,0.13034 -0.545295,0.13034 -0.513376,0 -0.779373,-0.3192 -0.265998,-0.31919 -0.265998,-0.93365 z"
- style="stroke-width:0.03603381"
+ d="m -11.933519,202.89764 v -2.26061 h 0.489436 v 2.23727 q 0,0.53015 0.164918,0.79689 0.164919,0.2634 0.494756,0.2634 0.396336,0 0.625094,-0.31675 0.2314181,-0.31675 0.2314181,-0.86357 v -2.11724 h 0.4894356 v 3.73435 h -0.4894356 v -0.5735 q -0.1782181,0.3401 -0.4149561,0.50681 -0.234078,0.16338 -0.545295,0.16338 -0.513376,0 -0.779373,-0.40011 -0.265998,-0.4001 -0.265998,-1.17032 z"
+ style="stroke-width:0.04034315"
id="path937"
inkscape:connector-curvature="0" />
<path
- d="m -7.9658571,203.80978 -0.024652,1.71981 -0.4921605,3.5e-4 0.06416,-4.47613 0.4921449,7.2e-4 -0.00706,0.49221 q 0.1584465,-0.28946 0.3945437,-0.42835 0.2387989,-0.14178 0.5660138,-0.14165 0.5426939,5.1e-4 0.8738313,0.46939 0.3337932,0.46918 0.322837,1.23353 -0.010956,0.76437 -0.3581958,1.23327 -0.3445794,0.46891 -0.8872775,0.4687 -0.3272152,-1.1e-4 -0.5619882,-0.1392 -0.2320716,-0.14197 -0.3822179,-0.43156 z m 1.6815651,-1.13142 q 0.00842,-0.58774 -0.2102668,-0.92078 -0.2159894,-0.33596 -0.604391,-0.33611 -0.3884028,-6e-5 -0.6166797,0.33563 -0.2255762,0.33287 -0.2340008,0.92061 -0.00842,0.58776 0.2075647,0.9237 0.2186915,0.33304 0.6070931,0.33319 0.3884028,7e-5 0.6139776,-0.3327 0.2282782,-0.33578 0.2367029,-0.92354 z"
- style="stroke-width:0.03759631"
+ d="m -7.8811797,203.76845 -0.028691,2.07096 -0.5727988,4.2e-4 0.074672,-5.39006 0.5727806,8.5e-4 -0.00821,0.59271 q 0.1844073,-0.34856 0.4591879,-0.5158 0.2779251,-0.17073 0.6587527,-0.17057 0.6316119,6.1e-4 1.0170047,0.56523 0.3884838,0.56497 0.3757324,1.48539 -0.012751,0.92043 -0.4168846,1.48508 -0.4010372,0.56465 -1.0326539,0.5644 -0.380828,-1.3e-4 -0.6540676,-0.16763 -0.2700954,-0.17095 -0.4448426,-0.51967 z m 1.9570822,-1.36244 q 0.0098,-0.70774 -0.2447181,-1.10879 -0.2513784,-0.40455 -0.7034179,-0.40473 -0.4520409,-8e-5 -0.71772,0.40416 -0.2625358,0.40084 -0.2723407,1.10858 -0.0098,0.70777 0.2415732,1.11231 0.2545232,0.40103 0.7065627,0.40121 0.4520409,9e-5 0.7145751,-0.40063 0.2656806,-0.40433 0.2754857,-1.11211 z"
+ style="stroke-width:0.04450807"
id="path939"
inkscape:connector-curvature="0" />
</g>
@@ -247,12 +247,66 @@
id="path879"
inkscape:connector-curvature="0" />
<path
- d="m -45.316254,202.73781 0.105823,0 -0.30408,0.97435 0.684115,-0.51209 0.06147,0.0849 0.0099,0.0299 -0.587562,0.44072 0.393944,0.6319 -0.370906,-0.0255 -0.220701,-0.55448 -0.180998,0.57995 h -0.176676 z"
+ d="m -45.316254,202.73781 h 0.105823 l -0.30408,0.97435 0.684115,-0.51209 0.06147,0.0849 0.0099,0.0299 -0.587562,0.44072 0.393944,0.6319 -0.370906,-0.0255 -0.220701,-0.55448 -0.180998,0.57995 h -0.176676 z"
style="stroke-width:0.01363125"
id="path881"
inkscape:connector-curvature="0"
sodipodi:nodetypes="ccccccccccccc" />
</g>
+ <text
+ xml:space="preserve"
+ style="font-style:normal;font-weight:normal;font-size:3.52777767px;line-height:1.25;font-family:sans-serif;letter-spacing:0px;word-spacing:0px;fill:#000000;fill-opacity:1;stroke:none;stroke-width:0.07000434"
+ x="-18.08774"
+ y="188.72037"
+ id="text876"
+ transform="matrix(1.0079983,-0.0441007,0.12576363,0.98656289,0,0)"><tspan
+ sodipodi:role="line"
+ id="tspan874"
+ x="-18.08774"
+ y="191.84163"
+ style="stroke-width:0.07000434" /></text>
+ <g
+ aria-label="out"
+ transform="matrix(0.99983713,0.25105572,-0.17945131,0.95510327,70.395537,22.117698)"
+ style="font-style:normal;font-weight:normal;font-size:3.52777767px;line-height:1.25;font-family:sans-serif;letter-spacing:0px;word-spacing:0px;fill:#000000;fill-opacity:1;stroke:none;stroke-width:0.07000434"
+ id="text888">
+ <path
+ d="m -13.369682,192.47237 q -0.273983,0 -0.433189,0.22592 -0.159206,0.22396 -0.159206,0.61541 0,0.39146 0.157354,0.61737 0.159207,0.22397 0.435041,0.22397 0.272131,0 0.431338,-0.22591 0.159207,-0.22592 0.159207,-0.61543 0,-0.38755 -0.159207,-0.61347 -0.159207,-0.22786 -0.431338,-0.22786 z m 0,-0.30381 q 0.444296,0 0.697916,0.30381 0.253619,0.30382 0.253619,0.84133 0,0.53557 -0.253619,0.84134 -0.25362,0.30381 -0.697916,0.30381 -0.446148,0 -0.699767,-0.30381 -0.251769,-0.30577 -0.251769,-0.84134 0,-0.53751 0.251769,-0.84133 0.253619,-0.30381 0.699767,-0.30381 z"
+ style="stroke-width:0.07716621"
+ id="path901"
+ inkscape:connector-curvature="0" />
+ <path
+ d="m -11.925778,193.38936 -0.0093,-1.16785 0.316938,-0.003 0.0092,1.15579 q 0.0022,0.27389 0.110065,0.41083 0.107876,0.13523 0.321465,0.13353 0.256652,-0.002 0.403486,-0.16685 0.148558,-0.16482 0.146313,-0.44731 l -0.0087,-1.09379 0.316938,-0.003 0.01533,1.9292 -0.316938,0.003 -0.0024,-0.29627 q -0.114012,0.17661 -0.26663,0.26396 -0.150909,0.0856 -0.35244,0.0872 -0.332442,0.003 -0.506333,-0.20269 -0.173891,-0.20533 -0.177052,-0.60323 z"
+ style="stroke-width:0.07000434"
+ id="path903"
+ inkscape:connector-curvature="0" />
+ <path
+ d="m -9.2205509,191.66729 v 0.65016 h 0.7963034 v 0.29238 h -0.7963034 v 1.24307 q 0,0.28011 0.077739,0.35984 0.079841,0.0798 0.3214628,0.0798 h 0.3971013 v 0.31485 h -0.3971013 q -0.4475267,0 -0.617713,-0.16152 -0.1701861,-0.16357 -0.1701861,-0.59291 v -1.24308 H -9.892892 v -0.29237 h 0.2836438 v -0.65017 z"
+ style="stroke-width:0.08423072"
+ id="path905"
+ inkscape:connector-curvature="0" />
+ </g>
+ <g
+ aria-label="one"
+ transform="matrix(0.99146786,0.3067022,-0.15158709,0.96171334,61.793704,24.819982)"
+ style="font-style:normal;font-weight:normal;font-size:3.52777767px;line-height:1.25;font-family:sans-serif;letter-spacing:0px;word-spacing:0px;fill:#000000;fill-opacity:1;stroke:none;stroke-width:0.07000434"
+ id="text892">
+ <path
+ d="m -21.637912,192.23885 q -0.254937,0 -0.403076,0.19981 -0.148139,0.1981 -0.148139,0.54433 0,0.34623 0.146417,0.54605 0.148139,0.19809 0.404798,0.19809 0.253215,0 0.401354,-0.19982 0.148139,-0.19981 0.148139,-0.54432 0,-0.34279 -0.148139,-0.5426 -0.148139,-0.20154 -0.401354,-0.20154 z m 0,-0.26872 q 0.413412,0 0.649401,0.26872 0.235989,0.26872 0.235989,0.74414 0,0.4737 -0.235989,0.74414 -0.235989,0.26872 -0.649401,0.26872 -0.415134,0 -0.651123,-0.26872 -0.234266,-0.27044 -0.234266,-0.74414 0,-0.47542 0.234266,-0.74414 0.235989,-0.26872 0.651123,-0.26872 z"
+ style="stroke-width:0.07000434"
+ id="path894"
+ inkscape:connector-curvature="0" />
+ <path
+ d="m -18.657729,192.65297 0.191769,1.13213 -0.317087,0.0526 -0.190066,-1.12207 q -0.04511,-0.26629 -0.174362,-0.38088 -0.129256,-0.11459 -0.342945,-0.0791 -0.256773,0.0426 -0.378027,0.22625 -0.121254,0.18367 -0.07473,0.45833 l 0.179571,1.06012 -0.318811,0.0529 -0.317724,-1.87572 0.318811,-0.0529 0.04936,0.2914 q 0.08508,-0.18801 0.224276,-0.29717 0.140918,-0.10943 0.342544,-0.14286 0.332598,-0.0552 0.537247,0.11753 0.204365,0.171 0.270179,0.55954 z"
+ style="stroke-width:0.07000434"
+ id="path896"
+ inkscape:connector-curvature="0" />
+ <path
+ d="m -16.339355,192.90203 v 0.15503 h -1.457275 q 0.02067,0.32728 0.19637,0.49954 0.177423,0.17053 0.492649,0.17053 0.18259,0 0.353122,-0.0448 0.172255,-0.0448 0.341065,-0.13436 v 0.29973 q -0.170533,0.0723 -0.349678,0.11024 -0.179144,0.0379 -0.363457,0.0379 -0.461643,0 -0.732083,-0.26872 -0.268717,-0.26872 -0.268717,-0.72692 0,-0.4737 0.254937,-0.75103 0.256659,-0.27905 0.690741,-0.27905 0.389296,0 0.61495,0.25149 0.227376,0.24977 0.227376,0.68041 z m -0.316949,-0.093 q -0.0034,-0.2601 -0.146416,-0.41513 -0.141249,-0.15503 -0.375516,-0.15503 -0.265272,0 -0.425469,0.14986 -0.158474,0.14986 -0.18259,0.42202 z"
+ style="stroke-width:0.07000434"
+ id="path898"
+ inkscape:connector-curvature="0" />
+ </g>
</g>
<text
id="text983"
diff --git a/src/ComputerscareLaundrySoup.cpp b/src/ComputerscareLaundrySoup.cpp
@@ -75,8 +75,9 @@ struct ComputerscareLaundrySoup : Module {
NUM_INPUTS = RESET_INPUT + numFields
};
enum OutputIds {
- TRG_OUTPUT,
- NUM_OUTPUTS = TRG_OUTPUT + numFields
+ TRG_OUTPUT,
+ FIRST_STEP_OUTPUT = TRG_OUTPUT + numFields,
+ NUM_OUTPUTS = FIRST_STEP_OUTPUT + numFields
};
enum LightIds {
SWITCH_LIGHTS,
@@ -195,6 +196,7 @@ void ComputerscareLaundrySoup::step() {
bool globalGateIn = globalClockTrigger.isHigh();
bool activeStep = false;
+ bool atFirstStep = false;
bool clocked = globalClockTrigger.process(inputs[GLOBAL_CLOCK_INPUT].value);
bool currentTriggerIsHigh;
bool currentTriggerClocked;
@@ -225,12 +227,15 @@ void ComputerscareLaundrySoup::step() {
}
activeStep = absoluteSequences[i][this->absoluteStep[i]]==1;
+ atFirstStep = (this->absoluteStep[i] == 0);
}
if(inputs[CLOCK_INPUT + i].active) {
outputs[TRG_OUTPUT + i].value = (currentTriggerIsHigh && activeStep) ? 10.0f : 0.0f;
+ outputs[FIRST_STEP_OUTPUT + i].value = (currentTriggerIsHigh && atFirstStep) ? 10.f : 0.0f;
}
else {
outputs[TRG_OUTPUT + i].value = (globalGateIn && activeStep) ? 10.0f : 0.0f;
+ outputs[FIRST_STEP_OUTPUT + i].value = (globalGateIn && atFirstStep) ? 10.f : 0.0f;
}
}
}
@@ -291,6 +296,8 @@ struct ComputerscareLaundrySoupWidget : ModuleWidget {
//individual output
addOutput(Port::create<OutPort>(mm2px(Vec(54 , verticalStart + verticalSpacing*i - 11)), Port::OUTPUT, module, ComputerscareLaundrySoup::TRG_OUTPUT + i));
+ addOutput(Port::create<OutPort>(mm2px(Vec(42 , verticalStart + verticalSpacing*i - 11)), Port::OUTPUT, module, ComputerscareLaundrySoup::FIRST_STEP_OUTPUT + i));
+
//individual clock input
addInput(Port::create<InPort>(mm2px(Vec(2, verticalStart + verticalSpacing*i-10)), Port::INPUT, module, ComputerscareLaundrySoup::CLOCK_INPUT + i));
@@ -308,7 +315,7 @@ struct ComputerscareLaundrySoupWidget : ModuleWidget {
//active step display
NumberDisplayWidget3 *display = new NumberDisplayWidget3();
- display->box.pos = mm2px(Vec(25,verticalStart - 9.2 +verticalSpacing*i));
+ display->box.pos = mm2px(Vec(24,verticalStart - 9.2 +verticalSpacing*i));
display->box.size = Vec(50, 20);
if(&module->numSteps[i]) {
display->value = &module->absoluteStep[i];
diff --git a/src/dtpulse.cpp b/src/dtpulse.cpp
@@ -1,5 +1,11 @@
#include "dtpulse.hpp"
std::string b64lookup = "123456789abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ&$0";
+std::string integerlookup = "0123456789";
+
+bool is_digits(const std::string &str)
+{
+ return str.find_first_not_of(integerlookup) == std::string::npos;
+}
std::vector<int> parseEntireString(std::string input,std::string lookup) {
std::vector<int> absoluteSequence;
@@ -38,7 +44,8 @@ std::vector<int> parseEntireString(std::string input,std::string lookup) {
while(std::getline(atstream,atseg,'@')) {
atVec.push_back(atseg);
}
- atnum = atVec.size() > 1 ? std::stoi(atVec[1]) : -1;
+
+ atnum = (atVec.size() > 1 && is_digits(atVec[1]) )? std::stoi(atVec[1]) : -1;
if(atVec[0].empty() && atnum > 0) {
for(int i = 0; i < atnum; i++) {
absoluteSequence.push_back(0);
@@ -57,7 +64,7 @@ std::vector<int> parseEntireString(std::string input,std::string lookup) {
absoluteSequence.push_back(0);
}
else {
- offsetnum = offsetVec.size() > 1 ? std::stoi(offsetVec[1]) : 0;
+ offsetnum = (offsetVec.size() > 1 && is_digits(offsetVec[1]))? std::stoi(offsetVec[1]) : 0;
commaVec.resize(0);
commaVec = parseDt(atExpand(offsetVec[0],atnum,lookup),offsetnum,lookup);
absoluteSequence.insert(absoluteSequence.end(),commaVec.begin(),commaVec.end());
diff --git a/src/dtpulse.hpp b/src/dtpulse.hpp
@@ -4,6 +4,7 @@
#include <iostream>
#include <vector>
#include <algorithm>
+bool is_digits(const std::string &str);
std::vector <int> parseString(std::string expr);
std::vector <int> parseDt(std::string input, int offset, std::string lookup);
std::vector<int> parseEntireString(std::string input,std::string lookup);