When does the events "sensorBatteryNeedsCharging" and "sensorDidLeaveLowPowerMode" are fired?


#1

Hi,
regarding the “sensorBatteryNeedsCharging” is it fired when sensor battery is lower then 10% or something?
and regarding the “sensorDidLeaveLowPowerMode” what exactly does it mean?

Thanks


#2

sensorBatteryNeedsCharging is called when the Structure Sensor is close to being out of battery or if it is already out. It is unclear at what percent this message appears.

sensorDidLeaveLowPowerMode returns a boolean on whether the Structure Sensor is in low power mode or not. IE returns true if Structure Sensor is no longer in low power mode and false if it is. If you look at the STSensorController class, you’ll see a function called, “isLowPower”.

From my understanding, low power mode is entered when the Structure Sensor is idle and hasn’t been used for awhile.

Hope this helps!


#3

Adding to this, sensorBatteryNeedsCharging set be called when the battery is actually completely depleted, to the point the sensor can no longer stream.

Thanks to the internal low-power processor, the sensor is able to connect and inform your app that its battery is depleted via this sensorBatteryNeedsCharging callback, even if the battery is already completely dead when you plug it in.

sensorDidLeaveLowPowerMode actually doesn’t return a boolean, but is only called when you are leaving the low power sleep state, and are transitioning to the full operational mode.