Skip to content

Commit

Permalink
Linting & cleanup
Browse files Browse the repository at this point in the history
  • Loading branch information
benjaminwp18 committed Jun 8, 2024
1 parent 33df27f commit 9807713
Show file tree
Hide file tree
Showing 4 changed files with 11 additions and 11 deletions.
14 changes: 7 additions & 7 deletions src/pi/temp_sensor/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@

## Overview

This package launches flood detection.
This package reads from the temperature sensor.

## Installation

Expand All @@ -13,28 +13,28 @@ sudo apt-get install python3-smbus
## Usage

```bash
ros2 launch
ros2 launch temp_sensor temp_sensor_launch.py
```

## Launch files

* **.py:** Primary launch file for temp sensor.
* **temp_sensor_launch.py:** Primary launch file for temp sensor.

## Nodes

### temp_sensor

Reads temperature.
Reads and publishes temperature.

#### Published Topics

* **`/`** ([rov_msgs/flooding])
* **`/temperature`** ([rov_msgs/temperature])

Whether rov is flooding.
Temperature readings as floats


### test

Tests flooding.

[rov_msgs/flooding]: ../../rov_msgs/msg/Flooding.msg
[rov_msgs/temperature]: ../../rov_msgs/msg/Temperature.msg
2 changes: 1 addition & 1 deletion src/pi/temp_sensor/setup.py
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,7 @@
entry_points={
'console_scripts': [
'temp_sensor = temp_sensor.temp_sensor:main',
# 'dry_run = flood_detection.gpio_reader_dry_run:main'
'dry_run = temp_sensor.temp_sensor_dry_run:main'
],
},
)
4 changes: 2 additions & 2 deletions src/pi/temp_sensor/temp_sensor/temp_sensor_dry_run.py
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
import tsys01 # https://github.com/bluerobotics/tsys01-python


def debug_log() -> None:
def main() -> None:
sensor = tsys01.TSYS01() # Use default I2C bus 1

sensor.init()
Expand All @@ -23,4 +23,4 @@ def debug_log() -> None:


if __name__ == "__main__":
debug_log()
main()
2 changes: 1 addition & 1 deletion src/surface/gui/gui/widgets/temperature.py
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
from gui.gui_nodes.event_nodes.subscriber import GUIEventSubscriber
from rov_msgs.msg import Temperature
from PyQt6.QtCore import pyqtSignal, pyqtSlot
from PyQt6.QtWidgets import (QGridLayout, QLabel, QLineEdit, QPushButton,
from PyQt6.QtWidgets import (QLabel, QLineEdit, QPushButton,
QVBoxLayout, QWidget)

MIN_TEMP_C = 10
Expand Down

0 comments on commit 9807713

Please sign in to comment.