-
Notifications
You must be signed in to change notification settings - Fork 964
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
Adding support for Chatter keypad #4022
Adding support for Chatter keypad #4022
Conversation
s.migaud seems not to be a GitHub user. You need a GitHub account to be able to sign the CLA. If you have already a GitHub account, please add the email address used for this commit to your account. You have signed the CLA already but the status is still pending? Let us recheck it. |
Along with the code changes to implement the keyboard there need to be some documentation additions that detail the keyboard layout, operation and "known problems". |
Agree on layout/map. I'm fine with text entry like old phones and how the stock firmware works. Canned messages would be neat but regular entry would be great to have. |
Concerning the documentation, I agree it was necessary, here it is : meshtastic/meshtastic#1283 I'm not sure how mapping preregistered canned messages to some hotkeys would work but I feel like accessing preregistered messages is already fairly easy, the selection menu appears as soon as the UP or DOWN key is pressed. The layout is based on Chatter's keypad sticker so no surprises here, it's the same for V1 and V2. I included a picture in the documentation. Let me know if you think of anything that should be included in this MR |
(Writing the doc made me notice that for Chatter V2 owners, having the button register two different event each time it's pressed might cause issues, removing the USER_BUTTON mapping should prevent that) |
Decided to figure out how to build this and flashed a 2.0 Chatter. Is there a way perhaps to allow shift key + arrow to select recipient? Or, perhaps after starting text entry, the arrow keys change function to select node? |
I the destination field but couldn't manage to select it and change it. @eureekasigns , since you managed to build and flash your Chatter, can you just change line 92 of src/input/SerialKeyboard.cpp from |
Agree the shift is not intuitive for such a function, and I like the idea of one for each separate function. I will see if I can get some time in the next day or two to try the change in code, thank you! |
Had some time to test, and I think it's on the right track, but still unfortunately not able to select a node to send to. The key cycles between the nodes in the list, but when typing to send, it no longer selects a node as far as I can tell. |
@eureekasigns It's the same for me ! |
Maybe I did not understand correctly, but you have to switch
I changed my code for T-Beam to up and down key to select mode:
|
I am not sure it's fully supported, but I believe the T-Deck can select a node for private/direct message by scrolling the trackball left and right. That device is more capable obviously, but there are also struggles with the current firmware and there is a new UI being worked on for it. I think it's supported but not well documented or established. I think it's supported to send to a node, though. Perhaps the code in comment above is helpful in this idea? If it's possible it would be very nice, but if it's not, it's still nice to be able to reply to default channel on device. It would also be nice to select channel to reply to, but that may be a separate struggle with limited buttons. On the T-Deck, that is also quirky with some keyboard shortcuts I think. |
Yes, I've been looking at the code a bit more and it's definitely possible, I'll try to add that and complete the documentation as soon as I have a bit of free time. |
It's now possible to select a destination by pressing TAB (SHIFT then BACKSPACE) to focus on the destination field and then cycle through possible contacts with RIGHT. |
This works as expected! That's a good compromise on key combination. Easy enough to remember how to do, and I think even on the T-Deck it is less than ideal at the moment. For this device, it is a very nice feature to have! I would say it all works as it should on the Chatter so far and I am hopeful that this PR can move forward when they take a look at moving it into a release! Thank you for the work on this. It is very cool to see! |
One note on messages to nodes. So, it seems channel selection is separate from node selection. I think the T-Deck may have a similar limitation on channel selection but do not know for sure as I don't have one Something to be aware of. I'm not sure there's a great way to do channel selection on these devices, not only because of limited buttons but possibly general firmware limitations currently. Still very useful to be able to direct message a node! |
Regarding to TAB key, which, as stated, is really not ideal - did you consider my suggestion about using up and down key? These keys are not used when composing a message an they are logical option - UP key moves from message line up to channel/node select line and DOWN moves down to message line. IMHO this will work as good as on T-Deck. Or am I missing something? |
@eureekasigns , have you tried pressing twice on TAB ?
It seems TAB cycle through the destinations types channels, nodes and none (?!?!) |
@tomhanax Best thing would be to change key function based on the current context (typing messages, selecting preregistered canned messages, looking at the telemetry screens, ..) but it is not supported by the firmware at the moment and again, out of scope of this MR |
@Gnu-Bricoleur thank you for the explanation on selection. I had missed that. This does work, though with how "tab" works, it's a little strange. I also need to compile the latest update with shift key change. That'll be helpful. I think overall this is very good. It could never really be perfect with limited buttons, canned message support, multiple channels, and selecting a node. What we have now is functional and I'm thankful! |
3cb95d4
to
918bf35
Compare
I don't know what's the usual process to get merged but I'm happy with the state of this MR as is (and this one meshtastic/meshtastic#1283). (I have no idea how to fix the two CI fails however) |
I switched to branch, and done some testing. Great work @Gnu-Bricoleur, much appreciated, we have 4 chatters so now they are definitely usable :) However... now the bad news, I found some minor issues. I compare expected behavior with classic Nokia button cellphone, which, I believe, could be good example of how people expect things to work.
Hope this info is useful some way, I am not sure if you are willing to make some code corrections. Maybe I could help, but I am not good in C++, nor using github (only messaging like this), so I do not know exactly how to participate effectively. Anyway, If you have any idea how can I help, feel free to write! |
So, how to load the software onto the chatter 2? |
to load it you can download the device-install.bat file from the latest meshtastic drop the firmware file in the same directory and then install. |
Well, this isn't in the official release yet, so you'd need to build it first. Once you have it built, you can flash via the instructions here Note that the chatter also needs to have a pin on the CPU shorted to ground (AFIK) in order for PC to recognize it for flashing mode. Side note - I'm still struggling somewhat with TAB configuration, but I don't know if there's a better way. I guess canned messages were important to some but I wonder if there's a way to do shift+up instead of backspace. I know that would knock out canned messages being selected, though, so maybe it's just not the best way. One other item of note in the original thread that is very cool is larger fonts when typing. Here's to hoping this code gets pushed into the release soon as it is currently! |
The shorting of the pin that’s new whenever I run the device install.bat it works for me but you have to first go through the testing of the keys with the original software and reboot before it allows you to proceed. Out of curiosity, what are those pins? Oh I have the chatter 2 just to clarify |
That may work from stock to flash without pin shorting, IDK. I based my wiring off of this post - https://community.circuitmess.com/t/chatter-2-0-restore-firmware-install-micropython-stalls/5378 What I'm not sure about is what this refers to. When I try to flash via command line, it will usually go into a quick reboot, but not detect the right COM port to actually start flashing. In order to do that, it seems to want to be briefly shorted to ground. |
That first link actually makes a lot of sense there’s been times where the unit does lock up and it’s a pain to get it going again. Solder a small little button For it as well. Off to Amazon I go |
My 2 cents:
|
@tomhanax good point I didn’t think to just expand on the batteries was just thinking lipo. The interesting part is the system still assumes you are using 3 x aaa batteries and if you increase the voltage past 4.7ish volts the unit thinks it’s charging (through Meshtastic) |
There are some settings in the header file regarding this, like battery type and count, so if you care, this can be tweaked for specific case (battery type or combination). |
Maybe your PC, OS, or PlatformIO work better than mind, but I get the following when trying via PlatformIO
When trying via command prompt it will reboot the device but it will not select the "other" COM port (9, in my case) for upload without holding down the button I've got wired up to "short to ground." For batteries I've been using lithium ion with charge controller board. May experiment with the header, but I don't mind it being inaccurate. Here's to hoping this pull request gets added to the official version soon. |
Hi checking in as i updated to 2.4.0 (the latest release I believe) and noticed that the keyboard fix wasnt implemented into the official build yet. Is that something that is coming soon. I hate to see the chatter2 get too out of sync with the updates. |
Hi, |
Looks good to me. Sorry it took so long. This one slipped through the cracks on me 😓 |
Awesome thank y’all all. I look forward to seeing it. So much Potential these little suckers don’t want to see them put away. |
Awesome thank you as well for all the work you rock. |
im sorry if this is a stupid question as this way new to me. Now that it’s merged does that mean it would one day show up in the flasher.meshtastic site or do we still need to download the source code and compile ourselves. Not a big deal for the second option but would make life easier for others to not have to compile each revision. |
Personally I made 3 small changes to the sources because of these minor issues:
|
Agree with font size. It does cut off seeing more than some number of characters on screen but that's ok with me. Very glad this keyboard support is part of the official build going forward! @dogboyaa1 it means the compiled .bin file for the chatter2 will be updated with keyboard support in upcoming releases. Still have to flash via command line but don't have to build your own file. |
Were you able to apply the font changes on the very latest? 2.4.2 it seems to "double stack" the font if I try changes. From the original files it seems like a lot has changed, especially in screen.cpp. if I try the files linked in the other thread it won't build. |
No, I only tried with old 2.3.13. Anyway thanks for the heads up. |
I will try it when I get settled in in a few hours. So you think they implemented all the other changes as well like the fonts? |
@dogboyaa1 if you build the very latest version, 2.4.2, it includes keyboard support. The font changes are totally separate, and were mentioned on the other thread. It really should be a separate change from the keyboard effort. The changes to the 2 files, screen and canned messages, are different enough that the linked files in the other thread don't work as is. I don't know enough about the code to say why it doesn't work correctly. Thank you for confirming, @minutello |
Oh I get it I’m sorry I thought it meant there was a bug and I haven’t had time to pull the new version yet. Thank you. |
FYI it looks like 2.4.2 officially has keyboard support! For medium font size, the other thread has some further info on getting it working with the latest version. Can confirm it works. |
Thank you! Here the link to the medium font size patch. |
This PR add support for the Chatter keypad (see #2896)
I believe it supports all the feature we could want from this keypad (arrows, select, cancel, upper case, lower case, numbers, punctuation, ...)
I don't think there's any bug left.
I tried to respect as much as possible the style and conventions of the rest of the code and it should be fairly easy to extend my code to support other serial keypads or other layouts.
Please let me know if you have any suggestion to improve on this PR (changing some variable names, ...)
I have one question, all my tests were done on a Chatter V1 so I can confirm the Chatter V2 build is fully compatible with the Chatter V1 HW, shouldn't we rename the build to just Chatter ?