On 9 September 2010 13:39, Stuart Stevenson <stus...@gmail.com> wrote:

> if (PotZero) {
>    toolpotcount = 1;
> } else if (PotCount) {
>    toolpotcount = toolpotcount + 1;
> }

Does the "zero" pot also trigger the "PotCount" pin?

I would be tempted to put the edge detector into the comp, to make the
HAL simpler. That would also allow you to mask PotCount on PotZero.

if (PotZero && !OldPotZero){.....

-- 
atp

------------------------------------------------------------------------------
This SF.net Dev2Dev email is sponsored by:

Show off your parallel programming skills.
Enter the Intel(R) Threading Challenge 2010.
http://p.sf.net/sfu/intel-thread-sfd
_______________________________________________
Emc-users mailing list
Emc-users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/emc-users

Reply via email to