智能照明系统APP-本地串口
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
 
 
 
 
 
 
LightingSystemApp-serial/.svn/pristine/11/111cf033bc5becce8047a151d96...

21 lines
495 B

/**
* @file 罗盘
*/
declare namespace my {
interface IOnCompassChangeEvent {
/**
* 面对的方向与正北方向的度数[0,360)
*/
readonly direction: number;
}
/**
* 监听罗盘数据,接口调用后会自动开始监听,回调间隔为500ms,可使用my.offCompassChange停止监听。
*/
function onCompassChange(cb: (res: IOnCompassChangeEvent) => void): void;
/**
* 停止监听罗盘数据。
*/
function offCompassChange(): void;
}