Valopallo
100 W
- Joined
- May 29, 2018
- Messages
- 125
stancecoke said:Valopallo said:Tested and the problem came back
OK, so we have to skip all the condition checks first.
Replace lines 205 -324 with
Code:uint32_current_target = ui16_current_cal_b; // reset target to zero controll_state_temp = 0; ui8_temp = ui8_assist_percent_actual; if ((ui16_aca_flags & DYNAMIC_ASSIST_LEVEL) == DYNAMIC_ASSIST_LEVEL) { ui8_temp += ui8_assist_dynamic_percent_addon; } uint32_current_target = (ui8_temp * ui16_battery_current_max_value* 10)>>10; // replace division by right shift: (xxx*10)>>10 is nearly xxx/100 uint32_current_target = map(ui16_time_ticks_between_pas_interrupt_smoothed, ui16_s_ramp_end, ui16_s_ramp_start, uint32_current_target, 0); uint32_current_target += ui16_current_cal_b; if (ui16_time_ticks_for_pas_calculation > timeout || !PAS_is_active) uint32_current_target = ui16_current_cal_b; if(ui16_time_ticks_between_pas_interrupt_smoothed>ui16_s_ramp_end)controll_state_temp += 1; else controll_state_temp += 2; uint32_temp = ui16_sum_throttle + ui16_current_cal_b; //check throttle override if(uint32_temp>uint32_current_target){ uint32_current_target = uint32_temp; controll_state_temp += 16; } if (ui8_walk_assist) uint32_current_target = 10 + ui16_current_cal_b; //send current target to PI-controller ui32_dutycycle = PI_control(ui16_BatteryCurrent, uint32_current_target,uint_PWM_Enable);
With this there is no speedlimit- , no undervoltage-, no .... check active.
To be honest, I'm not very motivated to add all of this step by step to see when the processor reaches it's limit. I recommend to use the Gazelle branch without the BlueOsec app.... (Or try to do the steps in the Master-code by yourself, it's not that difficult...)
regards
stancecoke
Did not change anything. I tried the throttle only code once again and now it does not work either. All of the tests give now only 35km/h before overloading. I also tried to flash gazelle with display:none and the right hand side toggle between diagnostics and bluosec I chose bluosec ON. I tried to flash but there was an error about no such file for some directory(I can try again) and also at the end
>>> Loading file main.hex in PROGRAM MEMORY image in computer
No such file or directory
As it seems the parameters are fine. I'm still a bit unsure about the right correction angle and the right motor specific angle parameters, could they cause overloading the processor if set a tiny bit wrong values or would the wrong parameter here be noticed clearly first by a bad motor behavior? Another guess to the air; would it matter that my throttle is powered from front motor controller(Factory FW) and only the signal is used by the rear controller that uses OSEC? Would trying it the other way around be worth a try to possibly overcome anything related to the overloading of the processor?