Skip to content

Changed iterator name to get around duplicate-code check #15

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 2 commits into from
Mar 24, 2021
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
24 changes: 0 additions & 24 deletions adafruit_boardtest/boardtest_gpio.py
Original file line number Diff line number Diff line change
Expand Up @@ -125,27 +125,3 @@ def run_test(pins):
# Else (no pins found)
print("No GPIO pins found")
return NA, []


def _main():

# List out all the pins available to us
pins = list(dir(board))
print()
print("All pins found:", end=" ")

# Print pins
for pin in pins:
print(pin, end=" ")
print("\n")

# Run test
result = run_test(pins)
print()
print(result[0])
print("Pins tested: " + str(result[1]))


# Execute only if run as main.py or code.py
if __name__ == "__main__":
_main()
24 changes: 0 additions & 24 deletions adafruit_boardtest/boardtest_i2c.py
Original file line number Diff line number Diff line change
Expand Up @@ -175,27 +175,3 @@ def run_test(pins, sda_pin=SDA_PIN_NAME, scl_pin=SCL_PIN_NAME):
# Else (no pins found)
print("No I2C pins found")
return NA, []


def _main():

# List out all the pins available to us
pins = list(dir(board))
print()
print("All pins found:", end=" ")

# Print pins
for pin in pins:
print(pin, end=" ")
print("\n")

# Run test
result = run_test(pins)
print()
print(result[0])
print("Pins tested: " + str(result[1]))


# Execute only if run as main.py or code.py
if __name__ == "__main__":
_main()
24 changes: 0 additions & 24 deletions adafruit_boardtest/boardtest_led.py
Original file line number Diff line number Diff line change
Expand Up @@ -109,27 +109,3 @@ def run_test(pins):
# Else (no pins found)
print("No LED pins found")
return NA, []


def _main():

# List out all the pins available to us
pins = list(dir(board))
print()
print("All pins found:", end=" ")

# Print pins
for pin in pins:
print(pin, end=" ")
print("\n")

# Run test
result = run_test(pins)
print()
print(result[0])
print("Pins tested: " + str(result[1]))


# Execute only if run as main.py or code.py
if __name__ == "__main__":
_main()
24 changes: 0 additions & 24 deletions adafruit_boardtest/boardtest_sd.py
Original file line number Diff line number Diff line change
Expand Up @@ -146,27 +146,3 @@ def run_test(
# Else (no pins found)
print("No SD card pins found")
return NA, []


def _main():

# List out all the pins available to us
pins = list(dir(board))
print()
print("All pins found:", end=" ")

# Print pins
for pin in pins:
print(pin, end=" ")
print("\n")

# Run test
result = run_test(pins)
print()
print(result[0])
print("Pins tested: " + str(result[1]))


# Execute only if run as main.py or code.py
if __name__ == "__main__":
_main()
24 changes: 0 additions & 24 deletions adafruit_boardtest/boardtest_sd_cd.py
Original file line number Diff line number Diff line change
Expand Up @@ -86,27 +86,3 @@ def run_test(pins, cd_pin=SD_CD_PIN_NAME):
# Else (no pins found)
print("No CD pin found")
return NA, []


def _main():

# List out all the pins available to us
pins = list(dir(board))
print()
print("All pins found:", end=" ")

# Print pins
for pin in pins:
print(pin, end=" ")
print("\n")

# Run test
result = run_test(pins)
print()
print(result[0])
print("Pins tested: " + str(result[1]))


# Execute only if run as main.py or code.py
if __name__ == "__main__":
_main()
24 changes: 0 additions & 24 deletions adafruit_boardtest/boardtest_spi.py
Original file line number Diff line number Diff line change
Expand Up @@ -222,27 +222,3 @@ def run_test(
# Else (no pins found)
print("No SPI pins found")
return NA, []


def _main():

# List out all the pins available to us
pins = list(dir(board))
print()
print("All pins found:", end=" ")

# Print pins
for pin in pins:
print(pin, end=" ")
print("\n")

# Run test
result = run_test(pins)
print()
print(result[0])
print("Pins tested: " + str(result[1]))


# Execute only if run as main.py or code.py
if __name__ == "__main__":
_main()
24 changes: 0 additions & 24 deletions adafruit_boardtest/boardtest_uart.py
Original file line number Diff line number Diff line change
Expand Up @@ -98,27 +98,3 @@ def run_test(pins, tx_pin=TX_PIN_NAME, rx_pin=RX_PIN_NAME, baud_rate=BAUD_RATE):
# Else (no pins found)
print("No UART pins found")
return NA, []


def _main():

# List out all the pins available to us
pins = list(dir(board))
print()
print("All pins found:", end=" ")

# Print pins
for pin in pins:
print(pin, end=" ")
print("\n")

# Run test
result = run_test(pins)
print()
print(result[0])
print("Pins tested: " + str(result[1]))


# Execute only if run as main.py or code.py
if __name__ == "__main__":
_main()
24 changes: 0 additions & 24 deletions adafruit_boardtest/boardtest_voltage_monitor.py
Original file line number Diff line number Diff line change
Expand Up @@ -89,27 +89,3 @@ def run_test(pins):
# Else (no pins found)
print("No battery monitor pins found")
return NA, []


def _main():

# List out all the pins available to us
pins = list(dir(board))
print()
print("All pins found:", end=" ")

# Print pins
for pin in pins:
print(pin, end=" ")
print("\n")

# Run test
result = run_test(pins)
print()
print(result[0])
print("Pins tested: " + str(result[1]))


# Execute only if run as main.py or code.py
if __name__ == "__main__":
_main()