Skip to content

Commit

Permalink
Public repository update to latest version
Browse files Browse the repository at this point in the history
  • Loading branch information
pawel.lesniewski committed Oct 7, 2021
1 parent c3fe936 commit 33b9cf9
Show file tree
Hide file tree
Showing 32 changed files with 2,870 additions and 168 deletions.
18 changes: 16 additions & 2 deletions Controller.py
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@
#
# Author: Lesniewski Pawel
# Supported OS: Windows, Linux, Android
# Version 1.0.0
# Version 1.0.1

import time

Expand Down Expand Up @@ -255,6 +255,12 @@ def click(self, amount):
time.sleep(self.FAST_DELAY)
self._mouse(b'\x00\x00\x00')
time.sleep(self.FAST_DELAY)

def swipe_up(self, y):
for i in list(range(y)):
self._mouse(b'\x01\x00\xfe')
time.sleep(self.FAST_DELAY)
self._mouse(b'\x00\x00\x00')

def write_win_with_char(self, char):
self._write_report(chr(8) + self.NULL_CHAR*7)
Expand Down Expand Up @@ -322,7 +328,7 @@ def setFastDelay(self, _delay):
# Uncomment to test.

#c = Controller()

#c.swipe_up(200)


#c.write_char(c.TAB, 5, 0)
Expand All @@ -333,6 +339,14 @@ def setFastDelay(self, _delay):
#c.move_left(50)
#c.click(5)

#c.unlock(2)
#c.write(c.TAB, 1, 0)
#c.write(c.ENTER, 1, 0)
#c.sleep("xd", 2)

#c.write(c.TAB, 3, 0)
#c.write(c.ENTER, 1, 0)



#c.write_win_with_char(c.n)
Expand Down
41 changes: 25 additions & 16 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ Autoconfiguration bash script to set appropriate hid drivers and simple python c

> Works on: **Raspberry Pi OS 2021-03-04**.
>
> Author: **Pawel Lesniewski**.
> Author: **FAMOC - by Pawel Lesniewski**.
>
> Supported OS: **Windows, Linux, Android**.
>
Expand Down Expand Up @@ -49,50 +49,59 @@ Controller support moving and clicking the mouse, writing special keys, and writ
### Mouse


Moving mouse cursor by x pixels to **RIGHT**. </br>
**Params:**</br>
Moving mouse cursor by x pixels to **RIGHT**. <br>
**Params:**<br>
*x* - number of pixels to move.
```
move_right(int x)
```

</br>
<br>

Moving mouse cursor by x pixels to **LEFT**. </br>
**Params:**</br>
Moving mouse cursor by x pixels to **LEFT**. <br>
**Params:**<br>
*x* - number of pixels to move.
```
move_left(int x)
```

</br>
<br>

Moving mouse cursor by x pixels to **UP**. </br>
**Params:**</br>
Moving mouse cursor by x pixels to **UP**. <br>
**Params:**<br>
*x* - number of pixels to move.
```
move_up(int x)
```

</br>
<br>

Moving mouse cursor by x pixels to **DOWN**. </br>
**Params:**</br>
Moving mouse cursor by x pixels to **DOWN**. <br>
**Params:**<br>
*x* - number of pixels to move.
```
move_down(int x)
```

</br>
<br>

Clicking mouse left button for x times in actual position. </br>
**Params:**</br>
Swipe mouse (keeps mouse button pressed and then moves) to **UP** by x pixels. <br>
**Params:**<br>
*x* - number of pixels to swipe.
```
swipe_up(int x)
```

<br>

Clicking mouse left button for x times in actual position. <br>
**Params:**<br>
*x* - how many times mouse should click.
```
click(int x)
```

</br>
<br>

### Keyboard

Expand Down
23 changes: 0 additions & 23 deletions autoconfig/autoconfig.sh

This file was deleted.

40 changes: 0 additions & 40 deletions autoconfig/isticktoit_usb

This file was deleted.

35 changes: 0 additions & 35 deletions autoconfig/keyboard_test.py

This file was deleted.

29 changes: 0 additions & 29 deletions autoconfig/mouse_test.py

This file was deleted.

23 changes: 0 additions & 23 deletions autoconfig/rc.local

This file was deleted.

63 changes: 63 additions & 0 deletions scripts/A21s_KME_enroll.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,63 @@
from Controller import Controller

c = Controller()

c.unlock(1)

c.write(c.TAB, 1, 0)
c.write(c.ENTER, 1, 0)
c.sleep("Ladowanie jezykow", 3)

# jezyk polski
c.write(c.DOWN_ARROW, 40, 1)
c.write(c.ENTER, 1, 0)

c.write(c.DOWN_ARROW, 50, 1)
c.write(c.ENTER, 1, 0)
c.sleep("Ladowanie laczenia z siecia komorkowa", 3)

c.write(c.TAB, 3, 0)
c.write(c.ENTER, 1, 0)
c.sleep("Ladowanie licencji", 3)

c.write(c.TAB, 2, 0)
c.write(c.ENTER, 1, 0)
c.write(c.TAB, 15, 1)
c.write(c.ENTER, 1, 0)
c.sleep("Ladowanie wifi", 10)


#potwierdzenie knox cloud
c.write(c.ENTER, 1, 0)
c.sleep("Potwierdzenie, czekanie na wifi", 3)


c.write(c.UP_ARROW, 1, 0)
c.write(c.ENTER, 1, 0)
c.sleep("Czekanie na siec", 3)
c.sequence("1gp8ja3mw", 1)
c.write(c.ENTER, 1, 0)

c.sleep("Ladowanie po wczytaniu sieci", 10)
c.write(c.DOWN_ARROW, 25, 1)
c.write(c.ENTER, 1, 0)
c.sleep("Czekanie na sprawdzenie szczegolow i knox", 120)


c.unlock(1)
c.write(c.TAB, 4, 0)
c.write(c.ENTER, 1, 0)
c.sleep("Czekam na skonfigurowanie urzadzenia", 60)

c.unlock(1)
c.write(c.TAB, 1, 0)
c.write(c.ENTER, 1, 0)
c.sleep("Czekam na pulpit", 60)

# Akceptowanie licencji knox
c.unlock(2)
c.write(c.TAB, 2, 0)
c.write(c.ENTER, 1, 0)

c.sleep("FINISH", 1)

Loading

0 comments on commit 33b9cf9

Please sign in to comment.