src/server/server.py
def emit_vrx_list(*args, **params):
    ''' get list of connected VRx devices '''
    if vrx_controller:
        # if vrx_controller.has_connection:
            vrx_list = {}
            for vrx in vrx_controller.rx_data:
                vrx_list[vrx] = vrx_controller.rx_data[vrx]

            emit_payload = {
                'enabled': True,
                'connection': True,
                'vrx': vrx_list
            }
        # else:
            # emit_payload = {
            #     'enabled': True,
            #     'connection': False,
            # }
    else:
        emit_payload = {
            'enabled': False,
            'connection': False
        }

    if ('nobroadcast' in params):
        emit('vrx_list', emit_payload)
    else:
        SOCKET_IO.emit('vrx_list', emit_payload)
 get list of connected VRx devices 
get list of connected VRx devices
get list of connected VRx devices
def emit_vrx_list(*args, **params):
    if vrx_controller:
            vrx_list = {}
            for vrx in vrx_controller.rx_data:
                vrx_list[vrx] = vrx_controller.rx_data[vrx]
            emit_payload = {
                'enabled': True,
                'connection': True,
                'vrx': vrx_list
            }
    else:
        emit_payload = {
            'enabled': False,
            'connection': False
        }
    if ('nobroadcast' in params):
        emit('vrx_list', emit_payload)
    else:
        SOCKET_IO.emit('vrx_list', emit_payload)
def emit_vrx_list ( * args , ** params ) : if vrx_controller : vrx_list = { } for vrx in vrx_controller . rx_data : vrx_list [ vrx ] = vrx_controller . rx_data [ vrx ] emit_payload = { 'enabled' : True , 'connection' : True , 'vrx' : vrx_list } else : emit_payload = { 'enabled' : False , 'connection' : False } if ( 'nobroadcast' in params ) : emit ( 'vrx_list' , emit_payload ) else : SOCKET_IO . emit ( 'vrx_list' , emit_payload )
get list of connected VRx devices
get list of connected VRx devices
''' get list of connected VRx devices ''' # if vrx_controller.has_connection: # else: # emit_payload = { #     'enabled': True, #     'connection': False, # }