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

Let print! and prinln! write to "/ext/flipperzero-rs-stdout" with a Feature #172

Open
cptpiepmatz opened this issue Oct 11, 2024 · 3 comments
Labels
enhancement New feature or request

Comments

@cptpiepmatz
Copy link
Contributor

While developing a FAP that is using uart, I have a hard time checking the logs of my fap that just ran. Normally I would just open the logs via the wifi dev board but it uses uart for the logs but I need them for my fap. So I cannot really use them.

I saw that run-fap reads the contents of /ext/flipperzero-rs-stdout and displays them. Wouldn't it be neat to have print! and println! automatically write into that file so that run-fap would display that? It should be kept under a feature so that the final release build doesn't do that but for development this could be nice.

@dcoles dcoles added the enhancement New feature or request label Oct 13, 2024
@dcoles
Copy link
Collaborator

dcoles commented Oct 13, 2024

Hi @cptpiepmatz,

Thanks for creating this issue. To make sure I understand your request properly, the desired behaviour would be for the output from print! and println! to be shown when the app is launched using run-fap, correct?

Writing to /ext/flipperzero-rs-stdout was a workaround due to it not appearing to be possible to launch an app and get the log output, at least via the original CLI interface. Now there is a RPC-based mechanism, it would be worth seeing if this situation has changed.

@cptpiepmatz
Copy link
Contributor Author

Thanks for creating this issue. To make sure I understand your request properly, the desired behaviour would be for the output from print! and println! to be shown when the app is launched using run-fap, correct?

Yeah, it's pretty much that. run-fap is such a nice utility but when I cannot use the devboard to see logs, it gets annoying to check for logs. This shouldn't be on by default and by using a feature it would be convenient to turn it on.

@str4d
Copy link
Contributor

str4d commented Oct 13, 2024

Writing to /ext/flipperzero-rs-stdout was a workaround due to it not appearing to be possible to launch an app and get the log output, at least via the original CLI interface.

Indeed. And a significant downside is that you can't get the log output until after your FAP has finished running. That happens to be fine for test binaries (which is what the workaround was originally implemented for), and it might still be useful for debugging, but it's not ideal in general.

Now there is a RPC-based mechanism, it would be worth seeing if this situation has changed.

I started trying to migrate to the RPC-based mechanism in #104 but ran into some issues, IIRC in part due to the RPC mechanism not really being documented upstream and its interaction pattern being somewhat heavily tied to how QT works. Now that the Flipper Zero SDK has reached 1.0, I might revisit this and see if the situation has improved.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
Development

No branches or pull requests

3 participants