Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

TachoPPR not working with float value #145

Open
Manny-electric opened this issue Jan 12, 2025 · 7 comments
Open

TachoPPR not working with float value #145

Manny-electric opened this issue Jan 12, 2025 · 7 comments

Comments

@Manny-electric
Copy link

currently the TachoPPR value is read as a INT

utils.cpp line 569 in void SpeedoSet(uint16_t speed)

float PulseGain = Param::GetInt(Param::TachoPPR);

should change to:

float PulseGain = Param::GetFloat(Param::TachoPPR);

@Tom-evnut
Copy link
Collaborator

Which vehicle needs a decimal pulse per revolution? Please add some info.

Most Speedos work off of ignition pulses so they would be multiples and not fractions.

@Manny-electric
Copy link
Author

I use this to drive the speedometer to show vehicle speed. Think the code whas make to drive to tachometer, because of the 750 min and 7500 max.

But sins the variable is declared as a float and the web interface is a float. I assumed that was meant to be a float.

@Tom-evnut
Copy link
Collaborator

Tom-evnut commented Jan 18, 2025

Yea the web interfaces makes everything a float. I do not agree with doing that.

Yes it is to drive a tachometer. Could look at introducing an option to have it behave as a speedometer.

Proposal, new output type:

  1. Start from 0
  2. Float interpretation for frequency control

@Sector7e
Copy link

Tom,
So the current 750 minimum is why the tach on my truck starts at 750, even though the motor isn't spinning yet. I was unable to find a way to set this to 0, so your proposal would fix my tach issue.

@Tom-evnut
Copy link
Collaborator

Some tach signals are used to enable things like power steering ect.

Will look at adding the "speedometer" output that allows you to do a tach that shows actual rpm.

@Manny-electric
Copy link
Author

A speedo type would be good.

I have it set to start form 5 km/h. To avoid the speedo jumping at low speed. I think the timer might be loaded with more than 16 bits. could not find a clear datasheet on the timer.

The tach starting from 750 seems good to me. Can act like drive enable indicator

@Tom-evnut
Copy link
Collaborator

Gents pull request is made #158

I bench tested this, it only work on Vehicle set to Classic

Will close once other test

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants