From 63b3d6024b1a2a44b60ef70d3f9de306240599ba Mon Sep 17 00:00:00 2001 From: arfy slowy Date: Fri, 6 Aug 2021 02:05:49 +0700 Subject: [PATCH] fix: spelling typos (#21861) * fix: typo spelling grammar * revert * Update selfdrive/locationd/calibrationd.py * more revert Co-authored-by: Adeeb Shihadeh old-commit-hash: d74def61f88937302f7423eea67895d5f4c596b5 --- selfdrive/camerad/cameras/camera_qcom2.cc | 2 +- selfdrive/car/fw_versions.py | 2 +- selfdrive/car/honda/carcontroller.py | 2 +- selfdrive/car/honda/carstate.py | 2 +- selfdrive/common/clutil.cc | 2 +- selfdrive/common/swaglog.h | 2 +- selfdrive/debug/cpu_usage_stat.py | 2 +- selfdrive/debug/internal/measure_steering_accuracy.py | 2 +- selfdrive/debug/internal/measure_torque_time_to_max.py | 2 +- selfdrive/locationd/calibrationd.py | 4 ++-- selfdrive/locationd/ublox_msg.cc | 2 +- selfdrive/manager/process.py | 4 ++-- selfdrive/modeld/thneed/serialize.cc | 2 +- selfdrive/modeld/visiontest.py | 2 +- selfdrive/monitoring/test_monitoring.py | 2 +- selfdrive/sensord/sensors/bmx055_magn.cc | 2 +- selfdrive/sensord/sensors/mmc5603nj_magn.cc | 2 +- selfdrive/test/test_updated.py | 2 +- selfdrive/ui/ui.cc | 2 +- tools/lib/url_file.py | 2 +- tools/scripts/setup_ssh_keys.py | 2 +- 21 files changed, 23 insertions(+), 23 deletions(-) diff --git a/selfdrive/camerad/cameras/camera_qcom2.cc b/selfdrive/camerad/cameras/camera_qcom2.cc index 8cb430bfaa..ebed16c7fb 100644 --- a/selfdrive/camerad/cameras/camera_qcom2.cc +++ b/selfdrive/camerad/cameras/camera_qcom2.cc @@ -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); } - // 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; } diff --git a/selfdrive/car/fw_versions.py b/selfdrive/car/fw_versions.py index d3057c28bb..4cb874d2d8 100755 --- a/selfdrive/car/fw_versions.py +++ b/selfdrive/car/fw_versions.py @@ -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): 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 addrs = [] parallel_addrs = [] diff --git a/selfdrive/car/honda/carcontroller.py b/selfdrive/car/honda/carcontroller.py index 3f43fc5814..7204006e11 100644 --- a/selfdrive/car/honda/carcontroller.py +++ b/selfdrive/car/honda/carcontroller.py @@ -171,7 +171,7 @@ class CarController(): if CS.CP.carFingerprint in HONDA_BOSCH: 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 starting = accel > 0 and CS.out.vEgo < 0.3 diff --git a/selfdrive/car/honda/carstate.py b/selfdrive/car/honda/carstate.py index 3067c5e29e..0251102dc8 100644 --- a/selfdrive/car/honda/carstate.py +++ b/selfdrive/car/honda/carstate.py @@ -11,7 +11,7 @@ TransmissionType = car.CarParams.TransmissionType 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: # - speed = 0m/s, out = -0.3 # - speed = 34m/s, offset = 20, out = -0.25 diff --git a/selfdrive/common/clutil.cc b/selfdrive/common/clutil.cc index 68207c286b..952fc6863f 100644 --- a/selfdrive/common/clutil.cc +++ b/selfdrive/common/clutil.cc @@ -88,7 +88,7 @@ cl_program cl_program_from_file(cl_context ctx, cl_device_id device_id, const ch 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 const char* cl_get_error_string(int err) { switch (err) { diff --git a/selfdrive/common/swaglog.h b/selfdrive/common/swaglog.h index fae44152da..9a1d3c0a67 100644 --- a/selfdrive/common/swaglog.h +++ b/selfdrive/common/swaglog.h @@ -31,7 +31,7 @@ void cloudlog_bind(const char* k, const char* v); \ if (__begin + __millis*1000000ULL < __ts) { \ if (__missed) { \ - cloudlog(CLOUDLOG_WARNING, "cloudlog: %d messages supressed", __missed); \ + cloudlog(CLOUDLOG_WARNING, "cloudlog: %d messages suppressed", __missed); \ } \ __begin = 0; \ __printed = 0; \ diff --git a/selfdrive/debug/cpu_usage_stat.py b/selfdrive/debug/cpu_usage_stat.py index ffff3d6cea..5931fda640 100755 --- a/selfdrive/debug/cpu_usage_stat.py +++ b/selfdrive/debug/cpu_usage_stat.py @@ -44,7 +44,7 @@ def get_arg_parser(): parser = argparse.ArgumentParser(formatter_class=argparse.ArgumentDefaultsHelpFormatter) 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', help="Show all running processes' cmdline") parser.add_argument("--detailed_times", action='store_true', diff --git a/selfdrive/debug/internal/measure_steering_accuracy.py b/selfdrive/debug/internal/measure_steering_accuracy.py index a9040a6d4a..e06e43cdcf 100755 --- a/selfdrive/debug/internal/measure_steering_accuracy.py +++ b/selfdrive/debug/internal/measure_steering_accuracy.py @@ -15,7 +15,7 @@ signal.signal(signal.SIGINT, sigint_handler) 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') args = parser.parse_args() diff --git a/selfdrive/debug/internal/measure_torque_time_to_max.py b/selfdrive/debug/internal/measure_torque_time_to_max.py index 58a29532cd..2cc68df438 100755 --- a/selfdrive/debug/internal/measure_torque_time_to_max.py +++ b/selfdrive/debug/internal/measure_torque_time_to_max.py @@ -12,7 +12,7 @@ import cereal.messaging as messaging 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') args = parser.parse_args() diff --git a/selfdrive/locationd/calibrationd.py b/selfdrive/locationd/calibrationd.py index d3ad019698..604f4f68d9 100755 --- a/selfdrive/locationd/calibrationd.py +++ b/selfdrive/locationd/calibrationd.py @@ -31,7 +31,7 @@ INPUTS_WANTED = 50 # We want a little bit more than we need for stability MAX_ALLOWED_SPREAD = np.radians(2) 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]) YAW_LIMITS = np.array([-0.06912048084718224, 0.06912048084718235]) DEBUG = os.getenv("DEBUG") is not None @@ -115,7 +115,7 @@ class Calibrator(): self.cal_status = Calibration.INVALID # 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: self.reset(self.rpys[self.block_idx - 1], valid_blocks=INPUTS_NEEDED, smooth_from=self.rpy) diff --git a/selfdrive/locationd/ublox_msg.cc b/selfdrive/locationd/ublox_msg.cc index c84976fea8..cda4333454 100644 --- a/selfdrive/locationd/ublox_msg.cc +++ b/selfdrive/locationd/ublox_msg.cc @@ -117,7 +117,7 @@ std::pair> UbloxMsgParser::gen_msg() { return {"ubloxGnss", gen_mon_hw2(static_cast(body))}; break; default: - LOGE("Unkown message type %x", ubx_message.msg_type()); + LOGE("Unknown message type %x", ubx_message.msg_type()); return {"ubloxGnss", kj::Array()}; break; } diff --git a/selfdrive/manager/process.py b/selfdrive/manager/process.py index fdb9dbc5bf..a5f91c935b 100644 --- a/selfdrive/manager/process.py +++ b/selfdrive/manager/process.py @@ -37,7 +37,7 @@ def launcher(proc): except KeyboardInterrupt: cloudlog.warning("child %s got SIGINT" % proc) 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. crash.capture_exception() raise @@ -228,7 +228,7 @@ class PythonProcess(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.""" def __init__(self, name, module, param_name, enabled=True): self.name = name diff --git a/selfdrive/modeld/thneed/serialize.cc b/selfdrive/modeld/thneed/serialize.cc index 1f17c4a87b..327c6d6cd3 100644 --- a/selfdrive/modeld/thneed/serialize.cc +++ b/selfdrive/modeld/thneed/serialize.cc @@ -238,7 +238,7 @@ void Thneed::save(const char *filename, bool save_binaries) { if (mobj["arg_type"] == "image2d_t" || mobj["arg_type"] == "image1d_t") { assert(false); } 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); // the worst hack in thneed, the flags are at 0x14 diff --git a/selfdrive/modeld/visiontest.py b/selfdrive/modeld/visiontest.py index 6f97684244..8bf71d26d5 100644 --- a/selfdrive/modeld/visiontest.py +++ b/selfdrive/modeld/visiontest.py @@ -6,7 +6,7 @@ from common.basedir import BASEDIR # Initialize visiontest. Ignore output. _visiond_dir = os.path.dirname(os.path.abspath(__file__)) _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", os.path.join(_visiond_dir, "visiontest.mk"), _libvisiontest]) diff --git a/selfdrive/monitoring/test_monitoring.py b/selfdrive/monitoring/test_monitoring.py index 11155a30ce..48e831615b 100755 --- a/selfdrive/monitoring/test_monitoring.py +++ b/selfdrive/monitoring/test_monitoring.py @@ -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) # 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): _visible_time = np.random.choice([0.5, 10]) ds_vector = always_no_face[:]*2 diff --git a/selfdrive/sensord/sensors/bmx055_magn.cc b/selfdrive/sensord/sensors/bmx055_magn.cc index e7a8de9098..29e0d809d8 100644 --- a/selfdrive/sensord/sensors/bmx055_magn.cc +++ b/selfdrive/sensord/sensors/bmx055_magn.cc @@ -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 // 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 - // 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); } diff --git a/selfdrive/sensord/sensors/mmc5603nj_magn.cc b/selfdrive/sensord/sensors/mmc5603nj_magn.cc index 829a7f7d25..68878867e4 100644 --- a/selfdrive/sensord/sensors/mmc5603nj_magn.cc +++ b/selfdrive/sensord/sensors/mmc5603nj_magn.cc @@ -41,7 +41,7 @@ int MMC5603NJ_Magn::init() { 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); if (ret < 0) { goto fail; diff --git a/selfdrive/test/test_updated.py b/selfdrive/test/test_updated.py index b06a79fac1..d30bc3c6ed 100755 --- a/selfdrive/test/test_updated.py +++ b/selfdrive/test/test_updated.py @@ -118,7 +118,7 @@ class TestUpdated(unittest.TestCase): self._update_now() t = self._read_param("LastUpdateTime", timeout=timeout) 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): all_dirs, all_files = [], [] diff --git a/selfdrive/ui/ui.cc b/selfdrive/ui/ui.cc index bb0c0c85a7..8c1477b23f 100644 --- a/selfdrive/ui/ui.cc +++ b/selfdrive/ui/ui.cc @@ -305,7 +305,7 @@ void QUIState::update() { started_prev = 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 timer->start(ui_state.scene.started ? 0 : 1000 / UI_FREQ); } diff --git a/tools/lib/url_file.py b/tools/lib/url_file.py index d0dd837891..7f111113ba 100644 --- a/tools/lib/url_file.py +++ b/tools/lib/url_file.py @@ -87,7 +87,7 @@ class URLFile(object): file_begin = self._pos 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 response = b"" while True: diff --git a/tools/scripts/setup_ssh_keys.py b/tools/scripts/setup_ssh_keys.py index 7bb03d7ee3..0eb44dbd59 100755 --- a/tools/scripts/setup_ssh_keys.py +++ b/tools/scripts/setup_ssh_keys.py @@ -16,6 +16,6 @@ if __name__ == "__main__": if keys.status_code == 200: Params().put("GithubSshKeys", keys.text) Params().put("GithubUsername", username) - print("Setup ssh keys sucessfully") + print("Setup ssh keys successfully") else: print("Error getting public keys from github")