Adjust pulse timing for 7.4 V battery
This commit is contained in:
		
							parent
							
								
									2b341fd39f
								
							
						
					
					
						commit
						063dd4e1fd
					
				
					 1 changed files with 1 additions and 1 deletions
				
			
		| 
						 | 
				
			
			@ -493,7 +493,7 @@ void ADC1_2_IRQHandler(void)
 | 
			
		|||
        // Use the formula from section 3.6, adjusted for integer arithmetic and
 | 
			
		||||
        // a pulse with in microseconds
 | 
			
		||||
        PulseWidth = (285 * 178 - (int)(1000 * 178 * 0.003135) * (temp - 25))
 | 
			
		||||
            / (int)((5 * 1.4 - 2.9) * (5 * 1.4 - 2.9));
 | 
			
		||||
            / (int)((7.4 * 1.2 - 1.8) * (7.4 * 1.2 - 1.8));
 | 
			
		||||
 | 
			
		||||
        average_counter = 0;
 | 
			
		||||
        average = 0;
 | 
			
		||||
| 
						 | 
				
			
			
 | 
			
		|||
		Loading…
	
	Add table
		Add a link
		
	
		Reference in a new issue