from collections import OrderedDict


def reset():
    """Resets state variables."""

    settings = OrderedDict()
    ser = None
    dstat_version = None
    firmware_version = None
    board_instance = None


def get_state():
    """
    Get state variables
    :return dict of pickleable state variables
    """
    return {'settings': settings,
            'dstat_version': dstat_version,
            'firmware_version': firmware_version,
            'board_instance': board_instance}


settings = OrderedDict()
ser = None
dstat_version = None
firmware_version = None
board_instance = None
