v1.3.1 using float for interval

### Releases v1.3.1

1. Using `float` instead of `ulong` for better interval accuracy
This commit is contained in:
Khoi Hoang
2022-09-29 22:03:58 -04:00
committed by GitHub
parent f010d88221
commit b7d8f4b4b7
9 changed files with 26 additions and 0 deletions
@@ -47,6 +47,8 @@ volatile pinStruct myOutputPins = { LED_BUILTIN, 0, 1 };
bool TimerHandler(struct repeating_timer *t)
{
(void) t;
static bool toggle = false;
//timer interrupt toggles pins
+4
View File
@@ -50,6 +50,8 @@
bool TimerHandler0(struct repeating_timer *t)
{
(void) t;
static bool toggle0 = false;
#if (TIMER_INTERRUPT_DEBUG > 0)
@@ -65,6 +67,8 @@ bool TimerHandler0(struct repeating_timer *t)
bool TimerHandler1(struct repeating_timer *t)
{
(void) t;
static bool toggle1 = false;
#if (TIMER_INTERRUPT_DEBUG > 0)
@@ -44,6 +44,8 @@ RPI_PICO_Timer ITimer2(2);
bool TimerHandler1(struct repeating_timer *t)
{
(void) t;
static bool toggle1 = false;
#if (TIMER_INTERRUPT_DEBUG > 0)
@@ -61,6 +63,8 @@ bool TimerHandler1(struct repeating_timer *t)
bool TimerHandler2(struct repeating_timer *t)
{
(void) t;
static bool toggle2 = false;
#if (TIMER_INTERRUPT_DEBUG > 0)
@@ -52,6 +52,8 @@ volatile uint32_t Timer1Count = 0;
bool TimerHandler0(struct repeating_timer *t)
{
(void) t;
static bool toggle0 = false;
// Flag for checking to be sure ISR is working as Serial.print is not OK here in ISR
@@ -70,6 +72,8 @@ bool TimerHandler0(struct repeating_timer *t)
bool TimerHandler1(struct repeating_timer *t)
{
(void) t;
static bool toggle1 = false;
// Flag for checking to be sure ISR is working as Serial.print is not OK here in ISR
@@ -80,6 +80,8 @@ RPI_PICO_ISR_Timer ISR_Timer;
// Never use Serial.print inside this ISR. Will hang the system
bool TimerHandler(struct repeating_timer *t)
{
(void) t;
static bool toggle = false;
static int timeRun = 0;
@@ -60,6 +60,8 @@ volatile uint32_t previousMillis5s = 0;
bool TimerHandler(struct repeating_timer *t)
{
(void) t;
static bool toggle = false;
static int timeRun = 0;
+2
View File
@@ -69,6 +69,8 @@ volatile int debounceCounter;
bool TimerHandler0(struct repeating_timer *t)
{
(void) t;
if ( !digitalRead(SWPin) && (debounceCounter >= DEBOUNCING_INTERVAL_MS / TIMER0_INTERVAL_MS ) )
{
//min time between pulses has passed
@@ -64,6 +64,8 @@ volatile bool SWLongPressed = false;
bool TimerHandler1(struct repeating_timer *t)
{
(void) t;
static unsigned int debounceCountSWPressed = 0;
static unsigned int debounceCountSWReleased = 0;
@@ -48,6 +48,8 @@
bool TimerHandler0(struct repeating_timer *t)
{
(void) t;
static bool toggle0 = false;
static bool started = false;
@@ -70,6 +72,8 @@ bool TimerHandler0(struct repeating_timer *t)
bool TimerHandler1(struct repeating_timer *t)
{
(void) t;
static bool toggle1 = false;
static bool started = false;