From 947042e435c824e0a977451f791c703c9ee1d480 Mon Sep 17 00:00:00 2001 From: Ayke van Laethem Date: Fri, 16 Nov 2018 14:54:18 +0100 Subject: [PATCH] mma8653: rename ReadOrientation to ReadAcceleration --- mma8653/mma8653.go | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/mma8653/mma8653.go b/mma8653/mma8653.go index 66dcd0b..8ab2080 100644 --- a/mma8653/mma8653.go +++ b/mma8653/mma8653.go @@ -36,8 +36,9 @@ func (d Device) Configure(speed DataRate) { d.bus.WriteRegister(Address, CTRL_REG1, []uint8{data}) } -// ReadOrientation reads the current orientation from the device and returns it. -func (d Device) ReadOrientation() (x int16, y int16, z int16) { +// ReadAcceleration reads the current acceleration from the device and returns +// it. +func (d Device) ReadAcceleration() (x int16, y int16, z int16) { data := make([]byte, 6) d.bus.ReadRegister(Address, OUT_X_MSB, data) x = int16((uint16(data[0]) << 8) | uint16(data[1]))