Computer/Autonomous/server.py
def sendDiscreteTurnsCommand(serverSocket, data):
    """
    Takes the prediction index and sends appropriate command
    :param serverSocket:
    :param data:
    :return:
    """
    if(data == 0): #LEFT
        serverSocket.send("L;".encode()) #.encode converts to byte
    elif(data == 1): #RIGHT
        serverSocket.send("R;".encode())
    elif(data == 2): #FORWARD
        serverSocket.send("F;".encode())
    elif(data == 3): #BACK
        serverSocket.send("B;".encode())
    else:
        print("-----invalid command to send-----DATA={}".format(data))

    Takes the prediction index and sends appropriate command
    :param serverSocket:
    :param data:
    :return:
    
Takes the prediction index and sends appropriate command
Takes the prediction index and sends appropriate command
def sendDiscreteTurnsCommand(serverSocket, data):
    if(data == 0): 
        serverSocket.send("L;".encode()) 
    elif(data == 1): 
        serverSocket.send("R;".encode())
    elif(data == 2): 
        serverSocket.send("F;".encode())
    elif(data == 3): 
        serverSocket.send("B;".encode())
    else:
        print("-----invalid command to send-----DATA={}".format(data))
def sendDiscreteTurnsCommand ( serverSocket , data ) : if ( data == 0 ) : serverSocket . send ( "L;" . encode ( ) ) elif ( data == 1 ) : serverSocket . send ( "R;" . encode ( ) ) elif ( data == 2 ) : serverSocket . send ( "F;" . encode ( ) ) elif ( data == 3 ) : serverSocket . send ( "B;" . encode ( ) ) else : print ( "-----invalid command to send-----DATA={}" . format ( data ) )
Takes the prediction index and sends appropriate command
Takes the prediction index and sends appropriate command
"""
    Takes the prediction index and sends appropriate command
    :param serverSocket:
    :param data:
    :return:
    """ #LEFT #.encode converts to byte #RIGHT #FORWARD #BACK
None
serverSocket
None
data
None