mirror of
https://github.com/KevinMidboe/python-gpiozero.git
synced 2025-10-29 17:50:37 +00:00
Make tests work reliably on the Pi
While the tests work well on a PC or Travis, the Pi (where I ought to be running them!) has some issues with the timing tests. Need to relax the tolerance of the "assert_states_and_times" method to 0.05 seconds otherwise it periodically fails even on something reasonably quick like a Pi 2 (less failures on a Pi 3 but still occasionally). Also reduced default fps to 25; if the default timing occasionally fails on a Pi 2 it's evidently too fast for a Pi 1 and shouldn't be the default; 25 also doesn't look any different to me on a pulsing LED. There's also a bunch of miscellaneous fixes in here; last minute typos and chart re-gens for the 1.2 release.
This commit is contained in:
@@ -4,11 +4,11 @@
|
||||
<!-- Generated by graphviz version 2.36.0 (20140111.2315)
|
||||
-->
|
||||
<!-- Title: classes Pages: 1 -->
|
||||
<svg width="447pt" height="116pt"
|
||||
viewBox="0.00 0.00 447.00 116.00" xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink">
|
||||
<svg width="538pt" height="116pt"
|
||||
viewBox="0.00 0.00 538.00 116.00" xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink">
|
||||
<g id="graph0" class="graph" transform="scale(1 1) rotate(0) translate(4 112)">
|
||||
<title>classes</title>
|
||||
<polygon fill="white" stroke="none" points="-4,4 -4,-112 443,-112 443,4 -4,4"/>
|
||||
<polygon fill="white" stroke="none" points="-4,4 -4,-112 534,-112 534,4 -4,4"/>
|
||||
<!-- RGBLED -->
|
||||
<g id="node1" class="node"><title>RGBLED</title>
|
||||
<polygon fill="#298029" stroke="#298029" points="55.5,-108 0.5,-108 0.5,-72 55.5,-72 55.5,-108"/>
|
||||
@@ -16,83 +16,98 @@
|
||||
</g>
|
||||
<!-- PWMLED -->
|
||||
<g id="node2" class="node"><title>PWMLED</title>
|
||||
<polygon fill="#298029" stroke="#298029" points="58.5,-36 1.5,-36 1.5,-0 58.5,-0 58.5,-36"/>
|
||||
<text text-anchor="middle" x="30" y="-15.5" font-family="Sans" font-size="10.00" fill="#ffffff">PWMLED</text>
|
||||
<polygon fill="#298029" stroke="#298029" points="143.5,-36 86.5,-36 86.5,-0 143.5,-0 143.5,-36"/>
|
||||
<text text-anchor="middle" x="115" y="-15.5" font-family="Sans" font-size="10.00" fill="#ffffff">PWMLED</text>
|
||||
</g>
|
||||
<!-- RGBLED->PWMLED -->
|
||||
<g id="edge1" class="edge"><title>RGBLED->PWMLED</title>
|
||||
<path fill="none" stroke="black" stroke-dasharray="5,2" d="M28.4944,-71.6966C28.7148,-63.9827 28.9796,-54.7125 29.2254,-46.1124"/>
|
||||
<polygon fill="none" stroke="black" points="32.7242,-46.2002 29.5113,-36.1043 25.727,-46.0003 32.7242,-46.2002"/>
|
||||
<path fill="none" stroke="black" stroke-dasharray="5,2" d="M49.5056,-71.6966C60.4625,-62.8807 73.9459,-52.0321 85.8249,-42.4742"/>
|
||||
<polygon fill="none" stroke="black" points="88.1446,-45.1001 93.7418,-36.1043 83.7565,-39.6462 88.1446,-45.1001"/>
|
||||
</g>
|
||||
<!-- LEDBoard -->
|
||||
<g id="node3" class="node"><title>LEDBoard</title>
|
||||
<polygon fill="#298029" stroke="#298029" points="138,-108 74,-108 74,-72 138,-72 138,-108"/>
|
||||
<text text-anchor="middle" x="106" y="-87.5" font-family="Sans" font-size="10.00" fill="#ffffff">LEDBoard</text>
|
||||
<polygon fill="#298029" stroke="#298029" points="238,-108 174,-108 174,-72 238,-72 238,-108"/>
|
||||
<text text-anchor="middle" x="206" y="-87.5" font-family="Sans" font-size="10.00" fill="#ffffff">LEDBoard</text>
|
||||
</g>
|
||||
<!-- LEDBoard->PWMLED -->
|
||||
<g id="edge3" class="edge"><title>LEDBoard->PWMLED</title>
|
||||
<path fill="none" stroke="black" stroke-dasharray="5,2" d="M87.2135,-71.6966C77.826,-63.0503 66.3156,-52.4486 56.0865,-43.027"/>
|
||||
<polygon fill="none" stroke="black" points="58.2971,-40.3047 48.5704,-36.1043 53.5547,-45.4535 58.2971,-40.3047"/>
|
||||
<path fill="none" stroke="black" stroke-dasharray="5,2" d="M183.506,-71.6966C172.045,-62.8807 157.942,-52.0321 145.516,-42.4742"/>
|
||||
<polygon fill="none" stroke="black" points="147.296,-39.4273 137.236,-36.1043 143.028,-44.9757 147.296,-39.4273"/>
|
||||
</g>
|
||||
<!-- LED -->
|
||||
<g id="node4" class="node"><title>LED</title>
|
||||
<polygon fill="#298029" stroke="#298029" points="133,-36 79,-36 79,-0 133,-0 133,-36"/>
|
||||
<text text-anchor="middle" x="106" y="-15.5" font-family="Sans" font-size="10.00" fill="#ffffff">LED</text>
|
||||
<polygon fill="#298029" stroke="#298029" points="224,-36 170,-36 170,-0 224,-0 224,-36"/>
|
||||
<text text-anchor="middle" x="197" y="-15.5" font-family="Sans" font-size="10.00" fill="#ffffff">LED</text>
|
||||
</g>
|
||||
<!-- LEDBoard->LED -->
|
||||
<g id="edge2" class="edge"><title>LEDBoard->LED</title>
|
||||
<path fill="none" stroke="black" stroke-dasharray="5,2" d="M106,-71.6966C106,-63.9827 106,-54.7125 106,-46.1124"/>
|
||||
<polygon fill="none" stroke="black" points="109.5,-46.1043 106,-36.1043 102.5,-46.1044 109.5,-46.1043"/>
|
||||
<path fill="none" stroke="black" stroke-dasharray="5,2" d="M203.775,-71.6966C202.783,-63.9827 201.592,-54.7125 200.486,-46.1124"/>
|
||||
<polygon fill="none" stroke="black" points="203.946,-45.5763 199.199,-36.1043 197.003,-46.469 203.946,-45.5763"/>
|
||||
</g>
|
||||
<!-- LEDBarGraph -->
|
||||
<g id="node5" class="node"><title>LEDBarGraph</title>
|
||||
<polygon fill="#298029" stroke="#298029" points="155.25,-108 74.75,-108 74.75,-72 155.25,-72 155.25,-108"/>
|
||||
<text text-anchor="middle" x="115" y="-87.5" font-family="Sans" font-size="10.00" fill="#ffffff">LEDBarGraph</text>
|
||||
</g>
|
||||
<!-- LEDBarGraph->PWMLED -->
|
||||
<g id="edge5" class="edge"><title>LEDBarGraph->PWMLED</title>
|
||||
<path fill="none" stroke="black" stroke-dasharray="5,2" d="M115,-71.6966C115,-63.9827 115,-54.7125 115,-46.1124"/>
|
||||
<polygon fill="none" stroke="black" points="118.5,-46.1043 115,-36.1043 111.5,-46.1044 118.5,-46.1043"/>
|
||||
</g>
|
||||
<!-- LEDBarGraph->LED -->
|
||||
<g id="edge4" class="edge"><title>LEDBarGraph->LED</title>
|
||||
<path fill="none" stroke="black" stroke-dasharray="5,2" d="M135.27,-71.6966C145.498,-62.9655 158.061,-52.2405 169.178,-42.7503"/>
|
||||
<polygon fill="none" stroke="black" points="171.63,-45.259 176.963,-36.1043 167.085,-39.935 171.63,-45.259"/>
|
||||
</g>
|
||||
<!-- TrafficLightsBuzzer -->
|
||||
<g id="node5" class="node"><title>TrafficLightsBuzzer</title>
|
||||
<polygon fill="#298029" stroke="#298029" points="320.25,-108 215.75,-108 215.75,-72 320.25,-72 320.25,-108"/>
|
||||
<text text-anchor="middle" x="268" y="-87.5" font-family="Sans" font-size="10.00" fill="#ffffff">TrafficLightsBuzzer</text>
|
||||
<g id="node6" class="node"><title>TrafficLightsBuzzer</title>
|
||||
<polygon fill="#298029" stroke="#298029" points="411.25,-108 306.75,-108 306.75,-72 411.25,-72 411.25,-108"/>
|
||||
<text text-anchor="middle" x="359" y="-87.5" font-family="Sans" font-size="10.00" fill="#ffffff">TrafficLightsBuzzer</text>
|
||||
</g>
|
||||
<!-- TrafficLights -->
|
||||
<g id="node6" class="node"><title>TrafficLights</title>
|
||||
<polygon fill="#298029" stroke="#298029" points="223,-36 151,-36 151,-0 223,-0 223,-36"/>
|
||||
<text text-anchor="middle" x="187" y="-15.5" font-family="Sans" font-size="10.00" fill="#ffffff">TrafficLights</text>
|
||||
<g id="node7" class="node"><title>TrafficLights</title>
|
||||
<polygon fill="#298029" stroke="#298029" points="314,-36 242,-36 242,-0 314,-0 314,-36"/>
|
||||
<text text-anchor="middle" x="278" y="-15.5" font-family="Sans" font-size="10.00" fill="#ffffff">TrafficLights</text>
|
||||
</g>
|
||||
<!-- TrafficLightsBuzzer->TrafficLights -->
|
||||
<g id="edge4" class="edge"><title>TrafficLightsBuzzer->TrafficLights</title>
|
||||
<path fill="none" stroke="black" stroke-dasharray="5,2" d="M247.978,-71.6966C237.874,-62.9655 225.464,-52.2405 214.482,-42.7503"/>
|
||||
<polygon fill="none" stroke="black" points="216.647,-39.9948 206.792,-36.1043 212.07,-45.2912 216.647,-39.9948"/>
|
||||
<g id="edge6" class="edge"><title>TrafficLightsBuzzer->TrafficLights</title>
|
||||
<path fill="none" stroke="black" stroke-dasharray="5,2" d="M338.978,-71.6966C328.874,-62.9655 316.464,-52.2405 305.482,-42.7503"/>
|
||||
<polygon fill="none" stroke="black" points="307.647,-39.9948 297.792,-36.1043 303.07,-45.2912 307.647,-39.9948"/>
|
||||
</g>
|
||||
<!-- Buzzer -->
|
||||
<g id="node7" class="node"><title>Buzzer</title>
|
||||
<polygon fill="#298029" stroke="#298029" points="295,-36 241,-36 241,-0 295,-0 295,-36"/>
|
||||
<text text-anchor="middle" x="268" y="-15.5" font-family="Sans" font-size="10.00" fill="#ffffff">Buzzer</text>
|
||||
<g id="node8" class="node"><title>Buzzer</title>
|
||||
<polygon fill="#298029" stroke="#298029" points="386,-36 332,-36 332,-0 386,-0 386,-36"/>
|
||||
<text text-anchor="middle" x="359" y="-15.5" font-family="Sans" font-size="10.00" fill="#ffffff">Buzzer</text>
|
||||
</g>
|
||||
<!-- TrafficLightsBuzzer->Buzzer -->
|
||||
<g id="edge5" class="edge"><title>TrafficLightsBuzzer->Buzzer</title>
|
||||
<path fill="none" stroke="black" stroke-dasharray="5,2" d="M268,-71.6966C268,-63.9827 268,-54.7125 268,-46.1124"/>
|
||||
<polygon fill="none" stroke="black" points="271.5,-46.1043 268,-36.1043 264.5,-46.1044 271.5,-46.1043"/>
|
||||
<g id="edge7" class="edge"><title>TrafficLightsBuzzer->Buzzer</title>
|
||||
<path fill="none" stroke="black" stroke-dasharray="5,2" d="M359,-71.6966C359,-63.9827 359,-54.7125 359,-46.1124"/>
|
||||
<polygon fill="none" stroke="black" points="362.5,-46.1043 359,-36.1043 355.5,-46.1044 362.5,-46.1043"/>
|
||||
</g>
|
||||
<!-- Button -->
|
||||
<g id="node8" class="node"><title>Button</title>
|
||||
<polygon fill="#298029" stroke="#298029" points="367,-36 313,-36 313,-0 367,-0 367,-36"/>
|
||||
<text text-anchor="middle" x="340" y="-15.5" font-family="Sans" font-size="10.00" fill="#ffffff">Button</text>
|
||||
<g id="node9" class="node"><title>Button</title>
|
||||
<polygon fill="#298029" stroke="#298029" points="458,-36 404,-36 404,-0 458,-0 458,-36"/>
|
||||
<text text-anchor="middle" x="431" y="-15.5" font-family="Sans" font-size="10.00" fill="#ffffff">Button</text>
|
||||
</g>
|
||||
<!-- TrafficLightsBuzzer->Button -->
|
||||
<g id="edge6" class="edge"><title>TrafficLightsBuzzer->Button</title>
|
||||
<path fill="none" stroke="black" stroke-dasharray="5,2" d="M285.798,-71.6966C294.604,-63.135 305.382,-52.6562 315.001,-43.3045"/>
|
||||
<polygon fill="none" stroke="black" points="317.677,-45.5846 322.407,-36.1043 312.797,-40.5657 317.677,-45.5846"/>
|
||||
<g id="edge8" class="edge"><title>TrafficLightsBuzzer->Button</title>
|
||||
<path fill="none" stroke="black" stroke-dasharray="5,2" d="M376.798,-71.6966C385.604,-63.135 396.382,-52.6562 406.001,-43.3045"/>
|
||||
<polygon fill="none" stroke="black" points="408.677,-45.5846 413.407,-36.1043 403.797,-40.5657 408.677,-45.5846"/>
|
||||
</g>
|
||||
<!-- Robot -->
|
||||
<g id="node9" class="node"><title>Robot</title>
|
||||
<polygon fill="#298029" stroke="#298029" points="439,-108 385,-108 385,-72 439,-72 439,-108"/>
|
||||
<text text-anchor="middle" x="412" y="-87.5" font-family="Sans" font-size="10.00" fill="#ffffff">Robot</text>
|
||||
<g id="node10" class="node"><title>Robot</title>
|
||||
<polygon fill="#298029" stroke="#298029" points="530,-108 476,-108 476,-72 530,-72 530,-108"/>
|
||||
<text text-anchor="middle" x="503" y="-87.5" font-family="Sans" font-size="10.00" fill="#ffffff">Robot</text>
|
||||
</g>
|
||||
<!-- Motor -->
|
||||
<g id="node10" class="node"><title>Motor</title>
|
||||
<polygon fill="#298029" stroke="#298029" points="439,-36 385,-36 385,-0 439,-0 439,-36"/>
|
||||
<text text-anchor="middle" x="412" y="-15.5" font-family="Sans" font-size="10.00" fill="#ffffff">Motor</text>
|
||||
<g id="node11" class="node"><title>Motor</title>
|
||||
<polygon fill="#298029" stroke="#298029" points="530,-36 476,-36 476,-0 530,-0 530,-36"/>
|
||||
<text text-anchor="middle" x="503" y="-15.5" font-family="Sans" font-size="10.00" fill="#ffffff">Motor</text>
|
||||
</g>
|
||||
<!-- Robot->Motor -->
|
||||
<g id="edge7" class="edge"><title>Robot->Motor</title>
|
||||
<path fill="none" stroke="black" stroke-dasharray="5,2" d="M412,-71.6966C412,-63.9827 412,-54.7125 412,-46.1124"/>
|
||||
<polygon fill="none" stroke="black" points="415.5,-46.1043 412,-36.1043 408.5,-46.1044 415.5,-46.1043"/>
|
||||
<g id="edge9" class="edge"><title>Robot->Motor</title>
|
||||
<path fill="none" stroke="black" stroke-dasharray="5,2" d="M503,-71.6966C503,-63.9827 503,-54.7125 503,-46.1124"/>
|
||||
<polygon fill="none" stroke="black" points="506.5,-46.1043 503,-36.1043 499.5,-46.1044 506.5,-46.1043"/>
|
||||
</g>
|
||||
</g>
|
||||
</svg>
|
||||
|
||||
|
Before Width: | Height: | Size: 5.7 KiB After Width: | Height: | Size: 6.7 KiB |
Reference in New Issue
Block a user