mirror of
https://github.com/sunnypilot/sunnypilot.git
synced 2026-02-19 21:43:59 +08:00
* car stuff
* thermal
* Revert "car stuff"
This reverts commit 77fd1c65ebd01abfa8493ae12c9e6b14f7ada976.
* panda state
* camera stuff
* start deg
* most is building
* builds
* planner + controls run
* fix up paramsd
* cleanup
* process replay passes
* fix webcam build
* camerad
* no more frame
* thermald
* ui
* paramsd
* camera replay
* fix long tests
* fix camerad tests
* maxSteeringAngle
* bump cereal
* more frame
* cereal master
old-commit-hash: 312b681a46
73 lines
1.3 KiB
Python
73 lines
1.3 KiB
Python
import random
|
|
|
|
from cereal import log
|
|
from selfdrive.hardware.base import HardwareBase
|
|
|
|
NetworkType = log.DeviceState.NetworkType
|
|
NetworkStrength = log.DeviceState.NetworkStrength
|
|
|
|
|
|
class Pc(HardwareBase):
|
|
def get_os_version(self):
|
|
return None
|
|
|
|
def get_device_type(self):
|
|
return "pc"
|
|
|
|
def get_sound_card_online(self):
|
|
return True
|
|
|
|
def reboot(self, reason=None):
|
|
print("REBOOT!")
|
|
|
|
def uninstall(self):
|
|
print("uninstall")
|
|
|
|
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):
|
|
return NetworkType.wifi
|
|
|
|
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
|
|
|
|
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
|