diff --git a/Applications/Hermes/hermesflaskexample_rx.py b/Applications/Hermes/hermesflaskexample_rx.py index 2ebd9072..43018c76 100755 --- a/Applications/Hermes/hermesflaskexample_rx.py +++ b/Applications/Hermes/hermesflaskexample_rx.py @@ -39,7 +39,7 @@ def main(): """ print "Receiver Started On: ", localcallsign.upper() + '-' + str(localnodeid) - while 1: + while True: # Sleep to release python process time.sleep(0.1) diff --git a/Applications/Hermes/hermesflaskexample_tx.py b/Applications/Hermes/hermesflaskexample_tx.py index 1b73c6bc..b6d57277 100755 --- a/Applications/Hermes/hermesflaskexample_tx.py +++ b/Applications/Hermes/hermesflaskexample_tx.py @@ -19,7 +19,7 @@ def main(): Main function of the transmit example of Hermes messaging application using Flask. This function loops continuously getting user input text to transmit to the Flask server for wireless transmission to the intended remote device. """ - while 1: + while True: message = raw_input("Enter Message: ") payload = {'localcallsign': localcallsign, 'localnodeid': localnodeid, 'destinationcallsign': destinationcallsign, 'destinationnodeid': destinationnodeid, 'data': message} diff --git a/Applications/deviceconfiguration/simpleconfig.py b/Applications/deviceconfiguration/simpleconfig.py index df139f83..d427e4e1 100755 --- a/Applications/deviceconfiguration/simpleconfig.py +++ b/Applications/deviceconfiguration/simpleconfig.py @@ -107,7 +107,7 @@ print "************************************" print "\nQuit with ctrl+c" - while(True): + while True: #Loop until user presses ctrl+c so they can read response time.sleep(1) pass diff --git a/Applications/simplemessage/A_Test_Rx.py b/Applications/simplemessage/A_Test_Rx.py index f56da480..882ee211 100644 --- a/Applications/simplemessage/A_Test_Rx.py +++ b/Applications/simplemessage/A_Test_Rx.py @@ -14,7 +14,7 @@ faraday_rx_msg_object = faraday_msg.MessageAppRx() # Loop continuously through the faraday experimental RF command message application RX routine -while 1: +while True: rx_message_dict = faraday_rx_msg_object.rxmsgloop(local_device_callsign, local_device_node_id, uart_service_port_application_number, GETWAIT_TIMEOUT) if rx_message_dict is not None: print '***************************************' diff --git a/Applications/simplemessage/B_Test_Tx_User_Input.py b/Applications/simplemessage/B_Test_Tx_User_Input.py index 4442a2c4..1b491785 100644 --- a/Applications/simplemessage/B_Test_Tx_User_Input.py +++ b/Applications/simplemessage/B_Test_Tx_User_Input.py @@ -20,7 +20,7 @@ message = '' # Loop while waiting for user input text to transmit -while 1: +while True: # Get user input text message = raw_input("Message: ") diff --git a/Debug/Proxy_DEBUG_RX.py b/Debug/Proxy_DEBUG_RX.py index e2896dad..4550230e 100755 --- a/Debug/Proxy_DEBUG_RX.py +++ b/Debug/Proxy_DEBUG_RX.py @@ -31,7 +31,7 @@ data = None #While loop to wait for reception of data packet from experimental message application -while(1): +while True: #Wait until there is new data on the message application port OR timout for i in range(0, 255, 1): try: diff --git a/Tutorials/Python_Developer_Tutorials/foundation/Commanding-Local/Proxy-Local-Commands-Tutorial.py b/Tutorials/Python_Developer_Tutorials/foundation/Commanding-Local/Proxy-Local-Commands-Tutorial.py index a3a3a25f..f5317009 100755 --- a/Tutorials/Python_Developer_Tutorials/foundation/Commanding-Local/Proxy-Local-Commands-Tutorial.py +++ b/Tutorials/Python_Developer_Tutorials/foundation/Commanding-Local/Proxy-Local-Commands-Tutorial.py @@ -109,7 +109,7 @@ print "\n************************************" print "\nQuit with ctrl+c" -while (True): +while True: # Loop until user presses ctrl+c so they can read response time.sleep(1) pass diff --git a/Tutorials/Python_Developer_Tutorials/foundation/Commanding-Remote-RF/Tutorial_Remote_Command.py b/Tutorials/Python_Developer_Tutorials/foundation/Commanding-Remote-RF/Tutorial_Remote_Command.py index 5a930d98..8065a18e 100755 --- a/Tutorials/Python_Developer_Tutorials/foundation/Commanding-Remote-RF/Tutorial_Remote_Command.py +++ b/Tutorials/Python_Developer_Tutorials/foundation/Commanding-Remote-RF/Tutorial_Remote_Command.py @@ -64,7 +64,7 @@ print "************************************" print "\nQuit with ctrl+c" -while(True): +while True: #Loop until user presses ctrl+c so they can read response time.sleep(1) pass diff --git a/Tutorials/Python_Developer_Tutorials/foundation/RF-Transmit-Receive-Packet/Readme.md b/Tutorials/Python_Developer_Tutorials/foundation/RF-Transmit-Receive-Packet/Readme.md index 0a41494b..6549cdfd 100644 --- a/Tutorials/Python_Developer_Tutorials/foundation/RF-Transmit-Receive-Packet/Readme.md +++ b/Tutorials/Python_Developer_Tutorials/foundation/RF-Transmit-Receive-Packet/Readme.md @@ -99,7 +99,7 @@ print "Receiver operating TCP Localhost port:", faraday_1.FLASK_PORT data = None #While loop to wait for reception of data packet from experimental message application -while(1): +while True: #Wait until there is new data on the message application port OR timout data = faraday_1.GETWait(local_device_callsign, local_device_node_id, PROXY_MESSAGE_EXPERIMENTAL_PORT, 2) diff --git a/Tutorials/Python_Developer_Tutorials/foundation/RF-Transmit-Receive-Packet/Tutorial_Exp_RF_Packet_RX.py b/Tutorials/Python_Developer_Tutorials/foundation/RF-Transmit-Receive-Packet/Tutorial_Exp_RF_Packet_RX.py index 30c7c620..488304ba 100755 --- a/Tutorials/Python_Developer_Tutorials/foundation/RF-Transmit-Receive-Packet/Tutorial_Exp_RF_Packet_RX.py +++ b/Tutorials/Python_Developer_Tutorials/foundation/RF-Transmit-Receive-Packet/Tutorial_Exp_RF_Packet_RX.py @@ -35,7 +35,7 @@ data = None #While loop to wait for reception of data packet from experimental message application -while(1): +while True: #Wait until there is new data on the message application port OR timout data = faraday_1.GETWait(local_device_callsign, local_device_node_id, PROXY_MESSAGE_EXPERIMENTAL_PORT, 2) diff --git a/Tutorials/Python_Developer_Tutorials/foundation/Simple_Text_Messaging/rx.py b/Tutorials/Python_Developer_Tutorials/foundation/Simple_Text_Messaging/rx.py index ec150c70..e1a308ff 100644 --- a/Tutorials/Python_Developer_Tutorials/foundation/Simple_Text_Messaging/rx.py +++ b/Tutorials/Python_Developer_Tutorials/foundation/Simple_Text_Messaging/rx.py @@ -20,7 +20,7 @@ print "Faraday Simple Messaging Receiver Started!" # Loop continuously through the faraday experimental RF command message application RX routine -while 1: +while True: rx_message_dict = faraday_rx_msg_object.rxmsgloop(local_device_callsign, local_device_node_id, rx_uart_service_port_application_number, GETWAIT_TIMEOUT) if rx_message_dict is not None: print '***************************************' diff --git a/Tutorials/Python_Developer_Tutorials/foundation/Simple_Text_Messaging/tx_user_input.py b/Tutorials/Python_Developer_Tutorials/foundation/Simple_Text_Messaging/tx_user_input.py index 70b8bb44..53e6c0b9 100644 --- a/Tutorials/Python_Developer_Tutorials/foundation/Simple_Text_Messaging/tx_user_input.py +++ b/Tutorials/Python_Developer_Tutorials/foundation/Simple_Text_Messaging/tx_user_input.py @@ -22,7 +22,7 @@ message = '' # Loop while waiting for user input text to transmit -while 1: +while True: # Get user input text message = raw_input("Message: ") diff --git a/Tutorials/Python_Developer_Tutorials/foundation/Simple_Text_Messaging_Creating_Objects/Readme.md b/Tutorials/Python_Developer_Tutorials/foundation/Simple_Text_Messaging_Creating_Objects/Readme.md index 4a5d9f8a..69ecbfe4 100644 --- a/Tutorials/Python_Developer_Tutorials/foundation/Simple_Text_Messaging_Creating_Objects/Readme.md +++ b/Tutorials/Python_Developer_Tutorials/foundation/Simple_Text_Messaging_Creating_Objects/Readme.md @@ -112,7 +112,7 @@ class ReceiveObject(threading.Thread): def run(self): # Loop continuously through the faraday experimental RF command message application RX routine - while 1: + while True: rx_message_dict = self.faraday_rx_msg_object.rxmsgloop(self.local_device_callsign, self.local_device_node_id, self.rx_uart_service_port_application_number, diff --git a/Tutorials/Python_Developer_Tutorials/foundation/Simple_Text_Messaging_Creating_Objects/message_application_example.py b/Tutorials/Python_Developer_Tutorials/foundation/Simple_Text_Messaging_Creating_Objects/message_application_example.py index 3237ad71..44ec046d 100644 --- a/Tutorials/Python_Developer_Tutorials/foundation/Simple_Text_Messaging_Creating_Objects/message_application_example.py +++ b/Tutorials/Python_Developer_Tutorials/foundation/Simple_Text_Messaging_Creating_Objects/message_application_example.py @@ -18,7 +18,7 @@ print "Unit 1 Queue Size:", unit_1.receive.getqueuesize() print "Unit 2 Queue Size:", unit_2.receive.getqueuesize() -while 1: +while True: print "\n *** Transmit Message ***" # Send user input from Unit #1 to Unit #2 user_input = raw_input("Enter message: ") diff --git a/Tutorials/Python_Developer_Tutorials/foundation/Simple_Text_Messaging_Creating_Objects/msg_object.py b/Tutorials/Python_Developer_Tutorials/foundation/Simple_Text_Messaging_Creating_Objects/msg_object.py index 766d4c37..8e741a7d 100644 --- a/Tutorials/Python_Developer_Tutorials/foundation/Simple_Text_Messaging_Creating_Objects/msg_object.py +++ b/Tutorials/Python_Developer_Tutorials/foundation/Simple_Text_Messaging_Creating_Objects/msg_object.py @@ -67,7 +67,7 @@ def run(self): the proxy interface. Received data packets are saved in to FIFO for later retrieval. """ # Loop continuously through the faraday experimental RF command message application RX routine - while 1: + while True: rx_message_dict = self.faraday_rx_msg_object.rxmsgloop(self.local_device_callsign, self.local_device_node_id, self.rx_uart_service_port_application_number, diff --git a/Tutorials/start/hello-world.md b/Tutorials/start/hello-world.md index bc56bb50..ed5ae729 100644 --- a/Tutorials/start/hello-world.md +++ b/Tutorials/start/hello-world.md @@ -38,7 +38,7 @@ from faraday.proxyio import faradaycommands faraday_1 = faradaybasicproxyio.proxyio() #default proxy port faraday_cmd = faradaycommands.faraday_commands() -while(1): +while True: #Turn LED 1 ON (GREEN) print "Turning LED 1 ON" command = faraday_cmd.CommandLocalGPIOLED1On() diff --git a/Tutorials/start/hello-world.py b/Tutorials/start/hello-world.py index 7d6ea914..cce1e597 100755 --- a/Tutorials/start/hello-world.py +++ b/Tutorials/start/hello-world.py @@ -18,7 +18,7 @@ callsign = 'REPLACEME' node_id = 0 -while(1): +while True: #Turn LED 1 ON (GREEN) print "Turning LED 1 ON" command = faraday_cmd.CommandLocalGPIOLED1On() diff --git a/faraday/aprs.py b/faraday/aprs.py index 96dfddfe..e3c1a153 100644 --- a/faraday/aprs.py +++ b/faraday/aprs.py @@ -44,7 +44,7 @@ def aprs_worker(config, sock): telemSequence = 0 # Start infinite loop to send station data to APRS-IS - while(True): + while True: # Query telemetry database for station data stations = getStations() stationData = getStationData(stations) @@ -628,7 +628,7 @@ def connectAPRSIS(): sleep(10) # Try to reconnect every 10 seconds return aprssock else: - while(True): + while True: logger.error("APRS-IS LOGIN ERROR!") sleep(1) diff --git a/faraday/hermes/hermesobject.py b/faraday/hermes/hermesobject.py index f5cc5c42..b2892f27 100644 --- a/faraday/hermes/hermesobject.py +++ b/faraday/hermes/hermesobject.py @@ -71,7 +71,7 @@ def run(self): the proxy interface. Received data packets are saved in to FIFO for later retrieval. """ # Loop continuously through the faraday experimental RF command message application RX routine - while 1: + while True: time.sleep(0.005) rx_message_dict = self.faraday_rx_msg_object.rxmsgloop(self.local_device_callsign, self.local_device_node_id, diff --git a/faraday/proxy.py b/faraday/proxy.py index 81c9c4ed..d7218d1c 100644 --- a/faraday/proxy.py +++ b/faraday/proxy.py @@ -58,7 +58,7 @@ def uart_worker(modem, getDicts, units, log): getDicts[modem['unit']] = {} # Loop through each unit checking for data, if True place into deque - while(1): + while True: # Place data into the FIFO coming from UART try: for port in modem['com'].RxPortListOpen():