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

[Enhancement] Add macro to change baud #8

Open
chrstphrchvz opened this issue Mar 23, 2015 · 4 comments
Open

[Enhancement] Add macro to change baud #8

chrstphrchvz opened this issue Mar 23, 2015 · 4 comments

Comments

@chrstphrchvz
Copy link
Collaborator

An idea I had is to be able create a "turbo" button macro to set a faster baud for the selected device. This should be possible by adding a [baud <bps>] macro, though I might not get a chance to implement it myself anytime soon.
Does this sound like a good feature to add?

@hotwolf
Copy link
Owner

hotwolf commented Apr 8, 2015

Yes, why not. It's not hard to implement. I'll do it when I find a minute.

@chrstphrchvz
Copy link
Collaborator Author

I was able use the other macros as examples to get a working baud macro, and I've pushed this to a new "baudmacro" branch (f419e1b). It should be using the same subroutines as would be used if set from the menu, and I added a flag macro_allow_baud, although I'm not sure how these flags are used, so I added it where most other flags have been used. I also haven't added any comments or documentation.

This also isn't usable right away as part of a simple multiline macro, at least on OS X: using

baud 38400
[baud 38400]

will change the baud used by HSW12 POD, but before it has even sent the first line of the macro (the board receives garbage).

@hotwolf
Copy link
Owner

hotwolf commented May 15, 2015

Hello Christopher,
sorry for the late reply. I've started to implement the baud macro myself, but I'm not done with it, yet. The purpose of the flags is to prevent the macro from being evaluated where it doesn't make sense (for example during a refresh of the memory display). I'll have a look at your branch, as soon as I have a minute.

@chrstphrchvz
Copy link
Collaborator Author

I think one solution to prevent the baud from changing before any earlier text/commands in a macro finish sending might be to first use $self->{output_handle}->flush(), but I have yet to test if this effective for serial ports on Linux or OS X.

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

No branches or pull requests

2 participants