Mercurial > ukubik
changeset 87:35a851c68621
fix temperature/gyro mixup
| author | Radomir Dopieralski <sheep-devel@sheep.art.pl> |
|---|---|
| date | Sun, 12 Oct 2014 23:17:53 +0200 |
| parents | e0fc40139163 |
| children | c38532de6cbc |
| files | robot.py show_accel.py |
| diffstat | 2 files changed, 4 insertions(+), 4 deletions(-) [+] |
line wrap: on
line diff
--- a/robot.py Sun Oct 12 12:42:34 2014 +0200 +++ b/robot.py Sun Oct 12 23:17:53 2014 +0200 @@ -60,9 +60,9 @@ def get_accel(self): sensors = self.legs[0].hip.get_sensors() return [ - sensors[0:3], # accel - sensors[3:6], # gyro - sensors[6], # temperature + sensors[0:3], # acceleration + sensors[4:7], # gyroscope + sensors[3], # temperature ] def get_attitude(self):
--- a/show_accel.py Sun Oct 12 12:42:34 2014 +0200 +++ b/show_accel.py Sun Oct 12 23:17:53 2014 +0200 @@ -26,7 +26,7 @@ while True: accel, gyro, temp = robot.get_accel() accel = accel[1], accel[0], accel[2] - gyro = gyro[1], gyro[2], gyro[0] + gyro = gyro[1], gyro[0], gyro[2] screen.fill(0x000000) self.circle(screen, accel, 0xff0000, 100) self.circle(screen, gyro, 0x00ff00, 100)
