splits m:b simulator state

This commit is contained in:
darzu
2016-08-30 11:51:32 -07:00
parent a984778dfd
commit 89e899cc79
12 changed files with 1519 additions and 711 deletions

22
sim/state/compass.ts Normal file
View File

@ -0,0 +1,22 @@
namespace pxsim.input {
export function compassHeading(): number {
let b = board().compassState;
if (!b.usesHeading) {
b.usesHeading = true;
runtime.queueDisplayUpdate();
}
return b.heading;
}
export function magneticForce(): number {
// TODO
return 0;
}
}
namespace pxsim {
export class CompassState {
usesHeading = false;
heading = 90;
}
}