Skip to content

Commit

Permalink
Remove temporary temperature var
Browse files Browse the repository at this point in the history
Co-authored-by: Michael Carlstrom <[email protected]>
  • Loading branch information
benjaminwp18 and InvincibleRMC authored Jun 8, 2024
1 parent 9051436 commit 92f41d7
Showing 1 changed file with 1 addition and 3 deletions.
4 changes: 1 addition & 3 deletions src/pi/temp_sensor/temp_sensor/temp_sensor.py
Original file line number Diff line number Diff line change
Expand Up @@ -25,9 +25,7 @@ def timer_callback(self) -> None:
temp_reading = self.sensor.temperature()

# If any of the sensors detect water, send true to /tether/flooding
msg = Temperature()
msg.reading = temp_reading
self.publisher.publish(msg)
self.publisher.publish(Temperature(reading=temp_reading))
except OSError:
print('Failed to read temperature, skipping this read')

Expand Down

0 comments on commit 92f41d7

Please sign in to comment.