Skip to content

Commit

Permalink
fixed some cleanup mistakes.
Browse files Browse the repository at this point in the history
  • Loading branch information
Gernby committed Mar 4, 2019
1 parent ffd8c3a commit 104c4a8
Show file tree
Hide file tree
Showing 3 changed files with 5 additions and 5 deletions.
2 changes: 1 addition & 1 deletion selfdrive/boardd/boardd.cc
Expand Up @@ -485,7 +485,6 @@ void *can_recv_thread(void *crap) {
bool frame_sent, skip_once, force_send;
uint64_t wake_time, locked_wake_time, cur_time;
force_send = true;
int sleepTime;
cur_time = 1e-3 * nanos_since_boot();
wake_time = cur_time;

Expand All @@ -496,6 +495,7 @@ void *can_recv_thread(void *crap) {
cur_time = 1e-3 * nanos_since_boot();
skip_once = frame_sent;
wake_time += 4500;
force_send = false;
if (cur_time < wake_time) {
usleep(wake_time - cur_time);
}
Expand Down
4 changes: 2 additions & 2 deletions selfdrive/car/honda/interface.py
Expand Up @@ -204,8 +204,6 @@ def get_params(candidate, fingerprint):
ret.longitudinalKpV = [3.6, 2.4, 1.5]
ret.longitudinalKiBP = [0., 35.]
ret.longitudinalKiV = [0.54, 0.36]
# This is optional, and will cause boardd to synchnonize with the bus instead of time
ret.syncID = 330

elif candidate in (CAR.ACCORD, CAR.ACCORD_15, CAR.ACCORDH):
stop_and_go = True
Expand All @@ -221,6 +219,8 @@ def get_params(candidate, fingerprint):
ret.longitudinalKpV = [1.2, 0.8, 0.5]
ret.longitudinalKiBP = [0., 35.]
ret.longitudinalKiV = [0.18, 0.12]
# This is optional, and will cause boardd to synchnonize with the bus instead of time
ret.syncID = 330

elif candidate == CAR.ACURA_ILX:
stop_and_go = False
Expand Down
4 changes: 2 additions & 2 deletions selfdrive/controls/controlsd.py
Expand Up @@ -459,7 +459,7 @@ def controlsd_thread(gctx=None, rate=100):
path_plan = messaging.new_message()
path_plan.init('pathPlan')

rk = Ratekeeper(rate, print_delay_threshold=2. / 10000)
rk = Ratekeeper(rate, print_delay_threshold=2. / 1000)
controls_params = params.get("ControlsParams")
# Read angle offset from previous drive
if controls_params is not None:
Expand Down Expand Up @@ -503,7 +503,7 @@ def controlsd_thread(gctx=None, rate=100):
v_cruise_kph_last, AM, rk, driver_status,
LaC, LoC, VM, angle_offset, passive, is_metric, cal_perc)

rk.keep_time(2. / 1000000) # use "soft" time keeping for data OUT to vehicle
rk.keep_time(2. / 100000) # use "soft" time keeping for data OUT to vehicle
prof.checkpoint("State Control")

# Publish data
Expand Down

0 comments on commit 104c4a8

Please sign in to comment.