From b8d953624e23456c41a09d7107eb4b549e600cb5 Mon Sep 17 00:00:00 2001 From: r0mko Date: Fri, 3 Apr 2020 23:26:34 +0200 Subject: [PATCH] Fix motor type selection --- src/controller/ebike_app.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/controller/ebike_app.c b/src/controller/ebike_app.c index 11875472..7c4bb1da 100755 --- a/src/controller/ebike_app.c +++ b/src/controller/ebike_app.c @@ -657,7 +657,7 @@ static void communications_process_packages(uint8_t ui8_frame_type) m_config_vars.ui8_torque_sensor_calibration_feature_enabled = (ui8_rx_buffer[9] & 8) >> 3; m_config_vars.ui8_torque_sensor_calibration_pedal_ground = (ui8_rx_buffer[9] & 16) >> 4; m_config_vars.ui8_motor_assistance_startup_without_pedal_rotation = (ui8_rx_buffer[9] & 32) >> 5; - m_config_vars.ui8_motor_type = (ui8_rx_buffer[9] & 64) >> 6; + m_config_vars.ui8_motor_type = (ui8_rx_buffer[9] >> 6) & 0x3; // motor max current ebike_app_set_motor_max_current(ui8_rx_buffer[10]);