From 6face82c36bb8f0c61cbf7784c9bf4b8d070c5c5 Mon Sep 17 00:00:00 2001 From: Reed Nightingale Date: Tue, 21 Apr 2020 21:13:55 -0700 Subject: [PATCH] Update includes and pin names --- encoder.cpp | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) diff --git a/encoder.cpp b/encoder.cpp index 7eb57d5..55ec6e4 100644 --- a/encoder.cpp +++ b/encoder.cpp @@ -2,7 +2,7 @@ #include #include "encoder.h" -#include "ubitx.h"//Pin definitions +#include "pin_definitions.h" //Normal encoder state uint8_t prev_enc = 0; @@ -16,7 +16,7 @@ static const uint8_t MOMENTUM_MULTIPLIER = 1; uint8_t enc_state (void) { - return (digitalRead(ENC_A)?1:0 + digitalRead(ENC_B)?2:0); + return (digitalRead(PIN_ENC_A)?1:0 + digitalRead(PIN_ENC_B)?2:0); } /* @@ -71,13 +71,13 @@ void enc_setup(void) { enc_count = 0; // This is already done in setup() ? - //pinMode(ENC_A, INPUT); - //pinMode(ENC_B, INPUT); + //pinMode(PIN_ENC_A, INPUT); + //pinMode(PIN_ENC_B, INPUT); prev_enc = enc_state(); // Setup Pin Change Interrupts for the encoder inputs - pci_setup(ENC_A); - pci_setup(ENC_B); + pci_setup(PIN_ENC_A); + pci_setup(PIN_ENC_B); //Set up timer interrupt for momentum TCCR1A = 0;//"normal" mode