diff --git a/hardware/sensehat/package.json b/hardware/sensehat/package.json index 06be207a..ac0deb02 100644 --- a/hardware/sensehat/package.json +++ b/hardware/sensehat/package.json @@ -1,6 +1,6 @@ { "name" : "node-red-node-pi-sense-hat", - "version" : "0.0.10", + "version" : "0.0.11", "description" : "A Node-RED node to interact with a Raspberry Pi Sense HAT", "repository" : { "type":"git", diff --git a/hardware/sensehat/sensehat.py b/hardware/sensehat/sensehat.py index bc3b4cfb..c80c5061 100644 --- a/hardware/sensehat/sensehat.py +++ b/hardware/sensehat/sensehat.py @@ -196,7 +196,8 @@ def idle_work(): now = time.time() if hf_enabled and (now-last_hf_time > hf_interval): orientation = SH.get_orientation() - compass = SH.get_compass() + # Calling get_compass interferes with get_orientation - so just reuse its value + compass = orientation['yaw'] gyro = SH.get_gyroscope_raw() accel = SH.get_accelerometer_raw()