314 Commits

Author SHA1 Message Date
Maxim Devaev
df098bd075 win95 runtime switching 2021-08-15 20:16:48 +03:00
Maxim Devaev
9afa6efbe4 Merge branch 'servo' 2021-08-15 10:27:18 +03:00
Maxim Devaev
a340fc6053 minor servo fixes 2021-08-15 10:26:13 +03:00
Shantur Rathore
c644a9f6e1
Implement servo angles (#58)
/etc/kvmd/override.yaml
```
kvmd:
    gpio:
        drivers:
            servo1:
                type: servo
                chip: 0                  # PWM Chip Number
                period: 20000000         # Servo Motor SG90 Period in nano-seconds
                duty_cycle_min: 350000   # Servo Motor SG90 duty_cycle for -90 degrees
                duty_cycle_max: 2350000  # Servo Motor SG90 duty_cycle for +90 degrees
                angle_max: 90            # Servo Motor SG90 angle at duty_cycle_max
                angle_min: -90           # Servo Motor SG90 angle at duty_cycle_min
                angle_push: 45           # Servo Motor SG90 angle to push button
                angle_release: 20        # Servo Motor SG90 angle to release button
        scheme:
            short_press:
                driver: servo1
                pin: 0                       # Pin number is the PWM channel number on the PWM Chip
                mode: output
                switch: false
                pulse:
                    delay: 0.5
                    max_delay: 2
            long_press:
                driver: servo1
                pin: 0                       # Pin number is the PWM channel number on the PWM Chip
                mode: output
                switch: false
                pulse:
                    delay: 2
                    max_delay: 2
            extra_long_press:
                driver: servo1
                pin: 0                       # Pin number is the PWM channel number on the PWM Chip
                mode: output
                switch: false
                pulse:
                    delay: 10
                    max_delay: 20
        view:
            header:
                title: Controls
            table:
                - ["#Servo - Short Press", "short_press|Press"]
                - ["#Servo - Long Press", "long_press|Press"]
                - ["#Servo - Extra Long Press", "extra_long_press|Press"]
```
2021-08-15 10:15:53 +03:00
Maxim Devaev
ed5952f13e fixed pikvm/pikvm#159: workaround for windows 98 absolute mouse bug 2021-08-14 09:29:12 +03:00
Maxim Devaev
c6c4592dfb servo template 2021-08-14 03:08:28 +03:00
Maxim Devaev
7d89a54572 refactoring 2021-08-14 02:01:37 +03:00
Shantur Rathore
e4903c5184
Implement button push using servo motors controlled via pwm (#55)
1. Add to /boot/config.txt
```
dtoverlay=pwm
```

2. Create /etc/udev/rules.d/99-kvmd-pwm.rules
```
SUBSYSTEM=="pwm*", ACTION=="add", RUN+="/bin/chgrp -R kvmd /sys%p", RUN+="/bin/chmod -R g=u /sys%p"
SUBSYSTEM=="pwm*", ACTION=="change", ENV{TRIGGER}!="none", RUN+="/bin/chgrp -R kvmd /sys%p", RUN+="/bin/chmod -R g=u /sys%p"
```

3. Connect Servo motor like SG90 PWM connection to RPi GPIO18, +5V and GND to a 5V and GND pin on header

4. Add to /etc/kvmd/override.yaml
```
kvmd:
    gpio:
        drivers:
            servo1:
                type: pwm
                pwm_chip: 0                  # PWM Chip Number
                pwm_period: 20000000         # Servo Motor SG90 Period in nano-seconds
                duty_cycle_push: 1500000     # Servo Motor SG90 duty_cycle for pushing button
                duty_cycle_release: 1000000  # Servo Motor SG90 duty_cycle for releasing button
        scheme:
            short_press:
                driver: servo1
                pin: 0                       # Pin number is the PWM channel number on the PWM Chip
                mode: output
                switch: false
                pulse:
                    delay: 0.5
                    max_delay: 2
            long_press:
                driver: servo1
                pin: 0                       # Pin number is the PWM channel number on the PWM Chip
                mode: output
                switch: false
                pulse:
                    delay: 2
                    max_delay: 2
            extra_long_press:
                driver: servo1
                pin: 0                       # Pin number is the PWM channel number on the PWM Chip
                mode: output
                switch: false
                pulse:
                    delay: 10
                    max_delay: 20
        view:
            header:
                title: Controls
            table:
                - ["#Servo - Short Press", "short_press|Press"]
                - ["#Servo - Long Press", "long_press|Press"]
                - ["#Servo - Extra Long Press", "extra_long_press|Press"]
```
2021-08-14 01:14:22 +03:00
Maxim Devaev
6b07a80834 /msd/write_remote handle 2021-07-27 05:25:54 +03:00
Maxim Devaev
37060de4c3 dual mouse mode 2021-07-24 02:37:10 +03:00
Maxim Devaev
a33efcaef3 disabled instead of empty string 2021-07-24 02:09:18 +03:00
Maxim Devaev
189ff59379 refactoring 2021-07-23 20:52:47 +03:00
Maxim Devaev
cbc3a4ceef rewrite otg hid 2021-07-23 05:17:00 +03:00
Maxim Devaev
bc73e74161 fixed process waiting 2021-07-23 04:33:13 +03:00
Devaev Maxim
0c500aa0c9 moved wol to gpio 2021-07-17 01:57:01 +03:00
Devaev Maxim
7c68b6b406 lint fixes 2021-07-08 16:52:51 +03:00
Devaev Maxim
b5ab5699c4 pikvm/pikvm#321: server-side uploading counters 2021-06-08 03:12:24 +03:00
Devaev Maxim
640547d441 sync 2021-05-26 16:02:10 +03:00
Devaev Maxim
e480629724 speed up msd 2021-05-26 12:26:31 +03:00
Devaev Maxim
787e5ddbae reduced spi freq to 100k 2021-05-25 01:41:53 +03:00
Devaev Maxim
8bc36eac5d pikvm/pikvm#208: permanent image 2021-05-25 01:41:23 +03:00
Devaev Maxim
416e093967 tesmart state_poll=10 2021-05-19 01:05:13 +03:00
Devaev Maxim
9f1182dd1b async timeouts 2021-05-18 13:27:15 +03:00
David Shay
20c88b2170
fix socket timeout/zero based issues in tesmart (#49) 2021-05-18 13:11:05 +03:00
Devaev Maxim
2c7e71adef fixed bt hid 2021-05-17 09:30:13 +03:00
Devaev Maxim
61acd1c5e4 tesmart: check channel after switching 2021-05-16 06:16:14 +03:00
Devaev Maxim
8db0ab20e0 tesmart rewrite 2021-05-16 05:57:08 +03:00
David Shay
1fc8434f0a
Plugin support for TESMART switch - tesmart.py (#47) 2021-05-14 20:17:46 +03:00
Devaev Maxim
3566fbf37c new protocol for ezcoo usb3 2021-05-09 21:56:38 +03:00
Devaev Maxim
fd7d17ad4a tuned mcu timings 2021-04-22 03:26:09 +03:00
Devaev Maxim
f9fcc3c3eb https://bugs.archlinux.org/task/70438 2021-04-14 11:31:18 +03:00
Devaev Maxim
e39f3d46d8 refactoring 2021-04-09 06:28:58 +03:00
Devaev Maxim
1ca341069d ipmi gpio driver uses ipmitool 2021-04-09 06:20:51 +03:00
Devaev Maxim
6f60118320 async gpio plugins 2021-04-09 05:57:04 +03:00
Devaev Maxim
6cc161427a ipmi pseudo-gpio driver 2021-04-09 02:53:26 +03:00
Devaev Maxim
a66221a494 fixed mouse remap 2021-03-26 21:32:21 +03:00
Devaev Maxim
707512a586 reset mcu hid before the loop 2021-02-05 18:57:17 +03:00
Devaev Maxim
4d4fb69d2e refactoring 2021-01-23 07:00:49 +03:00
Devaev Maxim
c169f55204 update copy 2021-01-07 10:33:02 +03:00
Devaev Maxim
b48a0606b7 instant reset 2020-12-29 16:14:48 +03:00
Devaev Maxim
06040c8da9 relay msd fixes 2020-12-29 16:14:38 +03:00
Devaev Maxim
570dd04e29 otgbind pseudo-gpio plugin 2020-12-26 04:55:40 +03:00
Devaev Maxim
0adfe17f70 configurable gpio devices 2020-12-25 11:08:56 +03:00
Devaev Maxim
4447e49abb api refactoring 2020-12-25 08:35:02 +03:00
Devaev Maxim
edb967c633 hid set_connected api 2020-12-24 15:49:23 +03:00
Devaev Maxim
42475809fc refactoring 2020-12-21 01:59:49 +03:00
Devaev Maxim
a694cbd240 serial fixes 2020-12-03 06:13:13 +03:00
Devaev Maxim
7debaa6776 refactoring 2020-12-02 15:35:11 +03:00
Devaev Maxim
5bc868662a stop signals propagation in 3.9 2020-12-02 15:07:08 +03:00
Devaev Maxim
744fd19db9 hid busy flag 2020-12-02 04:52:05 +03:00