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

framebuffer select argument #783

Merged
merged 1 commit into from Mar 29, 2019
Merged

framebuffer select argument #783

merged 1 commit into from Mar 29, 2019

Conversation

@catfact
Copy link
Collaborator

@catfact catfact commented Mar 28, 2019

added matron argument for specifying path to framebuffer used by cairo

defaults to /dev/fb0

change it like so:

matron -f/dev/fb1

have only tested on norns to make sure nothing is broken. @okyeron (or anyone else requiring this feature) - would be great to get feedback before we merge

addresses issue #749

@tehn
tehn approved these changes Mar 28, 2019
@okyeron
Copy link
Contributor

@okyeron okyeron commented Mar 29, 2019

Clarification - where would this argument be used?

matron.sh ? Attempting this:

#!/bin/bash
./build/ws-wrapper/ws-wrapper ws://*:5555 ./build/matron/matron -f/dev/fb1

lead to errors:

10.0.1.18 ~/norns $ ./matron.sh 
attempting to bind socket at url ws://*:5555
./build/matron/matron: invalid option -- 'f'
./build/matron/matron: invalid option -- '/'
./build/matron/matron: invalid option -- 'd'
@catfact
Copy link
Collaborator Author

@catfact catfact commented Mar 29, 2019

ah right, hm - i'm not sure if ws-wrapper currently passes arguments correctly since we've never used them before. that might require a fix.

can you try running matron with the argument, without ws-wrapper?

@okyeron
Copy link
Contributor

@okyeron okyeron commented Mar 29, 2019

Update - I screwed up and didn't have the updated args.c compiled. So I fixed that and now I can run matron.sh without errors... but no display activity (with either ./matron.sh or ~/norns/build/matron $ ./matron -f/dev/fb1).

@catfact
Copy link
Collaborator Author

@catfact catfact commented Mar 29, 2019

and you usually get display to work by hardcoding /dev/fb1 in screen.c?

@okyeron
Copy link
Contributor

@okyeron okyeron commented Mar 29, 2019

Gah - apologies. I'm doing it wrong. I didn't get all the changes. One sec and I'll report back

@catfact
Copy link
Collaborator Author

@catfact catfact commented Mar 29, 2019

things i have verified:

  • with no argument, the default /dev/fb0 is used and norns continues to work.
  • with -f/dev/fb1, screen.c uses the requested path. norns doesn't work cause this FB doesn't exist.

that's about all i can do from here 🤷‍♂️

@okyeron
Copy link
Contributor

@okyeron okyeron commented Mar 29, 2019

Sorry - i did something dumb and only grabbed the args.c changes, not the whole branch. 🤦‍♂️

Works like a champ!

Please approve!

@catfact catfact changed the title [WIP] framebuffer select argument framebuffer select argument Mar 29, 2019
@catfact catfact merged commit a1335db into dev Mar 29, 2019
@catfact catfact deleted the feature/framebuffer-select branch Mar 29, 2019
@okyeron
Copy link
Contributor

@okyeron okyeron commented Mar 29, 2019

Last question then - does this need to update anywhere aside from matron.sh?

norns-image/config/norns-matron.service perhaps?

@catfact
Copy link
Collaborator Author

@catfact catfact commented Mar 29, 2019

yeah, i guess that's where you would make the change persistent on your system. we don't need to change anything upstream to keep it working here.

so, i don't know that this is hugely more convenient than hardcoding and recompiling, but it's definitely a little cleaner.

we are gradually working towards adding platform options to the waf configure step, that's another possibility down the road.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Linked issues

Successfully merging this pull request may close these issues.

None yet

3 participants