@@ -15,7 +15,10 @@ local has_eink_full_support = android.isEinkFull()
15
15
local rk_full , rk_partial , rk_a2 , rk_auto = 1 , 2 , 3 , 4 -- luacheck: ignore
16
16
17
17
-- for *some* freescale devices
18
- local ntx_du , ntx_gc16 , ntx_auto , ntx_regal , ntx_full = 1 , 2 , 5 , 7 , 34 -- luacheck: ignore
18
+ local update_full , update_partial = 32 , 0 -- luacheck: ignore
19
+ local waveform_du , waveform_gc16 , waveform_regal = 1 , 2 , 7 -- luacheck: ignore
20
+ local partial_du , partial_gc16 , partial_regal = waveform_du , waveform_gc16 , waveform_regal -- luacheck: ignore
21
+ local full_gc16 , full_regal = update_full + waveform_gc16 , update_full + waveform_regal -- luacheck: ignore
19
22
20
23
-- update a region of the screen
21
24
local function updatePartial (mode , delay , x , y , w , h )
@@ -38,11 +41,12 @@ local function updateFull()
38
41
-- freescale ntx platform
39
42
if has_eink_screen and (eink_platform == " freescale" ) then
40
43
if has_eink_full_support then
41
- -- we handle the screen entirely. Add a delay before a full update.
42
- updatePartial (ntx_full , 50 )
44
+ -- we handle the screen entirely. No delay is needed
45
+ updatePartial (full_gc16 , 0 )
43
46
else
44
- -- we're racing against system driver, update without delay to avoid artifacts
45
- updatePartial (ntx_full , 0 )
47
+ -- we're racing against system driver. Let the system win and apply
48
+ -- a full update after it.
49
+ updatePartial (full_gc16 , 500 )
46
50
end
47
51
-- rockchip rk3x platform
48
52
elseif has_eink_screen and (eink_platform == " rockchip" ) then
@@ -115,35 +119,35 @@ end
115
119
function framebuffer :refreshPartialImp (x , y , w , h )
116
120
self :_updateWindow ()
117
121
if has_eink_full_support then
118
- updatePartial (ntx_auto , 0 , x , y , w , h )
122
+ updatePartial (partial_regal , 0 , x , y , w , h )
119
123
end
120
124
end
121
125
122
126
function framebuffer :refreshFlashPartialImp (x , y , w , h )
123
127
self :_updateWindow ()
124
128
if has_eink_full_support then
125
- updatePartial (ntx_gc16 , 0 , x , y , w , h )
129
+ updatePartial (full_regal , 0 , x , y , w , h )
126
130
end
127
131
end
128
132
129
133
function framebuffer :refreshUIImp (x , y , w , h )
130
134
self :_updateWindow ()
131
135
if has_eink_full_support then
132
- updatePartial (ntx_auto , 0 , x , y , w , h )
136
+ updatePartial (partial_regal , 0 , x , y , w , h )
133
137
end
134
138
end
135
139
136
140
function framebuffer :refreshFlashUIImp (x , y , w , h )
137
141
self :_updateWindow ()
138
142
if has_eink_full_support then
139
- updatePartial (ntx_gc16 , 0 , x , y , w , h )
143
+ updatePartial (full_regal , 0 , x , y , w , h )
140
144
end
141
145
end
142
146
143
147
function framebuffer :refreshFastImp (x , y , w , h )
144
148
self :_updateWindow ()
145
149
if has_eink_full_support then
146
- updatePartial (ntx_du , 0 , x , y , w , h )
150
+ updatePartial (partial_du , 0 , x , y , w , h )
147
151
end
148
152
end
149
153
0 commit comments