Skip to content

Current controller counter issue in motor.c #151

@4var1

Description

@4var1

ui16_motor_speed_controller_counter never gets reset after firing so will fire lots more than expected... means it fires most of the time - only not firing for 2000 pwm cycles just after ui16_motor_speed_controller_counter wraps back to 0...

Not tested - just noticed as part of porting mspider65's changes across

else if ((ui16_motor_speed_controller_counter > 2000) && // test about every 100ms
    (ui16_motor_speed_erps > ui16_max_motor_speed_erps))

The equivalent current counter gets reset ok - so would work as expected...

if (ui8_current_controller_counter > 14)
  ui8_current_controller_counter = 0;

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type
    No fields configured for issues without a type.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions