2020-08-26 06:57:17 -06:00
|
|
|
import random
|
|
|
|
|
|
|
|
from cereal import log
|
2020-12-16 22:30:23 -07:00
|
|
|
from selfdrive.hardware.base import HardwareBase
|
2020-08-26 06:57:17 -06:00
|
|
|
|
|
|
|
NetworkType = log.ThermalData.NetworkType
|
|
|
|
NetworkStrength = log.ThermalData.NetworkStrength
|
|
|
|
|
|
|
|
|
|
|
|
class Pc(HardwareBase):
|
2020-12-18 05:17:12 -07:00
|
|
|
def get_os_version(self):
|
|
|
|
return None
|
|
|
|
|
2020-08-26 06:57:17 -06:00
|
|
|
def get_sound_card_online(self):
|
|
|
|
return True
|
|
|
|
|
2020-12-17 12:45:41 -07:00
|
|
|
def reboot(self, reason=None):
|
|
|
|
print("REBOOT!")
|
|
|
|
|
|
|
|
def uninstall(self):
|
|
|
|
print("uninstall")
|
|
|
|
|
2020-08-26 06:57:17 -06:00
|
|
|
def get_imei(self, slot):
|
|
|
|
return "%015d" % random.randint(0, 1 << 32)
|
|
|
|
|
|
|
|
def get_serial(self):
|
|
|
|
return "cccccccc"
|
|
|
|
|
|
|
|
def get_subscriber_info(self):
|
|
|
|
return ""
|
|
|
|
|
|
|
|
def get_network_type(self):
|
2020-08-26 12:12:56 -06:00
|
|
|
return NetworkType.wifi
|
2020-08-26 06:57:17 -06:00
|
|
|
|
|
|
|
def get_sim_info(self):
|
|
|
|
return {
|
|
|
|
'sim_id': '',
|
|
|
|
'mcc_mnc': None,
|
|
|
|
'network_type': ["Unknown"],
|
|
|
|
'sim_state': ["ABSENT"],
|
|
|
|
'data_connected': False
|
|
|
|
}
|
|
|
|
|
|
|
|
def get_network_strength(self, network_type):
|
|
|
|
return NetworkStrength.unknown
|
|
|
|
|
2020-12-02 07:20:57 -07:00
|
|
|
def get_battery_capacity(self):
|
|
|
|
return 100
|
|
|
|
|
|
|
|
def get_battery_status(self):
|
|
|
|
return ""
|
|
|
|
|
|
|
|
def get_battery_current(self):
|
|
|
|
return 0
|
|
|
|
|
|
|
|
def get_battery_voltage(self):
|
|
|
|
return 0
|
|
|
|
|
|
|
|
def get_battery_charging(self):
|
|
|
|
return True
|
|
|
|
|
|
|
|
def set_battery_charging(self, on):
|
|
|
|
pass
|
|
|
|
|
|
|
|
def get_usb_present(self):
|
|
|
|
return False
|
|
|
|
|
|
|
|
def get_current_power_draw(self):
|
|
|
|
return 0
|