led-mapper icon indicating copy to clipboard operation
led-mapper copied to clipboard

CanvasRenderingContext2D Issue

Open ekampourakis opened this issue 3 years ago • 3 comments

While trying to use the web tool with a custom design, I came upon a bug. Using Firefox: Error: CanvasRenderingContext2D.getImageData: Argument 1 is not a finite value, so is out of range for long... Using Chrome: Error: Failed to execute 'getImageData' on 'CanvasRenderingContext2D': Value is not of type 'long'...

The issue is not present when selecting the physical order pattern but troubles the tool with all other patterns.

																												70	71																												98	99														
																										68	69			72	73																								96	97			100	101												
																									67							74																						95							102											
																							65	66									75	76																		93	94									103	104									
																					63	64													77	78														91	92													105	106							
																				62																	79												90																	107						
																		60	61																			80	81								88	89																			108	109				
																58	59																							82	83				86	87																							110	111		
															57																											84		85																											112	
														56																													252																													113
																																																																								
														55																													251																													114
														54																													250																													115
																																																																								
														53																													249																													116
														52																													248																													117
																																																																								
														51																													247																													118
														50																													246																													119
														49																													245																													120
														48																													244																													121
																																																																								
														47																													243																													122
														46																													242																													123
																																																																								
														45																													241																													124
														44																													240																													125
																																																																								
														43																													239																													126
														42	224																											238		253																											127	
												40	41			223	222																							236	237				254	255																							129	128		
											39							221	220																			234	235								256	257																			131	130				
									37	38										219																	233												258																	132						
							35	36													218	217													231	232														259	260													134	133							
						34																	216	215									229	230																		261	262									136	135									
				32	33																				214							228																						263							137											
		30	31																							213	212			226	227																								264	265			139	138												
	29																											211	225																												266	140														
28																													210																													141														
																																																																								
27																													209																													142														
26																													208																													143														
																																																																								
25																													207																													144														
24																													206																													145														
																																																																								
23																													205																													146														
22																													204																													147														
21																													203																													148														
20																													202																													149														
																																																																								
19																													201																													150														
18																													200																													151														
																																																																								
17																													199																													152														
16																													198																													153														
																																																																								
15																													197																													154														
	14																											183		182																											155															
		13	12																							185	184				181	180																							157	156																
				11	10																			187	186								179	178																			159	158																		
						9																	188												177																	160																				
							8	7													190	189														176	175													162	161																					
									6	5									192	191																		174	173									164	163																							
											4							193																						172							165																									
												3	2			195	194																								171	170			167	166																										
														1	196																												169	168																												

This is the design I'm trying to use.

ekampourakis avatar Jun 20 '22 09:06 ekampourakis

I also ran into this issue. I cant find any aberrant spaces or numbers. Any help would be useful.

I see that it has to do with how the coordinates are generated since the physcial order ignores the coordinates of the pixels.

AAGoodarzilab avatar Dec 15 '22 17:12 AAGoodarzilab

Nevermind. It turns out it was a simple issue. Simply make sure that there is a "0" LED as the start. The coordinates wont work as counting starts from "0" not "1".

AAGoodarzilab avatar Dec 15 '22 17:12 AAGoodarzilab

Sorry for the extremely delayed response. I've updated the instructions and added an alert if the layout index doesn't start with zero.

At some point, should be able to remap the indices automatically.

jasoncoon avatar Sep 22 '23 00:09 jasoncoon