Initial target repo setup to move to master (v3.10)

This commit is contained in:
Sam El-Husseini
2018-04-21 10:25:43 -07:00
parent cf7767ec1c
commit 6ea0c50472
36 changed files with 2717 additions and 1459 deletions

View File

@ -31,7 +31,7 @@ namespace pxsim {
namespace pxsim.pins {
export function digitalReadPin(pinId: number): number {
let pin = getPin(pinId);
if (!pin) return;
if (!pin) return -1;
pin.mode = PinFlags.Digital | PinFlags.Input;
return pin.value > 100 ? 1 : 0;
}
@ -52,7 +52,7 @@ namespace pxsim.pins {
export function analogReadPin(pinId: number): number {
let pin = getPin(pinId);
if (!pin) return;
if (!pin) return -1;
pin.mode = PinFlags.Analog | PinFlags.Input;
return pin.value || 0;
}