mirror of
https://github.com/firestar5683/StarPilot.git
synced 2026-08-21 16:23:46 +08:00
ui: no int textures (#37649)
* no int textures * round qr code * unround firehose * ignore here
This commit is contained in:
+4
-4
@@ -218,7 +218,7 @@ def ui_thread(addr):
|
||||
# Update camera texture from numpy array
|
||||
img_rgba = cv2.cvtColor(img, cv2.COLOR_RGB2RGBA)
|
||||
rl.update_texture(camera_texture, rl.ffi.cast("void *", img_rgba.ctypes.data))
|
||||
rl.draw_texture(camera_texture, 0, 0, rl.WHITE)
|
||||
rl.draw_texture(camera_texture, 0, 0, rl.WHITE) # noqa: TID251
|
||||
|
||||
# display alerts
|
||||
rl.draw_text_ex(font, sm['selfdriveState'].alertText1, rl.Vector2(180, 150), 30, 0, rl.RED)
|
||||
@@ -227,15 +227,15 @@ def ui_thread(addr):
|
||||
# draw plots (texture is reused internally)
|
||||
plot_texture = draw_plots(plot_arr)
|
||||
if hor_mode:
|
||||
rl.draw_texture(plot_texture, 640 + 384, 0, rl.WHITE)
|
||||
rl.draw_texture(plot_texture, 640 + 384, 0, rl.WHITE) # noqa: TID251
|
||||
else:
|
||||
rl.draw_texture(plot_texture, 0, 600, rl.WHITE)
|
||||
rl.draw_texture(plot_texture, 0, 600, rl.WHITE) # noqa: TID251
|
||||
|
||||
# Convert lid_overlay to RGBA and update top_down texture
|
||||
# lid_overlay is (384, 960), need to transpose to (960, 384) for row-major RGBA buffer
|
||||
lid_rgba = palette[lid_overlay.T]
|
||||
rl.update_texture(top_down_texture, rl.ffi.cast("void *", np.ascontiguousarray(lid_rgba).ctypes.data))
|
||||
rl.draw_texture(top_down_texture, 640, 0, rl.WHITE)
|
||||
rl.draw_texture(top_down_texture, 640, 0, rl.WHITE) # noqa: TID251
|
||||
|
||||
SPACING = 25
|
||||
lines = [
|
||||
|
||||
Reference in New Issue
Block a user