Safepolling (#915)
* headstart on safe polling * poke in sensors * more poking * typo
This commit is contained in:
		@@ -84,6 +84,7 @@ namespace sensors {
 | 
			
		||||
        //% weight=65
 | 
			
		||||
        //% group="Ultrasonic Sensor"
 | 
			
		||||
        distance(): number {
 | 
			
		||||
            this.poke();
 | 
			
		||||
            // it supposedly also has an inch mode, but we stick to cm
 | 
			
		||||
            this._setMode(0)
 | 
			
		||||
            return this._query();
 | 
			
		||||
 
 | 
			
		||||
		Reference in New Issue
	
	Block a user