Remove reduntant code in MicroBitAccelerometer
Also removes a potential recursive loop, as noted by @dpgeorge.
This commit is contained in:
parent
e770f34636
commit
2d46e9dabd
1 changed files with 0 additions and 2 deletions
|
@ -163,8 +163,6 @@ int MicroBitAccelerometer::update()
|
|||
*/
|
||||
uint32_t MicroBitAccelerometer::instantaneousAccelerationSquared()
|
||||
{
|
||||
requestUpdate();
|
||||
|
||||
// Use pythagoras theorem to determine the combined force acting on the device.
|
||||
return (uint32_t)sample.x*(uint32_t)sample.x + (uint32_t)sample.y*(uint32_t)sample.y + (uint32_t)sample.z*(uint32_t)sample.z;
|
||||
}
|
||||
|
|
Loading…
Reference in a new issue