summaryrefslogtreecommitdiff
path: root/scripts/slipro_rfactor2_villota.lua
blob: 791998396fbc6bc58002ef3e407e997aac18d160 (plain)
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
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
-- Custom Scripts Template SLIMax Manager Scripts v2.0
-- Copyright ©2012-2013  by Zappadoc - All Rights Reserved.
-- last change by Zappadoc - 2012-12-02


-- villota77's script for F1 2013 - v1.3.2

-- This script tries to imitate the way KERS and delta time info is shown in real F1 steering wheel displays
-- (1) KERS is shown in the left display as a pure number (in percentage)
-- (2) Delta time ("qualy time") with respect to best (or last) lap is shown in the right display
--     in  X.XX format (if it is positive - note there is not a "+" sign in SLIPro)
--     or -X.XX format (if it is negative)
-- (3) Delta-time info is refreshed every 1 second so you don't have digits flickering
-- (4) At the end of the lap, the right display will freeze and show deltatime (to best lap) during a number of seconds chosen in SLIMaxMng
---	   (General Options - LAPTIMEDISPLAYDELAY). Then it will resume showing real-time data.
 

-- ================================
-- CONSTANTS

-- ================================
-- additional lua extension module dll

-- ================================
-- additional scripts file
require "scripts/villota_scripts/villota_custom_functions"

-- ================================
-- custom globals

-- ================================
-- custom functions

-- ================================
-- custom events


function custom_initEvent(scriptfile)
	-- type your custom script initialization here
end

function custom_controlsEvent(deviceIdx, ctrlType, ctrlPos, value, funcIndex)
	-- type your script here (just before sending report to the device )
	return 2
end

function custom_deviceReport(devType)
	-- type your script here (just before sending report to the device )
	return 2
end

function custom_ospMethodEvent(idx)
	-- type your custom Optimal Shift Points (OSP) method here
	return 2
end

function custom_shiftLightsMethodEvent(idx)
	-- type your custom shiftlights method here
	return 2
end

function custom_shiftLightsBU0710Event(idx)
	-- type your custom shiftlights method for BU0710 device only here
	return 2
end

function custom_leftDigitsEvent(swFunction)
	-- type your custom functions here
	return 2
end

function custom_rightDigitsEvent(swFunction)
	-- call custom function
	return villota_custom_rightDigitsEvent(swFunction)
end


function custom_spdLmtMethodEvent(idx)
	-- type your custom speedlimiter method here
	return 2
end

function custom_gearEvent(gear)
	-- type your custom gear event script here
	return 2
end

function custom_enterSessionEvent(devType)
	-- type your custom script on session start, here
	return 2
end

function custom_exitSessionEvent(devType)
	-- type your custom script on session ending, here
	return 2
end

-- triggered from v2.2.4 of SMX2
function custom_ledEvent(ledIndex, ledFunction, ledState)
	-- type your custom script on session ending, here
	return 2
end