Skip to content

Commit 68de035

Browse files
committed
Added SamplePlugin.py
1 parent 560c877 commit 68de035

1 file changed

Lines changed: 18 additions & 0 deletions

File tree

plugins/samples/SamplePlugin.py

Lines changed: 18 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,18 @@
1+
import logging
2+
from JoycontrolPlugin import JoycontrolPlugin
3+
4+
logger = logging.getLogger(__name__)
5+
6+
class SamplePlugin(JoycontrolPlugin):
7+
async def run(self):
8+
logger.info('This is sample joycontrol plugin!')
9+
10+
logger.info(f'Plugin Options: {self.options}')
11+
12+
logger.info('Push the A Button')
13+
await self.button_push('a')
14+
await self.wait(0.3)
15+
16+
logger.info('Tilt the left stick down')
17+
await self.left_stick('down')
18+
await self.wait(0.3)

0 commit comments

Comments
 (0)