Disable overflow in Pulse Count with limits
Posted: Mon Sep 11, 2023 5:11 am
Hey all!
First of all, search is super slow when trying to find previous relevant posts. Any reason why? I had this forum site hang up on me a couple of times trying to search for pulse count stuff to see this topic has been brought up before.
Anyways, to the question. I see the Pulse Count module resets back to zero once you exceed either the high or low limit. I would like to vale to not exceed, nor reset to zero, when a limit is reached. For instance, if my high limit is 100, when I turn my rotary encoder in a positive direction, the value will increase up to 100 and will stay there for any more positive direction movement. The moment I go in a negative direction, it would immediately come down from the 100 value. And the same behavior for the low limit.
If I could find where in the code that the value updates and count reset when exceeding the limit takes place, I know I could easily put the code I need in to achieve this. A simple rather than reset the count value when exceeding, break before a count value update. I've searched through the source files and I can't seem to find out exactly where that is though. Does anyone have any pointers, no pun intended, on where this takes place? Also, I'm new to ISR's so it's possible I'm overlooking it since I don't know what I don't know when it comes to its operation, at least with how I believe the ISR is working here.
First of all, search is super slow when trying to find previous relevant posts. Any reason why? I had this forum site hang up on me a couple of times trying to search for pulse count stuff to see this topic has been brought up before.
Anyways, to the question. I see the Pulse Count module resets back to zero once you exceed either the high or low limit. I would like to vale to not exceed, nor reset to zero, when a limit is reached. For instance, if my high limit is 100, when I turn my rotary encoder in a positive direction, the value will increase up to 100 and will stay there for any more positive direction movement. The moment I go in a negative direction, it would immediately come down from the 100 value. And the same behavior for the low limit.
If I could find where in the code that the value updates and count reset when exceeding the limit takes place, I know I could easily put the code I need in to achieve this. A simple rather than reset the count value when exceeding, break before a count value update. I've searched through the source files and I can't seem to find out exactly where that is though. Does anyone have any pointers, no pun intended, on where this takes place? Also, I'm new to ISR's so it's possible I'm overlooking it since I don't know what I don't know when it comes to its operation, at least with how I believe the ISR is working here.