add booted onroad flag (#22318)

pull/22320/head
Adeeb Shihadeh 2021-09-22 22:25:08 -07:00 committed by GitHub
parent 5af3bf2e1f
commit e9e490a729
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
2 changed files with 3 additions and 1 deletions

View File

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

View File

@ -198,8 +198,9 @@ def thermald_thread():
# 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))
# Leave flag for loggerd to indicate device was left onroad
if params.get_bool("IsOnroad"):
cloudlog.event("onroad flag not cleared")
params.put_bool("BootedOnroad", True)
# CPR3 logging
if EON: