Note de ce sujet :
  • Moyenne : 0 (0 vote(s))
  • 1
  • 2
  • 3
  • 4
  • 5
Attempt at cheap homemade version of Harmony
#40
(2017-01-19, 18:38)Normand_Nadon a écrit : For the in between potentiometer issue, try adding a dynamic deadband in your scale.... Or different switch up vs switch down values
That’s just what it needed a quick search found this code which works well. I like how the deadband can be changed easily.

int deadband = 10;
if (0 == valPrev)
{deadband = 0;
}
if((877 + deadband) < val)
{

}

else if (((731+deadband)<val) &&(val<=(877-deadband)))
{

}
Repeated 4 times with different values and then.

else if (val<(147-deadband))
{

}
valPrev = val;

I’ve also been experimenting with the multiplier that calculates the offset for cadence correction. Increasing it makes it very unstable and reducing makes the cadence less accurate. No improvements to be made there, it might just be the occasional oscillation might be the price to pay for accuracy. I will experiment with averaging next but if it adds a delay I won’t use it.



Sent from my BV5000 using Tapatalk
- Oran
Répondre


Messages dans ce sujet
RE: Attempt at cheap homemade version of Harmony - par Oran - 2017-01-21, 18:42

Atteindre :


Utilisateur(s) parcourant ce sujet : 1 visiteur(s)