UNIT V2 RESULT PAGE WORKING!



  • Hello lonely UnitV2 Users

    I figured out how to get the RESULTS!

    anyway, here is the code for 'server_core.py'

    @app.route('/other/', methods=['GET'])
    def func_result2():
         def genFuncResult2():
                item = pipe_result_rx_queue.get()
                pipe_result_rx_queue.task_done()
                item += bytes('|'.encode('ascii'))
                yield item
    return Response(genFuncResult2(), mimetype='application/json; boundary=func_result')**
    
    • PUT THAT CODE BELLOW THE @app.route('/') return response NOT INSIDE IT!
    • Remember after updating server_core.py, login to ssh and type 'reboot' and then wait! IMPORTANT THAT YOU WAIT!
      Once done, navigating to http://10.254.239.1/other/ will give you live information of the result every time you refresh the page.

    0_1630526307447_LOVE.jpg
    Also, this might help if you want more than 10 classes.

    1: SSH YOUR UNITV2
    2: NAV TO: /home/m5stack/payload/static/js/bin/
    EDIT 'online_classifier.js'
    change
    var classifier_online_type_count_limit = 10;
    to
    var classifier_online_type_count_limit = 41;
    #job done

    WANNA SEE THE GOD DAMN SCROLL BAR?
    1: SSH YOUR UNITV2
    2: NAV TO: /home/m5stack/payload/templates/
    change
    <div id="dynamic_func_area">
    to
    <div id="dynamic_func_area" style="overflow-y: scroll;">
    #job done

    Now you can see all your classes in the list!

    THANKS AND YOU'RE WELCOME M5 STACK