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;
|
|
|
|
}
|
|
|
|
|
2021-11-25 17:27:39 +01:00
|
|
|
export function assumeCalibrationCompass(){
|
|
|
|
}
|
|
|
|
|
|
|
|
export function clearCalibrationCompass(){
|
|
|
|
}
|
|
|
|
|
|
|
|
export function isCalibratedCompass(): boolean {
|
|
|
|
// let b = board().compassState;
|
|
|
|
// return b.isCalibrated;
|
|
|
|
// TODO
|
|
|
|
return true;
|
|
|
|
}
|
|
|
|
|
2016-08-30 20:51:32 +02:00
|
|
|
export function magneticForce(): number {
|
|
|
|
// TODO
|
|
|
|
return 0;
|
|
|
|
}
|
2021-11-25 17:27:39 +01:00
|
|
|
|
2016-08-30 20:51:32 +02:00
|
|
|
}
|