Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

usb serial debug interface & usb serial async msg #2111

Merged
merged 12 commits into from
Apr 18, 2024

Conversation

zxkmm
Copy link
Contributor

@zxkmm zxkmm commented Apr 17, 2024

note

  • Don't use MayhemHub since it currently not support real time serial output
  • If you don't use this class linker will drop it so it won't use any space
  • so delete all debug things before you push your code to production

screenshots

Screenshot_20240417_195127

test code for reviewer

void FileManBaseView::push_dir(const fs::path& path) {
    std::string test_string = "test string:";
    UsbSerialAsyncmsg::asyncmsg(test_string);
    std::string test_string111 = "abcdefghi";
    UsbSerialAsyncmsg::asyncmsg(test_string111);

    std::string test_path_label = "test_path:";
    UsbSerialAsyncmsg::asyncmsg(test_path_label);
    UsbSerialAsyncmsg::asyncmsg(path);

    std::string test_vec_label = "test_vector:";
    UsbSerialAsyncmsg::asyncmsg(test_vec_label);

    std::vector<uint32_t> test_vector;
    test_vector.push_back(1);
    test_vector.push_back(2);
    test_vector.push_back(3);
    UsbSerialAsyncmsg::asyncmsg(test_vector);

    std::string test_num_label = "test_num:";
    UsbSerialAsyncmsg::asyncmsg(test_num_label);

    uint8_t test = 254;
    UsbSerialAsyncmsg::asyncmsg(test);

    if (path == parent_dir_path) {
        pop_dir();
    } else {
        current_path /= path;
        saved_index_stack.push_back(menu_view.highlighted_index());
        menu_view.set_highlighted(0);
        reload_current(true);
    }
}

@zxkmm zxkmm requested a review from gullradriel April 17, 2024 12:08
@zxkmm zxkmm marked this pull request as ready for review April 17, 2024 12:08
@zxkmm zxkmm force-pushed the simple_usb_serial_dbg_bridge branch from b69ddbd to 24bd55f Compare April 17, 2024 16:18
@zxkmm zxkmm requested a review from htotoo April 17, 2024 16:24
@zxkmm zxkmm marked this pull request as draft April 17, 2024 16:49
@zxkmm zxkmm marked this pull request as ready for review April 17, 2024 16:51
@zxkmm zxkmm changed the title usb serial debug interface usb serial debug interface & usb serial async msg Apr 17, 2024
@htotoo
Copy link
Member

htotoo commented Apr 17, 2024

The logics seems good to me, will be usable in other apps!
Thanks for your work!

@zxkmm
Copy link
Contributor Author

zxkmm commented Apr 17, 2024

@htotoo thank you for your idea and help!
I was originally only planning it to be used on debug :)
😂

@htotoo
Copy link
Member

htotoo commented Apr 17, 2024

Ohh, let's see what it will be used for ;)

Copy link
Member

@gullradriel gullradriel left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Look good to me.
May need some tests to see if it's stable on the long run.

@gullradriel
Copy link
Member

I'm not opening a convo for that SSTV deleted line ;-p

@zxkmm
Copy link
Contributor Author

zxkmm commented Apr 18, 2024

I'm not opening a convo for that SSTV deleted line ;-p

that file is a little bit weird that I have to delete that line to pass the clang-format check.
And my local clang-format always add that line.
Maybe some rule mismatch (but only exist in sstv related files) it’s weird.

@zxkmm zxkmm merged commit b2da21b into portapack-mayhem:next Apr 18, 2024
3 checks passed
@zxkmm zxkmm deleted the simple_usb_serial_dbg_bridge branch April 18, 2024 10:10
htotoo pushed a commit to htotoo/portapack-mayhem that referenced this pull request Apr 18, 2024
)

* add serial_debug

* not use OSS

* add path print

* add string print and vec

* clean up

* clean up

* format

* add an async blocking bool

* add an async blocking bool - comment

* protect the unexpected tx

* naming

* remove demo code
htotoo added a commit that referenced this pull request Apr 24, 2024
* BMP initial

* Add vscode debug configuration as a template (#2109)

* usb serial debug interface & usb serial async msg (#2111)

* add serial_debug

* not use OSS

* add path print

* add string print and vec

* clean up

* clean up

* format

* add an async blocking bool

* add an async blocking bool - comment

* protect the unexpected tx

* naming

* remove demo code

* fix bottom-up format, and add auto extend, ..

* bmp write

* Minor additions

* Minor

* overwrite on create

* Tmp

* Basic view - WIP

* debug

* add literal str print in asyncmsg (#2113)

* add literal str print in asyncmsg

* remove debug things

* accept suggestion per gull

* fix documentary

* Fix bug (#2114)

* Disable Back button during Touch Calibration (#2115)

* ADS1100 (#2116)

* WIP

* WIP

* WIP

* Corrected name

* WIP

* WIP

* WIP

* WIP

* Added new calc

* WIP

* WIP

* WIP

* WIP

* WIP

* WIP

* Added debug serial lines

* WIP

* Fixed issue

* Fixed calculation issue

* Added voltage to performance DFU menu

* Added padding function and added voltage to perf menu

* Clean up

* Refactor

* Fixed linting

* Hides voltage if PP does not conatin IC

* WIP showing battery %

* made the percentage a int

* Added % to header

* Removed test UI

* Removed comment

* Added fix for precision too large

* Added fix for precision too large

* Linting

* widget

* auto zoom

* remove debug

* move in screen

* fix math

* remove test code

* fix

* fix compiler warning

* BMP File viewer

* Full screen

* bg instead of noice

* add comment

* Handle some not supported formats.

---------

Co-authored-by: E.T <tamas@eisenberger.hu>
Co-authored-by: sommermorgentraum <24917424+zxkmm@users.noreply.github.com>
Co-authored-by: Mark Thompson <129641948+NotherNgineer@users.noreply.github.com>
Co-authored-by: jLynx <admin@jlynx.net>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

3 participants