add booted onroad flag (#22318)

old-commit-hash: e9e490a729
commatwo_master
Adeeb Shihadeh 4 years ago committed by GitHub
parent e96f665a3f
commit cadba6f36c
  1. 1
      selfdrive/common/params.cc
  2. 3
      selfdrive/thermald/thermald.py

@ -128,6 +128,7 @@ std::unordered_map<std::string, uint32_t> keys = {
{"ApiCache_Owner", PERSISTENT}, {"ApiCache_Owner", PERSISTENT},
{"ApiCache_NavDestinations", PERSISTENT}, {"ApiCache_NavDestinations", PERSISTENT},
{"AthenadPid", PERSISTENT}, {"AthenadPid", PERSISTENT},
{"BootedOnroad", CLEAR_ON_MANAGER_START | CLEAR_ON_IGNITION_OFF},
{"CalibrationParams", PERSISTENT}, {"CalibrationParams", PERSISTENT},
{"CarBatteryCapacity", PERSISTENT}, {"CarBatteryCapacity", PERSISTENT},
{"CarParams", CLEAR_ON_MANAGER_START | CLEAR_ON_PANDA_DISCONNECT | CLEAR_ON_IGNITION_ON}, {"CarParams", CLEAR_ON_MANAGER_START | CLEAR_ON_PANDA_DISCONNECT | CLEAR_ON_IGNITION_ON},

@ -198,8 +198,9 @@ def thermald_thread():
# TODO: use PI controller for UNO # TODO: use PI controller for UNO
controller = PIController(k_p=0, k_i=2e-3, neg_limit=-80, pos_limit=0, rate=(1 / DT_TRML)) controller = PIController(k_p=0, k_i=2e-3, neg_limit=-80, pos_limit=0, rate=(1 / DT_TRML))
# Leave flag for loggerd to indicate device was left onroad
if params.get_bool("IsOnroad"): if params.get_bool("IsOnroad"):
cloudlog.event("onroad flag not cleared") params.put_bool("BootedOnroad", True)
# CPR3 logging # CPR3 logging
if EON: if EON:

Loading…
Cancel
Save