re
This commit is contained in:
		
							parent
							
								
									10e71b6ccc
								
							
						
					
					
						commit
						66d5dba006
					
				
					 2 changed files with 3 additions and 3 deletions
				
			
		|  | @ -51,6 +51,6 @@ fn main() { | ||||||
|             //let mut lights = c_lock.write().unwrap();
 |             //let mut lights = c_lock.write().unwrap();
 | ||||||
|             p.execute(&mut lights, ticks); |             p.execute(&mut lights, ticks); | ||||||
|         } |         } | ||||||
|         ticks++; |         ticks+= 1; | ||||||
|     } |     } | ||||||
| } | } | ||||||
|  |  | ||||||
|  | @ -25,7 +25,7 @@ impl TryFrom<Vec<String>> for Box<dyn Pattern> { | ||||||
| 
 | 
 | ||||||
| struct Unit; | struct Unit; | ||||||
| impl Pattern for Unit { | impl Pattern for Unit { | ||||||
|     fn execute(&self, _values: &mut RwLockWriteGuard<'_, [RawColor; crate::LED_SIZE]>, ticks: u64) {} |     fn execute(&self, _values: &mut RwLockWriteGuard<'_, [RawColor; crate::LED_SIZE]>, _ticks: u64) {} | ||||||
|     fn parse(_args: Vec<String>) -> Result<Self, ParseError> { |     fn parse(_args: Vec<String>) -> Result<Self, ParseError> { | ||||||
|         Ok(Unit {}) |         Ok(Unit {}) | ||||||
|     } |     } | ||||||
|  | @ -38,7 +38,7 @@ struct Value { | ||||||
| } | } | ||||||
| 
 | 
 | ||||||
| impl Pattern for Value { | impl Pattern for Value { | ||||||
|     fn execute(&self, values: &mut RwLockWriteGuard<'_, [RawColor; crate::LED_SIZE]>, ticks: u64) { |     fn execute(&self, values: &mut RwLockWriteGuard<'_, [RawColor; crate::LED_SIZE]>, _ticks: u64) { | ||||||
|         for i in 0..crate::LED_SIZE { |         for i in 0..crate::LED_SIZE { | ||||||
|             let mut color: RawColor = (*values)[i]; |             let mut color: RawColor = (*values)[i]; | ||||||
|             if self.r.is_some() { |             if self.r.is_some() { | ||||||
|  |  | ||||||
		Loading…
	
	Add table
		Add a link
		
	
		Reference in a new issue