pxt-calliope/sim/state/compass.ts

15 lines
345 B
TypeScript
Raw Normal View History

2016-08-30 20:51:32 +02:00
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;
}
}