fix: spelling typos (#21861)
* fix: typo spelling grammar * revert * Update selfdrive/locationd/calibrationd.py * more revert Co-authored-by: Adeeb Shihadeh <adeebshihadeh@gmail.com>pull/21857/head
parent
036bc034b8
commit
d74def61f8
|
@ -111,7 +111,7 @@ void *alloc_w_mmu_hdl(int video0_fd, int len, uint32_t *handle, int align = 8, i
|
||||||
assert(ptr != MAP_FAILED);
|
assert(ptr != MAP_FAILED);
|
||||||
}
|
}
|
||||||
|
|
||||||
// LOGD("alloced: %x %d %llx mapped %p", mem_mgr_alloc_cmd.out.buf_handle, mem_mgr_alloc_cmd.out.fd, mem_mgr_alloc_cmd.out.vaddr, ptr);
|
// LOGD("allocated: %x %d %llx mapped %p", mem_mgr_alloc_cmd.out.buf_handle, mem_mgr_alloc_cmd.out.fd, mem_mgr_alloc_cmd.out.vaddr, ptr);
|
||||||
|
|
||||||
return ptr;
|
return ptr;
|
||||||
}
|
}
|
||||||
|
|
|
@ -253,7 +253,7 @@ def match_fw_to_car(fw_versions, allow_fuzzy=True):
|
||||||
def get_fw_versions(logcan, sendcan, bus, extra=None, timeout=0.1, debug=False, progress=False):
|
def get_fw_versions(logcan, sendcan, bus, extra=None, timeout=0.1, debug=False, progress=False):
|
||||||
ecu_types = {}
|
ecu_types = {}
|
||||||
|
|
||||||
# Extract ECU adresses to query from fingerprints
|
# Extract ECU addresses to query from fingerprints
|
||||||
# ECUs using a subadress need be queried one by one, the rest can be done in parallel
|
# ECUs using a subadress need be queried one by one, the rest can be done in parallel
|
||||||
addrs = []
|
addrs = []
|
||||||
parallel_addrs = []
|
parallel_addrs = []
|
||||||
|
|
|
@ -171,7 +171,7 @@ class CarController():
|
||||||
if CS.CP.carFingerprint in HONDA_BOSCH:
|
if CS.CP.carFingerprint in HONDA_BOSCH:
|
||||||
accel = actuators.gas - actuators.brake
|
accel = actuators.gas - actuators.brake
|
||||||
|
|
||||||
# TODO: pass in LoC.long_control_state and use that to decide starting/stoppping
|
# TODO: pass in LoC.long_control_state and use that to decide starting/stopping
|
||||||
stopping = accel < 0 and CS.out.vEgo < 0.3
|
stopping = accel < 0 and CS.out.vEgo < 0.3
|
||||||
starting = accel > 0 and CS.out.vEgo < 0.3
|
starting = accel > 0 and CS.out.vEgo < 0.3
|
||||||
|
|
||||||
|
|
|
@ -11,7 +11,7 @@ TransmissionType = car.CarParams.TransmissionType
|
||||||
|
|
||||||
|
|
||||||
def calc_cruise_offset(offset, speed):
|
def calc_cruise_offset(offset, speed):
|
||||||
# euristic formula so that speed is controlled to ~ 0.3m/s below pid_speed
|
# heuristic formula so that speed is controlled to ~ 0.3m/s below pid_speed
|
||||||
# constraints to solve for _K0, _K1, _K2 are:
|
# constraints to solve for _K0, _K1, _K2 are:
|
||||||
# - speed = 0m/s, out = -0.3
|
# - speed = 0m/s, out = -0.3
|
||||||
# - speed = 34m/s, offset = 20, out = -0.25
|
# - speed = 34m/s, offset = 20, out = -0.25
|
||||||
|
|
|
@ -88,7 +88,7 @@ cl_program cl_program_from_file(cl_context ctx, cl_device_id device_id, const ch
|
||||||
return prg;
|
return prg;
|
||||||
}
|
}
|
||||||
|
|
||||||
// Given a cl code and return a string represenation
|
// Given a cl code and return a string representation
|
||||||
#define CL_ERR_TO_STR(err) case err: return #err
|
#define CL_ERR_TO_STR(err) case err: return #err
|
||||||
const char* cl_get_error_string(int err) {
|
const char* cl_get_error_string(int err) {
|
||||||
switch (err) {
|
switch (err) {
|
||||||
|
|
|
@ -31,7 +31,7 @@ void cloudlog_bind(const char* k, const char* v);
|
||||||
\
|
\
|
||||||
if (__begin + __millis*1000000ULL < __ts) { \
|
if (__begin + __millis*1000000ULL < __ts) { \
|
||||||
if (__missed) { \
|
if (__missed) { \
|
||||||
cloudlog(CLOUDLOG_WARNING, "cloudlog: %d messages supressed", __missed); \
|
cloudlog(CLOUDLOG_WARNING, "cloudlog: %d messages suppressed", __missed); \
|
||||||
} \
|
} \
|
||||||
__begin = 0; \
|
__begin = 0; \
|
||||||
__printed = 0; \
|
__printed = 0; \
|
||||||
|
|
|
@ -44,7 +44,7 @@ def get_arg_parser():
|
||||||
parser = argparse.ArgumentParser(formatter_class=argparse.ArgumentDefaultsHelpFormatter)
|
parser = argparse.ArgumentParser(formatter_class=argparse.ArgumentDefaultsHelpFormatter)
|
||||||
|
|
||||||
parser.add_argument("proc_names", nargs="?", default='',
|
parser.add_argument("proc_names", nargs="?", default='',
|
||||||
help="Process names to be monitored, comma seperated")
|
help="Process names to be monitored, comma separated")
|
||||||
parser.add_argument("--list_all", action='store_true',
|
parser.add_argument("--list_all", action='store_true',
|
||||||
help="Show all running processes' cmdline")
|
help="Show all running processes' cmdline")
|
||||||
parser.add_argument("--detailed_times", action='store_true',
|
parser.add_argument("--detailed_times", action='store_true',
|
||||||
|
|
|
@ -15,7 +15,7 @@ signal.signal(signal.SIGINT, sigint_handler)
|
||||||
|
|
||||||
if __name__ == "__main__":
|
if __name__ == "__main__":
|
||||||
|
|
||||||
parser = argparse.ArgumentParser(description='Sniff a communcation socket')
|
parser = argparse.ArgumentParser(description='Sniff a communication socket')
|
||||||
parser.add_argument('--addr', default='127.0.0.1')
|
parser.add_argument('--addr', default='127.0.0.1')
|
||||||
args = parser.parse_args()
|
args = parser.parse_args()
|
||||||
|
|
||||||
|
|
|
@ -12,7 +12,7 @@ import cereal.messaging as messaging
|
||||||
|
|
||||||
if __name__ == "__main__":
|
if __name__ == "__main__":
|
||||||
|
|
||||||
parser = argparse.ArgumentParser(description='Sniff a communcation socket')
|
parser = argparse.ArgumentParser(description='Sniff a communication socket')
|
||||||
parser.add_argument('--addr', default='127.0.0.1')
|
parser.add_argument('--addr', default='127.0.0.1')
|
||||||
args = parser.parse_args()
|
args = parser.parse_args()
|
||||||
|
|
||||||
|
|
|
@ -31,7 +31,7 @@ INPUTS_WANTED = 50 # We want a little bit more than we need for stability
|
||||||
MAX_ALLOWED_SPREAD = np.radians(2)
|
MAX_ALLOWED_SPREAD = np.radians(2)
|
||||||
RPY_INIT = np.array([0.0,0.0,0.0])
|
RPY_INIT = np.array([0.0,0.0,0.0])
|
||||||
|
|
||||||
# These values are needed to accomodate biggest modelframe
|
# These values are needed to accommodate biggest modelframe
|
||||||
PITCH_LIMITS = np.array([-0.09074112085129739, 0.14907572052989657])
|
PITCH_LIMITS = np.array([-0.09074112085129739, 0.14907572052989657])
|
||||||
YAW_LIMITS = np.array([-0.06912048084718224, 0.06912048084718235])
|
YAW_LIMITS = np.array([-0.06912048084718224, 0.06912048084718235])
|
||||||
DEBUG = os.getenv("DEBUG") is not None
|
DEBUG = os.getenv("DEBUG") is not None
|
||||||
|
@ -115,7 +115,7 @@ class Calibrator():
|
||||||
self.cal_status = Calibration.INVALID
|
self.cal_status = Calibration.INVALID
|
||||||
|
|
||||||
# If spread is too high, assume mounting was changed and reset to last block.
|
# If spread is too high, assume mounting was changed and reset to last block.
|
||||||
# Make the transition smooth. Abrupt transistion are not good foor feedback loop through supercombo model.
|
# Make the transition smooth. Abrupt transitions are not good foor feedback loop through supercombo model.
|
||||||
if max(self.calib_spread) > MAX_ALLOWED_SPREAD and self.cal_status == Calibration.CALIBRATED:
|
if max(self.calib_spread) > MAX_ALLOWED_SPREAD and self.cal_status == Calibration.CALIBRATED:
|
||||||
self.reset(self.rpys[self.block_idx - 1], valid_blocks=INPUTS_NEEDED, smooth_from=self.rpy)
|
self.reset(self.rpys[self.block_idx - 1], valid_blocks=INPUTS_NEEDED, smooth_from=self.rpy)
|
||||||
|
|
||||||
|
|
|
@ -117,7 +117,7 @@ std::pair<std::string, kj::Array<capnp::word>> UbloxMsgParser::gen_msg() {
|
||||||
return {"ubloxGnss", gen_mon_hw2(static_cast<ubx_t::mon_hw2_t*>(body))};
|
return {"ubloxGnss", gen_mon_hw2(static_cast<ubx_t::mon_hw2_t*>(body))};
|
||||||
break;
|
break;
|
||||||
default:
|
default:
|
||||||
LOGE("Unkown message type %x", ubx_message.msg_type());
|
LOGE("Unknown message type %x", ubx_message.msg_type());
|
||||||
return {"ubloxGnss", kj::Array<capnp::word>()};
|
return {"ubloxGnss", kj::Array<capnp::word>()};
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
|
|
|
@ -37,7 +37,7 @@ def launcher(proc):
|
||||||
except KeyboardInterrupt:
|
except KeyboardInterrupt:
|
||||||
cloudlog.warning("child %s got SIGINT" % proc)
|
cloudlog.warning("child %s got SIGINT" % proc)
|
||||||
except Exception:
|
except Exception:
|
||||||
# can't install the crash handler becuase sys.excepthook doesn't play nice
|
# can't install the crash handler because sys.excepthook doesn't play nice
|
||||||
# with threads, so catch it here.
|
# with threads, so catch it here.
|
||||||
crash.capture_exception()
|
crash.capture_exception()
|
||||||
raise
|
raise
|
||||||
|
@ -228,7 +228,7 @@ class PythonProcess(ManagerProcess):
|
||||||
|
|
||||||
|
|
||||||
class DaemonProcess(ManagerProcess):
|
class DaemonProcess(ManagerProcess):
|
||||||
"""Python process that has to stay running accross manager restart.
|
"""Python process that has to stay running across manager restart.
|
||||||
This is used for athena so you don't lose SSH access when restarting manager."""
|
This is used for athena so you don't lose SSH access when restarting manager."""
|
||||||
def __init__(self, name, module, param_name, enabled=True):
|
def __init__(self, name, module, param_name, enabled=True):
|
||||||
self.name = name
|
self.name = name
|
||||||
|
|
|
@ -238,7 +238,7 @@ void Thneed::save(const char *filename, bool save_binaries) {
|
||||||
if (mobj["arg_type"] == "image2d_t" || mobj["arg_type"] == "image1d_t") {
|
if (mobj["arg_type"] == "image2d_t" || mobj["arg_type"] == "image1d_t") {
|
||||||
assert(false);
|
assert(false);
|
||||||
} else {
|
} else {
|
||||||
// buffers alloced with CL_MEM_HOST_WRITE_ONLY, hence this hack
|
// buffers allocated with CL_MEM_HOST_WRITE_ONLY, hence this hack
|
||||||
//hexdump((uint32_t*)val, 0x100);
|
//hexdump((uint32_t*)val, 0x100);
|
||||||
|
|
||||||
// the worst hack in thneed, the flags are at 0x14
|
// the worst hack in thneed, the flags are at 0x14
|
||||||
|
|
|
@ -6,7 +6,7 @@ from common.basedir import BASEDIR
|
||||||
# Initialize visiontest. Ignore output.
|
# Initialize visiontest. Ignore output.
|
||||||
_visiond_dir = os.path.dirname(os.path.abspath(__file__))
|
_visiond_dir = os.path.dirname(os.path.abspath(__file__))
|
||||||
_libvisiontest = "libvisiontest.so"
|
_libvisiontest = "libvisiontest.so"
|
||||||
try: # bacause this crashes somtimes when running pipeline
|
try: # because this crashes sometimes when running pipeline
|
||||||
subprocess.check_output(["make", "-C", _visiond_dir, "-f",
|
subprocess.check_output(["make", "-C", _visiond_dir, "-f",
|
||||||
os.path.join(_visiond_dir, "visiontest.mk"),
|
os.path.join(_visiond_dir, "visiontest.mk"),
|
||||||
_libvisiontest])
|
_libvisiontest])
|
||||||
|
|
|
@ -131,7 +131,7 @@ class TestMonitoring(unittest.TestCase):
|
||||||
self.assertTrue(len(events[int((DISTRACTED_SECONDS_TO_RED+2*_invisible_time+3.5)/DT_DMON)]) == 0)
|
self.assertTrue(len(events[int((DISTRACTED_SECONDS_TO_RED+2*_invisible_time+3.5)/DT_DMON)]) == 0)
|
||||||
|
|
||||||
# engaged, invisible driver, down to orange, driver touches wheel; then down to orange again, driver appears
|
# engaged, invisible driver, down to orange, driver touches wheel; then down to orange again, driver appears
|
||||||
# - both actions should clear the alert, but momentary appearence should not
|
# - both actions should clear the alert, but momentary appearance should not
|
||||||
def test_sometimes_transparent_commuter(self):
|
def test_sometimes_transparent_commuter(self):
|
||||||
_visible_time = np.random.choice([0.5, 10])
|
_visible_time = np.random.choice([0.5, 10])
|
||||||
ds_vector = always_no_face[:]*2
|
ds_vector = always_no_face[:]*2
|
||||||
|
|
|
@ -245,6 +245,6 @@ void BMX055_Magn::get_event(cereal::SensorEventData::Builder &event) {
|
||||||
// The BMX055 Magnetometer has no FIFO mode. Self running mode only goes
|
// The BMX055 Magnetometer has no FIFO mode. Self running mode only goes
|
||||||
// up to 30 Hz. Therefore we put in forced mode, and request measurements
|
// up to 30 Hz. Therefore we put in forced mode, and request measurements
|
||||||
// at a 100 Hz. When reading the registers we have to check the ready bit
|
// at a 100 Hz. When reading the registers we have to check the ready bit
|
||||||
// To verify the measurement was comleted this cycle.
|
// To verify the measurement was completed this cycle.
|
||||||
set_register(BMX055_MAGN_I2C_REG_MAG, BMX055_MAGN_FORCED);
|
set_register(BMX055_MAGN_I2C_REG_MAG, BMX055_MAGN_FORCED);
|
||||||
}
|
}
|
||||||
|
|
|
@ -41,7 +41,7 @@ int MMC5603NJ_Magn::init() {
|
||||||
goto fail;
|
goto fail;
|
||||||
}
|
}
|
||||||
|
|
||||||
// Enable continous mode, set every 100 measurements
|
// Enable continuous mode, set every 100 measurements
|
||||||
ret = set_register(MMC5603NJ_I2C_REG_INTERNAL_2, MMC5603NJ_CMM_EN | MMC5603NJ_EN_PRD_SET | 0b11);
|
ret = set_register(MMC5603NJ_I2C_REG_INTERNAL_2, MMC5603NJ_CMM_EN | MMC5603NJ_EN_PRD_SET | 0b11);
|
||||||
if (ret < 0) {
|
if (ret < 0) {
|
||||||
goto fail;
|
goto fail;
|
||||||
|
|
|
@ -118,7 +118,7 @@ class TestUpdated(unittest.TestCase):
|
||||||
self._update_now()
|
self._update_now()
|
||||||
t = self._read_param("LastUpdateTime", timeout=timeout)
|
t = self._read_param("LastUpdateTime", timeout=timeout)
|
||||||
if t is None:
|
if t is None:
|
||||||
raise Exception("timed out waiting for update to complate")
|
raise Exception("timed out waiting for update to complete")
|
||||||
|
|
||||||
def _make_commit(self):
|
def _make_commit(self):
|
||||||
all_dirs, all_files = [], []
|
all_dirs, all_files = [], []
|
||||||
|
|
|
@ -305,7 +305,7 @@ void QUIState::update() {
|
||||||
started_prev = ui_state.scene.started;
|
started_prev = ui_state.scene.started;
|
||||||
emit offroadTransition(!ui_state.scene.started);
|
emit offroadTransition(!ui_state.scene.started);
|
||||||
|
|
||||||
// Change timeout to 0 when onroad, this will call update continously.
|
// Change timeout to 0 when onroad, this will call update continuously.
|
||||||
// This puts visionIPC in charge of update frequency, reducing video latency
|
// This puts visionIPC in charge of update frequency, reducing video latency
|
||||||
timer->start(ui_state.scene.started ? 0 : 1000 / UI_FREQ);
|
timer->start(ui_state.scene.started ? 0 : 1000 / UI_FREQ);
|
||||||
}
|
}
|
||||||
|
|
|
@ -87,7 +87,7 @@ class URLFile(object):
|
||||||
|
|
||||||
file_begin = self._pos
|
file_begin = self._pos
|
||||||
file_end = self._pos + ll if ll is not None else self.get_length()
|
file_end = self._pos + ll if ll is not None else self.get_length()
|
||||||
# We have to allign with chunks we store. Position is the begginiing of the latest chunk that starts before or at our file
|
# We have to align with chunks we store. Position is the begginiing of the latest chunk that starts before or at our file
|
||||||
position = (file_begin // CHUNK_SIZE) * CHUNK_SIZE
|
position = (file_begin // CHUNK_SIZE) * CHUNK_SIZE
|
||||||
response = b""
|
response = b""
|
||||||
while True:
|
while True:
|
||||||
|
|
|
@ -16,6 +16,6 @@ if __name__ == "__main__":
|
||||||
if keys.status_code == 200:
|
if keys.status_code == 200:
|
||||||
Params().put("GithubSshKeys", keys.text)
|
Params().put("GithubSshKeys", keys.text)
|
||||||
Params().put("GithubUsername", username)
|
Params().put("GithubUsername", username)
|
||||||
print("Setup ssh keys sucessfully")
|
print("Setup ssh keys successfully")
|
||||||
else:
|
else:
|
||||||
print("Error getting public keys from github")
|
print("Error getting public keys from github")
|
||||||
|
|
Loading…
Reference in New Issue