Commit Graph

14 Commits

Author SHA1 Message Date
acf5729180 Fixed accidental committed move and fixed unused functions warnings
The accidental commit took place in
3558a4869a. Modules were not declared public which caused warnings in these modules
2018-07-26 18:20:53 +02:00
82abb70314 Forgot to add this file in commit 3558a4869a
This file is necessary to completely resolve issue #4
2018-07-26 17:17:27 +02:00
3558a4869a Added a module which nicely formats output to console. Fixes #4 2018-07-26 17:15:39 +02:00
551a97f359 This commit fully implements the read and write key function
This commit included quite a lot of changes:

* The application arguments are now divided in a read and a write part.
  This is realized through structopt subcommands.
* The read and write commands are recognized in a match construction
  which takes place after the device is opened.
* I refactored some of the error messages and added more error messages
* The pedals_read() function now is able to read 1, 2, or 3 pedals.
  Furthermore, the table is now redrawn with box drawing symbols.
* The write function is tested and successfully writes a key to the
  device
2018-07-26 00:35:25 +02:00
e792c72255 Removed obsolete function valid_key 2018-07-24 19:08:59 +02:00
ab4dea3b5e Application is able to write keys to footpedal 2018-07-24 19:03:35 +02:00
6bc9c31ed3 Removed bug from write operations
write_pedal() doesn't throw an error anymore. Did not verify yet if keys
are set successfully.
2018-07-24 00:17:45 +02:00
60aa8037fb Added short description about HidApi
In hidapi v0.4.1 it is not yet possible to store the HidDevice in a
struct. Although there is already a pull request to implement this, it is not yet merged.
2018-07-24 00:16:28 +02:00
7c7c99d52b Moved and split read function. Added write wrapper
The read function is now moved into the Pedals object and split up to
read_pedals() (which reads all pedals and prints the output) and
read_pedal() (which only reads one pedal).

Furthermore, the beginning of write_pedal() and write_pedals() is added.
2018-07-23 23:52:10 +02:00
b2a026e5e0 Started to work on pedal_operations
Created a seperate struct for the pedals. Write functions are still empty. Later, I'll move the read function to this struct too.
2018-07-18 14:26:11 +02:00
a8169788c5 Finished read_pedals() function and made listkeys an Option 2018-07-11 12:02:10 +02:00
ad132db462 Added print_key() and decode_byte() and fixed name of encode_byte() 2018-07-11 12:01:27 +02:00
5bf348ff7f Accidentally committed Rust's 'Hello World' example instead of main code of footswitch-rs. Fixed in this commit. 2018-07-10 23:41:58 +02:00
426dd13ca3 Initial commit. Application is able to initialize HID and read from it. Furthermore, it contains a lookup table for all keys 2018-07-10 23:36:20 +02:00