-
Notifications
You must be signed in to change notification settings - Fork 6
/
FiatProtocol.py
73 lines (57 loc) · 2.53 KB
/
FiatProtocol.py
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
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
from bitstring import BitArray as ba
KNOWN_DEVICES = {
0x4000: 'Body Computer',
0x4005: 'Radio Unit',
0x4018: 'Parking Sensors',
0x4021: 'Blue&Me'
}
CANID_BODY_BUTTONS = 0x06354000
CANID_BODY_STATUS = 0x0E094000
CANID_BODY_PROXI = 0x1E114000
CANID_BODY_UNKNOWN1 = 0x06214000
CANID_BODY_UNKNOWN2 = 0x02214000
CANID_4003_PROXI = 0x1E114003
CANID_4003_CLOCK = 0x0C214003
CANID_RADIO_STATION = 0x0A194005
CANID_RADIO_AUDIOCH = 0x06314005
CANID_RADIO_FREQUENCY = 0x0A114005
CANID_BM_STATUS = 0x0E094021
CANID_BM_PROXI = 0x1E114021
CANID_BM_WATCHDOG = 0x0A014021
CANID_BM_AUDIO_CHANNEL = 0x06314021
CANID_BM_TRACK_TIME = 0x08094021
CANID_BM_TEXT_MESSAGE = 0x0A394021
MASK_BUTTON_VOLUME_UP = ba(hex='0x8000')
MASK_BUTTON_VOLUME_DN = ba(hex='0x4000')
MASK_BUTTON_WINDOWS = ba(hex='0x0040')
MASK_BUTTON_MUTE = ba(hex='0x2000')
MASK_BUTTON_UP = ba(hex='0x1000')
MASK_BUTTON_DOWN = ba(hex='0x0800')
MASK_BUTTON_MENU = ba(hex='0x0080')
MASK_BUTTON_SOURCE = ba(hex='0x0400')
MASK_DOOR_DRIVER = ba(hex='0x0004000000000000')
MASK_DOOR_PASSENGER = ba(hex='0x0008000000000000')
MASK_ARROW_LEFT = ba(hex='0x000040000000')
MASK_ARROW_RIGHT = ba(hex='0x000020000000')
MASK_AUDIOCH_MUTED = ba(hex='0x0000000000000080')
MASK_AUDIOCH_PHONE = ba(hex='0x0000000000000081')
MASK_AUDIOCH_VOICE = ba(hex='0x0000000000000082')
MASK_AUDIOCH_NAVIGATION = ba(hex='0x0000000000000083')
MASK_AUDIOCH_MEDIAPLAYER = ba(hex='0x0000000000000084')
MASK_AUDIOCH_LOCKED = ba(hex='0x0000000000000400')
MASK_RADIO_AUDIOCH_SHUTDOWN = ba(hex='0x0F00000000000000')
MASK_RADIO_AUDIOCH_RADIO_OFF= ba(hex='0x0200000000000000')
MASK_RADIO_AUDIOCH_RADIO_ON = ba(hex='0x0400000000000000')
MASK_RADIO_AUDIOCH_MPMUTE_O = ba(hex='0x0C00000000000000')
MASK_RADIO_AUDIOCH_MPMUTE_I = ba(hex='0x2000000000000000')
MASK_RADIO_AUDIOCH_MPPLAYING= ba(hex='0x0000000010000000')
MESSAGE_STATUS_WORKING = ba(hex='0x001E')
MESSAGE_BM_WATCHDOG1 = ba(hex='0x4000000000000002')
MESSAGE_BM_WATCHDOG2 = ba(hex='0x5000000000000002')
MESSAGE_BM_ZERO_SECONDS = ba(hex='0x0000487800000000')
MESSAGE_BM_START1_SECONDS= ba(hex='0x0000400000000000')
MESSAGE_BM_START2_SECONDS= ba(hex='0x0000800000000000')
MESSAGE_RADIO_FREQU_OFF = ba(hex='0x000000000800')
MESSAGE_RADIO_BM_PLAYING = ba(hex='0xE30000000200')
MESSAGE_RADIO_BM_MUTED = ba(hex='0xE30000000000')
MESSAGE_INSTPANEL_CLEAR = ba(hex='0x0000000000000000')