Remove reduntant code in MicroBitAccelerometer

Also removes a potential recursive loop, as noted by @dpgeorge.
This commit is contained in:
Joe Finney 2018-07-06 03:19:42 +01:00
parent e770f34636
commit 2d46e9dabd
1 changed files with 0 additions and 2 deletions

View File

@ -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;
}