Closed ShishkinDmitriy closed 2 weeks ago
Had to comment test:
// unittest(no_text_off_on_for_item_input) {
// assertNull((static_cast<ItemInput*>(mainMenu[ITEM_INPUT_INDEX]))->getTextOn());
// assertNull((static_cast<ItemInput*>(mainMenu[ITEM_INPUT_INDEX]))->getTextOff());
// }
Because base class MenuItem
has no that method, only specific ItemInput
class has.
⚠️ Found an issue while testing InputRotary
Example, I believe CharsetInput
is also affected.
https://github.com/user-attachments/assets/eb2f6760-fc6a-4d2e-9f4f-44369249af7e
master
,https://github.com/user-attachments/assets/0ad7573e-669b-4a72-af88-e024a2fdb4ab
Please investigate this. [Tip: Check your drawChar function it shouldn't update the blinker position]
What a great review) Thanks. I will fix it.
Regarding charset input.. I think it should be one more implementation of MenuItem
let's say ItemCharsetInput
.
If ItemIniput
listen for left
, right
, type
, backspace
.
The ItemCharsetInput
should listen left
, right
, up
, down
, backspace
.
Then method drawChar
will be eliminated - it was hard for me to understand the difference between type
and drawChar
initially.
Ok, I have added ItemInputCharset
, so it required some changes in SimpleNavConfig
In last commit I have added ItemInputCharsetSimple
(name can be better.. tried to emphasize that only left/right dimensions are available) - implementation of charset input where need to enter
to start select char and instead of up
and down
actions right
and left
are used, so it's implementation for Rotary encoder.
Hey @ShishkinDmitriy, while reviewing your PR, I'd suggest the following code changes:
You can also review and apply these suggestions locally on your machine.
Initial move, main changes are here. I tried to remove unneccessaty changes, had to add
setBacklight
method because of example.