Skip to content

Commit

Permalink
Adding type hints
Browse files Browse the repository at this point in the history
  • Loading branch information
ScottGibb committed Nov 5, 2023
1 parent 5ea2899 commit 577c399
Showing 1 changed file with 1 addition and 2 deletions.
3 changes: 1 addition & 2 deletions src/socket_transmitter.py
Original file line number Diff line number Diff line change
Expand Up @@ -59,7 +59,6 @@ def main(ip_addr: str = DEFAULT_IP_ADDRESS, port_num:int = DEFAULT_PORT_NUM, tra
message = message.strip()
strings = message.split(':')
log.info("Decoding String")
log.info(message)
try:
transmit_rf_code(strings[0], float(strings[1]), float(strings[2]),transmit_pin)
except IndexError:
Expand All @@ -74,7 +73,7 @@ def main(ip_addr: str = DEFAULT_IP_ADDRESS, port_num:int = DEFAULT_PORT_NUM, tra
GPIO.cleanup()


def transmit_rf_code(code, short_delay, long_delay, trsmt_pin:int) -> None:
def transmit_rf_code(code: str, short_delay: float, long_delay: float, trsmt_pin:int) -> None:
"""
Using the parameters and the GPIO pin associated with TRANSMIT_PIN the GPIO pin is turned on and off representing
the signal to be transmitted using the RF Module
Expand Down

0 comments on commit 577c399

Please sign in to comment.