casainho
10 GW
- Joined
- Feb 14, 2011
- Messages
- 6,058

I went to ride and I used my Garmin GPS display, and yes, changing the assist level works well. Maybe this week I will finally remove the 860C display from the handle bar and start using only the wireless board... that will for sure give me extra motivation to finish the project and solve the issues I will have to deal with
There are some variables that have hard coded values, like the wheel speed = 25 km/h - this need to be improved.
I found the issue, and @rananna was right to think on the motor errors...
I just sent motor error variable as hall sensor, for the mobile app, and I found at level 3, at startup, sometimes the I got the error rt_vars.ui8_error_states = ERROR_FATAL, that only happens here on the motor controller firmware:
Code:
// if CRC is correct read the package
if (((((uint16_t) ui8_rx_buffer[ui8_len + 1]) << 8) +
((uint16_t) ui8_rx_buffer[ui8_len])) == ui16_crc_rx)
{
...
}
else
{
ui8_received_package_flag = 0;
ui8_comm_error_counter++;
}
// check for communications fail or display master fail
// can't fail more then 1000ms
if (ui8_comm_error_counter > 10) {
motor_disable_pwm();
ui8_m_motor_enabled = 0;
ui8_m_system_state |= ERROR_FATAL;
}
I found that just sometimes I got this issue, and I did a long ride without any error at all even when changing between all assist levels.
So, why this issue happens but did not with the displays??