diff --git a/include/motor-control/core/stepper_motor/motor_interrupt_handler.hpp b/include/motor-control/core/stepper_motor/motor_interrupt_handler.hpp index 8fb0aa3d0..8c345e5f1 100644 --- a/include/motor-control/core/stepper_motor/motor_interrupt_handler.hpp +++ b/include/motor-control/core/stepper_motor/motor_interrupt_handler.hpp @@ -499,7 +499,7 @@ class MotorInterruptHandler { build_and_send_ack(ack_msg_id); #ifdef USE_PRESSURE_MOVE if (buffered_move.sensor_id != can::ids::SensorId::UNUSED) { - uint8_t binding = + auto binding = static_cast(can::ids::SensorOutputBinding::sync); if (buffered_move.sensor_id == can::ids::SensorId::BOTH) { send_bind_message(can::ids::SensorId::S0, binding); @@ -656,7 +656,6 @@ class MotorInterruptHandler { can::messages::BindSensorOutputRequest& m) { std::ignore = sensor_tasks::get_queues() .pressure_sensor_queue_rear->try_write_isr(m); - // if (!success) {this->cancel_and_clear_moves();} } void send_to_pressure_sensor_queue_front( can::messages::BindSensorOutputRequest& m) { @@ -664,7 +663,6 @@ class MotorInterruptHandler { // sensor id std::ignore = sensor_tasks::get_queues() .pressure_sensor_queue_front->try_write_isr(m); - // if (!success) {this->cancel_and_clear_moves();} } #endif uint64_t tick_count = 0x0; diff --git a/push b/push index e31d99e84..87a0c761a 100755 --- a/push +++ b/push @@ -61,7 +61,7 @@ def _build_fw(zip_path, apps_path): def _transfer_firmware(host, repo_path, scp, ssh, sensors): dist_dir = "dist" - if sensors + if sensors: dist_dir = dist_dir+"-sensors" apps_path = os.path.join(repo_path, 'dist-sensor', 'applications') apps_path = os.path.join(repo_path, 'dist-sensor', 'applications') @@ -76,11 +76,11 @@ def _transfer_firmware(host, repo_path, scp, ssh, sensors): def _prep_firmware(repo_path, cmake, sensors): preset = "firmware-g4" working_dir = "./build-cross" - if sensors + if sensors: preset = preset+"-sensors" working_dir = working_dir+"-sensors" _cmd([cmake, '--build', f'--preset={preset}', '--target', 'firmware-applications'], cwd=repo_path) - _cmd([cmake, '--install', f'{working_dir}', '--component', 'Applications'], cwd=repo_path) + _cmd([cmake, '--install', f'{working_dir}/', '--component', 'Applications'], cwd=repo_path) @contextmanager def _prep_robot(host, ssh): @@ -105,7 +105,7 @@ def _find_utils(): def _restart_robot(host, ssh): _ssh(ssh, host, 'nohup systemctl restart opentrons-robot-server &') -def _do_push(host, repo_path, build, restart): +def _do_push(host, repo_path, build, restart, sensors): ssh, scp, cmake = _find_utils() if build: _prep_firmware(repo_path, cmake, sensors) @@ -117,7 +117,7 @@ def _do_push(host, repo_path, build, restart): def push(host, repo_path=None, build=True, restart=True, sensors=False): repo = repo_path or os.dirname(__file__) try: - _do_push(host, repo, build, restart) + _do_push(host, repo, build, restart, sensors) return 0 except subprocess.CalledProcessError as e: print( @@ -167,7 +167,7 @@ def _arg_parser(parent=None): ) parser.add_argument( '--sensors', - type=str, + action='store_true', help='Private SSH key to use' ) return parser