diff --git a/DesktopApp/Application/MonitorBorderPixels.py b/DesktopApp/Application/MonitorBorderPixels.py index b82eb94..38122ce 100644 --- a/DesktopApp/Application/MonitorBorderPixels.py +++ b/DesktopApp/Application/MonitorBorderPixels.py @@ -122,14 +122,14 @@ def disable(self): self.enabled = False def get_top(self): if self.enabled: return self.pix_top - else: return [] + else: return np.array([]) def get_bottom(self): if self.enabled: return self.pix_bottom - else: return [] + else: return np.array([]) def get_left(self): if self.enabled: return self.pix_left - else: return [] + else: return np.array([]) def get_right(self): if self.enabled: return self.pix_right - else: return [] + else: return np.array([]) diff --git a/DesktopApp/Application/MonitorOrchestrator.py b/DesktopApp/Application/MonitorOrchestrator.py index c7656fc..fdb63d4 100644 --- a/DesktopApp/Application/MonitorOrchestrator.py +++ b/DesktopApp/Application/MonitorOrchestrator.py @@ -334,29 +334,35 @@ def get_pixel_stream(self): if (self.path_mode == PATH_ORDERS.CUSTOM) and (self.custom_order_edge_directions[i] == -1): if side == 'u': - rgbrow = np.flip(row) + rgbrow = self.flip_row(row) elif side == 'd': rgbrow = row elif side == 'l': rgbrow = row elif side == 'r': - rgbrow = np.flip(row) + rgbrow = self.flip_row(row) else: if side == 'u': rgbrow = row elif side == 'd': - rgbrow = np.flip(row) + rgbrow = self.flip_row(row) elif side == 'l': - rgbrow = np.flip(row) + rgbrow = self.flip_row(row) elif side == 'r': rgbrow = row # logic here for states, todo. doing it here allows for easy "skips" later if we want to disable some rows for colorval in rgbrow: - data.append(round(colorval[2])) - data.append(round(colorval[1])) data.append(round(colorval[0])) + data.append(round(colorval[1])) + data.append(round(colorval[2])) remove_info_tokens(data) data.append(MICROCHIP_STOP_BYTE) return data + + @classmethod + def flip_row(cls, row): + reshaped = row.reshape(-1, 3) + flip = np.flip(reshaped, axis=0) + return flip \ No newline at end of file