We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent d863109 commit 11beb41Copy full SHA for 11beb41
sim/state/edgeconnectorsim.ts
@@ -24,7 +24,7 @@ namespace pxsim {
24
return this.value > 100 ? 1 : 0;
25
}
26
27
- digitalWritePin(value: number) {
+ digitalWritePin(value: number) {
28
this.mode = PinFlags.Digital | PinFlags.Output;
29
this.value = value > 0 ? 200 : 0;
30
runtime.queueDisplayUpdate();
@@ -37,6 +37,11 @@ namespace pxsim {
37
case PinPullMode.PullUp: this.value = 1023; break;
38
default: this.value = Math_.randomRange(0, 1023); break;
39
40
+
41
+ // stop continuous servo if moving; 90 degrees represents a speed of 0
42
+ if (this.servoContinuous && pull == PinPullMode.PullNone && this.mode & PinFlags.Digital) {
43
+ this.servoAngle = 90;
44
+ }
45
46
47
analogReadPin(): number {
0 commit comments