Resolve merge conflict in app.py and integrate vision system

This commit is contained in:
Tempest 2025-11-27 22:23:57 +07:00
commit 8aebeea6ee

View File

@ -21,6 +21,7 @@ DEBUG_MODE = True
DEVICE_NAME = "Pupilometer LED Billboard" DEVICE_NAME = "Pupilometer LED Billboard"
global ble_client global ble_client
global ble_characteristics global ble_characteristics
global ble_connection_status
ble_client = None ble_client = None
ble_characteristics = None ble_characteristics = None
ble_event_loop = None # Will be initialized if not in debug mode ble_event_loop = None # Will be initialized if not in debug mode
@ -73,6 +74,7 @@ SPIRAL_MAP_5x5 = create_spiral_map(5)
async def set_full_matrix_on_ble(colorSeries): async def set_full_matrix_on_ble(colorSeries):
global ble_client global ble_client
global ble_characteristics global ble_characteristics
global ble_connection_status
if not ble_client or not ble_client.is_connected: if not ble_client or not ble_client.is_connected:
print("BLE client not connected. Attempting to reconnect...") print("BLE client not connected. Attempting to reconnect...")
@ -86,17 +88,17 @@ async def set_full_matrix_on_ble(colorSeries):
# ===================================================================== # =====================================================================
# SNIPPET TO PATCH SWAPPED LAMP POSITIONS # SNIPPET TO PATCH SWAPPED LAMP POSITIONS
# ===================================================================== # =====================================================================
print("Patching lamp positions 3 <-> 7 and 12 <-> 24.") #print("Patching lamp positions 3 <-> 7 and 12 <-> 24.")
# Swap data for lamps at positions 3 and 7 # Swap data for lamps at positions 3 and 7
temp_color_3 = colorSeries[3] #temp_color_3 = colorSeries[3]
colorSeries[3] = colorSeries[7] #colorSeries[3] = colorSeries[7]
colorSeries[7] = temp_color_3 #colorSeries[7] = temp_color_3
# Swap data for lamps at positions 12 and 24 # Swap data for lamps at positions 12 and 24
temp_color_12 = colorSeries[12] #temp_color_12 = colorSeries[12]
colorSeries[12] = colorSeries[24] #colorSeries[12] = colorSeries[24]
colorSeries[24] = temp_color_12 #colorSeries[24] = temp_color_12
# ===================================================================== # =====================================================================
if DEBUG_MODE: if DEBUG_MODE: