|  |  | @ -1,14 +1,15 @@ | 
			
		
	
		
		
			
				
					
					|  |  |  | import json |  |  |  | import json | 
			
		
	
		
		
			
				
					
					|  |  |  |  |  |  |  | import math | 
			
		
	
		
		
			
				
					
					|  |  |  | import os |  |  |  | import os | 
			
		
	
		
		
			
				
					
					|  |  |  | import subprocess |  |  |  | import subprocess | 
			
		
	
		
		
			
				
					
					|  |  |  | from functools import cached_property |  |  |  |  | 
			
		
	
		
		
			
				
					
					|  |  |  | from enum import IntEnum |  |  |  | from enum import IntEnum | 
			
		
	
		
		
			
				
					
					|  |  |  |  |  |  |  | from functools import cached_property | 
			
		
	
		
		
			
				
					
					|  |  |  | from pathlib import Path |  |  |  | from pathlib import Path | 
			
		
	
		
		
			
				
					
					|  |  |  | 
 |  |  |  | 
 | 
			
		
	
		
		
			
				
					
					|  |  |  | from cereal import log |  |  |  | from cereal import log | 
			
		
	
		
		
			
				
					
					|  |  |  | from selfdrive.hardware.base import HardwareBase, ThermalConfig |  |  |  | from selfdrive.hardware.base import HardwareBase, ThermalConfig | 
			
		
	
		
		
			
				
					
					|  |  |  | from selfdrive.hardware.tici.amplifier import Amplifier |  |  |  |  | 
			
		
	
		
		
			
				
					
					|  |  |  | from selfdrive.hardware.tici import iwlist |  |  |  | from selfdrive.hardware.tici import iwlist | 
			
		
	
		
		
			
				
					
					|  |  |  |  |  |  |  | from selfdrive.hardware.tici.amplifier import Amplifier | 
			
		
	
		
		
			
				
					
					|  |  |  | 
 |  |  |  | 
 | 
			
		
	
		
		
			
				
					
					|  |  |  | NM = 'org.freedesktop.NetworkManager' |  |  |  | NM = 'org.freedesktop.NetworkManager' | 
			
		
	
		
		
			
				
					
					|  |  |  | NM_CON_ACT = NM + '.Connection.Active' |  |  |  | NM_CON_ACT = NM + '.Connection.Active' | 
			
		
	
	
		
		
			
				
					|  |  | @ -158,8 +159,8 @@ class Tici(HardwareBase): | 
			
		
	
		
		
			
				
					
					|  |  |  |   def get_network_info(self): |  |  |  |   def get_network_info(self): | 
			
		
	
		
		
			
				
					
					|  |  |  |     modem = self.get_modem() |  |  |  |     modem = self.get_modem() | 
			
		
	
		
		
			
				
					
					|  |  |  |     try: |  |  |  |     try: | 
			
		
	
		
		
			
				
					
					|  |  |  |       info = modem.Command("AT+QNWINFO", int(TIMEOUT * 1000), dbus_interface=MM_MODEM, timeout=TIMEOUT) |  |  |  |       info = modem.Command("AT+QNWINFO", math.ceil(TIMEOUT), dbus_interface=MM_MODEM, timeout=TIMEOUT) | 
			
				
				
			
		
	
		
		
			
				
					
					|  |  |  |       extra = modem.Command('AT+QENG="servingcell"', int(TIMEOUT * 1000), dbus_interface=MM_MODEM, timeout=TIMEOUT) |  |  |  |       extra = modem.Command('AT+QENG="servingcell"', math.ceil(TIMEOUT), dbus_interface=MM_MODEM, timeout=TIMEOUT) | 
			
				
				
			
		
	
		
		
	
		
		
	
		
		
			
				
					
					|  |  |  |       state = modem.Get(MM_MODEM, 'State', dbus_interface=DBUS_PROPS, timeout=TIMEOUT) |  |  |  |       state = modem.Get(MM_MODEM, 'State', dbus_interface=DBUS_PROPS, timeout=TIMEOUT) | 
			
		
	
		
		
			
				
					
					|  |  |  |     except Exception: |  |  |  |     except Exception: | 
			
		
	
		
		
			
				
					
					|  |  |  |       return None |  |  |  |       return None | 
			
		
	
	
		
		
			
				
					|  |  | @ -225,10 +226,10 @@ class Tici(HardwareBase): | 
			
		
	
		
		
			
				
					
					|  |  |  |       return None |  |  |  |       return None | 
			
		
	
		
		
			
				
					
					|  |  |  | 
 |  |  |  | 
 | 
			
		
	
		
		
			
				
					
					|  |  |  |   def get_modem_temperatures(self): |  |  |  |   def get_modem_temperatures(self): | 
			
		
	
		
		
			
				
					
					|  |  |  |     modem = self.get_modem() |  |  |  |     timeout = 0.2  # Default timeout is too short | 
			
				
				
			
		
	
		
		
	
		
		
			
				
					
					|  |  |  |     try: |  |  |  |     try: | 
			
		
	
		
		
			
				
					
					|  |  |  |       command_timeout = 0.2 |  |  |  |       modem = self.get_modem() | 
			
				
				
			
		
	
		
		
			
				
					
					|  |  |  |       temps = modem.Command("AT+QTEMP", int(command_timeout * 1000), dbus_interface=MM_MODEM, timeout=command_timeout) |  |  |  |       temps = modem.Command("AT+QTEMP", math.ceil(timeout), dbus_interface=MM_MODEM, timeout=timeout) | 
			
				
				
			
		
	
		
		
	
		
		
	
		
		
			
				
					
					|  |  |  |       return list(map(int, temps.split(' ')[1].split(','))) |  |  |  |       return list(map(int, temps.split(' ')[1].split(','))) | 
			
		
	
		
		
			
				
					
					|  |  |  |     except Exception: |  |  |  |     except Exception: | 
			
		
	
		
		
			
				
					
					|  |  |  |       return [] |  |  |  |       return [] | 
			
		
	
	
		
		
			
				
					|  |  | 
 |