* Added keyboard option to menu. Shows a keyboard layout but does not type.
* Keyboard types into text box and wraps.
* send FreeText messages from the send submenu
- renamed `KEYBOARD` action to `FREE_TEXT` and moved its menu location
to the send submenu
- opening the FreeText applet from the menu keeps the menu open and
disabled the timeout
- the FreeText applet writes to inkhud->freetext
- the sending a canned message checks inkhud->freetext and if it isn't
empty, sends and clears the inkhud->freetext
* Text scrolls along with input
* handle free text message completion as an event
implements `handleFreeText` and `OnFreeText()` for system applets to
interface with the FreeText Applet
The FreeText Applet generates an `OnFreeText` event when completing a
message which is handled by the first system applet with the
`handleFreeText` flag set to true.
The Menu Applet now handles this event.
* call `onFreeText` whenever the FreeText Applet exits
allows the menu to consistently restart its auto-close timeout
* Add text cursor
* Change UI to remove the header and make text box longer
Keyboard displays captial letters for legibility
Keyboard types captial letters with long press
* center FreeText keys and draw symbolic buttons
Move input field and keyboard drawing to their own functions:
- `drawInputField()`
- `drawKeyboard()`
Store the keys in a 1-dimensional array
Implement a matching array, `keyWidths`, to set key widths relative to
the font size
* Add character limit and counter
* Fix softlock when hitting character limit
* Move text box as its own menu page
* rework FreeTextApplet into KeyboardApplet
- The Keyboard Applet renders an on-screen keyboard at the lower portion
of the screen.
- Calling `inkhud->openKeyboard()` sends all the user applets to the
background and resizes the first system applet with `handleFreeText` set
to True to fit above the on-screen keyboard
- `inkhud->closeKeyboard()` reverses this layout change
* Fix input box rendering and add character limit to menu free text
* remove FREE_TEXT menu page and use the FREE_TEXT menu action solely
* force update when changing the free text message
* reorganize KeyboardApplet
- add comments after each row of `key[]` and `keyWidths[]` to preserve
formatting
- The selected key is now set using the key index directly
- rowWidths are pre-calculated in the KeyboardApplet constructor
- removed `drawKeyboard()` and implemented `drawKeyLabel()`
* implement `Renderer::clearTile()` to clear the region below a tile
* add parameter to forceUpdate() for re-rendering the full screen
setting the `all` parameter to true in `inkhud->forceUpdate()` now
causes the full screen buffer to clear an re-render. This is helpful for
when sending applets to the background and the UI needs a clean canvas.
System Applets can now set the `alwaysRender` flag true which causes it
to re-render on every screen update. This is set to true in the Battery
Icon Applet.
* clean up tile clearing loops
* implement dirty rendering to let applets draw over their previous render
- `Applet::requestUpdate()` now has an optional flag to keep the old
canvas
- If honored, the renderer calls `render(true)` which runs
`onDirtyRender()` instead of `onRender()` for said applet
- The renderer will not call a dirty render if the full screen is
getting re-rendered
* simplify arithmetic in clearTile for better understanding
* combine Applet::onRender() and Applet::onDirtyRender() into Applet::onRender(bool full)
- add new `full` parameter to onRender() in every applet. This parameter
can be ignored by most applets.
- `Applet::requestUpdate()` has an optional flag that requests a full
render by default
* implement tile and partial rendering in KeyboardApplet
* add comment for drawKeyLabel()
* improve clarity of byte operations in clearTile()
* remove typo and commented code
* fix inaccurate comments
* add null check to openKeyboard() and closeKeyboard()
---------
Co-authored-by: zeropt <ferr0fluidmann@gmail.com>
Co-authored-by: HarukiToreda <116696711+HarukiToreda@users.noreply.github.com>
* InkHUD: Region Picker on initial setup
* Added Node Config menu with Lora Region Picker
* Role picker
* Preset Picker
* Timezone picker added
* Power save mode and bluetooth configs
* Config section Headers
* Channel Config
* Cleaning some behavior
* Add back to all Options
* Display config added
* Position Toggle added
* Network Config for ESP32
* Wifi details
* Reduce line spacing to fit more content
* Recent list with checkboxes
* Timezone labels easier to understand
* Trunk fix
* Added "Saving Changes" screen when reboot is needed
* Trunk fix
* Make Tips show after first boot if the region is Unset
* Added ResetDB and keep only favorite commands
* quick fix to joystick
* Trunk Fix
* Fix to tips to work with new joystick input
* Added ADC multiplier value display on power config
* added ADC calibration feature
* Fixed missing stray endiff
* GPS toggle now is aware if gps is present.
I thought git would be smart enough to understand all the whitespace changes but even with all the flags I know to make it ignore theses it still blows up if there are identical changes on both sides.
I have a solution but it require creating a new commit at the merge base for each conflicting PR and merging it into develop.
I don't think blowing up all PRs is worth for now, maybe if we can coordinate this for V3 let's say.
This reverts commit 0d11331d18.
* TwoButtonExtened mirrors TwoButton but added joystick functionality
* basic ui navigation with a joystick
settings->joystick.enabled setting added and SETTINGS_VERSION
incremented by one in InkHUD/Persistence.h
in seeed_wio_tracker_L1_eink/nicheGraphics.h enable joystick and
disable "Next Tile" menu item in
implement prevTile and prevApplet functions in
InkHUD/WindowManager.h,cpp and InkHUD/InkHUD.h,cpp
onStickCenterShort, onStickCenterLong, onStickUp, onStickDown,
onStickLeft, and onStickRight functions added to:
- InkHUD/InkHUD.h,cpp
- InkHUD/Events.h,cpp
- InkHUD/Applet.h
change navigation actions in InkHUD/Events.cpp events based on
whether the joystick is enabled or not
in seeed_wio_tracker_L1_eink/nicheGraphics.h connect joystick events to
the new joystick handler functions
* handle joystick input in NotificationApplet and TipsApplet
Both the joystick center short press and the user button short press can
be used to advance through the Tips applet.
dismiss notifications with any joystick input
* MenuApplet controls
allows menu navigation including a back button
* add AlignStickApplet for aligning the joystick with the screen
add joystick.aligned and joystick.alignment to InkHUD/Persistence.h for
storing alignment status and relative angle
create AlignStick applet that prompts the user for a joystick input and
rotates the controls to align with the screen
AlignStick applet is run after the tips applet if the joystick is
enabled and not aligned
add menu item for opening the AlignStick applet
* update tips applet with joystick controls
* format InkHUD additions
* fix stroke consistency when resizing joystick graphic
* tweak button tips for order consistency
* increase joystick debounce
* fix comments
* remove unnecessary '+'
* remap joystick controls to match standard inkHUD behavior
Input with a joystick now behaves as follows
User Button (joystick center):
- short press in applet -> opens menu
- long press in applet -> opens menu
- short press in menu -> selects
- long press in menu -> selects
Exit Button:
- short press in applet -> switches tile
- long press in applet -> nothing for now
- short press in menu -> closes menu
- long press in menu -> nothing for now
---------
Co-authored-by: scobert <scobert57@gmail.com>
Co-authored-by: HarukiToreda <116696711+HarukiToreda@users.noreply.github.com>
* chore: todo.txt
* chore: comments
* fix: no fast refresh on VME290
Reverts a line of code which was accidentally committed
* refactor: god class
Divide the behavior from the old WindowManager class into several subclasses which each have a clear role.
* refactor: cppcheck medium warnings
Enough to pass github CI for now
* refactor: updateType selection
* refactor: don't use a setter for the shared AppletFonts
* fix: update prioritization
forceUpdate calls weren't being prioritized
* refactor: remove unhelpful logging
getTimeString is used for parsing our own time, but also the timestamps of messages. The "one time only" log printing will likely fire in unhelpful situations.
* fix: " "
* refactor: get rid of types.h file for enums
* Keep that sneaky todo file out of commits