logo elektroda
logo elektroda
X
logo elektroda

Web App Flash Tab: Inconsistent Status Messages for Tuya GPIO and Custom Dump Buttons

divadiow 129 5
ADVERTISEMENT
  • Helpful post
    #1 21800096
    divadiow
    Level 37  
    Couldn't find an appropriate thread to hijack.

    flash tab in the web app currently says

    Code: Text
    Log in, to see the code

    when choosing Download Tuya GPIO Config. Which is not correct.

    and Download Custom doesn't give a "..ready!" log like full and tuya buttons do when complete

    Screenshot of a flash memory dump interface with progress output

    Full dump button is correct and says full is complete at the end

    Screenshot of flash memory reading interface with Full dump ready! message

    I've played with flash.vue and I hope this is a small worthy improvement. It seems OK in testing

    Screenshot of interface with message indicating Tuya GPIO config read complete
    Custom data download status showing offset 0 and length 200
    Screenshot of a tool interface for reading and downloading 2MB flash memory

    https://github.com/OpenBekenIOT/webapp/pull/249

    Added after 8 [minutes]:

    tweaked again so download buttons give "downloading..." message instead of "reading.."


    Screenshot of a tool interface downloading data from Tuya and Beken chips.

    Added after 1 [minutes]:

    read buttons continue to say "reading.."


    Interface with options to read and download device configuration
  • ADVERTISEMENT
  • #2 21800819
    p.kaczmarek2
    Moderator Smart Home
    good for a start, but for perfection, I'd suggest getting this code (which appears twice in two versions)

    
    
                this.fullDumpFlashStart = 0;
                this.fullDumpFlashSize = 2097152;
                this.fullDumpStyle = "xyz";
                this.doFlashDumpInternal();
    

    and putting it inside the shared function (use function arguments), currently called:
    
                this.setDumpJob("Tuya GPIO config", "TuyaConfig");
    

    I would rename setDumpJob to startDumpJob and it would be perfect.

    To be clear - it's not your fault, as the duplication was already in code (probably I was lazy), but if you are improving with LLM, then it could be done very easily as well.
    Helpful post? Buy me a coffee.
  • ADVERTISEMENT
  • #3 21800824
    divadiow
    Level 37  
    thank you. I will adjust asap!
  • ADVERTISEMENT
  • ADVERTISEMENT
  • #5 21801475
    p.kaczmarek2
    Moderator Smart Home
    Way better, I will merge it now, in future we may think about removing one string name, unless all 3 are used?
    
                this.startDumpJob("full 2MB dump", "FullDump", 0, 2097152, "QIO");
    

    Also... This is still more or less Beken only, or can it download flash for other platforms? I don't remember if and how flash read is implemented
    Helpful post? Buy me a coffee.
ADVERTISEMENT