10 lines
267 B
TypeScript
10 lines
267 B
TypeScript
|
namespace pxsim.input {
|
||
|
export function lightLevel(): number {
|
||
|
let b = board().lightSensorState;
|
||
|
if (!b.usesLightLevel) {
|
||
|
b.usesLightLevel = true;
|
||
|
runtime.queueDisplayUpdate();
|
||
|
}
|
||
|
return b.lightLevel;
|
||
|
}
|
||
|
}
|