def convert_mode(in_text, str_len=0):
    arduino_settings = settings.get_arduino_settings()
    text = u''
    display_mode = arduino_settings.get('display_mode', 'Text')
    if display_mode == 'Ascii':
        for character in in_text:
            text += chr(character)
    elif display_mode == 'Hex':
        for (index, character) in enumerate(in_text):
            text += u'%02X ' % character
            if (index + str_len + 1) % 8 == 0:
                text += '\t'
            if (index + str_len + 1) % 16 == 0:
                text += '\n'
    else:
        text = in_text.decode('utf-8', 'replace')
    return text
dataset/ETHPy150Open Robot-Will/Stino/stino/pyarduino/base/serial_monitor.py/convert_mode/original