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

add literal str print in asyncmsg #2113

Merged
merged 4 commits into from
Apr 20, 2024

Conversation

zxkmm
Copy link
Contributor

@zxkmm zxkmm commented Apr 19, 2024

Continue work of #2111
previously:
asyncmsg can only handle string obj. for example

std::string xxx = "xxx";
asyncmsg(xxx);

but not

asyncmsg("xxx");

now:

std::string xxx = "xxx";
asyncmsg(xxx);

and

asyncmsg("xxx");

are both OK

i think all template should keep in header, but to satisfying this change, i have to moved all implementation into source file (to make it readable).

but since both header and source files are fake, so you need to include both of them, when using this class, which is not elegant but i don't have any other better way.

@zxkmm zxkmm marked this pull request as ready for review April 19, 2024 03:05
@gullradriel
Copy link
Member

Well. I think it would be better to have it in only one header, it will be easier to include without modifying the Makefile
That aside I'm all on for the update.

@zxkmm
Copy link
Contributor Author

zxkmm commented Apr 20, 2024

But in standard, the non template methods should be in cpp.
but if you don’t mind the standard I think I can move them together back in header.

@zxkmm
Copy link
Contributor Author

zxkmm commented Apr 20, 2024

@gullradriel i edited code per your requests

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.

Standard are made to be broken 💔
I would prefer all in a header, as it's going to be easier to use that way.
It's up to you to make a choice ^^

@zxkmm
Copy link
Contributor Author

zxkmm commented Apr 20, 2024

Thanks! I will choose your way until I find a better way.

@zxkmm zxkmm merged commit 03ca87b into portapack-mayhem:next Apr 20, 2024
3 checks passed
@zxkmm zxkmm deleted the str_literal_asyncmsg branch April 20, 2024 10:32
htotoo pushed a commit to htotoo/portapack-mayhem that referenced this pull request Apr 21, 2024
* add literal str print in asyncmsg

* remove debug things

* accept suggestion per gull

* fix documentary
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.

2 participants