Do not purge undefined keys #3

Closed
opened 2018-07-25 22:48:30 +00:00 by Dennis · 0 comments
Owner

In the original repository and in our implementation so far, all keys that are not explicitly defined during a write operation are purged. So, if a user writes to pedal 0 without explicitly defining the values of pedal 1 and 2, the latter are purged.

We should fix this and add a separate del_key command.

E.g.

Situation before:

 ┌──────────────────────────────────────────────────────────────┐
 │                       Programmed Keys                        │
 ╞══════════════════════════════════════════════════════════════╡
 │         012          │
 ├──────────────────────────────────────────────────────────────┤
 │         A          │         B          │         C          │
 └──────────────────────────────────────────────────────────────┘

Command:

sudo ./footswitch-rs write -c wr_key -p 0 -v E

Situation after:

 ┌──────────────────────────────────────────────────────────────┐
 │                       Programmed Keys                        │
 ╞══════════════════════════════════════════════════════════════╡
 │         012          │
 ├──────────────────────────────────────────────────────────────┤
 │         E          │      < None >      │      < None >      │
 └──────────────────────────────────────────────────────────────┘
In the [original repository](https://github.com/rgerganov/footswitch) and in our implementation so far, all keys that are not explicitly defined during a write operation are purged. So, if a user writes to pedal 0 without explicitly defining the values of pedal 1 and 2, the latter are purged. We should fix this and add a separate `del_key` command. E.g. Situation before: ```bash ┌──────────────────────────────────────────────────────────────┐ │ Programmed Keys │ ╞══════════════════════════════════════════════════════════════╡ │ 0 │ 1 │ 2 │ ├──────────────────────────────────────────────────────────────┤ │ A │ B │ C │ └──────────────────────────────────────────────────────────────┘ ``` Command: ```bash sudo ./footswitch-rs write -c wr_key -p 0 -v E ``` Situation after: ```bash ┌──────────────────────────────────────────────────────────────┐ │ Programmed Keys │ ╞══════════════════════════════════════════════════════════════╡ │ 0 │ 1 │ 2 │ ├──────────────────────────────────────────────────────────────┤ │ E │ < None > │ < None > │ └──────────────────────────────────────────────────────────────┘ ```
Dennis self-assigned this 2018-07-25 22:48:30 +00:00
Dennis added the
feature
label 2018-07-25 22:48:30 +00:00
Sign in to join this conversation.
No Label
bug
feature
refactor
No Milestone
No Assignees
1 Participants
Notifications
Due Date
The due date is invalid or out of range. Please use the format 'yyyy-mm-dd'.

No due date set.

Dependencies

No dependencies set.

Reference: Dennis/footswitch-rs#3
No description provided.