Hide keyboard shortcuts

Hot-keys on this page

r m x p   toggle line displays

j k   next/prev highlighted chunk

0   (zero) top of page

1   (one) first highlighted chunk

1

2

3

4

5

6

7

8

9

10

11

12

13

14

15

16

17

18

19

20

21

22

23

24

25

26

27

28

29

30

31

32

33

34

# SPDX-License-Identifier: MIT 

 

import logging 

import typing 

 

from abc import ABC, abstractmethod 

from typing import List 

 

if typing.TYPE_CHECKING: 

from ratbag_emu.device import Device # pragma: no cover 

 

 

class Actuator(ABC): 

''' 

Represents the firmware of the device 

 

Transforms actions based on physical properties 

''' 

def __init__(self, owner: 'Device'): 

self.__logger = logging.getLogger('ratbag-emu.actuator') 

 

self._owner = owner 

 

self._keys: List[str] = [] 

 

@property 

def keys(self): 

return self._keys 

 

@abstractmethod 

def transform(self, action): 

''' 

Transforms action 

'''