Closed tunguskar closed 5 months ago
Hi @tunguskar , no NinjaTerm can't do that at the moment, But I think it should!
Having a quick look, luckily I think this is possible via this API: https://developer.mozilla.org/en-US/docs/Web/API/SerialPort/getSignals
How do you think the user should be able to trigger a break? Is there a standard keyboard shortcut that does this? Or a UI button?
Hi @tunguskar , no NinjaTerm can't do that at the moment, But I think it should!
Having a quick look, luckily I think this is possible via this API: https://developer.mozilla.org/en-US/docs/Web/API/SerialPort/getSignals
How do you think the user should be able to trigger a break? Is there a standard keyboard shortcut that does this? Or a UI button?
Hi gbmhunter,
When you prepare a string to send in docklight it is done like this:
Docklight Scripting supports sending a "break" within a Send Sequence and detecting a "break" state using a Receive Sequence definition. "break" signals are added to your sequence definition by inserting a Function Character '%' (F10 key). A Docklight "break" signal has a minimum length of 15 * <nominal bit length>.
When you press F10 you get this:
Hterm does not offer this option.
TerraTerm has this:
But i dont like this.
Thanks @tunguskar , I'll look to add this in the next week or so.
Hi @tunguskar , I've added in the ability to send a break for 200ms by pressing Ctrl-Shift-B when the port is open and the terminal in focus (you should get a message saying "break sent".
It's currently in a deploy preview at https://deploy-preview-315--ninjaterm.netlify.app/
Are you able to test this for me please?
Hi @tunguskar , I've added in the ability to send a break for 200ms by pressing Ctrl-Shift-B when the port is open and the terminal in focus (you should get a message saying "break sent".
It's currently in a deploy preview at https://deploy-preview-315--ninjaterm.netlify.app/
Are you able to test this for me please?
Hi gbmhunter, you are fast. I will give it a try thanks for investigating
@tunguskar no worries! I actually also released that to production on the weekend, so https://ninjaterm.mbedded.ninja/ should have the change also :-)
sorry for delay. Did now a test. Works so far. Some comments:
When sending break I get this messages:
I get this orange message due to the fact that the target also sends back a break statement for a line ending. So it is not an error it ist ok from my side.
Maybe you can add this break statement via checkbox, that it is automatically added after payload.
Kind regards
@tunguskar thank for the feedback.
Thoughts on this?
@tunguskar thank for the feedback.
- You can change to hex view by clicking the settings icon on the left and then going to "RX Settings". Perhaps I should make it so the app automatically navigates to there is you click the "ASCII" text in the bottom toolbar.
- Ok, what I can do is add an checkbox which if selected, disables these snackbar warnings when breaks are received.
- I could make it so "break" is another "on enter" option. Then allow that settings to be used for hex too. That way, a break will be sent at the end of every line in the macro data text field.
Thoughts on this?
Thanks for all your effort
@tunguskar thank for the feedback.
- You can change to hex view by clicking the settings icon on the left and then going to "RX Settings". Perhaps I should make it so the app automatically navigates to there is you click the "ASCII" text in the bottom toolbar.
- Ok, what I can do is add an checkbox which if selected, disables these snackbar warnings when breaks are received.
- I could make it so "break" is another "on enter" option. Then allow that settings to be used for hex too. That way, a break will be sent at the end of every line in the macro data text field.
Thoughts on this?
- Ok found it. Your proposal would be great.
- Sounds also good
- Good proposal
Thanks for all your effort
in Docklight there is a character you can add to your payload. than the system automatically sends the break. If you want to automate stuff maybe this is the better way. But it would be just another option.
Ahh yup. This would cleanly work for hex as there are many characters which you could choose which are not valid hex. This wouldn't work so well in ASCII mode since you'd need to introduce an escape character or something similar. I'll have a think about this.
@tunguskar I have added the features and released a new production build. See if it works well for your use case! I ended up adding a separate option just for hex macros to send a break at the end of every line in the macro text box. The checkbox to hide "break received" warnings might be a little tricky to find, it's at the bottom of the RX Settings view.
Summary
I need the option to send a break statement. Is there an option?