From 3438bef4fbf215452fe2f124b692a6b7143c9945 Mon Sep 17 00:00:00 2001 From: Reed Nightingale Date: Sat, 15 Feb 2020 18:42:06 -0800 Subject: [PATCH] Clean up types a bit --- touch.cpp | 11 +++++------ 1 file changed, 5 insertions(+), 6 deletions(-) diff --git a/touch.cpp b/touch.cpp index 181bb4e..98b89bd 100644 --- a/touch.cpp +++ b/touch.cpp @@ -4,13 +4,12 @@ #include "ubitx.h"//pin assignments -#define Z_THRESHOLD 400 -#define Z_THRESHOLD_INT 75 -#define MSEC_THRESHOLD 3 +constexpr int16_t Z_THRESHOLD = 400; +constexpr uint8_t MSEC_THRESHOLD = 3; -static uint32_t msraw=0x80000000; -static int16_t xraw=0, yraw=0, zraw=0; -static uint8_t rotation = 1; +uint32_t msraw=0x80000000; +int16_t xraw=0, yraw=0, zraw=0; +constexpr uint8_t rotation = 1; int16_t touch_besttwoavg( int16_t x , int16_t y , int16_t z ) { int16_t da, db, dc;