Control event value in simulator (#343)
* implement pxsim.control.eventValue and pxsim.control.eventTimestamp in the simulator
This commit is contained in:
		@@ -65,6 +65,14 @@ namespace pxsim.control {
 | 
			
		||||
        // TODO mode?
 | 
			
		||||
        board().bus.queue(id, evid)
 | 
			
		||||
    }
 | 
			
		||||
 | 
			
		||||
    export function eventValue(): number | string {
 | 
			
		||||
        return board().bus.getLastEvent();
 | 
			
		||||
    }
 | 
			
		||||
 | 
			
		||||
    export function eventTimestamp(): number {
 | 
			
		||||
        return board().bus.getLastEventTime();
 | 
			
		||||
    }
 | 
			
		||||
}
 | 
			
		||||
 | 
			
		||||
namespace pxsim.pxtcore {
 | 
			
		||||
 
 | 
			
		||||
		Reference in New Issue
	
	Block a user