wip
This commit is contained in:
@@ -10,6 +10,8 @@ from openpilot.selfdrive.car.hyundai.values import HyundaiFlags, Buttons, CarCon
|
||||
from openpilot.selfdrive.controls.lib.drive_helpers import V_CRUISE_MAX
|
||||
from openpilot.common.params import Params
|
||||
|
||||
from openpilot.common.watcher import Watcher
|
||||
|
||||
VisualAlert = car.CarControl.HUDControl.VisualAlert
|
||||
LongCtrlState = car.CarControl.Actuators.LongControlState
|
||||
|
||||
@@ -208,6 +210,10 @@ class CarController:
|
||||
new_actuators.steerOutputCan = apply_steer
|
||||
new_actuators.accel = accel
|
||||
|
||||
Watcher.log_watch("hyundai_carcontroller_update_CC", CC)
|
||||
Watcher.log_watch("hyundai_carcontroller_update_CS", CS)
|
||||
Watcher.log_watch("hyundai_carcontroller_update_self", self)
|
||||
|
||||
self.frame += 1
|
||||
return new_actuators, can_sends
|
||||
|
||||
|
||||
@@ -12,6 +12,8 @@ from openpilot.selfdrive.car.hyundai.values import HyundaiFlags, CAR, DBC, CAN_G
|
||||
from openpilot.selfdrive.car.interfaces import CarStateBase
|
||||
from openpilot.selfdrive.frogpilot.functions.speed_limit_controller import SpeedLimitController
|
||||
|
||||
from openpilot.common.watcher import Watcher
|
||||
|
||||
PREV_BUTTON_SAMPLES = 8
|
||||
CLUSTER_SAMPLE_RATE = 20 # frames
|
||||
STANDSTILL_THRESHOLD = 12 * 0.03125 * CV.KPH_TO_MS
|
||||
@@ -54,6 +56,9 @@ class CarState(CarStateBase):
|
||||
self.params = CarControllerParams(CP)
|
||||
|
||||
def update(self, cp, cp_cam):
|
||||
Watcher.log_watch("hyundai_carstate_update_cp", cp)
|
||||
Watcher.log_watch("hyundai_carstate_update_cp_cam", cp_cam)
|
||||
|
||||
if self.CP.carFingerprint in CANFD_CAR:
|
||||
return self.update_canfd(cp, cp_cam)
|
||||
|
||||
@@ -214,9 +219,13 @@ class CarState(CarStateBase):
|
||||
# put_bool_nonblocking("ExperimentalMode", not experimental_mode)
|
||||
# self.lkas_previously_pressed = lkas_pressed
|
||||
|
||||
Watcher.log_watch("hyundai_carstate_update_self", self)
|
||||
return ret
|
||||
|
||||
def update_canfd(self, cp, cp_cam):
|
||||
Watcher.log_watch("hyundai_carstate_update_canfd_cp", cp)
|
||||
Watcher.log_watch("hyundai_carstate_update_canfd_cp_cam", cp_cam)
|
||||
|
||||
ret = car.CarState.new_message()
|
||||
|
||||
self.is_metric = cp.vl["CRUISE_BUTTONS_ALT"]["DISTANCE_UNIT"] != 1
|
||||
@@ -354,6 +363,8 @@ class CarState(CarStateBase):
|
||||
# put_bool_nonblocking("ExperimentalMode", not experimental_mode)
|
||||
# self.lkas_previously_pressed = lkas_pressed
|
||||
|
||||
Watcher.log_watch("hyundai_carstate_update_canfd_self", self)
|
||||
|
||||
return ret
|
||||
|
||||
# BBOT does not work
|
||||
|
||||
@@ -2,6 +2,9 @@ const net = require('net');
|
||||
const fs = require('fs');
|
||||
const socketPath = '/tmp/oscar_watcher.sock';
|
||||
|
||||
// from openpilot.common.watcher import Watcher
|
||||
// Watcher.log_watch("LastGPSPosition", location)
|
||||
|
||||
//// UNIXSOCKET SERVER ////
|
||||
|
||||
let progvars = {};
|
||||
@@ -237,8 +240,8 @@ function checkDiskSpace() {
|
||||
});
|
||||
}
|
||||
|
||||
// Check disk space every 1 minute
|
||||
setInterval(checkDiskSpace, 60000);
|
||||
// Check disk space every 10 seconds
|
||||
setInterval(checkDiskSpace, 10000);
|
||||
|
||||
// Perform an initial check
|
||||
checkDiskSpace();
|
||||
|
||||
@@ -47,14 +47,13 @@ def main() -> NoReturn:
|
||||
set_timezone(valid_timezones, timezone)
|
||||
|
||||
while True:
|
||||
Watcher.log_watch("location", "starting")
|
||||
|
||||
time.sleep(60)
|
||||
|
||||
location = params.get("LastGPSPosition", encoding='utf8')
|
||||
|
||||
# test
|
||||
Watcher.log_watch("location", location)
|
||||
Watcher.log_watch("LastGPSPosition", location)
|
||||
|
||||
# Find timezone by reverse geocoding the last known gps location
|
||||
if location is not None:
|
||||
|
||||
Reference in New Issue
Block a user