Skip to content

Commit

Permalink
Merge pull request JMPZ11#30 from jc01rho-openpilot-BoltEV2019-KoKr/0…
Browse files Browse the repository at this point in the history
…88-release

088 release
  • Loading branch information
jc01rho authored Sep 13, 2021
2 parents 4b4308d + 959f873 commit 7a81a39
Show file tree
Hide file tree
Showing 3 changed files with 7 additions and 7 deletions.
4 changes: 2 additions & 2 deletions selfdrive/controls/lib/latcontrol_pid.py
Original file line number Diff line number Diff line change
@@ -1,13 +1,13 @@
import math

from selfdrive.controls.lib.pid import PIController
from selfdrive.controls.lib.pid import LatPIDController
from selfdrive.controls.lib.drive_helpers import get_steer_max
from cereal import log


class LatControlPID():
def __init__(self, CP):
self.pid = PIController((CP.lateralTuning.pid.kpBP, CP.lateralTuning.pid.kpV),
self.pid = LatPIDController((CP.lateralTuning.pid.kpBP, CP.lateralTuning.pid.kpV),
(CP.lateralTuning.pid.kiBP, CP.lateralTuning.pid.kiV),
k_f=CP.lateralTuning.pid.kf, pos_limit=1.0, neg_limit=-1.0,
sat_limit=CP.steerLimitTimer)
Expand Down
4 changes: 2 additions & 2 deletions selfdrive/controls/lib/longcontrol.py
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
from cereal import log
from common.numpy_fast import clip, interp
from selfdrive.controls.lib.pid import PIController
from selfdrive.controls.lib.pid import LatPIDController
from selfdrive.controls.lib.drive_helpers import CONTROL_N
from selfdrive.modeld.constants import T_IDXS

Expand Down Expand Up @@ -56,7 +56,7 @@ def long_control_state_trans(active, long_control_state, v_ego, v_target, v_pid,
class LongControl():
def __init__(self, CP, compute_gb):
self.long_control_state = LongCtrlState.off # initialized to off
self.pid = LongPIController((CP.longitudinalTuning.kpBP, CP.longitudinalTuning.kpV),
self.pid = LatPIDController((CP.longitudinalTuning.kpBP, CP.longitudinalTuning.kpV),
(CP.longitudinalTuning.kiBP, CP.longitudinalTuning.kiV),
rate=RATE,
sat_limit=0.8,
Expand Down
6 changes: 3 additions & 3 deletions selfdrive/ui/qt/sidebar.cc
Original file line number Diff line number Diff line change
Expand Up @@ -132,7 +132,7 @@ void Sidebar::paintEvent(QPaintEvent *event) {
// drawMetric(p, panda_status.first, panda_status.second, 518);
// drawMetric(p, connect_status.first, connect_status.second, 676);
QString batt_perc_qstring = QString("BATT: %1 %2").arg(batt_perc).arg("%");
drawMetric(p, batt_perc_qstring +"\n"+ QString("%1°C").arg((double)temp_val,4,'f',1), temp_status.second, 338);
drawMetric(p, panda_status.first, panda_status.second, 518);
drawMetric(p, "네트워크\n" + connect_status.first, connect_status.second, 676);
drawMetric(p, batt_perc_qstring,QString("%1°C").arg((double)temp_val,4,'f',1), temp_status.second, 338);
drawMetric(p, panda_status.first,"", panda_status.second, 518);
drawMetric(p, "네트워크\n" + connect_status.first,"", connect_status.second, 676);
}

0 comments on commit 7a81a39

Please sign in to comment.