Compare commits

..

3 Commits

Author SHA1 Message Date
royjr 13c07838e4 Revert "Update rednose_repo"
This reverts commit 23ac14d802.
2026-03-24 12:40:49 -04:00
royjr 23ac14d802 Update rednose_repo 2026-03-24 12:26:46 -04:00
royjr bb0f0c9c69 init 2026-03-24 12:25:46 -04:00
9 changed files with 19 additions and 17 deletions
+4 -1
View File
@@ -65,7 +65,10 @@ DEVICE_CAMERAS = {
("unknown", "ox03c10"): _ar_ox_config,
# simulator (emulates a tici)
("pc", "unknown"): _ar_ox_config,
("pc", "unknown"): _os_config,
# ("pc", "ar0231"): _ar_ox_config,
# ("pc", "ox03c10"): _ar_ox_config,
# ("pc", "os04c10"): _os_config,
}
prods = itertools.product(('tici', 'tizi', 'mici'), (('ar0231', _ar_ox_config), ('ox03c10', _ar_ox_config), ('os04c10', _os_config)))
DEVICE_CAMERAS.update({(d, c[0]): c[1] for d, c in prods})
+1 -3
View File
@@ -185,9 +185,7 @@ def modeld_lagging_alert(CP: car.CarParams, CS: car.CarState, sm: messaging.SubM
def joystick_alert(CP: car.CarParams, CS: car.CarState, sm: messaging.SubMaster, metric: bool, soft_disable_time: int, personality) -> Alert:
gb = sm['carControl'].actuators.accel / 4.
steer = sm['carControl'].actuators.torque
damp = sm['carControl'].actuators.dampFactor
damp_pct = round((damp - 3) / (200 - 3) * 100.) if damp > 0 else 50
vals = f"Gas: {round(gb * 100.)}%, Steer: {round(steer * 100.)}%\nDamp: {damp_pct}%"
vals = f"Gas: {round(gb * 100.)}%, Steer: {round(steer * 100.)}%"
return NormalPermanentAlert("Joystick Mode", vals)
@@ -29,6 +29,9 @@ lenv = env.Clone()
# ekf filter libraries need to be linked, even if no symbols are used
if arch != "Darwin":
lenv["LINKFLAGS"] += ["-Wl,--no-as-needed"]
else:
# On macOS, point the executable at the generated filter dylibs next to it.
lenv["LINKFLAGS"] += ["-Wl,-rpath,@loader_path/models/generated"]
lenv["LIBPATH"].append(Dir(rednose_gen_dir).abspath)
lenv["RPATH"].append(Dir(rednose_gen_dir).abspath)
+1 -1
View File
@@ -227,7 +227,7 @@ def main() -> None:
if __name__ == "__main__":
unblock_stdout()
# unblock_stdout()
try:
main()
+4
View File
@@ -457,6 +457,10 @@ class GuiApplication(GuiApplicationExt):
def texture(self, asset_path: str, width: int | None = None, height: int | None = None,
alpha_premultiply=False, keep_aspect_ratio=True, flip_x: bool = False) -> rl.Texture:
if width is not None:
width = int(width)
if height is not None:
height = int(height)
cache_key = f"{asset_path}_{width}_{height}_{alpha_premultiply}_{keep_aspect_ratio}_{flip_x}"
if cache_key in self._textures:
return self._textures[cache_key]
+1 -1
View File
@@ -69,7 +69,7 @@ base_frameworks = qt_env['FRAMEWORKS']
base_libs = [common, messaging, cereal, visionipc, 'm', 'pthread'] + qt_env["LIBS"]
if arch == "Darwin":
base_frameworks.append('QtCharts')
base_frameworks += ['QtCharts', 'CoreFoundation', 'IOKit', 'Security']
else:
base_libs.append('Qt5Charts')
+4 -6
View File
@@ -55,11 +55,10 @@ class Joystick:
steer_axis = 'ABS_Z'
self.flip_map = {'ABS_RY': accel_axis}
damp_axis = 'ABS_X'
self.min_axis_value = {accel_axis: 0., steer_axis: 0., damp_axis: 0.}
self.max_axis_value = {accel_axis: 255., steer_axis: 255., damp_axis: 255.}
self.axes_values = {accel_axis: 0., steer_axis: 0., damp_axis: 0.}
self.axes_order = [accel_axis, steer_axis, damp_axis]
self.min_axis_value = {accel_axis: 0., steer_axis: 0.}
self.max_axis_value = {accel_axis: 255., steer_axis: 255.}
self.axes_values = {accel_axis: 0., steer_axis: 0.}
self.axes_order = [accel_axis, steer_axis]
self.cancel = False
def update(self):
@@ -70,7 +69,6 @@ class Joystick:
return False
event = (joystick_event.code, joystick_event.state)
print(f"event: code={joystick_event.code}, state={joystick_event.state}, ev_type={joystick_event.ev_type}")
# flip left trigger to negative accel
if event[0] in self.flip_map:
-4
View File
@@ -57,10 +57,6 @@ def joystickd_thread():
actuators.torque = float(np.clip(joystick_axes[1], -1, 1))
actuators.steeringAngleDeg, actuators.curvature = actuators.torque * max_angle, actuators.torque * -max_curvature
if len(joystick_axes) > 2:
# axes[2] controls DAMP_FACTOR: [-1, 1] mapped to [3, 200]
actuators.dampFactor = float(np.interp(joystick_axes[2], [-1, 1], [3, 200]))
pm.send('carControl', cc_msg)
cs_msg = messaging.new_message('controlsState')