|  |  | @ -14,7 +14,6 @@ CAR_BATTERY_CAPACITY_uWh = 30e6 | 
			
		
	
		
		
			
				
					
					|  |  |  | CAR_CHARGING_RATE_W = 45 |  |  |  | CAR_CHARGING_RATE_W = 45 | 
			
		
	
		
		
			
				
					
					|  |  |  | 
 |  |  |  | 
 | 
			
		
	
		
		
			
				
					
					|  |  |  | VBATT_PAUSE_CHARGING = 11.8           # Lower limit on the LPF car battery voltage |  |  |  | VBATT_PAUSE_CHARGING = 11.8           # Lower limit on the LPF car battery voltage | 
			
		
	
		
		
			
				
					
					|  |  |  | VBATT_INSTANT_PAUSE_CHARGING = 7.0    # Lower limit on the instant car battery voltage measurements to avoid triggering on instant power loss |  |  |  |  | 
			
		
	
		
		
			
				
					
					|  |  |  | MAX_TIME_OFFROAD_S = 30*3600 |  |  |  | MAX_TIME_OFFROAD_S = 30*3600 | 
			
		
	
		
		
			
				
					
					|  |  |  | MIN_ON_TIME_S = 3600 |  |  |  | MIN_ON_TIME_S = 3600 | 
			
		
	
		
		
			
				
					
					|  |  |  | DELAY_SHUTDOWN_TIME_S = 300 # Wait at least DELAY_SHUTDOWN_TIME_S seconds after offroad_time to shutdown. |  |  |  | DELAY_SHUTDOWN_TIME_S = 300 # Wait at least DELAY_SHUTDOWN_TIME_S seconds after offroad_time to shutdown. | 
			
		
	
	
		
		
			
				
					|  |  | @ -117,7 +116,6 @@ class PowerMonitoring: | 
			
		
	
		
		
			
				
					
					|  |  |  |     should_shutdown = False |  |  |  |     should_shutdown = False | 
			
		
	
		
		
			
				
					
					|  |  |  |     offroad_time = (now - offroad_timestamp) |  |  |  |     offroad_time = (now - offroad_timestamp) | 
			
		
	
		
		
			
				
					
					|  |  |  |     low_voltage_shutdown = (self.car_voltage_mV < (VBATT_PAUSE_CHARGING * 1e3) and |  |  |  |     low_voltage_shutdown = (self.car_voltage_mV < (VBATT_PAUSE_CHARGING * 1e3) and | 
			
		
	
		
		
			
				
					
					|  |  |  |                             self.car_voltage_instant_mV > (VBATT_INSTANT_PAUSE_CHARGING * 1e3) and |  |  |  |  | 
			
		
	
		
		
			
				
					
					|  |  |  |                             offroad_time > VOLTAGE_SHUTDOWN_MIN_OFFROAD_TIME_S) |  |  |  |                             offroad_time > VOLTAGE_SHUTDOWN_MIN_OFFROAD_TIME_S) | 
			
		
	
		
		
			
				
					
					|  |  |  |     should_shutdown |= offroad_time > MAX_TIME_OFFROAD_S |  |  |  |     should_shutdown |= offroad_time > MAX_TIME_OFFROAD_S | 
			
		
	
		
		
			
				
					
					|  |  |  |     should_shutdown |= low_voltage_shutdown |  |  |  |     should_shutdown |= low_voltage_shutdown | 
			
		
	
	
		
		
			
				
					|  |  | 
 |